@sikka/hawa 0.32.2-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 +177 -174
  60. package/dist/dataTable/index.js.map +1 -1
  61. package/dist/dataTable/index.mjs +177 -174
  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 +54 -51
  82. package/dist/elements/index.mjs +7 -5
  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 +54 -51
  91. package/dist/index.mjs +74 -71
  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
@@ -8,7 +8,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
8
8
  });
9
9
 
10
10
  // elements/codeBlock/CodeBlock.tsx
11
- import React4, { useState as useState2 } from "react";
11
+ import React5, { useState as useState2 } from "react";
12
12
 
13
13
  // util/index.ts
14
14
  import { clsx } from "clsx";
@@ -47,11 +47,127 @@ function useClipboard({ timeout = 2e3 } = {}) {
47
47
  }
48
48
 
49
49
  // elements/button/Button.tsx
50
- import * as React2 from "react";
50
+ import * as React4 from "react";
51
51
  import { cva } from "class-variance-authority";
52
52
 
53
- // elements/loading/Loading.tsx
53
+ // elements/label/Label.tsx
54
+ import * as React2 from "react";
55
+
56
+ // elements/tooltip/Tooltip.tsx
54
57
  import React from "react";
58
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
59
+ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React.createElement(
60
+ TooltipPrimitive.Content,
61
+ {
62
+ ref,
63
+ sideOffset,
64
+ className: cn(
65
+ "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",
66
+ {
67
+ "hawa-text-xs": size === "small",
68
+ "hawa-text-xl": size === "large"
69
+ },
70
+ className
71
+ ),
72
+ ...props
73
+ }
74
+ ));
75
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
76
+ var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
77
+ TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
78
+ var Tooltip = ({
79
+ side,
80
+ size,
81
+ open,
82
+ content,
83
+ children,
84
+ disabled,
85
+ defaultOpen,
86
+ onOpenChange,
87
+ triggerProps,
88
+ contentProps,
89
+ providerProps,
90
+ delayDuration = 300,
91
+ ...props
92
+ }) => {
93
+ return /* @__PURE__ */ React.createElement(
94
+ TooltipPrimitive.TooltipProvider,
95
+ {
96
+ delayDuration,
97
+ ...providerProps
98
+ },
99
+ /* @__PURE__ */ React.createElement(
100
+ TooltipPrimitive.Root,
101
+ {
102
+ open: !disabled && open,
103
+ defaultOpen,
104
+ onOpenChange,
105
+ ...props
106
+ },
107
+ /* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
108
+ /* @__PURE__ */ React.createElement(
109
+ TooltipContent,
110
+ {
111
+ size,
112
+ side,
113
+ align: "center",
114
+ ...contentProps,
115
+ style: {
116
+ ...contentProps == null ? void 0 : contentProps.style,
117
+ maxWidth: "var(--radix-tooltip-content-available-width)",
118
+ maxHeight: "var(--radix-tooltip-content-available-height)"
119
+ }
120
+ },
121
+ content
122
+ )
123
+ )
124
+ );
125
+ };
126
+
127
+ // elements/label/Label.tsx
128
+ var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
129
+ "label",
130
+ {
131
+ ref,
132
+ className: cn(
133
+ "hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
134
+ className
135
+ ),
136
+ ...props
137
+ },
138
+ children,
139
+ required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
140
+ ), hint && /* @__PURE__ */ React2.createElement(
141
+ Tooltip,
142
+ {
143
+ content: hint,
144
+ side: hintSide,
145
+ triggerProps: {
146
+ tabIndex: -1,
147
+ onClick: (event) => event.preventDefault()
148
+ }
149
+ },
150
+ /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
151
+ "svg",
152
+ {
153
+ xmlns: "http://www.w3.org/2000/svg",
154
+ className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
155
+ viewBox: "0 0 24 24",
156
+ fill: "none",
157
+ stroke: "currentColor",
158
+ strokeWidth: "2",
159
+ strokeLinecap: "round",
160
+ strokeLinejoin: "round"
161
+ },
162
+ /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
163
+ /* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
164
+ /* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
165
+ ))
166
+ )));
167
+ Label.displayName = "Label";
168
+
169
+ // elements/loading/Loading.tsx
170
+ import React3 from "react";
55
171
  var Loading = ({
56
172
  design = "spinner",
57
173
  size = "normal",
@@ -82,7 +198,7 @@ var Loading = ({
82
198
  };
83
199
  switch (design.split("-")[0]) {
84
200
  case "dots":
85
- return /* @__PURE__ */ React.createElement(
201
+ return /* @__PURE__ */ React3.createElement(
86
202
  "div",
87
203
  {
88
204
  className: cn(
@@ -90,7 +206,7 @@ var Loading = ({
90
206
  classNames == null ? void 0 : classNames.container
91
207
  )
92
208
  },
93
- /* @__PURE__ */ React.createElement(
209
+ /* @__PURE__ */ React3.createElement(
94
210
  "div",
95
211
  {
96
212
  className: cn(
@@ -101,7 +217,7 @@ var Loading = ({
101
217
  )
102
218
  }
103
219
  ),
104
- /* @__PURE__ */ React.createElement(
220
+ /* @__PURE__ */ React3.createElement(
105
221
  "div",
106
222
  {
107
223
  className: cn(
@@ -112,7 +228,7 @@ var Loading = ({
112
228
  )
113
229
  }
114
230
  ),
115
- /* @__PURE__ */ React.createElement(
231
+ /* @__PURE__ */ React3.createElement(
116
232
  "div",
117
233
  {
118
234
  className: cn(
@@ -125,7 +241,7 @@ var Loading = ({
125
241
  )
126
242
  );
127
243
  case "square":
128
- return /* @__PURE__ */ React.createElement(
244
+ return /* @__PURE__ */ React3.createElement(
129
245
  "svg",
130
246
  {
131
247
  className: cn(
@@ -137,7 +253,7 @@ var Loading = ({
137
253
  height: "35",
138
254
  width: "35"
139
255
  },
140
- /* @__PURE__ */ React.createElement(
256
+ /* @__PURE__ */ React3.createElement(
141
257
  "rect",
142
258
  {
143
259
  className: "squircle-track",
@@ -149,7 +265,7 @@ var Loading = ({
149
265
  height: "32.5"
150
266
  }
151
267
  ),
152
- /* @__PURE__ */ React.createElement(
268
+ /* @__PURE__ */ React3.createElement(
153
269
  "rect",
154
270
  {
155
271
  className: "square-car",
@@ -164,7 +280,7 @@ var Loading = ({
164
280
  )
165
281
  );
166
282
  case "squircle":
167
- return /* @__PURE__ */ React.createElement(
283
+ return /* @__PURE__ */ React3.createElement(
168
284
  "svg",
169
285
  {
170
286
  x: "0px",
@@ -179,7 +295,7 @@ var Loading = ({
179
295
  classNames == null ? void 0 : classNames.container
180
296
  )
181
297
  },
182
- /* @__PURE__ */ React.createElement(
298
+ /* @__PURE__ */ React3.createElement(
183
299
  "path",
184
300
  {
185
301
  className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
@@ -189,7 +305,7 @@ var Loading = ({
189
305
  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"
190
306
  }
191
307
  ),
192
- /* @__PURE__ */ React.createElement(
308
+ /* @__PURE__ */ React3.createElement(
193
309
  "path",
194
310
  {
195
311
  className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
@@ -201,7 +317,7 @@ var Loading = ({
201
317
  )
202
318
  );
203
319
  case "progress":
204
- return /* @__PURE__ */ React.createElement(
320
+ return /* @__PURE__ */ React3.createElement(
205
321
  "div",
206
322
  {
207
323
  className: cn(
@@ -212,9 +328,9 @@ var Loading = ({
212
328
  }
213
329
  );
214
330
  case "orbit":
215
- return /* @__PURE__ */ React.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
331
+ return /* @__PURE__ */ React3.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
216
332
  default:
217
- return /* @__PURE__ */ React.createElement(
333
+ return /* @__PURE__ */ React3.createElement(
218
334
  "svg",
219
335
  {
220
336
  viewBox: "0 0 40 40",
@@ -226,7 +342,7 @@ var Loading = ({
226
342
  classNames == null ? void 0 : classNames.container
227
343
  )
228
344
  },
229
- /* @__PURE__ */ React.createElement(
345
+ /* @__PURE__ */ React3.createElement(
230
346
  "circle",
231
347
  {
232
348
  className: cn(
@@ -245,7 +361,7 @@ var Loading = ({
245
361
  pathLength: "100"
246
362
  }
247
363
  ),
248
- /* @__PURE__ */ React.createElement(
364
+ /* @__PURE__ */ React3.createElement(
249
365
  "circle",
250
366
  {
251
367
  className: cn(
@@ -302,9 +418,10 @@ var buttonVariants = cva(
302
418
  }
303
419
  }
304
420
  );
305
- var Button = React2.forwardRef(
421
+ var Button = React4.forwardRef(
306
422
  ({
307
423
  className,
424
+ label,
308
425
  variant,
309
426
  size,
310
427
  asChild = false,
@@ -315,7 +432,7 @@ var Button = React2.forwardRef(
315
432
  }, ref) => {
316
433
  const Comp = "button";
317
434
  const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
318
- return /* @__PURE__ */ React2.createElement(
435
+ return /* @__PURE__ */ React4.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React4.createElement(Label, { className: "hawa-mb-2" }, label), /* @__PURE__ */ React4.createElement(
319
436
  Comp,
320
437
  {
321
438
  className: cn(
@@ -325,7 +442,7 @@ var Button = React2.forwardRef(
325
442
  ref,
326
443
  ...props
327
444
  },
328
- isLoading ? /* @__PURE__ */ React2.createElement(
445
+ isLoading ? /* @__PURE__ */ React4.createElement(
329
446
  Loading,
330
447
  {
331
448
  design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
@@ -334,86 +451,15 @@ var Button = React2.forwardRef(
334
451
  size: size === "sm" || size === "xs" ? "xs" : "button"
335
452
  }
336
453
  ) : children
337
- );
454
+ ));
338
455
  }
339
456
  );
340
457
  Button.displayName = "Button";
341
458
 
342
- // elements/tooltip/Tooltip.tsx
343
- import React3 from "react";
344
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
345
- var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React3.createElement(
346
- TooltipPrimitive.Content,
347
- {
348
- ref,
349
- sideOffset,
350
- className: cn(
351
- "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",
352
- {
353
- "hawa-text-xs": size === "small",
354
- "hawa-text-xl": size === "large"
355
- },
356
- className
357
- ),
358
- ...props
359
- }
360
- ));
361
- TooltipContent.displayName = TooltipPrimitive.Content.displayName;
362
- var TooltipArrow = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
363
- TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
364
- var Tooltip = ({
365
- side,
366
- size,
367
- open,
368
- content,
369
- children,
370
- disabled,
371
- defaultOpen,
372
- onOpenChange,
373
- triggerProps,
374
- contentProps,
375
- providerProps,
376
- delayDuration = 300,
377
- ...props
378
- }) => {
379
- return /* @__PURE__ */ React3.createElement(
380
- TooltipPrimitive.TooltipProvider,
381
- {
382
- delayDuration,
383
- ...providerProps
384
- },
385
- /* @__PURE__ */ React3.createElement(
386
- TooltipPrimitive.Root,
387
- {
388
- open: !disabled && open,
389
- defaultOpen,
390
- onOpenChange,
391
- ...props
392
- },
393
- /* @__PURE__ */ React3.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
394
- /* @__PURE__ */ React3.createElement(
395
- TooltipContent,
396
- {
397
- size,
398
- side,
399
- align: "center",
400
- ...contentProps,
401
- style: {
402
- ...contentProps == null ? void 0 : contentProps.style,
403
- maxWidth: "var(--radix-tooltip-content-available-width)",
404
- maxHeight: "var(--radix-tooltip-content-available-height)"
405
- }
406
- },
407
- content
408
- )
409
- )
410
- );
411
- };
412
-
413
459
  // elements/codeBlock/CodeBlock.tsx
414
460
  (typeof global !== "undefined" ? global : window).Prism = Prism;
415
461
  __require("prismjs/components/prism-bash");
416
- var CopyIcon = () => /* @__PURE__ */ React4.createElement(
462
+ var CopyIcon = () => /* @__PURE__ */ React5.createElement(
417
463
  "svg",
418
464
  {
419
465
  "aria-label": "Copy",
@@ -426,8 +472,8 @@ var CopyIcon = () => /* @__PURE__ */ React4.createElement(
426
472
  height: "1em",
427
473
  width: "1em"
428
474
  },
429
- /* @__PURE__ */ React4.createElement("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
430
- /* @__PURE__ */ React4.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
475
+ /* @__PURE__ */ React5.createElement("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
476
+ /* @__PURE__ */ React5.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
431
477
  );
432
478
  var CodeBlock = ({
433
479
  tabs,
@@ -449,7 +495,7 @@ var CodeBlock = ({
449
495
  sm: "hawa-w-full hawa-max-w-sm",
450
496
  xs: "hawa-w-full hawa-max-w-xs"
451
497
  };
452
- return /* @__PURE__ */ React4.createElement(
498
+ return /* @__PURE__ */ React5.createElement(
453
499
  "div",
454
500
  {
455
501
  className: cn(
@@ -458,7 +504,7 @@ var CodeBlock = ({
458
504
  classNames == null ? void 0 : classNames.root
459
505
  )
460
506
  },
461
- fileName && /* @__PURE__ */ React4.createElement(
507
+ fileName && /* @__PURE__ */ React5.createElement(
462
508
  "div",
463
509
  {
464
510
  className: cn(
@@ -467,7 +513,7 @@ var CodeBlock = ({
467
513
  classNames == null ? void 0 : classNames.fileName
468
514
  )
469
515
  },
470
- /* @__PURE__ */ React4.createElement(
516
+ /* @__PURE__ */ React5.createElement(
471
517
  "div",
472
518
  {
473
519
  className: cn(
@@ -477,7 +523,7 @@ var CodeBlock = ({
477
523
  fileName
478
524
  )
479
525
  ),
480
- tabs && /* @__PURE__ */ React4.createElement(
526
+ tabs && /* @__PURE__ */ React5.createElement(
481
527
  "div",
482
528
  {
483
529
  className: cn(
@@ -486,7 +532,7 @@ var CodeBlock = ({
486
532
  classNames == null ? void 0 : classNames.tabs
487
533
  )
488
534
  },
489
- tabs.map((tab, i) => /* @__PURE__ */ React4.createElement(
535
+ tabs.map((tab, i) => /* @__PURE__ */ React5.createElement(
490
536
  "div",
491
537
  {
492
538
  key: i,
@@ -495,7 +541,7 @@ var CodeBlock = ({
495
541
  classNames == null ? void 0 : classNames.tab
496
542
  )
497
543
  },
498
- /* @__PURE__ */ React4.createElement(
544
+ /* @__PURE__ */ React5.createElement(
499
545
  "div",
500
546
  {
501
547
  onClick: () => setSelectedTab(i),
@@ -507,7 +553,7 @@ var CodeBlock = ({
507
553
  )
508
554
  ))
509
555
  ),
510
- /* @__PURE__ */ React4.createElement(
556
+ /* @__PURE__ */ React5.createElement(
511
557
  "div",
512
558
  {
513
559
  className: cn(
@@ -517,22 +563,22 @@ var CodeBlock = ({
517
563
  "hawa-overflow-y-auto"
518
564
  )
519
565
  },
520
- /* @__PURE__ */ React4.createElement(
566
+ /* @__PURE__ */ React5.createElement(
521
567
  "div",
522
568
  {
523
569
  className: cn(
524
570
  "hawa-flex hawa-absolute hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-z-50 hawa-right-3 hawa-top-3"
525
571
  )
526
572
  },
527
- /* @__PURE__ */ React4.createElement(
573
+ /* @__PURE__ */ React5.createElement(
528
574
  Tooltip,
529
575
  {
530
576
  open: clipboard.copied,
531
577
  side: "left",
532
- content: /* @__PURE__ */ React4.createElement("div", null, "Copied!"),
578
+ content: /* @__PURE__ */ React5.createElement("div", null, "Copied!"),
533
579
  triggerProps: { asChild: true }
534
580
  },
535
- /* @__PURE__ */ React4.createElement(
581
+ /* @__PURE__ */ React5.createElement(
536
582
  Button,
537
583
  {
538
584
  size: "smallIcon",
@@ -540,18 +586,18 @@ var CodeBlock = ({
540
586
  variant: "outline",
541
587
  className: "hawa-text-gray-200 hawa-opacity-50 dark:hawa-border-gray-200 dark:hover:hawa-border-gray-400"
542
588
  },
543
- /* @__PURE__ */ React4.createElement(CopyIcon, null)
589
+ /* @__PURE__ */ React5.createElement(CopyIcon, null)
544
590
  )
545
591
  )
546
592
  ),
547
- /* @__PURE__ */ React4.createElement(
593
+ /* @__PURE__ */ React5.createElement(
548
594
  Highlight,
549
595
  {
550
596
  theme,
551
597
  code: tabs ? tabs[selectedTab].code : code || "",
552
598
  language
553
599
  },
554
- ({ tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React4.createElement(
600
+ ({ tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ React5.createElement(
555
601
  "pre",
556
602
  {
557
603
  className: cn(
@@ -561,7 +607,7 @@ var CodeBlock = ({
561
607
  wrapText && "hawa-text-wrap"
562
608
  )
563
609
  },
564
- tokens.map((line, i) => /* @__PURE__ */ React4.createElement("div", { key: i, ...getLineProps({ line }) }, props.lineNumbers && /* @__PURE__ */ React4.createElement("span", { className: "hawa-mr-4" }, i + 1), line.map((token, key) => /* @__PURE__ */ React4.createElement("span", { key, ...getTokenProps({ token }) }))))
610
+ tokens.map((line, i) => /* @__PURE__ */ React5.createElement("div", { key: i, ...getLineProps({ line }) }, props.lineNumbers && /* @__PURE__ */ React5.createElement("span", { className: "hawa-mr-4" }, i + 1), line.map((token, key) => /* @__PURE__ */ React5.createElement("span", { key, ...getTokenProps({ token }) }))))
565
611
  )
566
612
  )
567
613
  )