@geomak/ui 5.10.0 → 6.0.1
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 +214 -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 +215 -117
- package/dist/index.js.map +1 -1
- package/dist/styles.css +76 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { colors_default } from './chunk-GKXP6OJJ.js';
|
|
2
2
|
export { colors_default as COLORS, PALETTE as palette, semanticTokens, vars } from './chunk-GKXP6OJJ.js';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import React8, { createContext, useState, useEffect, useMemo, useCallback, useContext, useRef,
|
|
4
|
+
import React8, { createContext, useState, useEffect, useMemo, useId, useCallback, useContext, useRef, useLayoutEffect, useSyncExternalStore } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
7
7
|
import * as Dialog from '@radix-ui/react-dialog';
|
|
@@ -923,131 +923,229 @@ function Tooltip({
|
|
|
923
923
|
] }) });
|
|
924
924
|
}
|
|
925
925
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
926
|
+
var TabsContext = createContext(null);
|
|
927
|
+
function useTabsContext() {
|
|
928
|
+
const ctx = useContext(TabsContext);
|
|
929
|
+
if (!ctx) throw new Error("Tabs.List / Tabs.Trigger / Tabs.Panel must be rendered inside <Tabs>.");
|
|
930
|
+
return ctx;
|
|
931
|
+
}
|
|
932
|
+
var SIZE = {
|
|
933
|
+
sm: { trigger: "h-8 text-xs px-2.5", icon: "h-3.5 w-3.5", add: "h-8 w-8" },
|
|
934
|
+
md: { trigger: "h-10 text-sm px-3", icon: "h-4 w-4", add: "h-10 w-9" },
|
|
935
|
+
lg: { trigger: "h-12 text-sm px-4", icon: "h-[18px] w-[18px]", add: "h-12 w-10" }
|
|
936
|
+
};
|
|
937
|
+
var MARKER_TRANSITION = { duration: 0.26, ease: [0.16, 1, 0.3, 1] };
|
|
926
938
|
function Tabs({
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
939
|
+
value,
|
|
940
|
+
defaultValue,
|
|
941
|
+
onValueChange,
|
|
942
|
+
variant = "underline",
|
|
943
|
+
size = "md",
|
|
944
|
+
orientation = "horizontal",
|
|
945
|
+
className = "",
|
|
946
|
+
style,
|
|
947
|
+
children
|
|
933
948
|
}) {
|
|
934
|
-
const
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
}
|
|
943
|
-
const exists = tabs.find((t) => t.key === value);
|
|
944
|
-
if (!exists) {
|
|
945
|
-
setValue(tabs[tabs.length - 1].key);
|
|
946
|
-
}
|
|
947
|
-
}, [tabs, value]);
|
|
948
|
-
const handleValueChange = (newValue) => {
|
|
949
|
-
const prev = tabs.find((t) => t.key === value);
|
|
950
|
-
const next = tabs.find((t) => t.key === newValue);
|
|
951
|
-
onTabChange?.(prev, next);
|
|
952
|
-
setValue(newValue);
|
|
953
|
-
};
|
|
954
|
-
const toPreviousTab = () => {
|
|
955
|
-
const idx = tabs.findIndex((t) => t.key === value);
|
|
956
|
-
if (idx > 0) handleValueChange(tabs[idx - 1].key);
|
|
957
|
-
};
|
|
958
|
-
const toNextTab = () => {
|
|
959
|
-
const idx = tabs.findIndex((t) => t.key === value);
|
|
960
|
-
if (idx < tabs.length - 1) handleValueChange(tabs[idx + 1].key);
|
|
949
|
+
const isControlled = value !== void 0;
|
|
950
|
+
const [internal, setInternal] = useState(defaultValue);
|
|
951
|
+
const current = isControlled ? value : internal;
|
|
952
|
+
const reduced = !!useReducedMotion();
|
|
953
|
+
const indicatorId = useId();
|
|
954
|
+
const handle = (next) => {
|
|
955
|
+
if (!isControlled) setInternal(next);
|
|
956
|
+
onValueChange?.(next);
|
|
961
957
|
};
|
|
962
|
-
|
|
963
|
-
return /* @__PURE__ */ jsxs(
|
|
958
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { value: current, variant, size, orientation, indicatorId, reduced }, children: /* @__PURE__ */ jsx(
|
|
964
959
|
TabsPrimitive.Root,
|
|
960
|
+
{
|
|
961
|
+
value: current,
|
|
962
|
+
onValueChange: handle,
|
|
963
|
+
orientation,
|
|
964
|
+
className: [
|
|
965
|
+
"flex min-w-0",
|
|
966
|
+
orientation === "vertical" ? "flex-row gap-4" : "flex-col gap-3",
|
|
967
|
+
className
|
|
968
|
+
].filter(Boolean).join(" "),
|
|
969
|
+
style,
|
|
970
|
+
children
|
|
971
|
+
}
|
|
972
|
+
) });
|
|
973
|
+
}
|
|
974
|
+
function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
975
|
+
const { variant, orientation, reduced } = useTabsContext();
|
|
976
|
+
const horizontal = orientation === "horizontal";
|
|
977
|
+
const scrollRef = useRef(null);
|
|
978
|
+
const [edges, setEdges] = useState({ start: false, end: false });
|
|
979
|
+
const scrollable = variant !== "segmented";
|
|
980
|
+
useLayoutEffect(() => {
|
|
981
|
+
const el = scrollRef.current;
|
|
982
|
+
if (!el || !scrollable) return;
|
|
983
|
+
const update = () => {
|
|
984
|
+
if (horizontal) {
|
|
985
|
+
setEdges({
|
|
986
|
+
start: el.scrollLeft > 1,
|
|
987
|
+
end: el.scrollLeft + el.clientWidth < el.scrollWidth - 1
|
|
988
|
+
});
|
|
989
|
+
} else {
|
|
990
|
+
setEdges({
|
|
991
|
+
start: el.scrollTop > 1,
|
|
992
|
+
end: el.scrollTop + el.clientHeight < el.scrollHeight - 1
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
update();
|
|
997
|
+
el.addEventListener("scroll", update, { passive: true });
|
|
998
|
+
const ro = new ResizeObserver(update);
|
|
999
|
+
ro.observe(el);
|
|
1000
|
+
return () => {
|
|
1001
|
+
el.removeEventListener("scroll", update);
|
|
1002
|
+
ro.disconnect();
|
|
1003
|
+
};
|
|
1004
|
+
}, [horizontal, scrollable, children]);
|
|
1005
|
+
const nudge = useCallback((dir) => {
|
|
1006
|
+
const el = scrollRef.current;
|
|
1007
|
+
if (!el) return;
|
|
1008
|
+
const amount = (horizontal ? el.clientWidth : el.clientHeight) * 0.7 * dir;
|
|
1009
|
+
el.scrollBy({ [horizontal ? "left" : "top"]: amount, behavior: reduced ? "auto" : "smooth" });
|
|
1010
|
+
}, [horizontal, reduced]);
|
|
1011
|
+
const maskStyle = scrollable && (edges.start || edges.end) ? (() => {
|
|
1012
|
+
const dir = horizontal ? "to right" : "to bottom";
|
|
1013
|
+
const a = edges.start ? "transparent, black 36px" : "black";
|
|
1014
|
+
const b = edges.end ? "black calc(100% - 36px), transparent" : "black";
|
|
1015
|
+
const img = `linear-gradient(${dir}, ${a}, ${b})`;
|
|
1016
|
+
return { maskImage: img, WebkitMaskImage: img };
|
|
1017
|
+
})() : {};
|
|
1018
|
+
const trackClass = (() => {
|
|
1019
|
+
if (variant === "segmented") {
|
|
1020
|
+
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";
|
|
1021
|
+
}
|
|
1022
|
+
const hairline = horizontal ? "border-b border-border" : "border-r border-border";
|
|
1023
|
+
const align = variant === "enclosed" && horizontal ? "items-end" : "items-stretch";
|
|
1024
|
+
return `flex ${horizontal ? "flex-row" : "flex-col"} ${align} gap-1 ${hairline}`;
|
|
1025
|
+
})();
|
|
1026
|
+
const scrollClass = scrollable ? horizontal ? "overflow-x-auto overflow-y-hidden hidden-scrollbar" : "overflow-y-auto overflow-x-hidden hidden-scrollbar" : "";
|
|
1027
|
+
return /* @__PURE__ */ jsxs("div", { className: ["relative flex min-w-0", horizontal ? "flex-row items-stretch" : "flex-col items-stretch", className].filter(Boolean).join(" "), children: [
|
|
1028
|
+
scrollable && edges.start && /* @__PURE__ */ jsx(Chevron, { side: "start", orientation, onClick: () => nudge(-1) }),
|
|
1029
|
+
/* @__PURE__ */ jsx(
|
|
1030
|
+
TabsPrimitive.List,
|
|
1031
|
+
{
|
|
1032
|
+
ref: scrollRef,
|
|
1033
|
+
"aria-label": ariaLabel,
|
|
1034
|
+
className: [scrollClass, trackClass, "min-w-0 flex-1"].filter(Boolean).join(" "),
|
|
1035
|
+
style: maskStyle,
|
|
1036
|
+
children
|
|
1037
|
+
}
|
|
1038
|
+
),
|
|
1039
|
+
scrollable && edges.end && /* @__PURE__ */ jsx(Chevron, { side: "end", orientation, onClick: () => nudge(1) })
|
|
1040
|
+
] });
|
|
1041
|
+
}
|
|
1042
|
+
function Chevron({ side, orientation, onClick }) {
|
|
1043
|
+
const horizontal = orientation === "horizontal";
|
|
1044
|
+
const rotate = horizontal ? side === "start" ? "rotate-180" : "" : side === "start" ? "-rotate-90" : "rotate-90";
|
|
1045
|
+
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";
|
|
1046
|
+
return /* @__PURE__ */ jsx(
|
|
1047
|
+
"button",
|
|
1048
|
+
{
|
|
1049
|
+
type: "button",
|
|
1050
|
+
"aria-label": side === "start" ? "Scroll tabs backward" : "Scroll tabs forward",
|
|
1051
|
+
onClick,
|
|
1052
|
+
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`,
|
|
1053
|
+
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: `h-4 w-4 ${rotate}`, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
1054
|
+
}
|
|
1055
|
+
);
|
|
1056
|
+
}
|
|
1057
|
+
function TabsTrigger({ value, icon, badge, closeable, onClose, disabled, className = "", children }) {
|
|
1058
|
+
const { value: active, variant, size, orientation, indicatorId, reduced } = useTabsContext();
|
|
1059
|
+
const isActive = active === value;
|
|
1060
|
+
const horizontal = orientation === "horizontal";
|
|
1061
|
+
const sz = SIZE[size];
|
|
1062
|
+
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";
|
|
1063
|
+
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`;
|
|
1064
|
+
const trigger = /* @__PURE__ */ jsxs(
|
|
1065
|
+
TabsPrimitive.Trigger,
|
|
965
1066
|
{
|
|
966
1067
|
value,
|
|
967
|
-
|
|
968
|
-
className: "
|
|
1068
|
+
disabled,
|
|
1069
|
+
className: [base, sz.trigger, closeable ? "pr-8" : "", variantCls, className].filter(Boolean).join(" "),
|
|
969
1070
|
children: [
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
{
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
),
|
|
981
|
-
/* @__PURE__ */ jsx(
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
// Trigger + close button are SIBLINGS, not nested.
|
|
988
|
-
// Nesting a clickable element inside <button> is invalid
|
|
989
|
-
// HTML and breaks keyboard activation of the inner one.
|
|
990
|
-
// The wrapper carries `group` so the close button can
|
|
991
|
-
// react to the trigger's `data-state=active` for styling.
|
|
992
|
-
/* @__PURE__ */ jsxs(
|
|
993
|
-
"div",
|
|
994
|
-
{
|
|
995
|
-
className: "snap-start snap-always relative flex items-center flex-1 min-w-[120px] max-w-[220px] flex-shrink-0 group",
|
|
996
|
-
children: [
|
|
997
|
-
/* @__PURE__ */ jsx(
|
|
998
|
-
TabsPrimitive.Trigger,
|
|
999
|
-
{
|
|
1000
|
-
value: tab.key,
|
|
1001
|
-
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
|
|
1002
|
-
text-foreground-secondary bg-surface-raised
|
|
1003
|
-
hover:bg-surface hover:text-foreground
|
|
1004
|
-
data-[state=active]:bg-accent data-[state=active]:text-accent-foreground
|
|
1005
|
-
focus:outline-none focus-visible:ring-2 focus-visible:ring-accent`,
|
|
1006
|
-
children: /* @__PURE__ */ jsx("span", { className: "truncate text-sm block", children: tab.title })
|
|
1007
|
-
}
|
|
1008
|
-
),
|
|
1009
|
-
tabsClosable && /* @__PURE__ */ jsx(
|
|
1010
|
-
"button",
|
|
1011
|
-
{
|
|
1012
|
-
type: "button",
|
|
1013
|
-
"aria-label": `Close ${tab.title}`,
|
|
1014
|
-
onClick: (e) => {
|
|
1015
|
-
e.stopPropagation();
|
|
1016
|
-
onTabClose?.(tab.key);
|
|
1017
|
-
},
|
|
1018
|
-
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",
|
|
1019
|
-
children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1020
|
-
}
|
|
1021
|
-
)
|
|
1022
|
-
]
|
|
1023
|
-
},
|
|
1024
|
-
tab.key
|
|
1025
|
-
)
|
|
1026
|
-
))
|
|
1027
|
-
}
|
|
1028
|
-
),
|
|
1029
|
-
/* @__PURE__ */ jsx(
|
|
1030
|
-
"button",
|
|
1031
|
-
{
|
|
1032
|
-
type: "button",
|
|
1033
|
-
onClick: toNextTab,
|
|
1034
|
-
"aria-label": "Next tab",
|
|
1035
|
-
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",
|
|
1036
|
-
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-6 w-6", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
1037
|
-
}
|
|
1038
|
-
)
|
|
1071
|
+
variant === "segmented" && isActive && /* @__PURE__ */ jsx(
|
|
1072
|
+
motion.span,
|
|
1073
|
+
{
|
|
1074
|
+
layoutId: `${indicatorId}-seg`,
|
|
1075
|
+
className: "absolute inset-0 rounded-md bg-surface shadow-sm",
|
|
1076
|
+
transition: reduced ? { duration: 0 } : MARKER_TRANSITION,
|
|
1077
|
+
"aria-hidden": "true"
|
|
1078
|
+
}
|
|
1079
|
+
),
|
|
1080
|
+
/* @__PURE__ */ jsxs("span", { className: "relative z-[1] inline-flex items-center gap-2 min-w-0", children: [
|
|
1081
|
+
icon && /* @__PURE__ */ jsx("span", { className: `flex-shrink-0 inline-flex items-center justify-center ${sz.icon}`, children: icon }),
|
|
1082
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children }),
|
|
1083
|
+
badge != null && // Unopinionated count chip: a subtle blue-tinted slate pill
|
|
1084
|
+
// with near-white text, consistent across active/inactive.
|
|
1085
|
+
// Both tokens are theme-relative, so it self-inverts in dark
|
|
1086
|
+
// mode (light pill + dark text) and always stays legible.
|
|
1087
|
+
/* @__PURE__ */ jsx("span", { className: "ml-0.5 inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-foreground-secondary px-1.5 text-[11px] font-semibold leading-none text-background", children: badge })
|
|
1039
1088
|
] }),
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1089
|
+
variant === "underline" && isActive && /* @__PURE__ */ jsx(
|
|
1090
|
+
motion.span,
|
|
1091
|
+
{
|
|
1092
|
+
layoutId: `${indicatorId}-line`,
|
|
1093
|
+
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",
|
|
1094
|
+
transition: reduced ? { duration: 0 } : MARKER_TRANSITION,
|
|
1095
|
+
"aria-hidden": "true"
|
|
1096
|
+
}
|
|
1097
|
+
)
|
|
1047
1098
|
]
|
|
1048
1099
|
}
|
|
1049
1100
|
);
|
|
1101
|
+
if (!closeable) return trigger;
|
|
1102
|
+
return /* @__PURE__ */ jsxs("span", { className: "relative inline-flex items-center flex-shrink-0", children: [
|
|
1103
|
+
trigger,
|
|
1104
|
+
/* @__PURE__ */ jsx(
|
|
1105
|
+
"button",
|
|
1106
|
+
{
|
|
1107
|
+
type: "button",
|
|
1108
|
+
"aria-label": "Close tab",
|
|
1109
|
+
onClick: (e) => {
|
|
1110
|
+
e.stopPropagation();
|
|
1111
|
+
onClose?.();
|
|
1112
|
+
},
|
|
1113
|
+
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",
|
|
1114
|
+
children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1115
|
+
}
|
|
1116
|
+
)
|
|
1117
|
+
] });
|
|
1118
|
+
}
|
|
1119
|
+
function TabsAdd({ onClick, "aria-label": ariaLabel = "Add tab", className = "" }) {
|
|
1120
|
+
const { size } = useTabsContext();
|
|
1121
|
+
return /* @__PURE__ */ jsx(
|
|
1122
|
+
"button",
|
|
1123
|
+
{
|
|
1124
|
+
type: "button",
|
|
1125
|
+
onClick,
|
|
1126
|
+
"aria-label": ariaLabel,
|
|
1127
|
+
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(),
|
|
1128
|
+
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12h14" }) })
|
|
1129
|
+
}
|
|
1130
|
+
);
|
|
1050
1131
|
}
|
|
1132
|
+
function TabsPanel({ value, keepMounted, className = "", style, children }) {
|
|
1133
|
+
return /* @__PURE__ */ jsx(
|
|
1134
|
+
TabsPrimitive.Content,
|
|
1135
|
+
{
|
|
1136
|
+
value,
|
|
1137
|
+
forceMount: keepMounted || void 0,
|
|
1138
|
+
className: ["min-w-0 flex-1 focus:outline-none data-[state=inactive]:hidden", className].filter(Boolean).join(" "),
|
|
1139
|
+
style,
|
|
1140
|
+
children
|
|
1141
|
+
}
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
Tabs.List = TabsList;
|
|
1145
|
+
Tabs.Trigger = TabsTrigger;
|
|
1146
|
+
Tabs.Panel = TabsPanel;
|
|
1147
|
+
Tabs.Add = TabsAdd;
|
|
1148
|
+
var Tabs_default = Tabs;
|
|
1051
1149
|
var isParent = (item) => Boolean(item.children && item.children.length > 0);
|
|
1052
1150
|
function TreeNodeItem({
|
|
1053
1151
|
item,
|
|
@@ -4978,7 +5076,7 @@ function TextArea({
|
|
|
4978
5076
|
}
|
|
4979
5077
|
);
|
|
4980
5078
|
}
|
|
4981
|
-
var
|
|
5079
|
+
var SIZE2 = {
|
|
4982
5080
|
sm: { h: "h-control-sm", text: "text-xs", pad: "px-2.5" },
|
|
4983
5081
|
md: { h: "h-control-md", text: "text-sm", pad: "px-3.5" },
|
|
4984
5082
|
lg: { h: "h-control-lg", text: "text-sm", pad: "px-4" }
|
|
@@ -5000,7 +5098,7 @@ function SegmentedControl({
|
|
|
5000
5098
|
errorMessage,
|
|
5001
5099
|
"aria-label": ariaLabel
|
|
5002
5100
|
}) {
|
|
5003
|
-
const sz =
|
|
5101
|
+
const sz = SIZE2[size];
|
|
5004
5102
|
const groupId = useId();
|
|
5005
5103
|
const errorId = useId();
|
|
5006
5104
|
const hasError = errorMessage != null;
|
|
@@ -6601,6 +6699,6 @@ function CreditCardForm({
|
|
|
6601
6699
|
);
|
|
6602
6700
|
}
|
|
6603
6701
|
|
|
6604
|
-
export { AppShell, AutoComplete, Avatar, Box, Button, CARD_BRANDS, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ColorPicker, ContextMenu, CreditCardForm, DateRangePicker, Drawer, Dropdown, FadingBase, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid2 as Grid, GridCard, icons_default as Icon, IconButton, List2 as List, LoadingSpinner, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Password, Portal, RadioGroup, Rating, ScalableContainer, SearchInput_default as SearchInput, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, Slider, Switch, Table, Tabs, TagsInput, DatePicker as Temporal, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Wizard, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
|
|
6702
|
+
export { AppShell, AutoComplete, Avatar, Box, Button, CARD_BRANDS, Catalog, CatalogCarousel, CatalogGrid, Checkbox, ColorPicker, ContextMenu, CreditCardForm, DateRangePicker, Drawer, Dropdown, FadingBase, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid2 as Grid, GridCard, icons_default as Icon, IconButton, List2 as List, LoadingSpinner, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Password, Portal, RadioGroup, Rating, ScalableContainer, SearchInput_default as SearchInput, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, Slider, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Wizard, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useFieldArray, useForm, useFormField, useFormStore, useNotification };
|
|
6605
6703
|
//# sourceMappingURL=index.js.map
|
|
6606
6704
|
//# sourceMappingURL=index.js.map
|