@sikka/hawa 0.39.0-next → 0.40.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 (194) 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 +2 -2
  22. package/dist/blocks/auth/index.mjs +4 -4
  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 +442 -450
  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-RTK6REIK.mjs → chunk-QZIENYTE.mjs} +1 -1
  51. package/dist/{chunk-EZBHA2IL.mjs → chunk-RT2Q3SH7.mjs} +1 -1
  52. package/dist/{chunk-W3CF7BSC.mjs → chunk-UBUVHGW4.mjs} +238 -248
  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 +546 -531
  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 +1020 -959
  118. package/dist/index.mjs +971 -912
  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/progress/index.d.mts +8 -1
  138. package/dist/progress/index.d.ts +8 -1
  139. package/dist/radio/index.d.mts +15 -1
  140. package/dist/radio/index.d.ts +15 -1
  141. package/dist/radio/index.js +160 -117
  142. package/dist/radio/index.js.map +1 -1
  143. package/dist/radio/index.mjs +160 -117
  144. package/dist/radio/index.mjs.map +1 -1
  145. package/dist/scrollArea/index.d.mts +1 -1
  146. package/dist/scrollArea/index.d.ts +1 -1
  147. package/dist/separator/index.d.mts +1 -1
  148. package/dist/separator/index.d.ts +1 -1
  149. package/dist/signature/index.d.mts +1 -2
  150. package/dist/signature/index.d.ts +1 -2
  151. package/dist/simpleTable/index.d.mts +1 -1
  152. package/dist/simpleTable/index.d.ts +1 -1
  153. package/dist/sonner/index.d.mts +1 -1
  154. package/dist/sonner/index.d.ts +1 -1
  155. package/dist/sortButton/index.js +2 -2
  156. package/dist/sortButton/index.js.map +1 -1
  157. package/dist/sortButton/index.mjs +2 -2
  158. package/dist/sortButton/index.mjs.map +1 -1
  159. package/dist/splitButton/index.d.mts +3 -9
  160. package/dist/splitButton/index.d.ts +3 -9
  161. package/dist/splitButton/index.js +2 -2
  162. package/dist/splitButton/index.js.map +1 -1
  163. package/dist/splitButton/index.mjs +2 -2
  164. package/dist/splitButton/index.mjs.map +1 -1
  165. package/dist/switch/index.d.mts +1 -1
  166. package/dist/switch/index.d.ts +1 -1
  167. package/dist/tabs/index.d.mts +4 -2
  168. package/dist/tabs/index.d.ts +4 -2
  169. package/dist/tabs/index.js +123 -174
  170. package/dist/tabs/index.js.map +1 -1
  171. package/dist/tabs/index.mjs +118 -169
  172. package/dist/tabs/index.mjs.map +1 -1
  173. package/dist/textarea/index.d.mts +1 -1
  174. package/dist/textarea/index.d.ts +1 -1
  175. package/dist/toast/index.d.mts +1 -1
  176. package/dist/toast/index.d.ts +1 -1
  177. package/dist/toaster/index.d.mts +4 -22
  178. package/dist/toaster/index.d.ts +4 -22
  179. package/dist/tooltip/index.d.mts +4 -3
  180. package/dist/tooltip/index.d.ts +4 -3
  181. package/package.json +1 -1
  182. package/dist/Label-UbMDLtJF.d.mts +0 -14
  183. package/dist/Label-UbMDLtJF.d.ts +0 -14
  184. package/dist/chunk-WDCKXU54.mjs +0 -303
  185. package/dist/commonTypes-CgDwjGvU.d.mts +0 -5
  186. package/dist/commonTypes-CgDwjGvU.d.ts +0 -5
  187. package/dist/commonTypes-DZdITB5m.d.mts +0 -4
  188. package/dist/commonTypes-DZdITB5m.d.ts +0 -4
  189. package/dist/floatBox/index.d.mts +0 -15
  190. package/dist/floatBox/index.d.ts +0 -15
  191. package/dist/floatBox/index.js +0 -105
  192. package/dist/floatBox/index.js.map +0 -1
  193. package/dist/floatBox/index.mjs +0 -69
  194. package/dist/floatBox/index.mjs.map +0 -1
@@ -0,0 +1,346 @@
1
+ "use client";
2
+ import {
3
+ HelperText,
4
+ Label,
5
+ cn
6
+ } from "./chunk-CTNKKP2O.mjs";
7
+
8
+ // elements/popover/Popover.tsx
9
+ import * as React from "react";
10
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
11
+ var PopoverContent = React.forwardRef(
12
+ ({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React.createElement(
13
+ PopoverPrimitive.Content,
14
+ {
15
+ ref,
16
+ align,
17
+ sideOffset,
18
+ className: cn(
19
+ "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",
20
+ className
21
+ ),
22
+ ...props
23
+ }
24
+ ))
25
+ );
26
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
27
+ var Popover = ({
28
+ trigger,
29
+ children,
30
+ className,
31
+ align = "center",
32
+ side,
33
+ sideOffset = 4,
34
+ open,
35
+ width = "default",
36
+ disableTrigger,
37
+ contentProps,
38
+ triggerProps,
39
+ ...props
40
+ }) => {
41
+ let widthStyles = {
42
+ trigger: "var(--radix-popover-trigger-width)",
43
+ default: "auto"
44
+ };
45
+ return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(
46
+ PopoverPrimitive.Trigger,
47
+ {
48
+ className: "hawa-w-full",
49
+ disabled: disableTrigger,
50
+ ...triggerProps
51
+ },
52
+ trigger
53
+ ), /* @__PURE__ */ React.createElement(
54
+ PopoverContent,
55
+ {
56
+ side,
57
+ className,
58
+ align,
59
+ sideOffset,
60
+ style: {
61
+ width: widthStyles[width],
62
+ maxWidth: "var(--radix-popover-content-available-width)",
63
+ maxHeight: "var(--radix-popover-content-available-height)"
64
+ },
65
+ ...contentProps
66
+ },
67
+ children
68
+ ));
69
+ };
70
+ var PopoverTrigger = PopoverPrimitive.Trigger;
71
+ var PopoverRoot = PopoverPrimitive.Root;
72
+
73
+ // elements/radio/Radio.tsx
74
+ import React2, { useState, useRef, useEffect, forwardRef as forwardRef2 } from "react";
75
+ var Radio = forwardRef2(
76
+ ({
77
+ design = "default",
78
+ width = "default",
79
+ size = "default",
80
+ orientation = "horizontal",
81
+ name,
82
+ labelProps,
83
+ tabsContainerClassName,
84
+ forceHideHelperText = false,
85
+ onChange,
86
+ containerClassNames,
87
+ ...props
88
+ }, ref) => {
89
+ var _a, _b, _c;
90
+ let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
91
+ let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white
92
+ ${props.disabled ? "" : "hover:hawa-bg-muted"}`;
93
+ let orientationStyle = {
94
+ horizontal: "hawa-flex hawa-flex-row",
95
+ vertical: "hawa-flex hawa-flex-col"
96
+ };
97
+ let tabSizeStyle = {
98
+ default: "hawa-py-2 hawa-px-4 hawa-text-sm",
99
+ lg: "hawa-py-2 hawa-px-4",
100
+ sm: "hawa-p-1.5 hawa-text-xs",
101
+ xs: "hawa-p-1 hawa-text-[10px]"
102
+ };
103
+ let widthStyle = {
104
+ none: "",
105
+ default: "hawa-max-w-fit",
106
+ full: "hawa-w-full"
107
+ };
108
+ const [parentDirection, setParentDirection] = React2.useState(
109
+ null
110
+ );
111
+ const [selectedOption, setSelectedOption] = useState(
112
+ props.defaultValue || props.value
113
+ );
114
+ const [openTooltip, setOpenTooltip] = useState(null);
115
+ const parentRef = useRef(null);
116
+ useEffect(() => {
117
+ var _a2;
118
+ const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
119
+ if (parentNode) {
120
+ const dir = window.getComputedStyle(parentNode).direction;
121
+ setParentDirection(dir);
122
+ }
123
+ });
124
+ const handleChange = (opt) => {
125
+ setSelectedOption(opt.value);
126
+ if (onChange) {
127
+ onChange(opt.value);
128
+ } else {
129
+ console.log("onChange was not provided");
130
+ }
131
+ };
132
+ const radio_option_tabs_styling = [
133
+ "hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
134
+ !props.disabled && "hawa-cursor-pointer",
135
+ orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
136
+ orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
137
+ orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
138
+ tabSizeStyle[size]
139
+ ];
140
+ switch (design) {
141
+ case "tabs":
142
+ return /* @__PURE__ */ React2.createElement(
143
+ "div",
144
+ {
145
+ className: cn(
146
+ "hawa-gap-2 hawa-flex hawa-flex-col",
147
+ containerClassNames == null ? void 0 : containerClassNames.tabs
148
+ )
149
+ },
150
+ props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label),
151
+ /* @__PURE__ */ React2.createElement(
152
+ "ul",
153
+ {
154
+ ref: parentRef,
155
+ className: cn(
156
+ props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
157
+ "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
158
+ orientationStyle[orientation],
159
+ widthStyle[width],
160
+ tabsContainerClassName
161
+ )
162
+ },
163
+ (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
164
+ return opt.tooltip ? /* @__PURE__ */ React2.createElement(
165
+ PopoverRoot,
166
+ {
167
+ key: o,
168
+ open: o === openTooltip,
169
+ onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
170
+ },
171
+ /* @__PURE__ */ React2.createElement(
172
+ PopoverTrigger,
173
+ {
174
+ onMouseEnter: () => setOpenTooltip(o),
175
+ onMouseLeave: () => setOpenTooltip(null),
176
+ asChild: true
177
+ },
178
+ /* @__PURE__ */ React2.createElement(
179
+ "li",
180
+ {
181
+ "aria-current": "page",
182
+ onClick: () => {
183
+ if (props.disabled || opt.disabled)
184
+ return;
185
+ handleChange(opt);
186
+ },
187
+ className: cn(
188
+ ...radio_option_tabs_styling,
189
+ selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
190
+ )
191
+ },
192
+ opt.icon && opt.icon,
193
+ opt.label
194
+ )
195
+ ),
196
+ /* @__PURE__ */ React2.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
197
+ ) : /* @__PURE__ */ React2.createElement(
198
+ "li",
199
+ {
200
+ key: o,
201
+ "aria-current": "page",
202
+ onClick: () => {
203
+ if (props.disabled || opt.disabled)
204
+ return;
205
+ handleChange(opt);
206
+ },
207
+ className: cn(
208
+ ...radio_option_tabs_styling,
209
+ selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
210
+ )
211
+ },
212
+ opt.icon && opt.icon,
213
+ opt.label
214
+ );
215
+ })
216
+ ),
217
+ !forceHideHelperText && /* @__PURE__ */ React2.createElement(HelperText, { helperText: props.helperText })
218
+ );
219
+ case "bordered":
220
+ return /* @__PURE__ */ React2.createElement(
221
+ "div",
222
+ {
223
+ className: cn(
224
+ orientationStyle[orientation],
225
+ "hawa-gap-4",
226
+ containerClassNames == null ? void 0 : containerClassNames.bordered
227
+ )
228
+ },
229
+ props.options && props.options.map((opt, i) => /* @__PURE__ */ React2.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ React2.createElement(
230
+ "div",
231
+ {
232
+ className: cn(
233
+ "radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all",
234
+ props.direction === "rtl" ? "margin-left right-19px" : "margin-right left-23px"
235
+ ),
236
+ key: i + 1
237
+ },
238
+ /* @__PURE__ */ React2.createElement(
239
+ "input",
240
+ {
241
+ disabled: opt.disabled,
242
+ id: opt.value.toString(),
243
+ type: "radio",
244
+ value: opt.value,
245
+ name,
246
+ onChange: () => handleChange(opt)
247
+ }
248
+ ),
249
+ /* @__PURE__ */ React2.createElement(
250
+ "label",
251
+ {
252
+ htmlFor: opt.value.toString(),
253
+ className: cn(
254
+ "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",
255
+ opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
256
+ )
257
+ },
258
+ opt.label
259
+ )
260
+ )))
261
+ );
262
+ case "cards":
263
+ return /* @__PURE__ */ React2.createElement(
264
+ "ul",
265
+ {
266
+ className: cn(
267
+ orientationStyle[orientation],
268
+ "hawa-gap-4",
269
+ containerClassNames == null ? void 0 : containerClassNames.cards
270
+ )
271
+ },
272
+ (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React2.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React2.createElement(
273
+ "input",
274
+ {
275
+ type: "radio",
276
+ id: opt.value.toString(),
277
+ name,
278
+ value: opt.value.toString(),
279
+ className: "hawa-peer hawa-hidden",
280
+ required: true,
281
+ disabled: opt.disabled
282
+ }
283
+ ), /* @__PURE__ */ React2.createElement(
284
+ "label",
285
+ {
286
+ htmlFor: opt.value.toString(),
287
+ className: cn(
288
+ "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",
289
+ 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"
290
+ )
291
+ },
292
+ /* @__PURE__ */ React2.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React2.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React2.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
293
+ )))
294
+ );
295
+ default:
296
+ return /* @__PURE__ */ React2.createElement(
297
+ "div",
298
+ {
299
+ className: cn(
300
+ "hawa-flex hawa-flex-col hawa-gap-2",
301
+ containerClassNames == null ? void 0 : containerClassNames.default
302
+ )
303
+ },
304
+ props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label),
305
+ /* @__PURE__ */ React2.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React2.createElement(
306
+ "div",
307
+ {
308
+ className: cn(
309
+ "radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
310
+ props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
311
+ ),
312
+ key: i + 1
313
+ },
314
+ /* @__PURE__ */ React2.createElement(
315
+ "input",
316
+ {
317
+ disabled: opt.disabled,
318
+ id: opt.value.toString(),
319
+ type: "radio",
320
+ value: opt.value,
321
+ name,
322
+ onChange: () => handleChange(opt)
323
+ }
324
+ ),
325
+ /* @__PURE__ */ React2.createElement(
326
+ "label",
327
+ {
328
+ htmlFor: opt.value.toString(),
329
+ className: cn(
330
+ "hawa-text-sm hawa-font-medium dark:hawa-text-white",
331
+ opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
332
+ )
333
+ },
334
+ opt.label
335
+ )
336
+ ))),
337
+ /* @__PURE__ */ React2.createElement(HelperText, { helperText: props.helperText })
338
+ );
339
+ }
340
+ }
341
+ );
342
+
343
+ export {
344
+ Popover,
345
+ Radio
346
+ };
@@ -4,7 +4,7 @@ import {
4
4
  Label,
5
5
  Skeleton,
6
6
  cn
7
- } from "./chunk-UMOBOCED.mjs";
7
+ } from "./chunk-CTNKKP2O.mjs";
8
8
 
9
9
  // elements/input/Input.tsx
10
10
  import React, { forwardRef } from "react";
@@ -4,7 +4,7 @@ import {
4
4
  Label,
5
5
  Skeleton,
6
6
  cn
7
- } from "./chunk-UMOBOCED.mjs";
7
+ } from "./chunk-CTNKKP2O.mjs";
8
8
 
9
9
  // elements/textarea/Textarea.tsx
10
10
  import * as React from "react";
@@ -420,12 +420,12 @@ var Button = React5.forwardRef(
420
420
  children,
421
421
  labelProps,
422
422
  showHelperText = false,
423
- inForm = false,
423
+ asInput = false,
424
424
  ...props
425
425
  }, ref) => {
426
426
  const Comp = "button";
427
427
  const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
428
- if (inForm) {
428
+ if (asInput) {
429
429
  return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React5.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React5.createElement(
430
430
  Comp,
431
431
  {
@@ -1499,14 +1499,37 @@ var DropdownMenu = ({
1499
1499
  );
1500
1500
  };
1501
1501
  var DropdownMenuRadio = (props) => {
1502
- return /* @__PURE__ */ React10.createElement(DropdownMenuRoot, null, /* @__PURE__ */ React10.createElement(DropdownMenuTrigger, { asChild: true }, props.trigger), /* @__PURE__ */ React10.createElement(DropdownMenuContent, { align: props.align, side: props.side }, props.label && /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(DropdownMenuLabel, null, props.label), /* @__PURE__ */ React10.createElement(DropdownMenuSeparator, null)), /* @__PURE__ */ React10.createElement(
1503
- DropdownMenuRadioGroup,
1502
+ const ariaLabel = props.label ? `${props.label} radio group` : void 0;
1503
+ const ariaLabelledby = props.label ? `${props.label}-label` : void 0;
1504
+ return /* @__PURE__ */ React10.createElement(DropdownMenuRoot, null, /* @__PURE__ */ React10.createElement(DropdownMenuTrigger, { asChild: true }, props.trigger), /* @__PURE__ */ React10.createElement(
1505
+ DropdownMenuContent,
1504
1506
  {
1505
- value: props.value,
1506
- onValueChange: props.onValueChange
1507
+ align: props.align,
1508
+ side: props.side,
1509
+ "aria-label": ariaLabel,
1510
+ "aria-labelledby": ariaLabelledby,
1511
+ ...props.contentProps
1507
1512
  },
1508
- props.options.map((opt, i) => /* @__PURE__ */ React10.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
1509
- )));
1513
+ props.label && /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(DropdownMenuLabel, { id: `${props.label}-label` }, props.label), /* @__PURE__ */ React10.createElement(DropdownMenuSeparator, null)),
1514
+ /* @__PURE__ */ React10.createElement(
1515
+ DropdownMenuRadioGroup,
1516
+ {
1517
+ value: props.value,
1518
+ onValueChange: props.onValueChange,
1519
+ ...props.radioGroupProps
1520
+ },
1521
+ props.options.map((opt, i) => /* @__PURE__ */ React10.createElement(
1522
+ DropdownMenuRadioItem,
1523
+ {
1524
+ key: i,
1525
+ ...opt.props,
1526
+ value: opt.value,
1527
+ "aria-checked": props.value === opt.value
1528
+ },
1529
+ opt.label
1530
+ ))
1531
+ )
1532
+ ));
1510
1533
  };
1511
1534
 
1512
1535
  // icons/Emojis.tsx
@@ -4,7 +4,7 @@ import {
4
4
  Label,
5
5
  Skeleton,
6
6
  cn
7
- } from "./chunk-UMOBOCED.mjs";
7
+ } from "./chunk-CTNKKP2O.mjs";
8
8
 
9
9
  // elements/select/Select.tsx
10
10
  import React from "react";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  cn
4
- } from "./chunk-UMOBOCED.mjs";
4
+ } from "./chunk-CTNKKP2O.mjs";
5
5
 
6
6
  // elements/scrollArea/ScrollArea.tsx
7
7
  import * as React from "react";