Elizabeth Mitchell
35913a6ea4
fix(dialog): buttons not reflecting value attribute when setting property
...
Fixes #5409
PiperOrigin-RevId: 600541901
2024-01-22 12:48:44 -08:00
Jan Kuehle
4b4c373a6b
chore: use import and export types
...
PiperOrigin-RevId: 599338980
2024-01-17 17:39:46 -08:00
Chi-En Wu
37fad0660d
fix(button): add missing sass imports
2024-01-03 20:08:12 +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
7cd657b83d
fix(button): height increases when label wraps
...
PiperOrigin-RevId: 582478806
2023-11-14 16:41:20 -08:00
Elizabeth Mitchell
5d964adcf9
fix(button): labels not truncating, add support for multiline with text-wrap: wrap
...
There's currently a bug where wrapping buttons do not increase their height. That will come later to reduce the scope on this change.
PiperOrigin-RevId: 581383771
2023-11-10 15:17:14 -08:00
Elizabeth Mitchell
96481566ae
refactor(button): move background content outside of inner button
...
Part of a series of changes to support text wrapping and host aria for button.
PiperOrigin-RevId: 581319862
2023-11-10 11:29:54 -08:00
Elizabeth Mitchell
710b87eb3a
chore(button): remove lit static
...
Part of a chain of changes needed to support text wrapping and host aria
PiperOrigin-RevId: 581030820
2023-11-09 14:45:01 -08:00
Elizabeth Mitchell
8dcb3f62c7
fix(button): don't show overflowing labels
...
PiperOrigin-RevId: 580659287
2023-11-08 14:29:00 -08:00
Elizabeth Mitchell
5bb4a422de
fix(button): allow overriding padding
and gap
...
More customization and necessary prep to move styles to host for host aria and text wrapping customization.
PiperOrigin-RevId: 580565272
2023-11-08 09:55:35 -08:00
Elizabeth Mitchell
18522381d8
fix(button): allow overriding min-width
and user-select
...
PiperOrigin-RevId: 580324948
2023-11-07 15:50:07 -08:00
Elizabeth Mitchell
f08ecce357
chore(button): remove unused styles
...
PiperOrigin-RevId: 580031279
2023-11-06 19:59:25 -08:00
Elizabeth Mitchell
48d84f86ee
chore(button): remove BEM css class name style
...
Why? We don't use https://getbem.com/ styles anymore now that we have shadow dom.
Just cleanup to help with child changes.
PiperOrigin-RevId: 579980984
2023-11-06 15:50:24 -08:00
Elizabeth Mitchell
798f5ae179
fix(button): allow overriding cursor
using CSS
...
Prep to move some styles to the host, which allows for better host styling, like setting padding and text wrapping. It will also support host aria by not relying on `<button>` pseudo selectors.
PiperOrigin-RevId: 579977848
2023-11-06 15:38:50 -08:00
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