@sikka/hawa 0.25.0-next → 0.25.1-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/auth/index.js +1 -0
- package/dist/blocks/auth/index.mjs +1 -0
- package/dist/blocks/index.js +1 -0
- package/dist/blocks/index.mjs +1 -1
- package/dist/chunk-KNHT2UBG.mjs +150 -0
- package/dist/{chunk-XE3FLWLT.mjs → chunk-MJMQDUCC.mjs} +1 -0
- package/dist/commonTypes-2IGtJ5cq.d.mts +3 -0
- package/dist/commonTypes-2IGtJ5cq.d.ts +3 -0
- package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
- package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
- package/dist/commonTypes-3k5cNB1s.d.mts +4 -0
- package/dist/commonTypes-3k5cNB1s.d.ts +4 -0
- package/dist/{commonTypes-3J1E3b61.d.mts → commonTypes-f_LVO3Sm.d.mts} +1 -2
- package/dist/{commonTypes-3J1E3b61.d.ts → commonTypes-f_LVO3Sm.d.ts} +1 -2
- package/dist/elements/index.js +1 -0
- package/dist/elements/index.mjs +1 -1
- package/dist/glow/index.d.mts +16 -0
- package/dist/glow/index.d.ts +16 -0
- package/dist/glow/index.js +155 -0
- package/dist/glow/index.mjs +117 -0
- package/dist/index.css +212 -206
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/dist/input/index.d.mts +9 -2
- package/dist/input/index.d.ts +9 -2
- package/dist/input/index.mjs +1 -1
- package/dist/interfaceSettings/index.mjs +1 -1
- package/dist/label/index.d.mts +2 -1
- package/dist/label/index.d.ts +2 -1
- package/dist/label/index.mjs +98 -2
- package/dist/navigationMenu/index.d.mts +1 -2
- package/dist/navigationMenu/index.d.ts +1 -2
- package/dist/pagination/index.d.mts +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/passwordInput/index.mjs +148 -27
- package/dist/phoneInput/index.d.mts +1 -1
- package/dist/phoneInput/index.d.ts +1 -1
- package/dist/phoneInput/index.mjs +140 -19
- package/dist/pinInput/index.js +1 -0
- package/dist/pinInput/index.mjs +1 -0
- package/dist/popover/index.d.mts +1 -2
- package/dist/popover/index.d.ts +1 -2
- package/dist/radio/index.d.mts +4 -1
- package/dist/radio/index.d.ts +4 -1
- 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/simpleTable/index.d.mts +1 -2
- package/dist/simpleTable/index.d.ts +1 -2
- package/dist/simpleTable/index.mjs +45 -21
- package/dist/skeleton/index.mjs +29 -3
- package/dist/sortButton/index.mjs +260 -9
- package/dist/splitButton/index.d.mts +3 -4
- package/dist/splitButton/index.d.ts +3 -4
- package/dist/splitButton/index.mjs +259 -10
- package/dist/switch/index.d.mts +1 -2
- package/dist/switch/index.d.ts +1 -2
- 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/toast/index.mjs +9 -139
- package/dist/toaster/index.d.mts +2 -2
- package/dist/toaster/index.d.ts +2 -2
- package/dist/toaster/index.mjs +17 -146
- package/dist/tooltip/index.d.mts +2 -2
- package/dist/tooltip/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunk-53XBVEMK.mjs +0 -131
- package/dist/chunk-DGWAHQRX.mjs +0 -259
- package/dist/chunk-ND4BWUKH.mjs +0 -34
- package/dist/commonTypes-LrR8QrYP.d.mts +0 -5
- package/dist/commonTypes-LrR8QrYP.d.ts +0 -5
- package/dist/{chunk-ABS2VEET.mjs → chunk-WRZFWCOQ.mjs} +3 -3
package/dist/toaster/index.mjs
CHANGED
@@ -1,9 +1,17 @@
|
|
1
|
+
import {
|
2
|
+
Toast,
|
3
|
+
ToastClose,
|
4
|
+
ToastDescription,
|
5
|
+
ToastProvider,
|
6
|
+
ToastTitle,
|
7
|
+
ToastViewport
|
8
|
+
} from "../chunk-KNHT2UBG.mjs";
|
1
9
|
import {
|
2
10
|
cn
|
3
11
|
} from "../chunk-TE3BKEXL.mjs";
|
4
12
|
|
5
13
|
// components/elements/toaster/Toaster.tsx
|
6
|
-
import
|
14
|
+
import React2 from "react";
|
7
15
|
|
8
16
|
// components/hooks/useToast.ts
|
9
17
|
import * as React from "react";
|
@@ -119,148 +127,11 @@ function useToast() {
|
|
119
127
|
};
|
120
128
|
}
|
121
129
|
|
122
|
-
// components/elements/toast/Toast.tsx
|
123
|
-
import * as React2 from "react";
|
124
|
-
import * as ToastPrimitives from "@radix-ui/react-toast";
|
125
|
-
import { cva } from "class-variance-authority";
|
126
|
-
var toastVariants = cva(
|
127
|
-
"hawa-group hawa-z-[900] hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between hawa-overflow-hidden hawa-rounded-md hawa-border hawa-shadow-lg hawa-transition-all data-[swipe=cancel]:hawa-translate-x-0 data-[swipe=end]:hawa-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:hawa-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:hawa-transition-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[swipe=end]:hawa-animate-out data-[state=closed]:hawa-fade-out-80 data-[state=open]:hawa-slide-in-from-top-full data-[state=open]:sm:hawa-slide-in-from-bottom-full",
|
128
|
-
{
|
129
|
-
variants: {
|
130
|
-
variant: {
|
131
|
-
default: "hawa-border hawa-bg-background hawa-text-foreground",
|
132
|
-
destructive: "hawa-destructive hawa-group hawa-border-destructive hawa-bg-destructive hawa-text-destructive-foreground"
|
133
|
-
},
|
134
|
-
severity: {
|
135
|
-
info: "hawa-info hawa-group hawa-text-info-foreground hawa-bg-info",
|
136
|
-
warning: "hawa-warning hawa-group hawa-text-warning-foreground hawa-bg-warning",
|
137
|
-
error: "hawa-error hawa-group hawa-border-error hawa-bg-error hawa-text-white",
|
138
|
-
success: "hawa-success hawa-group hawa-text-success-foreground hawa-bg-success",
|
139
|
-
none: ""
|
140
|
-
}
|
141
|
-
},
|
142
|
-
defaultVariants: { variant: "default" }
|
143
|
-
}
|
144
|
-
);
|
145
|
-
var sizeStyles = {
|
146
|
-
default: "hawa-text-sm",
|
147
|
-
// Update this based on the desired padding for rtl
|
148
|
-
sm: "hawa-text-xs"
|
149
|
-
};
|
150
|
-
var ToastProvider = ToastPrimitives.Provider;
|
151
|
-
var ToastViewport = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
152
|
-
ToastPrimitives.Viewport,
|
153
|
-
{
|
154
|
-
ref,
|
155
|
-
className: cn(
|
156
|
-
"hawa-fixed hawa-top-0 hawa-z-[100] hawa-flex hawa-max-h-screen hawa-w-full hawa-flex-col-reverse hawa-p-4 sm:hawa-bottom-0 sm:hawa-right-0 sm:hawa-top-auto sm:hawa-flex-col md:hawa-max-w-[420px]",
|
157
|
-
className
|
158
|
-
),
|
159
|
-
...props
|
160
|
-
}
|
161
|
-
));
|
162
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
163
|
-
var Toast = React2.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
|
164
|
-
return /* @__PURE__ */ React2.createElement(
|
165
|
-
ToastPrimitives.Root,
|
166
|
-
{
|
167
|
-
ref,
|
168
|
-
className: cn(
|
169
|
-
toastVariants({ variant, severity }),
|
170
|
-
className,
|
171
|
-
direction === "rtl" ? "data-[state=closed]:hawa-slide-out-to-left-full" : "data-[state=closed]:hawa-slide-out-to-right-full"
|
172
|
-
),
|
173
|
-
dir: direction,
|
174
|
-
...props
|
175
|
-
}
|
176
|
-
);
|
177
|
-
});
|
178
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
179
|
-
var ToastAction = React2.forwardRef(({ className, ...props }, ref) => {
|
180
|
-
return /* @__PURE__ */ React2.createElement(
|
181
|
-
ToastPrimitives.Action,
|
182
|
-
{
|
183
|
-
ref,
|
184
|
-
className: cn(
|
185
|
-
"hawa-inline-flex hawa-h-8 hawa-shrink-0 hawa-items-center hawa-justify-center hawa-rounded-md hawa-border hawa-bg-transparent hawa-px-3 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors hover:hawa-bg-secondary hover:hawa-text-secondary-foreground focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
186
|
-
"group-[.info]:hawa-border-muted/40 group-[.info]:hover:hawa-border-info/30 group-[.info]:hover:hawa-bg-info group-[.info]:hover:hawa-text-info-foreground group-[.info]:focus:hawa-ring-info",
|
187
|
-
"group-[.error]:hawa-border-muted/40 group-[.error]:hover:hawa-border-error/30 group-[.error]:hover:hawa-bg-error group-[.error]:hover:hawa-text-error-foreground group-[.error]:focus:hawa-ring-error",
|
188
|
-
"group-[.success]:hawa-border-muted/40 group-[.success]:hover:hawa-border-success/30 group-[.success]:hover:hawa-bg-success group-[.success]:hover:hawa-text-success-foreground group-[.success]:focus:hawa-ring-success",
|
189
|
-
"group-[.warning]:hawa-border-muted/40 group-[.warning]:hover:hawa-border-warning/30 group-[.warning]:hover:hawa-bg-warning group-[.warning]:hover:hawa-text-warning-foreground group-[.warning]:focus:hawa-ring-warning",
|
190
|
-
"hawa-whitespace-nowrap",
|
191
|
-
className
|
192
|
-
),
|
193
|
-
...props
|
194
|
-
}
|
195
|
-
);
|
196
|
-
});
|
197
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
198
|
-
var ToastClose = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
199
|
-
ToastPrimitives.Close,
|
200
|
-
{
|
201
|
-
ref,
|
202
|
-
className: cn(
|
203
|
-
// "hawa-absolute hawa-start-2 hawa-top-2",
|
204
|
-
// "group-hover:hawa-opacity-100",
|
205
|
-
"hawa-opacity-100",
|
206
|
-
"hawa-rounded-md hawa-p-1 hawa-text-foreground/50 hawa-transition-opacity hover:hawa-text-foreground focus:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 group-[.destructive]:hawa-text-red-300 group-[.destructive]:hover:hawa-text-red-50 group-[.destructive]:focus:hawa-ring-red-400 group-[.destructive]:focus:hawa-ring-offset-red-600",
|
207
|
-
className
|
208
|
-
),
|
209
|
-
"toast-close": "",
|
210
|
-
...props
|
211
|
-
},
|
212
|
-
/* @__PURE__ */ React2.createElement(
|
213
|
-
"svg",
|
214
|
-
{
|
215
|
-
"aria-label": "Close Icon",
|
216
|
-
"aria-hidden": "true",
|
217
|
-
className: "hawa-icon",
|
218
|
-
fill: "currentColor",
|
219
|
-
viewBox: "0 0 20 20"
|
220
|
-
},
|
221
|
-
/* @__PURE__ */ React2.createElement(
|
222
|
-
"path",
|
223
|
-
{
|
224
|
-
fillRule: "evenodd",
|
225
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
226
|
-
clipRule: "evenodd"
|
227
|
-
}
|
228
|
-
)
|
229
|
-
)
|
230
|
-
));
|
231
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
232
|
-
var ToastTitle = React2.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
233
|
-
ToastPrimitives.Title,
|
234
|
-
{
|
235
|
-
ref,
|
236
|
-
className: cn(
|
237
|
-
"hawa-select-text hawa-text-sm hawa-font-semibold",
|
238
|
-
sizeStyles[size],
|
239
|
-
className
|
240
|
-
),
|
241
|
-
...props
|
242
|
-
}
|
243
|
-
));
|
244
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
245
|
-
var ToastDescription = React2.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
246
|
-
ToastPrimitives.Description,
|
247
|
-
{
|
248
|
-
ref,
|
249
|
-
className: cn(
|
250
|
-
"hawa-select-text hawa-opacity-90",
|
251
|
-
sizeStyles[size],
|
252
|
-
className
|
253
|
-
),
|
254
|
-
...props
|
255
|
-
}
|
256
|
-
));
|
257
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
258
|
-
|
259
130
|
// components/elements/toaster/Toaster.tsx
|
260
131
|
function Toaster(props) {
|
261
132
|
const { toasts } = useToast();
|
262
133
|
let isRTL = props.direction === "rtl";
|
263
|
-
return /* @__PURE__ */
|
134
|
+
return /* @__PURE__ */ React2.createElement(ToastProvider, { swipeDirection: isRTL ? "left" : "right" }, toasts.map(function({
|
264
135
|
id,
|
265
136
|
title,
|
266
137
|
description,
|
@@ -268,7 +139,7 @@ function Toaster(props) {
|
|
268
139
|
action,
|
269
140
|
...toastProps
|
270
141
|
}) {
|
271
|
-
return /* @__PURE__ */
|
142
|
+
return /* @__PURE__ */ React2.createElement(Toast, { direction: props.direction, key: id, ...toastProps }, /* @__PURE__ */ React2.createElement(
|
272
143
|
"div",
|
273
144
|
{
|
274
145
|
className: cn(
|
@@ -276,9 +147,9 @@ function Toaster(props) {
|
|
276
147
|
action && "hawa-justify-between"
|
277
148
|
)
|
278
149
|
},
|
279
|
-
/* @__PURE__ */
|
280
|
-
/* @__PURE__ */
|
281
|
-
/* @__PURE__ */
|
150
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-h-full hawa-flex-col hawa-p-2 hawa-pe-0" }, /* @__PURE__ */ React2.createElement(ToastClose, null)),
|
151
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-mx-0 hawa-h-auto hawa-max-h-full hawa-w-px hawa-bg-primary-foreground/10" }),
|
152
|
+
/* @__PURE__ */ React2.createElement(
|
282
153
|
"div",
|
283
154
|
{
|
284
155
|
className: cn(
|
@@ -286,11 +157,11 @@ function Toaster(props) {
|
|
286
157
|
{ "hawa-p-4": size === "default", "hawa-p-2": size === "sm" }
|
287
158
|
)
|
288
159
|
},
|
289
|
-
/* @__PURE__ */
|
290
|
-
action && /* @__PURE__ */
|
160
|
+
/* @__PURE__ */ React2.createElement("div", { className: "hawa-grid hawa-gap-1 hawa-text-start" }, title && /* @__PURE__ */ React2.createElement(ToastTitle, { size }, title), description && /* @__PURE__ */ React2.createElement(ToastDescription, { size }, description)),
|
161
|
+
action && /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-col hawa-justify-center" }, action)
|
291
162
|
)
|
292
163
|
));
|
293
|
-
}), /* @__PURE__ */
|
164
|
+
}), /* @__PURE__ */ React2.createElement(
|
294
165
|
ToastViewport,
|
295
166
|
{
|
296
167
|
className: cn("hawa-gap-2", isRTL && "hawa-fixed hawa-left-0")
|
package/dist/tooltip/index.d.mts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import React__default from 'react';
|
2
2
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
3
3
|
import { P as PositionType } from '../commonTypes-_11epZYh.mjs';
|
4
4
|
|
@@ -21,6 +21,6 @@ type TooltipTypes = {
|
|
21
21
|
contentProps?: TooltipPrimitive.TooltipContentProps;
|
22
22
|
providerProps?: TooltipPrimitive.TooltipProviderProps;
|
23
23
|
};
|
24
|
-
declare const Tooltip:
|
24
|
+
declare const Tooltip: React__default.FunctionComponent<TooltipTypes>;
|
25
25
|
|
26
26
|
export { Tooltip };
|
package/dist/tooltip/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import React__default from 'react';
|
2
2
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
3
3
|
import { P as PositionType } from '../commonTypes-_11epZYh.js';
|
4
4
|
|
@@ -21,6 +21,6 @@ type TooltipTypes = {
|
|
21
21
|
contentProps?: TooltipPrimitive.TooltipContentProps;
|
22
22
|
providerProps?: TooltipPrimitive.TooltipProviderProps;
|
23
23
|
};
|
24
|
-
declare const Tooltip:
|
24
|
+
declare const Tooltip: React__default.FunctionComponent<TooltipTypes>;
|
25
25
|
|
26
26
|
export { Tooltip };
|
package/package.json
CHANGED
package/dist/chunk-53XBVEMK.mjs
DELETED
@@ -1,131 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
cn
|
3
|
-
} from "./chunk-TE3BKEXL.mjs";
|
4
|
-
|
5
|
-
// components/elements/label/Label.tsx
|
6
|
-
import * as React2 from "react";
|
7
|
-
|
8
|
-
// components/elements/tooltip/Tooltip.tsx
|
9
|
-
import React from "react";
|
10
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
11
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
12
|
-
TooltipPrimitive.Content,
|
13
|
-
{
|
14
|
-
ref,
|
15
|
-
sideOffset,
|
16
|
-
className: cn(
|
17
|
-
"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",
|
18
|
-
className
|
19
|
-
),
|
20
|
-
...props
|
21
|
-
}
|
22
|
-
));
|
23
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
24
|
-
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
25
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
26
|
-
var Tooltip = ({
|
27
|
-
side,
|
28
|
-
open,
|
29
|
-
content,
|
30
|
-
children,
|
31
|
-
defaultOpen,
|
32
|
-
onOpenChange,
|
33
|
-
triggerProps,
|
34
|
-
contentProps,
|
35
|
-
providerProps,
|
36
|
-
delayDuration = 300,
|
37
|
-
...props
|
38
|
-
}) => {
|
39
|
-
return /* @__PURE__ */ React.createElement(
|
40
|
-
TooltipPrimitive.TooltipProvider,
|
41
|
-
{
|
42
|
-
delayDuration,
|
43
|
-
...providerProps
|
44
|
-
},
|
45
|
-
/* @__PURE__ */ React.createElement(
|
46
|
-
TooltipPrimitive.Root,
|
47
|
-
{
|
48
|
-
open,
|
49
|
-
defaultOpen,
|
50
|
-
onOpenChange,
|
51
|
-
...props
|
52
|
-
},
|
53
|
-
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
54
|
-
/* @__PURE__ */ React.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
55
|
-
)
|
56
|
-
);
|
57
|
-
};
|
58
|
-
|
59
|
-
// components/elements/label/Label.tsx
|
60
|
-
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(
|
61
|
-
"label",
|
62
|
-
{
|
63
|
-
ref,
|
64
|
-
className: cn(
|
65
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
66
|
-
className
|
67
|
-
),
|
68
|
-
...props
|
69
|
-
},
|
70
|
-
children,
|
71
|
-
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
72
|
-
), hint && /* @__PURE__ */ React2.createElement(
|
73
|
-
Tooltip,
|
74
|
-
{
|
75
|
-
content: hint,
|
76
|
-
side: hintSide,
|
77
|
-
triggerProps: {
|
78
|
-
tabIndex: -1,
|
79
|
-
onClick: (event) => event.preventDefault()
|
80
|
-
}
|
81
|
-
},
|
82
|
-
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
83
|
-
"svg",
|
84
|
-
{
|
85
|
-
xmlns: "http://www.w3.org/2000/svg",
|
86
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
87
|
-
viewBox: "0 0 24 24",
|
88
|
-
fill: "none",
|
89
|
-
stroke: "currentColor",
|
90
|
-
strokeWidth: "2",
|
91
|
-
strokeLinecap: "round",
|
92
|
-
strokeLinejoin: "round"
|
93
|
-
},
|
94
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
95
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
96
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
97
|
-
))
|
98
|
-
)));
|
99
|
-
Label.displayName = "Label";
|
100
|
-
|
101
|
-
// components/elements/skeleton/Skeleton.tsx
|
102
|
-
import React3 from "react";
|
103
|
-
function Skeleton({
|
104
|
-
className,
|
105
|
-
content,
|
106
|
-
animation = "pulse",
|
107
|
-
...props
|
108
|
-
}) {
|
109
|
-
const animationStyles = {
|
110
|
-
none: "hawa-rounded hawa-bg-muted",
|
111
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
112
|
-
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"
|
113
|
-
};
|
114
|
-
return /* @__PURE__ */ React3.createElement(
|
115
|
-
"div",
|
116
|
-
{
|
117
|
-
className: cn(
|
118
|
-
animationStyles[animation],
|
119
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
120
|
-
className
|
121
|
-
),
|
122
|
-
...props
|
123
|
-
},
|
124
|
-
content && content
|
125
|
-
);
|
126
|
-
}
|
127
|
-
|
128
|
-
export {
|
129
|
-
Label,
|
130
|
-
Skeleton
|
131
|
-
};
|
package/dist/chunk-DGWAHQRX.mjs
DELETED
@@ -1,259 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
cn
|
3
|
-
} from "./chunk-TE3BKEXL.mjs";
|
4
|
-
|
5
|
-
// components/elements/button/Button.tsx
|
6
|
-
import * as React2 from "react";
|
7
|
-
import { cva } from "class-variance-authority";
|
8
|
-
|
9
|
-
// components/elements/loading/Loading.tsx
|
10
|
-
import React from "react";
|
11
|
-
var Loading = ({
|
12
|
-
design = "spinner",
|
13
|
-
size = "sm",
|
14
|
-
themeMode = "light",
|
15
|
-
color,
|
16
|
-
...props
|
17
|
-
}) => {
|
18
|
-
let sizeStyles = {
|
19
|
-
button: "hawa-h-4 hawa-w-4",
|
20
|
-
xs: "hawa-h-1 hawa-w-1",
|
21
|
-
sm: "hawa-h-6 hawa-w-6",
|
22
|
-
normal: "hawa-h-8 hawa-w-8",
|
23
|
-
lg: "hawa-h-14 hawa-w-14",
|
24
|
-
xl: "hawa-h-24 hawa-w-24"
|
25
|
-
};
|
26
|
-
let animationStyles = {
|
27
|
-
pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000",
|
28
|
-
bounce: "hawa-animate-bounce"
|
29
|
-
};
|
30
|
-
switch (design.split("-")[0]) {
|
31
|
-
case "dots":
|
32
|
-
return /* @__PURE__ */ React.createElement(
|
33
|
-
"div",
|
34
|
-
{
|
35
|
-
className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
|
36
|
-
},
|
37
|
-
/* @__PURE__ */ React.createElement(
|
38
|
-
"div",
|
39
|
-
{
|
40
|
-
className: cn(
|
41
|
-
"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
|
42
|
-
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
43
|
-
animationStyles[design.split("-")[1]],
|
44
|
-
color ? color : "hawa-bg-primary"
|
45
|
-
)
|
46
|
-
}
|
47
|
-
),
|
48
|
-
/* @__PURE__ */ React.createElement(
|
49
|
-
"div",
|
50
|
-
{
|
51
|
-
className: cn(
|
52
|
-
"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
|
53
|
-
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
54
|
-
animationStyles[design.split("-")[1]],
|
55
|
-
color ? color : "hawa-bg-primary"
|
56
|
-
)
|
57
|
-
}
|
58
|
-
),
|
59
|
-
/* @__PURE__ */ React.createElement(
|
60
|
-
"div",
|
61
|
-
{
|
62
|
-
className: cn(
|
63
|
-
"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
|
64
|
-
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
65
|
-
animationStyles[design.split("-")[1]],
|
66
|
-
color ? color : "hawa-bg-primary"
|
67
|
-
)
|
68
|
-
}
|
69
|
-
)
|
70
|
-
);
|
71
|
-
case "square":
|
72
|
-
return /* @__PURE__ */ React.createElement(
|
73
|
-
"svg",
|
74
|
-
{
|
75
|
-
className: cn("squircle-container", sizeStyles[size]),
|
76
|
-
viewBox: "0 0 35 35",
|
77
|
-
height: "35",
|
78
|
-
width: "35"
|
79
|
-
},
|
80
|
-
/* @__PURE__ */ React.createElement(
|
81
|
-
"rect",
|
82
|
-
{
|
83
|
-
className: "squircle-track",
|
84
|
-
x: "2.5",
|
85
|
-
y: "2.5",
|
86
|
-
fill: "none",
|
87
|
-
strokeWidth: "5px",
|
88
|
-
width: "32.5",
|
89
|
-
height: "32.5"
|
90
|
-
}
|
91
|
-
),
|
92
|
-
/* @__PURE__ */ React.createElement(
|
93
|
-
"rect",
|
94
|
-
{
|
95
|
-
className: "square-car",
|
96
|
-
x: "2.5",
|
97
|
-
y: "2.5",
|
98
|
-
fill: "none",
|
99
|
-
strokeWidth: "5px",
|
100
|
-
width: "32.5",
|
101
|
-
height: "32.5",
|
102
|
-
pathLength: "100"
|
103
|
-
}
|
104
|
-
)
|
105
|
-
);
|
106
|
-
case "squircle":
|
107
|
-
return /* @__PURE__ */ React.createElement(
|
108
|
-
"svg",
|
109
|
-
{
|
110
|
-
className: cn("squircle-container", sizeStyles[size]),
|
111
|
-
x: "0px",
|
112
|
-
y: "0px",
|
113
|
-
viewBox: "0 0 37 37",
|
114
|
-
height: "37",
|
115
|
-
width: "37",
|
116
|
-
preserveAspectRatio: "xMidYMid meet"
|
117
|
-
},
|
118
|
-
/* @__PURE__ */ React.createElement(
|
119
|
-
"path",
|
120
|
-
{
|
121
|
-
className: "squircle-track",
|
122
|
-
fill: "none",
|
123
|
-
strokeWidth: "5",
|
124
|
-
pathLength: "100",
|
125
|
-
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"
|
126
|
-
}
|
127
|
-
),
|
128
|
-
/* @__PURE__ */ React.createElement(
|
129
|
-
"path",
|
130
|
-
{
|
131
|
-
className: "squircle-car",
|
132
|
-
fill: "none",
|
133
|
-
strokeWidth: "5",
|
134
|
-
pathLength: "100",
|
135
|
-
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"
|
136
|
-
}
|
137
|
-
)
|
138
|
-
);
|
139
|
-
case "progress":
|
140
|
-
return /* @__PURE__ */ React.createElement("div", { className: "progress-loading" });
|
141
|
-
case "orbit":
|
142
|
-
return /* @__PURE__ */ React.createElement("div", { className: "orbit-container" });
|
143
|
-
default:
|
144
|
-
return /* @__PURE__ */ React.createElement(
|
145
|
-
"svg",
|
146
|
-
{
|
147
|
-
className: cn("circle-container", sizeStyles[size]),
|
148
|
-
viewBox: "0 0 40 40",
|
149
|
-
height: "40",
|
150
|
-
width: "40"
|
151
|
-
},
|
152
|
-
/* @__PURE__ */ React.createElement(
|
153
|
-
"circle",
|
154
|
-
{
|
155
|
-
className: cn("circle-track", {
|
156
|
-
"hawa-stroke-primary-foreground": themeMode === "dark",
|
157
|
-
"hawa-stroke-primary": themeMode === "light"
|
158
|
-
}),
|
159
|
-
cx: "20",
|
160
|
-
cy: "20",
|
161
|
-
r: "17.5",
|
162
|
-
pathLength: "100",
|
163
|
-
strokeWidth: "5px",
|
164
|
-
fill: "none"
|
165
|
-
}
|
166
|
-
),
|
167
|
-
/* @__PURE__ */ React.createElement(
|
168
|
-
"circle",
|
169
|
-
{
|
170
|
-
className: cn("circle-car", {
|
171
|
-
"hawa-stroke-primary-foreground": themeMode === "dark",
|
172
|
-
"hawa-stroke-primary": themeMode === "light"
|
173
|
-
}),
|
174
|
-
cx: "20",
|
175
|
-
cy: "20",
|
176
|
-
r: "17.5",
|
177
|
-
pathLength: "100",
|
178
|
-
strokeWidth: "5px",
|
179
|
-
fill: "none"
|
180
|
-
}
|
181
|
-
)
|
182
|
-
);
|
183
|
-
}
|
184
|
-
};
|
185
|
-
|
186
|
-
// components/elements/button/Button.tsx
|
187
|
-
var buttonVariants = cva(
|
188
|
-
"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",
|
189
|
-
{
|
190
|
-
variants: {
|
191
|
-
variant: {
|
192
|
-
default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90",
|
193
|
-
light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40",
|
194
|
-
destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90",
|
195
|
-
outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
196
|
-
secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80",
|
197
|
-
ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground",
|
198
|
-
link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline",
|
199
|
-
combobox: "hawa-bg-background hawa-border",
|
200
|
-
neoBrutalism: "neo-brutalism"
|
201
|
-
// "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",
|
202
|
-
},
|
203
|
-
size: {
|
204
|
-
default: "hawa-h-10 hawa-px-4 hawa-py-2",
|
205
|
-
heightless: "hawa-px-4 hawa-py-4",
|
206
|
-
xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ",
|
207
|
-
sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3",
|
208
|
-
lg: "hawa-h-11 hawa-rounded-md hawa-px-8",
|
209
|
-
xl: "hawa-h-14 hawa-rounded-md hawa-px-10",
|
210
|
-
icon: "hawa-h-10 hawa-w-10",
|
211
|
-
smallIcon: "hawa-h-7 hawa-w-7"
|
212
|
-
}
|
213
|
-
},
|
214
|
-
defaultVariants: {
|
215
|
-
variant: "default",
|
216
|
-
size: "default"
|
217
|
-
}
|
218
|
-
}
|
219
|
-
);
|
220
|
-
var Button = React2.forwardRef(
|
221
|
-
({
|
222
|
-
className,
|
223
|
-
variant,
|
224
|
-
size,
|
225
|
-
asChild = false,
|
226
|
-
centered = true,
|
227
|
-
isLoading,
|
228
|
-
children,
|
229
|
-
...props
|
230
|
-
}, ref) => {
|
231
|
-
const Comp = "button";
|
232
|
-
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
233
|
-
return /* @__PURE__ */ React2.createElement(
|
234
|
-
Comp,
|
235
|
-
{
|
236
|
-
className: cn(
|
237
|
-
buttonVariants({ variant, size, className }),
|
238
|
-
centered && "hawa-justify-center"
|
239
|
-
),
|
240
|
-
ref,
|
241
|
-
...props
|
242
|
-
},
|
243
|
-
isLoading ? /* @__PURE__ */ React2.createElement(
|
244
|
-
Loading,
|
245
|
-
{
|
246
|
-
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
247
|
-
themeMode: variant === "outline" ? "light" : "dark",
|
248
|
-
color: loadingColor,
|
249
|
-
size: size === "sm" || size === "xs" ? "xs" : "button"
|
250
|
-
}
|
251
|
-
) : children
|
252
|
-
);
|
253
|
-
}
|
254
|
-
);
|
255
|
-
Button.displayName = "Button";
|
256
|
-
|
257
|
-
export {
|
258
|
-
Button
|
259
|
-
};
|
package/dist/chunk-ND4BWUKH.mjs
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
cn
|
3
|
-
} from "./chunk-TE3BKEXL.mjs";
|
4
|
-
|
5
|
-
// components/elements/skeleton/Skeleton.tsx
|
6
|
-
import React from "react";
|
7
|
-
function Skeleton({
|
8
|
-
className,
|
9
|
-
content,
|
10
|
-
animation = "pulse",
|
11
|
-
...props
|
12
|
-
}) {
|
13
|
-
const animationStyles = {
|
14
|
-
none: "hawa-rounded hawa-bg-muted",
|
15
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
16
|
-
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"
|
17
|
-
};
|
18
|
-
return /* @__PURE__ */ React.createElement(
|
19
|
-
"div",
|
20
|
-
{
|
21
|
-
className: cn(
|
22
|
-
animationStyles[animation],
|
23
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
24
|
-
className
|
25
|
-
),
|
26
|
-
...props
|
27
|
-
},
|
28
|
-
content && content
|
29
|
-
);
|
30
|
-
}
|
31
|
-
|
32
|
-
export {
|
33
|
-
Skeleton
|
34
|
-
};
|