Commit Graph

17 Commits

Author SHA1 Message Date
Copybara-Service
c5e87b23a1 Merge pull request #5616 from npeters-dev:text-field-optional-asterisk
PiperOrigin-RevId: 636585863
2024-05-23 10:02:19 -07:00
Elizabeth Mitchell
04b7e9b120 chore(textfield): fix demo clear icon button not disabling
PiperOrigin-RevId: 601821460
2024-01-26 11:34:17 -08:00
Elizabeth Mitchell
3151fd8d90 fix(textfield): error styles not removing when an unrelated control is invalid
The bug: given a form with two required text fields,
1. Try to submit the form, both fields show error.
2. Add a value to the first field.
3. Try to submit the form, the first field does not remove its error.

This is fixed by listening to form submits and clearing the error state if the control is valid.

I refactored `injectFormReportValidityHooks()` into `addFormReportValidListener()` to keep the `OnReportValidity` class cleaner and better identify the problem we're trying to solve.

PiperOrigin-RevId: 597664564
2024-01-11 15:06:22 -08:00
Elizabeth Mitchell
6efc90403b fix(textfield): focus style lost after reportValidity() during change
PiperOrigin-RevId: 597047043
2024-01-09 14:34:16 -08:00
Elizabeth Mitchell
52e568ddc8 refactor(text-field): add validator and use validity mixins
PiperOrigin-RevId: 587086864
2023-12-01 12:32:30 -08:00
Elizabeth Mitchell
c390291687 chore: format files with prettier
PiperOrigin-RevId: 576601342
2023-10-25 11:59:00 -07:00
Elizabeth Mitchell
7866a939b9 fix(textfield): add demo a11y and fix outlined label navigation
PiperOrigin-RevId: 565191993
2023-09-13 16:19:47 -07:00
Andrew Jakubowicz
82e9e92a19 fix(textfield): change slot names to kebab-case
BREAKING CHANGE: replace slot names `leadingicon` and `trailingicon` with `leading-icon` and `trailing-icon`

PiperOrigin-RevId: 563605216
2023-09-07 18:41:25 -07:00
Elizabeth Mitchell
ecac7ecbad fix(textfield): show overflowing content like popups and focus rings
Fixes #4071

Note: Right now textareas cannot display overflowing content due to `resize` requiring hidden overflow.

BREAKING CHANGE: The field component must add the `resizable` attribute rather than using CSS. CSS `resize` can still customize the direction (defaults to both).

PiperOrigin-RevId: 561981406
2023-09-01 09:57:57 -07:00
Elizabeth Mitchell
a167cabeff fix(textfield): add form validity support
Also fixes form.reportValidity() not working for checkbox.

Fixes #4435

PiperOrigin-RevId: 557654271
2023-08-16 17:43:25 -07:00
Elliott Marquez
86ccec3e7e build: use firebase for hosting and remove url prefixes 2023-07-27 09:17:27 -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
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
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