Commit graph

54 commits

Author SHA1 Message Date
Eric Liu
7481b9a995
feat(data-table): allow custom inputName for radio/checkbox (#2087)
Closes #2085
2025-03-09 13:47:08 -07:00
Eric Liu
5f887f59e8
chore: re-run npm run build:docs (#2051) 2024-11-12 10:27:38 -08:00
Eric Liu
dd43224119
feat(data-table): support generics (#1954)
Co-authored-by: K.Kiyokawa <koichi20110068@gmail.com>
Co-authored-by: brunnerh <brunnerh@users.noreply.github.com>
2024-11-11 21:10:45 -08:00
Eric Liu
9f1b997765
chore(deps-dev): upgrade sveld to v0.22 (#2048) 2024-11-10 15:35:29 -08:00
metonym
6fbd8ae6a9 fix(types): use type alias instead of interface for $$restProps 2024-11-09 14:41:28 -08:00
Eric Liu
44daa775d5
fix(data-table): fix DataTableValue type reference in DataTable (#2023) 2024-10-25 15:49:35 -07:00
metonym
3167e449fd fix(types): fix types for on:paste event 2024-10-25 15:40:59 -07:00
Eric Liu
58e6021b08
fix(toolbar-search): fix types for on:clear (#2022) 2024-10-25 15:38:31 -07:00
berndfuhrmann
9132bf8e5a
fix(data-table): loosen sort return type to be a number (#1935)
Fixes #1934

Loosen the `sort` return type from `0 | 1 | -1` to `number`.
2024-03-13 09:55:02 -07:00
Alex Rock
9456eaab3c
feat(data-table): pass row to display function (#1810) 2023-10-01 10:19:13 -07:00
Eric Liu
2f026f792a
feat(typescript)!: support svelte 4 (#1773)
Closes #1753 

The minimum Svelte version required for TypeScript users is now 3.55.
2023-07-19 09:44:56 -07:00
Eric Liu
7fdc2ef7f0
fix(types): allow data-* attributes for props forwarded to HTML elements (#1741)
* chore(deps-dev): upgrade `sveld` to v0.18.1

* Run "yarn build:docs"

* test: assert that `data-*` attributes are valid
2023-07-08 16:41:44 -07:00
Ben Periton
bd8741e45b
fix(toolbar-search): forward keyup, keydown, paste events to Search (#1490) 2022-09-21 08:25:27 -07:00
metonym
dbe33d5cbb
feat(toolbar-search): add filteredRowIds prop to support pagination (#1454)
Closes #1393

* feat(toolbar-search): add `filteredRowIds` prop

* Run "yarn build:docs"

* test(data-table): assert `filteredRowIds` prop

* docs(data-table): add pagination to default filterable examples
2022-08-18 06:59:14 -07:00
metonym
f794cb5312
feat(data-table): dispatch on:click:header--select event (#1453)
* feat(data-table): dispatch `on:click:header--select` event

* Run "yarn build:docs"
2022-08-17 10:19:31 -07:00
naegelin
30487128b3
feat(data-table): dispatch on:click:row--select event (#1450) 2022-08-17 06:39:03 -07:00
metonym
b04a281939
fix(toolbar-batch-actions): active prop should be reactive (#1445)
Follow-up to #1440
2022-08-14 14:55:38 -07:00
naegelin
06777ba803
feat(toolbar-batch-actions): dispatch cancelable on:cancel event (#1441)
Closes #1438
2022-08-14 12:09:40 -07:00
naegelin
bc58c7b029
feat(toolbar-batch-actions): add active prop to show toolbar (#1440)
Closes #1438
2022-08-12 08:01:58 -07:00
metonym
72c24b83b2
feat(data-table): support programmatic sorting (#1337)
* refactor(data-table): pass down sortable props instead of using context

* feat(data-table): support programmatic sorting

* test(data-table): assert new props

* docs(data-table): add "Programmatic sorting" example

* refactor(data-table): remove unused tableSortable store

* refactor(data-table): remove unused indices
2022-06-05 13:37:50 -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
c6f210899b
feat(data-table): allow custom column widths (#1265)
* feat(data-table): allow header column `width`, `minWidth` values

* Run "yarn build:docs"

* test(data-table): assert width, minWidth properties

* docs(data-table): add "Custom column widths" example
2022-05-14 09:24:24 -07:00
metonym
30b81f9877
chore: fix typos in type annotations (#1275)
* chore: fix typos in type annotations

* Run "yarn build:docs"
2022-04-30 08:52:47 -07:00
metonym
ea38cd2568
feat(types): support sveltekit:prefetch, sveltekit:noscroll attributes in type definitions (#1234)
* chore(deps-dev): upgrade sveld to 0.14.0

* Run "yarn build:docs"
2022-04-09 14:13:56 -07:00
metonym
21714d0e3a
breaking: remove deprecated props and components (#1191) 2022-03-27 08:21:58 -07:00
metonym
2df7b92269
feat(toolbar-search): support auto-filterable rows (#1179)
Closes #591
2022-03-19 12:01:03 -07:00
metonym
95a1dfa1af
feat(data-table): support non-selectable rows (#1166)
Closes #1148
2022-03-12 19:36:02 -08:00
metonym
3b70a35df6
feat(data-table): pass row index, cell index to "cell" slot (#1086) 2022-02-11 07:13:55 -08:00
Eric Liu
0d78c30b9d
fix(types): include @default annotations for props that are undefined by default (#1020)
* chore(deps-dev): upgrade sveld to v0.12.1

* Run "yarn build:lib"

* Re-run "yarn build:lib"
2022-01-20 19:29:06 -08:00
kwieszalka-maystreet
5da83ec869
feat(data-table): support paginated data table (#880)
Closes #702
2022-01-19 07:51:42 -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
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
Eric Liu
96d848e9ef
feat(data-table): add nonExpandableRowIds prop (#862)
* feat(data-table): add nonExpandableRowIds prop #861

* test(data-table): validate nonExpandableRowIds prop

* docs(data-table): add Non-expandable rows example
2021-10-19 07:25:22 -07:00
Eric Liu
3203e7a61f
Upgrade sveld to v0.10 (#856)
* chore(deps-dev): upgrade sveld to v0.10.2

* feat(types): regenerate types using sveld@0.10.2

* fix(types): update @extends to use .svelte extension
2021-10-16 12:34:29 -07:00
Florian-Schoenherr
dbf1f225dc
fix(DataTable): useStaticWidth fix for title/description (#824)
* fix(DataTable): useStaticWidth title/description

Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>

* docs(DataTable): useStaticWidth title/description

Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>

* chore(deps-dev): upgrade carbon-components, sass

Co-authored-by: metonym <ericyl.us@gmail.com>
2021-09-23 08:55:06 -07:00
Eric Liu
e4e75e5859
Fixes (#814)
* fix(combo-box): clicking chevron should not open the combo box if disabled

Fixes #776

* fix(toolbar-batch-actions): cancel text should be slottable

Fixes #782
2021-09-11 12:29:26 -07:00
Eric Liu
a1e56bd135
Fixes (#749)
* fix(data-table): type DataTableRowId as "any" #530

Fixes #530

* fix(tree-view): make first node focusable if activeId does not match selected

* fix(overflow-menu): set type="button" to prevent default submit behavior #554

Fixes #554

* fix(overflow-menu): update semantic attributes in OverflowMenuItem

* fix(number-input): do not dispatch change event on initialization #561

Fixes #561

* fix(tree-view): make first focusable node tabbable regardless of active/selected states

* fix(date-picker): load rangePlugin dynamically

* build(rollup): enable inlineDynamicImports

* build(rollup): remove "clipboard-copy" global

* fix(overflow-menu): do not render title if using a slot #537

Fixes #537

* fix(select): forward missing focus, input events #501

Fixes #501
2021-07-14 13:48:23 -07:00
Eric Liu
0a69f8ec74
Various features/fixes (#727)
* fix(data-table): export useStaticWidth prop

* docs(data-table): add static width example

* fix(data-table): do not render table header if title/description not provided

* feat(modal): dispatch "click:button--primary" as an alias to "submit"

* test: update DataTable types test

* test(modal): update modal type tests

* docs(data-table): add clear reminder to key headers/rows
2021-07-05 13:22:56 -07:00
Eric Liu
5fee13b2eb
feat(data-table): make title, description slottable #720 (#722)
Closes #720
2021-07-05 08:44:07 -07:00
Eric Liu
f9909827d0
Align v10.34 (#621)
* feat(theme): add g80 theme

* docs(data-table): use link with icon variant

* feat(search): support expandable variant

* fix(file-uploaded): use semantic p element instead of strong

* feat(side-nav): dispatch open, close, click:overlay events

* refactor(ui-shell): remove usage of deprecated Icon component

* feat(ui-shell): allow custom hamburger menu icons

* feat(button): support xl size

* fix(code-snippet): wrap code element with pre

* refactor(button): use button specific tooltip class for icon-only variant

* feat(password-input): support warning, inline props

* feat(data-table): support medium size
2021-06-25 03:45:30 -07:00
Gregor Wassmann
630e19b57a
Add input props to ToolbarSearch (#647) 2021-06-15 15:13:34 -07:00
rafadess
47c79b16c7
Adding display attr to DataTableCell (#615) 2021-04-30 16:18:47 -07:00
Eric Liu
fa9b90cd79
Alignment with Carbon version 10.32 (#588)
* feat(code-snippet): add copy functionality

- docs: add custom feedback copy text example

* feat(tile): support disabled state for SelectableTile, RadioTile

Closes #539

* build(rollup): add clipboard-copy to globals

* feat(copy-button): add copy functionality

* feat(content-switcher): deprecate the light prop

- docs: remove the light variant example

* fix(toolbar-search): remove outer div

* feat(search): add searchClass prop

* fix(composed-modal): set hasScrollingContent class on ModalBody

* docs(data-table): add expandable size examples

* feat(tooltip): add TooltipFooter component

* fix(time-picker): correctly display invalidText

* feat(breadcrumb): support overflow menu

* feat(multi-select): export inputRef prop

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

* feat(form): add noMargin prop to FormGroup

* docs(tooltip): document TooltipFooter

* feat(context-menu): support danger kind for ContextMenuOption

* feat(data-table): support rendering empty table header in skeleton

* refactor(types): use shorter import path in DataTableSkeleton

* feat(data-table): allow sorting to be disabled for a specific header

* docs(data-table): update example to desort the Protocol header

As an example, it makes more sense because all the values ("http") are the same.

* fix(context-menu): set initial y offset of context menu based on window height #577

* fix(context-menu): render submenu based on viewport constraints #577
2021-04-02 13:31:53 -07: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
827a9822e7
fix(data-table): specify that restProps are forwarded to "div" #524 (#525) 2021-02-17 05:56:33 -08:00
Eric Liu
bcd28de86e
feat(types): use the SvelteComponentTyped interface in the TypeScript definitions (#515) 2021-02-07 11:25:20 -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
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
71c15db2ca
expand headers type in DataTableSkeleton, fix DataTableRow type to require "id" (#415)
* feat(data-table-skeleton): support object type for headers

* fix(data-table): require "id" in DataTableRow interface
2020-11-26 10:28:07 -08:00
Eric Liu
0d8064043f
fix(types): export component types (#411) 2020-11-25 10:19:11 -08:00