@sikka/hawa 0.26.18-next → 0.26.20
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.js +10 -12
- package/dist/accordion/index.mjs +8 -8
- package/dist/alert/index.js +8 -7
- package/dist/alert/index.mjs +7 -6
- package/dist/appLayout/index.js +13 -12
- package/dist/appLayout/index.mjs +12 -11
- package/dist/appMenubar/index.js +4 -4
- package/dist/appMenubar/index.mjs +2 -2
- package/dist/appStores/index.js +2 -2
- package/dist/appStores/index.mjs +1 -1
- package/dist/appTabs/index.js +4 -4
- package/dist/appTabs/index.mjs +2 -2
- package/dist/appTopbar/index.js +6 -6
- package/dist/appTopbar/index.mjs +4 -4
- package/dist/avatar/index.js +5 -5
- package/dist/avatar/index.mjs +4 -4
- package/dist/backToTop/index.js +8 -7
- package/dist/backToTop/index.mjs +7 -6
- package/dist/badge/index.js +4 -4
- package/dist/badge/index.mjs +2 -2
- package/dist/blocks/auth/index.js +38 -37
- package/dist/blocks/auth/index.mjs +24 -24
- package/dist/blocks/feedback/index.js +27 -26
- package/dist/blocks/feedback/index.mjs +11 -11
- package/dist/blocks/index.js +77 -76
- package/dist/blocks/index.mjs +34 -34
- package/dist/blocks/misc/index.js +31 -30
- package/dist/blocks/misc/index.mjs +14 -14
- package/dist/blocks/pricing/index.js +123 -122
- package/dist/blocks/pricing/index.mjs +18 -18
- package/dist/breadcrumb/index.js +2 -2
- package/dist/breadcrumb/index.mjs +1 -1
- package/dist/button/index.js +6 -5
- package/dist/button/index.mjs +5 -4
- package/dist/card/index.js +4 -4
- package/dist/card/index.mjs +2 -2
- package/dist/carousel/index.d.mts +1 -1
- package/dist/carousel/index.d.ts +1 -1
- package/dist/carousel/index.js +9 -18
- package/dist/carousel/index.mjs +7 -16
- package/dist/checkbox/index.js +4 -4
- package/dist/checkbox/index.mjs +2 -2
- package/dist/chip/index.js +4 -4
- package/dist/chip/index.mjs +2 -2
- package/dist/{chunk-343SRWR4.mjs → chunk-3GBITBPL.mjs} +2 -2
- package/dist/{chunk-TTKRRN7S.mjs → chunk-4IOG44R3.mjs} +2 -2
- package/dist/{chunk-3N6JJKMN.mjs → chunk-65TG6EVD.mjs} +5 -4
- package/dist/{chunk-LT3VHLAG.mjs → chunk-APZM24KK.mjs} +2 -2
- package/dist/{chunk-FYH74ZRQ.mjs → chunk-AREFDTXK.mjs} +9 -8
- package/dist/{chunk-FNVYY7ND.mjs → chunk-D22AALLE.mjs} +1 -1
- package/dist/{chunk-OD5WIQGQ.mjs → chunk-FDKCMEMD.mjs} +2 -2
- package/dist/{chunk-KNHT2UBG.mjs → chunk-KMCIHW76.mjs} +2 -2
- package/dist/{chunk-M2ZS3EDT.mjs → chunk-OAXF3RCQ.mjs} +2 -2
- package/dist/chunk-OTGCLEKC.mjs +62 -0
- package/dist/{chunk-OE23TTPS.mjs → chunk-POIP5U4M.mjs} +3 -3
- package/dist/{chunk-EYUG3GRC.mjs → chunk-SJ2Z6ZOG.mjs} +4 -4
- package/dist/{chunk-WRZFWCOQ.mjs → chunk-TGZRVRLP.mjs} +4 -4
- package/dist/{chunk-TE3BKEXL.mjs → chunk-TWNGV3RE.mjs} +1 -1
- package/dist/{chunk-ATUSR6VI.mjs → chunk-U3TZWNDZ.mjs} +4 -4
- package/dist/{chunk-W77KCP35.mjs → chunk-VQQ6MUX5.mjs} +2 -2
- package/dist/{chunk-SUS6O2PO.mjs → chunk-WPSUV4AD.mjs} +21 -21
- package/dist/{chunk-3KMBSNM3.mjs → chunk-Z5SL5QTQ.mjs} +11 -10
- package/dist/{chunk-ZCZ3WARS.mjs → chunk-ZS3FB3PO.mjs} +1 -1
- package/dist/codeBlock/index.js +153 -2454
- package/dist/codeBlock/index.mjs +129 -2393
- package/dist/collapsible/index.js +2 -2
- package/dist/collapsible/index.mjs +1 -1
- package/dist/colorPicker/index.js +7 -7
- package/dist/colorPicker/index.mjs +126 -2
- package/dist/combobox/index.js +193 -193
- package/dist/combobox/index.mjs +8 -8
- package/dist/command/index.js +5 -5
- package/dist/command/index.mjs +1 -1
- package/dist/copyrights/index.js +2 -2
- package/dist/copyrights/index.mjs +1 -1
- package/dist/count/index.js +2 -2
- package/dist/count/index.mjs +1 -1
- package/dist/dataTable/index.d.mts +1 -0
- package/dist/dataTable/index.d.ts +1 -0
- package/dist/dataTable/index.js +23 -16
- package/dist/dataTable/index.mjs +22 -15
- package/dist/destroyableCard/index.js +6 -8
- package/dist/destroyableCard/index.mjs +4 -4
- package/dist/dialog/index.js +4 -4
- package/dist/dialog/index.mjs +2 -2
- package/dist/docsLayout/index.js +12 -11
- package/dist/docsLayout/index.mjs +11 -10
- package/dist/docsSidebar/index.js +4 -4
- package/dist/docsSidebar/index.mjs +2 -2
- package/dist/dropdownMenu/index.js +4 -4
- package/dist/dropdownMenu/index.mjs +2 -2
- package/dist/elements/index.d.mts +2 -1
- package/dist/elements/index.d.ts +2 -1
- package/dist/elements/index.js +162 -164
- package/dist/elements/index.mjs +54 -57
- package/dist/fileDropzone/index.js +10 -9
- package/dist/fileDropzone/index.mjs +9 -8
- package/dist/fileUploader/index.js +2 -2
- package/dist/fileUploader/index.mjs +1 -1
- package/dist/glow/index.js +2 -2
- package/dist/glow/index.mjs +1 -1
- package/dist/hooks/index.d.mts +7 -7
- package/dist/hooks/index.d.ts +7 -7
- package/dist/hooks/index.js +16 -16
- package/dist/hooks/index.mjs +14 -14
- package/dist/index.css +0 -465
- package/dist/index.d.mts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +220 -222
- package/dist/index.mjs +219 -221
- package/dist/input/index.js +8 -8
- package/dist/input/index.mjs +4 -4
- package/dist/interfaceSettings/index.js +9 -9
- package/dist/interfaceSettings/index.mjs +4 -4
- package/dist/label/index.js +5 -5
- package/dist/label/index.mjs +4 -4
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +31 -30
- package/dist/layout/index.mjs +16 -16
- package/dist/loading/index.js +4 -4
- package/dist/loading/index.mjs +2 -2
- package/dist/logos/index.js +2 -2
- package/dist/logos/index.mjs +1 -1
- package/dist/navbar/index.js +5 -5
- package/dist/navbar/index.mjs +4 -4
- package/dist/navigationMenu/index.js +4 -4
- package/dist/navigationMenu/index.mjs +2 -2
- package/dist/pagination/index.js +4 -4
- package/dist/pagination/index.mjs +2 -2
- package/dist/passwordInput/index.js +15 -15
- package/dist/passwordInput/index.mjs +13 -13
- package/dist/phoneInput/index.js +11 -11
- package/dist/phoneInput/index.mjs +10 -10
- package/dist/pinInput/index.js +4 -4
- package/dist/pinInput/index.mjs +2 -2
- package/dist/popover/index.js +4 -4
- package/dist/popover/index.mjs +2 -2
- package/dist/progress/index.js +4 -4
- package/dist/progress/index.mjs +2 -2
- package/dist/progressCircle/index.js +4 -4
- package/dist/progressCircle/index.mjs +2 -2
- package/dist/radio/index.js +7 -7
- package/dist/radio/index.mjs +6 -6
- package/dist/scrollArea/index.js +4 -4
- package/dist/scrollArea/index.mjs +2 -2
- package/dist/scrollIndicator/index.js +2 -2
- package/dist/scrollIndicator/index.mjs +1 -1
- package/dist/select/index.js +8 -8
- package/dist/select/index.mjs +7 -7
- package/dist/separator/index.js +4 -4
- package/dist/separator/index.mjs +2 -2
- package/dist/sheet/index.js +4 -4
- package/dist/sheet/index.mjs +2 -2
- package/dist/sidebar/index.js +6 -6
- package/dist/sidebar/index.mjs +4 -4
- package/dist/signature/index.js +8 -8
- package/dist/signature/index.mjs +6 -6
- package/dist/simpleTable/index.js +6 -6
- package/dist/simpleTable/index.mjs +5 -5
- package/dist/skeleton/index.js +4 -4
- package/dist/skeleton/index.mjs +2 -2
- package/dist/slider/index.js +4 -4
- package/dist/slider/index.mjs +2 -2
- package/dist/sortButton/index.js +8 -7
- package/dist/sortButton/index.mjs +2 -2
- package/dist/splitButton/index.js +9 -8
- package/dist/splitButton/index.mjs +4 -4
- package/dist/stats/index.js +7 -7
- package/dist/stats/index.mjs +6 -6
- package/dist/stopPropagationWrapper/index.js +2 -2
- package/dist/stopPropagationWrapper/index.mjs +1 -1
- package/dist/switch/index.js +4 -4
- package/dist/switch/index.mjs +2 -2
- package/dist/table/index.js +4 -4
- package/dist/table/index.mjs +2 -2
- package/dist/tabs/index.js +5 -5
- package/dist/tabs/index.mjs +4 -4
- package/dist/textarea/index.js +7 -7
- package/dist/textarea/index.mjs +6 -6
- package/dist/toast/index.js +4 -4
- package/dist/toast/index.mjs +2 -2
- package/dist/toaster/index.js +6 -6
- package/dist/toaster/index.mjs +5 -5
- package/dist/tooltip/index.js +4 -4
- package/dist/tooltip/index.mjs +3 -3
- package/dist/types/index.js +1 -1
- package/package.json +16 -42
- package/README.md +0 -107
- package/dist/chunk-S36W2LDN.mjs +0 -189
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
29
|
|
30
|
-
//
|
30
|
+
// elements/collapsible/index.ts
|
31
31
|
var collapsible_exports = {};
|
32
32
|
__export(collapsible_exports, {
|
33
33
|
Collapsible: () => Collapsible,
|
@@ -36,7 +36,7 @@ __export(collapsible_exports, {
|
|
36
36
|
});
|
37
37
|
module.exports = __toCommonJS(collapsible_exports);
|
38
38
|
|
39
|
-
//
|
39
|
+
// elements/collapsible/Collapsible.tsx
|
40
40
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
41
41
|
var Collapsible = CollapsiblePrimitive.Root;
|
42
42
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
//
|
1
|
+
// elements/collapsible/Collapsible.tsx
|
2
2
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
3
3
|
var Collapsible = CollapsiblePrimitive.Root;
|
4
4
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
@@ -27,27 +27,27 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
29
|
|
30
|
-
//
|
30
|
+
// elements/colorPicker/index.ts
|
31
31
|
var colorPicker_exports = {};
|
32
32
|
__export(colorPicker_exports, {
|
33
33
|
ColorPicker: () => ColorPicker
|
34
34
|
});
|
35
35
|
module.exports = __toCommonJS(colorPicker_exports);
|
36
36
|
|
37
|
-
//
|
37
|
+
// elements/colorPicker/ColorPicker.tsx
|
38
38
|
var import_react2 = __toESM(require("react"));
|
39
39
|
|
40
|
-
//
|
40
|
+
// util/index.ts
|
41
41
|
var import_clsx = require("clsx");
|
42
42
|
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
46
|
|
47
|
-
//
|
47
|
+
// elements/label/Label.tsx
|
48
48
|
var React2 = __toESM(require("react"));
|
49
49
|
|
50
|
-
//
|
50
|
+
// elements/tooltip/Tooltip.tsx
|
51
51
|
var import_react = __toESM(require("react"));
|
52
52
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
53
53
|
var TooltipContent = import_react.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(
|
@@ -98,7 +98,7 @@ var Tooltip = ({
|
|
98
98
|
);
|
99
99
|
};
|
100
100
|
|
101
|
-
//
|
101
|
+
// elements/label/Label.tsx
|
102
102
|
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(
|
103
103
|
"label",
|
104
104
|
{
|
@@ -140,7 +140,7 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
|
|
140
140
|
)));
|
141
141
|
Label.displayName = "Label";
|
142
142
|
|
143
|
-
//
|
143
|
+
// elements/colorPicker/ColorPicker.tsx
|
144
144
|
var ColorPicker = ({
|
145
145
|
containerProps,
|
146
146
|
colorPickerProps,
|
@@ -1,6 +1,130 @@
|
|
1
1
|
import {
|
2
|
-
|
3
|
-
|
2
|
+
Tooltip,
|
3
|
+
cn
|
4
|
+
} from "../chunk-OTGCLEKC.mjs";
|
5
|
+
|
6
|
+
// elements/colorPicker/ColorPicker.tsx
|
7
|
+
import React2, {
|
8
|
+
useState,
|
9
|
+
useEffect
|
10
|
+
} from "react";
|
11
|
+
|
12
|
+
// elements/label/Label.tsx
|
13
|
+
import * as React from "react";
|
14
|
+
var Label = React.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React.createElement(
|
15
|
+
"label",
|
16
|
+
{
|
17
|
+
ref,
|
18
|
+
className: cn(
|
19
|
+
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
20
|
+
className
|
21
|
+
),
|
22
|
+
...props
|
23
|
+
},
|
24
|
+
children,
|
25
|
+
required && /* @__PURE__ */ React.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
26
|
+
), hint && /* @__PURE__ */ React.createElement(
|
27
|
+
Tooltip,
|
28
|
+
{
|
29
|
+
content: hint,
|
30
|
+
side: hintSide,
|
31
|
+
triggerProps: {
|
32
|
+
tabIndex: -1,
|
33
|
+
onClick: (event) => event.preventDefault()
|
34
|
+
}
|
35
|
+
},
|
36
|
+
/* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
|
37
|
+
"svg",
|
38
|
+
{
|
39
|
+
xmlns: "http://www.w3.org/2000/svg",
|
40
|
+
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
41
|
+
viewBox: "0 0 24 24",
|
42
|
+
fill: "none",
|
43
|
+
stroke: "currentColor",
|
44
|
+
strokeWidth: "2",
|
45
|
+
strokeLinecap: "round",
|
46
|
+
strokeLinejoin: "round"
|
47
|
+
},
|
48
|
+
/* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
49
|
+
/* @__PURE__ */ React.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
50
|
+
/* @__PURE__ */ React.createElement("path", { d: "M12 17h.01" })
|
51
|
+
))
|
52
|
+
)));
|
53
|
+
Label.displayName = "Label";
|
54
|
+
|
55
|
+
// elements/colorPicker/ColorPicker.tsx
|
56
|
+
var ColorPicker = ({
|
57
|
+
containerProps,
|
58
|
+
colorPickerProps,
|
59
|
+
textInputProps,
|
60
|
+
labelProps,
|
61
|
+
...props
|
62
|
+
}) => {
|
63
|
+
const [selectedColor, setSelectedColor] = useState(props.color);
|
64
|
+
useEffect(() => {
|
65
|
+
if (selectedColor && selectedColor[0] !== "#") {
|
66
|
+
setSelectedColor(`#${selectedColor}`);
|
67
|
+
}
|
68
|
+
}, [selectedColor]);
|
69
|
+
const handleTextInputChange = (e) => {
|
70
|
+
const inputElement = e.target;
|
71
|
+
let inputColor = inputElement.value;
|
72
|
+
if (inputColor[0] !== "#") {
|
73
|
+
inputColor = `#${inputColor}`;
|
74
|
+
}
|
75
|
+
const sanitizedInput = inputColor.replace(/[^a-fA-F0-9#]/g, "");
|
76
|
+
setSelectedColor(sanitizedInput);
|
77
|
+
if (props.handleChange) {
|
78
|
+
props.handleChange(e);
|
79
|
+
}
|
80
|
+
};
|
81
|
+
return /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React2.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React2.createElement(
|
82
|
+
"div",
|
83
|
+
{
|
84
|
+
style: { height: 40, backgroundColor: selectedColor },
|
85
|
+
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
|
86
|
+
},
|
87
|
+
/* @__PURE__ */ React2.createElement(
|
88
|
+
"input",
|
89
|
+
{
|
90
|
+
type: "color",
|
91
|
+
value: selectedColor,
|
92
|
+
onChange: (e) => {
|
93
|
+
setSelectedColor(e.target.value);
|
94
|
+
if (props.handleChange) {
|
95
|
+
props.handleChange(e);
|
96
|
+
}
|
97
|
+
},
|
98
|
+
className: cn(
|
99
|
+
"hawa-mt-0 hawa-h-[38px] hawa-opacity-0",
|
100
|
+
props.colorPickerClassNames
|
101
|
+
),
|
102
|
+
...colorPickerProps
|
103
|
+
}
|
104
|
+
)
|
105
|
+
), /* @__PURE__ */ React2.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React2.createElement(
|
106
|
+
"input",
|
107
|
+
{
|
108
|
+
maxLength: 7,
|
109
|
+
type: "text",
|
110
|
+
onInput: handleTextInputChange,
|
111
|
+
value: selectedColor,
|
112
|
+
className: cn(
|
113
|
+
"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"
|
114
|
+
),
|
115
|
+
...textInputProps
|
116
|
+
}
|
117
|
+
))), /* @__PURE__ */ React2.createElement(
|
118
|
+
"p",
|
119
|
+
{
|
120
|
+
className: cn(
|
121
|
+
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
122
|
+
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
123
|
+
)
|
124
|
+
},
|
125
|
+
props.helperText
|
126
|
+
));
|
127
|
+
};
|
4
128
|
export {
|
5
129
|
ColorPicker
|
6
130
|
};
|