@sikka/hawa 0.24.3-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 +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +44 -35
- package/dist/index.mjs +44 -35
- 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 +11 -4
- package/dist/layout/index.d.ts +11 -4
- package/dist/layout/index.js +47 -38
- package/dist/layout/index.mjs +44 -35
- 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
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as react from 'react';
|
2
2
|
import { FC, ChangeEvent, FormEvent, InputHTMLAttributes } from 'react';
|
3
|
-
|
3
|
+
|
4
|
+
type PositionType = "top" | "bottom" | "right" | "left";
|
4
5
|
|
5
6
|
type LabelProps = {
|
6
7
|
hint?: react.ReactNode;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as react from 'react';
|
2
2
|
import { FC, ChangeEvent, FormEvent, InputHTMLAttributes } from 'react';
|
3
|
-
|
3
|
+
|
4
|
+
type PositionType = "top" | "bottom" | "right" | "left";
|
4
5
|
|
5
6
|
type LabelProps = {
|
6
7
|
hint?: react.ReactNode;
|
@@ -1,171 +1,6 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
} from "../chunk-
|
4
|
-
|
5
|
-
// components/elements/colorPicker/ColorPicker.tsx
|
6
|
-
import React3, {
|
7
|
-
useState,
|
8
|
-
useEffect
|
9
|
-
} 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";
|
95
|
-
|
96
|
-
// components/elements/colorPicker/ColorPicker.tsx
|
97
|
-
var ColorPicker = ({
|
98
|
-
containerProps,
|
99
|
-
colorPickerProps,
|
100
|
-
textInputProps,
|
101
|
-
labelProps,
|
102
|
-
...props
|
103
|
-
}) => {
|
104
|
-
const [selectedColor, setSelectedColor] = useState(props.color);
|
105
|
-
useEffect(() => {
|
106
|
-
if (selectedColor && selectedColor[0] !== "#") {
|
107
|
-
setSelectedColor(`#${selectedColor}`);
|
108
|
-
}
|
109
|
-
}, [selectedColor]);
|
110
|
-
const handleTextInputChange = (e) => {
|
111
|
-
const inputElement = e.target;
|
112
|
-
let inputColor = inputElement.value;
|
113
|
-
if (inputColor[0] !== "#") {
|
114
|
-
inputColor = `#${inputColor}`;
|
115
|
-
}
|
116
|
-
const sanitizedInput = inputColor.replace(/[^a-fA-F0-9#]/g, "");
|
117
|
-
setSelectedColor(sanitizedInput);
|
118
|
-
if (props.handleChange) {
|
119
|
-
props.handleChange(e);
|
120
|
-
}
|
121
|
-
};
|
122
|
-
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(
|
123
|
-
"div",
|
124
|
-
{
|
125
|
-
style: { height: 40, backgroundColor: selectedColor },
|
126
|
-
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
|
127
|
-
},
|
128
|
-
/* @__PURE__ */ React3.createElement(
|
129
|
-
"input",
|
130
|
-
{
|
131
|
-
type: "color",
|
132
|
-
value: selectedColor,
|
133
|
-
onChange: (e) => {
|
134
|
-
setSelectedColor(e.target.value);
|
135
|
-
if (props.handleChange) {
|
136
|
-
props.handleChange(e);
|
137
|
-
}
|
138
|
-
},
|
139
|
-
className: cn(
|
140
|
-
"hawa-mt-0 hawa-h-[38px] hawa-opacity-0",
|
141
|
-
props.colorPickerClassNames
|
142
|
-
),
|
143
|
-
...colorPickerProps
|
144
|
-
}
|
145
|
-
)
|
146
|
-
), /* @__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(
|
147
|
-
"input",
|
148
|
-
{
|
149
|
-
maxLength: 7,
|
150
|
-
type: "text",
|
151
|
-
onInput: handleTextInputChange,
|
152
|
-
value: selectedColor,
|
153
|
-
className: cn(
|
154
|
-
"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"
|
155
|
-
),
|
156
|
-
...textInputProps
|
157
|
-
}
|
158
|
-
))), /* @__PURE__ */ React3.createElement(
|
159
|
-
"p",
|
160
|
-
{
|
161
|
-
className: cn(
|
162
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
163
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
164
|
-
)
|
165
|
-
},
|
166
|
-
props.helperText
|
167
|
-
));
|
168
|
-
};
|
2
|
+
ColorPicker
|
3
|
+
} from "../chunk-LRLLDOQZ.mjs";
|
169
4
|
export {
|
170
5
|
ColorPicker
|
171
6
|
};
|
@@ -1,5 +1,13 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
|
2
|
+
|
3
|
+
type PositionType = "top" | "bottom" | "right" | "left";
|
4
|
+
|
5
|
+
type LabelProps = {
|
6
|
+
hint?: React.ReactNode;
|
7
|
+
hintSide?: PositionType;
|
8
|
+
htmlFor?: string;
|
9
|
+
required?: boolean;
|
10
|
+
};
|
3
11
|
|
4
12
|
type ComboboxTypes<T> = {
|
5
13
|
labelKey?: keyof T;
|
package/dist/combobox/index.d.ts
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
|
2
|
+
|
3
|
+
type PositionType = "top" | "bottom" | "right" | "left";
|
4
|
+
|
5
|
+
type LabelProps = {
|
6
|
+
hint?: React.ReactNode;
|
7
|
+
hintSide?: PositionType;
|
8
|
+
htmlFor?: string;
|
9
|
+
required?: boolean;
|
10
|
+
};
|
3
11
|
|
4
12
|
type ComboboxTypes<T> = {
|
5
13
|
labelKey?: keyof T;
|