@sikka/hawa 0.32.3-next → 0.33.0-next

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 (136) hide show
  1. package/dist/{Chip-BT2hUlGJ.d.mts → Chip-BtgTAs8x.d.mts} +1 -1
  2. package/dist/{Chip-Dt7zJ-jZ.d.ts → Chip-DQsP5hFS.d.ts} +1 -1
  3. package/dist/Label-UbMDLtJF.d.mts +14 -0
  4. package/dist/Label-UbMDLtJF.d.ts +14 -0
  5. package/dist/alert/index.js +151 -34
  6. package/dist/alert/index.js.map +1 -1
  7. package/dist/alert/index.mjs +148 -31
  8. package/dist/alert/index.mjs.map +1 -1
  9. package/dist/appLayout/index.js +191 -145
  10. package/dist/appLayout/index.js.map +1 -1
  11. package/dist/appLayout/index.mjs +226 -180
  12. package/dist/appLayout/index.mjs.map +1 -1
  13. package/dist/backToTop/index.js +147 -30
  14. package/dist/backToTop/index.js.map +1 -1
  15. package/dist/backToTop/index.mjs +142 -25
  16. package/dist/backToTop/index.mjs.map +1 -1
  17. package/dist/blocks/auth/index.js +230 -229
  18. package/dist/blocks/auth/index.mjs +4 -4
  19. package/dist/blocks/feedback/index.js +147 -148
  20. package/dist/blocks/feedback/index.mjs +5 -5
  21. package/dist/blocks/index.js +230 -229
  22. package/dist/blocks/index.mjs +3 -3
  23. package/dist/blocks/misc/index.js +155 -154
  24. package/dist/blocks/misc/index.mjs +5 -5
  25. package/dist/blocks/pricing/index.js +174 -173
  26. package/dist/blocks/pricing/index.mjs +4 -4
  27. package/dist/button/index.d.mts +3 -2
  28. package/dist/button/index.d.ts +3 -2
  29. package/dist/button/index.js +138 -21
  30. package/dist/button/index.js.map +1 -1
  31. package/dist/button/index.mjs +138 -21
  32. package/dist/button/index.mjs.map +1 -1
  33. package/dist/calendar/index.d.mts +15 -0
  34. package/dist/calendar/index.d.ts +15 -0
  35. package/dist/calendar/index.js +545 -0
  36. package/dist/calendar/index.js.map +1 -0
  37. package/dist/calendar/index.mjs +509 -0
  38. package/dist/calendar/index.mjs.map +1 -0
  39. package/dist/{chunk-WFPAI2QC.mjs → chunk-3HJ3JXPA.mjs} +130 -174
  40. package/dist/{chunk-XRUPXLOK.mjs → chunk-AW5FW5TY.mjs} +1 -1
  41. package/dist/{chunk-MQWYXMSK.mjs → chunk-CKLK3G32.mjs} +242 -197
  42. package/dist/{chunk-XZLXGXIA.mjs → chunk-E3WWI4I5.mjs} +1 -1
  43. package/dist/{chunk-WUMWQIAW.mjs → chunk-FRYGQYUO.mjs} +1 -1
  44. package/dist/{chunk-S6TZHTWS.mjs → chunk-GEB3LM5A.mjs} +1 -1
  45. package/dist/{chunk-2QAGLSHC.mjs → chunk-IQEBXGLM.mjs} +1 -1
  46. package/dist/{chunk-PA3Z7W32.mjs → chunk-OS2UOK5C.mjs} +147 -146
  47. package/dist/{chunk-3S44N7SB.mjs → chunk-RTGD7N7I.mjs} +1 -1
  48. package/dist/{chunk-WAVKQ44V.mjs → chunk-UBNCETCU.mjs} +1 -1
  49. package/dist/codeBlock/index.js +138 -92
  50. package/dist/codeBlock/index.js.map +1 -1
  51. package/dist/codeBlock/index.mjs +157 -111
  52. package/dist/codeBlock/index.mjs.map +1 -1
  53. package/dist/commonTypes-CgDwjGvU.d.mts +5 -0
  54. package/dist/commonTypes-CgDwjGvU.d.ts +5 -0
  55. package/dist/commonTypes-DZdITB5m.d.mts +4 -0
  56. package/dist/commonTypes-DZdITB5m.d.ts +4 -0
  57. package/dist/dataTable/index.d.mts +2 -1
  58. package/dist/dataTable/index.d.ts +2 -1
  59. package/dist/dataTable/index.js +174 -173
  60. package/dist/dataTable/index.js.map +1 -1
  61. package/dist/dataTable/index.mjs +174 -173
  62. package/dist/dataTable/index.mjs.map +1 -1
  63. package/dist/datePicker/index.d.mts +20 -0
  64. package/dist/datePicker/index.d.ts +20 -0
  65. package/dist/datePicker/index.js +630 -0
  66. package/dist/datePicker/index.js.map +1 -0
  67. package/dist/datePicker/index.mjs +593 -0
  68. package/dist/datePicker/index.mjs.map +1 -0
  69. package/dist/destroyableCard/index.d.mts +1 -1
  70. package/dist/destroyableCard/index.d.ts +1 -1
  71. package/dist/dialog/index.d.mts +1 -1
  72. package/dist/dialog/index.d.ts +1 -1
  73. package/dist/docsLayout/index.js +231 -114
  74. package/dist/docsLayout/index.js.map +1 -1
  75. package/dist/docsLayout/index.mjs +222 -105
  76. package/dist/docsLayout/index.mjs.map +1 -1
  77. package/dist/dropdownMenu/index.d.mts +1 -6
  78. package/dist/dropdownMenu/index.d.ts +1 -6
  79. package/dist/elements/index.d.mts +9 -8
  80. package/dist/elements/index.d.ts +9 -8
  81. package/dist/elements/index.js +51 -50
  82. package/dist/elements/index.mjs +4 -4
  83. package/dist/fileDropzone/index.js +184 -67
  84. package/dist/fileDropzone/index.js.map +1 -1
  85. package/dist/fileDropzone/index.mjs +176 -59
  86. package/dist/fileDropzone/index.mjs.map +1 -1
  87. package/dist/index.css +83 -0
  88. package/dist/index.d.mts +1 -0
  89. package/dist/index.d.ts +1 -0
  90. package/dist/index.js +51 -50
  91. package/dist/index.mjs +71 -70
  92. package/dist/input/index.d.mts +1 -2
  93. package/dist/input/index.d.ts +1 -2
  94. package/dist/label/index.d.mts +2 -1
  95. package/dist/label/index.d.ts +2 -1
  96. package/dist/layout/index.d.mts +1 -1
  97. package/dist/layout/index.d.ts +1 -1
  98. package/dist/layout/index.js +204 -158
  99. package/dist/layout/index.mjs +2 -2
  100. package/dist/phoneInput/index.d.mts +1 -2
  101. package/dist/phoneInput/index.d.ts +1 -2
  102. package/dist/progress/index.d.mts +1 -8
  103. package/dist/progress/index.d.ts +1 -8
  104. package/dist/radio/index.d.mts +1 -9
  105. package/dist/radio/index.d.ts +1 -9
  106. package/dist/scrollArea/index.d.mts +1 -1
  107. package/dist/scrollArea/index.d.ts +1 -1
  108. package/dist/separator/index.d.mts +1 -1
  109. package/dist/separator/index.d.ts +1 -1
  110. package/dist/signature/index.d.mts +2 -1
  111. package/dist/signature/index.d.ts +2 -1
  112. package/dist/simpleTable/index.d.mts +1 -1
  113. package/dist/simpleTable/index.d.ts +1 -1
  114. package/dist/sortButton/index.js +145 -28
  115. package/dist/sortButton/index.js.map +1 -1
  116. package/dist/sortButton/index.mjs +145 -28
  117. package/dist/sortButton/index.mjs.map +1 -1
  118. package/dist/splitButton/index.d.mts +3 -2
  119. package/dist/splitButton/index.d.ts +3 -2
  120. package/dist/splitButton/index.js +145 -28
  121. package/dist/splitButton/index.js.map +1 -1
  122. package/dist/splitButton/index.mjs +145 -28
  123. package/dist/splitButton/index.mjs.map +1 -1
  124. package/dist/tabs/index.d.mts +1 -1
  125. package/dist/tabs/index.d.ts +1 -1
  126. package/dist/textarea/index.d.mts +1 -1
  127. package/dist/textarea/index.d.ts +1 -1
  128. package/dist/toast/index.d.mts +1 -1
  129. package/dist/toast/index.d.ts +1 -1
  130. package/dist/toaster/index.d.mts +22 -4
  131. package/dist/toaster/index.d.ts +22 -4
  132. package/package.json +3 -1
  133. package/dist/commonTypes-CMqMLkhN.d.mts +0 -4
  134. package/dist/commonTypes-CMqMLkhN.d.ts +0 -4
  135. package/dist/commonTypes-D_7LV7Ri.d.mts +0 -5
  136. package/dist/commonTypes-D_7LV7Ri.d.ts +0 -5
@@ -0,0 +1,593 @@
1
+ "use client";
2
+
3
+ // elements/datePicker/DatePicker.tsx
4
+ import * as React8 from "react";
5
+
6
+ // elements/calendar/Calendar.tsx
7
+ import * as React6 from "react";
8
+ import { DayPicker } from "react-day-picker";
9
+
10
+ // util/index.ts
11
+ import { clsx } from "clsx";
12
+ import { twMerge } from "tailwind-merge";
13
+ function cn(...inputs) {
14
+ return twMerge(clsx(inputs));
15
+ }
16
+
17
+ // elements/button/Button.tsx
18
+ import * as React5 from "react";
19
+ import { cva } from "class-variance-authority";
20
+
21
+ // elements/label/Label.tsx
22
+ import * as React3 from "react";
23
+
24
+ // elements/tooltip/Tooltip.tsx
25
+ import React2 from "react";
26
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
27
+ var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
28
+ TooltipPrimitive.Content,
29
+ {
30
+ ref,
31
+ sideOffset,
32
+ className: cn(
33
+ "hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
34
+ {
35
+ "hawa-text-xs": size === "small",
36
+ "hawa-text-xl": size === "large"
37
+ },
38
+ className
39
+ ),
40
+ ...props
41
+ }
42
+ ));
43
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
44
+ var TooltipArrow = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
45
+ TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
46
+ var Tooltip = ({
47
+ side,
48
+ size,
49
+ open,
50
+ content,
51
+ children,
52
+ disabled,
53
+ defaultOpen,
54
+ onOpenChange,
55
+ triggerProps,
56
+ contentProps,
57
+ providerProps,
58
+ delayDuration = 300,
59
+ ...props
60
+ }) => {
61
+ return /* @__PURE__ */ React2.createElement(
62
+ TooltipPrimitive.TooltipProvider,
63
+ {
64
+ delayDuration,
65
+ ...providerProps
66
+ },
67
+ /* @__PURE__ */ React2.createElement(
68
+ TooltipPrimitive.Root,
69
+ {
70
+ open: !disabled && open,
71
+ defaultOpen,
72
+ onOpenChange,
73
+ ...props
74
+ },
75
+ /* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
76
+ /* @__PURE__ */ React2.createElement(
77
+ TooltipContent,
78
+ {
79
+ size,
80
+ side,
81
+ align: "center",
82
+ ...contentProps,
83
+ style: {
84
+ ...contentProps == null ? void 0 : contentProps.style,
85
+ maxWidth: "var(--radix-tooltip-content-available-width)",
86
+ maxHeight: "var(--radix-tooltip-content-available-height)"
87
+ }
88
+ },
89
+ content
90
+ )
91
+ )
92
+ );
93
+ };
94
+
95
+ // elements/label/Label.tsx
96
+ var Label = React3.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React3.createElement(
97
+ "label",
98
+ {
99
+ ref,
100
+ className: cn(
101
+ "hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
102
+ className
103
+ ),
104
+ ...props
105
+ },
106
+ children,
107
+ required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
108
+ ), hint && /* @__PURE__ */ React3.createElement(
109
+ Tooltip,
110
+ {
111
+ content: hint,
112
+ side: hintSide,
113
+ triggerProps: {
114
+ tabIndex: -1,
115
+ onClick: (event) => event.preventDefault()
116
+ }
117
+ },
118
+ /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
119
+ "svg",
120
+ {
121
+ xmlns: "http://www.w3.org/2000/svg",
122
+ className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
123
+ viewBox: "0 0 24 24",
124
+ fill: "none",
125
+ stroke: "currentColor",
126
+ strokeWidth: "2",
127
+ strokeLinecap: "round",
128
+ strokeLinejoin: "round"
129
+ },
130
+ /* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
131
+ /* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
132
+ /* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
133
+ ))
134
+ )));
135
+ Label.displayName = "Label";
136
+
137
+ // elements/loading/Loading.tsx
138
+ import React4 from "react";
139
+ var Loading = ({
140
+ design = "spinner",
141
+ size = "normal",
142
+ themeMode = "light",
143
+ classNames,
144
+ color,
145
+ ...props
146
+ }) => {
147
+ let sizeStyles = {
148
+ button: "hawa-h-4 hawa-w-4",
149
+ xs: "hawa-h-1 hawa-w-1",
150
+ sm: "hawa-h-6 hawa-w-6",
151
+ normal: "hawa-h-8 hawa-w-8",
152
+ lg: "hawa-h-14 hawa-w-14",
153
+ xl: "hawa-h-24 hawa-w-24"
154
+ };
155
+ let progressSizes = {
156
+ button: "hawa-h-1",
157
+ xs: "hawa-h-1 hawa-w-1",
158
+ sm: "hawa-h-6 hawa-w-6",
159
+ normal: "",
160
+ lg: "hawa-h-6",
161
+ xl: "hawa-h-10 hawa-w-64"
162
+ };
163
+ let animationStyles = {
164
+ pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
165
+ bounce: "hawa-animate-bounce"
166
+ };
167
+ switch (design.split("-")[0]) {
168
+ case "dots":
169
+ return /* @__PURE__ */ React4.createElement(
170
+ "div",
171
+ {
172
+ className: cn(
173
+ "hawa-flex hawa-flex-row hawa-gap-2",
174
+ classNames == null ? void 0 : classNames.container
175
+ )
176
+ },
177
+ /* @__PURE__ */ React4.createElement(
178
+ "div",
179
+ {
180
+ className: cn(
181
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
182
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
183
+ animationStyles[design.split("-")[1]],
184
+ color ? color : "hawa-bg-primary"
185
+ )
186
+ }
187
+ ),
188
+ /* @__PURE__ */ React4.createElement(
189
+ "div",
190
+ {
191
+ className: cn(
192
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
193
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
194
+ animationStyles[design.split("-")[1]],
195
+ color ? color : "hawa-bg-primary"
196
+ )
197
+ }
198
+ ),
199
+ /* @__PURE__ */ React4.createElement(
200
+ "div",
201
+ {
202
+ className: cn(
203
+ "hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
204
+ size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
205
+ animationStyles[design.split("-")[1]],
206
+ color ? color : "hawa-bg-primary"
207
+ )
208
+ }
209
+ )
210
+ );
211
+ case "square":
212
+ return /* @__PURE__ */ React4.createElement(
213
+ "svg",
214
+ {
215
+ className: cn(
216
+ "squircle-container",
217
+ sizeStyles[size],
218
+ classNames == null ? void 0 : classNames.container
219
+ ),
220
+ viewBox: "0 0 35 35",
221
+ height: "35",
222
+ width: "35"
223
+ },
224
+ /* @__PURE__ */ React4.createElement(
225
+ "rect",
226
+ {
227
+ className: "squircle-track",
228
+ x: "2.5",
229
+ y: "2.5",
230
+ fill: "none",
231
+ strokeWidth: "5px",
232
+ width: "32.5",
233
+ height: "32.5"
234
+ }
235
+ ),
236
+ /* @__PURE__ */ React4.createElement(
237
+ "rect",
238
+ {
239
+ className: "square-car",
240
+ x: "2.5",
241
+ y: "2.5",
242
+ fill: "none",
243
+ strokeWidth: "5px",
244
+ width: "32.5",
245
+ height: "32.5",
246
+ pathLength: "100"
247
+ }
248
+ )
249
+ );
250
+ case "squircle":
251
+ return /* @__PURE__ */ React4.createElement(
252
+ "svg",
253
+ {
254
+ x: "0px",
255
+ y: "0px",
256
+ viewBox: "0 0 37 37",
257
+ height: "37",
258
+ width: "37",
259
+ preserveAspectRatio: "xMidYMid meet",
260
+ className: cn(
261
+ "squircle-container",
262
+ sizeStyles[size],
263
+ classNames == null ? void 0 : classNames.container
264
+ )
265
+ },
266
+ /* @__PURE__ */ React4.createElement(
267
+ "path",
268
+ {
269
+ className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
270
+ fill: "none",
271
+ strokeWidth: "5",
272
+ pathLength: "100",
273
+ d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
274
+ }
275
+ ),
276
+ /* @__PURE__ */ React4.createElement(
277
+ "path",
278
+ {
279
+ className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
280
+ fill: "none",
281
+ strokeWidth: "5",
282
+ pathLength: "100",
283
+ d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
284
+ }
285
+ )
286
+ );
287
+ case "progress":
288
+ return /* @__PURE__ */ React4.createElement(
289
+ "div",
290
+ {
291
+ className: cn(
292
+ "progress-loading after:hawa-rounded hawa-rounded",
293
+ progressSizes[size],
294
+ classNames == null ? void 0 : classNames.container
295
+ )
296
+ }
297
+ );
298
+ case "orbit":
299
+ return /* @__PURE__ */ React4.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
300
+ default:
301
+ return /* @__PURE__ */ React4.createElement(
302
+ "svg",
303
+ {
304
+ viewBox: "0 0 40 40",
305
+ height: "40",
306
+ width: "40",
307
+ className: cn(
308
+ "circle-container",
309
+ sizeStyles[size],
310
+ classNames == null ? void 0 : classNames.container
311
+ )
312
+ },
313
+ /* @__PURE__ */ React4.createElement(
314
+ "circle",
315
+ {
316
+ className: cn(
317
+ "circle-track",
318
+ {
319
+ "hawa-stroke-primary-foreground": themeMode === "dark",
320
+ "hawa-stroke-primary": themeMode === "light"
321
+ },
322
+ classNames == null ? void 0 : classNames.track
323
+ ),
324
+ cx: "20",
325
+ cy: "20",
326
+ r: "17.5",
327
+ fill: "none",
328
+ strokeWidth: "5px",
329
+ pathLength: "100"
330
+ }
331
+ ),
332
+ /* @__PURE__ */ React4.createElement(
333
+ "circle",
334
+ {
335
+ className: cn(
336
+ "circle-car",
337
+ {
338
+ "hawa-stroke-primary-foreground": themeMode === "dark",
339
+ "hawa-stroke-primary": themeMode === "light"
340
+ },
341
+ classNames == null ? void 0 : classNames.car
342
+ ),
343
+ cx: "20",
344
+ cy: "20",
345
+ r: "17.5",
346
+ fill: "none",
347
+ pathLength: "100",
348
+ strokeWidth: "5px"
349
+ }
350
+ )
351
+ );
352
+ }
353
+ };
354
+
355
+ // elements/button/Button.tsx
356
+ var buttonVariants = cva(
357
+ "hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
358
+ {
359
+ variants: {
360
+ variant: {
361
+ default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
362
+ light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
363
+ destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
364
+ outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
365
+ secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
366
+ ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
367
+ link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
368
+ combobox: "hawa-bg-background hawa-border",
369
+ neoBrutalism: "neo-brutalism"
370
+ // "hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active",
371
+ },
372
+ size: {
373
+ default: "hawa-h-10 hawa-px-4 hawa-py-2",
374
+ heightless: "hawa-px-4 hawa-py-4",
375
+ xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
376
+ sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
377
+ lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
378
+ xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
379
+ icon: "hawa-h-10 hawa-w-10",
380
+ smallIcon: "hawa-h-7 hawa-w-7"
381
+ }
382
+ },
383
+ defaultVariants: {
384
+ variant: "default",
385
+ size: "default"
386
+ }
387
+ }
388
+ );
389
+ var Button = React5.forwardRef(
390
+ ({
391
+ className,
392
+ label,
393
+ variant,
394
+ size,
395
+ asChild = false,
396
+ centered = true,
397
+ isLoading,
398
+ children,
399
+ ...props
400
+ }, ref) => {
401
+ const Comp = "button";
402
+ const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
403
+ return /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React5.createElement(Label, { className: "hawa-mb-2" }, label), /* @__PURE__ */ React5.createElement(
404
+ Comp,
405
+ {
406
+ className: cn(
407
+ buttonVariants({ variant, size, className }),
408
+ centered && "hawa-justify-center"
409
+ ),
410
+ ref,
411
+ ...props
412
+ },
413
+ isLoading ? /* @__PURE__ */ React5.createElement(
414
+ Loading,
415
+ {
416
+ design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
417
+ themeMode: variant === "outline" ? "light" : "dark",
418
+ color: loadingColor,
419
+ size: size === "sm" || size === "xs" ? "xs" : "button"
420
+ }
421
+ ) : children
422
+ ));
423
+ }
424
+ );
425
+ Button.displayName = "Button";
426
+
427
+ // elements/calendar/Calendar.tsx
428
+ function Calendar({
429
+ className,
430
+ classNames,
431
+ showOutsideDays = true,
432
+ ...props
433
+ }) {
434
+ return /* @__PURE__ */ React6.createElement(
435
+ DayPicker,
436
+ {
437
+ showOutsideDays,
438
+ className: cn("hawa-p-3", className),
439
+ classNames: {
440
+ months: "hawa-flex hawa-flex-col sm:hawa-flex-row hawa-space-y-4 sm:hawa-space-x-4 sm:hawa-space-y-0",
441
+ month: "hawa-space-y-4",
442
+ caption: "hawa-flex hawa-justify-center hawa-pt-1 hawa-relative hawa-items-center",
443
+ caption_label: "hawa-text-sm hawa-font-medium",
444
+ nav: "hawa-space-x-1 hawa-flex hawa-items-center",
445
+ nav_button: cn(
446
+ buttonVariants({ variant: "outline" }),
447
+ "hawa-h-7 hawa-w-7 hawa-bg-transparent hawa-p-0 hawa-opacity-50 hover:hawa-opacity-100"
448
+ ),
449
+ nav_button_previous: "hawa-absolute hawa-start-1 !hawa-h-8 !hawa-w-8 !hawa-p-0 hawa-justify-center",
450
+ nav_button_next: "hawa-absolute hawa-end-1 !hawa-h-8 !hawa-w-8 !hawa-p-0 hawa-justify-center",
451
+ table: "hawa-w-full hawa-border-collapse hawa-space-y-1 ",
452
+ head_row: "hawa-flex",
453
+ head_cell: "hawa-text-muted-foreground hawa-rounded-md hawa-w-9 hawa-font-normal hawa-text-[0.8rem]",
454
+ row: "hawa-flex hawa-w-full hawa-mt-2",
455
+ cell: "hawa-h-9 hawa-w-9 hawa-text-center hawa-text-sm hawa-p-0 hawa-relative [&:has([aria-selected].day-range-end)]:hawa-rounded-r-md [&:has([aria-selected].day-outside)]:hawa-bg-accent/50 [&:has([aria-selected])]:hawa-bg-accent first:[&:has([aria-selected])]:hawa-rounded-l-md last:[&:has([aria-selected])]:hawa-rounded-r-md focus-within:hawa-relative focus-within:hawa-z-20",
456
+ day: cn(
457
+ buttonVariants({ variant: "ghost" }),
458
+ "hawa-h-9 hawa-w-9 hawa-justify-center !hawa-p-0 hawa-font-normal aria-selected:hawa-opacity-100"
459
+ ),
460
+ day_range_end: "day-range-end",
461
+ day_selected: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary hover:hawa-text-primary-foreground focus:hawa-bg-primary focus:hawa-text-primary-foreground",
462
+ day_today: "hawa-bg-accent hawa-text-accent-foreground",
463
+ day_outside: "day-outside hawa-text-muted-foreground hawa-opacity-50 aria-selected:hawa-bg-accent/50 aria-selected:hawa-text-muted-foreground aria-selected:hawa-opacity-30",
464
+ day_disabled: "hawa-text-muted-foreground hawa-opacity-50",
465
+ day_range_middle: "aria-selected:hawa-bg-accent aria-selected:hawa-text-accent-foreground",
466
+ day_hidden: "hawa-invisible",
467
+ ...classNames
468
+ },
469
+ components: {
470
+ IconLeft: ({ ...props2 }) => /* @__PURE__ */ React6.createElement(
471
+ "svg",
472
+ {
473
+ xmlns: "http://www.w3.org/2000/svg",
474
+ width: "20",
475
+ height: "20",
476
+ "aria-label": "Next Month",
477
+ viewBox: "0 0 24 24",
478
+ fill: "none",
479
+ stroke: "currentColor",
480
+ strokeWidth: "2",
481
+ strokeLinecap: "round",
482
+ strokeLinejoin: "round"
483
+ },
484
+ /* @__PURE__ */ React6.createElement("path", { d: "m15 18-6-6 6-6" })
485
+ ),
486
+ IconRight: ({ ...props2 }) => /* @__PURE__ */ React6.createElement(
487
+ "svg",
488
+ {
489
+ xmlns: "http://www.w3.org/2000/svg",
490
+ width: "20",
491
+ height: "20",
492
+ "aria-label": "Next Month",
493
+ viewBox: "0 0 24 24",
494
+ fill: "none",
495
+ stroke: "currentColor",
496
+ strokeWidth: "2",
497
+ strokeLinecap: "round",
498
+ strokeLinejoin: "round",
499
+ className: "hawa-rotate-180"
500
+ },
501
+ /* @__PURE__ */ React6.createElement("path", { d: "m15 18-6-6 6-6" })
502
+ )
503
+ },
504
+ ...props
505
+ }
506
+ );
507
+ }
508
+ Calendar.displayName = "Calendar";
509
+
510
+ // elements/popover/Popover.tsx
511
+ import * as React7 from "react";
512
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
513
+ var PopoverContent = React7.forwardRef(
514
+ ({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React7.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React7.createElement(
515
+ PopoverPrimitive.Content,
516
+ {
517
+ ref,
518
+ align,
519
+ sideOffset,
520
+ className: cn(
521
+ "dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
522
+ className
523
+ ),
524
+ ...props
525
+ }
526
+ ))
527
+ );
528
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
529
+ var PopoverTrigger = PopoverPrimitive.Trigger;
530
+ var PopoverRoot = PopoverPrimitive.Root;
531
+
532
+ // elements/datePicker/DatePicker.tsx
533
+ var DatePicker = ({
534
+ trigger,
535
+ popoverTriggerProps,
536
+ ...props
537
+ }) => {
538
+ return /* @__PURE__ */ React8.createElement(PopoverRoot, null, /* @__PURE__ */ React8.createElement(PopoverTrigger, { ...popoverTriggerProps }, trigger), /* @__PURE__ */ React8.createElement(PopoverContent, null, /* @__PURE__ */ React8.createElement(Calendar, { ...props })));
539
+ };
540
+
541
+ // elements/datePicker/DatePickerButton.tsx
542
+ var DatePickerButton = ({
543
+ label,
544
+ value,
545
+ multiple
546
+ }) => {
547
+ return /* @__PURE__ */ React.createElement(
548
+ Button,
549
+ {
550
+ label,
551
+ variant: "outline",
552
+ className: cn(
553
+ "!hawa-w-full hawa-flex hawa-flex-row",
554
+ multiple && "hawa-flex-row"
555
+ ),
556
+ title: value
557
+ },
558
+ /* @__PURE__ */ React.createElement(
559
+ "span",
560
+ {
561
+ className: cn(
562
+ "hawa-flex hawa-flex-row hawa-gap-1 hawa-text-start hawa-me-2 hawa-truncate",
563
+ multiple ? "hawa-flex-wrap" : "hawa-overflow-hidden"
564
+ )
565
+ },
566
+ value
567
+ ),
568
+ /* @__PURE__ */ React.createElement("div", { className: "hawa-ml-auto hawa-opacity-50" }, /* @__PURE__ */ React.createElement(
569
+ "svg",
570
+ {
571
+ xmlns: "http://www.w3.org/2000/svg",
572
+ width: "24",
573
+ height: "24",
574
+ viewBox: "0 0 24 24",
575
+ fill: "none",
576
+ stroke: "currentColor",
577
+ strokeWidth: "2",
578
+ strokeLinecap: "round",
579
+ strokeLinejoin: "round",
580
+ className: "hawa-h-4 hawa-w-4"
581
+ },
582
+ /* @__PURE__ */ React.createElement("path", { d: "M8 2v4" }),
583
+ /* @__PURE__ */ React.createElement("path", { d: "M16 2v4" }),
584
+ /* @__PURE__ */ React.createElement("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }),
585
+ /* @__PURE__ */ React.createElement("path", { d: "M3 10h18" })
586
+ ))
587
+ );
588
+ };
589
+ export {
590
+ DatePicker,
591
+ DatePickerButton
592
+ };
593
+ //# sourceMappingURL=index.mjs.map