sdocs 0.0.42 → 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +55 -66
- package/dist/language/index.d.ts +1 -0
- package/dist/language/index.js +1 -0
- package/dist/language/projection.d.ts +23 -0
- package/dist/language/projection.js +136 -0
- package/dist/language/projection.test.d.ts +1 -0
- package/dist/language/projection.test.js +117 -0
- package/dist/ui/About.sdoc +28 -0
- package/dist/ui/Button/Button.sdoc +41 -44
- package/dist/ui/Control/Checkbox.sdoc +7 -13
- package/dist/ui/Control/Color.sdoc +7 -13
- package/dist/ui/Control/Dimension.sdoc +7 -13
- package/dist/ui/Control/Number.sdoc +7 -13
- package/dist/ui/Control/Select.sdoc +7 -14
- package/dist/ui/Control/Text.sdoc +7 -13
- package/dist/ui/Dashboard.sdoc +57 -0
- package/dist/ui/Frame/Frame.sdoc +46 -48
- package/dist/ui/Icon/Icon.sdoc +33 -38
- package/dist/ui/NavTree/Group.sdoc +36 -38
- package/dist/ui/NavTree/Item.sdoc +52 -57
- package/dist/ui/NavTree/NavTree.sdoc +89 -91
- package/dist/ui/Stack/Stack.sdoc +41 -43
- package/package.json +1 -1
- package/dist/ui/About.page.sdoc +0 -37
- package/dist/ui/Dashboard.layout.sdoc +0 -60
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Dimension from './Dimension.svelte';
|
|
3
|
-
|
|
4
|
-
export const meta = {
|
|
5
|
-
component: Dimension,
|
|
6
|
-
title: 'UI / Control / Dimension',
|
|
7
|
-
description: 'A dimension input control for CSS values (px).',
|
|
8
|
-
args: {
|
|
9
|
-
label: 'Width',
|
|
10
|
-
value: '120px',
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
3
|
</script>
|
|
14
4
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
5
|
+
[DOCS title="UI / Control / Dimension" description="A dimension input control for CSS values (px)."]
|
|
6
|
+
|
|
7
|
+
[preview component={Dimension} args={{ label: 'Width', value: '120px' }}]
|
|
8
|
+
<Dimension {...args} onchange={(v) => console.log('changed:', v)} />
|
|
9
|
+
[/preview]
|
|
10
|
+
|
|
11
|
+
[/DOCS]
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Number from './Number.svelte';
|
|
3
|
-
|
|
4
|
-
export const meta = {
|
|
5
|
-
component: Number,
|
|
6
|
-
title: 'UI / Control / Number',
|
|
7
|
-
description: 'A numeric input control.',
|
|
8
|
-
args: {
|
|
9
|
-
label: 'Count',
|
|
10
|
-
value: 42,
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
3
|
</script>
|
|
14
4
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
5
|
+
[DOCS title="UI / Control / Number" description="A numeric input control."]
|
|
6
|
+
|
|
7
|
+
[preview component={Number} args={{ label: 'Count', value: 42 }}]
|
|
8
|
+
<Number {...args} onchange={(v) => console.log('changed:', v)} />
|
|
9
|
+
[/preview]
|
|
10
|
+
|
|
11
|
+
[/DOCS]
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Select from './Select.svelte';
|
|
3
|
-
|
|
4
|
-
export const meta = {
|
|
5
|
-
component: Select,
|
|
6
|
-
title: 'UI / Control / Select',
|
|
7
|
-
description: 'A dropdown select control.',
|
|
8
|
-
args: {
|
|
9
|
-
label: 'Size',
|
|
10
|
-
value: 'md',
|
|
11
|
-
options: ['sm', 'md', 'lg'],
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
3
|
</script>
|
|
15
4
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
5
|
+
[DOCS title="UI / Control / Select" description="A dropdown select control."]
|
|
6
|
+
|
|
7
|
+
[preview component={Select} args={{ label: 'Size', value: 'md' }}]
|
|
8
|
+
<Select {...args} options={['sm', 'md', 'lg']} onchange={(v) => console.log('changed:', v)} />
|
|
9
|
+
[/preview]
|
|
10
|
+
|
|
11
|
+
[/DOCS]
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Text from './Text.svelte';
|
|
3
|
-
|
|
4
|
-
export const meta = {
|
|
5
|
-
component: Text,
|
|
6
|
-
title: 'UI / Control / Text',
|
|
7
|
-
description: 'A text input control for string values.',
|
|
8
|
-
args: {
|
|
9
|
-
label: 'Name',
|
|
10
|
-
value: 'Hello',
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
3
|
</script>
|
|
14
4
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
5
|
+
[DOCS title="UI / Control / Text" description="A text input control for string values."]
|
|
6
|
+
|
|
7
|
+
[preview component={Text} args={{ label: 'Name', value: 'Hello' }}]
|
|
8
|
+
<Text {...args} onchange={(v) => console.log('changed:', v)} />
|
|
9
|
+
[/preview]
|
|
10
|
+
|
|
11
|
+
[/DOCS]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[LAYOUT title=":Layouts / Dashboard"]
|
|
2
|
+
|
|
3
|
+
<div style="display: flex; flex-direction: column; height: 100vh; ">
|
|
4
|
+
<header style="padding: 12px 24px; background: #1e293b; color: white; display: flex; align-items: center; justify-content: space-between;">
|
|
5
|
+
<span style="font-weight: 700; font-size: 16px;">Dashboard</span>
|
|
6
|
+
<nav style="display: flex; gap: 16px; font-size: 14px;">
|
|
7
|
+
<span style="color: #94a3b8; cursor: pointer;">Settings</span>
|
|
8
|
+
<span style="color: #94a3b8; cursor: pointer;">Profile</span>
|
|
9
|
+
</nav>
|
|
10
|
+
</header>
|
|
11
|
+
<div style="display: flex; flex: 1; overflow: hidden;">
|
|
12
|
+
<aside style="width: 200px; background: #f8fafc; border-right: 1px solid #e2e8f0; padding: 16px;">
|
|
13
|
+
<nav style="display: flex; flex-direction: column; gap: 4px;">
|
|
14
|
+
<div style="padding: 8px 12px; border-radius: 6px; color: #334155; background: #e2e8f0; font-size: 14px; font-weight: 500;">Overview</div>
|
|
15
|
+
<div style="padding: 8px 12px; border-radius: 6px; color: #64748b; font-size: 14px;">Analytics</div>
|
|
16
|
+
<div style="padding: 8px 12px; border-radius: 6px; color: #64748b; font-size: 14px;">Users</div>
|
|
17
|
+
<div style="padding: 8px 12px; border-radius: 6px; color: #64748b; font-size: 14px;">Reports</div>
|
|
18
|
+
</nav>
|
|
19
|
+
</aside>
|
|
20
|
+
<main style="flex: 1; padding: 24px; overflow-y: auto; background: #ffffff;">
|
|
21
|
+
<h1 style="font-size: 24px; font-weight: 700; margin: 0 0 16px; color: #0f172a;">Overview</h1>
|
|
22
|
+
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px;">
|
|
23
|
+
<div style="padding: 20px; border-radius: 8px; border: 1px solid #e2e8f0;">
|
|
24
|
+
<div style="font-size: 13px; color: #64748b; margin-bottom: 4px;">Total Users</div>
|
|
25
|
+
<div style="font-size: 28px; font-weight: 700; color: #0f172a;">1,234</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div style="padding: 20px; border-radius: 8px; border: 1px solid #e2e8f0;">
|
|
28
|
+
<div style="font-size: 13px; color: #64748b; margin-bottom: 4px;">Revenue</div>
|
|
29
|
+
<div style="font-size: 28px; font-weight: 700; color: #0f172a;">$12.4k</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div style="padding: 20px; border-radius: 8px; border: 1px solid #e2e8f0;">
|
|
32
|
+
<div style="font-size: 13px; color: #64748b; margin-bottom: 4px;">Active Now</div>
|
|
33
|
+
<div style="font-size: 28px; font-weight: 700; color: #0f172a;">89</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div style="padding: 20px; border-radius: 8px; border: 1px solid #e2e8f0;">
|
|
37
|
+
<h2 style="font-size: 16px; font-weight: 600; margin: 0 0 12px; color: #0f172a;">Recent Activity</h2>
|
|
38
|
+
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
39
|
+
<div style="display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9;">
|
|
40
|
+
<span style="color: #334155; font-size: 14px;">New user registered</span>
|
|
41
|
+
<span style="color: #94a3b8; font-size: 13px;">2 min ago</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div style="display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9;">
|
|
44
|
+
<span style="color: #334155; font-size: 14px;">Payment received</span>
|
|
45
|
+
<span style="color: #94a3b8; font-size: 13px;">15 min ago</span>
|
|
46
|
+
</div>
|
|
47
|
+
<div style="display: flex; justify-content: space-between;">
|
|
48
|
+
<span style="color: #334155; font-size: 14px;">Report generated</span>
|
|
49
|
+
<span style="color: #94a3b8; font-size: 13px;">1 hour ago</span>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</main>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
[/LAYOUT]
|
package/dist/ui/Frame/Frame.sdoc
CHANGED
|
@@ -1,54 +1,52 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Frame from './Frame.svelte';
|
|
3
|
-
|
|
4
|
-
export const meta = {
|
|
5
|
-
component: Frame,
|
|
6
|
-
title: 'Frame',
|
|
7
|
-
description: 'A flexible holy-grail layout with top, bottom, left, right, and center regions.',
|
|
8
|
-
};
|
|
9
3
|
</script>
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<div style="padding: 8px;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
[DOCS title="Frame" description="A flexible holy-grail layout with top, bottom, left, right, and center regions."]
|
|
6
|
+
|
|
7
|
+
[preview component={Frame}]
|
|
8
|
+
<div style="height: 300px; border: 1px solid #ccc;">
|
|
9
|
+
<Frame>
|
|
10
|
+
{#snippet top()}
|
|
11
|
+
<div style="padding: 8px; background: var(--color-base-100); border-bottom: 1px solid var(--color-base-200);">Top</div>
|
|
12
|
+
{/snippet}
|
|
13
|
+
{#snippet left()}
|
|
14
|
+
<div style="padding: 8px; width: 120px; background: var(--color-base-50); border-right: 1px solid var(--color-base-200);">Left</div>
|
|
15
|
+
{/snippet}
|
|
16
|
+
<div style="padding: 8px;">Center content</div>
|
|
17
|
+
{#snippet right()}
|
|
18
|
+
<div style="padding: 8px; width: 120px; background: var(--color-base-50); border-left: 1px solid var(--color-base-200);">Right</div>
|
|
19
|
+
{/snippet}
|
|
20
|
+
{#snippet bottom()}
|
|
21
|
+
<div style="padding: 8px; background: var(--color-base-100); border-top: 1px solid var(--color-base-200);">Bottom</div>
|
|
22
|
+
{/snippet}
|
|
23
|
+
</Frame>
|
|
24
|
+
</div>
|
|
25
|
+
[/preview]
|
|
26
|
+
|
|
27
|
+
[example title="TopAndBottom"]
|
|
28
|
+
<div style="height: 200px; border: 1px solid #ccc;">
|
|
29
|
+
<Frame>
|
|
30
|
+
{#snippet top()}
|
|
31
|
+
<div style="padding: 8px; background: var(--color-base-100); border-bottom: 1px solid var(--color-base-200);">Header</div>
|
|
32
|
+
{/snippet}
|
|
33
|
+
<div style="padding: 8px;">Main content area</div>
|
|
34
|
+
{#snippet bottom()}
|
|
35
|
+
<div style="padding: 8px; background: var(--color-base-100); border-top: 1px solid var(--color-base-200);">Footer</div>
|
|
36
|
+
{/snippet}
|
|
37
|
+
</Frame>
|
|
38
|
+
</div>
|
|
39
|
+
[/example]
|
|
30
40
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</Frame>
|
|
42
|
-
</div>
|
|
43
|
-
{/snippet}
|
|
41
|
+
[example title="Sidebar"]
|
|
42
|
+
<div style="height: 200px; border: 1px solid #ccc;">
|
|
43
|
+
<Frame>
|
|
44
|
+
{#snippet left()}
|
|
45
|
+
<div style="padding: 8px; width: 150px; background: var(--color-base-50); border-right: 1px solid var(--color-base-200);">Sidebar</div>
|
|
46
|
+
{/snippet}
|
|
47
|
+
<div style="padding: 8px;">Content</div>
|
|
48
|
+
</Frame>
|
|
49
|
+
</div>
|
|
50
|
+
[/example]
|
|
44
51
|
|
|
45
|
-
|
|
46
|
-
<div style="height: 200px; border: 1px solid #ccc;">
|
|
47
|
-
<Frame>
|
|
48
|
-
{#snippet left()}
|
|
49
|
-
<div style="padding: 8px; width: 150px; background: var(--color-base-50); border-right: 1px solid var(--color-base-200);">Sidebar</div>
|
|
50
|
-
{/snippet}
|
|
51
|
-
<div style="padding: 8px;">Content</div>
|
|
52
|
-
</Frame>
|
|
53
|
-
</div>
|
|
54
|
-
{/snippet}
|
|
52
|
+
[/DOCS]
|
package/dist/ui/Icon/Icon.sdoc
CHANGED
|
@@ -1,45 +1,40 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Icon from './Icon.svelte';
|
|
3
|
-
|
|
4
|
-
export const meta = {
|
|
5
|
-
component: Icon,
|
|
6
|
-
title: 'Icon',
|
|
7
|
-
description: 'Displays an SVG icon by name. Supports sizing and color via CSS custom properties.',
|
|
8
|
-
args: {
|
|
9
|
-
name: 'chevron-right',
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
3
|
</script>
|
|
13
4
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{
|
|
5
|
+
[DOCS title="Icon" description="Displays an SVG icon by name. Supports sizing and color via CSS custom properties."]
|
|
6
|
+
|
|
7
|
+
[preview component={Icon} args={{ name: 'chevron-right' }}]
|
|
8
|
+
<Icon name="chevron-right" --w="24px" --h="24px" --fill="currentColor" />
|
|
9
|
+
[/preview]
|
|
10
|
+
|
|
11
|
+
[example title="AllIcons"]
|
|
12
|
+
<div style="display: flex; gap: 12px; align-items: center;">
|
|
13
|
+
<Icon name="chevron-up" />
|
|
14
|
+
<Icon name="chevron-down" />
|
|
15
|
+
<Icon name="chevron-left" />
|
|
16
|
+
<Icon name="chevron-right" />
|
|
17
|
+
<Icon name="folder" />
|
|
18
|
+
<Icon name="folder-open" />
|
|
19
|
+
</div>
|
|
20
|
+
[/example]
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</div>
|
|
27
|
-
{/snippet}
|
|
22
|
+
[example title="CustomSize"]
|
|
23
|
+
<div style="display: flex; gap: 12px; align-items: center;">
|
|
24
|
+
<Icon name="chevron-right" --w="16px" --h="16px" />
|
|
25
|
+
<Icon name="chevron-right" />
|
|
26
|
+
<Icon name="chevron-right" --w="32px" --h="32px" />
|
|
27
|
+
<Icon name="chevron-right" --w="48px" --h="48px" />
|
|
28
|
+
</div>
|
|
29
|
+
[/example]
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
[example title="CustomColor"]
|
|
32
|
+
<div style="display: flex; gap: 12px; align-items: center;">
|
|
33
|
+
<Icon name="chevron-right" --fill="tomato" />
|
|
34
|
+
<Icon name="chevron-right" --fill="dodgerblue" />
|
|
35
|
+
<Icon name="chevron-right" --fill="mediumseagreen" />
|
|
36
|
+
<Icon name="chevron-right" --fill="slateviolet" />
|
|
37
|
+
</div>
|
|
38
|
+
[/example]
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
<div style="display: flex; gap: 12px; align-items: center;">
|
|
40
|
-
<Icon name="chevron-right" --fill="tomato" />
|
|
41
|
-
<Icon name="chevron-right" --fill="dodgerblue" />
|
|
42
|
-
<Icon name="chevron-right" --fill="mediumseagreen" />
|
|
43
|
-
<Icon name="chevron-right" --fill="slateviolet" />
|
|
44
|
-
</div>
|
|
45
|
-
{/snippet}
|
|
40
|
+
[/DOCS]
|
|
@@ -2,45 +2,43 @@
|
|
|
2
2
|
import Group from './Group.svelte';
|
|
3
3
|
import Item from './Item.svelte';
|
|
4
4
|
import NavTree from './NavTree.svelte';
|
|
5
|
-
|
|
6
|
-
export const meta = {
|
|
7
|
-
component: Group,
|
|
8
|
-
title: 'NavTree / NavTree.Group',
|
|
9
|
-
description: 'A collapsible section header with uppercase label. Used to organize items into named categories.',
|
|
10
|
-
};
|
|
11
5
|
</script>
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
[DOCS title="NavTree / NavTree.Group" description="A collapsible section header with uppercase label. Used to organize items into named categories."]
|
|
8
|
+
|
|
9
|
+
[preview component={Group}]
|
|
10
|
+
<NavTree>
|
|
11
|
+
<Group label="Components">
|
|
12
|
+
<Item label="Button" href="#/button" />
|
|
13
|
+
<Item label="Icon" href="#/icon" />
|
|
14
|
+
<Item label="Card" href="#/card" />
|
|
15
|
+
</Group>
|
|
16
|
+
</NavTree>
|
|
17
|
+
[/preview]
|
|
18
|
+
|
|
19
|
+
[example title="Collapsed"]
|
|
20
|
+
<NavTree>
|
|
21
|
+
<Group label="Advanced" expanded={false}>
|
|
22
|
+
<Item label="Tree" href="#/tree" />
|
|
23
|
+
<Item label="Table" href="#/table" />
|
|
24
|
+
</Group>
|
|
25
|
+
</NavTree>
|
|
26
|
+
[/example]
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
[example title="MultipleGroups"]
|
|
29
|
+
<NavTree>
|
|
30
|
+
<Group label="Components">
|
|
31
|
+
<Item label="Button" href="#/button" />
|
|
32
|
+
<Item label="Input" href="#/input" />
|
|
33
|
+
</Group>
|
|
34
|
+
<Group label="Pages">
|
|
35
|
+
<Item label="About" href="#/about" />
|
|
36
|
+
<Item label="Changelog" href="#/changelog" />
|
|
37
|
+
</Group>
|
|
38
|
+
<Group label="Layouts">
|
|
39
|
+
<Item label="Dashboard" href="#/dashboard" />
|
|
40
|
+
</Group>
|
|
41
|
+
</NavTree>
|
|
42
|
+
[/example]
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
<NavTree>
|
|
34
|
-
<Group label="Components">
|
|
35
|
-
<Item label="Button" href="#/button" />
|
|
36
|
-
<Item label="Input" href="#/input" />
|
|
37
|
-
</Group>
|
|
38
|
-
<Group label="Pages">
|
|
39
|
-
<Item label="About" href="#/about" />
|
|
40
|
-
<Item label="Changelog" href="#/changelog" />
|
|
41
|
-
</Group>
|
|
42
|
-
<Group label="Layouts">
|
|
43
|
-
<Item label="Dashboard" href="#/dashboard" />
|
|
44
|
-
</Group>
|
|
45
|
-
</NavTree>
|
|
46
|
-
{/snippet}
|
|
44
|
+
[/DOCS]
|
|
@@ -2,69 +2,64 @@
|
|
|
2
2
|
import Item from './Item.svelte';
|
|
3
3
|
import NavTree from './NavTree.svelte';
|
|
4
4
|
import { Icon } from '../Icon/index.js';
|
|
5
|
-
|
|
6
|
-
export const meta = {
|
|
7
|
-
component: Item,
|
|
8
|
-
title: 'NavTree / NavTree.Item',
|
|
9
|
-
description: 'A tree node that acts as a leaf (link/button) or expandable folder when children are provided. Supports left and right snippet slots for custom content.',
|
|
10
|
-
args:{
|
|
11
|
-
label:"Label"
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
5
|
</script>
|
|
15
6
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
7
|
+
[DOCS title="NavTree / NavTree.Item" description="A tree node that acts as a leaf (link/button) or expandable folder when children are provided. Supports left and right snippet slots for custom content."]
|
|
8
|
+
|
|
9
|
+
[preview component={Item} args={{ label: 'Label' }}]
|
|
10
|
+
<NavTree>
|
|
11
|
+
<Item {...args} >
|
|
12
|
+
<Item {...args} >
|
|
13
|
+
|
|
14
|
+
</Item>
|
|
15
|
+
<Item {...args} >
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
<Item {...args} >
|
|
17
|
+
</Item>
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
</Item>
|
|
20
|
+
</NavTree>
|
|
21
|
+
[/preview]
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
[example title="LeftSlot"]
|
|
24
|
+
<NavTree>
|
|
25
|
+
<Item label="Home" href="#/home">
|
|
26
|
+
{#snippet left()}<Icon name="folder" --w="14px" --h="14px" />{/snippet}
|
|
27
|
+
</Item>
|
|
28
|
+
<Item label="Documents" href="#/docs">
|
|
29
|
+
{#snippet left()}<Icon name="folder-open" --w="14px" --h="14px" />{/snippet}
|
|
30
|
+
</Item>
|
|
31
|
+
</NavTree>
|
|
32
|
+
[/example]
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
[example title="RightSlot"]
|
|
35
|
+
<NavTree>
|
|
36
|
+
<Item label="bundle.js" href="#/bundle">
|
|
37
|
+
{#snippet right()}<span style="font-size: 11px; color: tomato;">54kb</span>{/snippet}
|
|
38
|
+
</Item>
|
|
39
|
+
<Item label="style.css" href="#/style">
|
|
40
|
+
{#snippet right()}<span style="font-size: 11px; color: #9ca3af;">3.2kb</span>{/snippet}
|
|
41
|
+
</Item>
|
|
42
|
+
</NavTree>
|
|
43
|
+
[/example]
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
[example title="Expandable"]
|
|
46
|
+
<NavTree>
|
|
47
|
+
<Item label="Controls" expanded>
|
|
48
|
+
<Item label="Text" href="#/text" />
|
|
49
|
+
<Item label="Number" href="#/number" />
|
|
50
|
+
</Item>
|
|
51
|
+
<Item label="Layout">
|
|
52
|
+
<Item label="Frame" href="#/frame" />
|
|
53
|
+
</Item>
|
|
54
|
+
</NavTree>
|
|
55
|
+
[/example]
|
|
51
56
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<Item label="
|
|
56
|
-
<Item label="
|
|
57
|
-
</
|
|
58
|
-
|
|
59
|
-
<Item label="Frame" href="#/frame" />
|
|
60
|
-
</Item>
|
|
61
|
-
</NavTree>
|
|
62
|
-
{/snippet}
|
|
57
|
+
[example title="ActiveState"]
|
|
58
|
+
<NavTree>
|
|
59
|
+
<Item label="Regular item" href="#/one" />
|
|
60
|
+
<Item label="Active item" href="#/two" active />
|
|
61
|
+
<Item label="Another item" href="#/three" />
|
|
62
|
+
</NavTree>
|
|
63
|
+
[/example]
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
<NavTree>
|
|
66
|
-
<Item label="Regular item" href="#/one" />
|
|
67
|
-
<Item label="Active item" href="#/two" active />
|
|
68
|
-
<Item label="Another item" href="#/three" />
|
|
69
|
-
</NavTree>
|
|
70
|
-
{/snippet}
|
|
65
|
+
[/DOCS]
|