@kopexa/theme 1.7.7 → 2.0.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/{chunk-EXBKQDH5.mjs → chunk-3PCDCW7G.mjs} +1 -1
- package/dist/{chunk-UEMJVVVF.mjs → chunk-5DOB3IBE.mjs} +14 -1
- package/dist/{chunk-SHHD2WUZ.mjs → chunk-7VZZASRG.mjs} +1 -1
- package/dist/chunk-BETLBSSF.mjs +23 -0
- package/dist/chunk-BWB7MWRC.mjs +22 -0
- package/dist/chunk-CPERWXKN.mjs +21 -0
- package/dist/chunk-DI54XTS5.mjs +56 -0
- package/dist/chunk-GRPMKEI2.mjs +34 -0
- package/dist/{chunk-ZL6FAOXE.mjs → chunk-HHOMDBMZ.mjs} +1 -1
- package/dist/chunk-HWEYNK3O.mjs +25 -0
- package/dist/{chunk-U32YEQZ5.mjs → chunk-IHITEH7V.mjs} +15 -9
- package/dist/chunk-IHW4FWFB.mjs +71 -0
- package/dist/{chunk-TJDRYBGW.mjs → chunk-JXQPOORM.mjs} +15 -9
- package/dist/{chunk-MWG2OZMD.mjs → chunk-LAJQAXSV.mjs} +7 -9
- package/dist/{chunk-VCLXE57S.mjs → chunk-LM7MKBHT.mjs} +7 -1
- package/dist/chunk-LMCM4CW2.mjs +22 -0
- package/dist/chunk-M3GQ563Q.mjs +33 -0
- package/dist/chunk-NFOF75HQ.mjs +106 -0
- package/dist/{chunk-JHKTRIIA.mjs → chunk-RQYYDG26.mjs} +4 -2
- package/dist/chunk-SPQE7K66.mjs +18 -0
- package/dist/chunk-TVC4THD6.mjs +16 -0
- package/dist/chunk-URGRCBNW.mjs +27 -0
- package/dist/chunk-VSVGOX3P.mjs +48 -0
- package/dist/chunk-XGUDXC5P.mjs +26 -0
- package/dist/{chunk-755GJHKQ.mjs → chunk-XRKUQMGU.mjs} +1 -1
- package/dist/{chunk-JQ74U2S3.mjs → chunk-YH6TDPK7.mjs} +4 -4
- package/dist/chunk-Z7D56R5U.mjs +70 -0
- package/dist/components/alert-dialog.d.mts +9 -9
- package/dist/components/alert-dialog.d.ts +9 -9
- package/dist/components/alert-dialog.js +11 -2
- package/dist/components/alert-dialog.mjs +1 -1
- package/dist/components/autocomplete.d.mts +73 -0
- package/dist/components/autocomplete.d.ts +73 -0
- package/dist/components/autocomplete.js +173 -0
- package/dist/components/autocomplete.mjs +8 -0
- package/dist/components/avatar.mjs +2 -2
- package/dist/components/button.d.mts +15 -0
- package/dist/components/button.d.ts +15 -0
- package/dist/components/button.js +12 -6
- package/dist/components/button.mjs +2 -2
- package/dist/components/chip.d.mts +3 -0
- package/dist/components/chip.d.ts +3 -0
- package/dist/components/chip.js +4 -2
- package/dist/components/chip.mjs +1 -1
- package/dist/components/color-highlight-button.d.mts +36 -0
- package/dist/components/color-highlight-button.d.ts +36 -0
- package/dist/components/color-highlight-button.js +45 -0
- package/dist/components/color-highlight-button.mjs +6 -0
- package/dist/components/command.d.mts +9 -9
- package/dist/components/command.d.ts +9 -9
- package/dist/components/dialog.js +7 -9
- package/dist/components/dialog.mjs +1 -1
- package/dist/components/drawer.d.mts +3 -3
- package/dist/components/drawer.d.ts +3 -3
- package/dist/components/drawer.js +21 -17
- package/dist/components/drawer.mjs +2 -2
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu.mjs +1 -1
- package/dist/components/editor-basic.d.mts +44 -0
- package/dist/components/editor-basic.d.ts +44 -0
- package/dist/components/editor-basic.js +58 -0
- package/dist/components/editor-basic.mjs +6 -0
- package/dist/components/editor-spinner.d.mts +60 -0
- package/dist/components/editor-spinner.d.ts +60 -0
- package/dist/components/editor-spinner.js +40 -0
- package/dist/components/editor-spinner.mjs +6 -0
- package/dist/components/hover-card.mjs +2 -2
- package/dist/components/index.d.mts +13 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/components/index.js +678 -198
- package/dist/components/index.mjs +93 -41
- package/dist/components/input-group.d.mts +5 -0
- package/dist/components/input-group.d.ts +5 -0
- package/dist/components/input-group.js +49 -0
- package/dist/components/input-group.mjs +6 -0
- package/dist/components/input-wrapper.d.mts +25 -0
- package/dist/components/input-wrapper.d.ts +25 -0
- package/dist/components/input-wrapper.js +72 -0
- package/dist/components/input-wrapper.mjs +6 -0
- package/dist/components/input.d.mts +30 -129
- package/dist/components/input.d.ts +30 -129
- package/dist/components/input.js +58 -71
- package/dist/components/input.mjs +2 -2
- package/dist/components/kbd.d.mts +35 -0
- package/dist/components/kbd.d.ts +35 -0
- package/dist/components/kbd.js +47 -0
- package/dist/components/kbd.mjs +6 -0
- package/dist/components/label.d.mts +22 -0
- package/dist/components/label.d.ts +22 -0
- package/dist/components/label.js +46 -0
- package/dist/components/label.mjs +6 -0
- package/dist/components/popover.d.mts +79 -14
- package/dist/components/popover.d.ts +79 -14
- package/dist/components/popover.js +41 -4
- package/dist/components/popover.mjs +2 -2
- package/dist/components/scroll-area.d.mts +50 -0
- package/dist/components/scroll-area.d.ts +50 -0
- package/dist/components/scroll-area.js +42 -0
- package/dist/components/scroll-area.mjs +6 -0
- package/dist/components/select.d.mts +76 -0
- package/dist/components/select.d.ts +76 -0
- package/dist/components/select.js +145 -0
- package/dist/components/select.mjs +7 -0
- package/dist/components/separator.d.mts +2 -2
- package/dist/components/separator.d.ts +2 -2
- package/dist/components/separator.js +7 -1
- package/dist/components/separator.mjs +1 -1
- package/dist/components/skeleton-avatar.mjs +3 -3
- package/dist/components/slash-dropdown-menu.d.mts +54 -0
- package/dist/components/slash-dropdown-menu.d.ts +54 -0
- package/dist/components/slash-dropdown-menu.js +55 -0
- package/dist/components/slash-dropdown-menu.mjs +7 -0
- package/dist/components/standard-chip.d.mts +4 -0
- package/dist/components/standard-chip.d.ts +4 -0
- package/dist/components/standard-chip.js +4 -2
- package/dist/components/standard-chip.mjs +2 -2
- package/dist/components/textarea.d.mts +25 -0
- package/dist/components/textarea.d.ts +25 -0
- package/dist/components/textarea.js +72 -0
- package/dist/components/textarea.mjs +7 -0
- package/dist/components/toolbar.d.mts +34 -0
- package/dist/components/toolbar.d.ts +34 -0
- package/dist/components/toolbar.js +46 -0
- package/dist/components/toolbar.mjs +6 -0
- package/dist/editor.css +784 -0
- package/dist/index.css +28 -1
- package/dist/index.d.mts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +678 -198
- package/dist/index.mjs +93 -41
- package/dist/utils/classes.d.mts +13 -1
- package/dist/utils/classes.d.ts +13 -1
- package/dist/utils/classes.js +14 -0
- package/dist/utils/classes.mjs +3 -1
- package/package.json +24 -18
- package/dist/chunk-CPEP2RO4.mjs +0 -17
- package/dist/chunk-IKJHZT2S.mjs +0 -19
- package/dist/chunk-UMSU2ZEG.mjs +0 -96
- /package/dist/{chunk-3ZVSVLZD.mjs → chunk-UWWO4AVU.mjs} +0 -0
|
@@ -3,7 +3,7 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
var dropdownMenu = tv({
|
|
4
4
|
slots: {
|
|
5
5
|
root: "",
|
|
6
|
-
content: "min-w-
|
|
6
|
+
content: "min-w-[8rem] bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
7
7
|
item: "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
8
8
|
checkboxItem: "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
9
|
iconWrapper: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
@@ -18,11 +18,24 @@ var popoverContentClasses = [
|
|
|
18
18
|
"bg-popover text-popover-foreground z-50",
|
|
19
19
|
"rounded-md border p-4 shadow-md outline-hidden"
|
|
20
20
|
];
|
|
21
|
+
var inputClasses = {
|
|
22
|
+
radius: {
|
|
23
|
+
sm: "rounded-sm",
|
|
24
|
+
md: "rounded-md",
|
|
25
|
+
lg: "rounded-lg"
|
|
26
|
+
},
|
|
27
|
+
height: {
|
|
28
|
+
sm: "h-7 min-h-7",
|
|
29
|
+
md: "h-8.5 min-h-8.5",
|
|
30
|
+
lg: "h-10 min-h-10"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
21
33
|
|
|
22
34
|
export {
|
|
23
35
|
focusVisibleClasses,
|
|
24
36
|
focusWithinClasses,
|
|
25
37
|
dataFocusVisibleClasses,
|
|
26
38
|
translateCenterClasses,
|
|
27
|
-
popoverContentClasses
|
|
39
|
+
popoverContentClasses,
|
|
40
|
+
inputClasses
|
|
28
41
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/components/kbd.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var kbd = tv({
|
|
4
|
+
base: "inline-flex items-center justify-center font-mono rounded-md",
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-accent border border-border text-accent-foreground",
|
|
8
|
+
outline: "text-accent-foreground border border-input"
|
|
9
|
+
},
|
|
10
|
+
size: {
|
|
11
|
+
md: "h-7 min-w-7 px-1.5 text-xs [&_svg]:size-3.5",
|
|
12
|
+
sm: "h-6 min-w-6 px-1 text-[0.75rem] leading-[0.75rem] [&_svg]:size-3",
|
|
13
|
+
xs: "h-5 min-w-5 px-1 text-[0.6875rem] leading-[0.75rem] [&_svg]:size-3"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
size: "md"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
kbd
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/components/toolbar.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var toolbar = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "flex items-center gap-2.5 rounded-md p-1",
|
|
6
|
+
button: "shrink-0",
|
|
7
|
+
separator: "bg-border h-6 w-px shrink-0",
|
|
8
|
+
group: "flex items-center gap-1"
|
|
9
|
+
},
|
|
10
|
+
variants: {
|
|
11
|
+
color: {
|
|
12
|
+
default: "bg-popover outline-border shadow-xs outline"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
color: "default"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
toolbar
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/components/color-highlight-button.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var colorHighlightButton = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
button: [
|
|
6
|
+
"relative min-w-none",
|
|
7
|
+
"hover:bg-",
|
|
8
|
+
"size-5 bg-[var(--highlight-color)]"
|
|
9
|
+
],
|
|
10
|
+
mark: [
|
|
11
|
+
"absolute size- left-0 top-0",
|
|
12
|
+
"border border-[var(--highlight-color)]",
|
|
13
|
+
"rounded-[inherit] box-border brightness-95 mix-blend-multiply",
|
|
14
|
+
"data-[active-state=on]:brightness-140"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
colorHighlightButton
|
|
21
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
popoverContentClasses
|
|
3
|
+
} from "./chunk-5DOB3IBE.mjs";
|
|
4
|
+
|
|
5
|
+
// src/components/popover.ts
|
|
6
|
+
import { tv } from "tailwind-variants";
|
|
7
|
+
var popover = tv({
|
|
8
|
+
slots: {
|
|
9
|
+
content: [
|
|
10
|
+
"data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95",
|
|
11
|
+
"data-[open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 ",
|
|
12
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
|
13
|
+
],
|
|
14
|
+
arrow: [
|
|
15
|
+
"data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px]",
|
|
16
|
+
"data-[side=left]:rotate-90 data-[side=right]:left-[-13px]",
|
|
17
|
+
"data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
|
|
18
|
+
],
|
|
19
|
+
arrowTop: "fill-popover",
|
|
20
|
+
arrowBottom: "fill-border"
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
default: {
|
|
25
|
+
content: [...popoverContentClasses]
|
|
26
|
+
},
|
|
27
|
+
ghost: {
|
|
28
|
+
content: "w-auto !p-0 bg-transparent"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
spacing: {
|
|
32
|
+
default: {
|
|
33
|
+
content: "p-4"
|
|
34
|
+
},
|
|
35
|
+
dense: {
|
|
36
|
+
content: "p-2"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
width: {
|
|
40
|
+
default: {
|
|
41
|
+
content: "w-72"
|
|
42
|
+
},
|
|
43
|
+
auto: {
|
|
44
|
+
content: "w-auto"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
variant: "default",
|
|
50
|
+
spacing: "default"
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
popover
|
|
56
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/components/editor-basic.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var editorBasic = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
wrapper: [
|
|
6
|
+
"overflow-y-auto",
|
|
7
|
+
"h-[calc(100%-var(--spacing-editor-toolbar))]"
|
|
8
|
+
],
|
|
9
|
+
content: [
|
|
10
|
+
"w-full",
|
|
11
|
+
"[&_.tiptap.ProseMirror]:py-4",
|
|
12
|
+
"[&_.tiptap.ProseMirror]:px-6"
|
|
13
|
+
],
|
|
14
|
+
toolbar: "flex items-center gap-0.5",
|
|
15
|
+
toolbarGroup: "flex items-center gap-0.5"
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
// rounded toolbar, muted background
|
|
20
|
+
default: {
|
|
21
|
+
wrapper: ["border rounded-md"],
|
|
22
|
+
toolbar: "bg-muted rounded-md p-1 mb-2",
|
|
23
|
+
content: ""
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: "default"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
editorBasic
|
|
34
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/components/input-group.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var inputGroup = tv({
|
|
4
|
+
base: [
|
|
5
|
+
"flex items-stretch",
|
|
6
|
+
"[&_[data-slot=input]]:grow",
|
|
7
|
+
"[&_[data-slot=input-addon]:has(+[data-slot=input])]:rounded-e-none [&_[data-slot=input-addon]:has(+[data-slot=input])]:border-e-0",
|
|
8
|
+
"[&_[data-slot=input-addon]:has(+[data-slot=datefield])]:rounded-e-none [&_[data-slot=input-addon]:has(+[data-slot=datefield])]:border-e-0",
|
|
9
|
+
"[&_[data-slot=input]+[data-slot=input-addon]]:rounded-s-none [&_[data-slot=input]+[data-slot=input-addon]]:border-s-0",
|
|
10
|
+
"[&_[data-slot=input-addon]:has(+[data-slot=button])]:rounded-e-none",
|
|
11
|
+
"[&_[data-slot=input]+[data-slot=button]]:rounded-s-none",
|
|
12
|
+
"[&_[data-slot=button]+[data-slot=input]]:rounded-s-none",
|
|
13
|
+
"[&_[data-slot=input-addon]+[data-slot=input]]:rounded-s-none",
|
|
14
|
+
"[&_[data-slot=input-addon]+[data-slot=datefield]]:[&_[data-slot=input]]:rounded-s-none",
|
|
15
|
+
"[&_[data-slot=datefield]:has(+[data-slot=input-addon])]:[&_[data-slot=input]]:rounded-e-none",
|
|
16
|
+
"[&_[data-slot=input]:has(+[data-slot=button])]:rounded-e-none",
|
|
17
|
+
"[&_[data-slot=input]:has(+[data-slot=input-addon])]:rounded-e-none",
|
|
18
|
+
"[&_[data-slot=datefield]]:grow",
|
|
19
|
+
"[&_[data-slot=datefield]+[data-slot=input-addon]]:rounded-s-none [&_[data-slot=datefield]+[data-slot=input-addon]]:border-s-0"
|
|
20
|
+
]
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
inputGroup
|
|
25
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
focusVisibleClasses
|
|
3
|
-
} from "./chunk-UEMJVVVF.mjs";
|
|
4
1
|
import {
|
|
5
2
|
colorVariants
|
|
6
3
|
} from "./chunk-WSEO3MLK.mjs";
|
|
4
|
+
import {
|
|
5
|
+
focusVisibleClasses
|
|
6
|
+
} from "./chunk-5DOB3IBE.mjs";
|
|
7
7
|
|
|
8
8
|
// src/components/button.ts
|
|
9
9
|
import { tv } from "tailwind-variants";
|
|
@@ -16,6 +16,7 @@ var button = tv({
|
|
|
16
16
|
...focusVisibleClasses,
|
|
17
17
|
// shadcn below
|
|
18
18
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
19
|
+
"data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
|
|
19
20
|
"shrink-0 [&_svg]:shrink-0",
|
|
20
21
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
21
22
|
"text-sm font-medium"
|
|
@@ -23,14 +24,14 @@ var button = tv({
|
|
|
23
24
|
variants: {
|
|
24
25
|
variant: {
|
|
25
26
|
solid: "shadow-xs",
|
|
26
|
-
ghost: "data-[active-state=on]:bg-
|
|
27
|
+
ghost: "data-[active-state=on]:bg-primary/10",
|
|
27
28
|
outline: "border-1 bg-transparent",
|
|
28
29
|
link: ""
|
|
29
30
|
},
|
|
30
31
|
size: {
|
|
31
|
-
sm: "px-3 min-w-16 h-
|
|
32
|
-
md: "px-4 min-w-20 h-
|
|
33
|
-
lg: "px-6 min-w-24 h-
|
|
32
|
+
sm: "px-3 min-w-16 h-7 text-xs gap-2 rounded-sm has-[>svg]:px-2.5 [&_svg]:size-3",
|
|
33
|
+
md: "px-4 min-w-20 h-8.5 text-sm gap-2 rounded-sm has-[>svg]:px-3 [&_svg]:size-4",
|
|
34
|
+
lg: "px-6 min-w-24 h-10 text-base gap-3 rounded-lg has-[>svg]:px-4 [&_svg]:size-4"
|
|
34
35
|
},
|
|
35
36
|
color: {
|
|
36
37
|
primary: "",
|
|
@@ -47,10 +48,15 @@ var button = tv({
|
|
|
47
48
|
isIconOnly: {
|
|
48
49
|
true: "px-0 !gap-0",
|
|
49
50
|
false: "[&>svg]:max-w-[theme(spacing.8)]"
|
|
51
|
+
},
|
|
52
|
+
spacing: {
|
|
53
|
+
default: "",
|
|
54
|
+
between: "justify-between",
|
|
55
|
+
start: "justify-start"
|
|
50
56
|
}
|
|
51
57
|
},
|
|
52
58
|
defaultVariants: {
|
|
53
|
-
size: "
|
|
59
|
+
size: "md",
|
|
54
60
|
variant: "solid",
|
|
55
61
|
color: "primary",
|
|
56
62
|
fullWidth: false,
|
|
@@ -117,7 +123,7 @@ var button = tv({
|
|
|
117
123
|
{
|
|
118
124
|
variant: "ghost",
|
|
119
125
|
color: "default",
|
|
120
|
-
class: colorVariants.ghost.default
|
|
126
|
+
class: [colorVariants.ghost.default, "hover:bg-accent/50"]
|
|
121
127
|
},
|
|
122
128
|
// outline color
|
|
123
129
|
{
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {
|
|
2
|
+
focusVisibleClasses,
|
|
3
|
+
inputClasses
|
|
4
|
+
} from "./chunk-5DOB3IBE.mjs";
|
|
5
|
+
|
|
6
|
+
// src/components/input.ts
|
|
7
|
+
import { tv } from "tailwind-variants";
|
|
8
|
+
var passwordInput = tv({
|
|
9
|
+
slots: {
|
|
10
|
+
button: "focus:outline-hidden",
|
|
11
|
+
icon: "pointer-events-none text-muted-foreground"
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
var input = tv({
|
|
15
|
+
base: [
|
|
16
|
+
"w-full inline-flex bg-background text-foreground",
|
|
17
|
+
"border-input border",
|
|
18
|
+
"shadow-xs placeholder:text-muted-foreground",
|
|
19
|
+
...focusVisibleClasses,
|
|
20
|
+
"disabled:cursor-not-allowed disabled:opacity-60",
|
|
21
|
+
"[&[readonly]]:bg-muted/80 [&[readonly]]:cursor-not-allowed",
|
|
22
|
+
"w-full font-normal outline-hidden focus-visible:outline-hidden",
|
|
23
|
+
"data-[has-start-content=true]:ps-1.5",
|
|
24
|
+
"data-[has-end-content=true]:pe-1.5",
|
|
25
|
+
"file:cursor-pointer file:bg-transparent file:border-0",
|
|
26
|
+
"autofill:bg-transparent bg-clip-text",
|
|
27
|
+
// legacy
|
|
28
|
+
"selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground",
|
|
29
|
+
"flex",
|
|
30
|
+
// file
|
|
31
|
+
"file:text-foreground file:inline-flex file:text-sm file:font-medium",
|
|
32
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
33
|
+
],
|
|
34
|
+
variants: {
|
|
35
|
+
size: {
|
|
36
|
+
sm: [
|
|
37
|
+
inputClasses.radius.sm,
|
|
38
|
+
inputClasses.height.sm,
|
|
39
|
+
"px-2.5 [&_svg]:size-4",
|
|
40
|
+
"text-sm file:h-6"
|
|
41
|
+
],
|
|
42
|
+
md: [
|
|
43
|
+
inputClasses.radius.md,
|
|
44
|
+
inputClasses.height.md,
|
|
45
|
+
"px-3 [&_svg]:size-4",
|
|
46
|
+
"text-base md:text-sm file:h-8"
|
|
47
|
+
],
|
|
48
|
+
lg: [
|
|
49
|
+
inputClasses.radius.lg,
|
|
50
|
+
inputClasses.height.md,
|
|
51
|
+
"px-4 [&_svg]:size-4",
|
|
52
|
+
"text-base file:h-10"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
radius: {
|
|
56
|
+
none: "rounded-none",
|
|
57
|
+
sm: "rounded-sm",
|
|
58
|
+
md: "rounded-md",
|
|
59
|
+
lg: "rounded-lg",
|
|
60
|
+
full: "rounded-full"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
size: "md"
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
passwordInput,
|
|
70
|
+
input
|
|
71
|
+
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dialog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LAJQAXSV.mjs";
|
|
4
4
|
|
|
5
5
|
// src/components/drawer.ts
|
|
6
6
|
import { tv } from "tailwind-variants";
|
|
7
7
|
var drawer = tv({
|
|
8
8
|
slots: {
|
|
9
|
-
overlay:
|
|
9
|
+
overlay: [
|
|
10
|
+
dialog.slots.overlay,
|
|
11
|
+
"data-[open]:animate-in data-[closed]:animate-out",
|
|
12
|
+
"data-[closed]:fade-out-0 data-[closed]:animation-duration-[300ms] data-[open]:fade-in-0"
|
|
13
|
+
],
|
|
10
14
|
content: [
|
|
11
|
-
"bg-background fixed
|
|
15
|
+
"bg-background fixed flex flex-col w-full gap-4 shadow-lg max-h-dvh",
|
|
12
16
|
"outline-hidden",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
17
|
+
"transition ease-in-out",
|
|
18
|
+
"data-[open]:animate-in data-[closed]:animate-out",
|
|
19
|
+
"data-[closed]:duration-300 data-[open]:duration-500"
|
|
15
20
|
],
|
|
16
21
|
close: dialog.slots.close,
|
|
17
22
|
closeTrigger: dialog.slots.closeTrigger,
|
|
@@ -60,14 +65,15 @@ var drawer = tv({
|
|
|
60
65
|
placement: {
|
|
61
66
|
top: {
|
|
62
67
|
content: [
|
|
63
|
-
"data-[
|
|
68
|
+
"data-[closed]:slide-out-to-top data-[open]:slide-in-from-top",
|
|
69
|
+
// radix
|
|
64
70
|
"inset-x-2 top-2 w-[calc(100svw-1rem)] max-h-[calc(100dvh-1rem)] mx-auto h-auto border-b",
|
|
65
71
|
"max-w-[calc(100svw-1rem)]"
|
|
66
72
|
]
|
|
67
73
|
},
|
|
68
74
|
bottom: {
|
|
69
75
|
content: [
|
|
70
|
-
"data-[
|
|
76
|
+
"data-[closed]:slide-out-to-bottom data-[open]:slide-in-from-bottom",
|
|
71
77
|
"inset-x-2 bottom-2 h-auto border-t",
|
|
72
78
|
"max-w-[calc(100svw-1rem)] max-h-[calc(100dvh-1rem)]"
|
|
73
79
|
]
|
|
@@ -75,13 +81,13 @@ var drawer = tv({
|
|
|
75
81
|
left: {
|
|
76
82
|
content: [
|
|
77
83
|
"inset-y-2 ms-2 left-0 border-r h-[calc(100dvh_-_1rem)]",
|
|
78
|
-
"data-[
|
|
84
|
+
"data-[closed]:slide-out-to-left data-[open]:slide-in-from-left"
|
|
79
85
|
]
|
|
80
86
|
},
|
|
81
87
|
right: {
|
|
82
88
|
content: [
|
|
83
89
|
"inset-y-2 me-2 right-0 h-[calc(100%-1rem)] border-l",
|
|
84
|
-
"data-[
|
|
90
|
+
"data-[closed]:slide-out-to-right data-[open]:slide-in-from-right"
|
|
85
91
|
]
|
|
86
92
|
}
|
|
87
93
|
},
|
|
@@ -3,19 +3,17 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
var dialog = tv({
|
|
4
4
|
slots: {
|
|
5
5
|
overlay: [
|
|
6
|
-
"fixed inset-0
|
|
7
|
-
"data-[
|
|
8
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
6
|
+
"fixed inset-0 bg-black/25 [backdrop-filter:blur(4px)]",
|
|
7
|
+
"data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"
|
|
9
8
|
],
|
|
10
9
|
content: [
|
|
11
10
|
"flex flex-col",
|
|
12
|
-
"bg-background fixed top-[50%] left-[50%]
|
|
11
|
+
"bg-background fixed top-[50%] left-[50%]",
|
|
13
12
|
"w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]",
|
|
14
|
-
"border shadow-lg",
|
|
15
|
-
"data-[
|
|
16
|
-
"data-[
|
|
17
|
-
"
|
|
18
|
-
"duration-200 sm:max-w-lg"
|
|
13
|
+
"border shadow-lg transition-all",
|
|
14
|
+
"data-[ending-style]:scale-90 data-[ending-style]:opacity-0",
|
|
15
|
+
"data-[starting-style]:scale-90 data-[starting-style]:opacity-0",
|
|
16
|
+
"duration-150 sm:max-w-lg"
|
|
19
17
|
],
|
|
20
18
|
close: [
|
|
21
19
|
"ring-offset-background focus:ring-ring",
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
// src/components/separator.ts
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
3
|
var separator = tv({
|
|
4
|
-
base:
|
|
4
|
+
base: [
|
|
5
|
+
"bg-border shrink-0",
|
|
6
|
+
"data-[orientation=horizontal]:h-px",
|
|
7
|
+
"data-[orientation=horizontal]:w-full",
|
|
8
|
+
"data-[orientation=vertical]:h-full",
|
|
9
|
+
"data-[orientation=vertical]:w-px"
|
|
10
|
+
],
|
|
5
11
|
variants: {
|
|
6
12
|
orientation: {
|
|
7
13
|
vertical: "",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/components/label.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var label = tv({
|
|
4
|
+
base: [
|
|
5
|
+
"text-sm leading-none",
|
|
6
|
+
"text-foreground",
|
|
7
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-50"
|
|
8
|
+
],
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
primary: "font-medium",
|
|
12
|
+
secondary: "font-normal"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "primary"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
label
|
|
22
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
focusVisibleClasses,
|
|
3
|
+
inputClasses
|
|
4
|
+
} from "./chunk-5DOB3IBE.mjs";
|
|
5
|
+
|
|
6
|
+
// src/components/textarea.ts
|
|
7
|
+
import { tv } from "tailwind-variants";
|
|
8
|
+
var textarea = tv({
|
|
9
|
+
base: [
|
|
10
|
+
"w-full border border-input bg-background text-foreground shadow-xs shadow-black/5 transition-[color,box-shadow]",
|
|
11
|
+
"text-foreground placeholder:text-muted-foreground/80",
|
|
12
|
+
"disabled:cursor-not-allowed disabled:opacity-50 [&[readonly]]:opacity-70 aria-invalid:border-destructive",
|
|
13
|
+
...focusVisibleClasses,
|
|
14
|
+
"aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20"
|
|
15
|
+
],
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
sm: [inputClasses.radius.sm, "px-2.5 py-2.5 text-xs"],
|
|
19
|
+
md: [
|
|
20
|
+
inputClasses.radius.md,
|
|
21
|
+
"px-3 py-3 text-[0.8125rem] leading-(--text-sm--line-height)"
|
|
22
|
+
],
|
|
23
|
+
lg: [inputClasses.radius.lg, "px-4 py-4 text-sm"]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
size: "md"
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
textarea
|
|
33
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import {
|
|
2
|
+
focusVisibleClasses,
|
|
3
|
+
inputClasses
|
|
4
|
+
} from "./chunk-5DOB3IBE.mjs";
|
|
5
|
+
|
|
6
|
+
// src/components/select.ts
|
|
7
|
+
import { tv } from "tailwind-variants";
|
|
8
|
+
var select = tv({
|
|
9
|
+
slots: {
|
|
10
|
+
trigger: [
|
|
11
|
+
"border-input border w-full shadow-xs",
|
|
12
|
+
...focusVisibleClasses,
|
|
13
|
+
"aria-expanded:outline-2 aria-expanded:outline-ring aria-expanded:outline-offset-2",
|
|
14
|
+
"group relative flex items-center justify-between gap-2 whitespace-nowrap select-none",
|
|
15
|
+
"transition-[color,box-shadow,border-color]",
|
|
16
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
17
|
+
"aria-invalid:border-destructive",
|
|
18
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
19
|
+
"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex",
|
|
20
|
+
"*:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
21
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground"
|
|
22
|
+
],
|
|
23
|
+
triggerIcon: "opacity-60 transition-transform duration-200",
|
|
24
|
+
placeholder: "text-muted-foreground",
|
|
25
|
+
clear: [
|
|
26
|
+
"cursor-pointer absolute top-1/2 -translate-y-1/2 end-2",
|
|
27
|
+
"rounded-sm opacity-60 hover:opacity-100 transition-opacity",
|
|
28
|
+
"focus:outline-none focus:ring-0 focus:ring-offset-0",
|
|
29
|
+
"disabled:pointer-events-none data-[disabled]:pointer-events-none"
|
|
30
|
+
],
|
|
31
|
+
content: [
|
|
32
|
+
"relative max-h-(--available-height) min-w-(--anchor-width) overflow-x-hidden overflow-y-auto",
|
|
33
|
+
"bg-popover text-popover-foreground",
|
|
34
|
+
"rounded-md border p-1 shadow-md",
|
|
35
|
+
"origin-[var(--transform-origin)]",
|
|
36
|
+
// radix styles
|
|
37
|
+
"data-[open]:animate-in data-[closed]:animate-out",
|
|
38
|
+
"data-[closed]:fade-out-0 data-[open]:fade-in-0",
|
|
39
|
+
"data-[closed]:zoom-out-95 data-[open]:zoom-in-95",
|
|
40
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
41
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
42
|
+
"data-[position=item-aligned]:[&_*[data-slot=select-item]]:min-w-[var(--anchor-width)]",
|
|
43
|
+
"data-[side=bottom]:mt-2 data-[side=top]:mb-2"
|
|
44
|
+
],
|
|
45
|
+
item: [
|
|
46
|
+
"relative flex w-full items-center cursor-default select-none",
|
|
47
|
+
"rounded-sm py-1.5 text-sm outline-hidden",
|
|
48
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
49
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
50
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
51
|
+
"*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
52
|
+
"pe7 ps-2 data-[indicator-position=left]:ps-7 data-[indicator-position=left]:pe-2"
|
|
53
|
+
],
|
|
54
|
+
indicatorContainer: [
|
|
55
|
+
"absolute flex h-3.5 w-3.5 items-center justify-center",
|
|
56
|
+
"data-[indicator-position=left]:start-2 data-[indicator-position=right]:end-2"
|
|
57
|
+
],
|
|
58
|
+
indicatorIcon: ["size-4 text-primary"],
|
|
59
|
+
label: [
|
|
60
|
+
"text-muted-foreground py-1.5 text-xs font-medium",
|
|
61
|
+
"pe-7 ps-2 data-[indicator-position=left]:ps-7 data-[indicator-position=left]:pe-2"
|
|
62
|
+
],
|
|
63
|
+
separator: ["bg-border pointer-events-none -mx-1 my-1 h-px"]
|
|
64
|
+
},
|
|
65
|
+
variants: {
|
|
66
|
+
size: {
|
|
67
|
+
sm: {
|
|
68
|
+
trigger: [
|
|
69
|
+
inputClasses.radius.sm,
|
|
70
|
+
inputClasses.height.sm,
|
|
71
|
+
// TODO
|
|
72
|
+
"px-2.5 text-xs gap-1",
|
|
73
|
+
"[&_[data-slot=select-icon]]:size-3.5 [&_[data-slot=select-icon]]:-me-0.75",
|
|
74
|
+
"[&_[data-slot=select-clear]>svg]:size-3 [&_[data-slot=select-clear]]:end-6"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
md: {
|
|
78
|
+
trigger: [
|
|
79
|
+
inputClasses.radius.md,
|
|
80
|
+
inputClasses.height.md,
|
|
81
|
+
// TODO
|
|
82
|
+
"px-3 text-[0.8125rem] leading-(--text-sm--line-height) gap-1 ",
|
|
83
|
+
"[&_[data-slot=select-icon]]:size-4 [&_[data-slot=select-icon]]:-me-1",
|
|
84
|
+
"[&_[data-slot=select-clear]>svg]:size-3.5 [&_[data-slot=select-clear]]:end-7"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
lg: {
|
|
88
|
+
trigger: [
|
|
89
|
+
inputClasses.radius.lg,
|
|
90
|
+
inputClasses.height.lg,
|
|
91
|
+
// TODO
|
|
92
|
+
"h-10 px-4 text-sm gap-1.5",
|
|
93
|
+
" [&_[data-slot=select-icon]]:size-4 [&_[data-slot=select-icon]]:-me-1.25",
|
|
94
|
+
" [&_[data-slot=select-clear]>svg]:size-3.5 [&_[data-slot=select-clear]]:end-8"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
defaultVariants: {
|
|
100
|
+
size: "md"
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
select
|
|
106
|
+
};
|
|
@@ -15,7 +15,8 @@ var chip = tv({
|
|
|
15
15
|
"justify-between",
|
|
16
16
|
"box-border",
|
|
17
17
|
"whitespace-nowrap",
|
|
18
|
-
"isolate"
|
|
18
|
+
"isolate",
|
|
19
|
+
"data-[active=true]:ring-2"
|
|
19
20
|
],
|
|
20
21
|
content: "flex-1 text-inherit font-normal",
|
|
21
22
|
indicator: "relative flex size-2 ml-1",
|
|
@@ -36,7 +37,8 @@ var chip = tv({
|
|
|
36
37
|
faded: {
|
|
37
38
|
root: "border-2"
|
|
38
39
|
},
|
|
39
|
-
flat: {}
|
|
40
|
+
flat: {},
|
|
41
|
+
ghost: {}
|
|
40
42
|
},
|
|
41
43
|
color: {
|
|
42
44
|
default: {
|