@sikka/hawa 0.27.24-next → 0.28.0
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/blocks/index.js +87 -20
- package/dist/blocks/index.mjs +1 -1
- package/dist/blocks/misc/index.js +87 -20
- package/dist/blocks/misc/index.mjs +87 -20
- package/dist/{chunk-3ZURZ4TW.mjs → chunk-Y3HUZNCH.mjs} +87 -20
- package/dist/elements/index.d.mts +2 -1
- package/dist/elements/index.d.ts +2 -1
- package/dist/elements/index.js +87 -20
- package/dist/elements/index.mjs +1 -1
- package/dist/index.css +26 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +87 -20
- package/dist/index.mjs +87 -20
- package/dist/tabs/index.d.mts +2 -1
- package/dist/tabs/index.d.ts +2 -1
- package/dist/tabs/index.js +89 -20
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +89 -20
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/elements/index.js
CHANGED
@@ -3826,31 +3826,100 @@ var SortButton = (props) => {
|
|
3826
3826
|
// elements/tabs/Tabs.tsx
|
3827
3827
|
var React31 = __toESM(require("react"));
|
3828
3828
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
3829
|
-
var
|
3830
|
-
var
|
3831
|
-
|
3832
|
-
|
3829
|
+
var import_tailwind_variants = require("tailwind-variants");
|
3830
|
+
var tabsListVariant = (0, import_tailwind_variants.tv)({
|
3831
|
+
base: "",
|
3832
|
+
variants: {
|
3833
|
+
variant: {
|
3834
|
+
default: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
3835
|
+
underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
3836
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
3837
|
+
},
|
3838
|
+
orientation: {
|
3839
|
+
horizontal: "",
|
3840
|
+
vertical: ""
|
3841
|
+
}
|
3842
|
+
},
|
3843
|
+
compoundVariants: [
|
3833
3844
|
{
|
3834
|
-
|
3835
|
-
|
3836
|
-
|
3837
|
-
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
3838
|
-
className
|
3839
|
-
),
|
3840
|
-
...props
|
3845
|
+
variant: "underlined_tabs",
|
3846
|
+
orientation: "vertical",
|
3847
|
+
class: "hawa-border-e-2 hawa-border-e-primary"
|
3841
3848
|
},
|
3842
|
-
|
3843
|
-
|
3844
|
-
|
3849
|
+
{
|
3850
|
+
variant: "underlined_tabs",
|
3851
|
+
orientation: "horizontal",
|
3852
|
+
class: "hawa-border-b-2 hawa-border-b-primary"
|
3853
|
+
}
|
3854
|
+
],
|
3855
|
+
defaultVariants: {
|
3856
|
+
variant: "default",
|
3857
|
+
orientation: "horizontal"
|
3858
|
+
}
|
3859
|
+
});
|
3860
|
+
var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
3861
|
+
base: "",
|
3862
|
+
variants: {
|
3863
|
+
variant: {
|
3864
|
+
default: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
3865
|
+
underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
3866
|
+
underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
|
3867
|
+
},
|
3868
|
+
orientation: {
|
3869
|
+
horizontal: "",
|
3870
|
+
vertical: ""
|
3871
|
+
}
|
3872
|
+
},
|
3873
|
+
compoundVariants: [
|
3874
|
+
{
|
3875
|
+
variant: "underlined",
|
3876
|
+
orientation: "horizontal",
|
3877
|
+
class: "data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2"
|
3878
|
+
},
|
3879
|
+
{
|
3880
|
+
variant: "underlined",
|
3881
|
+
orientation: "vertical",
|
3882
|
+
class: "data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2"
|
3883
|
+
},
|
3884
|
+
{
|
3885
|
+
variant: "underlined_tabs",
|
3886
|
+
orientation: "horizontal",
|
3887
|
+
class: "hawa-rounded-b-none"
|
3888
|
+
},
|
3889
|
+
{
|
3890
|
+
variant: "underlined_tabs",
|
3891
|
+
orientation: "vertical",
|
3892
|
+
class: "hawa-rounded-e-none"
|
3893
|
+
}
|
3894
|
+
],
|
3895
|
+
defaultVariants: {
|
3896
|
+
variant: "default",
|
3897
|
+
orientation: "horizontal"
|
3898
|
+
}
|
3899
|
+
});
|
3900
|
+
var TabsContext = React31.createContext({ orientation: "horizontal", variant: "default" });
|
3901
|
+
var Tabs = React31.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
3902
|
+
TabsPrimitive.Root,
|
3903
|
+
{
|
3904
|
+
ref,
|
3905
|
+
className: cn(
|
3906
|
+
"hawa-flex hawa-gap-2",
|
3907
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
3908
|
+
className
|
3909
|
+
),
|
3910
|
+
...props
|
3911
|
+
},
|
3912
|
+
/* @__PURE__ */ React31.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
3913
|
+
));
|
3845
3914
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
3846
3915
|
var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
3847
|
-
const { orientation } = React31.useContext(TabsContext);
|
3916
|
+
const { orientation, variant } = React31.useContext(TabsContext);
|
3848
3917
|
return /* @__PURE__ */ React31.createElement(
|
3849
3918
|
TabsPrimitive.List,
|
3850
3919
|
{
|
3851
3920
|
ref,
|
3852
3921
|
className: cn(
|
3853
|
-
|
3922
|
+
tabsListVariant({ variant, orientation }),
|
3854
3923
|
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
3855
3924
|
className
|
3856
3925
|
),
|
@@ -3860,14 +3929,12 @@ var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
|
3860
3929
|
});
|
3861
3930
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
3862
3931
|
var TabsTrigger = React31.forwardRef(({ className, chipProps, ...props }, ref) => {
|
3932
|
+
const { orientation, variant } = React31.useContext(TabsContext);
|
3863
3933
|
return /* @__PURE__ */ React31.createElement(
|
3864
3934
|
TabsPrimitive.Trigger,
|
3865
3935
|
{
|
3866
3936
|
ref,
|
3867
|
-
className: cn(
|
3868
|
-
"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
3869
|
-
className
|
3870
|
-
),
|
3937
|
+
className: cn(tabsTriggerVariant({ variant, orientation }), className),
|
3871
3938
|
...props
|
3872
3939
|
},
|
3873
3940
|
props.children,
|
package/dist/elements/index.mjs
CHANGED
package/dist/index.css
CHANGED
@@ -2024,6 +2024,14 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
2024
2024
|
border-bottom-right-radius: var(--radius);
|
2025
2025
|
border-bottom-left-radius: var(--radius);
|
2026
2026
|
}
|
2027
|
+
.hawa-rounded-b-none {
|
2028
|
+
border-bottom-right-radius: 0px;
|
2029
|
+
border-bottom-left-radius: 0px;
|
2030
|
+
}
|
2031
|
+
.hawa-rounded-e-none {
|
2032
|
+
border-start-end-radius: 0px;
|
2033
|
+
border-end-end-radius: 0px;
|
2034
|
+
}
|
2027
2035
|
.hawa-rounded-l {
|
2028
2036
|
border-top-left-radius: var(--radius);
|
2029
2037
|
border-bottom-left-radius: var(--radius);
|
@@ -2085,6 +2093,12 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
2085
2093
|
.hawa-border-b-2 {
|
2086
2094
|
border-bottom-width: 2px;
|
2087
2095
|
}
|
2096
|
+
.hawa-border-e {
|
2097
|
+
border-inline-end-width: 1px;
|
2098
|
+
}
|
2099
|
+
.hawa-border-e-2 {
|
2100
|
+
border-inline-end-width: 2px;
|
2101
|
+
}
|
2088
2102
|
.hawa-border-l {
|
2089
2103
|
border-left-width: 1px;
|
2090
2104
|
}
|
@@ -2141,9 +2155,15 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
2141
2155
|
border-left-color: transparent;
|
2142
2156
|
border-right-color: transparent;
|
2143
2157
|
}
|
2158
|
+
.hawa-border-b-primary {
|
2159
|
+
border-bottom-color: hsl(var(--primary));
|
2160
|
+
}
|
2144
2161
|
.hawa-border-b-transparent {
|
2145
2162
|
border-bottom-color: transparent;
|
2146
2163
|
}
|
2164
|
+
.hawa-border-e-primary {
|
2165
|
+
border-inline-end-color: hsl(var(--primary));
|
2166
|
+
}
|
2147
2167
|
.hawa-border-l-transparent {
|
2148
2168
|
border-left-color: transparent;
|
2149
2169
|
}
|
@@ -3571,6 +3591,12 @@ body {
|
|
3571
3591
|
border-top-left-radius: 0px;
|
3572
3592
|
border-top-right-radius: 0px;
|
3573
3593
|
}
|
3594
|
+
.data-\[state\=active\]\:hawa-border-b-primary[data-state=active] {
|
3595
|
+
border-bottom-color: hsl(var(--primary));
|
3596
|
+
}
|
3597
|
+
.data-\[state\=active\]\:hawa-border-e-primary[data-state=active] {
|
3598
|
+
border-inline-end-color: hsl(var(--primary));
|
3599
|
+
}
|
3574
3600
|
.data-\[active\]\:hawa-bg-accent\/50[data-active] {
|
3575
3601
|
background-color: hsl(var(--accent) / 0.5);
|
3576
3602
|
}
|
package/dist/index.d.mts
CHANGED
@@ -612,8 +612,9 @@ type SortButtonProps = {
|
|
612
612
|
};
|
613
613
|
declare const SortButton: React__default.FC<SortButtonProps>;
|
614
614
|
|
615
|
+
type TabsVariants = "default" | "underlined" | "underlined_tabs";
|
615
616
|
declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
616
|
-
|
617
|
+
variant?: TabsVariants | undefined;
|
617
618
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
618
619
|
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
619
620
|
declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
package/dist/index.d.ts
CHANGED
@@ -612,8 +612,9 @@ type SortButtonProps = {
|
|
612
612
|
};
|
613
613
|
declare const SortButton: React__default.FC<SortButtonProps>;
|
614
614
|
|
615
|
+
type TabsVariants = "default" | "underlined" | "underlined_tabs";
|
615
616
|
declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
616
|
-
|
617
|
+
variant?: TabsVariants | undefined;
|
617
618
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
618
619
|
declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
619
620
|
declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
package/dist/index.js
CHANGED
@@ -3893,31 +3893,100 @@ var SortButton = (props) => {
|
|
3893
3893
|
// elements/tabs/Tabs.tsx
|
3894
3894
|
var React31 = __toESM(require("react"));
|
3895
3895
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
3896
|
-
var
|
3897
|
-
var
|
3898
|
-
|
3899
|
-
|
3896
|
+
var import_tailwind_variants = require("tailwind-variants");
|
3897
|
+
var tabsListVariant = (0, import_tailwind_variants.tv)({
|
3898
|
+
base: "",
|
3899
|
+
variants: {
|
3900
|
+
variant: {
|
3901
|
+
default: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
3902
|
+
underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
3903
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
3904
|
+
},
|
3905
|
+
orientation: {
|
3906
|
+
horizontal: "",
|
3907
|
+
vertical: ""
|
3908
|
+
}
|
3909
|
+
},
|
3910
|
+
compoundVariants: [
|
3900
3911
|
{
|
3901
|
-
|
3902
|
-
|
3903
|
-
|
3904
|
-
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
3905
|
-
className
|
3906
|
-
),
|
3907
|
-
...props
|
3912
|
+
variant: "underlined_tabs",
|
3913
|
+
orientation: "vertical",
|
3914
|
+
class: "hawa-border-e-2 hawa-border-e-primary"
|
3908
3915
|
},
|
3909
|
-
|
3910
|
-
|
3911
|
-
|
3916
|
+
{
|
3917
|
+
variant: "underlined_tabs",
|
3918
|
+
orientation: "horizontal",
|
3919
|
+
class: "hawa-border-b-2 hawa-border-b-primary"
|
3920
|
+
}
|
3921
|
+
],
|
3922
|
+
defaultVariants: {
|
3923
|
+
variant: "default",
|
3924
|
+
orientation: "horizontal"
|
3925
|
+
}
|
3926
|
+
});
|
3927
|
+
var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
3928
|
+
base: "",
|
3929
|
+
variants: {
|
3930
|
+
variant: {
|
3931
|
+
default: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
3932
|
+
underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
3933
|
+
underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
|
3934
|
+
},
|
3935
|
+
orientation: {
|
3936
|
+
horizontal: "",
|
3937
|
+
vertical: ""
|
3938
|
+
}
|
3939
|
+
},
|
3940
|
+
compoundVariants: [
|
3941
|
+
{
|
3942
|
+
variant: "underlined",
|
3943
|
+
orientation: "horizontal",
|
3944
|
+
class: "data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2"
|
3945
|
+
},
|
3946
|
+
{
|
3947
|
+
variant: "underlined",
|
3948
|
+
orientation: "vertical",
|
3949
|
+
class: "data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2"
|
3950
|
+
},
|
3951
|
+
{
|
3952
|
+
variant: "underlined_tabs",
|
3953
|
+
orientation: "horizontal",
|
3954
|
+
class: "hawa-rounded-b-none"
|
3955
|
+
},
|
3956
|
+
{
|
3957
|
+
variant: "underlined_tabs",
|
3958
|
+
orientation: "vertical",
|
3959
|
+
class: "hawa-rounded-e-none"
|
3960
|
+
}
|
3961
|
+
],
|
3962
|
+
defaultVariants: {
|
3963
|
+
variant: "default",
|
3964
|
+
orientation: "horizontal"
|
3965
|
+
}
|
3966
|
+
});
|
3967
|
+
var TabsContext = React31.createContext({ orientation: "horizontal", variant: "default" });
|
3968
|
+
var Tabs = React31.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
3969
|
+
TabsPrimitive.Root,
|
3970
|
+
{
|
3971
|
+
ref,
|
3972
|
+
className: cn(
|
3973
|
+
"hawa-flex hawa-gap-2",
|
3974
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
3975
|
+
className
|
3976
|
+
),
|
3977
|
+
...props
|
3978
|
+
},
|
3979
|
+
/* @__PURE__ */ React31.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
3980
|
+
));
|
3912
3981
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
3913
3982
|
var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
3914
|
-
const { orientation } = React31.useContext(TabsContext);
|
3983
|
+
const { orientation, variant } = React31.useContext(TabsContext);
|
3915
3984
|
return /* @__PURE__ */ React31.createElement(
|
3916
3985
|
TabsPrimitive.List,
|
3917
3986
|
{
|
3918
3987
|
ref,
|
3919
3988
|
className: cn(
|
3920
|
-
|
3989
|
+
tabsListVariant({ variant, orientation }),
|
3921
3990
|
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
3922
3991
|
className
|
3923
3992
|
),
|
@@ -3927,14 +3996,12 @@ var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
|
3927
3996
|
});
|
3928
3997
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
3929
3998
|
var TabsTrigger = React31.forwardRef(({ className, chipProps, ...props }, ref) => {
|
3999
|
+
const { orientation, variant } = React31.useContext(TabsContext);
|
3930
4000
|
return /* @__PURE__ */ React31.createElement(
|
3931
4001
|
TabsPrimitive.Trigger,
|
3932
4002
|
{
|
3933
4003
|
ref,
|
3934
|
-
className: cn(
|
3935
|
-
"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
3936
|
-
className
|
3937
|
-
),
|
4004
|
+
className: cn(tabsTriggerVariant({ variant, orientation }), className),
|
3938
4005
|
...props
|
3939
4006
|
},
|
3940
4007
|
props.children,
|
package/dist/index.mjs
CHANGED
@@ -3667,31 +3667,100 @@ var SortButton = (props) => {
|
|
3667
3667
|
// elements/tabs/Tabs.tsx
|
3668
3668
|
import * as React31 from "react";
|
3669
3669
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
3670
|
-
|
3671
|
-
var
|
3672
|
-
|
3673
|
-
|
3670
|
+
import { tv } from "tailwind-variants";
|
3671
|
+
var tabsListVariant = tv({
|
3672
|
+
base: "",
|
3673
|
+
variants: {
|
3674
|
+
variant: {
|
3675
|
+
default: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
3676
|
+
underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
3677
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
3678
|
+
},
|
3679
|
+
orientation: {
|
3680
|
+
horizontal: "",
|
3681
|
+
vertical: ""
|
3682
|
+
}
|
3683
|
+
},
|
3684
|
+
compoundVariants: [
|
3674
3685
|
{
|
3675
|
-
|
3676
|
-
|
3677
|
-
|
3678
|
-
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
3679
|
-
className
|
3680
|
-
),
|
3681
|
-
...props
|
3686
|
+
variant: "underlined_tabs",
|
3687
|
+
orientation: "vertical",
|
3688
|
+
class: "hawa-border-e-2 hawa-border-e-primary"
|
3682
3689
|
},
|
3683
|
-
|
3684
|
-
|
3685
|
-
|
3690
|
+
{
|
3691
|
+
variant: "underlined_tabs",
|
3692
|
+
orientation: "horizontal",
|
3693
|
+
class: "hawa-border-b-2 hawa-border-b-primary"
|
3694
|
+
}
|
3695
|
+
],
|
3696
|
+
defaultVariants: {
|
3697
|
+
variant: "default",
|
3698
|
+
orientation: "horizontal"
|
3699
|
+
}
|
3700
|
+
});
|
3701
|
+
var tabsTriggerVariant = tv({
|
3702
|
+
base: "",
|
3703
|
+
variants: {
|
3704
|
+
variant: {
|
3705
|
+
default: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
3706
|
+
underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
|
3707
|
+
underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
|
3708
|
+
},
|
3709
|
+
orientation: {
|
3710
|
+
horizontal: "",
|
3711
|
+
vertical: ""
|
3712
|
+
}
|
3713
|
+
},
|
3714
|
+
compoundVariants: [
|
3715
|
+
{
|
3716
|
+
variant: "underlined",
|
3717
|
+
orientation: "horizontal",
|
3718
|
+
class: "data-[state=active]:hawa-border-b-primary hawa-border-b hawa-border-b-2"
|
3719
|
+
},
|
3720
|
+
{
|
3721
|
+
variant: "underlined",
|
3722
|
+
orientation: "vertical",
|
3723
|
+
class: "data-[state=active]:hawa-border-e-primary hawa-border-e hawa-border-e-2"
|
3724
|
+
},
|
3725
|
+
{
|
3726
|
+
variant: "underlined_tabs",
|
3727
|
+
orientation: "horizontal",
|
3728
|
+
class: "hawa-rounded-b-none"
|
3729
|
+
},
|
3730
|
+
{
|
3731
|
+
variant: "underlined_tabs",
|
3732
|
+
orientation: "vertical",
|
3733
|
+
class: "hawa-rounded-e-none"
|
3734
|
+
}
|
3735
|
+
],
|
3736
|
+
defaultVariants: {
|
3737
|
+
variant: "default",
|
3738
|
+
orientation: "horizontal"
|
3739
|
+
}
|
3740
|
+
});
|
3741
|
+
var TabsContext = React31.createContext({ orientation: "horizontal", variant: "default" });
|
3742
|
+
var Tabs = React31.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
3743
|
+
TabsPrimitive.Root,
|
3744
|
+
{
|
3745
|
+
ref,
|
3746
|
+
className: cn(
|
3747
|
+
"hawa-flex hawa-gap-2",
|
3748
|
+
orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
|
3749
|
+
className
|
3750
|
+
),
|
3751
|
+
...props
|
3752
|
+
},
|
3753
|
+
/* @__PURE__ */ React31.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
3754
|
+
));
|
3686
3755
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
3687
3756
|
var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
3688
|
-
const { orientation } = React31.useContext(TabsContext);
|
3757
|
+
const { orientation, variant } = React31.useContext(TabsContext);
|
3689
3758
|
return /* @__PURE__ */ React31.createElement(
|
3690
3759
|
TabsPrimitive.List,
|
3691
3760
|
{
|
3692
3761
|
ref,
|
3693
3762
|
className: cn(
|
3694
|
-
|
3763
|
+
tabsListVariant({ variant, orientation }),
|
3695
3764
|
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
3696
3765
|
className
|
3697
3766
|
),
|
@@ -3701,14 +3770,12 @@ var TabsList = React31.forwardRef(({ className, ...props }, ref) => {
|
|
3701
3770
|
});
|
3702
3771
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
3703
3772
|
var TabsTrigger = React31.forwardRef(({ className, chipProps, ...props }, ref) => {
|
3773
|
+
const { orientation, variant } = React31.useContext(TabsContext);
|
3704
3774
|
return /* @__PURE__ */ React31.createElement(
|
3705
3775
|
TabsPrimitive.Trigger,
|
3706
3776
|
{
|
3707
3777
|
ref,
|
3708
|
-
className: cn(
|
3709
|
-
"hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-border hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground data-[state=active]:hawa-shadow-sm dark:hawa-border-primary/10",
|
3710
|
-
className
|
3711
|
-
),
|
3778
|
+
className: cn(tabsTriggerVariant({ variant, orientation }), className),
|
3712
3779
|
...props
|
3713
3780
|
},
|
3714
3781
|
props.children,
|
package/dist/tabs/index.d.mts
CHANGED
@@ -20,8 +20,9 @@ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
|
20
20
|
radius?: RadiusType;
|
21
21
|
};
|
22
22
|
|
23
|
+
type TabsVariants = "default" | "underlined" | "underlined_tabs";
|
23
24
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
24
|
-
|
25
|
+
variant?: TabsVariants | undefined;
|
25
26
|
} & React.RefAttributes<HTMLDivElement>>;
|
26
27
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
27
28
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
package/dist/tabs/index.d.ts
CHANGED
@@ -20,8 +20,9 @@ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
|
|
20
20
|
radius?: RadiusType;
|
21
21
|
};
|
22
22
|
|
23
|
+
type TabsVariants = "default" | "underlined" | "underlined_tabs";
|
23
24
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
24
|
-
|
25
|
+
variant?: TabsVariants | undefined;
|
25
26
|
} & React.RefAttributes<HTMLDivElement>>;
|
26
27
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
27
28
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|