Commit graph

56 commits

Author SHA1 Message Date
Eric Liu
c194c80e29 fix(dropdown): avoid manual field blur
Fixes #2083
2025-01-19 17:38:25 -08:00
Eric Liu
8e996dc683 chore: format files with Prettier 3 2024-11-11 21:35:48 -08:00
Eric Liu
b015d76f15 chore(a11y): ignore svelte@4 a11y warnings (#1769) 2023-07-13 10:50:51 -07:00
metonym
d897484abf
fix(dropdown): dispatch correct selectedItem in select event (#1646)
Fixes #1645
2023-02-04 20:31:31 -05:00
ptrxyz
8cb5d538f7
fix(dropdown): fix ssr issue (#1639)
The `onDestroy` hook is also run during SSR, so returning destruction function from `onMount` should do the trick. For #1638
2023-01-24 22:28:36 -05:00
Jonathan Quintin
73aa6e216a
fix(dropdown): close when user clicks outside iframe (#1596)
* `Dropdown` click outside
Fixes #1595

* `onDestroy` we want to remove the event listener
to prevent listeners hanging
2023-01-17 20:57:50 -05:00
metonym
fce92fb648
fix(dropdown): avoid runtime error if items is empty (#1578) 2022-12-07 20:38:22 -08:00
Enrico Sacchetti
fa5515ded0
fix(dropdown): only dispatch "select" on interaction, allow arrow keys to navigate menu (#1569)
Fixes #1475
2022-12-07 20:09:29 -08:00
metonym
855ee06741
fix: pressing "Escape" should close Dropdown, MultiSelect menu (#1473)
* fix(dropdown): close the menu when pressing "Escape"

* fix(multi-select): close the menu when pressing "Escape"
2022-08-31 19:00:01 -07:00
metonym
7030300186
fix(list-box-menu-item): scroll item into view when using keyboard navigation (#1471)
Fixes #1470
2022-08-31 18:52:06 -07:00
metonym
260bf4e040
breaking(types): type arrays as read-only (#1335)
Closes #1259

* breaking(types): type arrays as read-only

* Run "yarn build:docs"

* test: assert read-only arrays
2022-06-05 13:25:43 -07:00
metonym
f25a10c9c4
feat: support item.disabled key for Dropdown, MultiSelect, ComboBox (#1328)
Closes #1326

* feat: support item.disabled key for `Dropdown`, `MultiSelect`, `ComboBox`

* Run "yarn build:docs"

* test: assert disabled property

* docs: add "Disabled items" examples
2022-06-02 17:56:30 -07:00
metonym
0063c01beb
breaking(dropdown): remove useless inline prop (#1329)
* breaking(dropdown): remove useless `inline` prop

* Run "yarn build:docs"
2022-06-02 17:36:46 -07:00
metonym
66c96612bf
fix(dropdown): remove redundant role/id (#1327)
* fix(list-box): list box item should have a role and `aria-selected` attribute

* fix(dropdown): remove redundant role/id
2022-06-01 18:55:27 -07:00
metonym
0801e1d078
refactor: prefer class directive over class attribute (#1318) 2022-05-29 08:16:27 -07:00
metonym
04d758f869
fix: CopyButton text prop and Dropdown selectedId prop should be required (#1311)
* chore(deps-dev): upgrade sveld to v0.17.0

* fix(copy-button): text prop is required

* fix(dropdown): selectedId prop is required

* Run "yarn build:docs"

* docs: display "Required" tag for required props
2022-05-22 12:39:53 -07:00
metonym
d242849780
fix(dropdown): strongly type translateWithId (#1286) 2022-05-04 07:52:42 -07:00
metonym
1f18c86f4f
fix(dropdown): button type attribute should be "button" (#1264)
Fixes #739
2022-04-23 10:02:33 -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
metonym
f5594daba6
feat(dropdown): make Dropdown slottable (#1182) 2022-03-19 09:15:52 -07:00
Eric Liu
1f7b5560a8
Type id as any in ComboBox, Dropdown, MultiSelect (#1019)
Loosen the prop type for `id`, `selectedId` to be `any` instead of a `string`.
2022-01-20 18:50:36 -08:00
István Pató
cfa036d7a6
fix(dropdown): prevent icon from being clickable in disabled state (#1017)
* fix(Dropdown): list icon was clickable in disabled state

* fix(Dropdown): the ListBox element was selectable in disabled state if extended Dropdown
2022-01-18 06:38:21 -08:00
Koichi Kiyokawa
e11a893bee
feat(Dropdown): selectedIndex -> selectedId (#1004)
* feat(breaking): selectedIndex -> selectedId in Dropdown

* feat: omit `selectedIndex` from the `select` event
2022-01-18 06:37:32 -08:00
Eric Liu
502f9379fa
Fix a11y warnings emitted by Svelte v3.45 (#989)
* chore(deps-dev): bump svelte to version 3.45

* fix: resolve a11y violations

Fixes #988
2022-01-10 11:57:52 -10:00
brunnerh
6458c97c1a
Add required prop to Select. (#968)
Upgrade sveld to set paths correctly on Windows.
Make Prettier script compatible with Windows and run it.
2022-01-03 10:46:12 -08:00
Eric Liu
36f6a327b2
hotfix: fix remaining imports from carbon-icons-svelte (#905) 2021-11-12 13:09:43 -08: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
6db4112b40
Fix a11y-mouse-events warning, update docs (#765)
* docs: update number of available Carbon icons

* docs: add svelte:head example for loading CDN styles

* chore(deps-dev): upgrade svelte to 3.40.1

* fix(a11y): disable a11y-mouse-events-have-key-events warning #760

* fix(deps): upgrade carbon-icons-svelte to v10.36.0 to avoid a11y warnings #760

* refactor(overflow-menu): remove formatStyle utility

* docs: links in paragraphs should be inline

* docs: add note on using all styles for dynamic theming
2021-07-26 08:40:05 -07:00
Eric Y Liu
9e0893051d v0.32.2 2021-04-23 19:23:46 -07:00
David Espinosa
2013120428
fix(Dropdown): update selectedId when selectedIndex changes. (#611) 2021-04-23 18:39:33 -07:00
Lyu, Wei-Da
b810404afa
fix can't open dropdown with keyboard (#610) 2021-04-23 18:35:18 -07:00
Eric Liu
14e714fa61
Alignment with Carbon version 10.29 (#529)
* chore: patch prettier-plugin-svelte

* docs(tag): add filterable small tag example

* feat(ui-shell): add SideNavDivider

* feat(combo-box): support warning state

* docs(combo-box): add invalid state example

* fix(progress-step): add title to warning icon

* docs(progress-indicator): add invalid step example

* docs(progress-indicator): add disabled steps example

* feat(truncate): add text truncation component and action

* docs(radio-tile): fix light variant example

* fix(side-effects): add pre-compiled CSS to library side effects

* refactor(css): use shorthand scss imports, add comments

* refactor(truncate): rename "direction" prop to "clamp"

* chore(deps-dev): bump carbon-components to v10.29.0

* feat(combo-box): add direction prop

* feat(dropdown): add direction prop

* feat(multi-select): add direction prop
2021-02-19 16:08:16 -08:00
Eric Liu
7cd3723960
Alignment with Carbon version 10.28 (#505)
* chore(deps-dev): remove @carbon/themes

* chore(deps-dev): bump devDependencies

* fix(tabs): forward click event to Tab

* feat(toggle): dispatch toggle event

* feat(tag): dispatch close event

* feat(tooltip-icon): make tooltipText slottable

* feat(dropdown): add hideLabel prop

* docs(select): add "Hidden label" example

* refactor(modal): use class directive

* feat(modal): dispatch transitionend event

* chore(deps-dev): upgrade carbon-components to 10.28.0-rc.0

* feat(date-picker): add warn state

* feat(tag): support small size variant

* fix(search): add semantic role

* feat(toolbar-search): add disabled state

* fix(composed-modal): add aria-label prop, update header semantic tags

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

* docs(overflow-menu): add light variant example

* docs(link): document OutboundLink in Component API

* chore(tooltip-icon): rename slot to "tooltipText"

* docs(component-api): wrap code blocks to minimize width

* docs(aspect-ratio): remove inline outline style

* fix(tab): do not trigger focus when mounting

* docs(tabs): add reactive example

Closes #438
2021-02-05 05:59:10 -08:00
Eric Liu
3d002f3246
chore(deps-dev): upgrade prettier-plugin-svelte (#498) 2021-01-27 15:02:02 -08:00
Eric Liu
f2a3f8d2e1
Alignment with Carbon version 10.27 (#495)
* chore(deps-dev): bump devDependencies

* docs: update number of available carbon icons

* feat(notification): distinguish dispatched close event between click/timeout

* fix(notification): prevent class from being overriden by $$restProps

* docs(notification): improve example body copy

* fix(notification): remove notificationType prop

* refactor(notification): resolve svelte file in imports

* fix(notification): prevent class from being overridden by $$restProps

* feat(notification): update TS signature for dispatched close event

* docs: update contributing

* fix(loading): adjust spinner styles

* feat(tag): support custom icon variant

* feat(tile): add optional expand/collapse icon labels to ExpandableTile

* feat(code-snippet): support disabled state for single and multi-line types

* fix(code-snippet): remove impossible class directive

* fix(code-snippet): showMoreLess button size should be "field", not "small"

* fix(password-input): disable visibility button

- set default values for tooltipAlignment, tooltipPosition

* fix(text-input): add missing warning field wrapper class

* feat(button): infer hasIconOnly using $$slots API

- requires Svelte version >=3.25

* docs(button): add danger tertiary, icon-only example

* feat(button): set default values for tooltip alignment, position

* docs: document dynamic theming

* fix(modal): correctly set class props #482

* fix(form): forward submit event in FluidForm #487

* feat(dropdown): support warning state

* feat(multi-select): support warning state

* fix(multi-select): prevent dropdown from opening if disabled

* feat(number-input): support warning state

* chore(deps-dev): upgrade devDependencies

* docs:  bump @carbon/themes, carbon-components

* refactor(data-table): co-locate DataTableSkeleton with DataTable

* docs: update number of pictograms

* fix(password-input): add missing "bx--btn" class to visibility toggle

* docs: increase z-index for component preview
2021-01-27 13:29:20 -08:00
Eric Liu
f6877f3809
Fix dropdown combobox focus (#447)
* fix(combo-box): selecting a different combobox should focus the input

* fix(dropdown): selecting a different dropdown should focus the button

* fix(combo-box): focus input if related target attribute is not "searchbox"
2020-12-05 11:36:41 -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
Eric Liu
7e2ab46e6a feat(dropdown): support "sm", "xl" sizes 2020-10-26 14:31:11 -07:00
Eric Liu
392fc452e2 fix: allow numbers as item ids for ComboBox, Dropdown, MultiSelect 2020-10-24 14:43:57 -07:00
Eric Liu
38cdd8907c v0.17.0 2020-10-16 08:57:12 -07:00
weaseldotro
122d347492
DropDown: add select event, fix closing when click outside of body 2020-10-16 11:48:33 +03:00
Eric Liu
378fe06e03 chore: remove storybook 2020-10-14 16:23:44 -07:00
josefaidt
fafac7c9a1 chore(dropdown): remove unused setContext import 2020-10-07 09:28:20 -05:00
josefaidt
398887a3d3 feat(prettier): add svelteBracketNewLine 2020-09-24 10:50:34 -05:00
josefaidt
95e3a6eb12 chore(dropdown): move helper text below input 2020-09-17 14:57:03 -05:00
Eric Liu
42b8159b1c chore(prettier): use svelteStrictMode 2020-09-04 16:35:49 -07:00
Eric Liu
322b238cf0 chore(deps-dev): bump prettier, prettier-plugin-svelte 2020-09-04 16:34:28 -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
25e437b746 chore: add prettier to format definitions/svelte files 2020-08-11 06:21:06 -07:00