@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
package/dist/input/index.mjs
CHANGED
@@ -1,97 +1,13 @@
|
|
1
1
|
import {
|
2
|
+
Label,
|
2
3
|
cn
|
3
|
-
} from "../chunk-
|
4
|
+
} from "../chunk-C2UYTGUD.mjs";
|
4
5
|
|
5
6
|
// components/elements/input/Input.tsx
|
6
|
-
import
|
7
|
-
|
8
|
-
// components/elements/label/Label.tsx
|
9
|
-
import * as React2 from "react";
|
10
|
-
|
11
|
-
// components/elements/tooltip/Tooltip.tsx
|
12
|
-
import React from "react";
|
13
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
14
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
15
|
-
TooltipPrimitive.Content,
|
16
|
-
{
|
17
|
-
ref,
|
18
|
-
sideOffset,
|
19
|
-
className: cn(
|
20
|
-
"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",
|
21
|
-
className
|
22
|
-
),
|
23
|
-
...props
|
24
|
-
}
|
25
|
-
));
|
26
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
27
|
-
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
28
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
29
|
-
var Tooltip = ({
|
30
|
-
side,
|
31
|
-
open,
|
32
|
-
content,
|
33
|
-
children,
|
34
|
-
defaultOpen,
|
35
|
-
onOpenChange,
|
36
|
-
triggerProps,
|
37
|
-
contentProps,
|
38
|
-
providerProps,
|
39
|
-
delayDuration = 300,
|
40
|
-
...props
|
41
|
-
}) => {
|
42
|
-
return /* @__PURE__ */ React.createElement(
|
43
|
-
TooltipPrimitive.TooltipProvider,
|
44
|
-
{
|
45
|
-
delayDuration,
|
46
|
-
...providerProps
|
47
|
-
},
|
48
|
-
/* @__PURE__ */ React.createElement(
|
49
|
-
TooltipPrimitive.Root,
|
50
|
-
{
|
51
|
-
open,
|
52
|
-
defaultOpen,
|
53
|
-
onOpenChange,
|
54
|
-
...props
|
55
|
-
},
|
56
|
-
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
57
|
-
/* @__PURE__ */ React.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
58
|
-
)
|
59
|
-
);
|
60
|
-
};
|
61
|
-
|
62
|
-
// components/elements/label/Label.tsx
|
63
|
-
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(
|
64
|
-
"label",
|
65
|
-
{
|
66
|
-
ref,
|
67
|
-
className: cn(
|
68
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
69
|
-
className
|
70
|
-
),
|
71
|
-
...props
|
72
|
-
},
|
73
|
-
children,
|
74
|
-
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
75
|
-
), hint && /* @__PURE__ */ React2.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React2.createElement(
|
76
|
-
"svg",
|
77
|
-
{
|
78
|
-
xmlns: "http://www.w3.org/2000/svg",
|
79
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
80
|
-
viewBox: "0 0 24 24",
|
81
|
-
fill: "none",
|
82
|
-
stroke: "currentColor",
|
83
|
-
strokeWidth: "2",
|
84
|
-
strokeLinecap: "round",
|
85
|
-
strokeLinejoin: "round"
|
86
|
-
},
|
87
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
88
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
89
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
90
|
-
))));
|
91
|
-
Label.displayName = "Label";
|
7
|
+
import React2, { forwardRef } from "react";
|
92
8
|
|
93
9
|
// components/elements/skeleton/Skeleton.tsx
|
94
|
-
import
|
10
|
+
import React from "react";
|
95
11
|
function Skeleton({
|
96
12
|
className,
|
97
13
|
content,
|
@@ -103,7 +19,7 @@ function Skeleton({
|
|
103
19
|
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
104
20
|
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"
|
105
21
|
};
|
106
|
-
return /* @__PURE__ */
|
22
|
+
return /* @__PURE__ */ React.createElement(
|
107
23
|
"div",
|
108
24
|
{
|
109
25
|
className: cn(
|
@@ -118,7 +34,7 @@ function Skeleton({
|
|
118
34
|
}
|
119
35
|
|
120
36
|
// components/elements/input/Input.tsx
|
121
|
-
var Input =
|
37
|
+
var Input = forwardRef(
|
122
38
|
({
|
123
39
|
margin = "none",
|
124
40
|
width = "full",
|
@@ -145,7 +61,7 @@ var Input = forwardRef2(
|
|
145
61
|
};
|
146
62
|
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
147
63
|
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
148
|
-
return /* @__PURE__ */
|
64
|
+
return /* @__PURE__ */ React2.createElement(
|
149
65
|
"div",
|
150
66
|
{
|
151
67
|
className: cn(
|
@@ -156,8 +72,8 @@ var Input = forwardRef2(
|
|
156
72
|
"hawa-w-full hawa-gap-2"
|
157
73
|
)
|
158
74
|
},
|
159
|
-
props.label && /* @__PURE__ */
|
160
|
-
props.isLoading ? /* @__PURE__ */
|
75
|
+
props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label),
|
76
|
+
props.isLoading ? /* @__PURE__ */ React2.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React2.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React2.createElement(React2.Fragment, null, !props.hideSeparator && /* @__PURE__ */ React2.createElement(
|
161
77
|
"div",
|
162
78
|
{
|
163
79
|
className: cn(
|
@@ -165,7 +81,7 @@ var Input = forwardRef2(
|
|
165
81
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
166
82
|
)
|
167
83
|
}
|
168
|
-
), /* @__PURE__ */
|
84
|
+
), /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ React2.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React2.createElement(
|
169
85
|
"div",
|
170
86
|
{
|
171
87
|
className: cn(
|
@@ -174,7 +90,7 @@ var Input = forwardRef2(
|
|
174
90
|
)
|
175
91
|
},
|
176
92
|
props.endIcon
|
177
|
-
), /* @__PURE__ */
|
93
|
+
), /* @__PURE__ */ React2.createElement(
|
178
94
|
"input",
|
179
95
|
{
|
180
96
|
required: true,
|
@@ -200,7 +116,7 @@ var Input = forwardRef2(
|
|
200
116
|
inputProps == null ? void 0 : inputProps.className
|
201
117
|
)
|
202
118
|
}
|
203
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
119
|
+
)), !forceHideHelperText && /* @__PURE__ */ React2.createElement(
|
204
120
|
"p",
|
205
121
|
{
|
206
122
|
className: cn(
|
@@ -209,7 +125,7 @@ var Input = forwardRef2(
|
|
209
125
|
)
|
210
126
|
},
|
211
127
|
props.helperText
|
212
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
128
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ React2.createElement(
|
213
129
|
"div",
|
214
130
|
{
|
215
131
|
className: cn(
|
@@ -218,7 +134,7 @@ var Input = forwardRef2(
|
|
218
134
|
)
|
219
135
|
},
|
220
136
|
props.helperText
|
221
|
-
), showCount && /* @__PURE__ */
|
137
|
+
), showCount && /* @__PURE__ */ React2.createElement(
|
222
138
|
"div",
|
223
139
|
{
|
224
140
|
className: cn(
|
@@ -1,99 +1,13 @@
|
|
1
1
|
import {
|
2
|
+
Label,
|
2
3
|
cn
|
3
|
-
} from "../chunk-
|
4
|
+
} from "../chunk-C2UYTGUD.mjs";
|
4
5
|
|
5
6
|
// components/elements/interfaceSettings/InterfaceSettings.tsx
|
6
|
-
import
|
7
|
-
|
8
|
-
// components/elements/radio/Radio.tsx
|
9
|
-
import React3, { useState, useRef, useEffect } from "react";
|
10
|
-
|
11
|
-
// components/elements/label/Label.tsx
|
12
|
-
import * as React2 from "react";
|
13
|
-
|
14
|
-
// components/elements/tooltip/Tooltip.tsx
|
15
|
-
import React from "react";
|
16
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
17
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
18
|
-
TooltipPrimitive.Content,
|
19
|
-
{
|
20
|
-
ref,
|
21
|
-
sideOffset,
|
22
|
-
className: cn(
|
23
|
-
"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",
|
24
|
-
className
|
25
|
-
),
|
26
|
-
...props
|
27
|
-
}
|
28
|
-
));
|
29
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
30
|
-
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
31
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
32
|
-
var Tooltip = ({
|
33
|
-
side,
|
34
|
-
open,
|
35
|
-
content,
|
36
|
-
children,
|
37
|
-
defaultOpen,
|
38
|
-
onOpenChange,
|
39
|
-
triggerProps,
|
40
|
-
contentProps,
|
41
|
-
providerProps,
|
42
|
-
delayDuration = 300,
|
43
|
-
...props
|
44
|
-
}) => {
|
45
|
-
return /* @__PURE__ */ React.createElement(
|
46
|
-
TooltipPrimitive.TooltipProvider,
|
47
|
-
{
|
48
|
-
delayDuration,
|
49
|
-
...providerProps
|
50
|
-
},
|
51
|
-
/* @__PURE__ */ React.createElement(
|
52
|
-
TooltipPrimitive.Root,
|
53
|
-
{
|
54
|
-
open,
|
55
|
-
defaultOpen,
|
56
|
-
onOpenChange,
|
57
|
-
...props
|
58
|
-
},
|
59
|
-
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
60
|
-
/* @__PURE__ */ React.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
61
|
-
)
|
62
|
-
);
|
63
|
-
};
|
64
|
-
|
65
|
-
// components/elements/label/Label.tsx
|
66
|
-
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(
|
67
|
-
"label",
|
68
|
-
{
|
69
|
-
ref,
|
70
|
-
className: cn(
|
71
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
72
|
-
className
|
73
|
-
),
|
74
|
-
...props
|
75
|
-
},
|
76
|
-
children,
|
77
|
-
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
78
|
-
), hint && /* @__PURE__ */ React2.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React2.createElement(
|
79
|
-
"svg",
|
80
|
-
{
|
81
|
-
xmlns: "http://www.w3.org/2000/svg",
|
82
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
83
|
-
viewBox: "0 0 24 24",
|
84
|
-
fill: "none",
|
85
|
-
stroke: "currentColor",
|
86
|
-
strokeWidth: "2",
|
87
|
-
strokeLinecap: "round",
|
88
|
-
strokeLinejoin: "round"
|
89
|
-
},
|
90
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
91
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
92
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
93
|
-
))));
|
94
|
-
Label.displayName = "Label";
|
7
|
+
import React2, { useState as useState2 } from "react";
|
95
8
|
|
96
9
|
// components/elements/radio/Radio.tsx
|
10
|
+
import React, { useState, useRef, useEffect } from "react";
|
97
11
|
var Radio = ({
|
98
12
|
design = "default",
|
99
13
|
width = "default",
|
@@ -122,7 +36,7 @@ var Radio = ({
|
|
122
36
|
default: "hawa-max-w-fit",
|
123
37
|
full: "hawa-w-full"
|
124
38
|
};
|
125
|
-
const [parentDirection, setParentDirection] =
|
39
|
+
const [parentDirection, setParentDirection] = React.useState(
|
126
40
|
null
|
127
41
|
);
|
128
42
|
const parentRef = useRef(null);
|
@@ -136,7 +50,7 @@ var Radio = ({
|
|
136
50
|
});
|
137
51
|
switch (design) {
|
138
52
|
case "tabs":
|
139
|
-
return /* @__PURE__ */
|
53
|
+
return /* @__PURE__ */ React.createElement(
|
140
54
|
"ul",
|
141
55
|
{
|
142
56
|
ref: parentRef,
|
@@ -148,7 +62,7 @@ var Radio = ({
|
|
148
62
|
tabsContainerClassName
|
149
63
|
)
|
150
64
|
},
|
151
|
-
(_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */
|
65
|
+
(_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */ React.createElement(
|
152
66
|
"li",
|
153
67
|
{
|
154
68
|
"aria-current": "page",
|
@@ -176,13 +90,13 @@ var Radio = ({
|
|
176
90
|
))
|
177
91
|
);
|
178
92
|
case "bordered":
|
179
|
-
return /* @__PURE__ */
|
93
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React.createElement(
|
180
94
|
"div",
|
181
95
|
{
|
182
96
|
key: i,
|
183
97
|
className: "hawa-rounded hawa-border hawa-border-gray-200 "
|
184
98
|
},
|
185
|
-
/* @__PURE__ */
|
99
|
+
/* @__PURE__ */ React.createElement(
|
186
100
|
"div",
|
187
101
|
{
|
188
102
|
className: cn(
|
@@ -191,7 +105,7 @@ var Radio = ({
|
|
191
105
|
),
|
192
106
|
key: i + 1
|
193
107
|
},
|
194
|
-
/* @__PURE__ */
|
108
|
+
/* @__PURE__ */ React.createElement(
|
195
109
|
"input",
|
196
110
|
{
|
197
111
|
disabled: opt.disabled,
|
@@ -201,7 +115,7 @@ var Radio = ({
|
|
201
115
|
name: "bordered-radio"
|
202
116
|
}
|
203
117
|
),
|
204
|
-
/* @__PURE__ */
|
118
|
+
/* @__PURE__ */ React.createElement(
|
205
119
|
"label",
|
206
120
|
{
|
207
121
|
htmlFor: opt.value.toString(),
|
@@ -215,7 +129,7 @@ var Radio = ({
|
|
215
129
|
)
|
216
130
|
)));
|
217
131
|
case "cards":
|
218
|
-
return /* @__PURE__ */
|
132
|
+
return /* @__PURE__ */ React.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React.createElement("li", { key: o }, /* @__PURE__ */ React.createElement(
|
219
133
|
"input",
|
220
134
|
{
|
221
135
|
type: "radio",
|
@@ -226,7 +140,7 @@ var Radio = ({
|
|
226
140
|
required: true,
|
227
141
|
disabled: opt.disabled
|
228
142
|
}
|
229
|
-
), /* @__PURE__ */
|
143
|
+
), /* @__PURE__ */ React.createElement(
|
230
144
|
"label",
|
231
145
|
{
|
232
146
|
htmlFor: opt.value.toString(),
|
@@ -235,10 +149,10 @@ var Radio = ({
|
|
235
149
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-gray-100 hover:hawa-text-gray-600 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-gray-300"
|
236
150
|
)
|
237
151
|
},
|
238
|
-
/* @__PURE__ */
|
152
|
+
/* @__PURE__ */ React.createElement("div", { className: "hawa-block hawa-h-full hawa-w-full" }, /* @__PURE__ */ React.createElement("div", { className: "hawa-w-full hawa-text-lg hawa-font-semibold" }, opt.label), /* @__PURE__ */ React.createElement("div", { className: "hawa-w-full" }, opt.sublabel))
|
239
153
|
))));
|
240
154
|
default:
|
241
|
-
return /* @__PURE__ */
|
155
|
+
return /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React.createElement(
|
242
156
|
"div",
|
243
157
|
{
|
244
158
|
className: cn(
|
@@ -247,7 +161,7 @@ var Radio = ({
|
|
247
161
|
),
|
248
162
|
key: i + 1
|
249
163
|
},
|
250
|
-
/* @__PURE__ */
|
164
|
+
/* @__PURE__ */ React.createElement(
|
251
165
|
"input",
|
252
166
|
{
|
253
167
|
disabled: opt.disabled,
|
@@ -265,7 +179,7 @@ var Radio = ({
|
|
265
179
|
}
|
266
180
|
}
|
267
181
|
),
|
268
|
-
/* @__PURE__ */
|
182
|
+
/* @__PURE__ */ React.createElement(
|
269
183
|
"label",
|
270
184
|
{
|
271
185
|
htmlFor: opt.value.toString(),
|
@@ -276,7 +190,7 @@ var Radio = ({
|
|
276
190
|
},
|
277
191
|
opt.label
|
278
192
|
)
|
279
|
-
))), /* @__PURE__ */
|
193
|
+
))), /* @__PURE__ */ React.createElement(
|
280
194
|
"p",
|
281
195
|
{
|
282
196
|
className: cn(
|
@@ -303,7 +217,7 @@ var InterfaceSettings = ({
|
|
303
217
|
horizontal: "hawa-flex hawa-flex-row hawa-justify-between",
|
304
218
|
vertical: "hawa-flex hawa-flex-col hawa-items-center hawa-gap-2"
|
305
219
|
};
|
306
|
-
return /* @__PURE__ */
|
220
|
+
return /* @__PURE__ */ React2.createElement("div", { className: cn(orientationStyle[orientation]) }, /* @__PURE__ */ React2.createElement(
|
307
221
|
Radio,
|
308
222
|
{
|
309
223
|
width,
|
@@ -320,7 +234,7 @@ var InterfaceSettings = ({
|
|
320
234
|
{ value: "en", label: "English" }
|
321
235
|
]
|
322
236
|
}
|
323
|
-
), /* @__PURE__ */
|
237
|
+
), /* @__PURE__ */ React2.createElement(
|
324
238
|
Radio,
|
325
239
|
{
|
326
240
|
width,
|
@@ -335,7 +249,7 @@ var InterfaceSettings = ({
|
|
335
249
|
options: [
|
336
250
|
{
|
337
251
|
value: "light",
|
338
|
-
label: /* @__PURE__ */
|
252
|
+
label: /* @__PURE__ */ React2.createElement(
|
339
253
|
"svg",
|
340
254
|
{
|
341
255
|
width: "15",
|
@@ -345,7 +259,7 @@ var InterfaceSettings = ({
|
|
345
259
|
xmlns: "http://www.w3.org/2000/svg",
|
346
260
|
className: "hawa-h-[1.2rem] hawa-w-[1.2rem] hawa-rotate-0 hawa-scale-100 hawa-transition-all dark:hawa--rotate-90"
|
347
261
|
},
|
348
|
-
/* @__PURE__ */
|
262
|
+
/* @__PURE__ */ React2.createElement(
|
349
263
|
"path",
|
350
264
|
{
|
351
265
|
d: "M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",
|
@@ -356,7 +270,7 @@ var InterfaceSettings = ({
|
|
356
270
|
},
|
357
271
|
{
|
358
272
|
value: "dark",
|
359
|
-
label: /* @__PURE__ */
|
273
|
+
label: /* @__PURE__ */ React2.createElement(
|
360
274
|
"svg",
|
361
275
|
{
|
362
276
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -367,7 +281,7 @@ var InterfaceSettings = ({
|
|
367
281
|
stroke: "currentColor",
|
368
282
|
className: "hawa-h-[1.2rem] hawa-w-[1.2rem] hawa-transition-all dark:hawa-rotate-0 dark:hawa-scale-100"
|
369
283
|
},
|
370
|
-
/* @__PURE__ */
|
284
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" })
|
371
285
|
)
|
372
286
|
}
|
373
287
|
]
|
package/dist/label/index.d.mts
CHANGED
package/dist/label/index.d.ts
CHANGED
package/dist/label/index.mjs
CHANGED
@@ -1,91 +1,6 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../chunk-
|
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(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React2.createElement(
|
73
|
-
"svg",
|
74
|
-
{
|
75
|
-
xmlns: "http://www.w3.org/2000/svg",
|
76
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
77
|
-
viewBox: "0 0 24 24",
|
78
|
-
fill: "none",
|
79
|
-
stroke: "currentColor",
|
80
|
-
strokeWidth: "2",
|
81
|
-
strokeLinecap: "round",
|
82
|
-
strokeLinejoin: "round"
|
83
|
-
},
|
84
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
85
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
86
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
87
|
-
))));
|
88
|
-
Label.displayName = "Label";
|
2
|
+
Label
|
3
|
+
} from "../chunk-C2UYTGUD.mjs";
|
89
4
|
export {
|
90
5
|
Label
|
91
6
|
};
|
package/dist/layout/index.d.mts
CHANGED