@sikka/hawa 0.19.39-next → 0.19.40-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/index.css +5 -7
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -4
- package/dist/index.mjs +12 -4
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1631,6 +1631,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1631
1631
|
width: -moz-max-content;
|
|
1632
1632
|
width: max-content;
|
|
1633
1633
|
}
|
|
1634
|
+
.hawa-w-px {
|
|
1635
|
+
width: 1px;
|
|
1636
|
+
}
|
|
1634
1637
|
.hawa-w-screen {
|
|
1635
1638
|
width: 100vw;
|
|
1636
1639
|
}
|
|
@@ -3605,16 +3608,11 @@ body {
|
|
|
3605
3608
|
.hawa-group.destructive .group-\[\.destructive\]\:focus\:hawa-ring-offset-red-600:focus {
|
|
3606
3609
|
--tw-ring-offset-color: #dc2626;
|
|
3607
3610
|
}
|
|
3608
|
-
.hawa-peer:checked ~ .peer-checked\:hawa-border-blue-600 {
|
|
3609
|
-
--tw-border-opacity: 1;
|
|
3610
|
-
border-color: rgb(37 99 235 / var(--tw-border-opacity));
|
|
3611
|
-
}
|
|
3612
3611
|
.hawa-peer:checked ~ .peer-checked\:hawa-border-primary {
|
|
3613
3612
|
border-color: hsl(var(--primary));
|
|
3614
3613
|
}
|
|
3615
|
-
.hawa-peer:checked ~ .peer-checked\:hawa-text-
|
|
3616
|
-
|
|
3617
|
-
color: rgb(37 99 235 / var(--tw-text-opacity));
|
|
3614
|
+
.hawa-peer:checked ~ .peer-checked\:hawa-text-primary {
|
|
3615
|
+
color: hsl(var(--primary));
|
|
3618
3616
|
}
|
|
3619
3617
|
.hawa-peer:checked ~ .peer-checked\:hawa-ring-4 {
|
|
3620
3618
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
package/dist/index.d.mts
CHANGED
|
@@ -354,8 +354,9 @@ type RadioOptionsTypes = {
|
|
|
354
354
|
type RadioTypes = {
|
|
355
355
|
orientation?: OrientationType;
|
|
356
356
|
design?: "default" | "tabs" | "cards" | "bordered";
|
|
357
|
-
options: RadioOptionsTypes[];
|
|
358
357
|
width?: "default" | "full" | "none";
|
|
358
|
+
size?: "default" | "lg" | "sm" | "xs";
|
|
359
|
+
options: RadioOptionsTypes[];
|
|
359
360
|
onChangeTab?: any;
|
|
360
361
|
defaultValue?: any;
|
|
361
362
|
direction?: DirectionType;
|
package/dist/index.d.ts
CHANGED
|
@@ -354,8 +354,9 @@ type RadioOptionsTypes = {
|
|
|
354
354
|
type RadioTypes = {
|
|
355
355
|
orientation?: OrientationType;
|
|
356
356
|
design?: "default" | "tabs" | "cards" | "bordered";
|
|
357
|
-
options: RadioOptionsTypes[];
|
|
358
357
|
width?: "default" | "full" | "none";
|
|
358
|
+
size?: "default" | "lg" | "sm" | "xs";
|
|
359
|
+
options: RadioOptionsTypes[];
|
|
359
360
|
onChangeTab?: any;
|
|
360
361
|
defaultValue?: any;
|
|
361
362
|
direction?: DirectionType;
|
package/dist/index.js
CHANGED
|
@@ -3608,6 +3608,7 @@ var import_react14 = __toESM(require("react"));
|
|
|
3608
3608
|
var Radio = ({
|
|
3609
3609
|
design = "default",
|
|
3610
3610
|
width = "default",
|
|
3611
|
+
size = "default",
|
|
3611
3612
|
orientation = "horizontal",
|
|
3612
3613
|
labelProps,
|
|
3613
3614
|
tabsContainerClassName,
|
|
@@ -3615,12 +3616,18 @@ var Radio = ({
|
|
|
3615
3616
|
}) => {
|
|
3616
3617
|
var _a, _b, _c;
|
|
3617
3618
|
const [selectedOption, setSelectedOption] = (0, import_react14.useState)(props.defaultValue);
|
|
3618
|
-
let activeTabStyle = "hawa-inline-block hawa-
|
|
3619
|
-
let inactiveTabStyle = "hawa-inline-block hawa-
|
|
3619
|
+
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
|
3620
|
+
let inactiveTabStyle = "hawa-inline-block hawa-w-full hawa-transition-all hover:hawa-bg-muted hawa-bg-primary-foreground dark:hover:hawa-text-white";
|
|
3620
3621
|
let orientationStyle = {
|
|
3621
3622
|
horizontal: "hawa-flex hawa-flex-row",
|
|
3622
3623
|
vertical: "hawa-flex hawa-flex-col"
|
|
3623
3624
|
};
|
|
3625
|
+
let tabSizeStyle = {
|
|
3626
|
+
default: "hawa-py-2 hawa-px-4 hawa-text-sm",
|
|
3627
|
+
lg: "hawa-py-2 hawa-px-4",
|
|
3628
|
+
sm: "hawa-p-1.5 hawa-text-xs",
|
|
3629
|
+
xs: "hawa-p-1 hawa-text-[10px]"
|
|
3630
|
+
};
|
|
3624
3631
|
let widthStyle = {
|
|
3625
3632
|
none: "",
|
|
3626
3633
|
default: "hawa-max-w-fit",
|
|
@@ -3646,7 +3653,7 @@ var Radio = ({
|
|
|
3646
3653
|
ref: parentRef,
|
|
3647
3654
|
className: cn(
|
|
3648
3655
|
props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
|
|
3649
|
-
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-
|
|
3656
|
+
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium",
|
|
3650
3657
|
orientationStyle[orientation],
|
|
3651
3658
|
widthStyle[width],
|
|
3652
3659
|
tabsContainerClassName
|
|
@@ -3669,6 +3676,7 @@ var Radio = ({
|
|
|
3669
3676
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
|
3670
3677
|
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
|
3671
3678
|
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
|
3679
|
+
tabSizeStyle[size],
|
|
3672
3680
|
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
|
3673
3681
|
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
|
3674
3682
|
),
|
|
@@ -3734,7 +3742,7 @@ var Radio = ({
|
|
|
3734
3742
|
{
|
|
3735
3743
|
htmlFor: opt.value.toString(),
|
|
3736
3744
|
className: cn(
|
|
3737
|
-
"hawa-inline-flex hawa-h-full hawa-w-full hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-gray-200 hawa-bg-white hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-
|
|
3745
|
+
"hawa-inline-flex hawa-h-full hawa-w-full hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-gray-200 hawa-bg-white hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
|
|
3738
3746
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-gray-100 hover:hawa-text-gray-600 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-gray-300"
|
|
3739
3747
|
)
|
|
3740
3748
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -3375,6 +3375,7 @@ import React20, { useState as useState6, useRef as useRef3, useEffect as useEffe
|
|
|
3375
3375
|
var Radio = ({
|
|
3376
3376
|
design = "default",
|
|
3377
3377
|
width = "default",
|
|
3378
|
+
size = "default",
|
|
3378
3379
|
orientation = "horizontal",
|
|
3379
3380
|
labelProps,
|
|
3380
3381
|
tabsContainerClassName,
|
|
@@ -3382,12 +3383,18 @@ var Radio = ({
|
|
|
3382
3383
|
}) => {
|
|
3383
3384
|
var _a, _b, _c;
|
|
3384
3385
|
const [selectedOption, setSelectedOption] = useState6(props.defaultValue);
|
|
3385
|
-
let activeTabStyle = "hawa-inline-block hawa-
|
|
3386
|
-
let inactiveTabStyle = "hawa-inline-block hawa-
|
|
3386
|
+
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
|
3387
|
+
let inactiveTabStyle = "hawa-inline-block hawa-w-full hawa-transition-all hover:hawa-bg-muted hawa-bg-primary-foreground dark:hover:hawa-text-white";
|
|
3387
3388
|
let orientationStyle = {
|
|
3388
3389
|
horizontal: "hawa-flex hawa-flex-row",
|
|
3389
3390
|
vertical: "hawa-flex hawa-flex-col"
|
|
3390
3391
|
};
|
|
3392
|
+
let tabSizeStyle = {
|
|
3393
|
+
default: "hawa-py-2 hawa-px-4 hawa-text-sm",
|
|
3394
|
+
lg: "hawa-py-2 hawa-px-4",
|
|
3395
|
+
sm: "hawa-p-1.5 hawa-text-xs",
|
|
3396
|
+
xs: "hawa-p-1 hawa-text-[10px]"
|
|
3397
|
+
};
|
|
3391
3398
|
let widthStyle = {
|
|
3392
3399
|
none: "",
|
|
3393
3400
|
default: "hawa-max-w-fit",
|
|
@@ -3413,7 +3420,7 @@ var Radio = ({
|
|
|
3413
3420
|
ref: parentRef,
|
|
3414
3421
|
className: cn(
|
|
3415
3422
|
props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
|
|
3416
|
-
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-
|
|
3423
|
+
"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium",
|
|
3417
3424
|
orientationStyle[orientation],
|
|
3418
3425
|
widthStyle[width],
|
|
3419
3426
|
tabsContainerClassName
|
|
@@ -3436,6 +3443,7 @@ var Radio = ({
|
|
|
3436
3443
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
|
3437
3444
|
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
|
3438
3445
|
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
|
3446
|
+
tabSizeStyle[size],
|
|
3439
3447
|
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
|
3440
3448
|
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
|
3441
3449
|
),
|
|
@@ -3501,7 +3509,7 @@ var Radio = ({
|
|
|
3501
3509
|
{
|
|
3502
3510
|
htmlFor: opt.value.toString(),
|
|
3503
3511
|
className: cn(
|
|
3504
|
-
"hawa-inline-flex hawa-h-full hawa-w-full hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-gray-200 hawa-bg-white hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-
|
|
3512
|
+
"hawa-inline-flex hawa-h-full hawa-w-full hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-gray-200 hawa-bg-white hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary",
|
|
3505
3513
|
opt.disabled ? "hawa-opacity-50" : "hawa-cursor-pointer hover:hawa-bg-gray-100 hover:hawa-text-gray-600 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-gray-300"
|
|
3506
3514
|
)
|
|
3507
3515
|
},
|