@casinogate/ui 2.0.4 → 2.0.6
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 +26 -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 +6 -0
- package/dist/components/toast/styles.js +3 -1
- package/dist/composed/combobox/async/combobox.async.svelte +9 -11
- package/dist/composed/combobox/creatable/combobox.creatable.svelte +2 -2
- package/dist/composed/combobox/types.d.ts +1 -14
- package/dist/composed/toast/index.d.ts +4 -0
- package/dist/composed/toast/index.js +2 -0
- package/dist/composed/toast/toast.js +55 -0
- package/dist/composed/toast/toaster/index.d.ts +2 -0
- package/dist/composed/toast/toaster/index.js +1 -0
- package/dist/composed/toast/toaster/toaster.svelte +23 -0
- package/dist/composed/toast/toaster/toaster.svelte.d.ts +4 -0
- package/dist/primitives/toast/components/toast.icon.svelte +1 -0
- package/dist/primitives/toast/styles.d.ts +6 -0
- package/dist/primitives/toast/styles.js +3 -1
- package/package.json +2 -1
package/dist/assets/css/root.css
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
--cgui-spacing: 0.25rem;
|
|
11
11
|
--cgui-container-sm: 24rem;
|
|
12
12
|
--cgui-container-xl: 36rem;
|
|
13
|
+
--cgui-container-2xl: 42rem;
|
|
13
14
|
--cgui-text-xs: 0.75rem;
|
|
14
15
|
--cgui-text-xs--line-height: calc(1 / 0.75);
|
|
15
16
|
--cgui-text-sm: 0.875rem;
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
--cgui-font-weight-normal: 400;
|
|
22
23
|
--cgui-font-weight-medium: 500;
|
|
23
24
|
--cgui-font-weight-semibold: 600;
|
|
25
|
+
--cgui-tracking-wide: 0.025em;
|
|
24
26
|
--cgui-leading-relaxed: 1.625;
|
|
25
27
|
--cgui-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
26
28
|
--cgui-animate-spin: spin 1s linear infinite;
|
|
@@ -646,6 +648,9 @@
|
|
|
646
648
|
.cgui\:w-screen {
|
|
647
649
|
width: 100vw;
|
|
648
650
|
}
|
|
651
|
+
.cgui\:max-w-2xl {
|
|
652
|
+
max-width: var(--cgui-container-2xl);
|
|
653
|
+
}
|
|
649
654
|
.cgui\:max-w-32 {
|
|
650
655
|
max-width: calc(var(--cgui-spacing) * 32);
|
|
651
656
|
}
|
|
@@ -724,6 +729,9 @@
|
|
|
724
729
|
.cgui\:min-w-42 {
|
|
725
730
|
min-width: calc(var(--cgui-spacing) * 42);
|
|
726
731
|
}
|
|
732
|
+
.cgui\:min-w-60 {
|
|
733
|
+
min-width: calc(var(--cgui-spacing) * 60);
|
|
734
|
+
}
|
|
727
735
|
.cgui\:min-w-64 {
|
|
728
736
|
min-width: calc(var(--cgui-spacing) * 64);
|
|
729
737
|
}
|
|
@@ -1413,6 +1421,10 @@
|
|
|
1413
1421
|
--tw-font-weight: var(--cgui-font-weight-semibold);
|
|
1414
1422
|
font-weight: var(--cgui-font-weight-semibold);
|
|
1415
1423
|
}
|
|
1424
|
+
.cgui\:tracking-wide {
|
|
1425
|
+
--tw-tracking: var(--cgui-tracking-wide);
|
|
1426
|
+
letter-spacing: var(--cgui-tracking-wide);
|
|
1427
|
+
}
|
|
1416
1428
|
.cgui\:whitespace-nowrap {
|
|
1417
1429
|
white-space: nowrap;
|
|
1418
1430
|
}
|
|
@@ -1473,6 +1485,9 @@
|
|
|
1473
1485
|
.cgui\:text-state-warning {
|
|
1474
1486
|
color: var(--cg-ui-color-state-warning);
|
|
1475
1487
|
}
|
|
1488
|
+
.cgui\:uppercase {
|
|
1489
|
+
text-transform: uppercase;
|
|
1490
|
+
}
|
|
1476
1491
|
.cgui\:underline {
|
|
1477
1492
|
text-decoration-line: underline;
|
|
1478
1493
|
}
|
|
@@ -1747,6 +1762,12 @@
|
|
|
1747
1762
|
border-radius: calc(infinity * 1px);
|
|
1748
1763
|
}
|
|
1749
1764
|
}
|
|
1765
|
+
.cgui\:before\:bg-fg-regular {
|
|
1766
|
+
&::before {
|
|
1767
|
+
content: var(--tw-content);
|
|
1768
|
+
background-color: var(--cg-ui-color-fg-regular);
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1750
1771
|
.cgui\:before\:bg-state-error {
|
|
1751
1772
|
&::before {
|
|
1752
1773
|
content: var(--tw-content);
|
|
@@ -3682,6 +3703,10 @@
|
|
|
3682
3703
|
syntax: "*";
|
|
3683
3704
|
inherits: false;
|
|
3684
3705
|
}
|
|
3706
|
+
@property --tw-tracking {
|
|
3707
|
+
syntax: "*";
|
|
3708
|
+
inherits: false;
|
|
3709
|
+
}
|
|
3685
3710
|
@property --tw-shadow {
|
|
3686
3711
|
syntax: "*";
|
|
3687
3712
|
inherits: false;
|
|
@@ -3809,6 +3834,7 @@
|
|
|
3809
3834
|
--tw-gradient-to-position: 100%;
|
|
3810
3835
|
--tw-leading: initial;
|
|
3811
3836
|
--tw-font-weight: initial;
|
|
3837
|
+
--tw-tracking: initial;
|
|
3812
3838
|
--tw-shadow: 0 0 #0000;
|
|
3813
3839
|
--tw-shadow-color: initial;
|
|
3814
3840
|
--tw-shadow-alpha: 100%;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * as ToastPrimitive from './components/index.js';
|
|
2
|
-
export { Toast } from '../../composed/toast/index.js';
|
|
2
|
+
export { Toast, toast, Toaster } from '../../composed/toast/index.js';
|
|
3
|
+
export type { ToastId, ToastVariant, ToastInput, ToastShowInput, ToastPromiseInput, ToasterProps, } from '../../composed/toast/index.js';
|
|
3
4
|
export * from './types.js';
|
|
@@ -5,6 +5,7 @@ export declare const toastPrimitiveRootStyles: import("tailwind-variants").TVRet
|
|
|
5
5
|
warning: string;
|
|
6
6
|
success: string;
|
|
7
7
|
info: string;
|
|
8
|
+
loading: string;
|
|
8
9
|
};
|
|
9
10
|
rounded: {
|
|
10
11
|
xs: string;
|
|
@@ -19,6 +20,7 @@ export declare const toastPrimitiveRootStyles: import("tailwind-variants").TVRet
|
|
|
19
20
|
warning: string;
|
|
20
21
|
success: string;
|
|
21
22
|
info: string;
|
|
23
|
+
loading: string;
|
|
22
24
|
};
|
|
23
25
|
rounded: {
|
|
24
26
|
xs: string;
|
|
@@ -33,6 +35,7 @@ export declare const toastPrimitiveRootStyles: import("tailwind-variants").TVRet
|
|
|
33
35
|
warning: string;
|
|
34
36
|
success: string;
|
|
35
37
|
info: string;
|
|
38
|
+
loading: string;
|
|
36
39
|
};
|
|
37
40
|
rounded: {
|
|
38
41
|
xs: string;
|
|
@@ -61,6 +64,7 @@ export declare const toastPrimitiveInnerIconStyles: import("tailwind-variants").
|
|
|
61
64
|
warning: string;
|
|
62
65
|
success: string;
|
|
63
66
|
info: string;
|
|
67
|
+
loading: string;
|
|
64
68
|
};
|
|
65
69
|
}, undefined, never[], {
|
|
66
70
|
variant: {
|
|
@@ -68,6 +72,7 @@ export declare const toastPrimitiveInnerIconStyles: import("tailwind-variants").
|
|
|
68
72
|
warning: string;
|
|
69
73
|
success: string;
|
|
70
74
|
info: string;
|
|
75
|
+
loading: string;
|
|
71
76
|
};
|
|
72
77
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
73
78
|
variant: {
|
|
@@ -75,6 +80,7 @@ export declare const toastPrimitiveInnerIconStyles: import("tailwind-variants").
|
|
|
75
80
|
warning: string;
|
|
76
81
|
success: string;
|
|
77
82
|
info: string;
|
|
83
|
+
loading: string;
|
|
78
84
|
};
|
|
79
85
|
}, undefined, never[], unknown, unknown, undefined>>;
|
|
80
86
|
export declare const toastPrimitiveBodyStyles: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tv } from '../../internal/utils/tailwindcss.js';
|
|
2
|
-
const ToastVariants = ['error', 'warning', 'success', 'info'];
|
|
2
|
+
const ToastVariants = ['error', 'warning', 'success', 'info', 'loading'];
|
|
3
3
|
const ToastRoundings = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
4
4
|
export const toastPrimitiveRootStyles = tv({
|
|
5
5
|
base: [
|
|
@@ -15,6 +15,7 @@ export const toastPrimitiveRootStyles = tv({
|
|
|
15
15
|
warning: 'cgui:before:bg-state-warning',
|
|
16
16
|
success: 'cgui:before:bg-state-success',
|
|
17
17
|
info: 'cgui:before:bg-state-info',
|
|
18
|
+
loading: 'cgui:before:bg-fg-regular',
|
|
18
19
|
},
|
|
19
20
|
rounded: {
|
|
20
21
|
xs: 'cgui:rounded-xs',
|
|
@@ -43,6 +44,7 @@ export const toastPrimitiveInnerIconStyles = tv({
|
|
|
43
44
|
warning: 'cgui:text-state-warning',
|
|
44
45
|
success: 'cgui:text-state-success',
|
|
45
46
|
info: 'cgui:text-state-info',
|
|
47
|
+
loading: 'cgui:text-fg-regular cgui:animate-spin',
|
|
46
48
|
},
|
|
47
49
|
},
|
|
48
50
|
});
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
<script lang="ts" generics="TItem extends ComboboxItem">
|
|
2
2
|
import type { ComboboxAsyncProps, ComboboxItem } from '../types.js';
|
|
3
3
|
|
|
4
|
+
import { Icon, Icon as IconComponent } from '../../../atomic/icons/index.js';
|
|
4
5
|
import { SELECTION_TYPE } from '../../../internal/constants/selection-type.js';
|
|
5
6
|
import { boolAttr } from '../../../internal/utils/attrs.js';
|
|
6
7
|
import { cn, noop } from '../../../internal/utils/common.js';
|
|
8
|
+
import { Command as CommandPrimitive } from '../../../primitives/command/index.js';
|
|
9
|
+
import { Kbd } from '../../../primitives/kbd/index.js';
|
|
10
|
+
import { Popover as PopoverPrimitive } from '../../../primitives/popover/index.js';
|
|
11
|
+
import { Spinner } from '../../../primitives/spinner/index.js';
|
|
7
12
|
import { watch } from 'runed';
|
|
8
13
|
import { afterTick, boxWith } from 'svelte-toolbelt';
|
|
9
14
|
import type { Attachment } from 'svelte/attachments';
|
|
10
15
|
import { cubicInOut } from 'svelte/easing';
|
|
11
16
|
import { fly } from 'svelte/transition';
|
|
12
|
-
import { Icon, Icon as IconComponent } from '../../../atomic/icons/index.js';
|
|
13
|
-
import { Command as CommandPrimitive } from '../../../primitives/command/index.js';
|
|
14
|
-
import { Kbd } from '../../../primitives/kbd/index.js';
|
|
15
|
-
import { Popover as PopoverPrimitive } from '../../../primitives/popover/index.js';
|
|
16
|
-
import { Spinner } from '../../../primitives/spinner/index.js';
|
|
17
|
-
import { comboboxTriggerVariants } from '../styles.js';
|
|
18
17
|
import { useDisplayValue } from '../model/use-display-value.svelte.js';
|
|
19
18
|
import { useGroupedItems } from '../model/use-grouped-items.svelte.js';
|
|
20
19
|
import { useSelectedItems } from '../model/use-selected-items.svelte.js';
|
|
20
|
+
import { comboboxTriggerVariants } from '../styles.js';
|
|
21
21
|
import { useAsyncComboboxData } from './use-async-combobox-data.svelte.js';
|
|
22
22
|
|
|
23
23
|
let {
|
|
@@ -50,11 +50,9 @@
|
|
|
50
50
|
|
|
51
51
|
loading: loadingSnippet,
|
|
52
52
|
pageSize = 10,
|
|
53
|
-
callback,
|
|
54
53
|
loadItems,
|
|
55
54
|
loadImmediate = true,
|
|
56
|
-
debounceMs,
|
|
57
|
-
searchDebounce = 300,
|
|
55
|
+
debounceMs = 300,
|
|
58
56
|
dependsOn,
|
|
59
57
|
clearOnDependencyChange = true,
|
|
60
58
|
onDependencyChange,
|
|
@@ -114,7 +112,7 @@
|
|
|
114
112
|
const hasResults = $derived(items.length > 0);
|
|
115
113
|
|
|
116
114
|
const resolvedLoadItems = $derived.by(() => {
|
|
117
|
-
const loader = loadItems
|
|
115
|
+
const loader = loadItems;
|
|
118
116
|
if (!loader) {
|
|
119
117
|
throw new Error('Combobox.Async requires either loadItems or callback');
|
|
120
118
|
}
|
|
@@ -137,7 +135,7 @@
|
|
|
137
135
|
}
|
|
138
136
|
),
|
|
139
137
|
pageSize: boxWith(() => pageSize),
|
|
140
|
-
debounceMs: boxWith(() => debounceMs
|
|
138
|
+
debounceMs: boxWith(() => debounceMs),
|
|
141
139
|
loadImmediate: boxWith(() => loadImmediate),
|
|
142
140
|
dependency: boxWith(() => dependsOn?.()),
|
|
143
141
|
onDependencyReset: (dependency) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" generics="TItem extends ComboboxItem">
|
|
2
2
|
import { Icon } from '../../../atomic/icons/index.js';
|
|
3
3
|
import { SELECTION_TYPE } from '../../../internal/constants/selection-type.js';
|
|
4
|
-
import { noop } from '../../../internal/utils/common.js';
|
|
4
|
+
import { noop, noopPromise } from '../../../internal/utils/common.js';
|
|
5
5
|
import { Combobox as ComboboxPrimitive } from '../../../primitives/combobox/index.js';
|
|
6
6
|
import { Kbd } from '../../../primitives/kbd/index.js';
|
|
7
7
|
import { boxWith } from 'svelte-toolbelt';
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
label: labelSnippet,
|
|
43
43
|
createLabel = (inputValue) => `Create "${inputValue}"`,
|
|
44
44
|
isCreatable = defaultIsCreatable,
|
|
45
|
-
onCreate,
|
|
45
|
+
onCreate = noopPromise,
|
|
46
46
|
onSelect = noop,
|
|
47
47
|
...restProps
|
|
48
48
|
}: ComboboxCreatableProps<TItem> = $props();
|
|
@@ -53,7 +53,7 @@ export type ComboboxProps<TItem extends ComboboxItem = ComboboxItem> = ComboboxS
|
|
|
53
53
|
type ComboboxCreatableBaseProps<TItem extends ComboboxItem = ComboboxItem> = ComboboxBaseProps<TItem> & {
|
|
54
54
|
createLabel?: (inputValue: string) => string;
|
|
55
55
|
isCreatable?: (inputValue: string, items: TItem[]) => boolean;
|
|
56
|
-
onCreate
|
|
56
|
+
onCreate?: (inputValue: string) => TItem | Promise<TItem>;
|
|
57
57
|
};
|
|
58
58
|
export type ComboboxCreatableSingleProps<TItem extends ComboboxItem = ComboboxItem> = ComboboxCreatableBaseProps<TItem> & {
|
|
59
59
|
type: typeof SELECTION_TYPE.SINGLE;
|
|
@@ -79,20 +79,9 @@ export type ComboboxAsyncLoadResult<TItem extends ComboboxItem> = {
|
|
|
79
79
|
hasMore: boolean;
|
|
80
80
|
};
|
|
81
81
|
export type ComboboxAsyncLoader<TItem extends ComboboxItem = ComboboxItem> = (params: ComboboxAsyncLoadParams) => Promise<ComboboxAsyncLoadResult<TItem>>;
|
|
82
|
-
/** @deprecated Use ComboboxAsyncLoadParams instead. */
|
|
83
|
-
export type ComboboxAsyncCallbackParams = ComboboxAsyncLoadParams;
|
|
84
|
-
/** @deprecated Use ComboboxAsyncLoadResult instead. */
|
|
85
|
-
export type ComboboxAsyncCallbackResult<TItem extends ComboboxItem> = ComboboxAsyncLoadResult<TItem>;
|
|
86
|
-
/** @deprecated Use ComboboxAsyncLoader instead. */
|
|
87
|
-
export type ComboboxAsyncCallback<TItem extends ComboboxItem = ComboboxItem> = ComboboxAsyncLoader<TItem>;
|
|
88
82
|
type ComboboxAsyncLoadProp<TItem extends ComboboxItem> = {
|
|
89
83
|
/** Preferred async loader API */
|
|
90
84
|
loadItems: ComboboxAsyncLoader<TItem>;
|
|
91
|
-
callback?: never;
|
|
92
|
-
} | {
|
|
93
|
-
/** @deprecated Use loadItems instead. Kept for backwards compatibility. */
|
|
94
|
-
callback: ComboboxAsyncLoader<TItem>;
|
|
95
|
-
loadItems?: never;
|
|
96
85
|
};
|
|
97
86
|
type ComboboxAsyncBaseProps<TItem extends ComboboxItem> = Omit<ComboboxBaseProps<TItem>, 'items' | 'item' | 'onSelect'> & ComboboxAsyncLoadProp<TItem> & {
|
|
98
87
|
items?: TItem[];
|
|
@@ -109,8 +98,6 @@ type ComboboxAsyncBaseProps<TItem extends ComboboxItem> = Omit<ComboboxBaseProps
|
|
|
109
98
|
groups?: CommandGroup[];
|
|
110
99
|
/** Preferred name */
|
|
111
100
|
debounceMs?: number;
|
|
112
|
-
/** @deprecated Use debounceMs instead. */
|
|
113
|
-
searchDebounce?: number;
|
|
114
101
|
dependsOn?: () => unknown;
|
|
115
102
|
clearOnDependencyChange?: boolean;
|
|
116
103
|
onDependencyChange?: (value: unknown) => void;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export * as Toast from './root/index.js';
|
|
2
|
+
export { toast } from './toast.js';
|
|
3
|
+
export type { ToastId, ToastVariant, ToastInput, ToastShowInput, ToastPromiseInput } from './toast.js';
|
|
4
|
+
export { Toaster } from './toaster/index.js';
|
|
5
|
+
export type { ToasterProps } from './toaster/index.js';
|
|
2
6
|
export type * from './types.js';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { toast as sonnerToast } from 'svelte-sonner';
|
|
2
|
+
import ToastRoot from './root/toast.root.svelte';
|
|
3
|
+
function emit(variant, input) {
|
|
4
|
+
const { title, description, icon, hasIcon, rounded, onClose, ...sonnerOpts } = input;
|
|
5
|
+
let id = sonnerOpts.id ?? '';
|
|
6
|
+
id = sonnerToast.custom(ToastRoot, {
|
|
7
|
+
unstyled: true,
|
|
8
|
+
...sonnerOpts,
|
|
9
|
+
componentProps: {
|
|
10
|
+
variant,
|
|
11
|
+
title,
|
|
12
|
+
description,
|
|
13
|
+
icon,
|
|
14
|
+
hasIcon,
|
|
15
|
+
rounded,
|
|
16
|
+
onClose: () => {
|
|
17
|
+
sonnerToast.dismiss(id);
|
|
18
|
+
onClose?.();
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
return id;
|
|
23
|
+
}
|
|
24
|
+
function promise(p, input) {
|
|
25
|
+
const { loading, success, error, finally: onFinally, ...rest } = input;
|
|
26
|
+
const id = emit('loading', { ...rest, ...loading });
|
|
27
|
+
const settle = typeof p === 'function' ? p() : p;
|
|
28
|
+
settle
|
|
29
|
+
.then((data) => {
|
|
30
|
+
const next = typeof success === 'function' ? success(data) : success;
|
|
31
|
+
emit('success', { ...rest, ...next, id });
|
|
32
|
+
})
|
|
33
|
+
.catch((err) => {
|
|
34
|
+
const next = typeof error === 'function' ? error(err) : error;
|
|
35
|
+
emit('error', { ...rest, ...next, id });
|
|
36
|
+
})
|
|
37
|
+
.finally(() => {
|
|
38
|
+
onFinally?.();
|
|
39
|
+
});
|
|
40
|
+
return id;
|
|
41
|
+
}
|
|
42
|
+
export const toast = {
|
|
43
|
+
info: (input) => emit('info', input),
|
|
44
|
+
success: (input) => emit('success', input),
|
|
45
|
+
warning: (input) => emit('warning', input),
|
|
46
|
+
error: (input) => emit('error', input),
|
|
47
|
+
loading: (input) => emit('loading', input),
|
|
48
|
+
message: (input) => emit('info', input),
|
|
49
|
+
show: ({ variant = 'info', ...rest }) => emit(variant, rest),
|
|
50
|
+
update: (id, input) => emit(input.variant ?? 'info', { ...input, id }),
|
|
51
|
+
promise,
|
|
52
|
+
dismiss: (id) => sonnerToast.dismiss(id),
|
|
53
|
+
getActiveToasts: () => sonnerToast.getActiveToasts(),
|
|
54
|
+
custom: sonnerToast.custom,
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Toaster } from './toaster.svelte';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Toaster as SonnerToaster, type ToasterProps } from 'svelte-sonner';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
position = 'bottom-right',
|
|
6
|
+
expand = true,
|
|
7
|
+
visibleToasts = 3,
|
|
8
|
+
duration = 4000,
|
|
9
|
+
closeButton = false,
|
|
10
|
+
toastOptions,
|
|
11
|
+
...restProps
|
|
12
|
+
}: ToasterProps = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<SonnerToaster
|
|
16
|
+
{position}
|
|
17
|
+
{expand}
|
|
18
|
+
{visibleToasts}
|
|
19
|
+
{duration}
|
|
20
|
+
{closeButton}
|
|
21
|
+
toastOptions={{ unstyled: true, ...toastOptions }}
|
|
22
|
+
{...restProps}
|
|
23
|
+
/>
|
|
@@ -5,6 +5,7 @@ export declare const toastPrimitiveRootStyles: import("tailwind-variants").TVRet
|
|
|
5
5
|
warning: string;
|
|
6
6
|
success: string;
|
|
7
7
|
info: string;
|
|
8
|
+
loading: string;
|
|
8
9
|
};
|
|
9
10
|
rounded: {
|
|
10
11
|
xs: string;
|
|
@@ -19,6 +20,7 @@ export declare const toastPrimitiveRootStyles: import("tailwind-variants").TVRet
|
|
|
19
20
|
warning: string;
|
|
20
21
|
success: string;
|
|
21
22
|
info: string;
|
|
23
|
+
loading: string;
|
|
22
24
|
};
|
|
23
25
|
rounded: {
|
|
24
26
|
xs: string;
|
|
@@ -33,6 +35,7 @@ export declare const toastPrimitiveRootStyles: import("tailwind-variants").TVRet
|
|
|
33
35
|
warning: string;
|
|
34
36
|
success: string;
|
|
35
37
|
info: string;
|
|
38
|
+
loading: string;
|
|
36
39
|
};
|
|
37
40
|
rounded: {
|
|
38
41
|
xs: string;
|
|
@@ -61,6 +64,7 @@ export declare const toastPrimitiveInnerIconStyles: import("tailwind-variants").
|
|
|
61
64
|
warning: string;
|
|
62
65
|
success: string;
|
|
63
66
|
info: string;
|
|
67
|
+
loading: string;
|
|
64
68
|
};
|
|
65
69
|
}, undefined, never[], {
|
|
66
70
|
variant: {
|
|
@@ -68,6 +72,7 @@ export declare const toastPrimitiveInnerIconStyles: import("tailwind-variants").
|
|
|
68
72
|
warning: string;
|
|
69
73
|
success: string;
|
|
70
74
|
info: string;
|
|
75
|
+
loading: string;
|
|
71
76
|
};
|
|
72
77
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
73
78
|
variant: {
|
|
@@ -75,6 +80,7 @@ export declare const toastPrimitiveInnerIconStyles: import("tailwind-variants").
|
|
|
75
80
|
warning: string;
|
|
76
81
|
success: string;
|
|
77
82
|
info: string;
|
|
83
|
+
loading: string;
|
|
78
84
|
};
|
|
79
85
|
}, undefined, never[], unknown, unknown, undefined>>;
|
|
80
86
|
export declare const toastPrimitiveBodyStyles: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from '../../internal/utils/tailwindcss.js';
|
|
2
2
|
export const toastPrimitiveRootStyles = tv({
|
|
3
3
|
base: [
|
|
4
|
-
'cgui:overflow-hidden cgui:relative cgui:min-w-
|
|
4
|
+
'cgui:overflow-hidden cgui:relative cgui:min-w-60 cgui:max-w-80',
|
|
5
5
|
'cgui:flex cgui:items-center cgui:gap-2 cgui:p-3',
|
|
6
6
|
'cgui:shadow-toast cgui:bg-surface-white',
|
|
7
7
|
'cgui:transition-all cgui:duration-250 cgui:ease-in-out',
|
|
@@ -13,6 +13,7 @@ export const toastPrimitiveRootStyles = tv({
|
|
|
13
13
|
warning: 'cgui:before:bg-state-warning',
|
|
14
14
|
success: 'cgui:before:bg-state-success',
|
|
15
15
|
info: 'cgui:before:bg-state-info',
|
|
16
|
+
loading: 'cgui:before:bg-fg-regular',
|
|
16
17
|
},
|
|
17
18
|
rounded: {
|
|
18
19
|
xs: 'cgui:rounded-xs',
|
|
@@ -41,6 +42,7 @@ export const toastPrimitiveInnerIconStyles = tv({
|
|
|
41
42
|
warning: 'cgui:text-state-warning',
|
|
42
43
|
success: 'cgui:text-state-success',
|
|
43
44
|
info: 'cgui:text-state-info',
|
|
45
|
+
loading: 'cgui:text-fg-regular cgui:animate-spin',
|
|
44
46
|
},
|
|
45
47
|
},
|
|
46
48
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@casinogate/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"svelte": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -517,6 +517,7 @@
|
|
|
517
517
|
"@zag-js/collection": "^1.30.0",
|
|
518
518
|
"bits-ui": "2.16.3",
|
|
519
519
|
"runed": "^0.35.1",
|
|
520
|
+
"svelte-sonner": "^1.1.1",
|
|
520
521
|
"svelte-toolbelt": "^0.10.6",
|
|
521
522
|
"tailwind-merge": "^3.3.1",
|
|
522
523
|
"tailwind-variants": "^3.2.2",
|