12 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
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
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
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
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