Elizabeth Mitchell
46d66ed9d1
fix(checkbox): sass theme mixin not working
...
Fixes #5651
PiperOrigin-RevId: 645076669
2024-06-20 10:21:06 -07:00
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
87d7eac5c5
chore(checkbox): fix aria for checkbox list demo
...
PiperOrigin-RevId: 607822159
2024-02-16 15:47:32 -08:00
Elizabeth Mitchell
5e40a1bcec
chore: create shape logical tokens in Sass component token files
...
Adds `@material/web/tokens/internal/shape` to take a shape token and create 4 logical tokens from its value.
All components' logical shape tokens are now generated by the token files themselves, rather than added in each component's styles.
PiperOrigin-RevId: 601783846
2024-01-26 09:13:58 -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
042b4aadfd
refactor(checkbox): reduce CSS size by removing private custom properties
...
`--_private` custom properties aren't needed since checkbox does not have multiple variants that share styles.
CSS size before:
8567b / 1668b gzip
CSS size after:
6277b / 1387b gzip
-27% / -17%
PiperOrigin-RevId: 599262324
2024-01-17 12:58:51 -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
e78a52f1e4
fix(checkbox): checked
and indeterminate
not updated during input event
...
Fixes #5028
The input event is dispatched before the change event, so we need to update state there instead of on change.
PiperOrigin-RevId: 588497817
2023-12-06 11:50:41 -08:00
Elizabeth Mitchell
f7a66a8bbe
refactor: add constraint validation mixin
...
This reduces the copy/paste of validation code. Constraint validation must be synchronous, so a `Validator` helps compute the validity and cache it since the validity must be checked when properties change.
Implemented in checkbox-like controls.
PiperOrigin-RevId: 584380464
2023-11-21 11:22:03 -08:00
Elizabeth Mitchell
8eb1f30e6f
refactor: add checkbox validator
...
Part of adding constraint validation mixins. Each component that participates in constraint validation has different rules and error messages for validating. The `Validator` gives `mixinConstraintValidation()` a way to compute and cache validation.
Other validators will be added later, such as `SelectValidator` and `RadioValidator`
PiperOrigin-RevId: 583508468
2023-11-17 15:59:38 -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
c390291687
chore: format files with prettier
...
PiperOrigin-RevId: 576601342
2023-10-25 11:59:00 -07:00
Elliott Marquez
06909e5b20
refactor(checkbox): move cursor styles to host
...
related: #5066 #5069
PiperOrigin-RevId: 574302352
2023-10-17 16:48:36 -07:00
Elliott Marquez
18fe45170a
fix(checkbox): cursor should be pointer when not disabled
...
fixes #5079
PiperOrigin-RevId: 574295359
2023-10-17 16:19:03 -07:00
Material Web Team
556e6f95e4
chore: fix closure compiler issues
...
PiperOrigin-RevId: 564867173
2023-09-12 16:30:19 -07:00
Elizabeth Mitchell
c26a578448
fix(textfield): broken required validity on Safari
...
Fixes #4796
PiperOrigin-RevId: 564562802
2023-09-11 18:39:59 -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
33803aba39
fix(checkbox): not working after formAssociated changes
...
Fixes #4747
PiperOrigin-RevId: 558187176
2023-08-18 10:40:13 -07:00
Elizabeth Mitchell
a167cabeff
fix(textfield): add form validity support
...
Also fixes form.reportValidity() not working for checkbox.
Fixes #4435
PiperOrigin-RevId: 557654271
2023-08-16 17:43:25 -07:00
Elizabeth Mitchell
de37349ec5
chore: fix demo a11y for switch and checkbox
...
PiperOrigin-RevId: 556113327
2023-08-11 15:30:26 -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
f574b00a63
feat(checkbox)!: add touch target configurations
...
BREAKING CHANGE: Checkbox's size is now smaller by default. Add margin or `touch-target="wrapper"` to increase it to the previous size.
PiperOrigin-RevId: 555547024
2023-08-10 10:21:31 -07:00
Elizabeth Mitchell
0510496e60
chore: avoid this in static context
...
PiperOrigin-RevId: 554933524
2023-08-08 14:00:25 -07:00
Elizabeth Mitchell
ce248dc383
fix(checkbox)!: remove error property
...
BREAKING CHANGE: Design is still exploring error-state checkboxes. If needed, theme with an error color and set aria-invalid.
PiperOrigin-RevId: 552914338
2023-08-01 14:01:41 -07:00
Elliott Marquez
86ccec3e7e
build: use firebase for hosting and remove url prefixes
2023-07-27 09:17:27 -07:00
Elizabeth Mitchell
5606eefc38
feat(checkbox): add required and form validity
...
PiperOrigin-RevId: 551311394
2023-07-26 14:12:37 -07:00
Elizabeth Mitchell
f7b3ef7ad2
chore(checkbox): remove focus override for delegatesFocus
...
PiperOrigin-RevId: 550699584
2023-07-24 16:02:40 -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
2147af7e28
fix(checkbox): fix broken "lib" to "internal" sass import
...
PiperOrigin-RevId: 550061315
2023-07-21 15:12:00 -07:00
Andrew Jakubowicz
c4ac9f73d9
fix(checkbox)!: rename "lib" directory to "internal"
...
BREAKING CHANGE: Rename `@material/web/checkbox/lib` to `@material/web/checkbox/internal`. Prefer not using internal files.
PiperOrigin-RevId: 550034503
2023-07-21 13:25:47 -07:00
Elizabeth Mitchell
66d7b8b275
fix(checkbox)!: remove "unselected" prefix from tokens
...
BREAKING CHANGE: Rename `--md-checkbox-unselected-<token>` to `--md-checkbox-<token>`
PiperOrigin-RevId: 549977624
2023-07-21 10:05:52 -07:00
Elizabeth Mitchell
b5712f3d4b
fix(checkbox): reduce forced-colors size
...
PiperOrigin-RevId: 549788908
2023-07-20 17:30:31 -07:00
Elizabeth Mitchell
89b99a7094
fix(checkbox): add a11y to demos
...
PiperOrigin-RevId: 549751063
2023-07-20 15:05:34 -07:00
Elizabeth Mitchell
ec02fe40fc
fix(checkbox): screen readers announce errors as invalid
...
PiperOrigin-RevId: 549683048
2023-07-20 11:06:34 -07:00
Elizabeth Mitchell
154861c99e
feat(checkbox): dispatch input event
...
PiperOrigin-RevId: 549682970
2023-07-20 11:05:23 -07:00
Elizabeth Mitchell
921f185aa1
fix(checkbox): do not announce icon for screen readers
...
PiperOrigin-RevId: 549679188
2023-07-20 10:55:20 -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
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
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
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