@sikka/hawa 0.24.4-next → 0.24.5-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.d.mts +1 -2
- package/dist/accordion/index.d.ts +1 -2
- package/dist/accordion/index.mjs +219 -7
- package/dist/alert/index.d.mts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/appLayout/index.d.mts +126 -0
- package/dist/appLayout/index.d.ts +126 -0
- package/dist/appLayout/index.js +1325 -0
- package/dist/appLayout/index.mjs +1285 -0
- package/dist/appMenubar/index.d.mts +33 -0
- package/dist/appMenubar/index.d.ts +33 -0
- package/dist/appMenubar/index.js +281 -0
- package/dist/appMenubar/index.mjs +224 -0
- package/dist/appTabs/index.d.mts +18 -0
- package/dist/appTabs/index.d.ts +18 -0
- package/dist/appTabs/index.js +92 -0
- package/dist/appTabs/index.mjs +50 -0
- package/dist/appTopbar/index.d.mts +44 -0
- package/dist/appTopbar/index.d.ts +44 -0
- package/dist/appTopbar/index.js +483 -0
- package/dist/appTopbar/index.mjs +441 -0
- package/dist/avatar/index.d.mts +5 -4
- package/dist/avatar/index.d.ts +5 -4
- package/dist/backToTop/index.mjs +353 -3
- package/dist/badge/index.d.mts +2 -2
- package/dist/badge/index.d.ts +2 -2
- package/dist/checkbox/index.d.mts +1 -2
- package/dist/checkbox/index.d.ts +1 -2
- package/dist/chip/index.d.mts +36 -2
- package/dist/chip/index.d.ts +36 -2
- package/dist/chip/index.mjs +83 -3
- package/dist/chunk-62GI5F2P.mjs +442 -0
- package/dist/chunk-7NCNPRCL.mjs +120 -0
- package/dist/{chunk-TNAHW35O.mjs → chunk-C2UYTGUD.mjs} +8 -4
- package/dist/{chunk-26FHSPJI.mjs → chunk-DGWAHQRX.mjs} +1 -101
- package/dist/chunk-LRLLDOQZ.mjs +178 -0
- package/dist/chunk-ND4BWUKH.mjs +34 -0
- package/dist/codeBlock/index.mjs +684 -310
- package/dist/colorPicker/index.d.mts +2 -1
- package/dist/colorPicker/index.d.ts +2 -1
- package/dist/colorPicker/index.mjs +2 -167
- package/dist/combobox/index.d.mts +9 -1
- package/dist/combobox/index.d.ts +9 -1
- package/dist/combobox/index.mjs +61 -393
- package/dist/command/index.mjs +10 -425
- package/dist/commonTypes-3J1E3b61.d.mts +6 -0
- package/dist/commonTypes-3J1E3b61.d.ts +6 -0
- package/dist/commonTypes-GhKAraJw.d.mts +4 -0
- package/dist/commonTypes-GhKAraJw.d.ts +4 -0
- package/dist/commonTypes-LrR8QrYP.d.mts +5 -0
- package/dist/commonTypes-LrR8QrYP.d.ts +5 -0
- package/dist/commonTypes-WPhcN3Vr.d.mts +5 -0
- package/dist/commonTypes-WPhcN3Vr.d.ts +5 -0
- package/dist/commonTypes-ko_NGEoT.d.mts +3 -0
- package/dist/commonTypes-ko_NGEoT.d.ts +3 -0
- package/dist/copyrights/index.d.mts +17 -0
- package/dist/copyrights/index.d.ts +17 -0
- package/dist/copyrights/index.js +45 -0
- package/dist/copyrights/index.mjs +8 -0
- package/dist/count/index.d.mts +11 -0
- package/dist/count/index.d.ts +11 -0
- package/dist/count/index.js +45 -0
- package/dist/count/index.mjs +8 -0
- package/dist/dataTable/index.d.mts +1 -1
- package/dist/dataTable/index.d.ts +1 -1
- package/dist/destroyableCard/index.d.mts +1 -1
- package/dist/destroyableCard/index.d.ts +1 -1
- package/dist/dialog/index.d.mts +1 -1
- package/dist/dialog/index.d.ts +1 -1
- package/dist/docsLayout/index.d.mts +37 -0
- package/dist/docsLayout/index.d.ts +37 -0
- package/dist/docsLayout/index.js +926 -0
- package/dist/docsLayout/index.mjs +886 -0
- package/dist/docsSidebar/index.d.mts +11 -0
- package/dist/docsSidebar/index.d.ts +11 -0
- package/dist/docsSidebar/index.js +111 -0
- package/dist/docsSidebar/index.mjs +69 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +50 -41
- package/dist/index.mjs +50 -41
- package/dist/input/index.d.mts +2 -9
- package/dist/input/index.d.ts +2 -9
- package/dist/input/index.mjs +14 -98
- package/dist/interfaceSettings/index.d.mts +1 -1
- package/dist/interfaceSettings/index.d.ts +1 -1
- package/dist/interfaceSettings/index.mjs +24 -110
- package/dist/label/index.d.mts +1 -1
- package/dist/label/index.d.ts +1 -1
- package/dist/label/index.mjs +2 -87
- package/dist/layout/index.d.mts +1 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +53 -44
- package/dist/layout/index.mjs +50 -41
- package/dist/navbar/index.d.mts +17 -0
- package/dist/navbar/index.d.ts +17 -0
- package/dist/navbar/index.js +166 -0
- package/dist/navbar/index.mjs +126 -0
- package/dist/pagination/index.d.mts +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/passwordInput/index.mjs +27 -137
- package/dist/phoneInput/index.mjs +19 -129
- package/dist/radio/index.d.mts +1 -4
- package/dist/radio/index.d.ts +1 -4
- package/dist/scrollArea/index.d.mts +1 -1
- package/dist/scrollArea/index.d.ts +1 -1
- package/dist/select/index.d.mts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/separator/index.d.mts +1 -1
- package/dist/separator/index.d.ts +1 -1
- package/dist/sidebar/index.d.mts +48 -0
- package/dist/sidebar/index.d.ts +48 -0
- package/dist/sidebar/index.js +341 -0
- package/dist/sidebar/index.mjs +298 -0
- package/dist/simpleTable/index.d.mts +4 -3
- package/dist/simpleTable/index.d.ts +4 -3
- package/dist/simpleTable/index.mjs +21 -45
- package/dist/skeleton/index.d.mts +3 -3
- package/dist/skeleton/index.d.ts +3 -3
- package/dist/skeleton/index.mjs +3 -29
- package/dist/sortButton/index.mjs +9 -260
- package/dist/splitButton/index.d.mts +4 -3
- package/dist/splitButton/index.d.ts +4 -3
- package/dist/splitButton/index.mjs +10 -259
- package/dist/stats/index.d.mts +19 -0
- package/dist/stats/index.d.ts +19 -0
- package/dist/stats/index.js +191 -0
- package/dist/stats/index.mjs +154 -0
- package/dist/stopPropagationWrapper/index.d.mts +2 -2
- package/dist/stopPropagationWrapper/index.d.ts +2 -2
- package/dist/switch/index.d.mts +2 -1
- package/dist/switch/index.d.ts +2 -1
- package/dist/tabs/index.d.mts +19 -1
- package/dist/tabs/index.d.ts +19 -1
- package/dist/tabs/index.mjs +94 -14
- package/dist/textarea/index.d.mts +8 -1
- package/dist/textarea/index.d.ts +8 -1
- package/dist/textarea/index.mjs +92 -8
- package/dist/toast/index.d.mts +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Label-fkQ4ebuH.d.mts +0 -12
- package/dist/Label-fkQ4ebuH.d.ts +0 -12
- package/dist/chunk-72HYR6WB.mjs +0 -88
- package/dist/chunk-JYSC6GKM.mjs +0 -229
- package/dist/commonTypes-3k5cNB1s.d.mts +0 -4
- package/dist/commonTypes-3k5cNB1s.d.ts +0 -4
- package/dist/commonTypes-N7XOVCit.d.mts +0 -5
- package/dist/commonTypes-N7XOVCit.d.ts +0 -5
- package/dist/index-DUZFcPRO.d.mts +0 -38
- package/dist/index-DUZFcPRO.d.ts +0 -38
@@ -0,0 +1,126 @@
|
|
1
|
+
import {
|
2
|
+
cn
|
3
|
+
} from "../chunk-TE3BKEXL.mjs";
|
4
|
+
|
5
|
+
// components/layout/navbar/Navbar.tsx
|
6
|
+
import React, { useState } from "react";
|
7
|
+
|
8
|
+
// components/elements/collapsible/Collapsible.tsx
|
9
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
10
|
+
var Collapsible = CollapsiblePrimitive.Root;
|
11
|
+
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
12
|
+
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
13
|
+
|
14
|
+
// components/layout/navbar/Navbar.tsx
|
15
|
+
var Navbar = ({
|
16
|
+
backgroundColor,
|
17
|
+
logo,
|
18
|
+
handleLogoClick,
|
19
|
+
...props
|
20
|
+
}) => {
|
21
|
+
var _a, _b;
|
22
|
+
const [isOpen, setIsOpen] = useState(false);
|
23
|
+
return /* @__PURE__ */ React.createElement("nav", { className: " hawa-sticky hawa-top-2 hawa-transition-all" }, /* @__PURE__ */ React.createElement(
|
24
|
+
Collapsible,
|
25
|
+
{
|
26
|
+
className: "hawa-relative hawa-m-2 hawa-rounded hawa-p-2",
|
27
|
+
style: { backgroundColor: backgroundColor || "#1f2937" }
|
28
|
+
},
|
29
|
+
/* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-items-center hawa-justify-between hawa-px-3 " }, /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-items-center" }, /* @__PURE__ */ React.createElement(
|
30
|
+
"div",
|
31
|
+
{
|
32
|
+
className: "hawa-p-1.5 hawa-text-xl hawa-font-bold hawa-text-white",
|
33
|
+
onClick: () => {
|
34
|
+
if (handleLogoClick) {
|
35
|
+
handleLogoClick();
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
logo
|
40
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "hawa-hidden md:hawa-flex " }, (_a = props.menuItems) == null ? void 0 : _a.map((item, i) => /* @__PURE__ */ React.createElement(
|
41
|
+
"div",
|
42
|
+
{
|
43
|
+
key: i,
|
44
|
+
onClick: item.action,
|
45
|
+
className: "hawa-cursor-pointer hawa-rounded hawa-p-1.5 hawa-px-2 hawa-text-center hawa-text-sm hawa-text-white hawa-transition-all hover:hawa-bg-gray-300 hover:hawa-text-black"
|
46
|
+
},
|
47
|
+
item.label
|
48
|
+
))), /* @__PURE__ */ React.createElement("div", { className: "hawa-m-0 hawa-flex hawa-h-fit hawa-p-0 md:hawa-hidden" }, /* @__PURE__ */ React.createElement(
|
49
|
+
CollapsibleTrigger2,
|
50
|
+
{
|
51
|
+
onClick: () => setIsOpen(!isOpen),
|
52
|
+
className: "hawa-h-full hawa-text-white selection:hawa-p-0 ",
|
53
|
+
"aria-label": "Toggle menu"
|
54
|
+
},
|
55
|
+
/* @__PURE__ */ React.createElement(
|
56
|
+
"svg",
|
57
|
+
{
|
58
|
+
xmlns: "http://www.w3.org/2000/svg",
|
59
|
+
width: "24",
|
60
|
+
height: "24",
|
61
|
+
viewBox: "0 0 24 24",
|
62
|
+
fill: "none",
|
63
|
+
stroke: "currentColor",
|
64
|
+
strokeWidth: "2",
|
65
|
+
strokeLinecap: "round",
|
66
|
+
strokeLinejoin: "round",
|
67
|
+
className: cn(
|
68
|
+
"hawa-fixed hawa-h-6 hawa-w-6",
|
69
|
+
isOpen ? "hawa-invisible" : "hawa-visible"
|
70
|
+
)
|
71
|
+
},
|
72
|
+
/* @__PURE__ */ React.createElement("line", { x1: "4", x2: "20", y1: "12", y2: "12" }),
|
73
|
+
/* @__PURE__ */ React.createElement("line", { x1: "4", x2: "20", y1: "6", y2: "6" }),
|
74
|
+
/* @__PURE__ */ React.createElement("line", { x1: "4", x2: "20", y1: "18", y2: "18" })
|
75
|
+
),
|
76
|
+
/* @__PURE__ */ React.createElement(
|
77
|
+
"svg",
|
78
|
+
{
|
79
|
+
xmlns: "http://www.w3.org/2000/svg",
|
80
|
+
width: "24",
|
81
|
+
height: "24",
|
82
|
+
viewBox: "0 0 24 24",
|
83
|
+
fill: "none",
|
84
|
+
stroke: "currentColor",
|
85
|
+
strokeWidth: "2",
|
86
|
+
strokeLinecap: "round",
|
87
|
+
strokeLinejoin: "round",
|
88
|
+
className: cn(
|
89
|
+
"hawa-h-6 hawa-w-6",
|
90
|
+
!isOpen ? "hawa-invisible" : "hawa-visible"
|
91
|
+
)
|
92
|
+
},
|
93
|
+
/* @__PURE__ */ React.createElement("path", { d: "M18 6 6 18" }),
|
94
|
+
/* @__PURE__ */ React.createElement("path", { d: "m6 6 12 12" })
|
95
|
+
)
|
96
|
+
))),
|
97
|
+
/* @__PURE__ */ React.createElement(
|
98
|
+
CollapsibleContent2,
|
99
|
+
{
|
100
|
+
className: cn(
|
101
|
+
"data-[state=closed]:hawa-opacity-0",
|
102
|
+
"data-[state=open]:hawa-animate-in",
|
103
|
+
"data-[state=open]:hawa-fade-in-90",
|
104
|
+
"hawa-absolute hawa-left-0 hawa-top-[60px] hawa-flex hawa-flex-col hawa-rounded hawa-border hawa-bg-gray-200 hawa-p-1 hawa-transition-all"
|
105
|
+
// "hawa-transition-all hawa-bg-gray-400 hawa-fixed hawa-left-0 hawa-top-[72px] hawa-w-full hawa-flex hawa-flex-col"
|
106
|
+
),
|
107
|
+
style: {
|
108
|
+
width: "calc(100%)",
|
109
|
+
zIndex: -100
|
110
|
+
}
|
111
|
+
},
|
112
|
+
(_b = props.menuItems) == null ? void 0 : _b.map((item, i) => /* @__PURE__ */ React.createElement(
|
113
|
+
"div",
|
114
|
+
{
|
115
|
+
key: i,
|
116
|
+
onClick: item.action,
|
117
|
+
className: "hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-px-10 hawa-text-center hawa-text-black hawa-transition-all hover:hawa-bg-gray-300"
|
118
|
+
},
|
119
|
+
item.label
|
120
|
+
))
|
121
|
+
)
|
122
|
+
));
|
123
|
+
};
|
124
|
+
export {
|
125
|
+
Navbar
|
126
|
+
};
|
@@ -1,9 +1,13 @@
|
|
1
|
+
import {
|
2
|
+
Label,
|
3
|
+
Skeleton
|
4
|
+
} from "../chunk-7NCNPRCL.mjs";
|
1
5
|
import {
|
2
6
|
cn
|
3
7
|
} from "../chunk-TE3BKEXL.mjs";
|
4
8
|
|
5
9
|
// components/elements/passwordInput/PasswordInput.tsx
|
6
|
-
import
|
10
|
+
import React6, { useEffect, useState } from "react";
|
7
11
|
|
8
12
|
// components/icons/Emojis.tsx
|
9
13
|
import React from "react";
|
@@ -91,122 +95,8 @@ var UncheckMark = ({ size = "default", className }) => {
|
|
91
95
|
};
|
92
96
|
|
93
97
|
// components/elements/input/Input.tsx
|
94
|
-
import
|
95
|
-
|
96
|
-
// components/elements/label/Label.tsx
|
97
|
-
import * as React5 from "react";
|
98
|
-
|
99
|
-
// components/elements/tooltip/Tooltip.tsx
|
100
|
-
import React4 from "react";
|
101
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
102
|
-
var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React4.createElement(
|
103
|
-
TooltipPrimitive.Content,
|
104
|
-
{
|
105
|
-
ref,
|
106
|
-
sideOffset,
|
107
|
-
className: cn(
|
108
|
-
"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",
|
109
|
-
className
|
110
|
-
),
|
111
|
-
...props
|
112
|
-
}
|
113
|
-
));
|
114
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
115
|
-
var TooltipArrow = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
116
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
117
|
-
var Tooltip = ({
|
118
|
-
side,
|
119
|
-
open,
|
120
|
-
content,
|
121
|
-
children,
|
122
|
-
defaultOpen,
|
123
|
-
onOpenChange,
|
124
|
-
triggerProps,
|
125
|
-
contentProps,
|
126
|
-
providerProps,
|
127
|
-
delayDuration = 300,
|
128
|
-
...props
|
129
|
-
}) => {
|
130
|
-
return /* @__PURE__ */ React4.createElement(
|
131
|
-
TooltipPrimitive.TooltipProvider,
|
132
|
-
{
|
133
|
-
delayDuration,
|
134
|
-
...providerProps
|
135
|
-
},
|
136
|
-
/* @__PURE__ */ React4.createElement(
|
137
|
-
TooltipPrimitive.Root,
|
138
|
-
{
|
139
|
-
open,
|
140
|
-
defaultOpen,
|
141
|
-
onOpenChange,
|
142
|
-
...props
|
143
|
-
},
|
144
|
-
/* @__PURE__ */ React4.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
145
|
-
/* @__PURE__ */ React4.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
146
|
-
)
|
147
|
-
);
|
148
|
-
};
|
149
|
-
|
150
|
-
// components/elements/label/Label.tsx
|
151
|
-
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(
|
152
|
-
"label",
|
153
|
-
{
|
154
|
-
ref,
|
155
|
-
className: cn(
|
156
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
157
|
-
className
|
158
|
-
),
|
159
|
-
...props
|
160
|
-
},
|
161
|
-
children,
|
162
|
-
required && /* @__PURE__ */ React5.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
163
|
-
), hint && /* @__PURE__ */ React5.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React5.createElement(
|
164
|
-
"svg",
|
165
|
-
{
|
166
|
-
xmlns: "http://www.w3.org/2000/svg",
|
167
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
168
|
-
viewBox: "0 0 24 24",
|
169
|
-
fill: "none",
|
170
|
-
stroke: "currentColor",
|
171
|
-
strokeWidth: "2",
|
172
|
-
strokeLinecap: "round",
|
173
|
-
strokeLinejoin: "round"
|
174
|
-
},
|
175
|
-
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
176
|
-
/* @__PURE__ */ React5.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
177
|
-
/* @__PURE__ */ React5.createElement("path", { d: "M12 17h.01" })
|
178
|
-
))));
|
179
|
-
Label.displayName = "Label";
|
180
|
-
|
181
|
-
// components/elements/skeleton/Skeleton.tsx
|
182
|
-
import React6 from "react";
|
183
|
-
function Skeleton({
|
184
|
-
className,
|
185
|
-
content,
|
186
|
-
animation = "pulse",
|
187
|
-
...props
|
188
|
-
}) {
|
189
|
-
const animationStyles = {
|
190
|
-
none: "hawa-rounded hawa-bg-muted",
|
191
|
-
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
192
|
-
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"
|
193
|
-
};
|
194
|
-
return /* @__PURE__ */ React6.createElement(
|
195
|
-
"div",
|
196
|
-
{
|
197
|
-
className: cn(
|
198
|
-
animationStyles[animation],
|
199
|
-
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
200
|
-
className
|
201
|
-
),
|
202
|
-
...props
|
203
|
-
},
|
204
|
-
content && content
|
205
|
-
);
|
206
|
-
}
|
207
|
-
|
208
|
-
// components/elements/input/Input.tsx
|
209
|
-
var Input = forwardRef2(
|
98
|
+
import React4, { forwardRef } from "react";
|
99
|
+
var Input = forwardRef(
|
210
100
|
({
|
211
101
|
margin = "none",
|
212
102
|
width = "full",
|
@@ -233,7 +123,7 @@ var Input = forwardRef2(
|
|
233
123
|
};
|
234
124
|
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
235
125
|
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
236
|
-
return /* @__PURE__ */
|
126
|
+
return /* @__PURE__ */ React4.createElement(
|
237
127
|
"div",
|
238
128
|
{
|
239
129
|
className: cn(
|
@@ -244,8 +134,8 @@ var Input = forwardRef2(
|
|
244
134
|
"hawa-w-full hawa-gap-2"
|
245
135
|
)
|
246
136
|
},
|
247
|
-
props.label && /* @__PURE__ */
|
248
|
-
props.isLoading ? /* @__PURE__ */
|
137
|
+
props.label && /* @__PURE__ */ React4.createElement(Label, { ...labelProps }, props.label),
|
138
|
+
props.isLoading ? /* @__PURE__ */ React4.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React4.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React4.createElement(
|
249
139
|
"div",
|
250
140
|
{
|
251
141
|
className: cn(
|
@@ -253,7 +143,7 @@ var Input = forwardRef2(
|
|
253
143
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
254
144
|
)
|
255
145
|
}
|
256
|
-
), /* @__PURE__ */
|
146
|
+
), /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ React4.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React4.createElement(
|
257
147
|
"div",
|
258
148
|
{
|
259
149
|
className: cn(
|
@@ -262,7 +152,7 @@ var Input = forwardRef2(
|
|
262
152
|
)
|
263
153
|
},
|
264
154
|
props.endIcon
|
265
|
-
), /* @__PURE__ */
|
155
|
+
), /* @__PURE__ */ React4.createElement(
|
266
156
|
"input",
|
267
157
|
{
|
268
158
|
required: true,
|
@@ -288,7 +178,7 @@ var Input = forwardRef2(
|
|
288
178
|
inputProps == null ? void 0 : inputProps.className
|
289
179
|
)
|
290
180
|
}
|
291
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
181
|
+
)), !forceHideHelperText && /* @__PURE__ */ React4.createElement(
|
292
182
|
"p",
|
293
183
|
{
|
294
184
|
className: cn(
|
@@ -297,7 +187,7 @@ var Input = forwardRef2(
|
|
297
187
|
)
|
298
188
|
},
|
299
189
|
props.helperText
|
300
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
190
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ React4.createElement(
|
301
191
|
"div",
|
302
192
|
{
|
303
193
|
className: cn(
|
@@ -306,7 +196,7 @@ var Input = forwardRef2(
|
|
306
196
|
)
|
307
197
|
},
|
308
198
|
props.helperText
|
309
|
-
), showCount && /* @__PURE__ */
|
199
|
+
), showCount && /* @__PURE__ */ React4.createElement(
|
310
200
|
"div",
|
311
201
|
{
|
312
202
|
className: cn(
|
@@ -327,9 +217,9 @@ var Input = forwardRef2(
|
|
327
217
|
);
|
328
218
|
|
329
219
|
// components/elements/popover/Popover.tsx
|
330
|
-
import * as
|
220
|
+
import * as React5 from "react";
|
331
221
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
332
|
-
var PopoverContent =
|
222
|
+
var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React5.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React5.createElement(
|
333
223
|
PopoverPrimitive.Content,
|
334
224
|
{
|
335
225
|
ref,
|
@@ -361,7 +251,7 @@ var Popover = ({
|
|
361
251
|
trigger: "var(--radix-popover-trigger-width)",
|
362
252
|
default: "auto"
|
363
253
|
};
|
364
|
-
return /* @__PURE__ */
|
254
|
+
return /* @__PURE__ */ React5.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React5.createElement(
|
365
255
|
PopoverPrimitive.Trigger,
|
366
256
|
{
|
367
257
|
className: "hawa-w-full",
|
@@ -369,7 +259,7 @@ var Popover = ({
|
|
369
259
|
...triggerProps
|
370
260
|
},
|
371
261
|
trigger
|
372
|
-
), /* @__PURE__ */
|
262
|
+
), /* @__PURE__ */ React5.createElement(
|
373
263
|
PopoverContent,
|
374
264
|
{
|
375
265
|
side,
|
@@ -412,7 +302,7 @@ var PasswordStrengthIndicator = ({ strength }) => {
|
|
412
302
|
strong: "80%",
|
413
303
|
"very-strong": "100%"
|
414
304
|
}[currentStrengthLevel];
|
415
|
-
return /* @__PURE__ */
|
305
|
+
return /* @__PURE__ */ React6.createElement("div", { className: "hawa-mt-0.5 hawa-h-2 hawa-w-full hawa-rounded hawa-bg-gray-200" }, /* @__PURE__ */ React6.createElement(
|
416
306
|
"div",
|
417
307
|
{
|
418
308
|
className: `${strengthColors[currentStrengthLevel]} hawa-h-full hawa-rounded hawa-transition-all hawa-duration-300`,
|
@@ -472,7 +362,7 @@ var PasswordInput = ({
|
|
472
362
|
setIsInputFocused(false);
|
473
363
|
};
|
474
364
|
const getCriteriaClass = (isMet) => isMet ? "hawa-flex hawa-flex-row hawa-gap-2 hawa-text-sm hawa-items-center hawa-text-green-500" : "hawa-flex hawa-flex-row hawa-gap-2 hawa-text-sm hawa-items-center hawa-text-red-600";
|
475
|
-
return /* @__PURE__ */
|
365
|
+
return /* @__PURE__ */ React6.createElement("div", null, /* @__PURE__ */ React6.createElement(
|
476
366
|
Popover,
|
477
367
|
{
|
478
368
|
width: "trigger",
|
@@ -481,7 +371,7 @@ var PasswordInput = ({
|
|
481
371
|
onOpenChange: setIsInputFocused,
|
482
372
|
triggerProps: { asChild: true },
|
483
373
|
contentProps: { onOpenAutoFocus: (e) => e.preventDefault() },
|
484
|
-
trigger: /* @__PURE__ */
|
374
|
+
trigger: /* @__PURE__ */ React6.createElement(
|
485
375
|
"div",
|
486
376
|
{
|
487
377
|
onClick: (e) => {
|
@@ -491,7 +381,7 @@ var PasswordInput = ({
|
|
491
381
|
}
|
492
382
|
}
|
493
383
|
},
|
494
|
-
/* @__PURE__ */
|
384
|
+
/* @__PURE__ */ React6.createElement(
|
495
385
|
Input,
|
496
386
|
{
|
497
387
|
width: "full",
|
@@ -501,21 +391,21 @@ var PasswordInput = ({
|
|
501
391
|
onFocus: handleInputFocus,
|
502
392
|
onBlur: handleInputBlur,
|
503
393
|
type: passwordVisible ? "text" : "password",
|
504
|
-
endIcon: /* @__PURE__ */
|
394
|
+
endIcon: /* @__PURE__ */ React6.createElement(
|
505
395
|
"div",
|
506
396
|
{
|
507
397
|
className: "hawa-cursor-pointer",
|
508
398
|
onClick: () => setPasswordVisible(!passwordVisible)
|
509
399
|
},
|
510
|
-
passwordVisible ? /* @__PURE__ */
|
400
|
+
passwordVisible ? /* @__PURE__ */ React6.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React6.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
|
511
401
|
" "
|
512
402
|
)
|
513
403
|
}
|
514
404
|
)
|
515
405
|
)
|
516
406
|
},
|
517
|
-
/* @__PURE__ */
|
518
|
-
), /* @__PURE__ */
|
407
|
+
/* @__PURE__ */ React6.createElement("div", { className: "hawa-rounded hawa-p-2" }, /* @__PURE__ */ React6.createElement("ul", { className: "hawa-rounded hawa-p-2" }, /* @__PURE__ */ React6.createElement("li", { className: getCriteriaClass(lengthCriteriaMet) }, lengthCriteriaMet ? /* @__PURE__ */ React6.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React6.createElement(UncheckMark, { size: "sm" }), "At least 8 characters long"), /* @__PURE__ */ React6.createElement("li", { className: getCriteriaClass(numberCriteriaMet) }, numberCriteriaMet ? /* @__PURE__ */ React6.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React6.createElement(UncheckMark, { size: "sm" }), "At least 1 number"), /* @__PURE__ */ React6.createElement("li", { className: getCriteriaClass(specialCharCriteriaMet) }, specialCharCriteriaMet ? /* @__PURE__ */ React6.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React6.createElement(UncheckMark, { size: "sm" }), "At least 1 special character"), /* @__PURE__ */ React6.createElement("li", { className: getCriteriaClass(lowercaseCriteriaMet) }, lowercaseCriteriaMet ? /* @__PURE__ */ React6.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React6.createElement(UncheckMark, { size: "sm" }), "At least 1 lowercase letter"), /* @__PURE__ */ React6.createElement("li", { className: getCriteriaClass(uppercaseCriteriaMet) }, uppercaseCriteriaMet ? /* @__PURE__ */ React6.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React6.createElement(UncheckMark, { size: "sm" }), "At least 1 uppercase letter")))
|
408
|
+
), /* @__PURE__ */ React6.createElement(PasswordStrengthIndicator, { strength: currentStr }));
|
519
409
|
};
|
520
410
|
export {
|
521
411
|
PasswordInput,
|