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.
This commit is contained in:
Eric Liu 2025-02-02 19:49:53 -08:00 committed by GitHub
commit 6bf72d4602
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 273 additions and 251 deletions

View file

@ -379,7 +379,7 @@ export type BreakpointValue = 320 | 672 | 1056 | 1312 | 1584;
| size | No | <code>let</code> | No | <code>"default" &#124; "field" &#124; "small" &#124; "lg" &#124; "xl"</code> | <code>"default"</code> | Specify the size of button |
| expressive | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use Carbon's expressive typesetting |
| isSelected | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the selected state for an icon-only, ghost button |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render<br />Alternatively, use the named slot "icon" (e.g., `&lt;Icon slot="icon" size="{20}" /&gt;`) |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render<br />Alternatively, use the named slot "icon" (e.g., `&lt;Icon slot="icon" size="{20}" /&gt;`) |
| iconDescription | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the ARIA label for the button icon |
| tooltipAlignment | No | <code>let</code> | No | <code>"start" &#124; "center" &#124; "end"</code> | <code>"center"</code> | Set the alignment of the tooltip relative to the icon.<br />Only applies to icon-only buttons |
| tooltipPosition | No | <code>let</code> | No | <code>"top" &#124; "right" &#124; "bottom" &#124; "left"</code> | <code>"bottom"</code> | Set the position of the tooltip relative to the icon |
@ -848,11 +848,11 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :----------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| :----------- | :------- | :--------------- | :------- | -------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLLIElement</code> | <code>null</code> | Obtain a reference to the list item HTML element |
| selectable | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to enable the selectable variant<br />Automatically set to `true` if `selected` is `true` |
| selected | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to use the selected variant |
| icon | No | <code>let</code> | Yes | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render<br />Icon is rendered to the left of the label text |
| icon | No | <code>let</code> | Yes | <code>any</code> | <code>undefined</code> | Specify the icon to render<br />Icon is rendered to the left of the label text |
| indented | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to indent the label |
| kind | No | <code>let</code> | No | <code>"default" &#124; "danger"</code> | <code>"default"</code> | Specify the kind of option |
| disabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the disabled state |
@ -1583,7 +1583,7 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :---------------------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| :---------------------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLAnchorElement</code> | <code>null</code> | Obtain a reference to the HTML anchor element |
| isSideNavOpen | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the side nav |
| expandedByDefault | No | <code>let</code> | No | <code>boolean</code> | <code>true</code> | Set to `false` to hide the side nav by default |
@ -1593,8 +1593,8 @@ None.
| platformName | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the platform name.<br />Alternatively, use the named slot "platform" (e.g., `&lt;span slot="platform"&gt;...&lt;/span&gt;`) |
| persistentHamburgerMenu | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to persist the hamburger menu |
| expansionBreakpoint | No | <code>let</code> | No | <code>number</code> | <code>1056</code> | The window width (px) at which the SideNav is expanded and the hamburger menu is hidden.<br />1056 represents the "large" breakpoint in pixels from the Carbon Design System:<br />- small: 320<br />- medium: 672<br />- large: 1056<br />- x-large: 1312<br />- max: 1584 |
| iconMenu | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render for the closed state.<br />Defaults to `&lt;Menu size={20} /&gt;` |
| iconClose | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render for the opened state.<br />Defaults to `&lt;Close size={20} /&gt;` |
| iconMenu | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render for the closed state.<br />Defaults to `&lt;Menu size={20} /&gt;` |
| iconClose | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render for the opened state.<br />Defaults to `&lt;Close size={20} /&gt;` |
### Slots
@ -1619,8 +1619,8 @@ None.
| :------------------------- | :------- | :--------------- | :------- | ----------------------------------------------------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
| isOpen | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the panel |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render when the action panel is closed.<br />Defaults to `&lt;Switcher size={20} /&gt;` |
| closeIcon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render when the action panel is open.<br />Defaults to `&lt;Close size={20} /&gt;` |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render when the action panel is closed.<br />Defaults to `&lt;Switcher size={20} /&gt;` |
| closeIcon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render when the action panel is open.<br />Defaults to `&lt;Close size={20} /&gt;` |
| text | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the text.<br />Alternatively, use the named slot "text" (e.g., `&lt;div slot="text"&gt;...&lt;/div&gt;`) |
| transition | No | <code>let</code> | No | <code>false &#124; import("svelte/transition").SlideParams</code> | <code>{ duration: 200 }</code> | Customize the panel transition (i.e., `transition:slide`).<br />Set to `false` to disable the transition |
| preventCloseOnClickOutside | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to prevent the panel from closing when clicking outside |
@ -1647,11 +1647,11 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :----------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ---------------------- | --------------------------------------------- |
| :----------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLAnchorElement</code> | <code>null</code> | Obtain a reference to the HTML anchor element |
| linkIsActive | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the active state |
| href | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the `href` attribute |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render |
### Slots
@ -1670,10 +1670,10 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :-------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ---------------------- | --------------------------------------------- |
| :-------- | :------- | :--------------- | :------- | ------------------------------ | ---------------------- | --------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the HTML button element |
| isActive | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the active variant |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render |
### Slots
@ -1967,12 +1967,12 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :-------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ---------------------- | -------------------------------------------------------- |
| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | -------------------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLAnchorElement</code> | <code>null</code> | Obtain a reference to the top-level HTML element |
| size | No | <code>let</code> | No | <code>"sm" &#124; "lg"</code> | <code>undefined</code> | Specify the size of the link |
| href | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the href value |
| inline | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the inline variant |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render<br />`inline` must be `false` |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render<br />`inline` must be `false` |
| disabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the checkbox |
| visited | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to allow visited styles |
@ -2225,7 +2225,7 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :------------------------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| :------------------------- | :------- | :--------------- | :------- | --------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLDivElement</code> | <code>null</code> | Obtain a reference to the top-level HTML element |
| open | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the modal |
| size | No | <code>let</code> | No | <code>"xs" &#124; "sm" &#124; "lg"</code> | <code>undefined</code> | Set the size of the modal |
@ -2240,7 +2240,7 @@ None.
| hasScrollingContent | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` if the modal contains scrolling content |
| primaryButtonText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the primary button text |
| primaryButtonDisabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the primary button |
| primaryButtonIcon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the primary button icon |
| primaryButtonIcon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the primary button icon |
| shouldSubmitOnEnter | No | <code>let</code> | No | <code>boolean</code> | <code>true</code> | Set to `true` for the "submit" and "click:button--primary" events<br />to be dispatched when pressing "Enter" |
| secondaryButtonText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the secondary button text |
| secondaryButtons | No | <code>let</code> | No | <code>[{ text: string; }, { text: string; }]</code> | <code>[]</code> | 2-tuple prop to render two secondary buttons for a 3 button modal<br />supersedes `secondaryButtonText` |
@ -2296,9 +2296,9 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :-------------------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------- |
| :-------------------- | :------- | :--------------- | :------- | --------------------------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------- |
| primaryButtonText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the primary button text |
| primaryButtonIcon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the primary button icon |
| primaryButtonIcon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the primary button icon |
| primaryButtonDisabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the primary button |
| primaryClass | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify a class for the primary button |
| secondaryButtonText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the secondary button text |
@ -2445,9 +2445,9 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :--------------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ------------------------- | ----------------------------------- |
| :--------------- | :------- | :--------------- | :------- | ------------------------------------ | ------------------------- | ----------------------------------- |
| notificationType | No | <code>let</code> | No | <code>"toast" &#124; "inline"</code> | <code>"toast"</code> | Set the type of notification |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render |
| title | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the title of the icon |
| iconDescription | No | <code>let</code> | No | <code>string</code> | <code>"Close icon"</code> | Specify the ARIA label for the icon |
@ -2612,10 +2612,10 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :--------------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
| :--------------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ----------------------------------------------------------------------------- |
| menuRef | No | <code>let</code> | Yes | <code>null &#124; HTMLUListElement</code> | <code>null</code> | Obtain a reference to the overflow menu element |
| buttonRef | No | <code>let</code> | Yes | <code>null &#124; HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the trigger button element |
| icon | No | <code>let</code> | Yes | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render.<br />Defaults to `&lt;OverflowMenuVertical /&gt;` |
| icon | No | <code>let</code> | Yes | <code>any</code> | <code>undefined</code> | Specify the icon to render.<br />Defaults to `&lt;OverflowMenuVertical /&gt;` |
| open | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the menu |
| size | No | <code>let</code> | No | <code>"sm" &#124; "xl"</code> | <code>undefined</code> | Specify the size of the overflow menu |
| direction | No | <code>let</code> | No | <code>"top" &#124; "bottom"</code> | <code>"bottom"</code> | Specify the direction of the overflow menu relative to the button |
@ -3106,7 +3106,7 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :------------------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------- |
| :------------------- | :------- | :--------------- | :------- | ----------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
| expanded | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true to expand the search input |
| value | No | <code>let</code> | Yes | <code>any</code> | <code>""</code> | Specify the value of the search input |
@ -3121,7 +3121,7 @@ None.
| autofocus | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to auto focus the search element |
| closeButtonLabelText | No | <code>let</code> | No | <code>string</code> | <code>"Clear search input"</code> | Specify the close button label text |
| labelText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the label text |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render.<br />Defaults to `&lt;Search /&gt;` |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render.<br />Defaults to `&lt;Search /&gt;` |
| id | No | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the input element |
### Slots
@ -3368,12 +3368,12 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :--------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ---------------------- | --------------------------------------------- |
| :--------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLAnchorElement</code> | <code>null</code> | Obtain a reference to the HTML anchor element |
| isSelected | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to select the current link |
| href | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the `href` attribute |
| text | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the text |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render |
### Slots
@ -3393,11 +3393,11 @@ None.
### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :-------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ---------------------- | --------------------------------------------- |
| :-------- | :------- | :--------------- | :------- | ------------------------------------------ | ---------------------- | --------------------------------------------- |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the HTML button element |
| expanded | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to toggle the expanded state |
| text | No | <code>let</code> | No | <code>string</code> | <code>undefined</code> | Specify the text |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render |
### Slots
@ -4011,7 +4011,7 @@ None.
| interactive | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to render a `button` element instead of a `div` |
| skeleton | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to display the skeleton state |
| title | No | <code>let</code> | No | <code>string</code> | <code>"Clear filter"</code> | Set the title for the close button in a filterable tag |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render |
| id | No | <code>let</code> | No | <code>string</code> | <code>"ccs-" + Math.random().toString(36)</code> | Set an id for the filterable tag |
### Slots
@ -4575,7 +4575,7 @@ None.
| align | No | <code>let</code> | No | <code>"start" &#124; "center" &#124; "end"</code> | <code>"center"</code> | Set the alignment of the tooltip relative to the icon |
| direction | No | <code>let</code> | No | <code>"top" &#124; "right" &#124; "bottom" &#124; "left"</code> | <code>"bottom"</code> | Set the direction of the tooltip relative to the button |
| hideIcon | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to hide the tooltip icon |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render for the tooltip button.<br />Default to `&lt;Information /&gt;` |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render for the tooltip button.<br />Default to `&lt;Information /&gt;` |
| iconDescription | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the ARIA label for the tooltip button |
| iconName | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the icon name attribute |
| tabindex | No | <code>let</code> | No | <code>string</code> | <code>"0"</code> | Set the button tabindex |
@ -4658,7 +4658,7 @@ None.
| :---------- | :------- | :--------------- | :------- | --------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------ |
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
| tooltipText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the tooltip text.<br />Alternatively, use the "tooltipText" slot |
| icon | No | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent<any></code> | <code>undefined</code> | Specify the icon to render |
| icon | No | <code>let</code> | No | <code>any</code> | <code>undefined</code> | Specify the icon to render |
| disabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the tooltip icon |
| align | No | <code>let</code> | No | <code>"start" &#124; "center" &#124; "end"</code> | <code>"center"</code> | Set the alignment of the tooltip relative to the icon |
| direction | No | <code>let</code> | No | <code>"top" &#124; "right" &#124; "bottom" &#124; "left"</code> | <code>"bottom"</code> | Set the direction of the tooltip relative to the icon |
@ -4691,7 +4691,7 @@ export type TreeNodeId = string | number;
export interface TreeNode {
id: TreeNodeId;
text: any;
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
disabled?: boolean;
nodes?: TreeNode[];
}

View file

@ -624,7 +624,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render\nAlternatively, use the named slot \"icon\" (e.g., `<Icon slot=\"icon\" size=\"{20}\" />`)",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -2570,7 +2570,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render\nIcon is rendered to the left of the label text",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -5771,7 +5771,7 @@
"name": "iconMenu",
"kind": "let",
"description": "Specify the icon to render for the closed state.\nDefaults to `<Menu size={20} />`",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -5782,7 +5782,7 @@
"name": "iconClose",
"kind": "let",
"description": "Specify the icon to render for the opened state.\nDefaults to `<Close size={20} />`",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -5849,7 +5849,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render when the action panel is closed.\nDefaults to `<Switcher size={20} />`",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -5860,7 +5860,7 @@
"name": "closeIcon",
"kind": "let",
"description": "Specify the icon to render when the action panel is open.\nDefaults to `<Close size={20} />`",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -5996,7 +5996,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -6059,7 +6059,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -7007,7 +7007,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render\n`inline` must be `false`",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -7987,7 +7987,7 @@
"name": "primaryButtonIcon",
"kind": "let",
"description": "Specify the primary button icon",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -8228,7 +8228,7 @@
"name": "primaryButtonIcon",
"kind": "let",
"description": "Specify the primary button icon",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -9000,7 +9000,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -9712,7 +9712,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render.\nDefaults to `<OverflowMenuVertical />`",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -12032,7 +12032,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render.\nDefaults to `<Search />`",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -12974,7 +12974,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -13054,7 +13054,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -15061,7 +15061,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -17297,7 +17297,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render for the tooltip button.\nDefault to `<Information />`",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -17646,7 +17646,7 @@
"name": "icon",
"kind": "let",
"description": "Specify the icon to render",
"type": "typeof import(\"svelte\").SvelteComponent<any>",
"type": "any",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@ -17956,9 +17956,9 @@
"ts": "type TreeNodeId = string | number;\n"
},
{
"type": "{ id: TreeNodeId; text: any; icon?: typeof import(\"svelte\").SvelteComponent<any>; disabled?: boolean; nodes?: TreeNode[]; }",
"type": "{ id: TreeNodeId; text: any; icon?: any; disabled?: boolean; nodes?: TreeNode[]; }",
"name": "TreeNode",
"ts": "interface TreeNode {\n id: TreeNodeId;\n text: any;\n icon?: typeof import(\"svelte\").SvelteComponent<any>;\n disabled?: boolean;\n nodes?: TreeNode[];\n}\n"
"ts": "interface TreeNode {\n id: TreeNodeId;\n text: any;\n icon?: any;\n disabled?: boolean;\n nodes?: TreeNode[];\n}\n"
}
],
"generics": null,

119
package-lock.json generated
View file

@ -20,7 +20,7 @@
"@testing-library/user-event": "^14.5.2",
"autoprefixer": "^10.4.8",
"carbon-components": "10.58.12",
"carbon-icons-svelte": "^12.1.0",
"carbon-icons-svelte": "^13.1.0",
"carbon-preprocess-svelte": "^0.11.7",
"culls": "^0.1.1",
"jsdom": "^25.0.1",
@ -917,6 +917,19 @@
"vite": "^5.0.0"
}
},
"node_modules/@sveltejs/vite-plugin-svelte/node_modules/svelte-hmr": {
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.16.0.tgz",
"integrity": "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==",
"dev": true,
"license": "ISC",
"engines": {
"node": "^12.20 || ^14.13.1 || >= 16"
},
"peerDependencies": {
"svelte": "^3.19.0 || ^4.0.0"
}
},
"node_modules/@testing-library/dom": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz",
@ -1669,10 +1682,11 @@
"dev": true
},
"node_modules/carbon-icons-svelte": {
"version": "12.10.0",
"resolved": "https://registry.npmjs.org/carbon-icons-svelte/-/carbon-icons-svelte-12.10.0.tgz",
"integrity": "sha512-GOPRBVm3klnaLksVFRvECKOvAXpdjF5FBKo/knQ/WG3LTehg6zvVButW+MdYZtxrtpg8Iqt95BRDmGBimiweWA==",
"dev": true
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/carbon-icons-svelte/-/carbon-icons-svelte-13.1.0.tgz",
"integrity": "sha512-DuCGdZXZU1yCjVqbaZbeVaQIEJhLP1scm+/TSzIqhCxVA4SHjCb248gKQKcZ2Ktmh99g8paOZhP4PbavnT8ohw==",
"dev": true,
"license": "Apache-2.0"
},
"node_modules/carbon-preprocess-svelte": {
"version": "0.11.7",
@ -1768,6 +1782,7 @@
"resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
"integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15",
"@types/estree": "^1.0.1",
@ -1777,16 +1792,18 @@
}
},
"node_modules/code-red/node_modules/@types/estree": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
"dev": true
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"dev": true,
"license": "MIT"
},
"node_modules/code-red/node_modules/estree-walker": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.0"
}
@ -2131,6 +2148,7 @@
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
"integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
"dev": true,
"license": "MIT",
"dependencies": {
"mdn-data": "2.0.30",
"source-map-js": "^1.0.1"
@ -3052,6 +3070,23 @@
"dev": true,
"license": "MIT"
},
"node_modules/is-reference": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz",
"integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.6"
}
},
"node_modules/is-reference/node_modules/@types/estree": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"dev": true,
"license": "MIT"
},
"node_modules/is-text-path": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz",
@ -3315,7 +3350,8 @@
"version": "2.0.30",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
"integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
"dev": true
"dev": true,
"license": "CC0-1.0"
},
"node_modules/meow": {
"version": "8.1.2",
@ -3786,6 +3822,7 @@
"resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
"integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.0",
"estree-walker": "^3.0.0",
@ -3793,29 +3830,22 @@
}
},
"node_modules/periscopic/node_modules/@types/estree": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
"dev": true
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"dev": true,
"license": "MIT"
},
"node_modules/periscopic/node_modules/estree-walker": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.0"
}
},
"node_modules/periscopic/node_modules/is-reference": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
"integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
"dev": true,
"dependencies": {
"@types/estree": "*"
}
},
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@ -4629,6 +4659,7 @@
"resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz",
"integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@ampproject/remapping": "^2.2.1",
"@jridgewell/sourcemap-codec": "^1.4.15",
@ -4728,43 +4759,33 @@
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/svelte-hmr": {
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.16.0.tgz",
"integrity": "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==",
"dev": true,
"license": "ISC",
"engines": {
"node": "^12.20 || ^14.13.1 || >= 16"
},
"peerDependencies": {
"svelte": "^3.19.0 || ^4.0.0"
}
},
"node_modules/svelte/node_modules/@types/estree": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
"dev": true
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
"integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
"dev": true,
"license": "MIT"
},
"node_modules/svelte/node_modules/aria-query": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",
"integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/svelte/node_modules/estree-walker": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.0"
}
},
"node_modules/svelte/node_modules/is-reference": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
"integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
"dev": true,
"dependencies": {
"@types/estree": "*"
}
},
"node_modules/symbol-tree": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",

View file

@ -51,7 +51,7 @@
"@testing-library/user-event": "^14.5.2",
"autoprefixer": "^10.4.8",
"carbon-components": "10.58.12",
"carbon-icons-svelte": "^12.1.0",
"carbon-icons-svelte": "^13.1.0",
"carbon-preprocess-svelte": "^0.11.7",
"culls": "^0.1.1",
"jsdom": "^25.0.1",

View file

@ -29,7 +29,7 @@
* Specify the icon to render
* Alternatively, use the named slot "icon" (e.g., `<Icon slot="icon" size="{20}" />`)
*
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -8,7 +8,7 @@
/**
* Specify the primary button icon
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let primaryButtonIcon = undefined;

View file

@ -14,7 +14,7 @@
/**
* Specify the icon to render
* Icon is rendered to the left of the label text
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -17,7 +17,7 @@
/**
* Specify the icon to render
* `inline` must be `false`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -57,7 +57,7 @@
/**
* Specify the primary button icon
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let primaryButtonIcon = undefined;

View file

@ -7,7 +7,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = Close;

View file

@ -33,7 +33,7 @@
/**
* Specify the icon to render.
* Defaults to `<OverflowMenuVertical />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = OverflowMenuVertical;

View file

@ -56,7 +56,7 @@
/**
* Specify the icon to render.
* Defaults to `<Search />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = IconSearch;

View file

@ -27,7 +27,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -31,7 +31,7 @@
/**
* Specify the icon to render for the tooltip button.
* Default to `<Information />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = Information;

View file

@ -7,7 +7,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -29,7 +29,7 @@
<script>
/**
* @typedef {string | number} TreeNodeId
* @typedef {{ id: TreeNodeId; text: any; icon?: typeof import("svelte").SvelteComponent<any>; disabled?: boolean; nodes?: TreeNode[]; }} TreeNode
* @typedef {{ id: TreeNodeId; text: any; icon?: any; disabled?: boolean; nodes?: TreeNode[]; }} TreeNode
* @slot {{ node: { id: TreeNodeId; text: string; expanded: boolean, leaf: boolean; disabled: boolean; selected: boolean; } }}
* @event {TreeNode & { expanded: boolean; leaf: boolean; }} select
* @event {TreeNode & { expanded: boolean; leaf: boolean; }} toggle

View file

@ -46,7 +46,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -16,7 +16,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -11,14 +11,14 @@
/**
* Specify the icon to render for the closed state.
* Defaults to `<Menu size={20} />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let iconMenu = Menu;
/**
* Specify the icon to render for the opened state.
* Defaults to `<Close size={20} />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let iconClose = Close;

View file

@ -51,14 +51,14 @@
/**
* Specify the icon to render for the closed state.
* Defaults to `<Menu size={20} />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let iconMenu = Menu;
/**
* Specify the icon to render for the opened state.
* Defaults to `<Close size={20} />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let iconClose = Close;

View file

@ -10,14 +10,14 @@
/**
* Specify the icon to render when the action panel is closed.
* Defaults to `<Switcher size={20} />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = Switcher;
/**
* Specify the icon to render when the action panel is open.
* Defaults to `<Close size={20} />`
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let closeIcon = Close;

View file

@ -10,7 +10,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -8,7 +8,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -16,7 +16,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -10,7 +10,7 @@
/**
* Specify the icon to render
* @type {typeof import("svelte").SvelteComponent<any>}
* @type {any}
*/
export let icon = undefined;

View file

@ -13,6 +13,7 @@
"noUnusedParameters": true,
"strict": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"paths": {
"carbon-components-svelte": ["./types"],
"carbon-components-svelte/*": ["./types/*"]

View file

@ -44,7 +44,7 @@ type $Props = {
* Alternatively, use the named slot "icon" (e.g., `<Icon slot="icon" size="{20}" />`)
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Specify the ARIA label for the button icon

View file

@ -14,7 +14,7 @@ type $Props = {
* Specify the primary button icon
* @default undefined
*/
primaryButtonIcon?: typeof import("svelte").SvelteComponent<any>;
primaryButtonIcon?: any;
/**
* Set to `true` to disable the primary button

View file

@ -27,7 +27,7 @@ type $Props = {
* Icon is rendered to the left of the label text
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Specify the label text.

View file

@ -27,7 +27,7 @@ type $Props = {
* `inline` must be `false`
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Set to `true` to disable the checkbox

View file

@ -86,7 +86,7 @@ type $Props = {
* Specify the primary button icon
* @default undefined
*/
primaryButtonIcon?: typeof import("svelte").SvelteComponent<any>;
primaryButtonIcon?: any;
/**
* Set to `true` for the "submit" and "click:button--primary" events

View file

@ -14,7 +14,7 @@ type $Props = {
* Specify the icon to render
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Specify the title of the icon

View file

@ -45,7 +45,7 @@ type $Props = {
* Defaults to `<OverflowMenuVertical />`
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Specify the icon class

View file

@ -87,7 +87,7 @@ type $Props = {
* Defaults to `<Search />`
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Set an id for the input element

View file

@ -61,7 +61,7 @@ type $Props = {
* Specify the icon to render
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Set an id for the filterable tag

View file

@ -33,7 +33,7 @@ type $Props = {
* Default to `<Information />`
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Specify the ARIA label for the tooltip button

View file

@ -15,7 +15,7 @@ type $Props = {
* Specify the icon to render
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Set to `true` to disable the tooltip icon

View file

@ -6,7 +6,7 @@ export type TreeNodeId = string | number;
export interface TreeNode {
id: TreeNodeId;
text: any;
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
disabled?: boolean;
nodes?: TreeNode[];
}

View file

@ -72,14 +72,14 @@ type $Props = {
* Defaults to `<Menu size={20} />`
* @default undefined
*/
iconMenu?: typeof import("svelte").SvelteComponent<any>;
iconMenu?: any;
/**
* Specify the icon to render for the opened state.
* Defaults to `<Close size={20} />`
* @default undefined
*/
iconClose?: typeof import("svelte").SvelteComponent<any>;
iconClose?: any;
[key: `data-${string}`]: any;
};

View file

@ -15,14 +15,14 @@ type $Props = {
* Defaults to `<Switcher size={20} />`
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Specify the icon to render when the action panel is open.
* Defaults to `<Close size={20} />`
* @default undefined
*/
closeIcon?: typeof import("svelte").SvelteComponent<any>;
closeIcon?: any;
/**
* Specify the text.

View file

@ -20,7 +20,7 @@ type $Props = {
* Specify the icon to render
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Obtain a reference to the HTML anchor element

View file

@ -12,7 +12,7 @@ export type HeaderGlobalActionProps = ButtonProps & {
* Specify the icon to render
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Obtain a reference to the HTML button element

View file

@ -26,7 +26,7 @@ type $Props = {
* Specify the icon to render
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Obtain a reference to the HTML anchor element

View file

@ -20,7 +20,7 @@ type $Props = {
* Specify the icon to render
* @default undefined
*/
icon?: typeof import("svelte").SvelteComponent<any>;
icon?: any;
/**
* Obtain a reference to the HTML button element