@sikka/hawa 0.25.0-next → 0.25.2-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 +2 -1
- package/dist/blocks/auth/index.mjs +2 -1
- package/dist/blocks/index.js +2 -1
- package/dist/blocks/index.mjs +2 -2
- package/dist/carousel/index.d.mts +5 -5
- package/dist/carousel/index.d.ts +5 -5
- package/dist/carousel/index.js +11 -10
- package/dist/carousel/index.mjs +11 -10
- 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.d.mts +5 -5
- package/dist/elements/index.d.ts +5 -5
- package/dist/elements/index.js +12 -10
- package/dist/elements/index.mjs +12 -11
- 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.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +13 -11
- package/dist/index.mjs +13 -11
- 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 +12 -12
- 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/label/index.d.ts
CHANGED
package/dist/label/index.mjs
CHANGED
@@ -1,6 +1,102 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../chunk-
|
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";
|
4
100
|
export {
|
5
101
|
Label
|
6
102
|
};
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
2
2
|
import * as React from 'react';
|
3
3
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
4
|
-
|
5
|
-
type DirectionType = "rtl" | "ltr";
|
4
|
+
import { D as DirectionType } from '../commonTypes-ko_NGEoT.mjs';
|
6
5
|
|
7
6
|
declare const navigationMenuTriggerStyle: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
8
7
|
type StandardNavigationMenuItemProps = {
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
2
2
|
import * as React from 'react';
|
3
3
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
4
|
-
|
5
|
-
type DirectionType = "rtl" | "ltr";
|
4
|
+
import { D as DirectionType } from '../commonTypes-ko_NGEoT.js';
|
6
5
|
|
7
6
|
declare const navigationMenuTriggerStyle: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
8
7
|
type StandardNavigationMenuItemProps = {
|
@@ -1,13 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
Label,
|
3
|
-
Skeleton
|
4
|
-
} from "../chunk-53XBVEMK.mjs";
|
5
1
|
import {
|
6
2
|
cn
|
7
3
|
} from "../chunk-TE3BKEXL.mjs";
|
8
4
|
|
9
5
|
// components/elements/passwordInput/PasswordInput.tsx
|
10
|
-
import
|
6
|
+
import React9, { useEffect, useState } from "react";
|
11
7
|
|
12
8
|
// components/icons/Emojis.tsx
|
13
9
|
import React from "react";
|
@@ -95,8 +91,133 @@ var UncheckMark = ({ size = "default", className }) => {
|
|
95
91
|
};
|
96
92
|
|
97
93
|
// components/elements/input/Input.tsx
|
98
|
-
import
|
99
|
-
|
94
|
+
import React7, { forwardRef as forwardRef2 } from "react";
|
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(
|
164
|
+
Tooltip,
|
165
|
+
{
|
166
|
+
content: hint,
|
167
|
+
side: hintSide,
|
168
|
+
triggerProps: {
|
169
|
+
tabIndex: -1,
|
170
|
+
onClick: (event) => event.preventDefault()
|
171
|
+
}
|
172
|
+
},
|
173
|
+
/* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement(
|
174
|
+
"svg",
|
175
|
+
{
|
176
|
+
xmlns: "http://www.w3.org/2000/svg",
|
177
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
178
|
+
viewBox: "0 0 24 24",
|
179
|
+
fill: "none",
|
180
|
+
stroke: "currentColor",
|
181
|
+
strokeWidth: "2",
|
182
|
+
strokeLinecap: "round",
|
183
|
+
strokeLinejoin: "round"
|
184
|
+
},
|
185
|
+
/* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
186
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
187
|
+
/* @__PURE__ */ React5.createElement("path", { d: "M12 17h.01" })
|
188
|
+
))
|
189
|
+
)));
|
190
|
+
Label.displayName = "Label";
|
191
|
+
|
192
|
+
// components/elements/skeleton/Skeleton.tsx
|
193
|
+
import React6 from "react";
|
194
|
+
function Skeleton({
|
195
|
+
className,
|
196
|
+
content,
|
197
|
+
animation = "pulse",
|
198
|
+
...props
|
199
|
+
}) {
|
200
|
+
const animationStyles = {
|
201
|
+
none: "hawa-rounded hawa-bg-muted",
|
202
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
203
|
+
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"
|
204
|
+
};
|
205
|
+
return /* @__PURE__ */ React6.createElement(
|
206
|
+
"div",
|
207
|
+
{
|
208
|
+
className: cn(
|
209
|
+
animationStyles[animation],
|
210
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
211
|
+
className
|
212
|
+
),
|
213
|
+
...props
|
214
|
+
},
|
215
|
+
content && content
|
216
|
+
);
|
217
|
+
}
|
218
|
+
|
219
|
+
// components/elements/input/Input.tsx
|
220
|
+
var Input = forwardRef2(
|
100
221
|
({
|
101
222
|
margin = "none",
|
102
223
|
width = "full",
|
@@ -123,7 +244,7 @@ var Input = forwardRef(
|
|
123
244
|
};
|
124
245
|
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
125
246
|
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
126
|
-
return /* @__PURE__ */
|
247
|
+
return /* @__PURE__ */ React7.createElement(
|
127
248
|
"div",
|
128
249
|
{
|
129
250
|
className: cn(
|
@@ -134,8 +255,8 @@ var Input = forwardRef(
|
|
134
255
|
"hawa-w-full hawa-gap-2"
|
135
256
|
)
|
136
257
|
},
|
137
|
-
props.label && /* @__PURE__ */
|
138
|
-
props.isLoading ? /* @__PURE__ */
|
258
|
+
props.label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, props.label),
|
259
|
+
props.isLoading ? /* @__PURE__ */ React7.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React7.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React7.createElement(React7.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React7.createElement(
|
139
260
|
"div",
|
140
261
|
{
|
141
262
|
className: cn(
|
@@ -143,7 +264,7 @@ var Input = forwardRef(
|
|
143
264
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
144
265
|
)
|
145
266
|
}
|
146
|
-
), /* @__PURE__ */
|
267
|
+
), /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ React7.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React7.createElement(
|
147
268
|
"div",
|
148
269
|
{
|
149
270
|
className: cn(
|
@@ -152,7 +273,7 @@ var Input = forwardRef(
|
|
152
273
|
)
|
153
274
|
},
|
154
275
|
props.endIcon
|
155
|
-
), /* @__PURE__ */
|
276
|
+
), /* @__PURE__ */ React7.createElement(
|
156
277
|
"input",
|
157
278
|
{
|
158
279
|
required: true,
|
@@ -178,7 +299,7 @@ var Input = forwardRef(
|
|
178
299
|
inputProps == null ? void 0 : inputProps.className
|
179
300
|
)
|
180
301
|
}
|
181
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
302
|
+
)), !forceHideHelperText && /* @__PURE__ */ React7.createElement(
|
182
303
|
"p",
|
183
304
|
{
|
184
305
|
className: cn(
|
@@ -187,7 +308,7 @@ var Input = forwardRef(
|
|
187
308
|
)
|
188
309
|
},
|
189
310
|
props.helperText
|
190
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
311
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ React7.createElement(
|
191
312
|
"div",
|
192
313
|
{
|
193
314
|
className: cn(
|
@@ -196,7 +317,7 @@ var Input = forwardRef(
|
|
196
317
|
)
|
197
318
|
},
|
198
319
|
props.helperText
|
199
|
-
), showCount && /* @__PURE__ */
|
320
|
+
), showCount && /* @__PURE__ */ React7.createElement(
|
200
321
|
"div",
|
201
322
|
{
|
202
323
|
className: cn(
|
@@ -217,9 +338,9 @@ var Input = forwardRef(
|
|
217
338
|
);
|
218
339
|
|
219
340
|
// components/elements/popover/Popover.tsx
|
220
|
-
import * as
|
341
|
+
import * as React8 from "react";
|
221
342
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
222
|
-
var PopoverContent =
|
343
|
+
var PopoverContent = React8.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React8.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React8.createElement(
|
223
344
|
PopoverPrimitive.Content,
|
224
345
|
{
|
225
346
|
ref,
|
@@ -251,7 +372,7 @@ var Popover = ({
|
|
251
372
|
trigger: "var(--radix-popover-trigger-width)",
|
252
373
|
default: "auto"
|
253
374
|
};
|
254
|
-
return /* @__PURE__ */
|
375
|
+
return /* @__PURE__ */ React8.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React8.createElement(
|
255
376
|
PopoverPrimitive.Trigger,
|
256
377
|
{
|
257
378
|
className: "hawa-w-full",
|
@@ -259,7 +380,7 @@ var Popover = ({
|
|
259
380
|
...triggerProps
|
260
381
|
},
|
261
382
|
trigger
|
262
|
-
), /* @__PURE__ */
|
383
|
+
), /* @__PURE__ */ React8.createElement(
|
263
384
|
PopoverContent,
|
264
385
|
{
|
265
386
|
side,
|
@@ -302,7 +423,7 @@ var PasswordStrengthIndicator = ({ strength }) => {
|
|
302
423
|
strong: "80%",
|
303
424
|
"very-strong": "100%"
|
304
425
|
}[currentStrengthLevel];
|
305
|
-
return /* @__PURE__ */
|
426
|
+
return /* @__PURE__ */ React9.createElement("div", { className: "hawa-mt-0.5 hawa-h-2 hawa-w-full hawa-rounded hawa-bg-gray-200" }, /* @__PURE__ */ React9.createElement(
|
306
427
|
"div",
|
307
428
|
{
|
308
429
|
className: `${strengthColors[currentStrengthLevel]} hawa-h-full hawa-rounded hawa-transition-all hawa-duration-300`,
|
@@ -362,7 +483,7 @@ var PasswordInput = ({
|
|
362
483
|
setIsInputFocused(false);
|
363
484
|
};
|
364
485
|
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";
|
365
|
-
return /* @__PURE__ */
|
486
|
+
return /* @__PURE__ */ React9.createElement("div", null, /* @__PURE__ */ React9.createElement(
|
366
487
|
Popover,
|
367
488
|
{
|
368
489
|
width: "trigger",
|
@@ -371,7 +492,7 @@ var PasswordInput = ({
|
|
371
492
|
onOpenChange: setIsInputFocused,
|
372
493
|
triggerProps: { asChild: true },
|
373
494
|
contentProps: { onOpenAutoFocus: (e) => e.preventDefault() },
|
374
|
-
trigger: /* @__PURE__ */
|
495
|
+
trigger: /* @__PURE__ */ React9.createElement(
|
375
496
|
"div",
|
376
497
|
{
|
377
498
|
onClick: (e) => {
|
@@ -381,7 +502,7 @@ var PasswordInput = ({
|
|
381
502
|
}
|
382
503
|
}
|
383
504
|
},
|
384
|
-
/* @__PURE__ */
|
505
|
+
/* @__PURE__ */ React9.createElement(
|
385
506
|
Input,
|
386
507
|
{
|
387
508
|
width: "full",
|
@@ -391,21 +512,21 @@ var PasswordInput = ({
|
|
391
512
|
onFocus: handleInputFocus,
|
392
513
|
onBlur: handleInputBlur,
|
393
514
|
type: passwordVisible ? "text" : "password",
|
394
|
-
endIcon: /* @__PURE__ */
|
515
|
+
endIcon: /* @__PURE__ */ React9.createElement(
|
395
516
|
"div",
|
396
517
|
{
|
397
518
|
className: "hawa-cursor-pointer",
|
398
519
|
onClick: () => setPasswordVisible(!passwordVisible)
|
399
520
|
},
|
400
|
-
passwordVisible ? /* @__PURE__ */
|
521
|
+
passwordVisible ? /* @__PURE__ */ React9.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React9.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
|
401
522
|
" "
|
402
523
|
)
|
403
524
|
}
|
404
525
|
)
|
405
526
|
)
|
406
527
|
},
|
407
|
-
/* @__PURE__ */
|
408
|
-
), /* @__PURE__ */
|
528
|
+
/* @__PURE__ */ React9.createElement("div", { className: "hawa-rounded hawa-p-2" }, /* @__PURE__ */ React9.createElement("ul", { className: "hawa-rounded hawa-p-2" }, /* @__PURE__ */ React9.createElement("li", { className: getCriteriaClass(lengthCriteriaMet) }, lengthCriteriaMet ? /* @__PURE__ */ React9.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React9.createElement(UncheckMark, { size: "sm" }), "At least 8 characters long"), /* @__PURE__ */ React9.createElement("li", { className: getCriteriaClass(numberCriteriaMet) }, numberCriteriaMet ? /* @__PURE__ */ React9.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React9.createElement(UncheckMark, { size: "sm" }), "At least 1 number"), /* @__PURE__ */ React9.createElement("li", { className: getCriteriaClass(specialCharCriteriaMet) }, specialCharCriteriaMet ? /* @__PURE__ */ React9.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React9.createElement(UncheckMark, { size: "sm" }), "At least 1 special character"), /* @__PURE__ */ React9.createElement("li", { className: getCriteriaClass(lowercaseCriteriaMet) }, lowercaseCriteriaMet ? /* @__PURE__ */ React9.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React9.createElement(UncheckMark, { size: "sm" }), "At least 1 lowercase letter"), /* @__PURE__ */ React9.createElement("li", { className: getCriteriaClass(uppercaseCriteriaMet) }, uppercaseCriteriaMet ? /* @__PURE__ */ React9.createElement(CheckMark, { size: "sm" }) : /* @__PURE__ */ React9.createElement(UncheckMark, { size: "sm" }), "At least 1 uppercase letter")))
|
529
|
+
), /* @__PURE__ */ React9.createElement(PasswordStrengthIndicator, { strength: currentStr }));
|
409
530
|
};
|
410
531
|
export {
|
411
532
|
PasswordInput,
|