Commit graph

883 commits

Author SHA1 Message Date
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
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 Liu
4df812bc3f
fix(date-picker): set calendar to null (#903)
Fixes #878
2021-11-11 08:04:06 -08:00
Eric Liu
ea6757d020
Add autoWidth prop to Tabs (#901)
* feat(tabs): support auto width tabs

Closes #899

* docs(tabs): add auto width example
2021-11-10 19:46:20 -08:00
Eric Liu
08402e54bf
feat(form): add ref prop (#900)
Closes #877
2021-11-10 19:46:14 -08:00
Eric Liu
32beeac85b
fix(text-input): coerce TextInput value to number if type is numerical (#902)
Fixes #898
2021-11-10 14:45:13 -08:00
Paweł Malinowski
7e76cbc8a9
fix(Tooltip): fix two way binding in cases where icon is in focus (#895) 2021-11-09 14:52:40 -08:00
Eric Liu
b22058f54e hotfix(expandable-tile): set relative position in tile 2021-11-07 12:09:51 -08:00
Paweł Malinowski
f32f8fb9dc
fix(ToolTip): better toggling logic (#885)
* fix(ToolTip): better toggling logic

* fix(ToolTip): remove redundant click handler

* fix(ToolTip): ensure at most one ToolTip is open at the same time

- a click event closes the tooltip if the target is not the tooltip or
  the tooltip icon.
- the event is registered in the capture phase and a `setTimeout` is used to
  deal with edge cases in which a button is used to toggle the tooltip
  on or off.
2021-11-07 12:03:32 -08:00
Eric Liu
b3a73cf80c
fix(data-table): avoid triggering click:row when clicking expandable row chevron (#890)
Fixes #889
2021-11-06 10:33:33 -07:00
Eric Liu
fb7ebb93cb
fix(data-table): expand batch expansion chevron if all rows are expanded #867 (#873)
Fixes #867
2021-10-22 07:18:03 -07:00
Daniel Miedzik
51cd4ec342
fix #869 (#870) 2021-10-21 08:26:47 -07:00