diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index fee5e9a8ce..a465f59bba 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -862,12 +862,12 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :----------- | :------ | :---- | :---------------------------------------------------- | -| -- | Yes | -- | -- | -| icon | No | -- | <svelte:component this="{icon}" /> | -| labelText | No | -- | {labelText} | -| shortcutText | No | -- | {shortcutText} | +| Slot name | Default | Props | Fallback | +| :----------- | :------ | :---- | :-------------------------------------------------- | +| -- | Yes | -- | -- | +| icon | No | -- | <svelte:component this={icon} /> | +| labelText | No | -- | {labelText} | +| shortcutText | No | -- | {shortcutText} | ### Events @@ -1627,12 +1627,12 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :--------------------------------------------------------------------------------------------------- | -| -- | Yes | -- | -- | -| closeIcon | No | -- | <svelte:component this="{closeIcon}" size="{20}" /> | -| icon | No | -- | <svelte:component this="{icon}" size="{20}" /> | -| text | No | -- | {#if text}<span class:bx--header\_\_action-text="{true}">{text}</span>{/if} | +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :------------------------------------------------------------------------------------------------- | +| -- | Yes | -- | -- | +| closeIcon | No | -- | <svelte:component this={closeIcon} size={20} /> | +| icon | No | -- | <svelte:component this={icon} size={20} /> | +| text | No | -- | {#if text}<span class:bx--header\_\_action-text={true}>{text}</span>{/if} | ### Events @@ -1655,9 +1655,9 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :---------------------------------------------------------------- | -| icon | No | -- | <svelte:component this="{icon}" size="{20}" /> | +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :------------------------------------------------------------ | +| icon | No | -- | <svelte:component this={icon} size={20} /> | ### Events @@ -1838,9 +1838,9 @@ export interface HeaderSearchResult { ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| -- | Yes | { result: HeaderSearchResult; index: number } | {result.text}
{#if result.description}<span
class:bx--header-search-menu-description="{true}"
>– {result.description}</span
>{/if}
| +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -- | Yes | { result: HeaderSearchResult; index: number } | {result.text}
{#if result.description}<span
class:bx--header-search-menu-description={true}
>– {result.description}</span
>{/if}
| ### Events @@ -1978,10 +1978,10 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :---------------------------------------------------- | -| -- | Yes | -- | -- | -| icon | No | -- | <svelte:component this="{icon}" /> | +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :-------------------------------------------------- | +| -- | Yes | -- | -- | +| icon | No | -- | <svelte:component this={icon} /> | ### Events @@ -2628,10 +2628,10 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| -- | Yes | -- | -- | -| menu | No | -- | <svelte:component
this="{icon}"
aria-label="{iconDescription}"
title="{iconDescription}"
class="bx--overflow-menu\_\_icon {iconClass}"
/>
| +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -- | Yes | -- | -- | +| menu | No | -- | <svelte:component
this={icon}
aria-label={iconDescription}
title={iconDescription}
class="bx--overflow-menu\_\_icon {iconClass}"
/>
| ### Events @@ -2662,9 +2662,9 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :------------------------------------------------------------------------------------------------------------------ | -| -- | Yes | -- | <div class:bx--overflow-menu-options\_\_option-content="{true}">
{text}
</div>
| +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :---------------------------------------------------------------------------------------------------------------- | +| -- | Yes | -- | <div class:bx--overflow-menu-options\_\_option-content={true}>
{text}
</div>
| ### Events @@ -2922,9 +2922,9 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :------------------------------------------------------- | :------------------------------------------------------------------------ | -| -- | Yes | { props: { class: 'bx--progress-label' } } | <p class:bx--progress-label="{true}">{label}</p> | +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :------------------------------------------------------- | :---------------------------------------------------------------------- | +| -- | Yes | { props: { class: "bx--progress-label" } } | <p class:bx--progress-label={true}>{label}</p> | ### Events @@ -3377,10 +3377,10 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :---------------------------------------------------- | -| -- | Yes | -- | {text} | -| icon | No | -- | <svelte:component this="{icon}" /> | +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :-------------------------------------------------- | +| -- | Yes | -- | {text} | +| icon | No | -- | <svelte:component this={icon} /> | ### Events @@ -3401,10 +3401,10 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :---------------------------------------------------- | -| -- | Yes | -- | -- | -| icon | No | -- | <svelte:component this="{icon}" /> | +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :-------------------------------------------------- | +| -- | Yes | -- | -- | +| icon | No | -- | <svelte:component this={icon} /> | ### Events @@ -4016,10 +4016,10 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :----------------------------------------------------- | :---------------------------------------------------- | -| -- | Yes | { props: { class: 'bx--tag\_\_label' } } | -- | -| icon | No | -- | <svelte:component this="{icon}" /> | +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :----------------------------------------------------- | :-------------------------------------------------- | +| -- | Yes | { props: { class: "bx--tag\_\_label" } } | -- | +| icon | No | -- | <svelte:component this={icon} /> | ### Events @@ -4585,11 +4585,11 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :---------- | :------ | :---- | :---------------------------------------------------------------------- | -| -- | Yes | -- | -- | -| icon | No | -- | <svelte:component this="{icon}" name="{iconName}" /> | -| triggerText | No | -- | {triggerText} | +| Slot name | Default | Props | Fallback | +| :---------- | :------ | :---- | :------------------------------------------------------------------ | +| -- | Yes | -- | -- | +| icon | No | -- | <svelte:component this={icon} name={iconName} /> | +| triggerText | No | -- | {triggerText} | ### Events @@ -4666,10 +4666,10 @@ None. ### Slots -| Slot name | Default | Props | Fallback | -| :---------- | :------ | :---- | :---------------------------------------------------- | -| -- | Yes | -- | <svelte:component this="{icon}" /> | -| tooltipText | No | -- | {tooltipText} | +| Slot name | Default | Props | Fallback | +| :---------- | :------ | :---- | :-------------------------------------------------- | +| -- | Yes | -- | <svelte:component this={icon} /> | +| tooltipText | No | -- | {tooltipText} | ### Events @@ -4710,7 +4710,7 @@ export interface TreeNode { | hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text | | expandAll | No | function | No | () => void | () => { expandedIds = [...nodeIds]; } | Programmatically expand all nodes | | collapseAll | No | function | No | () => void | () => { expandedIds = []; } | Programmatically collapse all nodes | -| expandNodes | No | function | No | (filterId?: (node: TreeNode) => boolean) => void | () => { expandedIds = nodes .filter( (node) => filterNode(node) || node.nodes?.some((child) => filterNode(child) && child.nodes) ) .map((node) => node.id); } | Programmatically expand a subset of nodes.
Expands all nodes if no argument is provided | +| expandNodes | No | function | No | (filterId?: (node: TreeNode) => boolean) => void | () => { expandedIds = nodes .filter( (node) => filterNode(node) || node.nodes?.some((child) => filterNode(child) && child.nodes), ) .map((node) => node.id); } | Programmatically expand a subset of nodes.
Expands all nodes if no argument is provided | | collapseNodes | No | function | No | (filterId?: (node: TreeNode) => boolean) => void | () => { expandedIds = nodes .filter((node) => expandedIds.includes(node.id) && !filterNode(node)) .map((node) => node.id); } | Programmatically collapse a subset of nodes.
Collapses all nodes if no argument is provided | | showNode | No | function | No | (id: TreeNodeId) => void | () => { for (const child of nodes) { const nodes = findNodeById(child, id); if (nodes) { const ids = nodes.map((node) => node.id); const nodeIds = new Set(ids); expandNodes((node) => nodeIds.has(node.id)); const lastId = ids[ids.length - 1]; activeId = lastId; selectedIds = [lastId]; tick().then(() => { ref?.querySelector(\`[id="${lastId}"]\`)?.focus(); }); // Break out of the loop if the node is found. break; } } } | Programmatically show a node by `id`.
The matching node will be expanded, selected, and focused | diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 4cf6377a30..26f1a56bfe 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -2237,7 +2237,7 @@ { "name": "icon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" }, { @@ -5030,19 +5030,19 @@ { "name": "closeIcon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" }, { "name": "icon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" }, { "name": "text", "default": false, - "fallback": "{#if text}{text}{/if}", + "fallback": "{#if text}{text}{/if}", "slot_props": "{}" } ], @@ -5111,7 +5111,7 @@ { "name": "icon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" } ], @@ -5449,7 +5449,7 @@ { "name": "__default__", "default": true, - "fallback": "{result.text}\n {#if result.description}– {result.description}{/if}", + "fallback": "{result.text}\n {#if result.description}– {result.description}{/if}", "slot_props": "{ result: HeaderSearchResult; index: number }" } ], @@ -5903,7 +5903,7 @@ { "name": "icon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" } ], @@ -8216,7 +8216,7 @@ { "name": "menu", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" } ], @@ -8354,7 +8354,7 @@ { "name": "__default__", "default": true, - "fallback": "
\n {text}\n
", + "fallback": "
\n {text}\n
", "slot_props": "{}" } ], @@ -9443,8 +9443,8 @@ { "name": "__default__", "default": true, - "fallback": "

{label}

", - "slot_props": "{ props: { class: 'bx--progress-label' } }" + "fallback": "

{label}

", + "slot_props": "{ props: { class: \"bx--progress-label\" } }" } ], "events": [ @@ -10965,7 +10965,7 @@ { "name": "icon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" } ], @@ -11031,7 +11031,7 @@ { "name": "icon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" } ], @@ -12547,12 +12547,12 @@ { "name": "__default__", "default": true, - "slot_props": "{ props: { class: 'bx--tag__label' } }" + "slot_props": "{ props: { class: \"bx--tag__label\" } }" }, { "name": "icon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" } ], @@ -14440,7 +14440,7 @@ { "name": "icon", "default": false, - "fallback": "", + "fallback": "", "slot_props": "{}" }, { @@ -14676,7 +14676,7 @@ { "name": "__default__", "default": true, - "fallback": "", + "fallback": "", "slot_props": "{}" }, { @@ -14814,7 +14814,7 @@ "kind": "function", "description": "Programmatically expand a subset of nodes.\nExpands all nodes if no argument is provided", "type": "(filterId?: (node: TreeNode) => boolean) => void", - "value": "() => { expandedIds = nodes .filter( (node) => filterNode(node) || node.nodes?.some((child) => filterNode(child) && child.nodes) ) .map((node) => node.id); }", + "value": "() => { expandedIds = nodes .filter( (node) => filterNode(node) || node.nodes?.some((child) => filterNode(child) && child.nodes), ) .map((node) => node.id); }", "isFunction": true, "isFunctionDeclaration": true, "isRequired": false, diff --git a/types/Breakpoint/breakpointObserver.d.ts b/types/Breakpoint/breakpointObserver.d.ts index 69175629ab..77cfe4646e 100644 --- a/types/Breakpoint/breakpointObserver.d.ts +++ b/types/Breakpoint/breakpointObserver.d.ts @@ -9,7 +9,7 @@ export function breakpointObserver(): { subscribe: ( this: void, run: Subscriber, - invalidate?: (value?: any) => void + invalidate?: (value?: any) => void, ) => Unsubscriber; /** * Returns a store readable store that returns whether the current diff --git a/types/Breakpoint/index.d.ts b/types/Breakpoint/index.d.ts index c6d0e4d0ab..6b191a6411 100644 --- a/types/Breakpoint/index.d.ts +++ b/types/Breakpoint/index.d.ts @@ -2,4 +2,3 @@ export { default as Breakpoint } from "./Breakpoint.svelte"; export { breakpointObserver } from "./breakpointObserver"; export { breakpoints } from "./breakpoints"; - diff --git a/types/DataTable/DataTableTypes.d.ts b/types/DataTable/DataTableTypes.d.ts index 02fd5de9e4..c7c8c589c3 100644 --- a/types/DataTable/DataTableTypes.d.ts +++ b/types/DataTable/DataTableTypes.d.ts @@ -2,17 +2,17 @@ type PathDepth = [never, 0, 1, 2, ...0[]]; type Join = K extends string | number ? P extends string | number - ? `${K}${"" extends P ? "" : "."}${P}` - : never + ? `${K}${"" extends P ? "" : "."}${P}` + : never : never; // For performance, the maximum traversal depth is 10. export type PropertyPath = [D] extends [never] ? never : T extends object - ? { - [K in keyof T]-?: K extends string | number - ? `${K}` | Join> - : never; - }[keyof T] - : ""; + ? { + [K in keyof T]-?: K extends string | number + ? `${K}` | Join> + : never; + }[keyof T] + : ""; diff --git a/types/Truncate/truncate.d.ts b/types/Truncate/truncate.d.ts index 35557fc0d9..f0fa996761 100644 --- a/types/Truncate/truncate.d.ts +++ b/types/Truncate/truncate.d.ts @@ -4,7 +4,7 @@ interface TruncateOptions { export function TruncateAction( node: HTMLElement, - options?: TruncateOptions + options?: TruncateOptions, ): { update: (options?: TruncateOptions) => void; };