@sikka/hawa 0.48.0-next → 0.49.0-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 -0
- package/dist/blocks/auth/index.d.ts +1 -0
- package/dist/blocks/auth/index.js +539 -792
- package/dist/blocks/auth/index.mjs +433 -604
- package/dist/blocks/feedback/index.js +214 -375
- package/dist/blocks/feedback/index.mjs +12 -25
- package/dist/blocks/index.d.mts +1 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/index.js +940 -1445
- package/dist/blocks/index.mjs +469 -615
- 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-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-GBLWUEYN.mjs → chunk-ULRL4WI6.mjs} +176 -256
- 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 -6
- package/dist/index.d.mts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +1549 -2512
- package/dist/index.mjs +1550 -2516
- 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 +12 -12
- 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
|
);
|