@geomak/ui 5.10.0 → 6.0.0
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 +210 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -26
- package/dist/index.d.ts +89 -26
- package/dist/index.js +211 -117
- package/dist/index.js.map +1 -1
- package/dist/styles.css +79 -27
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -958,131 +958,225 @@ function Tooltip({
|
|
|
958
958
|
] }) });
|
|
959
959
|
}
|
|
960
960
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
961
|
+
var TabsContext = React8.createContext(null);
|
|
962
|
+
function useTabsContext() {
|
|
963
|
+
const ctx = React8.useContext(TabsContext);
|
|
964
|
+
if (!ctx) throw new Error("Tabs.List / Tabs.Trigger / Tabs.Panel must be rendered inside <Tabs>.");
|
|
965
|
+
return ctx;
|
|
966
|
+
}
|
|
967
|
+
var SIZE = {
|
|
968
|
+
sm: { trigger: "h-8 text-xs px-2.5", icon: "h-3.5 w-3.5", add: "h-8 w-8" },
|
|
969
|
+
md: { trigger: "h-10 text-sm px-3", icon: "h-4 w-4", add: "h-10 w-9" },
|
|
970
|
+
lg: { trigger: "h-12 text-sm px-4", icon: "h-[18px] w-[18px]", add: "h-12 w-10" }
|
|
971
|
+
};
|
|
972
|
+
var MARKER_TRANSITION = { duration: 0.26, ease: [0.16, 1, 0.3, 1] };
|
|
961
973
|
function Tabs({
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
974
|
+
value,
|
|
975
|
+
defaultValue,
|
|
976
|
+
onValueChange,
|
|
977
|
+
variant = "underline",
|
|
978
|
+
size = "md",
|
|
979
|
+
orientation = "horizontal",
|
|
980
|
+
className = "",
|
|
981
|
+
style,
|
|
982
|
+
children
|
|
968
983
|
}) {
|
|
969
|
-
const
|
|
970
|
-
React8.
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
React8.
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
}
|
|
978
|
-
const exists = tabs.find((t) => t.key === value);
|
|
979
|
-
if (!exists) {
|
|
980
|
-
setValue(tabs[tabs.length - 1].key);
|
|
981
|
-
}
|
|
982
|
-
}, [tabs, value]);
|
|
983
|
-
const handleValueChange = (newValue) => {
|
|
984
|
-
const prev = tabs.find((t) => t.key === value);
|
|
985
|
-
const next = tabs.find((t) => t.key === newValue);
|
|
986
|
-
onTabChange?.(prev, next);
|
|
987
|
-
setValue(newValue);
|
|
988
|
-
};
|
|
989
|
-
const toPreviousTab = () => {
|
|
990
|
-
const idx = tabs.findIndex((t) => t.key === value);
|
|
991
|
-
if (idx > 0) handleValueChange(tabs[idx - 1].key);
|
|
992
|
-
};
|
|
993
|
-
const toNextTab = () => {
|
|
994
|
-
const idx = tabs.findIndex((t) => t.key === value);
|
|
995
|
-
if (idx < tabs.length - 1) handleValueChange(tabs[idx + 1].key);
|
|
984
|
+
const isControlled = value !== void 0;
|
|
985
|
+
const [internal, setInternal] = React8.useState(defaultValue);
|
|
986
|
+
const current = isControlled ? value : internal;
|
|
987
|
+
const reduced = !!framerMotion.useReducedMotion();
|
|
988
|
+
const indicatorId = React8.useId();
|
|
989
|
+
const handle = (next) => {
|
|
990
|
+
if (!isControlled) setInternal(next);
|
|
991
|
+
onValueChange?.(next);
|
|
996
992
|
};
|
|
997
|
-
|
|
998
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
993
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { value: current, variant, size, orientation, indicatorId, reduced }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
999
994
|
TabsPrimitive__namespace.Root,
|
|
995
|
+
{
|
|
996
|
+
value: current,
|
|
997
|
+
onValueChange: handle,
|
|
998
|
+
orientation,
|
|
999
|
+
className: [
|
|
1000
|
+
"flex min-w-0",
|
|
1001
|
+
orientation === "vertical" ? "flex-row gap-4" : "flex-col gap-3",
|
|
1002
|
+
className
|
|
1003
|
+
].filter(Boolean).join(" "),
|
|
1004
|
+
style,
|
|
1005
|
+
children
|
|
1006
|
+
}
|
|
1007
|
+
) });
|
|
1008
|
+
}
|
|
1009
|
+
function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
1010
|
+
const { variant, orientation, reduced } = useTabsContext();
|
|
1011
|
+
const horizontal = orientation === "horizontal";
|
|
1012
|
+
const scrollRef = React8.useRef(null);
|
|
1013
|
+
const [edges, setEdges] = React8.useState({ start: false, end: false });
|
|
1014
|
+
const scrollable = variant !== "segmented";
|
|
1015
|
+
React8.useLayoutEffect(() => {
|
|
1016
|
+
const el = scrollRef.current;
|
|
1017
|
+
if (!el || !scrollable) return;
|
|
1018
|
+
const update = () => {
|
|
1019
|
+
if (horizontal) {
|
|
1020
|
+
setEdges({
|
|
1021
|
+
start: el.scrollLeft > 1,
|
|
1022
|
+
end: el.scrollLeft + el.clientWidth < el.scrollWidth - 1
|
|
1023
|
+
});
|
|
1024
|
+
} else {
|
|
1025
|
+
setEdges({
|
|
1026
|
+
start: el.scrollTop > 1,
|
|
1027
|
+
end: el.scrollTop + el.clientHeight < el.scrollHeight - 1
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
};
|
|
1031
|
+
update();
|
|
1032
|
+
el.addEventListener("scroll", update, { passive: true });
|
|
1033
|
+
const ro = new ResizeObserver(update);
|
|
1034
|
+
ro.observe(el);
|
|
1035
|
+
return () => {
|
|
1036
|
+
el.removeEventListener("scroll", update);
|
|
1037
|
+
ro.disconnect();
|
|
1038
|
+
};
|
|
1039
|
+
}, [horizontal, scrollable, children]);
|
|
1040
|
+
const nudge = React8.useCallback((dir) => {
|
|
1041
|
+
const el = scrollRef.current;
|
|
1042
|
+
if (!el) return;
|
|
1043
|
+
const amount = (horizontal ? el.clientWidth : el.clientHeight) * 0.7 * dir;
|
|
1044
|
+
el.scrollBy({ [horizontal ? "left" : "top"]: amount, behavior: reduced ? "auto" : "smooth" });
|
|
1045
|
+
}, [horizontal, reduced]);
|
|
1046
|
+
const maskStyle = scrollable && (edges.start || edges.end) ? (() => {
|
|
1047
|
+
const dir = horizontal ? "to right" : "to bottom";
|
|
1048
|
+
const a = edges.start ? "transparent, black 36px" : "black";
|
|
1049
|
+
const b = edges.end ? "black calc(100% - 36px), transparent" : "black";
|
|
1050
|
+
const img = `linear-gradient(${dir}, ${a}, ${b})`;
|
|
1051
|
+
return { maskImage: img, WebkitMaskImage: img };
|
|
1052
|
+
})() : {};
|
|
1053
|
+
const trackClass = (() => {
|
|
1054
|
+
if (variant === "segmented") {
|
|
1055
|
+
return horizontal ? "inline-flex items-center gap-1 rounded-lg border border-border bg-surface-raised p-1 w-fit" : "inline-flex flex-col items-stretch gap-1 rounded-lg border border-border bg-surface-raised p-1 w-fit";
|
|
1056
|
+
}
|
|
1057
|
+
const hairline = horizontal ? "border-b border-border" : "border-r border-border";
|
|
1058
|
+
const align = variant === "enclosed" && horizontal ? "items-end" : "items-stretch";
|
|
1059
|
+
return `flex ${horizontal ? "flex-row" : "flex-col"} ${align} gap-1 ${hairline}`;
|
|
1060
|
+
})();
|
|
1061
|
+
const scrollClass = scrollable ? horizontal ? "overflow-x-auto overflow-y-hidden hidden-scrollbar" : "overflow-y-auto overflow-x-hidden hidden-scrollbar" : "";
|
|
1062
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ["relative flex min-w-0", horizontal ? "flex-row items-stretch" : "flex-col items-stretch", className].filter(Boolean).join(" "), children: [
|
|
1063
|
+
scrollable && edges.start && /* @__PURE__ */ jsxRuntime.jsx(Chevron, { side: "start", orientation, onClick: () => nudge(-1) }),
|
|
1064
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1065
|
+
TabsPrimitive__namespace.List,
|
|
1066
|
+
{
|
|
1067
|
+
ref: scrollRef,
|
|
1068
|
+
"aria-label": ariaLabel,
|
|
1069
|
+
className: [scrollClass, trackClass, "min-w-0 flex-1"].filter(Boolean).join(" "),
|
|
1070
|
+
style: maskStyle,
|
|
1071
|
+
children
|
|
1072
|
+
}
|
|
1073
|
+
),
|
|
1074
|
+
scrollable && edges.end && /* @__PURE__ */ jsxRuntime.jsx(Chevron, { side: "end", orientation, onClick: () => nudge(1) })
|
|
1075
|
+
] });
|
|
1076
|
+
}
|
|
1077
|
+
function Chevron({ side, orientation, onClick }) {
|
|
1078
|
+
const horizontal = orientation === "horizontal";
|
|
1079
|
+
const rotate = horizontal ? side === "start" ? "rotate-180" : "" : side === "start" ? "-rotate-90" : "rotate-90";
|
|
1080
|
+
const pos = horizontal ? side === "start" ? "left-0 top-1/2 -translate-y-1/2" : "right-0 top-1/2 -translate-y-1/2" : side === "start" ? "top-0 left-1/2 -translate-x-1/2" : "bottom-0 left-1/2 -translate-x-1/2";
|
|
1081
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1082
|
+
"button",
|
|
1083
|
+
{
|
|
1084
|
+
type: "button",
|
|
1085
|
+
"aria-label": side === "start" ? "Scroll tabs backward" : "Scroll tabs forward",
|
|
1086
|
+
onClick,
|
|
1087
|
+
className: `absolute z-20 ${pos} flex h-7 w-7 items-center justify-center rounded-full border border-border bg-surface text-foreground-secondary shadow-sm hover:text-foreground hover:bg-surface-raised transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent`,
|
|
1088
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: `h-4 w-4 ${rotate}`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
1089
|
+
}
|
|
1090
|
+
);
|
|
1091
|
+
}
|
|
1092
|
+
function TabsTrigger({ value, icon, badge, closeable, onClose, disabled, className = "", children }) {
|
|
1093
|
+
const { value: active, variant, size, orientation, indicatorId, reduced } = useTabsContext();
|
|
1094
|
+
const isActive = active === value;
|
|
1095
|
+
const horizontal = orientation === "horizontal";
|
|
1096
|
+
const sz = SIZE[size];
|
|
1097
|
+
const base = "group/trigger relative inline-flex items-center justify-center whitespace-nowrap font-medium select-none transition-colors duration-150 focus:outline-none disabled:opacity-40 disabled:cursor-not-allowed flex-shrink-0";
|
|
1098
|
+
const variantCls = variant === "segmented" ? `rounded-md ${isActive ? "text-accent" : "text-foreground-secondary hover:text-foreground"} focus-visible:text-accent` : variant === "enclosed" ? `${horizontal ? "rounded-t-md border border-b-0 -mb-px" : "rounded-l-md border border-r-0 -mr-px"} ${isActive ? "bg-surface border-border text-foreground" : "border-transparent text-foreground-secondary hover:text-foreground hover:bg-surface-raised"} focus-visible:text-accent` : `${isActive ? "text-accent" : "text-foreground-secondary hover:text-foreground"} focus-visible:text-accent`;
|
|
1099
|
+
const trigger = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1100
|
+
TabsPrimitive__namespace.Trigger,
|
|
1000
1101
|
{
|
|
1001
1102
|
value,
|
|
1002
|
-
|
|
1003
|
-
className: "
|
|
1103
|
+
disabled,
|
|
1104
|
+
className: [base, sz.trigger, closeable ? "pr-8" : "", variantCls, className].filter(Boolean).join(" "),
|
|
1004
1105
|
children: [
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
{
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
),
|
|
1016
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1017
|
-
|
|
1018
|
-
{
|
|
1019
|
-
"aria-label": "Tabs",
|
|
1020
|
-
className: "flex-1 flex items-center gap-1 overflow-x-auto overflow-y-hidden rounded-lg scroll-smooth snap-x snap-mandatory hidden-scrollbar",
|
|
1021
|
-
children: tabs.map((tab) => (
|
|
1022
|
-
// Trigger + close button are SIBLINGS, not nested.
|
|
1023
|
-
// Nesting a clickable element inside <button> is invalid
|
|
1024
|
-
// HTML and breaks keyboard activation of the inner one.
|
|
1025
|
-
// The wrapper carries `group` so the close button can
|
|
1026
|
-
// react to the trigger's `data-state=active` for styling.
|
|
1027
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1028
|
-
"div",
|
|
1029
|
-
{
|
|
1030
|
-
className: "snap-start snap-always relative flex items-center flex-1 min-w-[120px] max-w-[220px] flex-shrink-0 group",
|
|
1031
|
-
children: [
|
|
1032
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1033
|
-
TabsPrimitive__namespace.Trigger,
|
|
1034
|
-
{
|
|
1035
|
-
value: tab.key,
|
|
1036
|
-
className: `w-full ${tabsClosable ? "pr-8" : "pr-3"} pl-3 py-2 rounded-3xl cursor-pointer transition-all duration-200 select-none h-10 text-left
|
|
1037
|
-
text-foreground-secondary bg-surface-raised
|
|
1038
|
-
hover:bg-surface hover:text-foreground
|
|
1039
|
-
data-[state=active]:bg-accent data-[state=active]:text-accent-foreground
|
|
1040
|
-
focus:outline-none focus-visible:ring-2 focus-visible:ring-accent`,
|
|
1041
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm block", children: tab.title })
|
|
1042
|
-
}
|
|
1043
|
-
),
|
|
1044
|
-
tabsClosable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1045
|
-
"button",
|
|
1046
|
-
{
|
|
1047
|
-
type: "button",
|
|
1048
|
-
"aria-label": `Close ${tab.title}`,
|
|
1049
|
-
onClick: (e) => {
|
|
1050
|
-
e.stopPropagation();
|
|
1051
|
-
onTabClose?.(tab.key);
|
|
1052
|
-
},
|
|
1053
|
-
className: "absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-foreground-secondary group-data-[state=active]:text-accent-foreground hover:bg-black/10 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
1054
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1055
|
-
}
|
|
1056
|
-
)
|
|
1057
|
-
]
|
|
1058
|
-
},
|
|
1059
|
-
tab.key
|
|
1060
|
-
)
|
|
1061
|
-
))
|
|
1062
|
-
}
|
|
1063
|
-
),
|
|
1064
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1065
|
-
"button",
|
|
1066
|
-
{
|
|
1067
|
-
type: "button",
|
|
1068
|
-
onClick: toNextTab,
|
|
1069
|
-
"aria-label": "Next tab",
|
|
1070
|
-
className: "cursor-pointer rounded-lg transition-colors duration-150 hover:bg-surface-raised text-foreground-secondary hover:text-foreground flex-shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
1071
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-6 w-6", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
1072
|
-
}
|
|
1073
|
-
)
|
|
1106
|
+
variant === "segmented" && isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1107
|
+
framerMotion.motion.span,
|
|
1108
|
+
{
|
|
1109
|
+
layoutId: `${indicatorId}-seg`,
|
|
1110
|
+
className: "absolute inset-0 rounded-md bg-surface shadow-sm",
|
|
1111
|
+
transition: reduced ? { duration: 0 } : MARKER_TRANSITION,
|
|
1112
|
+
"aria-hidden": "true"
|
|
1113
|
+
}
|
|
1114
|
+
),
|
|
1115
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative z-[1] inline-flex items-center gap-2 min-w-0", children: [
|
|
1116
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `flex-shrink-0 inline-flex items-center justify-center ${sz.icon}`, children: icon }),
|
|
1117
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }),
|
|
1118
|
+
badge != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-0.5 inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-border px-1 text-[11px] font-semibold leading-none text-foreground-secondary group-data-[state=active]/trigger:bg-accent group-data-[state=active]/trigger:text-accent-foreground transition-colors", children: badge })
|
|
1074
1119
|
] }),
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1120
|
+
variant === "underline" && isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1121
|
+
framerMotion.motion.span,
|
|
1122
|
+
{
|
|
1123
|
+
layoutId: `${indicatorId}-line`,
|
|
1124
|
+
className: horizontal ? "absolute left-2 right-2 bottom-0 h-0.5 rounded-full bg-accent" : "absolute top-1.5 bottom-1.5 right-0 w-0.5 rounded-full bg-accent",
|
|
1125
|
+
transition: reduced ? { duration: 0 } : MARKER_TRANSITION,
|
|
1126
|
+
"aria-hidden": "true"
|
|
1127
|
+
}
|
|
1128
|
+
)
|
|
1082
1129
|
]
|
|
1083
1130
|
}
|
|
1084
1131
|
);
|
|
1132
|
+
if (!closeable) return trigger;
|
|
1133
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex items-center flex-shrink-0", children: [
|
|
1134
|
+
trigger,
|
|
1135
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1136
|
+
"button",
|
|
1137
|
+
{
|
|
1138
|
+
type: "button",
|
|
1139
|
+
"aria-label": "Close tab",
|
|
1140
|
+
onClick: (e) => {
|
|
1141
|
+
e.stopPropagation();
|
|
1142
|
+
onClose?.();
|
|
1143
|
+
},
|
|
1144
|
+
className: "absolute right-1.5 top-1/2 z-[2] -translate-y-1/2 inline-flex h-5 w-5 items-center justify-center rounded text-foreground-muted hover:text-status-error hover:bg-surface-raised transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-accent",
|
|
1145
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "12", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1146
|
+
}
|
|
1147
|
+
)
|
|
1148
|
+
] });
|
|
1085
1149
|
}
|
|
1150
|
+
function TabsAdd({ onClick, "aria-label": ariaLabel = "Add tab", className = "" }) {
|
|
1151
|
+
const { size } = useTabsContext();
|
|
1152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1153
|
+
"button",
|
|
1154
|
+
{
|
|
1155
|
+
type: "button",
|
|
1156
|
+
onClick,
|
|
1157
|
+
"aria-label": ariaLabel,
|
|
1158
|
+
className: `flex-shrink-0 inline-flex items-center justify-center rounded-md text-foreground-muted hover:text-foreground hover:bg-surface-raised transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent ${SIZE[size].add} ${className}`.trim(),
|
|
1159
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12h14" }) })
|
|
1160
|
+
}
|
|
1161
|
+
);
|
|
1162
|
+
}
|
|
1163
|
+
function TabsPanel({ value, keepMounted, className = "", style, children }) {
|
|
1164
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1165
|
+
TabsPrimitive__namespace.Content,
|
|
1166
|
+
{
|
|
1167
|
+
value,
|
|
1168
|
+
forceMount: keepMounted || void 0,
|
|
1169
|
+
className: ["min-w-0 flex-1 focus:outline-none data-[state=inactive]:hidden", className].filter(Boolean).join(" "),
|
|
1170
|
+
style,
|
|
1171
|
+
children
|
|
1172
|
+
}
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
Tabs.List = TabsList;
|
|
1176
|
+
Tabs.Trigger = TabsTrigger;
|
|
1177
|
+
Tabs.Panel = TabsPanel;
|
|
1178
|
+
Tabs.Add = TabsAdd;
|
|
1179
|
+
var Tabs_default = Tabs;
|
|
1086
1180
|
var isParent = (item) => Boolean(item.children && item.children.length > 0);
|
|
1087
1181
|
function TreeNodeItem({
|
|
1088
1182
|
item,
|
|
@@ -5013,7 +5107,7 @@ function TextArea({
|
|
|
5013
5107
|
}
|
|
5014
5108
|
);
|
|
5015
5109
|
}
|
|
5016
|
-
var
|
|
5110
|
+
var SIZE2 = {
|
|
5017
5111
|
sm: { h: "h-control-sm", text: "text-xs", pad: "px-2.5" },
|
|
5018
5112
|
md: { h: "h-control-md", text: "text-sm", pad: "px-3.5" },
|
|
5019
5113
|
lg: { h: "h-control-lg", text: "text-sm", pad: "px-4" }
|
|
@@ -5035,7 +5129,7 @@ function SegmentedControl({
|
|
|
5035
5129
|
errorMessage,
|
|
5036
5130
|
"aria-label": ariaLabel
|
|
5037
5131
|
}) {
|
|
5038
|
-
const sz =
|
|
5132
|
+
const sz = SIZE2[size];
|
|
5039
5133
|
const groupId = React8.useId();
|
|
5040
5134
|
const errorId = React8.useId();
|
|
5041
5135
|
const hasError = errorMessage != null;
|
|
@@ -6704,7 +6798,7 @@ exports.SkeletonText = SkeletonText;
|
|
|
6704
6798
|
exports.Slider = Slider;
|
|
6705
6799
|
exports.Switch = Switch;
|
|
6706
6800
|
exports.Table = Table;
|
|
6707
|
-
exports.Tabs =
|
|
6801
|
+
exports.Tabs = Tabs_default;
|
|
6708
6802
|
exports.TagsInput = TagsInput;
|
|
6709
6803
|
exports.Temporal = DatePicker;
|
|
6710
6804
|
exports.TextArea = TextArea;
|