@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.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,225 @@ 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
|
-
"aria-label": "Tabs",
|
|
985
|
-
className: "flex-1 flex items-center gap-1 overflow-x-auto overflow-y-hidden rounded-lg scroll-smooth snap-x snap-mandatory hidden-scrollbar",
|
|
986
|
-
children: tabs.map((tab) => (
|
|
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 && /* @__PURE__ */ 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 })
|
|
1039
1084
|
] }),
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1085
|
+
variant === "underline" && isActive && /* @__PURE__ */ jsx(
|
|
1086
|
+
motion.span,
|
|
1087
|
+
{
|
|
1088
|
+
layoutId: `${indicatorId}-line`,
|
|
1089
|
+
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",
|
|
1090
|
+
transition: reduced ? { duration: 0 } : MARKER_TRANSITION,
|
|
1091
|
+
"aria-hidden": "true"
|
|
1092
|
+
}
|
|
1093
|
+
)
|
|
1047
1094
|
]
|
|
1048
1095
|
}
|
|
1049
1096
|
);
|
|
1097
|
+
if (!closeable) return trigger;
|
|
1098
|
+
return /* @__PURE__ */ jsxs("span", { className: "relative inline-flex items-center flex-shrink-0", children: [
|
|
1099
|
+
trigger,
|
|
1100
|
+
/* @__PURE__ */ jsx(
|
|
1101
|
+
"button",
|
|
1102
|
+
{
|
|
1103
|
+
type: "button",
|
|
1104
|
+
"aria-label": "Close tab",
|
|
1105
|
+
onClick: (e) => {
|
|
1106
|
+
e.stopPropagation();
|
|
1107
|
+
onClose?.();
|
|
1108
|
+
},
|
|
1109
|
+
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",
|
|
1110
|
+
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" }) })
|
|
1111
|
+
}
|
|
1112
|
+
)
|
|
1113
|
+
] });
|
|
1114
|
+
}
|
|
1115
|
+
function TabsAdd({ onClick, "aria-label": ariaLabel = "Add tab", className = "" }) {
|
|
1116
|
+
const { size } = useTabsContext();
|
|
1117
|
+
return /* @__PURE__ */ jsx(
|
|
1118
|
+
"button",
|
|
1119
|
+
{
|
|
1120
|
+
type: "button",
|
|
1121
|
+
onClick,
|
|
1122
|
+
"aria-label": ariaLabel,
|
|
1123
|
+
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(),
|
|
1124
|
+
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" }) })
|
|
1125
|
+
}
|
|
1126
|
+
);
|
|
1050
1127
|
}
|
|
1128
|
+
function TabsPanel({ value, keepMounted, className = "", style, children }) {
|
|
1129
|
+
return /* @__PURE__ */ jsx(
|
|
1130
|
+
TabsPrimitive.Content,
|
|
1131
|
+
{
|
|
1132
|
+
value,
|
|
1133
|
+
forceMount: keepMounted || void 0,
|
|
1134
|
+
className: ["min-w-0 flex-1 focus:outline-none data-[state=inactive]:hidden", className].filter(Boolean).join(" "),
|
|
1135
|
+
style,
|
|
1136
|
+
children
|
|
1137
|
+
}
|
|
1138
|
+
);
|
|
1139
|
+
}
|
|
1140
|
+
Tabs.List = TabsList;
|
|
1141
|
+
Tabs.Trigger = TabsTrigger;
|
|
1142
|
+
Tabs.Panel = TabsPanel;
|
|
1143
|
+
Tabs.Add = TabsAdd;
|
|
1144
|
+
var Tabs_default = Tabs;
|
|
1051
1145
|
var isParent = (item) => Boolean(item.children && item.children.length > 0);
|
|
1052
1146
|
function TreeNodeItem({
|
|
1053
1147
|
item,
|
|
@@ -4978,7 +5072,7 @@ function TextArea({
|
|
|
4978
5072
|
}
|
|
4979
5073
|
);
|
|
4980
5074
|
}
|
|
4981
|
-
var
|
|
5075
|
+
var SIZE2 = {
|
|
4982
5076
|
sm: { h: "h-control-sm", text: "text-xs", pad: "px-2.5" },
|
|
4983
5077
|
md: { h: "h-control-md", text: "text-sm", pad: "px-3.5" },
|
|
4984
5078
|
lg: { h: "h-control-lg", text: "text-sm", pad: "px-4" }
|
|
@@ -5000,7 +5094,7 @@ function SegmentedControl({
|
|
|
5000
5094
|
errorMessage,
|
|
5001
5095
|
"aria-label": ariaLabel
|
|
5002
5096
|
}) {
|
|
5003
|
-
const sz =
|
|
5097
|
+
const sz = SIZE2[size];
|
|
5004
5098
|
const groupId = useId();
|
|
5005
5099
|
const errorId = useId();
|
|
5006
5100
|
const hasError = errorMessage != null;
|
|
@@ -6601,6 +6695,6 @@ function CreditCardForm({
|
|
|
6601
6695
|
);
|
|
6602
6696
|
}
|
|
6603
6697
|
|
|
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 };
|
|
6698
|
+
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
6699
|
//# sourceMappingURL=index.js.map
|
|
6606
6700
|
//# sourceMappingURL=index.js.map
|