@casinogate/ui 1.7.0 → 1.8.0
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/dist/assets/css/root.css +43 -4
- package/dist/components/breadcrumb/breadcrumb.svelte +2 -2
- package/dist/components/breadcrumb/types.d.ts +2 -2
- package/dist/components/button/styles.d.ts +15 -0
- package/dist/components/button/styles.js +9 -4
- package/dist/components/button-group/components/button-group.root.svelte +1 -3
- package/dist/components/collapsible/components/collapsaible.svelte.js +3 -3
- package/dist/components/data-table/data-table.svelte +1 -1
- package/dist/components/data-table/utils/pagination-state.svelte.js +3 -3
- package/dist/components/data-table/utils/resize-state.svelte.js +3 -3
- package/dist/components/data-table/utils/row-selection-state.svelte.js +3 -3
- package/dist/components/dialog/components/dialog.overlay.svelte +1 -7
- package/dist/components/dropdown/components/dropdown.content.svelte +0 -2
- package/dist/components/dropdown/dropdown.svelte +127 -67
- package/dist/components/dropdown/dropdown.svelte.d.ts +3 -2
- package/dist/components/dropdown/exports.d.ts +1 -1
- package/dist/components/dropdown/exports.js +1 -1
- package/dist/components/dropdown/index.d.ts +1 -1
- package/dist/components/dropdown/styles.js +5 -3
- package/dist/components/dropdown/types.d.ts +47 -23
- package/dist/components/field/field.svelte +0 -1
- package/dist/components/segment/components/segment.root.svelte +2 -1
- package/dist/components/segment/components/segmet.svelte.d.ts +0 -1
- package/dist/components/segment/components/segmet.svelte.js +0 -1
- package/dist/components/segment/styles.d.ts +18 -0
- package/dist/components/segment/styles.js +7 -1
- package/dist/components/select/components/select.content.svelte +2 -4
- package/dist/components/select/components/select.group-heading.svelte +2 -4
- package/dist/components/select/components/select.group-heading.svelte.d.ts +2 -2
- package/dist/components/select/components/select.group.svelte.d.ts +2 -2
- package/dist/components/select/components/select.item.svelte +5 -13
- package/dist/components/select/components/select.item.svelte.d.ts +2 -2
- package/dist/components/select/components/select.root.svelte +1 -17
- package/dist/components/select/components/select.root.svelte.d.ts +1 -2
- package/dist/components/select/components/select.trigger.svelte +17 -5
- package/dist/components/select/components/select.viewport.svelte +2 -4
- package/dist/components/select/components/select.viewport.svelte.d.ts +2 -2
- package/dist/components/select/exports.d.ts +1 -1
- package/dist/components/select/exports.js +1 -1
- package/dist/components/select/select.async.svelte +146 -83
- package/dist/components/select/select.async.svelte.d.ts +1 -1
- package/dist/components/select/select.svelte +107 -62
- package/dist/components/select/select.svelte.d.ts +4 -2
- package/dist/components/select/styles.d.ts +48 -139
- package/dist/components/select/styles.js +74 -101
- package/dist/components/select/types.d.ts +69 -29
- package/dist/components/select/types.js +0 -1
- package/dist/components/select/utils/get-item-key.d.ts +1 -1
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.js +1 -0
- package/dist/internal/lib/collection/grid-collection.d.ts +3 -0
- package/dist/internal/lib/collection/grid-collection.js +2 -0
- package/dist/internal/lib/collection/index.d.ts +5 -0
- package/dist/internal/lib/collection/index.js +5 -0
- package/dist/internal/lib/collection/list-collection.d.ts +3 -0
- package/dist/internal/lib/collection/list-collection.js +2 -0
- package/dist/internal/lib/collection/tree-collection.d.ts +4 -0
- package/dist/internal/lib/collection/tree-collection.js +3 -0
- package/dist/internal/lib/collection/use-list-collection.svelte.d.ts +88 -0
- package/dist/internal/lib/collection/use-list-collection.svelte.js +94 -0
- package/dist/internal/lib/collection/use-list-selection.svelte.d.ts +92 -0
- package/dist/internal/lib/collection/use-list-selection.svelte.js +80 -0
- package/dist/internal/lib/index.d.ts +1 -0
- package/dist/internal/lib/index.js +1 -0
- package/dist/internal/utils/equal.d.ts +3 -0
- package/dist/internal/utils/equal.js +56 -0
- package/dist/internal/utils/functions.d.ts +2 -0
- package/dist/internal/utils/functions.js +4 -0
- package/dist/internal/utils/guard.d.ts +5 -0
- package/dist/internal/utils/guard.js +5 -0
- package/package.json +5 -3
- package/dist/components/app-shell/app-shell.stories.svelte +0 -107
- package/dist/components/app-shell/app-shell.stories.svelte.d.ts +0 -18
- package/dist/components/badge/badge.stories.svelte +0 -81
- package/dist/components/badge/badge.stories.svelte.d.ts +0 -19
- package/dist/components/breadcrumb/breadcrumb.stories.svelte +0 -67
- package/dist/components/breadcrumb/breadcrumb.stories.svelte.d.ts +0 -4
- package/dist/components/button/button.stories.svelte +0 -106
- package/dist/components/button/button.stories.svelte.d.ts +0 -19
- package/dist/components/button-group/button-group.stories.svelte +0 -59
- package/dist/components/button-group/button-group.stories.svelte.d.ts +0 -18
- package/dist/components/checkbox/checkbox.stories.svelte +0 -52
- package/dist/components/checkbox/checkbox.stories.svelte.d.ts +0 -18
- package/dist/components/collapsible/collapsible.stories.svelte +0 -69
- package/dist/components/collapsible/collapsible.stories.svelte.d.ts +0 -18
- package/dist/components/data-table/data-table.stories.svelte +0 -327
- package/dist/components/data-table/data-table.stories.svelte.d.ts +0 -4
- package/dist/components/dialog/dialog.stories.svelte +0 -116
- package/dist/components/dialog/dialog.stories.svelte.d.ts +0 -3
- package/dist/components/dropdown/dropdown.stories.svelte +0 -151
- package/dist/components/dropdown/dropdown.stories.svelte.d.ts +0 -19
- package/dist/components/field/field.stories.svelte +0 -56
- package/dist/components/field/field.stories.svelte.d.ts +0 -19
- package/dist/components/input/input.stories.svelte +0 -41
- package/dist/components/input/input.stories.svelte.d.ts +0 -19
- package/dist/components/navigation/navigation.stories.svelte +0 -99
- package/dist/components/navigation/navigation.stories.svelte.d.ts +0 -19
- package/dist/components/pagination/pagination.stories.svelte +0 -69
- package/dist/components/pagination/pagination.stories.svelte.d.ts +0 -19
- package/dist/components/popover/popover.stories.svelte +0 -195
- package/dist/components/popover/popover.stories.svelte.d.ts +0 -3
- package/dist/components/segment/segment.stories.svelte +0 -57
- package/dist/components/segment/segment.stories.svelte.d.ts +0 -19
- package/dist/components/select/select.stories.svelte +0 -263
- package/dist/components/select/select.stories.svelte.d.ts +0 -4
- package/dist/components/separator/separator.stories.svelte +0 -44
- package/dist/components/separator/separator.stories.svelte.d.ts +0 -19
- package/dist/components/skeleton/skeleton.stories.svelte +0 -129
- package/dist/components/skeleton/skeleton.stories.svelte.d.ts +0 -19
- package/dist/components/spinner/spinner.stories.svelte +0 -29
- package/dist/components/spinner/spinner.stories.svelte.d.ts +0 -19
- package/dist/components/switch/switch.stories.svelte +0 -55
- package/dist/components/switch/switch.stories.svelte.d.ts +0 -19
- package/dist/components/textarea/textarea.stories.svelte +0 -36
- package/dist/components/textarea/textarea.stories.svelte.d.ts +0 -19
- package/dist/components/toast/toast.stories.svelte +0 -96
- package/dist/components/toast/toast.stories.svelte.d.ts +0 -19
- package/dist/internal/utils/arrays.d.ts +0 -1
- package/dist/internal/utils/arrays.js +0 -30
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Badge } from './index.js';
|
|
2
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const Badge: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
}, {}, {}, string>;
|
|
18
|
-
type Badge = InstanceType<typeof Badge>;
|
|
19
|
-
export default Badge;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import type { Parameters } from '@storybook/sveltekit';
|
|
4
|
-
import type { ComponentProps } from 'svelte';
|
|
5
|
-
import BreadcrumbRoot from './components/breadcrumb.root.svelte';
|
|
6
|
-
import { Breadcrumb, BreadcrumbPrimitive } from './index.js';
|
|
7
|
-
|
|
8
|
-
const parameters: Parameters = {
|
|
9
|
-
controls: {
|
|
10
|
-
include: [],
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const { Story } = defineMeta({
|
|
15
|
-
title: 'UI Kit/Breadcrumb',
|
|
16
|
-
component: BreadcrumbRoot,
|
|
17
|
-
tags: ['autodocs'],
|
|
18
|
-
parameters,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
type Args = ComponentProps<typeof BreadcrumbRoot>;
|
|
22
|
-
|
|
23
|
-
const args: Args = {};
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<script lang="ts">
|
|
27
|
-
const path = $derived.by(() => {
|
|
28
|
-
const pathname = '/organization/create';
|
|
29
|
-
return pathname.split('/').filter(Boolean);
|
|
30
|
-
});
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<Story name="Primitive" {args} {parameters}>
|
|
34
|
-
{#snippet template(args: Args)}
|
|
35
|
-
<BreadcrumbPrimitive.Root {...args}>
|
|
36
|
-
<BreadcrumbPrimitive.List>
|
|
37
|
-
<BreadcrumbPrimitive.Item>
|
|
38
|
-
<BreadcrumbPrimitive.Link href="#">Home</BreadcrumbPrimitive.Link>
|
|
39
|
-
</BreadcrumbPrimitive.Item>
|
|
40
|
-
<BreadcrumbPrimitive.Separator />
|
|
41
|
-
<BreadcrumbPrimitive.Item>
|
|
42
|
-
<BreadcrumbPrimitive.Link href="#">Home 2</BreadcrumbPrimitive.Link>
|
|
43
|
-
</BreadcrumbPrimitive.Item>
|
|
44
|
-
<BreadcrumbPrimitive.Separator />
|
|
45
|
-
<BreadcrumbPrimitive.Item>
|
|
46
|
-
<BreadcrumbPrimitive.Link href="#">Home 3</BreadcrumbPrimitive.Link>
|
|
47
|
-
</BreadcrumbPrimitive.Item>
|
|
48
|
-
<BreadcrumbPrimitive.Separator />
|
|
49
|
-
<BreadcrumbPrimitive.Item>
|
|
50
|
-
<BreadcrumbPrimitive.Page>Home 4</BreadcrumbPrimitive.Page>
|
|
51
|
-
</BreadcrumbPrimitive.Item>
|
|
52
|
-
</BreadcrumbPrimitive.List>
|
|
53
|
-
</BreadcrumbPrimitive.Root>
|
|
54
|
-
{/snippet}
|
|
55
|
-
</Story>
|
|
56
|
-
|
|
57
|
-
<Story name="Preset" {args} {parameters}>
|
|
58
|
-
{#snippet template(args: Args)}
|
|
59
|
-
<Breadcrumb.Root {...args} path="Home/Home 2/Home 3/Home 4" />
|
|
60
|
-
{/snippet}
|
|
61
|
-
</Story>
|
|
62
|
-
|
|
63
|
-
<Story name="Preset With Array Path" {args} {parameters}>
|
|
64
|
-
{#snippet template(args: Args)}
|
|
65
|
-
<Breadcrumb.Root {...args} {path} />
|
|
66
|
-
{/snippet}
|
|
67
|
-
</Story>
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import type { Parameters } from '@storybook/sveltekit';
|
|
4
|
-
import { fn } from 'storybook/test';
|
|
5
|
-
import { type ComponentProps } from 'svelte';
|
|
6
|
-
import Button from './button.component.svelte';
|
|
7
|
-
|
|
8
|
-
const parameters: Parameters = {
|
|
9
|
-
controls: {
|
|
10
|
-
include: ['variant', 'size', 'rounded', 'disabled', 'w', 'loading', 'children'],
|
|
11
|
-
},
|
|
12
|
-
layout: 'centered',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const { Story } = defineMeta({
|
|
16
|
-
title: 'UI Kit/Button',
|
|
17
|
-
component: Button,
|
|
18
|
-
render: template,
|
|
19
|
-
tags: ['autodocs'],
|
|
20
|
-
|
|
21
|
-
argTypes: {
|
|
22
|
-
variant: {
|
|
23
|
-
control: 'radio',
|
|
24
|
-
},
|
|
25
|
-
size: {
|
|
26
|
-
control: 'radio',
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
disabled: {
|
|
30
|
-
control: 'boolean',
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
children: {
|
|
34
|
-
control: 'text',
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
w: {
|
|
38
|
-
control: 'radio',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
args: {
|
|
43
|
-
onclick: fn(),
|
|
44
|
-
ondblclick: fn(),
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
parameters,
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
type Args = Omit<ComponentProps<typeof Button>, 'children'> & {
|
|
51
|
-
children?: string;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const args: Args = {
|
|
55
|
-
size: 'md',
|
|
56
|
-
rounded: 'md',
|
|
57
|
-
w: 'full',
|
|
58
|
-
shadow: true,
|
|
59
|
-
loading: false,
|
|
60
|
-
disabled: false,
|
|
61
|
-
children: 'Button',
|
|
62
|
-
};
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
{#snippet template({ children, ...restArgs }: Args)}
|
|
66
|
-
<Button {...restArgs}>
|
|
67
|
-
{children}
|
|
68
|
-
</Button>
|
|
69
|
-
{/snippet}
|
|
70
|
-
|
|
71
|
-
<Story
|
|
72
|
-
name="Primary"
|
|
73
|
-
args={{
|
|
74
|
-
variant: 'primary',
|
|
75
|
-
...args,
|
|
76
|
-
}}
|
|
77
|
-
{parameters}
|
|
78
|
-
{template}
|
|
79
|
-
/>
|
|
80
|
-
|
|
81
|
-
<Story
|
|
82
|
-
name="Outline"
|
|
83
|
-
args={{
|
|
84
|
-
variant: 'outline',
|
|
85
|
-
...args,
|
|
86
|
-
}}
|
|
87
|
-
{parameters}
|
|
88
|
-
/>
|
|
89
|
-
|
|
90
|
-
<Story
|
|
91
|
-
name="Ghost"
|
|
92
|
-
args={{
|
|
93
|
-
variant: 'ghost',
|
|
94
|
-
...args,
|
|
95
|
-
}}
|
|
96
|
-
{parameters}
|
|
97
|
-
/>
|
|
98
|
-
|
|
99
|
-
<Story
|
|
100
|
-
name="Link"
|
|
101
|
-
args={{
|
|
102
|
-
variant: 'link',
|
|
103
|
-
...args,
|
|
104
|
-
}}
|
|
105
|
-
{parameters}
|
|
106
|
-
/>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Button from './button.component.svelte';
|
|
2
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
-
$$bindings?: Bindings;
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const Button: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
}, {}, {}, string>;
|
|
18
|
-
type Button = InstanceType<typeof Button>;
|
|
19
|
-
export default Button;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
import { Button } from '../button/index.js';
|
|
3
|
-
import { Input } from '../input/index.js';
|
|
4
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
5
|
-
import type { Parameters } from '@storybook/sveltekit';
|
|
6
|
-
import type { ComponentProps } from 'svelte';
|
|
7
|
-
import ButtonGroupRoot from './components/button-group.root.svelte';
|
|
8
|
-
import { ButtonGroupPrimitive } from './index.js';
|
|
9
|
-
|
|
10
|
-
const parameters: Parameters = {
|
|
11
|
-
controls: {
|
|
12
|
-
include: ['orientation'],
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const { Story } = defineMeta({
|
|
17
|
-
title: 'UI Kit/ButtonGroup',
|
|
18
|
-
component: ButtonGroupRoot,
|
|
19
|
-
tags: ['autodocs'],
|
|
20
|
-
parameters,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
type Args = ComponentProps<typeof ButtonGroupPrimitive.Root>;
|
|
24
|
-
|
|
25
|
-
const args: Args = {
|
|
26
|
-
orientation: 'horizontal',
|
|
27
|
-
};
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<Story name="Basic" {args} {parameters}>
|
|
31
|
-
{#snippet template(args: Args)}
|
|
32
|
-
<ButtonGroupPrimitive.Root {...args} class="cgui:w-full">
|
|
33
|
-
<Button class="cgui:flex-1">Button 1</Button>
|
|
34
|
-
<Button class="cgui:flex-1">Button 2</Button>
|
|
35
|
-
<Button class="cgui:flex-1">Button 3</Button>
|
|
36
|
-
</ButtonGroupPrimitive.Root>
|
|
37
|
-
{/snippet}
|
|
38
|
-
</Story>
|
|
39
|
-
|
|
40
|
-
<Story name="Input with Button" {args} {parameters}>
|
|
41
|
-
{#snippet template(args: Args)}
|
|
42
|
-
<ButtonGroupPrimitive.Root {...args} class="cgui:w-full">
|
|
43
|
-
<Input placeholder="Search" />
|
|
44
|
-
<Button w="clean" class="cgui:h-9">OK</Button>
|
|
45
|
-
</ButtonGroupPrimitive.Root>
|
|
46
|
-
{/snippet}
|
|
47
|
-
</Story>
|
|
48
|
-
|
|
49
|
-
<Story name="With Separator" {args} {parameters}>
|
|
50
|
-
{#snippet template(args: Args)}
|
|
51
|
-
<ButtonGroupPrimitive.Root {...args} class="cgui:w-full">
|
|
52
|
-
<Button class="cgui:flex-1">Button 1</Button>
|
|
53
|
-
<ButtonGroupPrimitive.Separator />
|
|
54
|
-
<Button class="cgui:flex-1">Button 2</Button>
|
|
55
|
-
<ButtonGroupPrimitive.Separator />
|
|
56
|
-
<Button class="cgui:flex-1">Button 3</Button>
|
|
57
|
-
</ButtonGroupPrimitive.Root>
|
|
58
|
-
{/snippet}
|
|
59
|
-
</Story>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const ButtonGroup: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type ButtonGroup = InstanceType<typeof ButtonGroup>;
|
|
18
|
-
export default ButtonGroup;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import type { Parameters } from '@storybook/sveltekit';
|
|
4
|
-
import type { ComponentProps } from 'svelte';
|
|
5
|
-
import CheckboxRoot from './components/checkbox.root.svelte';
|
|
6
|
-
|
|
7
|
-
const parameters: Parameters = {
|
|
8
|
-
controls: {
|
|
9
|
-
include: ['checked', 'indeterminate', 'disabled', 'size', 'rounded'],
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
layout: 'centered',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const { Story } = defineMeta({
|
|
16
|
-
title: 'UI Kit/Checkbox',
|
|
17
|
-
component: CheckboxRoot,
|
|
18
|
-
render: template,
|
|
19
|
-
tags: ['autodocs'],
|
|
20
|
-
|
|
21
|
-
argTypes: {
|
|
22
|
-
checked: {
|
|
23
|
-
table: {
|
|
24
|
-
defaultValue: { summary: 'false' },
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
indeterminate: {
|
|
28
|
-
table: {
|
|
29
|
-
defaultValue: { summary: 'false' },
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
type Args = ComponentProps<typeof CheckboxRoot>;
|
|
36
|
-
|
|
37
|
-
const args: Args = {
|
|
38
|
-
checked: false,
|
|
39
|
-
indeterminate: false,
|
|
40
|
-
disabled: false,
|
|
41
|
-
size: 'md',
|
|
42
|
-
rounded: 'xs',
|
|
43
|
-
};
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
{#snippet template(args: Args)}
|
|
47
|
-
<CheckboxRoot {...args} />
|
|
48
|
-
{/snippet}
|
|
49
|
-
|
|
50
|
-
<Story name="Basic" {args} {template} {parameters} />
|
|
51
|
-
|
|
52
|
-
<Story name="Indeterminate" args={{ ...args, indeterminate: true }} {template} {parameters} />
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Checkbox: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type Checkbox = InstanceType<typeof Checkbox>;
|
|
18
|
-
export default Checkbox;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
-
import type { Parameters } from '@storybook/sveltekit';
|
|
4
|
-
|
|
5
|
-
import type { ComponentProps } from 'svelte';
|
|
6
|
-
import CollapsibleRoot from './components/collapsaible.root.svelte';
|
|
7
|
-
|
|
8
|
-
import { CollapsiblePrimitive } from './index.js';
|
|
9
|
-
|
|
10
|
-
const parameters: Parameters = {
|
|
11
|
-
controls: {
|
|
12
|
-
include: ['open', 'disabled', 'variant', 'iconPosition'],
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const { Story } = defineMeta({
|
|
17
|
-
title: 'UI Kit/Collapsible',
|
|
18
|
-
component: CollapsibleRoot,
|
|
19
|
-
render: template,
|
|
20
|
-
tags: ['autodocs'],
|
|
21
|
-
|
|
22
|
-
argTypes: {
|
|
23
|
-
open: {
|
|
24
|
-
table: {
|
|
25
|
-
defaultValue: { summary: '$bindable(false)' },
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
parameters,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
type Args = ComponentProps<typeof CollapsibleRoot>;
|
|
34
|
-
|
|
35
|
-
const args: Args = {
|
|
36
|
-
open: false,
|
|
37
|
-
disabled: false,
|
|
38
|
-
variant: 'default',
|
|
39
|
-
iconPosition: 'end',
|
|
40
|
-
};
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
{#snippet template(args: Args)}
|
|
44
|
-
<CollapsiblePrimitive.Root {...args}>
|
|
45
|
-
<CollapsiblePrimitive.Trigger>Nisi nulla esse qui dolor</CollapsiblePrimitive.Trigger>
|
|
46
|
-
<CollapsiblePrimitive.Content>
|
|
47
|
-
Labore cupidatat nisi nostrud non laboris tempor velit. Commodo in sint ea fugiat ad ullamco labore. Laboris
|
|
48
|
-
labore sunt nostrud labore aliqua. Consectetur nulla anim amet laborum ex sunt nisi do consectetur magna Lorem
|
|
49
|
-
irure. Anim aute magna ad. Aliqua labore enim in quis. Eu exercitation cupidatat anim mollit ipsum eiusmod ex. Id
|
|
50
|
-
exercitation nulla esse consequat incididunt tempor.
|
|
51
|
-
</CollapsiblePrimitive.Content>
|
|
52
|
-
</CollapsiblePrimitive.Root>
|
|
53
|
-
{/snippet}
|
|
54
|
-
|
|
55
|
-
<Story name="Basic" {args} {template} {parameters} />
|
|
56
|
-
|
|
57
|
-
<Story name="Without Icon" {args} {parameters}>
|
|
58
|
-
{#snippet template(args: Args)}
|
|
59
|
-
<CollapsiblePrimitive.Root {...args}>
|
|
60
|
-
<CollapsiblePrimitive.Trigger icon={null}>Nisi nulla esse qui dolor</CollapsiblePrimitive.Trigger>
|
|
61
|
-
<CollapsiblePrimitive.Content>
|
|
62
|
-
Labore cupidatat nisi nostrud non laboris tempor velit. Commodo in sint ea fugiat ad ullamco labore. Laboris
|
|
63
|
-
labore sunt nostrud labore aliqua. Consectetur nulla anim amet laborum ex sunt nisi do consectetur magna Lorem
|
|
64
|
-
irure. Anim aute magna ad. Aliqua labore enim in quis. Eu exercitation cupidatat anim mollit ipsum eiusmod ex.
|
|
65
|
-
Id exercitation nulla esse consequat incididunt tempor.
|
|
66
|
-
</CollapsiblePrimitive.Content>
|
|
67
|
-
</CollapsiblePrimitive.Root>
|
|
68
|
-
{/snippet}
|
|
69
|
-
</Story>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Collapsible: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type Collapsible = InstanceType<typeof Collapsible>;
|
|
18
|
-
export default Collapsible;
|