@sikka/hawa 0.24.8-next → 0.24.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/{Radio-2ZwcMDWt.d.ts → Radio-K1WGpnGA.d.ts} +2 -1
- package/dist/{Radio-5ZANA8Vh.d.mts → Radio-hsrLKNxE.d.mts} +2 -1
- package/dist/blocks/auth/index.js +6 -6
- package/dist/blocks/auth/index.mjs +6 -6
- package/dist/blocks/feedback/index.js +20 -23
- package/dist/blocks/feedback/index.mjs +2 -2
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +30 -33
- package/dist/blocks/index.mjs +6 -6
- package/dist/blocks/pricing/index.js +23 -26
- package/dist/blocks/pricing/index.mjs +5 -5
- package/dist/checkbox/index.js +6 -6
- package/dist/checkbox/index.mjs +6 -6
- package/dist/{chunk-OT7WQYPD.mjs → chunk-N26RJDIG.mjs} +19 -22
- package/dist/{chunk-O4FANSN5.mjs → chunk-XOEHA3H6.mjs} +25 -28
- package/dist/elements/index.d.mts +2 -2
- package/dist/elements/index.d.ts +2 -2
- package/dist/elements/index.js +27 -30
- package/dist/elements/index.mjs +3 -3
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +32 -35
- package/dist/index.mjs +32 -35
- package/dist/interfaceSettings/index.js +21 -24
- package/dist/interfaceSettings/index.mjs +21 -24
- package/dist/radio/index.d.mts +2 -1
- package/dist/radio/index.d.ts +2 -1
- package/dist/radio/index.js +19 -22
- package/dist/radio/index.mjs +19 -22
- package/package.json +1 -1
package/dist/checkbox/index.js
CHANGED
@@ -59,7 +59,7 @@ var Checkbox = ({
|
|
59
59
|
let labelLineHeightStyles = {
|
60
60
|
xs: sublabel || helperText ? 0.5 : 0.1,
|
61
61
|
sm: 0.6,
|
62
|
-
default:
|
62
|
+
default: 1,
|
63
63
|
md: 0.8,
|
64
64
|
lg: 0.9,
|
65
65
|
xl: 1
|
@@ -69,8 +69,7 @@ var Checkbox = ({
|
|
69
69
|
{
|
70
70
|
className: cn(
|
71
71
|
"hawa-flex hawa-gap-2",
|
72
|
-
"hawa-items-top"
|
73
|
-
sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
|
72
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
74
73
|
)
|
75
74
|
},
|
76
75
|
/* @__PURE__ */ React.createElement(
|
@@ -83,16 +82,17 @@ var Checkbox = ({
|
|
83
82
|
id
|
84
83
|
}
|
85
84
|
),
|
86
|
-
(label || helperText) && /* @__PURE__ */ React.createElement("div", { className: "hawa-grid hawa-gap-1.5
|
85
|
+
(label || helperText) && /* @__PURE__ */ React.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React.createElement(
|
87
86
|
"label",
|
88
87
|
{
|
89
88
|
htmlFor: id,
|
90
89
|
className: cn(
|
91
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium
|
90
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
92
91
|
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
93
92
|
),
|
94
93
|
style: {
|
95
|
-
lineHeight: labelLineHeightStyles[size]
|
94
|
+
// lineHeight: labelLineHeightStyles[size]
|
95
|
+
lineHeight: 1
|
96
96
|
}
|
97
97
|
},
|
98
98
|
label
|
package/dist/checkbox/index.mjs
CHANGED
@@ -18,7 +18,7 @@ var Checkbox = ({
|
|
18
18
|
let labelLineHeightStyles = {
|
19
19
|
xs: sublabel || helperText ? 0.5 : 0.1,
|
20
20
|
sm: 0.6,
|
21
|
-
default:
|
21
|
+
default: 1,
|
22
22
|
md: 0.8,
|
23
23
|
lg: 0.9,
|
24
24
|
xl: 1
|
@@ -28,8 +28,7 @@ var Checkbox = ({
|
|
28
28
|
{
|
29
29
|
className: cn(
|
30
30
|
"hawa-flex hawa-gap-2",
|
31
|
-
"hawa-items-top"
|
32
|
-
sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
|
31
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
33
32
|
)
|
34
33
|
},
|
35
34
|
/* @__PURE__ */ React.createElement(
|
@@ -42,16 +41,17 @@ var Checkbox = ({
|
|
42
41
|
id
|
43
42
|
}
|
44
43
|
),
|
45
|
-
(label || helperText) && /* @__PURE__ */ React.createElement("div", { className: "hawa-grid hawa-gap-1.5
|
44
|
+
(label || helperText) && /* @__PURE__ */ React.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React.createElement(
|
46
45
|
"label",
|
47
46
|
{
|
48
47
|
htmlFor: id,
|
49
48
|
className: cn(
|
50
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium
|
49
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
51
50
|
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
52
51
|
),
|
53
52
|
style: {
|
54
|
-
lineHeight: labelLineHeightStyles[size]
|
53
|
+
// lineHeight: labelLineHeightStyles[size]
|
54
|
+
lineHeight: 1
|
55
55
|
}
|
56
56
|
},
|
57
57
|
label
|
@@ -10,8 +10,10 @@ var Radio = ({
|
|
10
10
|
width = "default",
|
11
11
|
size = "default",
|
12
12
|
orientation = "horizontal",
|
13
|
+
name,
|
13
14
|
labelProps,
|
14
15
|
tabsContainerClassName,
|
16
|
+
onChange,
|
15
17
|
...props
|
16
18
|
}) => {
|
17
19
|
var _a, _b, _c;
|
@@ -45,6 +47,14 @@ var Radio = ({
|
|
45
47
|
setParentDirection(dir);
|
46
48
|
}
|
47
49
|
});
|
50
|
+
const handleChange = (opt) => {
|
51
|
+
setSelectedOption(opt.value);
|
52
|
+
if (onChange) {
|
53
|
+
onChange(opt.value);
|
54
|
+
} else {
|
55
|
+
console.log("onChange was not provided");
|
56
|
+
}
|
57
|
+
};
|
48
58
|
switch (design) {
|
49
59
|
case "tabs":
|
50
60
|
return /* @__PURE__ */ React.createElement(
|
@@ -63,14 +73,7 @@ var Radio = ({
|
|
63
73
|
"li",
|
64
74
|
{
|
65
75
|
"aria-current": "page",
|
66
|
-
onClick: () =>
|
67
|
-
setSelectedOption(opt.value);
|
68
|
-
if (props.onChangeTab) {
|
69
|
-
props.onChangeTab(opt);
|
70
|
-
} else {
|
71
|
-
console.log("onChangeTab was not provided");
|
72
|
-
}
|
73
|
-
},
|
76
|
+
onClick: () => handleChange(opt),
|
74
77
|
className: cn(
|
75
78
|
"hawa-w-full hawa-cursor-pointer ",
|
76
79
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
@@ -91,7 +94,7 @@ var Radio = ({
|
|
91
94
|
"div",
|
92
95
|
{
|
93
96
|
key: i,
|
94
|
-
className: "hawa-rounded hawa-border hawa-border-gray-200
|
97
|
+
className: "hawa-w-full hawa-rounded hawa-border hawa-border-gray-200"
|
95
98
|
},
|
96
99
|
/* @__PURE__ */ React.createElement(
|
97
100
|
"div",
|
@@ -109,7 +112,8 @@ var Radio = ({
|
|
109
112
|
id: opt.value.toString(),
|
110
113
|
type: "radio",
|
111
114
|
value: opt.value,
|
112
|
-
name
|
115
|
+
name,
|
116
|
+
onChange: () => handleChange(opt)
|
113
117
|
}
|
114
118
|
),
|
115
119
|
/* @__PURE__ */ React.createElement(
|
@@ -117,7 +121,7 @@ var Radio = ({
|
|
117
121
|
{
|
118
122
|
htmlFor: opt.value.toString(),
|
119
123
|
className: cn(
|
120
|
-
"hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3
|
124
|
+
"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
121
125
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
122
126
|
)
|
123
127
|
},
|
@@ -126,12 +130,12 @@ var Radio = ({
|
|
126
130
|
)
|
127
131
|
)));
|
128
132
|
case "cards":
|
129
|
-
return /* @__PURE__ */ React.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React.createElement("li", { key: o }, /* @__PURE__ */ React.createElement(
|
133
|
+
return /* @__PURE__ */ React.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React.createElement(
|
130
134
|
"input",
|
131
135
|
{
|
132
136
|
type: "radio",
|
133
137
|
id: opt.value.toString(),
|
134
|
-
name
|
138
|
+
name,
|
135
139
|
value: opt.value.toString(),
|
136
140
|
className: "hawa-peer hawa-hidden",
|
137
141
|
required: true,
|
@@ -165,15 +169,8 @@ var Radio = ({
|
|
165
169
|
id: opt.value.toString(),
|
166
170
|
type: "radio",
|
167
171
|
value: opt.value,
|
168
|
-
name
|
169
|
-
onChange: () =>
|
170
|
-
setSelectedOption(opt.value);
|
171
|
-
if (props.onChangeTab) {
|
172
|
-
props.onChangeTab(opt);
|
173
|
-
} else {
|
174
|
-
console.log("onChangeTab was not provided");
|
175
|
-
}
|
176
|
-
}
|
172
|
+
name,
|
173
|
+
onChange: () => handleChange(opt)
|
177
174
|
}
|
178
175
|
),
|
179
176
|
/* @__PURE__ */ React.createElement(
|
@@ -2231,7 +2231,7 @@ var Checkbox = ({
|
|
2231
2231
|
let labelLineHeightStyles = {
|
2232
2232
|
xs: sublabel || helperText ? 0.5 : 0.1,
|
2233
2233
|
sm: 0.6,
|
2234
|
-
default:
|
2234
|
+
default: 1,
|
2235
2235
|
md: 0.8,
|
2236
2236
|
lg: 0.9,
|
2237
2237
|
xl: 1
|
@@ -2241,8 +2241,7 @@ var Checkbox = ({
|
|
2241
2241
|
{
|
2242
2242
|
className: cn(
|
2243
2243
|
"hawa-flex hawa-gap-2",
|
2244
|
-
"hawa-items-top"
|
2245
|
-
sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
|
2244
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
2246
2245
|
)
|
2247
2246
|
},
|
2248
2247
|
/* @__PURE__ */ React6.createElement(
|
@@ -2255,16 +2254,17 @@ var Checkbox = ({
|
|
2255
2254
|
id
|
2256
2255
|
}
|
2257
2256
|
),
|
2258
|
-
(label || helperText) && /* @__PURE__ */ React6.createElement("div", { className: "hawa-grid hawa-gap-1.5
|
2257
|
+
(label || helperText) && /* @__PURE__ */ React6.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React6.createElement(
|
2259
2258
|
"label",
|
2260
2259
|
{
|
2261
2260
|
htmlFor: id,
|
2262
2261
|
className: cn(
|
2263
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium
|
2262
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
2264
2263
|
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
2265
2264
|
),
|
2266
2265
|
style: {
|
2267
|
-
lineHeight: labelLineHeightStyles[size]
|
2266
|
+
// lineHeight: labelLineHeightStyles[size]
|
2267
|
+
lineHeight: 1
|
2268
2268
|
}
|
2269
2269
|
},
|
2270
2270
|
label
|
@@ -2449,8 +2449,10 @@ var Radio = ({
|
|
2449
2449
|
width = "default",
|
2450
2450
|
size = "default",
|
2451
2451
|
orientation = "horizontal",
|
2452
|
+
name,
|
2452
2453
|
labelProps,
|
2453
2454
|
tabsContainerClassName,
|
2455
|
+
onChange,
|
2454
2456
|
...props
|
2455
2457
|
}) => {
|
2456
2458
|
var _a, _b, _c;
|
@@ -2484,6 +2486,14 @@ var Radio = ({
|
|
2484
2486
|
setParentDirection(dir);
|
2485
2487
|
}
|
2486
2488
|
});
|
2489
|
+
const handleChange = (opt) => {
|
2490
|
+
setSelectedOption(opt.value);
|
2491
|
+
if (onChange) {
|
2492
|
+
onChange(opt.value);
|
2493
|
+
} else {
|
2494
|
+
console.log("onChange was not provided");
|
2495
|
+
}
|
2496
|
+
};
|
2487
2497
|
switch (design) {
|
2488
2498
|
case "tabs":
|
2489
2499
|
return /* @__PURE__ */ React9.createElement(
|
@@ -2502,14 +2512,7 @@ var Radio = ({
|
|
2502
2512
|
"li",
|
2503
2513
|
{
|
2504
2514
|
"aria-current": "page",
|
2505
|
-
onClick: () =>
|
2506
|
-
setSelectedOption(opt.value);
|
2507
|
-
if (props.onChangeTab) {
|
2508
|
-
props.onChangeTab(opt);
|
2509
|
-
} else {
|
2510
|
-
console.log("onChangeTab was not provided");
|
2511
|
-
}
|
2512
|
-
},
|
2515
|
+
onClick: () => handleChange(opt),
|
2513
2516
|
className: cn(
|
2514
2517
|
"hawa-w-full hawa-cursor-pointer ",
|
2515
2518
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
@@ -2530,7 +2533,7 @@ var Radio = ({
|
|
2530
2533
|
"div",
|
2531
2534
|
{
|
2532
2535
|
key: i,
|
2533
|
-
className: "hawa-rounded hawa-border hawa-border-gray-200
|
2536
|
+
className: "hawa-w-full hawa-rounded hawa-border hawa-border-gray-200"
|
2534
2537
|
},
|
2535
2538
|
/* @__PURE__ */ React9.createElement(
|
2536
2539
|
"div",
|
@@ -2548,7 +2551,8 @@ var Radio = ({
|
|
2548
2551
|
id: opt.value.toString(),
|
2549
2552
|
type: "radio",
|
2550
2553
|
value: opt.value,
|
2551
|
-
name
|
2554
|
+
name,
|
2555
|
+
onChange: () => handleChange(opt)
|
2552
2556
|
}
|
2553
2557
|
),
|
2554
2558
|
/* @__PURE__ */ React9.createElement(
|
@@ -2556,7 +2560,7 @@ var Radio = ({
|
|
2556
2560
|
{
|
2557
2561
|
htmlFor: opt.value.toString(),
|
2558
2562
|
className: cn(
|
2559
|
-
"hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3
|
2563
|
+
"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
2560
2564
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
2561
2565
|
)
|
2562
2566
|
},
|
@@ -2565,12 +2569,12 @@ var Radio = ({
|
|
2565
2569
|
)
|
2566
2570
|
)));
|
2567
2571
|
case "cards":
|
2568
|
-
return /* @__PURE__ */ React9.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React9.createElement("li", { key: o }, /* @__PURE__ */ React9.createElement(
|
2572
|
+
return /* @__PURE__ */ React9.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React9.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ React9.createElement(
|
2569
2573
|
"input",
|
2570
2574
|
{
|
2571
2575
|
type: "radio",
|
2572
2576
|
id: opt.value.toString(),
|
2573
|
-
name
|
2577
|
+
name,
|
2574
2578
|
value: opt.value.toString(),
|
2575
2579
|
className: "hawa-peer hawa-hidden",
|
2576
2580
|
required: true,
|
@@ -2604,15 +2608,8 @@ var Radio = ({
|
|
2604
2608
|
id: opt.value.toString(),
|
2605
2609
|
type: "radio",
|
2606
2610
|
value: opt.value,
|
2607
|
-
name
|
2608
|
-
onChange: () =>
|
2609
|
-
setSelectedOption(opt.value);
|
2610
|
-
if (props.onChangeTab) {
|
2611
|
-
props.onChangeTab(opt);
|
2612
|
-
} else {
|
2613
|
-
console.log("onChangeTab was not provided");
|
2614
|
-
}
|
2615
|
-
}
|
2611
|
+
name,
|
2612
|
+
onChange: () => handleChange(opt)
|
2616
2613
|
}
|
2617
2614
|
),
|
2618
2615
|
/* @__PURE__ */ React9.createElement(
|
@@ -12,8 +12,8 @@ import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
12
12
|
import { DialogProps } from '@radix-ui/react-dialog';
|
13
13
|
import { VariantProps } from 'class-variance-authority';
|
14
14
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
15
|
-
import { L as LabelProps } from '../Radio-
|
16
|
-
export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-
|
15
|
+
import { L as LabelProps } from '../Radio-hsrLKNxE.mjs';
|
16
|
+
export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-hsrLKNxE.mjs';
|
17
17
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
18
18
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
19
19
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
package/dist/elements/index.d.ts
CHANGED
@@ -12,8 +12,8 @@ import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
12
12
|
import { DialogProps } from '@radix-ui/react-dialog';
|
13
13
|
import { VariantProps } from 'class-variance-authority';
|
14
14
|
import { RowData, ColumnDef } from '@tanstack/react-table';
|
15
|
-
import { L as LabelProps } from '../Radio-
|
16
|
-
export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-
|
15
|
+
import { L as LabelProps } from '../Radio-K1WGpnGA.js';
|
16
|
+
export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-K1WGpnGA.js';
|
17
17
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
18
18
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
19
19
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
package/dist/elements/index.js
CHANGED
@@ -2889,8 +2889,10 @@ var Radio = ({
|
|
2889
2889
|
width = "default",
|
2890
2890
|
size = "default",
|
2891
2891
|
orientation = "horizontal",
|
2892
|
+
name,
|
2892
2893
|
labelProps,
|
2893
2894
|
tabsContainerClassName,
|
2895
|
+
onChange,
|
2894
2896
|
...props
|
2895
2897
|
}) => {
|
2896
2898
|
var _a, _b, _c;
|
@@ -2924,6 +2926,14 @@ var Radio = ({
|
|
2924
2926
|
setParentDirection(dir);
|
2925
2927
|
}
|
2926
2928
|
});
|
2929
|
+
const handleChange = (opt) => {
|
2930
|
+
setSelectedOption(opt.value);
|
2931
|
+
if (onChange) {
|
2932
|
+
onChange(opt.value);
|
2933
|
+
} else {
|
2934
|
+
console.log("onChange was not provided");
|
2935
|
+
}
|
2936
|
+
};
|
2927
2937
|
switch (design) {
|
2928
2938
|
case "tabs":
|
2929
2939
|
return /* @__PURE__ */ import_react11.default.createElement(
|
@@ -2942,14 +2952,7 @@ var Radio = ({
|
|
2942
2952
|
"li",
|
2943
2953
|
{
|
2944
2954
|
"aria-current": "page",
|
2945
|
-
onClick: () =>
|
2946
|
-
setSelectedOption(opt.value);
|
2947
|
-
if (props.onChangeTab) {
|
2948
|
-
props.onChangeTab(opt);
|
2949
|
-
} else {
|
2950
|
-
console.log("onChangeTab was not provided");
|
2951
|
-
}
|
2952
|
-
},
|
2955
|
+
onClick: () => handleChange(opt),
|
2953
2956
|
className: cn(
|
2954
2957
|
"hawa-w-full hawa-cursor-pointer ",
|
2955
2958
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
@@ -2970,7 +2973,7 @@ var Radio = ({
|
|
2970
2973
|
"div",
|
2971
2974
|
{
|
2972
2975
|
key: i,
|
2973
|
-
className: "hawa-rounded hawa-border hawa-border-gray-200
|
2976
|
+
className: "hawa-w-full hawa-rounded hawa-border hawa-border-gray-200"
|
2974
2977
|
},
|
2975
2978
|
/* @__PURE__ */ import_react11.default.createElement(
|
2976
2979
|
"div",
|
@@ -2988,7 +2991,8 @@ var Radio = ({
|
|
2988
2991
|
id: opt.value.toString(),
|
2989
2992
|
type: "radio",
|
2990
2993
|
value: opt.value,
|
2991
|
-
name
|
2994
|
+
name,
|
2995
|
+
onChange: () => handleChange(opt)
|
2992
2996
|
}
|
2993
2997
|
),
|
2994
2998
|
/* @__PURE__ */ import_react11.default.createElement(
|
@@ -2996,7 +3000,7 @@ var Radio = ({
|
|
2996
3000
|
{
|
2997
3001
|
htmlFor: opt.value.toString(),
|
2998
3002
|
className: cn(
|
2999
|
-
"hawa-ml-2 hawa-w-full hawa-p-4 hawa-pl-3
|
3003
|
+
"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium dark:hawa-text-white",
|
3000
3004
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hawa-text-gray-900"
|
3001
3005
|
)
|
3002
3006
|
},
|
@@ -3005,12 +3009,12 @@ var Radio = ({
|
|
3005
3009
|
)
|
3006
3010
|
)));
|
3007
3011
|
case "cards":
|
3008
|
-
return /* @__PURE__ */ import_react11.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react11.default.createElement("li", { key: o }, /* @__PURE__ */ import_react11.default.createElement(
|
3012
|
+
return /* @__PURE__ */ import_react11.default.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ import_react11.default.createElement("li", { key: o, onClick: () => handleChange(opt) }, /* @__PURE__ */ import_react11.default.createElement(
|
3009
3013
|
"input",
|
3010
3014
|
{
|
3011
3015
|
type: "radio",
|
3012
3016
|
id: opt.value.toString(),
|
3013
|
-
name
|
3017
|
+
name,
|
3014
3018
|
value: opt.value.toString(),
|
3015
3019
|
className: "hawa-peer hawa-hidden",
|
3016
3020
|
required: true,
|
@@ -3044,15 +3048,8 @@ var Radio = ({
|
|
3044
3048
|
id: opt.value.toString(),
|
3045
3049
|
type: "radio",
|
3046
3050
|
value: opt.value,
|
3047
|
-
name
|
3048
|
-
onChange: () =>
|
3049
|
-
setSelectedOption(opt.value);
|
3050
|
-
if (props.onChangeTab) {
|
3051
|
-
props.onChangeTab(opt);
|
3052
|
-
} else {
|
3053
|
-
console.log("onChangeTab was not provided");
|
3054
|
-
}
|
3055
|
-
}
|
3051
|
+
name,
|
3052
|
+
onChange: () => handleChange(opt)
|
3056
3053
|
}
|
3057
3054
|
),
|
3058
3055
|
/* @__PURE__ */ import_react11.default.createElement(
|
@@ -4018,7 +4015,7 @@ var Checkbox = ({
|
|
4018
4015
|
let labelLineHeightStyles = {
|
4019
4016
|
xs: sublabel || helperText ? 0.5 : 0.1,
|
4020
4017
|
sm: 0.6,
|
4021
|
-
default:
|
4018
|
+
default: 1,
|
4022
4019
|
md: 0.8,
|
4023
4020
|
lg: 0.9,
|
4024
4021
|
xl: 1
|
@@ -4028,8 +4025,7 @@ var Checkbox = ({
|
|
4028
4025
|
{
|
4029
4026
|
className: cn(
|
4030
4027
|
"hawa-flex hawa-gap-2",
|
4031
|
-
"hawa-items-top"
|
4032
|
-
sublabel || helperText ? "hawa-items-top" : "hawa-items-center"
|
4028
|
+
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
4033
4029
|
)
|
4034
4030
|
},
|
4035
4031
|
/* @__PURE__ */ React34.createElement(
|
@@ -4042,16 +4038,17 @@ var Checkbox = ({
|
|
4042
4038
|
id
|
4043
4039
|
}
|
4044
4040
|
),
|
4045
|
-
(label || helperText) && /* @__PURE__ */ React34.createElement("div", { className: "hawa-grid hawa-gap-1.5
|
4041
|
+
(label || helperText) && /* @__PURE__ */ React34.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React34.createElement(
|
4046
4042
|
"label",
|
4047
4043
|
{
|
4048
4044
|
htmlFor: id,
|
4049
4045
|
className: cn(
|
4050
|
-
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium
|
4046
|
+
"hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
|
4051
4047
|
disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
|
4052
4048
|
),
|
4053
4049
|
style: {
|
4054
|
-
lineHeight: labelLineHeightStyles[size]
|
4050
|
+
// lineHeight: labelLineHeightStyles[size]
|
4051
|
+
lineHeight: 1
|
4055
4052
|
}
|
4056
4053
|
},
|
4057
4054
|
label
|
@@ -7550,7 +7547,7 @@ var InterfaceSettings = ({
|
|
7550
7547
|
{
|
7551
7548
|
width,
|
7552
7549
|
defaultValue: language,
|
7553
|
-
|
7550
|
+
onChange: (e) => {
|
7554
7551
|
if (handleLanguage) {
|
7555
7552
|
handleLanguage(e.value);
|
7556
7553
|
}
|
@@ -7567,7 +7564,7 @@ var InterfaceSettings = ({
|
|
7567
7564
|
{
|
7568
7565
|
width,
|
7569
7566
|
defaultValue: color,
|
7570
|
-
|
7567
|
+
onChange: (e) => {
|
7571
7568
|
if (handleColorMode) {
|
7572
7569
|
handleColorMode(e.value);
|
7573
7570
|
}
|
package/dist/elements/index.mjs
CHANGED
@@ -28,7 +28,7 @@ import {
|
|
28
28
|
TabsTrigger,
|
29
29
|
Textarea,
|
30
30
|
UncheckMark
|
31
|
-
} from "../chunk-
|
31
|
+
} from "../chunk-XOEHA3H6.mjs";
|
32
32
|
import {
|
33
33
|
Sheet,
|
34
34
|
SheetClose,
|
@@ -3167,7 +3167,7 @@ var InterfaceSettings = ({
|
|
3167
3167
|
{
|
3168
3168
|
width,
|
3169
3169
|
defaultValue: language,
|
3170
|
-
|
3170
|
+
onChange: (e) => {
|
3171
3171
|
if (handleLanguage) {
|
3172
3172
|
handleLanguage(e.value);
|
3173
3173
|
}
|
@@ -3184,7 +3184,7 @@ var InterfaceSettings = ({
|
|
3184
3184
|
{
|
3185
3185
|
width,
|
3186
3186
|
defaultValue: color,
|
3187
|
-
|
3187
|
+
onChange: (e) => {
|
3188
3188
|
if (handleColorMode) {
|
3189
3189
|
handleColorMode(e.value);
|
3190
3190
|
}
|
package/dist/index.d.mts
CHANGED
@@ -480,8 +480,9 @@ type RadioTypes = {
|
|
480
480
|
design?: "default" | "tabs" | "cards" | "bordered";
|
481
481
|
width?: "default" | "full" | "none";
|
482
482
|
size?: "default" | "lg" | "sm" | "xs";
|
483
|
+
name?: string;
|
483
484
|
options: RadioOptionsTypes[];
|
484
|
-
|
485
|
+
onChange?: any;
|
485
486
|
defaultValue?: any;
|
486
487
|
direction?: DirectionType;
|
487
488
|
helperText?: string;
|
package/dist/index.d.ts
CHANGED
@@ -480,8 +480,9 @@ type RadioTypes = {
|
|
480
480
|
design?: "default" | "tabs" | "cards" | "bordered";
|
481
481
|
width?: "default" | "full" | "none";
|
482
482
|
size?: "default" | "lg" | "sm" | "xs";
|
483
|
+
name?: string;
|
483
484
|
options: RadioOptionsTypes[];
|
484
|
-
|
485
|
+
onChange?: any;
|
485
486
|
defaultValue?: any;
|
486
487
|
direction?: DirectionType;
|
487
488
|
helperText?: string;
|