@sarunyu/system-one 1.0.3 → 1.0.5

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.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
3
  import * as React from "react";
3
4
  import React__default, { forwardRef, useState, useCallback, useRef, useEffect, useMemo, useLayoutEffect } from "react";
@@ -2756,7 +2757,7 @@ const Tab = forwardRef(function Tab2({
2756
2757
  icon,
2757
2758
  notification
2758
2759
  }, ref) {
2759
- const s = sizeClasses[size];
2760
+ const s = sizeClasses[size] ?? sizeClasses.md;
2760
2761
  const hasIcon = Boolean(icon);
2761
2762
  const hasNotification = notification !== void 0 && notification !== null;
2762
2763
  const renderedIcon = icon === true ? /* @__PURE__ */ jsx(DefaultTabIcon, { className: s.iconSize }) : icon;
@@ -2833,7 +2834,7 @@ const Tab = forwardRef(function Tab2({
2833
2834
  });
2834
2835
  Tab.displayName = "Tab";
2835
2836
  const TabGroup = forwardRef(
2836
- function TabGroup2({ items, activeId, size = "md", onChange, className }, ref) {
2837
+ function TabGroup2({ items = [], activeId, size = "md", onChange, className }, ref) {
2837
2838
  return /* @__PURE__ */ jsx("div", { ref, role: "tablist", className: cn("flex", className), children: items.map((item) => /* @__PURE__ */ jsx(
2838
2839
  Tab,
2839
2840
  {
@@ -2922,8 +2923,8 @@ const Tag = forwardRef(function Tag2({
2922
2923
  className
2923
2924
  }, ref) {
2924
2925
  const isDisabled = state === "disabled";
2925
- const s = sizeStyles[size];
2926
- const v = variantStyles[variant];
2926
+ const s = sizeStyles[size] ?? sizeStyles.large;
2927
+ const v = variantStyles[variant] ?? variantStyles.gray;
2927
2928
  const bgClass = state === "disabled" ? "bg-disabled-bg" : state === "hover" ? "bg-hover-bg" : v.bg;
2928
2929
  const textClass = isDisabled ? "text-disabled" : v.text;
2929
2930
  return /* @__PURE__ */ jsxs(