myshell-react-lib 0.1.12 → 0.1.14

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.d.cts CHANGED
@@ -1067,9 +1067,12 @@ declare function Spinner(props: SpinnerProps): react_jsx_runtime.JSX.Element;
1067
1067
 
1068
1068
  declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
1069
1069
  size?: "sm" | "md" | "lg" | null | undefined;
1070
+ vertical?: boolean | null | undefined;
1070
1071
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
1071
1072
  label?: string;
1072
1073
  labelClassName?: string;
1074
+ vertical?: boolean;
1075
+ icon?: IconComponent | React$1.ElementType;
1073
1076
  } & React$1.RefAttributes<HTMLButtonElement>>;
1074
1077
 
1075
1078
  type TItems = {
package/dist/index.d.ts CHANGED
@@ -1067,9 +1067,12 @@ declare function Spinner(props: SpinnerProps): react_jsx_runtime.JSX.Element;
1067
1067
 
1068
1068
  declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
1069
1069
  size?: "sm" | "md" | "lg" | null | undefined;
1070
+ vertical?: boolean | null | undefined;
1070
1071
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
1071
1072
  label?: string;
1072
1073
  labelClassName?: string;
1074
+ vertical?: boolean;
1075
+ icon?: IconComponent | React$1.ElementType;
1073
1076
  } & React$1.RefAttributes<HTMLButtonElement>>;
1074
1077
 
1075
1078
  type TItems = {
package/dist/index.js CHANGED
@@ -11523,12 +11523,38 @@ var switchSize = {
11523
11523
  md: "w-[34px] h-5",
11524
11524
  lg: "w-10 h-6"
11525
11525
  };
11526
+ var switchVerticalSize = {
11527
+ sm: "h-7 w-4",
11528
+ md: "h-[34px] w-5",
11529
+ lg: "h-10 w-6"
11530
+ };
11526
11531
  var switchRootVariants = cva17('peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cc-Focus-Rings-Brand-default focus-visible:ring-offset-2 data-[state=unchecked]:focus-visible:bg-cc-Switch-bg-default disabled:cursor-not-allowed disabled:opacity-30 data-[state="checked"]:bg-cc-Switch-bg-on data-[state="unchecked"]:bg-cc-Switch-bg-default', {
11527
11532
  variants: {
11528
- size: switchSize
11533
+ size: switchSize,
11534
+ vertical: {
11535
+ true: "justify-start"
11536
+ }
11529
11537
  },
11538
+ compoundVariants: [
11539
+ {
11540
+ vertical: true,
11541
+ size: "sm",
11542
+ className: switchVerticalSize.sm
11543
+ },
11544
+ {
11545
+ vertical: true,
11546
+ size: "md",
11547
+ className: switchVerticalSize.md
11548
+ },
11549
+ {
11550
+ vertical: true,
11551
+ size: "lg",
11552
+ className: switchVerticalSize.lg
11553
+ }
11554
+ ],
11530
11555
  defaultVariants: {
11531
- size: "lg"
11556
+ size: "lg",
11557
+ vertical: false
11532
11558
  }
11533
11559
  });
11534
11560
  var switchThumbVariants = cva17("pointer-events-none block rounded-full bg-cc-Switch-fg-on ring-0 transition-transform data-[state=unchecked]:translate-x-0", {
@@ -11537,33 +11563,73 @@ var switchThumbVariants = cva17("pointer-events-none block rounded-full bg-cc-Sw
11537
11563
  sm: "w-3 h-3 data-[state=checked]:translate-x-3",
11538
11564
  md: "w-4 h-4 data-[state=checked]:translate-x-[14px]",
11539
11565
  lg: "w-5 h-5 data-[state=checked]:translate-x-4"
11566
+ },
11567
+ vertical: {
11568
+ true: "data-[state=checked]:translate-x-0 data-[state=unchecked]:translate-x-0"
11540
11569
  }
11541
11570
  },
11571
+ compoundVariants: [
11572
+ {
11573
+ vertical: true,
11574
+ size: "sm",
11575
+ className: "data-[state=unchecked]:translate-y-3 data-[state=checked]:translate-y-0"
11576
+ },
11577
+ {
11578
+ vertical: true,
11579
+ size: "md",
11580
+ className: "data-[state=unchecked]:translate-y-[14px] data-[state=checked]:translate-y-0"
11581
+ },
11582
+ {
11583
+ vertical: true,
11584
+ size: "lg",
11585
+ className: "data-[state=unchecked]:translate-y-4 data-[state=checked]:translate-y-0"
11586
+ }
11587
+ ],
11542
11588
  defaultVariants: {
11543
- size: "lg"
11589
+ size: "lg",
11590
+ vertical: false
11591
+ }
11592
+ });
11593
+ var switchThumbIconVariants = cva17("flex items-center justify-center", {
11594
+ variants: {
11595
+ size: {
11596
+ sm: "w-2 h-2",
11597
+ md: "w-3 h-3",
11598
+ lg: "w-4 h-4"
11599
+ }
11544
11600
  }
11545
11601
  });
11546
11602
  var Switch = React36.forwardRef(function(_param, ref) {
11547
- var className = _param.className, size = _param.size, label = _param.label, labelClassName = _param.labelClassName, props = _object_without_properties(_param, [
11603
+ var className = _param.className, size = _param.size, label = _param.label, labelClassName = _param.labelClassName, vertical = _param.vertical, icon = _param.icon, props = _object_without_properties(_param, [
11548
11604
  "className",
11549
11605
  "size",
11550
11606
  "label",
11551
- "labelClassName"
11607
+ "labelClassName",
11608
+ "vertical",
11609
+ "icon"
11552
11610
  ]);
11553
11611
  var Component = label ? "div" : React36.Fragment;
11554
11612
  return /* @__PURE__ */ jsxs29(Component, {
11555
- className: "flex items-center justify-center space-x-1.5 text-Colors-Text-Default",
11613
+ className: cn("flex items-center justify-center space-x-1.5 text-Colors-Text-Default", vertical && "flex-col space-x-0 space-y-1.5"),
11556
11614
  children: [
11557
11615
  /* @__PURE__ */ jsx52(SwitchPrimitives.Root, _object_spread_props(_object_spread({
11558
11616
  className: cn(switchRootVariants({
11559
- size: size
11560
- }), className, "")
11617
+ size: size,
11618
+ vertical: vertical
11619
+ }), className, vertical && "flex-col")
11561
11620
  }, props), {
11562
11621
  ref: ref,
11563
11622
  children: /* @__PURE__ */ jsx52(SwitchPrimitives.Thumb, {
11564
11623
  className: cn(switchThumbVariants({
11565
- size: size
11566
- }))
11624
+ size: size,
11625
+ vertical: vertical
11626
+ }), "flex items-center justify-center"),
11627
+ children: icon && /* @__PURE__ */ jsx52(Icon, {
11628
+ component: icon,
11629
+ className: switchThumbIconVariants({
11630
+ size: size
11631
+ })
11632
+ })
11567
11633
  })
11568
11634
  })),
11569
11635
  label && /* @__PURE__ */ jsx52("span", {