@sikka/hawa 0.26.20 → 0.26.22
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/README.md +91 -0
- package/dist/blocks/auth/index.mjs +5 -4
- package/dist/blocks/feedback/index.js +114 -118
- package/dist/blocks/feedback/index.mjs +6 -5
- package/dist/blocks/index.js +28 -30
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/misc/index.js +28 -30
- package/dist/blocks/misc/index.mjs +20 -17
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/{chunk-OTGCLEKC.mjs → chunk-2R7F2GL7.mjs} +20 -0
- package/dist/{chunk-POIP5U4M.mjs → chunk-4EGKGSGY.mjs} +1 -1
- package/dist/{chunk-APZM24KK.mjs → chunk-5YXZXYLH.mjs} +15 -18
- package/dist/{chunk-WPSUV4AD.mjs → chunk-F3DQJHTG.mjs} +29 -31
- package/dist/{chunk-VQQ6MUX5.mjs → chunk-FQ6WVEHW.mjs} +1 -1
- package/dist/{chunk-U3TZWNDZ.mjs → chunk-GVJYACGA.mjs} +1 -1
- package/dist/{chunk-Z5SL5QTQ.mjs → chunk-MQUAGP7K.mjs} +20 -0
- package/dist/{chunk-OAXF3RCQ.mjs → chunk-NMS5LCSQ.mjs} +1 -1
- package/dist/{chunk-4IOG44R3.mjs → chunk-OY66MBXP.mjs} +1 -1
- package/dist/{chunk-FDKCMEMD.mjs → chunk-R4HAAT6R.mjs} +1 -1
- package/dist/chunk-WUHNPHD5.mjs +0 -0
- package/dist/codeBlock/index.mjs +1 -1
- package/dist/colorPicker/index.d.mts +4 -0
- package/dist/colorPicker/index.d.ts +4 -0
- package/dist/colorPicker/index.js +80 -23
- package/dist/colorPicker/index.mjs +54 -15
- package/dist/dataTable/index.d.mts +2 -1
- package/dist/dataTable/index.d.ts +2 -1
- package/dist/dataTable/index.js +1 -1
- package/dist/dataTable/index.mjs +1 -1
- package/dist/elements/index.d.mts +7 -1
- package/dist/elements/index.d.ts +7 -1
- package/dist/elements/index.js +62 -34
- package/dist/elements/index.mjs +19 -7
- package/dist/index.css +11 -3
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +62 -34
- package/dist/index.mjs +62 -34
- package/dist/layout/index.mjs +2 -2
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +2 -2
- package/dist/tabs/index.d.ts +2 -2
- package/dist/tabs/index.js +15 -13
- package/dist/tabs/index.mjs +15 -13
- package/dist/textarea/index.d.mts +1 -0
- package/dist/textarea/index.d.ts +1 -0
- package/dist/textarea/index.js +59 -36
- package/dist/textarea/index.mjs +59 -36
- package/package.json +10 -10
- package/dist/commonTypes-cyhMPvmz.d.mts +0 -4
- package/dist/commonTypes-cyhMPvmz.d.ts +0 -4
- /package/dist/{chunk-AREFDTXK.mjs → chunk-D36MPDGE.mjs} +0 -0
package/dist/tabs/index.js
CHANGED
@@ -131,19 +131,21 @@ var Chip = import_react.default.forwardRef(
|
|
131
131
|
|
132
132
|
// elements/tabs/Tabs.tsx
|
133
133
|
var TabsContext = React2.createContext({ orientation: "vertical" });
|
134
|
-
var Tabs = React2.forwardRef(
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
)
|
134
|
+
var Tabs = React2.forwardRef(
|
135
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
136
|
+
TabsPrimitive.Root,
|
137
|
+
{
|
138
|
+
ref,
|
139
|
+
className: cn(
|
140
|
+
"hawa-flex hawa-gap-2",
|
141
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
142
|
+
className
|
143
|
+
),
|
144
|
+
...props
|
145
|
+
},
|
146
|
+
/* @__PURE__ */ React2.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
147
|
+
)
|
148
|
+
);
|
147
149
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
148
150
|
var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
|
149
151
|
const { orientation } = React2.useContext(TabsContext);
|
package/dist/tabs/index.mjs
CHANGED
@@ -89,19 +89,21 @@ var Chip = React.forwardRef(
|
|
89
89
|
|
90
90
|
// elements/tabs/Tabs.tsx
|
91
91
|
var TabsContext = React2.createContext({ orientation: "vertical" });
|
92
|
-
var Tabs = React2.forwardRef(
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
)
|
92
|
+
var Tabs = React2.forwardRef(
|
93
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
94
|
+
TabsPrimitive.Root,
|
95
|
+
{
|
96
|
+
ref,
|
97
|
+
className: cn(
|
98
|
+
"hawa-flex hawa-gap-2",
|
99
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
100
|
+
className
|
101
|
+
),
|
102
|
+
...props
|
103
|
+
},
|
104
|
+
/* @__PURE__ */ React2.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
|
105
|
+
)
|
106
|
+
);
|
105
107
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
106
108
|
var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
|
107
109
|
const { orientation } = React2.useContext(TabsContext);
|
package/dist/textarea/index.d.ts
CHANGED
package/dist/textarea/index.js
CHANGED
@@ -35,7 +35,7 @@ __export(textarea_exports, {
|
|
35
35
|
module.exports = __toCommonJS(textarea_exports);
|
36
36
|
|
37
37
|
// elements/textarea/Textarea.tsx
|
38
|
-
var
|
38
|
+
var React4 = __toESM(require("react"));
|
39
39
|
|
40
40
|
// util/index.ts
|
41
41
|
var import_clsx = require("clsx");
|
@@ -44,13 +44,40 @@ function cn(...inputs) {
|
|
44
44
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
45
45
|
}
|
46
46
|
|
47
|
+
// elements/skeleton/Skeleton.tsx
|
48
|
+
var import_react = __toESM(require("react"));
|
49
|
+
function Skeleton({
|
50
|
+
className,
|
51
|
+
content,
|
52
|
+
animation = "pulse",
|
53
|
+
...props
|
54
|
+
}) {
|
55
|
+
const animationStyles = {
|
56
|
+
none: "hawa-rounded hawa-bg-muted",
|
57
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
58
|
+
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"
|
59
|
+
};
|
60
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
61
|
+
"div",
|
62
|
+
{
|
63
|
+
className: cn(
|
64
|
+
animationStyles[animation],
|
65
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
66
|
+
className
|
67
|
+
),
|
68
|
+
...props
|
69
|
+
},
|
70
|
+
content && content
|
71
|
+
);
|
72
|
+
}
|
73
|
+
|
47
74
|
// elements/label/Label.tsx
|
48
|
-
var
|
75
|
+
var React3 = __toESM(require("react"));
|
49
76
|
|
50
77
|
// elements/tooltip/Tooltip.tsx
|
51
|
-
var
|
78
|
+
var import_react2 = __toESM(require("react"));
|
52
79
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
53
|
-
var TooltipContent =
|
80
|
+
var TooltipContent = import_react2.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(
|
54
81
|
TooltipPrimitive.Content,
|
55
82
|
{
|
56
83
|
ref,
|
@@ -63,7 +90,7 @@ var TooltipContent = import_react.default.forwardRef(({ className, sideOffset =
|
|
63
90
|
}
|
64
91
|
));
|
65
92
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
66
|
-
var TooltipArrow =
|
93
|
+
var TooltipArrow = import_react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
67
94
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
68
95
|
var Tooltip = ({
|
69
96
|
side,
|
@@ -78,13 +105,13 @@ var Tooltip = ({
|
|
78
105
|
delayDuration = 300,
|
79
106
|
...props
|
80
107
|
}) => {
|
81
|
-
return /* @__PURE__ */
|
108
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
82
109
|
TooltipPrimitive.TooltipProvider,
|
83
110
|
{
|
84
111
|
delayDuration,
|
85
112
|
...providerProps
|
86
113
|
},
|
87
|
-
/* @__PURE__ */
|
114
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
88
115
|
TooltipPrimitive.Root,
|
89
116
|
{
|
90
117
|
open,
|
@@ -92,14 +119,14 @@ var Tooltip = ({
|
|
92
119
|
onOpenChange,
|
93
120
|
...props
|
94
121
|
},
|
95
|
-
/* @__PURE__ */
|
96
|
-
/* @__PURE__ */
|
122
|
+
/* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
123
|
+
/* @__PURE__ */ import_react2.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
97
124
|
)
|
98
125
|
);
|
99
126
|
};
|
100
127
|
|
101
128
|
// elements/label/Label.tsx
|
102
|
-
var Label =
|
129
|
+
var Label = React3.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React3.createElement(
|
103
130
|
"label",
|
104
131
|
{
|
105
132
|
ref,
|
@@ -110,8 +137,8 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
110
137
|
...props
|
111
138
|
},
|
112
139
|
children,
|
113
|
-
required && /* @__PURE__ */
|
114
|
-
), hint && /* @__PURE__ */
|
140
|
+
required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
141
|
+
), hint && /* @__PURE__ */ React3.createElement(
|
115
142
|
Tooltip,
|
116
143
|
{
|
117
144
|
content: hint,
|
@@ -121,7 +148,7 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
121
148
|
onClick: (event) => event.preventDefault()
|
122
149
|
}
|
123
150
|
},
|
124
|
-
/* @__PURE__ */
|
151
|
+
/* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
125
152
|
"svg",
|
126
153
|
{
|
127
154
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -133,15 +160,15 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
133
160
|
strokeLinecap: "round",
|
134
161
|
strokeLinejoin: "round"
|
135
162
|
},
|
136
|
-
/* @__PURE__ */
|
137
|
-
/* @__PURE__ */
|
138
|
-
/* @__PURE__ */
|
163
|
+
/* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
164
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
165
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
|
139
166
|
))
|
140
167
|
)));
|
141
168
|
Label.displayName = "Label";
|
142
169
|
|
143
170
|
// elements/textarea/Textarea.tsx
|
144
|
-
var Textarea =
|
171
|
+
var Textarea = React4.forwardRef(
|
145
172
|
({
|
146
173
|
className,
|
147
174
|
classNames,
|
@@ -150,9 +177,10 @@ var Textarea = React3.forwardRef(
|
|
150
177
|
forceHideHelperText,
|
151
178
|
textareaProps,
|
152
179
|
countPosition = "bottom",
|
180
|
+
isLoading,
|
153
181
|
...props
|
154
182
|
}, ref) => {
|
155
|
-
return /* @__PURE__ */
|
183
|
+
return /* @__PURE__ */ React4.createElement(
|
156
184
|
"div",
|
157
185
|
{
|
158
186
|
className: cn(
|
@@ -161,19 +189,27 @@ var Textarea = React3.forwardRef(
|
|
161
189
|
className
|
162
190
|
)
|
163
191
|
},
|
164
|
-
props.label && /* @__PURE__ */
|
165
|
-
|
192
|
+
/* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React4.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React4.createElement(
|
193
|
+
"div",
|
194
|
+
{
|
195
|
+
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
196
|
+
},
|
197
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
198
|
+
"/",
|
199
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
200
|
+
)),
|
201
|
+
isLoading ? /* @__PURE__ */ React4.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React4.createElement(
|
166
202
|
"textarea",
|
167
203
|
{
|
168
204
|
className: cn(
|
169
|
-
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
205
|
+
"hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
170
206
|
classNames == null ? void 0 : classNames.textarea
|
171
207
|
),
|
172
208
|
ref,
|
173
209
|
...textareaProps
|
174
210
|
}
|
175
211
|
),
|
176
|
-
/* @__PURE__ */
|
212
|
+
/* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React4.createElement(
|
177
213
|
"p",
|
178
214
|
{
|
179
215
|
className: cn(
|
@@ -182,20 +218,7 @@ var Textarea = React3.forwardRef(
|
|
182
218
|
)
|
183
219
|
},
|
184
220
|
props.helperText
|
185
|
-
), showCount && /* @__PURE__ */
|
186
|
-
"div",
|
187
|
-
{
|
188
|
-
className: cn(
|
189
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
190
|
-
{
|
191
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
192
|
-
}
|
193
|
-
)
|
194
|
-
},
|
195
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
196
|
-
"/",
|
197
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
198
|
-
))
|
221
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React4.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
|
199
222
|
);
|
200
223
|
}
|
201
224
|
);
|
package/dist/textarea/index.mjs
CHANGED
@@ -3,15 +3,42 @@ import {
|
|
3
3
|
} from "../chunk-TWNGV3RE.mjs";
|
4
4
|
|
5
5
|
// elements/textarea/Textarea.tsx
|
6
|
-
import * as
|
6
|
+
import * as React4 from "react";
|
7
|
+
|
8
|
+
// elements/skeleton/Skeleton.tsx
|
9
|
+
import React from "react";
|
10
|
+
function Skeleton({
|
11
|
+
className,
|
12
|
+
content,
|
13
|
+
animation = "pulse",
|
14
|
+
...props
|
15
|
+
}) {
|
16
|
+
const animationStyles = {
|
17
|
+
none: "hawa-rounded hawa-bg-muted",
|
18
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
19
|
+
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"
|
20
|
+
};
|
21
|
+
return /* @__PURE__ */ React.createElement(
|
22
|
+
"div",
|
23
|
+
{
|
24
|
+
className: cn(
|
25
|
+
animationStyles[animation],
|
26
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
27
|
+
className
|
28
|
+
),
|
29
|
+
...props
|
30
|
+
},
|
31
|
+
content && content
|
32
|
+
);
|
33
|
+
}
|
7
34
|
|
8
35
|
// elements/label/Label.tsx
|
9
|
-
import * as
|
36
|
+
import * as React3 from "react";
|
10
37
|
|
11
38
|
// elements/tooltip/Tooltip.tsx
|
12
|
-
import
|
39
|
+
import React2 from "react";
|
13
40
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
14
|
-
var TooltipContent =
|
41
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(
|
15
42
|
TooltipPrimitive.Content,
|
16
43
|
{
|
17
44
|
ref,
|
@@ -24,7 +51,7 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
24
51
|
}
|
25
52
|
));
|
26
53
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
27
|
-
var TooltipArrow =
|
54
|
+
var TooltipArrow = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
28
55
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
29
56
|
var Tooltip = ({
|
30
57
|
side,
|
@@ -39,13 +66,13 @@ var Tooltip = ({
|
|
39
66
|
delayDuration = 300,
|
40
67
|
...props
|
41
68
|
}) => {
|
42
|
-
return /* @__PURE__ */
|
69
|
+
return /* @__PURE__ */ React2.createElement(
|
43
70
|
TooltipPrimitive.TooltipProvider,
|
44
71
|
{
|
45
72
|
delayDuration,
|
46
73
|
...providerProps
|
47
74
|
},
|
48
|
-
/* @__PURE__ */
|
75
|
+
/* @__PURE__ */ React2.createElement(
|
49
76
|
TooltipPrimitive.Root,
|
50
77
|
{
|
51
78
|
open,
|
@@ -53,14 +80,14 @@ var Tooltip = ({
|
|
53
80
|
onOpenChange,
|
54
81
|
...props
|
55
82
|
},
|
56
|
-
/* @__PURE__ */
|
57
|
-
/* @__PURE__ */
|
83
|
+
/* @__PURE__ */ React2.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
84
|
+
/* @__PURE__ */ React2.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
58
85
|
)
|
59
86
|
);
|
60
87
|
};
|
61
88
|
|
62
89
|
// elements/label/Label.tsx
|
63
|
-
var Label =
|
90
|
+
var Label = React3.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React3.createElement(
|
64
91
|
"label",
|
65
92
|
{
|
66
93
|
ref,
|
@@ -71,8 +98,8 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
71
98
|
...props
|
72
99
|
},
|
73
100
|
children,
|
74
|
-
required && /* @__PURE__ */
|
75
|
-
), hint && /* @__PURE__ */
|
101
|
+
required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
102
|
+
), hint && /* @__PURE__ */ React3.createElement(
|
76
103
|
Tooltip,
|
77
104
|
{
|
78
105
|
content: hint,
|
@@ -82,7 +109,7 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
82
109
|
onClick: (event) => event.preventDefault()
|
83
110
|
}
|
84
111
|
},
|
85
|
-
/* @__PURE__ */
|
112
|
+
/* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
86
113
|
"svg",
|
87
114
|
{
|
88
115
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -94,15 +121,15 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
94
121
|
strokeLinecap: "round",
|
95
122
|
strokeLinejoin: "round"
|
96
123
|
},
|
97
|
-
/* @__PURE__ */
|
98
|
-
/* @__PURE__ */
|
99
|
-
/* @__PURE__ */
|
124
|
+
/* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
125
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
126
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
|
100
127
|
))
|
101
128
|
)));
|
102
129
|
Label.displayName = "Label";
|
103
130
|
|
104
131
|
// elements/textarea/Textarea.tsx
|
105
|
-
var Textarea =
|
132
|
+
var Textarea = React4.forwardRef(
|
106
133
|
({
|
107
134
|
className,
|
108
135
|
classNames,
|
@@ -111,9 +138,10 @@ var Textarea = React3.forwardRef(
|
|
111
138
|
forceHideHelperText,
|
112
139
|
textareaProps,
|
113
140
|
countPosition = "bottom",
|
141
|
+
isLoading,
|
114
142
|
...props
|
115
143
|
}, ref) => {
|
116
|
-
return /* @__PURE__ */
|
144
|
+
return /* @__PURE__ */ React4.createElement(
|
117
145
|
"div",
|
118
146
|
{
|
119
147
|
className: cn(
|
@@ -122,19 +150,27 @@ var Textarea = React3.forwardRef(
|
|
122
150
|
className
|
123
151
|
)
|
124
152
|
},
|
125
|
-
props.label && /* @__PURE__ */
|
126
|
-
|
153
|
+
/* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React4.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React4.createElement(
|
154
|
+
"div",
|
155
|
+
{
|
156
|
+
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
157
|
+
},
|
158
|
+
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
159
|
+
"/",
|
160
|
+
textareaProps == null ? void 0 : textareaProps.maxLength
|
161
|
+
)),
|
162
|
+
isLoading ? /* @__PURE__ */ React4.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React4.createElement(
|
127
163
|
"textarea",
|
128
164
|
{
|
129
165
|
className: cn(
|
130
|
-
"hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
166
|
+
"hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
|
131
167
|
classNames == null ? void 0 : classNames.textarea
|
132
168
|
),
|
133
169
|
ref,
|
134
170
|
...textareaProps
|
135
171
|
}
|
136
172
|
),
|
137
|
-
/* @__PURE__ */
|
173
|
+
/* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React4.createElement(
|
138
174
|
"p",
|
139
175
|
{
|
140
176
|
className: cn(
|
@@ -143,20 +179,7 @@ var Textarea = React3.forwardRef(
|
|
143
179
|
)
|
144
180
|
},
|
145
181
|
props.helperText
|
146
|
-
), showCount && /* @__PURE__ */
|
147
|
-
"div",
|
148
|
-
{
|
149
|
-
className: cn(
|
150
|
-
"hawa-text-start hawa-text-xs hawa-transition-all",
|
151
|
-
{
|
152
|
-
"hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
|
153
|
-
}
|
154
|
-
)
|
155
|
-
},
|
156
|
-
(textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
|
157
|
-
"/",
|
158
|
-
textareaProps == null ? void 0 : textareaProps.maxLength
|
159
|
-
))
|
182
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React4.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
|
160
183
|
);
|
161
184
|
}
|
162
185
|
);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sikka/hawa",
|
3
|
-
"version": "0.26.
|
3
|
+
"version": "0.26.22",
|
4
4
|
"description": "Modern UI Kit made with Tailwind",
|
5
5
|
"author": {
|
6
6
|
"name": "Sikka Software",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"dist/**"
|
46
46
|
],
|
47
47
|
"dependencies": {
|
48
|
-
"@hookform/resolvers": "^3.3.
|
48
|
+
"@hookform/resolvers": "^3.3.4",
|
49
49
|
"@radix-ui/react-accordion": "^1.1.2",
|
50
50
|
"@radix-ui/react-checkbox": "^1.0.4",
|
51
51
|
"@radix-ui/react-collapsible": "^1.0.3",
|
@@ -61,13 +61,13 @@
|
|
61
61
|
"@radix-ui/react-tabs": "^1.0.4",
|
62
62
|
"@radix-ui/react-toast": "^1.1.5",
|
63
63
|
"@radix-ui/react-tooltip": "^1.0.7",
|
64
|
-
"@tanstack/react-table": "^8.11.
|
65
|
-
"@tanstack/table-core": "^8.11.
|
64
|
+
"@tanstack/react-table": "^8.11.3",
|
65
|
+
"@tanstack/table-core": "^8.11.3",
|
66
66
|
"class-variance-authority": "^0.7.0",
|
67
67
|
"clsx": "^2.1.0",
|
68
68
|
"cmdk": "^0.2.0",
|
69
|
-
"embla-carousel-auto-height": "^8.0.0-
|
70
|
-
"embla-carousel-react": "^8.0.0-
|
69
|
+
"embla-carousel-auto-height": "^8.0.0-rc18",
|
70
|
+
"embla-carousel-react": "^8.0.0-rc18",
|
71
71
|
"eslint": "^8.56.0",
|
72
72
|
"eslint-config-next": "^14.0.4",
|
73
73
|
"libphonenumber-js": "^1.10.53",
|
@@ -86,7 +86,7 @@
|
|
86
86
|
"devDependencies": {
|
87
87
|
"@babel/preset-react": "^7.23.3",
|
88
88
|
"@sikka/alam": "^0.0.4",
|
89
|
-
"@testing-library/jest-dom": "^6.
|
89
|
+
"@testing-library/jest-dom": "^6.2.0",
|
90
90
|
"@testing-library/react": "^14.1.2",
|
91
91
|
"@types/jest": "^29.5.11",
|
92
92
|
"@types/react": "^18.2.46",
|
@@ -95,10 +95,10 @@
|
|
95
95
|
"embla-carousel": "8.0.0-rc18",
|
96
96
|
"jest": "^29.7.0",
|
97
97
|
"jest-environment-jsdom": "^29.7.0",
|
98
|
-
"lucide-react": "^0.
|
99
|
-
"postcss": "^8.4.
|
98
|
+
"lucide-react": "^0.306.0",
|
99
|
+
"postcss": "^8.4.33",
|
100
100
|
"postcss-cli": "^11.0.0",
|
101
|
-
"postcss-import": "^
|
101
|
+
"postcss-import": "^16.0.0",
|
102
102
|
"tailwindcss": "^3.4.0",
|
103
103
|
"tailwindcss-animate": "^1.0.7",
|
104
104
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
File without changes
|