Commit Graph

147 Commits

Author SHA1 Message Date
vdegenne
33987c3f4b inline event input parameters 2023-08-02 19:23:44 +02:00
vdegenne
46626bb009 chore(textfield): remove unecessary redispatchEvent 2023-08-02 08:45:15 +02: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
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
Elizabeth Mitchell
ff2e089680 feat(textfield): add textarea type
Fixes #4171, #1305, #2926

Changes:
- Added "textarea" type (matches native <textarea>, which has a "type" property like `<input>`)
- Moved pointer-events to the label wrapper so it wouldn't overlap content
- Made resizable field respect min-height
- Remove resize handle when field is disabled
PiperOrigin-RevId: 549104722
2023-07-18 14:02:02 -07:00
Andrew Jakubowicz
10f60d23e0 chore: rename e to event
PiperOrigin-RevId: 549039407
2023-07-18 10:16:37 -07:00
Elizabeth Mitchell
0ab5fd595d fix(field): move padding to slotted content
PiperOrigin-RevId: 547375880
2023-07-11 21:01:24 -07:00
Elizabeth Mitchell
86aba33dea fix(textfield)!: rename container-padding-vertical tokens
BREAKING CHANGE: Rename `--md-*-field-container-padding-vertical` to `--md-*-field-top-space` and `--md-*-field-bottom-space`. Rename `--md-filled-*-field-with-label-container-padding-vertical` to `--md-filled-*-field-with-label-top-space` and `--md-filled-*-field-with-label-bottom-space`

PiperOrigin-RevId: 547278912
2023-07-11 13:21:57 -07:00
Elizabeth Mitchell
447886da2e fix(textfield)!: rename container-padding-horizontal token
BREAKING CHANGE: Rename `--md-*-field-container-padding-horizontal` to `--md-*-field-leading-space` and `--md-*-field-trailing-space`

PiperOrigin-RevId: 547222914
2023-07-11 10:08:03 -07:00
Elizabeth Mitchell
53966af32d fix(textfield)!: rename prefix/suffix padding tokens
BREAKING CHANGE: Rename `--md-*-text-field-input-text-prefix-padding` and `--md-*-text-field-input-text-suffix-padding` to `--md-*-text-field-input-text-prefix-trailing-space` and `--md-*-text-field-input-text-suffix-leading-space`

PiperOrigin-RevId: 547210256
2023-07-11 09:21:10 -07:00
Elizabeth Mitchell
8fee0a7ebd fix(textfield)!: remove autocomplete-specific features for now
PiperOrigin-RevId: 546122154
2023-07-06 16:28:50 -07:00
Elizabeth Mitchell
b4b3e67ae6 feat(field): add supporting/error text logic
PiperOrigin-RevId: 546111440
2023-07-06 15:42:43 -07:00
Elizabeth Mitchell
6762b00588 fix(textfield): make label strict string type
PiperOrigin-RevId: 545784105
2023-07-05 14:18:13 -07:00
Andrew Jakubowicz
2937aefa23 fix(field)!: change compound attribute names to kebab-case
BREAKING_CHANGE: Attributes `hasstart` and `hasend` have been changed to `has-start` and `has-end` respectively.
PiperOrigin-RevId: 542626280
2023-06-22 11:57:20 -07:00
Andrew Jakubowicz
34dfcb4db1 fix(textfield)!: compound properties should have kebab-case attributes
BREAKING_CHANGE: The attributes `errortext`, `prefixtext`, `suffixtext`, `hasleadingicon`, `hastrailingicon`, `supportingtext`, and `textdirection` have been renamed respectively to: `error-text`, `prefix-text`, `suffix-text`, `has-leading-icon`,`has-trailing-icon`, `supporting-text`, and `text-direction`.
PiperOrigin-RevId: 542427064
2023-06-21 19:28:03 -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
e842f79311 feat(textfield): add form association support
PiperOrigin-RevId: 537893731
2023-06-05 09:12:34 -07:00
Elizabeth Mitchell
b9daa95164 chore(controller): move to internal
PiperOrigin-RevId: 536574896
2023-05-30 19:43:02 -07:00
Elizabeth Mitchell
5efdc593fa chore(aria): move to internal
PiperOrigin-RevId: 536444453
2023-05-30 10:37:46 -07:00
Elliott Marquez
2c5e2b96c2 fix(demo): fix demos in internal catalog and fix some broken stories in catalog
PiperOrigin-RevId: 532269113
2023-05-15 16:58:03 -07:00
Elizabeth Mitchell
2317c5af63 fix(textfield)!: remove defaultValue
BREAKING CHANGE: Explicit "defaultValue" has been removed. Set the 'value' attribute to communicate a default value for resetting (similar to native <input>)

PiperOrigin-RevId: 532095818
2023-05-15 06:53:19 -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
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
7b52c4515f fix: remove @ariaProperty decorator
PiperOrigin-RevId: 526750432
2023-04-24 14:10:38 -07:00
Elizabeth Mitchell
0a35ff5042 fix: remove role attribute from elements
PiperOrigin-RevId: 526712160
2023-04-24 11:51:47 -07:00
Elliott Marquez
5e1fe1ccc7 fix(ssr): try to remove event listener calls on server
PiperOrigin-RevId: 525534289
2023-04-19 13:24:58 -07:00
Daniel Freedman
9ce10bc100 chore(all): remove unnecessary property typing for strings
PiperOrigin-RevId: 523201301
2023-04-10 13:43:10 -07:00
Elizabeth Mitchell
789d23bd61 chore(sass): remove typography resolvers
PiperOrigin-RevId: 518054505
2023-03-20 13:09:04 -07:00
Elizabeth Mitchell
b310e6b9e6 test(text-field): add token tests
PiperOrigin-RevId: 512659469
2023-02-27 10:09:10 -08:00
Elizabeth Mitchell
a969fdadb6 fix(text-field): apply suffix-color and icon size tokens
Text field changes:
- Fixed suffix color token not applying
- Fixed icon size tokens not applying
- Remove redundant styles with field changes

Field changes:
- Added content-type token for inheriting font
- Added leading/trailing content color tokens for icons
- Update field token values functions to be easier to grok all tokens
- Remove container-height token
- Update screenshots for new tokens

PiperOrigin-RevId: 512652818
2023-02-27 09:44:41 -08:00
Elizabeth Mitchell
71cf061403 chore(textfield): clean up rendering implementation
PiperOrigin-RevId: 510494532
2023-02-17 12:27:21 -08:00
Elizabeth Mitchell
816762d7f3 chore(text-field): flatten selectors
PiperOrigin-RevId: 510444424
2023-02-17 09:01:10 -08:00
Elizabeth Mitchell
4797037493 chore(text-field): remove md3 class prefix
PiperOrigin-RevId: 510275510
2023-02-16 16:33:11 -08:00
Daniel Freedman
cc5a7db27d fix(field & dependents)!: convert to use text-type tokens
PiperOrigin-RevId: 510171224
2023-02-16 09:51:22 -08:00
Elizabeth Mitchell
6c2aef6901 chore(all): add keep-sorted comments to Sass imports
PiperOrigin-RevId: 509583504
2023-02-14 11:10:23 -08:00
Daniel Freedman
44a8d74f56 fix(all)!: use shape.resolve-tokens and remove shape.resolve-theme
PiperOrigin-RevId: 509284550
2023-02-13 11:26:55 -08:00
Daniel Freedman
80590ae88d fix(all): remove @requirecss comments
PiperOrigin-RevId: 503551738
2023-01-20 17:02:21 -08:00
Elizabeth Mitchell
1d81416863 refactor(textfield)!: remove container-height token
PiperOrigin-RevId: 501699310
2023-01-12 16:43:06 -08:00
Elizabeth Mitchell
060d204334 chore: update component tokens to v0.152
PiperOrigin-RevId: 501055718
2023-01-10 11:56:25 -08:00
Daniel Freedman
c70198a567 fix(list,textfield): Fix TS 4.9 compliation of role property override.
PiperOrigin-RevId: 499312798
2023-01-03 14:10:22 -08:00
Material Web Team
eec25b393e fix(styling): Removes tap highlight color visible on mobile Safari for checkbox, radio, iconbutton, and textfield.
PiperOrigin-RevId: 499279539
2023-01-03 11:54:32 -08:00
Material Web Team
d6a410aa91 Export TextfieldType to consumers
PiperOrigin-RevId: 497035551
2022-12-21 16:49:20 -08:00
Material Web Team
3f6070ea31 chore(testing): Adds submitForm to testing harness. This submits the element's associated form if one exists and returns the submitted FormData object.
* updates form_controller tests.
* updates switch tests.
* adds form submission tests to text field.

PiperOrigin-RevId: 495992202
2022-12-16 17:01:56 -08:00
Elizabeth Mitchell
eedb7f5d3c chore: replace * selector with :host
PiperOrigin-RevId: 493992896
2022-12-08 14:15:19 -08:00
Alexander Marks
933cb14ac8 chore: Comment-out jasmine import statements for external compatibility
PiperOrigin-RevId: 491970248
2022-11-30 11:18:44 -08:00
Elizabeth Mitchell
491efc577f chore(text-field): update tokens
PiperOrigin-RevId: 491752389
2022-11-29 15:26:30 -08:00
Elizabeth Mitchell
bff01dadf7 chore(tokens): update to v0.144
PiperOrigin-RevId: 491464625
2022-11-28 15:53:25 -08:00
Elizabeth Mitchell
f20e612ed2 chore(field): merge static/theme-styles
PiperOrigin-RevId: 483769002
2022-10-25 13:59:54 -07:00
Elizabeth Mitchell
c6b557974a chore(text-field): merge static/theme-styles
PiperOrigin-RevId: 483761765
2022-10-25 13:32:31 -07:00
Elizabeth Mitchell
3ccf911217 chore(text-field): update to use local custom properties
PiperOrigin-RevId: 483692535
2022-10-25 09:14:41 -07:00
Elizabeth Mitchell
f2bf1a5c47 chore(text-field): flatten static/theme-styles
PiperOrigin-RevId: 483688630
2022-10-25 09:02:06 -07:00
Elizabeth Mitchell
73ca8ae0eb chore: use relative paths
PiperOrigin-RevId: 481941267
2022-10-18 09:28:59 -07:00
Elizabeth Mitchell
e9bff47acc chore(autocomplete): remove compat deps
PiperOrigin-RevId: 477257348
2022-09-27 13:17:57 -07:00
Elizabeth Mitchell
d40f70b2bd chore(text-field): make ID properties private
PiperOrigin-RevId: 474368908
2022-09-14 13:02:21 -07:00
Elizabeth Mitchell
973a98250b feat(text-field): announce error messages
PiperOrigin-RevId: 474291991
2022-09-14 08:01:59 -07:00
Elizabeth Mitchell
c757bfac45 feat(text-field): error/errorText will override reportValidity
PiperOrigin-RevId: 473098457
2022-09-08 15:22:42 -07:00
Elizabeth Mitchell
58ae98cbc8 fix(text-field): ensure value can overwrite defaultValue
PiperOrigin-RevId: 472984918
2022-09-08 07:36:28 -07:00
Elizabeth Mitchell
1cc64f543a feat(text-field): add character counter
PiperOrigin-RevId: 472518034
2022-09-06 11:48:06 -07:00
Elizabeth Mitchell
5241b76dca feat(text-field): add blur and jsdoc
PiperOrigin-RevId: 471815433
2022-09-02 09:08:51 -07:00
Elizabeth Mitchell
4e6f01d422 fix(text-field): rename readonly to readOnly
PiperOrigin-RevId: 471639592
2022-09-01 14:53:55 -07:00
Elizabeth Mitchell
d584c9042b chore(text-field): refactor templates for SSR
PiperOrigin-RevId: 471302411
2022-08-31 11:18:59 -07:00
Elizabeth Mitchell
4bab4b5874 feat(text-field): add textDirection
PiperOrigin-RevId: 471278968
2022-08-31 09:49:52 -07:00
Elizabeth Mitchell
8387a585a0 chore(field): refactor out :focus-within
PiperOrigin-RevId: 470267755
2022-08-26 09:45:44 -07:00
Elizabeth Mitchell
810a9a4101 feat(text-field): add pattern
PiperOrigin-RevId: 470069611
2022-08-25 13:30:55 -07:00
Elizabeth Mitchell
c73b59cea4 feat(text-field): add min, max, and step
PiperOrigin-RevId: 470006182
2022-08-25 09:19:26 -07:00
Alexander Marks
30c95aeee1 chore: add ".js" extensions to import statements.
In particular, this allows external build tools like Rollup and @web/dev-server to understand imports of Lit, which is configured to require the ".js" extension via its export conditions (so that Lit import maps can remain minimal).

PiperOrigin-RevId: 469772992
2022-08-24 11:01:21 -07:00
Elizabeth Mitchell
a722fe793c chore(text-field): add additional aria properties for autocomplete
PiperOrigin-RevId: 469739520
2022-08-24 09:01:32 -07:00
Elizabeth Mitchell
17d92f6b4b fix(text-field): label floating after type changes
PiperOrigin-RevId: 469319802
2022-08-22 16:59:45 -07:00
Elizabeth Mitchell
0c8a91fc8f feat(text-field): add minLength and maxLength
PiperOrigin-RevId: 468759213
2022-08-19 12:20:11 -07:00
Elizabeth Mitchell
3e2b20a401 chore(text-field): make fieldTag abstract
PiperOrigin-RevId: 468615547
2022-08-18 21:12:54 -07:00
Elizabeth Mitchell
468dc2b862 chore(text-field): clean up ternary operators
PiperOrigin-RevId: 468526140
2022-08-18 12:54:32 -07:00
Elizabeth Mitchell
e2e2c9d8a5 feat(text-field): add native validation APIs
PiperOrigin-RevId: 467226058
2022-08-12 09:27:20 -07:00
Elizabeth Mitchell
58848f61c9 feat(text-field): add error text
PiperOrigin-RevId: 467223935
2022-08-12 09:18:06 -07:00
Kevin Vizcarra
9542b71174 refactor: Stop passing unnecessary elevation tokens when building $dark-theme
PiperOrigin-RevId: 467035171
2022-08-11 13:29:01 -07:00
Elizabeth Mitchell
091a124eaf feat(text-field): add selection APIs
PiperOrigin-RevId: 466930001
2022-08-11 05:42:56 -07:00
Elizabeth Mitchell
606697de36 chore(text-field): update to use lit static
PiperOrigin-RevId: 466774176
2022-08-10 13:37:01 -07:00
Elizabeth Mitchell
7792ae1b09 feat(text-field): add valueAsNumber and valueAsDate
PiperOrigin-RevId: 466696270
2022-08-10 08:46:14 -07:00
Elizabeth Mitchell
246166c4e4 chore(text-field): synchronously render when accessing input
PiperOrigin-RevId: 466695986
2022-08-10 08:44:47 -07:00
Elizabeth Mitchell
77cc80e634 feat(text-field): add supporting text
PiperOrigin-RevId: 466241727
2022-08-08 21:45:52 -07:00
Elizabeth Mitchell
fe86936d91 chore(text-field): remove wrapper slot spans
PiperOrigin-RevId: 466112636
2022-08-08 12:15:47 -07:00
Elizabeth Mitchell
f8d950f3f6 chore(field): remove field ID property
PiperOrigin-RevId: 465328988
2022-08-04 09:12:02 -07:00
Elizabeth Mitchell
7285b3a2db fix(text-field): correctly resizes when setting width
PiperOrigin-RevId: 465164744
2022-08-03 15:33:02 -07:00
Elizabeth Mitchell
424596edce feat(text-field): add icons
PiperOrigin-RevId: 464165729
2022-07-29 15:04:12 -07:00
Elizabeth Mitchell
2a0d563338 feat(controller): add stringConverter for empty reflecting attributes
PiperOrigin-RevId: 464124340
2022-07-29 11:43:40 -07:00
Elizabeth Mitchell
6b25914f60 fix(text-field): container-shape not working for outlined variant
PiperOrigin-RevId: 463574366
2022-07-27 06:50:53 -07:00
Material Web Team
10a6d353fc refactor: mark disabled and checked as boolean values in lit templates.
PiperOrigin-RevId: 462716556
2022-07-22 15:27:12 -07:00
Material Web Team
40fdd8ed29 chore: disable tslint for ariaProperty and legacyAriaProperty
PiperOrigin-RevId: 462424828
2022-07-21 10:55:48 -07:00
Elizabeth Mitchell
e0386acda9 feat(text-field): add SSR ariaLabelledBy property
PiperOrigin-RevId: 460556448
2022-07-12 14:44:15 -07:00
Elizabeth Mitchell
b945f30e75 feat(text-field): add placeholder color tokens
PiperOrigin-RevId: 460233519
2022-07-11 09:38:39 -07:00
Elizabeth Mitchell
0f9a8216a2 chore(text-field): remove underscore
PiperOrigin-RevId: 459515801
2022-07-07 08:11:03 -07:00