@geomak/ui 6.23.0 → 6.24.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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkOAV4TA4B_cjs = require('./chunk-OAV4TA4B.cjs');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
- var React26 = require('react');
5
+ var React27 = require('react');
6
6
  var reactDom = require('react-dom');
7
7
  var AvatarPrimitive = require('@radix-ui/react-avatar');
8
8
  var DropdownMenu = require('@radix-ui/react-dropdown-menu');
@@ -40,7 +40,7 @@ function _interopNamespace(e) {
40
40
  return Object.freeze(n);
41
41
  }
42
42
 
43
- var React26__default = /*#__PURE__*/_interopDefault(React26);
43
+ var React27__default = /*#__PURE__*/_interopDefault(React27);
44
44
  var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
45
45
  var DropdownMenu__namespace = /*#__PURE__*/_interopNamespace(DropdownMenu);
46
46
  var Dialog__namespace = /*#__PURE__*/_interopNamespace(Dialog);
@@ -216,8 +216,8 @@ Icon.Copy = Copy;
216
216
  Icon.CircleStack = CircleStack;
217
217
  var icons_default = Icon;
218
218
  function Portal({ children, target }) {
219
- const [resolved, setResolved] = React26.useState(null);
220
- React26.useEffect(() => {
219
+ const [resolved, setResolved] = React27.useState(null);
220
+ React27.useEffect(() => {
221
221
  if (target === null) {
222
222
  setResolved(null);
223
223
  return;
@@ -651,7 +651,7 @@ function IconButton({
651
651
  className = "",
652
652
  style
653
653
  }) {
654
- const colorScheme = React26.useMemo(() => {
654
+ const colorScheme = React27.useMemo(() => {
655
655
  if (type === "primary") {
656
656
  return "bg-accent text-accent-fg hover:bg-accent-hover";
657
657
  }
@@ -730,7 +730,7 @@ var SIZE_CLASSES = {
730
730
  md: "h-9 px-4 text-sm gap-1.5 rounded-lg",
731
731
  lg: "h-11 px-5 text-sm gap-2 rounded-xl"
732
732
  };
733
- var Button = React26__default.default.forwardRef(function Button2({
733
+ var Button = React27__default.default.forwardRef(function Button2({
734
734
  content,
735
735
  variant = "primary",
736
736
  size = "md",
@@ -838,7 +838,7 @@ function MenuButton({
838
838
  "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
839
839
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
840
840
  ].join(" "),
841
- children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(React26__default.default.Fragment, { children: [
841
+ children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(React27__default.default.Fragment, { children: [
842
842
  item.separatorBefore && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Separator, { className: "my-1 h-px bg-border" }),
843
843
  /* @__PURE__ */ jsxRuntime.jsxs(
844
844
  DropdownMenu__namespace.Item,
@@ -1081,9 +1081,9 @@ function Tooltip({
1081
1081
  ] }) });
1082
1082
  }
1083
1083
  var TooltipProvider = TooltipPrimitive__namespace.Provider;
1084
- var TabsContext = React26.createContext(null);
1084
+ var TabsContext = React27.createContext(null);
1085
1085
  function useTabsContext() {
1086
- const ctx = React26.useContext(TabsContext);
1086
+ const ctx = React27.useContext(TabsContext);
1087
1087
  if (!ctx) throw new Error("Tabs.List / Tabs.Trigger / Tabs.Panel must be rendered inside <Tabs>.");
1088
1088
  return ctx;
1089
1089
  }
@@ -1105,26 +1105,26 @@ function Tabs({
1105
1105
  children
1106
1106
  }) {
1107
1107
  const isControlled = value !== void 0;
1108
- const [internal, setInternal] = React26.useState(defaultValue);
1108
+ const [internal, setInternal] = React27.useState(defaultValue);
1109
1109
  const current = isControlled ? value : internal;
1110
1110
  const reduced = !!framerMotion.useReducedMotion();
1111
- const indicatorId = React26.useId();
1112
- const select = React26.useCallback((next) => {
1111
+ const indicatorId = React27.useId();
1112
+ const select = React27.useCallback((next) => {
1113
1113
  if (!isControlled) setInternal(next);
1114
1114
  onValueChange?.(next);
1115
1115
  }, [isControlled, onValueChange]);
1116
- const registry = React26.useRef(/* @__PURE__ */ new Map());
1117
- const orderRef = React26.useRef(0);
1118
- const [, bump] = React26.useState(0);
1119
- const registerTab = React26.useCallback((val, meta) => {
1116
+ const registry = React27.useRef(/* @__PURE__ */ new Map());
1117
+ const orderRef = React27.useRef(0);
1118
+ const [, bump] = React27.useState(0);
1119
+ const registerTab = React27.useCallback((val, meta) => {
1120
1120
  const existing = registry.current.get(val);
1121
1121
  registry.current.set(val, { ...meta, order: existing?.order ?? orderRef.current++ });
1122
1122
  if (!existing) bump((v) => v + 1);
1123
1123
  }, []);
1124
- const unregisterTab = React26.useCallback((val) => {
1124
+ const unregisterTab = React27.useCallback((val) => {
1125
1125
  if (registry.current.delete(val)) bump((v) => v + 1);
1126
1126
  }, []);
1127
- const getTabs = React26.useCallback(() => [...registry.current.entries()].sort((a, b) => a[1].order - b[1].order).map(([val, m]) => ({ value: val, label: m.label, icon: m.icon, disabled: m.disabled })), []);
1127
+ const getTabs = React27.useCallback(() => [...registry.current.entries()].sort((a, b) => a[1].order - b[1].order).map(([val, m]) => ({ value: val, label: m.label, icon: m.icon, disabled: m.disabled })), []);
1128
1128
  return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { value: current, variant, size, orientation, indicatorId, reduced, select, registerTab, unregisterTab, getTabs }, children: /* @__PURE__ */ jsxRuntime.jsx(
1129
1129
  TabsPrimitive__namespace.Root,
1130
1130
  {
@@ -1144,10 +1144,10 @@ function Tabs({
1144
1144
  function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
1145
1145
  const { variant, orientation, reduced, value } = useTabsContext();
1146
1146
  const horizontal = orientation === "horizontal";
1147
- const scrollRef = React26.useRef(null);
1148
- const [edges, setEdges] = React26.useState({ start: false, end: false });
1147
+ const scrollRef = React27.useRef(null);
1148
+ const [edges, setEdges] = React27.useState({ start: false, end: false });
1149
1149
  const scrollable = variant !== "segmented";
1150
- React26.useLayoutEffect(() => {
1150
+ React27.useLayoutEffect(() => {
1151
1151
  const el = scrollRef.current;
1152
1152
  if (!el || !scrollable) return;
1153
1153
  const update = () => {
@@ -1172,13 +1172,13 @@ function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
1172
1172
  ro.disconnect();
1173
1173
  };
1174
1174
  }, [horizontal, scrollable, children]);
1175
- const nudge = React26.useCallback((dir) => {
1175
+ const nudge = React27.useCallback((dir) => {
1176
1176
  const el = scrollRef.current;
1177
1177
  if (!el) return;
1178
1178
  const amount = (horizontal ? el.clientWidth : el.clientHeight) * 0.7 * dir;
1179
1179
  el.scrollBy({ [horizontal ? "left" : "top"]: amount, behavior: reduced ? "auto" : "smooth" });
1180
1180
  }, [horizontal, reduced]);
1181
- React26.useLayoutEffect(() => {
1181
+ React27.useLayoutEffect(() => {
1182
1182
  const el = scrollRef.current;
1183
1183
  if (!el || !scrollable) return;
1184
1184
  const active = el.querySelector("[role=tab][data-state=active]");
@@ -1236,9 +1236,9 @@ function Chevron2({ side, orientation, onClick }) {
1236
1236
  function OverflowMenu() {
1237
1237
  const { getTabs, value, select, orientation } = useTabsContext();
1238
1238
  const horizontal = orientation === "horizontal";
1239
- const [open, setOpen] = React26.useState(false);
1240
- const wrapRef = React26.useRef(null);
1241
- const timer = React26.useRef(null);
1239
+ const [open, setOpen] = React27.useState(false);
1240
+ const wrapRef = React27.useRef(null);
1241
+ const timer = React27.useRef(null);
1242
1242
  const openNow = () => {
1243
1243
  if (timer.current) clearTimeout(timer.current);
1244
1244
  setOpen(true);
@@ -1246,7 +1246,7 @@ function OverflowMenu() {
1246
1246
  const closeSoon = () => {
1247
1247
  timer.current = setTimeout(() => setOpen(false), 160);
1248
1248
  };
1249
- React26.useLayoutEffect(() => {
1249
+ React27.useLayoutEffect(() => {
1250
1250
  if (!open) return;
1251
1251
  const onDoc = (e) => {
1252
1252
  if (wrapRef.current && !wrapRef.current.contains(e.target)) setOpen(false);
@@ -1327,7 +1327,7 @@ function TabsTrigger({ value, icon, badge, closeable, onClose, disabled, classNa
1327
1327
  const isActive = active === value;
1328
1328
  const horizontal = orientation === "horizontal";
1329
1329
  const sz = SIZE[size];
1330
- React26.useLayoutEffect(() => {
1330
+ React27.useLayoutEffect(() => {
1331
1331
  registerTab(value, { label: children, icon, disabled });
1332
1332
  return () => unregisterTab(value);
1333
1333
  }, [value, children, icon, disabled, registerTab, unregisterTab]);
@@ -1525,7 +1525,7 @@ function Tree({
1525
1525
  item.key
1526
1526
  )) });
1527
1527
  }
1528
- var AccordionCtx = React26.createContext({ variant: "separated" });
1528
+ var AccordionCtx = React27.createContext({ variant: "separated" });
1529
1529
  function Accordion2({
1530
1530
  children,
1531
1531
  type = "single",
@@ -1584,7 +1584,7 @@ var Chevron3 = /* @__PURE__ */ jsxRuntime.jsx(
1584
1584
  }
1585
1585
  );
1586
1586
  function AccordionItem({ value, title, icon, children, disabled, className = "" }) {
1587
- const { variant } = React26.useContext(AccordionCtx);
1587
+ const { variant } = React27.useContext(AccordionCtx);
1588
1588
  return /* @__PURE__ */ jsxRuntime.jsxs(
1589
1589
  AccordionPrimitive__namespace.Item,
1590
1590
  {
@@ -1643,7 +1643,7 @@ function Breadcrumbs({
1643
1643
  className = "",
1644
1644
  style
1645
1645
  }) {
1646
- const [expanded, setExpanded] = React26.useState(false);
1646
+ const [expanded, setExpanded] = React27.useState(false);
1647
1647
  const shouldCollapse = maxItems > 0 && items.length > maxItems && !expanded;
1648
1648
  const visible = [];
1649
1649
  if (shouldCollapse) {
@@ -1827,8 +1827,8 @@ function Stepper({
1827
1827
  className = ""
1828
1828
  }) {
1829
1829
  const reduced = framerMotion.useReducedMotion();
1830
- const [forcedVertical, setForcedVertical] = React26.useState(false);
1831
- React26.useEffect(() => {
1830
+ const [forcedVertical, setForcedVertical] = React27.useState(false);
1831
+ React27.useEffect(() => {
1832
1832
  if (!responsive || orientation === "vertical") return;
1833
1833
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
1834
1834
  const mq = window.matchMedia("(max-width: 767px)");
@@ -1937,7 +1937,7 @@ function Kbd({
1937
1937
  style
1938
1938
  }) {
1939
1939
  if (keys && keys.length > 0) {
1940
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: ["inline-flex items-center gap-1", className].filter(Boolean).join(" "), style, children: keys.map((k, i) => /* @__PURE__ */ jsxRuntime.jsxs(React26__default.default.Fragment, { children: [
1940
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: ["inline-flex items-center gap-1", className].filter(Boolean).join(" "), style, children: keys.map((k, i) => /* @__PURE__ */ jsxRuntime.jsxs(React27__default.default.Fragment, { children: [
1941
1941
  i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-muted text-xs select-none", children: separator }),
1942
1942
  /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: [cap, SIZE3[size]].join(" "), children: k })
1943
1943
  ] }, `${k}-${i}`)) });
@@ -2028,13 +2028,13 @@ function FlatCarousel({
2028
2028
  className = "",
2029
2029
  style
2030
2030
  }) {
2031
- const scrollerRef = React26.useRef(null);
2032
- const slides = React26__default.default.Children.toArray(children);
2033
- const [active, setActive] = React26.useState(0);
2034
- const [atStart, setAtStart] = React26.useState(true);
2035
- const [atEnd, setAtEnd] = React26.useState(false);
2031
+ const scrollerRef = React27.useRef(null);
2032
+ const slides = React27__default.default.Children.toArray(children);
2033
+ const [active, setActive] = React27.useState(0);
2034
+ const [atStart, setAtStart] = React27.useState(true);
2035
+ const [atEnd, setAtEnd] = React27.useState(false);
2036
2036
  const width = typeof itemWidth === "number" ? `${itemWidth}px` : itemWidth;
2037
- const update = React26.useCallback(() => {
2037
+ const update = React27.useCallback(() => {
2038
2038
  const el = scrollerRef.current;
2039
2039
  if (!el) return;
2040
2040
  setAtStart(el.scrollLeft <= 1);
@@ -2043,7 +2043,7 @@ function FlatCarousel({
2043
2043
  const slideW = first ? first.getBoundingClientRect().width + gap : el.clientWidth;
2044
2044
  setActive(Math.round(el.scrollLeft / slideW));
2045
2045
  }, [gap]);
2046
- React26.useEffect(() => {
2046
+ React27.useEffect(() => {
2047
2047
  update();
2048
2048
  const el = scrollerRef.current;
2049
2049
  if (!el) return;
@@ -2084,9 +2084,9 @@ function RotatingCarousel({
2084
2084
  className = "",
2085
2085
  style
2086
2086
  }) {
2087
- const slides = React26__default.default.Children.toArray(children);
2087
+ const slides = React27__default.default.Children.toArray(children);
2088
2088
  const count = slides.length;
2089
- const [active, setActive] = React26.useState(0);
2089
+ const [active, setActive] = React27.useState(0);
2090
2090
  const reduced = framerMotion.useReducedMotion();
2091
2091
  const wrap = (n) => count > 0 ? (n % count + count) % count : 0;
2092
2092
  const idx = wrap(active);
@@ -2236,7 +2236,7 @@ function FAB({
2236
2236
  className = "",
2237
2237
  style
2238
2238
  }) {
2239
- const [open, setOpen] = React26.useState(false);
2239
+ const [open, setOpen] = React27.useState(false);
2240
2240
  const reduced = framerMotion.useReducedMotion();
2241
2241
  const hasDial = !!actions && actions.length > 0;
2242
2242
  const bottom = position.startsWith("bottom");
@@ -2338,8 +2338,8 @@ function PopConfirm({
2338
2338
  onOpenChange,
2339
2339
  className = ""
2340
2340
  }) {
2341
- const [uncontrolledOpen, setUncontrolledOpen] = React26.useState(false);
2342
- const [loading, setLoading] = React26.useState(false);
2341
+ const [uncontrolledOpen, setUncontrolledOpen] = React27.useState(false);
2342
+ const [loading, setLoading] = React27.useState(false);
2343
2343
  const isOpen = open ?? uncontrolledOpen;
2344
2344
  const setOpen = (next) => {
2345
2345
  onOpenChange?.(next);
@@ -2405,6 +2405,119 @@ function PopConfirm({
2405
2405
  ) })
2406
2406
  ] });
2407
2407
  }
2408
+ var DEFAULT_EVENTS = ["mousemove", "mousedown", "keydown", "touchstart", "scroll", "wheel"];
2409
+ var formatTime = (ms) => {
2410
+ const total = Math.max(0, Math.ceil(ms / 1e3));
2411
+ const m = Math.floor(total / 60);
2412
+ const s = total % 60;
2413
+ return `${m}:${String(s).padStart(2, "0")}`;
2414
+ };
2415
+ function LogoutTimer({
2416
+ timeout,
2417
+ countdown = 6e4,
2418
+ onLogout,
2419
+ onContinue,
2420
+ onWarning,
2421
+ events = DEFAULT_EVENTS,
2422
+ enabled = true,
2423
+ title = "Still there?",
2424
+ description = "You\u2019ll be signed out soon due to inactivity.",
2425
+ continueLabel = "Stay signed in",
2426
+ logoutLabel = "Sign out now"
2427
+ }) {
2428
+ const reduced = framerMotion.useReducedMotion();
2429
+ const [warning, setWarning] = React27.useState(false);
2430
+ const [remaining, setRemaining] = React27.useState(countdown);
2431
+ const idleTimer = React27.useRef(null);
2432
+ const tick = React27.useRef(null);
2433
+ const deadline = React27.useRef(0);
2434
+ const warningRef = React27.useRef(false);
2435
+ const lastReset = React27.useRef(0);
2436
+ const cbs = React27.useRef({ onLogout, onContinue, onWarning });
2437
+ cbs.current = { onLogout, onContinue, onWarning };
2438
+ const clearTimers = React27.useCallback(() => {
2439
+ if (idleTimer.current) {
2440
+ clearTimeout(idleTimer.current);
2441
+ idleTimer.current = null;
2442
+ }
2443
+ if (tick.current) {
2444
+ clearInterval(tick.current);
2445
+ tick.current = null;
2446
+ }
2447
+ }, []);
2448
+ const logout = React27.useCallback(() => {
2449
+ clearTimers();
2450
+ warningRef.current = false;
2451
+ setWarning(false);
2452
+ cbs.current.onLogout();
2453
+ }, [clearTimers]);
2454
+ const startIdle = React27.useCallback(() => {
2455
+ if (idleTimer.current) clearTimeout(idleTimer.current);
2456
+ idleTimer.current = setTimeout(() => {
2457
+ warningRef.current = true;
2458
+ deadline.current = Date.now() + countdown;
2459
+ setRemaining(countdown);
2460
+ setWarning(true);
2461
+ cbs.current.onWarning?.();
2462
+ tick.current = setInterval(() => {
2463
+ const left = deadline.current - Date.now();
2464
+ if (left <= 0) logout();
2465
+ else setRemaining(left);
2466
+ }, 250);
2467
+ }, timeout);
2468
+ }, [timeout, countdown, logout]);
2469
+ const stay = React27.useCallback(() => {
2470
+ if (tick.current) {
2471
+ clearInterval(tick.current);
2472
+ tick.current = null;
2473
+ }
2474
+ warningRef.current = false;
2475
+ setWarning(false);
2476
+ cbs.current.onContinue?.();
2477
+ startIdle();
2478
+ }, [startIdle]);
2479
+ React27.useEffect(() => {
2480
+ if (!enabled) {
2481
+ clearTimers();
2482
+ warningRef.current = false;
2483
+ setWarning(false);
2484
+ return;
2485
+ }
2486
+ const onActivity = () => {
2487
+ if (warningRef.current) return;
2488
+ const now = Date.now();
2489
+ if (now - lastReset.current < 500) return;
2490
+ lastReset.current = now;
2491
+ startIdle();
2492
+ };
2493
+ startIdle();
2494
+ events.forEach((e) => window.addEventListener(e, onActivity, { passive: true }));
2495
+ return () => {
2496
+ events.forEach((e) => window.removeEventListener(e, onActivity));
2497
+ clearTimers();
2498
+ };
2499
+ }, [enabled, timeout, countdown, events.join(","), startIdle, clearTimers]);
2500
+ return /* @__PURE__ */ jsxRuntime.jsx(Modal, { isOpen: warning, onClose: stay, hasFooter: false, title, size: "sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
2501
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground-secondary", children: description }),
2502
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
2503
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-3xl font-semibold tabular-nums text-foreground", "aria-live": "polite", children: formatTime(remaining) }),
2504
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1 w-full overflow-hidden rounded-full bg-border", children: /* @__PURE__ */ jsxRuntime.jsx(
2505
+ framerMotion.motion.div,
2506
+ {
2507
+ className: "h-full bg-accent",
2508
+ initial: { width: "100%" },
2509
+ animate: { width: "0%" },
2510
+ transition: { duration: reduced ? 0 : countdown / 1e3, ease: "linear" }
2511
+ },
2512
+ warning ? deadline.current : "idle"
2513
+ ) })
2514
+ ] }),
2515
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1 flex justify-end gap-2", children: [
2516
+ /* @__PURE__ */ jsxRuntime.jsx(Button_default, { content: logoutLabel, variant: "secondary", size: "sm", onClick: logout }),
2517
+ /* @__PURE__ */ jsxRuntime.jsx(Button_default, { content: continueLabel, size: "sm", onClick: stay })
2518
+ ] })
2519
+ ] }) });
2520
+ }
2408
2521
  var WEEKDAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
2409
2522
  var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
2410
2523
  var startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate());
@@ -2435,16 +2548,16 @@ function Calendar2({
2435
2548
  className = "",
2436
2549
  style
2437
2550
  }) {
2438
- const today = React26.useMemo(() => startOfDay(/* @__PURE__ */ new Date()), []);
2439
- const [internalMonth, setInternalMonth] = React26.useState(() => month ?? defaultMonth ?? value ?? today);
2551
+ const today = React27.useMemo(() => startOfDay(/* @__PURE__ */ new Date()), []);
2552
+ const [internalMonth, setInternalMonth] = React27.useState(() => month ?? defaultMonth ?? value ?? today);
2440
2553
  const visible = month ?? internalMonth;
2441
2554
  const setMonth = (next) => {
2442
2555
  onMonthChange?.(next);
2443
2556
  if (month === void 0) setInternalMonth(next);
2444
2557
  };
2445
- const grid = React26.useMemo(() => buildGrid(visible, weekStartsOn), [visible, weekStartsOn]);
2446
- const weekdays = React26.useMemo(() => Array.from({ length: 7 }, (_, i) => WEEKDAYS[(i + weekStartsOn) % 7]), [weekStartsOn]);
2447
- const eventsByDay = React26.useMemo(() => {
2558
+ const grid = React27.useMemo(() => buildGrid(visible, weekStartsOn), [visible, weekStartsOn]);
2559
+ const weekdays = React27.useMemo(() => Array.from({ length: 7 }, (_, i) => WEEKDAYS[(i + weekStartsOn) % 7]), [weekStartsOn]);
2560
+ const eventsByDay = React27.useMemo(() => {
2448
2561
  const map = /* @__PURE__ */ new Map();
2449
2562
  for (const ev of events ?? []) {
2450
2563
  const key = startOfDay(ev.date).toDateString();
@@ -2651,17 +2764,17 @@ function Cart({
2651
2764
  ] })
2652
2765
  ] });
2653
2766
  }
2654
- var CartContext = React26.createContext(null);
2767
+ var CartContext = React27.createContext(null);
2655
2768
  var clampQty = (qty, max) => {
2656
2769
  const lower = Math.max(1, Math.round(qty));
2657
2770
  return max != null ? Math.min(lower, max) : lower;
2658
2771
  };
2659
2772
  function CartProvider({ children, initialItems = [], onChange }) {
2660
- const [items, setItems] = React26.useState(initialItems);
2661
- React26.useEffect(() => {
2773
+ const [items, setItems] = React27.useState(initialItems);
2774
+ React27.useEffect(() => {
2662
2775
  onChange?.(items);
2663
2776
  }, [items]);
2664
- const addToCart = React26.useCallback((item, quantity) => {
2777
+ const addToCart = React27.useCallback((item, quantity) => {
2665
2778
  const addQty = quantity ?? item.quantity ?? 1;
2666
2779
  setItems((prev) => {
2667
2780
  const existing = prev.find((it) => it.id === item.id);
@@ -2674,29 +2787,29 @@ function CartProvider({ children, initialItems = [], onChange }) {
2674
2787
  return [...prev, { ...rest, quantity: clampQty(addQty, item.max) }];
2675
2788
  });
2676
2789
  }, []);
2677
- const removeFromCart = React26.useCallback((id) => {
2790
+ const removeFromCart = React27.useCallback((id) => {
2678
2791
  setItems((prev) => prev.filter((it) => it.id !== id));
2679
2792
  }, []);
2680
- const updateQuantity = React26.useCallback((id, quantity) => {
2793
+ const updateQuantity = React27.useCallback((id, quantity) => {
2681
2794
  setItems(
2682
2795
  (prev) => prev.map((it) => it.id === id ? { ...it, quantity: clampQty(quantity, it.max) } : it)
2683
2796
  );
2684
2797
  }, []);
2685
- const clearCart = React26.useCallback(() => setItems([]), []);
2686
- const isInCart = React26.useCallback((id) => items.some((it) => it.id === id), [items]);
2687
- const getItemCount = React26.useCallback(() => items.reduce((sum, it) => sum + it.quantity, 0), [items]);
2688
- const getCartTotal = React26.useCallback(
2798
+ const clearCart = React27.useCallback(() => setItems([]), []);
2799
+ const isInCart = React27.useCallback((id) => items.some((it) => it.id === id), [items]);
2800
+ const getItemCount = React27.useCallback(() => items.reduce((sum, it) => sum + it.quantity, 0), [items]);
2801
+ const getCartTotal = React27.useCallback(
2689
2802
  () => items.reduce((sum, it) => sum + it.price * it.quantity, 0),
2690
2803
  [items]
2691
2804
  );
2692
- const value = React26.useMemo(
2805
+ const value = React27.useMemo(
2693
2806
  () => ({ items, addToCart, removeFromCart, updateQuantity, clearCart, isInCart, getItemCount, getCartTotal }),
2694
2807
  [items, addToCart, removeFromCart, updateQuantity, clearCart, isInCart, getItemCount, getCartTotal]
2695
2808
  );
2696
2809
  return /* @__PURE__ */ jsxRuntime.jsx(CartContext.Provider, { value, children });
2697
2810
  }
2698
2811
  function useCart() {
2699
- const ctx = React26.useContext(CartContext);
2812
+ const ctx = React27.useContext(CartContext);
2700
2813
  if (!ctx) {
2701
2814
  throw new Error("useCart must be used within a <CartProvider>.");
2702
2815
  }
@@ -3030,11 +3143,11 @@ function buildBindings(store, name, kind, snap) {
3030
3143
 
3031
3144
  // src/form/useForm.ts
3032
3145
  function useForm(options = {}) {
3033
- const ref = React26.useRef(null);
3146
+ const ref = React27.useRef(null);
3034
3147
  if (ref.current === null) ref.current = new FormStore(options);
3035
3148
  const store = ref.current;
3036
- React26.useSyncExternalStore(store.subscribe, store.getRootSnapshot, store.getRootSnapshot);
3037
- const make = React26.useCallback(
3149
+ React27.useSyncExternalStore(store.subscribe, store.getRootSnapshot, store.getRootSnapshot);
3150
+ const make = React27.useCallback(
3038
3151
  (kind) => (name, rules) => {
3039
3152
  if (rules !== void 0) store.setRule(name, rules);
3040
3153
  return buildBindings(store, name, kind, store.getFieldSnapshot(name));
@@ -3063,9 +3176,9 @@ function useForm(options = {}) {
3063
3176
  fieldTarget: make("target")
3064
3177
  };
3065
3178
  }
3066
- var FormContext = React26.createContext(null);
3179
+ var FormContext = React27.createContext(null);
3067
3180
  function useFormStore() {
3068
- const store = React26.useContext(FormContext);
3181
+ const store = React27.useContext(FormContext);
3069
3182
  if (!store) {
3070
3183
  throw new Error("useFormStore must be used within a <Form>. Did you forget to wrap your fields?");
3071
3184
  }
@@ -3079,8 +3192,8 @@ function Form({
3079
3192
  children,
3080
3193
  ...rest
3081
3194
  }) {
3082
- const ref = React26.useRef(null);
3083
- const bypass = React26.useRef(false);
3195
+ const ref = React27.useRef(null);
3196
+ const bypass = React27.useRef(false);
3084
3197
  const handleSubmit = async (e) => {
3085
3198
  if (bypass.current) {
3086
3199
  bypass.current = false;
@@ -3132,12 +3245,12 @@ function useFormField(name, options = {}) {
3132
3245
  const store = useFormStore();
3133
3246
  const { kind = "value", rules } = options;
3134
3247
  if (rules !== void 0 && store.getRule(name) !== rules) store.setRule(name, rules);
3135
- React26.useEffect(() => {
3248
+ React27.useEffect(() => {
3136
3249
  return () => {
3137
3250
  if (rules !== void 0) store.removeRule(name);
3138
3251
  };
3139
3252
  }, [store, name]);
3140
- const snap = React26.useSyncExternalStore(
3253
+ const snap = React27.useSyncExternalStore(
3141
3254
  store.subscribe,
3142
3255
  () => store.getFieldSnapshot(name)
3143
3256
  );
@@ -3149,7 +3262,7 @@ function FormField({ name, kind, rules, children }) {
3149
3262
  }
3150
3263
  function useFieldArray(name) {
3151
3264
  const store = useFormStore();
3152
- React26.useSyncExternalStore(store.subscribe, store.getRootSnapshot, store.getRootSnapshot);
3265
+ React27.useSyncExternalStore(store.subscribe, store.getRootSnapshot, store.getRootSnapshot);
3153
3266
  const arr = store.getValue(name) ?? [];
3154
3267
  const keys = store.getKeys(name);
3155
3268
  return {
@@ -3310,7 +3423,7 @@ function TextInput({
3310
3423
  suffix,
3311
3424
  id
3312
3425
  }) {
3313
- const errorId = React26.useId();
3426
+ const errorId = React27.useId();
3314
3427
  const hasError = errorMessage != null;
3315
3428
  const hasAdornment = prefix != null || suffix != null;
3316
3429
  const inputId = htmlFor ?? id;
@@ -3471,7 +3584,7 @@ function CreditCardForm({
3471
3584
  className = "",
3472
3585
  style
3473
3586
  }) {
3474
- const initial = React26.useRef({
3587
+ const initial = React27.useRef({
3475
3588
  number: formatCardNumber(defaultValue?.number ?? ""),
3476
3589
  name: defaultValue?.name ?? "",
3477
3590
  expiry: formatExpiry(defaultValue?.expiry ?? ""),
@@ -3480,7 +3593,7 @@ function CreditCardForm({
3480
3593
  const form = useForm({ initialValues: initial });
3481
3594
  const numberStr = String(form.values.number ?? "");
3482
3595
  const brand = detectBrand(numberStr);
3483
- React26.useEffect(() => {
3596
+ React27.useEffect(() => {
3484
3597
  onChange?.(toCard(form.values));
3485
3598
  }, [form.values.number, form.values.name, form.values.expiry, form.values.cvv]);
3486
3599
  const numberBind = form.fieldNative("number", {
@@ -3603,7 +3716,7 @@ function Checkout({
3603
3716
  ] })
3604
3717
  ] });
3605
3718
  }
3606
- var NotificationContext = React26.createContext({
3719
+ var NotificationContext = React27.createContext({
3607
3720
  open: () => void 0,
3608
3721
  close: () => void 0
3609
3722
  });
@@ -3661,26 +3774,26 @@ function NotificationItem({
3661
3774
  onClose,
3662
3775
  reduced
3663
3776
  }) {
3664
- const [paused, setPaused] = React26.useState(false);
3777
+ const [paused, setPaused] = React27.useState(false);
3665
3778
  const duration = n.duration ?? 4e3;
3666
3779
  const isAutoDismissing = isFinite(duration) && duration > 0;
3667
3780
  const showProgress = !reduced && isAutoDismissing;
3668
- const timerRef = React26.useRef(null);
3669
- const startTimeRef = React26.useRef(0);
3670
- const remainingRef = React26.useRef(duration);
3671
- const clearTimer = React26.useCallback(() => {
3781
+ const timerRef = React27.useRef(null);
3782
+ const startTimeRef = React27.useRef(0);
3783
+ const remainingRef = React27.useRef(duration);
3784
+ const clearTimer = React27.useCallback(() => {
3672
3785
  if (timerRef.current !== null) {
3673
3786
  clearTimeout(timerRef.current);
3674
3787
  timerRef.current = null;
3675
3788
  }
3676
3789
  }, []);
3677
- const scheduleDismiss = React26.useCallback((ms) => {
3790
+ const scheduleDismiss = React27.useCallback((ms) => {
3678
3791
  clearTimer();
3679
3792
  if (!isAutoDismissing) return;
3680
3793
  startTimeRef.current = Date.now();
3681
3794
  timerRef.current = setTimeout(() => onClose(n.id), ms);
3682
3795
  }, [clearTimer, isAutoDismissing, n.id, onClose]);
3683
- React26.useEffect(() => {
3796
+ React27.useEffect(() => {
3684
3797
  if (paused || !isAutoDismissing) return;
3685
3798
  scheduleDismiss(remainingRef.current);
3686
3799
  return clearTimer;
@@ -3763,15 +3876,15 @@ function NotificationProvider({
3763
3876
  children,
3764
3877
  position = "top-right"
3765
3878
  }) {
3766
- const [notifications, setNotifications] = React26.useState([]);
3879
+ const [notifications, setNotifications] = React27.useState([]);
3767
3880
  const reduced = framerMotion.useReducedMotion();
3768
- const open = React26.useCallback((payload) => {
3881
+ const open = React27.useCallback((payload) => {
3769
3882
  setNotifications((prev) => [
3770
3883
  ...prev,
3771
3884
  { duration: 4e3, ...payload, id: Date.now() + Math.random() }
3772
3885
  ]);
3773
3886
  }, []);
3774
- const close = React26.useCallback((id) => {
3887
+ const close = React27.useCallback((id) => {
3775
3888
  setNotifications((prev) => prev.filter((n) => n.id !== id));
3776
3889
  }, []);
3777
3890
  return /* @__PURE__ */ jsxRuntime.jsxs(NotificationContext.Provider, { value: { open, close }, children: [
@@ -3800,7 +3913,7 @@ function NotificationProvider({
3800
3913
  ] });
3801
3914
  }
3802
3915
  function useNotification() {
3803
- const { open } = React26.useContext(NotificationContext);
3916
+ const { open } = React27.useContext(NotificationContext);
3804
3917
  return {
3805
3918
  info: (props) => open({ type: "info", ...props }),
3806
3919
  success: (props) => open({ type: "success", ...props }),
@@ -3917,10 +4030,10 @@ function FadingBase({
3917
4030
  isMounted = false,
3918
4031
  children
3919
4032
  }) {
3920
- const [shouldRender, setShouldRender] = React26.useState(isMounted);
3921
- const [visible, setVisible] = React26.useState(false);
3922
- const timerRef = React26.useRef(null);
3923
- React26.useEffect(() => {
4033
+ const [shouldRender, setShouldRender] = React27.useState(isMounted);
4034
+ const [visible, setVisible] = React27.useState(false);
4035
+ const timerRef = React27.useRef(null);
4036
+ React27.useEffect(() => {
3924
4037
  if (isMounted) {
3925
4038
  setShouldRender(true);
3926
4039
  const rafId = requestAnimationFrame(() => setVisible(true));
@@ -4018,8 +4131,8 @@ function ScalableContainer({
4018
4131
  togglePosition = "top-right",
4019
4132
  className = ""
4020
4133
  }) {
4021
- const containerRef = React26.useRef(null);
4022
- const [internalScaled, setInternalScaled] = React26.useState(false);
4134
+ const containerRef = React27.useRef(null);
4135
+ const [internalScaled, setInternalScaled] = React27.useState(false);
4023
4136
  const isScaled = expanded ?? internalScaled;
4024
4137
  const reduced = framerMotion.useReducedMotion();
4025
4138
  const onToggle = () => {
@@ -4157,17 +4270,17 @@ function CatalogGrid({ items, buttonText, onOpen, className = "" }) {
4157
4270
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex flex-wrap gap-2 ${className}`.trim(), children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(GridCard, { item, buttonText, onOpen }, item.key)) });
4158
4271
  }
4159
4272
  function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
4160
- const [activeIndex, setActiveIndex] = React26.useState(0);
4161
- const [indexPool, setIndexPool] = React26.useState([]);
4162
- const cardRefs = React26.useRef([]);
4163
- const getIndexes = React26.useMemo(() => {
4273
+ const [activeIndex, setActiveIndex] = React27.useState(0);
4274
+ const [indexPool, setIndexPool] = React27.useState([]);
4275
+ const cardRefs = React27.useRef([]);
4276
+ const getIndexes = React27.useMemo(() => {
4164
4277
  let nextIndex = activeIndex + 1;
4165
4278
  let previousIndex = activeIndex - 1;
4166
4279
  if (activeIndex === 0) previousIndex = items.length - 1;
4167
4280
  if (activeIndex === items.length - 1) nextIndex = 0;
4168
4281
  return { previousIndex, nextIndex };
4169
4282
  }, [activeIndex, items.length]);
4170
- React26.useEffect(() => {
4283
+ React27.useEffect(() => {
4171
4284
  const { nextIndex, previousIndex } = getIndexes;
4172
4285
  let indexes = [previousIndex, activeIndex, nextIndex];
4173
4286
  if (activeIndex !== 0 && activeIndex !== items.length - 1) {
@@ -4340,8 +4453,8 @@ function writeDismissed(key) {
4340
4453
  }
4341
4454
  }
4342
4455
  function useTargetBbox(ref) {
4343
- const [bbox, setBbox] = React26.useState(null);
4344
- React26.useLayoutEffect(() => {
4456
+ const [bbox, setBbox] = React27.useState(null);
4457
+ React27.useLayoutEffect(() => {
4345
4458
  const el = ref?.current;
4346
4459
  if (!el) {
4347
4460
  setBbox(null);
@@ -4371,7 +4484,7 @@ function tooltipStyleFor(bbox, placement) {
4371
4484
  return { left: bbox.left + bbox.width / 2, top: bbox.top - TOOLTIP_GAP, transform: "translate(-50%, -100%)", width: TOOLTIP_WIDTH };
4372
4485
  }
4373
4486
  function useFocusTrap(containerRef, active) {
4374
- React26.useEffect(() => {
4487
+ React27.useEffect(() => {
4375
4488
  if (!active) return;
4376
4489
  const el = containerRef.current;
4377
4490
  if (!el) return;
@@ -4410,16 +4523,16 @@ function Wizard({
4410
4523
  onComplete,
4411
4524
  onSkip
4412
4525
  }) {
4413
- const tooltipRef = React26.useRef(null);
4414
- const tooltipTitleId = React26.useId();
4415
- const tooltipBodyId = React26.useId();
4526
+ const tooltipRef = React27.useRef(null);
4527
+ const tooltipTitleId = React27.useId();
4528
+ const tooltipBodyId = React27.useId();
4416
4529
  const reduced = framerMotion.useReducedMotion();
4417
- const [open, setOpen] = React26.useState(() => steps.length > 0 && !readDismissed(storageKey));
4418
- const [activeIndex, setActiveIndex] = React26.useState(0);
4530
+ const [open, setOpen] = React27.useState(() => steps.length > 0 && !readDismissed(storageKey));
4531
+ const [activeIndex, setActiveIndex] = React27.useState(0);
4419
4532
  const step = steps[activeIndex];
4420
4533
  const bbox = useTargetBbox(step?.stepRef);
4421
4534
  useFocusTrap(tooltipRef, open);
4422
- React26.useEffect(() => {
4535
+ React27.useEffect(() => {
4423
4536
  if (!open || !dismissible) return;
4424
4537
  const onKey = (e) => {
4425
4538
  if (e.key === "Escape") {
@@ -4430,12 +4543,12 @@ function Wizard({
4430
4543
  document.addEventListener("keydown", onKey);
4431
4544
  return () => document.removeEventListener("keydown", onKey);
4432
4545
  }, [open, dismissible]);
4433
- const handleSkip = React26.useCallback(() => {
4546
+ const handleSkip = React27.useCallback(() => {
4434
4547
  writeDismissed(storageKey);
4435
4548
  setOpen(false);
4436
4549
  onSkip?.();
4437
4550
  }, [storageKey, onSkip]);
4438
- const handleComplete = React26.useCallback(() => {
4551
+ const handleComplete = React27.useCallback(() => {
4439
4552
  writeDismissed(storageKey);
4440
4553
  setOpen(false);
4441
4554
  onComplete?.();
@@ -4578,7 +4691,7 @@ function Wizard({
4578
4691
  ] });
4579
4692
  }
4580
4693
  var SearchIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-4 h-4", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z", clipRule: "evenodd" }) });
4581
- var SearchInput = React26__default.default.forwardRef(function SearchInput2({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout = "vertical", size = "md", icon, helperText, className }, ref) {
4694
+ var SearchInput = React27__default.default.forwardRef(function SearchInput2({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout = "vertical", size = "md", icon, helperText, className }, ref) {
4582
4695
  return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsxs(
4583
4696
  "div",
4584
4697
  {
@@ -4632,11 +4745,11 @@ function MultiTagRow({
4632
4745
  labelFor,
4633
4746
  onRemove
4634
4747
  }) {
4635
- const wrapRef = React26.useRef(null);
4636
- const measureRef = React26.useRef(null);
4637
- const [visibleCount, setVisibleCount] = React26.useState(values.length);
4748
+ const wrapRef = React27.useRef(null);
4749
+ const measureRef = React27.useRef(null);
4750
+ const [visibleCount, setVisibleCount] = React27.useState(values.length);
4638
4751
  const key = values.map(String).join("|");
4639
- React26.useLayoutEffect(() => {
4752
+ React27.useLayoutEffect(() => {
4640
4753
  const wrap = wrapRef.current;
4641
4754
  const measure = measureRef.current;
4642
4755
  if (!wrap || !measure) return;
@@ -4730,16 +4843,16 @@ function Dropdown({
4730
4843
  size = "md",
4731
4844
  className = ""
4732
4845
  }) {
4733
- const [open, setOpen] = React26.useState(false);
4734
- const [selectedItems, setSelectedItems] = React26.useState([]);
4735
- const [searchTerm, setSearchTerm] = React26.useState("");
4736
- const [innerItems, setInnerItems] = React26.useState([]);
4737
- const errorId = React26.useId();
4846
+ const [open, setOpen] = React27.useState(false);
4847
+ const [selectedItems, setSelectedItems] = React27.useState([]);
4848
+ const [searchTerm, setSearchTerm] = React27.useState("");
4849
+ const [innerItems, setInnerItems] = React27.useState([]);
4850
+ const errorId = React27.useId();
4738
4851
  const hasError = errorMessage != null;
4739
- React26.useEffect(() => {
4852
+ React27.useEffect(() => {
4740
4853
  setInnerItems(items);
4741
4854
  }, [items]);
4742
- React26.useEffect(() => {
4855
+ React27.useEffect(() => {
4743
4856
  if (isMultiselect && Array.isArray(value)) {
4744
4857
  setSelectedItems(value);
4745
4858
  }
@@ -5064,7 +5177,7 @@ function TableBody({
5064
5177
  expandRow,
5065
5178
  getRowKey
5066
5179
  }) {
5067
- const [expanded, setExpanded] = React26.useState(() => /* @__PURE__ */ new Set());
5180
+ const [expanded, setExpanded] = React27.useState(() => /* @__PURE__ */ new Set());
5068
5181
  const reduced = framerMotion.useReducedMotion();
5069
5182
  const toggleRow = (rowKey) => {
5070
5183
  setExpanded((prev) => {
@@ -5079,7 +5192,7 @@ function TableBody({
5079
5192
  return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row, i) => {
5080
5193
  const rowKey = getRowKey(row, i);
5081
5194
  const isExpanded = expanded.has(rowKey);
5082
- return /* @__PURE__ */ jsxRuntime.jsxs(React26__default.default.Fragment, { children: [
5195
+ return /* @__PURE__ */ jsxRuntime.jsxs(React27__default.default.Fragment, { children: [
5083
5196
  /* @__PURE__ */ jsxRuntime.jsxs(
5084
5197
  "tr",
5085
5198
  {
@@ -5135,9 +5248,9 @@ function Pagination({
5135
5248
  const matchedOption = picker.find(
5136
5249
  (o) => o.label === options.perPage || o.value === options.perPage
5137
5250
  );
5138
- const [perPageKey, setPerPageKey] = React26.useState(() => matchedOption?.key ?? picker[0]?.key);
5251
+ const [perPageKey, setPerPageKey] = React27.useState(() => matchedOption?.key ?? picker[0]?.key);
5139
5252
  const displayPerPageKey = serverSide ? matchedOption?.key ?? perPageKey : perPageKey;
5140
- React26.useEffect(() => {
5253
+ React27.useEffect(() => {
5141
5254
  if (serverSide && options.perPage != null) {
5142
5255
  const next = picker.find((o) => o.label === options.perPage || o.value === options.perPage);
5143
5256
  if (next) setPerPageKey(next.key);
@@ -5201,14 +5314,14 @@ function Table({
5201
5314
  className = "",
5202
5315
  style
5203
5316
  }) {
5204
- const searchRef = React26.useRef(null);
5205
- const [searchTerm, setSearchTerm] = React26.useState("");
5206
- const [perPage, setPerPage] = React26.useState(
5317
+ const searchRef = React27.useRef(null);
5318
+ const [searchTerm, setSearchTerm] = React27.useState("");
5319
+ const [perPage, setPerPage] = React27.useState(
5207
5320
  typeof pagination.perPage === "number" ? pagination.perPage : 15
5208
5321
  );
5209
- const [activePage, setActivePage] = React26.useState(0);
5322
+ const [activePage, setActivePage] = React27.useState(0);
5210
5323
  const isServerSide = !!(pagination.enabled && pagination.serverSide);
5211
- const filteredRows = React26.useMemo(() => {
5324
+ const filteredRows = React27.useMemo(() => {
5212
5325
  if (isServerSide || !searchTerm) return rows;
5213
5326
  const term = searchTerm.toLowerCase();
5214
5327
  return rows.filter(
@@ -5217,29 +5330,29 @@ function Table({
5217
5330
  )
5218
5331
  );
5219
5332
  }, [rows, searchTerm, isServerSide]);
5220
- const datasets = React26.useMemo(() => {
5333
+ const datasets = React27.useMemo(() => {
5221
5334
  if (isServerSide) return [rows];
5222
5335
  return createDatasets(filteredRows, pagination.enabled ? perPage : null);
5223
5336
  }, [filteredRows, perPage, pagination.enabled, isServerSide, rows]);
5224
- const MAX_PAGE = React26.useMemo(() => {
5337
+ const MAX_PAGE = React27.useMemo(() => {
5225
5338
  if (isServerSide && typeof pagination.maxPage === "number") return Math.max(0, pagination.maxPage);
5226
5339
  if (isServerSide && typeof pagination.totalCount === "number")
5227
5340
  return Math.max(0, Math.ceil(pagination.totalCount / perPage) - 1);
5228
5341
  return datasets.length ? datasets.length - 1 : 0;
5229
5342
  }, [isServerSide, pagination.maxPage, pagination.totalCount, perPage, datasets.length]);
5230
- const currentPageRows = React26.useMemo(() => {
5343
+ const currentPageRows = React27.useMemo(() => {
5231
5344
  if (isServerSide) return rows;
5232
5345
  return datasets[activePage] ?? [];
5233
5346
  }, [isServerSide, rows, datasets, activePage]);
5234
- React26.useEffect(() => {
5347
+ React27.useEffect(() => {
5235
5348
  if (pagination.enabled && !isServerSide && typeof pagination.perPage === "number") {
5236
5349
  setPerPage(pagination.perPage);
5237
5350
  }
5238
5351
  }, [pagination.enabled, pagination.perPage, isServerSide]);
5239
- React26.useEffect(() => {
5352
+ React27.useEffect(() => {
5240
5353
  if (isServerSide && typeof pagination.perPage === "number") setPerPage(pagination.perPage);
5241
5354
  }, [isServerSide, pagination.perPage]);
5242
- React26.useEffect(() => {
5355
+ React27.useEffect(() => {
5243
5356
  if (isServerSide && typeof pagination.page === "number" && pagination.page >= 1)
5244
5357
  setActivePage(pagination.page - 1);
5245
5358
  }, [isServerSide, pagination.page]);
@@ -5323,7 +5436,7 @@ function TableSkeletonBody({
5323
5436
  )) });
5324
5437
  }
5325
5438
  function ThemeSwitch({ checked, onChange, label = "Toggle dark mode", className = "" }) {
5326
- const id = React26.useId();
5439
+ const id = React27.useId();
5327
5440
  return /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: `flex items-center gap-2 cursor-pointer select-none ${className}`.trim(), children: /* @__PURE__ */ jsxRuntime.jsx(
5328
5441
  SwitchPrimitive__namespace.Root,
5329
5442
  {
@@ -5507,7 +5620,7 @@ function Sidebar({
5507
5620
  }
5508
5621
  ) });
5509
5622
  }
5510
- var MegaMenuContext = React26.createContext({ align: "start" });
5623
+ var MegaMenuContext = React27.createContext({ align: "start" });
5511
5624
  function MegaMenu({
5512
5625
  children,
5513
5626
  align = "start",
@@ -5538,7 +5651,7 @@ function MegaMenu({
5538
5651
  }
5539
5652
  var TOP_ITEM = "group/top inline-flex items-center gap-1.5 h-10 px-3 rounded-md text-sm font-medium select-none text-foreground-secondary hover:text-foreground hover:bg-surface-raised data-[state=open]:text-accent data-[active]:text-accent transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent";
5540
5653
  function MegaMenuItem({ label, icon, href, children, className = "" }) {
5541
- const { align } = React26.useContext(MegaMenuContext);
5654
+ const { align } = React27.useContext(MegaMenuContext);
5542
5655
  const pos = align === "center" ? "left-1/2 -translate-x-1/2" : align === "end" ? "right-0" : "left-0";
5543
5656
  if (!children) {
5544
5657
  return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.Item, { children: /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Link, { href, className: [TOP_ITEM, className].filter(Boolean).join(" "), children: [
@@ -5623,8 +5736,8 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
5623
5736
  function MegaMenuFeatured({ children, className = "" }) {
5624
5737
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ["min-w-0 rounded-lg bg-surface-raised border border-border p-4 flex flex-col", className].filter(Boolean).join(" "), children });
5625
5738
  }
5626
- var elementsOfType = (children, type) => React26__default.default.Children.toArray(children).filter(
5627
- (c) => React26__default.default.isValidElement(c) && c.type === type
5739
+ var elementsOfType = (children, type) => React27__default.default.Children.toArray(children).filter(
5740
+ (c) => React27__default.default.isValidElement(c) && c.type === type
5628
5741
  );
5629
5742
  var MOBILE_CHEVRON = /* @__PURE__ */ jsxRuntime.jsx(
5630
5743
  "svg",
@@ -5661,9 +5774,9 @@ function MobileLinkRow({ link, onNavigate }) {
5661
5774
  );
5662
5775
  }
5663
5776
  function MobilePanel({ panel, onNavigate }) {
5664
- const nodes = React26__default.default.Children.toArray(panel.props.children);
5777
+ const nodes = React27__default.default.Children.toArray(panel.props.children);
5665
5778
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4 px-2 pb-3 pt-1", children: nodes.map((node, i) => {
5666
- if (!React26__default.default.isValidElement(node)) return null;
5779
+ if (!React27__default.default.isValidElement(node)) return null;
5667
5780
  const el = node;
5668
5781
  if (el.type === MegaMenuSection) {
5669
5782
  const { title, children } = el.props;
@@ -5682,8 +5795,8 @@ function MegaMenuMobile({
5682
5795
  children,
5683
5796
  label
5684
5797
  }) {
5685
- const [open, setOpen] = React26.useState(false);
5686
- const [expanded, setExpanded] = React26.useState(null);
5798
+ const [open, setOpen] = React27.useState(false);
5799
+ const [expanded, setExpanded] = React27.useState(null);
5687
5800
  const items = elementsOfType(children, MegaMenuItem);
5688
5801
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "md:hidden w-full", children: [
5689
5802
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5756,17 +5869,17 @@ function AppShell({
5756
5869
  children,
5757
5870
  className = ""
5758
5871
  }) {
5759
- const [expanded, setExpanded] = React26.useState(sidebarDefaultExpanded);
5760
- const [isMobile, setIsMobile] = React26.useState(false);
5761
- const [mobileOpen, setMobileOpen] = React26.useState(false);
5762
- React26.useEffect(() => {
5872
+ const [expanded, setExpanded] = React27.useState(sidebarDefaultExpanded);
5873
+ const [isMobile, setIsMobile] = React27.useState(false);
5874
+ const [mobileOpen, setMobileOpen] = React27.useState(false);
5875
+ React27.useEffect(() => {
5763
5876
  const mq = window.matchMedia("(max-width: 767px)");
5764
5877
  const update = (e) => setIsMobile(e.matches);
5765
5878
  update(mq);
5766
5879
  mq.addEventListener("change", update);
5767
5880
  return () => mq.removeEventListener("change", update);
5768
5881
  }, []);
5769
- React26.useEffect(() => {
5882
+ React27.useEffect(() => {
5770
5883
  if (!isMobile) setMobileOpen(false);
5771
5884
  }, [isMobile]);
5772
5885
  const hasSidebar = sidebarSections.length > 0;
@@ -5906,10 +6019,10 @@ function SecureLayout({
5906
6019
  if (requiredPermissions?.length && !has(permissions, requiredPermissions, requireAllPermissions)) return false;
5907
6020
  return true;
5908
6021
  };
5909
- const [state, setState] = React26.useState(
6022
+ const [state, setState] = React27.useState(
5910
6023
  () => !passesSync() ? "denied" : canAccess ? "checking" : "granted"
5911
6024
  );
5912
- React26.useEffect(() => {
6025
+ React27.useEffect(() => {
5913
6026
  let cancelled = false;
5914
6027
  const finish = (ok) => {
5915
6028
  if (cancelled) return;
@@ -6070,10 +6183,10 @@ function ThemeProvider({
6070
6183
  className = "",
6071
6184
  style
6072
6185
  }) {
6073
- const id = React26__default.default.useId().replace(/:/g, "");
6186
+ const id = React27__default.default.useId().replace(/:/g, "");
6074
6187
  const scopeClass = `geo-th-${id}`;
6075
- const divRef = React26.useRef(null);
6076
- React26.useEffect(() => {
6188
+ const divRef = React27.useRef(null);
6189
+ React27.useEffect(() => {
6077
6190
  const el = divRef.current;
6078
6191
  if (!el) return;
6079
6192
  if (colorScheme === "auto") return;
@@ -6088,8 +6201,8 @@ function ThemeProvider({
6088
6201
  }
6089
6202
  el.classList.toggle("dark", colorScheme === "dark");
6090
6203
  }, [colorScheme]);
6091
- const lightVars = React26.useMemo(() => toCssVars(theme), [theme]);
6092
- const darkVarStr = React26.useMemo(() => {
6204
+ const lightVars = React27.useMemo(() => toCssVars(theme), [theme]);
6205
+ const darkVarStr = React27.useMemo(() => {
6093
6206
  if (!darkTheme) return "";
6094
6207
  const dvars = toCssVars(darkTheme);
6095
6208
  if (!Object.keys(dvars).length) return "";
@@ -6131,7 +6244,7 @@ function NumberInput({
6131
6244
  readOnly = false,
6132
6245
  precision
6133
6246
  }) {
6134
- const errorId = React26.useId();
6247
+ const errorId = React27.useId();
6135
6248
  const hasError = errorMessage != null;
6136
6249
  const inferredPrecision = precision ?? (Number.isInteger(step) ? 0 : String(step).split(".")[1]?.length ?? 0);
6137
6250
  const round = (n) => {
@@ -6262,8 +6375,8 @@ function Password({
6262
6375
  showIcon,
6263
6376
  hideIcon
6264
6377
  }) {
6265
- const [visible, setVisible] = React26.useState(false);
6266
- const errorId = React26.useId();
6378
+ const [visible, setVisible] = React27.useState(false);
6379
+ const errorId = React27.useId();
6267
6380
  const hasError = errorMessage != null;
6268
6381
  return /* @__PURE__ */ jsxRuntime.jsx(
6269
6382
  Field,
@@ -6336,7 +6449,7 @@ function Checkbox({
6336
6449
  }) {
6337
6450
  const isChecked = checked ?? value ?? false;
6338
6451
  const labelFirst = labelPosition === "left";
6339
- const errorId = React26.useId();
6452
+ const errorId = React27.useId();
6340
6453
  const hasError = errorMessage != null;
6341
6454
  const box = /* @__PURE__ */ jsxRuntime.jsx(
6342
6455
  CheckboxPrimitive__namespace.Root,
@@ -6444,8 +6557,8 @@ function RadioGroup({
6444
6557
  className,
6445
6558
  errorMessage
6446
6559
  }) {
6447
- const errorId = React26.useId();
6448
- const groupId = React26.useId();
6560
+ const errorId = React27.useId();
6561
+ const groupId = React27.useId();
6449
6562
  const hasError = errorMessage != null;
6450
6563
  const labelFirst = labelPosition === "left";
6451
6564
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -6545,11 +6658,11 @@ function Switch({
6545
6658
  disabled,
6546
6659
  errorMessage
6547
6660
  }) {
6548
- const id = React26.useId();
6549
- const errorId = React26.useId();
6661
+ const id = React27.useId();
6662
+ const errorId = React27.useId();
6550
6663
  const hasError = errorMessage != null;
6551
6664
  const isControlled = checked !== void 0;
6552
- const [internal, setInternal] = React26.useState(defaultChecked);
6665
+ const [internal, setInternal] = React27.useState(defaultChecked);
6553
6666
  const isOn = isControlled ? checked : internal;
6554
6667
  const handle = (c) => {
6555
6668
  if (!isControlled) setInternal(c);
@@ -6622,19 +6735,19 @@ function AutoComplete({
6622
6735
  required,
6623
6736
  htmlFor
6624
6737
  }) {
6625
- const errorId = React26.useId();
6738
+ const errorId = React27.useId();
6626
6739
  const hasError = errorMessage != null;
6627
- const [term, setTerm] = React26.useState("");
6628
- const [open, setOpen] = React26.useState(false);
6629
- const [asyncItems, setAsyncItems] = React26.useState([]);
6630
- const [loading, setLoading] = React26.useState(false);
6740
+ const [term, setTerm] = React27.useState("");
6741
+ const [open, setOpen] = React27.useState(false);
6742
+ const [asyncItems, setAsyncItems] = React27.useState([]);
6743
+ const [loading, setLoading] = React27.useState(false);
6631
6744
  const isAsync = typeof onSearch === "function";
6632
- const debounceRef = React26.useRef(null);
6633
- const requestIdRef = React26.useRef(0);
6745
+ const debounceRef = React27.useRef(null);
6746
+ const requestIdRef = React27.useRef(0);
6634
6747
  const staticFiltered = isAsync || !items ? [] : term.trim() ? items.filter(
6635
6748
  ({ key, label: label2 }) => label2.toLowerCase().includes(term.toLowerCase()) || key.toLowerCase().includes(term.toLowerCase())
6636
6749
  ) : [];
6637
- React26.useEffect(() => {
6750
+ React27.useEffect(() => {
6638
6751
  if (!isAsync) return;
6639
6752
  if (debounceRef.current) clearTimeout(debounceRef.current);
6640
6753
  if (!term.trim()) {
@@ -6790,15 +6903,15 @@ function TreeSelect({
6790
6903
  defaultExpandedKeys = [],
6791
6904
  size = "md"
6792
6905
  }) {
6793
- const errorId = React26.useId();
6906
+ const errorId = React27.useId();
6794
6907
  const hasError = errorMessage != null;
6795
- const [open, setOpen] = React26.useState(false);
6796
- const [expanded, setExpanded] = React26.useState(() => new Set(defaultExpandedKeys));
6797
- const [activeIndex, setActiveIndex] = React26.useState(0);
6798
- const listRef = React26.useRef(null);
6799
- const visible = React26.useMemo(() => flattenVisible(items, expanded), [items, expanded]);
6800
- const didSyncOnOpenRef = React26.useRef(false);
6801
- React26.useEffect(() => {
6908
+ const [open, setOpen] = React27.useState(false);
6909
+ const [expanded, setExpanded] = React27.useState(() => new Set(defaultExpandedKeys));
6910
+ const [activeIndex, setActiveIndex] = React27.useState(0);
6911
+ const listRef = React27.useRef(null);
6912
+ const visible = React27.useMemo(() => flattenVisible(items, expanded), [items, expanded]);
6913
+ const didSyncOnOpenRef = React27.useRef(false);
6914
+ React27.useEffect(() => {
6802
6915
  if (!open) {
6803
6916
  didSyncOnOpenRef.current = false;
6804
6917
  return;
@@ -6808,7 +6921,7 @@ function TreeSelect({
6808
6921
  setActiveIndex(selectedIdx >= 0 ? selectedIdx : 0);
6809
6922
  didSyncOnOpenRef.current = true;
6810
6923
  }, [open, value]);
6811
- const selectedNode = React26.useMemo(
6924
+ const selectedNode = React27.useMemo(
6812
6925
  () => value != null ? findNodeByKey(items, value) : null,
6813
6926
  [items, value]
6814
6927
  );
@@ -7039,11 +7152,11 @@ function FileInput({
7039
7152
  required,
7040
7153
  icon
7041
7154
  }) {
7042
- const inputRef = React26.useRef(null);
7043
- const errorId = React26.useId();
7044
- const [files, setFiles] = React26.useState([]);
7045
- const [dragging, setDragging] = React26.useState(false);
7046
- const [sizeError, setSizeError] = React26.useState(null);
7155
+ const inputRef = React27.useRef(null);
7156
+ const errorId = React27.useId();
7157
+ const [files, setFiles] = React27.useState([]);
7158
+ const [dragging, setDragging] = React27.useState(false);
7159
+ const [sizeError, setSizeError] = React27.useState(null);
7047
7160
  const effectiveError = errorMessage ?? sizeError ?? void 0;
7048
7161
  const openPicker = () => {
7049
7162
  if (!disabled) inputRef.current?.click();
@@ -7234,30 +7347,30 @@ function DatePicker({
7234
7347
  size = "md",
7235
7348
  className = ""
7236
7349
  }) {
7237
- const errorId = React26.useId();
7350
+ const errorId = React27.useId();
7238
7351
  const hasError = errorMessage != null;
7239
- const [open, setOpen] = React26.useState(false);
7240
- const [viewMonth, setViewMonth] = React26.useState(() => startOfMonth(value ?? /* @__PURE__ */ new Date()));
7241
- const [focusDate, setFocusDate] = React26.useState(() => value ?? /* @__PURE__ */ new Date());
7242
- const [view, setView] = React26.useState("days");
7243
- const gridRef = React26.useRef(null);
7244
- React26.useEffect(() => {
7352
+ const [open, setOpen] = React27.useState(false);
7353
+ const [viewMonth, setViewMonth] = React27.useState(() => startOfMonth(value ?? /* @__PURE__ */ new Date()));
7354
+ const [focusDate, setFocusDate] = React27.useState(() => value ?? /* @__PURE__ */ new Date());
7355
+ const [view, setView] = React27.useState("days");
7356
+ const gridRef = React27.useRef(null);
7357
+ React27.useEffect(() => {
7245
7358
  if (!open) return;
7246
7359
  const target = value ?? /* @__PURE__ */ new Date();
7247
7360
  setViewMonth(startOfMonth(target));
7248
7361
  setFocusDate(target);
7249
7362
  setView("days");
7250
7363
  }, [open, value]);
7251
- React26.useEffect(() => {
7364
+ React27.useEffect(() => {
7252
7365
  if (!open) return;
7253
7366
  const cell = gridRef.current?.querySelector(`[data-day="${defaultFormat3(focusDate)}"]`);
7254
7367
  cell?.focus();
7255
7368
  }, [open, focusDate]);
7256
- const weekdays = React26.useMemo(() => {
7369
+ const weekdays = React27.useMemo(() => {
7257
7370
  const ordered = WEEKDAY_SHORT.slice(weekStartsOn).concat(WEEKDAY_SHORT.slice(0, weekStartsOn));
7258
7371
  return ordered;
7259
7372
  }, [weekStartsOn]);
7260
- const grid = React26.useMemo(() => buildGrid2(viewMonth, weekStartsOn), [viewMonth, weekStartsOn]);
7373
+ const grid = React27.useMemo(() => buildGrid2(viewMonth, weekStartsOn), [viewMonth, weekStartsOn]);
7261
7374
  const isDisabled = (d) => {
7262
7375
  if (min && d < min) return true;
7263
7376
  if (max && d > max) return true;
@@ -7547,10 +7660,10 @@ function TextArea({
7547
7660
  style,
7548
7661
  inputStyle
7549
7662
  }) {
7550
- const errorId = React26.useId();
7663
+ const errorId = React27.useId();
7551
7664
  const hasError = errorMessage != null;
7552
- const ref = React26.useRef(null);
7553
- React26.useLayoutEffect(() => {
7665
+ const ref = React27.useRef(null);
7666
+ React27.useLayoutEffect(() => {
7554
7667
  if (!autoGrow) return;
7555
7668
  const el = ref.current;
7556
7669
  if (!el) return;
@@ -7620,11 +7733,11 @@ function SegmentedControl({
7620
7733
  "aria-label": ariaLabel
7621
7734
  }) {
7622
7735
  const sz = SIZE5[size];
7623
- const groupId = React26.useId();
7624
- const errorId = React26.useId();
7736
+ const groupId = React27.useId();
7737
+ const errorId = React27.useId();
7625
7738
  const hasError = errorMessage != null;
7626
7739
  const isControlled = value !== void 0;
7627
- const [internal, setInternal] = React26.useState(defaultValue);
7740
+ const [internal, setInternal] = React27.useState(defaultValue);
7628
7741
  const current = isControlled ? value : internal;
7629
7742
  const handle = (v) => {
7630
7743
  if (!v) return;
@@ -7718,14 +7831,14 @@ function Slider({
7718
7831
  name,
7719
7832
  htmlFor
7720
7833
  }) {
7721
- const errorId = React26.useId();
7834
+ const errorId = React27.useId();
7722
7835
  const hasError = errorMessage != null;
7723
7836
  const isRange = Array.isArray(value ?? defaultValue);
7724
- const [internal, setInternal] = React26.useState(
7837
+ const [internal, setInternal] = React27.useState(
7725
7838
  () => toArray(value) ?? toArray(defaultValue) ?? [min]
7726
7839
  );
7727
7840
  const current = toArray(value) ?? internal;
7728
- const [dragging, setDragging] = React26.useState(false);
7841
+ const [dragging, setDragging] = React27.useState(false);
7729
7842
  const emit = (arr) => {
7730
7843
  setInternal(arr);
7731
7844
  const next = isRange ? [arr[0], arr[1]] : arr[0];
@@ -7820,11 +7933,11 @@ function TagsInput({
7820
7933
  validate,
7821
7934
  separators = ["Enter", ","]
7822
7935
  }) {
7823
- const errorId = React26.useId();
7824
- const inputRef = React26.useRef(null);
7825
- const [internal, setInternal] = React26.useState(defaultValue ?? []);
7826
- const [draft, setDraft] = React26.useState("");
7827
- const [localError, setLocalError] = React26.useState(null);
7936
+ const errorId = React27.useId();
7937
+ const inputRef = React27.useRef(null);
7938
+ const [internal, setInternal] = React27.useState(defaultValue ?? []);
7939
+ const [draft, setDraft] = React27.useState("");
7940
+ const [localError, setLocalError] = React27.useState(null);
7828
7941
  const tags = value ?? internal;
7829
7942
  const hasError = errorMessage != null || localError != null;
7830
7943
  const errorText = errorMessage ?? localError ?? void 0;
@@ -7955,9 +8068,9 @@ function OtpInput({
7955
8068
  className,
7956
8069
  groupAfter
7957
8070
  }) {
7958
- const errorId = React26.useId();
8071
+ const errorId = React27.useId();
7959
8072
  const hasError = errorMessage != null;
7960
- const refs = React26.useRef([]);
8073
+ const refs = React27.useRef([]);
7961
8074
  const chars = Array.from({ length }, (_, i) => value[i] ?? "");
7962
8075
  const pattern = mode === "numeric" ? /[0-9]/ : /[a-zA-Z0-9]/;
7963
8076
  const emit = (next) => {
@@ -8006,7 +8119,7 @@ function OtpInput({
8006
8119
  emit(valid.join(""));
8007
8120
  focusBox(valid.length);
8008
8121
  };
8009
- return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React26__default.default.Fragment, { children: [
8122
+ return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React27__default.default.Fragment, { children: [
8010
8123
  /* @__PURE__ */ jsxRuntime.jsx(
8011
8124
  "input",
8012
8125
  {
@@ -8064,9 +8177,9 @@ function Rating({
8064
8177
  className,
8065
8178
  required
8066
8179
  }) {
8067
- const errorId = React26.useId();
8068
- const [internal, setInternal] = React26.useState(defaultValue);
8069
- const [hover, setHover] = React26.useState(null);
8180
+ const errorId = React27.useId();
8181
+ const [internal, setInternal] = React27.useState(defaultValue);
8182
+ const [hover, setHover] = React27.useState(null);
8070
8183
  const current = value ?? internal;
8071
8184
  const display2 = hover ?? current;
8072
8185
  const interactive = !readOnly && !disabled;
@@ -8189,9 +8302,9 @@ function TimePicker({
8189
8302
  required,
8190
8303
  style
8191
8304
  }) {
8192
- const errorId = React26.useId();
8305
+ const errorId = React27.useId();
8193
8306
  const hasError = errorMessage != null;
8194
- const [open, setOpen] = React26.useState(false);
8307
+ const [open, setOpen] = React27.useState(false);
8195
8308
  const parsed = parse(value) ?? { h: 0, m: 0, s: 0 };
8196
8309
  const update = (next) => {
8197
8310
  const merged = { ...parsed, ...next };
@@ -8315,13 +8428,13 @@ function DateRangePicker({
8315
8428
  required,
8316
8429
  style
8317
8430
  }) {
8318
- const errorId = React26.useId();
8431
+ const errorId = React27.useId();
8319
8432
  const hasError = errorMessage != null;
8320
- const [open, setOpen] = React26.useState(false);
8321
- const [leftMonth, setLeftMonth] = React26.useState(() => startOfMonth2(value.start ?? /* @__PURE__ */ new Date()));
8322
- const [pendingStart, setPendingStart] = React26.useState(null);
8323
- const [hoverDate, setHoverDate] = React26.useState(null);
8324
- const weekdays = React26.useMemo(
8433
+ const [open, setOpen] = React27.useState(false);
8434
+ const [leftMonth, setLeftMonth] = React27.useState(() => startOfMonth2(value.start ?? /* @__PURE__ */ new Date()));
8435
+ const [pendingStart, setPendingStart] = React27.useState(null);
8436
+ const [hoverDate, setHoverDate] = React27.useState(null);
8437
+ const weekdays = React27.useMemo(
8325
8438
  () => WEEKDAY.slice(weekStartsOn).concat(WEEKDAY.slice(0, weekStartsOn)),
8326
8439
  [weekStartsOn]
8327
8440
  );
@@ -8497,10 +8610,10 @@ function ColorPicker({
8497
8610
  required,
8498
8611
  placeholder = "Pick a colour\u2026"
8499
8612
  }) {
8500
- const errorId = React26.useId();
8613
+ const errorId = React27.useId();
8501
8614
  const hasError = errorMessage != null;
8502
- const [open, setOpen] = React26.useState(false);
8503
- const [draft, setDraft] = React26.useState(value);
8615
+ const [open, setOpen] = React27.useState(false);
8616
+ const [draft, setDraft] = React27.useState(value);
8504
8617
  const valid = HEX_RE.test(value);
8505
8618
  const pick = (hex) => {
8506
8619
  onChange?.(hex);
@@ -8647,6 +8760,7 @@ exports.IconButton = IconButton;
8647
8760
  exports.Kbd = Kbd;
8648
8761
  exports.List = List2;
8649
8762
  exports.LoadingSpinner = LoadingSpinner;
8763
+ exports.LogoutTimer = LogoutTimer;
8650
8764
  exports.MegaMenu = MegaMenu_default;
8651
8765
  exports.MenuButton = MenuButton;
8652
8766
  exports.Modal = Modal;