Run "yarn build:docs"

This commit is contained in:
Eric Liu 2023-11-11 13:43:09 -08:00
commit a48afb5889
4 changed files with 32 additions and 5 deletions

View file

@ -4708,7 +4708,8 @@ export interface TreeNode {
### Slots ### Slots
| Slot name | Default | Props | Fallback | | Slot name | Default | Props | Fallback |
| :-------- | :------ | :---- | :----------------------- | | :-------- | :------ | :-------------------------------------------------------------------------------------------------------------------------------- | :----------------------- |
| -- | Yes | <code>{ node: { id: TreeNodeId; text: string; expanded: boolean, leaf: boolean; disabled: boolean; selected: boolean; } } </code> | <code>{node.text}</code> |
| labelText | No | -- | <code>{labelText}</code> | | labelText | No | -- | <code>{labelText}</code> |
### Events ### Events

View file

@ -14668,6 +14668,12 @@
], ],
"moduleExports": [], "moduleExports": [],
"slots": [ "slots": [
{
"name": "__default__",
"default": true,
"fallback": "{node.text}",
"slot_props": "{ node: { id: TreeNodeId; text: string; expanded: boolean, leaf: boolean; disabled: boolean; selected: boolean; } }"
},
{ {
"name": "labelText", "name": "labelText",
"default": false, "default": false,

View file

@ -72,4 +72,12 @@
on:select="{({ detail }) => console.log('select', detail)}" on:select="{({ detail }) => console.log('select', detail)}"
on:toggle="{({ detail }) => console.log('toggle', detail)}" on:toggle="{({ detail }) => console.log('toggle', detail)}"
on:focus="{({ detail }) => console.log('focus', detail)}" on:focus="{({ detail }) => console.log('focus', detail)}"
/> let:node
>
{node.id}
{node.disabled}
{node.expanded}
{node.leaf}
{node.selected}
{node.text}
</TreeView>

View file

@ -68,7 +68,19 @@ export default class TreeView extends SvelteComponentTyped<
focus: CustomEvent<TreeNode & { expanded: boolean; leaf: boolean }>; focus: CustomEvent<TreeNode & { expanded: boolean; leaf: boolean }>;
keydown: WindowEventMap["keydown"]; keydown: WindowEventMap["keydown"];
}, },
{ labelText: {} } {
default: {
node: {
id: TreeNodeId;
text: string;
expanded: boolean;
leaf: boolean;
disabled: boolean;
selected: boolean;
};
};
labelText: {};
}
> { > {
/** /**
* Programmatically expand all nodes * Programmatically expand all nodes