Commit Graph

43 Commits

Author SHA1 Message Date
Andrew Jakubowicz
059dad5d44 fix(select): change slot names to kebab-case
BREAKING CHANGE: replace `leadingicon` and `trailingicon` slot names with `leading-icon` and `trailing-icon`

PiperOrigin-RevId: 563583658
2023-09-07 16:54:42 -07:00
Elizabeth Mitchell
0c5a2a2886 fix(text-field,select): remove font shorthand tokens
BREAKING CHANGE: replace `*-type` font tokens with `-font`, `-size`, `-line-height`, and `-weight`

PiperOrigin-RevId: 563160975
2023-09-06 11:18:59 -07:00
Elliott Marquez
fcfc696c46 test(list,menu,select)!: clean up internal testing patterns from harnesses
lots of hard coded stuff to enable our tests. Cleaning this up for generalized client usage.

BREAKING CHANGE: menu harnesses will not automatically open menus in quick mode anymore and interactions in menu and list harnesses will not automatically go to the first item but rather the menu roots.

PiperOrigin-RevId: 561746073
2023-08-31 13:34:31 -07:00
Elliott Marquez
2c892c4114 fix(select): announce typeahead selection when select is closed
PiperOrigin-RevId: 561675276
2023-08-31 09:23:19 -07:00
Elliott Marquez
8d4917173a refactor(select): remove the select-* prefix from select events
PiperOrigin-RevId: 561435986
2023-08-30 13:38:50 -07:00
Elliott Marquez
5ba348dfd0 feat(menu)!: allow anchoring with idref string and set element ref on anchorElement
BREAKING: `MdMenu.prototype.anchor` now only accepts a string which will querySelector the rootNode of the menu. The method now to anchor to an element reference is to set `MdMenu.prototype.anchorElement`. This matches the `popover` anchoring proposal more closely, but that proposal may not pass in favor of a CSS approach.
PiperOrigin-RevId: 560955779
2023-08-29 01:40:36 -07:00
Elliott Marquez
1a1fb93be7 feat(select): dispatch select-(open|close)(ing|ed) events
This will allow for the case of data fetching select options only when the select menu has opened.

We prepend the menu events with `select-*` and do not bubble because we have historically had the issue where a select inside a dialog or another menu has had event name clashes causing user runtime issues. I can probably keep them the same names but still not have them bubble if y'all think that's better.

See more discussion in linked github issue

fixes #4798

PiperOrigin-RevId: 560849772
2023-08-28 16:27:22 -07:00
Elizabeth Mitchell
0e492ade43 chore: remove sass theme utilities
PiperOrigin-RevId: 556915539
2023-08-14 14:39:19 -07:00
Elliott Marquez
4ab2e393d4 fix(select)!: add trailing icon indicator and fix icon token application
BREAKING CHANGE: select will now show an arrow indicator and will apply default styles to slotted icons

PiperOrigin-RevId: 553597960
2023-08-03 14:53:36 -07:00
Elliott Marquez
98daf6688a refactor(select): make selects events use Event rather than subclassing it
PiperOrigin-RevId: 553583222
2023-08-03 14:03:09 -07:00
Elliott Marquez
043d548270 refactor(menu)!: events no longer subclass Event but rather use CustomEvent
Fixes issues running in ES5

BREAKING CHANGE: subclassing events is not supported in ES5 so all menu-related events now use CustomEvent rather than subclassing Event

PiperOrigin-RevId: 553304128
2023-08-02 17:23:36 -07:00
Elliott Marquez
86ccec3e7e build: use firebase for hosting and remove url prefixes 2023-07-27 09:17:27 -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
Andrew Jakubowicz
a8c2fa9a8b fix(menu)!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/menu/lib` to `@material/web/menu/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550589890
2023-07-24 09:45:01 -07:00
Andrew Jakubowicz
c6e6f65445 fix(list)!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/list/lib` to `@material/web/list/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550585246
2023-07-24 09:29:15 -07:00
Andrew Jakubowicz
dac3639721 fix(field)!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/field/lib` to `@material/web/field/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550049784
2023-07-21 14:24:05 -07:00
Andrew Jakubowicz
0432e6d9ce fix(elevation)!: rename "lib" directory to "internal"
BREAKING CHANGE: Rename `@material/web/elevation/lib` to `@material/web/elevation/internal`. Prefer not using internal files.

PiperOrigin-RevId: 550038448
2023-07-21 13:42:40 -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
0ab5fd595d fix(field): move padding to slotted content
PiperOrigin-RevId: 547375880
2023-07-11 21:01:24 -07:00
Elliott Marquez
c5128089cd feat(select): expose menu and field CSS shadow parts
fixes #4291

PiperOrigin-RevId: 547346283
2023-07-11 17:45:31 -07:00
Elizabeth Mitchell
b4b3e67ae6 feat(field): add supporting/error text logic
PiperOrigin-RevId: 546111440
2023-07-06 15:42:43 -07:00
Elliott Marquez
0dfd2b841b test(list): increase test coverage for list and list-item
PiperOrigin-RevId: 544476519
2023-06-29 15:18:52 -07:00
Andrew Jakubowicz
3f22ed0391 fix(menu)!: rename typeaheadBufferDelay and list-tab-index for consistency
BREAKING_CHANGE: Renamed property `typeaheadBufferDelay` to `typeaheadDelay`, and attribute `list-tab-index` to `list-tabindex`.
PiperOrigin-RevId: 542685976
2023-06-22 15:36:13 -07:00
Andrew Jakubowicz
224a73b038 fix(select)!: change compound attribute names to kebab-case
BREAKING_CHANGE: Attributes `errortext`, `supportingtext`, `menufixed`, `hasleadingicon`, `hastrailingicon`, `displaytext`, `typeaheadbuffertime` and `selectedindex` have been renamed to `error-text`, `supporting-text`, `menu-fixed`, `has-leading-icon`, `has-trailing-icon`, `display-text`, `typeahead-delay` and `selected-index` respectively. The property `typeaheadBufferTime` has been renamed `typeaheadDelay`.
PiperOrigin-RevId: 542657808
2023-06-22 13:50:44 -07:00
Material Web Team
65d6d03e52 test(select): fix SelectHarness.clickOption() to simulate clicks more faithfully
PiperOrigin-RevId: 542624624
2023-06-22 11:51:22 -07:00
Elliott Marquez
a968759b27 fix(select): fixed menu select not 100% window width
PiperOrigin-RevId: 542020711
2023-06-20 12:51:18 -07:00
Elliott Marquez
2be1b78241 feat(list): expose list item role
PiperOrigin-RevId: 538579598
2023-06-07 13:39:14 -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
Elliott Marquez
086565cc8c fix(select): inherit width of the host
related: #4312

This PR makes select inherit it's min. max, and normal width from host. It also makes list item make the headline not wrap. The effect this has is that the width of the menu in select will match that of the select input, but if the contents of the menu are wider than the width of the select, then the menu will be wider than the select input.

PiperOrigin-RevId: 535695646
2023-05-26 13:09:15 -07:00
Elizabeth Mitchell
4ddeee1a2e chore: remove types folder
PiperOrigin-RevId: 532095745
2023-05-15 06:51:39 -07:00
Elliott Marquez
dc49e0b518 docs: update playground urls to match new base-URI
PiperOrigin-RevId: 531322264
2023-05-11 15:24:11 -07:00
Elliott Marquez
5f80c096e0 refactor: remove extraneous file extensions
PiperOrigin-RevId: 531005525
2023-05-10 14:26:01 -07:00
Elliott Marquez
1cade43ccf refactor: remove extraneous file extensions
PiperOrigin-RevId: 530993820
2023-05-10 14:04:53 -07:00
Elizabeth Mitchell
c32cf1fcab chore(sass): remove shape API
PiperOrigin-RevId: 528868375
2023-05-02 13:12:20 -07:00
Elizabeth Mitchell
cad3fe6ca7 chore(select): remove shape resolver
PiperOrigin-RevId: 528815251
2023-05-02 10:02:39 -07:00
Elizabeth Mitchell
b9e3afc2b7 chore(textfield): remove shape resolver
PiperOrigin-RevId: 528529823
2023-05-01 11:40:17 -07:00
Elizabeth Mitchell
db8ee4d1df chore: use private instead of protected
PiperOrigin-RevId: 527010546
2023-04-25 10:40:48 -07:00
Elizabeth Mitchell
0a35ff5042 fix: remove role attribute from elements
PiperOrigin-RevId: 526712160
2023-04-24 11:51:47 -07:00
Material Web Team
45c6cb236e test(select): implement screenshot tests for select
PiperOrigin-RevId: 523798756
2023-04-12 14:01:09 -07:00
Material Web Team
9d7b2910d7 fix(menu): submenus will open correctly on click
PiperOrigin-RevId: 523796693
2023-04-12 13:53:53 -07:00
Material Web Team
9c202f5546 feat(select): implement select
PiperOrigin-RevId: 523532548
2023-04-11 16:14:45 -07:00