myshell-react-lib 0.2.26 → 0.2.27

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
@@ -1264,7 +1264,7 @@ declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.Sw
1264
1264
  declare const TabsRoot: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
1265
1265
  declare const TabsList: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>>;
1266
1266
  declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1267
- type TItems = TabsPrimitive.TabsTriggerProps & {
1267
+ type TItems = {
1268
1268
  label?: string;
1269
1269
  value: string;
1270
1270
  count?: number | string;
@@ -1280,7 +1280,6 @@ type TItems = TabsPrimitive.TabsTriggerProps & {
1280
1280
  children?: string | React$1.ReactNode;
1281
1281
  className?: string;
1282
1282
  onClickCallback?: (value: string) => void;
1283
- forceMount?: true;
1284
1283
  };
1285
1284
  declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
1286
1285
  variant?: "button" | "underline" | "icon";
@@ -1295,6 +1294,7 @@ declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsPro
1295
1294
  contentClassName?: string;
1296
1295
  contentBoxClassName?: string;
1297
1296
  items?: TItems[];
1297
+ forceMount?: boolean;
1298
1298
  } & React$1.RefAttributes<HTMLDivElement>>;
1299
1299
  declare const Tab: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
1300
1300
  variant?: "button" | "underline" | "icon";
@@ -1313,7 +1313,10 @@ declare const Tab: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTrig
1313
1313
  hasUnRead?: boolean;
1314
1314
  onClickCallback?: (value: string) => void;
1315
1315
  } & React$1.RefAttributes<HTMLButtonElement>>;
1316
- declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1316
+ declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
1317
+ isActive?: boolean;
1318
+ isForceMount?: boolean;
1319
+ } & React$1.RefAttributes<HTMLDivElement>>;
1317
1320
 
1318
1321
  type TextareaProps = React$1.TextareaHTMLAttributes<HTMLTextAreaElement> & {
1319
1322
  maxLengthClassName?: string;
package/dist/index.d.ts CHANGED
@@ -1264,7 +1264,7 @@ declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchPrimitives.Sw
1264
1264
  declare const TabsRoot: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>>;
1265
1265
  declare const TabsList: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>>;
1266
1266
  declare const TabsTrigger: React$1.ForwardRefExoticComponent<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
1267
- type TItems = TabsPrimitive.TabsTriggerProps & {
1267
+ type TItems = {
1268
1268
  label?: string;
1269
1269
  value: string;
1270
1270
  count?: number | string;
@@ -1280,7 +1280,6 @@ type TItems = TabsPrimitive.TabsTriggerProps & {
1280
1280
  children?: string | React$1.ReactNode;
1281
1281
  className?: string;
1282
1282
  onClickCallback?: (value: string) => void;
1283
- forceMount?: true;
1284
1283
  };
1285
1284
  declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
1286
1285
  variant?: "button" | "underline" | "icon";
@@ -1295,6 +1294,7 @@ declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsPro
1295
1294
  contentClassName?: string;
1296
1295
  contentBoxClassName?: string;
1297
1296
  items?: TItems[];
1297
+ forceMount?: boolean;
1298
1298
  } & React$1.RefAttributes<HTMLDivElement>>;
1299
1299
  declare const Tab: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
1300
1300
  variant?: "button" | "underline" | "icon";
@@ -1313,7 +1313,10 @@ declare const Tab: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTrig
1313
1313
  hasUnRead?: boolean;
1314
1314
  onClickCallback?: (value: string) => void;
1315
1315
  } & React$1.RefAttributes<HTMLButtonElement>>;
1316
- declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
1316
+ declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
1317
+ isActive?: boolean;
1318
+ isForceMount?: boolean;
1319
+ } & React$1.RefAttributes<HTMLDivElement>>;
1317
1320
 
1318
1321
  type TextareaProps = React$1.TextareaHTMLAttributes<HTMLTextAreaElement> & {
1319
1322
  maxLengthClassName?: string;
package/dist/index.js CHANGED
@@ -12941,7 +12941,7 @@ var tabVariants = cva18("relative inline-flex h-full items-center whitespace-now
12941
12941
  }
12942
12942
  });
12943
12943
  var Tabs2 = React45.forwardRef(function(_param, ref) {
12944
- var className = _param.className, listClassName = _param.listClassName, listBoxClassName = _param.listBoxClassName, contentClassName = _param.contentClassName, contentBoxClassName = _param.contentBoxClassName, _param_variant = _param.variant, variant = _param_variant === void 0 ? "button" : _param_variant, _param_size = _param.size, size = _param_size === void 0 ? "lg" : _param_size, _param_isLink = _param.isLink, isLink = _param_isLink === void 0 ? false : _param_isLink, _param_rounded = _param.rounded, rounded = _param_rounded === void 0 ? "default" : _param_rounded, items = _param.items, props = _object_without_properties(_param, [
12944
+ var className = _param.className, listClassName = _param.listClassName, listBoxClassName = _param.listBoxClassName, contentClassName = _param.contentClassName, contentBoxClassName = _param.contentBoxClassName, _param_variant = _param.variant, variant = _param_variant === void 0 ? "button" : _param_variant, _param_size = _param.size, size = _param_size === void 0 ? "lg" : _param_size, _param_isLink = _param.isLink, isLink = _param_isLink === void 0 ? false : _param_isLink, _param_rounded = _param.rounded, rounded = _param_rounded === void 0 ? "default" : _param_rounded, items = _param.items, _param_forceMount = _param.forceMount, forceMount = _param_forceMount === void 0 ? false : _param_forceMount, props = _object_without_properties(_param, [
12945
12945
  "className",
12946
12946
  "listClassName",
12947
12947
  "listBoxClassName",
@@ -12951,7 +12951,8 @@ var Tabs2 = React45.forwardRef(function(_param, ref) {
12951
12951
  "size",
12952
12952
  "isLink",
12953
12953
  "rounded",
12954
- "items"
12954
+ "items",
12955
+ "forceMount"
12955
12956
  ]);
12956
12957
  return /* @__PURE__ */ jsxs38(TabsPrimitive.Root, _object_spread_props(_object_spread({
12957
12958
  ref: ref,
@@ -12984,7 +12985,8 @@ var Tabs2 = React45.forwardRef(function(_param, ref) {
12984
12985
  return /* @__PURE__ */ jsx58(TabsContent, {
12985
12986
  value: item.value,
12986
12987
  className: contentClassName,
12987
- forceMount: item.forceMount,
12988
+ isForceMount: forceMount,
12989
+ isActive: props.value === item.value,
12988
12990
  children: item.children
12989
12991
  }, item.value);
12990
12992
  })
@@ -13065,9 +13067,19 @@ var Tab = React45.forwardRef(function(_param, ref) {
13065
13067
  });
13066
13068
  Tab.displayName = TabsPrimitive.Trigger.displayName;
13067
13069
  var TabsContent = React45.forwardRef(function(_param, ref) {
13068
- var className = _param.className, props = _object_without_properties(_param, [
13069
- "className"
13070
+ var className = _param.className, isForceMount = _param.isForceMount, isActive = _param.isActive, props = _object_without_properties(_param, [
13071
+ "className",
13072
+ "isForceMount",
13073
+ "isActive"
13070
13074
  ]);
13075
+ if (isForceMount) {
13076
+ return /* @__PURE__ */ jsx58("div", _object_spread_props(_object_spread({
13077
+ ref: ref,
13078
+ className: cn("mt-2 ring-offset-background focus-visible:!outline-none focus-visible:ring-offset-0", isActive ? "block" : "hidden", className)
13079
+ }, props), {
13080
+ children: props.children
13081
+ }));
13082
+ }
13071
13083
  return /* @__PURE__ */ jsx58(TabsPrimitive.Content, _object_spread({
13072
13084
  ref: ref,
13073
13085
  className: cn("mt-2 ring-offset-background focus-visible:!outline-none focus-visible:ring-offset-0", className)