@syscore/ui-library 1.25.0 → 1.27.3

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.es.js CHANGED
@@ -87,13 +87,13 @@ const sizeTextClasses = {
87
87
  icon: ""
88
88
  };
89
89
  const Button = React.forwardRef(
90
- ({ className, variant: variant2, size, ftMadeFont, mazzardSoftFont, children, style, ...props }, ref) => {
90
+ ({ className, variant, size, ftMadeFont, mazzardSoftFont, children, style, ...props }, ref) => {
91
91
  const textClass = sizeTextClasses[size || "large"];
92
92
  return /* @__PURE__ */ jsx(
93
93
  "button",
94
94
  {
95
95
  className: cn(
96
- buttonVariants({ variant: variant2, size }),
96
+ buttonVariants({ variant, size }),
97
97
  ftMadeFont && "font-ftMade",
98
98
  mazzardSoftFont && "font-mazzardSoft",
99
99
  className
@@ -431,7 +431,7 @@ const AccordionListRow = React.forwardRef(
431
431
  rightContent,
432
432
  onClick,
433
433
  className,
434
- variant: variant2 = "default",
434
+ variant = "default",
435
435
  ...props
436
436
  }, ref) => {
437
437
  return /* @__PURE__ */ jsxs("div", { ref, onClick, className: cn(className), ...props, children: [
@@ -488,13 +488,13 @@ const defaultElementMap = {
488
488
  "number-base": "span"
489
489
  };
490
490
  const Text = React.forwardRef(
491
- ({ className, variant: variant2 = "body-base", as, ...props }, ref) => {
492
- const Component = as || defaultElementMap[variant2];
491
+ ({ className, variant = "body-base", as, ...props }, ref) => {
492
+ const Component = as || defaultElementMap[variant];
493
493
  return /* @__PURE__ */ jsx(
494
494
  Component,
495
495
  {
496
496
  ref,
497
- className: cn(typographyVariants({ variant: variant2 }), className),
497
+ className: cn(typographyVariants({ variant }), className),
498
498
  ...props
499
499
  }
500
500
  );
@@ -508,7 +508,7 @@ const List = React.forwardRef(
508
508
  );
509
509
  List.displayName = "List";
510
510
  const ListItem = React.forwardRef(
511
- ({ className, variant: variant2 = "body-base", children, ...props }, ref) => {
511
+ ({ className, variant = "body-base", children, ...props }, ref) => {
512
512
  return /* @__PURE__ */ jsxs(
513
513
  "li",
514
514
  {
@@ -529,7 +529,7 @@ const ListItem = React.forwardRef(
529
529
  children: /* @__PURE__ */ jsx("circle", { cx: "2", cy: "2", r: "2", fill: "#71747D" })
530
530
  }
531
531
  ),
532
- /* @__PURE__ */ jsx("span", { className: cn(typographyVariants({ variant: variant2 })), children })
532
+ /* @__PURE__ */ jsx("span", { className: cn(typographyVariants({ variant })), children })
533
533
  ]
534
534
  }
535
535
  );
@@ -809,13 +809,13 @@ const sheetVariants = cva(
809
809
  }
810
810
  }
811
811
  );
812
- const SheetContent = React.forwardRef(({ side: side2 = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
812
+ const SheetContent = React.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
813
813
  /* @__PURE__ */ jsx(SheetOverlay, {}),
814
814
  /* @__PURE__ */ jsxs(
815
815
  SheetPrimitive.Content,
816
816
  {
817
817
  ref,
818
- className: cn(sheetVariants({ side: side2 }), className),
818
+ className: cn(sheetVariants({ side }), className),
819
819
  ...props,
820
820
  children: [
821
821
  children,
@@ -1027,9 +1027,9 @@ function TooltipTrigger({
1027
1027
  }
1028
1028
  function TooltipContent({
1029
1029
  className,
1030
- variant: variant2,
1030
+ variant,
1031
1031
  sideOffset = 0,
1032
- side: side2 = "bottom",
1032
+ side = "bottom",
1033
1033
  children,
1034
1034
  alignOffset = 0,
1035
1035
  hideClose = false,
@@ -1062,11 +1062,11 @@ function TooltipContent({
1062
1062
  "data-slot": "tooltip-content",
1063
1063
  sideOffset,
1064
1064
  alignOffset,
1065
- side: side2,
1066
- className: cn(tooltipContentVariants({ variant: variant2 }), className),
1065
+ side,
1066
+ className: cn(tooltipContentVariants({ variant }), className),
1067
1067
  ...props,
1068
1068
  children: [
1069
- variant2 !== "simple" && /* @__PURE__ */ jsx("div", { className: "tooltip-arrow", children: /* @__PURE__ */ jsx(
1069
+ variant !== "simple" && /* @__PURE__ */ jsx("div", { className: "tooltip-arrow", children: /* @__PURE__ */ jsx(
1070
1070
  "svg",
1071
1071
  {
1072
1072
  xmlns: "http://www.w3.org/2000/svg",
@@ -1083,7 +1083,7 @@ function TooltipContent({
1083
1083
  )
1084
1084
  }
1085
1085
  ) }),
1086
- variant2 !== "simple" && !hideClose && /* @__PURE__ */ jsx(ToggleClose, {}),
1086
+ variant !== "simple" && !hideClose && /* @__PURE__ */ jsx(ToggleClose, {}),
1087
1087
  children
1088
1088
  ]
1089
1089
  }
@@ -1154,10 +1154,10 @@ const SidebarProvider = React.forwardRef(
1154
1154
  window.addEventListener("keydown", handleKeyDown);
1155
1155
  return () => window.removeEventListener("keydown", handleKeyDown);
1156
1156
  }, [toggleSidebar]);
1157
- const state2 = open ? "expanded" : "collapsed";
1157
+ const state = open ? "expanded" : "collapsed";
1158
1158
  const contextValue = React.useMemo(
1159
1159
  () => ({
1160
- state: state2,
1160
+ state,
1161
1161
  open,
1162
1162
  setOpen,
1163
1163
  isMobile,
@@ -1166,7 +1166,7 @@ const SidebarProvider = React.forwardRef(
1166
1166
  toggleSidebar
1167
1167
  }),
1168
1168
  [
1169
- state2,
1169
+ state,
1170
1170
  open,
1171
1171
  setOpen,
1172
1172
  isMobile,
@@ -1197,15 +1197,15 @@ const SidebarProvider = React.forwardRef(
1197
1197
  SidebarProvider.displayName = "SidebarProvider";
1198
1198
  const Sidebar = React.forwardRef(
1199
1199
  ({
1200
- side: side2 = "left",
1201
- variant: variant2 = "sidebar",
1202
- collapsible: collapsible2 = "offcanvas",
1200
+ side = "left",
1201
+ variant = "sidebar",
1202
+ collapsible = "offcanvas",
1203
1203
  className,
1204
1204
  children,
1205
1205
  ...props
1206
1206
  }, ref) => {
1207
- const { isMobile, state: state2, openMobile, setOpenMobile } = useSidebar();
1208
- if (collapsible2 === "none") {
1207
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
1208
+ if (collapsible === "none") {
1209
1209
  return /* @__PURE__ */ jsx(
1210
1210
  "div",
1211
1211
  {
@@ -1229,7 +1229,7 @@ const Sidebar = React.forwardRef(
1229
1229
  style: {
1230
1230
  "--sidebar-width": SIDEBAR_WIDTH_MOBILE
1231
1231
  },
1232
- side: side2,
1232
+ side,
1233
1233
  children: /* @__PURE__ */ jsx("div", { className: "sidebar-mobile-content", children })
1234
1234
  }
1235
1235
  ) });
@@ -1239,10 +1239,10 @@ const Sidebar = React.forwardRef(
1239
1239
  {
1240
1240
  ref,
1241
1241
  className: "sidebar-base peer",
1242
- "data-state": state2,
1243
- "data-collapsible": state2 === "collapsed" ? collapsible2 : "",
1244
- "data-variant": variant2,
1245
- "data-side": side2,
1242
+ "data-state": state,
1243
+ "data-collapsible": state === "collapsed" ? collapsible : "",
1244
+ "data-variant": variant,
1245
+ "data-side": side,
1246
1246
  children: [
1247
1247
  /* @__PURE__ */ jsx("div", { className: "sidebar-base" }),
1248
1248
  /* @__PURE__ */ jsx(
@@ -1252,16 +1252,16 @@ const Sidebar = React.forwardRef(
1252
1252
  "sidebar-container",
1253
1253
  className
1254
1254
  ),
1255
- "data-side": side2,
1256
- "data-collapsible": state2 === "collapsed" ? collapsible2 : "",
1257
- "data-variant": variant2,
1255
+ "data-side": side,
1256
+ "data-collapsible": state === "collapsed" ? collapsible : "",
1257
+ "data-variant": variant,
1258
1258
  ...props,
1259
1259
  children: /* @__PURE__ */ jsx(
1260
1260
  "div",
1261
1261
  {
1262
1262
  "data-sidebar": "sidebar",
1263
1263
  className: "sidebar-inner",
1264
- "data-variant": variant2,
1264
+ "data-variant": variant,
1265
1265
  children
1266
1266
  }
1267
1267
  )
@@ -1296,7 +1296,7 @@ const SidebarTrigger = React.forwardRef(({ className, onClick, ...props }, ref)
1296
1296
  );
1297
1297
  });
1298
1298
  SidebarTrigger.displayName = "SidebarTrigger";
1299
- const SidebarRail = React.forwardRef(({ className, ...props }, ref) => {
1299
+ const SidebarRail = React.forwardRef(({ className, side, state, collapsible, ...props }, ref) => {
1300
1300
  const { toggleSidebar } = useSidebar();
1301
1301
  return /* @__PURE__ */ jsx(
1302
1302
  "button",
@@ -1319,7 +1319,7 @@ const SidebarRail = React.forwardRef(({ className, ...props }, ref) => {
1319
1319
  );
1320
1320
  });
1321
1321
  SidebarRail.displayName = "SidebarRail";
1322
- const SidebarInset = React.forwardRef(({ className, ...props }, ref) => {
1322
+ const SidebarInset = React.forwardRef(({ className, state, variant, ...props }, ref) => {
1323
1323
  return /* @__PURE__ */ jsx(
1324
1324
  "main",
1325
1325
  {
@@ -1499,14 +1499,14 @@ const SidebarMenuButton = React.forwardRef(
1499
1499
  ({
1500
1500
  asChild = false,
1501
1501
  isActive = false,
1502
- variant: variant2 = "default",
1502
+ variant = "default",
1503
1503
  size = "default",
1504
1504
  tooltip,
1505
1505
  className,
1506
1506
  ...props
1507
1507
  }, ref) => {
1508
1508
  const Comp = asChild ? Slot : "button";
1509
- const { isMobile, state: state2 } = useSidebar();
1509
+ const { isMobile, state } = useSidebar();
1510
1510
  const button = /* @__PURE__ */ jsx(
1511
1511
  Comp,
1512
1512
  {
@@ -1514,7 +1514,7 @@ const SidebarMenuButton = React.forwardRef(
1514
1514
  "data-sidebar": "menu-button",
1515
1515
  "data-size": size,
1516
1516
  "data-active": isActive,
1517
- className: cn(sidebarMenuButtonVariants({ variant: variant2, size }), className),
1517
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className),
1518
1518
  ...props
1519
1519
  }
1520
1520
  );
@@ -1533,7 +1533,7 @@ const SidebarMenuButton = React.forwardRef(
1533
1533
  {
1534
1534
  side: "right",
1535
1535
  align: "center",
1536
- hidden: state2 !== "collapsed" || isMobile,
1536
+ hidden: state !== "collapsed" || isMobile,
1537
1537
  ...tooltip
1538
1538
  }
1539
1539
  )
@@ -1543,7 +1543,7 @@ const SidebarMenuButton = React.forwardRef(
1543
1543
  SidebarMenuButton.displayName = "SidebarMenuButton";
1544
1544
  const SidebarMenuAction = React.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
1545
1545
  const Comp = asChild ? Slot : "button";
1546
- const { state: state2 } = useSidebar();
1546
+ const { state } = useSidebar();
1547
1547
  return /* @__PURE__ */ jsx(
1548
1548
  Comp,
1549
1549
  {
@@ -1638,7 +1638,6 @@ const SidebarMenuSubButton = React.forwardRef(({ asChild = false, size = "md", i
1638
1638
  size === "md" && "sidebar-menu-sub-button--size-md",
1639
1639
  className
1640
1640
  ),
1641
- "data-size": size,
1642
1641
  ...props
1643
1642
  }
1644
1643
  );
@@ -1978,17 +1977,17 @@ const ToggleGroupContext = React.createContext({
1978
1977
  size: "default",
1979
1978
  variant: "default"
1980
1979
  });
1981
- const ToggleGroup = React.forwardRef(({ className, variant: variant2, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
1980
+ const ToggleGroup = React.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
1982
1981
  ToggleGroupPrimitive.Root,
1983
1982
  {
1984
1983
  ref,
1985
1984
  className: cn("toggle-group", className),
1986
1985
  ...props,
1987
- children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant: variant2, size }, children })
1986
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
1988
1987
  }
1989
1988
  ));
1990
1989
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
1991
- const ToggleGroupItem = React.forwardRef(({ className, children, variant: variant2, size, ...props }, ref) => {
1990
+ const ToggleGroupItem = React.forwardRef(({ className, children, variant, size, ...props }, ref) => {
1992
1991
  const context = React.useContext(ToggleGroupContext);
1993
1992
  return /* @__PURE__ */ jsx(
1994
1993
  ToggleGroupPrimitive.Item,
@@ -1996,7 +1995,7 @@ const ToggleGroupItem = React.forwardRef(({ className, children, variant: varian
1996
1995
  ref,
1997
1996
  className: cn(
1998
1997
  toggleVariants({
1999
- variant: context.variant || variant2,
1998
+ variant: context.variant || variant,
2000
1999
  size: context.size || size
2001
2000
  }),
2002
2001
  className
@@ -2098,8 +2097,8 @@ const badgeVariants = cva(
2098
2097
  }
2099
2098
  }
2100
2099
  );
2101
- function Badge({ className, variant: variant2, ...props }) {
2102
- return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant: variant2 }), className), ...props });
2100
+ function Badge({ className, variant, ...props }) {
2101
+ return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
2103
2102
  }
2104
2103
  const alertVariants = cva(
2105
2104
  "alert",
@@ -2115,12 +2114,12 @@ const alertVariants = cva(
2115
2114
  }
2116
2115
  }
2117
2116
  );
2118
- const Alert = React.forwardRef(({ className, variant: variant2, ...props }, ref) => /* @__PURE__ */ jsx(
2117
+ const Alert = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
2119
2118
  "div",
2120
2119
  {
2121
2120
  ref,
2122
2121
  role: "alert",
2123
- className: cn(alertVariants({ variant: variant2 }), className),
2122
+ className: cn(alertVariants({ variant }), className),
2124
2123
  ...props
2125
2124
  }
2126
2125
  ));
@@ -2706,7 +2705,7 @@ const getStatusClass = (status, colorScheme = "light") => {
2706
2705
  const Tag = React.forwardRef(
2707
2706
  ({
2708
2707
  children,
2709
- variant: variant2 = "text",
2708
+ variant = "text",
2710
2709
  active = false,
2711
2710
  status,
2712
2711
  colorScheme = "light",
@@ -2736,7 +2735,7 @@ const Tag = React.forwardRef(
2736
2735
  }
2737
2736
  );
2738
2737
  }
2739
- if (variant2 === "code") {
2738
+ if (variant === "code") {
2740
2739
  return /* @__PURE__ */ jsx(
2741
2740
  "button",
2742
2741
  {
@@ -2988,7 +2987,7 @@ function TabsTrigger({
2988
2987
  value,
2989
2988
  children,
2990
2989
  className,
2991
- variant: variant2 = "default"
2990
+ variant = "default"
2992
2991
  }) {
2993
2992
  const { selectedValue, setSelectedValue, registerValue } = useTabsContext();
2994
2993
  const { registerRef } = useTabsNavContext();
@@ -3008,7 +3007,7 @@ function TabsTrigger({
3008
3007
  "button",
3009
3008
  {
3010
3009
  className: cn("tabs-nav-button", className),
3011
- "data-variant": variant2,
3010
+ "data-variant": variant,
3012
3011
  onClick: handleClick,
3013
3012
  ref: refCallback,
3014
3013
  children: /* @__PURE__ */ jsx(
@@ -3814,13 +3813,13 @@ const CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
3814
3813
  });
3815
3814
  CarouselItem.displayName = "CarouselItem";
3816
3815
  const CarouselPrevious = React.forwardRef(
3817
- ({ className, variant: variant2 = "general-secondary", size = "icon", ...props }, ref) => {
3816
+ ({ className, variant = "general-secondary", size = "icon", ...props }, ref) => {
3818
3817
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
3819
3818
  return /* @__PURE__ */ jsxs(
3820
3819
  Button,
3821
3820
  {
3822
3821
  ref,
3823
- variant: variant2,
3822
+ variant,
3824
3823
  size,
3825
3824
  className: cn(
3826
3825
  "carousel-button carousel-button--previous",
@@ -3840,13 +3839,13 @@ const CarouselPrevious = React.forwardRef(
3840
3839
  );
3841
3840
  CarouselPrevious.displayName = "CarouselPrevious";
3842
3841
  const CarouselNext = React.forwardRef(
3843
- ({ className, variant: variant2 = "general-secondary", size = "icon", ...props }, ref) => {
3842
+ ({ className, variant = "general-secondary", size = "icon", ...props }, ref) => {
3844
3843
  const { orientation, scrollNext, canScrollNext } = useCarousel();
3845
3844
  return /* @__PURE__ */ jsxs(
3846
3845
  Button,
3847
3846
  {
3848
3847
  ref,
3849
- variant: variant2,
3848
+ variant,
3850
3849
  size,
3851
3850
  className: cn(
3852
3851
  "carousel-button carousel-button--next",
@@ -3892,12 +3891,12 @@ const toastVariants = cva(
3892
3891
  }
3893
3892
  }
3894
3893
  );
3895
- const Toast = React.forwardRef(({ className, variant: variant2, ...props }, ref) => {
3894
+ const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
3896
3895
  return /* @__PURE__ */ jsx(
3897
3896
  ToastPrimitives.Root,
3898
3897
  {
3899
3898
  ref,
3900
- className: cn(toastVariants({ variant: variant2 }), className),
3899
+ className: cn(toastVariants({ variant }), className),
3901
3900
  ...props
3902
3901
  }
3903
3902
  );
@@ -3962,17 +3961,17 @@ const addToRemoveQueue = (toastId) => {
3962
3961
  }, TOAST_REMOVE_DELAY);
3963
3962
  toastTimeouts.set(toastId, timeout);
3964
3963
  };
3965
- const reducer = (state2, action) => {
3964
+ const reducer = (state, action) => {
3966
3965
  switch (action.type) {
3967
3966
  case "ADD_TOAST":
3968
3967
  return {
3969
- ...state2,
3970
- toasts: [action.toast, ...state2.toasts].slice(0, TOAST_LIMIT)
3968
+ ...state,
3969
+ toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
3971
3970
  };
3972
3971
  case "UPDATE_TOAST":
3973
3972
  return {
3974
- ...state2,
3975
- toasts: state2.toasts.map(
3973
+ ...state,
3974
+ toasts: state.toasts.map(
3976
3975
  (t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
3977
3976
  )
3978
3977
  };
@@ -3981,13 +3980,13 @@ const reducer = (state2, action) => {
3981
3980
  if (toastId) {
3982
3981
  addToRemoveQueue(toastId);
3983
3982
  } else {
3984
- state2.toasts.forEach((toast2) => {
3983
+ state.toasts.forEach((toast2) => {
3985
3984
  addToRemoveQueue(toast2.id);
3986
3985
  });
3987
3986
  }
3988
3987
  return {
3989
- ...state2,
3990
- toasts: state2.toasts.map(
3988
+ ...state,
3989
+ toasts: state.toasts.map(
3991
3990
  (t) => t.id === toastId || toastId === void 0 ? {
3992
3991
  ...t,
3993
3992
  open: false
@@ -3998,13 +3997,13 @@ const reducer = (state2, action) => {
3998
3997
  case "REMOVE_TOAST":
3999
3998
  if (action.toastId === void 0) {
4000
3999
  return {
4001
- ...state2,
4000
+ ...state,
4002
4001
  toasts: []
4003
4002
  };
4004
4003
  }
4005
4004
  return {
4006
- ...state2,
4007
- toasts: state2.toasts.filter((t) => t.id !== action.toastId)
4005
+ ...state,
4006
+ toasts: state.toasts.filter((t) => t.id !== action.toastId)
4008
4007
  };
4009
4008
  }
4010
4009
  };
@@ -4041,7 +4040,7 @@ function toast({ ...props }) {
4041
4040
  };
4042
4041
  }
4043
4042
  function useToast() {
4044
- const [state2, setState] = React.useState(memoryState);
4043
+ const [state, setState] = React.useState(memoryState);
4045
4044
  React.useEffect(() => {
4046
4045
  listeners.push(setState);
4047
4046
  return () => {
@@ -4050,9 +4049,9 @@ function useToast() {
4050
4049
  listeners.splice(index, 1);
4051
4050
  }
4052
4051
  };
4053
- }, [state2]);
4052
+ }, [state]);
4054
4053
  return {
4055
- ...state2,
4054
+ ...state,
4056
4055
  toast,
4057
4056
  dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
4058
4057
  };
@@ -7095,9 +7094,9 @@ const VARIANT_COLORS = {
7095
7094
  };
7096
7095
  const UtilityTriangleInfo = ({
7097
7096
  className,
7098
- variant: variant2 = "low"
7097
+ variant = "low"
7099
7098
  }) => {
7100
- const { fill, stroke } = VARIANT_COLORS[variant2];
7099
+ const { fill, stroke } = VARIANT_COLORS[variant];
7101
7100
  return /* @__PURE__ */ jsx(
7102
7101
  "svg",
7103
7102
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syscore/ui-library",
3
- "version": "1.25.0",
3
+ "version": "1.27.3",
4
4
  "description": "A comprehensive React component library built with Radix UI, Tailwind CSS, and TypeScript",
5
5
  "private": false,
6
6
  "type": "module",