109 Commits

Author SHA1 Message Date
Elizabeth Mitchell
e7bc633e18 chore(behaviors): add ElementInternals mixin
PiperOrigin-RevId: 576937116
2023-10-26 11:31:33 -07:00
Elizabeth Mitchell
c390291687 chore: format files with prettier
PiperOrigin-RevId: 576601342
2023-10-25 11:59:00 -07:00
Elizabeth Mitchell
c1d3cc0f50 chore: add missing licenses
PiperOrigin-RevId: 575915441
2023-10-23 13:39:04 -07:00
Elizabeth Mitchell
8894c20c6b fix(button): remove font shorthand tokens
BREAKING CHANGE: replace `label-text-type` tokens with `label-text-font`, `-size`, `-line-height`, and `-weight`

PiperOrigin-RevId: 563153211
2023-09-06 10:56:22 -07:00
Elizabeth Mitchell
4b61e8d203 fix(button): update demos to fix a11y
Also fixes disabled elevated buttons animating their shadow.

PiperOrigin-RevId: 561367294
2023-08-30 09:44:30 -07:00
Elizabeth Mitchell
f23fac1465 fix(button): add value to form when submitting
Fixes #4526

PiperOrigin-RevId: 558261952
2023-08-18 15:24:42 -07:00
Elizabeth Mitchell
3e13634d64 chore: make formAssociated readonly
PiperOrigin-RevId: 558255234
2023-08-18 14:57:38 -07:00
Elizabeth Mitchell
a2dce1679a chore(button): refactor render methods
PiperOrigin-RevId: 557937034
2023-08-17 14:28:32 -07:00
Andrew Jakubowicz
d665864cba fix(button): href and target default value is now an empty string
The type of `target` has also been made stricter, now only accepting '_blank'|'_parent'|'_self'|'_top'|''.

PiperOrigin-RevId: 557624071
2023-08-16 15:42:04 -07:00
Andrew Jakubowicz
b144227438 fix(button): incorrect HCM colors
PiperOrigin-RevId: 557601131
2023-08-16 14:21:48 -07:00
Elizabeth Mitchell
0e492ade43 chore: remove sass theme utilities
PiperOrigin-RevId: 556915539
2023-08-14 14:39:19 -07:00
Elizabeth Mitchell
1f46179e83 feat(button): add touch target configs
PiperOrigin-RevId: 555666648
2023-08-10 14:57:37 -07:00
Elizabeth Mitchell
c0da72b6dc feat(iconbutton): add form submission
This is needed for `<md-dialog>` for close icon buttons.

I split out button's logic into a static helper method. I also added a symbol to share ElementInternals.

PiperOrigin-RevId: 554943716
2023-08-08 14:33:01 -07:00
Elizabeth Mitchell
0510496e60 chore: avoid this in static context
PiperOrigin-RevId: 554933524
2023-08-08 14:00:25 -07:00
Andrew Jakubowicz
1be2b6263f test: move button form test into internal button_test
PiperOrigin-RevId: 554533904
2023-08-07 11:13:15 -07:00
Elizabeth Mitchell
97f5b616d6 fix(button)!: type is submit by default
Also fixes the button not being the correct `submitter` for submit events.

BREAKING CHANGE: Buttons submit forms by default, like `<button>`. Add `type="button"` to not submit forms.

PiperOrigin-RevId: 553248284
2023-08-02 13:57:32 -07:00
Elizabeth Mitchell
cc26ef6c02 fix(button)!: rename <md-tonal-button> to <md-filled-tonal-button>
BREAKING CHANGE: Rename "md-tonal-button" elements, imports, and tokens to "md-filled-tonal-button"

PiperOrigin-RevId: 552600206
2023-07-31 14:57:34 -07:00
Elizabeth Mitchell
2329d2b419 fix(button)!: rename spacing tokens
BREAKING CHANGE: Rename `--md-<button>-spacing-<token>` to `--md-<button>-<token>-space`. Rename `--md-<button>-with-icon-*` to `--md-<button>-with-leading-icon-*`.

PiperOrigin-RevId: 552323014
2023-07-30 17:18:48 -07:00
Elliott Marquez
86ccec3e7e build: use firebase for hosting and remove url prefixes 2023-07-27 09:17:27 -07:00
Elizabeth Mitchell
d49f9b89e4 fix(focus)!: rename import to md-focus-ring.ts
BREAKING CHANGE: Change `@material/web/focus/focus-ring.js` to `@material/web/focus/md-focus-ring.js`.

PiperOrigin-RevId: 550608428
2023-07-24 10:43:31 -07:00
Andrew Jakubowicz
601ebb669c fix(button)!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/button/lib` to `@material/web/button/internal`. Prefer not using internal files.

PiperOrigin-RevId: 549999271
2023-07-21 11:20:19 -07:00
Andrew Jakubowicz
2dabbdc142 fix(button): remove md3-* class prefixes
PiperOrigin-RevId: 549499066
2023-07-19 20:06:02 -07:00
Andrew Jakubowicz
45f42f03ce chore: use inline sass comments
PiperOrigin-RevId: 549344985
2023-07-19 09:51:35 -07:00
Andrew Jakubowicz
9d3501b174 chore: remove shared :root styles
PiperOrigin-RevId: 549144813
2023-07-18 16:35:45 -07:00
Andrew Jakubowicz
10f60d23e0 chore: rename e to event
PiperOrigin-RevId: 549039407
2023-07-18 10:16:37 -07:00
Elizabeth Mitchell
243e231a13 feat(all): expose focus-ring parts
PiperOrigin-RevId: 548873009
2023-07-17 20:28:04 -07:00
Elizabeth Mitchell
fd28dd1a5b chore(all): move focus tokens to focus ring element
PiperOrigin-RevId: 548872335
2023-07-17 20:24:46 -07:00
Andrew Jakubowicz
25be982568 fix(button)!: remove with-* prefix from tokens
PiperOrigin-RevId: 546883625
2023-07-10 08:44:40 -07:00
Andrew Jakubowicz
9244524471 fix(button)!: remove unnecessary property preventClickDefault
PiperOrigin-RevId: 542958395
2023-06-23 14:27:32 -07:00
Andrew Jakubowicz
1a6fc29174 fix(button)!: normalize compound properties to have kebab-cased attributes
BREAKING_CHANGE: The attributes `trailingicon`, and `hasicon` have been renamed to `trailing-icon` and `has-icon` respectively.
PiperOrigin-RevId: 542447334
2023-06-21 21:36:38 -07:00
Elizabeth Mitchell
1790a5bbf8 chore: remove closure comments from static blocks
PiperOrigin-RevId: 539772537
2023-06-12 15:07:36 -07:00
Elizabeth Mitchell
0607d9ca53 chore: fix jscompiler issues
PiperOrigin-RevId: 539716693
2023-06-12 11:42:52 -07:00
Elizabeth Mitchell
b9daa95164 chore(controller): move to internal
PiperOrigin-RevId: 536574896
2023-05-30 19:43:02 -07:00
Elizabeth Mitchell
a2bb8458d2 chore(sass): move to internal
PiperOrigin-RevId: 536458468
2023-05-30 11:23:00 -07:00
Elizabeth Mitchell
5efdc593fa chore(aria): move to internal
PiperOrigin-RevId: 536444453
2023-05-30 10:37:46 -07:00
Material Web Team
545ce0d895 feat(button): adds type property to support form submit and reset
PiperOrigin-RevId: 535748632
2023-05-26 17:09:55 -07:00
Elizabeth Mitchell
7c08efdd66 chore(all): remove ripple directive
PiperOrigin-RevId: 535647846
2023-05-26 10:06:39 -07:00
Elizabeth Mitchell
933fc2e013 fix(all): remove focus state layer tokens
BREAKING CHANGE: Remove any *-focus-state-layer-* custom properties (they don't do anything)

PiperOrigin-RevId: 535302944
2023-05-25 10:33:20 -07:00
Elizabeth Mitchell
c566a64ef7 fix(button): theme mixin not validating
PiperOrigin-RevId: 535046546
2023-05-24 17:59:37 -07:00
Elizabeth Mitchell
4ddeee1a2e chore: remove types folder
PiperOrigin-RevId: 532095745
2023-05-15 06:51:39 -07:00
Elizabeth Mitchell
c87792a757 chore(sass): remove dom, feature-flags, map-ext, and touch-target APIs
PiperOrigin-RevId: 531352456
2023-05-11 17:38:43 -07:00
Elliott Marquez
dc49e0b518 docs: update playground urls to match new base-URI
PiperOrigin-RevId: 531322264
2023-05-11 15:24:11 -07:00
Elliott Marquez
5f80c096e0 refactor: remove extraneous file extensions
PiperOrigin-RevId: 531005525
2023-05-10 14:26:01 -07:00
Elliott Marquez
1cade43ccf refactor: remove extraneous file extensions
PiperOrigin-RevId: 530993820
2023-05-10 14:04:53 -07:00
Elizabeth Mitchell
83373eeb0c chore: remove strong focus
PiperOrigin-RevId: 528564626
2023-05-01 13:49:51 -07:00
Elizabeth Mitchell
969cd24539 chore(button): remove shape resolver
PiperOrigin-RevId: 527359555
2023-04-26 13:30:49 -07:00
Elizabeth Mitchell
5934de0603 fix(focus): update focus-ring tokens
PiperOrigin-RevId: 527319619
2023-04-26 11:13:00 -07:00
Elizabeth Mitchell
db8ee4d1df chore: use private instead of protected
PiperOrigin-RevId: 527010546
2023-04-25 10:40:48 -07:00
Elizabeth Mitchell
e39809969f fix(button)!: remove label property
PiperOrigin-RevId: 526741279
2023-04-24 13:37:45 -07:00
Elizabeth Mitchell
9e234770b5 fix(button): closure conformance issue
PiperOrigin-RevId: 526720124
2023-04-24 12:18:46 -07:00