@sikka/hawa 0.23.9-next → 0.23.11-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/DropdownMenu-jh4puuXw.d.ts +95 -0
- package/dist/DropdownMenu-vm2kRAhL.d.mts +95 -0
- package/dist/Radio-2ZwcMDWt.d.ts +74 -0
- package/dist/Radio-5ZANA8Vh.d.mts +74 -0
- package/dist/SimpleTable-EE4ejgUR.d.mts +97 -0
- package/dist/SimpleTable-vY1ziD-2.d.ts +97 -0
- package/dist/Toast-jAb16JQg.d.mts +23 -0
- package/dist/Toast-xcELwcIX.d.ts +23 -0
- package/dist/accordion/index.d.mts +1 -1
- package/dist/accordion/index.d.ts +1 -1
- package/dist/alert/index.d.mts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/avatar/index.d.mts +1 -1
- package/dist/avatar/index.d.ts +1 -1
- package/dist/avatar/index.js +1 -1
- package/dist/avatar/index.mjs +1 -1
- package/dist/backToTop/index.mjs +4 -2
- package/dist/blocks/index.d.mts +480 -0
- package/dist/blocks/index.d.ts +480 -0
- package/dist/blocks/index.js +8119 -0
- package/dist/blocks/index.mjs +2535 -0
- package/dist/blocks/pricing/index.js +40 -40
- package/dist/blocks/pricing/index.mjs +38 -38
- package/dist/carousel/index.d.mts +13 -0
- package/dist/carousel/index.d.ts +13 -0
- package/dist/carousel/index.js +186 -0
- package/dist/carousel/index.mjs +144 -0
- package/dist/checkbox/index.d.mts +2 -1
- package/dist/checkbox/index.d.ts +2 -1
- package/dist/chip/index.d.mts +37 -2
- package/dist/chip/index.d.ts +37 -2
- package/dist/chip/index.mjs +83 -3
- package/dist/chunk-343SRWR4.mjs +146 -0
- package/dist/{chunk-3N6JJKMN.mjs → chunk-DGWAHQRX.mjs} +3 -7
- package/dist/chunk-FNVYY7ND.mjs +22 -0
- package/dist/chunk-HSOVWPQN.mjs +138 -0
- package/dist/chunk-LRLLDOQZ.mjs +178 -0
- package/dist/chunk-ND4BWUKH.mjs +34 -0
- package/dist/chunk-RYORXSDA.mjs +7519 -0
- package/dist/codeBlock/index.d.mts +23 -0
- package/dist/codeBlock/index.d.ts +23 -0
- package/dist/codeBlock/index.js +2772 -0
- package/dist/codeBlock/index.mjs +2656 -0
- package/dist/collapsible/index.d.mts +8 -0
- package/dist/collapsible/index.d.ts +8 -0
- package/dist/collapsible/index.js +49 -0
- package/dist/collapsible/index.mjs +10 -0
- package/dist/colorPicker/index.d.mts +30 -0
- package/dist/colorPicker/index.d.ts +30 -0
- package/dist/colorPicker/index.js +208 -0
- package/dist/colorPicker/index.mjs +6 -0
- package/dist/combobox/index.mjs +19 -43
- 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-N7XOVCit.d.ts → commonTypes-Abm7GBJu.d.mts} +2 -1
- package/dist/{commonTypes-N7XOVCit.d.mts → commonTypes-Abm7GBJu.d.ts} +2 -1
- package/dist/commonTypes-CKtkuNFH.d.mts +11 -0
- package/dist/commonTypes-CKtkuNFH.d.ts +11 -0
- package/dist/commonTypes-Dqxlu-9C.d.mts +4 -0
- package/dist/commonTypes-Dqxlu-9C.d.ts +4 -0
- package/dist/commonTypes-ko_NGEoT.d.mts +3 -0
- package/dist/commonTypes-ko_NGEoT.d.ts +3 -0
- package/dist/dataTable/index.d.mts +1 -2
- package/dist/dataTable/index.d.ts +1 -2
- package/dist/dataTable/index.mjs +4 -2
- package/dist/destroyableCard/index.d.mts +12 -0
- package/dist/destroyableCard/index.d.ts +12 -0
- package/dist/destroyableCard/index.js +205 -0
- package/dist/destroyableCard/index.mjs +163 -0
- package/dist/dropdownMenu/index.d.mts +1 -1
- package/dist/dropdownMenu/index.d.ts +1 -1
- package/dist/dropdownMenu/index.mjs +342 -19
- package/dist/elements/index.d.mts +715 -0
- package/dist/elements/index.d.ts +715 -0
- package/dist/elements/index.js +7719 -0
- package/dist/elements/index.mjs +285 -0
- package/dist/fileUploader/index.d.mts +5 -0
- package/dist/fileUploader/index.d.ts +5 -0
- package/dist/fileUploader/index.js +62 -0
- package/dist/fileUploader/index.mjs +25 -0
- package/dist/hooks/index.d.mts +107 -0
- package/dist/hooks/index.d.ts +107 -0
- package/dist/hooks/index.js +451 -0
- package/dist/hooks/index.mjs +254 -0
- package/dist/index.d.mts +1905 -0
- package/dist/index.d.ts +1905 -0
- package/dist/index.js +11987 -0
- package/dist/index.mjs +11760 -0
- package/dist/input/index.d.mts +1 -9
- package/dist/input/index.d.ts +1 -9
- package/dist/input/index.mjs +15 -97
- package/dist/interfaceSettings/index.d.mts +18 -0
- package/dist/interfaceSettings/index.d.ts +18 -0
- package/dist/interfaceSettings/index.js +419 -0
- package/dist/interfaceSettings/index.mjs +379 -0
- package/dist/label/index.d.mts +2 -1
- package/dist/label/index.d.ts +2 -1
- package/dist/label/index.mjs +3 -87
- package/dist/layout/index.d.mts +249 -0
- package/dist/layout/index.d.ts +249 -0
- package/dist/layout/index.js +4373 -0
- package/dist/layout/index.mjs +1381 -0
- package/dist/navigationMenu/index.d.mts +1 -2
- package/dist/navigationMenu/index.d.ts +1 -2
- package/dist/pagination/index.d.mts +12 -0
- package/dist/pagination/index.d.ts +12 -0
- package/dist/pagination/index.js +160 -0
- package/dist/pagination/index.mjs +118 -0
- package/dist/passwordInput/index.d.mts +13 -0
- package/dist/passwordInput/index.d.ts +13 -0
- package/dist/passwordInput/index.js +566 -0
- package/dist/passwordInput/index.mjs +523 -0
- package/dist/popover/index.d.mts +1 -1
- package/dist/popover/index.d.ts +1 -1
- package/dist/progressCircle/index.d.mts +16 -0
- package/dist/progressCircle/index.d.ts +16 -0
- package/dist/progressCircle/index.js +159 -0
- package/dist/progressCircle/index.mjs +117 -0
- package/dist/radio/index.d.mts +1 -4
- package/dist/radio/index.d.ts +1 -4
- package/dist/scrollIndicator/index.d.mts +9 -0
- package/dist/scrollIndicator/index.d.ts +9 -0
- package/dist/scrollIndicator/index.js +80 -0
- package/dist/scrollIndicator/index.mjs +43 -0
- package/dist/select/index.d.mts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/separator/index.d.mts +10 -0
- package/dist/separator/index.d.ts +10 -0
- package/dist/separator/index.js +66 -0
- package/dist/separator/index.mjs +24 -0
- package/dist/simpleTable/index.d.mts +30 -0
- package/dist/simpleTable/index.d.ts +30 -0
- package/dist/simpleTable/index.js +253 -0
- package/dist/simpleTable/index.mjs +217 -0
- 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/slider/index.d.mts +6 -0
- package/dist/slider/index.d.ts +6 -0
- package/dist/slider/index.js +66 -0
- package/dist/slider/index.mjs +24 -0
- package/dist/splitButton/index.d.mts +29 -2
- package/dist/splitButton/index.d.ts +29 -2
- package/dist/splitButton/index.mjs +355 -30
- package/dist/stopPropagationWrapper/index.d.mts +2 -2
- package/dist/stopPropagationWrapper/index.d.ts +2 -2
- package/dist/switch/index.d.mts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.mts +21 -1
- package/dist/tabs/index.d.ts +21 -1
- package/dist/tabs/index.mjs +94 -14
- package/dist/toast/index.d.mts +23 -0
- package/dist/toast/index.d.ts +23 -0
- package/dist/toast/index.js +185 -0
- package/dist/toast/index.mjs +19 -0
- package/dist/toaster/index.d.mts +9 -0
- package/dist/toaster/index.d.ts +9 -0
- package/dist/toaster/index.js +302 -0
- package/dist/toaster/index.mjs +145 -0
- package/dist/tooltip/index.d.mts +3 -4
- package/dist/tooltip/index.d.ts +3 -4
- package/dist/types/index.d.mts +115 -0
- package/dist/types/index.d.ts +115 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.mjs +0 -0
- package/package.json +1 -1
- package/dist/chunk-72HYR6WB.mjs +0 -88
- package/dist/chunk-C4CBXIG5.mjs +0 -363
- package/dist/commonTypes-eIwARo5g.d.mts +0 -4
- package/dist/commonTypes-eIwARo5g.d.ts +0 -4
- package/dist/index-DUZFcPRO.d.mts +0 -38
- package/dist/index-DUZFcPRO.d.ts +0 -38
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// components/elements/colorPicker/ColorPicker.tsx
|
|
2
|
+
import React3, {
|
|
3
|
+
useState,
|
|
4
|
+
useEffect
|
|
5
|
+
} from "react";
|
|
6
|
+
|
|
7
|
+
// components/util.ts
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
import { twMerge } from "tailwind-merge";
|
|
10
|
+
function cn(...inputs) {
|
|
11
|
+
return twMerge(clsx(inputs));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// components/elements/label/Label.tsx
|
|
15
|
+
import * as React2 from "react";
|
|
16
|
+
|
|
17
|
+
// components/elements/tooltip/Tooltip.tsx
|
|
18
|
+
import React from "react";
|
|
19
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
20
|
+
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
21
|
+
TooltipPrimitive.Content,
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
sideOffset,
|
|
25
|
+
className: cn(
|
|
26
|
+
"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",
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
));
|
|
32
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
33
|
+
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
|
34
|
+
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
|
35
|
+
var Tooltip = ({
|
|
36
|
+
side,
|
|
37
|
+
open,
|
|
38
|
+
content,
|
|
39
|
+
children,
|
|
40
|
+
defaultOpen,
|
|
41
|
+
onOpenChange,
|
|
42
|
+
triggerProps,
|
|
43
|
+
contentProps,
|
|
44
|
+
providerProps,
|
|
45
|
+
delayDuration = 300,
|
|
46
|
+
...props
|
|
47
|
+
}) => {
|
|
48
|
+
return /* @__PURE__ */ React.createElement(
|
|
49
|
+
TooltipPrimitive.TooltipProvider,
|
|
50
|
+
{
|
|
51
|
+
delayDuration,
|
|
52
|
+
...providerProps
|
|
53
|
+
},
|
|
54
|
+
/* @__PURE__ */ React.createElement(
|
|
55
|
+
TooltipPrimitive.Root,
|
|
56
|
+
{
|
|
57
|
+
open,
|
|
58
|
+
defaultOpen,
|
|
59
|
+
onOpenChange,
|
|
60
|
+
...props
|
|
61
|
+
},
|
|
62
|
+
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
|
63
|
+
/* @__PURE__ */ React.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// components/elements/label/Label.tsx
|
|
69
|
+
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(
|
|
70
|
+
"label",
|
|
71
|
+
{
|
|
72
|
+
ref,
|
|
73
|
+
className: cn(
|
|
74
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
...props
|
|
78
|
+
},
|
|
79
|
+
children,
|
|
80
|
+
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
|
81
|
+
), hint && /* @__PURE__ */ React2.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React2.createElement(
|
|
82
|
+
"svg",
|
|
83
|
+
{
|
|
84
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
|
86
|
+
viewBox: "0 0 24 24",
|
|
87
|
+
fill: "none",
|
|
88
|
+
stroke: "currentColor",
|
|
89
|
+
strokeWidth: "2",
|
|
90
|
+
strokeLinecap: "round",
|
|
91
|
+
strokeLinejoin: "round"
|
|
92
|
+
},
|
|
93
|
+
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
94
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
95
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
|
96
|
+
))));
|
|
97
|
+
Label.displayName = "Label";
|
|
98
|
+
|
|
99
|
+
// components/elements/colorPicker/ColorPicker.tsx
|
|
100
|
+
var ColorPicker = ({
|
|
101
|
+
containerProps,
|
|
102
|
+
colorPickerProps,
|
|
103
|
+
textInputProps,
|
|
104
|
+
labelProps,
|
|
105
|
+
...props
|
|
106
|
+
}) => {
|
|
107
|
+
const [selectedColor, setSelectedColor] = useState(props.color);
|
|
108
|
+
useEffect(() => {
|
|
109
|
+
if (selectedColor && selectedColor[0] !== "#") {
|
|
110
|
+
setSelectedColor(`#${selectedColor}`);
|
|
111
|
+
}
|
|
112
|
+
}, [selectedColor]);
|
|
113
|
+
const handleTextInputChange = (e) => {
|
|
114
|
+
const inputElement = e.target;
|
|
115
|
+
let inputColor = inputElement.value;
|
|
116
|
+
if (inputColor[0] !== "#") {
|
|
117
|
+
inputColor = `#${inputColor}`;
|
|
118
|
+
}
|
|
119
|
+
const sanitizedInput = inputColor.replace(/[^a-fA-F0-9#]/g, "");
|
|
120
|
+
setSelectedColor(sanitizedInput);
|
|
121
|
+
if (props.handleChange) {
|
|
122
|
+
props.handleChange(e);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
return /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React3.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React3.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React3.createElement(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
style: { height: 40, backgroundColor: selectedColor },
|
|
129
|
+
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
|
|
130
|
+
},
|
|
131
|
+
/* @__PURE__ */ React3.createElement(
|
|
132
|
+
"input",
|
|
133
|
+
{
|
|
134
|
+
type: "color",
|
|
135
|
+
value: selectedColor,
|
|
136
|
+
onChange: (e) => {
|
|
137
|
+
setSelectedColor(e.target.value);
|
|
138
|
+
if (props.handleChange) {
|
|
139
|
+
props.handleChange(e);
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
className: cn(
|
|
143
|
+
"hawa-mt-0 hawa-h-[38px] hawa-opacity-0",
|
|
144
|
+
props.colorPickerClassNames
|
|
145
|
+
),
|
|
146
|
+
...colorPickerProps
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
), /* @__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(
|
|
150
|
+
"input",
|
|
151
|
+
{
|
|
152
|
+
maxLength: 7,
|
|
153
|
+
type: "text",
|
|
154
|
+
onInput: handleTextInputChange,
|
|
155
|
+
value: selectedColor,
|
|
156
|
+
className: cn(
|
|
157
|
+
"hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
|
|
158
|
+
),
|
|
159
|
+
...textInputProps
|
|
160
|
+
}
|
|
161
|
+
))), /* @__PURE__ */ React3.createElement(
|
|
162
|
+
"p",
|
|
163
|
+
{
|
|
164
|
+
className: cn(
|
|
165
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
|
166
|
+
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
|
167
|
+
)
|
|
168
|
+
},
|
|
169
|
+
props.helperText
|
|
170
|
+
));
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export {
|
|
174
|
+
cn,
|
|
175
|
+
Tooltip,
|
|
176
|
+
Label,
|
|
177
|
+
ColorPicker
|
|
178
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-TE3BKEXL.mjs";
|
|
4
|
+
|
|
5
|
+
// components/elements/skeleton/Skeleton.tsx
|
|
6
|
+
import React from "react";
|
|
7
|
+
function Skeleton({
|
|
8
|
+
className,
|
|
9
|
+
content,
|
|
10
|
+
animation = "pulse",
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
const animationStyles = {
|
|
14
|
+
none: "hawa-rounded hawa-bg-muted",
|
|
15
|
+
pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
|
|
16
|
+
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"
|
|
17
|
+
};
|
|
18
|
+
return /* @__PURE__ */ React.createElement(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: cn(
|
|
22
|
+
animationStyles[animation],
|
|
23
|
+
content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props
|
|
27
|
+
},
|
|
28
|
+
content && content
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
Skeleton
|
|
34
|
+
};
|