Commit Graph

96 Commits

Author SHA1 Message Date
Elizabeth Mitchell
c35bad0c64 fix: rename internal <styles>.css.js to <styles>.css
We are changing the names of these files to reduce similarity with CSS modules and avoid clashing with tooling built around that. If you're importing `*/internal/styles.css.js`, swap to `*/internal/styles.js`.

PiperOrigin-RevId: 611265000
2024-02-28 16:20:22 -08:00
Elizabeth Mitchell
ec0a8ebf6e chore: use CSSResultOrNative instead of CSSResult for static styles
PiperOrigin-RevId: 609760445
2024-02-23 10:01:56 -08:00
Elizabeth Mitchell
ce41b7bfb3 fix: use explicit CSSResult[] types for static styles
PiperOrigin-RevId: 609494809
2024-02-22 14:15:11 -08:00
Elizabeth Mitchell
54872bdbdf chore: remove FF bug todo from test
PiperOrigin-RevId: 608762761
2024-02-20 15:34:12 -08:00
Elizabeth Mitchell
84536d7416 chore: update components to use custom properties from tokens
PiperOrigin-RevId: 601597083
2024-01-25 16:13:41 -08:00
Elizabeth Mitchell
044ee51d13 refactor(radio): reduce CSS size
Reduces the size by removing private (`--_*`) custom properties. These are not needed since the component does not share styles across variants.

Size before: 4568b / 1034b gzip
Size after: 3245b (-29%) / 907b gzip (-12%)

PiperOrigin-RevId: 600928780
2024-01-23 15:41:28 -08:00
Elizabeth Mitchell
eca1357f1a fix: rename and move internal/controller/events
Split `internal/controller/events` into `internal/events/redispatch-event` and `internal/events/form-label-activation`

PiperOrigin-RevId: 592350371
2023-12-19 14:49:35 -08:00
Elizabeth Mitchell
2bb480fb82 chore: move events out of controller folder
PiperOrigin-RevId: 592021123
2023-12-18 15:07:51 -08:00
Elizabeth Mitchell
b5686ea4e0 feat(radio): add required constraint validation
Fixes #4316

PiperOrigin-RevId: 586045132
2023-11-28 11:15:20 -08:00
Elliott Marquez
2adcb1479a docs: document events in jsdoc
PiperOrigin-RevId: 581041601
2023-11-09 15:25:21 -08:00
Elizabeth Mitchell
1f55d4111f chore(behaviors): update form controls to use shared mixins
PiperOrigin-RevId: 578297611
2023-10-31 14:08:39 -07:00
Elizabeth Mitchell
f5daadc307 chore: update components to use mixinFocusable
PiperOrigin-RevId: 576982507
2023-10-26 14:09:08 -07:00
Elizabeth Mitchell
c390291687 chore: format files with prettier
PiperOrigin-RevId: 576601342
2023-10-25 11:59:00 -07:00
Elliott Marquez
7779987118 fix(radio): cursor should be pointer except when disabled
PiperOrigin-RevId: 574353198
2023-10-17 21:36:53 -07:00
Elizabeth Mitchell
d7b40fbafd chore(radio): simplify hcm styles
PiperOrigin-RevId: 569570652
2023-09-29 13:12:20 -07:00
Elliott Marquez
99918a0b88 chore(radio): simplify hcm styles
PiperOrigin-RevId: 569372050
2023-09-28 20:53:40 -07:00
Elizabeth Mitchell
50037a1338 chore(radio): simplify hcm styles
PiperOrigin-RevId: 569317421
2023-09-28 16:10:50 -07:00
Elliott Marquez
57f7ff51ed docs(radio): document events on radio
PiperOrigin-RevId: 568945525
2023-09-27 13:35:14 -07:00
Elizabeth Mitchell
e444de3c02 fix(radio): dispatches input event on select
PiperOrigin-RevId: 565522665
2023-09-14 17:25:54 -07:00
Elizabeth Mitchell
08acc413f6 chore: add polyfill for Firefox ElementInternals aria
PiperOrigin-RevId: 563194223
2023-09-06 13:10:49 -07:00
Elizabeth Mitchell
59c44fc2f9 fix(tokens): rename token override files
BREAKING CHANGE: Change "radio-button" and "progress-indicator" Sass token APIs to "radio" and "progress". This matches the tag names of their components.

PiperOrigin-RevId: 560184741
2023-08-25 13:45:10 -07:00
Elizabeth Mitchell
0711f8c03c fix(radio): make host radio role to fix a11y
Why? role="radio" items need to be in the same DOM scope to properly announce "radio X of X" and not "radio 1 of 1"

PiperOrigin-RevId: 559908996
2023-08-24 16:46:01 -07:00
Elizabeth Mitchell
0e8afc0175 fix: ripple and focus ring not centered in Safari
PiperOrigin-RevId: 559826221
2023-08-24 12:00:23 -07:00
Elizabeth Mitchell
3e13634d64 chore: make formAssociated readonly
PiperOrigin-RevId: 558255234
2023-08-18 14:57:38 -07:00
Elizabeth Mitchell
9adb11c472 chore: ensure touch target wrappers are not negative
PiperOrigin-RevId: 555639643
2023-08-10 13:53:26 -07:00
Elizabeth Mitchell
7c461cad75 feat(radio)!: add touch target configurations
BREAKING CHANGE: Radio's size is now smaller by default. Add margin or `touch-target="wrapper"` to increase it to the previous size.

PiperOrigin-RevId: 555539884
2023-08-10 10:06:15 -07:00
Elizabeth Mitchell
0510496e60 chore: avoid this in static context
PiperOrigin-RevId: 554933524
2023-08-08 14:00:25 -07:00
Elliott Marquez
86ccec3e7e build: use firebase for hosting and remove url prefixes 2023-07-27 09:17:27 -07:00
Andrew Jakubowicz
fb1c6039e7 fix(radio)!: remove "unselected" prefix from tokens
BREAKING CHANGE: Rename `--md-radio-unselected-<token>` to `--md-radio-<token>`

PiperOrigin-RevId: 550907524
2023-07-25 09:24:07 -07:00
Andrew Jakubowicz
6ec3f06429 fix!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/<component>/lib` to `@material/web/<component>/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550633216
2023-07-24 12:02:59 -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
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
Copybara-Service
cf2dc2c8e3 Merge pull request #4536 from christophe-g:fix-radio-click-on-navigate
PiperOrigin-RevId: 547567268
2023-07-12 12:20:53 -07:00
christophe-g
6b7d1e8914 chore(radio): make maskId readonly; add comment explaining reason for maskId to exist 2023-07-10 22:09:24 +02:00
christophe-g
c8b589b734 fix(radio): prevent triggering click action on radio keyboard navigation
As click events propagates, triggering a click action on radio-button
creates potential side-effect (for instance, this will activate ripple
effect of parent container like md-list-item).
2023-07-09 14:28:07 +02:00
christophe-g
272c334cd2 fix(radio): ensure unique maskId for radio SVG mask. Fix #4531
Fix a Safari-related bug, causing radio button to fail to
render properly.
2023-07-09 14:18:36 +02:00
christophe-g
3436d023a0 chore(list): simplify next sibling end user navigation
nextSibling.click() takes care of:
- setting checked to true
- focusing nextSibling
- fire a change event
2023-07-06 08:26:03 +02:00
christophe-g
65d31a68c1 fix(dialog): fire a change event when using arrow keys. 2023-07-03 11:17:09 +02: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
2434257086 chore: update annotations after closure extern fixes
PiperOrigin-RevId: 537935481
2023-06-05 11:34:43 -07:00
Elizabeth Mitchell
8fb5cd8ae8 fix(radio): checked styles not displaying
Fixes #4347

PiperOrigin-RevId: 537354516
2023-06-02 10:55:51 -07:00
Elizabeth Mitchell
b9daa95164 chore(controller): move to internal
PiperOrigin-RevId: 536574896
2023-05-30 19:43:02 -07:00
Elizabeth Mitchell
abb98eb983 chore: fix closure issues with FACE
PiperOrigin-RevId: 536495179
2023-05-30 13:35:07 -07:00
Elizabeth Mitchell
ed00d30b1d chore(motion): move to internal
PiperOrigin-RevId: 536448206
2023-05-30 10:50:00 -07:00
Elizabeth Mitchell
5efdc593fa chore(aria): move to internal
PiperOrigin-RevId: 536444453
2023-05-30 10:37:46 -07:00
Elizabeth Mitchell
a2a6ff442c chore: fix typos
PiperOrigin-RevId: 536443522
2023-05-30 10:34:25 -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