@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
package/dist/chunk-GXSYCLZZ.mjs
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PopoverContent,
|
|
3
|
-
PopoverTrigger
|
|
4
|
-
} from "./chunk-AFOVBTLE.mjs";
|
|
5
|
-
import {
|
|
6
|
-
Command,
|
|
7
|
-
CommandEmpty,
|
|
8
|
-
CommandGroup,
|
|
9
|
-
CommandInput,
|
|
10
|
-
CommandItem
|
|
11
|
-
} from "./chunk-QMV6AK2B.mjs";
|
|
12
|
-
import {
|
|
13
|
-
Label
|
|
14
|
-
} from "./chunk-Z3JCNSB3.mjs";
|
|
15
|
-
import {
|
|
16
|
-
Skeleton
|
|
17
|
-
} from "./chunk-J5NJEHQU.mjs";
|
|
18
|
-
import {
|
|
19
|
-
cn
|
|
20
|
-
} from "./chunk-TE3BKEXL.mjs";
|
|
21
|
-
|
|
22
|
-
// components/elements/combobox/Combobox.tsx
|
|
23
|
-
import * as React from "react";
|
|
24
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
25
|
-
var Combobox = React.forwardRef(
|
|
26
|
-
({
|
|
27
|
-
labelKey = "label",
|
|
28
|
-
valueKey = "value",
|
|
29
|
-
defaultValue = "",
|
|
30
|
-
popoverClassName,
|
|
31
|
-
labelProps,
|
|
32
|
-
data,
|
|
33
|
-
...props
|
|
34
|
-
}, ref) => {
|
|
35
|
-
var _a, _b, _c;
|
|
36
|
-
const [open, setOpen] = React.useState(false);
|
|
37
|
-
const [value, setValue] = React.useState(defaultValue);
|
|
38
|
-
function getProperty(obj, key) {
|
|
39
|
-
return obj[key];
|
|
40
|
-
}
|
|
41
|
-
const handleOpenChange = (open2) => {
|
|
42
|
-
if (!(props.isLoading || props.preview)) {
|
|
43
|
-
setOpen(open2);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
return /* @__PURE__ */ React.createElement(
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
className: cn(
|
|
50
|
-
"hawa-relative hawa-flex hawa-h-fit hawa-flex-col hawa-gap-2",
|
|
51
|
-
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
|
52
|
-
)
|
|
53
|
-
},
|
|
54
|
-
props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label),
|
|
55
|
-
/* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-gap-2 " }, /* @__PURE__ */ React.createElement(
|
|
56
|
-
"div",
|
|
57
|
-
{
|
|
58
|
-
className: cn(
|
|
59
|
-
"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800",
|
|
60
|
-
props.preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
), /* @__PURE__ */ React.createElement(
|
|
64
|
-
"button",
|
|
65
|
-
{
|
|
66
|
-
role: "combobox",
|
|
67
|
-
"aria-expanded": open,
|
|
68
|
-
className: cn(
|
|
69
|
-
"hawa-inline-flex hawa-h-10 hawa-w-full hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-md hawa-border hawa-py-2 hawa-text-sm hawa-font-normal hawa-text-primary hawa-ring-offset-background hawa-transition-all 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",
|
|
70
|
-
props.preview ? "hawa-cursor-default hawa-rounded-none hawa-border-transparent hawa-px-0" : "hawa-bg-background hawa-px-3 "
|
|
71
|
-
)
|
|
72
|
-
},
|
|
73
|
-
value ? getProperty(
|
|
74
|
-
data.find((item) => item[valueKey] === value) || {},
|
|
75
|
-
labelKey
|
|
76
|
-
) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || "...",
|
|
77
|
-
/* @__PURE__ */ React.createElement(
|
|
78
|
-
"svg",
|
|
79
|
-
{
|
|
80
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
-
className: cn(
|
|
82
|
-
"hawa-icon hawa-transition-all",
|
|
83
|
-
!props.preview ? "hawa-visible hawa-opacity-100" : "hawa-invisible hawa-opacity-0"
|
|
84
|
-
),
|
|
85
|
-
"aria-label": "Chevron down icon",
|
|
86
|
-
viewBox: "0 0 24 24",
|
|
87
|
-
fill: "none",
|
|
88
|
-
stroke: "currentColor",
|
|
89
|
-
strokeWidth: "2",
|
|
90
|
-
strokeLinecap: "round",
|
|
91
|
-
strokeLinejoin: "round"
|
|
92
|
-
},
|
|
93
|
-
/* @__PURE__ */ React.createElement("path", { d: "m6 9 6 6 6-6" })
|
|
94
|
-
)
|
|
95
|
-
), /* @__PURE__ */ React.createElement(
|
|
96
|
-
"p",
|
|
97
|
-
{
|
|
98
|
-
className: cn(
|
|
99
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
100
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
101
|
-
)
|
|
102
|
-
},
|
|
103
|
-
props.helperText
|
|
104
|
-
))), /* @__PURE__ */ React.createElement(
|
|
105
|
-
PopoverContent,
|
|
106
|
-
{
|
|
107
|
-
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4")
|
|
108
|
-
},
|
|
109
|
-
/* @__PURE__ */ React.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React.createElement(
|
|
110
|
-
CommandInput,
|
|
111
|
-
{
|
|
112
|
-
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
|
113
|
-
}
|
|
114
|
-
), /* @__PURE__ */ React.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item, i) => /* @__PURE__ */ React.createElement(
|
|
115
|
-
CommandItem,
|
|
116
|
-
{
|
|
117
|
-
key: i,
|
|
118
|
-
onSelect: () => {
|
|
119
|
-
const newValue = getProperty(item, valueKey);
|
|
120
|
-
setValue(newValue === value ? "" : newValue);
|
|
121
|
-
if (props.onChange) {
|
|
122
|
-
props.onChange(
|
|
123
|
-
newValue === value ? "" : newValue
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
setOpen(false);
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
/* @__PURE__ */ React.createElement(
|
|
130
|
-
"svg",
|
|
131
|
-
{
|
|
132
|
-
"aria-label": "Check Icon",
|
|
133
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
134
|
-
width: "24",
|
|
135
|
-
height: "24",
|
|
136
|
-
viewBox: "0 0 24 24",
|
|
137
|
-
fill: "none",
|
|
138
|
-
stroke: "currentColor",
|
|
139
|
-
strokeWidth: "2",
|
|
140
|
-
strokeLinecap: "round",
|
|
141
|
-
strokeLinejoin: "round",
|
|
142
|
-
className: cn(
|
|
143
|
-
"hawa-icon hawa-mr-2",
|
|
144
|
-
value === getProperty(item, valueKey) ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
145
|
-
)
|
|
146
|
-
},
|
|
147
|
-
/* @__PURE__ */ React.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
148
|
-
),
|
|
149
|
-
getProperty(item, labelKey)
|
|
150
|
-
))))
|
|
151
|
-
))
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
export {
|
|
157
|
-
Combobox
|
|
158
|
-
};
|
package/dist/chunk-IQPGAHUR.mjs
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Button
|
|
3
|
-
} from "./chunk-SYB66JGL.mjs";
|
|
4
|
-
import {
|
|
5
|
-
cn
|
|
6
|
-
} from "./chunk-TE3BKEXL.mjs";
|
|
7
|
-
|
|
8
|
-
// components/elements/backToTop/BackToTop.tsx
|
|
9
|
-
import React, { useState, useEffect, useRef } from "react";
|
|
10
|
-
var BackToTop = ({ ...props }) => {
|
|
11
|
-
const [visible, setVisible] = useState(false);
|
|
12
|
-
const [rect, _setRect] = useState(null);
|
|
13
|
-
const self = useRef(null);
|
|
14
|
-
const _rect = useRef(rect);
|
|
15
|
-
const setRect = (data) => {
|
|
16
|
-
_rect.current = data;
|
|
17
|
-
_setRect(data);
|
|
18
|
-
};
|
|
19
|
-
const getCoords = () => {
|
|
20
|
-
let anchor = props.anchor.current;
|
|
21
|
-
if (anchor) {
|
|
22
|
-
return [anchor.scrollTop, anchor.scrollLeft];
|
|
23
|
-
}
|
|
24
|
-
return [0, 0];
|
|
25
|
-
};
|
|
26
|
-
const onScroll = () => {
|
|
27
|
-
var _a;
|
|
28
|
-
let [scrollTop, scrollLeft] = getCoords();
|
|
29
|
-
let rect2 = (_a = props.anchor.current) == null ? void 0 : _a.getBoundingClientRect();
|
|
30
|
-
if (rect2) {
|
|
31
|
-
setVisible(scrollTop >= rect2.height + (props.paddingThreshold || 100));
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const backToTop = () => {
|
|
35
|
-
if (props.anchor.current) {
|
|
36
|
-
props.anchor.current.scrollTo({ top: 0, behavior: "smooth" });
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
if (!props.anchor.current)
|
|
41
|
-
return;
|
|
42
|
-
props.anchor.current.addEventListener("scroll", onScroll);
|
|
43
|
-
let interval = setInterval(() => {
|
|
44
|
-
if (!props.anchor.current)
|
|
45
|
-
return;
|
|
46
|
-
let newRect = props.anchor.current.getBoundingClientRect();
|
|
47
|
-
if (_rect.current == null)
|
|
48
|
-
return setRect(newRect);
|
|
49
|
-
if (!(_rect.current.top == newRect.top && _rect.current.left == newRect.left && _rect.current.width == newRect.width && _rect.current.height == newRect.height)) {
|
|
50
|
-
setRect(newRect);
|
|
51
|
-
}
|
|
52
|
-
}, 1);
|
|
53
|
-
return () => {
|
|
54
|
-
var _a;
|
|
55
|
-
(_a = props.anchor.current) == null ? void 0 : _a.removeEventListener("scroll", onScroll);
|
|
56
|
-
clearInterval(interval);
|
|
57
|
-
};
|
|
58
|
-
}, [onScroll, props.anchor]);
|
|
59
|
-
const getStyles = () => {
|
|
60
|
-
var _a;
|
|
61
|
-
if (!props.anchor.current || !self.current)
|
|
62
|
-
return {};
|
|
63
|
-
let corner = props.corner || "bottom-right";
|
|
64
|
-
let [vertical, horizontal] = corner.split("-");
|
|
65
|
-
let anchorRect = props.anchor.current.getBoundingClientRect();
|
|
66
|
-
let selfRect = (_a = self.current) == null ? void 0 : _a.getBoundingClientRect();
|
|
67
|
-
let width = horizontal == "right" ? anchorRect.width - selfRect.width : 0;
|
|
68
|
-
let height = vertical == "bottom" ? anchorRect.height - selfRect.height : 0;
|
|
69
|
-
let style = {
|
|
70
|
-
top: anchorRect.y + height + (vertical == "bottom" ? -1 : 1) * (props.paddingX || 10),
|
|
71
|
-
left: anchorRect.x + width + (horizontal == "right" ? -1 : 1) * (props.paddingX || 25)
|
|
72
|
-
};
|
|
73
|
-
return style;
|
|
74
|
-
};
|
|
75
|
-
return /* @__PURE__ */ React.createElement(
|
|
76
|
-
Button,
|
|
77
|
-
{
|
|
78
|
-
className: cn(
|
|
79
|
-
"hawa-fixed hawa-cursor-pointer hawa-rounded hawa-transition-all",
|
|
80
|
-
visible ? "hawa-pointer-events-all hawa-opacity-100" : "hawa-pointer-events-none hawa-opacity-0"
|
|
81
|
-
),
|
|
82
|
-
onClick: backToTop,
|
|
83
|
-
style: {
|
|
84
|
-
...getStyles(),
|
|
85
|
-
transitionProperty: "opacity, background-color"
|
|
86
|
-
},
|
|
87
|
-
ref: self,
|
|
88
|
-
size: "icon"
|
|
89
|
-
},
|
|
90
|
-
/* @__PURE__ */ React.createElement(
|
|
91
|
-
"svg",
|
|
92
|
-
{
|
|
93
|
-
className: cn(
|
|
94
|
-
"hawa-h-6 hawa-w-6 hawa-shrink-0 hawa-rotate-180 hawa-transition-all disabled:hawa-bg-gray-200"
|
|
95
|
-
),
|
|
96
|
-
"aria-label": "Arrow Icon",
|
|
97
|
-
viewBox: "0 0 20 20",
|
|
98
|
-
fill: "currentColor"
|
|
99
|
-
},
|
|
100
|
-
/* @__PURE__ */ React.createElement("path", { d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" })
|
|
101
|
-
)
|
|
102
|
-
);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export {
|
|
106
|
-
BackToTop
|
|
107
|
-
};
|
package/dist/chunk-POT2IP62.mjs
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-TE3BKEXL.mjs";
|
|
4
|
-
|
|
5
|
-
// components/elements/avatar/Avatar.tsx
|
|
6
|
-
import React2 from "react";
|
|
7
|
-
|
|
8
|
-
// components/elements/FileUploader.tsx
|
|
9
|
-
import React, { useRef } from "react";
|
|
10
|
-
var FileUploader = ({ handleFile, className }) => {
|
|
11
|
-
const hiddenFileInput = useRef(null);
|
|
12
|
-
const handleClick = () => {
|
|
13
|
-
var _a;
|
|
14
|
-
(_a = hiddenFileInput.current) == null ? void 0 : _a.click();
|
|
15
|
-
};
|
|
16
|
-
const handleChange = (event) => {
|
|
17
|
-
const fileUploaded = event.target.files[0];
|
|
18
|
-
handleFile(fileUploaded);
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ React.createElement("div", { className }, /* @__PURE__ */ React.createElement("div", { className: "hawa-h-full hawa-w-full", onClick: handleClick }), /* @__PURE__ */ React.createElement(
|
|
21
|
-
"input",
|
|
22
|
-
{
|
|
23
|
-
type: "file",
|
|
24
|
-
onChange: handleChange,
|
|
25
|
-
ref: hiddenFileInput,
|
|
26
|
-
style: { display: "none" }
|
|
27
|
-
}
|
|
28
|
-
));
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// components/elements/avatar/Avatar.tsx
|
|
32
|
-
var Avatar = ({
|
|
33
|
-
isUploadable,
|
|
34
|
-
src,
|
|
35
|
-
alt,
|
|
36
|
-
size = "default",
|
|
37
|
-
radius = "inherit",
|
|
38
|
-
icon,
|
|
39
|
-
className,
|
|
40
|
-
...props
|
|
41
|
-
}) => {
|
|
42
|
-
let sizeStyles = {
|
|
43
|
-
"2xs": "hawa-h-4 hawa-w-4",
|
|
44
|
-
xs: "hawa-h-6 hawa-w-6",
|
|
45
|
-
sm: "hawa-h-8 hawa-w-8",
|
|
46
|
-
default: "hawa-h-10 hawa-w-10",
|
|
47
|
-
lg: "hawa-h-12 hawa-w-12",
|
|
48
|
-
xl: "hawa-h-14 hawa-w-14",
|
|
49
|
-
"2xl": "hawa-h-16 hawa-w-16",
|
|
50
|
-
"3xl": "hawa-h-[72px] hawa-w-[72px]",
|
|
51
|
-
"4xl": "hawa-h-20 hawa-w-20",
|
|
52
|
-
"5xl": "hawa-h-[88px] hawa-w-[88px]",
|
|
53
|
-
"6xl": "hawa-h-24 hawa-w-24"
|
|
54
|
-
};
|
|
55
|
-
let radiusStyles = {
|
|
56
|
-
full: "hawa-rounded-full",
|
|
57
|
-
inherit: "hawa-rounded",
|
|
58
|
-
none: "hawa-rounded-none"
|
|
59
|
-
};
|
|
60
|
-
return /* @__PURE__ */ React2.createElement(
|
|
61
|
-
"div",
|
|
62
|
-
{
|
|
63
|
-
className: cn(
|
|
64
|
-
"hawa-relative hawa-bg-card hawa-p-0",
|
|
65
|
-
sizeStyles[size],
|
|
66
|
-
radiusStyles[radius],
|
|
67
|
-
className
|
|
68
|
-
)
|
|
69
|
-
},
|
|
70
|
-
/* @__PURE__ */ React2.createElement(
|
|
71
|
-
FileUploader,
|
|
72
|
-
{
|
|
73
|
-
className: cn(
|
|
74
|
-
"hawa-absolute hawa-left-0 hawa-top-0 hawa-w-full hawa-cursor-pointer hawa-bg-red-400 hawa-opacity-0",
|
|
75
|
-
sizeStyles[size],
|
|
76
|
-
radiusStyles[radius],
|
|
77
|
-
(!isUploadable || !!src) && "hawa-hidden"
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ React2.createElement(
|
|
82
|
-
"img",
|
|
83
|
-
{
|
|
84
|
-
className: cn(
|
|
85
|
-
"hawa-blue-400 hawa-object-cover",
|
|
86
|
-
sizeStyles[size],
|
|
87
|
-
radiusStyles[radius],
|
|
88
|
-
!src && "hawa-hidden"
|
|
89
|
-
),
|
|
90
|
-
src,
|
|
91
|
-
alt
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
!src && !isUploadable && /* @__PURE__ */ React2.createElement(
|
|
95
|
-
"div",
|
|
96
|
-
{
|
|
97
|
-
className: cn(
|
|
98
|
-
sizeStyles[size],
|
|
99
|
-
"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center"
|
|
100
|
-
)
|
|
101
|
-
},
|
|
102
|
-
icon ? icon : /* @__PURE__ */ React2.createElement(
|
|
103
|
-
"svg",
|
|
104
|
-
{
|
|
105
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
106
|
-
style: { width: "50%", opacity: 0.35 },
|
|
107
|
-
viewBox: "0 0 24 24",
|
|
108
|
-
fill: "none",
|
|
109
|
-
stroke: "currentColor",
|
|
110
|
-
strokeWidth: "2",
|
|
111
|
-
strokeLinecap: "round",
|
|
112
|
-
strokeLinejoin: "round"
|
|
113
|
-
},
|
|
114
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "8", r: "5" }),
|
|
115
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M20 21a8 8 0 1 0-16 0" })
|
|
116
|
-
)
|
|
117
|
-
)
|
|
118
|
-
);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export {
|
|
122
|
-
Avatar
|
|
123
|
-
};
|
package/dist/chunk-TWDZB2VH.mjs
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-TE3BKEXL.mjs";
|
|
4
|
-
|
|
5
|
-
// components/elements/sheet/Sheet.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
8
|
-
import { cva } from "class-variance-authority";
|
|
9
|
-
var Sheet = SheetPrimitive.Root;
|
|
10
|
-
var SheetTrigger = SheetPrimitive.Trigger;
|
|
11
|
-
var SheetClose = SheetPrimitive.Close;
|
|
12
|
-
var SheetPortal = SheetPrimitive.Portal;
|
|
13
|
-
var SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
14
|
-
SheetPrimitive.Overlay,
|
|
15
|
-
{
|
|
16
|
-
className: cn(
|
|
17
|
-
"hawa-fixed hawa-inset-0 hawa-z-50 hawa-bg-background/80 hawa-backdrop-blur-sm 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",
|
|
18
|
-
className
|
|
19
|
-
),
|
|
20
|
-
...props,
|
|
21
|
-
ref
|
|
22
|
-
}
|
|
23
|
-
));
|
|
24
|
-
var sheetVariants = cva(
|
|
25
|
-
"hawa-fixed hawa-z-50 hawa-gap-4 hawa-bg-background hawa-p-2 hawa-shadow-lg hawa-transition hawa-ease-in-out data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-duration-300 data-[state=open]:hawa-duration-300",
|
|
26
|
-
{
|
|
27
|
-
variants: {
|
|
28
|
-
side: {
|
|
29
|
-
top: "hawa-inset-x-0 hawa-top-0 hawa-border-b data-[state=closed]:hawa-slide-out-to-top data-[state=open]:hawa-slide-in-from-top",
|
|
30
|
-
bottom: "hawa-inset-x-0 hawa-bottom-0 hawa-border-t data-[state=closed]:hawa-slide-out-to-bottom data-[state=open]:hawa-slide-in-from-bottom",
|
|
31
|
-
left: "hawa-inset-y-0 hawa-left-0 hawa-h-full hawa-w-3/4 hawa-border-r data-[state=closed]:hawa-slide-out-to-left data-[state=open]:hawa-slide-in-from-left sm:hawa-max-w-sm",
|
|
32
|
-
right: "hawa-inset-y-0 hawa-right-0 hawa-h-full hawa-w-3/4 hawa-border-l data-[state=closed]:hawa-slide-out-to-right data-[state=open]:hawa-slide-in-from-right sm:hawa-max-w-sm"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
side: "right"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
var SheetContent = React.forwardRef(
|
|
41
|
-
({ side = "right", className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React.createElement(SheetPortal, null, /* @__PURE__ */ React.createElement(SheetOverlay, null), /* @__PURE__ */ React.createElement(
|
|
42
|
-
SheetPrimitive.Content,
|
|
43
|
-
{
|
|
44
|
-
ref,
|
|
45
|
-
className: cn(sheetVariants({ side }), className),
|
|
46
|
-
onPointerDownOutside: (e) => {
|
|
47
|
-
if (persist) {
|
|
48
|
-
e.preventDefault();
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
...props
|
|
52
|
-
},
|
|
53
|
-
children,
|
|
54
|
-
!hideCloseButton && /* @__PURE__ */ React.createElement(
|
|
55
|
-
SheetPrimitive.Close,
|
|
56
|
-
{
|
|
57
|
-
className: cn(
|
|
58
|
-
"hawa-absolute hawa-rounded-sm hawa-opacity-70 hawa-ring-offset-background hawa-transition-opacity hover:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none data-[state=open]:hawa-bg-secondary",
|
|
59
|
-
{
|
|
60
|
-
"hawa-right-4 hawa-top-4": side === "left" || side === "bottom",
|
|
61
|
-
"hawa-left-4 hawa-top-4": side === "right",
|
|
62
|
-
"hawa-bottom-4 hawa-right-4": side === "top"
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
},
|
|
66
|
-
/* @__PURE__ */ React.createElement(
|
|
67
|
-
"svg",
|
|
68
|
-
{
|
|
69
|
-
"aria-label": "Close Icon",
|
|
70
|
-
"aria-hidden": "true",
|
|
71
|
-
className: "hawa-h-5 hawa-w-5",
|
|
72
|
-
fill: "currentColor",
|
|
73
|
-
viewBox: "0 0 20 20"
|
|
74
|
-
},
|
|
75
|
-
/* @__PURE__ */ React.createElement(
|
|
76
|
-
"path",
|
|
77
|
-
{
|
|
78
|
-
fillRule: "evenodd",
|
|
79
|
-
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",
|
|
80
|
-
clipRule: "evenodd"
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
),
|
|
84
|
-
/* @__PURE__ */ React.createElement("span", { className: "hawa-sr-only" }, "Close")
|
|
85
|
-
)
|
|
86
|
-
))
|
|
87
|
-
);
|
|
88
|
-
var SheetHeader = ({
|
|
89
|
-
className,
|
|
90
|
-
...props
|
|
91
|
-
}) => /* @__PURE__ */ React.createElement(
|
|
92
|
-
"div",
|
|
93
|
-
{
|
|
94
|
-
className: cn(
|
|
95
|
-
"hawa-flex hawa-flex-col hawa-space-y-2 hawa-text-center sm:hawa-text-left",
|
|
96
|
-
className
|
|
97
|
-
),
|
|
98
|
-
...props
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
var SheetFooter = ({
|
|
102
|
-
className,
|
|
103
|
-
...props
|
|
104
|
-
}) => /* @__PURE__ */ React.createElement(
|
|
105
|
-
"div",
|
|
106
|
-
{
|
|
107
|
-
className: cn(
|
|
108
|
-
"hawa-flex hawa-flex-col-reverse sm:hawa-flex-row sm:hawa-justify-end sm:hawa-space-x-2",
|
|
109
|
-
className
|
|
110
|
-
),
|
|
111
|
-
...props
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
var SheetTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
115
|
-
SheetPrimitive.Title,
|
|
116
|
-
{
|
|
117
|
-
ref,
|
|
118
|
-
className: cn(
|
|
119
|
-
"hawa-text-lg hawa-font-semibold hawa-text-foreground",
|
|
120
|
-
className
|
|
121
|
-
),
|
|
122
|
-
...props
|
|
123
|
-
}
|
|
124
|
-
));
|
|
125
|
-
var SheetDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
126
|
-
SheetPrimitive.Description,
|
|
127
|
-
{
|
|
128
|
-
ref,
|
|
129
|
-
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
|
130
|
-
...props
|
|
131
|
-
}
|
|
132
|
-
));
|
|
133
|
-
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
134
|
-
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
135
|
-
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
136
|
-
SheetHeader.displayName = "SheetHeader";
|
|
137
|
-
SheetFooter.displayName = "SheetFooter";
|
|
138
|
-
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
139
|
-
|
|
140
|
-
export {
|
|
141
|
-
Sheet,
|
|
142
|
-
SheetTrigger,
|
|
143
|
-
SheetClose,
|
|
144
|
-
SheetPortal,
|
|
145
|
-
SheetOverlay,
|
|
146
|
-
SheetContent,
|
|
147
|
-
SheetHeader,
|
|
148
|
-
SheetFooter,
|
|
149
|
-
SheetTitle,
|
|
150
|
-
SheetDescription
|
|
151
|
-
};
|
package/dist/chunk-VBTYVVA7.mjs
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-TE3BKEXL.mjs";
|
|
4
|
-
|
|
5
|
-
// components/elements/card/Card.tsx
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
var Card = React.forwardRef(
|
|
8
|
-
({ className, variant = "default", clickable = false, ...props }, ref) => {
|
|
9
|
-
let variantStyles = {
|
|
10
|
-
default: cn(
|
|
11
|
-
"hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
|
|
12
|
-
clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow"
|
|
13
|
-
),
|
|
14
|
-
neoBrutalism: cn(
|
|
15
|
-
"neo-brutalism",
|
|
16
|
-
// "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]",
|
|
17
|
-
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"
|
|
18
|
-
)
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ React.createElement(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
ref,
|
|
24
|
-
className: cn(className, variantStyles[variant]),
|
|
25
|
-
...props
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
31
|
-
"div",
|
|
32
|
-
{
|
|
33
|
-
ref,
|
|
34
|
-
className: cn(
|
|
35
|
-
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
|
|
36
|
-
className
|
|
37
|
-
),
|
|
38
|
-
...props
|
|
39
|
-
}
|
|
40
|
-
));
|
|
41
|
-
var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
42
|
-
"h3",
|
|
43
|
-
{
|
|
44
|
-
ref,
|
|
45
|
-
className: cn("hawa-text-2xl hawa-font-semibold ", className),
|
|
46
|
-
...props
|
|
47
|
-
}
|
|
48
|
-
));
|
|
49
|
-
var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
50
|
-
"p",
|
|
51
|
-
{
|
|
52
|
-
ref,
|
|
53
|
-
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
|
54
|
-
...props
|
|
55
|
-
}
|
|
56
|
-
));
|
|
57
|
-
var CardContent = React.forwardRef(
|
|
58
|
-
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
ref,
|
|
62
|
-
className: cn(
|
|
63
|
-
noPadding ? "hawa-p-0" : "hawa-p-6",
|
|
64
|
-
headless ? "hawa-pt-6" : "hawa-pt-0",
|
|
65
|
-
className
|
|
66
|
-
),
|
|
67
|
-
...props
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
);
|
|
71
|
-
var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
ref,
|
|
75
|
-
className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className),
|
|
76
|
-
...props
|
|
77
|
-
}
|
|
78
|
-
));
|
|
79
|
-
CardDescription.displayName = "CardDescription";
|
|
80
|
-
CardContent.displayName = "CardContent";
|
|
81
|
-
CardHeader.displayName = "CardHeader";
|
|
82
|
-
CardFooter.displayName = "CardFooter";
|
|
83
|
-
CardTitle.displayName = "CardTitle";
|
|
84
|
-
Card.displayName = "Card";
|
|
85
|
-
|
|
86
|
-
export {
|
|
87
|
-
Card,
|
|
88
|
-
CardHeader,
|
|
89
|
-
CardTitle,
|
|
90
|
-
CardDescription,
|
|
91
|
-
CardContent,
|
|
92
|
-
CardFooter
|
|
93
|
-
};
|