@sikka/hawa 0.32.2-next → 0.33.0-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Chip-BT2hUlGJ.d.mts → Chip-BtgTAs8x.d.mts} +1 -1
- package/dist/{Chip-Dt7zJ-jZ.d.ts → Chip-DQsP5hFS.d.ts} +1 -1
- package/dist/Label-UbMDLtJF.d.mts +14 -0
- package/dist/Label-UbMDLtJF.d.ts +14 -0
- package/dist/alert/index.js +151 -34
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +148 -31
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +191 -145
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +226 -180
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +147 -30
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +142 -25
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +230 -229
- package/dist/blocks/auth/index.mjs +4 -4
- package/dist/blocks/feedback/index.js +147 -148
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.js +230 -229
- package/dist/blocks/index.mjs +3 -3
- package/dist/blocks/misc/index.js +155 -154
- package/dist/blocks/misc/index.mjs +5 -5
- package/dist/blocks/pricing/index.js +174 -173
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.d.mts +3 -2
- package/dist/button/index.d.ts +3 -2
- package/dist/button/index.js +138 -21
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +138 -21
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.d.mts +15 -0
- package/dist/calendar/index.d.ts +15 -0
- package/dist/calendar/index.js +545 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/calendar/index.mjs +509 -0
- package/dist/calendar/index.mjs.map +1 -0
- package/dist/{chunk-WFPAI2QC.mjs → chunk-3HJ3JXPA.mjs} +130 -174
- package/dist/{chunk-XRUPXLOK.mjs → chunk-AW5FW5TY.mjs} +1 -1
- package/dist/{chunk-MQWYXMSK.mjs → chunk-CKLK3G32.mjs} +242 -197
- package/dist/{chunk-XZLXGXIA.mjs → chunk-E3WWI4I5.mjs} +1 -1
- package/dist/{chunk-WUMWQIAW.mjs → chunk-FRYGQYUO.mjs} +1 -1
- package/dist/{chunk-S6TZHTWS.mjs → chunk-GEB3LM5A.mjs} +1 -1
- package/dist/{chunk-2QAGLSHC.mjs → chunk-IQEBXGLM.mjs} +1 -1
- package/dist/{chunk-PA3Z7W32.mjs → chunk-OS2UOK5C.mjs} +147 -146
- package/dist/{chunk-3S44N7SB.mjs → chunk-RTGD7N7I.mjs} +1 -1
- package/dist/{chunk-WAVKQ44V.mjs → chunk-UBNCETCU.mjs} +1 -1
- package/dist/codeBlock/index.js +138 -92
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +157 -111
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/commonTypes-CgDwjGvU.d.mts +5 -0
- package/dist/commonTypes-CgDwjGvU.d.ts +5 -0
- package/dist/commonTypes-DZdITB5m.d.mts +4 -0
- package/dist/commonTypes-DZdITB5m.d.ts +4 -0
- package/dist/dataTable/index.d.mts +2 -1
- package/dist/dataTable/index.d.ts +2 -1
- package/dist/dataTable/index.js +177 -174
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +177 -174
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.d.mts +20 -0
- package/dist/datePicker/index.d.ts +20 -0
- package/dist/datePicker/index.js +630 -0
- package/dist/datePicker/index.js.map +1 -0
- package/dist/datePicker/index.mjs +593 -0
- package/dist/datePicker/index.mjs.map +1 -0
- package/dist/destroyableCard/index.d.mts +1 -1
- package/dist/destroyableCard/index.d.ts +1 -1
- package/dist/dialog/index.d.mts +1 -1
- package/dist/dialog/index.d.ts +1 -1
- package/dist/docsLayout/index.js +231 -114
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +222 -105
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.d.mts +1 -6
- package/dist/dropdownMenu/index.d.ts +1 -6
- package/dist/elements/index.d.mts +9 -8
- package/dist/elements/index.d.ts +9 -8
- package/dist/elements/index.js +54 -51
- package/dist/elements/index.mjs +7 -5
- package/dist/fileDropzone/index.js +184 -67
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +176 -59
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.css +83 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +54 -51
- package/dist/index.mjs +74 -71
- package/dist/input/index.d.mts +1 -2
- package/dist/input/index.d.ts +1 -2
- package/dist/label/index.d.mts +2 -1
- package/dist/label/index.d.ts +2 -1
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +204 -158
- package/dist/layout/index.mjs +2 -2
- package/dist/phoneInput/index.d.mts +1 -2
- package/dist/phoneInput/index.d.ts +1 -2
- package/dist/progress/index.d.mts +1 -8
- package/dist/progress/index.d.ts +1 -8
- package/dist/radio/index.d.mts +1 -9
- package/dist/radio/index.d.ts +1 -9
- package/dist/scrollArea/index.d.mts +1 -1
- package/dist/scrollArea/index.d.ts +1 -1
- package/dist/separator/index.d.mts +1 -1
- package/dist/separator/index.d.ts +1 -1
- package/dist/signature/index.d.mts +2 -1
- package/dist/signature/index.d.ts +2 -1
- package/dist/simpleTable/index.d.mts +1 -1
- package/dist/simpleTable/index.d.ts +1 -1
- package/dist/sortButton/index.js +145 -28
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +145 -28
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.d.mts +3 -2
- package/dist/splitButton/index.d.ts +3 -2
- package/dist/splitButton/index.js +145 -28
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +145 -28
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/tabs/index.d.mts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/textarea/index.d.mts +1 -1
- package/dist/textarea/index.d.ts +1 -1
- package/dist/toast/index.d.mts +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toaster/index.d.mts +22 -4
- package/dist/toaster/index.d.ts +22 -4
- package/package.json +3 -1
- package/dist/commonTypes-CMqMLkhN.d.mts +0 -4
- package/dist/commonTypes-CMqMLkhN.d.ts +0 -4
- package/dist/commonTypes-D_7LV7Ri.d.mts +0 -5
- package/dist/commonTypes-D_7LV7Ri.d.ts +0 -5
@@ -1,12 +1,12 @@
|
|
1
1
|
"use client";
|
2
2
|
|
3
3
|
// elements/fileDropzone/FileDropzone.tsx
|
4
|
-
import
|
4
|
+
import React6, { useEffect as useEffect2, useState as useState2 } from "react";
|
5
5
|
import { useDropzone } from "react-dropzone";
|
6
6
|
import clsx2 from "clsx";
|
7
7
|
|
8
8
|
// elements/alert/Alert.tsx
|
9
|
-
import
|
9
|
+
import React5, { useRef, useState, useEffect } from "react";
|
10
10
|
|
11
11
|
// util/index.ts
|
12
12
|
import { clsx } from "clsx";
|
@@ -16,11 +16,127 @@ function cn(...inputs) {
|
|
16
16
|
}
|
17
17
|
|
18
18
|
// elements/button/Button.tsx
|
19
|
-
import * as
|
19
|
+
import * as React4 from "react";
|
20
20
|
import { cva } from "class-variance-authority";
|
21
21
|
|
22
|
-
// elements/
|
22
|
+
// elements/label/Label.tsx
|
23
|
+
import * as React2 from "react";
|
24
|
+
|
25
|
+
// elements/tooltip/Tooltip.tsx
|
23
26
|
import React from "react";
|
27
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
28
|
+
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ React.createElement(
|
29
|
+
TooltipPrimitive.Content,
|
30
|
+
{
|
31
|
+
ref,
|
32
|
+
sideOffset,
|
33
|
+
className: cn(
|
34
|
+
"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",
|
35
|
+
{
|
36
|
+
"hawa-text-xs": size === "small",
|
37
|
+
"hawa-text-xl": size === "large"
|
38
|
+
},
|
39
|
+
className
|
40
|
+
),
|
41
|
+
...props
|
42
|
+
}
|
43
|
+
));
|
44
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
45
|
+
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
46
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
47
|
+
var Tooltip = ({
|
48
|
+
side,
|
49
|
+
size,
|
50
|
+
open,
|
51
|
+
content,
|
52
|
+
children,
|
53
|
+
disabled,
|
54
|
+
defaultOpen,
|
55
|
+
onOpenChange,
|
56
|
+
triggerProps,
|
57
|
+
contentProps,
|
58
|
+
providerProps,
|
59
|
+
delayDuration = 300,
|
60
|
+
...props
|
61
|
+
}) => {
|
62
|
+
return /* @__PURE__ */ React.createElement(
|
63
|
+
TooltipPrimitive.TooltipProvider,
|
64
|
+
{
|
65
|
+
delayDuration,
|
66
|
+
...providerProps
|
67
|
+
},
|
68
|
+
/* @__PURE__ */ React.createElement(
|
69
|
+
TooltipPrimitive.Root,
|
70
|
+
{
|
71
|
+
open: !disabled && open,
|
72
|
+
defaultOpen,
|
73
|
+
onOpenChange,
|
74
|
+
...props
|
75
|
+
},
|
76
|
+
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
77
|
+
/* @__PURE__ */ React.createElement(
|
78
|
+
TooltipContent,
|
79
|
+
{
|
80
|
+
size,
|
81
|
+
side,
|
82
|
+
align: "center",
|
83
|
+
...contentProps,
|
84
|
+
style: {
|
85
|
+
...contentProps == null ? void 0 : contentProps.style,
|
86
|
+
maxWidth: "var(--radix-tooltip-content-available-width)",
|
87
|
+
maxHeight: "var(--radix-tooltip-content-available-height)"
|
88
|
+
}
|
89
|
+
},
|
90
|
+
content
|
91
|
+
)
|
92
|
+
)
|
93
|
+
);
|
94
|
+
};
|
95
|
+
|
96
|
+
// elements/label/Label.tsx
|
97
|
+
var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
|
98
|
+
"label",
|
99
|
+
{
|
100
|
+
ref,
|
101
|
+
className: cn(
|
102
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
103
|
+
className
|
104
|
+
),
|
105
|
+
...props
|
106
|
+
},
|
107
|
+
children,
|
108
|
+
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
109
|
+
), hint && /* @__PURE__ */ React2.createElement(
|
110
|
+
Tooltip,
|
111
|
+
{
|
112
|
+
content: hint,
|
113
|
+
side: hintSide,
|
114
|
+
triggerProps: {
|
115
|
+
tabIndex: -1,
|
116
|
+
onClick: (event) => event.preventDefault()
|
117
|
+
}
|
118
|
+
},
|
119
|
+
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
120
|
+
"svg",
|
121
|
+
{
|
122
|
+
xmlns: "http://www.w3.org/2000/svg",
|
123
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
124
|
+
viewBox: "0 0 24 24",
|
125
|
+
fill: "none",
|
126
|
+
stroke: "currentColor",
|
127
|
+
strokeWidth: "2",
|
128
|
+
strokeLinecap: "round",
|
129
|
+
strokeLinejoin: "round"
|
130
|
+
},
|
131
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
132
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
133
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
134
|
+
))
|
135
|
+
)));
|
136
|
+
Label.displayName = "Label";
|
137
|
+
|
138
|
+
// elements/loading/Loading.tsx
|
139
|
+
import React3 from "react";
|
24
140
|
var Loading = ({
|
25
141
|
design = "spinner",
|
26
142
|
size = "normal",
|
@@ -51,7 +167,7 @@ var Loading = ({
|
|
51
167
|
};
|
52
168
|
switch (design.split("-")[0]) {
|
53
169
|
case "dots":
|
54
|
-
return /* @__PURE__ */
|
170
|
+
return /* @__PURE__ */ React3.createElement(
|
55
171
|
"div",
|
56
172
|
{
|
57
173
|
className: cn(
|
@@ -59,7 +175,7 @@ var Loading = ({
|
|
59
175
|
classNames == null ? void 0 : classNames.container
|
60
176
|
)
|
61
177
|
},
|
62
|
-
/* @__PURE__ */
|
178
|
+
/* @__PURE__ */ React3.createElement(
|
63
179
|
"div",
|
64
180
|
{
|
65
181
|
className: cn(
|
@@ -70,7 +186,7 @@ var Loading = ({
|
|
70
186
|
)
|
71
187
|
}
|
72
188
|
),
|
73
|
-
/* @__PURE__ */
|
189
|
+
/* @__PURE__ */ React3.createElement(
|
74
190
|
"div",
|
75
191
|
{
|
76
192
|
className: cn(
|
@@ -81,7 +197,7 @@ var Loading = ({
|
|
81
197
|
)
|
82
198
|
}
|
83
199
|
),
|
84
|
-
/* @__PURE__ */
|
200
|
+
/* @__PURE__ */ React3.createElement(
|
85
201
|
"div",
|
86
202
|
{
|
87
203
|
className: cn(
|
@@ -94,7 +210,7 @@ var Loading = ({
|
|
94
210
|
)
|
95
211
|
);
|
96
212
|
case "square":
|
97
|
-
return /* @__PURE__ */
|
213
|
+
return /* @__PURE__ */ React3.createElement(
|
98
214
|
"svg",
|
99
215
|
{
|
100
216
|
className: cn(
|
@@ -106,7 +222,7 @@ var Loading = ({
|
|
106
222
|
height: "35",
|
107
223
|
width: "35"
|
108
224
|
},
|
109
|
-
/* @__PURE__ */
|
225
|
+
/* @__PURE__ */ React3.createElement(
|
110
226
|
"rect",
|
111
227
|
{
|
112
228
|
className: "squircle-track",
|
@@ -118,7 +234,7 @@ var Loading = ({
|
|
118
234
|
height: "32.5"
|
119
235
|
}
|
120
236
|
),
|
121
|
-
/* @__PURE__ */
|
237
|
+
/* @__PURE__ */ React3.createElement(
|
122
238
|
"rect",
|
123
239
|
{
|
124
240
|
className: "square-car",
|
@@ -133,7 +249,7 @@ var Loading = ({
|
|
133
249
|
)
|
134
250
|
);
|
135
251
|
case "squircle":
|
136
|
-
return /* @__PURE__ */
|
252
|
+
return /* @__PURE__ */ React3.createElement(
|
137
253
|
"svg",
|
138
254
|
{
|
139
255
|
x: "0px",
|
@@ -148,7 +264,7 @@ var Loading = ({
|
|
148
264
|
classNames == null ? void 0 : classNames.container
|
149
265
|
)
|
150
266
|
},
|
151
|
-
/* @__PURE__ */
|
267
|
+
/* @__PURE__ */ React3.createElement(
|
152
268
|
"path",
|
153
269
|
{
|
154
270
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -158,7 +274,7 @@ var Loading = ({
|
|
158
274
|
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"
|
159
275
|
}
|
160
276
|
),
|
161
|
-
/* @__PURE__ */
|
277
|
+
/* @__PURE__ */ React3.createElement(
|
162
278
|
"path",
|
163
279
|
{
|
164
280
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -170,7 +286,7 @@ var Loading = ({
|
|
170
286
|
)
|
171
287
|
);
|
172
288
|
case "progress":
|
173
|
-
return /* @__PURE__ */
|
289
|
+
return /* @__PURE__ */ React3.createElement(
|
174
290
|
"div",
|
175
291
|
{
|
176
292
|
className: cn(
|
@@ -181,9 +297,9 @@ var Loading = ({
|
|
181
297
|
}
|
182
298
|
);
|
183
299
|
case "orbit":
|
184
|
-
return /* @__PURE__ */
|
300
|
+
return /* @__PURE__ */ React3.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
185
301
|
default:
|
186
|
-
return /* @__PURE__ */
|
302
|
+
return /* @__PURE__ */ React3.createElement(
|
187
303
|
"svg",
|
188
304
|
{
|
189
305
|
viewBox: "0 0 40 40",
|
@@ -195,7 +311,7 @@ var Loading = ({
|
|
195
311
|
classNames == null ? void 0 : classNames.container
|
196
312
|
)
|
197
313
|
},
|
198
|
-
/* @__PURE__ */
|
314
|
+
/* @__PURE__ */ React3.createElement(
|
199
315
|
"circle",
|
200
316
|
{
|
201
317
|
className: cn(
|
@@ -214,7 +330,7 @@ var Loading = ({
|
|
214
330
|
pathLength: "100"
|
215
331
|
}
|
216
332
|
),
|
217
|
-
/* @__PURE__ */
|
333
|
+
/* @__PURE__ */ React3.createElement(
|
218
334
|
"circle",
|
219
335
|
{
|
220
336
|
className: cn(
|
@@ -271,9 +387,10 @@ var buttonVariants = cva(
|
|
271
387
|
}
|
272
388
|
}
|
273
389
|
);
|
274
|
-
var Button =
|
390
|
+
var Button = React4.forwardRef(
|
275
391
|
({
|
276
392
|
className,
|
393
|
+
label,
|
277
394
|
variant,
|
278
395
|
size,
|
279
396
|
asChild = false,
|
@@ -284,7 +401,7 @@ var Button = React2.forwardRef(
|
|
284
401
|
}, ref) => {
|
285
402
|
const Comp = "button";
|
286
403
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
287
|
-
return /* @__PURE__ */
|
404
|
+
return /* @__PURE__ */ React4.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React4.createElement(Label, { className: "hawa-mb-2" }, label), /* @__PURE__ */ React4.createElement(
|
288
405
|
Comp,
|
289
406
|
{
|
290
407
|
className: cn(
|
@@ -294,7 +411,7 @@ var Button = React2.forwardRef(
|
|
294
411
|
ref,
|
295
412
|
...props
|
296
413
|
},
|
297
|
-
isLoading ? /* @__PURE__ */
|
414
|
+
isLoading ? /* @__PURE__ */ React4.createElement(
|
298
415
|
Loading,
|
299
416
|
{
|
300
417
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -303,7 +420,7 @@ var Button = React2.forwardRef(
|
|
303
420
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
304
421
|
}
|
305
422
|
) : children
|
306
|
-
);
|
423
|
+
));
|
307
424
|
}
|
308
425
|
);
|
309
426
|
Button.displayName = "Button";
|
@@ -354,7 +471,7 @@ var Alert = ({
|
|
354
471
|
hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-700 hawa-via-red-500 hawa-to-yellow-600 ",
|
355
472
|
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-500 hawa-via-blue-700 hawa-to-purple-500"
|
356
473
|
};
|
357
|
-
return /* @__PURE__ */
|
474
|
+
return /* @__PURE__ */ React5.createElement("div", { ref: alertRef }, /* @__PURE__ */ React5.createElement(
|
358
475
|
"div",
|
359
476
|
{
|
360
477
|
"data-testid": "alert",
|
@@ -368,13 +485,13 @@ var Alert = ({
|
|
368
485
|
className
|
369
486
|
)
|
370
487
|
},
|
371
|
-
/* @__PURE__ */
|
488
|
+
/* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row" }, icon && /* @__PURE__ */ React5.createElement(
|
372
489
|
"div",
|
373
490
|
{
|
374
491
|
className: direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1"
|
375
492
|
},
|
376
493
|
icon
|
377
|
-
), /* @__PURE__ */
|
494
|
+
), /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React5.createElement(
|
378
495
|
"span",
|
379
496
|
{
|
380
497
|
className: cn(
|
@@ -383,7 +500,7 @@ var Alert = ({
|
|
383
500
|
)
|
384
501
|
},
|
385
502
|
props.title
|
386
|
-
), /* @__PURE__ */
|
503
|
+
), /* @__PURE__ */ React5.createElement(
|
387
504
|
"span",
|
388
505
|
{
|
389
506
|
className: cn(
|
@@ -392,7 +509,7 @@ var Alert = ({
|
|
392
509
|
)
|
393
510
|
},
|
394
511
|
props.text
|
395
|
-
), props.actions && /* @__PURE__ */
|
512
|
+
), props.actions && /* @__PURE__ */ React5.createElement("div", { className: "hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2" }, props.actions.map((act, index) => /* @__PURE__ */ React5.createElement(
|
396
513
|
Button,
|
397
514
|
{
|
398
515
|
key: index,
|
@@ -401,7 +518,7 @@ var Alert = ({
|
|
401
518
|
},
|
402
519
|
act.label
|
403
520
|
))))),
|
404
|
-
!props.persistent && /* @__PURE__ */
|
521
|
+
!props.persistent && /* @__PURE__ */ React5.createElement(
|
405
522
|
"button",
|
406
523
|
{
|
407
524
|
type: "button",
|
@@ -428,8 +545,8 @@ var Alert = ({
|
|
428
545
|
}
|
429
546
|
}
|
430
547
|
},
|
431
|
-
/* @__PURE__ */
|
432
|
-
/* @__PURE__ */
|
548
|
+
/* @__PURE__ */ React5.createElement("span", { className: "hawa-sr-only" }, "Close"),
|
549
|
+
/* @__PURE__ */ React5.createElement(
|
433
550
|
"svg",
|
434
551
|
{
|
435
552
|
"aria-label": "Close Icon",
|
@@ -438,7 +555,7 @@ var Alert = ({
|
|
438
555
|
fill: "currentColor",
|
439
556
|
viewBox: "0 0 20 20"
|
440
557
|
},
|
441
|
-
/* @__PURE__ */
|
558
|
+
/* @__PURE__ */ React5.createElement(
|
442
559
|
"path",
|
443
560
|
{
|
444
561
|
fillRule: "evenodd",
|
@@ -527,7 +644,7 @@ var FileDropzone = ({
|
|
527
644
|
const errs = fileRejections.map((rej, i) => {
|
528
645
|
switch (rej.errors[0].code) {
|
529
646
|
case "file-too-large":
|
530
|
-
return /* @__PURE__ */
|
647
|
+
return /* @__PURE__ */ React6.createElement(
|
531
648
|
Alert,
|
532
649
|
{
|
533
650
|
key: i,
|
@@ -537,7 +654,7 @@ var FileDropzone = ({
|
|
537
654
|
}
|
538
655
|
);
|
539
656
|
case "too-many-files":
|
540
|
-
return /* @__PURE__ */
|
657
|
+
return /* @__PURE__ */ React6.createElement(
|
541
658
|
Alert,
|
542
659
|
{
|
543
660
|
key: i,
|
@@ -547,7 +664,7 @@ var FileDropzone = ({
|
|
547
664
|
}
|
548
665
|
);
|
549
666
|
case "file-invalid-type":
|
550
|
-
return /* @__PURE__ */
|
667
|
+
return /* @__PURE__ */ React6.createElement(
|
551
668
|
Alert,
|
552
669
|
{
|
553
670
|
key: i,
|
@@ -557,7 +674,7 @@ var FileDropzone = ({
|
|
557
674
|
}
|
558
675
|
);
|
559
676
|
default:
|
560
|
-
return /* @__PURE__ */
|
677
|
+
return /* @__PURE__ */ React6.createElement(
|
561
678
|
Alert,
|
562
679
|
{
|
563
680
|
key: i,
|
@@ -568,7 +685,7 @@ var FileDropzone = ({
|
|
568
685
|
);
|
569
686
|
}
|
570
687
|
});
|
571
|
-
const thumbs = files == null ? void 0 : files.map((file, index) => /* @__PURE__ */
|
688
|
+
const thumbs = files == null ? void 0 : files.map((file, index) => /* @__PURE__ */ React6.createElement("div", { className: "hawa-relative hawa-rounded", key: index }, /* @__PURE__ */ React6.createElement(
|
572
689
|
"button",
|
573
690
|
{
|
574
691
|
onClick: (e) => {
|
@@ -581,7 +698,7 @@ var FileDropzone = ({
|
|
581
698
|
className: "hawa-absolute hawa-left-0 hawa-ml-auto hawa-inline-flex hawa-items-center hawa-rounded-inner hawa-rounded-bl-none hawa-rounded-tr-none hawa-bg-gray-900 hawa-p-1.5 hawa-text-sm hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-200 hover:hawa-text-gray-900 dark:hover:hawa-bg-gray-600 dark:hover:hawa-text-white",
|
582
699
|
"data-modal-toggle": "defaultModal"
|
583
700
|
},
|
584
|
-
/* @__PURE__ */
|
701
|
+
/* @__PURE__ */ React6.createElement(
|
585
702
|
"svg",
|
586
703
|
{
|
587
704
|
"aria-hidden": "true",
|
@@ -589,7 +706,7 @@ var FileDropzone = ({
|
|
589
706
|
fill: "currentColor",
|
590
707
|
viewBox: "0 0 20 20"
|
591
708
|
},
|
592
|
-
/* @__PURE__ */
|
709
|
+
/* @__PURE__ */ React6.createElement(
|
593
710
|
"path",
|
594
711
|
{
|
595
712
|
fillRule: "evenodd",
|
@@ -598,8 +715,8 @@ var FileDropzone = ({
|
|
598
715
|
}
|
599
716
|
)
|
600
717
|
),
|
601
|
-
/* @__PURE__ */
|
602
|
-
), /* @__PURE__ */
|
718
|
+
/* @__PURE__ */ React6.createElement("span", { className: "hawa-sr-only" }, "Close modal")
|
719
|
+
), /* @__PURE__ */ React6.createElement(
|
603
720
|
"div",
|
604
721
|
{
|
605
722
|
style: {
|
@@ -618,7 +735,7 @@ var FileDropzone = ({
|
|
618
735
|
key: file.name
|
619
736
|
}
|
620
737
|
)));
|
621
|
-
return /* @__PURE__ */
|
738
|
+
return /* @__PURE__ */ React6.createElement("div", null, label && /* @__PURE__ */ React6.createElement("div", { className: "hawa-mb-2 hawa-block hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300" }, label), /* @__PURE__ */ React6.createElement(
|
622
739
|
"div",
|
623
740
|
{
|
624
741
|
className: clsx2(
|
@@ -626,7 +743,7 @@ var FileDropzone = ({
|
|
626
743
|
isDragActive ? "hawa-bg-muted" : "hawa-bg-muted/20 hover:hawa-bg-muted/50 "
|
627
744
|
)
|
628
745
|
},
|
629
|
-
/* @__PURE__ */
|
746
|
+
/* @__PURE__ */ React6.createElement("div", { ...getRootProps({}) }, /* @__PURE__ */ React6.createElement("p", { ...getInputProps() }), /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4 hawa-text-center" }, /* @__PURE__ */ React6.createElement(
|
630
747
|
"svg",
|
631
748
|
{
|
632
749
|
stroke: "currentColor",
|
@@ -638,28 +755,28 @@ var FileDropzone = ({
|
|
638
755
|
height: "1.5em",
|
639
756
|
width: "1.5em"
|
640
757
|
},
|
641
|
-
/* @__PURE__ */
|
642
|
-
/* @__PURE__ */
|
643
|
-
/* @__PURE__ */
|
644
|
-
/* @__PURE__ */
|
645
|
-
/* @__PURE__ */
|
646
|
-
/* @__PURE__ */
|
647
|
-
/* @__PURE__ */
|
648
|
-
/* @__PURE__ */
|
649
|
-
/* @__PURE__ */
|
650
|
-
/* @__PURE__ */
|
651
|
-
), typeof texts.clickHereToUpload === "function" ? texts.clickHereToUpload() : texts.clickHereToUpload), /* @__PURE__ */
|
652
|
-
acceptedFiles.length > 0 && /* @__PURE__ */
|
653
|
-
acceptedFiles.length > 0 && thumbs && showPreview ? /* @__PURE__ */
|
654
|
-
/* @__PURE__ */
|
655
|
-
), disclaimer && /* @__PURE__ */
|
758
|
+
/* @__PURE__ */ React6.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
|
759
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M19 11v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" }),
|
760
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M13 13l9 3l-4 2l-2 4l-3 -9" }),
|
761
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M3 3l0 .01" }),
|
762
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M7 3l0 .01" }),
|
763
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M11 3l0 .01" }),
|
764
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M15 3l0 .01" }),
|
765
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M3 7l0 .01" }),
|
766
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M3 11l0 .01" }),
|
767
|
+
/* @__PURE__ */ React6.createElement("path", { d: "M3 15l0 .01" })
|
768
|
+
), typeof texts.clickHereToUpload === "function" ? texts.clickHereToUpload() : texts.clickHereToUpload), /* @__PURE__ */ React6.createElement("div", { className: "hawa-select-none hawa-pt-2 hawa-text-center hawa-text-xs" }, texts.acceptedFileTypes, " ", accept.split(",")), /* @__PURE__ */ React6.createElement("div", { className: "hawa-select-none hawa-pb-2 hawa-pt-1 hawa-text-center hawa-text-xs" }, texts.maxFileSize, " ", max)),
|
769
|
+
acceptedFiles.length > 0 && /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-justify-center hawa-rounded-lg hawa-p-2 " }, /* @__PURE__ */ React6.createElement(Button, { onClick: clearAllFiles }, "Clear All")),
|
770
|
+
acceptedFiles.length > 0 && thumbs && showPreview ? /* @__PURE__ */ React6.createElement("aside", { className: "hawa-flex hawa-flex-row hawa-flex-wrap hawa-justify-center hawa-gap-2 hawa-rounded-lg hawa-p-2" }, thumbs) : null,
|
771
|
+
/* @__PURE__ */ React6.createElement("div", { className: "px-4" }, ((_b = (_a = fileRejections[0]) == null ? void 0 : _a.errors[0]) == null ? void 0 : _b.code) && errs)
|
772
|
+
), disclaimer && /* @__PURE__ */ React6.createElement("div", { className: "hawa-mt-2 hawa-text-sm hawa-text-muted-foreground/50" }, (_c = texts.disclaimer) != null ? _c : "By uploading a file you agree to our", " ", /* @__PURE__ */ React6.createElement(
|
656
773
|
"a",
|
657
774
|
{
|
658
775
|
href: termsLink,
|
659
776
|
className: "clickable-link hawa-text-muted-foreground/50"
|
660
777
|
},
|
661
778
|
(_d = texts.terms) != null ? _d : "Terms"
|
662
|
-
), " ", (_e = texts.and) != null ? _e : "and", " ", /* @__PURE__ */
|
779
|
+
), " ", (_e = texts.and) != null ? _e : "and", " ", /* @__PURE__ */ React6.createElement(
|
663
780
|
"a",
|
664
781
|
{
|
665
782
|
href: privacyLink,
|