@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
package/dist/dataTable/index.js
CHANGED
@@ -47,11 +47,127 @@ function cn(...inputs) {
|
|
47
47
|
}
|
48
48
|
|
49
49
|
// elements/button/Button.tsx
|
50
|
-
var
|
50
|
+
var React4 = __toESM(require("react"));
|
51
51
|
var import_class_variance_authority = require("class-variance-authority");
|
52
52
|
|
53
|
-
// elements/
|
53
|
+
// elements/label/Label.tsx
|
54
|
+
var React2 = __toESM(require("react"));
|
55
|
+
|
56
|
+
// elements/tooltip/Tooltip.tsx
|
54
57
|
var import_react = __toESM(require("react"));
|
58
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
59
|
+
var TooltipContent = import_react.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(
|
60
|
+
TooltipPrimitive.Content,
|
61
|
+
{
|
62
|
+
ref,
|
63
|
+
sideOffset,
|
64
|
+
className: cn(
|
65
|
+
"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",
|
66
|
+
{
|
67
|
+
"hawa-text-xs": size === "small",
|
68
|
+
"hawa-text-xl": size === "large"
|
69
|
+
},
|
70
|
+
className
|
71
|
+
),
|
72
|
+
...props
|
73
|
+
}
|
74
|
+
));
|
75
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
76
|
+
var TooltipArrow = import_react.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
77
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
78
|
+
var Tooltip = ({
|
79
|
+
side,
|
80
|
+
size,
|
81
|
+
open,
|
82
|
+
content,
|
83
|
+
children,
|
84
|
+
disabled,
|
85
|
+
defaultOpen,
|
86
|
+
onOpenChange,
|
87
|
+
triggerProps,
|
88
|
+
contentProps,
|
89
|
+
providerProps,
|
90
|
+
delayDuration = 300,
|
91
|
+
...props
|
92
|
+
}) => {
|
93
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
94
|
+
TooltipPrimitive.TooltipProvider,
|
95
|
+
{
|
96
|
+
delayDuration,
|
97
|
+
...providerProps
|
98
|
+
},
|
99
|
+
/* @__PURE__ */ import_react.default.createElement(
|
100
|
+
TooltipPrimitive.Root,
|
101
|
+
{
|
102
|
+
open: !disabled && open,
|
103
|
+
defaultOpen,
|
104
|
+
onOpenChange,
|
105
|
+
...props
|
106
|
+
},
|
107
|
+
/* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
108
|
+
/* @__PURE__ */ import_react.default.createElement(
|
109
|
+
TooltipContent,
|
110
|
+
{
|
111
|
+
size,
|
112
|
+
side,
|
113
|
+
align: "center",
|
114
|
+
...contentProps,
|
115
|
+
style: {
|
116
|
+
...contentProps == null ? void 0 : contentProps.style,
|
117
|
+
maxWidth: "var(--radix-tooltip-content-available-width)",
|
118
|
+
maxHeight: "var(--radix-tooltip-content-available-height)"
|
119
|
+
}
|
120
|
+
},
|
121
|
+
content
|
122
|
+
)
|
123
|
+
)
|
124
|
+
);
|
125
|
+
};
|
126
|
+
|
127
|
+
// elements/label/Label.tsx
|
128
|
+
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(
|
129
|
+
"label",
|
130
|
+
{
|
131
|
+
ref,
|
132
|
+
className: cn(
|
133
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
134
|
+
className
|
135
|
+
),
|
136
|
+
...props
|
137
|
+
},
|
138
|
+
children,
|
139
|
+
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
140
|
+
), hint && /* @__PURE__ */ React2.createElement(
|
141
|
+
Tooltip,
|
142
|
+
{
|
143
|
+
content: hint,
|
144
|
+
side: hintSide,
|
145
|
+
triggerProps: {
|
146
|
+
tabIndex: -1,
|
147
|
+
onClick: (event) => event.preventDefault()
|
148
|
+
}
|
149
|
+
},
|
150
|
+
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
151
|
+
"svg",
|
152
|
+
{
|
153
|
+
xmlns: "http://www.w3.org/2000/svg",
|
154
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
155
|
+
viewBox: "0 0 24 24",
|
156
|
+
fill: "none",
|
157
|
+
stroke: "currentColor",
|
158
|
+
strokeWidth: "2",
|
159
|
+
strokeLinecap: "round",
|
160
|
+
strokeLinejoin: "round"
|
161
|
+
},
|
162
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
163
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
164
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
165
|
+
))
|
166
|
+
)));
|
167
|
+
Label.displayName = "Label";
|
168
|
+
|
169
|
+
// elements/loading/Loading.tsx
|
170
|
+
var import_react2 = __toESM(require("react"));
|
55
171
|
var Loading = ({
|
56
172
|
design = "spinner",
|
57
173
|
size = "normal",
|
@@ -82,7 +198,7 @@ var Loading = ({
|
|
82
198
|
};
|
83
199
|
switch (design.split("-")[0]) {
|
84
200
|
case "dots":
|
85
|
-
return /* @__PURE__ */
|
201
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
86
202
|
"div",
|
87
203
|
{
|
88
204
|
className: cn(
|
@@ -90,7 +206,7 @@ var Loading = ({
|
|
90
206
|
classNames == null ? void 0 : classNames.container
|
91
207
|
)
|
92
208
|
},
|
93
|
-
/* @__PURE__ */
|
209
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
94
210
|
"div",
|
95
211
|
{
|
96
212
|
className: cn(
|
@@ -101,7 +217,7 @@ var Loading = ({
|
|
101
217
|
)
|
102
218
|
}
|
103
219
|
),
|
104
|
-
/* @__PURE__ */
|
220
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
105
221
|
"div",
|
106
222
|
{
|
107
223
|
className: cn(
|
@@ -112,7 +228,7 @@ var Loading = ({
|
|
112
228
|
)
|
113
229
|
}
|
114
230
|
),
|
115
|
-
/* @__PURE__ */
|
231
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
116
232
|
"div",
|
117
233
|
{
|
118
234
|
className: cn(
|
@@ -125,7 +241,7 @@ var Loading = ({
|
|
125
241
|
)
|
126
242
|
);
|
127
243
|
case "square":
|
128
|
-
return /* @__PURE__ */
|
244
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
129
245
|
"svg",
|
130
246
|
{
|
131
247
|
className: cn(
|
@@ -137,7 +253,7 @@ var Loading = ({
|
|
137
253
|
height: "35",
|
138
254
|
width: "35"
|
139
255
|
},
|
140
|
-
/* @__PURE__ */
|
256
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
141
257
|
"rect",
|
142
258
|
{
|
143
259
|
className: "squircle-track",
|
@@ -149,7 +265,7 @@ var Loading = ({
|
|
149
265
|
height: "32.5"
|
150
266
|
}
|
151
267
|
),
|
152
|
-
/* @__PURE__ */
|
268
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
153
269
|
"rect",
|
154
270
|
{
|
155
271
|
className: "square-car",
|
@@ -164,7 +280,7 @@ var Loading = ({
|
|
164
280
|
)
|
165
281
|
);
|
166
282
|
case "squircle":
|
167
|
-
return /* @__PURE__ */
|
283
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
168
284
|
"svg",
|
169
285
|
{
|
170
286
|
x: "0px",
|
@@ -179,7 +295,7 @@ var Loading = ({
|
|
179
295
|
classNames == null ? void 0 : classNames.container
|
180
296
|
)
|
181
297
|
},
|
182
|
-
/* @__PURE__ */
|
298
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
183
299
|
"path",
|
184
300
|
{
|
185
301
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -189,7 +305,7 @@ var Loading = ({
|
|
189
305
|
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"
|
190
306
|
}
|
191
307
|
),
|
192
|
-
/* @__PURE__ */
|
308
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
193
309
|
"path",
|
194
310
|
{
|
195
311
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -201,7 +317,7 @@ var Loading = ({
|
|
201
317
|
)
|
202
318
|
);
|
203
319
|
case "progress":
|
204
|
-
return /* @__PURE__ */
|
320
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
205
321
|
"div",
|
206
322
|
{
|
207
323
|
className: cn(
|
@@ -212,9 +328,9 @@ var Loading = ({
|
|
212
328
|
}
|
213
329
|
);
|
214
330
|
case "orbit":
|
215
|
-
return /* @__PURE__ */
|
331
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
216
332
|
default:
|
217
|
-
return /* @__PURE__ */
|
333
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
218
334
|
"svg",
|
219
335
|
{
|
220
336
|
viewBox: "0 0 40 40",
|
@@ -226,7 +342,7 @@ var Loading = ({
|
|
226
342
|
classNames == null ? void 0 : classNames.container
|
227
343
|
)
|
228
344
|
},
|
229
|
-
/* @__PURE__ */
|
345
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
230
346
|
"circle",
|
231
347
|
{
|
232
348
|
className: cn(
|
@@ -245,7 +361,7 @@ var Loading = ({
|
|
245
361
|
pathLength: "100"
|
246
362
|
}
|
247
363
|
),
|
248
|
-
/* @__PURE__ */
|
364
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
249
365
|
"circle",
|
250
366
|
{
|
251
367
|
className: cn(
|
@@ -302,9 +418,10 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
302
418
|
}
|
303
419
|
}
|
304
420
|
);
|
305
|
-
var Button =
|
421
|
+
var Button = React4.forwardRef(
|
306
422
|
({
|
307
423
|
className,
|
424
|
+
label,
|
308
425
|
variant,
|
309
426
|
size,
|
310
427
|
asChild = false,
|
@@ -315,7 +432,7 @@ var Button = React2.forwardRef(
|
|
315
432
|
}, ref) => {
|
316
433
|
const Comp = "button";
|
317
434
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
318
|
-
return /* @__PURE__ */
|
435
|
+
return /* @__PURE__ */ React4.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React4.createElement(Label, { className: "hawa-mb-2" }, label), /* @__PURE__ */ React4.createElement(
|
319
436
|
Comp,
|
320
437
|
{
|
321
438
|
className: cn(
|
@@ -325,7 +442,7 @@ var Button = React2.forwardRef(
|
|
325
442
|
ref,
|
326
443
|
...props
|
327
444
|
},
|
328
|
-
isLoading ? /* @__PURE__ */
|
445
|
+
isLoading ? /* @__PURE__ */ React4.createElement(
|
329
446
|
Loading,
|
330
447
|
{
|
331
448
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -334,20 +451,20 @@ var Button = React2.forwardRef(
|
|
334
451
|
size: size === "sm" || size === "xs" ? "xs" : "button"
|
335
452
|
}
|
336
453
|
) : children
|
337
|
-
);
|
454
|
+
));
|
338
455
|
}
|
339
456
|
);
|
340
457
|
Button.displayName = "Button";
|
341
458
|
|
342
459
|
// elements/dropdownMenu/DropdownMenu.tsx
|
343
|
-
var
|
460
|
+
var React5 = __toESM(require("react"));
|
344
461
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
345
462
|
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
346
463
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
347
464
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
348
465
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
349
466
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
350
|
-
var DropdownMenuSubTrigger =
|
467
|
+
var DropdownMenuSubTrigger = React5.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
351
468
|
DropdownMenuPrimitive.SubTrigger,
|
352
469
|
{
|
353
470
|
ref,
|
@@ -358,9 +475,9 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
358
475
|
),
|
359
476
|
...props
|
360
477
|
},
|
361
|
-
/* @__PURE__ */
|
478
|
+
/* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
|
362
479
|
" ",
|
363
|
-
/* @__PURE__ */
|
480
|
+
/* @__PURE__ */ React5.createElement(
|
364
481
|
"svg",
|
365
482
|
{
|
366
483
|
"aria-label": "Chevron Right Icon",
|
@@ -372,7 +489,7 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
372
489
|
width: "1em",
|
373
490
|
className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
|
374
491
|
},
|
375
|
-
/* @__PURE__ */
|
492
|
+
/* @__PURE__ */ React5.createElement(
|
376
493
|
"path",
|
377
494
|
{
|
378
495
|
fillRule: "evenodd",
|
@@ -382,7 +499,7 @@ var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, children, ..
|
|
382
499
|
)
|
383
500
|
));
|
384
501
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
385
|
-
var DropdownMenuSubContent =
|
502
|
+
var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
386
503
|
DropdownMenuPrimitive.SubContent,
|
387
504
|
{
|
388
505
|
ref,
|
@@ -394,7 +511,7 @@ var DropdownMenuSubContent = React3.forwardRef(({ className, ...props }, ref) =>
|
|
394
511
|
}
|
395
512
|
));
|
396
513
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
397
|
-
var DropdownMenuContent =
|
514
|
+
var DropdownMenuContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React5.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React5.createElement(
|
398
515
|
DropdownMenuPrimitive.Content,
|
399
516
|
{
|
400
517
|
ref,
|
@@ -407,8 +524,8 @@ var DropdownMenuContent = React3.forwardRef(({ className, sideOffset = 4, ...pro
|
|
407
524
|
}
|
408
525
|
)));
|
409
526
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
410
|
-
var DropdownMenuItem =
|
411
|
-
return /* @__PURE__ */
|
527
|
+
var DropdownMenuItem = React5.forwardRef(({ className, inset, badged, slug, LinkComponent, ...props }, ref) => {
|
528
|
+
return /* @__PURE__ */ React5.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React5.createElement(
|
412
529
|
DropdownMenuPrimitive.Item,
|
413
530
|
{
|
414
531
|
disabled: props.disabled,
|
@@ -421,14 +538,14 @@ var DropdownMenuItem = React3.forwardRef(({ className, inset, badged, slug, Link
|
|
421
538
|
),
|
422
539
|
...props
|
423
540
|
},
|
424
|
-
/* @__PURE__ */
|
541
|
+
/* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
425
542
|
props.end && props.end,
|
426
|
-
!props.end && props.shortcut && /* @__PURE__ */
|
427
|
-
!props.end && badged && /* @__PURE__ */
|
543
|
+
!props.end && props.shortcut && /* @__PURE__ */ React5.createElement(DropdownMenuShortcut, null, props.shortcut),
|
544
|
+
!props.end && badged && /* @__PURE__ */ React5.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
|
428
545
|
));
|
429
546
|
});
|
430
547
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
431
|
-
var DropdownMenuCheckboxItem =
|
548
|
+
var DropdownMenuCheckboxItem = React5.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
432
549
|
DropdownMenuPrimitive.CheckboxItem,
|
433
550
|
{
|
434
551
|
ref,
|
@@ -439,7 +556,7 @@ var DropdownMenuCheckboxItem = React3.forwardRef(({ className, children, checked
|
|
439
556
|
checked,
|
440
557
|
...props
|
441
558
|
},
|
442
|
-
/* @__PURE__ */
|
559
|
+
/* @__PURE__ */ React5.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__ */ React5.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React5.createElement(
|
443
560
|
"svg",
|
444
561
|
{
|
445
562
|
"aria-label": "Check Mark",
|
@@ -450,12 +567,12 @@ var DropdownMenuCheckboxItem = React3.forwardRef(({ className, children, checked
|
|
450
567
|
height: "0.60em",
|
451
568
|
width: "0.60em"
|
452
569
|
},
|
453
|
-
/* @__PURE__ */
|
570
|
+
/* @__PURE__ */ React5.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" })
|
454
571
|
), " ")),
|
455
572
|
children
|
456
573
|
));
|
457
574
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
458
|
-
var DropdownMenuRadioItem =
|
575
|
+
var DropdownMenuRadioItem = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
459
576
|
DropdownMenuPrimitive.RadioItem,
|
460
577
|
{
|
461
578
|
ref,
|
@@ -465,7 +582,7 @@ var DropdownMenuRadioItem = React3.forwardRef(({ className, children, ...props }
|
|
465
582
|
),
|
466
583
|
...props
|
467
584
|
},
|
468
|
-
/* @__PURE__ */
|
585
|
+
/* @__PURE__ */ React5.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__ */ React5.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React5.createElement(
|
469
586
|
"svg",
|
470
587
|
{
|
471
588
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -480,12 +597,12 @@ var DropdownMenuRadioItem = React3.forwardRef(({ className, children, ...props }
|
|
480
597
|
strokeLinejoin: "round",
|
481
598
|
className: "hawa-h-2 hawa-w-2 hawa-fill-current"
|
482
599
|
},
|
483
|
-
/* @__PURE__ */
|
600
|
+
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" })
|
484
601
|
))),
|
485
602
|
children
|
486
603
|
));
|
487
604
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
488
|
-
var DropdownMenuLabel =
|
605
|
+
var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
489
606
|
DropdownMenuPrimitive.Label,
|
490
607
|
{
|
491
608
|
ref,
|
@@ -498,7 +615,7 @@ var DropdownMenuLabel = React3.forwardRef(({ className, inset, ...props }, ref)
|
|
498
615
|
}
|
499
616
|
));
|
500
617
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
501
|
-
var DropdownMenuSeparator =
|
618
|
+
var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React5.createElement(
|
502
619
|
DropdownMenuPrimitive.Separator,
|
503
620
|
{
|
504
621
|
ref,
|
@@ -511,7 +628,7 @@ var DropdownMenuShortcut = ({
|
|
511
628
|
className,
|
512
629
|
...props
|
513
630
|
}) => {
|
514
|
-
return /* @__PURE__ */
|
631
|
+
return /* @__PURE__ */ React5.createElement(
|
515
632
|
"span",
|
516
633
|
{
|
517
634
|
className: cn(
|
@@ -551,10 +668,10 @@ var DropdownMenu = ({
|
|
551
668
|
default: "hawa-px-2 hawa-py-3 ",
|
552
669
|
sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
|
553
670
|
};
|
554
|
-
let [values, setValues] =
|
671
|
+
let [values, setValues] = React5.useState(
|
555
672
|
items.map((item) => item.currentOption)
|
556
673
|
);
|
557
|
-
return /* @__PURE__ */
|
674
|
+
return /* @__PURE__ */ React5.createElement(
|
558
675
|
DropdownMenuRoot,
|
559
676
|
{
|
560
677
|
onOpenChange,
|
@@ -562,8 +679,8 @@ var DropdownMenu = ({
|
|
562
679
|
modal: false,
|
563
680
|
dir: direction
|
564
681
|
},
|
565
|
-
/* @__PURE__ */
|
566
|
-
/* @__PURE__ */
|
682
|
+
/* @__PURE__ */ React5.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
|
683
|
+
/* @__PURE__ */ React5.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React5.createElement(
|
567
684
|
DropdownMenuContent,
|
568
685
|
{
|
569
686
|
side,
|
@@ -584,12 +701,12 @@ var DropdownMenu = ({
|
|
584
701
|
var _a;
|
585
702
|
const ItemLinkComponent = item.slug ? LinkComponent : "a";
|
586
703
|
if (item.itemType === "separator") {
|
587
|
-
return /* @__PURE__ */
|
704
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuSeparator, { key: index });
|
588
705
|
} else if (item.itemType === "label") {
|
589
|
-
return /* @__PURE__ */
|
706
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuLabel, { key: index }, item.label);
|
590
707
|
} else if (item.itemType === "radio") {
|
591
708
|
let dd = item.currentOption;
|
592
|
-
return /* @__PURE__ */
|
709
|
+
return /* @__PURE__ */ React5.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React5.createElement(
|
593
710
|
DropdownMenuSubTrigger,
|
594
711
|
{
|
595
712
|
dir: direction,
|
@@ -597,7 +714,7 @@ var DropdownMenu = ({
|
|
597
714
|
},
|
598
715
|
item.icon && item.icon,
|
599
716
|
item.label && item.label
|
600
|
-
), /* @__PURE__ */
|
717
|
+
), /* @__PURE__ */ React5.createElement(DropdownMenuSubContent, null, /* @__PURE__ */ React5.createElement(
|
601
718
|
DropdownMenuRadioGroup,
|
602
719
|
{
|
603
720
|
value: values[index],
|
@@ -611,12 +728,12 @@ var DropdownMenu = ({
|
|
611
728
|
}
|
612
729
|
}
|
613
730
|
},
|
614
|
-
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */
|
731
|
+
(_a = item.options) == null ? void 0 : _a.map((opt, i) => /* @__PURE__ */ React5.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
|
615
732
|
)));
|
616
733
|
} else if (item.itemType === "custom") {
|
617
|
-
return /* @__PURE__ */
|
734
|
+
return /* @__PURE__ */ React5.createElement("div", { key: index }, item.content);
|
618
735
|
} else {
|
619
|
-
return item.subitems ? /* @__PURE__ */
|
736
|
+
return item.subitems ? /* @__PURE__ */ React5.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React5.createElement(
|
620
737
|
DropdownMenuSubTrigger,
|
621
738
|
{
|
622
739
|
dir: direction,
|
@@ -624,9 +741,9 @@ var DropdownMenu = ({
|
|
624
741
|
},
|
625
742
|
item.icon && item.icon,
|
626
743
|
item.label && item.label
|
627
|
-
), /* @__PURE__ */
|
744
|
+
), /* @__PURE__ */ React5.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React5.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => {
|
628
745
|
const SubitemLinkComponent = subitem.slug ? LinkComponent : "a";
|
629
|
-
return /* @__PURE__ */
|
746
|
+
return /* @__PURE__ */ React5.createElement(
|
630
747
|
DropdownMenuItem,
|
631
748
|
{
|
632
749
|
key: subIndex,
|
@@ -655,7 +772,7 @@ var DropdownMenu = ({
|
|
655
772
|
subitem.icon && subitem.icon,
|
656
773
|
subitem.label && subitem.label
|
657
774
|
);
|
658
|
-
})))) : /* @__PURE__ */
|
775
|
+
})))) : /* @__PURE__ */ React5.createElement(
|
659
776
|
DropdownMenuItem,
|
660
777
|
{
|
661
778
|
LinkComponent: ItemLinkComponent,
|
@@ -711,122 +828,6 @@ var DropdownMenu = ({
|
|
711
828
|
// elements/input/Input.tsx
|
712
829
|
var import_react4 = __toESM(require("react"));
|
713
830
|
|
714
|
-
// elements/label/Label.tsx
|
715
|
-
var React5 = __toESM(require("react"));
|
716
|
-
|
717
|
-
// elements/tooltip/Tooltip.tsx
|
718
|
-
var import_react2 = __toESM(require("react"));
|
719
|
-
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
720
|
-
var TooltipContent = import_react2.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(
|
721
|
-
TooltipPrimitive.Content,
|
722
|
-
{
|
723
|
-
ref,
|
724
|
-
sideOffset,
|
725
|
-
className: cn(
|
726
|
-
"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",
|
727
|
-
{
|
728
|
-
"hawa-text-xs": size === "small",
|
729
|
-
"hawa-text-xl": size === "large"
|
730
|
-
},
|
731
|
-
className
|
732
|
-
),
|
733
|
-
...props
|
734
|
-
}
|
735
|
-
));
|
736
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
737
|
-
var TooltipArrow = import_react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
738
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
739
|
-
var Tooltip = ({
|
740
|
-
side,
|
741
|
-
size,
|
742
|
-
open,
|
743
|
-
content,
|
744
|
-
children,
|
745
|
-
disabled,
|
746
|
-
defaultOpen,
|
747
|
-
onOpenChange,
|
748
|
-
triggerProps,
|
749
|
-
contentProps,
|
750
|
-
providerProps,
|
751
|
-
delayDuration = 300,
|
752
|
-
...props
|
753
|
-
}) => {
|
754
|
-
return /* @__PURE__ */ import_react2.default.createElement(
|
755
|
-
TooltipPrimitive.TooltipProvider,
|
756
|
-
{
|
757
|
-
delayDuration,
|
758
|
-
...providerProps
|
759
|
-
},
|
760
|
-
/* @__PURE__ */ import_react2.default.createElement(
|
761
|
-
TooltipPrimitive.Root,
|
762
|
-
{
|
763
|
-
open: !disabled && open,
|
764
|
-
defaultOpen,
|
765
|
-
onOpenChange,
|
766
|
-
...props
|
767
|
-
},
|
768
|
-
/* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
769
|
-
/* @__PURE__ */ import_react2.default.createElement(
|
770
|
-
TooltipContent,
|
771
|
-
{
|
772
|
-
size,
|
773
|
-
side,
|
774
|
-
align: "center",
|
775
|
-
...contentProps,
|
776
|
-
style: {
|
777
|
-
...contentProps == null ? void 0 : contentProps.style,
|
778
|
-
maxWidth: "var(--radix-tooltip-content-available-width)",
|
779
|
-
maxHeight: "var(--radix-tooltip-content-available-height)"
|
780
|
-
}
|
781
|
-
},
|
782
|
-
content
|
783
|
-
)
|
784
|
-
)
|
785
|
-
);
|
786
|
-
};
|
787
|
-
|
788
|
-
// elements/label/Label.tsx
|
789
|
-
var Label2 = React5.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React5.createElement(
|
790
|
-
"label",
|
791
|
-
{
|
792
|
-
ref,
|
793
|
-
className: cn(
|
794
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
795
|
-
className
|
796
|
-
),
|
797
|
-
...props
|
798
|
-
},
|
799
|
-
children,
|
800
|
-
required && /* @__PURE__ */ React5.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
801
|
-
), hint && /* @__PURE__ */ React5.createElement(
|
802
|
-
Tooltip,
|
803
|
-
{
|
804
|
-
content: hint,
|
805
|
-
side: hintSide,
|
806
|
-
triggerProps: {
|
807
|
-
tabIndex: -1,
|
808
|
-
onClick: (event) => event.preventDefault()
|
809
|
-
}
|
810
|
-
},
|
811
|
-
/* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement(
|
812
|
-
"svg",
|
813
|
-
{
|
814
|
-
xmlns: "http://www.w3.org/2000/svg",
|
815
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
816
|
-
viewBox: "0 0 24 24",
|
817
|
-
fill: "none",
|
818
|
-
stroke: "currentColor",
|
819
|
-
strokeWidth: "2",
|
820
|
-
strokeLinecap: "round",
|
821
|
-
strokeLinejoin: "round"
|
822
|
-
},
|
823
|
-
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
824
|
-
/* @__PURE__ */ React5.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
825
|
-
/* @__PURE__ */ React5.createElement("path", { d: "M12 17h.01" })
|
826
|
-
))
|
827
|
-
)));
|
828
|
-
Label2.displayName = "Label";
|
829
|
-
|
830
831
|
// elements/skeleton/Skeleton.tsx
|
831
832
|
var import_react3 = __toESM(require("react"));
|
832
833
|
function Skeleton({
|
@@ -918,7 +919,7 @@ var Input = (0, import_react4.forwardRef)(
|
|
918
919
|
"hawa-w-full hawa-gap-2"
|
919
920
|
)
|
920
921
|
},
|
921
|
-
props.label && /* @__PURE__ */ import_react4.default.createElement(
|
922
|
+
props.label && /* @__PURE__ */ import_react4.default.createElement(Label, { ...labelProps }, props.label),
|
922
923
|
/* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react4.default.createElement(
|
923
924
|
"span",
|
924
925
|
{
|
@@ -1227,7 +1228,9 @@ var DataTable = ({
|
|
1227
1228
|
checked: column.getIsVisible(),
|
1228
1229
|
onCheckedChange: (value) => column.toggleVisibility(!!value)
|
1229
1230
|
},
|
1230
|
-
|
1231
|
+
translateFn ? translateFn(
|
1232
|
+
((_a2 = column.columnDef.meta) == null ? void 0 : _a2.i18nKey) ? (_b2 = column.columnDef.meta) == null ? void 0 : _b2.i18nKey : column.id
|
1233
|
+
) : column.id
|
1231
1234
|
);
|
1232
1235
|
})
|
1233
1236
|
))), props.isLoading ? /* @__PURE__ */ React9.createElement(Skeleton, { className: "hawa-h-[130px] hawa-w-full" }) : /* @__PURE__ */ React9.createElement(
|