@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.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
4
|
const jsxRuntime = require("react/jsx-runtime");
|
|
@@ -2775,7 +2776,7 @@ const Tab = React.forwardRef(function Tab2({
|
|
|
2775
2776
|
icon,
|
|
2776
2777
|
notification
|
|
2777
2778
|
}, ref) {
|
|
2778
|
-
const s = sizeClasses[size];
|
|
2779
|
+
const s = sizeClasses[size] ?? sizeClasses.md;
|
|
2779
2780
|
const hasIcon = Boolean(icon);
|
|
2780
2781
|
const hasNotification = notification !== void 0 && notification !== null;
|
|
2781
2782
|
const renderedIcon = icon === true ? /* @__PURE__ */ jsxRuntime.jsx(DefaultTabIcon, { className: s.iconSize }) : icon;
|
|
@@ -2852,7 +2853,7 @@ const Tab = React.forwardRef(function Tab2({
|
|
|
2852
2853
|
});
|
|
2853
2854
|
Tab.displayName = "Tab";
|
|
2854
2855
|
const TabGroup = React.forwardRef(
|
|
2855
|
-
function TabGroup2({ items, activeId, size = "md", onChange, className }, ref) {
|
|
2856
|
+
function TabGroup2({ items = [], activeId, size = "md", onChange, className }, ref) {
|
|
2856
2857
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, role: "tablist", className: cn("flex", className), children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2857
2858
|
Tab,
|
|
2858
2859
|
{
|
|
@@ -2941,8 +2942,8 @@ const Tag = React.forwardRef(function Tag2({
|
|
|
2941
2942
|
className
|
|
2942
2943
|
}, ref) {
|
|
2943
2944
|
const isDisabled = state === "disabled";
|
|
2944
|
-
const s = sizeStyles[size];
|
|
2945
|
-
const v = variantStyles[variant];
|
|
2945
|
+
const s = sizeStyles[size] ?? sizeStyles.large;
|
|
2946
|
+
const v = variantStyles[variant] ?? variantStyles.gray;
|
|
2946
2947
|
const bgClass = state === "disabled" ? "bg-disabled-bg" : state === "hover" ? "bg-hover-bg" : v.bg;
|
|
2947
2948
|
const textClass = isDisabled ? "text-disabled" : v.text;
|
|
2948
2949
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|