@kopexa/theme 1.7.6 → 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.
Files changed (144) hide show
  1. package/dist/{chunk-EXBKQDH5.mjs → chunk-3PCDCW7G.mjs} +1 -1
  2. package/dist/chunk-45KIKY4A.mjs +140 -0
  3. package/dist/{chunk-UEMJVVVF.mjs → chunk-5DOB3IBE.mjs} +14 -1
  4. package/dist/{chunk-SHHD2WUZ.mjs → chunk-7VZZASRG.mjs} +1 -1
  5. package/dist/chunk-BETLBSSF.mjs +23 -0
  6. package/dist/chunk-BWB7MWRC.mjs +22 -0
  7. package/dist/chunk-CPERWXKN.mjs +21 -0
  8. package/dist/chunk-DI54XTS5.mjs +56 -0
  9. package/dist/chunk-GRPMKEI2.mjs +34 -0
  10. package/dist/{chunk-ZL6FAOXE.mjs → chunk-HHOMDBMZ.mjs} +1 -1
  11. package/dist/chunk-HWEYNK3O.mjs +25 -0
  12. package/dist/{chunk-U32YEQZ5.mjs → chunk-IHITEH7V.mjs} +15 -9
  13. package/dist/chunk-IHW4FWFB.mjs +71 -0
  14. package/dist/{chunk-TJDRYBGW.mjs → chunk-JXQPOORM.mjs} +15 -9
  15. package/dist/{chunk-MWG2OZMD.mjs → chunk-LAJQAXSV.mjs} +7 -9
  16. package/dist/{chunk-VCLXE57S.mjs → chunk-LM7MKBHT.mjs} +7 -1
  17. package/dist/chunk-LMCM4CW2.mjs +22 -0
  18. package/dist/chunk-M3GQ563Q.mjs +33 -0
  19. package/dist/chunk-NFOF75HQ.mjs +106 -0
  20. package/dist/{chunk-JHKTRIIA.mjs → chunk-RQYYDG26.mjs} +4 -2
  21. package/dist/chunk-SPQE7K66.mjs +18 -0
  22. package/dist/chunk-TVC4THD6.mjs +16 -0
  23. package/dist/chunk-URGRCBNW.mjs +27 -0
  24. package/dist/chunk-VSVGOX3P.mjs +48 -0
  25. package/dist/chunk-XGUDXC5P.mjs +26 -0
  26. package/dist/{chunk-755GJHKQ.mjs → chunk-XRKUQMGU.mjs} +1 -1
  27. package/dist/{chunk-JQ74U2S3.mjs → chunk-YH6TDPK7.mjs} +4 -4
  28. package/dist/chunk-Z7D56R5U.mjs +70 -0
  29. package/dist/components/alert-dialog.d.mts +9 -9
  30. package/dist/components/alert-dialog.d.ts +9 -9
  31. package/dist/components/alert-dialog.js +11 -2
  32. package/dist/components/alert-dialog.mjs +1 -1
  33. package/dist/components/autocomplete.d.mts +73 -0
  34. package/dist/components/autocomplete.d.ts +73 -0
  35. package/dist/components/autocomplete.js +173 -0
  36. package/dist/components/autocomplete.mjs +8 -0
  37. package/dist/components/avatar.mjs +2 -2
  38. package/dist/components/button.d.mts +15 -0
  39. package/dist/components/button.d.ts +15 -0
  40. package/dist/components/button.js +12 -6
  41. package/dist/components/button.mjs +2 -2
  42. package/dist/components/chip.d.mts +3 -0
  43. package/dist/components/chip.d.ts +3 -0
  44. package/dist/components/chip.js +4 -2
  45. package/dist/components/chip.mjs +1 -1
  46. package/dist/components/color-highlight-button.d.mts +36 -0
  47. package/dist/components/color-highlight-button.d.ts +36 -0
  48. package/dist/components/color-highlight-button.js +45 -0
  49. package/dist/components/color-highlight-button.mjs +6 -0
  50. package/dist/components/command.d.mts +9 -9
  51. package/dist/components/command.d.ts +9 -9
  52. package/dist/components/data-grid.d.mts +325 -0
  53. package/dist/components/data-grid.d.ts +325 -0
  54. package/dist/components/data-grid.js +164 -0
  55. package/dist/components/data-grid.mjs +6 -0
  56. package/dist/components/dialog.js +7 -9
  57. package/dist/components/dialog.mjs +1 -1
  58. package/dist/components/drawer.d.mts +3 -3
  59. package/dist/components/drawer.d.ts +3 -3
  60. package/dist/components/drawer.js +21 -17
  61. package/dist/components/drawer.mjs +2 -2
  62. package/dist/components/dropdown-menu.js +1 -1
  63. package/dist/components/dropdown-menu.mjs +1 -1
  64. package/dist/components/editor-basic.d.mts +44 -0
  65. package/dist/components/editor-basic.d.ts +44 -0
  66. package/dist/components/editor-basic.js +58 -0
  67. package/dist/components/editor-basic.mjs +6 -0
  68. package/dist/components/editor-spinner.d.mts +60 -0
  69. package/dist/components/editor-spinner.d.ts +60 -0
  70. package/dist/components/editor-spinner.js +40 -0
  71. package/dist/components/editor-spinner.mjs +6 -0
  72. package/dist/components/hover-card.mjs +2 -2
  73. package/dist/components/index.d.mts +14 -0
  74. package/dist/components/index.d.ts +14 -0
  75. package/dist/components/index.js +815 -196
  76. package/dist/components/index.mjs +100 -44
  77. package/dist/components/input-group.d.mts +5 -0
  78. package/dist/components/input-group.d.ts +5 -0
  79. package/dist/components/input-group.js +49 -0
  80. package/dist/components/input-group.mjs +6 -0
  81. package/dist/components/input-wrapper.d.mts +25 -0
  82. package/dist/components/input-wrapper.d.ts +25 -0
  83. package/dist/components/input-wrapper.js +72 -0
  84. package/dist/components/input-wrapper.mjs +6 -0
  85. package/dist/components/input.d.mts +30 -129
  86. package/dist/components/input.d.ts +30 -129
  87. package/dist/components/input.js +58 -71
  88. package/dist/components/input.mjs +2 -2
  89. package/dist/components/kbd.d.mts +35 -0
  90. package/dist/components/kbd.d.ts +35 -0
  91. package/dist/components/kbd.js +47 -0
  92. package/dist/components/kbd.mjs +6 -0
  93. package/dist/components/label.d.mts +22 -0
  94. package/dist/components/label.d.ts +22 -0
  95. package/dist/components/label.js +46 -0
  96. package/dist/components/label.mjs +6 -0
  97. package/dist/components/popover.d.mts +79 -14
  98. package/dist/components/popover.d.ts +79 -14
  99. package/dist/components/popover.js +41 -4
  100. package/dist/components/popover.mjs +2 -2
  101. package/dist/components/scroll-area.d.mts +50 -0
  102. package/dist/components/scroll-area.d.ts +50 -0
  103. package/dist/components/scroll-area.js +42 -0
  104. package/dist/components/scroll-area.mjs +6 -0
  105. package/dist/components/select.d.mts +76 -0
  106. package/dist/components/select.d.ts +76 -0
  107. package/dist/components/select.js +145 -0
  108. package/dist/components/select.mjs +7 -0
  109. package/dist/components/separator.d.mts +2 -2
  110. package/dist/components/separator.d.ts +2 -2
  111. package/dist/components/separator.js +7 -1
  112. package/dist/components/separator.mjs +1 -1
  113. package/dist/components/skeleton-avatar.mjs +3 -3
  114. package/dist/components/slash-dropdown-menu.d.mts +54 -0
  115. package/dist/components/slash-dropdown-menu.d.ts +54 -0
  116. package/dist/components/slash-dropdown-menu.js +55 -0
  117. package/dist/components/slash-dropdown-menu.mjs +7 -0
  118. package/dist/components/standard-chip.d.mts +4 -0
  119. package/dist/components/standard-chip.d.ts +4 -0
  120. package/dist/components/standard-chip.js +4 -2
  121. package/dist/components/standard-chip.mjs +2 -2
  122. package/dist/components/textarea.d.mts +25 -0
  123. package/dist/components/textarea.d.ts +25 -0
  124. package/dist/components/textarea.js +72 -0
  125. package/dist/components/textarea.mjs +7 -0
  126. package/dist/components/toolbar.d.mts +34 -0
  127. package/dist/components/toolbar.d.ts +34 -0
  128. package/dist/components/toolbar.js +46 -0
  129. package/dist/components/toolbar.mjs +6 -0
  130. package/dist/editor.css +784 -0
  131. package/dist/index.css +39 -12
  132. package/dist/index.d.mts +14 -0
  133. package/dist/index.d.ts +14 -0
  134. package/dist/index.js +815 -196
  135. package/dist/index.mjs +100 -44
  136. package/dist/utils/classes.d.mts +13 -1
  137. package/dist/utils/classes.d.ts +13 -1
  138. package/dist/utils/classes.js +14 -0
  139. package/dist/utils/classes.mjs +3 -1
  140. package/package.json +24 -18
  141. package/dist/chunk-CPEP2RO4.mjs +0 -17
  142. package/dist/chunk-IKJHZT2S.mjs +0 -19
  143. package/dist/chunk-UMSU2ZEG.mjs +0 -96
  144. /package/dist/{chunk-MA4DKK64.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-56 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",
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",
@@ -0,0 +1,140 @@
1
+ // src/components/data-grid.ts
2
+ import { tv } from "tailwind-variants";
3
+ var datagrid = tv({
4
+ slots: {
5
+ container: "grid w-full",
6
+ table: "w-full align-middle caption-bottom text-left rtl:text-right text-foreground font-normal text-sm",
7
+ head: "",
8
+ headerRow: "",
9
+ headerRowCell: "relative h-10 text-left rtl:text-right align-middle font-normal text-secondary-foreground/80 [&:has([role=checkbox])]:pe-0",
10
+ headRowCellResize: "absolute top-0 h-full w-4 cursor-col-resize user-select-none touch-none -end-2 z-10 flex justify-center before:absolute before:w-px before:inset-y-0 before:bg-border before:-translate-x-px",
11
+ rowSpacer: "h-2",
12
+ body: "[&_tr:last-child]:border-0",
13
+ bodyRowSkeleton: "hover:bg-muted/40 data-[state=selected]:bg-muted/50",
14
+ bodyRowSkeletonCell: "align-middle",
15
+ bodyRow: "hover:bg-muted/40 data-[state=selected]:bg-muted/50",
16
+ bodyRowCell: "align-middle",
17
+ bodyRowExpanded: "",
18
+ empty: "text-center text-muted-foreground py-6"
19
+ },
20
+ variants: {
21
+ border: {
22
+ true: {
23
+ container: "border border-border rounded-lg"
24
+ }
25
+ },
26
+ headerBorder: {
27
+ true: {
28
+ headerRow: "[&>th]:border-b"
29
+ }
30
+ },
31
+ cellBorder: {
32
+ true: {
33
+ headerRow: "[&_>:last-child]:border-e-0",
34
+ headerRowCell: "border-e",
35
+ bodyRowSkeleton: "[&_>:last-child]:border-e-0",
36
+ bodyRowSkeletonCell: "border-e",
37
+ bodyRow: "[&_>:last-child]:border-e-0",
38
+ bodyRowCell: "border-e"
39
+ }
40
+ },
41
+ rowBorder: {
42
+ true: {
43
+ bodyRowExpanded: "[&:not(:last-child)>td]:border-b"
44
+ }
45
+ },
46
+ rowRounded: {
47
+ true: {
48
+ body: "[&_td:first-child]:rounded-s-lg [&_td:last-child]:rounded-e-lg"
49
+ }
50
+ },
51
+ columnsResizable: {
52
+ true: {
53
+ headerRowCell: "truncate"
54
+ }
55
+ },
56
+ columnsDraggable: {
57
+ true: {
58
+ table: "border-separate border-spacing-0"
59
+ }
60
+ },
61
+ headerBackground: {
62
+ false: {
63
+ headerRow: "bg-transparent"
64
+ },
65
+ true: {
66
+ headerRow: "bg-muted/40"
67
+ }
68
+ },
69
+ stripped: {
70
+ true: {
71
+ headerRow: "bg-transparent",
72
+ bodyRowSkeleton: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted",
73
+ bodyRow: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted"
74
+ }
75
+ },
76
+ width: {
77
+ fixed: {
78
+ table: "table-fixed",
79
+ headerRowCell: "w-[var(--size)]"
80
+ },
81
+ auto: {
82
+ table: "table-auto"
83
+ }
84
+ },
85
+ dense: {
86
+ true: {
87
+ headerRowCell: "px-2.5 h-8",
88
+ bodyRowSkeletonCell: "px-2.5 py-2",
89
+ bodyRowCell: "px-2.5 py-2"
90
+ },
91
+ false: {
92
+ headerRowCell: "px-4",
93
+ bodyRowSkeletonCell: "px-4 py-3",
94
+ bodyRowCell: "px-4 py-3"
95
+ }
96
+ },
97
+ columnsPinnable: {
98
+ true: {
99
+ headerRowCell: "[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0 [&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0 [&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0 [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-border data-pinned:bg-muted/90 data-pinned:backdrop-blur-xs"
100
+ },
101
+ false: {}
102
+ },
103
+ headerSticky: {
104
+ true: {
105
+ head: "sticky top-0 z-10 bg-background/90 backdrop-blur-xs"
106
+ }
107
+ },
108
+ loadingMode: {
109
+ skeleton: {}
110
+ }
111
+ },
112
+ compoundVariants: [
113
+ {
114
+ stripped: false,
115
+ rowBorder: true,
116
+ className: {
117
+ bodyRowSkeleton: "border-b border-border [&:not(:last-child)>td]:border-b",
118
+ bodyRow: "border-b border-border [&:not(:last-child)>td]:border-b"
119
+ }
120
+ }
121
+ ],
122
+ defaultVariants: {
123
+ border: true,
124
+ dense: false,
125
+ width: "fixed",
126
+ headerSticky: false,
127
+ headerBorder: true,
128
+ headerBackground: true,
129
+ cellBorder: false,
130
+ stripped: false,
131
+ columnsPinnable: false,
132
+ columnsResizable: false,
133
+ loadingMode: "skeleton",
134
+ rowBorder: true
135
+ }
136
+ });
137
+
138
+ export {
139
+ datagrid
140
+ };
@@ -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
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chip
3
- } from "./chunk-JHKTRIIA.mjs";
3
+ } from "./chunk-RQYYDG26.mjs";
4
4
 
5
5
  // src/components/standard-chip.ts
6
6
  import { tv } from "tailwind-variants";
@@ -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
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  avatar
3
- } from "./chunk-JQ74U2S3.mjs";
3
+ } from "./chunk-YH6TDPK7.mjs";
4
4
 
5
5
  // src/components/skeleton-avatar.ts
6
6
  import { tv } from "tailwind-variants";
@@ -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-accent/70",
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-8 text-xs gap-2 rounded-sm has-[>svg]:px-2.5 [&_svg]:size-3",
32
- md: "px-4 min-w-20 h-10 text-sm gap-2 rounded-md has-[>svg]:px-3 [&_svg]:size-4",
33
- lg: "px-6 min-w-24 h-12 text-base gap-3 rounded-lg has-[>svg]:px-4 [&_svg]:size-4"
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: "sm",
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-MWG2OZMD.mjs";
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: dialog.slots.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 z-50 flex flex-col w-full gap-4 shadow-lg max-h-dvh",
15
+ "bg-background fixed flex flex-col w-full gap-4 shadow-lg max-h-dvh",
12
16
  "outline-hidden",
13
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
14
- "transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500"
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-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
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-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
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-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left"
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-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right"
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 z-50 bg-black/25",
7
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
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%] z-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-[state=open]:animate-in data-[state=closed]:animate-out",
16
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
17
- "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
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: "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
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
+ };