@sikka/hawa 0.34.8-next → 0.35.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.
- package/dist/{Radio-BpXOu4Hr.d.mts → Radio-BCD7k628.d.mts} +3 -0
- package/dist/{Radio-CREjhlGz.d.ts → Radio-y9uhxitu.d.ts} +3 -0
- package/dist/alert/index.js +28 -17
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +61 -50
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +81 -70
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +138 -127
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +28 -17
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +55 -44
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +50 -39
- package/dist/blocks/auth/index.mjs +5 -5
- package/dist/blocks/feedback/index.d.mts +3 -0
- package/dist/blocks/feedback/index.d.ts +3 -0
- package/dist/blocks/feedback/index.js +174 -120
- package/dist/blocks/feedback/index.mjs +29 -93
- package/dist/blocks/index.d.mts +2 -1
- package/dist/blocks/index.d.ts +2 -1
- package/dist/blocks/index.js +253 -201
- package/dist/blocks/index.mjs +3 -3
- package/dist/blocks/misc/index.js +71 -60
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +154 -80
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +13 -0
- package/dist/button/index.d.ts +13 -0
- package/dist/button/index.js +28 -17
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +51 -40
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +34 -23
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +57 -46
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/{chunk-GEB3LM5A.mjs → chunk-A376BKNX.mjs} +2 -2
- package/dist/{chunk-OS2UOK5C.mjs → chunk-DABX3SU6.mjs} +64 -51
- package/dist/{chunk-QPZ4ZR2B.mjs → chunk-DFWFQWWT.mjs} +155 -116
- package/dist/{chunk-UBNCETCU.mjs → chunk-GVZWOUGN.mjs} +1 -1
- package/dist/chunk-HHC34DXN.mjs +320 -0
- package/dist/{chunk-QVF3VLB7.mjs → chunk-IDKXEJET.mjs} +157 -144
- package/dist/{chunk-AW5FW5TY.mjs → chunk-L56XQRQI.mjs} +1 -1
- package/dist/{chunk-ORNLFAC6.mjs → chunk-XFRJ62W3.mjs} +1 -1
- package/dist/{chunk-RTGD7N7I.mjs → chunk-XJMDUR5A.mjs} +1 -1
- package/dist/{chunk-J7BT4XJR.mjs → chunk-YOT2GVXO.mjs} +1 -1
- package/dist/codeBlock/index.js +28 -17
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +70 -59
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/dataTable/index.d.mts +1 -2
- package/dist/dataTable/index.d.ts +1 -2
- package/dist/dataTable/index.js +144 -105
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +178 -139
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +23 -5
- package/dist/datePicker/index.d.ts +23 -5
- package/dist/datePicker/index.js +46 -18
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +46 -18
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +40 -29
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +135 -124
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +7 -3
- package/dist/elements/index.d.ts +7 -3
- package/dist/elements/index.js +475 -395
- package/dist/elements/index.mjs +32 -4
- package/dist/fileDropzone/index.js +28 -17
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +89 -78
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.d.mts +16 -9
- package/dist/index.d.ts +16 -9
- package/dist/index.js +515 -435
- package/dist/index.mjs +1204 -1124
- package/dist/input/index.js +1 -1
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +1 -1
- package/dist/input/index.mjs.map +1 -1
- package/dist/interfaceSettings/index.js +85 -24
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +107 -46
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/layout/index.js +121 -110
- package/dist/layout/index.mjs +2 -2
- package/dist/passwordInput/index.js +1 -1
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +1 -1
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/radio/index.d.mts +3 -0
- package/dist/radio/index.d.ts +3 -0
- package/dist/radio/index.js +85 -24
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +100 -39
- package/dist/radio/index.mjs.map +1 -1
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs.map +1 -1
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs.map +1 -1
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs.map +1 -1
- package/dist/sortButton/index.js +28 -17
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +58 -47
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +12 -0
- package/dist/splitButton/index.d.ts +12 -0
- package/dist/splitButton/index.js +70 -59
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +93 -82
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs.map +1 -1
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs.map +1 -1
- package/package.json +6 -6
- package/dist/chunk-IQEBXGLM.mjs +0 -215
@@ -36,7 +36,7 @@ __export(splitButton_exports, {
|
|
36
36
|
module.exports = __toCommonJS(splitButton_exports);
|
37
37
|
|
38
38
|
// elements/splitButton/SplitButton.tsx
|
39
|
-
var
|
39
|
+
var React7 = __toESM(require("react"));
|
40
40
|
|
41
41
|
// util/index.ts
|
42
42
|
var import_clsx = require("clsx");
|
@@ -46,14 +46,14 @@ function cn(...inputs) {
|
|
46
46
|
}
|
47
47
|
|
48
48
|
// elements/dropdownMenu/DropdownMenu.tsx
|
49
|
-
var
|
49
|
+
var React2 = __toESM(require("react"));
|
50
50
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
51
51
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
52
52
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
53
53
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
54
54
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
55
55
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
56
|
-
var DropdownMenuSubTrigger =
|
56
|
+
var DropdownMenuSubTrigger = React2.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
57
57
|
DropdownMenuPrimitive.SubTrigger,
|
58
58
|
{
|
59
59
|
ref,
|
@@ -64,9 +64,9 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
|
|
64
64
|
),
|
65
65
|
...props
|
66
66
|
},
|
67
|
-
/* @__PURE__ */
|
67
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
68
68
|
" ",
|
69
|
-
/* @__PURE__ */
|
69
|
+
/* @__PURE__ */ React2.createElement(
|
70
70
|
"svg",
|
71
71
|
{
|
72
72
|
"aria-label": "Chevron Right Icon",
|
@@ -78,7 +78,7 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
|
|
78
78
|
width: "1em",
|
79
79
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
80
80
|
},
|
81
|
-
/* @__PURE__ */
|
81
|
+
/* @__PURE__ */ React2.createElement(
|
82
82
|
"path",
|
83
83
|
{
|
84
84
|
fillRule: "evenodd",
|
@@ -88,7 +88,7 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
|
|
88
88
|
)
|
89
89
|
));
|
90
90
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
91
|
-
var DropdownMenuSubContent =
|
91
|
+
var DropdownMenuSubContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
92
92
|
DropdownMenuPrimitive.SubContent,
|
93
93
|
{
|
94
94
|
ref,
|
@@ -100,7 +100,7 @@ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =>
|
|
100
100
|
}
|
101
101
|
));
|
102
102
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
103
|
-
var DropdownMenuContent =
|
103
|
+
var DropdownMenuContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React2.createElement(
|
104
104
|
DropdownMenuPrimitive.Content,
|
105
105
|
{
|
106
106
|
ref,
|
@@ -113,8 +113,8 @@ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...prop
|
|
113
113
|
}
|
114
114
|
)));
|
115
115
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
116
|
-
var DropdownMenuItem =
|
117
|
-
return /* @__PURE__ */
|
116
|
+
var DropdownMenuItem = React2.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
117
|
+
return /* @__PURE__ */ React2.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React2.createElement(
|
118
118
|
DropdownMenuPrimitive.Item,
|
119
119
|
{
|
120
120
|
disabled: props.disabled,
|
@@ -127,14 +127,14 @@ var DropdownMenuItem = React.forwardRef(({ className, inset, badged, slug, LinkC
|
|
127
127
|
),
|
128
128
|
...props
|
129
129
|
},
|
130
|
-
/* @__PURE__ */
|
130
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
131
131
|
props.end && props.end,
|
132
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
133
|
-
!props.end && badged && /* @__PURE__ */
|
132
|
+
!props.end && props.shortcut && /* @__PURE__ */ React2.createElement(DropdownMenuShortcut, null, props.shortcut),
|
133
|
+
!props.end && badged && /* @__PURE__ */ React2.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
134
134
|
));
|
135
135
|
});
|
136
136
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
137
|
-
var DropdownMenuCheckboxItem =
|
137
|
+
var DropdownMenuCheckboxItem = React2.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
138
138
|
DropdownMenuPrimitive.CheckboxItem,
|
139
139
|
{
|
140
140
|
ref,
|
@@ -145,7 +145,7 @@ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked,
|
|
145
145
|
checked,
|
146
146
|
...props
|
147
147
|
},
|
148
|
-
/* @__PURE__ */
|
148
|
+
/* @__PURE__ */ React2.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React2.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React2.createElement(
|
149
149
|
"svg",
|
150
150
|
{
|
151
151
|
"aria-label": "Check Mark",
|
@@ -156,12 +156,12 @@ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked,
|
|
156
156
|
height: "0.60em",
|
157
157
|
width: "0.60em"
|
158
158
|
},
|
159
|
-
/* @__PURE__ */
|
159
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
|
160
160
|
), " ")),
|
161
161
|
children
|
162
162
|
));
|
163
163
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
164
|
-
var DropdownMenuRadioItem =
|
164
|
+
var DropdownMenuRadioItem = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
165
165
|
DropdownMenuPrimitive.RadioItem,
|
166
166
|
{
|
167
167
|
ref,
|
@@ -171,7 +171,7 @@ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props },
|
|
171
171
|
),
|
172
172
|
...props
|
173
173
|
},
|
174
|
-
/* @__PURE__ */
|
174
|
+
/* @__PURE__ */ React2.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React2.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React2.createElement(
|
175
175
|
"svg",
|
176
176
|
{
|
177
177
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -186,12 +186,12 @@ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props },
|
|
186
186
|
strokeLinejoin: "round",
|
187
187
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
188
188
|
},
|
189
|
-
/* @__PURE__ */
|
189
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
190
190
|
))),
|
191
191
|
children
|
192
192
|
));
|
193
193
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
194
|
-
var DropdownMenuLabel =
|
194
|
+
var DropdownMenuLabel = React2.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
195
195
|
DropdownMenuPrimitive.Label,
|
196
196
|
{
|
197
197
|
ref,
|
@@ -204,7 +204,7 @@ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) =
|
|
204
204
|
}
|
205
205
|
));
|
206
206
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
207
|
-
var DropdownMenuSeparator =
|
207
|
+
var DropdownMenuSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
208
208
|
DropdownMenuPrimitive.Separator,
|
209
209
|
{
|
210
210
|
ref,
|
@@ -217,7 +217,7 @@ var DropdownMenuShortcut = ({
|
|
217
217
|
className,
|
218
218
|
...props
|
219
219
|
}) => {
|
220
|
-
return /* @__PURE__ */
|
220
|
+
return /* @__PURE__ */ React2.createElement(
|
221
221
|
"span",
|
222
222
|
{
|
223
223
|
className: cn(
|
@@ -257,10 +257,10 @@ var DropdownMenu = ({
|
|
257
257
|
default: "hawa-px-2 hawa-py-3 ",
|
258
258
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
259
259
|
};
|
260
|
-
let [values, setValues] =
|
260
|
+
let [values, setValues] = React2.useState(
|
261
261
|
items.map((item) => item.currentOption)
|
262
262
|
);
|
263
|
-
return /* @__PURE__ */
|
263
|
+
return /* @__PURE__ */ React2.createElement(
|
264
264
|
DropdownMenuRoot,
|
265
265
|
{
|
266
266
|
onOpenChange,
|
@@ -268,8 +268,8 @@ var DropdownMenu = ({
|
|
268
268
|
modal: false,
|
269
269
|
dir: direction
|
270
270
|
},
|
271
|
-
/* @__PURE__ */
|
272
|
-
/* @__PURE__ */
|
271
|
+
/* @__PURE__ */ React2.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
272
|
+
/* @__PURE__ */ React2.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React2.createElement(
|
273
273
|
DropdownMenuContent,
|
274
274
|
{
|
275
275
|
side,
|
@@ -290,12 +290,12 @@ var DropdownMenu = ({
|
|
290
290
|
var _a;
|
291
291
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
292
292
|
if (item.itemType === "separator") {
|
293
|
-
return /* @__PURE__ */
|
293
|
+
return /* @__PURE__ */ React2.createElement(DropdownMenuSeparator, { key: index });
|
294
294
|
} else if (item.itemType === "label") {
|
295
|
-
return /* @__PURE__ */
|
295
|
+
return /* @__PURE__ */ React2.createElement(DropdownMenuLabel, { key: index }, item.label);
|
296
296
|
} else if (item.itemType === "radio") {
|
297
297
|
let dd = item.currentOption;
|
298
|
-
return /* @__PURE__ */
|
298
|
+
return /* @__PURE__ */ React2.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React2.createElement(
|
299
299
|
DropdownMenuSubTrigger,
|
300
300
|
{
|
301
301
|
dir: direction,
|
@@ -303,7 +303,7 @@ var DropdownMenu = ({
|
|
303
303
|
},
|
304
304
|
item.icon && item.icon,
|
305
305
|
item.label && item.label
|
306
|
-
), /* @__PURE__ */
|
306
|
+
), /* @__PURE__ */ React2.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React2.createElement(
|
307
307
|
DropdownMenuRadioGroup,
|
308
308
|
{
|
309
309
|
value: values[index],
|
@@ -317,12 +317,12 @@ var DropdownMenu = ({
|
|
317
317
|
}
|
318
318
|
}
|
319
319
|
},
|
320
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
320
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React2.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
321
321
|
)));
|
322
322
|
} else if (item.itemType === "custom") {
|
323
|
-
return /* @__PURE__ */
|
323
|
+
return /* @__PURE__ */ React2.createElement("div", { key: index }, item.content);
|
324
324
|
} else {
|
325
|
-
return item.subitems ? /* @__PURE__ */
|
325
|
+
return item.subitems ? /* @__PURE__ */ React2.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React2.createElement(
|
326
326
|
DropdownMenuSubTrigger,
|
327
327
|
{
|
328
328
|
dir: direction,
|
@@ -330,9 +330,9 @@ var DropdownMenu = ({
|
|
330
330
|
},
|
331
331
|
item.icon && item.icon,
|
332
332
|
item.label && item.label
|
333
|
-
), /* @__PURE__ */
|
333
|
+
), /* @__PURE__ */ React2.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React2.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
334
334
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
335
|
-
return /* @__PURE__ */
|
335
|
+
return /* @__PURE__ */ React2.createElement(
|
336
336
|
DropdownMenuItem,
|
337
337
|
{
|
338
338
|
key: subIndex,
|
@@ -361,7 +361,7 @@ var DropdownMenu = ({
|
|
361
361
|
subitem.icon && subitem.icon,
|
362
362
|
subitem.label && subitem.label
|
363
363
|
);
|
364
|
-
})))) : /* @__PURE__ */
|
364
|
+
})))) : /* @__PURE__ */ React2.createElement(
|
365
365
|
DropdownMenuItem,
|
366
366
|
{
|
367
367
|
LinkComponent: ItemLinkComponent,
|
@@ -415,11 +415,23 @@ var DropdownMenu = ({
|
|
415
415
|
};
|
416
416
|
|
417
417
|
// elements/button/Button.tsx
|
418
|
-
var
|
418
|
+
var React6 = __toESM(require("react"));
|
419
419
|
var import_class_variance_authority = require("class-variance-authority");
|
420
420
|
|
421
|
+
// elements/helperText/HelperText.tsx
|
422
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
|
423
|
+
"p",
|
424
|
+
{
|
425
|
+
className: cn(
|
426
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
427
|
+
helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
428
|
+
)
|
429
|
+
},
|
430
|
+
helperText
|
431
|
+
);
|
432
|
+
|
421
433
|
// elements/label/Label.tsx
|
422
|
-
var
|
434
|
+
var React4 = __toESM(require("react"));
|
423
435
|
|
424
436
|
// elements/tooltip/Tooltip.tsx
|
425
437
|
var import_react = __toESM(require("react"));
|
@@ -493,7 +505,7 @@ var Tooltip = ({
|
|
493
505
|
};
|
494
506
|
|
495
507
|
// elements/label/Label.tsx
|
496
|
-
var Label2 =
|
508
|
+
var Label2 = React4.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React4.createElement(
|
497
509
|
"label",
|
498
510
|
{
|
499
511
|
ref,
|
@@ -504,8 +516,8 @@ var Label2 = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
504
516
|
...props
|
505
517
|
},
|
506
518
|
children,
|
507
|
-
required && /* @__PURE__ */
|
508
|
-
), hint && /* @__PURE__ */
|
519
|
+
required && /* @__PURE__ */ React4.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
520
|
+
), hint && /* @__PURE__ */ React4.createElement(
|
509
521
|
Tooltip,
|
510
522
|
{
|
511
523
|
content: hint,
|
@@ -515,7 +527,7 @@ var Label2 = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
515
527
|
onClick: (event) => event.preventDefault()
|
516
528
|
}
|
517
529
|
},
|
518
|
-
/* @__PURE__ */
|
530
|
+
/* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.createElement(
|
519
531
|
"svg",
|
520
532
|
{
|
521
533
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -527,9 +539,9 @@ var Label2 = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
527
539
|
strokeLinecap: "round",
|
528
540
|
strokeLinejoin: "round"
|
529
541
|
},
|
530
|
-
/* @__PURE__ */
|
531
|
-
/* @__PURE__ */
|
532
|
-
/* @__PURE__ */
|
542
|
+
/* @__PURE__ */ React4.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
543
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
544
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M12 17h.01" })
|
533
545
|
))
|
534
546
|
)));
|
535
547
|
Label2.displayName = "Label";
|
@@ -780,13 +792,10 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
780
792
|
smallIcon: "hawa-h-7 hawa-w-7"
|
781
793
|
}
|
782
794
|
},
|
783
|
-
defaultVariants: {
|
784
|
-
variant: "default",
|
785
|
-
size: "default"
|
786
|
-
}
|
795
|
+
defaultVariants: { variant: "default", size: "default" }
|
787
796
|
}
|
788
797
|
);
|
789
|
-
var Button =
|
798
|
+
var Button = React6.forwardRef(
|
790
799
|
({
|
791
800
|
className,
|
792
801
|
label,
|
@@ -796,11 +805,13 @@ var Button = React5.forwardRef(
|
|
796
805
|
centered = true,
|
797
806
|
isLoading,
|
798
807
|
children,
|
808
|
+
labelProps,
|
809
|
+
showHelperText = false,
|
799
810
|
...props
|
800
811
|
}, ref) => {
|
801
812
|
const Comp = "button";
|
802
813
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
803
|
-
return /* @__PURE__ */
|
814
|
+
return /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React6.createElement(Label2, { ...labelProps }, label), /* @__PURE__ */ React6.createElement(
|
804
815
|
Comp,
|
805
816
|
{
|
806
817
|
className: cn(
|
@@ -810,7 +821,7 @@ var Button = React5.forwardRef(
|
|
810
821
|
ref,
|
811
822
|
...props
|
812
823
|
},
|
813
|
-
isLoading ? /* @__PURE__ */
|
824
|
+
isLoading ? /* @__PURE__ */ React6.createElement(
|
814
825
|
Loading,
|
815
826
|
{
|
816
827
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -819,7 +830,7 @@ var Button = React5.forwardRef(
|
|
819
830
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
820
831
|
}
|
821
832
|
) : children
|
822
|
-
));
|
833
|
+
), showHelperText && /* @__PURE__ */ React6.createElement(HelperText, { helperText: props.helperText }));
|
823
834
|
}
|
824
835
|
);
|
825
836
|
Button.displayName = "Button";
|
@@ -831,13 +842,13 @@ var SplitButton = ({
|
|
831
842
|
menuItems = [],
|
832
843
|
children,
|
833
844
|
...props
|
834
|
-
}) => /* @__PURE__ */
|
845
|
+
}) => /* @__PURE__ */ React7.createElement(
|
835
846
|
"div",
|
836
847
|
{
|
837
848
|
dir: "ltr",
|
838
849
|
className: cn("hawa-row hawa-flex hawa-h-fit hawa-justify-center")
|
839
850
|
},
|
840
|
-
/* @__PURE__ */
|
851
|
+
/* @__PURE__ */ React7.createElement(
|
841
852
|
Button,
|
842
853
|
{
|
843
854
|
variant,
|
@@ -846,7 +857,7 @@ var SplitButton = ({
|
|
846
857
|
},
|
847
858
|
children
|
848
859
|
),
|
849
|
-
/* @__PURE__ */
|
860
|
+
/* @__PURE__ */ React7.createElement(
|
850
861
|
DropdownMenu,
|
851
862
|
{
|
852
863
|
size: "sm",
|
@@ -854,7 +865,7 @@ var SplitButton = ({
|
|
854
865
|
direction,
|
855
866
|
align: direction === "rtl" ? "start" : "end",
|
856
867
|
items: menuItems,
|
857
|
-
trigger: /* @__PURE__ */
|
868
|
+
trigger: /* @__PURE__ */ React7.createElement(
|
858
869
|
Button,
|
859
870
|
{
|
860
871
|
asChild: true,
|
@@ -865,7 +876,7 @@ var SplitButton = ({
|
|
865
876
|
props.className
|
866
877
|
)
|
867
878
|
},
|
868
|
-
/* @__PURE__ */
|
879
|
+
/* @__PURE__ */ React7.createElement(
|
869
880
|
"svg",
|
870
881
|
{
|
871
882
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -878,7 +889,7 @@ var SplitButton = ({
|
|
878
889
|
strokeLinecap: "round",
|
879
890
|
strokeLinejoin: "round"
|
880
891
|
},
|
881
|
-
/* @__PURE__ */
|
892
|
+
/* @__PURE__ */ React7.createElement("path", { d: "m6 9 6 6 6-6" })
|
882
893
|
)
|
883
894
|
)
|
884
895
|
}
|