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 CHANGED
@@ -5387,7 +5387,7 @@ function clamp(value1, min3, max2) {
5387
5387
  return Math.min(Math.max(value1, min3), max2);
5388
5388
  }
5389
5389
  function isClient() {
5390
- return typeof window !== "undefined";
5390
+ return typeof window !== "undefined" && typeof document !== "undefined";
5391
5391
  }
5392
5392
  function isIosApp() {
5393
5393
  return isClient() && typeof navigator !== "undefined" && /iPhone|iPad|iPod/i.test(navigator.userAgent) && !!window.webkit;
@@ -6358,23 +6358,25 @@ var TooltipContent = React9.forwardRef(function(_param, ref) {
6358
6358
  "showArrow",
6359
6359
  "arrowClassName"
6360
6360
  ]);
6361
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(TooltipPrimitive.Content, _object_spread_props(_object_spread({
6362
- ref: ref,
6363
- align: align,
6364
- sideOffset: sideOffset,
6365
- alignOffset: alignOffset,
6366
- side: side,
6367
- 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)
6368
- }, props), {
6369
- children: [
6370
- props.children,
6371
- showArrow && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipArrow, {
6372
- width: 12,
6373
- height: 6,
6374
- 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)
6375
- })
6376
- ]
6377
- }));
6361
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipPrimitive.Portal, {
6362
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(TooltipPrimitive.Content, _object_spread_props(_object_spread({
6363
+ ref: ref,
6364
+ align: align,
6365
+ sideOffset: sideOffset,
6366
+ alignOffset: alignOffset,
6367
+ side: side,
6368
+ 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)
6369
+ }, props), {
6370
+ children: [
6371
+ props.children,
6372
+ showArrow && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipArrow, {
6373
+ width: 12,
6374
+ height: 6,
6375
+ 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)
6376
+ })
6377
+ ]
6378
+ }))
6379
+ });
6378
6380
  });
6379
6381
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
6380
6382
  // src/components/button/icon-button.styles.ts
@@ -6404,6 +6406,11 @@ var iconButtonVariants = (0, import_class_variance_authority6.cva)("shrink-0 inl
6404
6406
  }
6405
6407
  },
6406
6408
  compoundVariants: [
6409
+ {
6410
+ variant: "primary",
6411
+ color: "default",
6412
+ 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"
6413
+ },
6407
6414
  {
6408
6415
  variant: "primary",
6409
6416
  color: "brand",
@@ -6452,7 +6459,7 @@ var iconButtonVariants = (0, import_class_variance_authority6.cva)("shrink-0 inl
6452
6459
  ],
6453
6460
  defaultVariants: {
6454
6461
  variant: "primary",
6455
- color: "default",
6462
+ color: "brand",
6456
6463
  size: "lg"
6457
6464
  }
6458
6465
  });
@@ -12291,12 +12298,12 @@ var tabListVariants = (0, import_class_variance_authority18.cva)("relative inlin
12291
12298
  size: {
12292
12299
  sm: "h-6",
12293
12300
  md: "h-9",
12294
- lg: "h-12"
12301
+ lg: "h-11"
12295
12302
  },
12296
12303
  variant: {
12297
- button: "w-full border border-Colors-Border-Default bg-Colors-Background-Neutral-Primary-Default p-0.5",
12298
- underline: "border-b border-Colors-Border-Default space-x-6",
12299
- icon: "border border-Colors-Border-Default bg-Colors-Background-Neutral-Primary-Default p-0.5"
12304
+ button: "border border-Colors-Border-Default bg-cc-Tabbar-bg-default text-cc-Tabbar-fg-default p-0.5",
12305
+ underline: "border-b border-Colors-Border-Default space-x-6 rounded-none",
12306
+ icon: "border border-Colors-Border-Default bg-cc-Tabbar-bg-default text-cc-Tabbar-fg-default p-0.5"
12300
12307
  },
12301
12308
  rounded: {
12302
12309
  default: "",
@@ -12337,17 +12344,27 @@ var tabListVariants = (0, import_class_variance_authority18.cva)("relative inlin
12337
12344
  {
12338
12345
  rounded: "default",
12339
12346
  size: "lg",
12340
- className: "rounded-xl"
12347
+ className: "rounded-md"
12341
12348
  },
12342
12349
  {
12343
12350
  rounded: "default",
12344
12351
  size: "md",
12345
- className: "rounded-lg"
12352
+ className: "rounded-md"
12346
12353
  },
12347
12354
  {
12348
12355
  rounded: "default",
12349
12356
  size: "sm",
12350
- className: "rounded-md"
12357
+ className: "rounded"
12358
+ },
12359
+ {
12360
+ variant: "underline",
12361
+ rounded: "default",
12362
+ className: "rounded-none"
12363
+ },
12364
+ {
12365
+ variant: "underline",
12366
+ rounded: "full",
12367
+ className: "rounded-none"
12351
12368
  }
12352
12369
  ],
12353
12370
  defaultVariants: {
@@ -12356,17 +12373,17 @@ var tabListVariants = (0, import_class_variance_authority18.cva)("relative inlin
12356
12373
  rounded: "default"
12357
12374
  }
12358
12375
  });
12359
- var tabVariants = (0, import_class_variance_authority18.cva)("relative inline-flex w-full h-full items-center justify-center overflow-hidden whitespace-nowrap font-medium text-Colors-Text-Subtler aria-[selected=true]:text-Colors-Text-Brand-Default aria-[selected=true]:bg-Colors-Background-Normal-Primary-Active aria-[selected=true]:shadow-background-default [&>div>span]:hover:text-Colors-Text-Brand-Default disabled:pointer-events-none disabled:text-Colors-Text-Disabled [&>div>span]:disabled:text-Colors-Text-Disabled data-[state=active]:text-Colors-Text-Brand-Default", {
12376
+ var tabVariants = (0, import_class_variance_authority18.cva)("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", {
12360
12377
  variants: {
12361
12378
  size: {
12362
- sm: "text-xs",
12363
- md: "text-sm",
12364
- lg: "text-base"
12379
+ sm: "text-xs h-4.5",
12380
+ md: "text-sm h-7.5",
12381
+ lg: "text-base h-9.5"
12365
12382
  },
12366
12383
  variant: {
12367
- button: "px-3 py-2.5 flex-1 rounded-full transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-Colors-Background-Normal-Primary-Active data-[state=active]:shadow-background-default ",
12368
- underline: "flex items-baseline pb-2 rounded-none data-[state=active]:border-b-2 data-[state=active]:border-b-brand",
12369
- icon: "px-4"
12384
+ button: "aria-[selected=true]:bg-cc-Tabbar-bg-select aria-[selected=true]:shadow-background-default",
12385
+ underline: "shadow-none aria-[selected=true]:border-cc-Tabbar-border-default aria-[selected=true]:border-b-2 rounded-none",
12386
+ icon: "aria-[selected=true]:bg-cc-Tabbar-bg-select aria-[selected=true]:shadow-background-default px-4"
12370
12387
  },
12371
12388
  rounded: {
12372
12389
  default: "",
@@ -12377,17 +12394,42 @@ var tabVariants = (0, import_class_variance_authority18.cva)("relative inline-fl
12377
12394
  {
12378
12395
  rounded: "default",
12379
12396
  size: "lg",
12380
- className: "rounded-xl"
12397
+ className: "rounded-md"
12381
12398
  },
12382
12399
  {
12383
12400
  rounded: "default",
12384
12401
  size: "md",
12385
- className: "rounded-lg"
12402
+ className: "rounded-md"
12386
12403
  },
12387
12404
  {
12388
12405
  rounded: "default",
12389
12406
  size: "sm",
12390
- className: "rounded-md"
12407
+ className: "rounded"
12408
+ },
12409
+ {
12410
+ variant: "underline",
12411
+ rounded: "default",
12412
+ className: "rounded-none"
12413
+ },
12414
+ {
12415
+ variant: "underline",
12416
+ rounded: "full",
12417
+ className: "rounded-none"
12418
+ },
12419
+ {
12420
+ variant: "underline",
12421
+ size: "sm",
12422
+ className: "h-4"
12423
+ },
12424
+ {
12425
+ variant: "underline",
12426
+ size: "md",
12427
+ className: "h-6.5"
12428
+ },
12429
+ {
12430
+ variant: "underline",
12431
+ size: "lg",
12432
+ className: "h-[31px]"
12391
12433
  }
12392
12434
  ],
12393
12435
  defaultVariants: {
@@ -12415,11 +12457,11 @@ var Tabs = React37.forwardRef(function(_param, ref) {
12415
12457
  className: "w-full flex justify-center items-center",
12416
12458
  children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TabsPrimitive.List, _object_spread_props(_object_spread({
12417
12459
  ref: ref,
12418
- className: cn("", tabListVariants({
12460
+ className: cn(tabListVariants({
12419
12461
  variant: variant,
12420
12462
  size: size,
12421
12463
  rounded: rounded
12422
- }), listClassName)
12464
+ }), "", listClassName)
12423
12465
  }, props), {
12424
12466
  children: items === null || items === void 0 ? void 0 : items.map(function(item) {
12425
12467
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Tab, _object_spread({
@@ -12460,7 +12502,7 @@ var Tab = React37.forwardRef(function(_param, ref) {
12460
12502
  "onClickCallback"
12461
12503
  ]);
12462
12504
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Tooltip, _object_spread_props(_object_spread({
12463
- triggerClassName: "w-full h-full flex-1"
12505
+ triggerClassName: cn("w-full h-full flex-1 flex justify-center items-center", variant === "underline" && "justify-center items-end")
12464
12506
  }, tooltip), {
12465
12507
  children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TabsPrimitive.Trigger, _object_spread_props(_object_spread({
12466
12508
  ref: ref,
@@ -12492,8 +12534,8 @@ var Tab = React37.forwardRef(function(_param, ref) {
12492
12534
  }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", {
12493
12535
  className: "relative flex justify-center items-center",
12494
12536
  children: [
12495
- label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, {
12496
- className: "text-inherit",
12537
+ label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", {
12538
+ className: cn("text-inherit"),
12497
12539
  children: label
12498
12540
  }),
12499
12541
  icon && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, {