@casinogate/ui 0.0.3

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.
Files changed (91) hide show
  1. package/README.md +171 -0
  2. package/dist/app.d.ts +15 -0
  3. package/dist/app.html +12 -0
  4. package/dist/assets/css/root.css +1057 -0
  5. package/dist/assets/css/theme.css +255 -0
  6. package/dist/assets/icons/check.svg +4 -0
  7. package/dist/assets/icons/chevron-down.svg +4 -0
  8. package/dist/assets/icons/chevron-left.svg +4 -0
  9. package/dist/assets/icons/chevron-right.svg +4 -0
  10. package/dist/assets/icons/chevron-small-down.svg +4 -0
  11. package/dist/assets/icons/chevron-small-left.svg +4 -0
  12. package/dist/assets/icons/chevron-small-right.svg +4 -0
  13. package/dist/assets/icons/chevron-small-up.svg +4 -0
  14. package/dist/assets/icons/chevron-up.svg +4 -0
  15. package/dist/assets/icons/error.svg +4 -0
  16. package/dist/assets/icons/info.svg +4 -0
  17. package/dist/assets/icons/minus.svg +4 -0
  18. package/dist/assets/icons/success.svg +4 -0
  19. package/dist/assets/icons/warning.svg +3 -0
  20. package/dist/components/button/button.component.svelte +173 -0
  21. package/dist/components/button/button.component.svelte.d.ts +239 -0
  22. package/dist/components/button/button.stories.svelte +106 -0
  23. package/dist/components/button/button.stories.svelte.d.ts +19 -0
  24. package/dist/components/button/index.d.ts +233 -0
  25. package/dist/components/button/index.js +4 -0
  26. package/dist/components/checkbox/checkbox.stories.svelte +52 -0
  27. package/dist/components/checkbox/checkbox.stories.svelte.d.ts +18 -0
  28. package/dist/components/checkbox/components/checkbox.group.svelte +3 -0
  29. package/dist/components/checkbox/components/checkbox.group.svelte.d.ts +18 -0
  30. package/dist/components/checkbox/components/checkbox.root.svelte +51 -0
  31. package/dist/components/checkbox/components/checkbox.root.svelte.d.ts +6 -0
  32. package/dist/components/checkbox/index.js +6 -0
  33. package/dist/components/checkbox/model/checkbox-model.svelte.d.ts +16 -0
  34. package/dist/components/checkbox/model/checkbox-model.svelte.js +25 -0
  35. package/dist/components/checkbox/model/index.d.ts +1 -0
  36. package/dist/components/checkbox/model/index.js +1 -0
  37. package/dist/components/checkbox/styles.d.ts +126 -0
  38. package/dist/components/checkbox/styles.js +60 -0
  39. package/dist/components/collapsible/collapsible.stories.svelte +53 -0
  40. package/dist/components/collapsible/collapsible.stories.svelte.d.ts +18 -0
  41. package/dist/components/collapsible/components/collapsaible.content.svelte +40 -0
  42. package/dist/components/collapsible/components/collapsaible.content.svelte.d.ts +5 -0
  43. package/dist/components/collapsible/components/collapsaible.group.svelte +0 -0
  44. package/dist/components/collapsible/components/collapsaible.group.svelte.d.ts +26 -0
  45. package/dist/components/collapsible/components/collapsaible.root.svelte +62 -0
  46. package/dist/components/collapsible/components/collapsaible.root.svelte.d.ts +5 -0
  47. package/dist/components/collapsible/components/collapsaible.svelte.d.ts +44 -0
  48. package/dist/components/collapsible/components/collapsaible.svelte.js +92 -0
  49. package/dist/components/collapsible/components/collapsaible.trigger.svelte +50 -0
  50. package/dist/components/collapsible/components/collapsaible.trigger.svelte.d.ts +8 -0
  51. package/dist/components/collapsible/index.d.ts +9 -0
  52. package/dist/components/collapsible/index.js +8 -0
  53. package/dist/components/collapsible/styles.d.ts +178 -0
  54. package/dist/components/collapsible/styles.js +27 -0
  55. package/dist/components/collapsible/types.d.ts +1 -0
  56. package/dist/components/collapsible/types.js +1 -0
  57. package/dist/components/switch/components/switch.root.svelte +27 -0
  58. package/dist/components/switch/components/switch.root.svelte.d.ts +6 -0
  59. package/dist/components/switch/components/switch.thumb.svelte +17 -0
  60. package/dist/components/switch/components/switch.thumb.svelte.d.ts +5 -0
  61. package/dist/components/switch/index.d.ts +5 -0
  62. package/dist/components/switch/index.js +7 -0
  63. package/dist/components/switch/model/index.d.ts +1 -0
  64. package/dist/components/switch/model/index.js +1 -0
  65. package/dist/components/switch/model/switch-model.svelte.d.ts +12 -0
  66. package/dist/components/switch/model/switch-model.svelte.js +18 -0
  67. package/dist/components/switch/styles.d.ts +74 -0
  68. package/dist/components/switch/styles.js +44 -0
  69. package/dist/components/switch/switch.stories.svelte +48 -0
  70. package/dist/components/switch/switch.stories.svelte.d.ts +18 -0
  71. package/dist/components/toast/toast.component.svelte +149 -0
  72. package/dist/components/toast/toast.component.svelte.d.ts +158 -0
  73. package/dist/components/toast/toast.stories.svelte +96 -0
  74. package/dist/components/toast/toast.stories.svelte.d.ts +19 -0
  75. package/dist/index.d.ts +1 -0
  76. package/dist/index.js +1 -0
  77. package/dist/internal/types/attrs.d.ts +1 -0
  78. package/dist/internal/types/attrs.js +3 -0
  79. package/dist/internal/types/common.d.ts +25 -0
  80. package/dist/internal/types/common.js +1 -0
  81. package/dist/internal/types/composition.d.ts +45 -0
  82. package/dist/internal/types/composition.js +1 -0
  83. package/dist/internal/types/html-attributes.d.ts +48 -0
  84. package/dist/internal/types/html-attributes.js +1 -0
  85. package/dist/internal/utils/arrays.d.ts +1 -0
  86. package/dist/internal/utils/arrays.js +30 -0
  87. package/dist/internal/utils/common.d.ts +6 -0
  88. package/dist/internal/utils/common.js +9 -0
  89. package/dist/internal/utils/tailwindcss.d.ts +3 -0
  90. package/dist/internal/utils/tailwindcss.js +29 -0
  91. package/package.json +75 -0
@@ -0,0 +1,239 @@
1
+ import type { WithVariants } from '../../internal/types/composition.js';
2
+ export declare const buttonStyles: 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 ButtonProps = WithVariants<ButtonRootProps & {
232
+ startChevron?: Snippet;
233
+ endChevron?: Snippet;
234
+ }, typeof buttonStyles>;
235
+ import { Button, type ButtonRootProps } from 'bits-ui';
236
+ import type { Snippet } from 'svelte';
237
+ declare const Button: import("svelte").Component<ButtonProps, {}, "ref">;
238
+ type Button = ReturnType<typeof Button>;
239
+ export default Button;
@@ -0,0 +1,106 @@
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
+ />
@@ -0,0 +1,19 @@
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;
@@ -0,0 +1,233 @@
1
+ import { type ButtonProps } from './button.component.svelte';
2
+ export declare const Button: import("svelte").Component<ButtonProps, {}, "ref"> & {
3
+ styles: import("tailwind-variants").TVReturnType<{
4
+ variant: {
5
+ primary: {
6
+ root: string[];
7
+ };
8
+ outline: {
9
+ root: string[];
10
+ };
11
+ ghost: {
12
+ root: string[];
13
+ };
14
+ link: {
15
+ root: string[];
16
+ };
17
+ };
18
+ loading: {
19
+ true: {
20
+ root: string;
21
+ };
22
+ };
23
+ shadow: {
24
+ true: {
25
+ root: string;
26
+ };
27
+ };
28
+ size: {
29
+ xs: {
30
+ root: string;
31
+ };
32
+ sm: {
33
+ root: string;
34
+ };
35
+ md: {
36
+ root: string;
37
+ };
38
+ lg: {
39
+ root: string;
40
+ };
41
+ };
42
+ w: {
43
+ full: {
44
+ root: string;
45
+ };
46
+ auto: {
47
+ root: string;
48
+ };
49
+ fit: {
50
+ root: string;
51
+ };
52
+ clean: {
53
+ root: string;
54
+ };
55
+ };
56
+ rounded: {
57
+ sm: {
58
+ root: string;
59
+ };
60
+ md: {
61
+ root: string;
62
+ };
63
+ lg: {
64
+ root: string;
65
+ };
66
+ xl: {
67
+ root: string;
68
+ };
69
+ full: {
70
+ root: string;
71
+ };
72
+ clean: {
73
+ root: string;
74
+ };
75
+ };
76
+ }, {
77
+ root: string[];
78
+ chevron: string[];
79
+ }, undefined, {
80
+ variant: {
81
+ primary: {
82
+ root: string[];
83
+ };
84
+ outline: {
85
+ root: string[];
86
+ };
87
+ ghost: {
88
+ root: string[];
89
+ };
90
+ link: {
91
+ root: string[];
92
+ };
93
+ };
94
+ loading: {
95
+ true: {
96
+ root: string;
97
+ };
98
+ };
99
+ shadow: {
100
+ true: {
101
+ root: string;
102
+ };
103
+ };
104
+ size: {
105
+ xs: {
106
+ root: string;
107
+ };
108
+ sm: {
109
+ root: string;
110
+ };
111
+ md: {
112
+ root: string;
113
+ };
114
+ lg: {
115
+ root: string;
116
+ };
117
+ };
118
+ w: {
119
+ full: {
120
+ root: string;
121
+ };
122
+ auto: {
123
+ root: string;
124
+ };
125
+ fit: {
126
+ root: string;
127
+ };
128
+ clean: {
129
+ root: string;
130
+ };
131
+ };
132
+ rounded: {
133
+ sm: {
134
+ root: string;
135
+ };
136
+ md: {
137
+ root: string;
138
+ };
139
+ lg: {
140
+ root: string;
141
+ };
142
+ xl: {
143
+ root: string;
144
+ };
145
+ full: {
146
+ root: string;
147
+ };
148
+ clean: {
149
+ root: string;
150
+ };
151
+ };
152
+ }, {
153
+ root: string[];
154
+ chevron: string[];
155
+ }, import("tailwind-variants").TVReturnType<{
156
+ variant: {
157
+ primary: {
158
+ root: string[];
159
+ };
160
+ outline: {
161
+ root: string[];
162
+ };
163
+ ghost: {
164
+ root: string[];
165
+ };
166
+ link: {
167
+ root: string[];
168
+ };
169
+ };
170
+ loading: {
171
+ true: {
172
+ root: string;
173
+ };
174
+ };
175
+ shadow: {
176
+ true: {
177
+ root: string;
178
+ };
179
+ };
180
+ size: {
181
+ xs: {
182
+ root: string;
183
+ };
184
+ sm: {
185
+ root: string;
186
+ };
187
+ md: {
188
+ root: string;
189
+ };
190
+ lg: {
191
+ root: string;
192
+ };
193
+ };
194
+ w: {
195
+ full: {
196
+ root: string;
197
+ };
198
+ auto: {
199
+ root: string;
200
+ };
201
+ fit: {
202
+ root: string;
203
+ };
204
+ clean: {
205
+ root: string;
206
+ };
207
+ };
208
+ rounded: {
209
+ sm: {
210
+ root: string;
211
+ };
212
+ md: {
213
+ root: string;
214
+ };
215
+ lg: {
216
+ root: string;
217
+ };
218
+ xl: {
219
+ root: string;
220
+ };
221
+ full: {
222
+ root: string;
223
+ };
224
+ clean: {
225
+ root: string;
226
+ };
227
+ };
228
+ }, {
229
+ root: string[];
230
+ chevron: string[];
231
+ }, undefined, unknown, unknown, undefined>>;
232
+ };
233
+ export type { ButtonProps };
@@ -0,0 +1,4 @@
1
+ import Root, { buttonStyles } from './button.component.svelte';
2
+ export const Button = Object.assign(Root, {
3
+ styles: buttonStyles,
4
+ });
@@ -0,0 +1,52 @@
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} />
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1,3 @@
1
+ <script lang="ts" module></script>
2
+
3
+ <script lang="ts"></script>
@@ -0,0 +1,18 @@
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;