@casinogate/ui 1.3.1 → 1.3.2
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/components/app-shell/components/app-shell.content.svelte +7 -10
- package/dist/components/app-shell/components/app-shell.content.svelte.d.ts +1 -4
- package/dist/components/app-shell/components/app-shell.header.svelte +5 -10
- package/dist/components/app-shell/components/app-shell.header.svelte.d.ts +1 -4
- package/dist/components/app-shell/components/app-shell.nav-bar.svelte +5 -10
- package/dist/components/app-shell/components/app-shell.nav-bar.svelte.d.ts +1 -4
- package/dist/components/app-shell/components/app-shell.root.svelte +6 -21
- package/dist/components/app-shell/components/app-shell.root.svelte.d.ts +2 -11
- package/dist/components/app-shell/components/app-shell.sidebar-footer.svelte +5 -10
- package/dist/components/app-shell/components/app-shell.sidebar-footer.svelte.d.ts +1 -4
- package/dist/components/app-shell/components/app-shell.sidebar-head.svelte +5 -10
- package/dist/components/app-shell/components/app-shell.sidebar-head.svelte.d.ts +1 -4
- package/dist/components/app-shell/components/app-shell.sidebar-toggle.svelte +7 -12
- package/dist/components/app-shell/components/app-shell.sidebar-toggle.svelte.d.ts +1 -4
- package/dist/components/app-shell/components/app-shell.sidebar.svelte +5 -10
- package/dist/components/app-shell/components/app-shell.sidebar.svelte.d.ts +1 -4
- package/dist/components/app-shell/components/app-shell.viewport.svelte +5 -10
- package/dist/components/app-shell/components/app-shell.viewport.svelte.d.ts +1 -4
- package/dist/components/app-shell/exports-primitive.d.ts +9 -0
- package/dist/components/app-shell/exports-primitive.js +9 -0
- package/dist/components/app-shell/index.d.ts +2 -20
- package/dist/components/app-shell/index.js +1 -20
- package/dist/components/app-shell/types.d.ts +26 -0
- package/dist/components/button/button.component.svelte +12 -135
- package/dist/components/button/button.component.svelte.d.ts +2 -236
- package/dist/components/button/exports.d.ts +1 -0
- package/dist/components/button/exports.js +1 -0
- package/dist/components/button/index.d.ts +2 -233
- package/dist/components/button/index.js +1 -4
- package/dist/components/button/styles.d.ts +231 -0
- package/dist/components/button/styles.js +105 -0
- package/dist/components/button/types.d.ts +7 -0
- package/dist/components/button/types.js +1 -0
- package/dist/components/button-group/button-group.stories.svelte +10 -10
- package/dist/components/button-group/button-group.stories.svelte.d.ts +0 -1
- package/dist/components/button-group/components/button-group.root.svelte +4 -11
- package/dist/components/button-group/components/button-group.root.svelte.d.ts +1 -5
- package/dist/components/button-group/components/button-group.separator.svelte +2 -2
- package/dist/components/button-group/components/button-group.separator.svelte.d.ts +1 -11
- package/dist/components/button-group/exports-primitive.d.ts +2 -0
- package/dist/components/button-group/exports-primitive.js +2 -0
- package/dist/components/button-group/index.d.ts +2 -16
- package/dist/components/button-group/index.js +1 -6
- package/dist/components/button-group/types.d.ts +8 -0
- package/dist/components/button-group/types.js +1 -0
- package/dist/components/checkbox/components/checkbox.root.svelte +8 -9
- package/dist/components/checkbox/components/checkbox.root.svelte.d.ts +3 -4
- package/dist/components/checkbox/exports-primitive.d.ts +2 -0
- package/dist/components/checkbox/exports-primitive.js +2 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.js +2 -6
- package/dist/components/checkbox/model/{checkbox-model.svelte.d.ts → checkbox-controller.svelte.d.ts} +3 -4
- package/dist/components/checkbox/model/{checkbox-model.svelte.js → checkbox-controller.svelte.js} +1 -4
- package/dist/components/checkbox/model/index.d.ts +1 -1
- package/dist/components/checkbox/model/index.js +1 -1
- package/dist/components/checkbox/types.d.ts +3 -0
- package/dist/components/checkbox/types.js +2 -0
- package/dist/components/collapsible/components/collapsaible.content.svelte +5 -9
- package/dist/components/collapsible/components/collapsaible.content.svelte.d.ts +1 -2
- package/dist/components/collapsible/components/collapsaible.root.svelte +6 -14
- package/dist/components/collapsible/components/collapsaible.root.svelte.d.ts +1 -3
- package/dist/components/collapsible/components/collapsaible.trigger.svelte +7 -14
- package/dist/components/collapsible/components/collapsaible.trigger.svelte.d.ts +1 -5
- package/dist/components/collapsible/exports-primitive.d.ts +3 -0
- package/dist/components/collapsible/exports-primitive.js +3 -0
- package/dist/components/collapsible/index.d.ts +2 -9
- package/dist/components/collapsible/index.js +1 -8
- package/dist/components/collapsible/styles.d.ts +8 -8
- package/dist/components/collapsible/types.d.ts +8 -0
- package/dist/components/collapsible/types.js +1 -1
- package/dist/components/data-table/components/data-table.body.svelte +2 -10
- package/dist/components/data-table/components/data-table.body.svelte.d.ts +1 -5
- package/dist/components/data-table/components/data-table.cell.svelte +2 -14
- package/dist/components/data-table/components/data-table.cell.svelte.d.ts +1 -7
- package/dist/components/data-table/components/data-table.head.svelte +2 -14
- package/dist/components/data-table/components/data-table.head.svelte.d.ts +1 -7
- package/dist/components/data-table/components/data-table.header.svelte +2 -9
- package/dist/components/data-table/components/data-table.header.svelte.d.ts +1 -4
- package/dist/components/data-table/components/data-table.resize-handler.svelte +2 -9
- package/dist/components/data-table/components/data-table.resize-handler.svelte.d.ts +1 -4
- package/dist/components/data-table/components/data-table.root.svelte +4 -15
- package/dist/components/data-table/components/data-table.root.svelte.d.ts +6 -13
- package/dist/components/data-table/components/data-table.row.svelte +2 -9
- package/dist/components/data-table/components/data-table.row.svelte.d.ts +1 -4
- package/dist/components/data-table/components/data-table.sort-button.svelte +4 -11
- package/dist/components/data-table/components/data-table.sort-button.svelte.d.ts +1 -4
- package/dist/components/data-table/components/data-table.svelte.d.ts +2 -2
- package/dist/components/data-table/components/data-table.table.svelte +2 -9
- package/dist/components/data-table/components/data-table.table.svelte.d.ts +1 -4
- package/dist/components/data-table/data-table.svelte +3 -16
- package/dist/components/data-table/data-table.svelte.d.ts +2 -9
- package/dist/components/data-table/exports-primitive.d.ts +10 -0
- package/dist/components/data-table/exports-primitive.js +10 -0
- package/dist/components/data-table/exports.d.ts +1 -0
- package/dist/components/data-table/exports.js +1 -28
- package/dist/components/data-table/index.d.ts +4 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/data-table/types.d.ts +37 -1
- package/dist/components/data-table/types.js +1 -1
- package/dist/components/field/components/field.control.svelte +3 -1
- package/dist/components/field/components/field.description.svelte +5 -10
- package/dist/components/field/components/field.description.svelte.d.ts +1 -4
- package/dist/components/field/components/field.error.svelte +5 -10
- package/dist/components/field/components/field.error.svelte.d.ts +1 -4
- package/dist/components/field/components/field.label.svelte +5 -10
- package/dist/components/field/components/field.label.svelte.d.ts +1 -4
- package/dist/components/field/components/field.root.svelte +5 -19
- package/dist/components/field/components/field.root.svelte.d.ts +1 -9
- package/dist/components/field/exports-primitive.d.ts +5 -0
- package/dist/components/field/exports-primitive.js +5 -0
- package/dist/components/field/exports.d.ts +1 -0
- package/dist/components/field/exports.js +1 -0
- package/dist/components/field/field.svelte.d.ts +1 -1
- package/dist/components/field/index.d.ts +3 -14
- package/dist/components/field/index.js +2 -14
- package/dist/components/field/styles.d.ts +3 -3
- package/dist/components/field/types.d.ts +23 -0
- package/dist/components/field/types.js +1 -0
- package/dist/components/icons/exports.d.ts +22 -0
- package/dist/components/icons/exports.js +22 -0
- package/dist/components/icons/index.d.ts +1 -22
- package/dist/components/icons/index.js +1 -22
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.js +19 -0
- package/dist/components/input/exports.d.ts +2 -0
- package/dist/components/input/exports.js +2 -0
- package/dist/components/input/index.d.ts +2 -6
- package/dist/components/input/index.js +1 -5
- package/dist/components/input/input.password.svelte +6 -15
- package/dist/components/input/input.password.svelte.d.ts +2 -4
- package/dist/components/input/input.svelte +5 -16
- package/dist/components/input/input.svelte.d.ts +1 -9
- package/dist/components/input/types.d.ts +13 -0
- package/dist/components/input/types.js +1 -0
- package/dist/components/navigation/components/navigation.content.svelte +6 -11
- package/dist/components/navigation/components/navigation.content.svelte.d.ts +1 -4
- package/dist/components/navigation/components/navigation.item.svelte +5 -10
- package/dist/components/navigation/components/navigation.item.svelte.d.ts +1 -4
- package/dist/components/navigation/components/navigation.root.svelte +6 -11
- package/dist/components/navigation/components/navigation.root.svelte.d.ts +1 -7
- package/dist/components/navigation/components/navigation.sub-content.svelte +6 -11
- package/dist/components/navigation/components/navigation.sub-content.svelte.d.ts +1 -6
- package/dist/components/navigation/components/navigation.trigger.svelte +4 -21
- package/dist/components/navigation/components/navigation.trigger.svelte.d.ts +1 -9
- package/dist/components/navigation/exports-primitive.d.ts +5 -0
- package/dist/components/navigation/exports-primitive.js +5 -0
- package/dist/components/navigation/exports.d.ts +1 -0
- package/dist/components/navigation/exports.js +1 -0
- package/dist/components/navigation/index.d.ts +3 -12
- package/dist/components/navigation/index.js +2 -12
- package/dist/components/navigation/types.d.ts +23 -0
- package/dist/components/navigation/types.js +1 -0
- package/dist/components/pagination/components/pagination.ellipsis.svelte +3 -9
- package/dist/components/pagination/components/pagination.ellipsis.svelte.d.ts +1 -4
- package/dist/components/pagination/components/pagination.item.svelte +2 -5
- package/dist/components/pagination/components/pagination.item.svelte.d.ts +1 -2
- package/dist/components/pagination/components/pagination.next-button.svelte +4 -10
- package/dist/components/pagination/components/pagination.next-button.svelte.d.ts +1 -2
- package/dist/components/pagination/components/pagination.prev-button.svelte +4 -11
- package/dist/components/pagination/components/pagination.prev-button.svelte.d.ts +1 -2
- package/dist/components/pagination/components/pagination.root.svelte +3 -10
- package/dist/components/pagination/components/pagination.root.svelte.d.ts +1 -3
- package/dist/components/pagination/exports-primitive.d.ts +5 -0
- package/dist/components/pagination/exports-primitive.js +5 -0
- package/dist/components/pagination/exports.d.ts +1 -0
- package/dist/components/pagination/exports.js +1 -0
- package/dist/components/pagination/index.d.ts +3 -16
- package/dist/components/pagination/index.js +2 -16
- package/dist/components/pagination/pagination.stories.svelte +1 -1
- package/dist/components/pagination/pagination.svelte +28 -0
- package/dist/components/pagination/pagination.svelte.d.ts +3 -0
- package/dist/components/pagination/types.d.ts +10 -0
- package/dist/components/pagination/types.js +1 -0
- package/dist/components/popover/exports-primitive.d.ts +4 -0
- package/dist/components/popover/exports-primitive.js +5 -0
- package/dist/components/popover/exports.d.ts +1 -0
- package/dist/components/popover/exports.js +1 -15
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.svelte +1 -2
- package/dist/components/popover/popover.svelte.d.ts +1 -2
- package/dist/components/popover/types.d.ts +1 -1
- package/dist/components/segment/components/segment.item.svelte +12 -14
- package/dist/components/segment/components/segment.item.svelte.d.ts +1 -6
- package/dist/components/segment/components/segment.root.svelte +6 -22
- package/dist/components/segment/components/segment.root.svelte.d.ts +1 -10
- package/dist/components/segment/exports-primitive.d.ts +2 -0
- package/dist/components/segment/exports-primitive.js +2 -0
- package/dist/components/segment/index.d.ts +2 -7
- package/dist/components/segment/index.js +1 -6
- package/dist/components/segment/types.d.ts +14 -0
- package/dist/components/segment/types.js +1 -0
- package/dist/components/select/components/select.root.svelte +3 -6
- package/dist/components/select/components/select.root.svelte.d.ts +1 -3
- package/dist/components/select/components/select.trigger.svelte +2 -11
- package/dist/components/select/components/select.trigger.svelte.d.ts +1 -7
- package/dist/components/select/exports-primitive.d.ts +2 -0
- package/dist/components/select/exports-primitive.js +2 -0
- package/dist/components/select/index.d.ts +2 -7
- package/dist/components/select/index.js +1 -6
- package/dist/components/select/select.stories.svelte +3 -3
- package/dist/components/select/types.d.ts +9 -0
- package/dist/components/select/types.js +2 -0
- package/dist/components/separator/exports.d.ts +1 -0
- package/dist/components/separator/exports.js +1 -0
- package/dist/components/separator/index.d.ts +2 -5
- package/dist/components/separator/index.js +1 -4
- package/dist/components/separator/separator.svelte +1 -4
- package/dist/components/separator/separator.svelte.d.ts +0 -1
- package/dist/components/separator/types.d.ts +2 -0
- package/dist/components/separator/types.js +1 -0
- package/dist/components/skeleton/exports.d.ts +1 -0
- package/dist/components/skeleton/exports.js +1 -0
- package/dist/components/skeleton/index.d.ts +2 -1
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/skeleton/skeleton.svelte +3 -15
- package/dist/components/skeleton/skeleton.svelte.d.ts +1 -8
- package/dist/components/skeleton/types.d.ts +9 -0
- package/dist/components/skeleton/types.js +1 -0
- package/dist/components/spinner/exports.d.ts +1 -0
- package/dist/components/spinner/exports.js +1 -0
- package/dist/components/spinner/index.d.ts +2 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/spinner/spinner.svelte +3 -13
- package/dist/components/spinner/spinner.svelte.d.ts +1 -6
- package/dist/components/spinner/types.d.ts +7 -0
- package/dist/components/spinner/types.js +1 -0
- package/dist/components/switch/components/switch.root.svelte +6 -7
- package/dist/components/switch/components/switch.root.svelte.d.ts +2 -4
- package/dist/components/switch/components/switch.thumb.svelte +5 -7
- package/dist/components/switch/components/switch.thumb.svelte.d.ts +1 -2
- package/dist/components/switch/exports-primitive.d.ts +2 -0
- package/dist/components/switch/exports-primitive.js +2 -0
- package/dist/components/switch/exports.d.ts +1 -0
- package/dist/components/switch/exports.js +1 -0
- package/dist/components/switch/index.d.ts +4 -10
- package/dist/components/switch/index.js +3 -10
- package/dist/components/switch/model/index.d.ts +1 -1
- package/dist/components/switch/model/index.js +1 -1
- package/dist/components/switch/model/switch-controller.svelte.d.ts +11 -0
- package/dist/components/switch/model/{switch-model.svelte.js → switch-controller.svelte.js} +1 -4
- package/dist/components/switch/switch.stories.svelte +1 -1
- package/dist/components/switch/switch.svelte +11 -0
- package/dist/components/switch/switch.svelte.d.ts +3 -0
- package/dist/components/switch/types.d.ts +5 -0
- package/dist/components/switch/types.js +2 -0
- package/dist/components/toast/exports.d.ts +1 -0
- package/dist/components/toast/exports.js +1 -0
- package/dist/components/toast/index.d.ts +2 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/styles.d.ts +152 -0
- package/dist/components/toast/styles.js +62 -0
- package/dist/components/toast/toast.component.svelte +9 -97
- package/dist/components/toast/toast.component.svelte.d.ts +1 -155
- package/dist/components/toast/types.d.ts +11 -0
- package/dist/components/toast/types.js +1 -0
- package/dist/index.d.ts +1 -17
- package/dist/index.js +1 -17
- package/package.json +1 -1
- package/dist/components/pagination/presets/basic.svelte +0 -31
- package/dist/components/pagination/presets/basic.svelte.d.ts +0 -5
- package/dist/components/pagination/presets/index.d.ts +0 -1
- package/dist/components/pagination/presets/index.js +0 -1
- package/dist/components/switch/model/switch-model.svelte.d.ts +0 -12
- package/dist/components/switch/presets/basic.svelte +0 -14
- package/dist/components/switch/presets/basic.svelte.d.ts +0 -5
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
primary: {
|
|
5
|
+
root: string[];
|
|
6
|
+
};
|
|
7
|
+
outline: {
|
|
8
|
+
root: string[];
|
|
9
|
+
};
|
|
10
|
+
ghost: {
|
|
11
|
+
root: string[];
|
|
12
|
+
};
|
|
13
|
+
link: {
|
|
14
|
+
root: string[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
loading: {
|
|
18
|
+
true: {
|
|
19
|
+
root: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
shadow: {
|
|
23
|
+
true: {
|
|
24
|
+
root: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
xs: {
|
|
29
|
+
root: string;
|
|
30
|
+
};
|
|
31
|
+
sm: {
|
|
32
|
+
root: string;
|
|
33
|
+
};
|
|
34
|
+
md: {
|
|
35
|
+
root: string;
|
|
36
|
+
};
|
|
37
|
+
lg: {
|
|
38
|
+
root: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
w: {
|
|
42
|
+
full: {
|
|
43
|
+
root: string;
|
|
44
|
+
};
|
|
45
|
+
auto: {
|
|
46
|
+
root: string;
|
|
47
|
+
};
|
|
48
|
+
fit: {
|
|
49
|
+
root: string;
|
|
50
|
+
};
|
|
51
|
+
clean: {
|
|
52
|
+
root: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
rounded: {
|
|
56
|
+
sm: {
|
|
57
|
+
root: string;
|
|
58
|
+
};
|
|
59
|
+
md: {
|
|
60
|
+
root: string;
|
|
61
|
+
};
|
|
62
|
+
lg: {
|
|
63
|
+
root: string;
|
|
64
|
+
};
|
|
65
|
+
xl: {
|
|
66
|
+
root: string;
|
|
67
|
+
};
|
|
68
|
+
full: {
|
|
69
|
+
root: string;
|
|
70
|
+
};
|
|
71
|
+
clean: {
|
|
72
|
+
root: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
root: string[];
|
|
77
|
+
chevron: string[];
|
|
78
|
+
}, undefined, {
|
|
79
|
+
variant: {
|
|
80
|
+
primary: {
|
|
81
|
+
root: string[];
|
|
82
|
+
};
|
|
83
|
+
outline: {
|
|
84
|
+
root: string[];
|
|
85
|
+
};
|
|
86
|
+
ghost: {
|
|
87
|
+
root: string[];
|
|
88
|
+
};
|
|
89
|
+
link: {
|
|
90
|
+
root: string[];
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
loading: {
|
|
94
|
+
true: {
|
|
95
|
+
root: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
shadow: {
|
|
99
|
+
true: {
|
|
100
|
+
root: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
size: {
|
|
104
|
+
xs: {
|
|
105
|
+
root: string;
|
|
106
|
+
};
|
|
107
|
+
sm: {
|
|
108
|
+
root: string;
|
|
109
|
+
};
|
|
110
|
+
md: {
|
|
111
|
+
root: string;
|
|
112
|
+
};
|
|
113
|
+
lg: {
|
|
114
|
+
root: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
w: {
|
|
118
|
+
full: {
|
|
119
|
+
root: string;
|
|
120
|
+
};
|
|
121
|
+
auto: {
|
|
122
|
+
root: string;
|
|
123
|
+
};
|
|
124
|
+
fit: {
|
|
125
|
+
root: string;
|
|
126
|
+
};
|
|
127
|
+
clean: {
|
|
128
|
+
root: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
rounded: {
|
|
132
|
+
sm: {
|
|
133
|
+
root: string;
|
|
134
|
+
};
|
|
135
|
+
md: {
|
|
136
|
+
root: string;
|
|
137
|
+
};
|
|
138
|
+
lg: {
|
|
139
|
+
root: string;
|
|
140
|
+
};
|
|
141
|
+
xl: {
|
|
142
|
+
root: string;
|
|
143
|
+
};
|
|
144
|
+
full: {
|
|
145
|
+
root: string;
|
|
146
|
+
};
|
|
147
|
+
clean: {
|
|
148
|
+
root: string;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
}, {
|
|
152
|
+
root: string[];
|
|
153
|
+
chevron: string[];
|
|
154
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
155
|
+
variant: {
|
|
156
|
+
primary: {
|
|
157
|
+
root: string[];
|
|
158
|
+
};
|
|
159
|
+
outline: {
|
|
160
|
+
root: string[];
|
|
161
|
+
};
|
|
162
|
+
ghost: {
|
|
163
|
+
root: string[];
|
|
164
|
+
};
|
|
165
|
+
link: {
|
|
166
|
+
root: string[];
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
loading: {
|
|
170
|
+
true: {
|
|
171
|
+
root: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
shadow: {
|
|
175
|
+
true: {
|
|
176
|
+
root: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
size: {
|
|
180
|
+
xs: {
|
|
181
|
+
root: string;
|
|
182
|
+
};
|
|
183
|
+
sm: {
|
|
184
|
+
root: string;
|
|
185
|
+
};
|
|
186
|
+
md: {
|
|
187
|
+
root: string;
|
|
188
|
+
};
|
|
189
|
+
lg: {
|
|
190
|
+
root: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
w: {
|
|
194
|
+
full: {
|
|
195
|
+
root: string;
|
|
196
|
+
};
|
|
197
|
+
auto: {
|
|
198
|
+
root: string;
|
|
199
|
+
};
|
|
200
|
+
fit: {
|
|
201
|
+
root: string;
|
|
202
|
+
};
|
|
203
|
+
clean: {
|
|
204
|
+
root: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
rounded: {
|
|
208
|
+
sm: {
|
|
209
|
+
root: string;
|
|
210
|
+
};
|
|
211
|
+
md: {
|
|
212
|
+
root: string;
|
|
213
|
+
};
|
|
214
|
+
lg: {
|
|
215
|
+
root: string;
|
|
216
|
+
};
|
|
217
|
+
xl: {
|
|
218
|
+
root: string;
|
|
219
|
+
};
|
|
220
|
+
full: {
|
|
221
|
+
root: string;
|
|
222
|
+
};
|
|
223
|
+
clean: {
|
|
224
|
+
root: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
}, {
|
|
228
|
+
root: string[];
|
|
229
|
+
chevron: string[];
|
|
230
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
231
|
+
export type ButtonVariantsProps = VariantProps<typeof buttonVariants>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { tv } from '../../internal/utils/tailwindcss.js';
|
|
2
|
+
export const buttonVariants = tv({
|
|
3
|
+
slots: {
|
|
4
|
+
root: [
|
|
5
|
+
'cgui:flex cgui:items-center cgui:justify-center cgui:gap-1.5 cgui:cursor-pointer cgui:px-2 cgui:text-center cgui:overflow-hidden',
|
|
6
|
+
'cgui:transition-all cgui:duration-250 cgui:ease-in-out',
|
|
7
|
+
'cgui:select-none cgui:font-medium',
|
|
8
|
+
'cgui:disabled:cursor-not-allowed cgui:disabled:opacity-50',
|
|
9
|
+
],
|
|
10
|
+
chevron: ['cgui:inline-flex cgui:items-center cgui:justify-center cgui:shrink-0'],
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
primary: {
|
|
15
|
+
root: ['cgui:bg-primary-80 cgui:text-fg-white', 'cgui:hover:bg-primary-60 ', ' cgui:active:bg-primary-100'],
|
|
16
|
+
},
|
|
17
|
+
outline: {
|
|
18
|
+
root: [
|
|
19
|
+
'cgui:bg-transparent cgui:text-primary-80 cgui:border cgui:border-stroke-primary',
|
|
20
|
+
'cgui:hover:text-primary-60 cgui:hover:border-stroke-primary-60',
|
|
21
|
+
'cgui:active:text-primary-100 cgui:active:border-stroke-primary-100',
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
ghost: {
|
|
25
|
+
root: [
|
|
26
|
+
'cgui:bg-transparent cgui:text-primary-80',
|
|
27
|
+
'cgui:hover:text-primary-60',
|
|
28
|
+
'cgui:active:text-primary-100',
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
link: {
|
|
32
|
+
root: [
|
|
33
|
+
'cgui:bg-transparent cgui:text-primary-80',
|
|
34
|
+
'cgui:hover:text-primary-60',
|
|
35
|
+
'cgui:active:text-primary-100',
|
|
36
|
+
'cgui:underline',
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
loading: {
|
|
41
|
+
true: {
|
|
42
|
+
root: 'cgui:pointer-events-none cgui:opacity-50',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
shadow: {
|
|
46
|
+
true: {
|
|
47
|
+
root: 'cgui:shadow-btn',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
xs: {
|
|
52
|
+
root: 'cgui:h-7.5',
|
|
53
|
+
},
|
|
54
|
+
sm: {
|
|
55
|
+
root: 'cgui:h-8',
|
|
56
|
+
},
|
|
57
|
+
md: {
|
|
58
|
+
root: 'cgui:h-8.5',
|
|
59
|
+
},
|
|
60
|
+
lg: {
|
|
61
|
+
root: 'cgui:h-14',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
w: {
|
|
65
|
+
full: {
|
|
66
|
+
root: 'cgui:w-full',
|
|
67
|
+
},
|
|
68
|
+
auto: {
|
|
69
|
+
root: 'cgui:w-auto',
|
|
70
|
+
},
|
|
71
|
+
fit: {
|
|
72
|
+
root: 'cgui:w-fit',
|
|
73
|
+
},
|
|
74
|
+
clean: {
|
|
75
|
+
root: '',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
rounded: {
|
|
79
|
+
sm: {
|
|
80
|
+
root: 'cgui:rounded-sm',
|
|
81
|
+
},
|
|
82
|
+
md: {
|
|
83
|
+
root: 'cgui:rounded-md',
|
|
84
|
+
},
|
|
85
|
+
lg: {
|
|
86
|
+
root: 'cgui:rounded-lg',
|
|
87
|
+
},
|
|
88
|
+
xl: {
|
|
89
|
+
root: 'cgui:rounded-xl',
|
|
90
|
+
},
|
|
91
|
+
full: {
|
|
92
|
+
root: 'cgui:rounded-full',
|
|
93
|
+
},
|
|
94
|
+
clean: {
|
|
95
|
+
root: '',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
defaultVariants: {
|
|
100
|
+
variant: 'primary',
|
|
101
|
+
size: 'md',
|
|
102
|
+
shadow: true,
|
|
103
|
+
rounded: 'md',
|
|
104
|
+
},
|
|
105
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ButtonVariantsProps } from './styles.js';
|
|
2
|
+
import { type ButtonRootProps } from 'bits-ui';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
export type ButtonProps = ButtonRootProps & {
|
|
5
|
+
startChevron?: Snippet;
|
|
6
|
+
endChevron?: Snippet;
|
|
7
|
+
} & ButtonVariantsProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {} from 'bits-ui';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type { Parameters } from '@storybook/sveltekit';
|
|
6
6
|
import type { ComponentProps } from 'svelte';
|
|
7
7
|
import ButtonGroupRoot from './components/button-group.root.svelte';
|
|
8
|
-
import {
|
|
8
|
+
import { ButtonGroupPrimitive } from './index.js';
|
|
9
9
|
|
|
10
10
|
const parameters: Parameters = {
|
|
11
11
|
controls: {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
parameters,
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
type Args = ComponentProps<typeof
|
|
23
|
+
type Args = ComponentProps<typeof ButtonGroupPrimitive.Root>;
|
|
24
24
|
|
|
25
25
|
const args: Args = {
|
|
26
26
|
orientation: 'horizontal',
|
|
@@ -29,31 +29,31 @@
|
|
|
29
29
|
|
|
30
30
|
<Story name="Basic" {args} {parameters}>
|
|
31
31
|
{#snippet template(args: Args)}
|
|
32
|
-
<
|
|
32
|
+
<ButtonGroupPrimitive.Root {...args} class="cgui:w-full">
|
|
33
33
|
<Button class="cgui:flex-1">Button 1</Button>
|
|
34
34
|
<Button class="cgui:flex-1">Button 2</Button>
|
|
35
35
|
<Button class="cgui:flex-1">Button 3</Button>
|
|
36
|
-
</
|
|
36
|
+
</ButtonGroupPrimitive.Root>
|
|
37
37
|
{/snippet}
|
|
38
38
|
</Story>
|
|
39
39
|
|
|
40
40
|
<Story name="Input with Button" {args} {parameters}>
|
|
41
41
|
{#snippet template(args: Args)}
|
|
42
|
-
<
|
|
42
|
+
<ButtonGroupPrimitive.Root {...args} class="cgui:w-full">
|
|
43
43
|
<Input placeholder="Search" />
|
|
44
44
|
<Button w="clean" class="cgui:h-9">OK</Button>
|
|
45
|
-
</
|
|
45
|
+
</ButtonGroupPrimitive.Root>
|
|
46
46
|
{/snippet}
|
|
47
47
|
</Story>
|
|
48
48
|
|
|
49
49
|
<Story name="With Separator" {args} {parameters}>
|
|
50
50
|
{#snippet template(args: Args)}
|
|
51
|
-
<
|
|
51
|
+
<ButtonGroupPrimitive.Root {...args} class="cgui:w-full">
|
|
52
52
|
<Button class="cgui:flex-1">Button 1</Button>
|
|
53
|
-
<
|
|
53
|
+
<ButtonGroupPrimitive.Separator />
|
|
54
54
|
<Button class="cgui:flex-1">Button 2</Button>
|
|
55
|
-
<
|
|
55
|
+
<ButtonGroupPrimitive.Separator />
|
|
56
56
|
<Button class="cgui:flex-1">Button 3</Button>
|
|
57
|
-
</
|
|
57
|
+
</ButtonGroupPrimitive.Root>
|
|
58
58
|
{/snippet}
|
|
59
59
|
</Story>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ButtonGroup } from './index.js';
|
|
2
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> {
|
|
3
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
3
|
$$bindings?: Bindings;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
type ButtonGroupRootPropsWithoutHTML = WithElementRef<WithChildren<{}>> & ButtonGroupVariantsProps;
|
|
3
|
-
|
|
4
|
-
export type ButtonGroupRootProps = ButtonGroupRootPropsWithoutHTML &
|
|
5
|
-
Without<PrimitiveDivAttributes, ButtonGroupRootPropsWithoutHTML>;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
1
|
<script lang="ts">
|
|
2
|
+
import type { ButtonGroupRootProps } from '../types.js';
|
|
9
3
|
import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
|
|
10
|
-
import type { PrimitiveDivAttributes } from '../../../internal/types/html-attributes.js';
|
|
11
4
|
import { cn, useId } from '../../../internal/utils/common.js';
|
|
12
|
-
import { box
|
|
13
|
-
import type { ButtonGroupVariantsProps } from '../styles.js';
|
|
5
|
+
import { box } from 'svelte-toolbelt';
|
|
14
6
|
import { ButtonGroupStylesContext, buttonGroupStyles } from '../styles.js';
|
|
15
7
|
|
|
8
|
+
const uid = $props.id();
|
|
16
9
|
let {
|
|
17
10
|
children,
|
|
18
11
|
ref = $bindable(null),
|
|
19
|
-
id = useId(),
|
|
12
|
+
id = useId(uid),
|
|
20
13
|
orientation = 'horizontal',
|
|
21
14
|
class: className,
|
|
22
15
|
...restProps
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
type
|
|
2
|
-
export type ButtonGroupRootProps = ButtonGroupRootPropsWithoutHTML & Without<PrimitiveDivAttributes, ButtonGroupRootPropsWithoutHTML>;
|
|
3
|
-
import type { PrimitiveDivAttributes } from '../../../internal/types/html-attributes.js';
|
|
4
|
-
import { type WithChildren, type WithElementRef, type Without } from 'svelte-toolbelt';
|
|
5
|
-
import type { ButtonGroupVariantsProps } from '../styles.js';
|
|
1
|
+
import type { ButtonGroupRootProps } from '../types.js';
|
|
6
2
|
declare const ButtonGroup: import("svelte").Component<ButtonGroupRootProps, {}, "ref">;
|
|
7
3
|
type ButtonGroup = ReturnType<typeof ButtonGroup>;
|
|
8
4
|
export default ButtonGroup;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { ButtonGroupSeparatorProps } from '../types.js';
|
|
2
3
|
import { Separator } from '../../separator/index.js';
|
|
3
4
|
import { SLOT_ATTR_NAME } from '../../../internal/constants/attrs.js';
|
|
4
5
|
import { cn } from '../../../internal/utils/common.js';
|
|
5
|
-
import type { ComponentProps } from 'svelte';
|
|
6
6
|
import { ButtonGroupStylesContext } from '../styles.js';
|
|
7
7
|
|
|
8
8
|
let {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
class: className,
|
|
11
11
|
orientation = 'vertical',
|
|
12
12
|
...restProps
|
|
13
|
-
}:
|
|
13
|
+
}: ButtonGroupSeparatorProps = $props();
|
|
14
14
|
|
|
15
15
|
const styles = ButtonGroupStylesContext.get();
|
|
16
16
|
</script>
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
declare const ButtonGroup: import("svelte").Component<
|
|
2
|
-
orientation?: import("bits-ui").Orientation;
|
|
3
|
-
decorative?: boolean;
|
|
4
|
-
}, "child" | "children"> & {
|
|
5
|
-
child?: import("svelte").Snippet<[{
|
|
6
|
-
props: Record<string, unknown>;
|
|
7
|
-
}]> | undefined;
|
|
8
|
-
children?: import("svelte").Snippet<[]> | undefined;
|
|
9
|
-
style?: import("bits-ui").StyleProperties | string | null | undefined;
|
|
10
|
-
ref?: HTMLElement | null | undefined;
|
|
11
|
-
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").SeparatorRootPropsWithoutHTML>, {}, "ref">;
|
|
1
|
+
declare const ButtonGroup: import("svelte").Component<import("bits-ui").SeparatorRootProps, {}, "ref">;
|
|
12
2
|
type ButtonGroup = ReturnType<typeof ButtonGroup>;
|
|
13
3
|
export default ButtonGroup;
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
readonly Root: import("svelte").Component<ButtonGroupRootProps, {}, "ref">;
|
|
4
|
-
readonly Separator: import("svelte").Component<Omit<{
|
|
5
|
-
orientation?: import("bits-ui").Orientation;
|
|
6
|
-
decorative?: boolean;
|
|
7
|
-
}, "child" | "children"> & {
|
|
8
|
-
child?: import("svelte").Snippet<[{
|
|
9
|
-
props: Record<string, unknown>;
|
|
10
|
-
}]> | undefined;
|
|
11
|
-
children?: import("svelte").Snippet<[]> | undefined;
|
|
12
|
-
style?: import("bits-ui").StyleProperties | string | null | undefined;
|
|
13
|
-
ref?: HTMLElement | null | undefined;
|
|
14
|
-
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").SeparatorRootPropsWithoutHTML>, {}, "ref">;
|
|
15
|
-
};
|
|
16
|
-
export type { ButtonGroupRootProps };
|
|
1
|
+
export * as ButtonGroupPrimitive from './exports-primitive.js';
|
|
2
|
+
export type { ButtonGroupRootProps, ButtonGroupSeparatorProps } from './types.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ButtonGroupVariantsProps } from './styles.js';
|
|
2
|
+
import type { PrimitiveDivAttributes } from '../../internal/types/html-attributes.js';
|
|
3
|
+
import type { WithChildren, WithElementRef, Without } from 'svelte-toolbelt';
|
|
4
|
+
import type { SeparatorRootProps } from 'bits-ui';
|
|
5
|
+
type ButtonGroupRootPropsWithoutHTML = WithElementRef<WithChildren<{}>> & ButtonGroupVariantsProps;
|
|
6
|
+
export type ButtonGroupRootProps = ButtonGroupRootPropsWithoutHTML & Without<PrimitiveDivAttributes, ButtonGroupRootPropsWithoutHTML>;
|
|
7
|
+
export type ButtonGroupSeparatorProps = SeparatorRootProps;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
export type CheckboxRootProps = CheckboxRootPropsPrimitive & CheckboxVariantsProps;
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
1
|
<script lang="ts">
|
|
6
|
-
import { checkboxVariants
|
|
7
|
-
import {
|
|
2
|
+
import { checkboxVariants } from '../styles.js';
|
|
3
|
+
import type { CheckboxRootProps } from '../types.js';
|
|
4
|
+
import { Icon } from '../../icons/index.js';
|
|
8
5
|
import { useId } from '../../../internal/utils/common.js';
|
|
9
|
-
import { Checkbox
|
|
6
|
+
import { Checkbox } from 'bits-ui';
|
|
10
7
|
import { cubicInOut } from 'svelte/easing';
|
|
11
8
|
import { fly } from 'svelte/transition';
|
|
12
9
|
|
|
10
|
+
const uid = $props.id();
|
|
11
|
+
|
|
13
12
|
let {
|
|
14
13
|
ref = $bindable(null),
|
|
15
|
-
id = useId(),
|
|
14
|
+
id = useId(uid),
|
|
16
15
|
checked = $bindable(false),
|
|
17
16
|
indeterminate = $bindable(false),
|
|
18
17
|
class: className,
|
|
@@ -45,7 +44,7 @@
|
|
|
45
44
|
out:fly={{ duration: 250, y: -4, easing: cubicInOut }}
|
|
46
45
|
class={variants.checkedIndicator()}
|
|
47
46
|
>
|
|
48
|
-
<
|
|
47
|
+
<Icon.Check width={16} height={16} />
|
|
49
48
|
</span>
|
|
50
49
|
{/if}
|
|
51
50
|
{/snippet}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
declare const Checkbox: import("svelte").Component<CheckboxRootProps, {}, "ref" | "checked" | "indeterminate">;
|
|
1
|
+
import type { CheckboxRootProps } from '../types.js';
|
|
2
|
+
import { Checkbox } from 'bits-ui';
|
|
3
|
+
declare const Checkbox: import("svelte").Component<CheckboxRootProps, {}, "checked" | "indeterminate" | "ref">;
|
|
5
4
|
type Checkbox = ReturnType<typeof Checkbox>;
|
|
6
5
|
export default Checkbox;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export const CheckboxPrimitive = {
|
|
4
|
-
Root,
|
|
5
|
-
Group,
|
|
6
|
-
};
|
|
1
|
+
export * as CheckboxPrimitive from './exports-primitive.js';
|
|
2
|
+
export { CheckboxController } from './model/index.js';
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
type
|
|
1
|
+
type CheckboxControllerOpts = {
|
|
2
2
|
defaultChecked?: boolean;
|
|
3
3
|
defaultIndeterminate?: boolean;
|
|
4
4
|
onCheckedChange?: (checked: boolean) => void;
|
|
5
5
|
onIndeterminateChange?: (indeterminate: boolean) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class CheckboxController {
|
|
8
8
|
#private;
|
|
9
|
-
constructor(opts?:
|
|
9
|
+
constructor(opts?: CheckboxControllerOpts);
|
|
10
10
|
get checked(): boolean;
|
|
11
11
|
set checked(value: boolean);
|
|
12
12
|
get indeterminate(): boolean;
|
|
13
13
|
set indeterminate(value: boolean);
|
|
14
14
|
}
|
|
15
|
-
export declare const createCheckboxModel: (opts?: CheckboxModelOpts) => CheckboxModel;
|
|
16
15
|
export {};
|
package/dist/components/checkbox/model/{checkbox-model.svelte.js → checkbox-controller.svelte.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class
|
|
1
|
+
export class CheckboxController {
|
|
2
2
|
#opts;
|
|
3
3
|
#checked = $state(false);
|
|
4
4
|
#indeterminate = $state(false);
|
|
@@ -20,6 +20,3 @@ export class CheckboxModel {
|
|
|
20
20
|
this.#opts.onIndeterminateChange?.(value);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
export const createCheckboxModel = (opts = {}) => {
|
|
24
|
-
return new CheckboxModel(opts);
|
|
25
|
-
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { CheckboxController } from './checkbox-controller.svelte.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { CheckboxController } from './checkbox-controller.svelte.js';
|