@nextui-org/theme 0.0.0-canary-20240429052129

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 (286) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/colors.d.ts +1 -0
  4. package/colors.js +1 -0
  5. package/dist/animations/index.d.ts +71 -0
  6. package/dist/animations/index.js +98 -0
  7. package/dist/animations/index.mjs +6 -0
  8. package/dist/chunk-2PIR7DFM.mjs +77 -0
  9. package/dist/chunk-3FZU25GR.mjs +33 -0
  10. package/dist/chunk-3LKKH4AR.mjs +17 -0
  11. package/dist/chunk-4Z22WXZX.mjs +21 -0
  12. package/dist/chunk-4ZM6AI3H.mjs +366 -0
  13. package/dist/chunk-6XJJCV76.mjs +243 -0
  14. package/dist/chunk-726LN7M3.mjs +20 -0
  15. package/dist/chunk-7ODIBITJ.mjs +172 -0
  16. package/dist/chunk-7TJINK3S.mjs +390 -0
  17. package/dist/chunk-AC6F4DT6.mjs +485 -0
  18. package/dist/chunk-AGUZRGXC.mjs +12 -0
  19. package/dist/chunk-AO2AAOEJ.mjs +56 -0
  20. package/dist/chunk-AT4OXKKK.mjs +58 -0
  21. package/dist/chunk-CMYR6AOY.mjs +0 -0
  22. package/dist/chunk-CQY2A2EX.mjs +401 -0
  23. package/dist/chunk-CTY7IP65.mjs +723 -0
  24. package/dist/chunk-CUUGEIPA.mjs +474 -0
  25. package/dist/chunk-D2XMP2NC.mjs +6 -0
  26. package/dist/chunk-DCEG5LGX.mjs +17 -0
  27. package/dist/chunk-DI2L75XK.mjs +22 -0
  28. package/dist/chunk-DMASP6FA.mjs +74 -0
  29. package/dist/chunk-ECP4S2VZ.mjs +36 -0
  30. package/dist/chunk-FRI2VDCA.mjs +306 -0
  31. package/dist/chunk-G4RCK475.mjs +155 -0
  32. package/dist/chunk-GHZ36ATJ.mjs +17 -0
  33. package/dist/chunk-GMMETTYU.mjs +30 -0
  34. package/dist/chunk-HPFX3B3F.mjs +59 -0
  35. package/dist/chunk-HUBDRSA4.mjs +49 -0
  36. package/dist/chunk-I6ESTKKY.mjs +422 -0
  37. package/dist/chunk-IAS3SFA4.mjs +42 -0
  38. package/dist/chunk-IP3D7KVB.mjs +181 -0
  39. package/dist/chunk-JQTFOIV7.mjs +108 -0
  40. package/dist/chunk-JUEOCLA3.mjs +17 -0
  41. package/dist/chunk-K7LK7NCE.mjs +0 -0
  42. package/dist/chunk-KA5SSSWD.mjs +177 -0
  43. package/dist/chunk-KCOC3H6R.mjs +98 -0
  44. package/dist/chunk-KUNVFLXJ.mjs +41 -0
  45. package/dist/chunk-KVPPQD2E.mjs +231 -0
  46. package/dist/chunk-L2OL7R23.mjs +17 -0
  47. package/dist/chunk-LDBYFTHC.mjs +134 -0
  48. package/dist/chunk-LKKSQVZ6.mjs +163 -0
  49. package/dist/chunk-M3MKSQ42.mjs +124 -0
  50. package/dist/chunk-M63AFAHO.mjs +0 -0
  51. package/dist/chunk-MUWHEIW6.mjs +831 -0
  52. package/dist/chunk-NAUU2OUH.mjs +23 -0
  53. package/dist/chunk-NYSEAAK5.mjs +214 -0
  54. package/dist/chunk-OQIS4MXV.mjs +205 -0
  55. package/dist/chunk-OR5PUD24.mjs +17 -0
  56. package/dist/chunk-PSEUPXFL.mjs +122 -0
  57. package/dist/chunk-QZTWGJ72.mjs +16 -0
  58. package/dist/chunk-RNAP5C4C.mjs +406 -0
  59. package/dist/chunk-S573WUYY.mjs +381 -0
  60. package/dist/chunk-SEKJ6A6T.mjs +396 -0
  61. package/dist/chunk-T3GWIVAM.mjs +17 -0
  62. package/dist/chunk-UODOTC2G.mjs +21 -0
  63. package/dist/chunk-UVXYPGDZ.mjs +0 -0
  64. package/dist/chunk-V5ZTBGGO.mjs +42 -0
  65. package/dist/chunk-VDRJHB4F.mjs +187 -0
  66. package/dist/chunk-VFJ7C5ZV.mjs +391 -0
  67. package/dist/chunk-VJTX4YUQ.mjs +31 -0
  68. package/dist/chunk-W6DVXJB3.mjs +21 -0
  69. package/dist/chunk-WAAJG22Y.mjs +90 -0
  70. package/dist/chunk-WBQAMGXK.mjs +0 -0
  71. package/dist/chunk-WQEDQHKX.mjs +0 -0
  72. package/dist/chunk-X7N3NQ6S.mjs +158 -0
  73. package/dist/chunk-XHQUSKIE.mjs +60 -0
  74. package/dist/chunk-YJLQTC7L.mjs +0 -0
  75. package/dist/chunk-YSA7EQBH.mjs +237 -0
  76. package/dist/chunk-YZYGFPNK.mjs +17 -0
  77. package/dist/colors/blue.d.ts +14 -0
  78. package/dist/colors/blue.js +41 -0
  79. package/dist/colors/blue.mjs +6 -0
  80. package/dist/colors/common.d.ts +103 -0
  81. package/dist/colors/common.js +155 -0
  82. package/dist/colors/common.mjs +14 -0
  83. package/dist/colors/cyan.d.ts +14 -0
  84. package/dist/colors/cyan.js +41 -0
  85. package/dist/colors/cyan.mjs +6 -0
  86. package/dist/colors/green.d.ts +14 -0
  87. package/dist/colors/green.js +41 -0
  88. package/dist/colors/green.mjs +6 -0
  89. package/dist/colors/index.d.ts +109 -0
  90. package/dist/colors/index.js +335 -0
  91. package/dist/colors/index.mjs +24 -0
  92. package/dist/colors/pink.d.ts +14 -0
  93. package/dist/colors/pink.js +41 -0
  94. package/dist/colors/pink.mjs +6 -0
  95. package/dist/colors/purple.d.ts +14 -0
  96. package/dist/colors/purple.js +41 -0
  97. package/dist/colors/purple.mjs +6 -0
  98. package/dist/colors/red.d.ts +14 -0
  99. package/dist/colors/red.js +41 -0
  100. package/dist/colors/red.mjs +6 -0
  101. package/dist/colors/semantic.d.ts +10 -0
  102. package/dist/colors/semantic.js +327 -0
  103. package/dist/colors/semantic.mjs +20 -0
  104. package/dist/colors/types.d.ts +39 -0
  105. package/dist/colors/types.js +18 -0
  106. package/dist/colors/types.mjs +1 -0
  107. package/dist/colors/yellow.d.ts +14 -0
  108. package/dist/colors/yellow.js +41 -0
  109. package/dist/colors/yellow.mjs +6 -0
  110. package/dist/colors/zinc.d.ts +14 -0
  111. package/dist/colors/zinc.js +41 -0
  112. package/dist/colors/zinc.mjs +6 -0
  113. package/dist/colors.d.ts +4 -0
  114. package/dist/colors.js +335 -0
  115. package/dist/colors.mjs +25 -0
  116. package/dist/components/accordion.d.ts +402 -0
  117. package/dist/components/accordion.js +154 -0
  118. package/dist/components/accordion.mjs +13 -0
  119. package/dist/components/autocomplete.d.ts +180 -0
  120. package/dist/components/autocomplete.js +107 -0
  121. package/dist/components/autocomplete.mjs +7 -0
  122. package/dist/components/avatar.d.ts +572 -0
  123. package/dist/components/avatar.js +320 -0
  124. package/dist/components/avatar.mjs +13 -0
  125. package/dist/components/badge.d.ts +484 -0
  126. package/dist/components/badge.js +501 -0
  127. package/dist/components/badge.mjs +11 -0
  128. package/dist/components/breadcrumbs.d.ts +816 -0
  129. package/dist/components/breadcrumbs.js +299 -0
  130. package/dist/components/breadcrumbs.mjs +13 -0
  131. package/dist/components/button.d.ts +393 -0
  132. package/dist/components/button.js +556 -0
  133. package/dist/components/button.mjs +13 -0
  134. package/dist/components/calendar.d.ts +495 -0
  135. package/dist/components/calendar.js +456 -0
  136. package/dist/components/calendar.mjs +11 -0
  137. package/dist/components/card.d.ts +550 -0
  138. package/dist/components/card.js +213 -0
  139. package/dist/components/card.mjs +11 -0
  140. package/dist/components/checkbox.d.ts +773 -0
  141. package/dist/components/checkbox.js +271 -0
  142. package/dist/components/checkbox.mjs +13 -0
  143. package/dist/components/chip.d.ts +737 -0
  144. package/dist/components/chip.js +611 -0
  145. package/dist/components/chip.mjs +11 -0
  146. package/dist/components/circular-progress.d.ts +430 -0
  147. package/dist/components/circular-progress.js +139 -0
  148. package/dist/components/circular-progress.mjs +7 -0
  149. package/dist/components/code.d.ts +165 -0
  150. package/dist/components/code.js +162 -0
  151. package/dist/components/code.mjs +11 -0
  152. package/dist/components/date-input.d.ts +815 -0
  153. package/dist/components/date-input.js +439 -0
  154. package/dist/components/date-input.mjs +7 -0
  155. package/dist/components/date-picker.d.ts +325 -0
  156. package/dist/components/date-picker.js +81 -0
  157. package/dist/components/date-picker.mjs +9 -0
  158. package/dist/components/divider.d.ts +52 -0
  159. package/dist/components/divider.js +70 -0
  160. package/dist/components/divider.mjs +7 -0
  161. package/dist/components/drip.d.ts +14 -0
  162. package/dist/components/drip.js +61 -0
  163. package/dist/components/drip.mjs +7 -0
  164. package/dist/components/dropdown.d.ts +417 -0
  165. package/dist/components/dropdown.js +424 -0
  166. package/dist/components/dropdown.mjs +17 -0
  167. package/dist/components/image.d.ts +355 -0
  168. package/dist/components/image.js +183 -0
  169. package/dist/components/image.mjs +7 -0
  170. package/dist/components/index.d.ts +41 -0
  171. package/dist/components/index.js +8804 -0
  172. package/dist/components/index.mjs +194 -0
  173. package/dist/components/input.d.ts +942 -0
  174. package/dist/components/input.js +893 -0
  175. package/dist/components/input.mjs +11 -0
  176. package/dist/components/kbd.d.ts +51 -0
  177. package/dist/components/kbd.js +82 -0
  178. package/dist/components/kbd.mjs +7 -0
  179. package/dist/components/link.d.ts +232 -0
  180. package/dist/components/link.js +164 -0
  181. package/dist/components/link.mjs +13 -0
  182. package/dist/components/listbox.d.ts +3 -0
  183. package/dist/components/listbox.js +531 -0
  184. package/dist/components/listbox.mjs +16 -0
  185. package/dist/components/menu.d.ts +512 -0
  186. package/dist/components/menu.js +531 -0
  187. package/dist/components/menu.mjs +15 -0
  188. package/dist/components/modal.d.ts +765 -0
  189. package/dist/components/modal.js +236 -0
  190. package/dist/components/modal.mjs +11 -0
  191. package/dist/components/navbar.d.ts +463 -0
  192. package/dist/components/navbar.js +260 -0
  193. package/dist/components/navbar.mjs +11 -0
  194. package/dist/components/pagination.d.ts +587 -0
  195. package/dist/components/pagination.js +532 -0
  196. package/dist/components/pagination.mjs +11 -0
  197. package/dist/components/popover.d.ts +715 -0
  198. package/dist/components/popover.js +303 -0
  199. package/dist/components/popover.mjs +11 -0
  200. package/dist/components/progress.d.ts +294 -0
  201. package/dist/components/progress.js +173 -0
  202. package/dist/components/progress.mjs +7 -0
  203. package/dist/components/radio.d.ts +708 -0
  204. package/dist/components/radio.js +220 -0
  205. package/dist/components/radio.mjs +13 -0
  206. package/dist/components/scroll-shadow.d.ts +82 -0
  207. package/dist/components/scroll-shadow.js +85 -0
  208. package/dist/components/scroll-shadow.mjs +7 -0
  209. package/dist/components/select.d.ts +901 -0
  210. package/dist/components/select.js +778 -0
  211. package/dist/components/select.mjs +11 -0
  212. package/dist/components/skeleton.d.ts +105 -0
  213. package/dist/components/skeleton.js +105 -0
  214. package/dist/components/skeleton.mjs +7 -0
  215. package/dist/components/slider.d.ts +1024 -0
  216. package/dist/components/slider.js +446 -0
  217. package/dist/components/slider.mjs +11 -0
  218. package/dist/components/snippet.d.ts +415 -0
  219. package/dist/components/snippet.js +426 -0
  220. package/dist/components/snippet.mjs +11 -0
  221. package/dist/components/spacer.d.ts +52 -0
  222. package/dist/components/spacer.js +70 -0
  223. package/dist/components/spacer.mjs +7 -0
  224. package/dist/components/spinner.d.ts +564 -0
  225. package/dist/components/spinner.js +171 -0
  226. package/dist/components/spinner.mjs +7 -0
  227. package/dist/components/table.d.ts +777 -0
  228. package/dist/components/table.js +286 -0
  229. package/dist/components/table.mjs +11 -0
  230. package/dist/components/tabs.d.ts +772 -0
  231. package/dist/components/tabs.js +522 -0
  232. package/dist/components/tabs.mjs +11 -0
  233. package/dist/components/toggle.d.ts +485 -0
  234. package/dist/components/toggle.js +228 -0
  235. package/dist/components/toggle.mjs +11 -0
  236. package/dist/components/user.d.ts +81 -0
  237. package/dist/components/user.js +78 -0
  238. package/dist/components/user.mjs +11 -0
  239. package/dist/default-layout.d.ts +8 -0
  240. package/dist/default-layout.js +75 -0
  241. package/dist/default-layout.mjs +10 -0
  242. package/dist/index.d.ts +52 -0
  243. package/dist/index.js +9585 -0
  244. package/dist/index.mjs +252 -0
  245. package/dist/plugin.d.ts +12 -0
  246. package/dist/plugin.js +775 -0
  247. package/dist/plugin.mjs +28 -0
  248. package/dist/types.d.ts +138 -0
  249. package/dist/types.js +18 -0
  250. package/dist/types.mjs +1 -0
  251. package/dist/utilities/custom.d.ts +22 -0
  252. package/dist/utilities/custom.js +44 -0
  253. package/dist/utilities/custom.mjs +6 -0
  254. package/dist/utilities/index.d.ts +83 -0
  255. package/dist/utilities/index.js +128 -0
  256. package/dist/utilities/index.mjs +9 -0
  257. package/dist/utilities/scrollbar-hide.d.ts +24 -0
  258. package/dist/utilities/scrollbar-hide.js +43 -0
  259. package/dist/utilities/scrollbar-hide.mjs +6 -0
  260. package/dist/utilities/transition.d.ts +58 -0
  261. package/dist/utilities/transition.js +83 -0
  262. package/dist/utilities/transition.mjs +8 -0
  263. package/dist/utils/classes.d.ts +34 -0
  264. package/dist/utils/classes.js +91 -0
  265. package/dist/utils/classes.mjs +20 -0
  266. package/dist/utils/index.d.ts +4 -0
  267. package/dist/utils/index.js +169 -0
  268. package/dist/utils/index.mjs +26 -0
  269. package/dist/utils/object.d.ts +12 -0
  270. package/dist/utils/object.js +73 -0
  271. package/dist/utils/object.mjs +10 -0
  272. package/dist/utils/theme.d.ts +9 -0
  273. package/dist/utils/theme.js +30 -0
  274. package/dist/utils/theme.mjs +6 -0
  275. package/dist/utils/tv.d.ts +5 -0
  276. package/dist/utils/tv.js +54 -0
  277. package/dist/utils/tv.mjs +6 -0
  278. package/dist/utils/types.d.ts +10 -0
  279. package/dist/utils/types.js +18 -0
  280. package/dist/utils/types.mjs +1 -0
  281. package/dist/utils/variants.d.ts +67 -0
  282. package/dist/utils/variants.js +101 -0
  283. package/dist/utils/variants.mjs +6 -0
  284. package/package.json +100 -0
  285. package/plugin.d.ts +1 -0
  286. package/plugin.js +1 -0
@@ -0,0 +1,172 @@
1
+ import {
2
+ tv
3
+ } from "./chunk-GMMETTYU.mjs";
4
+ import {
5
+ groupDataFocusVisibleClasses
6
+ } from "./chunk-XHQUSKIE.mjs";
7
+
8
+ // src/components/toggle.ts
9
+ var toggle = tv({
10
+ slots: {
11
+ base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer touch-none tap-highlight-transparent",
12
+ wrapper: [
13
+ "px-1",
14
+ "relative",
15
+ "inline-flex",
16
+ "items-center",
17
+ "justify-start",
18
+ "flex-shrink-0",
19
+ "overflow-hidden",
20
+ "bg-default-200",
21
+ "rounded-full",
22
+ ...groupDataFocusVisibleClasses
23
+ ],
24
+ thumb: [
25
+ "z-10",
26
+ "flex",
27
+ "items-center",
28
+ "justify-center",
29
+ "bg-white",
30
+ "shadow-small",
31
+ "rounded-full",
32
+ "origin-right"
33
+ ],
34
+ startContent: "z-0 absolute left-1.5 rtl:right-1.5 rtl:left-[unset] text-current",
35
+ endContent: "z-0 absolute right-1.5 rtl:left-1.5 rtl:right-[unset] text-default-600",
36
+ thumbIcon: "text-black",
37
+ label: "relative text-foreground select-none"
38
+ },
39
+ variants: {
40
+ color: {
41
+ default: {
42
+ wrapper: [
43
+ "group-data-[selected=true]:bg-default-400",
44
+ "group-data-[selected=true]:text-default-foreground"
45
+ ]
46
+ },
47
+ primary: {
48
+ wrapper: [
49
+ "group-data-[selected=true]:bg-primary",
50
+ "group-data-[selected=true]:text-primary-foreground"
51
+ ]
52
+ },
53
+ secondary: {
54
+ wrapper: [
55
+ "group-data-[selected=true]:bg-secondary",
56
+ "group-data-[selected=true]:text-secondary-foreground"
57
+ ]
58
+ },
59
+ success: {
60
+ wrapper: [
61
+ "group-data-[selected=true]:bg-success",
62
+ "group-data-[selected=true]:text-success-foreground"
63
+ ]
64
+ },
65
+ warning: {
66
+ wrapper: [
67
+ "group-data-[selected=true]:bg-warning",
68
+ "group-data-[selected=true]:text-warning-foreground"
69
+ ]
70
+ },
71
+ danger: {
72
+ wrapper: [
73
+ "group-data-[selected=true]:bg-danger",
74
+ "data-[selected=true]:text-danger-foreground"
75
+ ]
76
+ }
77
+ },
78
+ size: {
79
+ sm: {
80
+ wrapper: "w-10 h-6 mr-2 rtl:ml-2 rtl:mr-[unset]",
81
+ thumb: [
82
+ "w-4 h-4 text-tiny",
83
+ "group-data-[selected=true]:ml-4 rtl:group-data-[selected=true]:ml-0 rtl:group-data-[selected=true]:mr-4"
84
+ ],
85
+ endContent: "text-tiny",
86
+ startContent: "text-tiny",
87
+ label: "text-small"
88
+ },
89
+ md: {
90
+ wrapper: "w-12 h-7 mr-2 rtl:ml-2 rtl:mr-[unset]",
91
+ thumb: [
92
+ "w-5 h-5 text-small",
93
+ "group-data-[selected=true]:ml-5 rtl:group-data-[selected=true]:ml-0 rtl:group-data-[selected=true]:mr-5"
94
+ ],
95
+ endContent: "text-small",
96
+ startContent: "text-small",
97
+ label: "text-medium"
98
+ },
99
+ lg: {
100
+ wrapper: "w-14 h-8 mr-2 rtl:ml-2 rtl:mr-[unset]",
101
+ thumb: [
102
+ "w-6 h-6 text-medium",
103
+ "group-data-[selected=true]:ml-6 rtl:group-data-[selected=true]:ml-0 rtl:group-data-[selected=true]:mr-6"
104
+ ],
105
+ endContent: "text-medium",
106
+ startContent: "text-medium",
107
+ label: "text-large"
108
+ }
109
+ },
110
+ isDisabled: {
111
+ true: {
112
+ base: "opacity-disabled pointer-events-none"
113
+ }
114
+ },
115
+ disableAnimation: {
116
+ true: {
117
+ wrapper: "transition-none",
118
+ thumb: "transition-none"
119
+ },
120
+ false: {
121
+ wrapper: "transition-background",
122
+ thumb: "transition-all",
123
+ startContent: [
124
+ "opacity-0",
125
+ "scale-50",
126
+ "transition-transform-opacity",
127
+ "group-data-[selected=true]:scale-100",
128
+ "group-data-[selected=true]:opacity-100"
129
+ ],
130
+ endContent: [
131
+ "opacity-100",
132
+ "transition-transform-opacity",
133
+ "group-data-[selected=true]:translate-x-3",
134
+ "group-data-[selected=true]:opacity-0"
135
+ ]
136
+ }
137
+ }
138
+ },
139
+ defaultVariants: {
140
+ color: "primary",
141
+ size: "md",
142
+ isDisabled: false,
143
+ disableAnimation: false
144
+ },
145
+ compoundVariants: [
146
+ {
147
+ disableAnimation: false,
148
+ size: "sm",
149
+ class: {
150
+ thumb: ["group-data-[pressed=true]:w-5", "group-data-[selected]:group-data-[pressed]:ml-3"]
151
+ }
152
+ },
153
+ {
154
+ disableAnimation: false,
155
+ size: "md",
156
+ class: {
157
+ thumb: ["group-data-[pressed=true]:w-6", "group-data-[selected]:group-data-[pressed]:ml-4"]
158
+ }
159
+ },
160
+ {
161
+ disableAnimation: false,
162
+ size: "lg",
163
+ class: {
164
+ thumb: ["group-data-[pressed=true]:w-7", "group-data-[selected]:group-data-[pressed]:ml-5"]
165
+ }
166
+ }
167
+ ]
168
+ });
169
+
170
+ export {
171
+ toggle
172
+ };
@@ -0,0 +1,390 @@
1
+ import {
2
+ tv
3
+ } from "./chunk-GMMETTYU.mjs";
4
+
5
+ // src/components/date-input.ts
6
+ var dateInput = tv({
7
+ slots: {
8
+ base: "group flex flex-col",
9
+ label: [
10
+ "block subpixel-antialiased text-small text-default-600",
11
+ "group-data-[required=true]:after:content-['*'] group-data-[required=true]:after:text-danger group-data-[required=true]:after:ml-0.5",
12
+ "group-data-[invalid=true]:text-danger"
13
+ ],
14
+ inputWrapper: [
15
+ "relative px-3 gap-3 w-full inline-flex flex-row items-center",
16
+ "cursor-text tap-highlight-transparent shadow-sm"
17
+ ],
18
+ input: "flex h-full gap-x-0.5 w-full font-normal",
19
+ innerWrapper: [
20
+ "flex items-center text-default-400 w-full gap-x-2 h-6",
21
+ "group-data-[invalid=true]:text-danger"
22
+ ],
23
+ segment: [
24
+ "group first:-ml-0.5 [&:not(:first-child)]:-ml-1 px-0.5 my-auto box-content tabular-nums text-start",
25
+ "inline-block outline-none focus:shadow-sm rounded-md",
26
+ "text-foreground-500 data-[editable=true]:text-foreground",
27
+ "data-[editable=true]:data-[placeholder=true]:text-foreground-500",
28
+ "data-[invalid=true]:text-danger-300 data-[invalid=true]:data-[editable=true]:text-danger",
29
+ "data-[invalid=true]:focus:bg-danger-400/50 dark:data-[invalid=true]:focus:bg-danger-400/20",
30
+ "data-[invalid=true]:data-[editable=true]:focus:text-danger"
31
+ ],
32
+ helperWrapper: "hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",
33
+ description: "text-tiny text-foreground-400",
34
+ errorMessage: "text-tiny text-danger"
35
+ },
36
+ variants: {
37
+ variant: {
38
+ flat: {
39
+ inputWrapper: [
40
+ "bg-default-100",
41
+ "hover:bg-default-200",
42
+ "focus-within:hover:bg-default-100",
43
+ "group-data-[invalid=true]:bg-danger-50",
44
+ "group-data-[invalid=true]:hover:bg-danger-100",
45
+ "group-data-[invalid=true]:focus-within:hover:bg-danger-50"
46
+ ]
47
+ },
48
+ faded: {
49
+ inputWrapper: [
50
+ "bg-default-100",
51
+ "border-medium",
52
+ "border-default-200",
53
+ "hover:border-default-400",
54
+ "group-data-[invalid=true]:bg-danger-50",
55
+ "group-data-[invalid=true]:hover:bg-danger-100",
56
+ "group-data-[invalid=true]:focus-within:hover:bg-danger-50"
57
+ ]
58
+ },
59
+ bordered: {
60
+ inputWrapper: [
61
+ "border-medium",
62
+ "border-default-200",
63
+ "hover:border-default-400",
64
+ "focus-within:border-default-foreground",
65
+ "focus-within:hover:border-default-foreground",
66
+ "group-data-[invalid=true]:border-danger",
67
+ "group-data-[invalid=true]:hover:border-danger",
68
+ "group-data-[invalid=true]:focus-within:hover:border-danger"
69
+ ]
70
+ },
71
+ underlined: {
72
+ inputWrapper: [
73
+ "px-1",
74
+ "pb-1",
75
+ "gap-0",
76
+ "relative",
77
+ "box-border",
78
+ "border-b-medium",
79
+ "shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]",
80
+ "border-default-200",
81
+ "!rounded-none",
82
+ "hover:border-default-300",
83
+ "after:content-['']",
84
+ "after:w-0",
85
+ "after:origin-center",
86
+ "after:bg-default-foreground",
87
+ "after:absolute",
88
+ "after:left-1/2",
89
+ "after:-translate-x-1/2",
90
+ "after:-bottom-[2px]",
91
+ "after:h-[2px]",
92
+ "focus-within:after:w-full",
93
+ "group-data-[invalid=true]:after:bg-danger"
94
+ ]
95
+ }
96
+ },
97
+ color: {
98
+ default: {
99
+ segment: "focus:bg-default-400/50 data-[editable=true]:focus:text-default-foreground"
100
+ },
101
+ primary: {
102
+ segment: "focus:bg-primary-400/50 data-[editable=true]:focus:text-primary"
103
+ },
104
+ secondary: {
105
+ segment: "focus:bg-secondary-400/50 data-[editable=true]:focus:text-secondary"
106
+ },
107
+ success: {
108
+ segment: "focus:bg-success-400/50 dark:focus:bg-success-400/20 data-[editable=true]:focus:text-success"
109
+ },
110
+ warning: {
111
+ segment: "focus:bg-warning-400/50 dark:focus:bg-warning-400/20 data-[editable=true]:focus:text-warning"
112
+ },
113
+ danger: {
114
+ segment: "focus:bg-danger-400/50 dark:focus:bg-danger-400/20 data-[editable=true]:focus:text-danger"
115
+ }
116
+ },
117
+ size: {
118
+ sm: {
119
+ label: "text-tiny",
120
+ input: "text-small",
121
+ inputWrapper: "h-8 min-h-8 px-2 rounded-small"
122
+ },
123
+ md: {
124
+ input: "text-small",
125
+ inputWrapper: "h-10 min-h-10 rounded-medium",
126
+ clearButton: "text-large"
127
+ },
128
+ lg: {
129
+ input: "text-medium",
130
+ inputWrapper: "h-12 min-h-12 rounded-large"
131
+ }
132
+ },
133
+ radius: {
134
+ none: {
135
+ inputWrapper: "rounded-none"
136
+ },
137
+ sm: {
138
+ inputWrapper: "rounded-small"
139
+ },
140
+ md: {
141
+ inputWrapper: "rounded-medium"
142
+ },
143
+ lg: {
144
+ inputWrapper: "rounded-large"
145
+ },
146
+ full: {
147
+ inputWrapper: "rounded-full"
148
+ }
149
+ },
150
+ labelPlacement: {
151
+ outside: {
152
+ base: "flex flex-col data-[has-helper=true]:pb-[calc(theme(fontSize.tiny)_+8px)] gap-y-1.5",
153
+ label: "w-full text-foreground",
154
+ helperWrapper: "absolute top-[calc(100%_+_2px)] left-0 rtl:right-0"
155
+ },
156
+ "outside-left": {
157
+ base: "flex-row items-center data-[has-helper=true]:pb-[calc(theme(fontSize.tiny)_+_8px)] gap-x-2 flex-nowrap",
158
+ label: "relative text-foreground",
159
+ inputWrapper: "relative flex-1",
160
+ helperWrapper: "absolute top-[calc(100%_+_2px)] left-0 rtl:right-0"
161
+ },
162
+ inside: {
163
+ label: "w-full text-tiny cursor-text",
164
+ inputWrapper: "flex-col items-start justify-center gap-0"
165
+ }
166
+ },
167
+ fullWidth: {
168
+ true: {
169
+ base: "w-full",
170
+ inputWrapper: "w-full"
171
+ }
172
+ },
173
+ isDisabled: {
174
+ true: {
175
+ base: "opacity-disabled pointer-events-none",
176
+ inputWrapper: "pointer-events-none",
177
+ label: "pointer-events-none"
178
+ }
179
+ },
180
+ disableAnimation: {
181
+ true: {
182
+ label: "transition-none",
183
+ input: "transition-none",
184
+ inputWrapper: "transition-none"
185
+ },
186
+ false: {
187
+ label: [
188
+ "!ease-out",
189
+ "!duration-200",
190
+ "will-change-auto",
191
+ "motion-reduce:transition-none",
192
+ "transition-[color,opacity]"
193
+ ],
194
+ inputWrapper: "transition-background motion-reduce:transition-none !duration-150",
195
+ segment: "transition-colors motion-reduce:transition-none"
196
+ }
197
+ }
198
+ },
199
+ defaultVariants: {
200
+ variant: "flat",
201
+ color: "default",
202
+ size: "md",
203
+ fullWidth: true,
204
+ labelPlacement: "inside",
205
+ isDisabled: false,
206
+ disableAnimation: false
207
+ },
208
+ compoundVariants: [
209
+ {
210
+ variant: "flat",
211
+ color: "primary",
212
+ class: {
213
+ innerWrapper: "text-primary",
214
+ inputWrapper: ["bg-primary-50", "hover:bg-primary-100", "focus-within:bg-primary-50"],
215
+ segment: "text-primary-300 data-[editable=true]:data-[placeholder=true]:text-primary-300 data-[editable=true]:text-primary",
216
+ label: "text-primary"
217
+ }
218
+ },
219
+ {
220
+ variant: "flat",
221
+ color: "secondary",
222
+ class: {
223
+ innerWrapper: "text-secondary",
224
+ inputWrapper: ["bg-secondary-50", "hover:bg-secondary-100", "focus-within:bg-secondary-50"],
225
+ segment: "text-secondary-300 data-[editable=true]:data-[placeholder=true]:text-secondary-300 data-[editable=true]:text-secondary",
226
+ label: "text-secondary"
227
+ }
228
+ },
229
+ {
230
+ variant: "flat",
231
+ color: "success",
232
+ class: {
233
+ innerWrapper: "text-success-600 dark:text-success",
234
+ inputWrapper: ["bg-success-50", "hover:bg-success-100", "focus-within:bg-success-50"],
235
+ segment: "text-success-400 data-[editable=true]:data-[placeholder=true]:text-success-400 data-[editable=true]:text-success-600 data-[editable=true]:focus:text-success-600",
236
+ label: "text-success-600 dark:text-success"
237
+ }
238
+ },
239
+ {
240
+ variant: "flat",
241
+ color: "warning",
242
+ class: {
243
+ innerWrapper: "text-warning-600 dark:text-warning",
244
+ inputWrapper: ["bg-warning-50", "hover:bg-warning-100", "focus-within:bg-warning-50"],
245
+ segment: "text-warning-400 data-[editable=true]:data-[placeholder=true]:text-warning-400 data-[editable=true]:text-warning-600 data-[editable=true]:focus:text-warning-600",
246
+ label: "text-warning-600 dark:text-warning"
247
+ }
248
+ },
249
+ {
250
+ variant: "flat",
251
+ color: "danger",
252
+ class: {
253
+ innerWrapper: "text-danger",
254
+ inputWrapper: ["bg-danger-50", "hover:bg-danger-100", "focus-within:bg-danger-50"],
255
+ segment: "text-danger-300 data-[editable=true]:data-[placeholder=true]:text-danger-300 data-[editable=true]:text-danger",
256
+ label: "text-danger"
257
+ }
258
+ },
259
+ {
260
+ variant: ["bordered", "faded"],
261
+ color: "primary",
262
+ class: {
263
+ innerWrapper: "text-primary",
264
+ inputWrapper: ["focus-within:border-primary", "focus-within:hover:border-primary"],
265
+ label: "text-primary"
266
+ }
267
+ },
268
+ {
269
+ variant: ["bordered", "faded"],
270
+ color: "secondary",
271
+ class: {
272
+ innerWrapper: "text-secondary",
273
+ inputWrapper: ["focus-within:border-secondary", "focus-within:hover:border-secondary"],
274
+ label: "text-secondary"
275
+ }
276
+ },
277
+ {
278
+ variant: ["bordered", "faded"],
279
+ color: "success",
280
+ class: {
281
+ innerWrapper: "text-success",
282
+ inputWrapper: ["focus-within:border-success", "focus-within:hover:border-success"],
283
+ label: "text-success"
284
+ }
285
+ },
286
+ {
287
+ variant: ["bordered", "faded"],
288
+ color: "warning",
289
+ class: {
290
+ innerWrapper: "text-warning",
291
+ inputWrapper: ["focus-within:border-warning", "focus-within:hover:border-warning"],
292
+ label: "text-warning"
293
+ }
294
+ },
295
+ {
296
+ variant: ["bordered", "faded"],
297
+ color: "danger",
298
+ class: {
299
+ innerWrapper: "text-danger",
300
+ inputWrapper: ["focus-within:border-danger", "focus-within:hover:border-danger"],
301
+ label: "text-danger"
302
+ }
303
+ },
304
+ {
305
+ variant: "underlined",
306
+ color: "primary",
307
+ class: {
308
+ innerWrapper: "text-primary",
309
+ inputWrapper: "after:bg-primary",
310
+ label: "text-primary"
311
+ }
312
+ },
313
+ {
314
+ variant: "underlined",
315
+ color: "secondary",
316
+ class: {
317
+ innerWrapper: "text-secondary",
318
+ inputWrapper: "after:bg-secondary",
319
+ label: "text-secondary"
320
+ }
321
+ },
322
+ {
323
+ variant: "underlined",
324
+ color: "success",
325
+ class: {
326
+ innerWrapper: "text-success",
327
+ inputWrapper: "after:bg-success",
328
+ label: "text-success"
329
+ }
330
+ },
331
+ {
332
+ variant: "underlined",
333
+ color: "warning",
334
+ class: {
335
+ innerWrapper: "text-warning",
336
+ inputWrapper: "after:bg-warning",
337
+ label: "text-warning"
338
+ }
339
+ },
340
+ {
341
+ variant: "underlined",
342
+ color: "danger",
343
+ class: {
344
+ innerWrapper: "text-danger",
345
+ inputWrapper: "after:bg-danger",
346
+ label: "text-danger"
347
+ }
348
+ },
349
+ {
350
+ labelPlacement: "inside",
351
+ size: "sm",
352
+ class: {
353
+ inputWrapper: "h-12 py-1.5 px-3"
354
+ }
355
+ },
356
+ {
357
+ labelPlacement: "inside",
358
+ size: "md",
359
+ class: {
360
+ inputWrapper: "h-14 py-2"
361
+ }
362
+ },
363
+ {
364
+ labelPlacement: "inside",
365
+ size: "lg",
366
+ class: {
367
+ label: "text-small",
368
+ inputWrapper: "h-16 py-2.5 gap-0"
369
+ }
370
+ },
371
+ {
372
+ disableAnimation: false,
373
+ variant: ["faded", "bordered"],
374
+ class: {
375
+ inputWrapper: "transition-colors motion-reduce:transition-none"
376
+ }
377
+ },
378
+ {
379
+ disableAnimation: false,
380
+ variant: "underlined",
381
+ class: {
382
+ inputWrapper: "after:transition-width motion-reduce:after:transition-none"
383
+ }
384
+ }
385
+ ]
386
+ });
387
+
388
+ export {
389
+ dateInput
390
+ };