@sikka/hawa 0.48.1-next → 0.49.3-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.js +3 -28
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +3 -28
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/alert/index.js +53 -98
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +53 -98
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.d.mts +2 -0
- package/dist/appLayout/index.d.ts +2 -0
- package/dist/appLayout/index.js +263 -409
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +263 -409
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appMenubar/index.js +15 -20
- package/dist/appMenubar/index.js.map +1 -1
- package/dist/appMenubar/index.mjs +15 -20
- package/dist/appMenubar/index.mjs.map +1 -1
- package/dist/appTabs/index.js +28 -37
- package/dist/appTabs/index.js.map +1 -1
- package/dist/appTabs/index.mjs +28 -37
- package/dist/appTabs/index.mjs.map +1 -1
- package/dist/appTopbar/index.js +125 -173
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs +125 -173
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/backToTop/index.js +50 -82
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +50 -82
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/badge/index.d.mts +1 -1
- package/dist/badge/index.d.ts +1 -1
- package/dist/badge/index.js +2 -18
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +2 -18
- package/dist/badge/index.mjs.map +1 -1
- package/dist/blocks/auth/index.d.mts +1 -1
- package/dist/blocks/auth/index.d.ts +1 -1
- package/dist/blocks/auth/index.js +204 -470
- package/dist/blocks/auth/index.mjs +98 -282
- package/dist/blocks/feedback/index.js +214 -375
- package/dist/blocks/feedback/index.mjs +12 -25
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +606 -1124
- package/dist/blocks/index.mjs +134 -293
- package/dist/blocks/misc/index.js +136 -251
- package/dist/blocks/misc/index.mjs +29 -54
- package/dist/blocks/pricing/index.js +220 -397
- package/dist/blocks/pricing/index.mjs +63 -134
- package/dist/breadcrumb/index.js +1 -5
- package/dist/breadcrumb/index.js.map +1 -1
- package/dist/breadcrumb/index.mjs +1 -5
- package/dist/breadcrumb/index.mjs.map +1 -1
- package/dist/button/index.js +50 -82
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +50 -82
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +50 -82
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +50 -82
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/card/index.js +7 -35
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +7 -35
- package/dist/card/index.mjs.map +1 -1
- package/dist/carousel/index.js +15 -27
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +15 -27
- package/dist/carousel/index.mjs.map +1 -1
- package/dist/checkbox/index.js +2 -13
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs +2 -13
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chip/index.js +2 -16
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/index.mjs +2 -16
- package/dist/chip/index.mjs.map +1 -1
- package/dist/{chunk-WUMDFBEK.mjs → chunk-3CHFVHTW.mjs} +43 -54
- package/dist/{chunk-GBLWUEYN.mjs → chunk-5CD5WZIQ.mjs} +176 -256
- package/dist/{chunk-2LUXOXAL.mjs → chunk-5SQBJRWE.mjs} +3 -9
- package/dist/{chunk-C2UOOH4X.mjs → chunk-B53SP2WZ.mjs} +3 -17
- package/dist/chunk-GHGWQVTM.mjs +150 -0
- package/dist/{chunk-5S5DR7KF.mjs → chunk-I23ONEDJ.mjs} +2 -10
- package/dist/{chunk-JFWD2ICY.mjs → chunk-JT7R3L5O.mjs} +54 -62
- package/dist/{chunk-6SJUUJOV.mjs → chunk-KDGJZPWK.mjs} +295 -574
- package/dist/{chunk-AWJSHOYU.mjs → chunk-KSJGXQTE.mjs} +1 -1
- package/dist/{chunk-NMW4GM4G.mjs → chunk-SE2JMXYG.mjs} +104 -144
- package/dist/{chunk-IFWYR5W2.mjs → chunk-VUELRPUL.mjs} +57 -117
- package/dist/{chunk-WL7C2A5D.mjs → chunk-WQR4XZGL.mjs} +8 -15
- package/dist/codeBlock/index.js +50 -82
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +50 -82
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/colorPicker/index.js +21 -33
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs +22 -37
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.d.mts +1 -1
- package/dist/combobox/index.d.ts +1 -1
- package/dist/combobox/index.js +141 -223
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +141 -223
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.d.mts +1 -1
- package/dist/command/index.d.ts +1 -1
- package/dist/command/index.js +129 -212
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +129 -212
- package/dist/command/index.mjs.map +1 -1
- package/dist/dataTable/index.js +254 -394
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +254 -394
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.js +64 -105
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +64 -105
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/destroyableCard/index.js +8 -39
- package/dist/destroyableCard/index.js.map +1 -1
- package/dist/destroyableCard/index.mjs +8 -39
- package/dist/destroyableCard/index.mjs.map +1 -1
- package/dist/dialog/index.js +70 -122
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +70 -122
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +169 -358
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +169 -358
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/docsSidebar/index.js +9 -16
- package/dist/docsSidebar/index.js.map +1 -1
- package/dist/docsSidebar/index.mjs +9 -16
- package/dist/docsSidebar/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.js +124 -164
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +124 -164
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +3 -3
- package/dist/elements/index.d.ts +3 -3
- package/dist/elements/index.js +841 -1505
- package/dist/elements/index.mjs +381 -718
- package/dist/fileDropzone/index.js +60 -159
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +60 -159
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/glow/index.js +4 -16
- package/dist/glow/index.js.map +1 -1
- package/dist/glow/index.mjs +4 -16
- package/dist/glow/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -5
- package/dist/hooks/index.d.ts +1 -5
- package/dist/hooks/index.js +11 -24
- package/dist/hooks/index.mjs +2 -2
- package/dist/{index-B0aJcA6d.d.ts → index-BgNycocQ.d.mts} +2 -2
- package/dist/{index-B0aJcA6d.d.mts → index-BgNycocQ.d.ts} +2 -2
- package/dist/index.css +1 -2
- package/dist/index.d.mts +7 -9
- package/dist/index.d.ts +7 -9
- package/dist/index.js +1196 -2172
- package/dist/index.mjs +1197 -2176
- package/dist/input/index.js +20 -29
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +20 -29
- package/dist/input/index.mjs.map +1 -1
- package/dist/interfaceSettings/index.js +122 -163
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +122 -163
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/label/index.js +19 -26
- package/dist/label/index.js.map +1 -1
- package/dist/label/index.mjs +19 -26
- package/dist/label/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +2 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +434 -790
- package/dist/layout/index.mjs +143 -243
- package/dist/loading/index.js +30 -53
- package/dist/loading/index.js.map +1 -1
- package/dist/loading/index.mjs +30 -53
- package/dist/loading/index.mjs.map +1 -1
- package/dist/logos/index.js +66 -191
- package/dist/logos/index.js.map +1 -1
- package/dist/logos/index.mjs +66 -191
- package/dist/logos/index.mjs.map +1 -1
- package/dist/navbar/index.js +1 -4
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +1 -4
- package/dist/navbar/index.mjs.map +1 -1
- package/dist/navigationMenu/index.js +14 -22
- package/dist/navigationMenu/index.js.map +1 -1
- package/dist/navigationMenu/index.mjs +14 -22
- package/dist/navigationMenu/index.mjs.map +1 -1
- package/dist/pagination/index.js +1 -5
- package/dist/pagination/index.js.map +1 -1
- package/dist/pagination/index.mjs +1 -5
- package/dist/pagination/index.mjs.map +1 -1
- package/dist/passwordInput/index.js +36 -65
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +36 -65
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +20 -29
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +20 -29
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +14 -16
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +14 -16
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/popover/index.js +14 -24
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +14 -24
- package/dist/popover/index.mjs.map +1 -1
- package/dist/progress/index.js +19 -26
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/index.mjs +19 -26
- package/dist/progress/index.mjs.map +1 -1
- package/dist/progressCircle/index.js +67 -71
- package/dist/progressCircle/index.js.map +1 -1
- package/dist/progressCircle/index.mjs +67 -71
- package/dist/progressCircle/index.mjs.map +1 -1
- package/dist/radio/index.js +122 -163
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +122 -163
- package/dist/radio/index.mjs.map +1 -1
- package/dist/scrollArea/index.js.map +1 -1
- package/dist/scrollArea/index.mjs.map +1 -1
- package/dist/scrollIndicator/index.js +1 -4
- package/dist/scrollIndicator/index.js.map +1 -1
- package/dist/scrollIndicator/index.mjs +1 -4
- package/dist/scrollIndicator/index.mjs.map +1 -1
- package/dist/select/index.js +20 -29
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +20 -29
- package/dist/select/index.mjs.map +1 -1
- package/dist/separator/index.js.map +1 -1
- package/dist/separator/index.mjs.map +1 -1
- package/dist/sheet/index.js +42 -53
- package/dist/sheet/index.js.map +1 -1
- package/dist/sheet/index.mjs +42 -53
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/sidebar/index.js +66 -133
- package/dist/sidebar/index.js.map +1 -1
- package/dist/sidebar/index.mjs +66 -133
- package/dist/sidebar/index.mjs.map +1 -1
- package/dist/signature/index.js +19 -26
- package/dist/signature/index.js.map +1 -1
- package/dist/signature/index.mjs +19 -26
- package/dist/signature/index.mjs.map +1 -1
- package/dist/simpleTable/index.js +50 -81
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs +50 -81
- package/dist/simpleTable/index.mjs.map +1 -1
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs.map +1 -1
- package/dist/slider/index.js.map +1 -1
- package/dist/slider/index.mjs.map +1 -1
- package/dist/sonner/index.js.map +1 -1
- package/dist/sonner/index.mjs.map +1 -1
- package/dist/sortButton/index.js +50 -82
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +50 -82
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.js +214 -294
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +214 -294
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/stats/index.js +7 -35
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs +7 -35
- package/dist/stats/index.mjs.map +1 -1
- package/dist/switch/index.js +24 -34
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/index.mjs +24 -34
- package/dist/switch/index.mjs.map +1 -1
- package/dist/table/index.js +27 -29
- package/dist/table/index.js.map +1 -1
- package/dist/table/index.mjs +27 -29
- package/dist/table/index.mjs.map +1 -1
- package/dist/tabs/index.js +54 -76
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +54 -76
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.js +21 -38
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +21 -38
- package/dist/textarea/index.mjs.map +1 -1
- package/dist/toast/index.js +2 -10
- package/dist/toast/index.js.map +1 -1
- package/dist/toast/index.mjs +2 -10
- package/dist/toast/index.mjs.map +1 -1
- package/dist/toaster/index.js +3 -16
- package/dist/toaster/index.js.map +1 -1
- package/dist/toaster/index.mjs +3 -16
- package/dist/toaster/index.mjs.map +1 -1
- package/dist/tooltip/index.js +19 -26
- package/dist/tooltip/index.js.map +1 -1
- package/dist/tooltip/index.mjs +19 -26
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +15 -15
- package/dist/chunk-JP2N5WKD.mjs +0 -190
@@ -3,26 +3,24 @@ import {
|
|
3
3
|
HelperText,
|
4
4
|
Label,
|
5
5
|
cn
|
6
|
-
} from "./chunk-
|
6
|
+
} from "./chunk-VUELRPUL.mjs";
|
7
7
|
|
8
8
|
// elements/popover/Popover.tsx
|
9
9
|
import * as React from "react";
|
10
10
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
11
|
-
var PopoverContent = React.forwardRef(
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
))
|
25
|
-
);
|
11
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React.createElement(
|
12
|
+
PopoverPrimitive.Content,
|
13
|
+
{
|
14
|
+
ref,
|
15
|
+
align,
|
16
|
+
sideOffset,
|
17
|
+
className: cn(
|
18
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-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",
|
19
|
+
className
|
20
|
+
),
|
21
|
+
...props
|
22
|
+
}
|
23
|
+
)));
|
26
24
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
27
25
|
var Popover = ({
|
28
26
|
trigger,
|
@@ -42,15 +40,7 @@ var Popover = ({
|
|
42
40
|
trigger: "var(--radix-popover-trigger-width)",
|
43
41
|
default: "auto"
|
44
42
|
};
|
45
|
-
return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(
|
46
|
-
PopoverPrimitive.Trigger,
|
47
|
-
{
|
48
|
-
className: "hawa-w-full",
|
49
|
-
disabled: disableTrigger,
|
50
|
-
...triggerProps
|
51
|
-
},
|
52
|
-
trigger
|
53
|
-
), /* @__PURE__ */ React.createElement(
|
43
|
+
return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(PopoverPrimitive.Trigger, { className: "hawa-w-full", disabled: disableTrigger, ...triggerProps }, trigger), /* @__PURE__ */ React.createElement(
|
54
44
|
PopoverContent,
|
55
45
|
{
|
56
46
|
side,
|
@@ -106,12 +96,8 @@ var Radio = forwardRef2(
|
|
106
96
|
default: "hawa-max-w-fit",
|
107
97
|
full: "hawa-w-full"
|
108
98
|
};
|
109
|
-
const [parentDirection, setParentDirection] = React2.useState(
|
110
|
-
|
111
|
-
);
|
112
|
-
const [selectedOption, setSelectedOption] = useState(
|
113
|
-
props.defaultValue || props.value
|
114
|
-
);
|
99
|
+
const [parentDirection, setParentDirection] = React2.useState(null);
|
100
|
+
const [selectedOption, setSelectedOption] = useState(props.defaultValue || props.value);
|
115
101
|
const [openTooltip, setOpenTooltip] = useState(null);
|
116
102
|
const parentRef = useRef(null);
|
117
103
|
useEffect(() => {
|
@@ -140,89 +126,78 @@ var Radio = forwardRef2(
|
|
140
126
|
];
|
141
127
|
switch (design) {
|
142
128
|
case "tabs":
|
143
|
-
return /* @__PURE__ */ React2.createElement(
|
144
|
-
|
129
|
+
return /* @__PURE__ */ React2.createElement("div", { className: cn("hawa-gap-2 hawa-flex hawa-flex-col", containerClassNames == null ? void 0 : containerClassNames.tabs) }, props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React2.createElement(Tabs, null, /* @__PURE__ */ React2.createElement(
|
130
|
+
TabsList,
|
145
131
|
{
|
132
|
+
role: "tablist",
|
133
|
+
ref: parentRef,
|
146
134
|
className: cn(
|
147
|
-
"hawa-
|
148
|
-
|
135
|
+
props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
|
136
|
+
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
|
137
|
+
orientationStyle[orientation],
|
138
|
+
widthStyle[width],
|
139
|
+
tabsContainerClassName,
|
140
|
+
props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
|
149
141
|
)
|
150
142
|
},
|
151
|
-
props.
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
widthStyle[width],
|
162
|
-
tabsContainerClassName,
|
163
|
-
props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
|
164
|
-
)
|
165
|
-
},
|
166
|
-
(_b = props.options) == null ? void 0 : _b.map((opt, o) => {
|
167
|
-
return opt.tooltip ? /* @__PURE__ */ React2.createElement(
|
168
|
-
PopoverRoot,
|
143
|
+
(_b = props.options) == null ? void 0 : _b.map((opt, o) => {
|
144
|
+
return opt.tooltip ? /* @__PURE__ */ React2.createElement(
|
145
|
+
PopoverRoot,
|
146
|
+
{
|
147
|
+
key: o,
|
148
|
+
open: o === openTooltip,
|
149
|
+
onOpenChange: (bool) => setOpenTooltip(bool ? o : null)
|
150
|
+
},
|
151
|
+
/* @__PURE__ */ React2.createElement(
|
152
|
+
PopoverTrigger,
|
169
153
|
{
|
170
|
-
|
171
|
-
|
172
|
-
|
154
|
+
onMouseEnter: () => setOpenTooltip(o),
|
155
|
+
onMouseLeave: () => setOpenTooltip(null),
|
156
|
+
asChild: true
|
173
157
|
},
|
174
158
|
/* @__PURE__ */ React2.createElement(
|
175
|
-
|
159
|
+
TabsTrigger,
|
176
160
|
{
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
"aria-current": selectedOption === opt.value ? "page" : void 0,
|
185
|
-
value: opt.value,
|
186
|
-
role: "tab",
|
187
|
-
tabIndex: 0,
|
188
|
-
onClick: () => {
|
189
|
-
if (props.disabled || opt.disabled) return;
|
190
|
-
handleChange(opt);
|
191
|
-
},
|
192
|
-
className: cn(
|
193
|
-
...radio_option_tabs_styling,
|
194
|
-
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
195
|
-
)
|
161
|
+
"aria-current": selectedOption === opt.value ? "page" : void 0,
|
162
|
+
value: opt.value,
|
163
|
+
role: "tab",
|
164
|
+
tabIndex: 0,
|
165
|
+
onClick: () => {
|
166
|
+
if (props.disabled || opt.disabled) return;
|
167
|
+
handleChange(opt);
|
196
168
|
},
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
/* @__PURE__ */ React2.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
|
202
|
-
) : /* @__PURE__ */ React2.createElement(
|
203
|
-
TabsTrigger,
|
204
|
-
{
|
205
|
-
key: o,
|
206
|
-
role: "tab",
|
207
|
-
tabIndex: 0,
|
208
|
-
"aria-current": selectedOption === opt.value ? "page" : void 0,
|
209
|
-
onClick: () => {
|
210
|
-
if (props.disabled || opt.disabled) return;
|
211
|
-
handleChange(opt);
|
169
|
+
className: cn(
|
170
|
+
...radio_option_tabs_styling,
|
171
|
+
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
172
|
+
)
|
212
173
|
},
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
174
|
+
opt.icon && opt.icon,
|
175
|
+
opt.label
|
176
|
+
)
|
177
|
+
),
|
178
|
+
/* @__PURE__ */ React2.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip)
|
179
|
+
) : /* @__PURE__ */ React2.createElement(
|
180
|
+
TabsTrigger,
|
181
|
+
{
|
182
|
+
key: o,
|
183
|
+
role: "tab",
|
184
|
+
tabIndex: 0,
|
185
|
+
"aria-current": selectedOption === opt.value ? "page" : void 0,
|
186
|
+
onClick: () => {
|
187
|
+
if (props.disabled || opt.disabled) return;
|
188
|
+
handleChange(opt);
|
218
189
|
},
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
190
|
+
className: cn(
|
191
|
+
...radio_option_tabs_styling,
|
192
|
+
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
193
|
+
),
|
194
|
+
value: opt.value
|
195
|
+
},
|
196
|
+
opt.icon && opt.icon,
|
197
|
+
opt.label
|
198
|
+
);
|
199
|
+
})
|
200
|
+
)), !forceHideHelperText && /* @__PURE__ */ React2.createElement(HelperText, { helperText: props.helperText }));
|
226
201
|
case "bordered":
|
227
202
|
return /* @__PURE__ */ React2.createElement(
|
228
203
|
"div",
|
@@ -270,11 +245,7 @@ var Radio = forwardRef2(
|
|
270
245
|
return /* @__PURE__ */ React2.createElement(
|
271
246
|
"ul",
|
272
247
|
{
|
273
|
-
className: cn(
|
274
|
-
orientationStyle[orientation],
|
275
|
-
"hawa-gap-4",
|
276
|
-
containerClassNames == null ? void 0 : containerClassNames.cards
|
277
|
-
)
|
248
|
+
className: cn(orientationStyle[orientation], "hawa-gap-4", containerClassNames == null ? void 0 : containerClassNames.cards)
|
278
249
|
},
|
279
250
|
(_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React2.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React2.createElement(
|
280
251
|
"input",
|
@@ -300,49 +271,38 @@ var Radio = forwardRef2(
|
|
300
271
|
)))
|
301
272
|
);
|
302
273
|
default:
|
303
|
-
return /* @__PURE__ */ React2.createElement(
|
274
|
+
return /* @__PURE__ */ React2.createElement("div", { className: cn("hawa-flex hawa-flex-col hawa-gap-2", containerClassNames == null ? void 0 : containerClassNames.default) }, props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React2.createElement("div", { className: cn(orientationStyle[orientation], "hawa-gap-2") }, props.options && props.options.map((opt, i) => /* @__PURE__ */ React2.createElement(
|
304
275
|
"div",
|
305
276
|
{
|
306
277
|
className: cn(
|
307
|
-
"hawa-flex hawa-
|
308
|
-
|
309
|
-
)
|
278
|
+
"radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all",
|
279
|
+
props.direction === "rtl" ? "margin-left right-3px" : "margin-right left-3px"
|
280
|
+
),
|
281
|
+
key: i + 1
|
310
282
|
},
|
311
|
-
|
312
|
-
|
313
|
-
|
283
|
+
/* @__PURE__ */ React2.createElement(
|
284
|
+
"input",
|
285
|
+
{
|
286
|
+
disabled: opt.disabled,
|
287
|
+
id: opt.value.toString(),
|
288
|
+
type: "radio",
|
289
|
+
value: opt.value,
|
290
|
+
name,
|
291
|
+
onChange: () => handleChange(opt)
|
292
|
+
}
|
293
|
+
),
|
294
|
+
/* @__PURE__ */ React2.createElement(
|
295
|
+
"label",
|
314
296
|
{
|
297
|
+
htmlFor: opt.value.toString(),
|
315
298
|
className: cn(
|
316
|
-
"
|
317
|
-
|
318
|
-
)
|
319
|
-
key: i + 1
|
299
|
+
"hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
300
|
+
opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
|
301
|
+
)
|
320
302
|
},
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
disabled: opt.disabled,
|
325
|
-
id: opt.value.toString(),
|
326
|
-
type: "radio",
|
327
|
-
value: opt.value,
|
328
|
-
name,
|
329
|
-
onChange: () => handleChange(opt)
|
330
|
-
}
|
331
|
-
),
|
332
|
-
/* @__PURE__ */ React2.createElement(
|
333
|
-
"label",
|
334
|
-
{
|
335
|
-
htmlFor: opt.value.toString(),
|
336
|
-
className: cn(
|
337
|
-
"hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
338
|
-
opt.disabled ? "hawa-text-gray-400" : "hawa-cursor-pointer hawa-text-gray-900"
|
339
|
-
)
|
340
|
-
},
|
341
|
-
opt.label
|
342
|
-
)
|
343
|
-
))),
|
344
|
-
/* @__PURE__ */ React2.createElement(HelperText, { helperText: props.helperText })
|
345
|
-
);
|
303
|
+
opt.label
|
304
|
+
)
|
305
|
+
))), /* @__PURE__ */ React2.createElement(HelperText, { helperText: props.helperText }));
|
346
306
|
}
|
347
307
|
}
|
348
308
|
);
|
@@ -44,38 +44,31 @@ var Tooltip = ({
|
|
44
44
|
delayDuration = 300,
|
45
45
|
...props
|
46
46
|
}) => {
|
47
|
-
return /* @__PURE__ */ React.createElement(
|
48
|
-
TooltipPrimitive.
|
47
|
+
return /* @__PURE__ */ React.createElement(TooltipPrimitive.TooltipProvider, { delayDuration, ...providerProps }, /* @__PURE__ */ React.createElement(
|
48
|
+
TooltipPrimitive.Root,
|
49
49
|
{
|
50
|
-
|
51
|
-
|
50
|
+
open: !disabled && open,
|
51
|
+
defaultOpen,
|
52
|
+
onOpenChange,
|
53
|
+
...props
|
52
54
|
},
|
55
|
+
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
53
56
|
/* @__PURE__ */ React.createElement(
|
54
|
-
|
57
|
+
TooltipContent,
|
55
58
|
{
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
...
|
59
|
+
size,
|
60
|
+
side,
|
61
|
+
align: "center",
|
62
|
+
...contentProps,
|
63
|
+
style: {
|
64
|
+
...contentProps == null ? void 0 : contentProps.style,
|
65
|
+
maxWidth: "var(--radix-tooltip-content-available-width)",
|
66
|
+
maxHeight: "var(--radix-tooltip-content-available-height)"
|
67
|
+
}
|
60
68
|
},
|
61
|
-
|
62
|
-
/* @__PURE__ */ React.createElement(
|
63
|
-
TooltipContent,
|
64
|
-
{
|
65
|
-
size,
|
66
|
-
side,
|
67
|
-
align: "center",
|
68
|
-
...contentProps,
|
69
|
-
style: {
|
70
|
-
...contentProps == null ? void 0 : contentProps.style,
|
71
|
-
maxWidth: "var(--radix-tooltip-content-available-width)",
|
72
|
-
maxHeight: "var(--radix-tooltip-content-available-height)"
|
73
|
-
}
|
74
|
-
},
|
75
|
-
content
|
76
|
-
)
|
69
|
+
content
|
77
70
|
)
|
78
|
-
);
|
71
|
+
));
|
79
72
|
};
|
80
73
|
|
81
74
|
// elements/loading/Loading.tsx
|
@@ -110,57 +103,42 @@ var Loading = ({
|
|
110
103
|
};
|
111
104
|
switch (design.split("-")[0]) {
|
112
105
|
case "dots":
|
113
|
-
return /* @__PURE__ */ React2.createElement(
|
106
|
+
return /* @__PURE__ */ React2.createElement("div", { className: cn("hawa-flex hawa-flex-row hawa-gap-2", classNames == null ? void 0 : classNames.container) }, /* @__PURE__ */ React2.createElement(
|
114
107
|
"div",
|
115
108
|
{
|
116
109
|
className: cn(
|
117
|
-
"hawa-
|
118
|
-
|
110
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite",
|
111
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
112
|
+
animationStyles[design.split("-")[1]],
|
113
|
+
color ? color : "hawa-bg-primary"
|
119
114
|
)
|
120
|
-
}
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
),
|
143
|
-
/* @__PURE__ */ React2.createElement(
|
144
|
-
"div",
|
145
|
-
{
|
146
|
-
className: cn(
|
147
|
-
"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
|
148
|
-
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
149
|
-
animationStyles[design.split("-")[1]],
|
150
|
-
color ? color : "hawa-bg-primary"
|
151
|
-
)
|
152
|
-
}
|
153
|
-
)
|
154
|
-
);
|
115
|
+
}
|
116
|
+
), /* @__PURE__ */ React2.createElement(
|
117
|
+
"div",
|
118
|
+
{
|
119
|
+
className: cn(
|
120
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite",
|
121
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
122
|
+
animationStyles[design.split("-")[1]],
|
123
|
+
color ? color : "hawa-bg-primary"
|
124
|
+
)
|
125
|
+
}
|
126
|
+
), /* @__PURE__ */ React2.createElement(
|
127
|
+
"div",
|
128
|
+
{
|
129
|
+
className: cn(
|
130
|
+
"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite",
|
131
|
+
size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size],
|
132
|
+
animationStyles[design.split("-")[1]],
|
133
|
+
color ? color : "hawa-bg-primary"
|
134
|
+
)
|
135
|
+
}
|
136
|
+
));
|
155
137
|
case "square":
|
156
138
|
return /* @__PURE__ */ React2.createElement(
|
157
139
|
"svg",
|
158
140
|
{
|
159
|
-
className: cn(
|
160
|
-
"squircle-container",
|
161
|
-
sizeStyles[size],
|
162
|
-
classNames == null ? void 0 : classNames.container
|
163
|
-
),
|
141
|
+
className: cn("squircle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container),
|
164
142
|
viewBox: "0 0 35 35",
|
165
143
|
height: "35",
|
166
144
|
width: "35"
|
@@ -201,11 +179,7 @@ var Loading = ({
|
|
201
179
|
height: "37",
|
202
180
|
width: "37",
|
203
181
|
preserveAspectRatio: "xMidYMid meet",
|
204
|
-
className: cn(
|
205
|
-
"squircle-container",
|
206
|
-
sizeStyles[size],
|
207
|
-
classNames == null ? void 0 : classNames.container
|
208
|
-
)
|
182
|
+
className: cn("squircle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container)
|
209
183
|
},
|
210
184
|
/* @__PURE__ */ React2.createElement(
|
211
185
|
"path",
|
@@ -248,11 +222,7 @@ var Loading = ({
|
|
248
222
|
viewBox: "0 0 40 40",
|
249
223
|
height: "40",
|
250
224
|
width: "40",
|
251
|
-
className: cn(
|
252
|
-
"circle-container",
|
253
|
-
sizeStyles[size],
|
254
|
-
classNames == null ? void 0 : classNames.container
|
255
|
-
)
|
225
|
+
className: cn("circle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container)
|
256
226
|
},
|
257
227
|
/* @__PURE__ */ React2.createElement(
|
258
228
|
"circle",
|
@@ -302,9 +272,7 @@ import { cva } from "class-variance-authority";
|
|
302
272
|
|
303
273
|
// elements/helperText/HelperText.tsx
|
304
274
|
import React3 from "react";
|
305
|
-
var HelperText = ({
|
306
|
-
helperText
|
307
|
-
}) => /* @__PURE__ */ React3.createElement(
|
275
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ React3.createElement(
|
308
276
|
"p",
|
309
277
|
{
|
310
278
|
className: cn(
|
@@ -456,13 +424,7 @@ Button.displayName = "Button";
|
|
456
424
|
// elements/card/Card.tsx
|
457
425
|
import * as React6 from "react";
|
458
426
|
var Card = React6.forwardRef(
|
459
|
-
({
|
460
|
-
className,
|
461
|
-
variant = "default",
|
462
|
-
clickable = false,
|
463
|
-
asContainer = false,
|
464
|
-
...props
|
465
|
-
}, ref) => {
|
427
|
+
({ className, variant = "default", clickable = false, asContainer = false, ...props }, ref) => {
|
466
428
|
let variantStyles = {
|
467
429
|
default: cn(
|
468
430
|
"hawa-rounded hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
|
@@ -474,14 +436,7 @@ var Card = React6.forwardRef(
|
|
474
436
|
clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
|
475
437
|
)
|
476
438
|
};
|
477
|
-
return /* @__PURE__ */ React6.createElement(
|
478
|
-
"div",
|
479
|
-
{
|
480
|
-
ref,
|
481
|
-
className: cn(!asContainer && variantStyles[variant], className),
|
482
|
-
...props
|
483
|
-
}
|
484
|
-
);
|
439
|
+
return /* @__PURE__ */ React6.createElement("div", { ref, className: cn(!asContainer && variantStyles[variant], className), ...props });
|
485
440
|
}
|
486
441
|
);
|
487
442
|
var CardHeader = React6.forwardRef(
|
@@ -489,30 +444,15 @@ var CardHeader = React6.forwardRef(
|
|
489
444
|
"div",
|
490
445
|
{
|
491
446
|
ref,
|
492
|
-
className: cn(
|
493
|
-
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
|
494
|
-
className
|
495
|
-
),
|
447
|
+
className: cn("hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6", className),
|
496
448
|
...props
|
497
449
|
}
|
498
450
|
), props.actions && /* @__PURE__ */ React6.createElement("div", { className: "hawa-p-6" }, props.actions))
|
499
451
|
);
|
500
|
-
var CardTitle = React6.forwardRef(
|
501
|
-
"h3",
|
502
|
-
|
503
|
-
|
504
|
-
className: cn("hawa-text-2xl hawa-font-semibold", className),
|
505
|
-
...props
|
506
|
-
}
|
507
|
-
));
|
508
|
-
var CardDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
509
|
-
"p",
|
510
|
-
{
|
511
|
-
ref,
|
512
|
-
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
513
|
-
...props
|
514
|
-
}
|
515
|
-
));
|
452
|
+
var CardTitle = React6.forwardRef(
|
453
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement("h3", { ref, className: cn("hawa-text-2xl hawa-font-semibold", className), ...props })
|
454
|
+
);
|
455
|
+
var CardDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React6.createElement("p", { ref, className: cn("hawa-text-sm hawa-text-muted-foreground", className), ...props }));
|
516
456
|
var CardContent = React6.forwardRef(
|
517
457
|
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React6.createElement(
|
518
458
|
"div",
|
@@ -40,9 +40,7 @@ var reducer = (state, action) => {
|
|
40
40
|
case "UPDATE_TOAST":
|
41
41
|
return {
|
42
42
|
...state,
|
43
|
-
toasts: state.toasts.map(
|
44
|
-
(t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
|
45
|
-
)
|
43
|
+
toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t)
|
46
44
|
};
|
47
45
|
case "DISMISS_TOAST": {
|
48
46
|
const { toastId } = action;
|
@@ -319,10 +317,7 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
319
317
|
if ("matchMedia" in window) {
|
320
318
|
queryRef.current = window.matchMedia(query);
|
321
319
|
setMatches(queryRef.current.matches);
|
322
|
-
return attachMediaListener(
|
323
|
-
queryRef.current,
|
324
|
-
(event) => setMatches(event.matches)
|
325
|
-
);
|
320
|
+
return attachMediaListener(queryRef.current, (event) => setMatches(event.matches));
|
326
321
|
}
|
327
322
|
return void 0;
|
328
323
|
}, [query]);
|
@@ -466,16 +461,14 @@ function shouldFireEvent(event, tagsToIgnore, triggerOnContentEditable = false)
|
|
466
461
|
function useShortcuts(hotkeys, tagsToIgnore = ["INPUT", "TEXTAREA", "SELECT"], triggerOnContentEditable = false) {
|
467
462
|
useEffect13(() => {
|
468
463
|
const keydownListener = (event) => {
|
469
|
-
hotkeys.forEach(
|
470
|
-
(
|
471
|
-
if (
|
472
|
-
|
473
|
-
event.preventDefault();
|
474
|
-
}
|
475
|
-
handler(event);
|
464
|
+
hotkeys.forEach(([hotkey, handler, options = { preventDefault: true }]) => {
|
465
|
+
if (getHotkeyMatcher(hotkey)(event) && shouldFireEvent(event, tagsToIgnore, triggerOnContentEditable)) {
|
466
|
+
if (options.preventDefault) {
|
467
|
+
event.preventDefault();
|
476
468
|
}
|
469
|
+
handler(event);
|
477
470
|
}
|
478
|
-
);
|
471
|
+
});
|
479
472
|
};
|
480
473
|
document.documentElement.addEventListener("keydown", keydownListener);
|
481
474
|
return () => document.documentElement.removeEventListener("keydown", keydownListener);
|