myshell-react-lib 0.1.9 → 0.1.10
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.cjs +64 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +64 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4673,7 +4673,7 @@ function clamp(value1, min3, max2) {
|
|
|
4673
4673
|
return Math.min(Math.max(value1, min3), max2);
|
|
4674
4674
|
}
|
|
4675
4675
|
function isClient() {
|
|
4676
|
-
return typeof window !== "undefined";
|
|
4676
|
+
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
4677
4677
|
}
|
|
4678
4678
|
function isIosApp() {
|
|
4679
4679
|
return isClient() && typeof navigator !== "undefined" && /iPhone|iPad|iPod/i.test(navigator.userAgent) && !!window.webkit;
|
|
@@ -5690,6 +5690,11 @@ var iconButtonVariants = cva6("shrink-0 inline-flex items-center justify-center
|
|
|
5690
5690
|
}
|
|
5691
5691
|
},
|
|
5692
5692
|
compoundVariants: [
|
|
5693
|
+
{
|
|
5694
|
+
variant: "primary",
|
|
5695
|
+
color: "default",
|
|
5696
|
+
className: "bg-cc-Button-Primary-bg-default text-cc-Button-Primary-fg-default hover:bg-cc-Button-Primary-bg-hover active:bg-cc-Button-Primary-bg-active disabled:bg-cc-Button-Primary-bg-disabled"
|
|
5697
|
+
},
|
|
5693
5698
|
{
|
|
5694
5699
|
variant: "primary",
|
|
5695
5700
|
color: "brand",
|
|
@@ -5738,7 +5743,7 @@ var iconButtonVariants = cva6("shrink-0 inline-flex items-center justify-center
|
|
|
5738
5743
|
],
|
|
5739
5744
|
defaultVariants: {
|
|
5740
5745
|
variant: "primary",
|
|
5741
|
-
color: "
|
|
5746
|
+
color: "brand",
|
|
5742
5747
|
size: "lg"
|
|
5743
5748
|
}
|
|
5744
5749
|
});
|
|
@@ -11577,12 +11582,12 @@ var tabListVariants = cva18("relative inline-flex items-center justify-center ov
|
|
|
11577
11582
|
size: {
|
|
11578
11583
|
sm: "h-6",
|
|
11579
11584
|
md: "h-9",
|
|
11580
|
-
lg: "h-
|
|
11585
|
+
lg: "h-11"
|
|
11581
11586
|
},
|
|
11582
11587
|
variant: {
|
|
11583
|
-
button: "
|
|
11584
|
-
underline: "border-b border-Colors-Border-Default space-x-6",
|
|
11585
|
-
icon: "border border-Colors-Border-Default bg-
|
|
11588
|
+
button: "border border-Colors-Border-Default bg-cc-Tabbar-bg-default text-cc-Tabbar-fg-default p-0.5",
|
|
11589
|
+
underline: "border-b border-Colors-Border-Default space-x-6 rounded-none",
|
|
11590
|
+
icon: "border border-Colors-Border-Default bg-cc-Tabbar-bg-default text-cc-Tabbar-fg-default p-0.5"
|
|
11586
11591
|
},
|
|
11587
11592
|
rounded: {
|
|
11588
11593
|
default: "",
|
|
@@ -11623,17 +11628,27 @@ var tabListVariants = cva18("relative inline-flex items-center justify-center ov
|
|
|
11623
11628
|
{
|
|
11624
11629
|
rounded: "default",
|
|
11625
11630
|
size: "lg",
|
|
11626
|
-
className: "rounded-
|
|
11631
|
+
className: "rounded-md"
|
|
11627
11632
|
},
|
|
11628
11633
|
{
|
|
11629
11634
|
rounded: "default",
|
|
11630
11635
|
size: "md",
|
|
11631
|
-
className: "rounded-
|
|
11636
|
+
className: "rounded-md"
|
|
11632
11637
|
},
|
|
11633
11638
|
{
|
|
11634
11639
|
rounded: "default",
|
|
11635
11640
|
size: "sm",
|
|
11636
|
-
className: "rounded
|
|
11641
|
+
className: "rounded"
|
|
11642
|
+
},
|
|
11643
|
+
{
|
|
11644
|
+
variant: "underline",
|
|
11645
|
+
rounded: "default",
|
|
11646
|
+
className: "rounded-none"
|
|
11647
|
+
},
|
|
11648
|
+
{
|
|
11649
|
+
variant: "underline",
|
|
11650
|
+
rounded: "full",
|
|
11651
|
+
className: "rounded-none"
|
|
11637
11652
|
}
|
|
11638
11653
|
],
|
|
11639
11654
|
defaultVariants: {
|
|
@@ -11642,17 +11657,17 @@ var tabListVariants = cva18("relative inline-flex items-center justify-center ov
|
|
|
11642
11657
|
rounded: "default"
|
|
11643
11658
|
}
|
|
11644
11659
|
});
|
|
11645
|
-
var tabVariants = cva18("relative inline-flex w-full h-full items-center justify-center overflow-hidden whitespace-nowrap font-medium text-
|
|
11660
|
+
var tabVariants = cva18("relative inline-flex w-full h-full items-center justify-center overflow-hidden whitespace-nowrap font-medium text-cc-Tabbar-fg-default aria-[selected=true]:text-cc-Tabbar-fg-bolder [&>div>span]:hover:text-cc-Tabbar-fg-bolder disabled:cursor-not-allowed disabled:text-cc-Tabbar-fg-disabled [&>div>span]:disabled:text-cc-Tabbar-fg-disabled data-[state=active]:text-cc-Tabbar-fg-bolder", {
|
|
11646
11661
|
variants: {
|
|
11647
11662
|
size: {
|
|
11648
|
-
sm: "text-xs",
|
|
11649
|
-
md: "text-sm",
|
|
11650
|
-
lg: "text-base"
|
|
11663
|
+
sm: "text-xs h-4.5",
|
|
11664
|
+
md: "text-sm h-7.5",
|
|
11665
|
+
lg: "text-base h-9.5"
|
|
11651
11666
|
},
|
|
11652
11667
|
variant: {
|
|
11653
|
-
button: "
|
|
11654
|
-
underline: "
|
|
11655
|
-
icon: "px-4"
|
|
11668
|
+
button: "aria-[selected=true]:bg-cc-Tabbar-bg-select aria-[selected=true]:shadow-background-default",
|
|
11669
|
+
underline: "shadow-none aria-[selected=true]:border-cc-Tabbar-border-default aria-[selected=true]:border-b-2 rounded-none",
|
|
11670
|
+
icon: "aria-[selected=true]:bg-cc-Tabbar-bg-select aria-[selected=true]:shadow-background-default px-4"
|
|
11656
11671
|
},
|
|
11657
11672
|
rounded: {
|
|
11658
11673
|
default: "",
|
|
@@ -11663,17 +11678,42 @@ var tabVariants = cva18("relative inline-flex w-full h-full items-center justify
|
|
|
11663
11678
|
{
|
|
11664
11679
|
rounded: "default",
|
|
11665
11680
|
size: "lg",
|
|
11666
|
-
className: "rounded-
|
|
11681
|
+
className: "rounded-md"
|
|
11667
11682
|
},
|
|
11668
11683
|
{
|
|
11669
11684
|
rounded: "default",
|
|
11670
11685
|
size: "md",
|
|
11671
|
-
className: "rounded-
|
|
11686
|
+
className: "rounded-md"
|
|
11672
11687
|
},
|
|
11673
11688
|
{
|
|
11674
11689
|
rounded: "default",
|
|
11675
11690
|
size: "sm",
|
|
11676
|
-
className: "rounded
|
|
11691
|
+
className: "rounded"
|
|
11692
|
+
},
|
|
11693
|
+
{
|
|
11694
|
+
variant: "underline",
|
|
11695
|
+
rounded: "default",
|
|
11696
|
+
className: "rounded-none"
|
|
11697
|
+
},
|
|
11698
|
+
{
|
|
11699
|
+
variant: "underline",
|
|
11700
|
+
rounded: "full",
|
|
11701
|
+
className: "rounded-none"
|
|
11702
|
+
},
|
|
11703
|
+
{
|
|
11704
|
+
variant: "underline",
|
|
11705
|
+
size: "sm",
|
|
11706
|
+
className: "h-4"
|
|
11707
|
+
},
|
|
11708
|
+
{
|
|
11709
|
+
variant: "underline",
|
|
11710
|
+
size: "md",
|
|
11711
|
+
className: "h-6.5"
|
|
11712
|
+
},
|
|
11713
|
+
{
|
|
11714
|
+
variant: "underline",
|
|
11715
|
+
size: "lg",
|
|
11716
|
+
className: "h-[31px]"
|
|
11677
11717
|
}
|
|
11678
11718
|
],
|
|
11679
11719
|
defaultVariants: {
|
|
@@ -11701,11 +11741,11 @@ var Tabs = React37.forwardRef(function(_param, ref) {
|
|
|
11701
11741
|
className: "w-full flex justify-center items-center",
|
|
11702
11742
|
children: /* @__PURE__ */ jsx53(TabsPrimitive.List, _object_spread_props(_object_spread({
|
|
11703
11743
|
ref: ref,
|
|
11704
|
-
className: cn(
|
|
11744
|
+
className: cn(tabListVariants({
|
|
11705
11745
|
variant: variant,
|
|
11706
11746
|
size: size,
|
|
11707
11747
|
rounded: rounded
|
|
11708
|
-
}), listClassName)
|
|
11748
|
+
}), "", listClassName)
|
|
11709
11749
|
}, props), {
|
|
11710
11750
|
children: items === null || items === void 0 ? void 0 : items.map(function(item) {
|
|
11711
11751
|
return /* @__PURE__ */ jsx53(Tab, _object_spread({
|
|
@@ -11746,7 +11786,7 @@ var Tab = React37.forwardRef(function(_param, ref) {
|
|
|
11746
11786
|
"onClickCallback"
|
|
11747
11787
|
]);
|
|
11748
11788
|
return /* @__PURE__ */ jsx53(Tooltip, _object_spread_props(_object_spread({
|
|
11749
|
-
triggerClassName: "w-full h-full flex-1"
|
|
11789
|
+
triggerClassName: cn("w-full h-full flex-1 flex justify-center items-center", variant === "underline" && "justify-center items-end")
|
|
11750
11790
|
}, tooltip), {
|
|
11751
11791
|
children: /* @__PURE__ */ jsx53(TabsPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
11752
11792
|
ref: ref,
|
|
@@ -11778,8 +11818,8 @@ var Tab = React37.forwardRef(function(_param, ref) {
|
|
|
11778
11818
|
}) : /* @__PURE__ */ jsxs30("div", {
|
|
11779
11819
|
className: "relative flex justify-center items-center",
|
|
11780
11820
|
children: [
|
|
11781
|
-
label && /* @__PURE__ */ jsx53(
|
|
11782
|
-
className: "text-inherit",
|
|
11821
|
+
label && /* @__PURE__ */ jsx53("span", {
|
|
11822
|
+
className: cn("text-inherit"),
|
|
11783
11823
|
children: label
|
|
11784
11824
|
}),
|
|
11785
11825
|
icon && /* @__PURE__ */ jsx53(Icon, {
|