Commit Graph

82 Commits

Author SHA1 Message Date
Elizabeth Mitchell
5df9410e60 fix!: aria-labels announcing twice with "group" on components
BREAKING CHANGE: `querySelector` for `[role]` and `[aria-*]` attributes may no longer work. See `@material/web/migrations/v2/README.md` and `@material/web/migrations/v2/query-selector-aria.ts`.

Browser/SR test results (go/mwc-double-aria-test-results)
  -  VoiceOver on Chrome
  -  VoiceOver on iOS Safari
  -  TalkBack on Chrome
  -  ChromeVox on Chrome
  -  NVDA on Chrome
  -  NVDA on Firefox
  -  JAWS on Chrome
  -  JAWS on Firefox
  (Optional)
  -  VoiceOver on Safari
  -  VoiceOver on Firefox

PiperOrigin-RevId: 648859827
2024-07-02 15:22:12 -07:00
Amit Markel
17aa21a53e fix(dialog): have content expand to fill height
PiperOrigin-RevId: 640664403
2024-06-05 15:12:40 -07:00
Elizabeth Mitchell
0aea4364a1 fix(dialog): focus is trapped for a11y, use no-focus-trap to disable
PiperOrigin-RevId: 626403597
2024-04-19 10:25:52 -07:00
kkachniarz
fc4c9992f8
fix(dialog): update info comment with autocomplete -> autofocus 2024-03-22 08:15:23 +01: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
Copybara-Service
2d54b972c1 Merge pull request #5483 from vdegenne:quick-dialog
PiperOrigin-RevId: 609527362
2024-02-22 15:54:53 -08:00
Elizabeth Mitchell
ce41b7bfb3 fix: use explicit CSSResult[] types for static styles
PiperOrigin-RevId: 609494809
2024-02-22 14:15:11 -08:00
vdegenne
ee591b3f1b feat(dialog): add quick property to skip animations 2024-02-21 11:33:45 +01:00
Elizabeth Mitchell
4d2684119e chore(dialog): disable extending dialog internally with closure
PiperOrigin-RevId: 607775035
2024-02-16 12:56:45 -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
93071d47bd refactor(dialog): 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: 4597b / 1322b gzip
Size after: 4092b (-13%) / 1194b gzip (-10%)

PiperOrigin-RevId: 600905310
2024-01-23 14:19:44 -08:00
Elizabeth Mitchell
4ae9db6c67 fix(dialog): text is now selectable
Fixes #5145

Added some notes on Material dialog focusing. Normally the dialog should *not* be focused, so you may wonder why we care about delegating focus at all. It's because:

1. We don't have focus trapping yet
2. We need to handle what happens when there isn't a focusable child in the dialog, even though that's against spec.

PiperOrigin-RevId: 594013328
2023-12-27 08:12:29 -08:00
Elizabeth Mitchell
be3dc6f677 fix(dialog): immediate escape key not firing cancel event in Chrome 120
Fixes #5313

PiperOrigin-RevId: 592651305
2023-12-20 13:59:06 -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
Staler2019
257e9c6f6f
Fix #5182: dialog icon padding error 2023-11-11 18:59:52 +08:00
Elliott Marquez
2adcb1479a docs: document events in jsdoc
PiperOrigin-RevId: 581041601
2023-11-09 15:25:21 -08:00
Elizabeth Mitchell
c390291687 chore: format files with prettier
PiperOrigin-RevId: 576601342
2023-10-25 11:59:00 -07:00
Elliott Marquez
63b01425e7 refactor(menu,select)!: rename fixed to positioning
This will enable forwards compatibility for `positioning="top-layer"` with popover.

BREAKING CHANGE: refactor `fixed` property to `positioning="fixed"` in Menu and `menuFixed` to `menuPositioning="fixed"`

PiperOrigin-RevId: 567723646
2023-09-22 14:54:57 -07:00
Elizabeth Mitchell
375b7664ef fix(dialog): not delegating focus in closure
PiperOrigin-RevId: 567363579
2023-09-21 11:17:12 -07:00
Elizabeth Mitchell
8613fe6a58 fix(dialog)!: change content margin to padding
BREAKING CHANGE: if overriding margin on a dialog's content, swap it to padding. If a dialog's slotted first or last child has built-in margin (such as `<h3>` or `<p>`), remove the top/bottom margin as needed (since margin swapped to padding, there's no more margin collapsing).

PiperOrigin-RevId: 564509429
2023-09-11 14:53:52 -07:00
Elizabeth Mitchell
81e11e09fa fix(dialogs): remove font shorthand tokens
BREAKING CHANGE: replace `headline-text-type` and `supporting-text-type` tokens with `-font`, `-size`, `-line-height`, and `-weight`

PiperOrigin-RevId: 563160825
2023-09-06 11:17:05 -07:00
Elliott Marquez
d6aa6b22c7 fix(dialog, select): allow fixed selects to render correctly in dialogs
PiperOrigin-RevId: 561788530
2023-08-31 16:14:44 -07:00
Elizabeth Mitchell
9b7647bd3d fix(dialog): content not displaying on Safari
Fixes #4728

PiperOrigin-RevId: 559224134
2023-08-22 14:25:32 -07:00
Elizabeth Mitchell
d25c5e9eca fix(dialog): not showing if opened before connected
Fixes #4728

PiperOrigin-RevId: 559157443
2023-08-22 10:43:19 -07:00
Elizabeth Mitchell
7d415394cd chore(dialog): fix demo a11y
PiperOrigin-RevId: 555706529
2023-08-10 16:45:18 -07:00
Elizabeth Mitchell
2996a8b826 refactor(dialog)!: match native <dialog> and fix spacing
Fixes #4647
Fixes #4285

BREAKING CHANGE: See https://github.com/material-components/material-web/discussions/4675 for more details.

Dialogs use the native `<dialog>` interface, which uses a `<form method="dialog">` to set up dialog actions.

```html
<md-dialog>
  <div slot="headline">A simple dialog</div>
  <form id="form" method="dialog" slot="content">
    This is a dialog with text content.
  </form>
  <div slot="actions">
    <md-text-button form="form" value="close">Close</md-text-button>
    <md-text-button form="form" value="ok">OK</md-text-button>
  </div>
</md-dialog>
```

PiperOrigin-RevId: 555702952
2023-08-10 16:35:08 -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
39ae5a6947 fix(dialog)!: remove fullscreen temporarily
BREAKING CHANGE: Fullscreen dialogs weren't matching spec, so we're removing them for now to avoid future breaking changes. They will be re-added later.

PiperOrigin-RevId: 554583471
2023-08-07 13:56:06 -07:00
Elizabeth Mitchell
50fd2f3fe0 fix(dialog)!: use autofocus attribute instead of dialog-focus
PiperOrigin-RevId: 553630275
2023-08-03 16:54:55 -07:00
Elizabeth Mitchell
b992b154de fix(dialog)!: remove toggleShow()
BREAKING CHANGE: Use dialog.open, dialog.show(), and dialog.close() instead.

PiperOrigin-RevId: 553622255
2023-08-03 16:23:53 -07:00
Elizabeth Mitchell
500472bbdf fix(dialog)!: remove stacked
BREAKING CHANGE: dialog actions can set their own layout with a container element.

PiperOrigin-RevId: 553606019
2023-08-03 15:22:48 -07:00
Elizabeth Mitchell
d8ac9ce29e fix(dialog)!: remove modeless
BREAKING CHANGE: Material dialogs are always modal.

PiperOrigin-RevId: 553603172
2023-08-03 15:12:22 -07:00
Elizabeth Mitchell
fa103cbc78 fix(dialog): misspelled transition
Fixes #4638

PiperOrigin-RevId: 552618010
2023-07-31 16:04:33 -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
a117b06b7b fix(iconbutton)!: rename <md-standard-icon-button> to <md-icon-button>
PiperOrigin-RevId: 552545415
2023-07-31 11:37:56 -07:00
Elizabeth Mitchell
2d1c58022e fix(dialog)!: remove transitions
PiperOrigin-RevId: 552539713
2023-07-31 11:20:07 -07:00
Elizabeth Mitchell
5adbf730d3 fix(dialog)!: remove content and divider tokens
PiperOrigin-RevId: 552538437
2023-07-31 11:16:38 -07:00
Elizabeth Mitchell
e581142d67 fix(dialog)!: remove transition and scrim tokens
PiperOrigin-RevId: 552535303
2023-07-31 11:07:02 -07:00
Elizabeth Mitchell
2568d4fbac fix(dialog)!: remove draggable
PiperOrigin-RevId: 551978266
2023-07-28 16:27:50 -07:00
Elizabeth Mitchell
8b896e0e63 fix(dialog)!: remove fullscreen tokens
PiperOrigin-RevId: 551964075
2023-07-28 15:22:17 -07:00
Copybara-Service
62fd5b99ee Merge pull request #4617 from material-components:gcloud
PiperOrigin-RevId: 551579741
2023-07-27 10:53:18 -07:00
Elizabeth Mitchell
a71411eff0 chore(dialog): remove decorator tslint comment
PiperOrigin-RevId: 551576491
2023-07-27 10:43:35 -07:00
Elliott Marquez
86ccec3e7e build: use firebase for hosting and remove url prefixes 2023-07-27 09:17:27 -07:00
Andrew Jakubowicz
aaa672b868 fix(dialog)!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/dialog/lib` to `@material/web/dialog/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550034550
2023-07-21 13:27:02 -07:00
Andrew Jakubowicz
45f42f03ce chore: use inline sass comments
PiperOrigin-RevId: 549344985
2023-07-19 09:51:35 -07:00
Andrew Jakubowicz
10f60d23e0 chore: rename e to event
PiperOrigin-RevId: 549039407
2023-07-18 10:16:37 -07:00
Andrew Jakubowicz
1893e08f54 fix(dialog)!: remove with-icon prefix from with-icon-icon-color and with-icon-icon-size
PiperOrigin-RevId: 546360441
2023-07-07 12:59:14 -07:00