myshell-react-lib 0.1.9 → 0.1.11
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 +83 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +83 -41
- 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;
|
|
@@ -5644,23 +5644,25 @@ var TooltipContent = React9.forwardRef(function(_param, ref) {
|
|
|
5644
5644
|
"showArrow",
|
|
5645
5645
|
"arrowClassName"
|
|
5646
5646
|
]);
|
|
5647
|
-
return /* @__PURE__ */
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5647
|
+
return /* @__PURE__ */ jsx12(TooltipPrimitive.Portal, {
|
|
5648
|
+
children: /* @__PURE__ */ jsxs5(TooltipPrimitive.Content, _object_spread_props(_object_spread({
|
|
5649
|
+
ref: ref,
|
|
5650
|
+
align: align,
|
|
5651
|
+
sideOffset: sideOffset,
|
|
5652
|
+
alignOffset: alignOffset,
|
|
5653
|
+
side: side,
|
|
5654
|
+
className: cn("relative z-[49] mx-4 w-fit max-w-72 rounded-lg px-3 py-2 text-left text-xs shadow-modal-bolder", "outline-none delay-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 [&[data-state=open]>span]:animate-none", "data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 [&[data-state=delayed-open]>span]:animate-none", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", variant === "default" ? "bg-cc-Tooltip-bg-default text-cc-Tooltip-fg-default border border-cc-Tooltip-border-default" : variant === "info" ? "bg-surface-accent-yellow-subtle text-Colors-Text-Warning-Bolder" : "bg-Colors-Utility-Lake-Blue-50 text-cc-Tooltip-fg-default", className)
|
|
5655
|
+
}, props), {
|
|
5656
|
+
children: [
|
|
5657
|
+
props.children,
|
|
5658
|
+
showArrow && /* @__PURE__ */ jsx12(TooltipArrow, {
|
|
5659
|
+
width: 12,
|
|
5660
|
+
height: 6,
|
|
5661
|
+
className: cn(variant === "default" ? "fill-cc-Tooltip-bg-default stroke-cc-Tooltip-border-default -ml-[0.5px]" : variant === "info" ? "fill-surface-accent-yellow-subtle" : "fill-Colors-Utility-Lake-Blue-50", arrowClassName)
|
|
5662
|
+
})
|
|
5663
|
+
]
|
|
5664
|
+
}))
|
|
5665
|
+
});
|
|
5664
5666
|
});
|
|
5665
5667
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
5666
5668
|
// src/components/button/icon-button.styles.ts
|
|
@@ -5690,6 +5692,11 @@ var iconButtonVariants = cva6("shrink-0 inline-flex items-center justify-center
|
|
|
5690
5692
|
}
|
|
5691
5693
|
},
|
|
5692
5694
|
compoundVariants: [
|
|
5695
|
+
{
|
|
5696
|
+
variant: "primary",
|
|
5697
|
+
color: "default",
|
|
5698
|
+
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"
|
|
5699
|
+
},
|
|
5693
5700
|
{
|
|
5694
5701
|
variant: "primary",
|
|
5695
5702
|
color: "brand",
|
|
@@ -5738,7 +5745,7 @@ var iconButtonVariants = cva6("shrink-0 inline-flex items-center justify-center
|
|
|
5738
5745
|
],
|
|
5739
5746
|
defaultVariants: {
|
|
5740
5747
|
variant: "primary",
|
|
5741
|
-
color: "
|
|
5748
|
+
color: "brand",
|
|
5742
5749
|
size: "lg"
|
|
5743
5750
|
}
|
|
5744
5751
|
});
|
|
@@ -11577,12 +11584,12 @@ var tabListVariants = cva18("relative inline-flex items-center justify-center ov
|
|
|
11577
11584
|
size: {
|
|
11578
11585
|
sm: "h-6",
|
|
11579
11586
|
md: "h-9",
|
|
11580
|
-
lg: "h-
|
|
11587
|
+
lg: "h-11"
|
|
11581
11588
|
},
|
|
11582
11589
|
variant: {
|
|
11583
|
-
button: "
|
|
11584
|
-
underline: "border-b border-Colors-Border-Default space-x-6",
|
|
11585
|
-
icon: "border border-Colors-Border-Default bg-
|
|
11590
|
+
button: "border border-Colors-Border-Default bg-cc-Tabbar-bg-default text-cc-Tabbar-fg-default p-0.5",
|
|
11591
|
+
underline: "border-b border-Colors-Border-Default space-x-6 rounded-none",
|
|
11592
|
+
icon: "border border-Colors-Border-Default bg-cc-Tabbar-bg-default text-cc-Tabbar-fg-default p-0.5"
|
|
11586
11593
|
},
|
|
11587
11594
|
rounded: {
|
|
11588
11595
|
default: "",
|
|
@@ -11623,17 +11630,27 @@ var tabListVariants = cva18("relative inline-flex items-center justify-center ov
|
|
|
11623
11630
|
{
|
|
11624
11631
|
rounded: "default",
|
|
11625
11632
|
size: "lg",
|
|
11626
|
-
className: "rounded-
|
|
11633
|
+
className: "rounded-md"
|
|
11627
11634
|
},
|
|
11628
11635
|
{
|
|
11629
11636
|
rounded: "default",
|
|
11630
11637
|
size: "md",
|
|
11631
|
-
className: "rounded-
|
|
11638
|
+
className: "rounded-md"
|
|
11632
11639
|
},
|
|
11633
11640
|
{
|
|
11634
11641
|
rounded: "default",
|
|
11635
11642
|
size: "sm",
|
|
11636
|
-
className: "rounded
|
|
11643
|
+
className: "rounded"
|
|
11644
|
+
},
|
|
11645
|
+
{
|
|
11646
|
+
variant: "underline",
|
|
11647
|
+
rounded: "default",
|
|
11648
|
+
className: "rounded-none"
|
|
11649
|
+
},
|
|
11650
|
+
{
|
|
11651
|
+
variant: "underline",
|
|
11652
|
+
rounded: "full",
|
|
11653
|
+
className: "rounded-none"
|
|
11637
11654
|
}
|
|
11638
11655
|
],
|
|
11639
11656
|
defaultVariants: {
|
|
@@ -11642,17 +11659,17 @@ var tabListVariants = cva18("relative inline-flex items-center justify-center ov
|
|
|
11642
11659
|
rounded: "default"
|
|
11643
11660
|
}
|
|
11644
11661
|
});
|
|
11645
|
-
var tabVariants = cva18("relative inline-flex w-full h-full items-center justify-center overflow-hidden whitespace-nowrap font-medium text-
|
|
11662
|
+
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
11663
|
variants: {
|
|
11647
11664
|
size: {
|
|
11648
|
-
sm: "text-xs",
|
|
11649
|
-
md: "text-sm",
|
|
11650
|
-
lg: "text-base"
|
|
11665
|
+
sm: "text-xs h-4.5",
|
|
11666
|
+
md: "text-sm h-7.5",
|
|
11667
|
+
lg: "text-base h-9.5"
|
|
11651
11668
|
},
|
|
11652
11669
|
variant: {
|
|
11653
|
-
button: "
|
|
11654
|
-
underline: "
|
|
11655
|
-
icon: "px-4"
|
|
11670
|
+
button: "aria-[selected=true]:bg-cc-Tabbar-bg-select aria-[selected=true]:shadow-background-default",
|
|
11671
|
+
underline: "shadow-none aria-[selected=true]:border-cc-Tabbar-border-default aria-[selected=true]:border-b-2 rounded-none",
|
|
11672
|
+
icon: "aria-[selected=true]:bg-cc-Tabbar-bg-select aria-[selected=true]:shadow-background-default px-4"
|
|
11656
11673
|
},
|
|
11657
11674
|
rounded: {
|
|
11658
11675
|
default: "",
|
|
@@ -11663,17 +11680,42 @@ var tabVariants = cva18("relative inline-flex w-full h-full items-center justify
|
|
|
11663
11680
|
{
|
|
11664
11681
|
rounded: "default",
|
|
11665
11682
|
size: "lg",
|
|
11666
|
-
className: "rounded-
|
|
11683
|
+
className: "rounded-md"
|
|
11667
11684
|
},
|
|
11668
11685
|
{
|
|
11669
11686
|
rounded: "default",
|
|
11670
11687
|
size: "md",
|
|
11671
|
-
className: "rounded-
|
|
11688
|
+
className: "rounded-md"
|
|
11672
11689
|
},
|
|
11673
11690
|
{
|
|
11674
11691
|
rounded: "default",
|
|
11675
11692
|
size: "sm",
|
|
11676
|
-
className: "rounded
|
|
11693
|
+
className: "rounded"
|
|
11694
|
+
},
|
|
11695
|
+
{
|
|
11696
|
+
variant: "underline",
|
|
11697
|
+
rounded: "default",
|
|
11698
|
+
className: "rounded-none"
|
|
11699
|
+
},
|
|
11700
|
+
{
|
|
11701
|
+
variant: "underline",
|
|
11702
|
+
rounded: "full",
|
|
11703
|
+
className: "rounded-none"
|
|
11704
|
+
},
|
|
11705
|
+
{
|
|
11706
|
+
variant: "underline",
|
|
11707
|
+
size: "sm",
|
|
11708
|
+
className: "h-4"
|
|
11709
|
+
},
|
|
11710
|
+
{
|
|
11711
|
+
variant: "underline",
|
|
11712
|
+
size: "md",
|
|
11713
|
+
className: "h-6.5"
|
|
11714
|
+
},
|
|
11715
|
+
{
|
|
11716
|
+
variant: "underline",
|
|
11717
|
+
size: "lg",
|
|
11718
|
+
className: "h-[31px]"
|
|
11677
11719
|
}
|
|
11678
11720
|
],
|
|
11679
11721
|
defaultVariants: {
|
|
@@ -11701,11 +11743,11 @@ var Tabs = React37.forwardRef(function(_param, ref) {
|
|
|
11701
11743
|
className: "w-full flex justify-center items-center",
|
|
11702
11744
|
children: /* @__PURE__ */ jsx53(TabsPrimitive.List, _object_spread_props(_object_spread({
|
|
11703
11745
|
ref: ref,
|
|
11704
|
-
className: cn(
|
|
11746
|
+
className: cn(tabListVariants({
|
|
11705
11747
|
variant: variant,
|
|
11706
11748
|
size: size,
|
|
11707
11749
|
rounded: rounded
|
|
11708
|
-
}), listClassName)
|
|
11750
|
+
}), "", listClassName)
|
|
11709
11751
|
}, props), {
|
|
11710
11752
|
children: items === null || items === void 0 ? void 0 : items.map(function(item) {
|
|
11711
11753
|
return /* @__PURE__ */ jsx53(Tab, _object_spread({
|
|
@@ -11746,7 +11788,7 @@ var Tab = React37.forwardRef(function(_param, ref) {
|
|
|
11746
11788
|
"onClickCallback"
|
|
11747
11789
|
]);
|
|
11748
11790
|
return /* @__PURE__ */ jsx53(Tooltip, _object_spread_props(_object_spread({
|
|
11749
|
-
triggerClassName: "w-full h-full flex-1"
|
|
11791
|
+
triggerClassName: cn("w-full h-full flex-1 flex justify-center items-center", variant === "underline" && "justify-center items-end")
|
|
11750
11792
|
}, tooltip), {
|
|
11751
11793
|
children: /* @__PURE__ */ jsx53(TabsPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
11752
11794
|
ref: ref,
|
|
@@ -11778,8 +11820,8 @@ var Tab = React37.forwardRef(function(_param, ref) {
|
|
|
11778
11820
|
}) : /* @__PURE__ */ jsxs30("div", {
|
|
11779
11821
|
className: "relative flex justify-center items-center",
|
|
11780
11822
|
children: [
|
|
11781
|
-
label && /* @__PURE__ */ jsx53(
|
|
11782
|
-
className: "text-inherit",
|
|
11823
|
+
label && /* @__PURE__ */ jsx53("span", {
|
|
11824
|
+
className: cn("text-inherit"),
|
|
11783
11825
|
children: label
|
|
11784
11826
|
}),
|
|
11785
11827
|
icon && /* @__PURE__ */ jsx53(Icon, {
|