Commit graph

218 commits

Author SHA1 Message Date
Eric Liu
632320ae3b
fix(combo-box): "Escape" key clears input value (#2169)
Fixes #2167
2025-06-07 12:45:32 -07:00
Eric Liu
95c06a83b3
fix(combo-box): clear button supports "Space" key (#2168)
Fixes #2166
2025-06-07 12:33:59 -07:00
Eric Liu
0ea3d9351e test(multi-select): add more unit tests 2025-05-20 10:17:42 -07:00
Eric Liu
bfe86be11b test(combo-box): more unit tests 2025-05-20 09:04:58 -07:00
Eric Liu
50b4761791 test(combo-box): add keyboard navigation test 2025-05-20 08:59:14 -07:00
Eric Liu
cdf5659fa0
fix(pagination): use toLocaleString for default text formatting (#2161) 2025-04-26 13:39:26 -07:00
Eric Liu
ed3928bb01
fix(pagination): window totalItems for performance (#2160)
Fixes #2156
2025-04-26 13:25:52 -07:00
Eric Liu
56da2b408b test(date-picker): use await for range mode 2025-04-23 15:13:28 -07:00
Eric Liu
f8cb660c51 test(date-picker): add unit tests 2025-04-20 15:30:59 -07:00
Eric Liu
f09c2e2c31
fix(toolbar-search): re-filter rows if DataTable rows change (#2154)
Fixes #2143

Make `ToolbarSearch` filtering reactive to `DataTable` rows.

Previously, `ToolbarSearch` did not update when `DataTable` rows
changed. Now it subscribes to the context rows and re-runs
`filterRows` in `afterUpdate` to prevent infinite loops.
2025-04-19 13:33:07 -07:00
Eric Liu
b034378277 test(data-table): add tests for DataTableSearch 2025-04-19 13:21:51 -07:00
Eric Liu
b4b055270e test: use assert instead of casting HTMLElement 2025-04-19 12:51:58 -07:00
Nick Wing
61ea8dd82c
fix(select): falsy item text should fallback to value (#2152) 2025-04-18 10:34:12 -07:00
Nick Wing
436dea47e8
feat(combo-box): add hideLabel prop (#2153) 2025-04-18 10:27:14 -07:00
Eric Liu
11246f6521 test(selectable-tile): add unit tests 2025-04-12 15:59:52 -07:00
Eric Liu
892f35aef3 test: delete old test files 2025-04-12 15:59:52 -07:00
Eric Liu
a514f284e6 test(to-hierarchy): increase test coverage 2025-04-12 15:59:16 -07:00
Eric Liu
8ab77c99e2 test(multi-select): more unit tests 2025-04-12 14:34:11 -07:00
Eric Liu
5e8c8b983c test(local-storage): extract shared global mock 2025-04-12 14:34:11 -07:00
Eric Liu
823a8f69dc test(fluid-form): add unit tests 2025-04-12 14:34:11 -07:00
Eric Liu
37a1ab30cf test(form): add unit tests 2025-04-12 14:34:11 -07:00
Eric Liu
b9de4591be test(button-set): add unit tests 2025-04-12 14:34:11 -07:00
Eric Liu
5bff894ed7 test: delete old test files 2025-04-12 14:34:11 -07:00
Eric Liu
d4ca8b5c97
test(modal): add unit tests (#2145) 2025-04-12 12:55:39 -07:00
Eric Liu
da2a308d31
test(data-table): add unit tests (#2144) 2025-04-12 12:21:28 -07:00
Eric Liu
c57c0efb73 test(column): add unit tests 2025-04-01 08:47:29 -07:00
Eric Liu
03f3920383 test(dropdown): add more tests 2025-04-01 08:47:29 -07:00
Eric Liu
b3816606f6 test(context-menu): add unit tests 2025-04-01 08:47:29 -07:00
Eric Liu
7c916828f2 test: delete old files 2025-04-01 08:47:29 -07:00
Eric Liu
1a5f2d8e67
fix(list-box): correct button/description translations based on selection count (#2139)
The `ListBoxSelection` component now properly handles
translations for the clear button based on the selected items:

- Fix `buttonLabel` and `description` to use the same translation logic
- Add tests for custom translations in both `ComboBox` and `MultiSelect`
2025-03-23 11:28:06 -07:00
Eric Liu
9b61af0306
fix(list-box): set aria-disabled if disabled (#2125) (#2138)
Re-apply #2125 (reverted in #2130) to preserve `disabled` attribute.

Carbon styles depend on the `[disabled]` attribute. However, the `disabled`
attribute is not valid markup when applied to `div role="option"`. This PR
preserves the existing `disabled` attribute while also setting `aria-disabled`
to maintain accessibility.
2025-03-23 10:46:25 -07:00
Eric Liu
43511e09ec fix(text-area): allow visually hidden label (#2137)
This fixes an accessibility issue with `TextArea`.

Currently, if `hideLabel` is `true`, the label is not rendered at all.
The expected behavior is that it should be visually hidden while
still being available to screen readers.
2025-03-23 10:42:47 -07:00
Eric Liu
ca9beebaea
fix(radio-tile): allow standalone RadioTile usage (#2136)
Although `RadioTile` is meant to be used inside a `TileGroup`, it feels  
unpolished for standalone usage to crash due to a missing parent context.

This fixes `RadioTile` to fail open by providing a no-op `add: () => {}`  
when `TileGroup` context is not found.
2025-03-22 13:03:20 -07:00
Eric Liu
1462e300d6
fix(radio-button): forward focus, blur events (#2135)
As identified in #2131, `focus` and `blur` events should be
forwarded to the underlying `RadioButton` element.
2025-03-22 13:02:28 -07:00
Eric Liu
dd1338ffc4
fix(list-box-selection): fix aria-label for clear button (#2134)
`ListBoxSelection`, used by `MultiSelect` and `ComboBox`, currently  
applies the wrong `aria-label` for the clear selection button. It uses
the `translateId` (e.g., `"clearAll"`) instead of the user-friendly copy.
2025-03-22 12:59:16 -07:00
Eric Liu
c6c80d35a9 test: remove CSS import from set-up file 2025-03-20 17:34:20 -07:00
Eric Liu
95f6c97a57 test: remove old files 2025-03-20 17:34:20 -07:00
Eric Liu
d45409c7f3 test(grid): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
f7ac0e3f22 test(progress-indicator): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
1478486d8f test(password-input): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
f200dadb97 test(multi-select): more unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
0b799d64b7 test(dropdown): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
3607c70070 test(skeleton-placeholder): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
a4b10500a3 test(skeleton-text): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
f5342d4b96 test(structured-list): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
f89e9df8f0 test(expandable-tile): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
490d3b42ea test(radio-tile): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
6e62ce5416 test(time-picker): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
ec7d798783 test(radio-button): add unit tests 2025-03-20 17:34:20 -07:00
Eric Liu
6dccd5cbe2 test(number-input): add unit tests 2025-03-20 17:34:20 -07:00