Commit graph

52 commits

Author SHA1 Message Date
Eric Liu
24b9cbc9c3
feat(ui-shell): HeaderAction supports tooltip (#2111)
Closes #2110
2025-03-09 13:47:34 -07:00
Eric Liu
6bf72d4602
fix(types): loosen icon prop type to any (#2095)
Fixes https://github.com/carbon-design-system/carbon-icons-svelte/issues/207

`carbon-icons-svelte@13` and `carbon-pictograms-svelte@13` now  
only support TypeScript for Svelte 4/5.

The new `Component` type is incompatible with the `icon` prop in  
`carbon-components-svelte`, causing a type error with Svelte 5, as  
`typeof SvelteComponent` doesn't match the new `Component` type.

Since `Component` isn't available in Svelte 3/4, this PR changes  
the `icon` prop type to `any` for compatibility across Svelte 3, 4, and 5.
2025-02-02 19:49:53 -08:00
metonym
6fbd8ae6a9 fix(types): use type alias instead of interface for $$restProps 2024-11-09 14:41:28 -08:00
metonym
3167e449fd fix(types): fix types for on:paste event 2024-10-25 15:40:59 -07:00
spburtsev
d8bc65163e
feat(ui-shell): support button tooltip in HeaderGlobalAction (#1894)
Closes #1893
2024-03-07 20:37:58 -08:00
brunnerh
24e2a8874f
fix(radio-button-group): add name and required props (#1037)
Fixes #1036
2023-10-01 10:14:53 -07:00
Michael Greminger
e5675eb203
feat(ui-shell): forward click event to HeaderActionLink (#1797)
Closes #1796
2023-08-26 10:17:05 -07:00
Eric Liu
be763706ca
fix(types): improve formatting of prop comments (#1779) 2023-07-23 12:25:44 -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
7885e124b4 chore(types): fix formatting of prop comments in Header, SideNav 2023-07-13 10:52:52 -07:00
Eric Liu
2715ed9c38 chore(ui-shell): update company prop description in Header (#1770) 2023-07-13 10:50:51 -07:00
Nestor Orest Plysyuk
ea9b261b60
feat(ui-shell): add preventCloseOnClickOutside to HeaderAction (#1625)
Closes #1624
2023-07-13 07:37:21 -07:00
Janos Lengyel
9b3f014a0b
feat(ui-shell): make company in Header slottable (#1764) 2023-07-13 07:33:48 -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
Pierre
b9aaa3adca
feat(ui-shell): make HeaderNavItem slottable (#1693) 2023-05-02 16:23:04 -07:00
metonym
724d90bd7b
chore(types)!: remove sveltekit: attributes from types (#1581)
* chore(deps-dev): upgrade sveld 0.17.2 -> 0.18.0

* Run "yarn build:docs"
2022-12-11 15:58:19 -05: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
e230db8115
feat: forward paste event to input/textarea elements (#1332)
* chore(deps-dev): upgrade sveld, svelte-check

* feat: forward paste event to input/textarea elements

* Run "yarn build:docs"

* test: assert paste event
2022-06-02 18:39:49 -07:00
metonym
5576c7ce84
fix(header-action): type missing "open" event (#1293)
* fix(header-action): type missing "open" event

* Run "yarn build:docs"

* test(header-utilities): assert "open" and "close" events
2022-05-12 20:23:16 -07:00
metonym
2d26ce115d
chore(deps-dev): upgrade sveld to v0.15.0 (#1247)
* chore(deps-dev): upgrade sveld to v0.15.0

* Run "yarn build:docs"
2022-04-15 08:28:00 -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
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
62735d6275
breaking(ui-shell): remove GlobalHeader, SideNav folders (#1223)
* breaking(ui-shell): remove GlobalHeader/SideNav folders

* Run "yarn build:docs"
2022-04-02 11:46:55 -07:00
metonym
21714d0e3a
breaking: remove deprecated props and components (#1191) 2022-03-27 08:21:58 -07:00
metonym
1462b2ee9c
feat(ui-shell): make SideNavLink text slottable (#1187) 2022-03-19 11:58:47 -07:00
metonym
e23b121143
feat: make icons slottable (#1186) 2022-03-19 11:37:20 -07:00
metonym
47866b1d51
breaking(header-action): use SlideParams to type transition prop (#1163) 2022-03-12 14:35:59 -08:00
metonym
714f47a635
fix(types): dispatched events without a detail value should be null (#1124)
Currently, dispatched events without `e.detail` have a type of `any`.

We can be more specific as a `CustomEvent` detail value is `null`.
2022-02-21 09:42:42 -08:00
metonym
df4ed9d75a
fix(types): use @component comments for deprecation notices (#1111)
The Svelte Language Server allows component-level comments through `<!-- @component ... -->` syntax.

Deprecation notices for components should be moved from the script block to the markup template.
2022-02-19 18:50:25 -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
Eric Liu
7b65a15345
Omit explicit "from carbon-icons-svelte" from icon prop definitions (#866)
* fix(types): update description for icon props #865

* docs(component-api): remove hardcoded Carbon Svelte icon description
2021-10-20 13:48:52 -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
Eric Liu
b21600c9d6
feat(types): loosen icon prop type to allow any Svelte component #806 (#853)
* feat(types): loosen type for Carbon icons #806

* Add closeIcon option and remove stopPropagation on:click in HeaderAction (#840)

* Remove stopPropagation on:click

Remove stopPropagation on:click helps when you have more then one acction to switch between actions tabs

* fix bug for default icon

* add closeIcon attribute to HeaderAction

* feat(types): loosen type for Carbon icons #806

* chore: update TreeView, HeaderAction icon types

Co-authored-by: Daniel Miedzik <daniel.miedzik@gmail.com>
2021-10-15 16:40:23 -07:00
Daniel Miedzik
1581bc0122
Add closeIcon option and remove stopPropagation on:click in HeaderAction (#840)
* Remove stopPropagation on:click

Remove stopPropagation on:click helps when you have more then one acction to switch between actions tabs

* fix bug for default icon

* add closeIcon attribute to HeaderAction
2021-10-15 16:23:34 -07:00
Eric Liu
a62e9c0c3c
feat(ui-shell): export expansionBreakpoint as a prop in Header, SideNav #715 (#723)
Closes #715
2021-07-05 08:44:21 -07:00
Eric Liu
8ddf2def8b
Align v10.36 (#696)
* chore(deps-dev): upgrade carbon-components to v10.36.0

* feat(structured-list): add condensed, flush props

* fix(structured-list): deprecate the border prop

* fix(code-snippet): set min/max height for multi-line code snippet #656

Fixes #656

* fix(image-loader): make SSR compatible using a window type check guard

* docs(tag): add separate disabled example for filterable/interactive tags

* docs: update number of supported chart types

* feat(side-nav): support rail variant

* feat(ui-shell): add isSelected prop to HeaderNavItem

* fix(ui-shell): default isSelected to false in SideNavMenuItem

* fix(text-area): forward missing keydown event #665

Fixes #665

* feat: forward keyup event to components with inputs

* feat(checkbox): make labelText slottable #563

Closes #563

* feat: make labelText slottable

Related #563

* docs(component-api): account for undefined type

* docs(ui-shell): link to correct rail source

* fix(ui-shell): default isSelected in HeaderNavItem to false
2021-06-26 14:39:49 -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
Eric Liu
63e7965745
Fixes (#575)
* fix(context-menu): only prevent default keydown behavior if menu is open

* docs(notification): update copy

* docs(select): update item groups example to use hidden default option

* docs: increase max-height to render UIShell, UnorderedList items

* fix(ui-shell): remove iconDescription prop from HeaderNavMenu #566

Fixes #566
2021-03-20 16:28:29 -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
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
bcd28de86e
feat(types): use the SvelteComponentTyped interface in the TypeScript definitions (#515) 2021-02-07 11:25:20 -08:00
Eric Liu
63ef51209d
feat: make renderIcon/icon prop consistent (#496) 2021-01-27 14:16:07 -08:00
Eric Liu
8b7dfbe540 v0.25.0 2020-11-27 06:16:59 -08:00
Daniel Miedzik
c670964e93
fix types for FileUploader component (#422)
* fix types for FileUploader component

* correction of a mistaken change

Co-authored-by: Daniel Miedzik <dmiedzik@bethel.jw.org>
2020-11-27 04:15:01 -08:00
Eric Liu
f4c940d5ee
Make UI Shell HeaderAction panel transition configurable (#419)
* fix(ui-shell): remove fly transition from hamburger menu

* feat(header-action): make panel transition configurable

* chore: rebuild types, docs

* docs(ui-shell): document transition prop in Header app switcher example
2020-11-26 17:14:07 -08:00
Eric Liu
30cfc842d5
Refactor UI Shell global search component (#417)
* feat(ui-shell): refactor UI Shell search component

* fix(ui-shell): dispatched event is "select", not "search"

* test(header-search): validate HeaderSearch types

* fix(header-search): selecting a result should reset the search

* feat(header-search): deefault selectedResultIndex should be 0

Reset selectedResultIndex, value after dispatching.

* docs(header-search): demo basic filtering

* chore: rebuild types, docs

* feat(header-search): pass index as a slot prop
2020-11-26 15:42:15 -08:00
Eric Liu
7a1480f0ed fix(types): prefix icon type with "typeof" 2020-11-19 10:41:15 -08:00
Eric Liu
1e80e42573 fix(types): remove "undefined" dispatched events 2020-11-19 09:09:57 -08:00
Eric Liu
998757691b chore: regenerate component docs [ci skip] 2020-11-19 06:21:24 -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