@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
@@ -0,0 +1,630 @@
|
|
1
|
+
"use client";
|
2
|
+
"use strict";
|
3
|
+
var __create = Object.create;
|
4
|
+
var __defProp = Object.defineProperty;
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
9
|
+
var __export = (target, all) => {
|
10
|
+
for (var name in all)
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
12
|
+
};
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
15
|
+
for (let key of __getOwnPropNames(from))
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
18
|
+
}
|
19
|
+
return to;
|
20
|
+
};
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
27
|
+
mod
|
28
|
+
));
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
30
|
+
|
31
|
+
// elements/datePicker/index.ts
|
32
|
+
var datePicker_exports = {};
|
33
|
+
__export(datePicker_exports, {
|
34
|
+
DatePicker: () => DatePicker,
|
35
|
+
DatePickerButton: () => DatePickerButton
|
36
|
+
});
|
37
|
+
module.exports = __toCommonJS(datePicker_exports);
|
38
|
+
|
39
|
+
// elements/datePicker/DatePicker.tsx
|
40
|
+
var React8 = __toESM(require("react"));
|
41
|
+
|
42
|
+
// elements/calendar/Calendar.tsx
|
43
|
+
var React6 = __toESM(require("react"));
|
44
|
+
var import_react_day_picker = require("react-day-picker");
|
45
|
+
|
46
|
+
// util/index.ts
|
47
|
+
var import_clsx = require("clsx");
|
48
|
+
var import_tailwind_merge = require("tailwind-merge");
|
49
|
+
function cn(...inputs) {
|
50
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
51
|
+
}
|
52
|
+
|
53
|
+
// elements/button/Button.tsx
|
54
|
+
var React5 = __toESM(require("react"));
|
55
|
+
var import_class_variance_authority = require("class-variance-authority");
|
56
|
+
|
57
|
+
// elements/label/Label.tsx
|
58
|
+
var React3 = __toESM(require("react"));
|
59
|
+
|
60
|
+
// elements/tooltip/Tooltip.tsx
|
61
|
+
var import_react = __toESM(require("react"));
|
62
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
63
|
+
var TooltipContent = import_react.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(
|
64
|
+
TooltipPrimitive.Content,
|
65
|
+
{
|
66
|
+
ref,
|
67
|
+
sideOffset,
|
68
|
+
className: cn(
|
69
|
+
"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",
|
70
|
+
{
|
71
|
+
"hawa-text-xs": size === "small",
|
72
|
+
"hawa-text-xl": size === "large"
|
73
|
+
},
|
74
|
+
className
|
75
|
+
),
|
76
|
+
...props
|
77
|
+
}
|
78
|
+
));
|
79
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
80
|
+
var TooltipArrow = import_react.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
81
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
82
|
+
var Tooltip = ({
|
83
|
+
side,
|
84
|
+
size,
|
85
|
+
open,
|
86
|
+
content,
|
87
|
+
children,
|
88
|
+
disabled,
|
89
|
+
defaultOpen,
|
90
|
+
onOpenChange,
|
91
|
+
triggerProps,
|
92
|
+
contentProps,
|
93
|
+
providerProps,
|
94
|
+
delayDuration = 300,
|
95
|
+
...props
|
96
|
+
}) => {
|
97
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
98
|
+
TooltipPrimitive.TooltipProvider,
|
99
|
+
{
|
100
|
+
delayDuration,
|
101
|
+
...providerProps
|
102
|
+
},
|
103
|
+
/* @__PURE__ */ import_react.default.createElement(
|
104
|
+
TooltipPrimitive.Root,
|
105
|
+
{
|
106
|
+
open: !disabled && open,
|
107
|
+
defaultOpen,
|
108
|
+
onOpenChange,
|
109
|
+
...props
|
110
|
+
},
|
111
|
+
/* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
112
|
+
/* @__PURE__ */ import_react.default.createElement(
|
113
|
+
TooltipContent,
|
114
|
+
{
|
115
|
+
size,
|
116
|
+
side,
|
117
|
+
align: "center",
|
118
|
+
...contentProps,
|
119
|
+
style: {
|
120
|
+
...contentProps == null ? void 0 : contentProps.style,
|
121
|
+
maxWidth: "var(--radix-tooltip-content-available-width)",
|
122
|
+
maxHeight: "var(--radix-tooltip-content-available-height)"
|
123
|
+
}
|
124
|
+
},
|
125
|
+
content
|
126
|
+
)
|
127
|
+
)
|
128
|
+
);
|
129
|
+
};
|
130
|
+
|
131
|
+
// elements/label/Label.tsx
|
132
|
+
var Label = React3.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React3.createElement(
|
133
|
+
"label",
|
134
|
+
{
|
135
|
+
ref,
|
136
|
+
className: cn(
|
137
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
138
|
+
className
|
139
|
+
),
|
140
|
+
...props
|
141
|
+
},
|
142
|
+
children,
|
143
|
+
required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
144
|
+
), hint && /* @__PURE__ */ React3.createElement(
|
145
|
+
Tooltip,
|
146
|
+
{
|
147
|
+
content: hint,
|
148
|
+
side: hintSide,
|
149
|
+
triggerProps: {
|
150
|
+
tabIndex: -1,
|
151
|
+
onClick: (event) => event.preventDefault()
|
152
|
+
}
|
153
|
+
},
|
154
|
+
/* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
155
|
+
"svg",
|
156
|
+
{
|
157
|
+
xmlns: "http://www.w3.org/2000/svg",
|
158
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
159
|
+
viewBox: "0 0 24 24",
|
160
|
+
fill: "none",
|
161
|
+
stroke: "currentColor",
|
162
|
+
strokeWidth: "2",
|
163
|
+
strokeLinecap: "round",
|
164
|
+
strokeLinejoin: "round"
|
165
|
+
},
|
166
|
+
/* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
167
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
168
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
|
169
|
+
))
|
170
|
+
)));
|
171
|
+
Label.displayName = "Label";
|
172
|
+
|
173
|
+
// elements/loading/Loading.tsx
|
174
|
+
var import_react2 = __toESM(require("react"));
|
175
|
+
var Loading = ({
|
176
|
+
design = "spinner",
|
177
|
+
size = "normal",
|
178
|
+
themeMode = "light",
|
179
|
+
classNames,
|
180
|
+
color,
|
181
|
+
...props
|
182
|
+
}) => {
|
183
|
+
let sizeStyles = {
|
184
|
+
button: "hawa-h-4 hawa-w-4",
|
185
|
+
xs: "hawa-h-1 hawa-w-1",
|
186
|
+
sm: "hawa-h-6 hawa-w-6",
|
187
|
+
normal: "hawa-h-8 hawa-w-8",
|
188
|
+
lg: "hawa-h-14 hawa-w-14",
|
189
|
+
xl: "hawa-h-24 hawa-w-24"
|
190
|
+
};
|
191
|
+
let progressSizes = {
|
192
|
+
button: "hawa-h-1",
|
193
|
+
xs: "hawa-h-1 hawa-w-1",
|
194
|
+
sm: "hawa-h-6 hawa-w-6",
|
195
|
+
normal: "",
|
196
|
+
lg: "hawa-h-6",
|
197
|
+
xl: "hawa-h-10 hawa-w-64"
|
198
|
+
};
|
199
|
+
let animationStyles = {
|
200
|
+
pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
|
201
|
+
bounce: "hawa-animate-bounce"
|
202
|
+
};
|
203
|
+
switch (design.split("-")[0]) {
|
204
|
+
case "dots":
|
205
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
206
|
+
"div",
|
207
|
+
{
|
208
|
+
className: cn(
|
209
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
210
|
+
classNames == null ? void 0 : classNames.container
|
211
|
+
)
|
212
|
+
},
|
213
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
214
|
+
"div",
|
215
|
+
{
|
216
|
+
className: cn(
|
217
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
|
218
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
219
|
+
animationStyles[design.split("-")[1]],
|
220
|
+
color ? color : "hawa-bg-primary"
|
221
|
+
)
|
222
|
+
}
|
223
|
+
),
|
224
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
225
|
+
"div",
|
226
|
+
{
|
227
|
+
className: cn(
|
228
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
|
229
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
230
|
+
animationStyles[design.split("-")[1]],
|
231
|
+
color ? color : "hawa-bg-primary"
|
232
|
+
)
|
233
|
+
}
|
234
|
+
),
|
235
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
236
|
+
"div",
|
237
|
+
{
|
238
|
+
className: cn(
|
239
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
|
240
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
241
|
+
animationStyles[design.split("-")[1]],
|
242
|
+
color ? color : "hawa-bg-primary"
|
243
|
+
)
|
244
|
+
}
|
245
|
+
)
|
246
|
+
);
|
247
|
+
case "square":
|
248
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
249
|
+
"svg",
|
250
|
+
{
|
251
|
+
className: cn(
|
252
|
+
"squircle-container",
|
253
|
+
sizeStyles[size],
|
254
|
+
classNames == null ? void 0 : classNames.container
|
255
|
+
),
|
256
|
+
viewBox: "0 0 35 35",
|
257
|
+
height: "35",
|
258
|
+
width: "35"
|
259
|
+
},
|
260
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
261
|
+
"rect",
|
262
|
+
{
|
263
|
+
className: "squircle-track",
|
264
|
+
x: "2.5",
|
265
|
+
y: "2.5",
|
266
|
+
fill: "none",
|
267
|
+
strokeWidth: "5px",
|
268
|
+
width: "32.5",
|
269
|
+
height: "32.5"
|
270
|
+
}
|
271
|
+
),
|
272
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
273
|
+
"rect",
|
274
|
+
{
|
275
|
+
className: "square-car",
|
276
|
+
x: "2.5",
|
277
|
+
y: "2.5",
|
278
|
+
fill: "none",
|
279
|
+
strokeWidth: "5px",
|
280
|
+
width: "32.5",
|
281
|
+
height: "32.5",
|
282
|
+
pathLength: "100"
|
283
|
+
}
|
284
|
+
)
|
285
|
+
);
|
286
|
+
case "squircle":
|
287
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
288
|
+
"svg",
|
289
|
+
{
|
290
|
+
x: "0px",
|
291
|
+
y: "0px",
|
292
|
+
viewBox: "0 0 37 37",
|
293
|
+
height: "37",
|
294
|
+
width: "37",
|
295
|
+
preserveAspectRatio: "xMidYMid meet",
|
296
|
+
className: cn(
|
297
|
+
"squircle-container",
|
298
|
+
sizeStyles[size],
|
299
|
+
classNames == null ? void 0 : classNames.container
|
300
|
+
)
|
301
|
+
},
|
302
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
303
|
+
"path",
|
304
|
+
{
|
305
|
+
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
306
|
+
fill: "none",
|
307
|
+
strokeWidth: "5",
|
308
|
+
pathLength: "100",
|
309
|
+
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"
|
310
|
+
}
|
311
|
+
),
|
312
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
313
|
+
"path",
|
314
|
+
{
|
315
|
+
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
316
|
+
fill: "none",
|
317
|
+
strokeWidth: "5",
|
318
|
+
pathLength: "100",
|
319
|
+
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"
|
320
|
+
}
|
321
|
+
)
|
322
|
+
);
|
323
|
+
case "progress":
|
324
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
325
|
+
"div",
|
326
|
+
{
|
327
|
+
className: cn(
|
328
|
+
"progress-loading after:hawa-rounded hawa-rounded",
|
329
|
+
progressSizes[size],
|
330
|
+
classNames == null ? void 0 : classNames.container
|
331
|
+
)
|
332
|
+
}
|
333
|
+
);
|
334
|
+
case "orbit":
|
335
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
336
|
+
default:
|
337
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
338
|
+
"svg",
|
339
|
+
{
|
340
|
+
viewBox: "0 0 40 40",
|
341
|
+
height: "40",
|
342
|
+
width: "40",
|
343
|
+
className: cn(
|
344
|
+
"circle-container",
|
345
|
+
sizeStyles[size],
|
346
|
+
classNames == null ? void 0 : classNames.container
|
347
|
+
)
|
348
|
+
},
|
349
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
350
|
+
"circle",
|
351
|
+
{
|
352
|
+
className: cn(
|
353
|
+
"circle-track",
|
354
|
+
{
|
355
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
356
|
+
"hawa-stroke-primary": themeMode === "light"
|
357
|
+
},
|
358
|
+
classNames == null ? void 0 : classNames.track
|
359
|
+
),
|
360
|
+
cx: "20",
|
361
|
+
cy: "20",
|
362
|
+
r: "17.5",
|
363
|
+
fill: "none",
|
364
|
+
strokeWidth: "5px",
|
365
|
+
pathLength: "100"
|
366
|
+
}
|
367
|
+
),
|
368
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
369
|
+
"circle",
|
370
|
+
{
|
371
|
+
className: cn(
|
372
|
+
"circle-car",
|
373
|
+
{
|
374
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
375
|
+
"hawa-stroke-primary": themeMode === "light"
|
376
|
+
},
|
377
|
+
classNames == null ? void 0 : classNames.car
|
378
|
+
),
|
379
|
+
cx: "20",
|
380
|
+
cy: "20",
|
381
|
+
r: "17.5",
|
382
|
+
fill: "none",
|
383
|
+
pathLength: "100",
|
384
|
+
strokeWidth: "5px"
|
385
|
+
}
|
386
|
+
)
|
387
|
+
);
|
388
|
+
}
|
389
|
+
};
|
390
|
+
|
391
|
+
// elements/button/Button.tsx
|
392
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
393
|
+
"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
394
|
+
{
|
395
|
+
variants: {
|
396
|
+
variant: {
|
397
|
+
default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
|
398
|
+
light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
|
399
|
+
destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
|
400
|
+
outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
401
|
+
secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
|
402
|
+
ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
403
|
+
link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
|
404
|
+
combobox: "hawa-bg-background hawa-border",
|
405
|
+
neoBrutalism: "neo-brutalism"
|
406
|
+
// "hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active",
|
407
|
+
},
|
408
|
+
size: {
|
409
|
+
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
410
|
+
heightless: "hawa-px-4 hawa-py-4",
|
411
|
+
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
412
|
+
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
413
|
+
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
414
|
+
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
415
|
+
icon: "hawa-h-10 hawa-w-10",
|
416
|
+
smallIcon: "hawa-h-7 hawa-w-7"
|
417
|
+
}
|
418
|
+
},
|
419
|
+
defaultVariants: {
|
420
|
+
variant: "default",
|
421
|
+
size: "default"
|
422
|
+
}
|
423
|
+
}
|
424
|
+
);
|
425
|
+
var Button = React5.forwardRef(
|
426
|
+
({
|
427
|
+
className,
|
428
|
+
label,
|
429
|
+
variant,
|
430
|
+
size,
|
431
|
+
asChild = false,
|
432
|
+
centered = true,
|
433
|
+
isLoading,
|
434
|
+
children,
|
435
|
+
...props
|
436
|
+
}, ref) => {
|
437
|
+
const Comp = "button";
|
438
|
+
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
439
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col" }, label && /* @__PURE__ */ React5.createElement(Label, { className: "hawa-mb-2" }, label), /* @__PURE__ */ React5.createElement(
|
440
|
+
Comp,
|
441
|
+
{
|
442
|
+
className: cn(
|
443
|
+
buttonVariants({ variant, size, className }),
|
444
|
+
centered && "hawa-justify-center"
|
445
|
+
),
|
446
|
+
ref,
|
447
|
+
...props
|
448
|
+
},
|
449
|
+
isLoading ? /* @__PURE__ */ React5.createElement(
|
450
|
+
Loading,
|
451
|
+
{
|
452
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
453
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
454
|
+
color: loadingColor,
|
455
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
456
|
+
}
|
457
|
+
) : children
|
458
|
+
));
|
459
|
+
}
|
460
|
+
);
|
461
|
+
Button.displayName = "Button";
|
462
|
+
|
463
|
+
// elements/calendar/Calendar.tsx
|
464
|
+
function Calendar({
|
465
|
+
className,
|
466
|
+
classNames,
|
467
|
+
showOutsideDays = true,
|
468
|
+
...props
|
469
|
+
}) {
|
470
|
+
return /* @__PURE__ */ React6.createElement(
|
471
|
+
import_react_day_picker.DayPicker,
|
472
|
+
{
|
473
|
+
showOutsideDays,
|
474
|
+
className: cn("hawa-p-3", className),
|
475
|
+
classNames: {
|
476
|
+
months: "hawa-flex hawa-flex-col sm:hawa-flex-row hawa-space-y-4 sm:hawa-space-x-4 sm:hawa-space-y-0",
|
477
|
+
month: "hawa-space-y-4",
|
478
|
+
caption: "hawa-flex hawa-justify-center hawa-pt-1 hawa-relative hawa-items-center",
|
479
|
+
caption_label: "hawa-text-sm hawa-font-medium",
|
480
|
+
nav: "hawa-space-x-1 hawa-flex hawa-items-center",
|
481
|
+
nav_button: cn(
|
482
|
+
buttonVariants({ variant: "outline" }),
|
483
|
+
"hawa-h-7 hawa-w-7 hawa-bg-transparent hawa-p-0 hawa-opacity-50 hover:hawa-opacity-100"
|
484
|
+
),
|
485
|
+
nav_button_previous: "hawa-absolute hawa-start-1 !hawa-h-8 !hawa-w-8 !hawa-p-0 hawa-justify-center",
|
486
|
+
nav_button_next: "hawa-absolute hawa-end-1 !hawa-h-8 !hawa-w-8 !hawa-p-0 hawa-justify-center",
|
487
|
+
table: "hawa-w-full hawa-border-collapse hawa-space-y-1 ",
|
488
|
+
head_row: "hawa-flex",
|
489
|
+
head_cell: "hawa-text-muted-foreground hawa-rounded-md hawa-w-9 hawa-font-normal hawa-text-[0.8rem]",
|
490
|
+
row: "hawa-flex hawa-w-full hawa-mt-2",
|
491
|
+
cell: "hawa-h-9 hawa-w-9 hawa-text-center hawa-text-sm hawa-p-0 hawa-relative [&:has([aria-selected].day-range-end)]:hawa-rounded-r-md [&:has([aria-selected].day-outside)]:hawa-bg-accent/50 [&:has([aria-selected])]:hawa-bg-accent first:[&:has([aria-selected])]:hawa-rounded-l-md last:[&:has([aria-selected])]:hawa-rounded-r-md focus-within:hawa-relative focus-within:hawa-z-20",
|
492
|
+
day: cn(
|
493
|
+
buttonVariants({ variant: "ghost" }),
|
494
|
+
"hawa-h-9 hawa-w-9 hawa-justify-center !hawa-p-0 hawa-font-normal aria-selected:hawa-opacity-100"
|
495
|
+
),
|
496
|
+
day_range_end: "day-range-end",
|
497
|
+
day_selected: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary hover:hawa-text-primary-foreground focus:hawa-bg-primary focus:hawa-text-primary-foreground",
|
498
|
+
day_today: "hawa-bg-accent hawa-text-accent-foreground",
|
499
|
+
day_outside: "day-outside hawa-text-muted-foreground hawa-opacity-50 aria-selected:hawa-bg-accent/50 aria-selected:hawa-text-muted-foreground aria-selected:hawa-opacity-30",
|
500
|
+
day_disabled: "hawa-text-muted-foreground hawa-opacity-50",
|
501
|
+
day_range_middle: "aria-selected:hawa-bg-accent aria-selected:hawa-text-accent-foreground",
|
502
|
+
day_hidden: "hawa-invisible",
|
503
|
+
...classNames
|
504
|
+
},
|
505
|
+
components: {
|
506
|
+
IconLeft: ({ ...props2 }) => /* @__PURE__ */ React6.createElement(
|
507
|
+
"svg",
|
508
|
+
{
|
509
|
+
xmlns: "http://www.w3.org/2000/svg",
|
510
|
+
width: "20",
|
511
|
+
height: "20",
|
512
|
+
"aria-label": "Next Month",
|
513
|
+
viewBox: "0 0 24 24",
|
514
|
+
fill: "none",
|
515
|
+
stroke: "currentColor",
|
516
|
+
strokeWidth: "2",
|
517
|
+
strokeLinecap: "round",
|
518
|
+
strokeLinejoin: "round"
|
519
|
+
},
|
520
|
+
/* @__PURE__ */ React6.createElement("path", { d: "m15 18-6-6 6-6" })
|
521
|
+
),
|
522
|
+
IconRight: ({ ...props2 }) => /* @__PURE__ */ React6.createElement(
|
523
|
+
"svg",
|
524
|
+
{
|
525
|
+
xmlns: "http://www.w3.org/2000/svg",
|
526
|
+
width: "20",
|
527
|
+
height: "20",
|
528
|
+
"aria-label": "Next Month",
|
529
|
+
viewBox: "0 0 24 24",
|
530
|
+
fill: "none",
|
531
|
+
stroke: "currentColor",
|
532
|
+
strokeWidth: "2",
|
533
|
+
strokeLinecap: "round",
|
534
|
+
strokeLinejoin: "round",
|
535
|
+
className: "hawa-rotate-180"
|
536
|
+
},
|
537
|
+
/* @__PURE__ */ React6.createElement("path", { d: "m15 18-6-6 6-6" })
|
538
|
+
)
|
539
|
+
},
|
540
|
+
...props
|
541
|
+
}
|
542
|
+
);
|
543
|
+
}
|
544
|
+
Calendar.displayName = "Calendar";
|
545
|
+
|
546
|
+
// elements/popover/Popover.tsx
|
547
|
+
var React7 = __toESM(require("react"));
|
548
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
549
|
+
var PopoverContent = React7.forwardRef(
|
550
|
+
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React7.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React7.createElement(
|
551
|
+
PopoverPrimitive.Content,
|
552
|
+
{
|
553
|
+
ref,
|
554
|
+
align,
|
555
|
+
sideOffset,
|
556
|
+
className: cn(
|
557
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
558
|
+
className
|
559
|
+
),
|
560
|
+
...props
|
561
|
+
}
|
562
|
+
))
|
563
|
+
);
|
564
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
565
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
566
|
+
var PopoverRoot = PopoverPrimitive.Root;
|
567
|
+
|
568
|
+
// elements/datePicker/DatePicker.tsx
|
569
|
+
var DatePicker = ({
|
570
|
+
trigger,
|
571
|
+
popoverTriggerProps,
|
572
|
+
...props
|
573
|
+
}) => {
|
574
|
+
return /* @__PURE__ */ React8.createElement(PopoverRoot, null, /* @__PURE__ */ React8.createElement(PopoverTrigger, { ...popoverTriggerProps }, trigger), /* @__PURE__ */ React8.createElement(PopoverContent, null, /* @__PURE__ */ React8.createElement(Calendar, { ...props })));
|
575
|
+
};
|
576
|
+
|
577
|
+
// elements/datePicker/DatePickerButton.tsx
|
578
|
+
var DatePickerButton = ({
|
579
|
+
label,
|
580
|
+
value,
|
581
|
+
multiple
|
582
|
+
}) => {
|
583
|
+
return /* @__PURE__ */ React.createElement(
|
584
|
+
Button,
|
585
|
+
{
|
586
|
+
label,
|
587
|
+
variant: "outline",
|
588
|
+
className: cn(
|
589
|
+
"!hawa-w-full hawa-flex hawa-flex-row",
|
590
|
+
multiple && "hawa-flex-row"
|
591
|
+
),
|
592
|
+
title: value
|
593
|
+
},
|
594
|
+
/* @__PURE__ */ React.createElement(
|
595
|
+
"span",
|
596
|
+
{
|
597
|
+
className: cn(
|
598
|
+
"hawa-flex hawa-flex-row hawa-gap-1 hawa-text-start hawa-me-2 hawa-truncate",
|
599
|
+
multiple ? "hawa-flex-wrap" : "hawa-overflow-hidden"
|
600
|
+
)
|
601
|
+
},
|
602
|
+
value
|
603
|
+
),
|
604
|
+
/* @__PURE__ */ React.createElement("div", { className: "hawa-ml-auto hawa-opacity-50" }, /* @__PURE__ */ React.createElement(
|
605
|
+
"svg",
|
606
|
+
{
|
607
|
+
xmlns: "http://www.w3.org/2000/svg",
|
608
|
+
width: "24",
|
609
|
+
height: "24",
|
610
|
+
viewBox: "0 0 24 24",
|
611
|
+
fill: "none",
|
612
|
+
stroke: "currentColor",
|
613
|
+
strokeWidth: "2",
|
614
|
+
strokeLinecap: "round",
|
615
|
+
strokeLinejoin: "round",
|
616
|
+
className: "hawa-h-4 hawa-w-4"
|
617
|
+
},
|
618
|
+
/* @__PURE__ */ React.createElement("path", { d: "M8 2v4" }),
|
619
|
+
/* @__PURE__ */ React.createElement("path", { d: "M16 2v4" }),
|
620
|
+
/* @__PURE__ */ React.createElement("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }),
|
621
|
+
/* @__PURE__ */ React.createElement("path", { d: "M3 10h18" })
|
622
|
+
))
|
623
|
+
);
|
624
|
+
};
|
625
|
+
// Annotate the CommonJS export names for ESM import in node:
|
626
|
+
0 && (module.exports = {
|
627
|
+
DatePicker,
|
628
|
+
DatePickerButton
|
629
|
+
});
|
630
|
+
//# sourceMappingURL=index.js.map
|