@sikka/hawa 0.39.0-next → 0.40.1-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 (198) hide show
  1. package/dist/{DropdownMenu-B3cTLPDi.d.mts → DropdownMenu-FVVDS2rX.d.mts} +6 -1
  2. package/dist/{DropdownMenu-BO1TNMm5.d.ts → DropdownMenu-SFJtRGAw.d.ts} +6 -1
  3. package/dist/{Radio-lgoClQrv.d.ts → Radio-DlPwVCG4.d.ts} +6 -0
  4. package/dist/{Radio-uQ7DtzcI.d.mts → Radio-Dyvlywnk.d.mts} +6 -0
  5. package/dist/alert/index.js +2 -2
  6. package/dist/alert/index.js.map +1 -1
  7. package/dist/alert/index.mjs +2 -2
  8. package/dist/alert/index.mjs.map +1 -1
  9. package/dist/appLayout/index.d.mts +2 -0
  10. package/dist/appLayout/index.d.ts +2 -0
  11. package/dist/appLayout/index.js +14 -3
  12. package/dist/appLayout/index.js.map +1 -1
  13. package/dist/appLayout/index.mjs +14 -3
  14. package/dist/appLayout/index.mjs.map +1 -1
  15. package/dist/appTopbar/index.js.map +1 -1
  16. package/dist/appTopbar/index.mjs.map +1 -1
  17. package/dist/backToTop/index.js +2 -2
  18. package/dist/backToTop/index.js.map +1 -1
  19. package/dist/backToTop/index.mjs +2 -2
  20. package/dist/backToTop/index.mjs.map +1 -1
  21. package/dist/blocks/auth/index.js +15 -15
  22. package/dist/blocks/auth/index.mjs +17 -17
  23. package/dist/blocks/feedback/index.js +162 -119
  24. package/dist/blocks/feedback/index.mjs +5 -5
  25. package/dist/blocks/index.d.mts +2 -2
  26. package/dist/blocks/index.d.ts +2 -2
  27. package/dist/blocks/index.js +455 -463
  28. package/dist/blocks/index.mjs +3 -3
  29. package/dist/blocks/misc/index.js +238 -289
  30. package/dist/blocks/misc/index.mjs +147 -200
  31. package/dist/blocks/pricing/index.js +162 -119
  32. package/dist/blocks/pricing/index.mjs +4 -4
  33. package/dist/button/index.d.mts +1 -1
  34. package/dist/button/index.d.ts +1 -1
  35. package/dist/button/index.js +2 -2
  36. package/dist/button/index.js.map +1 -1
  37. package/dist/button/index.mjs +2 -2
  38. package/dist/button/index.mjs.map +1 -1
  39. package/dist/calendar/index.js +2 -2
  40. package/dist/calendar/index.js.map +1 -1
  41. package/dist/calendar/index.mjs +2 -2
  42. package/dist/calendar/index.mjs.map +1 -1
  43. package/dist/{chunk-C2IX3SUD.mjs → chunk-27G5FKOP.mjs} +1 -1
  44. package/dist/{chunk-IC5WYNKN.mjs → chunk-AJTYKC5R.mjs} +1 -1
  45. package/dist/{chunk-UMOBOCED.mjs → chunk-CTNKKP2O.mjs} +2 -2
  46. package/dist/chunk-CTZRVSTI.mjs +346 -0
  47. package/dist/{chunk-XFSBC5VI.mjs → chunk-DYPGZ2IP.mjs} +1 -1
  48. package/dist/{chunk-UJ5SXC3M.mjs → chunk-GN7EIDTE.mjs} +1 -1
  49. package/dist/{chunk-VMVZM3QQ.mjs → chunk-GU2DOJ7Q.mjs} +31 -8
  50. package/dist/{chunk-W3CF7BSC.mjs → chunk-QSEQS7DS.mjs} +251 -261
  51. package/dist/{chunk-RTK6REIK.mjs → chunk-QZIENYTE.mjs} +1 -1
  52. package/dist/{chunk-EZBHA2IL.mjs → chunk-RT2Q3SH7.mjs} +1 -1
  53. package/dist/{chunk-ZBUBNKF6.mjs → chunk-XCW5YNMS.mjs} +34 -1
  54. package/dist/codeBlock/index.js +2 -2
  55. package/dist/codeBlock/index.js.map +1 -1
  56. package/dist/codeBlock/index.mjs +2 -2
  57. package/dist/codeBlock/index.mjs.map +1 -1
  58. package/dist/combobox/index.js +1 -1
  59. package/dist/combobox/index.js.map +1 -1
  60. package/dist/combobox/index.mjs +1 -1
  61. package/dist/combobox/index.mjs.map +1 -1
  62. package/dist/command/index.js +1 -1
  63. package/dist/command/index.js.map +1 -1
  64. package/dist/command/index.mjs +1 -1
  65. package/dist/command/index.mjs.map +1 -1
  66. package/dist/commonTypes-189mW5eB.d.mts +8 -0
  67. package/dist/commonTypes-189mW5eB.d.ts +8 -0
  68. package/dist/commonTypes-DUY2LJm1.d.mts +3 -0
  69. package/dist/commonTypes-DUY2LJm1.d.ts +3 -0
  70. package/dist/commonTypes-D_7LV7Ri.d.mts +5 -0
  71. package/dist/commonTypes-D_7LV7Ri.d.ts +5 -0
  72. package/dist/dataTable/index.js +2 -2
  73. package/dist/dataTable/index.js.map +1 -1
  74. package/dist/dataTable/index.mjs +2 -2
  75. package/dist/dataTable/index.mjs.map +1 -1
  76. package/dist/datePicker/index.d.mts +1 -1
  77. package/dist/datePicker/index.d.ts +1 -1
  78. package/dist/datePicker/index.js +3 -3
  79. package/dist/datePicker/index.js.map +1 -1
  80. package/dist/datePicker/index.mjs +3 -3
  81. package/dist/datePicker/index.mjs.map +1 -1
  82. package/dist/dialog/index.js +1 -1
  83. package/dist/dialog/index.js.map +1 -1
  84. package/dist/dialog/index.mjs +1 -1
  85. package/dist/dialog/index.mjs.map +1 -1
  86. package/dist/docsLayout/index.js +2 -2
  87. package/dist/docsLayout/index.js.map +1 -1
  88. package/dist/docsLayout/index.mjs +2 -2
  89. package/dist/docsLayout/index.mjs.map +1 -1
  90. package/dist/dropdownMenu/index.d.mts +6 -1
  91. package/dist/dropdownMenu/index.d.ts +6 -1
  92. package/dist/dropdownMenu/index.js +29 -6
  93. package/dist/dropdownMenu/index.js.map +1 -1
  94. package/dist/dropdownMenu/index.mjs +29 -6
  95. package/dist/dropdownMenu/index.mjs.map +1 -1
  96. package/dist/elements/index.d.mts +7 -5
  97. package/dist/elements/index.d.ts +7 -5
  98. package/dist/elements/index.js +559 -544
  99. package/dist/elements/index.mjs +5 -5
  100. package/dist/fileDropzone/index.d.mts +2 -2
  101. package/dist/fileDropzone/index.d.ts +2 -2
  102. package/dist/fileDropzone/index.js +2 -2
  103. package/dist/fileDropzone/index.js.map +1 -1
  104. package/dist/fileDropzone/index.mjs +2 -2
  105. package/dist/fileDropzone/index.mjs.map +1 -1
  106. package/dist/fileUploader/index.d.mts +2 -2
  107. package/dist/fileUploader/index.d.ts +2 -2
  108. package/dist/glow/index.d.mts +3 -3
  109. package/dist/glow/index.d.ts +3 -3
  110. package/dist/hooks/index.d.mts +8 -1
  111. package/dist/hooks/index.d.ts +8 -1
  112. package/dist/hooks/index.js +35 -0
  113. package/dist/hooks/index.mjs +5 -1
  114. package/dist/index.css +0 -91
  115. package/dist/index.d.mts +26 -4
  116. package/dist/index.d.ts +26 -4
  117. package/dist/index.js +1033 -972
  118. package/dist/index.mjs +984 -925
  119. package/dist/input/index.d.mts +2 -9
  120. package/dist/input/index.d.ts +2 -9
  121. package/dist/interfaceSettings/index.js +160 -117
  122. package/dist/interfaceSettings/index.js.map +1 -1
  123. package/dist/interfaceSettings/index.mjs +160 -117
  124. package/dist/interfaceSettings/index.mjs.map +1 -1
  125. package/dist/label/index.d.mts +1 -2
  126. package/dist/label/index.d.ts +1 -2
  127. package/dist/layout/index.d.mts +3 -1
  128. package/dist/layout/index.d.ts +3 -1
  129. package/dist/layout/index.js +14 -3
  130. package/dist/layout/index.mjs +14 -3
  131. package/dist/navigationMenu/index.d.mts +2 -1
  132. package/dist/navigationMenu/index.d.ts +2 -1
  133. package/dist/pagination/index.d.mts +1 -1
  134. package/dist/pagination/index.d.ts +1 -1
  135. package/dist/phoneInput/index.d.mts +1 -1
  136. package/dist/phoneInput/index.d.ts +1 -1
  137. package/dist/pinInput/index.js +13 -13
  138. package/dist/pinInput/index.js.map +1 -1
  139. package/dist/pinInput/index.mjs +13 -13
  140. package/dist/pinInput/index.mjs.map +1 -1
  141. package/dist/progress/index.d.mts +8 -1
  142. package/dist/progress/index.d.ts +8 -1
  143. package/dist/radio/index.d.mts +15 -1
  144. package/dist/radio/index.d.ts +15 -1
  145. package/dist/radio/index.js +160 -117
  146. package/dist/radio/index.js.map +1 -1
  147. package/dist/radio/index.mjs +160 -117
  148. package/dist/radio/index.mjs.map +1 -1
  149. package/dist/scrollArea/index.d.mts +1 -1
  150. package/dist/scrollArea/index.d.ts +1 -1
  151. package/dist/separator/index.d.mts +1 -1
  152. package/dist/separator/index.d.ts +1 -1
  153. package/dist/signature/index.d.mts +1 -2
  154. package/dist/signature/index.d.ts +1 -2
  155. package/dist/simpleTable/index.d.mts +1 -1
  156. package/dist/simpleTable/index.d.ts +1 -1
  157. package/dist/sonner/index.d.mts +1 -1
  158. package/dist/sonner/index.d.ts +1 -1
  159. package/dist/sortButton/index.js +2 -2
  160. package/dist/sortButton/index.js.map +1 -1
  161. package/dist/sortButton/index.mjs +2 -2
  162. package/dist/sortButton/index.mjs.map +1 -1
  163. package/dist/splitButton/index.d.mts +3 -9
  164. package/dist/splitButton/index.d.ts +3 -9
  165. package/dist/splitButton/index.js +2 -2
  166. package/dist/splitButton/index.js.map +1 -1
  167. package/dist/splitButton/index.mjs +2 -2
  168. package/dist/splitButton/index.mjs.map +1 -1
  169. package/dist/switch/index.d.mts +1 -1
  170. package/dist/switch/index.d.ts +1 -1
  171. package/dist/tabs/index.d.mts +4 -2
  172. package/dist/tabs/index.d.ts +4 -2
  173. package/dist/tabs/index.js +123 -174
  174. package/dist/tabs/index.js.map +1 -1
  175. package/dist/tabs/index.mjs +118 -169
  176. package/dist/tabs/index.mjs.map +1 -1
  177. package/dist/textarea/index.d.mts +1 -1
  178. package/dist/textarea/index.d.ts +1 -1
  179. package/dist/toast/index.d.mts +1 -1
  180. package/dist/toast/index.d.ts +1 -1
  181. package/dist/toaster/index.d.mts +4 -22
  182. package/dist/toaster/index.d.ts +4 -22
  183. package/dist/tooltip/index.d.mts +4 -3
  184. package/dist/tooltip/index.d.ts +4 -3
  185. package/package.json +3 -5
  186. package/dist/Label-UbMDLtJF.d.mts +0 -14
  187. package/dist/Label-UbMDLtJF.d.ts +0 -14
  188. package/dist/chunk-WDCKXU54.mjs +0 -303
  189. package/dist/commonTypes-CgDwjGvU.d.mts +0 -5
  190. package/dist/commonTypes-CgDwjGvU.d.ts +0 -5
  191. package/dist/commonTypes-DZdITB5m.d.mts +0 -4
  192. package/dist/commonTypes-DZdITB5m.d.ts +0 -4
  193. package/dist/floatBox/index.d.mts +0 -15
  194. package/dist/floatBox/index.d.ts +0 -15
  195. package/dist/floatBox/index.js +0 -105
  196. package/dist/floatBox/index.js.map +0 -1
  197. package/dist/floatBox/index.mjs +0 -69
  198. package/dist/floatBox/index.mjs.map +0 -1
@@ -173,6 +173,7 @@ var Radio = forwardRef3(
173
173
  tabsContainerClassName,
174
174
  forceHideHelperText = false,
175
175
  onChange,
176
+ containerClassNames,
176
177
  ...props
177
178
  }, ref) => {
178
179
  var _a, _b, _c;
@@ -228,161 +229,203 @@ var Radio = forwardRef3(
228
229
  ];
229
230
  switch (design) {
230
231
  case "tabs":
231
- return /* @__PURE__ */ React5.createElement("div", { className: "hawa-gap-2 hawa-flex hawa-flex-col" }, props.label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React5.createElement(
232
- "ul",
232
+ return /* @__PURE__ */ React5.createElement(
233
+ "div",
233
234
  {
234
- ref: parentRef,
235
235
  className: cn(
236
- props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
237
- "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
238
- orientationStyle[orientation],
239
- widthStyle[width],
240
- tabsContainerClassName
236
+ "hawa-gap-2 hawa-flex hawa-flex-col",
237
+ containerClassNames == null ? void 0 : containerClassNames.tabs
241
238
  )
242
239
  },
243
- (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
244
- return opt.tooltip ? /* @__PURE__ */ React5.createElement(
245
- PopoverRoot,
246
- {
247
- key: o,
248
- open: o === openTooltip,
249
- onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
250
- },
251
- /* @__PURE__ */ React5.createElement(
252
- PopoverTrigger,
240
+ props.label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, props.label),
241
+ /* @__PURE__ */ React5.createElement(
242
+ "ul",
243
+ {
244
+ ref: parentRef,
245
+ className: cn(
246
+ props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
247
+ "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
248
+ orientationStyle[orientation],
249
+ widthStyle[width],
250
+ tabsContainerClassName
251
+ )
252
+ },
253
+ (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
254
+ return opt.tooltip ? /* @__PURE__ */ React5.createElement(
255
+ PopoverRoot,
253
256
  {
254
- onMouseEnter: () => setOpenTooltip(o),
255
- onMouseLeave: () => setOpenTooltip(null),
256
- asChild: true
257
+ key: o,
258
+ open: o === openTooltip,
259
+ onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
257
260
  },
258
261
  /* @__PURE__ */ React5.createElement(
259
- "li",
262
+ PopoverTrigger,
260
263
  {
261
- "aria-current": "page",
262
- onClick: () => {
263
- if (props.disabled || opt.disabled)
264
- return;
265
- handleChange(opt);
264
+ onMouseEnter: () => setOpenTooltip(o),
265
+ onMouseLeave: () => setOpenTooltip(null),
266
+ asChild: true
267
+ },
268
+ /* @__PURE__ */ React5.createElement(
269
+ "li",
270
+ {
271
+ "aria-current": "page",
272
+ onClick: () => {
273
+ if (props.disabled || opt.disabled)
274
+ return;
275
+ handleChange(opt);
276
+ },
277
+ className: cn(
278
+ ...radio_option_tabs_styling,
279
+ selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
280
+ )
266
281
  },
267
- className: cn(
268
- ...radio_option_tabs_styling,
269
- selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
270
- )
282
+ opt.icon && opt.icon,
283
+ opt.label
284
+ )
285
+ ),
286
+ /* @__PURE__ */ React5.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
287
+ ) : /* @__PURE__ */ React5.createElement(
288
+ "li",
289
+ {
290
+ key: o,
291
+ "aria-current": "page",
292
+ onClick: () => {
293
+ if (props.disabled || opt.disabled)
294
+ return;
295
+ handleChange(opt);
271
296
  },
272
- opt.icon && opt.icon,
273
- opt.label
274
- )
297
+ className: cn(
298
+ ...radio_option_tabs_styling,
299
+ selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
300
+ )
301
+ },
302
+ opt.icon && opt.icon,
303
+ opt.label
304
+ );
305
+ })
306
+ ),
307
+ !forceHideHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText })
308
+ );
309
+ case "bordered":
310
+ return /* @__PURE__ */ React5.createElement(
311
+ "div",
312
+ {
313
+ className: cn(
314
+ orientationStyle[orientation],
315
+ "hawa-gap-4",
316
+ containerClassNames == null ? void 0 : containerClassNames.bordered
317
+ )
318
+ },
319
+ props.options && props.options.map((opt, i) => /* @__PURE__ */ React5.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ React5.createElement(
320
+ "div",
321
+ {
322
+ className: cn(
323
+ "radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
324
+ props.direction === "rtl" ? "margin-left right-19px" : "margin-right left-23px"
275
325
  ),
276
- /* @__PURE__ */ React5.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
277
- ) : /* @__PURE__ */ React5.createElement(
278
- "li",
326
+ key: i + 1
327
+ },
328
+ /* @__PURE__ */ React5.createElement(
329
+ "input",
279
330
  {
280
- key: o,
281
- "aria-current": "page",
282
- onClick: () => {
283
- if (props.disabled || opt.disabled)
284
- return;
285
- handleChange(opt);
286
- },
331
+ disabled: opt.disabled,
332
+ id: opt.value.toString(),
333
+ type: "radio",
334
+ value: opt.value,
335
+ name,
336
+ onChange: () => handleChange(opt)
337
+ }
338
+ ),
339
+ /* @__PURE__ */ React5.createElement(
340
+ "label",
341
+ {
342
+ htmlFor: opt.value.toString(),
287
343
  className: cn(
288
- ...radio_option_tabs_styling,
289
- selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
344
+ "hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white",
345
+ opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
290
346
  )
291
347
  },
292
- opt.icon && opt.icon,
293
348
  opt.label
294
- );
295
- })
296
- ), !forceHideHelperText && /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
297
- case "bordered":
298
- return /* @__PURE__ */ React5.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React5.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ React5.createElement(
299
- "div",
349
+ )
350
+ )))
351
+ );
352
+ case "cards":
353
+ return /* @__PURE__ */ React5.createElement(
354
+ "ul",
300
355
  {
301
356
  className: cn(
302
- "radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
303
- props.direction === "rtl" ? "margin-left right-19px" : "margin-right left-23px"
304
- ),
305
- key: i + 1
357
+ orientationStyle[orientation],
358
+ "hawa-gap-4",
359
+ containerClassNames == null ? void 0 : containerClassNames.cards
360
+ )
306
361
  },
307
- /* @__PURE__ */ React5.createElement(
362
+ (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React5.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React5.createElement(
308
363
  "input",
309
364
  {
310
- disabled: opt.disabled,
311
- id: opt.value.toString(),
312
365
  type: "radio",
313
- value: opt.value,
366
+ id: opt.value.toString(),
314
367
  name,
315
- onChange: () => handleChange(opt)
368
+ value: opt.value.toString(),
369
+ className: "hawa-peer hawa-hidden",
370
+ required: true,
371
+ disabled: opt.disabled
316
372
  }
317
- ),
318
- /* @__PURE__ */ React5.createElement(
373
+ ), /* @__PURE__ */ React5.createElement(
319
374
  "label",
320
375
  {
321
376
  htmlFor: opt.value.toString(),
322
377
  className: cn(
323
- "hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white",
324
- opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
378
+ "hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
379
+ opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300"
325
380
  )
326
381
  },
327
- opt.label
328
- )
329
- ))));
330
- case "cards":
331
- return /* @__PURE__ */ React5.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React5.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React5.createElement(
332
- "input",
333
- {
334
- type: "radio",
335
- id: opt.value.toString(),
336
- name,
337
- value: opt.value.toString(),
338
- className: "hawa-peer hawa-hidden",
339
- required: true,
340
- disabled: opt.disabled
341
- }
342
- ), /* @__PURE__ */ React5.createElement(
343
- "label",
344
- {
345
- htmlFor: opt.value.toString(),
346
- className: cn(
347
- "hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
348
- opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300"
349
- )
350
- },
351
- /* @__PURE__ */ React5.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React5.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React5.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
352
- ))));
382
+ /* @__PURE__ */ React5.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React5.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React5.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
383
+ )))
384
+ );
353
385
  default:
354
- return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React5.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React5.createElement(
386
+ return /* @__PURE__ */ React5.createElement(
355
387
  "div",
356
388
  {
357
389
  className: cn(
358
- "radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
359
- props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
360
- ),
361
- key: i + 1
390
+ "hawa-flex hawa-flex-col hawa-gap-2",
391
+ containerClassNames == null ? void 0 : containerClassNames.default
392
+ )
362
393
  },
363
- /* @__PURE__ */ React5.createElement(
364
- "input",
394
+ props.label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, props.label),
395
+ /* @__PURE__ */ React5.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React5.createElement(
396
+ "div",
365
397
  {
366
- disabled: opt.disabled,
367
- id: opt.value.toString(),
368
- type: "radio",
369
- value: opt.value,
370
- name,
371
- onChange: () => handleChange(opt)
372
- }
373
- ),
374
- /* @__PURE__ */ React5.createElement(
375
- "label",
376
- {
377
- htmlFor: opt.value.toString(),
378
398
  className: cn(
379
- "hawa-text-sm hawa-font-medium dark:hawa-text-white",
380
- opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
381
- )
399
+ "radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
400
+ props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
401
+ ),
402
+ key: i + 1
382
403
  },
383
- opt.label
384
- )
385
- ))), /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText }));
404
+ /* @__PURE__ */ React5.createElement(
405
+ "input",
406
+ {
407
+ disabled: opt.disabled,
408
+ id: opt.value.toString(),
409
+ type: "radio",
410
+ value: opt.value,
411
+ name,
412
+ onChange: () => handleChange(opt)
413
+ }
414
+ ),
415
+ /* @__PURE__ */ React5.createElement(
416
+ "label",
417
+ {
418
+ htmlFor: opt.value.toString(),
419
+ className: cn(
420
+ "hawa-text-sm hawa-font-medium dark:hawa-text-white",
421
+ opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
422
+ )
423
+ },
424
+ opt.label
425
+ )
426
+ ))),
427
+ /* @__PURE__ */ React5.createElement(HelperText, { helperText: props.helperText })
428
+ );
386
429
  }
387
430
  }
388
431
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/radio/Radio.tsx","../../util/index.ts","../../elements/helperText/HelperText.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/popover/Popover.tsx"],"sourcesContent":["import React, { useState, FC, useRef, useEffect, forwardRef } from \"react\";\n\nimport { PopoverContentProps } from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, OrientationType } from \"../../types/commonTypes\";\nimport { HelperText } from \"../helperText\";\nimport { Label, LabelProps } from \"../label/Label\";\nimport { PopoverContent, PopoverRoot, PopoverTrigger } from \"../popover\";\nimport { Tooltip } from \"../tooltip\";\n\nexport type RadioOptionsTypes = {\n value: any;\n label: any;\n disabled?: any;\n sublabel?: any;\n icon?: any;\n tooltip?: string;\n tooltipContentProps?: PopoverContentProps;\n};\n\ntype RadioTypes = {\n /** Required to enable selection and differentiate between different Radio instances. */\n name: string;\n disabled?: boolean;\n orientation?: OrientationType;\n design?: \"default\" | \"tabs\" | \"cards\" | \"bordered\";\n width?: \"default\" | \"full\" | \"none\";\n size?: \"default\" | \"lg\" | \"sm\" | \"xs\";\n options: RadioOptionsTypes[];\n onChange?: any;\n defaultValue?: any;\n value?: any;\n direction?: DirectionType;\n helperText?: any;\n labelProps?: LabelProps;\n label?: string;\n tabsContainerClassName?: string;\n forceHideHelperText?: boolean;\n};\n\nexport const Radio = forwardRef<HTMLInputElement, RadioTypes>(\n (\n {\n design = \"default\",\n width = \"default\",\n size = \"default\",\n orientation = \"horizontal\",\n name,\n labelProps,\n tabsContainerClassName,\n forceHideHelperText = false,\n onChange,\n ...props\n },\n ref,\n ) => {\n let activeTabStyle =\n \"hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary\";\n let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white\n ${props.disabled ? \"\" : \"hover:hawa-bg-muted\"}`;\n let orientationStyle = {\n horizontal: \"hawa-flex hawa-flex-row\",\n vertical: \"hawa-flex hawa-flex-col\",\n };\n\n let tabSizeStyle = {\n default: \"hawa-py-2 hawa-px-4 hawa-text-sm\",\n lg: \"hawa-py-2 hawa-px-4\",\n sm: \"hawa-p-1.5 hawa-text-xs\",\n xs: \"hawa-p-1 hawa-text-[10px]\",\n };\n let widthStyle = {\n none: \"\",\n default: \"hawa-max-w-fit\",\n full: \"hawa-w-full\",\n };\n const [parentDirection, setParentDirection] = React.useState<string | null>(\n null,\n );\n const [selectedOption, setSelectedOption] = useState(\n props.defaultValue || props.value,\n );\n const [openTooltip, setOpenTooltip] = useState<number | null>(null);\n\n const parentRef = useRef<HTMLUListElement>(null);\n\n useEffect(() => {\n const parentNode = parentRef.current?.parentNode as HTMLElement | null;\n if (parentNode) {\n const dir = window.getComputedStyle(parentNode).direction;\n setParentDirection(dir);\n }\n });\n\n const handleChange = (opt: RadioOptionsTypes) => {\n setSelectedOption(opt.value);\n if (onChange) {\n // use the more generic onChange prop\n onChange(opt.value); // You can pass the entire option or just the value\n } else {\n console.log(\"onChange was not provided\");\n }\n };\n\n const radio_option_tabs_styling = [\n \"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 \",\n !props.disabled && \"hawa-cursor-pointer\",\n orientation === \"horizontal\" &&\n parentDirection === \"ltr\" &&\n \"hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r\",\n orientation === \"horizontal\" &&\n parentDirection === \"rtl\" &&\n \"hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l\",\n orientation === \"vertical\" &&\n \"hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b\",\n tabSizeStyle[size],\n ];\n\n switch (design) {\n case \"tabs\":\n return (\n <div className=\"hawa-gap-2 hawa-flex hawa-flex-col\">\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n\n <ul\n ref={parentRef}\n className={cn(\n props.options && props.options?.length > 2\n ? \"hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap\"\n : \"\",\n \"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]\",\n orientationStyle[orientation],\n widthStyle[width],\n tabsContainerClassName,\n )}\n >\n {props.options?.map((opt, o) => {\n return opt.tooltip ? (\n <PopoverRoot\n key={o}\n open={o === openTooltip}\n onOpenChange={(bool) => setOpenTooltip(bool ? o : null)}\n >\n <PopoverTrigger\n onMouseEnter={() => setOpenTooltip(o)}\n onMouseLeave={() => setOpenTooltip(null)}\n asChild\n >\n <li\n aria-current=\"page\"\n onClick={() => {\n if (props.disabled || opt.disabled) return;\n handleChange(opt);\n }}\n className={cn(\n ...radio_option_tabs_styling,\n selectedOption === opt.value\n ? activeTabStyle\n : inactiveTabStyle,\n )}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </li>\n </PopoverTrigger>\n <PopoverContent {...opt.tooltipContentProps}>\n {opt.tooltip}\n </PopoverContent>\n </PopoverRoot>\n ) : (\n <li\n key={o}\n aria-current=\"page\"\n onClick={() => {\n if (props.disabled || opt.disabled) return;\n handleChange(opt);\n }}\n className={cn(\n ...radio_option_tabs_styling,\n selectedOption === opt.value\n ? activeTabStyle\n : inactiveTabStyle,\n )}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </li>\n );\n })}\n </ul>\n {!forceHideHelperText && (\n <HelperText helperText={props.helperText} />\n )}\n </div>\n );\n case \"bordered\":\n return (\n <div className={cn(orientationStyle[orientation], \"hawa-gap-4\")}>\n {props.options &&\n props.options.map((opt, i) => (\n <div key={i} className=\"hawa-w-full hawa-rounded hawa-border\">\n <div\n className={cn(\n \"radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all\",\n props.direction === \"rtl\"\n ? \"margin-left right-19px\"\n : \"margin-right left-23px\",\n )}\n key={i + 1}\n >\n <input\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name={name}\n onChange={() => handleChange(opt)}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white\",\n opt.disabled\n ? \"hawa-opacity-50\"\n : \"hawa-cursor-pointer hawa-text-gray-900\",\n )}\n >\n {opt.label}\n </label>\n </div>\n </div>\n ))}\n </div>\n );\n case \"cards\":\n return (\n <ul className={cn(orientationStyle[orientation], \"hawa-gap-4\")}>\n {props.options?.map((opt: any, o) => (\n <li key={o} onClick={() => handleChange(opt)}>\n <input\n type=\"radio\"\n id={opt.value.toString()}\n name={name}\n value={opt.value.toString()}\n className=\"hawa-peer hawa-hidden\"\n required\n disabled={opt.disabled}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary\",\n opt.disabled\n ? \"hawa-opacity-50\"\n : \"hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300\",\n )}\n >\n <div className=\"hawa-block hawa-h-full hawa-w-full\">\n <div className=\"hawa-w-full hawa-text-lg hawa-font-semibold\">\n {opt.label}\n </div>\n <div className=\"hawa-w-full\">{opt.sublabel}</div>\n </div>\n </label>\n </li>\n ))}\n </ul>\n );\n\n default:\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\">\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n <div className={cn(orientationStyle[orientation], \"hawa-gap-2\")}>\n {props.options &&\n props.options.map((opt, i) => (\n <div\n className={cn(\n \"radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all\",\n props.direction === \"rtl\"\n ? \"margin-left right-3px\"\n : \"margin-right left-3px\",\n )}\n key={i + 1}\n >\n <input\n // TODO: spread the usual radio props\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name={name}\n onChange={() => handleChange(opt)}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-text-sm hawa-font-medium dark:hawa-text-white\",\n opt.disabled\n ? \"hawa-text-gray-400\"\n : \"hawa-cursor-pointer hawa-text-gray-900\",\n )}\n >\n {opt.label}\n </label>\n </div>\n ))}\n </div>\n <HelperText helperText={props.helperText} />\n </div>\n );\n }\n },\n);\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({ helperText }: { helperText?: any }) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all\",\n helperText ? \"hawa-h-4 hawa-opacity-100\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n","import * as React from \"react\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\nimport { Tooltip } from \"../tooltip\";\n\nexport type LabelProps = {\n hint?: React.ReactNode;\n hintSide?: PositionType;\n htmlFor?: string;\n required?: boolean;\n};\n\nconst Label = React.forwardRef<\n HTMLLabelElement,\n React.LabelHTMLAttributes<HTMLLabelElement> & LabelProps\n>(({ className, hint, hintSide, required, children, ...props }, ref) => (\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all\">\n <label\n ref={ref}\n className={cn(\n \"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70\",\n className\n )}\n {...props}\n >\n {children}\n {required && <span className=\"hawa-mx-0.5 hawa-text-red-500\">*</span>}\n </label>\n {hint && (\n <Tooltip\n content={hint}\n side={hintSide}\n triggerProps={{\n tabIndex: -1,\n onClick: (event) => event.preventDefault()\n }}\n >\n <div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hawa-h-[14px] hawa-w-[14px] hawa-cursor-help\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n </div>\n </Tooltip>\n )}\n </div>\n));\n\nLabel.displayName = \"Label\";\n\nexport { Label };\n","import React from \"react\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {\n size?: \"default\" | \"small\" | \"large\";\n }\n>(({ className, sideOffset = 4, size = \"default\", ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"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\",\n {\n \"hawa-text-xs\": size === \"small\",\n \"hawa-text-xl\": size === \"large\"\n },\n className\n )}\n {...props}\n />\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nconst TooltipArrow = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>\n>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn(className)} {...props} />\n));\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\ntype TooltipTypes = {\n /** Controls the open state of the tooltip. */\n open?: any;\n /** Specifies the side where the tooltip will appear. */\n side?: PositionType;\n /** Content to be displayed within the tooltip. */\n content?: any;\n /** Elements to which the tooltip is anchored. */\n children?: any;\n /** Sets the default open state of the tooltip. */\n defaultOpen?: any;\n /** Event handler for open state changes. */\n onOpenChange?: any;\n /** Duration of the delay before the tooltip appears. */\n delayDuration?: any;\n /** Size of the tooltip. */\n size?: \"default\" | \"small\" | \"large\";\n /** Disables the tooltip. */\n disabled?: boolean;\n triggerProps?: TooltipPrimitive.TooltipTriggerProps;\n contentProps?: TooltipPrimitive.TooltipContentProps;\n providerProps?: TooltipPrimitive.TooltipProviderProps;\n};\n\nconst Tooltip: React.FunctionComponent<TooltipTypes> = ({\n side,\n size,\n open,\n content,\n children,\n disabled,\n defaultOpen,\n onOpenChange,\n triggerProps,\n contentProps,\n providerProps,\n delayDuration = 300,\n ...props\n}) => {\n return (\n <TooltipPrimitive.TooltipProvider\n delayDuration={delayDuration}\n {...providerProps}\n >\n <TooltipPrimitive.Root\n open={!disabled && open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n {...props}\n >\n <TooltipPrimitive.Trigger {...triggerProps}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipContent\n size={size}\n side={side}\n align=\"center\"\n {...contentProps}\n style={{\n ...contentProps?.style,\n maxWidth: \"var(--radix-tooltip-content-available-width)\",\n maxHeight: \"var(--radix-tooltip-content-available-height)\"\n }}\n >\n {content}\n </TooltipContent>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.TooltipProvider>\n );\n};\n\nexport { Tooltip };\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(\n (\n { className, align = \"center\", sideOffset = 4, container, ...props },\n ref,\n ) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n ),\n);\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps &\n React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger\n className=\"hawa-w-full\"\n disabled={disableTrigger}\n {...triggerProps}\n >\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width],\n maxWidth: \"var(--radix-popover-content-available-width)\",\n maxHeight: \"var(--radix-popover-content-available-height)\",\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverPortal = PopoverPrimitive.Portal;\nconst PopoverRoot = PopoverPrimitive.Root;\n\nexport { Popover, PopoverPortal, PopoverRoot, PopoverContent, PopoverTrigger };\n"],"mappings":";;;AAAA,OAAOA,UAAS,UAAc,QAAQ,WAAW,cAAAC,mBAAkB;;;ACAnE,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,OAAO,WAAW;AAIX,IAAM,aAAa,CAAC,EAAE,WAAW,MACtC;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,aAAa,8BAA8B;AAAA,IAC7C;AAAA;AAAA,EAEC;AACH;;;ACZF,YAAYC,YAAW;;;ACAvB,OAAOC,YAAW;AAElB,YAAY,sBAAsB;AAKlC,IAAM,iBAAiBC,OAAM,WAK3B,CAAC,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,GAAG,MAAM,GAAG,QAC5D,gBAAAA,OAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,QACE,gBAAgB,SAAS;AAAA,QACzB,gBAAgB,SAAS;AAAA,MAC3B;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B,yBAAQ;AAEtD,IAAM,eAAeA,OAAM,WAGzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAA,OAAA,cAAkB,wBAAjB,EAAuB,KAAU,WAAW,GAAG,SAAS,GAAI,GAAG,OAAO,CACxE;AACD,aAAa,cAA+B,uBAAM;AA0BlD,IAAM,UAAiD,CAAC;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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,KACP,GACA,gBAAAA,OAAA,cAAC,SAAI,WAAU,iBAAe,IAAI,QAAS,CAC7C;AAAA,QACF,CACF,EAEJ;AAAA,MAGJ;AACE,eACE,gBAAAA,OAAA,cAAC,SAAI,WAAU,wCACZ,MAAM,SAAS,gBAAAA,OAAA,cAAC,SAAO,GAAG,cAAa,MAAM,KAAM,GACpD,gBAAAA,OAAA,cAAC,SAAI,WAAW,GAAG,iBAAiB,WAAW,GAAG,YAAY,KAC3D,MAAM,WACL,MAAM,QAAQ,IAAI,CAAC,KAAK,MACtB,gBAAAA,OAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,MAAM,cAAc,QAChB,0BACA;AAAA,YACN;AAAA,YACA,KAAK,IAAI;AAAA;AAAA,UAET,gBAAAA,OAAA;AAAA,YAAC;AAAA;AAAA,cAEC,UAAU,IAAI;AAAA,cACd,IAAI,IAAI,MAAM,SAAS;AAAA,cACvB,MAAK;AAAA,cACL,OAAO,IAAI;AAAA,cACX;AAAA,cACA,UAAU,MAAM,aAAa,GAAG;AAAA;AAAA,UAClC;AAAA,UACA,gBAAAA,OAAA;AAAA,YAAC;AAAA;AAAA,cACC,SAAS,IAAI,MAAM,SAAS;AAAA,cAC5B,WAAW;AAAA,gBACT;AAAA,gBACA,IAAI,WACA,uBACA;AAAA,cACN;AAAA;AAAA,YAEC,IAAI;AAAA,UACP;AAAA,QACF,CACD,CACL,GACA,gBAAAA,OAAA,cAAC,cAAW,YAAY,MAAM,YAAY,CAC5C;AAAA,IAEN;AAAA,EACF;AACF;","names":["React","forwardRef","React","React","React","React","forwardRef","React","_a"]}
1
+ {"version":3,"sources":["../../elements/radio/Radio.tsx","../../util/index.ts","../../elements/helperText/HelperText.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/popover/Popover.tsx"],"sourcesContent":["import React, { useState, FC, useRef, useEffect, forwardRef } from \"react\";\n\nimport { PopoverContentProps } from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, OrientationType } from \"../../types/commonTypes\";\nimport { HelperText } from \"../helperText\";\nimport { Label, LabelProps } from \"../label/Label\";\nimport { PopoverContent, PopoverRoot, PopoverTrigger } from \"../popover\";\nimport { Tooltip } from \"../tooltip\";\n\nexport type RadioOptionsTypes = {\n value: any;\n label: any;\n disabled?: any;\n sublabel?: any;\n icon?: any;\n tooltip?: string;\n tooltipContentProps?: PopoverContentProps;\n};\n\ntype RadioTypes = {\n /** Required to enable selection and differentiate between different Radio instances. */\n name: string;\n disabled?: boolean;\n orientation?: OrientationType;\n design?: \"default\" | \"tabs\" | \"cards\" | \"bordered\";\n width?: \"default\" | \"full\" | \"none\";\n size?: \"default\" | \"lg\" | \"sm\" | \"xs\";\n options: RadioOptionsTypes[];\n onChange?: any;\n defaultValue?: any;\n value?: any;\n direction?: DirectionType;\n helperText?: any;\n labelProps?: LabelProps;\n label?: string;\n tabsContainerClassName?: string;\n forceHideHelperText?: boolean;\n containerClassNames?: {\n bordered?: string;\n tabs?: string;\n cards?: string;\n default?: string;\n };\n};\n\nexport const Radio = forwardRef<HTMLInputElement, RadioTypes>(\n (\n {\n design = \"default\",\n width = \"default\",\n size = \"default\",\n orientation = \"horizontal\",\n name,\n labelProps,\n tabsContainerClassName,\n forceHideHelperText = false,\n onChange,\n containerClassNames,\n ...props\n },\n ref,\n ) => {\n let activeTabStyle =\n \"hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary\";\n let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white\n ${props.disabled ? \"\" : \"hover:hawa-bg-muted\"}`;\n let orientationStyle = {\n horizontal: \"hawa-flex hawa-flex-row\",\n vertical: \"hawa-flex hawa-flex-col\",\n };\n\n let tabSizeStyle = {\n default: \"hawa-py-2 hawa-px-4 hawa-text-sm\",\n lg: \"hawa-py-2 hawa-px-4\",\n sm: \"hawa-p-1.5 hawa-text-xs\",\n xs: \"hawa-p-1 hawa-text-[10px]\",\n };\n let widthStyle = {\n none: \"\",\n default: \"hawa-max-w-fit\",\n full: \"hawa-w-full\",\n };\n const [parentDirection, setParentDirection] = React.useState<string | null>(\n null,\n );\n const [selectedOption, setSelectedOption] = useState(\n props.defaultValue || props.value,\n );\n const [openTooltip, setOpenTooltip] = useState<number | null>(null);\n\n const parentRef = useRef<HTMLUListElement>(null);\n\n useEffect(() => {\n const parentNode = parentRef.current?.parentNode as HTMLElement | null;\n if (parentNode) {\n const dir = window.getComputedStyle(parentNode).direction;\n setParentDirection(dir);\n }\n });\n\n const handleChange = (opt: RadioOptionsTypes) => {\n setSelectedOption(opt.value);\n if (onChange) {\n // use the more generic onChange prop\n onChange(opt.value); // You can pass the entire option or just the value\n } else {\n console.log(\"onChange was not provided\");\n }\n };\n\n const radio_option_tabs_styling = [\n \"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 \",\n !props.disabled && \"hawa-cursor-pointer\",\n orientation === \"horizontal\" &&\n parentDirection === \"ltr\" &&\n \"hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r\",\n orientation === \"horizontal\" &&\n parentDirection === \"rtl\" &&\n \"hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l\",\n orientation === \"vertical\" &&\n \"hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b\",\n tabSizeStyle[size],\n ];\n\n switch (design) {\n case \"tabs\":\n return (\n <div\n className={cn(\n \"hawa-gap-2 hawa-flex hawa-flex-col\",\n containerClassNames?.tabs,\n )}\n >\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n\n <ul\n ref={parentRef}\n className={cn(\n props.options && props.options?.length > 2\n ? \"hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap\"\n : \"\",\n \"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]\",\n orientationStyle[orientation],\n widthStyle[width],\n tabsContainerClassName,\n )}\n >\n {props.options?.map((opt, o) => {\n return opt.tooltip ? (\n <PopoverRoot\n key={o}\n open={o === openTooltip}\n onOpenChange={(bool) => setOpenTooltip(bool ? o : null)}\n >\n <PopoverTrigger\n onMouseEnter={() => setOpenTooltip(o)}\n onMouseLeave={() => setOpenTooltip(null)}\n asChild\n >\n <li\n aria-current=\"page\"\n onClick={() => {\n if (props.disabled || opt.disabled) return;\n handleChange(opt);\n }}\n className={cn(\n ...radio_option_tabs_styling,\n selectedOption === opt.value\n ? activeTabStyle\n : inactiveTabStyle,\n )}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </li>\n </PopoverTrigger>\n <PopoverContent {...opt.tooltipContentProps}>\n {opt.tooltip}\n </PopoverContent>\n </PopoverRoot>\n ) : (\n <li\n key={o}\n aria-current=\"page\"\n onClick={() => {\n if (props.disabled || opt.disabled) return;\n handleChange(opt);\n }}\n className={cn(\n ...radio_option_tabs_styling,\n selectedOption === opt.value\n ? activeTabStyle\n : inactiveTabStyle,\n )}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </li>\n );\n })}\n </ul>\n {!forceHideHelperText && (\n <HelperText helperText={props.helperText} />\n )}\n </div>\n );\n case \"bordered\":\n return (\n <div\n className={cn(\n orientationStyle[orientation],\n \"hawa-gap-4\",\n containerClassNames?.bordered,\n )}\n >\n {props.options &&\n props.options.map((opt, i) => (\n <div key={i} className=\"hawa-w-full hawa-rounded hawa-border\">\n <div\n className={cn(\n \"radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all\",\n props.direction === \"rtl\"\n ? \"margin-left right-19px\"\n : \"margin-right left-23px\",\n )}\n key={i + 1}\n >\n <input\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name={name}\n onChange={() => handleChange(opt)}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white\",\n opt.disabled\n ? \"hawa-opacity-50\"\n : \"hawa-cursor-pointer hawa-text-gray-900\",\n )}\n >\n {opt.label}\n </label>\n </div>\n </div>\n ))}\n </div>\n );\n case \"cards\":\n return (\n <ul\n className={cn(\n orientationStyle[orientation],\n \"hawa-gap-4\",\n containerClassNames?.cards,\n )}\n >\n {props.options?.map((opt: any, o) => (\n <li key={o} onClick={() => handleChange(opt)}>\n <input\n type=\"radio\"\n id={opt.value.toString()}\n name={name}\n value={opt.value.toString()}\n className=\"hawa-peer hawa-hidden\"\n required\n disabled={opt.disabled}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary\",\n opt.disabled\n ? \"hawa-opacity-50\"\n : \"hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300\",\n )}\n >\n <div className=\"hawa-block hawa-h-full hawa-w-full\">\n <div className=\"hawa-w-full hawa-text-lg hawa-font-semibold\">\n {opt.label}\n </div>\n <div className=\"hawa-w-full\">{opt.sublabel}</div>\n </div>\n </label>\n </li>\n ))}\n </ul>\n );\n\n default:\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-col hawa-gap-2\",\n containerClassNames?.default,\n )}\n >\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n <div className={cn(orientationStyle[orientation], \"hawa-gap-2\")}>\n {props.options &&\n props.options.map((opt, i) => (\n <div\n className={cn(\n \"radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all\",\n props.direction === \"rtl\"\n ? \"margin-left right-3px\"\n : \"margin-right left-3px\",\n )}\n key={i + 1}\n >\n <input\n // TODO: spread the usual radio props\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name={name}\n onChange={() => handleChange(opt)}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-text-sm hawa-font-medium dark:hawa-text-white\",\n opt.disabled\n ? \"hawa-text-gray-400\"\n : \"hawa-cursor-pointer hawa-text-gray-900\",\n )}\n >\n {opt.label}\n </label>\n </div>\n ))}\n </div>\n <HelperText helperText={props.helperText} />\n </div>\n );\n }\n },\n);\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({ helperText }: { helperText?: any }) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all\",\n helperText ? \"hawa-h-4 hawa-opacity-100\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n","import * as React from \"react\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\nimport { Tooltip } from \"../tooltip\";\n\nexport type LabelProps = {\n hint?: React.ReactNode;\n hintSide?: PositionType;\n htmlFor?: string;\n required?: boolean;\n};\n\nconst Label = React.forwardRef<\n HTMLLabelElement,\n React.LabelHTMLAttributes<HTMLLabelElement> & LabelProps\n>(({ className, hint, hintSide, required, children, ...props }, ref) => (\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all\">\n <label\n ref={ref}\n className={cn(\n \"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70\",\n className\n )}\n {...props}\n >\n {children}\n {required && <span className=\"hawa-mx-0.5 hawa-text-red-500\">*</span>}\n </label>\n {hint && (\n <Tooltip\n content={hint}\n side={hintSide}\n triggerProps={{\n tabIndex: -1,\n onClick: (event) => event.preventDefault()\n }}\n >\n <div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hawa-h-[14px] hawa-w-[14px] hawa-cursor-help\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n </div>\n </Tooltip>\n )}\n </div>\n));\n\nLabel.displayName = \"Label\";\n\nexport { Label };\n","import React from \"react\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {\n size?: \"default\" | \"small\" | \"large\";\n }\n>(({ className, sideOffset = 4, size = \"default\", ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"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\",\n {\n \"hawa-text-xs\": size === \"small\",\n \"hawa-text-xl\": size === \"large\"\n },\n className\n )}\n {...props}\n />\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nconst TooltipArrow = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>\n>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn(className)} {...props} />\n));\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\ntype TooltipTypes = {\n /** Controls the open state of the tooltip. */\n open?: any;\n /** Specifies the side where the tooltip will appear. */\n side?: PositionType;\n /** Content to be displayed within the tooltip. */\n content?: any;\n /** Elements to which the tooltip is anchored. */\n children?: any;\n /** Sets the default open state of the tooltip. */\n defaultOpen?: any;\n /** Event handler for open state changes. */\n onOpenChange?: any;\n /** Duration of the delay before the tooltip appears. */\n delayDuration?: any;\n /** Size of the tooltip. */\n size?: \"default\" | \"small\" | \"large\";\n /** Disables the tooltip. */\n disabled?: boolean;\n triggerProps?: TooltipPrimitive.TooltipTriggerProps;\n contentProps?: TooltipPrimitive.TooltipContentProps;\n providerProps?: TooltipPrimitive.TooltipProviderProps;\n};\n\nconst Tooltip: React.FunctionComponent<TooltipTypes> = ({\n side,\n size,\n open,\n content,\n children,\n disabled,\n defaultOpen,\n onOpenChange,\n triggerProps,\n contentProps,\n providerProps,\n delayDuration = 300,\n ...props\n}) => {\n return (\n <TooltipPrimitive.TooltipProvider\n delayDuration={delayDuration}\n {...providerProps}\n >\n <TooltipPrimitive.Root\n open={!disabled && open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n {...props}\n >\n <TooltipPrimitive.Trigger {...triggerProps}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipContent\n size={size}\n side={side}\n align=\"center\"\n {...contentProps}\n style={{\n ...contentProps?.style,\n maxWidth: \"var(--radix-tooltip-content-available-width)\",\n maxHeight: \"var(--radix-tooltip-content-available-height)\"\n }}\n >\n {content}\n </TooltipContent>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.TooltipProvider>\n );\n};\n\nexport { Tooltip };\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(\n (\n { className, align = \"center\", sideOffset = 4, container, ...props },\n ref,\n ) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n ),\n);\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps &\n React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger\n className=\"hawa-w-full\"\n disabled={disableTrigger}\n {...triggerProps}\n >\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width],\n maxWidth: \"var(--radix-popover-content-available-width)\",\n maxHeight: \"var(--radix-popover-content-available-height)\",\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverPortal = PopoverPrimitive.Portal;\nconst PopoverRoot = PopoverPrimitive.Root;\n\nexport { Popover, PopoverPortal, PopoverRoot, PopoverContent, PopoverTrigger };\n"],"mappings":";;;AAAA,OAAOA,UAAS,UAAc,QAAQ,WAAW,cAAAC,mBAAkB;;;ACAnE,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,OAAO,WAAW;AAIX,IAAM,aAAa,CAAC,EAAE,WAAW,MACtC;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,aAAa,8BAA8B;AAAA,IAC7C;AAAA;AAAA,EAEC;AACH;;;ACZF,YAAYC,YAAW;;;ACAvB,OAAOC,YAAW;AAElB,YAAY,sBAAsB;AAKlC,IAAM,iBAAiBC,OAAM,WAK3B,CAAC,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,GAAG,MAAM,GAAG,QAC5D,gBAAAA,OAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,QACE,gBAAgB,SAAS;AAAA,QACzB,gBAAgB,SAAS;AAAA,MAC3B;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B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IAAI,MAAM,SAAS;AAAA,gBACvB,MAAK;AAAA,gBACL,OAAO,IAAI;AAAA,gBACX;AAAA,gBACA,UAAU,MAAM,aAAa,GAAG;AAAA;AAAA,YAClC;AAAA,YACA,gBAAAA,OAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS,IAAI,MAAM,SAAS;AAAA,gBAC5B,WAAW;AAAA,kBACT;AAAA,kBACA,IAAI,WACA,uBACA;AAAA,gBACN;AAAA;AAAA,cAEC,IAAI;AAAA,YACP;AAAA,UACF,CACD,CACL;AAAA,UACA,gBAAAA,OAAA,cAAC,cAAW,YAAY,MAAM,YAAY;AAAA,QAC5C;AAAA,IAEN;AAAA,EACF;AACF;","names":["React","forwardRef","React","React","React","React","forwardRef","React","_a"]}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
- import { O as OrientationType } from '../commonTypes-DinbCdmt.mjs';
3
+ import { O as OrientationType } from '../commonTypes-D_7LV7Ri.mjs';
4
4
 
5
5
  declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
6
6
  orientation?: OrientationType | undefined;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
- import { O as OrientationType } from '../commonTypes-DinbCdmt.js';
3
+ import { O as OrientationType } from '../commonTypes-D_7LV7Ri.js';
4
4
 
5
5
  declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
6
6
  orientation?: OrientationType | undefined;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { O as OrientationType } from '../commonTypes-DZdITB5m.mjs';
2
+ import { O as OrientationType } from '../commonTypes-DinbCdmt.mjs';
3
3
 
4
4
  type SeparatorProps = {
5
5
  className?: string;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { O as OrientationType } from '../commonTypes-DZdITB5m.js';
2
+ import { O as OrientationType } from '../commonTypes-DinbCdmt.js';
3
3
 
4
4
  type SeparatorProps = {
5
5
  className?: string;
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { FC } from 'react';
3
3
  import { SignaturePadOptions } from 'signature_pad';
4
-
5
- type PositionType = "top" | "bottom" | "right" | "left";
4
+ import { P as PositionType } from '../commonTypes-BtF87PmG.mjs';
6
5
 
7
6
  type LabelProps = {
8
7
  hint?: React.ReactNode;
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { FC } from 'react';
3
3
  import { SignaturePadOptions } from 'signature_pad';
4
-
5
- type PositionType = "top" | "bottom" | "right" | "left";
4
+ import { P as PositionType } from '../commonTypes-BtF87PmG.js';
6
5
 
7
6
  type LabelProps = {
8
7
  hint?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { RowData, ColumnDef } from '@tanstack/react-table';
3
- import { D as DirectionType } from '../commonTypes-DZdITB5m.mjs';
3
+ import { D as DirectionType } from '../commonTypes-BtF87PmG.mjs';
4
4
 
5
5
  type SimpleTableProps<DataProps = {}> = {
6
6
  direction?: DirectionType;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { RowData, ColumnDef } from '@tanstack/react-table';
3
- import { D as DirectionType } from '../commonTypes-DZdITB5m.js';
3
+ import { D as DirectionType } from '../commonTypes-BtF87PmG.js';
4
4
 
5
5
  type SimpleTableProps<DataProps = {}> = {
6
6
  direction?: DirectionType;
@@ -1,6 +1,6 @@
1
1
  import React__default from 'react';
2
2
  import { toast, Toaster } from 'sonner';
3
- import { D as DirectionType } from '../commonTypes-D23Z4zYt.mjs';
3
+ import { D as DirectionType } from '../commonTypes-189mW5eB.mjs';
4
4
 
5
5
  type SonnerProps = React__default.ComponentProps<typeof Toaster> & {
6
6
  direction?: DirectionType;
@@ -1,6 +1,6 @@
1
1
  import React__default from 'react';
2
2
  import { toast, Toaster } from 'sonner';
3
- import { D as DirectionType } from '../commonTypes-D23Z4zYt.js';
3
+ import { D as DirectionType } from '../commonTypes-189mW5eB.js';
4
4
 
5
5
  type SonnerProps = React__default.ComponentProps<typeof Toaster> & {
6
6
  direction?: DirectionType;
@@ -439,12 +439,12 @@ var Button = React5.forwardRef(
439
439
  children,
440
440
  labelProps,
441
441
  showHelperText = false,
442
- inForm = false,
442
+ asInput = false,
443
443
  ...props
444
444
  }, ref) => {
445
445
  const Comp = "button";
446
446
  const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
447
- if (inForm) {
447
+ if (asInput) {
448
448
  return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
449
449
  Comp,
450
450
  {