@sikka/hawa 0.23.2-next → 0.23.7-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/accordion/index.js +30 -2399
- package/dist/accordion/index.mjs +19 -461
- package/dist/alert/index.mjs +0 -1
- package/dist/appStores/index.js +75 -0
- package/dist/appStores/index.mjs +38 -0
- package/dist/avatar/index.mjs +118 -3
- package/dist/backToTop/index.mjs +102 -4
- package/dist/badge/index.js +127 -0
- package/dist/badge/index.mjs +84 -0
- package/dist/blocks/auth/index.js +1173 -3092
- package/dist/blocks/auth/index.mjs +16 -10
- package/dist/blocks/feedback/index.js +864 -2913
- package/dist/blocks/feedback/index.mjs +14 -8
- package/dist/blocks/index.js +5714 -5316
- package/dist/blocks/index.mjs +390 -45
- package/dist/blocks/misc/index.js +634 -2409
- package/dist/blocks/misc/index.mjs +14 -8
- package/dist/blocks/pricing/index.js +522 -524
- package/dist/blocks/pricing/index.mjs +1861 -45
- package/dist/breadcrumb/index.js +63 -0
- package/dist/breadcrumb/index.mjs +26 -0
- package/dist/card/index.mjs +83 -8
- package/dist/checkbox/index.mjs +138 -3
- package/dist/chip/index.js +129 -0
- package/dist/chip/index.mjs +8 -0
- package/dist/{chunk-X6PCWJYD.mjs → chunk-2R2QPJT7.mjs} +761 -1104
- package/dist/chunk-677VOLD4.mjs +464 -0
- package/dist/chunk-72HYR6WB.mjs +88 -0
- package/dist/chunk-A25EXELT.mjs +131 -0
- package/dist/{chunk-OE27DSIY.mjs → chunk-F6TKEDDP.mjs} +2 -4
- package/dist/{chunk-YFC2GSJ6.mjs → chunk-P2O6R3S6.mjs} +66 -5
- package/dist/{chunk-GXXX5UB4.mjs → chunk-QGKW5R5F.mjs} +59 -20
- package/dist/chunk-TR56G3NM.mjs +2350 -0
- package/dist/chunk-UAVBFK53.mjs +346 -0
- package/dist/combobox/index.mjs +153 -7
- package/dist/dataTable/index.mjs +355 -8
- package/dist/elements/index.js +800 -1148
- package/dist/elements/index.mjs +1 -11
- package/dist/fileDropzone/index.mjs +226 -4
- package/dist/index.js +1721 -1721
- package/dist/index.mjs +1663 -1663
- package/dist/layout/index.js +493 -510
- package/dist/layout/index.mjs +1 -1
- package/dist/loading/index.mjs +0 -1
- package/dist/logos/index.mjs +204 -3
- package/dist/navigationMenu/index.mjs +155 -13
- package/dist/phoneInput/index.js +2074 -0
- package/dist/phoneInput/index.mjs +1776 -0
- package/dist/pinInput/index.js +130 -0
- package/dist/pinInput/index.mjs +88 -0
- package/dist/progress/index.js +71 -0
- package/dist/progress/index.mjs +29 -0
- package/dist/radio/index.mjs +202 -4
- package/dist/scrollArea/index.js +90 -0
- package/dist/scrollArea/index.mjs +47 -0
- package/dist/select/index.mjs +1 -1
- package/dist/sheet/index.mjs +137 -12
- package/dist/sortButton/index.mjs +40 -4
- package/dist/stopPropagationWrapper/index.js +48 -0
- package/dist/stopPropagationWrapper/index.mjs +11 -0
- package/dist/switch/index.mjs +79 -3
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/index.mjs +68 -6
- package/dist/textarea/index.mjs +54 -4
- package/package.json +2 -2
- package/dist/Chip-DJ6ThZc_.d.ts +0 -21
- package/dist/Chip-eal8vwDz.d.mts +0 -21
- package/dist/accordion/index.d.mts +0 -42
- package/dist/accordion/index.d.ts +0 -42
- package/dist/alert/index.d.mts +0 -28
- package/dist/alert/index.d.ts +0 -28
- package/dist/avatar/index.d.mts +0 -15
- package/dist/avatar/index.d.ts +0 -15
- package/dist/backToTop/index.d.mts +0 -15
- package/dist/backToTop/index.d.ts +0 -15
- package/dist/button/index.d.mts +0 -16
- package/dist/button/index.d.ts +0 -16
- package/dist/card/index.d.mts +0 -17
- package/dist/card/index.d.ts +0 -17
- package/dist/checkbox/index.d.mts +0 -20
- package/dist/checkbox/index.d.ts +0 -20
- package/dist/chunk-BK5WF7UO.mjs +0 -231
- package/dist/chunk-CXWYC6FS.mjs +0 -360
- package/dist/chunk-D2USGMDT.mjs +0 -208
- package/dist/chunk-DX4SLF2L.mjs +0 -45
- package/dist/chunk-ENNSA4VR.mjs +0 -5566
- package/dist/chunk-GXSYCLZZ.mjs +0 -158
- package/dist/chunk-IQPGAHUR.mjs +0 -107
- package/dist/chunk-POT2IP62.mjs +0 -123
- package/dist/chunk-TWDZB2VH.mjs +0 -151
- package/dist/chunk-VBTYVVA7.mjs +0 -93
- package/dist/chunk-VCGW5DIP.mjs +0 -170
- package/dist/chunk-X3SMPIA3.mjs +0 -0
- package/dist/chunk-XA646BZ2.mjs +0 -143
- package/dist/chunk-ZCUUQ5VV.mjs +0 -84
- package/dist/combobox/index.d.mts +0 -32
- package/dist/combobox/index.d.ts +0 -32
- package/dist/command/index.d.mts +0 -48
- package/dist/command/index.d.ts +0 -48
- package/dist/commonTypes-gbO4hPli.d.mts +0 -7
- package/dist/commonTypes-gbO4hPli.d.ts +0 -7
- package/dist/dataTable/index.d.mts +0 -39
- package/dist/dataTable/index.d.ts +0 -39
- package/dist/dialog/index.d.mts +0 -57
- package/dist/dialog/index.d.ts +0 -57
- package/dist/dropdownMenu/index.d.mts +0 -95
- package/dist/dropdownMenu/index.d.ts +0 -95
- package/dist/fileDropzone/index.d.mts +0 -37
- package/dist/fileDropzone/index.d.ts +0 -37
- package/dist/input/index.d.mts +0 -36
- package/dist/input/index.d.ts +0 -36
- package/dist/label/index.d.mts +0 -12
- package/dist/label/index.d.ts +0 -12
- package/dist/loading/index.d.mts +0 -15
- package/dist/loading/index.d.ts +0 -15
- package/dist/logos/index.d.mts +0 -27
- package/dist/logos/index.d.ts +0 -27
- package/dist/navigationMenu/index.d.mts +0 -39
- package/dist/navigationMenu/index.d.ts +0 -39
- package/dist/popover/index.d.mts +0 -23
- package/dist/popover/index.d.ts +0 -23
- package/dist/radio/index.d.mts +0 -28
- package/dist/radio/index.d.ts +0 -28
- package/dist/select/index.d.mts +0 -43
- package/dist/select/index.d.ts +0 -43
- package/dist/sheet/index.d.mts +0 -30
- package/dist/sheet/index.d.ts +0 -30
- package/dist/skeleton/index.d.mts +0 -10
- package/dist/skeleton/index.d.ts +0 -10
- package/dist/sortButton/index.d.mts +0 -10
- package/dist/sortButton/index.d.ts +0 -10
- package/dist/splitButton/index.d.mts +0 -15
- package/dist/splitButton/index.d.ts +0 -15
- package/dist/switch/index.d.mts +0 -12
- package/dist/switch/index.d.ts +0 -12
- package/dist/table/index.d.mts +0 -21
- package/dist/table/index.d.ts +0 -21
- package/dist/tabs/index.d.mts +0 -16
- package/dist/tabs/index.d.ts +0 -16
- package/dist/textarea/index.d.mts +0 -17
- package/dist/textarea/index.d.ts +0 -17
- package/dist/tooltip/index.d.mts +0 -26
- package/dist/tooltip/index.d.ts +0 -26
- /package/dist/{chunk-A7OPD7H7.mjs → chunk-B6UCD4GP.mjs} +0 -0
- /package/dist/{chunk-O2ALK7UE.mjs → chunk-Z4M72OD3.mjs} +0 -0
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
// components/util.ts
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
function cn(...inputs) {
|
|
5
|
+
return twMerge(clsx(inputs));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// components/elements/button/Button.tsx
|
|
9
|
+
import * as React2 from "react";
|
|
10
|
+
import { cva } from "class-variance-authority";
|
|
11
|
+
|
|
12
|
+
// components/elements/loading/Loading.tsx
|
|
13
|
+
import React from "react";
|
|
14
|
+
var Loading = ({
|
|
15
|
+
design = "spinner",
|
|
16
|
+
size = "sm",
|
|
17
|
+
themeMode = "light",
|
|
18
|
+
color,
|
|
19
|
+
...props
|
|
20
|
+
}) => {
|
|
21
|
+
let sizeStyles = {
|
|
22
|
+
button: "hawa-h-4 hawa-w-4",
|
|
23
|
+
xs: "hawa-h-1 hawa-w-1",
|
|
24
|
+
sm: "hawa-h-6 hawa-w-6",
|
|
25
|
+
normal: "hawa-h-8 hawa-w-8",
|
|
26
|
+
lg: "hawa-h-14 hawa-w-14",
|
|
27
|
+
xl: "hawa-h-24 hawa-w-24"
|
|
28
|
+
};
|
|
29
|
+
let animationStyles = {
|
|
30
|
+
pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
|
|
31
|
+
bounce: "hawa-animate-bounce"
|
|
32
|
+
};
|
|
33
|
+
switch (design.split("-")[0]) {
|
|
34
|
+
case "dots":
|
|
35
|
+
return /* @__PURE__ */ React.createElement(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
|
|
39
|
+
},
|
|
40
|
+
/* @__PURE__ */ React.createElement(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: cn(
|
|
44
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
|
|
45
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
|
46
|
+
animationStyles[design.split("-")[1]],
|
|
47
|
+
color ? color : "hawa-bg-primary"
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ React.createElement(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: cn(
|
|
55
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
|
|
56
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
|
57
|
+
animationStyles[design.split("-")[1]],
|
|
58
|
+
color ? color : "hawa-bg-primary"
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ React.createElement(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: cn(
|
|
66
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
|
|
67
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
|
68
|
+
animationStyles[design.split("-")[1]],
|
|
69
|
+
color ? color : "hawa-bg-primary"
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
);
|
|
74
|
+
case "square":
|
|
75
|
+
return /* @__PURE__ */ React.createElement(
|
|
76
|
+
"svg",
|
|
77
|
+
{
|
|
78
|
+
className: cn("squircle-container", sizeStyles[size]),
|
|
79
|
+
viewBox: "0 0 35 35",
|
|
80
|
+
height: "35",
|
|
81
|
+
width: "35"
|
|
82
|
+
},
|
|
83
|
+
/* @__PURE__ */ React.createElement(
|
|
84
|
+
"rect",
|
|
85
|
+
{
|
|
86
|
+
className: "squircle-track",
|
|
87
|
+
x: "2.5",
|
|
88
|
+
y: "2.5",
|
|
89
|
+
fill: "none",
|
|
90
|
+
strokeWidth: "5px",
|
|
91
|
+
width: "32.5",
|
|
92
|
+
height: "32.5"
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ React.createElement(
|
|
96
|
+
"rect",
|
|
97
|
+
{
|
|
98
|
+
className: "square-car",
|
|
99
|
+
x: "2.5",
|
|
100
|
+
y: "2.5",
|
|
101
|
+
fill: "none",
|
|
102
|
+
strokeWidth: "5px",
|
|
103
|
+
width: "32.5",
|
|
104
|
+
height: "32.5",
|
|
105
|
+
pathLength: "100"
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
case "squircle":
|
|
110
|
+
return /* @__PURE__ */ React.createElement(
|
|
111
|
+
"svg",
|
|
112
|
+
{
|
|
113
|
+
className: cn("squircle-container", sizeStyles[size]),
|
|
114
|
+
x: "0px",
|
|
115
|
+
y: "0px",
|
|
116
|
+
viewBox: "0 0 37 37",
|
|
117
|
+
height: "37",
|
|
118
|
+
width: "37",
|
|
119
|
+
preserveAspectRatio: "xMidYMid meet"
|
|
120
|
+
},
|
|
121
|
+
/* @__PURE__ */ React.createElement(
|
|
122
|
+
"path",
|
|
123
|
+
{
|
|
124
|
+
className: "squircle-track",
|
|
125
|
+
fill: "none",
|
|
126
|
+
strokeWidth: "5",
|
|
127
|
+
pathLength: "100",
|
|
128
|
+
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"
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ React.createElement(
|
|
132
|
+
"path",
|
|
133
|
+
{
|
|
134
|
+
className: "squircle-car",
|
|
135
|
+
fill: "none",
|
|
136
|
+
strokeWidth: "5",
|
|
137
|
+
pathLength: "100",
|
|
138
|
+
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"
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
);
|
|
142
|
+
case "progress":
|
|
143
|
+
return /* @__PURE__ */ React.createElement("div", { className: "progress-loading" });
|
|
144
|
+
case "orbit":
|
|
145
|
+
return /* @__PURE__ */ React.createElement("div", { className: "orbit-container" });
|
|
146
|
+
default:
|
|
147
|
+
return /* @__PURE__ */ React.createElement(
|
|
148
|
+
"svg",
|
|
149
|
+
{
|
|
150
|
+
className: cn("circle-container", sizeStyles[size]),
|
|
151
|
+
viewBox: "0 0 40 40",
|
|
152
|
+
height: "40",
|
|
153
|
+
width: "40"
|
|
154
|
+
},
|
|
155
|
+
/* @__PURE__ */ React.createElement(
|
|
156
|
+
"circle",
|
|
157
|
+
{
|
|
158
|
+
className: cn("circle-track", {
|
|
159
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
|
160
|
+
"hawa-stroke-primary": themeMode === "light"
|
|
161
|
+
}),
|
|
162
|
+
cx: "20",
|
|
163
|
+
cy: "20",
|
|
164
|
+
r: "17.5",
|
|
165
|
+
pathLength: "100",
|
|
166
|
+
strokeWidth: "5px",
|
|
167
|
+
fill: "none"
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ React.createElement(
|
|
171
|
+
"circle",
|
|
172
|
+
{
|
|
173
|
+
className: cn("circle-car", {
|
|
174
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
|
175
|
+
"hawa-stroke-primary": themeMode === "light"
|
|
176
|
+
}),
|
|
177
|
+
cx: "20",
|
|
178
|
+
cy: "20",
|
|
179
|
+
r: "17.5",
|
|
180
|
+
pathLength: "100",
|
|
181
|
+
strokeWidth: "5px",
|
|
182
|
+
fill: "none"
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// components/elements/button/Button.tsx
|
|
190
|
+
var buttonVariants = cva(
|
|
191
|
+
"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",
|
|
192
|
+
{
|
|
193
|
+
variants: {
|
|
194
|
+
variant: {
|
|
195
|
+
default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
|
|
196
|
+
light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
|
|
197
|
+
destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
|
|
198
|
+
outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
|
199
|
+
secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
|
|
200
|
+
ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
|
201
|
+
link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
|
|
202
|
+
combobox: "hawa-bg-background hawa-border",
|
|
203
|
+
neoBrutalism: "neo-brutalism"
|
|
204
|
+
// "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",
|
|
205
|
+
},
|
|
206
|
+
size: {
|
|
207
|
+
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
|
208
|
+
heightless: "hawa-px-4 hawa-py-4",
|
|
209
|
+
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
|
210
|
+
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
|
211
|
+
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
|
212
|
+
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
|
213
|
+
icon: "hawa-h-10 hawa-w-10",
|
|
214
|
+
smallIcon: "hawa-h-7 hawa-w-7"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
defaultVariants: {
|
|
218
|
+
variant: "default",
|
|
219
|
+
size: "default"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
var Button = React2.forwardRef(
|
|
224
|
+
({
|
|
225
|
+
className,
|
|
226
|
+
variant,
|
|
227
|
+
size,
|
|
228
|
+
asChild = false,
|
|
229
|
+
centered = true,
|
|
230
|
+
isLoading,
|
|
231
|
+
children,
|
|
232
|
+
...props
|
|
233
|
+
}, ref) => {
|
|
234
|
+
const Comp = "button";
|
|
235
|
+
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
|
236
|
+
return /* @__PURE__ */ React2.createElement(
|
|
237
|
+
Comp,
|
|
238
|
+
{
|
|
239
|
+
className: cn(
|
|
240
|
+
buttonVariants({ variant, size, className }),
|
|
241
|
+
centered && "hawa-justify-center"
|
|
242
|
+
),
|
|
243
|
+
ref,
|
|
244
|
+
...props
|
|
245
|
+
},
|
|
246
|
+
isLoading ? /* @__PURE__ */ React2.createElement(
|
|
247
|
+
Loading,
|
|
248
|
+
{
|
|
249
|
+
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
|
250
|
+
themeMode: variant === "outline" ? "light" : "dark",
|
|
251
|
+
color: loadingColor,
|
|
252
|
+
size: size === "sm" || size === "xs" ? "xs" : "button"
|
|
253
|
+
}
|
|
254
|
+
) : children
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
Button.displayName = "Button";
|
|
259
|
+
|
|
260
|
+
// components/elements/card/Card.tsx
|
|
261
|
+
import * as React3 from "react";
|
|
262
|
+
var Card = React3.forwardRef(
|
|
263
|
+
({ className, variant = "default", clickable = false, ...props }, ref) => {
|
|
264
|
+
let variantStyles = {
|
|
265
|
+
default: cn(
|
|
266
|
+
"hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
|
|
267
|
+
clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow"
|
|
268
|
+
),
|
|
269
|
+
neoBrutalism: cn(
|
|
270
|
+
"neo-brutalism",
|
|
271
|
+
// "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] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]",
|
|
272
|
+
clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
|
|
273
|
+
)
|
|
274
|
+
};
|
|
275
|
+
return /* @__PURE__ */ React3.createElement(
|
|
276
|
+
"div",
|
|
277
|
+
{
|
|
278
|
+
ref,
|
|
279
|
+
className: cn(className, variantStyles[variant]),
|
|
280
|
+
...props
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
var CardHeader = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
286
|
+
"div",
|
|
287
|
+
{
|
|
288
|
+
ref,
|
|
289
|
+
className: cn(
|
|
290
|
+
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
|
|
291
|
+
className
|
|
292
|
+
),
|
|
293
|
+
...props
|
|
294
|
+
}
|
|
295
|
+
));
|
|
296
|
+
var CardTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
297
|
+
"h3",
|
|
298
|
+
{
|
|
299
|
+
ref,
|
|
300
|
+
className: cn("hawa-text-2xl hawa-font-semibold ", className),
|
|
301
|
+
...props
|
|
302
|
+
}
|
|
303
|
+
));
|
|
304
|
+
var CardDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
305
|
+
"p",
|
|
306
|
+
{
|
|
307
|
+
ref,
|
|
308
|
+
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
|
309
|
+
...props
|
|
310
|
+
}
|
|
311
|
+
));
|
|
312
|
+
var CardContent = React3.forwardRef(
|
|
313
|
+
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
314
|
+
"div",
|
|
315
|
+
{
|
|
316
|
+
ref,
|
|
317
|
+
className: cn(
|
|
318
|
+
noPadding ? "hawa-p-0" : "hawa-p-6",
|
|
319
|
+
headless ? "hawa-pt-6" : "hawa-pt-0",
|
|
320
|
+
className
|
|
321
|
+
),
|
|
322
|
+
...props
|
|
323
|
+
}
|
|
324
|
+
)
|
|
325
|
+
);
|
|
326
|
+
var CardFooter = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
|
|
327
|
+
"div",
|
|
328
|
+
{
|
|
329
|
+
ref,
|
|
330
|
+
className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className),
|
|
331
|
+
...props
|
|
332
|
+
}
|
|
333
|
+
));
|
|
334
|
+
CardDescription.displayName = "CardDescription";
|
|
335
|
+
CardContent.displayName = "CardContent";
|
|
336
|
+
CardHeader.displayName = "CardHeader";
|
|
337
|
+
CardFooter.displayName = "CardFooter";
|
|
338
|
+
CardTitle.displayName = "CardTitle";
|
|
339
|
+
Card.displayName = "Card";
|
|
340
|
+
|
|
341
|
+
// components/elements/tooltip/Tooltip.tsx
|
|
342
|
+
import React4 from "react";
|
|
343
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
344
|
+
var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
|
345
|
+
TooltipPrimitive.Content,
|
|
346
|
+
{
|
|
347
|
+
ref,
|
|
348
|
+
sideOffset,
|
|
349
|
+
className: cn(
|
|
350
|
+
"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",
|
|
351
|
+
className
|
|
352
|
+
),
|
|
353
|
+
...props
|
|
354
|
+
}
|
|
355
|
+
));
|
|
356
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
357
|
+
var TooltipArrow = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
|
358
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
|
359
|
+
var Tooltip = ({
|
|
360
|
+
side,
|
|
361
|
+
open,
|
|
362
|
+
content,
|
|
363
|
+
children,
|
|
364
|
+
defaultOpen,
|
|
365
|
+
onOpenChange,
|
|
366
|
+
triggerProps,
|
|
367
|
+
contentProps,
|
|
368
|
+
providerProps,
|
|
369
|
+
delayDuration = 300,
|
|
370
|
+
...props
|
|
371
|
+
}) => {
|
|
372
|
+
return /* @__PURE__ */ React4.createElement(
|
|
373
|
+
TooltipPrimitive.TooltipProvider,
|
|
374
|
+
{
|
|
375
|
+
delayDuration,
|
|
376
|
+
...providerProps
|
|
377
|
+
},
|
|
378
|
+
/* @__PURE__ */ React4.createElement(
|
|
379
|
+
TooltipPrimitive.Root,
|
|
380
|
+
{
|
|
381
|
+
open,
|
|
382
|
+
defaultOpen,
|
|
383
|
+
onOpenChange,
|
|
384
|
+
...props
|
|
385
|
+
},
|
|
386
|
+
/* @__PURE__ */ React4.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
|
387
|
+
/* @__PURE__ */ React4.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
|
388
|
+
)
|
|
389
|
+
);
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
// components/elements/label/Label.tsx
|
|
393
|
+
import * as React5 from "react";
|
|
394
|
+
var Label = 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(
|
|
395
|
+
"label",
|
|
396
|
+
{
|
|
397
|
+
ref,
|
|
398
|
+
className: cn(
|
|
399
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
|
400
|
+
className
|
|
401
|
+
),
|
|
402
|
+
...props
|
|
403
|
+
},
|
|
404
|
+
children,
|
|
405
|
+
required && /* @__PURE__ */ React5.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
|
406
|
+
), hint && /* @__PURE__ */ React5.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React5.createElement(
|
|
407
|
+
"svg",
|
|
408
|
+
{
|
|
409
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
410
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
|
411
|
+
viewBox: "0 0 24 24",
|
|
412
|
+
fill: "none",
|
|
413
|
+
stroke: "currentColor",
|
|
414
|
+
strokeWidth: "2",
|
|
415
|
+
strokeLinecap: "round",
|
|
416
|
+
strokeLinejoin: "round"
|
|
417
|
+
},
|
|
418
|
+
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
419
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
420
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M12 17h.01" })
|
|
421
|
+
))));
|
|
422
|
+
Label.displayName = "Label";
|
|
423
|
+
|
|
424
|
+
// components/elements/skeleton/Skeleton.tsx
|
|
425
|
+
import React6 from "react";
|
|
426
|
+
function Skeleton({
|
|
427
|
+
className,
|
|
428
|
+
content,
|
|
429
|
+
animation = "pulse",
|
|
430
|
+
...props
|
|
431
|
+
}) {
|
|
432
|
+
const animationStyles = {
|
|
433
|
+
none: "hawa-rounded hawa-bg-muted",
|
|
434
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
|
435
|
+
shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
|
|
436
|
+
};
|
|
437
|
+
return /* @__PURE__ */ React6.createElement(
|
|
438
|
+
"div",
|
|
439
|
+
{
|
|
440
|
+
className: cn(
|
|
441
|
+
animationStyles[animation],
|
|
442
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
|
443
|
+
className
|
|
444
|
+
),
|
|
445
|
+
...props
|
|
446
|
+
},
|
|
447
|
+
content && content
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export {
|
|
452
|
+
cn,
|
|
453
|
+
Loading,
|
|
454
|
+
Button,
|
|
455
|
+
Card,
|
|
456
|
+
CardHeader,
|
|
457
|
+
CardTitle,
|
|
458
|
+
CardDescription,
|
|
459
|
+
CardContent,
|
|
460
|
+
CardFooter,
|
|
461
|
+
Tooltip,
|
|
462
|
+
Label,
|
|
463
|
+
Skeleton
|
|
464
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-TE3BKEXL.mjs";
|
|
4
|
+
|
|
5
|
+
// components/elements/chip/Chip.tsx
|
|
6
|
+
import React from "react";
|
|
7
|
+
var Chip = React.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
label,
|
|
10
|
+
size = "normal",
|
|
11
|
+
icon,
|
|
12
|
+
color,
|
|
13
|
+
radius = "inherit",
|
|
14
|
+
dotType,
|
|
15
|
+
...rest
|
|
16
|
+
}, ref) => {
|
|
17
|
+
let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
|
|
18
|
+
let radiusStyles = {
|
|
19
|
+
inherit: " hawa-rounded",
|
|
20
|
+
full: "hawa-rounded-full",
|
|
21
|
+
none: "hawa-rounded-none"
|
|
22
|
+
};
|
|
23
|
+
let sizeStyles = {
|
|
24
|
+
small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
|
|
25
|
+
normal: "hawa-h-fit hawa-text-xs",
|
|
26
|
+
large: "hawa-text-base"
|
|
27
|
+
};
|
|
28
|
+
let dotStyles = {
|
|
29
|
+
small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
|
|
30
|
+
normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
|
|
31
|
+
large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
|
|
32
|
+
};
|
|
33
|
+
let dotTypeStyles = {
|
|
34
|
+
available: "hawa-bg-green-500",
|
|
35
|
+
unavailable: "hawa-bg-red-500"
|
|
36
|
+
};
|
|
37
|
+
let colorStyles = {
|
|
38
|
+
green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
|
|
39
|
+
blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
|
|
40
|
+
red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
|
|
41
|
+
yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
|
|
42
|
+
orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
|
|
43
|
+
purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
|
|
44
|
+
cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
|
|
45
|
+
hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
|
|
46
|
+
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
|
47
|
+
};
|
|
48
|
+
if (label) {
|
|
49
|
+
return /* @__PURE__ */ React.createElement(
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
...rest,
|
|
53
|
+
ref,
|
|
54
|
+
className: cn(
|
|
55
|
+
defaultStyles,
|
|
56
|
+
sizeStyles[size],
|
|
57
|
+
radiusStyles[radius],
|
|
58
|
+
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
59
|
+
)
|
|
60
|
+
},
|
|
61
|
+
dotType && /* @__PURE__ */ React.createElement(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
icon && icon,
|
|
68
|
+
label
|
|
69
|
+
);
|
|
70
|
+
} else {
|
|
71
|
+
return /* @__PURE__ */ React.createElement(
|
|
72
|
+
"span",
|
|
73
|
+
{
|
|
74
|
+
...rest,
|
|
75
|
+
ref,
|
|
76
|
+
className: cn(
|
|
77
|
+
"hawa-h-2 hawa-w-2 hawa-rounded-full",
|
|
78
|
+
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
Chip
|
|
88
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Label,
|
|
3
|
+
Skeleton,
|
|
4
|
+
cn
|
|
5
|
+
} from "./chunk-677VOLD4.mjs";
|
|
6
|
+
|
|
7
|
+
// components/elements/input/Input.tsx
|
|
8
|
+
import React, { forwardRef } from "react";
|
|
9
|
+
var Input = forwardRef(
|
|
10
|
+
({
|
|
11
|
+
margin = "none",
|
|
12
|
+
width = "full",
|
|
13
|
+
preview = false,
|
|
14
|
+
forceHideHelperText = false,
|
|
15
|
+
labelProps,
|
|
16
|
+
placeholder,
|
|
17
|
+
showCount,
|
|
18
|
+
inputProps,
|
|
19
|
+
countPosition = "bottom",
|
|
20
|
+
...props
|
|
21
|
+
}, ref) => {
|
|
22
|
+
var _a;
|
|
23
|
+
let marginStyles = {
|
|
24
|
+
none: "hawa-mb-0",
|
|
25
|
+
normal: "hawa-mb-3",
|
|
26
|
+
large: "hawa-mb-5"
|
|
27
|
+
};
|
|
28
|
+
let widthStyles = {
|
|
29
|
+
small: "hawa-w-full hawa-max-w-2xs",
|
|
30
|
+
normal: "hawa-w-1/2",
|
|
31
|
+
full: "hawa-w-full",
|
|
32
|
+
auto: ""
|
|
33
|
+
};
|
|
34
|
+
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
35
|
+
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
|
36
|
+
return /* @__PURE__ */ React.createElement(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: cn(
|
|
40
|
+
defaultStyle,
|
|
41
|
+
marginStyles[margin],
|
|
42
|
+
widthStyles[width],
|
|
43
|
+
props.containerClassName,
|
|
44
|
+
"hawa-w-full hawa-gap-2"
|
|
45
|
+
)
|
|
46
|
+
},
|
|
47
|
+
props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label),
|
|
48
|
+
props.isLoading ? /* @__PURE__ */ React.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React.createElement(React.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React.createElement(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: cn(
|
|
52
|
+
"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800",
|
|
53
|
+
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
), /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ React.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React.createElement(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: cn(
|
|
60
|
+
"hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2",
|
|
61
|
+
(_a = props.endIconProps) == null ? void 0 : _a.className
|
|
62
|
+
)
|
|
63
|
+
},
|
|
64
|
+
props.endIcon
|
|
65
|
+
), /* @__PURE__ */ React.createElement(
|
|
66
|
+
"input",
|
|
67
|
+
{
|
|
68
|
+
required: true,
|
|
69
|
+
dir: props.dir,
|
|
70
|
+
type: props.type,
|
|
71
|
+
value: props.value,
|
|
72
|
+
onChange: props.onChange,
|
|
73
|
+
autoComplete: props.autoComplete,
|
|
74
|
+
defaultValue: props.defaultValue,
|
|
75
|
+
placeholder,
|
|
76
|
+
disabled: props.disabled || preview,
|
|
77
|
+
style: { height: 40 },
|
|
78
|
+
...inputProps,
|
|
79
|
+
className: cn(
|
|
80
|
+
defaultInputStyle,
|
|
81
|
+
" focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 dark:hawa-text-white",
|
|
82
|
+
{
|
|
83
|
+
"hawa-pe-9": props.endIcon,
|
|
84
|
+
"hawa-ps-9": props.startIcon,
|
|
85
|
+
"hawa-pe-[60px]": countPosition === "center"
|
|
86
|
+
},
|
|
87
|
+
preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
|
|
88
|
+
inputProps == null ? void 0 : inputProps.className
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
)), !forceHideHelperText && /* @__PURE__ */ React.createElement(
|
|
92
|
+
"p",
|
|
93
|
+
{
|
|
94
|
+
className: cn(
|
|
95
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
96
|
+
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
97
|
+
)
|
|
98
|
+
},
|
|
99
|
+
props.helperText
|
|
100
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ React.createElement(
|
|
101
|
+
"div",
|
|
102
|
+
{
|
|
103
|
+
className: cn(
|
|
104
|
+
"hawa-absolute hawa-end-0 hawa-top-[47px] hawa-z-20 hawa-translate-y-1/2 hawa-rounded hawa-bg-background hawa-text-start hawa-text-xs hawa-text-helper-color hawa-drop-shadow-md hawa-transition-all",
|
|
105
|
+
props.helperText ? "hawa-border hawa-p-1" : "hawa-border-none hawa-p-0"
|
|
106
|
+
)
|
|
107
|
+
},
|
|
108
|
+
props.helperText
|
|
109
|
+
), showCount && /* @__PURE__ */ React.createElement(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
className: cn(
|
|
113
|
+
"hawa-absolute hawa-translate-y-1/2 hawa-text-start hawa-text-xs hawa-transition-all",
|
|
114
|
+
{
|
|
115
|
+
"hawa-end-0 hawa-top-[62px]": countPosition === "bottom",
|
|
116
|
+
"hawa-bottom-[62px] hawa-end-0": countPosition === "top",
|
|
117
|
+
"hawa-end-2": countPosition === "center"
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
},
|
|
121
|
+
props.value ? String(props.value).length : 0,
|
|
122
|
+
"/",
|
|
123
|
+
props.maxLength
|
|
124
|
+
)))
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
export {
|
|
130
|
+
Input
|
|
131
|
+
};
|