@casinogate/ui 1.6.2 → 1.7.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 +197 -32
- package/dist/assets/css/theme.css +6 -3
- package/dist/components/breadcrumb/styles.d.ts +21 -21
- package/dist/components/button/button.component.svelte +2 -1
- package/dist/components/button/styles.js +4 -4
- package/dist/components/collapsible/styles.d.ts +8 -8
- package/dist/components/dialog/dialog.stories.svelte +28 -14
- package/dist/components/dropdown/components/dropdown.content.svelte +41 -0
- package/dist/components/dropdown/components/dropdown.content.svelte.d.ts +4 -0
- package/dist/components/dropdown/components/dropdown.group-heading.svelte +16 -0
- package/dist/components/dropdown/components/dropdown.group-heading.svelte.d.ts +4 -0
- package/dist/components/dropdown/components/dropdown.group.svelte +16 -0
- package/dist/components/dropdown/components/dropdown.group.svelte.d.ts +4 -0
- package/dist/components/dropdown/components/dropdown.item.svelte +22 -0
- package/dist/components/dropdown/components/dropdown.item.svelte.d.ts +4 -0
- package/dist/components/dropdown/components/dropdown.portal.svelte +10 -0
- package/dist/components/dropdown/components/dropdown.portal.svelte.d.ts +3 -0
- package/dist/components/dropdown/components/dropdown.root.svelte +10 -0
- package/dist/components/dropdown/components/dropdown.root.svelte.d.ts +3 -0
- package/dist/components/dropdown/components/dropdown.separator.svelte +22 -0
- package/dist/components/dropdown/components/dropdown.separator.svelte.d.ts +4 -0
- package/dist/components/dropdown/components/dropdown.sub-content.svelte +16 -0
- package/dist/components/dropdown/components/dropdown.sub-content.svelte.d.ts +4 -0
- package/dist/components/dropdown/components/dropdown.sub-trigger.svelte +21 -0
- package/dist/components/dropdown/components/dropdown.sub-trigger.svelte.d.ts +4 -0
- package/dist/components/dropdown/components/dropdown.sub.svelte +8 -0
- package/dist/components/dropdown/components/dropdown.sub.svelte.d.ts +3 -0
- package/dist/components/dropdown/components/dropdown.trigger.svelte +16 -0
- package/dist/components/dropdown/components/dropdown.trigger.svelte.d.ts +4 -0
- package/dist/components/dropdown/dropdown.stories.svelte +151 -0
- package/dist/components/dropdown/dropdown.stories.svelte.d.ts +19 -0
- package/dist/components/dropdown/dropdown.svelte +136 -0
- package/dist/components/dropdown/dropdown.svelte.d.ts +6 -0
- package/dist/components/dropdown/exports-primitive.d.ts +11 -0
- package/dist/components/dropdown/exports-primitive.js +11 -0
- package/dist/components/dropdown/exports.d.ts +1 -0
- package/dist/components/dropdown/exports.js +1 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/dropdown/index.js +2 -0
- package/dist/components/dropdown/styles.d.ts +496 -0
- package/dist/components/dropdown/styles.js +109 -0
- package/dist/components/dropdown/types.d.ts +62 -0
- package/dist/components/dropdown/types.js +1 -0
- package/dist/components/field/styles.d.ts +15 -15
- package/dist/components/popover/components/popover.content.svelte +7 -2
- package/dist/components/popover/components/popover.content.svelte.d.ts +2 -2
- package/dist/components/popover/components/popover.root.svelte +0 -6
- package/dist/components/popover/components/popover.trigger.svelte +6 -2
- package/dist/components/popover/components/popover.trigger.svelte.d.ts +2 -2
- package/dist/components/popover/popover.stories.svelte +112 -52
- package/dist/components/popover/popover.stories.svelte.d.ts +0 -1
- package/dist/components/popover/styles.d.ts +60 -52
- package/dist/components/popover/styles.js +37 -14
- package/dist/components/popover/types.d.ts +4 -4
- package/dist/components/separator/separator.svelte +4 -5
- package/dist/components/separator/separator.svelte.d.ts +2 -2
- package/dist/components/separator/styles.d.ts +18 -0
- package/dist/components/separator/styles.js +10 -0
- package/dist/components/separator/types.d.ts +2 -1
- package/dist/components/spinner/spinner.svelte +1 -6
- package/dist/internal/utils/tailwindcss.d.ts +3 -2
- package/dist/internal/utils/tailwindcss.js +25 -5
- package/package.json +2 -2
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
import { SLOT_ATTR_NAME } from '../../internal/constants/attrs.js';
|
|
3
3
|
import { cn } from '../../internal/utils/common.js';
|
|
4
4
|
import { Separator as SeparatorPrimitive } from 'bits-ui';
|
|
5
|
+
import { separatorStyles } from './styles.js';
|
|
5
6
|
import type { SeparatorProps } from './types.js';
|
|
6
7
|
|
|
7
|
-
let { ref = $bindable(null), class: className, ...restProps }: SeparatorProps = $props();
|
|
8
|
+
let { ref = $bindable(null), class: className, orientation = 'horizontal', ...restProps }: SeparatorProps = $props();
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
11
|
<SeparatorPrimitive.Root
|
|
11
12
|
bind:ref
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
13
|
+
{orientation}
|
|
14
|
+
class={cn(separatorStyles({ orientation }), className)}
|
|
16
15
|
{...{ [SLOT_ATTR_NAME]: 'separator' }}
|
|
17
16
|
{...restProps}
|
|
18
17
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const Separator: import("svelte").Component<
|
|
1
|
+
import type { SeparatorProps } from './types.js';
|
|
2
|
+
declare const Separator: import("svelte").Component<SeparatorProps, {}, "ref">;
|
|
3
3
|
type Separator = ReturnType<typeof Separator>;
|
|
4
4
|
export default Separator;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { VariantProps } from 'tailwind-variants';
|
|
2
|
+
export declare const separatorStyles: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
orientation: {
|
|
4
|
+
horizontal: string[];
|
|
5
|
+
vertical: string[];
|
|
6
|
+
};
|
|
7
|
+
}, undefined, string[], {
|
|
8
|
+
orientation: {
|
|
9
|
+
horizontal: string[];
|
|
10
|
+
vertical: string[];
|
|
11
|
+
};
|
|
12
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
13
|
+
orientation: {
|
|
14
|
+
horizontal: string[];
|
|
15
|
+
vertical: string[];
|
|
16
|
+
};
|
|
17
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
18
|
+
export type SeparatorVariantsProps = VariantProps<typeof separatorStyles>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { tv } from '../../internal/utils/tailwindcss.js';
|
|
2
|
+
export const separatorStyles = tv({
|
|
3
|
+
base: ['cgui:bg-stroke-divider cgui:shrink-0'],
|
|
4
|
+
variants: {
|
|
5
|
+
orientation: {
|
|
6
|
+
horizontal: ['cgui:h-px cgui:w-full'],
|
|
7
|
+
vertical: ['cgui:w-px cgui:h-full'],
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { type SeparatorRootProps as SeparatorRootPropsPrimitive } from 'bits-ui';
|
|
2
|
-
|
|
2
|
+
import type { SeparatorVariantsProps } from './styles.js';
|
|
3
|
+
export type SeparatorProps = SeparatorRootPropsPrimitive & Omit<SeparatorVariantsProps, 'orientation'>;
|
|
@@ -6,9 +6,4 @@
|
|
|
6
6
|
let { class: className, size = 24, ...restProps }: SpinnerProps = $props();
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
|
-
<Icon.Spinner
|
|
10
|
-
class={cn('cgui:animate-spin cgui:text-icon-default', className)}
|
|
11
|
-
width={size}
|
|
12
|
-
height={size}
|
|
13
|
-
{...restProps}
|
|
14
|
-
/>
|
|
9
|
+
<Icon.Spinner class={cn('cgui:animate-spin', className)} width={size} height={size} {...restProps} />
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type TV } from 'tailwind-variants';
|
|
1
2
|
declare const twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
|
|
2
|
-
declare const tv:
|
|
3
|
-
export {
|
|
3
|
+
export declare const tv: TV;
|
|
4
|
+
export { twMerge };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { extendTailwindMerge, } from 'tailwind-merge';
|
|
2
|
-
import {
|
|
2
|
+
import { tv as tvBase } from 'tailwind-variants';
|
|
3
3
|
const tailwindMergeConfig = {
|
|
4
4
|
prefix: 'cgui:',
|
|
5
5
|
extend: {
|
|
@@ -35,12 +35,32 @@ const tailwindMergeConfig = {
|
|
|
35
35
|
'border-state-info-light',
|
|
36
36
|
],
|
|
37
37
|
blur: ['blur-xxs', 'blur-xs', 'blur-sm', 'blur-md', 'blur-lg', 'blur-xl', 'blur-2xl'],
|
|
38
|
+
shadow: [
|
|
39
|
+
'shadow-base',
|
|
40
|
+
'shadow-toast',
|
|
41
|
+
'shadow-switch-thumb',
|
|
42
|
+
'shadow-segment-item',
|
|
43
|
+
'shadow-popover',
|
|
44
|
+
'shadow-select',
|
|
45
|
+
'shadow-dialog',
|
|
46
|
+
'shadow-dropdown',
|
|
47
|
+
],
|
|
38
48
|
},
|
|
39
49
|
},
|
|
40
50
|
};
|
|
51
|
+
const tvMergeConfig = {
|
|
52
|
+
classGroups: tailwindMergeConfig.extend?.classGroups,
|
|
53
|
+
};
|
|
41
54
|
const twMerge = extendTailwindMerge(tailwindMergeConfig);
|
|
42
|
-
const tv =
|
|
43
|
-
|
|
44
|
-
|
|
55
|
+
export const tv = (options, config) => tvBase(options, {
|
|
56
|
+
...config,
|
|
57
|
+
twMerge: config?.twMerge ?? true,
|
|
58
|
+
twMergeConfig: {
|
|
59
|
+
...config?.twMergeConfig,
|
|
60
|
+
classGroups: {
|
|
61
|
+
...tvMergeConfig.classGroups,
|
|
62
|
+
...config?.twMergeConfig?.classGroups,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
45
65
|
});
|
|
46
|
-
export {
|
|
66
|
+
export { twMerge };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casinogate/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"svelte": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"runed": "^0.35.1",
|
|
67
67
|
"svelte-toolbelt": "^0.10.6",
|
|
68
68
|
"tailwind-merge": "^3.3.1",
|
|
69
|
-
"tailwind-variants": "^
|
|
69
|
+
"tailwind-variants": "^3.2.2"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"dev": "vite dev",
|