Commit graph

845 commits

Author SHA1 Message Date
metonym
5358cf66ea
fix(tooltip-definition): button should have type "button" (#1056)
Fixes #1055
2022-02-01 07:05:20 -08:00
brunnerh
099efedef1
breaking(number-input): align change, input events with native input behavior (#1053)
* Closes #1052

* Closes #1050
2022-01-30 09:01:51 -08:00
Gregor Wassmann
a8039a4d1e
feat(modal): support primaryButtonIcon prop (#1047) 2022-01-29 09:35:08 -08:00
metonym
402de56029
fix(number-input): value 0 should not be converted to null (#1046) 2022-01-27 08:00:32 -08:00
metonym
9e915cf90a
breaking(number-input): type value as null | number (#1044)
Fixes #1039
2022-01-27 06:57:32 -08:00
metonym
3018c2b207
fix(text-area): export readonly prop (#1043)
Fixes #1009
2022-01-26 19:19:49 -08:00
metonym
048ebc7b81
fix(checkbox): fix two-way binding (#1042)
Fixes #967
2022-01-26 19:04:32 -08:00
brunnerh
25ce57fd5a
Add required prop to RadioButton. (#1035)
Fixes #1034.
2022-01-22 09:05:41 -08:00
Eric Liu
493568f08d
feat(number-input): forward focus, blur events to input (#1033) 2022-01-22 08:58:59 -08:00
Eric Liu
222d5a90e4
fix(number-input): empty input should not be coerced to 0 (#1032)
Fixes #1031
2022-01-22 08:58:48 -08:00
Eric Liu
4d51250173
Align 10.51 (#1021)
* chore(deps-dev): upgrade carbon-components to v10.51.0

* fix(slider): input should also be labelled

* refactor(date-picker): remove hotfix logic to prevent disabled icon from being clickable

Ref: https://github.com/carbon-design-system/carbon-components-svelte/pull/860

* feat(progress-step): update icons for current, incomplete steps
2022-01-22 08:02:24 -08:00
brunnerh
201e03757b
Add required prop to Checkbox. (#1030)
Fixes #1029.
2022-01-22 07:43:53 -08: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
kwieszalka-maystreet
5da83ec869
feat(data-table): support paginated data table (#880)
Closes #702
2022-01-19 07:51:42 -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
cde8a79fa8
feat(ComboBox): selectedIndex -> selectedId (#1016)
* feat(breaking): selectedIndex -> selectedId in ComboBox

* docs: update ComboBox
2022-01-18 06:37:55 -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
b13bb8e09f
fix(tooltip): pressing "Escape" should break out of trap focus (#1015)
Fixes #924
2022-01-17 13:40:10 -08:00
Eric Liu
a60bc73fea
fix(combo-box): name should be passed to input (#1014)
Fixes #797
2022-01-17 13:07:42 -08:00
Alexis Reigel
9b32fe90f5
Emit Checkbox change event after modifying internal state (#1013)
The checkbox's internal state doesn't match the visual checked /
unchecked state. The behaviour is visible when using 1-way binding on
the checkbox and using the on:change event. The internal state is always
the opposite of the visual state.
2022-01-17 12:50:08 -08:00
Eric Liu
653a601f9b
Revert "Refactor prop types to omit redundant null for null | HTMLElement types" (#1008)
#996
2022-01-14 11:29:37 -10:00
Eric Liu
49a94b0ee4
fix(modal): shouldSubmitOnEnter should also dispatch "click:button--primary" (#1007)
* fix(modal): shouldSubmitOnEnter should also dispatch "click:button--primary"

Fixes #1005

* yarn build:lib
2022-01-14 08:51:48 -10:00
Eric Liu
32edfa59dd
Make Toggle labels slottable (#1002)
* feat(toggle): support slottable labels

* yarn build:lib

* docs(toggle): add "Slottable labels" example
2022-01-12 16:43:27 -10:00
Eric Liu
37f19d2171
Add option to not re-focus ComboBox when invoking clear() (#1000)
* feat(combo-box): add option to clear accessor to not re-focus input

Closes #994

* yarn build:lib

* test(combo-box): validate clear accessor params

* docs(combo-box): add clear without focus to "Clear selection" example
2022-01-12 16:12:43 -10:00
Eric Liu
6de73f86fb
Refactor prop types to omit redundant null for null | HTMLElement types (#998)
* refactor: omit redundant `null` prop type for HTMLElements

* yarn build:lib

* test: assert updated element prop types
2022-01-12 13:36:47 -10:00
István Pató
d31e529ca9
fix(ComboBox): programmatically set selected index (#995)
* fix(ComboBox): programmatically set selected index

* refactor(ComboBox): renaming example to Reactive example
2022-01-12 13:36:37 -10:00
Eric Liu
f6eb958732
fix(combo-box): reset values when manually clearing input field (#992) 2022-01-10 13:05:32 -10:00
István Pató
a2a5159a59
fix(combobox): filtered ComboBox handling with keyboard (#926)
* fix(combobox): filtered ComboBox handling with keyboard

* fix: dispatching filteredItems

* fix: default value settings (init) on inputValue

* fix: multiple event dispatch, and item selection bug

* fix(ComboBox): programmatically setting selectedIndex has no effect

* fix(ComboBox): selectedIndex prog. setting on filtered items

* fix(ComboBox): removed unnecessary blur code fragment, fix mouse selection after keyboard editing
2022-01-10 12:45:37 -10: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
e8be9280c7
Update TileGroup on programmatic selection change. (#971)
Only fire `select` event for user interaction (from RadioTile).

Uses `set` function instead of `$` to prevent cyclic dependency error.
2022-01-08 09:24:33 -08: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
Gregor Wassmann
f0cf4e7ba5
Enhance Checkbox to use bind:group (#947)
* Enhance Checkbox to use bind:group

* Use custom logic

* Move multiple checkboxes above skeleton

* Incorprate PR feedback

* Any instead of string
2021-12-30 13:31:33 -08:00
Eric Liu
997eeb7b48
Fix filterable MultiSelect keydown behavior (#961)
* fix(multi-select): blur input when tabbing away

Fixes #938

* fix(multi-select): close a filterable menu on "Escape"

* fix(multi-select): open filterable menu on [Space]
2021-12-30 13:00:21 -08:00
Eric Liu
f955b09c09
fix(date-picker): input should not lose focus when pressing "Enter" (#958)
Fixes #876
2021-12-30 13:00:11 -08:00
Eric Liu
9698625b15
fix(toolbar-search): input should expand if value is programmatically set (#956)
Fixes #673
2021-12-30 13:00:03 -08:00
Eric Liu
a522a55596
fix(date-picker): stop "Escape" from closing modal (#955)
Fixes #952
2021-12-29 06:02:55 -08:00
Eric Liu
3277527929
hotfix(multi-select): prevent double trigger in a filterable multiseelct (#954)
Fixes #940
2021-12-29 06:01:31 -08:00
Eric Liu
ae96fdf3d9
fix(data-table): forgo "click", "click:row" events if target is a checkbox, radio button (#951)
Fixes #933
2021-12-28 13:26:09 -08:00
Eric Liu
a32bcbccd7
fix(label-text): correctly render "labelText" slots (#949)
Fixes #944
2021-12-28 12:59:33 -08:00
brunnerh
d5a6b5873b
Modify click events to prevent navigation. (#946)
Without preventDefault the link will navigate the page instead of opening the dropdown when the tabs are in the compact mode.
Because the parent element also toggles on click, there is an additional stopPropagation to not toggle twice which in a no-op.
2021-12-28 12:59:26 -08:00
István Pató
a1377f07de
fix(textinput): displaying empty input value if value is undefined or null (#936)
#935
2021-12-28 12:59:20 -08:00
Eric Liu
4de0fab859
Fix filterable multiselect keyboard selection behavior (#923)
* fix(multi-select): correctly select correct item in filterable multiselect

Fixes #922

* fix(multiselect): do not mutate sortedItems
2021-11-27 10:04:22 -08:00
Eric Liu
4f83b2d1e1
fix(data-table): forgo "click", "click:row" events if target is an OverflowMenu (#918)
#917
2021-11-19 08:29:16 -08:00
Eric Liu
ccc733f3f7
Support custom target(s) for ContextMenu (#916)
* feat(context-menu): add target prop to selectively trigger context menu

* feat(context-menu): include clicked element in "open" event detail

* docs(context-menu): add target, multiple target examples
2021-11-18 13:32:13 -08:00
Daniel Miedzik
9bbc7698a9
Fix: Tabs dispatch change event on init (#882)
* fix tabs on change problem

* fix(tabs): dispatch change event in update/change context methods

Co-authored-by: metonym <ericyl.us@gmail.com>
2021-11-18 07:45:47 -08:00
Bilux
1aad3153b5
Correct page number when dispatching update (#911)
* Correct page number when dispatching update

When in last page of data and the page size get changed to a bigger size the current page number will be out of range of total pages.
This code will set the page number in range of total pages.

* fix(pagination): page value should not exceed totalPages

Co-authored-by: metonym <ericyl.us@gmail.com>
2021-11-18 07:41:33 -08:00
Eric Liu
914f9af3be
hotfix(popover): manually apply relative style if relative is true (#915) 2021-11-18 07:28:40 -08:00
Eric Liu
dfd53ce09b
Refactor onDestroy to use onMount return function (#914)
* refactor(select-item): replace onDestroy with onMount return function

* refactor(date-picker): replace onDestroy with onMount return function

* refactor(switch): replace onDestroy with onMount return function

* refactor(composed-modal): replace onDestroy with onMount return function
2021-11-17 13:20:26 -08:00
Eric Liu
27ba4350cf
Align v10.48 (#907)
* chore(deps-dev): upgrade carbon-components to v10.48.0

* feat(ui-shell): support HeaderNavMenu with current item

* refactor(tile): remove unnecessary "position: relative" style

* refactor(tile): remove unused ref

* feat(inline-notification): make title/subtitle slottable

Closes #883

* feat(toast-notification): make title/subtitle/caption slottable

* chore(notification): deprecate NotificationTextDetails
2021-11-12 16:25:02 -08:00
Eric Liu
a308c89e42
fix(date-picker): type locale prop using flatpickr types (#906)
Fixes #855
2021-11-12 14:36:46 -08:00