@xingxingmofashu/ui 0.1.1 → 0.1.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.
- package/README.md +39 -14
- package/dist/components/accordion.d.ts +14 -10
- package/dist/components/accordion.mjs +78 -25
- package/dist/components/alert-dialog.d.ts +7 -2
- package/dist/components/alert-dialog.mjs +74 -33
- package/dist/components/button.d.ts +6 -2
- package/dist/components/button.mjs +20 -11
- package/dist/components/card.d.ts +6 -1
- package/dist/components/card.mjs +27 -4
- package/dist/components/checkbox.d.ts +5 -1
- package/dist/components/checkbox.mjs +73 -26
- package/dist/components/dialog.d.ts +7 -2
- package/dist/components/dialog.mjs +66 -20
- package/dist/components/drawer.d.ts +7 -2
- package/dist/components/drawer.mjs +66 -20
- package/dist/components/icons/check.d.ts +3 -0
- package/dist/components/icons/check.mjs +24 -0
- package/dist/components/icons/close.d.ts +3 -0
- package/dist/components/icons/close.mjs +21 -0
- package/dist/components/icons/dash.d.ts +3 -0
- package/dist/components/icons/dash.mjs +24 -0
- package/dist/components/icons/error.d.ts +3 -0
- package/dist/components/icons/error.mjs +23 -0
- package/dist/components/icons/info.d.ts +3 -0
- package/dist/components/icons/info.mjs +23 -0
- package/dist/components/icons/loading.d.ts +3 -0
- package/dist/components/icons/loading.mjs +22 -0
- package/dist/components/icons/plus.d.ts +3 -0
- package/dist/components/icons/plus.mjs +22 -0
- package/dist/components/icons/success.d.ts +3 -0
- package/dist/components/icons/success.mjs +22 -0
- package/dist/components/icons/warning.d.ts +3 -0
- package/dist/components/icons/warning.mjs +23 -0
- package/dist/components/input.d.ts +5 -1
- package/dist/components/input.mjs +73 -30
- package/dist/components/popover.d.ts +7 -2
- package/dist/components/popover.mjs +53 -14
- package/dist/components/progress.d.ts +21 -0
- package/dist/components/progress.mjs +71 -0
- package/dist/components/scroll-area.d.ts +7 -2
- package/dist/components/scroll-area.mjs +48 -14
- package/dist/components/slider.d.ts +15 -4
- package/dist/components/slider.mjs +65 -16
- package/dist/components/switch.d.ts +5 -1
- package/dist/components/switch.mjs +65 -18
- package/dist/components/toast.d.ts +17 -11
- package/dist/components/toast.mjs +111 -87
- package/dist/components/toggle-group.d.ts +11 -5
- package/dist/components/toggle-group.mjs +54 -6
- package/dist/components/toggle.d.ts +5 -1
- package/dist/components/toggle.mjs +36 -5
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +2 -0
- package/dist/internal/aria.d.ts +3 -0
- package/dist/internal/aria.mjs +5 -0
- package/dist/internal/tv.d.ts +17 -0
- package/dist/internal/tv.mjs +0 -0
- package/dist/keyframes.css +1 -1
- package/dist/theme/alert-dialog.mjs +1 -1
- package/dist/theme/checkbox.mjs +4 -4
- package/dist/theme/dialog.mjs +1 -1
- package/dist/theme/drawer.mjs +1 -1
- package/dist/theme/popover.mjs +2 -2
- package/dist/theme/progress.d.ts +80 -0
- package/dist/theme/progress.mjs +64 -0
- package/dist/theme/slider.mjs +8 -0
- package/dist/theme/switch.mjs +2 -0
- package/dist/theme/toast.d.ts +15 -36
- package/dist/theme/toast.mjs +29 -21
- package/package.json +8 -3
package/dist/index.mjs
CHANGED
|
@@ -9,12 +9,14 @@ export { Dialog } from "./components/dialog.mjs";
|
|
|
9
9
|
export { Drawer } from "./components/drawer.mjs";
|
|
10
10
|
export { Input } from "./components/input.mjs";
|
|
11
11
|
export { Popover } from "./components/popover.mjs";
|
|
12
|
+
export { Progress } from "./components/progress.mjs";
|
|
12
13
|
export {
|
|
13
14
|
ScrollArea
|
|
14
15
|
} from "./components/scroll-area.mjs";
|
|
15
16
|
export { Slider } from "./components/slider.mjs";
|
|
16
17
|
export { Switch } from "./components/switch.mjs";
|
|
17
18
|
export {
|
|
19
|
+
Toast,
|
|
18
20
|
ToastProvider
|
|
19
21
|
} from "./components/toast.mjs";
|
|
20
22
|
export { createToastManager } from "./composables/create-toast-manager.mjs";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ClassValue } from "tailwind-variants";
|
|
2
|
+
type Id<T> = {} & {
|
|
3
|
+
[P in keyof T]: T[P];
|
|
4
|
+
};
|
|
5
|
+
type ComponentSlots<T extends {
|
|
6
|
+
slots?: Record<string, any>;
|
|
7
|
+
}> = Id<{
|
|
8
|
+
[K in keyof T["slots"]]?: ClassValue;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Minimal tailwind-variants component config used to derive prop types from a
|
|
12
|
+
* theme recipe. Mirrors Nuxt UI's `ComponentConfig` slot mapping.
|
|
13
|
+
*/
|
|
14
|
+
export type ComponentConfig<T extends Record<string, any>> = {
|
|
15
|
+
slots: ComponentSlots<T>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
File without changes
|
package/dist/keyframes.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes ui-toggle-group-select{0%{opacity:0;scale:.94;translate:0 2px}to{opacity:1;scale:1;translate:0 0}}
|
|
1
|
+
@keyframes ui-toggle-group-select{0%{opacity:0;scale:.94;translate:0 2px}to{opacity:1;scale:1;translate:0 0}}@keyframes ui-progress-indeterminate{0%{translate:-120% 0}to{translate:320% 0}}
|
|
@@ -9,7 +9,7 @@ export default tv({
|
|
|
9
9
|
],
|
|
10
10
|
viewport: "fixed inset-0 z-50 flex items-center justify-center overflow-y-auto p-4",
|
|
11
11
|
popup: [
|
|
12
|
-
"relative isolate w-full max-w-md bg-ui-
|
|
12
|
+
"relative isolate w-full max-w-md bg-ui-surface",
|
|
13
13
|
"rounded-[1.75rem] text-ui-ink outline-none",
|
|
14
14
|
"transition-[opacity,scale,translate] duration-200 ease-out",
|
|
15
15
|
"data-[starting-style]:translate-y-2 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
package/dist/theme/checkbox.mjs
CHANGED
|
@@ -17,14 +17,14 @@ export default tv({
|
|
|
17
17
|
"motion-reduce:transition-none",
|
|
18
18
|
"[--ui-glass-tone:brightness(1)] [--ui-glass-contrast:1.1]",
|
|
19
19
|
"[--ui-glass-border:color-mix(in_srgb,var(--ui-ink)_26%,transparent)]",
|
|
20
|
-
"[--ui-glass-rim:
|
|
20
|
+
"[--ui-glass-rim:rgb(255_255_255/0.16)]",
|
|
21
21
|
"[--ui-glass-surface:color-mix(in_srgb,var(--ui-ink)_5%,transparent)]",
|
|
22
|
-
"[--ui-shadow-glass:var(--ui-
|
|
22
|
+
"[--ui-shadow-glass:inset_0_0_0_1px_color-mix(in_srgb,var(--ui-ink)_6%,transparent),0_1px_2px_rgb(0_0_0/0.3)]",
|
|
23
23
|
"[--ui-glass-rim-inset:2px]"
|
|
24
24
|
],
|
|
25
25
|
fill: [
|
|
26
26
|
"absolute inset-0 z-0 rounded-[inherit] bg-ui-ink",
|
|
27
|
-
"[background-image:linear-gradient(145deg,color-mix(in_srgb,var(--ui-ink)_88%,var(--ui-
|
|
27
|
+
"[background-image:linear-gradient(145deg,color-mix(in_srgb,var(--ui-ink)_88%,var(--ui-surface)),var(--ui-ink))]",
|
|
28
28
|
"scale-0 transition-transform duration-200 ease-out",
|
|
29
29
|
"group-data-[checked]:scale-100 group-data-[indeterminate]:scale-100",
|
|
30
30
|
"motion-reduce:transition-none"
|
|
@@ -35,7 +35,7 @@ export default tv({
|
|
|
35
35
|
],
|
|
36
36
|
overlay: "ui-glass-rim",
|
|
37
37
|
indicator: [
|
|
38
|
-
"relative z-10 flex items-center justify-center text-
|
|
38
|
+
"relative z-10 flex items-center justify-center text-ui-surface",
|
|
39
39
|
"scale-50 opacity-0 transition-[opacity,scale] duration-200 ease-out",
|
|
40
40
|
"group-data-[checked]:scale-100 group-data-[checked]:opacity-100",
|
|
41
41
|
"group-data-[indeterminate]:scale-100 group-data-[indeterminate]:opacity-100",
|
package/dist/theme/dialog.mjs
CHANGED
|
@@ -9,7 +9,7 @@ export default tv({
|
|
|
9
9
|
],
|
|
10
10
|
viewport: "fixed inset-0 z-50 flex items-center justify-center overflow-y-auto p-4",
|
|
11
11
|
popup: [
|
|
12
|
-
"relative isolate w-full max-w-md bg-ui-
|
|
12
|
+
"relative isolate w-full max-w-md bg-ui-surface",
|
|
13
13
|
"rounded-[1.75rem] text-ui-ink outline-none",
|
|
14
14
|
"transition-[opacity,scale,translate] duration-200 ease-out",
|
|
15
15
|
"data-[starting-style]:translate-y-2 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
package/dist/theme/drawer.mjs
CHANGED
|
@@ -12,7 +12,7 @@ export default tv({
|
|
|
12
12
|
],
|
|
13
13
|
viewport: "fixed inset-0 z-50 flex overflow-hidden",
|
|
14
14
|
popup: [
|
|
15
|
-
"relative isolate flex min-h-0 flex-col overflow-hidden bg-ui-
|
|
15
|
+
"relative isolate flex min-h-0 flex-col overflow-hidden bg-ui-surface",
|
|
16
16
|
"text-ui-ink outline-none touch-auto overscroll-contain will-change-transform",
|
|
17
17
|
"transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)]",
|
|
18
18
|
"data-[swiping]:select-none",
|
package/dist/theme/popover.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export default tv({
|
|
|
3
3
|
slots: {
|
|
4
4
|
positioner: "z-50 outline-none",
|
|
5
5
|
popup: [
|
|
6
|
-
"relative isolate w-80 max-w-[calc(100vw-2rem)] bg-ui-
|
|
6
|
+
"relative isolate w-80 max-w-[calc(100vw-2rem)] bg-ui-surface",
|
|
7
7
|
"rounded-[1.5rem] text-ui-ink outline-none",
|
|
8
8
|
"transition-[opacity,scale,translate] duration-150 ease-out",
|
|
9
9
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
@@ -23,7 +23,7 @@ export default tv({
|
|
|
23
23
|
overlay: "ui-glass-rim",
|
|
24
24
|
arrow: [
|
|
25
25
|
"pointer-events-none absolute z-[1] size-3 rotate-45",
|
|
26
|
-
"border-ui-glass-border bg-ui-
|
|
26
|
+
"border-ui-glass-border bg-ui-surface",
|
|
27
27
|
"drop-shadow-[0_1px_2px_rgb(0_0_0/0.12)]",
|
|
28
28
|
"data-[side=bottom]:-top-[6px] data-[side=bottom]:border-t data-[side=bottom]:border-l",
|
|
29
29
|
"data-[side=top]:-bottom-[6px] data-[side=top]:border-r data-[side=top]:border-b",
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare const _default: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
size: {
|
|
3
|
+
xs: {
|
|
4
|
+
root: string;
|
|
5
|
+
};
|
|
6
|
+
sm: {
|
|
7
|
+
root: string;
|
|
8
|
+
};
|
|
9
|
+
md: {
|
|
10
|
+
root: string;
|
|
11
|
+
};
|
|
12
|
+
lg: {
|
|
13
|
+
root: string;
|
|
14
|
+
};
|
|
15
|
+
xl: {
|
|
16
|
+
root: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
root: string[];
|
|
21
|
+
header: string;
|
|
22
|
+
label: string[];
|
|
23
|
+
value: string[];
|
|
24
|
+
track: string[];
|
|
25
|
+
indicator: string[];
|
|
26
|
+
description: string[];
|
|
27
|
+
}, undefined, {
|
|
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
|
+
xl: {
|
|
42
|
+
root: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
root: string[];
|
|
47
|
+
header: string;
|
|
48
|
+
label: string[];
|
|
49
|
+
value: string[];
|
|
50
|
+
track: string[];
|
|
51
|
+
indicator: string[];
|
|
52
|
+
description: string[];
|
|
53
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
54
|
+
size: {
|
|
55
|
+
xs: {
|
|
56
|
+
root: string;
|
|
57
|
+
};
|
|
58
|
+
sm: {
|
|
59
|
+
root: string;
|
|
60
|
+
};
|
|
61
|
+
md: {
|
|
62
|
+
root: string;
|
|
63
|
+
};
|
|
64
|
+
lg: {
|
|
65
|
+
root: string;
|
|
66
|
+
};
|
|
67
|
+
xl: {
|
|
68
|
+
root: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
root: string[];
|
|
73
|
+
header: string;
|
|
74
|
+
label: string[];
|
|
75
|
+
value: string[];
|
|
76
|
+
track: string[];
|
|
77
|
+
indicator: string[];
|
|
78
|
+
description: string[];
|
|
79
|
+
}>>;
|
|
80
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
export default tv({
|
|
3
|
+
slots: {
|
|
4
|
+
root: [
|
|
5
|
+
"group/progress relative flex w-full min-w-0 flex-col gap-[var(--ui-progress-gap)] text-ui-ink",
|
|
6
|
+
"[--ui-progress-track:color-mix(in_srgb,var(--ui-ink)_12%,transparent)]",
|
|
7
|
+
"[--ui-progress-fill-from:var(--ui-ink)] [--ui-progress-fill-to:var(--ui-ink-active)]",
|
|
8
|
+
"[--ui-progress-glow:color-mix(in_srgb,var(--ui-ink)_28%,transparent)]",
|
|
9
|
+
"[--ui-progress-height:6px] [--ui-progress-gap:8px] [--ui-progress-font-size:0.875rem]"
|
|
10
|
+
],
|
|
11
|
+
header: "flex min-w-0 items-baseline justify-between gap-3",
|
|
12
|
+
label: [
|
|
13
|
+
"min-w-0 truncate font-medium text-ui-ink",
|
|
14
|
+
"text-[length:var(--ui-progress-font-size)]",
|
|
15
|
+
"[filter:var(--ui-drop-shadow-label)]"
|
|
16
|
+
],
|
|
17
|
+
value: [
|
|
18
|
+
"ms-auto shrink-0 font-mono tabular-nums text-ui-ink opacity-60",
|
|
19
|
+
"text-[length:calc(var(--ui-progress-font-size)*0.875)]"
|
|
20
|
+
],
|
|
21
|
+
track: [
|
|
22
|
+
"relative h-[var(--ui-progress-height)] w-full overflow-hidden rounded-full",
|
|
23
|
+
"border border-ui-glass-border bg-[var(--ui-progress-track)]",
|
|
24
|
+
"shadow-[inset_0_1px_2px_rgb(0_0_0/0.14),inset_0_-1px_0_rgb(255_255_255/0.35)]",
|
|
25
|
+
"[backdrop-filter:blur(2px)] [-webkit-backdrop-filter:blur(2px)]",
|
|
26
|
+
"before:pointer-events-none before:absolute before:inset-0 before:z-[1] before:rounded-full before:bg-[linear-gradient(180deg,rgb(255_255_255/0.24),transparent_60%)] before:content-['']"
|
|
27
|
+
],
|
|
28
|
+
indicator: [
|
|
29
|
+
"relative h-full rounded-full",
|
|
30
|
+
"bg-[linear-gradient(117deg,var(--ui-progress-fill-from)_0%,var(--ui-progress-fill-to)_100%)]",
|
|
31
|
+
"shadow-[0_0_10px_var(--ui-progress-glow),inset_0_1px_0_rgb(255_255_255/0.35)]",
|
|
32
|
+
"transition-[width] duration-500 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
33
|
+
"after:pointer-events-none after:absolute after:inset-0 after:rounded-full after:bg-[linear-gradient(180deg,rgb(255_255_255/0.3),transparent_60%)] after:content-['']",
|
|
34
|
+
"data-[indeterminate]:w-[38%] data-[indeterminate]:[animation:ui-progress-indeterminate_1.4s_ease-in-out_infinite]",
|
|
35
|
+
"motion-reduce:transition-none motion-reduce:data-[indeterminate]:[animation:none]"
|
|
36
|
+
],
|
|
37
|
+
description: [
|
|
38
|
+
"min-w-0 leading-relaxed text-ui-ink opacity-60",
|
|
39
|
+
"text-[length:var(--ui-progress-font-size)]"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
variants: {
|
|
43
|
+
size: {
|
|
44
|
+
xs: {
|
|
45
|
+
root: "[--ui-progress-height:4px] [--ui-progress-gap:6px] [--ui-progress-font-size:0.75rem]"
|
|
46
|
+
},
|
|
47
|
+
sm: {
|
|
48
|
+
root: "[--ui-progress-height:5px] [--ui-progress-gap:6px] [--ui-progress-font-size:0.75rem]"
|
|
49
|
+
},
|
|
50
|
+
md: {
|
|
51
|
+
root: "[--ui-progress-height:6px] [--ui-progress-gap:8px] [--ui-progress-font-size:0.875rem]"
|
|
52
|
+
},
|
|
53
|
+
lg: {
|
|
54
|
+
root: "[--ui-progress-height:8px] [--ui-progress-gap:8px] [--ui-progress-font-size:0.875rem]"
|
|
55
|
+
},
|
|
56
|
+
xl: {
|
|
57
|
+
root: "[--ui-progress-height:10px] [--ui-progress-gap:10px] [--ui-progress-font-size:1rem]"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
size: "md"
|
|
63
|
+
}
|
|
64
|
+
});
|
package/dist/theme/slider.mjs
CHANGED
|
@@ -35,6 +35,14 @@ export default tv({
|
|
|
35
35
|
thumb: [
|
|
36
36
|
"relative z-[2] block h-[var(--ui-slider-thumb-height)] w-[var(--ui-slider-thumb-width)] shrink-0 select-none",
|
|
37
37
|
"cursor-grab touch-none rounded-full bg-transparent p-0",
|
|
38
|
+
"[--ui-glass-lens-blur:1.5px] [--ui-glass-lens-saturate:160%]",
|
|
39
|
+
"[--ui-glass-lens-border:rgb(255_255_255/0.55)]",
|
|
40
|
+
"[--ui-glass-lens-surface:linear-gradient(180deg,rgb(255_255_255/0.72),rgb(255_255_255/0.3))]",
|
|
41
|
+
"[--ui-glass-lens-surface-active:rgb(255_255_255/0.12)]",
|
|
42
|
+
"[--ui-glass-lens-shadow:0_4px_10px_rgb(0_30_63/0.14),0_0_2px_rgb(0_9_20/0.12),inset_1px_1px_0_rgb(255_255_255/0.8),inset_-1px_-1px_0_rgb(69_168_243/0.16)]",
|
|
43
|
+
"[--ui-glass-lens-shadow-active:0_6px_18px_rgb(0_30_63/0.18),0_0_3px_rgb(0_9_20/0.14),inset_1px_1px_0_rgb(255_255_255/0.72),inset_-1px_-1px_0_rgb(69_168_243/0.2)]",
|
|
44
|
+
"[--ui-glass-lens-specular:inset_1px_1px_0_rgb(255_255_255/0.7),inset_1px_3px_0_rgb(28_63_90/0.05),inset_0_0_18px_rgb(255_255_255/0.55),inset_-1px_-1px_0_rgb(69_168_243/0.16)]",
|
|
45
|
+
"[--ui-glass-lens-glare:linear-gradient(180deg,rgb(255_255_255/0.75),rgb(255_255_255/0))]",
|
|
38
46
|
"outline-none transition-[scale] duration-150 ease-out",
|
|
39
47
|
"hover:[scale:1.04] active:[scale:1.08_0.96] data-[dragging]:[scale:1.08_0.96]",
|
|
40
48
|
"[&:has(input:focus-visible)]:outline-2 [&:has(input:focus-visible)]:outline-offset-4 [&:has(input:focus-visible)]:outline-ui-glass-focus",
|
package/dist/theme/switch.mjs
CHANGED
|
@@ -12,6 +12,7 @@ const theme = tv({
|
|
|
12
12
|
base: [
|
|
13
13
|
"relative inline-flex h-[var(--ui-switch-height)] w-[var(--ui-switch-width)] shrink-0 select-none overflow-visible rounded-[100px] border-0 bg-transparent p-0 text-inherit",
|
|
14
14
|
"[container-type:inline-size]",
|
|
15
|
+
"[--ui-glass-edge-shadow:inset_1px_-1px_2px_rgb(255_255_255/0.55),inset_-1px_1px_2px_rgb(0_0_0/0.18),0_1px_3px_rgb(0_0_0/0.2)]",
|
|
15
16
|
"[--ui-switch-off:color-mix(in_srgb,var(--ui-ink)_20%,transparent)] [--ui-switch-on:var(--ui-ink)]",
|
|
16
17
|
"group-focus-visible:outline-2 group-focus-visible:outline-offset-4 group-focus-visible:outline-ui-glass-focus",
|
|
17
18
|
"[&_*]:pointer-events-none",
|
|
@@ -49,6 +50,7 @@ const theme = tv({
|
|
|
49
50
|
],
|
|
50
51
|
thumb: [
|
|
51
52
|
"absolute left-[var(--ui-switch-border)] top-1/2 h-[calc(100%_-_2*var(--ui-switch-border))] w-[calc(60%_-_2*var(--ui-switch-border))] rounded-[100px] bg-transparent [box-shadow:var(--ui-glass-thumb-shadow)]",
|
|
53
|
+
"[--ui-glass-thumb-shadow:0_1px_3px_rgb(0_0_0/0.2),inset_0_0_0_1px_rgb(255_255_255/0.55)]",
|
|
52
54
|
"[container-type:inline-size]",
|
|
53
55
|
"[translate:0_-50%] group-data-[checked]:[translate:calc(100cqi_-_100%_-_2*var(--ui-switch-border))_-50%]",
|
|
54
56
|
"[transition:translate_120ms_ease-out_180ms,scale_300ms_ease-out]",
|
package/dist/theme/toast.d.ts
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
declare const _default: import("tailwind-variants").TVReturnType<{
|
|
2
|
-
|
|
3
|
-
top: {
|
|
2
|
+
position: {
|
|
3
|
+
"top-left": {
|
|
4
4
|
viewport: string;
|
|
5
|
-
root: string[];
|
|
6
5
|
};
|
|
7
|
-
|
|
6
|
+
"top-right": {
|
|
8
7
|
viewport: string;
|
|
9
|
-
root: string[];
|
|
10
8
|
};
|
|
11
|
-
|
|
12
|
-
align: {
|
|
13
|
-
left: {
|
|
14
|
-
viewport: string;
|
|
15
|
-
};
|
|
16
|
-
center: {
|
|
9
|
+
"bottom-left": {
|
|
17
10
|
viewport: string;
|
|
18
11
|
};
|
|
19
|
-
right: {
|
|
12
|
+
"bottom-right": {
|
|
20
13
|
viewport: string;
|
|
21
14
|
};
|
|
22
15
|
};
|
|
@@ -34,24 +27,17 @@ declare const _default: import("tailwind-variants").TVReturnType<{
|
|
|
34
27
|
action: string[];
|
|
35
28
|
close: string[];
|
|
36
29
|
}, undefined, {
|
|
37
|
-
|
|
38
|
-
top: {
|
|
30
|
+
position: {
|
|
31
|
+
"top-left": {
|
|
39
32
|
viewport: string;
|
|
40
|
-
root: string[];
|
|
41
33
|
};
|
|
42
|
-
|
|
34
|
+
"top-right": {
|
|
43
35
|
viewport: string;
|
|
44
|
-
root: string[];
|
|
45
36
|
};
|
|
46
|
-
|
|
47
|
-
align: {
|
|
48
|
-
left: {
|
|
37
|
+
"bottom-left": {
|
|
49
38
|
viewport: string;
|
|
50
39
|
};
|
|
51
|
-
|
|
52
|
-
viewport: string;
|
|
53
|
-
};
|
|
54
|
-
right: {
|
|
40
|
+
"bottom-right": {
|
|
55
41
|
viewport: string;
|
|
56
42
|
};
|
|
57
43
|
};
|
|
@@ -69,24 +55,17 @@ declare const _default: import("tailwind-variants").TVReturnType<{
|
|
|
69
55
|
action: string[];
|
|
70
56
|
close: string[];
|
|
71
57
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
72
|
-
|
|
73
|
-
top: {
|
|
74
|
-
viewport: string;
|
|
75
|
-
root: string[];
|
|
76
|
-
};
|
|
77
|
-
bottom: {
|
|
58
|
+
position: {
|
|
59
|
+
"top-left": {
|
|
78
60
|
viewport: string;
|
|
79
|
-
root: string[];
|
|
80
61
|
};
|
|
81
|
-
|
|
82
|
-
align: {
|
|
83
|
-
left: {
|
|
62
|
+
"top-right": {
|
|
84
63
|
viewport: string;
|
|
85
64
|
};
|
|
86
|
-
|
|
65
|
+
"bottom-left": {
|
|
87
66
|
viewport: string;
|
|
88
67
|
};
|
|
89
|
-
right: {
|
|
68
|
+
"bottom-right": {
|
|
90
69
|
viewport: string;
|
|
91
70
|
};
|
|
92
71
|
};
|
package/dist/theme/toast.mjs
CHANGED
|
@@ -8,12 +8,14 @@ export default tv({
|
|
|
8
8
|
"[--shrink:calc(1_-_var(--scale))]",
|
|
9
9
|
"[--height:var(--toast-frontmost-height,var(--toast-height))]",
|
|
10
10
|
"absolute inset-x-0 isolate h-[var(--height)] w-full rounded-[1.25rem]",
|
|
11
|
-
"bg-ui-
|
|
11
|
+
"bg-ui-surface text-ui-ink select-none",
|
|
12
12
|
"z-[calc(1000-var(--toast-index))]",
|
|
13
13
|
"[transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms]",
|
|
14
14
|
"data-[expanded]:h-[var(--toast-height)]",
|
|
15
15
|
"data-[limited]:pointer-events-none data-[limited]:opacity-0",
|
|
16
16
|
"data-[swiping]:cursor-grabbing",
|
|
17
|
+
"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)_-_150%))]",
|
|
18
|
+
"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)_+_150%))]",
|
|
17
19
|
"outline-none focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ui-glass-focus",
|
|
18
20
|
"motion-reduce:transition-none"
|
|
19
21
|
],
|
|
@@ -57,9 +59,25 @@ export default tv({
|
|
|
57
59
|
]
|
|
58
60
|
},
|
|
59
61
|
variants: {
|
|
60
|
-
|
|
61
|
-
top: {
|
|
62
|
-
viewport: "top-[max(1rem,env(safe-area-inset-top))] bottom-auto"
|
|
62
|
+
position: {
|
|
63
|
+
"top-left": {
|
|
64
|
+
viewport: "top-[max(1rem,env(safe-area-inset-top))] bottom-auto left-[max(1rem,env(safe-area-inset-left))] right-auto"
|
|
65
|
+
},
|
|
66
|
+
"top-right": {
|
|
67
|
+
viewport: "top-[max(1rem,env(safe-area-inset-top))] bottom-auto right-[max(1rem,env(safe-area-inset-right))] left-auto"
|
|
68
|
+
},
|
|
69
|
+
"bottom-left": {
|
|
70
|
+
viewport: "bottom-[max(1rem,env(safe-area-inset-bottom))] top-auto left-[max(1rem,env(safe-area-inset-left))] right-auto"
|
|
71
|
+
},
|
|
72
|
+
"bottom-right": {
|
|
73
|
+
viewport: "bottom-[max(1rem,env(safe-area-inset-bottom))] top-auto right-[max(1rem,env(safe-area-inset-right))] left-auto"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
compoundVariants: [
|
|
78
|
+
{
|
|
79
|
+
position: ["top-left", "top-right"],
|
|
80
|
+
class: {
|
|
63
81
|
root: [
|
|
64
82
|
"top-0 origin-top",
|
|
65
83
|
"[--offset-y:calc(var(--toast-offset-y)_+_(var(--toast-index)*var(--gap))_+_var(--toast-swipe-movement-y))]",
|
|
@@ -70,9 +88,11 @@ export default tv({
|
|
|
70
88
|
"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)_-_150%))]",
|
|
71
89
|
"after:absolute after:bottom-full after:left-0 after:h-[calc(var(--gap)_+_1px)] after:w-full after:content-['']"
|
|
72
90
|
]
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
position: ["bottom-left", "bottom-right"],
|
|
95
|
+
class: {
|
|
76
96
|
root: [
|
|
77
97
|
"bottom-0 origin-bottom",
|
|
78
98
|
"[--offset-y:calc(var(--toast-offset-y)*-1_+_(var(--toast-index)*var(--gap)*-1)_+_var(--toast-swipe-movement-y))]",
|
|
@@ -84,21 +104,9 @@ export default tv({
|
|
|
84
104
|
"after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)_+_1px)] after:w-full after:content-['']"
|
|
85
105
|
]
|
|
86
106
|
}
|
|
87
|
-
},
|
|
88
|
-
align: {
|
|
89
|
-
left: {
|
|
90
|
-
viewport: "left-[max(1rem,env(safe-area-inset-left))] right-auto"
|
|
91
|
-
},
|
|
92
|
-
center: {
|
|
93
|
-
viewport: "left-1/2 -translate-x-1/2"
|
|
94
|
-
},
|
|
95
|
-
right: {
|
|
96
|
-
viewport: "right-[max(1rem,env(safe-area-inset-right))] left-auto"
|
|
97
|
-
}
|
|
98
107
|
}
|
|
99
|
-
|
|
108
|
+
],
|
|
100
109
|
defaultVariants: {
|
|
101
|
-
|
|
102
|
-
align: "right"
|
|
110
|
+
position: "bottom-right"
|
|
103
111
|
}
|
|
104
112
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingxingmofashu/ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Liquid Glass
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Accessible React components with a Liquid Glass visual style for React 19 and Tailwind CSS 4.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "xingxingmofashu",
|
|
7
7
|
"type": "module",
|
|
@@ -55,9 +55,14 @@
|
|
|
55
55
|
"react",
|
|
56
56
|
"ui",
|
|
57
57
|
"components",
|
|
58
|
+
"component-library",
|
|
59
|
+
"react-components",
|
|
60
|
+
"design-system",
|
|
58
61
|
"tailwindcss",
|
|
59
62
|
"liquid-glass",
|
|
60
|
-
"base-ui"
|
|
63
|
+
"base-ui",
|
|
64
|
+
"tailwind-variants",
|
|
65
|
+
"accessible"
|
|
61
66
|
],
|
|
62
67
|
"publishConfig": {
|
|
63
68
|
"access": "public"
|