@sikka/hawa 0.26.21 → 0.26.23
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 +2 -18
- package/dist/alert/index.d.mts +1 -0
- package/dist/alert/index.d.ts +1 -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 +3 -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/carousel/index.d.mts +2 -0
- package/dist/carousel/index.d.ts +2 -0
- package/dist/carousel/index.js +31 -16
- package/dist/carousel/index.mjs +30 -15
- package/dist/checkbox/index.d.mts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/chip/index.d.mts +1 -1
- package/dist/chip/index.d.ts +1 -1
- 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/chunk-ZFXKCRJC.mjs +11 -0
- package/dist/codeBlock/index.d.mts +2 -1
- package/dist/codeBlock/index.d.ts +2 -1
- package/dist/codeBlock/index.js +21 -17
- package/dist/codeBlock/index.mjs +21 -12
- package/dist/collapsible/index.mjs +2 -0
- 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 +55 -15
- package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
- package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
- 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 +11 -2
- package/dist/elements/index.d.ts +11 -2
- package/dist/elements/index.js +104 -59
- package/dist/elements/index.mjs +69 -33
- package/dist/hooks/index.mjs +1 -0
- package/dist/index.css +377 -202
- package/dist/index.d.mts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +104 -59
- package/dist/index.mjs +117 -60
- package/dist/layout/index.mjs +3 -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 +11 -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
@@ -35,7 +35,7 @@ __export(colorPicker_exports, {
|
|
35
35
|
module.exports = __toCommonJS(colorPicker_exports);
|
36
36
|
|
37
37
|
// elements/colorPicker/ColorPicker.tsx
|
38
|
-
var
|
38
|
+
var import_react3 = __toESM(require("react"));
|
39
39
|
|
40
40
|
// util/index.ts
|
41
41
|
var import_clsx = require("clsx");
|
@@ -43,14 +43,60 @@ var import_tailwind_merge = require("tailwind-merge");
|
|
43
43
|
function cn(...inputs) {
|
44
44
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
45
45
|
}
|
46
|
+
var parseColor = (color) => {
|
47
|
+
if (color.startsWith("#")) {
|
48
|
+
let r = parseInt(color.slice(1, 3), 16);
|
49
|
+
let g = parseInt(color.slice(3, 5), 16);
|
50
|
+
let b = parseInt(color.slice(5, 7), 16);
|
51
|
+
return [r, g, b];
|
52
|
+
} else if (color.startsWith("rgb")) {
|
53
|
+
return color.match(/\d+/g).map(Number);
|
54
|
+
}
|
55
|
+
return [255, 255, 255];
|
56
|
+
};
|
57
|
+
var calculateLuminance = (color) => {
|
58
|
+
var _a;
|
59
|
+
const [r, g, b] = (_a = parseColor(color)) == null ? void 0 : _a.map((c) => {
|
60
|
+
c /= 255;
|
61
|
+
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
|
62
|
+
});
|
63
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
64
|
+
};
|
65
|
+
|
66
|
+
// elements/skeleton/Skeleton.tsx
|
67
|
+
var import_react = __toESM(require("react"));
|
68
|
+
function Skeleton({
|
69
|
+
className,
|
70
|
+
content,
|
71
|
+
animation = "pulse",
|
72
|
+
...props
|
73
|
+
}) {
|
74
|
+
const animationStyles = {
|
75
|
+
none: "hawa-rounded hawa-bg-muted",
|
76
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
77
|
+
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"
|
78
|
+
};
|
79
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
80
|
+
"div",
|
81
|
+
{
|
82
|
+
className: cn(
|
83
|
+
animationStyles[animation],
|
84
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
85
|
+
className
|
86
|
+
),
|
87
|
+
...props
|
88
|
+
},
|
89
|
+
content && content
|
90
|
+
);
|
91
|
+
}
|
46
92
|
|
47
93
|
// elements/label/Label.tsx
|
48
|
-
var
|
94
|
+
var React3 = __toESM(require("react"));
|
49
95
|
|
50
96
|
// elements/tooltip/Tooltip.tsx
|
51
|
-
var
|
97
|
+
var import_react2 = __toESM(require("react"));
|
52
98
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
53
|
-
var TooltipContent =
|
99
|
+
var TooltipContent = import_react2.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(
|
54
100
|
TooltipPrimitive.Content,
|
55
101
|
{
|
56
102
|
ref,
|
@@ -63,7 +109,7 @@ var TooltipContent = import_react.default.forwardRef(({ className, sideOffset =
|
|
63
109
|
}
|
64
110
|
));
|
65
111
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
66
|
-
var TooltipArrow =
|
112
|
+
var TooltipArrow = import_react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
67
113
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
68
114
|
var Tooltip = ({
|
69
115
|
side,
|
@@ -78,13 +124,13 @@ var Tooltip = ({
|
|
78
124
|
delayDuration = 300,
|
79
125
|
...props
|
80
126
|
}) => {
|
81
|
-
return /* @__PURE__ */
|
127
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
82
128
|
TooltipPrimitive.TooltipProvider,
|
83
129
|
{
|
84
130
|
delayDuration,
|
85
131
|
...providerProps
|
86
132
|
},
|
87
|
-
/* @__PURE__ */
|
133
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
88
134
|
TooltipPrimitive.Root,
|
89
135
|
{
|
90
136
|
open,
|
@@ -92,14 +138,14 @@ var Tooltip = ({
|
|
92
138
|
onOpenChange,
|
93
139
|
...props
|
94
140
|
},
|
95
|
-
/* @__PURE__ */
|
96
|
-
/* @__PURE__ */
|
141
|
+
/* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
142
|
+
/* @__PURE__ */ import_react2.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
97
143
|
)
|
98
144
|
);
|
99
145
|
};
|
100
146
|
|
101
147
|
// elements/label/Label.tsx
|
102
|
-
var Label =
|
148
|
+
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
149
|
"label",
|
104
150
|
{
|
105
151
|
ref,
|
@@ -110,8 +156,8 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
110
156
|
...props
|
111
157
|
},
|
112
158
|
children,
|
113
|
-
required && /* @__PURE__ */
|
114
|
-
), hint && /* @__PURE__ */
|
159
|
+
required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
160
|
+
), hint && /* @__PURE__ */ React3.createElement(
|
115
161
|
Tooltip,
|
116
162
|
{
|
117
163
|
content: hint,
|
@@ -121,7 +167,7 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
121
167
|
onClick: (event) => event.preventDefault()
|
122
168
|
}
|
123
169
|
},
|
124
|
-
/* @__PURE__ */
|
170
|
+
/* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
125
171
|
"svg",
|
126
172
|
{
|
127
173
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -133,9 +179,9 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
133
179
|
strokeLinecap: "round",
|
134
180
|
strokeLinejoin: "round"
|
135
181
|
},
|
136
|
-
/* @__PURE__ */
|
137
|
-
/* @__PURE__ */
|
138
|
-
/* @__PURE__ */
|
182
|
+
/* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
183
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
184
|
+
/* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
|
139
185
|
))
|
140
186
|
)));
|
141
187
|
Label.displayName = "Label";
|
@@ -146,10 +192,13 @@ var ColorPicker = ({
|
|
146
192
|
colorPickerProps,
|
147
193
|
textInputProps,
|
148
194
|
labelProps,
|
195
|
+
forceHideHelperText,
|
196
|
+
isLoading,
|
197
|
+
preview = false,
|
149
198
|
...props
|
150
199
|
}) => {
|
151
|
-
const [selectedColor, setSelectedColor] = (0,
|
152
|
-
(0,
|
200
|
+
const [selectedColor, setSelectedColor] = (0, import_react3.useState)(props.color);
|
201
|
+
(0, import_react3.useEffect)(() => {
|
153
202
|
if (selectedColor && selectedColor[0] !== "#") {
|
154
203
|
setSelectedColor(`#${selectedColor}`);
|
155
204
|
}
|
@@ -166,15 +215,16 @@ var ColorPicker = ({
|
|
166
215
|
props.handleChange(e);
|
167
216
|
}
|
168
217
|
};
|
169
|
-
return /* @__PURE__ */
|
218
|
+
return /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react3.default.createElement(Label, { ...labelProps }, props.label), isLoading ? /* @__PURE__ */ import_react3.default.createElement(Skeleton, { style: { height: 40, width: 148 } }) : /* @__PURE__ */ import_react3.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ import_react3.default.createElement(
|
170
219
|
"div",
|
171
220
|
{
|
172
221
|
style: { height: 40, backgroundColor: selectedColor },
|
173
222
|
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
|
174
223
|
},
|
175
|
-
/* @__PURE__ */
|
224
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
176
225
|
"input",
|
177
226
|
{
|
227
|
+
disabled: preview,
|
178
228
|
type: "color",
|
179
229
|
value: selectedColor,
|
180
230
|
onChange: (e) => {
|
@@ -190,19 +240,26 @@ var ColorPicker = ({
|
|
190
240
|
...colorPickerProps
|
191
241
|
}
|
192
242
|
)
|
193
|
-
), /* @__PURE__ */
|
243
|
+
), /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react3.default.createElement(
|
194
244
|
"input",
|
195
245
|
{
|
246
|
+
disabled: preview,
|
196
247
|
maxLength: 7,
|
197
248
|
type: "text",
|
198
249
|
onInput: handleTextInputChange,
|
199
250
|
value: selectedColor,
|
200
251
|
className: cn(
|
201
|
-
"hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-
|
252
|
+
"hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all",
|
253
|
+
"hawa-border hawa-border-l-0 hawa-border-l-transparent"
|
254
|
+
// "hawa-border hawa-border-x-0 hawa-border-x-transparent hawa-border-b-0 hawa-rounded-tr-none"
|
202
255
|
),
|
256
|
+
style: {
|
257
|
+
backgroundColor: preview ? selectedColor : "hsl(var(--background))",
|
258
|
+
color: preview ? calculateLuminance(selectedColor) > 0.5 ? "black" : "white" : ""
|
259
|
+
},
|
203
260
|
...textInputProps
|
204
261
|
}
|
205
|
-
))), /* @__PURE__ */
|
262
|
+
))), !forceHideHelperText && /* @__PURE__ */ import_react3.default.createElement(
|
206
263
|
"p",
|
207
264
|
{
|
208
265
|
className: cn(
|
@@ -1,17 +1,46 @@
|
|
1
1
|
import {
|
2
2
|
Tooltip,
|
3
|
+
calculateLuminance,
|
3
4
|
cn
|
4
|
-
} from "../chunk-
|
5
|
+
} from "../chunk-2R7F2GL7.mjs";
|
6
|
+
import "../chunk-ZFXKCRJC.mjs";
|
5
7
|
|
6
8
|
// elements/colorPicker/ColorPicker.tsx
|
7
|
-
import
|
9
|
+
import React3, {
|
8
10
|
useState,
|
9
11
|
useEffect
|
10
12
|
} from "react";
|
11
13
|
|
14
|
+
// elements/skeleton/Skeleton.tsx
|
15
|
+
import React from "react";
|
16
|
+
function Skeleton({
|
17
|
+
className,
|
18
|
+
content,
|
19
|
+
animation = "pulse",
|
20
|
+
...props
|
21
|
+
}) {
|
22
|
+
const animationStyles = {
|
23
|
+
none: "hawa-rounded hawa-bg-muted",
|
24
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
25
|
+
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"
|
26
|
+
};
|
27
|
+
return /* @__PURE__ */ React.createElement(
|
28
|
+
"div",
|
29
|
+
{
|
30
|
+
className: cn(
|
31
|
+
animationStyles[animation],
|
32
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
33
|
+
className
|
34
|
+
),
|
35
|
+
...props
|
36
|
+
},
|
37
|
+
content && content
|
38
|
+
);
|
39
|
+
}
|
40
|
+
|
12
41
|
// elements/label/Label.tsx
|
13
|
-
import * as
|
14
|
-
var Label =
|
42
|
+
import * as React2 from "react";
|
43
|
+
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(
|
15
44
|
"label",
|
16
45
|
{
|
17
46
|
ref,
|
@@ -22,8 +51,8 @@ var Label = React.forwardRef(({ className, hint, hintSide, required, children, .
|
|
22
51
|
...props
|
23
52
|
},
|
24
53
|
children,
|
25
|
-
required && /* @__PURE__ */
|
26
|
-
), hint && /* @__PURE__ */
|
54
|
+
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
55
|
+
), hint && /* @__PURE__ */ React2.createElement(
|
27
56
|
Tooltip,
|
28
57
|
{
|
29
58
|
content: hint,
|
@@ -33,7 +62,7 @@ var Label = React.forwardRef(({ className, hint, hintSide, required, children, .
|
|
33
62
|
onClick: (event) => event.preventDefault()
|
34
63
|
}
|
35
64
|
},
|
36
|
-
/* @__PURE__ */
|
65
|
+
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
37
66
|
"svg",
|
38
67
|
{
|
39
68
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -45,9 +74,9 @@ var Label = React.forwardRef(({ className, hint, hintSide, required, children, .
|
|
45
74
|
strokeLinecap: "round",
|
46
75
|
strokeLinejoin: "round"
|
47
76
|
},
|
48
|
-
/* @__PURE__ */
|
49
|
-
/* @__PURE__ */
|
50
|
-
/* @__PURE__ */
|
77
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
78
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
79
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
51
80
|
))
|
52
81
|
)));
|
53
82
|
Label.displayName = "Label";
|
@@ -58,6 +87,9 @@ var ColorPicker = ({
|
|
58
87
|
colorPickerProps,
|
59
88
|
textInputProps,
|
60
89
|
labelProps,
|
90
|
+
forceHideHelperText,
|
91
|
+
isLoading,
|
92
|
+
preview = false,
|
61
93
|
...props
|
62
94
|
}) => {
|
63
95
|
const [selectedColor, setSelectedColor] = useState(props.color);
|
@@ -78,15 +110,16 @@ var ColorPicker = ({
|
|
78
110
|
props.handleChange(e);
|
79
111
|
}
|
80
112
|
};
|
81
|
-
return /* @__PURE__ */
|
113
|
+
return /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React3.createElement(Label, { ...labelProps }, props.label), isLoading ? /* @__PURE__ */ React3.createElement(Skeleton, { style: { height: 40, width: 148 } }) : /* @__PURE__ */ React3.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React3.createElement(
|
82
114
|
"div",
|
83
115
|
{
|
84
116
|
style: { height: 40, backgroundColor: selectedColor },
|
85
117
|
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
|
86
118
|
},
|
87
|
-
/* @__PURE__ */
|
119
|
+
/* @__PURE__ */ React3.createElement(
|
88
120
|
"input",
|
89
121
|
{
|
122
|
+
disabled: preview,
|
90
123
|
type: "color",
|
91
124
|
value: selectedColor,
|
92
125
|
onChange: (e) => {
|
@@ -102,19 +135,26 @@ var ColorPicker = ({
|
|
102
135
|
...colorPickerProps
|
103
136
|
}
|
104
137
|
)
|
105
|
-
), /* @__PURE__ */
|
138
|
+
), /* @__PURE__ */ React3.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React3.createElement(
|
106
139
|
"input",
|
107
140
|
{
|
141
|
+
disabled: preview,
|
108
142
|
maxLength: 7,
|
109
143
|
type: "text",
|
110
144
|
onInput: handleTextInputChange,
|
111
145
|
value: selectedColor,
|
112
146
|
className: cn(
|
113
|
-
"hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-
|
147
|
+
"hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all",
|
148
|
+
"hawa-border hawa-border-l-0 hawa-border-l-transparent"
|
149
|
+
// "hawa-border hawa-border-x-0 hawa-border-x-transparent hawa-border-b-0 hawa-rounded-tr-none"
|
114
150
|
),
|
151
|
+
style: {
|
152
|
+
backgroundColor: preview ? selectedColor : "hsl(var(--background))",
|
153
|
+
color: preview ? calculateLuminance(selectedColor) > 0.5 ? "black" : "white" : ""
|
154
|
+
},
|
115
155
|
...textInputProps
|
116
156
|
}
|
117
|
-
))), /* @__PURE__ */
|
157
|
+
))), !forceHideHelperText && /* @__PURE__ */ React3.createElement(
|
118
158
|
"p",
|
119
159
|
{
|
120
160
|
className: cn(
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { RowData, ColumnDef } from '@tanstack/react-table';
|
3
2
|
import { D as DirectionType } from '../commonTypes-ko_NGEoT.mjs';
|
3
|
+
import { RowData, ColumnDef } from '@tanstack/react-table';
|
4
|
+
export { ColumnDef } from '@tanstack/react-table';
|
4
5
|
|
5
6
|
type DataTableProps<DataProps = {}> = {
|
6
7
|
direction?: DirectionType;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { RowData, ColumnDef } from '@tanstack/react-table';
|
3
2
|
import { D as DirectionType } from '../commonTypes-ko_NGEoT.js';
|
3
|
+
import { RowData, ColumnDef } from '@tanstack/react-table';
|
4
|
+
export { ColumnDef } from '@tanstack/react-table';
|
4
5
|
|
5
6
|
type DataTableProps<DataProps = {}> = {
|
6
7
|
direction?: DirectionType;
|
package/dist/dataTable/index.js
CHANGED
@@ -1145,7 +1145,7 @@ var DataTable = ({
|
|
1145
1145
|
/* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-items-center hawa-justify-between" }, !props.showCount && /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm hawa-text-muted-foreground" }), props.showCount && /* @__PURE__ */ React9.createElement(
|
1146
1146
|
"div",
|
1147
1147
|
{
|
1148
|
-
className: "text-
|
1148
|
+
className: "text-muted-foreground text-sm",
|
1149
1149
|
dir: props.direction
|
1150
1150
|
},
|
1151
1151
|
/* @__PURE__ */ React9.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
|
package/dist/dataTable/index.mjs
CHANGED
@@ -1114,7 +1114,7 @@ var DataTable = ({
|
|
1114
1114
|
/* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-items-center hawa-justify-between" }, !props.showCount && /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm hawa-text-muted-foreground" }), props.showCount && /* @__PURE__ */ React9.createElement(
|
1115
1115
|
"div",
|
1116
1116
|
{
|
1117
|
-
className: "text-
|
1117
|
+
className: "text-muted-foreground text-sm",
|
1118
1118
|
dir: props.direction
|
1119
1119
|
},
|
1120
1120
|
/* @__PURE__ */ React9.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
|
@@ -12,6 +12,7 @@ import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
12
12
|
import { DialogProps } from '@radix-ui/react-dialog';
|
13
13
|
import { VariantProps } from 'class-variance-authority';
|
14
14
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
15
|
+
export { ColumnDef } from '@tanstack/react-table';
|
15
16
|
import { L as LabelProps } from '../Radio-hsrLKNxE.mjs';
|
16
17
|
export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-hsrLKNxE.mjs';
|
17
18
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
@@ -21,6 +22,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
21
22
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
22
23
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
23
24
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
25
|
+
import { HighlightProps } from 'prism-react-renderer';
|
24
26
|
import { EmblaOptionsType } from 'embla-carousel';
|
25
27
|
export { d as Toast, h as ToastAction, a as ToastActionElement, g as ToastClose, f as ToastDescription, T as ToastProps, b as ToastProvider, e as ToastTitle, c as ToastViewport } from '../Toast-VBd4UvlM.mjs';
|
26
28
|
import '@radix-ui/react-dropdown-menu';
|
@@ -258,6 +260,7 @@ type AlertTypes = {
|
|
258
260
|
variant: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost";
|
259
261
|
}
|
260
262
|
];
|
263
|
+
/** Removes the close button */
|
261
264
|
persistent?: boolean;
|
262
265
|
icon?: any;
|
263
266
|
className?: any;
|
@@ -382,6 +385,7 @@ declare const Combobox: React.ForwardRefExoticComponent<ComboboxTypes<any> & Rea
|
|
382
385
|
|
383
386
|
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
384
387
|
helperText?: string;
|
388
|
+
isLoading?: boolean;
|
385
389
|
/** The label of the input field */
|
386
390
|
label?: any;
|
387
391
|
labelProps?: LabelProps;
|
@@ -437,7 +441,7 @@ type SortButtonProps = {
|
|
437
441
|
declare const SortButton: React__default.FC<SortButtonProps>;
|
438
442
|
|
439
443
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
440
|
-
orientation?:
|
444
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
441
445
|
} & React.RefAttributes<HTMLDivElement>>;
|
442
446
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
443
447
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
@@ -627,8 +631,12 @@ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitiv
|
|
627
631
|
type ColorPickerTypes = {
|
628
632
|
label?: string;
|
629
633
|
id?: string;
|
634
|
+
isLoading?: boolean;
|
630
635
|
labelProps?: LabelProps;
|
631
636
|
helperText?: string;
|
637
|
+
forceHideHelperText?: boolean;
|
638
|
+
/** Boolean to enable/disable editing the input field and using it as a text field */
|
639
|
+
preview?: boolean;
|
632
640
|
/** The hex code for the color */
|
633
641
|
color?: any;
|
634
642
|
/** Fires everytime the color changes */
|
@@ -712,7 +720,7 @@ declare const ScrollIndicator: FC<ScrollIndicatorProps>;
|
|
712
720
|
|
713
721
|
type CodeBlockTypes = {
|
714
722
|
/** Specifies the programming language for syntax highlighting.*/
|
715
|
-
language?:
|
723
|
+
language?: HighlightProps["language"];
|
716
724
|
/** Defines the width of the code block.*/
|
717
725
|
width?: "full" | "md" | "sm";
|
718
726
|
/** Array of tabs each containing a title and code content.*/
|
@@ -736,6 +744,7 @@ type CarouselProps = {
|
|
736
744
|
autoplay?: boolean;
|
737
745
|
autoplayInterval?: number;
|
738
746
|
options?: EmblaOptionsType;
|
747
|
+
direction?: DirectionType;
|
739
748
|
};
|
740
749
|
declare const Carousel: React__default.FC<CarouselProps>;
|
741
750
|
|
package/dist/elements/index.d.ts
CHANGED
@@ -12,6 +12,7 @@ import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
12
12
|
import { DialogProps } from '@radix-ui/react-dialog';
|
13
13
|
import { VariantProps } from 'class-variance-authority';
|
14
14
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
15
|
+
export { ColumnDef } from '@tanstack/react-table';
|
15
16
|
import { L as LabelProps } from '../Radio-K1WGpnGA.js';
|
16
17
|
export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-K1WGpnGA.js';
|
17
18
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
@@ -21,6 +22,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
21
22
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
22
23
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
23
24
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
25
|
+
import { HighlightProps } from 'prism-react-renderer';
|
24
26
|
import { EmblaOptionsType } from 'embla-carousel';
|
25
27
|
export { d as Toast, h as ToastAction, a as ToastActionElement, g as ToastClose, f as ToastDescription, T as ToastProps, b as ToastProvider, e as ToastTitle, c as ToastViewport } from '../Toast-pOd4uGZz.js';
|
26
28
|
import '@radix-ui/react-dropdown-menu';
|
@@ -258,6 +260,7 @@ type AlertTypes = {
|
|
258
260
|
variant: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost";
|
259
261
|
}
|
260
262
|
];
|
263
|
+
/** Removes the close button */
|
261
264
|
persistent?: boolean;
|
262
265
|
icon?: any;
|
263
266
|
className?: any;
|
@@ -382,6 +385,7 @@ declare const Combobox: React.ForwardRefExoticComponent<ComboboxTypes<any> & Rea
|
|
382
385
|
|
383
386
|
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
384
387
|
helperText?: string;
|
388
|
+
isLoading?: boolean;
|
385
389
|
/** The label of the input field */
|
386
390
|
label?: any;
|
387
391
|
labelProps?: LabelProps;
|
@@ -437,7 +441,7 @@ type SortButtonProps = {
|
|
437
441
|
declare const SortButton: React__default.FC<SortButtonProps>;
|
438
442
|
|
439
443
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
440
|
-
orientation?:
|
444
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
441
445
|
} & React.RefAttributes<HTMLDivElement>>;
|
442
446
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
443
447
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
@@ -627,8 +631,12 @@ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitiv
|
|
627
631
|
type ColorPickerTypes = {
|
628
632
|
label?: string;
|
629
633
|
id?: string;
|
634
|
+
isLoading?: boolean;
|
630
635
|
labelProps?: LabelProps;
|
631
636
|
helperText?: string;
|
637
|
+
forceHideHelperText?: boolean;
|
638
|
+
/** Boolean to enable/disable editing the input field and using it as a text field */
|
639
|
+
preview?: boolean;
|
632
640
|
/** The hex code for the color */
|
633
641
|
color?: any;
|
634
642
|
/** Fires everytime the color changes */
|
@@ -712,7 +720,7 @@ declare const ScrollIndicator: FC<ScrollIndicatorProps>;
|
|
712
720
|
|
713
721
|
type CodeBlockTypes = {
|
714
722
|
/** Specifies the programming language for syntax highlighting.*/
|
715
|
-
language?:
|
723
|
+
language?: HighlightProps["language"];
|
716
724
|
/** Defines the width of the code block.*/
|
717
725
|
width?: "full" | "md" | "sm";
|
718
726
|
/** Array of tabs each containing a title and code content.*/
|
@@ -736,6 +744,7 @@ type CarouselProps = {
|
|
736
744
|
autoplay?: boolean;
|
737
745
|
autoplayInterval?: number;
|
738
746
|
options?: EmblaOptionsType;
|
747
|
+
direction?: DirectionType;
|
739
748
|
};
|
740
749
|
declare const Carousel: React__default.FC<CarouselProps>;
|
741
750
|
|