Commit graph

20 commits

Author SHA1 Message Date
Eric Liu
bf21a3da33 fix(list-box): address a11y issues 2025-08-17 12:46:14 -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
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
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
8e996dc683 chore: format files with Prettier 3 2024-11-11 21:35:48 -08:00
metonym
6590457574
fix(types): improve e.detail type for dispatched events (#1907)
* fix(types): improve `e.detail` type for dispatched events

* Run "yarn build:docs"

* test: assert new types
2024-02-01 10:56:34 -05:00
Eric Liu
c02b4738bc
fix: resolve a11y warnings from Svelte version 3.58 (#1732)
* chore(deps-dev): upgrade svelte to 3.58

* chore(a11y): ignore false positives

Referencing the upstream Carbon React implementation, these warnings can be ignored.

* fix(list-box-menu-item): set `tabindex` to `-1`

* chore: fix `tabindex` capitalization

The Svelte Language server does not detect `tabIndex` as a valid attribute.

Note, however, that `tabIndex` is correct when using it in JavaScript (e.g., `node.tabIndex`).
2023-05-18 14:53:17 -04:00
metonym
877173df59
fix: use default values if translateWithId is falsy (#1282)
* fix(list-box-menu-icon): use default translations if `translateWithId` is undefined

* fix(list-box-selection): use default translations if `translateWithId` is undefined
2022-05-03 19:43:07 -07:00
metonym
ba58ba8f00
refactor: use icons from carbon-icons-svelte@11 (#1227)
* chore: update ignore rules, remove unused files

* refactor(icons): use icons from carbon-icons-svelte@11

* docs(time-picker): fix default value

* chore: upgrade carbon-icons-svelte to v11

* docs: update examples to use icons from carbon-icons-svelte@11

* docs: update number of icons [ci skip]
2022-04-03 11:57:28 -07:00
Eric Liu
040e3d3372
Inline carbon icons, remove carbon-icons-svelte from dependencies (#904)
* feat(icons): inline carbon icons used by components

* feat(icons): update svelte components to use inlined carbon icons

* breaking(deps): remove carbon-icons-svelte

* chore(deps-dev): install carbon-icons-svelte as a devDependency
2021-11-11 08:54:45 -08:00
Eric Liu
1b234ca2e3
Alignment with Carbon version 10.30 (#559)
* feat(toolbar): forward "clear" event in ToolbarSearch

* docs(search): add on:clear example

* fix(ui-shell): set aria-hidden in SideNav

Ref c2b4f1f00

* chore(deps-dev): upgrade carbon-components to v10.30.0

* fix(text-input): use bx--text-input class for TextInputSkeleton

* fix(radio-button): only render span if labelText is truthy

* docs(password-input): add custom tooltip example

* feat(button): add isSelected prop for icon-only, ghost buttons

* feat(radio-button): add legendText prop to RadioButtonGroup

* docs(tag): add filterable (disabled) variant

* feat(tag): add interactive prop

* chore(number-input): deprecate the mobile variant

Mobile variant styles will no longer work.

* feat(button): set aria-pressed attribute if icon-only, ghost button is selected

* fix(multi-select): type dispatched select event

* fix(button): remove redundant "button" role

* feat(icon): deprecate Icon, IconSkeleton

* feat(ui-shell): make SideNavMenuItem text slottable

* fix(list-box): update styles for ListBoxSelection

* fix(list-box): temporarily apply override styles to ListBoxMenuIcon for chevron

* fix(tag): set disabled prop on interactive tag

* docs(button): extract selected, icon-only button example

* feat(tooltip): elevate z-index of tooltip when open

* feat: forward restProps to input element

* fix(types): fix TimePicker test to pass svelte-check

* feat: add ImageLoader component

* test: add ImageLoader

* feat: add LocalStorage component

* test(local-storage): fix invalid file

* chore(docs): use green tag type
2021-03-13 14:53:37 -08:00
Eric Liu
75d4b4cf03 refactor(types): shorten ref, id JSDocs, use CarbonIcon type, export component props 2020-11-06 11:30:46 -08:00
Eric Liu
d38e6d8be6 refactor: update/fix JSDoc props 2020-11-04 06:04:25 -08:00
josefaidt
398887a3d3 feat(prettier): add svelteBracketNewLine 2020-09-24 10:50:34 -05:00
Eric Liu
42b8159b1c chore(prettier): use svelteStrictMode 2020-09-04 16:35:49 -07:00
Eric Liu
5968e22bd9 build: add script to generate component index
- move typedefs for correct type parsing
2020-08-13 17:24:00 -07:00
Eric Liu
a10693659e chore: remove trailing semicolono from jsdoc types 2020-07-27 06:23:31 -07:00
Eric Liu
f30755b237 chore: complete first pass of apply jsdoc annotations to component props 2020-07-26 17:42:12 -07:00
Eric Liu
773b18d314 chore: add more prop annotations 2020-07-25 06:26:49 -07:00
Eric Liu
2200b29b92 chore: lift components folder 2020-07-19 09:06:08 -07:00
Renamed from src/components/ListBox/ListBoxSelection.svelte (Browse further)