@sikka/hawa 0.34.8-next → 0.35.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.
- 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 +41 -5
- package/dist/datePicker/index.d.ts +41 -5
- package/dist/datePicker/index.js +48 -17
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +48 -17
- 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
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
3
|
// elements/splitButton/SplitButton.tsx
|
4
|
-
import * as
|
4
|
+
import * as React7 from "react";
|
5
5
|
|
6
6
|
// util/index.ts
|
7
7
|
import { clsx } from "clsx";
|
@@ -11,14 +11,14 @@ function cn(...inputs) {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
// elements/dropdownMenu/DropdownMenu.tsx
|
14
|
-
import * as
|
14
|
+
import * as React2 from "react";
|
15
15
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
16
16
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
17
17
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
18
18
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
19
19
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
20
20
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
21
|
-
var DropdownMenuSubTrigger =
|
21
|
+
var DropdownMenuSubTrigger = React2.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
22
22
|
DropdownMenuPrimitive.SubTrigger,
|
23
23
|
{
|
24
24
|
ref,
|
@@ -29,9 +29,9 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
|
|
29
29
|
),
|
30
30
|
...props
|
31
31
|
},
|
32
|
-
/* @__PURE__ */
|
32
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
33
33
|
" ",
|
34
|
-
/* @__PURE__ */
|
34
|
+
/* @__PURE__ */ React2.createElement(
|
35
35
|
"svg",
|
36
36
|
{
|
37
37
|
"aria-label": "Chevron Right Icon",
|
@@ -43,7 +43,7 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
|
|
43
43
|
width: "1em",
|
44
44
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
45
45
|
},
|
46
|
-
/* @__PURE__ */
|
46
|
+
/* @__PURE__ */ React2.createElement(
|
47
47
|
"path",
|
48
48
|
{
|
49
49
|
fillRule: "evenodd",
|
@@ -53,7 +53,7 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
|
|
53
53
|
)
|
54
54
|
));
|
55
55
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
56
|
-
var DropdownMenuSubContent =
|
56
|
+
var DropdownMenuSubContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
57
57
|
DropdownMenuPrimitive.SubContent,
|
58
58
|
{
|
59
59
|
ref,
|
@@ -65,7 +65,7 @@ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =>
|
|
65
65
|
}
|
66
66
|
));
|
67
67
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
68
|
-
var DropdownMenuContent =
|
68
|
+
var DropdownMenuContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React2.createElement(
|
69
69
|
DropdownMenuPrimitive.Content,
|
70
70
|
{
|
71
71
|
ref,
|
@@ -78,8 +78,8 @@ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...prop
|
|
78
78
|
}
|
79
79
|
)));
|
80
80
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
81
|
-
var DropdownMenuItem =
|
82
|
-
return /* @__PURE__ */
|
81
|
+
var DropdownMenuItem = React2.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
82
|
+
return /* @__PURE__ */ React2.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React2.createElement(
|
83
83
|
DropdownMenuPrimitive.Item,
|
84
84
|
{
|
85
85
|
disabled: props.disabled,
|
@@ -92,14 +92,14 @@ var DropdownMenuItem = React.forwardRef(({ className, inset, badged, slug, LinkC
|
|
92
92
|
),
|
93
93
|
...props
|
94
94
|
},
|
95
|
-
/* @__PURE__ */
|
95
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
96
96
|
props.end && props.end,
|
97
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
98
|
-
!props.end && badged && /* @__PURE__ */
|
97
|
+
!props.end && props.shortcut && /* @__PURE__ */ React2.createElement(DropdownMenuShortcut, null, props.shortcut),
|
98
|
+
!props.end && badged && /* @__PURE__ */ React2.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
99
99
|
));
|
100
100
|
});
|
101
101
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
102
|
-
var DropdownMenuCheckboxItem =
|
102
|
+
var DropdownMenuCheckboxItem = React2.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
103
103
|
DropdownMenuPrimitive.CheckboxItem,
|
104
104
|
{
|
105
105
|
ref,
|
@@ -110,7 +110,7 @@ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked,
|
|
110
110
|
checked,
|
111
111
|
...props
|
112
112
|
},
|
113
|
-
/* @__PURE__ */
|
113
|
+
/* @__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(
|
114
114
|
"svg",
|
115
115
|
{
|
116
116
|
"aria-label": "Check Mark",
|
@@ -121,12 +121,12 @@ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked,
|
|
121
121
|
height: "0.60em",
|
122
122
|
width: "0.60em"
|
123
123
|
},
|
124
|
-
/* @__PURE__ */
|
124
|
+
/* @__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" })
|
125
125
|
), " ")),
|
126
126
|
children
|
127
127
|
));
|
128
128
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
129
|
-
var DropdownMenuRadioItem =
|
129
|
+
var DropdownMenuRadioItem = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
130
130
|
DropdownMenuPrimitive.RadioItem,
|
131
131
|
{
|
132
132
|
ref,
|
@@ -136,7 +136,7 @@ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props },
|
|
136
136
|
),
|
137
137
|
...props
|
138
138
|
},
|
139
|
-
/* @__PURE__ */
|
139
|
+
/* @__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(
|
140
140
|
"svg",
|
141
141
|
{
|
142
142
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -151,12 +151,12 @@ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props },
|
|
151
151
|
strokeLinejoin: "round",
|
152
152
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
153
153
|
},
|
154
|
-
/* @__PURE__ */
|
154
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
155
155
|
))),
|
156
156
|
children
|
157
157
|
));
|
158
158
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
159
|
-
var DropdownMenuLabel =
|
159
|
+
var DropdownMenuLabel = React2.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
160
160
|
DropdownMenuPrimitive.Label,
|
161
161
|
{
|
162
162
|
ref,
|
@@ -169,7 +169,7 @@ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) =
|
|
169
169
|
}
|
170
170
|
));
|
171
171
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
172
|
-
var DropdownMenuSeparator =
|
172
|
+
var DropdownMenuSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
173
173
|
DropdownMenuPrimitive.Separator,
|
174
174
|
{
|
175
175
|
ref,
|
@@ -182,7 +182,7 @@ var DropdownMenuShortcut = ({
|
|
182
182
|
className,
|
183
183
|
...props
|
184
184
|
}) => {
|
185
|
-
return /* @__PURE__ */
|
185
|
+
return /* @__PURE__ */ React2.createElement(
|
186
186
|
"span",
|
187
187
|
{
|
188
188
|
className: cn(
|
@@ -222,10 +222,10 @@ var DropdownMenu = ({
|
|
222
222
|
default: "hawa-px-2 hawa-py-3 ",
|
223
223
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
224
224
|
};
|
225
|
-
let [values, setValues] =
|
225
|
+
let [values, setValues] = React2.useState(
|
226
226
|
items.map((item) => item.currentOption)
|
227
227
|
);
|
228
|
-
return /* @__PURE__ */
|
228
|
+
return /* @__PURE__ */ React2.createElement(
|
229
229
|
DropdownMenuRoot,
|
230
230
|
{
|
231
231
|
onOpenChange,
|
@@ -233,8 +233,8 @@ var DropdownMenu = ({
|
|
233
233
|
modal: false,
|
234
234
|
dir: direction
|
235
235
|
},
|
236
|
-
/* @__PURE__ */
|
237
|
-
/* @__PURE__ */
|
236
|
+
/* @__PURE__ */ React2.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
237
|
+
/* @__PURE__ */ React2.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React2.createElement(
|
238
238
|
DropdownMenuContent,
|
239
239
|
{
|
240
240
|
side,
|
@@ -255,12 +255,12 @@ var DropdownMenu = ({
|
|
255
255
|
var _a;
|
256
256
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
257
257
|
if (item.itemType === "separator") {
|
258
|
-
return /* @__PURE__ */
|
258
|
+
return /* @__PURE__ */ React2.createElement(DropdownMenuSeparator, { key: index });
|
259
259
|
} else if (item.itemType === "label") {
|
260
|
-
return /* @__PURE__ */
|
260
|
+
return /* @__PURE__ */ React2.createElement(DropdownMenuLabel, { key: index }, item.label);
|
261
261
|
} else if (item.itemType === "radio") {
|
262
262
|
let dd = item.currentOption;
|
263
|
-
return /* @__PURE__ */
|
263
|
+
return /* @__PURE__ */ React2.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React2.createElement(
|
264
264
|
DropdownMenuSubTrigger,
|
265
265
|
{
|
266
266
|
dir: direction,
|
@@ -268,7 +268,7 @@ var DropdownMenu = ({
|
|
268
268
|
},
|
269
269
|
item.icon && item.icon,
|
270
270
|
item.label && item.label
|
271
|
-
), /* @__PURE__ */
|
271
|
+
), /* @__PURE__ */ React2.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React2.createElement(
|
272
272
|
DropdownMenuRadioGroup,
|
273
273
|
{
|
274
274
|
value: values[index],
|
@@ -282,12 +282,12 @@ var DropdownMenu = ({
|
|
282
282
|
}
|
283
283
|
}
|
284
284
|
},
|
285
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
285
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React2.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
286
286
|
)));
|
287
287
|
} else if (item.itemType === "custom") {
|
288
|
-
return /* @__PURE__ */
|
288
|
+
return /* @__PURE__ */ React2.createElement("div", { key: index }, item.content);
|
289
289
|
} else {
|
290
|
-
return item.subitems ? /* @__PURE__ */
|
290
|
+
return item.subitems ? /* @__PURE__ */ React2.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React2.createElement(
|
291
291
|
DropdownMenuSubTrigger,
|
292
292
|
{
|
293
293
|
dir: direction,
|
@@ -295,9 +295,9 @@ var DropdownMenu = ({
|
|
295
295
|
},
|
296
296
|
item.icon && item.icon,
|
297
297
|
item.label && item.label
|
298
|
-
), /* @__PURE__ */
|
298
|
+
), /* @__PURE__ */ React2.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React2.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
299
299
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
300
|
-
return /* @__PURE__ */
|
300
|
+
return /* @__PURE__ */ React2.createElement(
|
301
301
|
DropdownMenuItem,
|
302
302
|
{
|
303
303
|
key: subIndex,
|
@@ -326,7 +326,7 @@ var DropdownMenu = ({
|
|
326
326
|
subitem.icon && subitem.icon,
|
327
327
|
subitem.label && subitem.label
|
328
328
|
);
|
329
|
-
})))) : /* @__PURE__ */
|
329
|
+
})))) : /* @__PURE__ */ React2.createElement(
|
330
330
|
DropdownMenuItem,
|
331
331
|
{
|
332
332
|
LinkComponent: ItemLinkComponent,
|
@@ -380,16 +380,28 @@ var DropdownMenu = ({
|
|
380
380
|
};
|
381
381
|
|
382
382
|
// elements/button/Button.tsx
|
383
|
-
import * as
|
383
|
+
import * as React6 from "react";
|
384
384
|
import { cva } from "class-variance-authority";
|
385
385
|
|
386
|
+
// elements/helperText/HelperText.tsx
|
387
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
|
388
|
+
"p",
|
389
|
+
{
|
390
|
+
className: cn(
|
391
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
392
|
+
helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
393
|
+
)
|
394
|
+
},
|
395
|
+
helperText
|
396
|
+
);
|
397
|
+
|
386
398
|
// elements/label/Label.tsx
|
387
|
-
import * as
|
399
|
+
import * as React4 from "react";
|
388
400
|
|
389
401
|
// elements/tooltip/Tooltip.tsx
|
390
|
-
import
|
402
|
+
import React3 from "react";
|
391
403
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
392
|
-
var TooltipContent =
|
404
|
+
var TooltipContent = React3.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
393
405
|
TooltipPrimitive.Content,
|
394
406
|
{
|
395
407
|
ref,
|
@@ -406,7 +418,7 @@ var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, size = "def
|
|
406
418
|
}
|
407
419
|
));
|
408
420
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
409
|
-
var TooltipArrow =
|
421
|
+
var TooltipArrow = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
410
422
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
411
423
|
var Tooltip = ({
|
412
424
|
side,
|
@@ -423,13 +435,13 @@ var Tooltip = ({
|
|
423
435
|
delayDuration = 300,
|
424
436
|
...props
|
425
437
|
}) => {
|
426
|
-
return /* @__PURE__ */
|
438
|
+
return /* @__PURE__ */ React3.createElement(
|
427
439
|
TooltipPrimitive.TooltipProvider,
|
428
440
|
{
|
429
441
|
delayDuration,
|
430
442
|
...providerProps
|
431
443
|
},
|
432
|
-
/* @__PURE__ */
|
444
|
+
/* @__PURE__ */ React3.createElement(
|
433
445
|
TooltipPrimitive.Root,
|
434
446
|
{
|
435
447
|
open: !disabled && open,
|
@@ -437,8 +449,8 @@ var Tooltip = ({
|
|
437
449
|
onOpenChange,
|
438
450
|
...props
|
439
451
|
},
|
440
|
-
/* @__PURE__ */
|
441
|
-
/* @__PURE__ */
|
452
|
+
/* @__PURE__ */ React3.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
453
|
+
/* @__PURE__ */ React3.createElement(
|
442
454
|
TooltipContent,
|
443
455
|
{
|
444
456
|
size,
|
@@ -458,7 +470,7 @@ var Tooltip = ({
|
|
458
470
|
};
|
459
471
|
|
460
472
|
// elements/label/Label.tsx
|
461
|
-
var Label2 =
|
473
|
+
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(
|
462
474
|
"label",
|
463
475
|
{
|
464
476
|
ref,
|
@@ -469,8 +481,8 @@ var Label2 = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
469
481
|
...props
|
470
482
|
},
|
471
483
|
children,
|
472
|
-
required && /* @__PURE__ */
|
473
|
-
), hint && /* @__PURE__ */
|
484
|
+
required && /* @__PURE__ */ React4.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
485
|
+
), hint && /* @__PURE__ */ React4.createElement(
|
474
486
|
Tooltip,
|
475
487
|
{
|
476
488
|
content: hint,
|
@@ -480,7 +492,7 @@ var Label2 = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
480
492
|
onClick: (event) => event.preventDefault()
|
481
493
|
}
|
482
494
|
},
|
483
|
-
/* @__PURE__ */
|
495
|
+
/* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.createElement(
|
484
496
|
"svg",
|
485
497
|
{
|
486
498
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -492,15 +504,15 @@ var Label2 = React3.forwardRef(({ className, hint, hintSide, required, children,
|
|
492
504
|
strokeLinecap: "round",
|
493
505
|
strokeLinejoin: "round"
|
494
506
|
},
|
495
|
-
/* @__PURE__ */
|
496
|
-
/* @__PURE__ */
|
497
|
-
/* @__PURE__ */
|
507
|
+
/* @__PURE__ */ React4.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
508
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
509
|
+
/* @__PURE__ */ React4.createElement("path", { d: "M12 17h.01" })
|
498
510
|
))
|
499
511
|
)));
|
500
512
|
Label2.displayName = "Label";
|
501
513
|
|
502
514
|
// elements/loading/Loading.tsx
|
503
|
-
import
|
515
|
+
import React5 from "react";
|
504
516
|
var Loading = ({
|
505
517
|
design = "spinner",
|
506
518
|
size = "normal",
|
@@ -531,7 +543,7 @@ var Loading = ({
|
|
531
543
|
};
|
532
544
|
switch (design.split("-")[0]) {
|
533
545
|
case "dots":
|
534
|
-
return /* @__PURE__ */
|
546
|
+
return /* @__PURE__ */ React5.createElement(
|
535
547
|
"div",
|
536
548
|
{
|
537
549
|
className: cn(
|
@@ -539,7 +551,7 @@ var Loading = ({
|
|
539
551
|
classNames == null ? void 0 : classNames.container
|
540
552
|
)
|
541
553
|
},
|
542
|
-
/* @__PURE__ */
|
554
|
+
/* @__PURE__ */ React5.createElement(
|
543
555
|
"div",
|
544
556
|
{
|
545
557
|
className: cn(
|
@@ -550,7 +562,7 @@ var Loading = ({
|
|
550
562
|
)
|
551
563
|
}
|
552
564
|
),
|
553
|
-
/* @__PURE__ */
|
565
|
+
/* @__PURE__ */ React5.createElement(
|
554
566
|
"div",
|
555
567
|
{
|
556
568
|
className: cn(
|
@@ -561,7 +573,7 @@ var Loading = ({
|
|
561
573
|
)
|
562
574
|
}
|
563
575
|
),
|
564
|
-
/* @__PURE__ */
|
576
|
+
/* @__PURE__ */ React5.createElement(
|
565
577
|
"div",
|
566
578
|
{
|
567
579
|
className: cn(
|
@@ -574,7 +586,7 @@ var Loading = ({
|
|
574
586
|
)
|
575
587
|
);
|
576
588
|
case "square":
|
577
|
-
return /* @__PURE__ */
|
589
|
+
return /* @__PURE__ */ React5.createElement(
|
578
590
|
"svg",
|
579
591
|
{
|
580
592
|
className: cn(
|
@@ -586,7 +598,7 @@ var Loading = ({
|
|
586
598
|
height: "35",
|
587
599
|
width: "35"
|
588
600
|
},
|
589
|
-
/* @__PURE__ */
|
601
|
+
/* @__PURE__ */ React5.createElement(
|
590
602
|
"rect",
|
591
603
|
{
|
592
604
|
className: "squircle-track",
|
@@ -598,7 +610,7 @@ var Loading = ({
|
|
598
610
|
height: "32.5"
|
599
611
|
}
|
600
612
|
),
|
601
|
-
/* @__PURE__ */
|
613
|
+
/* @__PURE__ */ React5.createElement(
|
602
614
|
"rect",
|
603
615
|
{
|
604
616
|
className: "square-car",
|
@@ -613,7 +625,7 @@ var Loading = ({
|
|
613
625
|
)
|
614
626
|
);
|
615
627
|
case "squircle":
|
616
|
-
return /* @__PURE__ */
|
628
|
+
return /* @__PURE__ */ React5.createElement(
|
617
629
|
"svg",
|
618
630
|
{
|
619
631
|
x: "0px",
|
@@ -628,7 +640,7 @@ var Loading = ({
|
|
628
640
|
classNames == null ? void 0 : classNames.container
|
629
641
|
)
|
630
642
|
},
|
631
|
-
/* @__PURE__ */
|
643
|
+
/* @__PURE__ */ React5.createElement(
|
632
644
|
"path",
|
633
645
|
{
|
634
646
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -638,7 +650,7 @@ var Loading = ({
|
|
638
650
|
d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
|
639
651
|
}
|
640
652
|
),
|
641
|
-
/* @__PURE__ */
|
653
|
+
/* @__PURE__ */ React5.createElement(
|
642
654
|
"path",
|
643
655
|
{
|
644
656
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -650,7 +662,7 @@ var Loading = ({
|
|
650
662
|
)
|
651
663
|
);
|
652
664
|
case "progress":
|
653
|
-
return /* @__PURE__ */
|
665
|
+
return /* @__PURE__ */ React5.createElement(
|
654
666
|
"div",
|
655
667
|
{
|
656
668
|
className: cn(
|
@@ -661,9 +673,9 @@ var Loading = ({
|
|
661
673
|
}
|
662
674
|
);
|
663
675
|
case "orbit":
|
664
|
-
return /* @__PURE__ */
|
676
|
+
return /* @__PURE__ */ React5.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
665
677
|
default:
|
666
|
-
return /* @__PURE__ */
|
678
|
+
return /* @__PURE__ */ React5.createElement(
|
667
679
|
"svg",
|
668
680
|
{
|
669
681
|
viewBox: "0 0 40 40",
|
@@ -675,7 +687,7 @@ var Loading = ({
|
|
675
687
|
classNames == null ? void 0 : classNames.container
|
676
688
|
)
|
677
689
|
},
|
678
|
-
/* @__PURE__ */
|
690
|
+
/* @__PURE__ */ React5.createElement(
|
679
691
|
"circle",
|
680
692
|
{
|
681
693
|
className: cn(
|
@@ -694,7 +706,7 @@ var Loading = ({
|
|
694
706
|
pathLength: "100"
|
695
707
|
}
|
696
708
|
),
|
697
|
-
/* @__PURE__ */
|
709
|
+
/* @__PURE__ */ React5.createElement(
|
698
710
|
"circle",
|
699
711
|
{
|
700
712
|
className: cn(
|
@@ -745,13 +757,10 @@ var buttonVariants = cva(
|
|
745
757
|
smallIcon: "hawa-h-7 hawa-w-7"
|
746
758
|
}
|
747
759
|
},
|
748
|
-
defaultVariants: {
|
749
|
-
variant: "default",
|
750
|
-
size: "default"
|
751
|
-
}
|
760
|
+
defaultVariants: { variant: "default", size: "default" }
|
752
761
|
}
|
753
762
|
);
|
754
|
-
var Button =
|
763
|
+
var Button = React6.forwardRef(
|
755
764
|
({
|
756
765
|
className,
|
757
766
|
label,
|
@@ -761,11 +770,13 @@ var Button = React5.forwardRef(
|
|
761
770
|
centered = true,
|
762
771
|
isLoading,
|
763
772
|
children,
|
773
|
+
labelProps,
|
774
|
+
showHelperText = false,
|
764
775
|
...props
|
765
776
|
}, ref) => {
|
766
777
|
const Comp = "button";
|
767
778
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
768
|
-
return /* @__PURE__ */
|
779
|
+
return /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React6.createElement(Label2, { ...labelProps }, label), /* @__PURE__ */ React6.createElement(
|
769
780
|
Comp,
|
770
781
|
{
|
771
782
|
className: cn(
|
@@ -775,7 +786,7 @@ var Button = React5.forwardRef(
|
|
775
786
|
ref,
|
776
787
|
...props
|
777
788
|
},
|
778
|
-
isLoading ? /* @__PURE__ */
|
789
|
+
isLoading ? /* @__PURE__ */ React6.createElement(
|
779
790
|
Loading,
|
780
791
|
{
|
781
792
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -784,7 +795,7 @@ var Button = React5.forwardRef(
|
|
784
795
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
785
796
|
}
|
786
797
|
) : children
|
787
|
-
));
|
798
|
+
), showHelperText && /* @__PURE__ */ React6.createElement(HelperText, { helperText: props.helperText }));
|
788
799
|
}
|
789
800
|
);
|
790
801
|
Button.displayName = "Button";
|
@@ -796,13 +807,13 @@ var SplitButton = ({
|
|
796
807
|
menuItems = [],
|
797
808
|
children,
|
798
809
|
...props
|
799
|
-
}) => /* @__PURE__ */
|
810
|
+
}) => /* @__PURE__ */ React7.createElement(
|
800
811
|
"div",
|
801
812
|
{
|
802
813
|
dir: "ltr",
|
803
814
|
className: cn("hawa-row hawa-flex hawa-h-fit hawa-justify-center")
|
804
815
|
},
|
805
|
-
/* @__PURE__ */
|
816
|
+
/* @__PURE__ */ React7.createElement(
|
806
817
|
Button,
|
807
818
|
{
|
808
819
|
variant,
|
@@ -811,7 +822,7 @@ var SplitButton = ({
|
|
811
822
|
},
|
812
823
|
children
|
813
824
|
),
|
814
|
-
/* @__PURE__ */
|
825
|
+
/* @__PURE__ */ React7.createElement(
|
815
826
|
DropdownMenu,
|
816
827
|
{
|
817
828
|
size: "sm",
|
@@ -819,7 +830,7 @@ var SplitButton = ({
|
|
819
830
|
direction,
|
820
831
|
align: direction === "rtl" ? "start" : "end",
|
821
832
|
items: menuItems,
|
822
|
-
trigger: /* @__PURE__ */
|
833
|
+
trigger: /* @__PURE__ */ React7.createElement(
|
823
834
|
Button,
|
824
835
|
{
|
825
836
|
asChild: true,
|
@@ -830,7 +841,7 @@ var SplitButton = ({
|
|
830
841
|
props.className
|
831
842
|
)
|
832
843
|
},
|
833
|
-
/* @__PURE__ */
|
844
|
+
/* @__PURE__ */ React7.createElement(
|
834
845
|
"svg",
|
835
846
|
{
|
836
847
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -843,7 +854,7 @@ var SplitButton = ({
|
|
843
854
|
strokeLinecap: "round",
|
844
855
|
strokeLinejoin: "round"
|
845
856
|
},
|
846
|
-
/* @__PURE__ */
|
857
|
+
/* @__PURE__ */ React7.createElement("path", { d: "m6 9 6 6 6-6" })
|
847
858
|
)
|
848
859
|
)
|
849
860
|
}
|