Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(button): Remove button's dependency on typography, by specifying letter-spacing #851

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
<a name="0.14.0"></a>
# [0.14.0](https://github.com/material-components/material-components-web/compare/v0.13.0...v0.14.0) (2017-06-26)


### Bug Fixes

* **base:** Fix compiler warnings (#788) ([56d8fff](https://github.com/material-components/material-components-web/commit/56d8fff)), closes [(#788](https://github.com/(/issues/788)
* **button:** Sets text on raised buttons on dark theme to text-primary-on-primary (#853) ([49170d6](https://github.com/material-components/material-components-web/commit/49170d6))
* **infrastructure:** Harden closure declaration source rewriting (#835) ([7c6da3a](https://github.com/material-components/material-components-web/commit/7c6da3a))
* **ripple:** Remove fg deactivation class when animation finishes ([4985b4b](https://github.com/material-components/material-components-web/commit/4985b4b))
* **toolbar:** Adjusting sibling elements on mobile landscape (#846) ([798091f](https://github.com/material-components/material-components-web/commit/798091f))

### Features

* **infrastructure:** Create script for that rewrites .scss imports (#831) ([bd0123b](https://github.com/material-components/material-components-web/commit/bd0123b))
* **layout-grid:** Add fixed column width layout grid modifier. (#816) ([94d62ad](https://github.com/material-components/material-components-web/commit/94d62ad)), closes [(#816](https://github.com/(/issues/816) [#748](https://github.com/material-components/material-components-web/issues/748)
* **menu:** annotate mdc-menu for closure compiler ([b188d4f](https://github.com/material-components/material-components-web/commit/b188d4f)), closes [#339](https://github.com/material-components/material-components-web/issues/339)
* **menu:** Export util (#824) ([7d0394b](https://github.com/material-components/material-components-web/commit/7d0394b)), closes [#823](https://github.com/material-components/material-components-web/issues/823)
* **ripple:** Add layout() method to component ([ef99024](https://github.com/material-components/material-components-web/commit/ef99024))
* **ripple:** export util from @material/ripple (#751) ([27c172a](https://github.com/material-components/material-components-web/commit/27c172a)), closes [#253](https://github.com/material-components/material-components-web/issues/253)
* **ripple:** Reduce the fade out time for foreground ripple effect ([9394b5f](https://github.com/material-components/material-components-web/commit/9394b5f))
* **textfield:** Implement text field boxes ([cfa3737](https://github.com/material-components/material-components-web/commit/cfa3737)), closes [#673](https://github.com/material-components/material-components-web/issues/673)



<a name="0.13.0"></a>
# [0.13.0](https://github.com/material-components/material-components-web/compare/v0.12.0...v0.13.0) (2017-06-12)

Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"extract-text-webpack-plugin": "^2.1.2",
"glob": "^7.1.1",
"google-closure-compiler": "^20170521.0.0",
"husky": "^0.13.1",
"husky": "^0.14.0",
"istanbul": "^0.4.4",
"istanbul-instrumenter-loader": "^2.0.0",
"json-loader": "^0.5.4",
Expand All @@ -75,6 +75,7 @@
"recast": "^0.12.3",
"resolve": "^1.3.2",
"sass-loader": "^6.0.4",
"scss-parser": "^1.0.0",
"semver": "^5.3.0",
"standard-changelog": "0.0.1",
"style-loader": "^0.18.0",
Expand All @@ -86,6 +87,7 @@
"stylelint-selector-bem-pattern": "^1.0.0",
"testdouble": "3.0.0",
"to-slug-case": "^1.0.0",
"query-ast": "^1.0.1",
"validate-commit-msg": "^2.6.1",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.4.3"
Expand Down Expand Up @@ -158,6 +160,8 @@
},
"closureWhitelist": [
"mdc-animation",
"mdc-base"
"mdc-base",
"mdc-menu",
"mdc-ripple"
]
}
50 changes: 25 additions & 25 deletions packages/material-components-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "material-components-web",
"description": "Modular and customizable Material Design UI components for the web",
"version": "0.13.0",
"version": "0.14.0",
"license": "Apache-2.0",
"keywords": [
"material components",
Expand All @@ -15,31 +15,31 @@
"dependencies": {
"@material/animation": "^0.2.3",
"@material/auto-init": "^0.1.2",
"@material/base": "^0.2.0",
"@material/button": "^0.3.7",
"@material/card": "^0.2.3",
"@material/checkbox": "^0.3.6",
"@material/dialog": "^0.3.1",
"@material/drawer": "^0.5.0",
"@material/elevation": "^0.1.8",
"@material/fab": "^0.3.9",
"@material/form-field": "^0.2.7",
"@material/grid-list": "^0.2.4",
"@material/icon-toggle": "^0.1.12",
"@material/layout-grid": "^0.2.0",
"@material/linear-progress": "^0.1.2",
"@material/list": "^0.2.10",
"@material/menu": "^0.3.0",
"@material/radio": "^0.2.5",
"@material/ripple": "^0.6.2",
"@material/select": "^0.3.8",
"@material/slider": "^0.1.0",
"@material/snackbar": "^0.2.1",
"@material/switch": "^0.1.8",
"@material/tabs": "^0.2.1",
"@material/textfield": "^0.2.11",
"@material/base": "^0.2.1",
"@material/button": "^0.3.8",
"@material/card": "^0.2.4",
"@material/checkbox": "^0.3.7",
"@material/dialog": "^0.3.2",
"@material/drawer": "^0.5.1",
"@material/elevation": "^0.1.9",
"@material/fab": "^0.3.10",
"@material/form-field": "^0.2.8",
"@material/grid-list": "^0.2.5",
"@material/icon-toggle": "^0.1.13",
"@material/layout-grid": "^0.3.0",
"@material/linear-progress": "^0.1.3",
"@material/list": "^0.2.11",
"@material/menu": "^0.4.0",
"@material/radio": "^0.2.6",
"@material/ripple": "^0.7.0",
"@material/select": "^0.3.9",
"@material/slider": "^0.1.1",
"@material/snackbar": "^0.2.2",
"@material/switch": "^0.1.9",
"@material/tabs": "^0.2.2",
"@material/textfield": "^0.3.0",
"@material/theme": "^0.1.5",
"@material/toolbar": "^0.4.0",
"@material/toolbar": "^0.4.1",
"@material/typography": "^0.2.2"
}
}
2 changes: 1 addition & 1 deletion packages/mdc-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mdc-base exposes two classes: `MDCComponent` (the default export) which all comp

### MDCFoundation

MDCFoundation provides the basic mechanisms for implementing a foundation classes. Subclasses are expected to:
MDCFoundation provides the basic mechanisms for implementing foundation classes. Subclasses are expected to:

- Provide implementations of the proper static getters where necessary.
- Provide `init()` and `destroy()` lifecycle methods
Expand Down
8 changes: 4 additions & 4 deletions packages/mdc-base/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ export default class MDCComponent {

/**
* @param {!Element} root
* @param {!F} foundation
* @param {F=} foundation
* @param {...?} args
*/
constructor(root, foundation = undefined, ...args) {
/** @private {!Element} */
/** @protected {!Element} */
this.root_ = root;
this.initialize(...args);
// Note that we initialize foundation here and not within the constructor's default param so that
// this.root_ is defined and can be used within the foundation class.
/** @private {!F} */
/** @protected {!F} */
this.foundation_ = foundation === undefined ? this.getDefaultFoundation() : foundation;
this.foundation_.init();
this.initialSyncWithDOM();
Expand Down Expand Up @@ -104,7 +104,7 @@ export default class MDCComponent {
* with the given data.
* @param {string} evtType
* @param {!Object} evtData
* @param {boolean} shouldBubble
* @param {boolean=} shouldBubble
*/
emit(evtType, evtData, shouldBubble = false) {
let evt;
Expand Down
4 changes: 2 additions & 2 deletions packages/mdc-base/foundation.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export default class MDCFoundation {
}

/**
* @param {!A} adapter
* @param {A=} adapter
*/
constructor(adapter = {}) {
/** @private {!A} */
/** @protected {!A} */
this.adapter_ = adapter;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-base/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@material/base",
"description": "The set of base classes for Material Components for the web",
"version": "0.2.0",
"version": "0.2.1",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down
7 changes: 4 additions & 3 deletions packages/mdc-button/mdc-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
@include mdc-ripple-base;
@include mdc-ripple-bg((pseudo: "::before"));
@include mdc-ripple-fg((pseudo: "::after"));
@include mdc-typography(body2);
@include mdc-theme-prop(color, text-primary-on-light);

display: inline-block;
Expand All @@ -39,9 +38,10 @@
border-radius: 2px;
outline: none;
background: transparent;
font-size: 14px; // Override font to specifically be px as spec defined pt
font-size: 14px;
font-weight: 500;
line-height: 36px; // Override line-height so text aligns centered
letter-spacing: .04em;
line-height: 36px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
Expand Down Expand Up @@ -115,6 +115,7 @@

@include mdc-theme-dark(".mdc-button") {
@include mdc-theme-prop(background-color, primary);
@include mdc-theme-prop(color, text-primary-on-primary);

// postcss-bem-linter: ignore
&::before {
Expand Down
9 changes: 4 additions & 5 deletions packages/mdc-button/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@material/button",
"description": "The Material Components for the web button component",
"version": "0.3.7",
"version": "0.3.8",
"license": "Apache 2.0",
"keywords": [
"material components",
Expand All @@ -14,9 +14,8 @@
},
"dependencies": {
"@material/animation": "^0.2.3",
"@material/elevation": "^0.1.8",
"@material/ripple": "^0.6.2",
"@material/theme": "^0.1.5",
"@material/typography": "^0.2.2"
"@material/elevation": "^0.1.9",
"@material/ripple": "^0.7.0",
"@material/theme": "^0.1.5"
}
}
6 changes: 3 additions & 3 deletions packages/mdc-card/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@material/card",
"version": "0.2.3",
"version": "0.2.4",
"description": "The Material Components for the web card component",
"license": "Apache-2.0",
"keywords": [
Expand All @@ -13,9 +13,9 @@
"url": "https://github.com/material-components/material-components-web.git"
},
"dependencies": {
"@material/elevation": "^0.1.8",
"@material/elevation": "^0.1.9",
"@material/theme": "^0.1.5",
"@material/typography": "^0.2.2",
"@material/rtl": "^0.1.5"
"@material/rtl": "^0.1.6"
}
}
2 changes: 1 addition & 1 deletion packages/mdc-checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ The adapter for checkboxes must provide the following functions, with correct si
| `deregisterChangeHandler(handler: EventListener) => void` | Deregisters an event handler that was previously passed to `registerChangeHandler`. |
| `getNativeControl() => HTMLInputElement?` | Returns the native checkbox control, if available. Note that if this control is not available, the methods that rely on it will exit gracefully.|
| `forceLayout() => void` | Force-trigger a layout on the root element. This is needed to restart animations correctly. If you find that you do not need to do this, you can simply make it a no-op. |
| `isAttachedToDOM() => boolean` | Returns true if the component is currently attached to the DOM, false otherwise.` |
| `isAttachedToDOM() => boolean` | Returns true if the component is currently attached to the DOM, false otherwise. |


#### MDCCheckboxFoundation API
Expand Down
8 changes: 4 additions & 4 deletions packages/mdc-checkbox/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@material/checkbox",
"description": "The Material Components for the web checkbox component",
"version": "0.3.6",
"version": "0.3.7",
"license": "Apache-2.0",
"keywords": [
"material components",
Expand All @@ -15,9 +15,9 @@
},
"dependencies": {
"@material/animation": "^0.2.3",
"@material/base": "^0.2.0",
"@material/ripple": "^0.6.2",
"@material/rtl": "^0.1.5",
"@material/base": "^0.2.1",
"@material/ripple": "^0.7.0",
"@material/rtl": "^0.1.6",
"@material/theme": "^0.1.5"
}
}
10 changes: 5 additions & 5 deletions packages/mdc-dialog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@material/dialog",
"version": "0.3.1",
"version": "0.3.2",
"description": "The Material Components Web dialog component",
"license": "Apache-2.0",
"keywords": [
Expand All @@ -16,10 +16,10 @@
},
"dependencies": {
"@material/animation": "^0.2.3",
"@material/base": "^0.2.0",
"@material/elevation": "^0.1.8",
"@material/ripple": "^0.6.2",
"@material/rtl": "^0.1.5",
"@material/base": "^0.2.1",
"@material/elevation": "^0.1.9",
"@material/ripple": "^0.7.0",
"@material/rtl": "^0.1.6",
"@material/theme": "^0.1.5",
"@material/typography": "^0.1.1",
"focus-trap": "^2.3.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/mdc-drawer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@material/drawer",
"version": "0.5.0",
"version": "0.5.1",
"description": "The Material Components Web drawer component",
"license": "Apache-2.0",
"keywords": [
Expand All @@ -16,9 +16,9 @@
},
"dependencies": {
"@material/animation": "^0.2.3",
"@material/base": "^0.2.0",
"@material/elevation": "^0.1.8",
"@material/rtl": "^0.1.5",
"@material/base": "^0.2.1",
"@material/elevation": "^0.1.9",
"@material/rtl": "^0.1.6",
"@material/theme": "^0.1.5",
"@material/typography": "^0.2.2"
}
Expand Down
Loading