@pimolu/react 0.1.0-beta.3.1 → 0.1.0-beta.4

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.js CHANGED
@@ -137,6 +137,7 @@ var Button = forwardRef(
137
137
  size,
138
138
  radius,
139
139
  loading = false,
140
+ loadingIndicator,
140
141
  startIcon,
141
142
  endIcon,
142
143
  fullWidth = false,
@@ -168,7 +169,14 @@ var Button = forwardRef(
168
169
  "aria-busy": loading || void 0,
169
170
  className: mergeClasses(classes38, partClasses.root),
170
171
  children: [
171
- loading ? /* @__PURE__ */ jsx2(
172
+ loading && loadingIndicator !== void 0 ? loadingIndicator !== null && loadingIndicator !== false && /* @__PURE__ */ jsx2(
173
+ "span",
174
+ {
175
+ className: mergeClasses("pimolu-button__loading-indicator", partClasses.spinner),
176
+ "aria-hidden": "true",
177
+ children: loadingIndicator
178
+ }
179
+ ) : loading ? /* @__PURE__ */ jsx2(
172
180
  "span",
173
181
  {
174
182
  className: mergeClasses("pimolu-button__spinner", partClasses.spinner),
@@ -5693,17 +5701,64 @@ function DialogClose({
5693
5701
  });
5694
5702
  }
5695
5703
 
5704
+ // internal/use-sliding-indicator.ts
5705
+ import { useCallback as useCallback7, useEffect as useEffect15, useLayoutEffect as useLayoutEffect2, useState as useState15 } from "react";
5706
+ var useBrowserLayoutEffect = typeof window === "undefined" ? useEffect15 : useLayoutEffect2;
5707
+ function useSlidingIndicator(ref, selector, layoutKey) {
5708
+ const [indicator, setIndicator] = useState15(null);
5709
+ const [ready, setReady] = useState15(false);
5710
+ const measure = useCallback7(() => {
5711
+ const selected = ref.current?.querySelector(selector);
5712
+ if (!selected || !selected.offsetWidth || !selected.offsetHeight) {
5713
+ setIndicator(null);
5714
+ return;
5715
+ }
5716
+ const next = { x: selected.offsetLeft, y: selected.offsetTop, width: selected.offsetWidth, height: selected.offsetHeight };
5717
+ setIndicator((current) => current && current.x === next.x && current.y === next.y && current.width === next.width && current.height === next.height ? current : next);
5718
+ }, [ref, selector]);
5719
+ useBrowserLayoutEffect(() => {
5720
+ const group = ref.current;
5721
+ if (!group) return;
5722
+ const observer = typeof ResizeObserver === "function" ? new ResizeObserver(measure) : null;
5723
+ const observe = () => {
5724
+ observer?.disconnect();
5725
+ observer?.observe(group);
5726
+ group.querySelectorAll(':scope > [role="tab"], :scope > [role="radio"]').forEach((item) => observer?.observe(item));
5727
+ measure();
5728
+ };
5729
+ observe();
5730
+ const mutations = typeof MutationObserver === "function" ? new MutationObserver(observe) : null;
5731
+ mutations?.observe(group, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: ["class", "disabled", "hidden", "dir"] });
5732
+ window.addEventListener("resize", measure);
5733
+ return () => {
5734
+ observer?.disconnect();
5735
+ mutations?.disconnect();
5736
+ window.removeEventListener("resize", measure);
5737
+ };
5738
+ }, [ref, measure, layoutKey]);
5739
+ const visible = indicator !== null;
5740
+ useEffect15(() => {
5741
+ if (!visible) {
5742
+ setReady(false);
5743
+ return;
5744
+ }
5745
+ const frame = requestAnimationFrame(() => setReady(true));
5746
+ return () => cancelAnimationFrame(frame);
5747
+ }, [visible]);
5748
+ return { indicator, ready, visible };
5749
+ }
5750
+
5696
5751
  // tabs/tabs.tsx
5697
5752
  import {
5698
5753
  Children as Children3,
5699
5754
  createContext as createContext5,
5700
- useCallback as useCallback7,
5755
+ useCallback as useCallback8,
5701
5756
  useContext as useContext5,
5702
- useEffect as useEffect15,
5757
+ useEffect as useEffect16,
5703
5758
  useId as useId15,
5704
5759
  useMemo as useMemo5,
5705
5760
  useRef as useRef15,
5706
- useState as useState15
5761
+ useState as useState16
5707
5762
  } from "react";
5708
5763
 
5709
5764
  // tabs/tabs.variants.ts
@@ -5741,6 +5796,13 @@ function toId(value) {
5741
5796
  function prefersReducedMotion4() {
5742
5797
  return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
5743
5798
  }
5799
+ function revealSelectedTab(list) {
5800
+ const selected = list.querySelector('[role="tab"][aria-selected="true"]');
5801
+ if (!selected) return;
5802
+ const track = list.getBoundingClientRect(), tab = selected.getBoundingClientRect();
5803
+ if (tab.left < track.left + 32) list.scrollLeft -= track.left + 32 - tab.left;
5804
+ else if (tab.right > track.right - 32) list.scrollLeft += tab.right - track.right + 32;
5805
+ }
5744
5806
  function Chevron2({
5745
5807
  direction
5746
5808
  }) {
@@ -5786,14 +5848,15 @@ function Tabs({
5786
5848
  activationMode = "automatic",
5787
5849
  variant = "line",
5788
5850
  size = "md",
5851
+ animated = true,
5789
5852
  className
5790
5853
  }) {
5791
5854
  const [partClasses, scopeParts] = usePartClasses("tabs", classNames, true);
5792
5855
  const isControlled = controlledValue !== void 0;
5793
- const [uncontrolledValue, setUncontrolledValue] = useState15(defaultValue);
5856
+ const [uncontrolledValue, setUncontrolledValue] = useState16(defaultValue);
5794
5857
  const value = isControlled ? controlledValue : uncontrolledValue;
5795
5858
  const baseId = `pimolu-tabs-${useId15()}`;
5796
- const setValue = useCallback7(
5859
+ const setValue = useCallback8(
5797
5860
  (next) => {
5798
5861
  if (next === value) return;
5799
5862
  if (!isControlled) {
@@ -5809,14 +5872,18 @@ function Tabs({
5809
5872
  setValue,
5810
5873
  baseId,
5811
5874
  orientation,
5812
- activationMode
5875
+ activationMode,
5876
+ variant,
5877
+ size
5813
5878
  }),
5814
5879
  [
5815
5880
  value,
5816
5881
  setValue,
5817
5882
  baseId,
5818
5883
  orientation,
5819
- activationMode
5884
+ activationMode,
5885
+ variant,
5886
+ size
5820
5887
  ]
5821
5888
  );
5822
5889
  return scopeParts(/* @__PURE__ */ jsx26(TabsContext.Provider, { value: context, children: /* @__PURE__ */ jsx26(
@@ -5828,6 +5895,7 @@ function Tabs({
5828
5895
  className
5829
5896
  ].filter(Boolean).join(" "), partClasses.root),
5830
5897
  "data-orientation": orientation,
5898
+ "data-animated": animated ? void 0 : "false",
5831
5899
  children
5832
5900
  }
5833
5901
  ) }));
@@ -5840,6 +5908,7 @@ function TabsList({
5840
5908
  "aria-labelledby": ariaLabelledBy,
5841
5909
  dividers = false,
5842
5910
  scrollable = false,
5911
+ showScrollbar = false,
5843
5912
  scrollPreviousLabel = "Previous tabs",
5844
5913
  scrollNextLabel = "Next tabs"
5845
5914
  }) {
@@ -5848,16 +5917,24 @@ function TabsList({
5848
5917
  value,
5849
5918
  setValue,
5850
5919
  orientation,
5851
- activationMode
5920
+ activationMode,
5921
+ variant,
5922
+ size
5852
5923
  } = useTabs("TabsList");
5853
5924
  const listRef = useRef15(null);
5925
+ const indicatorLayout = useMemo5(() => ({ value, orientation, variant, size, children }), [value, orientation, variant, size, children]);
5926
+ const { indicator, ready: indicatorReady, visible: indicatorVisible } = useSlidingIndicator(
5927
+ listRef,
5928
+ ':scope > [role="tab"][aria-selected="true"]:not([disabled])',
5929
+ indicatorLayout
5930
+ );
5854
5931
  const isScrollable = scrollable && orientation === "horizontal";
5855
5932
  const itemCount = Children3.count(children);
5856
- const [overflow, setOverflow] = useState15({
5933
+ const [overflow, setOverflow] = useState16({
5857
5934
  start: false,
5858
5935
  end: false
5859
5936
  });
5860
- const updateOverflow = useCallback7(() => {
5937
+ const updateOverflow = useCallback8(() => {
5861
5938
  const list = listRef.current;
5862
5939
  if (!list || !isScrollable) {
5863
5940
  setOverflow(
@@ -5874,7 +5951,7 @@ function TabsList({
5874
5951
  (current) => current.start === next.start && current.end === next.end ? current : next
5875
5952
  );
5876
5953
  }, [isScrollable]);
5877
- useEffect15(() => {
5954
+ useEffect16(() => {
5878
5955
  if (!isScrollable) {
5879
5956
  updateOverflow();
5880
5957
  return;
@@ -5882,20 +5959,24 @@ function TabsList({
5882
5959
  updateOverflow();
5883
5960
  const list = listRef.current;
5884
5961
  if (!list) return;
5885
- const observer = typeof ResizeObserver === "function" ? new ResizeObserver(updateOverflow) : null;
5962
+ const handleResize = () => {
5963
+ revealSelectedTab(list);
5964
+ updateOverflow();
5965
+ };
5966
+ const observer = typeof ResizeObserver === "function" ? new ResizeObserver(handleResize) : null;
5886
5967
  observer?.observe(list);
5887
- window.addEventListener("resize", updateOverflow);
5968
+ window.addEventListener("resize", handleResize);
5888
5969
  const frame = typeof requestAnimationFrame === "function" ? requestAnimationFrame(updateOverflow) : 0;
5889
5970
  return () => {
5890
5971
  observer?.disconnect();
5891
5972
  window.removeEventListener(
5892
5973
  "resize",
5893
- updateOverflow
5974
+ handleResize
5894
5975
  );
5895
5976
  if (frame) cancelAnimationFrame(frame);
5896
5977
  };
5897
5978
  }, [isScrollable, itemCount, updateOverflow]);
5898
- useEffect15(() => {
5979
+ useEffect16(() => {
5899
5980
  if (value !== void 0) return;
5900
5981
  const first = listRef.current?.querySelector(
5901
5982
  '[role="tab"]:not([disabled])'
@@ -5905,22 +5986,11 @@ function TabsList({
5905
5986
  setValue(firstValue);
5906
5987
  }
5907
5988
  }, [value, setValue]);
5908
- useEffect15(() => {
5989
+ useEffect16(() => {
5909
5990
  if (!isScrollable) return;
5910
5991
  const list = listRef.current;
5911
5992
  if (!list) return;
5912
- const selected = list.querySelector(
5913
- '[role="tab"][aria-selected="true"]'
5914
- );
5915
- if (!selected) return;
5916
- const listRect = list.getBoundingClientRect();
5917
- const tabRect = selected.getBoundingClientRect();
5918
- const arrowInset = 32;
5919
- if (tabRect.left < listRect.left + arrowInset) {
5920
- list.scrollLeft -= listRect.left + arrowInset - tabRect.left;
5921
- } else if (tabRect.right > listRect.right - arrowInset) {
5922
- list.scrollLeft += tabRect.right - (listRect.right - arrowInset);
5923
- }
5993
+ revealSelectedTab(list);
5924
5994
  updateOverflow();
5925
5995
  }, [value, isScrollable, updateOverflow]);
5926
5996
  function handleKeyDown(event) {
@@ -5995,7 +6065,7 @@ function TabsList({
5995
6065
  children: /* @__PURE__ */ jsx26(Chevron2, { direction: "start" })
5996
6066
  }
5997
6067
  ),
5998
- /* @__PURE__ */ jsx26(
6068
+ /* @__PURE__ */ jsxs21(
5999
6069
  "div",
6000
6070
  {
6001
6071
  ref: listRef,
@@ -6004,6 +6074,8 @@ function TabsList({
6004
6074
  "aria-label": ariaLabel,
6005
6075
  "aria-labelledby": ariaLabelledBy,
6006
6076
  "data-dividers": dividers ? "true" : void 0,
6077
+ "data-show-scrollbar": showScrollbar ? "true" : void 0,
6078
+ "data-indicator": indicatorVisible ? "true" : void 0,
6007
6079
  "data-scrollable": isScrollable ? "true" : void 0,
6008
6080
  className: mergeClasses(classes2(
6009
6081
  "pimolu-tabs__list",
@@ -6011,7 +6083,23 @@ function TabsList({
6011
6083
  ), partClasses.list),
6012
6084
  onKeyDown: handleKeyDown,
6013
6085
  onScroll: isScrollable ? updateOverflow : void 0,
6014
- children
6086
+ children: [
6087
+ children,
6088
+ /* @__PURE__ */ jsx26(
6089
+ "span",
6090
+ {
6091
+ "aria-hidden": "true",
6092
+ className: mergeClasses("pimolu-tabs__indicator", partClasses.indicator),
6093
+ "data-ready": indicatorReady ? "true" : void 0,
6094
+ hidden: !indicatorVisible,
6095
+ style: indicator ? {
6096
+ transform: `translate3d(${indicator.x}px, ${indicator.y}px, 0)`,
6097
+ width: indicator.width,
6098
+ height: indicator.height
6099
+ } : void 0
6100
+ }
6101
+ )
6102
+ ]
6015
6103
  }
6016
6104
  ),
6017
6105
  isScrollable && overflow.end && /* @__PURE__ */ jsx26(
@@ -6091,7 +6179,7 @@ function TabsContent({
6091
6179
  // toggle/toggle.tsx
6092
6180
  import {
6093
6181
  forwardRef as forwardRef21,
6094
- useState as useState16
6182
+ useState as useState17
6095
6183
  } from "react";
6096
6184
 
6097
6185
  // toggle/toggle.variants.ts
@@ -6135,7 +6223,7 @@ var Toggle = forwardRef21(function Toggle2({
6135
6223
  }, ref) {
6136
6224
  const [partClasses, scopeParts] = usePartClasses("toggle", classNames, true);
6137
6225
  const isControlled = controlledPressed !== void 0;
6138
- const [uncontrolledPressed, setUncontrolledPressed] = useState16(defaultPressed);
6226
+ const [uncontrolledPressed, setUncontrolledPressed] = useState17(defaultPressed);
6139
6227
  const pressed = isControlled ? controlledPressed : uncontrolledPressed;
6140
6228
  function handleClick(event) {
6141
6229
  onClick?.(event);
@@ -6169,7 +6257,7 @@ var Toggle = forwardRef21(function Toggle2({
6169
6257
  import {
6170
6258
  createContext as createContext6,
6171
6259
  useContext as useContext6,
6172
- useState as useState17
6260
+ useState as useState18
6173
6261
  } from "react";
6174
6262
  import { jsx as jsx28 } from "react/jsx-runtime";
6175
6263
  var ToggleGroupContext = createContext6(null);
@@ -6198,10 +6286,10 @@ function ToggleGroup(props) {
6198
6286
  } = props;
6199
6287
  const multiple = props.type === "multiple";
6200
6288
  const controlledValue = props.value;
6201
- const [singleValue, setSingleValue] = useState17(
6289
+ const [singleValue, setSingleValue] = useState18(
6202
6290
  multiple ? "" : props.defaultValue ?? ""
6203
6291
  );
6204
- const [multipleValue, setMultipleValue] = useState17(
6292
+ const [multipleValue, setMultipleValue] = useState18(
6205
6293
  multiple ? props.defaultValue ?? [] : []
6206
6294
  );
6207
6295
  const value = controlledValue !== void 0 ? controlledValue : multiple ? multipleValue : singleValue;
@@ -6281,9 +6369,10 @@ function ToggleGroupItem({
6281
6369
  // segmented-control/segmented-control.tsx
6282
6370
  import {
6283
6371
  forwardRef as forwardRef22,
6284
- useEffect as useEffect16,
6372
+ useEffect as useEffect17,
6373
+ useMemo as useMemo6,
6285
6374
  useRef as useRef16,
6286
- useState as useState18
6375
+ useState as useState19
6287
6376
  } from "react";
6288
6377
 
6289
6378
  // segmented-control/segmented-control.variants.ts
@@ -6315,6 +6404,8 @@ var SegmentedControl = forwardRef22(function SegmentedControl2({
6315
6404
  orientation = "horizontal",
6316
6405
  fullWidth = false,
6317
6406
  disabled = false,
6407
+ animated = true,
6408
+ showScrollbar = false,
6318
6409
  name,
6319
6410
  className,
6320
6411
  ...props
@@ -6323,11 +6414,31 @@ var SegmentedControl = forwardRef22(function SegmentedControl2({
6323
6414
  const firstEnabled2 = options.find(
6324
6415
  (option) => !option.disabled
6325
6416
  )?.value;
6326
- const [uncontrolledValue, setUncontrolledValue] = useState18(defaultValue ?? firstEnabled2);
6417
+ const [uncontrolledValue, setUncontrolledValue] = useState19(defaultValue ?? firstEnabled2);
6327
6418
  const isControlled = controlledValue !== void 0;
6328
6419
  const value = isControlled ? controlledValue : uncontrolledValue;
6329
6420
  const groupRef = useRef16(null);
6330
- useEffect16(() => {
6421
+ const indicatorLayout = useMemo6(() => ({ value, orientation, size, options, disabled }), [value, orientation, size, options, disabled]);
6422
+ const { indicator, ready, visible } = useSlidingIndicator(
6423
+ groupRef,
6424
+ ':scope > [role="radio"][aria-checked="true"]',
6425
+ indicatorLayout
6426
+ );
6427
+ useEffect17(() => {
6428
+ const group = groupRef.current;
6429
+ if (!group) return;
6430
+ const selected = group.querySelector(':scope > [role="radio"][aria-checked="true"]');
6431
+ if (!selected) return;
6432
+ const groupBox = group.getBoundingClientRect(), box = selected.getBoundingClientRect();
6433
+ if (orientation === "vertical") {
6434
+ if (box.top < groupBox.top + 4) group.scrollTop -= groupBox.top + 4 - box.top;
6435
+ else if (box.bottom > groupBox.bottom - 4) group.scrollTop += box.bottom - groupBox.bottom + 4;
6436
+ } else {
6437
+ if (box.left < groupBox.left + 4) group.scrollLeft -= groupBox.left + 4 - box.left;
6438
+ else if (box.right > groupBox.right - 4) group.scrollLeft += box.right - groupBox.right + 4;
6439
+ }
6440
+ }, [value, orientation, options]);
6441
+ useEffect17(() => {
6331
6442
  if (isControlled) return;
6332
6443
  if (options.some(
6333
6444
  (option) => option.value === uncontrolledValue && !option.disabled
@@ -6401,6 +6512,9 @@ var SegmentedControl = forwardRef22(function SegmentedControl2({
6401
6512
  "aria-orientation": orientation,
6402
6513
  "aria-disabled": disabled || void 0,
6403
6514
  "data-disabled": disabled || void 0,
6515
+ "data-animated": animated ? void 0 : "false",
6516
+ "data-indicator": visible ? "true" : void 0,
6517
+ "data-show-scrollbar": showScrollbar ? "true" : void 0,
6404
6518
  className: mergeClasses([
6405
6519
  segmentedControlVariants({ size }),
6406
6520
  fullWidth && "pimolu-segmented-control--full-width",
@@ -6437,6 +6551,20 @@ var SegmentedControl = forwardRef22(function SegmentedControl2({
6437
6551
  name,
6438
6552
  value: value ?? ""
6439
6553
  }
6554
+ ),
6555
+ /* @__PURE__ */ jsx29(
6556
+ "span",
6557
+ {
6558
+ "aria-hidden": "true",
6559
+ className: mergeClasses("pimolu-segmented-control__indicator", partClasses.indicator),
6560
+ "data-ready": ready ? "true" : void 0,
6561
+ hidden: !visible,
6562
+ style: indicator ? {
6563
+ transform: `translate3d(${indicator.x}px, ${indicator.y}px, 0)`,
6564
+ width: indicator.width,
6565
+ height: indicator.height
6566
+ } : void 0
6567
+ }
6440
6568
  )
6441
6569
  ]
6442
6570
  }
@@ -7018,7 +7146,7 @@ import {
7018
7146
  useContext as useContext8,
7019
7147
  useId as useId17,
7020
7148
  useRef as useRef17,
7021
- useState as useState19
7149
+ useState as useState20
7022
7150
  } from "react";
7023
7151
 
7024
7152
  // accordion/accordion.variants.ts
@@ -7094,10 +7222,10 @@ function Accordion(props) {
7094
7222
  } = props;
7095
7223
  const multiple = props.type === "multiple";
7096
7224
  const controlledValue = props.value;
7097
- const [singleValue, setSingleValue] = useState19(
7225
+ const [singleValue, setSingleValue] = useState20(
7098
7226
  multiple ? void 0 : props.defaultValue
7099
7227
  );
7100
- const [multipleValue, setMultipleValue] = useState19(
7228
+ const [multipleValue, setMultipleValue] = useState20(
7101
7229
  multiple ? props.defaultValue ?? [] : []
7102
7230
  );
7103
7231
  const value = controlledValue !== void 0 ? controlledValue : multiple ? multipleValue : singleValue;
@@ -7368,7 +7496,7 @@ function BreadcrumbPage({
7368
7496
  }
7369
7497
 
7370
7498
  // pagination/pagination.tsx
7371
- import { useState as useState20 } from "react";
7499
+ import { useState as useState21 } from "react";
7372
7500
 
7373
7501
  // pagination/pagination.variants.ts
7374
7502
  import { createVariants as createVariants31 } from "@pimolu/core";
@@ -7431,7 +7559,7 @@ function Pagination({
7431
7559
  ...props
7432
7560
  }) {
7433
7561
  const [partClasses, scopeParts] = usePartClasses("pagination", classNames, true);
7434
- const [uncontrolledPage, setUncontrolledPage] = useState20(defaultPage);
7562
+ const [uncontrolledPage, setUncontrolledPage] = useState21(defaultPage);
7435
7563
  const isControlled = controlledPage !== void 0;
7436
7564
  const current = clamp4(
7437
7565
  isControlled ? controlledPage : uncontrolledPage,
@@ -7514,7 +7642,7 @@ function Pagination({
7514
7642
  import {
7515
7643
  createContext as createContext9,
7516
7644
  useContext as useContext9,
7517
- useState as useState21
7645
+ useState as useState22
7518
7646
  } from "react";
7519
7647
  import { Fragment as Fragment6, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
7520
7648
  var StepperContext = createContext9(null);
@@ -7542,7 +7670,7 @@ function Stepper({
7542
7670
  className
7543
7671
  }) {
7544
7672
  const [partClasses, scopeParts] = usePartClasses("stepper", classNames, true);
7545
- const [uncontrolledStep, setUncontrolledStep] = useState21(defaultActiveStep);
7673
+ const [uncontrolledStep, setUncontrolledStep] = useState22(defaultActiveStep);
7546
7674
  const isControlled = controlledActiveStep !== void 0;
7547
7675
  const activeStep = isControlled ? controlledActiveStep : uncontrolledStep;
7548
7676
  function change(step) {
@@ -7637,12 +7765,12 @@ var navbarVariants = createVariants32({ base: "pimolu-navbar", variants: navbarV
7637
7765
  // navbar/navbar.tsx
7638
7766
  import {
7639
7767
  createContext as createContext10,
7640
- useCallback as useCallback8,
7768
+ useCallback as useCallback9,
7641
7769
  useContext as useContext10,
7642
- useEffect as useEffect17,
7770
+ useEffect as useEffect18,
7643
7771
  useId as useId18,
7644
7772
  useRef as useRef18,
7645
- useState as useState22
7773
+ useState as useState23
7646
7774
  } from "react";
7647
7775
  import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
7648
7776
  function classes7(base, className) {
@@ -7681,13 +7809,13 @@ function Navbar({
7681
7809
  ...props
7682
7810
  }) {
7683
7811
  const [partClasses, scopeParts] = usePartClasses("navbar", classNames, true);
7684
- const [internalOpen, setInternalOpen] = useState22(defaultOpen);
7812
+ const [internalOpen, setInternalOpen] = useState23(defaultOpen);
7685
7813
  const open = controlledOpen ?? internalOpen;
7686
7814
  const defaultContentId = `pimolu-navbar-${useId18()}-content`;
7687
- const [contentId, setContentId] = useState22(defaultContentId);
7815
+ const [contentId, setContentId] = useState23(defaultContentId);
7688
7816
  const rootRef = useRef18(null);
7689
7817
  const toggleRef = useRef18(null);
7690
- const setOpen = useCallback8(
7818
+ const setOpen = useCallback9(
7691
7819
  (next) => {
7692
7820
  if (next === open) return;
7693
7821
  if (controlledOpen === void 0) setInternalOpen(next);
@@ -7696,7 +7824,7 @@ function Navbar({
7696
7824
  [controlledOpen, onOpenChange, open]
7697
7825
  );
7698
7826
  useOutsidePointer(rootRef, collapsible && open, () => setOpen(false));
7699
- useEffect17(() => {
7827
+ useEffect18(() => {
7700
7828
  if (!collapsible || !open) return;
7701
7829
  function handleEscape(event) {
7702
7830
  if (event.key !== "Escape" || !rootRef.current?.contains(document.activeElement)) return;
@@ -7765,7 +7893,7 @@ function NavbarContent({
7765
7893
  const [partClasses, scopeParts] = usePartClasses("navbar", classNames, false);
7766
7894
  const context = useContext10(NavbarContext);
7767
7895
  const resolvedId = id ?? context?.defaultContentId;
7768
- useEffect17(() => {
7896
+ useEffect18(() => {
7769
7897
  if (context && resolvedId) context.setContentId(resolvedId);
7770
7898
  }, [context?.setContentId, resolvedId]);
7771
7899
  return scopeParts(/* @__PURE__ */ jsx39(
@@ -7881,9 +8009,9 @@ function NavbarActions({
7881
8009
  import {
7882
8010
  createContext as createContext11,
7883
8011
  useContext as useContext11,
7884
- useEffect as useEffect18,
8012
+ useEffect as useEffect19,
7885
8013
  useRef as useRef19,
7886
- useState as useState23,
8014
+ useState as useState24,
7887
8015
  useSyncExternalStore as useSyncExternalStore2
7888
8016
  } from "react";
7889
8017
  import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
@@ -7918,11 +8046,11 @@ function Sidebar({
7918
8046
  }) {
7919
8047
  const [partClasses, scopeParts] = usePartClasses("sidebar", classNames, true);
7920
8048
  const mobile = useSyncExternalStore2(subscribeMobile, mobileSnapshot, () => false);
7921
- const [internalCollapsed, setInternalCollapsed] = useState23(defaultCollapsed);
8049
+ const [internalCollapsed, setInternalCollapsed] = useState24(defaultCollapsed);
7922
8050
  const isCollapsed = collapsible && (collapsed ?? internalCollapsed ?? (collapseOnMobile && mobile));
7923
8051
  const sidebarRef = useRef19(null);
7924
8052
  const toggleRef = useRef19(null);
7925
- useEffect18(() => {
8053
+ useEffect19(() => {
7926
8054
  const active = sidebarRef.current?.ownerDocument.activeElement;
7927
8055
  if (isCollapsed && active && active !== toggleRef.current && sidebarRef.current?.contains(active)) {
7928
8056
  toggleRef.current?.focus();
@@ -8114,10 +8242,10 @@ function SidebarFooter({
8114
8242
  import {
8115
8243
  createContext as createContext12,
8116
8244
  useContext as useContext12,
8117
- useEffect as useEffect19,
8245
+ useEffect as useEffect20,
8118
8246
  useId as useId19,
8119
8247
  useRef as useRef20,
8120
- useState as useState24
8248
+ useState as useState25
8121
8249
  } from "react";
8122
8250
  import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
8123
8251
  function slug2(value) {
@@ -8175,7 +8303,7 @@ function NavigationMenu({
8175
8303
  ...props
8176
8304
  }) {
8177
8305
  const [partClasses, scopeParts] = usePartClasses("navigation-menu", classNames, true);
8178
- const [openValue, setOpenValue] = useState24(
8306
+ const [openValue, setOpenValue] = useState25(
8179
8307
  null
8180
8308
  );
8181
8309
  const rootRef = useRef20(null);
@@ -8185,7 +8313,7 @@ function NavigationMenu({
8185
8313
  openValue !== null,
8186
8314
  () => setOpenValue(null)
8187
8315
  );
8188
- useEffect19(() => {
8316
+ useEffect20(() => {
8189
8317
  if (openValue === null) return;
8190
8318
  function handleKeyDown(event) {
8191
8319
  if (event.key !== "Escape" || openValue === null) return;
@@ -8427,9 +8555,9 @@ function ScrollArea({
8427
8555
 
8428
8556
  // tree-view/tree-view.tsx
8429
8557
  import {
8430
- useEffect as useEffect20,
8558
+ useEffect as useEffect21,
8431
8559
  useRef as useRef21,
8432
- useState as useState25
8560
+ useState as useState26
8433
8561
  } from "react";
8434
8562
  import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
8435
8563
  function flatten(items, expanded, level = 1, parentId) {
@@ -8483,16 +8611,16 @@ function TreeView({
8483
8611
  }) {
8484
8612
  const [partClasses, scopeParts] = usePartClasses("tree-view", classNames, true);
8485
8613
  const isExpandedControlled = controlledExpanded !== void 0;
8486
- const [uncontrolledExpanded, setUncontrolledExpanded] = useState25([...defaultExpandedIds]);
8614
+ const [uncontrolledExpanded, setUncontrolledExpanded] = useState26([...defaultExpandedIds]);
8487
8615
  const expandedIds = isExpandedControlled ? [...controlledExpanded] : uncontrolledExpanded;
8488
8616
  const expanded = new Set(expandedIds);
8489
8617
  const isSelectedControlled = controlledSelected !== void 0;
8490
- const [uncontrolledSelected, setUncontrolledSelected] = useState25(defaultSelectedId);
8618
+ const [uncontrolledSelected, setUncontrolledSelected] = useState26(defaultSelectedId);
8491
8619
  const selectedId = isSelectedControlled ? controlledSelected : uncontrolledSelected;
8492
8620
  const visible = flatten(items, expanded);
8493
- const [focusedId, setFocusedId] = useState25(selectedId ?? visible[0]?.item.id);
8621
+ const [focusedId, setFocusedId] = useState26(selectedId ?? visible[0]?.item.id);
8494
8622
  const refs = useRef21(/* @__PURE__ */ new Map());
8495
- useEffect20(() => {
8623
+ useEffect21(() => {
8496
8624
  if (focusedId && visible.some((node) => node.item.id === focusedId)) {
8497
8625
  return;
8498
8626
  }
@@ -8878,21 +9006,21 @@ import {
8878
9006
  cloneElement as cloneElement6,
8879
9007
  createContext as createContext13,
8880
9008
  isValidElement as isValidElement7,
8881
- useCallback as useCallback9,
9009
+ useCallback as useCallback10,
8882
9010
  useContext as useContext13,
8883
9011
  useId as useId20,
8884
9012
  useRef as useRef23,
8885
- useState as useState27
9013
+ useState as useState28
8886
9014
  } from "react";
8887
9015
 
8888
9016
  // internal/use-presence.ts
8889
- import { useEffect as useEffect21, useRef as useRef22, useState as useState26 } from "react";
9017
+ import { useEffect as useEffect22, useRef as useRef22, useState as useState27 } from "react";
8890
9018
  function prefersReducedMotion5() {
8891
9019
  return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
8892
9020
  }
8893
9021
  function usePresence(open, exitDuration = 150) {
8894
- const [rendered, setRendered] = useState26(open);
8895
- const [state, setState] = useState26(
9022
+ const [rendered, setRendered] = useState27(open);
9023
+ const [state, setState] = useState27(
8896
9024
  "open"
8897
9025
  );
8898
9026
  const timer = useRef22(
@@ -8904,7 +9032,7 @@ function usePresence(open, exitDuration = 150) {
8904
9032
  timer.current = null;
8905
9033
  }
8906
9034
  }
8907
- useEffect21(() => {
9035
+ useEffect22(() => {
8908
9036
  if (open) {
8909
9037
  cancel();
8910
9038
  setRendered(true);
@@ -8923,7 +9051,7 @@ function usePresence(open, exitDuration = 150) {
8923
9051
  }, exitDuration);
8924
9052
  return cancel;
8925
9053
  }, [open, rendered, exitDuration]);
8926
- useEffect21(() => cancel, []);
9054
+ useEffect22(() => cancel, []);
8927
9055
  return { rendered, state };
8928
9056
  }
8929
9057
 
@@ -8945,9 +9073,9 @@ function DropdownMenu({
8945
9073
  defaultOpen = false,
8946
9074
  onOpenChange
8947
9075
  }) {
8948
- const [uncontrolledOpen, setUncontrolledOpen] = useState27(defaultOpen);
9076
+ const [uncontrolledOpen, setUncontrolledOpen] = useState28(defaultOpen);
8949
9077
  const open = controlledOpen === void 0 ? uncontrolledOpen : controlledOpen;
8950
- const setOpen = useCallback9(
9078
+ const setOpen = useCallback10(
8951
9079
  (next) => {
8952
9080
  if (controlledOpen === void 0) {
8953
9081
  setUncontrolledOpen(next);
@@ -9034,7 +9162,7 @@ function DropdownMenuContent({
9034
9162
  maxHeight: 320
9035
9163
  }
9036
9164
  );
9037
- const attachContent = useCallback9((node) => {
9165
+ const attachContent = useCallback10((node) => {
9038
9166
  menu.contentRef.current = node;
9039
9167
  if (node && menu.open) {
9040
9168
  node.querySelector(
@@ -9156,9 +9284,7 @@ function DropdownMenuLabel({
9156
9284
  }
9157
9285
 
9158
9286
  // toast/toast.tsx
9159
- import {
9160
- useSyncExternalStore as useSyncExternalStore3
9161
- } from "react";
9287
+ import { useSyncExternalStore as useSyncExternalStore3 } from "react";
9162
9288
 
9163
9289
  // toast/toast.variants.ts
9164
9290
  import { createVariants as createVariants35 } from "@pimolu/core";
@@ -9167,7 +9293,9 @@ var toastVariantMap = {
9167
9293
  default: "pimolu-toast--default",
9168
9294
  success: "pimolu-toast--success",
9169
9295
  warning: "pimolu-toast--warning",
9170
- danger: "pimolu-toast--danger"
9296
+ danger: "pimolu-toast--danger",
9297
+ info: "pimolu-toast--info",
9298
+ loading: "pimolu-toast--loading"
9171
9299
  }
9172
9300
  };
9173
9301
  var toastVariants = createVariants35({
@@ -9179,97 +9307,201 @@ var toastVariants = createVariants35({
9179
9307
  });
9180
9308
 
9181
9309
  // toast/toast.tsx
9182
- import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
9310
+ import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
9183
9311
  var toasts = [];
9312
+ var serverSnapshot = [];
9184
9313
  var counter = 0;
9185
9314
  var listeners = /* @__PURE__ */ new Set();
9315
+ var timers = /* @__PURE__ */ new Map();
9186
9316
  function emit() {
9187
9317
  listeners.forEach((listener) => listener());
9188
9318
  }
9189
9319
  function subscribe(listener) {
9190
9320
  listeners.add(listener);
9191
- return () => listeners.delete(listener);
9321
+ return () => {
9322
+ listeners.delete(listener);
9323
+ };
9192
9324
  }
9193
9325
  function getSnapshot() {
9194
9326
  return toasts;
9195
9327
  }
9196
9328
  function getServerSnapshot() {
9197
- return toasts;
9329
+ return serverSnapshot;
9330
+ }
9331
+ function startTimer(id, timer) {
9332
+ if (timer.pauses.size || !Number.isFinite(timer.remaining) || timer.remaining <= 0) return;
9333
+ timer.started = Date.now();
9334
+ timer.handle = setTimeout(() => dismissToast(id), timer.remaining);
9335
+ }
9336
+ function resetTimer(item) {
9337
+ const previous = timers.get(item.id);
9338
+ clearTimeout(previous?.handle);
9339
+ const timer = {
9340
+ remaining: item.variant === "loading" ? 0 : item.duration ?? 5e3,
9341
+ started: Date.now(),
9342
+ pauses: previous?.pauses ?? /* @__PURE__ */ new Set()
9343
+ };
9344
+ if (item.pauseOnHover === false) timer.pauses.delete("pointer");
9345
+ if (item.pauseOnFocus === false) timer.pauses.delete("focus");
9346
+ timers.set(item.id, timer);
9347
+ startTimer(item.id, timer);
9348
+ }
9349
+ function pauseTimer(id, reason) {
9350
+ const timer = timers.get(id);
9351
+ if (!timer || timer.pauses.has(reason)) return;
9352
+ if (!timer.pauses.size && timer.handle !== void 0) {
9353
+ clearTimeout(timer.handle);
9354
+ timer.handle = void 0;
9355
+ timer.remaining = Math.max(1, timer.remaining - (Date.now() - timer.started));
9356
+ }
9357
+ timer.pauses.add(reason);
9358
+ }
9359
+ function resumeTimer(id, reason) {
9360
+ const timer = timers.get(id);
9361
+ if (!timer?.pauses.delete(reason)) return;
9362
+ startTimer(id, timer);
9198
9363
  }
9199
9364
  function dismissToast(id) {
9200
- toasts = toasts.filter((item) => item.id !== id);
9365
+ const item = toasts.find((entry) => entry.id === id);
9366
+ if (!item) return;
9367
+ clearTimeout(timers.get(id)?.handle);
9368
+ timers.delete(id);
9369
+ toasts = toasts.filter((entry) => entry.id !== id);
9201
9370
  emit();
9371
+ item.onDismiss?.(id);
9202
9372
  }
9203
9373
  function dismissAllToasts() {
9374
+ const removed = toasts;
9375
+ timers.forEach((timer) => clearTimeout(timer.handle));
9376
+ timers.clear();
9204
9377
  toasts = [];
9205
9378
  emit();
9379
+ removed.forEach((item) => item.onDismiss?.(item.id));
9380
+ }
9381
+ function updateToast(id, options) {
9382
+ const current = toasts.find((item2) => item2.id === id);
9383
+ if (!current) return id;
9384
+ const item = { ...current, ...options, id };
9385
+ toasts = toasts.map((entry) => entry.id === id ? item : entry);
9386
+ resetTimer(item);
9387
+ emit();
9388
+ return id;
9206
9389
  }
9207
- function toast(options) {
9390
+ function createToast(options) {
9208
9391
  const id = options.id ?? `pimolu-toast-${++counter}`;
9209
- const item = {
9210
- duration: 5e3,
9211
- variant: "default",
9212
- ...options,
9213
- id
9214
- };
9392
+ if (toasts.some((item2) => item2.id === id)) return updateToast(id, options);
9393
+ const item = { duration: 5e3, variant: "default", ...options, id };
9215
9394
  toasts = [...toasts, item];
9395
+ resetTimer(item);
9216
9396
  emit();
9217
- if (item.duration && item.duration > 0) {
9218
- setTimeout(() => dismissToast(id), item.duration);
9219
- }
9220
9397
  return id;
9221
9398
  }
9399
+ function showPromise(promise, options) {
9400
+ const { loading, success, error, ...shared } = options;
9401
+ const id = createToast({ ...shared, title: loading, variant: "loading" });
9402
+ const pending = toasts.find((item) => item.id === id);
9403
+ const isPending = () => toasts.find((item) => item.id === id) === pending;
9404
+ const result = typeof promise === "function" ? Promise.resolve().then(promise) : promise;
9405
+ void result.then(
9406
+ (value) => {
9407
+ if (isPending()) updateToast(id, {
9408
+ title: typeof success === "function" ? success(value) : success,
9409
+ variant: "success"
9410
+ });
9411
+ },
9412
+ (reason) => {
9413
+ if (isPending()) updateToast(id, {
9414
+ title: typeof error === "function" ? error(reason) : error,
9415
+ variant: "danger"
9416
+ });
9417
+ }
9418
+ ).catch(() => {
9419
+ if (isPending()) updateToast(id, { title: "Unable to complete the operation.", variant: "danger" });
9420
+ });
9421
+ return id;
9422
+ }
9423
+ var toast = Object.assign(createToast, {
9424
+ success: (title, options) => createToast({ ...options, title, variant: "success" }),
9425
+ error: (title, options) => createToast({ ...options, title, variant: "danger" }),
9426
+ warning: (title, options) => createToast({ ...options, title, variant: "warning" }),
9427
+ info: (title, options) => createToast({ ...options, title, variant: "info" }),
9428
+ loading: (title, options) => createToast({ ...options, title, variant: "loading" }),
9429
+ update: updateToast,
9430
+ dismiss: (id) => id === void 0 ? dismissAllToasts() : dismissToast(id),
9431
+ promise: showPromise
9432
+ });
9222
9433
  function useToast() {
9223
- return { toast, dismiss: dismissToast };
9434
+ return { toast, dismiss: dismissToast, update: updateToast };
9224
9435
  }
9225
9436
  function useToasts() {
9226
- return useSyncExternalStore3(
9227
- subscribe,
9228
- getSnapshot,
9229
- getServerSnapshot
9230
- );
9437
+ return useSyncExternalStore3(subscribe, getSnapshot, getServerSnapshot);
9231
9438
  }
9232
- function CloseIcon2() {
9233
- return /* @__PURE__ */ jsxs36(
9439
+ function ToastIcon({ variant }) {
9440
+ if (variant === "loading") return /* @__PURE__ */ jsx48(Spinner, { size: "sm", decorative: true });
9441
+ return /* @__PURE__ */ jsx48(
9234
9442
  "svg",
9235
9443
  {
9236
9444
  viewBox: "0 0 24 24",
9237
- width: "14",
9238
- height: "14",
9445
+ width: "20",
9446
+ height: "20",
9239
9447
  fill: "none",
9240
9448
  stroke: "currentColor",
9241
- strokeWidth: "2",
9449
+ strokeWidth: "1.8",
9242
9450
  strokeLinecap: "round",
9243
- "aria-hidden": "true",
9451
+ strokeLinejoin: "round",
9244
9452
  focusable: "false",
9245
- children: [
9246
- /* @__PURE__ */ jsx48("path", { d: "M18 6 6 18" }),
9247
- /* @__PURE__ */ jsx48("path", { d: "m6 6 12 12" })
9248
- ]
9453
+ children: variant === "success" ? /* @__PURE__ */ jsxs36(Fragment9, { children: [
9454
+ /* @__PURE__ */ jsx48("circle", { cx: "12", cy: "12", r: "9" }),
9455
+ /* @__PURE__ */ jsx48("path", { d: "m8 12 3 3 5-6" })
9456
+ ] }) : variant === "warning" ? /* @__PURE__ */ jsxs36(Fragment9, { children: [
9457
+ /* @__PURE__ */ jsx48("path", { d: "m12 3 10 18H2Z" }),
9458
+ /* @__PURE__ */ jsx48("path", { d: "M12 9v4m0 4h.01" })
9459
+ ] }) : variant === "danger" ? /* @__PURE__ */ jsxs36(Fragment9, { children: [
9460
+ /* @__PURE__ */ jsx48("circle", { cx: "12", cy: "12", r: "9" }),
9461
+ /* @__PURE__ */ jsx48("path", { d: "m9 9 6 6m0-6-6 6" })
9462
+ ] }) : /* @__PURE__ */ jsxs36(Fragment9, { children: [
9463
+ /* @__PURE__ */ jsx48("circle", { cx: "12", cy: "12", r: "9" }),
9464
+ /* @__PURE__ */ jsx48("path", { d: "M12 11v6m0-10h.01" })
9465
+ ] })
9249
9466
  }
9250
9467
  );
9251
9468
  }
9252
9469
  function ToastItem({ item }) {
9253
9470
  const [partClasses, scopeParts] = usePartClasses("toast", item.classNames, false);
9471
+ const icon = item.icon === void 0 ? /* @__PURE__ */ jsx48(ToastIcon, { variant: item.variant }) : item.icon;
9254
9472
  return scopeParts(
9255
9473
  /* @__PURE__ */ jsxs36(
9256
9474
  "div",
9257
9475
  {
9258
- className: mergeClasses(toastVariants({
9259
- variant: item.variant
9260
- }), partClasses.toast, item.classNames?.root),
9476
+ className: mergeClasses(toastVariants({ variant: item.variant }), partClasses.toast, item.classNames?.root),
9261
9477
  "data-state": "open",
9478
+ "data-variant": item.variant,
9479
+ "aria-atomic": "true",
9480
+ "aria-busy": item.variant === "loading" || void 0,
9481
+ onPointerEnter: () => {
9482
+ if (item.pauseOnHover !== false) pauseTimer(item.id, "pointer");
9483
+ },
9484
+ onPointerLeave: () => resumeTimer(item.id, "pointer"),
9485
+ onPointerCancel: () => resumeTimer(item.id, "pointer"),
9486
+ onFocusCapture: () => {
9487
+ if (item.pauseOnFocus !== false) pauseTimer(item.id, "focus");
9488
+ },
9489
+ onBlurCapture: (event) => {
9490
+ if (!event.currentTarget.contains(event.relatedTarget)) resumeTimer(item.id, "focus");
9491
+ },
9262
9492
  children: [
9493
+ icon != null && icon !== false && /* @__PURE__ */ jsx48("span", { className: mergeClasses("pimolu-toast__icon", partClasses.icon), "aria-hidden": "true", children: icon }),
9263
9494
  /* @__PURE__ */ jsxs36("div", { className: mergeClasses("pimolu-toast__body", partClasses.body), children: [
9264
9495
  /* @__PURE__ */ jsx48("p", { className: mergeClasses("pimolu-toast__title", partClasses.title), children: item.title }),
9265
- item.description && /* @__PURE__ */ jsx48("p", { className: mergeClasses("pimolu-toast__description", partClasses.description), children: item.description })
9496
+ item.description != null && /* @__PURE__ */ jsx48("p", { className: mergeClasses("pimolu-toast__description", partClasses.description), children: item.description })
9266
9497
  ] }),
9267
- /* @__PURE__ */ jsxs36("div", { className: mergeClasses("pimolu-toast__actions", partClasses.actions), children: [
9498
+ (item.action || item.dismissible !== false) && /* @__PURE__ */ jsxs36("div", { className: mergeClasses("pimolu-toast__actions", partClasses.actions), children: [
9268
9499
  item.action && /* @__PURE__ */ jsx48(
9269
9500
  "button",
9270
9501
  {
9271
9502
  type: "button",
9272
9503
  className: mergeClasses("pimolu-toast__action", partClasses.action),
9504
+ disabled: item.variant === "loading",
9273
9505
  onClick: () => {
9274
9506
  item.action?.onClick();
9275
9507
  dismissToast(item.id);
@@ -9277,42 +9509,53 @@ function ToastItem({ item }) {
9277
9509
  children: item.action.label
9278
9510
  }
9279
9511
  ),
9280
- /* @__PURE__ */ jsx48(
9512
+ item.dismissible !== false && /* @__PURE__ */ jsx48(
9281
9513
  "button",
9282
9514
  {
9283
9515
  type: "button",
9284
9516
  className: mergeClasses("pimolu-toast__close", partClasses.close),
9285
- "aria-label": "Dismiss notification",
9517
+ "aria-label": item.dismissLabel ?? "Dismiss notification",
9286
9518
  onClick: () => dismissToast(item.id),
9287
- children: /* @__PURE__ */ jsx48(CloseIcon2, {})
9519
+ children: /* @__PURE__ */ jsx48(
9520
+ "svg",
9521
+ {
9522
+ viewBox: "0 0 24 24",
9523
+ width: "14",
9524
+ height: "14",
9525
+ fill: "none",
9526
+ stroke: "currentColor",
9527
+ strokeWidth: "2",
9528
+ strokeLinecap: "round",
9529
+ "aria-hidden": "true",
9530
+ focusable: "false",
9531
+ children: /* @__PURE__ */ jsx48("path", { d: "m18 6-12 12M6 6l12 12" })
9532
+ }
9533
+ )
9288
9534
  }
9289
9535
  )
9290
9536
  ] })
9291
9537
  ]
9292
- },
9293
- item.id
9538
+ }
9294
9539
  )
9295
9540
  );
9296
9541
  }
9297
- function Toaster({
9298
- classNames,
9299
- position = "top-right",
9300
- label = "Notifications"
9301
- }) {
9542
+ function Toaster({ classNames, position = "top-right", label = "Notifications" }) {
9302
9543
  const [partClasses, scopeParts] = usePartClasses("toast", classNames, true);
9303
9544
  const items = useToasts();
9304
- if (items.length === 0) return scopeParts(null);
9305
- return scopeParts(/* @__PURE__ */ jsx48(
9306
- "div",
9307
- {
9308
- className: mergeClasses("pimolu-toaster", partClasses.root),
9309
- "data-position": position,
9310
- role: "region",
9311
- "aria-label": label,
9312
- "aria-live": "polite",
9313
- children: items.map((item) => /* @__PURE__ */ jsx48(ToastItem, { item }, item.id))
9314
- }
9315
- ));
9545
+ return scopeParts(
9546
+ /* @__PURE__ */ jsx48(
9547
+ "div",
9548
+ {
9549
+ className: mergeClasses("pimolu-toaster", partClasses.root),
9550
+ "data-position": position,
9551
+ role: "region",
9552
+ "aria-label": label,
9553
+ "aria-live": "polite",
9554
+ "aria-relevant": "additions text",
9555
+ children: items.map((item) => /* @__PURE__ */ jsx48(ToastItem, { item }, item.id))
9556
+ }
9557
+ )
9558
+ );
9316
9559
  }
9317
9560
 
9318
9561
  // drawer/drawer.tsx
@@ -9320,18 +9563,18 @@ import {
9320
9563
  cloneElement as cloneElement7,
9321
9564
  createContext as createContext14,
9322
9565
  isValidElement as isValidElement8,
9323
- useCallback as useCallback10,
9566
+ useCallback as useCallback11,
9324
9567
  useContext as useContext14,
9325
- useEffect as useEffect23,
9568
+ useEffect as useEffect24,
9326
9569
  useId as useId21,
9327
- useMemo as useMemo6,
9570
+ useMemo as useMemo7,
9328
9571
  useRef as useRef24,
9329
- useState as useState28
9572
+ useState as useState29
9330
9573
  } from "react";
9331
9574
 
9332
9575
  // internal/use-focus-trap.ts
9333
9576
  import {
9334
- useEffect as useEffect22
9577
+ useEffect as useEffect23
9335
9578
  } from "react";
9336
9579
  function useFocusTrap({
9337
9580
  active,
@@ -9339,7 +9582,7 @@ function useFocusTrap({
9339
9582
  returnFocusRef,
9340
9583
  initialFocus = "first"
9341
9584
  }) {
9342
- useEffect22(() => {
9585
+ useEffect23(() => {
9343
9586
  if (!active) return;
9344
9587
  const container = containerRef.current;
9345
9588
  if (!container) return;
@@ -9414,7 +9657,7 @@ function contentClasses(side, size, className) {
9414
9657
  className
9415
9658
  ].filter(Boolean).join(" ");
9416
9659
  }
9417
- function CloseIcon3() {
9660
+ function CloseIcon2() {
9418
9661
  return /* @__PURE__ */ jsxs37(
9419
9662
  "svg",
9420
9663
  {
@@ -9451,16 +9694,16 @@ function Drawer({
9451
9694
  onOpenChange
9452
9695
  }) {
9453
9696
  const isControlled = controlledOpen !== void 0;
9454
- const [uncontrolledOpen, setUncontrolledOpen] = useState28(defaultOpen);
9697
+ const [uncontrolledOpen, setUncontrolledOpen] = useState29(defaultOpen);
9455
9698
  const open = isControlled ? controlledOpen : uncontrolledOpen;
9456
9699
  const contentId = `pimolu-drawer-${useId21()}`;
9457
9700
  const scopeRef = useRef24(
9458
9701
  null
9459
9702
  );
9460
9703
  const triggerRef = useRef24(null);
9461
- const [titleId, setTitleId] = useState28(null);
9462
- const [descriptionId, setDescriptionId] = useState28(null);
9463
- const setOpen = useCallback10(
9704
+ const [titleId, setTitleId] = useState29(null);
9705
+ const [descriptionId, setDescriptionId] = useState29(null);
9706
+ const setOpen = useCallback11(
9464
9707
  (next) => {
9465
9708
  if (!isControlled) {
9466
9709
  setUncontrolledOpen(next);
@@ -9469,7 +9712,7 @@ function Drawer({
9469
9712
  },
9470
9713
  [isControlled, onOpenChange]
9471
9714
  );
9472
- const value = useMemo6(
9715
+ const value = useMemo7(
9473
9716
  () => ({
9474
9717
  open,
9475
9718
  setOpen,
@@ -9551,7 +9794,7 @@ function DrawerSurface({
9551
9794
  returnFocusRef: triggerRef,
9552
9795
  initialFocus: "container"
9553
9796
  });
9554
- useEffect23(() => {
9797
+ useEffect24(() => {
9555
9798
  if (!open) return;
9556
9799
  const content = contentRef.current;
9557
9800
  if (!content) return;
@@ -9587,7 +9830,7 @@ function DrawerSurface({
9587
9830
  className: mergeClasses("pimolu-drawer__close", partClasses.closeButton),
9588
9831
  "aria-label": closeLabel,
9589
9832
  onClick: onClose,
9590
- children: /* @__PURE__ */ jsx49(CloseIcon3, {})
9833
+ children: /* @__PURE__ */ jsx49(CloseIcon2, {})
9591
9834
  }
9592
9835
  )
9593
9836
  ]
@@ -9721,7 +9964,7 @@ function DrawerTitle({
9721
9964
  const { setTitleId } = useDrawer("DrawerTitle");
9722
9965
  const generatedId = useId21();
9723
9966
  const titleId = id ?? `pimolu-drawer-title-${generatedId}`;
9724
- useEffect23(() => {
9967
+ useEffect24(() => {
9725
9968
  setTitleId(titleId);
9726
9969
  return () => setTitleId(
9727
9970
  (current) => current === titleId ? null : current
@@ -9749,7 +9992,7 @@ function DrawerDescription({
9749
9992
  const { setDescriptionId } = useDrawer("DrawerDescription");
9750
9993
  const generatedId = useId21();
9751
9994
  const descriptionId = id ?? `pimolu-drawer-description-${generatedId}`;
9752
- useEffect23(() => {
9995
+ useEffect24(() => {
9753
9996
  setDescriptionId(descriptionId);
9754
9997
  return () => setDescriptionId(
9755
9998
  (current) => current === descriptionId ? null : current
@@ -9788,13 +10031,13 @@ import {
9788
10031
  cloneElement as cloneElement8,
9789
10032
  createContext as createContext15,
9790
10033
  isValidElement as isValidElement9,
9791
- useCallback as useCallback11,
10034
+ useCallback as useCallback12,
9792
10035
  useContext as useContext15,
9793
- useEffect as useEffect24,
10036
+ useEffect as useEffect25,
9794
10037
  useId as useId22,
9795
- useLayoutEffect as useLayoutEffect2,
10038
+ useLayoutEffect as useLayoutEffect3,
9796
10039
  useRef as useRef25,
9797
- useState as useState29
10040
+ useState as useState30
9798
10041
  } from "react";
9799
10042
  import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
9800
10043
  var EXIT_DURATION5 = 120;
@@ -9846,8 +10089,8 @@ function ContextMenu({
9846
10089
  defaultOpen = false,
9847
10090
  onOpenChange
9848
10091
  }) {
9849
- const [uncontrolledOpen, setUncontrolledOpen] = useState29(defaultOpen);
9850
- const [point, setPoint] = useState29({
10092
+ const [uncontrolledOpen, setUncontrolledOpen] = useState30(defaultOpen);
10093
+ const [point, setPoint] = useState30({
9851
10094
  x: 0,
9852
10095
  y: 0
9853
10096
  });
@@ -9856,7 +10099,7 @@ function ContextMenu({
9856
10099
  const contentRef = useRef25(null);
9857
10100
  const scopeRef = useRef25(null);
9858
10101
  const contentId = `pimolu-context-menu-${useId22()}`;
9859
- const setOpen = useCallback11(
10102
+ const setOpen = useCallback12(
9860
10103
  (next) => {
9861
10104
  if (controlledOpen === void 0) {
9862
10105
  setUncontrolledOpen(next);
@@ -9865,7 +10108,7 @@ function ContextMenu({
9865
10108
  },
9866
10109
  [controlledOpen, onOpenChange]
9867
10110
  );
9868
- const openAt = useCallback11(
10111
+ const openAt = useCallback12(
9869
10112
  (x, y) => {
9870
10113
  setPoint({ x, y });
9871
10114
  if (open) return;
@@ -9934,10 +10177,10 @@ function ContextMenuSurface({
9934
10177
  }) {
9935
10178
  const [partClasses, scopeParts] = usePartClasses("context-menu", classNames, false);
9936
10179
  const menu = useContextMenu("ContextMenuSurface");
9937
- const [position, setPosition] = useState29(
10180
+ const [position, setPosition] = useState30(
9938
10181
  () => clampToViewport(menu.point, 0, 0, collisionPadding)
9939
10182
  );
9940
- useLayoutEffect2(() => {
10183
+ useLayoutEffect3(() => {
9941
10184
  if (!menu.open) return;
9942
10185
  const panel = menu.contentRef.current;
9943
10186
  if (!panel) return;
@@ -9967,7 +10210,7 @@ function ContextMenuSurface({
9967
10210
  menu.contentRef,
9968
10211
  collisionPadding
9969
10212
  ]);
9970
- useEffect24(() => {
10213
+ useEffect25(() => {
9971
10214
  if (!menu.open) return;
9972
10215
  const panel = menu.contentRef.current;
9973
10216
  if (!panel) return;
@@ -10043,7 +10286,7 @@ function ContextMenuContent({
10043
10286
  onDismiss: () => menu.setOpen(false),
10044
10287
  closeOnEscape: false
10045
10288
  });
10046
- useEffect24(() => {
10289
+ useEffect25(() => {
10047
10290
  if (!menu.open) return;
10048
10291
  function handleEscape(event) {
10049
10292
  if (event.key !== "Escape") return;
@@ -10142,10 +10385,10 @@ import {
10142
10385
  createContext as createContext16,
10143
10386
  isValidElement as isValidElement10,
10144
10387
  useContext as useContext16,
10145
- useEffect as useEffect25,
10388
+ useEffect as useEffect26,
10146
10389
  useId as useId23,
10147
10390
  useRef as useRef26,
10148
- useState as useState30
10391
+ useState as useState31
10149
10392
  } from "react";
10150
10393
  import { jsx as jsx51 } from "react/jsx-runtime";
10151
10394
  var EXIT_DURATION6 = 120;
@@ -10173,7 +10416,7 @@ function HoverCard({
10173
10416
  offset = DEFAULT_OFFSET,
10174
10417
  disabled = false
10175
10418
  }) {
10176
- const [open, setOpen] = useState30(false);
10419
+ const [open, setOpen] = useState31(false);
10177
10420
  const { rendered, state } = usePresence(
10178
10421
  open,
10179
10422
  EXIT_DURATION6
@@ -10282,7 +10525,7 @@ function HoverCard({
10282
10525
  closeOnOutside: true,
10283
10526
  closeOnEscape: false
10284
10527
  });
10285
- useEffect25(() => {
10528
+ useEffect26(() => {
10286
10529
  if (!open) return;
10287
10530
  function handleKeyDown(event) {
10288
10531
  if (event.key !== "Escape") return;
@@ -10302,12 +10545,12 @@ function HoverCard({
10302
10545
  handleKeyDown
10303
10546
  );
10304
10547
  }, [open]);
10305
- useEffect25(() => {
10548
+ useEffect26(() => {
10306
10549
  if (disabled) {
10307
10550
  closeNow();
10308
10551
  }
10309
10552
  }, [disabled]);
10310
- useEffect25(() => {
10553
+ useEffect26(() => {
10311
10554
  return () => {
10312
10555
  clearOpenTimer();
10313
10556
  clearCloseTimer();
@@ -10461,12 +10704,12 @@ function HoverCardContent({
10461
10704
 
10462
10705
  // command/command.tsx
10463
10706
  import {
10464
- useCallback as useCallback12,
10465
- useEffect as useEffect26,
10707
+ useCallback as useCallback13,
10708
+ useEffect as useEffect27,
10466
10709
  useId as useId24,
10467
- useMemo as useMemo7,
10710
+ useMemo as useMemo8,
10468
10711
  useRef as useRef27,
10469
- useState as useState31
10712
+ useState as useState32
10470
10713
  } from "react";
10471
10714
  import { jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
10472
10715
  function classes15(...values) {
@@ -10529,15 +10772,15 @@ function Command({
10529
10772
  const listboxId = `pimolu-command-${generatedId}`;
10530
10773
  const inputRef = useRef27(null);
10531
10774
  const listRef = useRef27(null);
10532
- const [query, setQuery] = useState31("");
10533
- const [activeId, setActiveId] = useState31(
10775
+ const [query, setQuery] = useState32("");
10776
+ const [activeId, setActiveId] = useState32(
10534
10777
  () => firstEnabledId(items)
10535
10778
  );
10536
- const filteredItems = useMemo7(
10779
+ const filteredItems = useMemo8(
10537
10780
  () => filterByQuery(items, query),
10538
10781
  [items, query]
10539
10782
  );
10540
- const groups = useMemo7(
10783
+ const groups = useMemo8(
10541
10784
  () => groupItems(filteredItems),
10542
10785
  [filteredItems]
10543
10786
  );
@@ -10546,12 +10789,12 @@ function Command({
10546
10789
  );
10547
10790
  const activeOption = activeIndex >= 0 ? filteredItems[activeIndex] : void 0;
10548
10791
  const activeDescendant = activeOption && !activeOption.disabled ? `${listboxId}-option-${activeIndex}` : void 0;
10549
- useEffect26(() => {
10792
+ useEffect27(() => {
10550
10793
  if (autoFocus) {
10551
10794
  inputRef.current?.focus();
10552
10795
  }
10553
10796
  }, [autoFocus]);
10554
- useEffect26(() => {
10797
+ useEffect27(() => {
10555
10798
  const active = filteredItems.find(
10556
10799
  (item) => item.id === activeId
10557
10800
  );
@@ -10559,14 +10802,14 @@ function Command({
10559
10802
  setActiveId(firstEnabledId(filteredItems));
10560
10803
  }
10561
10804
  }, [filteredItems, activeId]);
10562
- useEffect26(() => {
10805
+ useEffect27(() => {
10563
10806
  if (!activeId) return;
10564
10807
  const node = listRef.current?.querySelector(
10565
10808
  '[data-active="true"]'
10566
10809
  );
10567
10810
  node?.scrollIntoView?.({ block: "nearest" });
10568
10811
  }, [activeId, filteredItems]);
10569
- const selectItem = useCallback12(
10812
+ const selectItem = useCallback13(
10570
10813
  (item) => {
10571
10814
  if (item.disabled) return;
10572
10815
  item.onSelect?.();
@@ -10771,9 +11014,9 @@ function CommandPalette({
10771
11014
  }) {
10772
11015
  const [partClasses, scopeParts] = usePartClasses("command", classNames, true);
10773
11016
  const isControlled = controlledOpen !== void 0;
10774
- const [uncontrolledOpen, setUncontrolledOpen] = useState31(defaultOpen);
11017
+ const [uncontrolledOpen, setUncontrolledOpen] = useState32(defaultOpen);
10775
11018
  const open = isControlled ? controlledOpen : uncontrolledOpen;
10776
- const setOpen = useCallback12(
11019
+ const setOpen = useCallback13(
10777
11020
  (next) => {
10778
11021
  if (!isControlled) {
10779
11022
  setUncontrolledOpen(next);
@@ -10782,7 +11025,7 @@ function CommandPalette({
10782
11025
  },
10783
11026
  [isControlled, onOpenChange]
10784
11027
  );
10785
- useEffect26(() => {
11028
+ useEffect27(() => {
10786
11029
  if (!shortcut) return;
10787
11030
  const key = shortcut.toLowerCase();
10788
11031
  function handleShortcut(event) {
@@ -10859,7 +11102,7 @@ var alertVariants = createVariants36({
10859
11102
 
10860
11103
  // alert/alert.tsx
10861
11104
  import { jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
10862
- function CloseIcon4() {
11105
+ function CloseIcon3() {
10863
11106
  return /* @__PURE__ */ jsxs40(
10864
11107
  "svg",
10865
11108
  {
@@ -10929,7 +11172,7 @@ var Alert = forwardRef27(function Alert2({
10929
11172
  className: mergeClasses("pimolu-alert__dismiss", partClasses.dismiss),
10930
11173
  "aria-label": dismissLabel,
10931
11174
  onClick: onDismiss,
10932
- children: /* @__PURE__ */ jsx54(CloseIcon4, {})
11175
+ children: /* @__PURE__ */ jsx54(CloseIcon3, {})
10933
11176
  }
10934
11177
  )
10935
11178
  ]
@@ -10962,7 +11205,7 @@ var bannerVariants = createVariants37({
10962
11205
 
10963
11206
  // banner/banner.tsx
10964
11207
  import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
10965
- function CloseIcon5() {
11208
+ function CloseIcon4() {
10966
11209
  return /* @__PURE__ */ jsxs41(
10967
11210
  "svg",
10968
11211
  {
@@ -11035,7 +11278,7 @@ var Banner = forwardRef28(function Banner2({
11035
11278
  className: mergeClasses("pimolu-banner__dismiss", partClasses.dismiss),
11036
11279
  "aria-label": dismissLabel,
11037
11280
  onClick: onDismiss,
11038
- children: /* @__PURE__ */ jsx55(CloseIcon5, {})
11281
+ children: /* @__PURE__ */ jsx55(CloseIcon4, {})
11039
11282
  }
11040
11283
  )
11041
11284
  ] })
@@ -11418,8 +11661,8 @@ TableCaption.displayName = "PimoluTableCaption";
11418
11661
  import {
11419
11662
  isValidElement as isValidElement11,
11420
11663
  useId as useId26,
11421
- useMemo as useMemo8,
11422
- useState as useState32
11664
+ useMemo as useMemo9,
11665
+ useState as useState33
11423
11666
  } from "react";
11424
11667
  import { jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
11425
11668
  var DEFAULT_LABELS = {
@@ -11561,18 +11804,18 @@ function DataTable({
11561
11804
  const [partClasses, scopeParts] = usePartClasses("data-table", classNames, true);
11562
11805
  const generatedId = useId26();
11563
11806
  const text = { ...DEFAULT_LABELS, ...labels };
11564
- const [internalFilter, setInternalFilter] = useState32(defaultFilter);
11565
- const [internalSort, setInternalSort] = useState32(defaultSort);
11566
- const [internalSelection, setInternalSelection] = useState32(() => [
11807
+ const [internalFilter, setInternalFilter] = useState33(defaultFilter);
11808
+ const [internalSort, setInternalSort] = useState33(defaultSort);
11809
+ const [internalSelection, setInternalSelection] = useState33(() => [
11567
11810
  ...defaultSelectedRowIds ?? []
11568
11811
  ]);
11569
- const [internalPage, setInternalPage] = useState32(defaultPage);
11812
+ const [internalPage, setInternalPage] = useState33(defaultPage);
11570
11813
  const isFilterControlled = controlledFilter !== void 0;
11571
11814
  const filterValue = isFilterControlled ? controlledFilter : internalFilter;
11572
11815
  const isSortControlled = controlledSort !== void 0;
11573
11816
  const activeSort = isSortControlled ? controlledSort : internalSort;
11574
11817
  const isSelectionControlled = controlledSelectedRowIds !== void 0;
11575
- const selectedIds = useMemo8(
11818
+ const selectedIds = useMemo9(
11576
11819
  () => new Set(
11577
11820
  isSelectionControlled ? controlledSelectedRowIds : internalSelection
11578
11821
  ),
@@ -11583,7 +11826,7 @@ function DataTable({
11583
11826
  ]
11584
11827
  );
11585
11828
  const isPageControlled = controlledPage !== void 0;
11586
- const filteredRows = useMemo8(() => {
11829
+ const filteredRows = useMemo9(() => {
11587
11830
  const query = filterValue.trim().toLowerCase();
11588
11831
  if (!query) return [...data];
11589
11832
  return data.filter(
@@ -11592,7 +11835,7 @@ function DataTable({
11592
11835
  )
11593
11836
  );
11594
11837
  }, [data, columns, filterValue]);
11595
- const sortedRows = useMemo8(() => {
11838
+ const sortedRows = useMemo9(() => {
11596
11839
  if (!activeSort) return filteredRows;
11597
11840
  const column = columns.find(
11598
11841
  (candidate) => candidate.id === activeSort.columnId
@@ -11622,7 +11865,7 @@ function DataTable({
11622
11865
  startIndex,
11623
11866
  startIndex + Math.max(1, pageSize)
11624
11867
  ) : sortedRows;
11625
- const rowIds = useMemo8(
11868
+ const rowIds = useMemo9(
11626
11869
  () => data.map(getRowId),
11627
11870
  [data, getRowId]
11628
11871
  );
@@ -12208,7 +12451,7 @@ import {
12208
12451
  forwardRef as forwardRef34,
12209
12452
  useId as useId28,
12210
12453
  useRef as useRef28,
12211
- useState as useState33
12454
+ useState as useState34
12212
12455
  } from "react";
12213
12456
  import { jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
12214
12457
  function clampRating(value, max) {
@@ -12246,11 +12489,11 @@ var Rating = forwardRef34(function Rating2({
12246
12489
  Math.floor(Number.isFinite(max) ? max : 5)
12247
12490
  );
12248
12491
  const isControlled = value !== void 0;
12249
- const [internalValue, setInternalValue] = useState33(
12492
+ const [internalValue, setInternalValue] = useState34(
12250
12493
  () => clampRating(defaultValue ?? 0, starCount)
12251
12494
  );
12252
12495
  const current = isControlled ? clampRating(value, starCount) : clampRating(internalValue, starCount);
12253
- const [hovered, setHovered] = useState33(
12496
+ const [hovered, setHovered] = useState34(
12254
12497
  null
12255
12498
  );
12256
12499
  const itemRefs = useRef28([]);
@@ -12400,11 +12643,11 @@ Rating.displayName = "PimoluRating";
12400
12643
  // number-input/number-input.tsx
12401
12644
  import {
12402
12645
  forwardRef as forwardRef35,
12403
- useCallback as useCallback13,
12404
- useEffect as useEffect27,
12646
+ useCallback as useCallback14,
12647
+ useEffect as useEffect28,
12405
12648
  useId as useId29,
12406
12649
  useRef as useRef29,
12407
- useState as useState34
12650
+ useState as useState35
12408
12651
  } from "react";
12409
12652
  import { jsx as jsx64, jsxs as jsxs50 } from "react/jsx-runtime";
12410
12653
  var sizeClass = {
@@ -12488,7 +12731,7 @@ var NumberInput = forwardRef35(function NumberInput2({
12488
12731
  const inputId = id ?? `pimolu-number-input-${generatedId}`;
12489
12732
  const inputRef = useRef29(null);
12490
12733
  const isControlled = value !== void 0;
12491
- const [internalValue, setInternalValue] = useState34(
12734
+ const [internalValue, setInternalValue] = useState35(
12492
12735
  () => finiteOrNull(defaultValue)
12493
12736
  );
12494
12737
  const currentValue = isControlled ? finiteOrNull(value) : internalValue;
@@ -12496,17 +12739,17 @@ var NumberInput = forwardRef35(function NumberInput2({
12496
12739
  const resolvedPrecision = clampPrecision(
12497
12740
  precision ?? decimalsOf(stepValue)
12498
12741
  );
12499
- const [draft, setDraft] = useState34(
12742
+ const [draft, setDraft] = useState35(
12500
12743
  () => formatNumber(currentValue, resolvedPrecision)
12501
12744
  );
12502
- const [focused, setFocused] = useState34(false);
12503
- useEffect27(() => {
12745
+ const [focused, setFocused] = useState35(false);
12746
+ useEffect28(() => {
12504
12747
  if (focused) return;
12505
12748
  setDraft(
12506
12749
  formatNumber(currentValue, resolvedPrecision)
12507
12750
  );
12508
12751
  }, [currentValue, focused, resolvedPrecision]);
12509
- const setInputRef = useCallback13(
12752
+ const setInputRef = useCallback14(
12510
12753
  (node) => {
12511
12754
  inputRef.current = node;
12512
12755
  if (typeof forwardedRef === "function") {
@@ -12780,10 +13023,10 @@ NumberInput.displayName = "PimoluNumberInput";
12780
13023
  // pin-input/pin-input.tsx
12781
13024
  import {
12782
13025
  forwardRef as forwardRef36,
12783
- useEffect as useEffect28,
13026
+ useEffect as useEffect29,
12784
13027
  useId as useId30,
12785
13028
  useRef as useRef30,
12786
- useState as useState35
13029
+ useState as useState36
12787
13030
  } from "react";
12788
13031
  import { jsx as jsx65, jsxs as jsxs51 } from "react/jsx-runtime";
12789
13032
  function sanitize(text, type) {
@@ -12828,15 +13071,15 @@ var PinInput = forwardRef36(function PinInput2({
12828
13071
  const messageId = message ? `pimolu-pin-input-${generatedId}-message` : void 0;
12829
13072
  const count = Math.max(1, Math.floor(length));
12830
13073
  const isControlled = value !== void 0;
12831
- const [internalValue, setInternalValue] = useState35(() => normalizeCells(defaultValue, count, type));
13074
+ const [internalValue, setInternalValue] = useState36(() => normalizeCells(defaultValue, count, type));
12832
13075
  const cells = isControlled ? normalizeCells(value, count, type) : normalizeCells(internalValue, count, type);
12833
13076
  const inputsRef = useRef30([]);
12834
13077
  const completedRef = useRef30(cells.every(Boolean));
12835
- useEffect28(() => {
13078
+ useEffect29(() => {
12836
13079
  completedRef.current = cells.every(Boolean);
12837
13080
  }, [cells]);
12838
13081
  const canEdit = !disabled && !readOnly && (!isControlled || Boolean(onValueChange));
12839
- useEffect28(() => {
13082
+ useEffect29(() => {
12840
13083
  if (!autoFocus || disabled) return;
12841
13084
  const firstEmpty = cells.findIndex((cell) => !cell);
12842
13085
  const node = inputsRef.current[firstEmpty === -1 ? 0 : firstEmpty];
@@ -13060,10 +13303,10 @@ PinInput.displayName = "PimoluPinInput";
13060
13303
  // tags-input/tags-input.tsx
13061
13304
  import {
13062
13305
  forwardRef as forwardRef37,
13063
- useCallback as useCallback14,
13306
+ useCallback as useCallback15,
13064
13307
  useId as useId31,
13065
13308
  useRef as useRef31,
13066
- useState as useState36
13309
+ useState as useState37
13067
13310
  } from "react";
13068
13311
  import { jsx as jsx66, jsxs as jsxs52 } from "react/jsx-runtime";
13069
13312
  var sizeClass2 = {
@@ -13111,11 +13354,11 @@ var TagsInput = forwardRef37(function TagsInput2({
13111
13354
  const hasError = error || Boolean(errorMessage);
13112
13355
  const limit = maxTags === void 0 ? void 0 : Math.max(0, Math.floor(maxTags));
13113
13356
  const isControlled = value !== void 0;
13114
- const [internalTags, setInternalTags] = useState36(() => normalizeTags(defaultValue ?? []));
13357
+ const [internalTags, setInternalTags] = useState37(() => normalizeTags(defaultValue ?? []));
13115
13358
  const tags = (isControlled ? value ?? [] : internalTags).filter((tag) => tag.trim() !== "");
13116
- const [draft, setDraft] = useState36("");
13359
+ const [draft, setDraft] = useState37("");
13117
13360
  const inputRef = useRef31(null);
13118
- const setInputRef = useCallback14(
13361
+ const setInputRef = useCallback15(
13119
13362
  (node) => {
13120
13363
  inputRef.current = node;
13121
13364
  if (typeof forwardedRef === "function") {
@@ -13350,10 +13593,10 @@ TagsInput.displayName = "PimoluTagsInput";
13350
13593
  // time-picker/time-picker.tsx
13351
13594
  import {
13352
13595
  forwardRef as forwardRef38,
13353
- useCallback as useCallback15,
13596
+ useCallback as useCallback16,
13354
13597
  useId as useId32,
13355
13598
  useRef as useRef32,
13356
- useState as useState37
13599
+ useState as useState38
13357
13600
  } from "react";
13358
13601
  import { jsx as jsx67, jsxs as jsxs53 } from "react/jsx-runtime";
13359
13602
  var sizeClass3 = {
@@ -13395,9 +13638,9 @@ var TimePicker = forwardRef38(function TimePicker2({
13395
13638
  const inputId = id ?? `pimolu-time-picker-${generatedId}`;
13396
13639
  const inputRef = useRef32(null);
13397
13640
  const isControlled = value !== void 0;
13398
- const [internalValue, setInternalValue] = useState37(() => normalizeTime(defaultValue));
13641
+ const [internalValue, setInternalValue] = useState38(() => normalizeTime(defaultValue));
13399
13642
  const currentValue = isControlled ? normalizeTime(value) : internalValue;
13400
- const setInputRef = useCallback15(
13643
+ const setInputRef = useCallback16(
13401
13644
  (node) => {
13402
13645
  inputRef.current = node;
13403
13646
  if (typeof forwardedRef === "function") {
@@ -13537,11 +13780,11 @@ TimePicker.displayName = "PimoluTimePicker";
13537
13780
 
13538
13781
  // calendar/calendar.tsx
13539
13782
  import {
13540
- useEffect as useEffect29,
13783
+ useEffect as useEffect30,
13541
13784
  useId as useId33,
13542
- useMemo as useMemo9,
13785
+ useMemo as useMemo10,
13543
13786
  useRef as useRef33,
13544
- useState as useState38
13787
+ useState as useState39
13545
13788
  } from "react";
13546
13789
  import { jsx as jsx68, jsxs as jsxs54 } from "react/jsx-runtime";
13547
13790
  function startOfDay(date) {
@@ -13697,42 +13940,42 @@ function Calendar({
13697
13940
  const monthControlled = month !== void 0;
13698
13941
  const selectedControlled = selected !== void 0;
13699
13942
  const rangeControlled = range !== void 0;
13700
- const initialMonth = useMemo9(() => {
13943
+ const initialMonth = useMemo10(() => {
13701
13944
  const seed = month ?? defaultMonth ?? selected ?? range?.from ?? range?.to ?? /* @__PURE__ */ new Date();
13702
13945
  return startOfMonth(seed);
13703
13946
  }, []);
13704
- const [internalMonth, setInternalMonth] = useState38(initialMonth);
13705
- const [internalSelected, setInternalSelected] = useState38(null);
13706
- const [internalRange, setInternalRange] = useState38({ from: null, to: null });
13947
+ const [internalMonth, setInternalMonth] = useState39(initialMonth);
13948
+ const [internalSelected, setInternalSelected] = useState39(null);
13949
+ const [internalRange, setInternalRange] = useState39({ from: null, to: null });
13707
13950
  const visibleMonth = monthControlled ? startOfMonth(month) : internalMonth;
13708
13951
  const currentSelected = selectedControlled ? selected : internalSelected;
13709
13952
  const currentRange = rangeControlled ? range : internalRange;
13710
- const [focusedDate, setFocusedDate] = useState38(() => {
13953
+ const [focusedDate, setFocusedDate] = useState39(() => {
13711
13954
  const seed = selected ?? range?.from ?? /* @__PURE__ */ new Date();
13712
13955
  return isSameMonth(seed, initialMonth) ? startOfDay(seed) : startOfDay(initialMonth);
13713
13956
  });
13714
13957
  const pendingFocus = useRef33(null);
13715
13958
  const visibleMonthKey = `${visibleMonth.getFullYear()}-${visibleMonth.getMonth()}`;
13716
- const monthFormatter = useMemo9(
13959
+ const monthFormatter = useMemo10(
13717
13960
  () => new Intl.DateTimeFormat(locale, {
13718
13961
  month: "long",
13719
13962
  year: "numeric"
13720
13963
  }),
13721
13964
  [locale]
13722
13965
  );
13723
- const weekdayShortFormatter = useMemo9(
13966
+ const weekdayShortFormatter = useMemo10(
13724
13967
  () => new Intl.DateTimeFormat(locale, {
13725
13968
  weekday: "short"
13726
13969
  }),
13727
13970
  [locale]
13728
13971
  );
13729
- const weekdayLongFormatter = useMemo9(
13972
+ const weekdayLongFormatter = useMemo10(
13730
13973
  () => new Intl.DateTimeFormat(locale, {
13731
13974
  weekday: "long"
13732
13975
  }),
13733
13976
  [locale]
13734
13977
  );
13735
- const fullDateFormatter = useMemo9(
13978
+ const fullDateFormatter = useMemo10(
13736
13979
  () => new Intl.DateTimeFormat(locale, {
13737
13980
  weekday: "long",
13738
13981
  year: "numeric",
@@ -13742,7 +13985,7 @@ function Calendar({
13742
13985
  [locale]
13743
13986
  );
13744
13987
  const today = startOfDay(/* @__PURE__ */ new Date());
13745
- const disabledKeys = useMemo9(() => {
13988
+ const disabledKeys = useMemo10(() => {
13746
13989
  if (typeof disabledDates === "function") return null;
13747
13990
  return new Set(
13748
13991
  (disabledDates ?? []).map((date) => dateKey(date))
@@ -13794,7 +14037,7 @@ function Calendar({
13794
14037
  addMonthsToFirst(visibleMonth, amount)
13795
14038
  );
13796
14039
  }
13797
- useEffect29(() => {
14040
+ useEffect30(() => {
13798
14041
  const requested = pendingFocus.current;
13799
14042
  if (!requested) return;
13800
14043
  const element = rootRef.current?.querySelector(
@@ -13804,7 +14047,7 @@ function Calendar({
13804
14047
  element.focus();
13805
14048
  pendingFocus.current = null;
13806
14049
  }, [focusedDate, visibleMonthKey, numberOfMonths]);
13807
- useEffect29(() => {
14050
+ useEffect30(() => {
13808
14051
  const displayed = monthsFrom(visibleMonth, numberOfMonths);
13809
14052
  if (displayed.some((entry) => isSameMonth(focusedDate, entry))) {
13810
14053
  return;
@@ -14076,12 +14319,12 @@ function Calendar({
14076
14319
  // date-picker/date-picker.tsx
14077
14320
  import {
14078
14321
  forwardRef as forwardRef39,
14079
- useCallback as useCallback16,
14080
- useEffect as useEffect30,
14322
+ useCallback as useCallback17,
14323
+ useEffect as useEffect31,
14081
14324
  useId as useId34,
14082
- useMemo as useMemo10,
14325
+ useMemo as useMemo11,
14083
14326
  useRef as useRef34,
14084
- useState as useState39
14327
+ useState as useState40
14085
14328
  } from "react";
14086
14329
  import { jsx as jsx69, jsxs as jsxs55 } from "react/jsx-runtime";
14087
14330
  var EXIT_DURATION7 = 120;
@@ -14143,8 +14386,8 @@ var DatePicker = forwardRef39(function DatePicker2({
14143
14386
  const triggerRef = useRef34(null);
14144
14387
  const panelRef = useRef34(null);
14145
14388
  const isControlled = value !== void 0;
14146
- const [internalValue, setInternalValue] = useState39(defaultValue);
14147
- const [open, setOpen] = useState39(false);
14389
+ const [internalValue, setInternalValue] = useState40(defaultValue);
14390
+ const [open, setOpen] = useState40(false);
14148
14391
  const currentValue = isControlled ? value : internalValue;
14149
14392
  const { rendered, state } = usePresence(
14150
14393
  open,
@@ -14168,7 +14411,7 @@ var DatePicker = forwardRef39(function DatePicker2({
14168
14411
  onDismiss: () => setOpen(false),
14169
14412
  closeOnEscape: false
14170
14413
  });
14171
- const dateFormatter = useMemo10(
14414
+ const dateFormatter = useMemo11(
14172
14415
  () => new Intl.DateTimeFormat(locale, {
14173
14416
  year: "numeric",
14174
14417
  month: "long",
@@ -14177,7 +14420,7 @@ var DatePicker = forwardRef39(function DatePicker2({
14177
14420
  [locale]
14178
14421
  );
14179
14422
  const formattedValue = currentValue ? dateFormatter.format(currentValue) : null;
14180
- const assignTriggerRef = useCallback16(
14423
+ const assignTriggerRef = useCallback17(
14181
14424
  (node) => {
14182
14425
  triggerRef.current = node;
14183
14426
  if (typeof forwardedRef === "function") {
@@ -14188,7 +14431,7 @@ var DatePicker = forwardRef39(function DatePicker2({
14188
14431
  },
14189
14432
  [forwardedRef]
14190
14433
  );
14191
- const setPanelRef = useCallback16(
14434
+ const setPanelRef = useCallback17(
14192
14435
  (node) => {
14193
14436
  panelRef.current = node;
14194
14437
  if (!node || !open) return;
@@ -14203,7 +14446,7 @@ var DatePicker = forwardRef39(function DatePicker2({
14203
14446
  setOpen(false);
14204
14447
  triggerRef.current?.focus();
14205
14448
  }
14206
- useEffect30(() => {
14449
+ useEffect31(() => {
14207
14450
  if (!open) return;
14208
14451
  function handleKeyDown(event) {
14209
14452
  if (event.key !== "Escape") return;
@@ -14214,7 +14457,7 @@ var DatePicker = forwardRef39(function DatePicker2({
14214
14457
  document.addEventListener("keydown", handleKeyDown);
14215
14458
  return () => document.removeEventListener("keydown", handleKeyDown);
14216
14459
  }, [open]);
14217
- useEffect30(() => {
14460
+ useEffect31(() => {
14218
14461
  if (!open) return;
14219
14462
  function handleFocusIn(event) {
14220
14463
  const target = event.target;
@@ -14386,14 +14629,14 @@ DatePicker.displayName = "PimoluDatePicker";
14386
14629
  // date-range-picker/date-range-picker.tsx
14387
14630
  import {
14388
14631
  forwardRef as forwardRef40,
14389
- useCallback as useCallback17,
14390
- useEffect as useEffect31,
14632
+ useCallback as useCallback18,
14633
+ useEffect as useEffect32,
14391
14634
  useId as useId35,
14392
- useMemo as useMemo11,
14635
+ useMemo as useMemo12,
14393
14636
  useRef as useRef35,
14394
- useState as useState40
14637
+ useState as useState41
14395
14638
  } from "react";
14396
- import { Fragment as Fragment9, jsx as jsx70, jsxs as jsxs56 } from "react/jsx-runtime";
14639
+ import { Fragment as Fragment10, jsx as jsx70, jsxs as jsxs56 } from "react/jsx-runtime";
14397
14640
  var EXIT_DURATION8 = 120;
14398
14641
  var EMPTY_RANGE = {
14399
14642
  from: null,
@@ -14489,10 +14732,10 @@ var DateRangePicker = forwardRef40(function DateRangePicker2({
14489
14732
  const triggerRef = useRef35(null);
14490
14733
  const panelRef = useRef35(null);
14491
14734
  const isControlled = value !== void 0;
14492
- const [internalRange, setInternalRange] = useState40(
14735
+ const [internalRange, setInternalRange] = useState41(
14493
14736
  () => normalizeRange(defaultValue ?? EMPTY_RANGE)
14494
14737
  );
14495
- const [open, setOpen] = useState40(false);
14738
+ const [open, setOpen] = useState41(false);
14496
14739
  const currentRange = normalizeRange(
14497
14740
  isControlled ? value : internalRange
14498
14741
  );
@@ -14518,7 +14761,7 @@ var DateRangePicker = forwardRef40(function DateRangePicker2({
14518
14761
  onDismiss: () => setOpen(false),
14519
14762
  closeOnEscape: false
14520
14763
  });
14521
- const dateFormatter = useMemo11(
14764
+ const dateFormatter = useMemo12(
14522
14765
  () => new Intl.DateTimeFormat(locale, {
14523
14766
  year: "numeric",
14524
14767
  month: "short",
@@ -14533,7 +14776,7 @@ var DateRangePicker = forwardRef40(function DateRangePicker2({
14533
14776
  const formattedValue = formattedFrom && formattedTo ? isSameDay2(from, to) ? formattedFrom : `${formattedFrom} \u2013 ${formattedTo}` : formattedFrom ? `From ${formattedFrom}` : formattedTo ? `Until ${formattedTo}` : null;
14534
14777
  const selectedDays = from && to ? daysBetween(from, to) + 1 : 0;
14535
14778
  const summary = from && to ? `${selectedDays} ${selectedDays === 1 ? "day" : "days"} selected` : from ? "Select an end date." : "Select a start date.";
14536
- const assignTriggerRef = useCallback17(
14779
+ const assignTriggerRef = useCallback18(
14537
14780
  (node) => {
14538
14781
  triggerRef.current = node;
14539
14782
  if (typeof forwardedRef === "function") {
@@ -14544,7 +14787,7 @@ var DateRangePicker = forwardRef40(function DateRangePicker2({
14544
14787
  },
14545
14788
  [forwardedRef]
14546
14789
  );
14547
- const setPanelRef = useCallback17(
14790
+ const setPanelRef = useCallback18(
14548
14791
  (node) => {
14549
14792
  panelRef.current = node;
14550
14793
  if (!node || !open) return;
@@ -14559,7 +14802,7 @@ var DateRangePicker = forwardRef40(function DateRangePicker2({
14559
14802
  setOpen(false);
14560
14803
  triggerRef.current?.focus();
14561
14804
  }
14562
- useEffect31(() => {
14805
+ useEffect32(() => {
14563
14806
  if (!open) return;
14564
14807
  function handleKeyDown(event) {
14565
14808
  if (event.key !== "Escape") return;
@@ -14570,7 +14813,7 @@ var DateRangePicker = forwardRef40(function DateRangePicker2({
14570
14813
  document.addEventListener("keydown", handleKeyDown);
14571
14814
  return () => document.removeEventListener("keydown", handleKeyDown);
14572
14815
  }, [open]);
14573
- useEffect31(() => {
14816
+ useEffect32(() => {
14574
14817
  if (!open) return;
14575
14818
  function handleFocusIn(event) {
14576
14819
  const target = event.target;
@@ -14708,7 +14951,7 @@ var DateRangePicker = forwardRef40(function DateRangePicker2({
14708
14951
  }
14709
14952
  )
14710
14953
  ] }),
14711
- name && /* @__PURE__ */ jsxs56(Fragment9, { children: [
14954
+ name && /* @__PURE__ */ jsxs56(Fragment10, { children: [
14712
14955
  /* @__PURE__ */ jsx70(
14713
14956
  "input",
14714
14957
  {
@@ -14796,13 +15039,13 @@ import {
14796
15039
  forwardRef as forwardRef41,
14797
15040
  useId as useId36,
14798
15041
  useRef as useRef36,
14799
- useState as useState42
15042
+ useState as useState43
14800
15043
  } from "react";
14801
15044
 
14802
15045
  // internal/file-preview.tsx
14803
15046
  import {
14804
- useEffect as useEffect32,
14805
- useState as useState41
15047
+ useEffect as useEffect33,
15048
+ useState as useState42
14806
15049
  } from "react";
14807
15050
  import { jsx as jsx71, jsxs as jsxs57 } from "react/jsx-runtime";
14808
15051
  var IMAGE_EXTENSION = /\.(?:avif|bmp|gif|jpe?g|png|svg|webp)$/i;
@@ -14810,8 +15053,8 @@ function isImageFile(file) {
14810
15053
  return file.type.startsWith("image/") || IMAGE_EXTENSION.test(file.name);
14811
15054
  }
14812
15055
  function useFilePreviewUrl(file) {
14813
- const [url, setUrl] = useState41(null);
14814
- useEffect32(() => {
15056
+ const [url, setUrl] = useState42(null);
15057
+ useEffect33(() => {
14815
15058
  if (!isImageFile(file) || typeof URL === "undefined" || typeof URL.createObjectURL !== "function") {
14816
15059
  setUrl(null);
14817
15060
  return;
@@ -14830,8 +15073,8 @@ function FilePreview({
14830
15073
  fallbackClassName
14831
15074
  }) {
14832
15075
  const url = useFilePreviewUrl(file);
14833
- const [failed, setFailed] = useState41(false);
14834
- useEffect32(() => {
15076
+ const [failed, setFailed] = useState42(false);
15077
+ useEffect33(() => {
14835
15078
  setFailed(false);
14836
15079
  }, [url]);
14837
15080
  if (url && !failed) {
@@ -14876,7 +15119,7 @@ function FilePreview({
14876
15119
  }
14877
15120
 
14878
15121
  // file-upload/file-upload.tsx
14879
- import { Fragment as Fragment10, jsx as jsx72, jsxs as jsxs58 } from "react/jsx-runtime";
15122
+ import { Fragment as Fragment11, jsx as jsx72, jsxs as jsxs58 } from "react/jsx-runtime";
14880
15123
  function matchesAccept(file, accept) {
14881
15124
  const tokens = (accept ?? "").split(",").map((token) => token.trim().toLowerCase()).filter(Boolean);
14882
15125
  if (tokens.length === 0) return true;
@@ -15003,10 +15246,10 @@ var FileUpload = forwardRef41(function FileUpload2({
15003
15246
  const buttonTextId = `${inputId}-button-text`;
15004
15247
  const inputRef = useRef36(null);
15005
15248
  const isControlled = files !== void 0;
15006
- const [internalFiles, setInternalFiles] = useState42(
15249
+ const [internalFiles, setInternalFiles] = useState43(
15007
15250
  () => defaultFiles ?? []
15008
15251
  );
15009
- const [rejections, setRejections] = useState42([]);
15252
+ const [rejections, setRejections] = useState43([]);
15010
15253
  const currentFiles = isControlled ? files : internalFiles;
15011
15254
  const hasError = Boolean(error);
15012
15255
  const describedBy = [
@@ -15151,7 +15394,7 @@ var FileUpload = forwardRef41(function FileUpload2({
15151
15394
  children: /* @__PURE__ */ jsx72("span", { id: buttonTextId, children: triggerText })
15152
15395
  }
15153
15396
  )
15154
- ] }) : /* @__PURE__ */ jsxs58(Fragment10, { children: [
15397
+ ] }) : /* @__PURE__ */ jsxs58(Fragment11, { children: [
15155
15398
  /* @__PURE__ */ jsx72(
15156
15399
  "ul",
15157
15400
  {
@@ -15271,7 +15514,7 @@ import {
15271
15514
  forwardRef as forwardRef42,
15272
15515
  useId as useId37,
15273
15516
  useRef as useRef37,
15274
- useState as useState43
15517
+ useState as useState44
15275
15518
  } from "react";
15276
15519
  import { jsx as jsx73, jsxs as jsxs59 } from "react/jsx-runtime";
15277
15520
  function matchesAccept2(file, accept) {
@@ -15405,12 +15648,12 @@ var Dropzone = forwardRef42(function Dropzone2({
15405
15648
  const errorId = `${inputId}-error`;
15406
15649
  const inputRef = useRef37(null);
15407
15650
  const dragDepth = useRef37(0);
15408
- const [dragging, setDragging] = useState43(false);
15651
+ const [dragging, setDragging] = useState44(false);
15409
15652
  const isControlled = files !== void 0;
15410
- const [internalFiles, setInternalFiles] = useState43(
15653
+ const [internalFiles, setInternalFiles] = useState44(
15411
15654
  () => defaultFiles ?? []
15412
15655
  );
15413
- const [rejections, setRejections] = useState43([]);
15656
+ const [rejections, setRejections] = useState44([]);
15414
15657
  const currentFiles = isControlled ? files : internalFiles;
15415
15658
  const hasError = Boolean(error);
15416
15659
  const describedBy = [
@@ -15731,12 +15974,12 @@ Dropzone.displayName = "PimoluDropzone";
15731
15974
  // color-picker/color-picker.tsx
15732
15975
  import {
15733
15976
  forwardRef as forwardRef43,
15734
- useEffect as useEffect33,
15977
+ useEffect as useEffect34,
15735
15978
  useId as useId38,
15736
15979
  useRef as useRef38,
15737
- useState as useState44
15980
+ useState as useState45
15738
15981
  } from "react";
15739
- import { Fragment as Fragment11, jsx as jsx74, jsxs as jsxs60 } from "react/jsx-runtime";
15982
+ import { Fragment as Fragment12, jsx as jsx74, jsxs as jsxs60 } from "react/jsx-runtime";
15740
15983
  var DEFAULT_COLOR_PICKER_VALUE = "#5B55E7";
15741
15984
  var DEFAULT_COLOR_PICKER_PRESETS = [
15742
15985
  "#5B55E7",
@@ -15802,13 +16045,13 @@ var ColorPicker = forwardRef43(function ColorPicker2({
15802
16045
  const presetsTitleId = `pimolu-color-picker-${generatedId}-presets-title`;
15803
16046
  const triggerRef = useRef38(null);
15804
16047
  const isControlled = value !== void 0;
15805
- const [internalValue, setInternalValue] = useState44(
16048
+ const [internalValue, setInternalValue] = useState45(
15806
16049
  () => resolveColor(defaultValue)
15807
16050
  );
15808
16051
  const normalizedValue = isControlled ? resolveColor(value) : internalValue;
15809
- const [open, setOpen] = useState44(false);
15810
- const [draft, setDraft] = useState44(normalizedValue);
15811
- const [hexError, setHexError] = useState44(
16052
+ const [open, setOpen] = useState45(false);
16053
+ const [draft, setDraft] = useState45(normalizedValue);
16054
+ const [hexError, setHexError] = useState45(
15812
16055
  null
15813
16056
  );
15814
16057
  const hasError = Boolean(error);
@@ -15817,7 +16060,7 @@ var ColorPicker = forwardRef43(function ColorPicker2({
15817
16060
  presets.map((preset) => normalizeHexColor(preset)).filter((preset) => Boolean(preset))
15818
16061
  )
15819
16062
  );
15820
- useEffect33(() => {
16063
+ useEffect34(() => {
15821
16064
  if (open) return;
15822
16065
  setDraft(normalizedValue);
15823
16066
  setHexError(null);
@@ -15924,7 +16167,7 @@ var ColorPicker = forwardRef43(function ColorPicker2({
15924
16167
  padding: "none",
15925
16168
  className: mergeClasses("pimolu-color-picker__panel", partClasses.panel),
15926
16169
  label: label ? `${label} picker` : "Color picker",
15927
- content: /* @__PURE__ */ jsxs60(Fragment11, { children: [
16170
+ content: /* @__PURE__ */ jsxs60(Fragment12, { children: [
15928
16171
  /* @__PURE__ */ jsxs60("div", { className: mergeClasses("pimolu-color-picker__field-row", partClasses.fieldRow), children: [
15929
16172
  /* @__PURE__ */ jsxs60("label", { className: mergeClasses("pimolu-color-picker__custom", partClasses.custom), children: [
15930
16173
  /* @__PURE__ */ jsx74(
@@ -16748,9 +16991,9 @@ VisuallyHidden.displayName = "PimoluVisuallyHidden";
16748
16991
  // focus-scope/focus-scope.tsx
16749
16992
  import {
16750
16993
  forwardRef as forwardRef53,
16751
- useCallback as useCallback18,
16752
- useEffect as useEffect34,
16753
- useMemo as useMemo12,
16994
+ useCallback as useCallback19,
16995
+ useEffect as useEffect35,
16996
+ useMemo as useMemo13,
16754
16997
  useRef as useRef39
16755
16998
  } from "react";
16756
16999
  import { jsx as jsx84 } from "react/jsx-runtime";
@@ -16771,7 +17014,7 @@ var FocusScope = forwardRef53(function FocusScope2({
16771
17014
  const containerRef = useRef39(null);
16772
17015
  const restoreFocusRef = useRef39(restoreFocus);
16773
17016
  restoreFocusRef.current = restoreFocus;
16774
- const setRef = useCallback18(
17017
+ const setRef = useCallback19(
16775
17018
  (node) => {
16776
17019
  containerRef.current = node;
16777
17020
  if (typeof forwardedRef === "function") {
@@ -16782,7 +17025,7 @@ var FocusScope = forwardRef53(function FocusScope2({
16782
17025
  },
16783
17026
  [forwardedRef]
16784
17027
  );
16785
- const returnFocusRef = useMemo12(
17028
+ const returnFocusRef = useMemo13(
16786
17029
  () => ({
16787
17030
  get current() {
16788
17031
  if (restoreFocusRef.current) return null;
@@ -16797,7 +17040,7 @@ var FocusScope = forwardRef53(function FocusScope2({
16797
17040
  returnFocusRef,
16798
17041
  initialFocus
16799
17042
  });
16800
- useEffect34(() => {
17043
+ useEffect35(() => {
16801
17044
  if (!active || trapped) return;
16802
17045
  const container = containerRef.current;
16803
17046
  if (!container) return;
@@ -16835,10 +17078,10 @@ FocusScope.displayName = "PimoluFocusScope";
16835
17078
  // image/image.tsx
16836
17079
  import {
16837
17080
  forwardRef as forwardRef54,
16838
- useCallback as useCallback19,
16839
- useEffect as useEffect35,
17081
+ useCallback as useCallback20,
17082
+ useEffect as useEffect36,
16840
17083
  useRef as useRef40,
16841
- useState as useState45
17084
+ useState as useState46
16842
17085
  } from "react";
16843
17086
  import { jsx as jsx85, jsxs as jsxs61 } from "react/jsx-runtime";
16844
17087
  function classes19(...values) {
@@ -16885,16 +17128,16 @@ var Image2 = forwardRef54(function Image3({
16885
17128
  }, ref) {
16886
17129
  const [partClasses, scopeParts] = usePartClasses("image", classNames, true);
16887
17130
  const imageRef = useRef40(null);
16888
- const attachRef = useCallback19((node) => {
17131
+ const attachRef = useCallback20((node) => {
16889
17132
  imageRef.current = node;
16890
17133
  if (typeof ref === "function") return ref(node);
16891
17134
  if (ref) ref.current = node;
16892
17135
  }, [ref]);
16893
- const [loadedImage, setLoadedImage] = useState45(null);
16894
- const [fallbackFor, setFallbackFor] = useState45(null);
17136
+ const [loadedImage, setLoadedImage] = useState46(null);
17137
+ const [fallbackFor, setFallbackFor] = useState46(null);
16895
17138
  const usingFallback = Boolean(fallbackSrc) && fallbackSrc !== src && fallbackFor === src;
16896
17139
  const activeSrc = usingFallback ? fallbackSrc : src;
16897
- useEffect35(() => {
17140
+ useEffect36(() => {
16898
17141
  const image = imageRef.current;
16899
17142
  if (image?.complete && image.naturalWidth > 0) {
16900
17143
  setLoadedImage((current) => current?.src === activeSrc && current.status === "loaded" ? current : { src: activeSrc, status: "loaded" });
@@ -16982,13 +17225,13 @@ Image2.displayName = "PimoluImage";
16982
17225
  import {
16983
17226
  Children as Children5,
16984
17227
  forwardRef as forwardRef55,
16985
- useCallback as useCallback20,
16986
- useEffect as useEffect36,
16987
- useMemo as useMemo13,
17228
+ useCallback as useCallback21,
17229
+ useEffect as useEffect37,
17230
+ useMemo as useMemo14,
16988
17231
  useRef as useRef41,
16989
- useState as useState46
17232
+ useState as useState47
16990
17233
  } from "react";
16991
- import { Fragment as Fragment12, jsx as jsx86, jsxs as jsxs62 } from "react/jsx-runtime";
17234
+ import { Fragment as Fragment13, jsx as jsx86, jsxs as jsxs62 } from "react/jsx-runtime";
16992
17235
  function classes20(...values) {
16993
17236
  return values.filter(Boolean).join(" ");
16994
17237
  }
@@ -17043,7 +17286,7 @@ function PlaybackIcon({
17043
17286
  strokeLinejoin: "round",
17044
17287
  "aria-hidden": "true",
17045
17288
  focusable: "false",
17046
- children: playing ? /* @__PURE__ */ jsxs62(Fragment12, { children: [
17289
+ children: playing ? /* @__PURE__ */ jsxs62(Fragment13, { children: [
17047
17290
  /* @__PURE__ */ jsx86("path", { d: "M9 5v14" }),
17048
17291
  /* @__PURE__ */ jsx86("path", { d: "M15 5v14" })
17049
17292
  ] }) : /* @__PURE__ */ jsx86("path", { d: "m8 5 11 7-11 7Z" })
@@ -17076,13 +17319,13 @@ var Carousel = forwardRef55(function Carousel2({
17076
17319
  ...props
17077
17320
  }, forwardedRef) {
17078
17321
  const [partClasses, scopeParts] = usePartClasses("carousel", classNames, true);
17079
- const slides = useMemo13(
17322
+ const slides = useMemo14(
17080
17323
  () => Children5.toArray(children),
17081
17324
  [children]
17082
17325
  );
17083
17326
  const count = slides.length;
17084
17327
  const controlled = index !== void 0;
17085
- const [internalIndex, setInternalIndex] = useState46(
17328
+ const [internalIndex, setInternalIndex] = useState47(
17086
17329
  () => clampIndex(defaultIndex, count, loop)
17087
17330
  );
17088
17331
  const currentIndex = clampIndex(
@@ -17098,10 +17341,10 @@ var Carousel = forwardRef55(function Carousel2({
17098
17341
  const scrollTimerRef = useRef41(
17099
17342
  null
17100
17343
  );
17101
- const [interacting, setInteracting] = useState46(false);
17102
- const [stopped, setStopped] = useState46(false);
17344
+ const [interacting, setInteracting] = useState47(false);
17345
+ const [stopped, setStopped] = useState47(false);
17103
17346
  const isPaused = autoPlay && (stopped || pauseOnHover && interacting);
17104
- const commit = useCallback20(
17347
+ const commit = useCallback21(
17105
17348
  (next) => {
17106
17349
  const normalized = clampIndex(
17107
17350
  next,
@@ -17119,7 +17362,7 @@ var Carousel = forwardRef55(function Carousel2({
17119
17362
  },
17120
17363
  [count, loop, controlled, onIndexChange]
17121
17364
  );
17122
- useEffect36(() => {
17365
+ useEffect37(() => {
17123
17366
  const track = trackRef.current;
17124
17367
  if (!track) return;
17125
17368
  const slide = track.children[currentIndex];
@@ -17127,7 +17370,7 @@ var Carousel = forwardRef55(function Carousel2({
17127
17370
  const first = track.children[0];
17128
17371
  track.scrollLeft = slide.offsetLeft - (first?.offsetLeft ?? 0);
17129
17372
  }, [currentIndex, count]);
17130
- useEffect36(() => {
17373
+ useEffect37(() => {
17131
17374
  if (!autoPlay || count <= 1 || isPaused) {
17132
17375
  return;
17133
17376
  }
@@ -17147,7 +17390,7 @@ var Carousel = forwardRef55(function Carousel2({
17147
17390
  isPaused,
17148
17391
  commit
17149
17392
  ]);
17150
- useEffect36(() => {
17393
+ useEffect37(() => {
17151
17394
  return () => {
17152
17395
  if (scrollTimerRef.current !== null) {
17153
17396
  window.clearTimeout(
@@ -17354,10 +17597,10 @@ Carousel.displayName = "PimoluCarousel";
17354
17597
  // resizable/resizable.tsx
17355
17598
  import {
17356
17599
  forwardRef as forwardRef56,
17357
- useCallback as useCallback21,
17600
+ useCallback as useCallback22,
17358
17601
  useId as useId39,
17359
17602
  useRef as useRef42,
17360
- useState as useState47
17603
+ useState as useState48
17361
17604
  } from "react";
17362
17605
  import { jsx as jsx87, jsxs as jsxs63 } from "react/jsx-runtime";
17363
17606
  var DEFAULT_SIZES = [50, 50];
@@ -17431,7 +17674,7 @@ var Resizable = forwardRef56(function Resizable2({
17431
17674
  lowerFirst,
17432
17675
  Math.min(safeMax, 100 - minSecond)
17433
17676
  );
17434
- const [internalSizes, setInternalSizes] = useState47(
17677
+ const [internalSizes, setInternalSizes] = useState48(
17435
17678
  () => normalizeSizes(
17436
17679
  defaultSizes,
17437
17680
  lowerFirst,
@@ -17447,8 +17690,8 @@ var Resizable = forwardRef56(function Resizable2({
17447
17690
  null
17448
17691
  );
17449
17692
  const dragRef = useRef42(null);
17450
- const [dragging, setDragging] = useState47(false);
17451
- const assignRootRef = useCallback21(
17693
+ const [dragging, setDragging] = useState48(false);
17694
+ const assignRootRef = useCallback22(
17452
17695
  (node) => {
17453
17696
  rootRef.current = node;
17454
17697
  if (typeof forwardedRef === "function") {
@@ -17657,7 +17900,7 @@ Resizable.displayName = "PimoluResizable";
17657
17900
  // virtual-list/virtual-list.tsx
17658
17901
  import {
17659
17902
  forwardRef as forwardRef57,
17660
- useState as useState48
17903
+ useState as useState49
17661
17904
  } from "react";
17662
17905
  import { jsx as jsx88 } from "react/jsx-runtime";
17663
17906
  function VirtualListComponent({
@@ -17678,7 +17921,7 @@ function VirtualListComponent({
17678
17921
  ...props
17679
17922
  }, forwardedRef) {
17680
17923
  const [partClasses, scopeParts] = usePartClasses("virtual-list", classNames, true);
17681
- const [scrollTop, setScrollTop] = useState48(0);
17924
+ const [scrollTop, setScrollTop] = useState49(0);
17682
17925
  const hasItems = Array.isArray(rawItems);
17683
17926
  const items = hasItems ? rawItems : [];
17684
17927
  const count = hasItems ? items.length : Math.max(0, rawItemCount ?? 0);
@@ -17844,11 +18087,11 @@ DashboardLayout.displayName = "PimoluDashboardLayout";
17844
18087
 
17845
18088
  // data-grid/data-grid.tsx
17846
18089
  import {
17847
- Fragment as Fragment13,
18090
+ Fragment as Fragment14,
17848
18091
  useId as useId40,
17849
- useMemo as useMemo14,
18092
+ useMemo as useMemo15,
17850
18093
  useRef as useRef43,
17851
- useState as useState49
18094
+ useState as useState50
17852
18095
  } from "react";
17853
18096
  import { jsx as jsx90, jsxs as jsxs65 } from "react/jsx-runtime";
17854
18097
  var DEFAULT_LABELS2 = {
@@ -18063,19 +18306,19 @@ function DataGrid({
18063
18306
  const generatedId = useId40();
18064
18307
  const text = { ...DEFAULT_LABELS2, ...labels };
18065
18308
  const isServer = (mode ?? (onSortChange || onFilterChange || onPageChange || totalRows !== void 0 ? "server" : "client")) === "server";
18066
- const [internalFilter, setInternalFilter] = useState49(defaultFilter);
18067
- const [internalSort, setInternalSort] = useState49(defaultSort);
18068
- const [internalPage, setInternalPage] = useState49(defaultPage);
18069
- const [internalPageSize, setInternalPageSize] = useState49(defaultPageSize);
18070
- const [internalSelection, setInternalSelection] = useState49(() => [
18309
+ const [internalFilter, setInternalFilter] = useState50(defaultFilter);
18310
+ const [internalSort, setInternalSort] = useState50(defaultSort);
18311
+ const [internalPage, setInternalPage] = useState50(defaultPage);
18312
+ const [internalPageSize, setInternalPageSize] = useState50(defaultPageSize);
18313
+ const [internalSelection, setInternalSelection] = useState50(() => [
18071
18314
  ...defaultSelectedRowIds ?? []
18072
18315
  ]);
18073
- const [internalHiddenColumns, setInternalHiddenColumns] = useState49(() => [
18316
+ const [internalHiddenColumns, setInternalHiddenColumns] = useState50(() => [
18074
18317
  ...defaultHiddenColumns ?? []
18075
18318
  ]);
18076
- const [internalWidths, setInternalWidths] = useState49(() => ({ ...defaultColumnWidths ?? {} }));
18077
- const [collapsedGroups, setCollapsedGroups] = useState49(() => new Set(defaultCollapsedGroups ?? []));
18078
- const [resizingId, setResizingId] = useState49(null);
18319
+ const [internalWidths, setInternalWidths] = useState50(() => ({ ...defaultColumnWidths ?? {} }));
18320
+ const [collapsedGroups, setCollapsedGroups] = useState50(() => new Set(defaultCollapsedGroups ?? []));
18321
+ const [resizingId, setResizingId] = useState50(null);
18079
18322
  const dragRef = useRef43(null);
18080
18323
  const isFilterControlled = controlledFilter !== void 0;
18081
18324
  const filterValue = isFilterControlled ? controlledFilter : internalFilter;
@@ -18090,7 +18333,7 @@ function DataGrid({
18090
18333
  )
18091
18334
  );
18092
18335
  const isSelectionControlled = controlledSelectedRowIds !== void 0;
18093
- const selectedIds = useMemo14(
18336
+ const selectedIds = useMemo15(
18094
18337
  () => new Set(
18095
18338
  isSelectionControlled ? controlledSelectedRowIds : internalSelection
18096
18339
  ),
@@ -18102,25 +18345,25 @@ function DataGrid({
18102
18345
  );
18103
18346
  const isHiddenControlled = controlledHiddenColumns !== void 0;
18104
18347
  const hiddenColumnIds = isHiddenControlled ? [...controlledHiddenColumns] : internalHiddenColumns;
18105
- const hiddenSet = useMemo14(
18348
+ const hiddenSet = useMemo15(
18106
18349
  () => new Set(hiddenColumnIds),
18107
18350
  [hiddenColumnIds]
18108
18351
  );
18109
18352
  const isWidthsControlled = controlledColumnWidths !== void 0;
18110
18353
  const columnWidths = isWidthsControlled ? controlledColumnWidths : internalWidths;
18111
- const hideableColumns = useMemo14(
18354
+ const hideableColumns = useMemo15(
18112
18355
  () => columns.filter(
18113
18356
  (column) => column.hideable !== false
18114
18357
  ),
18115
18358
  [columns]
18116
18359
  );
18117
- const visibleColumns = useMemo14(() => {
18360
+ const visibleColumns = useMemo15(() => {
18118
18361
  const visible = columns.filter(
18119
18362
  (column) => !hiddenSet.has(column.id)
18120
18363
  );
18121
18364
  return visible.length > 0 ? visible : columns.slice(0, 1);
18122
18365
  }, [columns, hiddenSet]);
18123
- const filteredRows = useMemo14(() => {
18366
+ const filteredRows = useMemo15(() => {
18124
18367
  if (isServer) return [...data];
18125
18368
  const query = filterValue.trim().toLowerCase();
18126
18369
  if (!query) return [...data];
@@ -18130,7 +18373,7 @@ function DataGrid({
18130
18373
  )
18131
18374
  );
18132
18375
  }, [data, columns, filterValue, isServer]);
18133
- const sortedRows = useMemo14(() => {
18376
+ const sortedRows = useMemo15(() => {
18134
18377
  if (isServer || !activeSort) {
18135
18378
  return filteredRows;
18136
18379
  }
@@ -18163,7 +18406,7 @@ function DataGrid({
18163
18406
  ) : sortedRows;
18164
18407
  const firstVisible = total === 0 ? 0 : pageStart + 1;
18165
18408
  const lastVisible = pagination ? Math.min(pageStart + resolvedPageSize, total) : total;
18166
- const rowIds = useMemo14(
18409
+ const rowIds = useMemo15(
18167
18410
  () => data.map(getRowId),
18168
18411
  [data, getRowId]
18169
18412
  );
@@ -18206,13 +18449,13 @@ function DataGrid({
18206
18449
  });
18207
18450
  commitSelection(next);
18208
18451
  }
18209
- const groupColumn = useMemo14(
18452
+ const groupColumn = useMemo15(
18210
18453
  () => groupBy ? columns.find(
18211
18454
  (column) => column.id === groupBy
18212
18455
  ) : void 0,
18213
18456
  [columns, groupBy]
18214
18457
  );
18215
- const groupCounts = useMemo14(() => {
18458
+ const groupCounts = useMemo15(() => {
18216
18459
  const counts = /* @__PURE__ */ new Map();
18217
18460
  if (!groupColumn) return counts;
18218
18461
  for (const row of sortedRows) {
@@ -18225,7 +18468,7 @@ function DataGrid({
18225
18468
  }
18226
18469
  return counts;
18227
18470
  }, [sortedRows, groupColumn, text.emptyGroup]);
18228
- const groupedRows = useMemo14(() => {
18471
+ const groupedRows = useMemo15(() => {
18229
18472
  if (!groupColumn) return null;
18230
18473
  const groups = /* @__PURE__ */ new Map();
18231
18474
  visibleRows.forEach((row, index) => {
@@ -18721,7 +18964,7 @@ function DataGrid({
18721
18964
  ) }) : groupedRows ? groupedRows.map((group) => {
18722
18965
  const isCollapsed = collapsedGroups.has(group.key);
18723
18966
  return /* @__PURE__ */ jsxs65(
18724
- Fragment13,
18967
+ Fragment14,
18725
18968
  {
18726
18969
  children: [
18727
18970
  /* @__PURE__ */ jsx90(TableRow, { className: mergeClasses("pimolu-data-grid__group-row", partClasses.groupRow), children: /* @__PURE__ */ jsx90(
@@ -18856,10 +19099,10 @@ function ColumnsIcon() {
18856
19099
 
18857
19100
  // tree-table/tree-table.tsx
18858
19101
  import {
18859
- useEffect as useEffect37,
18860
- useMemo as useMemo15,
19102
+ useEffect as useEffect38,
19103
+ useMemo as useMemo16,
18861
19104
  useRef as useRef44,
18862
- useState as useState50
19105
+ useState as useState51
18863
19106
  } from "react";
18864
19107
  import { jsx as jsx91, jsxs as jsxs66 } from "react/jsx-runtime";
18865
19108
  var DEFAULT_LABELS3 = {
@@ -19006,7 +19249,7 @@ function TreeTable({
19006
19249
  const [partClasses, scopeParts] = usePartClasses("tree-table", classNames, true);
19007
19250
  const text = { ...DEFAULT_LABELS3, ...selectionMode === "cascade" ? { selectAll: "Select all rows" } : {}, ...labels };
19008
19251
  const resolveNodeId = getNodeId ?? getDefaultNodeId;
19009
- const [internalExpandedIds, setInternalExpandedIds] = useState50(() => {
19252
+ const [internalExpandedIds, setInternalExpandedIds] = useState51(() => {
19010
19253
  const initial = new Set(defaultExpandedIds ?? []);
19011
19254
  if (defaultExpandAll) {
19012
19255
  collectParentIds(nodes, resolveNodeId).forEach(
@@ -19017,16 +19260,16 @@ function TreeTable({
19017
19260
  });
19018
19261
  const isExpandedControlled = controlledExpandedIds !== void 0;
19019
19262
  const expandedIds = isExpandedControlled ? [...controlledExpandedIds] : internalExpandedIds;
19020
- const expanded = useMemo15(
19263
+ const expanded = useMemo16(
19021
19264
  () => new Set(expandedIds),
19022
19265
  [expandedIds]
19023
19266
  );
19024
- const [internalSelectedIds, setInternalSelectedIds] = useState50(() => [
19267
+ const [internalSelectedIds, setInternalSelectedIds] = useState51(() => [
19025
19268
  ...defaultSelectedIds ?? []
19026
19269
  ]);
19027
19270
  const isSelectionControlled = controlledSelectedIds !== void 0;
19028
19271
  const selectedIds = isSelectionControlled ? [...controlledSelectedIds] : internalSelectedIds;
19029
- const selected = useMemo15(() => {
19272
+ const selected = useMemo16(() => {
19030
19273
  const result = new Set(selectedIds);
19031
19274
  if (selectionMode === "independent") return result;
19032
19275
  function expandBranches(items) {
@@ -19040,11 +19283,11 @@ function TreeTable({
19040
19283
  expandBranches(nodes);
19041
19284
  return deriveParentSelection(nodes, result, resolveNodeId);
19042
19285
  }, [selectedIds, nodes, resolveNodeId, selectionMode]);
19043
- const allNodeIds = useMemo15(
19286
+ const allNodeIds = useMemo16(
19044
19287
  () => collectNodeIds(nodes, resolveNodeId),
19045
19288
  [nodes, resolveNodeId]
19046
19289
  );
19047
- const visibleRows = useMemo15(
19290
+ const visibleRows = useMemo16(
19048
19291
  () => flattenVisible(
19049
19292
  nodes,
19050
19293
  expanded,
@@ -19052,13 +19295,13 @@ function TreeTable({
19052
19295
  ),
19053
19296
  [nodes, expanded, resolveNodeId]
19054
19297
  );
19055
- const [focusedId, setFocusedId] = useState50(
19298
+ const [focusedId, setFocusedId] = useState51(
19056
19299
  () => selectedIds[0] ?? nodes.find((node) => !node.disabled)?.id
19057
19300
  );
19058
19301
  const rowRefs = useRef44(
19059
19302
  /* @__PURE__ */ new Map()
19060
19303
  );
19061
- useEffect37(() => {
19304
+ useEffect38(() => {
19062
19305
  if (focusedId && visibleRows.some((row) => row.id === focusedId)) {
19063
19306
  return;
19064
19307
  }
@@ -19470,11 +19713,11 @@ import {
19470
19713
  forwardRef as forwardRef58,
19471
19714
  useId as useId41,
19472
19715
  useRef as useRef45,
19473
- useState as useState51,
19474
- useEffect as useEffect38,
19716
+ useState as useState52,
19717
+ useEffect as useEffect39,
19475
19718
  useImperativeHandle
19476
19719
  } from "react";
19477
- import { Fragment as Fragment14, jsx as jsx92, jsxs as jsxs67 } from "react/jsx-runtime";
19720
+ import { Fragment as Fragment15, jsx as jsx92, jsxs as jsxs67 } from "react/jsx-runtime";
19478
19721
  var DEFAULT_WIDTH = 640;
19479
19722
  var DEFAULT_HEIGHT = 320;
19480
19723
  var DONUT_SIZE = 240;
@@ -19513,9 +19756,9 @@ function safeSize(value, fallback) {
19513
19756
  }
19514
19757
  function useCartesianViewport(width, forwardedRef, responsive) {
19515
19758
  const containerRef = useRef45(null);
19516
- const [measuredWidth, setMeasuredWidth] = useState51(0);
19759
+ const [measuredWidth, setMeasuredWidth] = useState52(0);
19517
19760
  useImperativeHandle(forwardedRef, () => containerRef.current, []);
19518
- useEffect38(() => {
19761
+ useEffect39(() => {
19519
19762
  const node = containerRef.current;
19520
19763
  if (!responsive || !node || typeof ResizeObserver === "undefined") return;
19521
19764
  const observer = new ResizeObserver(([entry]) => {
@@ -19582,8 +19825,8 @@ function ChartContainer({
19582
19825
  ...props
19583
19826
  }) {
19584
19827
  const [partClasses, scopeParts] = usePartClasses("chart", classNames, false);
19585
- const [activeIndex, setActiveIndex] = useState51(null);
19586
- const [keyboard, setKeyboard] = useState51(false);
19828
+ const [activeIndex, setActiveIndex] = useState52(null);
19829
+ const [keyboard, setKeyboard] = useState52(false);
19587
19830
  const pointerFocus = useRef45(false);
19588
19831
  const dismissedIndex = useRef45(null);
19589
19832
  const instructionsId = useId41();
@@ -19615,7 +19858,7 @@ function ChartContainer({
19615
19858
  empty2 && "pimolu-chart--empty",
19616
19859
  className
19617
19860
  ), partClasses.root),
19618
- children: empty2 ? /* @__PURE__ */ jsx92("p", { className: mergeClasses("pimolu-chart__empty", partClasses.empty), role: "status", children: emptyLabel }) : /* @__PURE__ */ jsxs67(Fragment14, { children: [
19861
+ children: empty2 ? /* @__PURE__ */ jsx92("p", { className: mergeClasses("pimolu-chart__empty", partClasses.empty), role: "status", children: emptyLabel }) : /* @__PURE__ */ jsxs67(Fragment15, { children: [
19619
19862
  /* @__PURE__ */ jsxs67(
19620
19863
  "div",
19621
19864
  {
@@ -19681,7 +19924,7 @@ function ChartContainer({
19681
19924
  children: [
19682
19925
  children,
19683
19926
  exploration && /* @__PURE__ */ jsx92("span", { id: instructionsId, className: mergeClasses("pimolu-chart__sr-only", partClasses.srOnly), children: exploration.instructions ?? "Use arrow keys to explore values, Home and End to jump, Escape to dismiss." }),
19684
- active && /* @__PURE__ */ jsxs67(Fragment14, { children: [
19927
+ active && /* @__PURE__ */ jsxs67(Fragment15, { children: [
19685
19928
  exploration?.axis === "x" && /* @__PURE__ */ jsx92(
19686
19929
  "span",
19687
19930
  {
@@ -21120,10 +21363,10 @@ Sparkline.displayName = "PimoluSparkline";
21120
21363
  import {
21121
21364
  createContext as createContext17,
21122
21365
  useContext as useContext17,
21123
- useEffect as useEffect39,
21366
+ useEffect as useEffect40,
21124
21367
  useId as useId42,
21125
21368
  useRef as useRef46,
21126
- useState as useState52
21369
+ useState as useState53
21127
21370
  } from "react";
21128
21371
  import { jsx as jsx93 } from "react/jsx-runtime";
21129
21372
  function formClasses(...values) {
@@ -21164,16 +21407,16 @@ function useForm({
21164
21407
  onSubmit
21165
21408
  }) {
21166
21409
  const formId = useId42();
21167
- const [values, setValuesState] = useState52(
21410
+ const [values, setValuesState] = useState53(
21168
21411
  () => ({ ...defaultValues })
21169
21412
  );
21170
- const [errors, setErrorsState] = useState52(
21413
+ const [errors, setErrorsState] = useState53(
21171
21414
  {}
21172
21415
  );
21173
- const [isSubmitting, setIsSubmitting] = useState52(false);
21416
+ const [isSubmitting, setIsSubmitting] = useState53(false);
21174
21417
  const initialValues = useRef46({ ...defaultValues });
21175
21418
  const mounted = useRef46(true);
21176
- useEffect39(() => {
21419
+ useEffect40(() => {
21177
21420
  mounted.current = true;
21178
21421
  return () => {
21179
21422
  mounted.current = false;
@@ -21377,11 +21620,11 @@ function FormSubmit({
21377
21620
  // masked-input/masked-input.tsx
21378
21621
  import {
21379
21622
  forwardRef as forwardRef59,
21380
- useCallback as useCallback22,
21623
+ useCallback as useCallback23,
21381
21624
  useId as useId43,
21382
- useLayoutEffect as useLayoutEffect3,
21625
+ useLayoutEffect as useLayoutEffect4,
21383
21626
  useRef as useRef47,
21384
- useState as useState53
21627
+ useState as useState54
21385
21628
  } from "react";
21386
21629
  import { jsx as jsx94, jsxs as jsxs68 } from "react/jsx-runtime";
21387
21630
  function tokenPattern(char) {
@@ -21513,14 +21756,14 @@ var MaskedInput = forwardRef59(function MaskedInput2({
21513
21756
  const inputId = id ?? `pimolu-masked-input-${generatedId}`;
21514
21757
  const inputRef = useRef47(null);
21515
21758
  const tokens = parseMask(mask);
21516
- const format = useCallback22(
21759
+ const format = useCallback23(
21517
21760
  (raw) => formatSlots(collectSlots(raw, tokens), tokens),
21518
21761
  // The mask string is the only meaningful input here.
21519
21762
  // eslint-disable-next-line react-hooks/exhaustive-deps
21520
21763
  [mask]
21521
21764
  );
21522
21765
  const isControlled = value !== void 0;
21523
- const [localValue, setLocalValue] = useState53(
21766
+ const [localValue, setLocalValue] = useState54(
21524
21767
  () => format(String(defaultValue ?? ""))
21525
21768
  );
21526
21769
  const displayValue = isControlled ? format(String(value ?? "")) : localValue;
@@ -21528,7 +21771,7 @@ var MaskedInput = forwardRef59(function MaskedInput2({
21528
21771
  useFormReset(inputRef, !isControlled, () => {
21529
21772
  setLocalValue(format(String(defaultValue ?? "")));
21530
21773
  });
21531
- const setInputRef = useCallback22(
21774
+ const setInputRef = useCallback23(
21532
21775
  (node) => {
21533
21776
  inputRef.current = node;
21534
21777
  if (typeof forwardedRef === "function") {
@@ -21539,7 +21782,7 @@ var MaskedInput = forwardRef59(function MaskedInput2({
21539
21782
  },
21540
21783
  [forwardedRef]
21541
21784
  );
21542
- useLayoutEffect3(() => {
21785
+ useLayoutEffect4(() => {
21543
21786
  const pending = pendingCaret.current;
21544
21787
  if (pending === null) return;
21545
21788
  pendingCaret.current = null;
@@ -21647,12 +21890,12 @@ MaskedInput.displayName = "PimoluMaskedInput";
21647
21890
  // currency-input/currency-input.tsx
21648
21891
  import {
21649
21892
  forwardRef as forwardRef60,
21650
- useCallback as useCallback23,
21651
- useEffect as useEffect40,
21893
+ useCallback as useCallback24,
21894
+ useEffect as useEffect41,
21652
21895
  useId as useId44,
21653
- useMemo as useMemo16,
21896
+ useMemo as useMemo17,
21654
21897
  useRef as useRef48,
21655
- useState as useState54
21898
+ useState as useState55
21656
21899
  } from "react";
21657
21900
  import { jsx as jsx95, jsxs as jsxs69 } from "react/jsx-runtime";
21658
21901
  var DEFAULT_LOCALE = "en-US";
@@ -21785,7 +22028,7 @@ var CurrencyInput = forwardRef60(function CurrencyInput2({
21785
22028
  decimals
21786
22029
  );
21787
22030
  const decimalSeparator = decimalSeparatorOf(locale);
21788
- const formatter = useMemo16(() => {
22031
+ const formatter = useMemo17(() => {
21789
22032
  try {
21790
22033
  return new Intl.NumberFormat(locale, {
21791
22034
  style: "currency",
@@ -21806,17 +22049,17 @@ var CurrencyInput = forwardRef60(function CurrencyInput2({
21806
22049
  if (next === null) return "";
21807
22050
  return String(next).replace(".", decimalSeparator);
21808
22051
  }
21809
- const [internalValue, setInternalValue] = useState54(() => finiteOrNull2(defaultValue));
22052
+ const [internalValue, setInternalValue] = useState55(() => finiteOrNull2(defaultValue));
21810
22053
  const currentValue = isControlled ? finiteOrNull2(value) : internalValue;
21811
- const [draft, setDraft] = useState54(
22054
+ const [draft, setDraft] = useState55(
21812
22055
  () => formatCurrency(
21813
22056
  finiteOrNull2(
21814
22057
  isControlled ? value : defaultValue
21815
22058
  )
21816
22059
  )
21817
22060
  );
21818
- const [focused, setFocused] = useState54(false);
21819
- useEffect40(() => {
22061
+ const [focused, setFocused] = useState55(false);
22062
+ useEffect41(() => {
21820
22063
  if (focused) return;
21821
22064
  setDraft(formatCurrency(currentValue));
21822
22065
  }, [
@@ -21831,7 +22074,7 @@ var CurrencyInput = forwardRef60(function CurrencyInput2({
21831
22074
  setInternalValue(initial);
21832
22075
  setDraft(formatCurrency(initial));
21833
22076
  });
21834
- const setInputRef = useCallback23(
22077
+ const setInputRef = useCallback24(
21835
22078
  (node) => {
21836
22079
  inputRef.current = node;
21837
22080
  if (typeof forwardedRef === "function") {
@@ -21964,12 +22207,12 @@ CurrencyInput.displayName = "PimoluCurrencyInput";
21964
22207
  // phone-input/phone-input.tsx
21965
22208
  import {
21966
22209
  forwardRef as forwardRef61,
21967
- useCallback as useCallback24,
21968
- useEffect as useEffect41,
22210
+ useCallback as useCallback25,
22211
+ useEffect as useEffect42,
21969
22212
  useId as useId45,
21970
- useLayoutEffect as useLayoutEffect4,
22213
+ useLayoutEffect as useLayoutEffect5,
21971
22214
  useRef as useRef49,
21972
- useState as useState55
22215
+ useState as useState56
21973
22216
  } from "react";
21974
22217
  import { jsx as jsx96, jsxs as jsxs70 } from "react/jsx-runtime";
21975
22218
  var defaultPhoneCountries = [
@@ -22221,7 +22464,7 @@ var PhoneInput = forwardRef61(function PhoneInput2({
22221
22464
  const inputRef = useRef49(null);
22222
22465
  const countryList = countries && countries.length > 0 ? countries : defaultPhoneCountries;
22223
22466
  const isControlled = value !== void 0;
22224
- const [internalValue, setInternalValue] = useState55(
22467
+ const [internalValue, setInternalValue] = useState56(
22225
22468
  () => String(defaultValue ?? "")
22226
22469
  );
22227
22470
  const requestedCountry = country ?? defaultCountry;
@@ -22230,7 +22473,7 @@ var PhoneInput = forwardRef61(function PhoneInput2({
22230
22473
  ) ?? countryList.find(
22231
22474
  (item) => item.code === defaultCountry
22232
22475
  ) ?? countryList[0] ?? FALLBACK_COUNTRY;
22233
- const [internalCountry, setInternalCountry] = useState55(
22476
+ const [internalCountry, setInternalCountry] = useState56(
22234
22477
  initialCountry.code
22235
22478
  );
22236
22479
  const selectedCountry = countryList.find(
@@ -22253,7 +22496,7 @@ var PhoneInput = forwardRef61(function PhoneInput2({
22253
22496
  activeCountry.pattern
22254
22497
  );
22255
22498
  const pendingCaret = useRef49(null);
22256
- useEffect41(() => {
22499
+ useEffect42(() => {
22257
22500
  if (country !== void 0 || !parsed.international) return;
22258
22501
  if (parsed.country.code !== internalCountry) {
22259
22502
  setInternalCountry(parsed.country.code);
@@ -22268,7 +22511,7 @@ var PhoneInput = forwardRef61(function PhoneInput2({
22268
22511
  setInternalValue(String(defaultValue ?? ""));
22269
22512
  setInternalCountry(initialCountry.code);
22270
22513
  });
22271
- const setInputRef = useCallback24(
22514
+ const setInputRef = useCallback25(
22272
22515
  (node) => {
22273
22516
  inputRef.current = node;
22274
22517
  if (typeof forwardedRef === "function") {
@@ -22279,7 +22522,7 @@ var PhoneInput = forwardRef61(function PhoneInput2({
22279
22522
  },
22280
22523
  [forwardedRef]
22281
22524
  );
22282
- useLayoutEffect4(() => {
22525
+ useLayoutEffect5(() => {
22283
22526
  const pending = pendingCaret.current;
22284
22527
  if (pending === null) return;
22285
22528
  pendingCaret.current = null;
@@ -22441,12 +22684,12 @@ PhoneInput.displayName = "PimoluPhoneInput";
22441
22684
  // mentions/mentions.tsx
22442
22685
  import {
22443
22686
  forwardRef as forwardRef62,
22444
- useCallback as useCallback25,
22445
- useEffect as useEffect42,
22687
+ useCallback as useCallback26,
22688
+ useEffect as useEffect43,
22446
22689
  useId as useId46,
22447
- useMemo as useMemo17,
22690
+ useMemo as useMemo18,
22448
22691
  useRef as useRef50,
22449
- useState as useState56
22692
+ useState as useState57
22450
22693
  } from "react";
22451
22694
  import { jsx as jsx97, jsxs as jsxs71 } from "react/jsx-runtime";
22452
22695
  function getMentionContext(text, caret, trigger) {
@@ -22501,7 +22744,7 @@ var Mentions = forwardRef62(function Mentions2({
22501
22744
  const rootRef = useRef50(null);
22502
22745
  const textareaRef = useRef50(null);
22503
22746
  const listboxRef = useRef50(null);
22504
- const assignRef = useCallback25(
22747
+ const assignRef = useCallback26(
22505
22748
  (node) => {
22506
22749
  textareaRef.current = node;
22507
22750
  if (typeof forwardedRef === "function") {
@@ -22513,14 +22756,14 @@ var Mentions = forwardRef62(function Mentions2({
22513
22756
  [forwardedRef]
22514
22757
  );
22515
22758
  const isControlled = value !== void 0;
22516
- const [internalValue, setInternalValue] = useState56(defaultValue);
22759
+ const [internalValue, setInternalValue] = useState57(defaultValue);
22517
22760
  const text = isControlled ? String(value ?? "") : internalValue;
22518
- const [isOpen, setIsOpen] = useState56(false);
22519
- const [context, setContext] = useState56(null);
22520
- const [activeIndex, setActiveIndex] = useState56(0);
22521
- const [dismissed, setDismissed] = useState56(false);
22522
- const [caretRequest, setCaretRequest] = useState56(null);
22523
- const filteredOptions = useMemo17(() => {
22761
+ const [isOpen, setIsOpen] = useState57(false);
22762
+ const [context, setContext] = useState57(null);
22763
+ const [activeIndex, setActiveIndex] = useState57(0);
22764
+ const [dismissed, setDismissed] = useState57(false);
22765
+ const [caretRequest, setCaretRequest] = useState57(null);
22766
+ const filteredOptions = useMemo18(() => {
22524
22767
  if (!context) return [];
22525
22768
  const query = normalizeSearch(context.query);
22526
22769
  const matches = options.filter((option) => {
@@ -22537,7 +22780,7 @@ var Mentions = forwardRef62(function Mentions2({
22537
22780
  Math.max(0, maxSuggestions)
22538
22781
  );
22539
22782
  }, [context, options, maxSuggestions]);
22540
- const createOption = useMemo17(() => {
22783
+ const createOption = useMemo18(() => {
22541
22784
  if (!allowCreate || !context || context.query.trim() === "") {
22542
22785
  return null;
22543
22786
  }
@@ -22551,7 +22794,7 @@ var Mentions = forwardRef62(function Mentions2({
22551
22794
  label: context.query
22552
22795
  };
22553
22796
  }, [allowCreate, context, options]);
22554
- const suggestions = useMemo17(() => {
22797
+ const suggestions = useMemo18(() => {
22555
22798
  const entries = filteredOptions.map(
22556
22799
  (option) => ({ option, create: false })
22557
22800
  );
@@ -22573,7 +22816,7 @@ var Mentions = forwardRef62(function Mentions2({
22573
22816
  );
22574
22817
  const activeSuggestion = suggestions[safeActiveIndex];
22575
22818
  const activeDescendant = suggestionsOpen && activeSuggestion ? `${listboxId}-option-${safeActiveIndex}` : void 0;
22576
- const commit = useCallback25(
22819
+ const commit = useCallback26(
22577
22820
  (nextText) => {
22578
22821
  if (!isControlled) {
22579
22822
  setInternalValue(nextText);
@@ -22582,7 +22825,7 @@ var Mentions = forwardRef62(function Mentions2({
22582
22825
  },
22583
22826
  [isControlled, onValueChange]
22584
22827
  );
22585
- const closeMenu = useCallback25(() => {
22828
+ const closeMenu = useCallback26(() => {
22586
22829
  setIsOpen(false);
22587
22830
  setContext(null);
22588
22831
  setActiveIndex(0);
@@ -22695,13 +22938,13 @@ var Mentions = forwardRef62(function Mentions2({
22695
22938
  setIsOpen(false);
22696
22939
  setActiveIndex(0);
22697
22940
  });
22698
- useEffect42(() => {
22941
+ useEffect43(() => {
22699
22942
  if (!suggestionsOpen) return;
22700
22943
  listboxRef.current?.querySelector(
22701
22944
  '[data-active="true"]'
22702
22945
  )?.scrollIntoView?.({ block: "nearest" });
22703
22946
  }, [suggestionsOpen, safeActiveIndex]);
22704
- useEffect42(() => {
22947
+ useEffect43(() => {
22705
22948
  if (!caretRequest) return;
22706
22949
  const element = textareaRef.current;
22707
22950
  if (element) {
@@ -22883,11 +23126,11 @@ Mentions.displayName = "PimoluMentions";
22883
23126
  // cascader/cascader.tsx
22884
23127
  import {
22885
23128
  forwardRef as forwardRef63,
22886
- useCallback as useCallback26,
22887
- useEffect as useEffect43,
23129
+ useCallback as useCallback27,
23130
+ useEffect as useEffect44,
22888
23131
  useId as useId47,
22889
23132
  useRef as useRef51,
22890
- useState as useState57
23133
+ useState as useState58
22891
23134
  } from "react";
22892
23135
  import { jsx as jsx98, jsxs as jsxs72 } from "react/jsx-runtime";
22893
23136
  function pathKey(path) {
@@ -22985,7 +23228,7 @@ var Cascader = forwardRef63(function Cascader2({
22985
23228
  const fieldRef = useRef51(null);
22986
23229
  const triggerRef = useRef51(null);
22987
23230
  const listboxRef = useRef51(null);
22988
- const assignRef = useCallback26(
23231
+ const assignRef = useCallback27(
22989
23232
  (node) => {
22990
23233
  triggerRef.current = node;
22991
23234
  if (typeof forwardedRef === "function") {
@@ -22997,11 +23240,11 @@ var Cascader = forwardRef63(function Cascader2({
22997
23240
  [forwardedRef]
22998
23241
  );
22999
23242
  const isControlled = value !== void 0;
23000
- const [internalValue, setInternalValue] = useState57(() => [...defaultValue]);
23243
+ const [internalValue, setInternalValue] = useState58(() => [...defaultValue]);
23001
23244
  const selectedPath = isControlled ? value : internalValue;
23002
- const [isOpen, setIsOpen] = useState57(false);
23003
- const [expandedPath, setExpandedPath] = useState57([]);
23004
- const [activePath, setActivePath] = useState57(null);
23245
+ const [isOpen, setIsOpen] = useState58(false);
23246
+ const [expandedPath, setExpandedPath] = useState58([]);
23247
+ const [activePath, setActivePath] = useState58(null);
23005
23248
  const columns = getColumns(options, expandedPath);
23006
23249
  const flatOptions = flattenColumns(columns);
23007
23250
  const selectedLabels = labelsForPath(
@@ -23167,7 +23410,7 @@ var Cascader = forwardRef63(function Cascader2({
23167
23410
  target: [rootRef, listboxRef],
23168
23411
  onDismiss: closeMenu
23169
23412
  });
23170
- useEffect43(() => {
23413
+ useEffect44(() => {
23171
23414
  if (!isOpen || activeIndex < 0) return;
23172
23415
  listboxRef.current?.querySelector(
23173
23416
  '[data-active="true"]'
@@ -23426,10 +23669,10 @@ Cascader.displayName = "PimoluCascader";
23426
23669
  // transfer/transfer.tsx
23427
23670
  import {
23428
23671
  useId as useId48,
23429
- useMemo as useMemo18,
23430
- useState as useState58
23672
+ useMemo as useMemo19,
23673
+ useState as useState59
23431
23674
  } from "react";
23432
- import { Fragment as Fragment15, jsx as jsx99, jsxs as jsxs73 } from "react/jsx-runtime";
23675
+ import { Fragment as Fragment16, jsx as jsx99, jsxs as jsxs73 } from "react/jsx-runtime";
23433
23676
  var DEFAULT_LIST_HEIGHT = 240;
23434
23677
  function filterItems(items, query) {
23435
23678
  const search = normalizeSearch(query);
@@ -23465,33 +23708,33 @@ function Transfer({
23465
23708
  const sourceTitleId = `${generatedId}-source-title`;
23466
23709
  const targetTitleId = `${generatedId}-target-title`;
23467
23710
  const isControlled = targetKeys !== void 0;
23468
- const [internalTargets, setInternalTargets] = useState58(() => [...defaultTargetKeys]);
23711
+ const [internalTargets, setInternalTargets] = useState59(() => [...defaultTargetKeys]);
23469
23712
  const targets = isControlled ? targetKeys : internalTargets;
23470
- const targetSet = useMemo18(
23713
+ const targetSet = useMemo19(
23471
23714
  () => new Set(targets),
23472
23715
  [targets]
23473
23716
  );
23474
- const itemsByKey = useMemo18(
23717
+ const itemsByKey = useMemo19(
23475
23718
  () => new Map(
23476
23719
  data.map((item) => [item.key, item])
23477
23720
  ),
23478
23721
  [data]
23479
23722
  );
23480
- const sourceItems = useMemo18(
23723
+ const sourceItems = useMemo19(
23481
23724
  () => data.filter(
23482
23725
  (item) => !targetSet.has(item.key)
23483
23726
  ),
23484
23727
  [data, targetSet]
23485
23728
  );
23486
- const targetItems = useMemo18(
23729
+ const targetItems = useMemo19(
23487
23730
  () => targets.map((key) => itemsByKey.get(key)).filter(
23488
23731
  (item) => item !== void 0
23489
23732
  ),
23490
23733
  [targets, itemsByKey]
23491
23734
  );
23492
- const [checkedKeys, setCheckedKeys] = useState58([]);
23493
- const [leftQuery, setLeftQuery] = useState58("");
23494
- const [rightQuery, setRightQuery] = useState58("");
23735
+ const [checkedKeys, setCheckedKeys] = useState59([]);
23736
+ const [leftQuery, setLeftQuery] = useState59("");
23737
+ const [rightQuery, setRightQuery] = useState59("");
23495
23738
  const checkedSet = new Set(checkedKeys);
23496
23739
  const visibleSource = filterItems(
23497
23740
  sourceItems,
@@ -23561,7 +23804,7 @@ function Transfer({
23561
23804
  }
23562
23805
  function itemContent(item) {
23563
23806
  if (render) return render(item);
23564
- return /* @__PURE__ */ jsxs73(Fragment15, { children: [
23807
+ return /* @__PURE__ */ jsxs73(Fragment16, { children: [
23565
23808
  /* @__PURE__ */ jsx99("span", { className: mergeClasses("pimolu-transfer__item-label", partClasses.itemLabel), children: item.label }),
23566
23809
  item.description && /* @__PURE__ */ jsx99("span", { className: mergeClasses("pimolu-transfer__item-description", partClasses.itemDescription), children: item.description })
23567
23810
  ] });
@@ -23789,12 +24032,12 @@ Transfer.displayName = "PimoluTransfer";
23789
24032
  // video-player/video-player.tsx
23790
24033
  import {
23791
24034
  forwardRef as forwardRef64,
23792
- useCallback as useCallback27,
23793
- useEffect as useEffect44,
24035
+ useCallback as useCallback28,
24036
+ useEffect as useEffect45,
23794
24037
  useRef as useRef52,
23795
- useState as useState59
24038
+ useState as useState60
23796
24039
  } from "react";
23797
- import { Fragment as Fragment16, jsx as jsx100, jsxs as jsxs74 } from "react/jsx-runtime";
24040
+ import { Fragment as Fragment17, jsx as jsx100, jsxs as jsxs74 } from "react/jsx-runtime";
23798
24041
  function classes23(...values) {
23799
24042
  return values.filter(Boolean).join(" ");
23800
24043
  }
@@ -23853,10 +24096,10 @@ function PauseIcon() {
23853
24096
  function VolumeIcon({ muted }) {
23854
24097
  return /* @__PURE__ */ jsxs74("svg", { ...iconProps, children: [
23855
24098
  /* @__PURE__ */ jsx100("path", { d: "M11 5 6 9H3v6h3l5 4Z" }),
23856
- muted ? /* @__PURE__ */ jsxs74(Fragment16, { children: [
24099
+ muted ? /* @__PURE__ */ jsxs74(Fragment17, { children: [
23857
24100
  /* @__PURE__ */ jsx100("path", { d: "m16 9 5 6" }),
23858
24101
  /* @__PURE__ */ jsx100("path", { d: "m21 9-5 6" })
23859
- ] }) : /* @__PURE__ */ jsxs74(Fragment16, { children: [
24102
+ ] }) : /* @__PURE__ */ jsxs74(Fragment17, { children: [
23860
24103
  /* @__PURE__ */ jsx100("path", { d: "M15.5 8.5a5 5 0 0 1 0 7" }),
23861
24104
  /* @__PURE__ */ jsx100("path", { d: "M18.5 5.5a9 9 0 0 1 0 13" })
23862
24105
  ] })
@@ -23865,12 +24108,12 @@ function VolumeIcon({ muted }) {
23865
24108
  function FullscreenIcon({
23866
24109
  active
23867
24110
  }) {
23868
- return /* @__PURE__ */ jsx100("svg", { ...iconProps, children: active ? /* @__PURE__ */ jsxs74(Fragment16, { children: [
24111
+ return /* @__PURE__ */ jsx100("svg", { ...iconProps, children: active ? /* @__PURE__ */ jsxs74(Fragment17, { children: [
23869
24112
  /* @__PURE__ */ jsx100("path", { d: "M9 3v6H3" }),
23870
24113
  /* @__PURE__ */ jsx100("path", { d: "M15 3v6h6" }),
23871
24114
  /* @__PURE__ */ jsx100("path", { d: "M9 21v-6H3" }),
23872
24115
  /* @__PURE__ */ jsx100("path", { d: "M15 21v-6h6" })
23873
- ] }) : /* @__PURE__ */ jsxs74(Fragment16, { children: [
24116
+ ] }) : /* @__PURE__ */ jsxs74(Fragment17, { children: [
23874
24117
  /* @__PURE__ */ jsx100("path", { d: "M3 9V3h6" }),
23875
24118
  /* @__PURE__ */ jsx100("path", { d: "M21 9V3h-6" }),
23876
24119
  /* @__PURE__ */ jsx100("path", { d: "M3 15v6h6" }),
@@ -23914,24 +24157,24 @@ var VideoPlayer = forwardRef64(function VideoPlayer2({
23914
24157
  );
23915
24158
  const rootRef = useRef52(null);
23916
24159
  const controlled = controlledPlaying !== void 0;
23917
- const [internalPlaying, setInternalPlaying] = useState59(false);
24160
+ const [internalPlaying, setInternalPlaying] = useState60(false);
23918
24161
  const isPlaying = controlled ? controlledPlaying : internalPlaying;
23919
- const [currentTime, setCurrentTime] = useState59(0);
23920
- const [duration, setDuration] = useState59(0);
23921
- const [volume, setVolume] = useState59(
24162
+ const [currentTime, setCurrentTime] = useState60(0);
24163
+ const [duration, setDuration] = useState60(0);
24164
+ const [volume, setVolume] = useState60(
23922
24165
  () => clamp7(
23923
24166
  Number.isFinite(defaultVolume) ? defaultVolume : 1,
23924
24167
  0,
23925
24168
  1
23926
24169
  )
23927
24170
  );
23928
- const [muted, setMuted] = useState59(initialMuted);
23929
- const [canFullscreen, setCanFullscreen] = useState59(false);
23930
- const [fullscreen, setFullscreen] = useState59(false);
24171
+ const [muted, setMuted] = useState60(initialMuted);
24172
+ const [canFullscreen, setCanFullscreen] = useState60(false);
24173
+ const [fullscreen, setFullscreen] = useState60(false);
23931
24174
  const announcedPlaying = useRef52(
23932
24175
  controlledPlaying ?? false
23933
24176
  );
23934
- const commitPlaying = useCallback27(
24177
+ const commitPlaying = useCallback28(
23935
24178
  (next) => {
23936
24179
  if (announcedPlaying.current === next) {
23937
24180
  return;
@@ -23944,7 +24187,7 @@ var VideoPlayer = forwardRef64(function VideoPlayer2({
23944
24187
  },
23945
24188
  [controlled, onPlayingChange]
23946
24189
  );
23947
- const setRootRef = useCallback27(
24190
+ const setRootRef = useCallback28(
23948
24191
  (node) => {
23949
24192
  rootRef.current = node;
23950
24193
  if (typeof forwardedRef === "function") {
@@ -23955,13 +24198,13 @@ var VideoPlayer = forwardRef64(function VideoPlayer2({
23955
24198
  },
23956
24199
  [forwardedRef]
23957
24200
  );
23958
- useEffect44(() => {
24201
+ useEffect45(() => {
23959
24202
  const media = mediaRef.current;
23960
24203
  if (!media) return;
23961
24204
  media.volume = volume;
23962
24205
  media.muted = muted;
23963
24206
  }, []);
23964
- useEffect44(() => {
24207
+ useEffect45(() => {
23965
24208
  const media = mediaRef.current;
23966
24209
  if (!media) return;
23967
24210
  const currentMedia = media;
@@ -23976,7 +24219,7 @@ var VideoPlayer = forwardRef64(function VideoPlayer2({
23976
24219
  media.removeEventListener("durationchange", syncDuration);
23977
24220
  };
23978
24221
  }, [src]);
23979
- useEffect44(() => {
24222
+ useEffect45(() => {
23980
24223
  if (!controlled) return;
23981
24224
  announcedPlaying.current = controlledPlaying;
23982
24225
  const media = mediaRef.current;
@@ -23987,7 +24230,7 @@ var VideoPlayer = forwardRef64(function VideoPlayer2({
23987
24230
  media.pause();
23988
24231
  }
23989
24232
  }, [controlled, controlledPlaying]);
23990
- useEffect44(() => {
24233
+ useEffect45(() => {
23991
24234
  if (typeof document === "undefined") {
23992
24235
  return;
23993
24236
  }
@@ -24303,12 +24546,12 @@ VideoPlayer.displayName = "PimoluVideoPlayer";
24303
24546
  // audio-player/audio-player.tsx
24304
24547
  import {
24305
24548
  forwardRef as forwardRef65,
24306
- useCallback as useCallback28,
24307
- useEffect as useEffect45,
24549
+ useCallback as useCallback29,
24550
+ useEffect as useEffect46,
24308
24551
  useRef as useRef53,
24309
- useState as useState60
24552
+ useState as useState61
24310
24553
  } from "react";
24311
- import { Fragment as Fragment17, jsx as jsx101, jsxs as jsxs75 } from "react/jsx-runtime";
24554
+ import { Fragment as Fragment18, jsx as jsx101, jsxs as jsxs75 } from "react/jsx-runtime";
24312
24555
  function classes24(...values) {
24313
24556
  return values.filter(Boolean).join(" ");
24314
24557
  }
@@ -24367,10 +24610,10 @@ function PauseIcon2() {
24367
24610
  function VolumeIcon2({ muted }) {
24368
24611
  return /* @__PURE__ */ jsxs75("svg", { ...iconProps2, children: [
24369
24612
  /* @__PURE__ */ jsx101("path", { d: "M11 5 6 9H3v6h3l5 4Z" }),
24370
- muted ? /* @__PURE__ */ jsxs75(Fragment17, { children: [
24613
+ muted ? /* @__PURE__ */ jsxs75(Fragment18, { children: [
24371
24614
  /* @__PURE__ */ jsx101("path", { d: "m16 9 5 6" }),
24372
24615
  /* @__PURE__ */ jsx101("path", { d: "m21 9-5 6" })
24373
- ] }) : /* @__PURE__ */ jsxs75(Fragment17, { children: [
24616
+ ] }) : /* @__PURE__ */ jsxs75(Fragment18, { children: [
24374
24617
  /* @__PURE__ */ jsx101("path", { d: "M15.5 8.5a5 5 0 0 1 0 7" }),
24375
24618
  /* @__PURE__ */ jsx101("path", { d: "M18.5 5.5a9 9 0 0 1 0 13" })
24376
24619
  ] })
@@ -24409,22 +24652,22 @@ var AudioPlayer = forwardRef65(function AudioPlayer2({
24409
24652
  null
24410
24653
  );
24411
24654
  const controlled = controlledPlaying !== void 0;
24412
- const [internalPlaying, setInternalPlaying] = useState60(false);
24655
+ const [internalPlaying, setInternalPlaying] = useState61(false);
24413
24656
  const isPlaying = controlled ? controlledPlaying : internalPlaying;
24414
- const [currentTime, setCurrentTime] = useState60(0);
24415
- const [duration, setDuration] = useState60(0);
24416
- const [volume, setVolume] = useState60(
24657
+ const [currentTime, setCurrentTime] = useState61(0);
24658
+ const [duration, setDuration] = useState61(0);
24659
+ const [volume, setVolume] = useState61(
24417
24660
  () => clamp8(
24418
24661
  Number.isFinite(defaultVolume) ? defaultVolume : 1,
24419
24662
  0,
24420
24663
  1
24421
24664
  )
24422
24665
  );
24423
- const [muted, setMuted] = useState60(initialMuted);
24666
+ const [muted, setMuted] = useState61(initialMuted);
24424
24667
  const announcedPlaying = useRef53(
24425
24668
  controlledPlaying ?? false
24426
24669
  );
24427
- const commitPlaying = useCallback28(
24670
+ const commitPlaying = useCallback29(
24428
24671
  (next) => {
24429
24672
  if (announcedPlaying.current === next) {
24430
24673
  return;
@@ -24437,7 +24680,7 @@ var AudioPlayer = forwardRef65(function AudioPlayer2({
24437
24680
  },
24438
24681
  [controlled, onPlayingChange]
24439
24682
  );
24440
- const setRootRef = useCallback28(
24683
+ const setRootRef = useCallback29(
24441
24684
  (node) => {
24442
24685
  if (typeof forwardedRef === "function") {
24443
24686
  forwardedRef(node);
@@ -24447,13 +24690,13 @@ var AudioPlayer = forwardRef65(function AudioPlayer2({
24447
24690
  },
24448
24691
  [forwardedRef]
24449
24692
  );
24450
- useEffect45(() => {
24693
+ useEffect46(() => {
24451
24694
  const media = mediaRef.current;
24452
24695
  if (!media) return;
24453
24696
  media.volume = volume;
24454
24697
  media.muted = muted;
24455
24698
  }, []);
24456
- useEffect45(() => {
24699
+ useEffect46(() => {
24457
24700
  const media = mediaRef.current;
24458
24701
  if (!media) return;
24459
24702
  const currentMedia = media;
@@ -24468,7 +24711,7 @@ var AudioPlayer = forwardRef65(function AudioPlayer2({
24468
24711
  media.removeEventListener("durationchange", syncDuration);
24469
24712
  };
24470
24713
  }, [src]);
24471
- useEffect45(() => {
24714
+ useEffect46(() => {
24472
24715
  if (!controlled) return;
24473
24716
  announcedPlaying.current = controlledPlaying;
24474
24717
  const media = mediaRef.current;
@@ -24887,13 +25130,13 @@ PDFViewer.displayName = "PimoluPDFViewer";
24887
25130
 
24888
25131
  // lightbox/lightbox.tsx
24889
25132
  import {
24890
- useCallback as useCallback29,
24891
- useEffect as useEffect46,
25133
+ useCallback as useCallback30,
25134
+ useEffect as useEffect47,
24892
25135
  useId as useId49,
24893
25136
  useRef as useRef55,
24894
- useState as useState61
25137
+ useState as useState62
24895
25138
  } from "react";
24896
- import { Fragment as Fragment18, jsx as jsx103, jsxs as jsxs77 } from "react/jsx-runtime";
25139
+ import { Fragment as Fragment19, jsx as jsx103, jsxs as jsxs77 } from "react/jsx-runtime";
24897
25140
  function classes26(...values) {
24898
25141
  return values.filter(Boolean).join(" ");
24899
25142
  }
@@ -24928,7 +25171,7 @@ function ChevronIcon2({
24928
25171
  }
24929
25172
  );
24930
25173
  }
24931
- function CloseIcon6() {
25174
+ function CloseIcon5() {
24932
25175
  return /* @__PURE__ */ jsxs77(
24933
25176
  "svg",
24934
25177
  {
@@ -24966,9 +25209,9 @@ function Lightbox({
24966
25209
  const [partClasses, scopeParts] = usePartClasses("lightbox", classNames, true);
24967
25210
  const count = images.length;
24968
25211
  const controlled = controlledOpen !== void 0;
24969
- const [uncontrolledOpen, setUncontrolledOpen] = useState61(defaultOpen);
25212
+ const [uncontrolledOpen, setUncontrolledOpen] = useState62(defaultOpen);
24970
25213
  const isOpen = controlled ? controlledOpen : uncontrolledOpen;
24971
- const [internalIndex, setInternalIndex] = useState61(
25214
+ const [internalIndex, setInternalIndex] = useState62(
24972
25215
  () => clampIndex2(initialIndex, count)
24973
25216
  );
24974
25217
  const currentIndex = clampIndex2(
@@ -24989,13 +25232,13 @@ function Lightbox({
24989
25232
  null
24990
25233
  );
24991
25234
  const captionId = `pimolu-lightbox-caption-${useId49()}`;
24992
- const setPanelRef = useCallback29(
25235
+ const setPanelRef = useCallback30(
24993
25236
  (node) => {
24994
25237
  panelRef.current = node;
24995
25238
  },
24996
25239
  []
24997
25240
  );
24998
- const setCloseRef = useCallback29(
25241
+ const setCloseRef = useCallback30(
24999
25242
  (node) => {
25000
25243
  closeRef.current = node;
25001
25244
  if (node) {
@@ -25005,7 +25248,7 @@ function Lightbox({
25005
25248
  []
25006
25249
  );
25007
25250
  useBodyScrollLock(active);
25008
- useEffect46(() => {
25251
+ useEffect47(() => {
25009
25252
  if (!active) return;
25010
25253
  previousFocus.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
25011
25254
  return () => {
@@ -25123,7 +25366,7 @@ function Lightbox({
25123
25366
  if (!active) {
25124
25367
  return scopeParts(anchor);
25125
25368
  }
25126
- return scopeParts(/* @__PURE__ */ jsxs77(Fragment18, { children: [
25369
+ return scopeParts(/* @__PURE__ */ jsxs77(Fragment19, { children: [
25127
25370
  anchor,
25128
25371
  /* @__PURE__ */ jsx103(Portal, { anchorRef, children: /* @__PURE__ */ jsxs77(
25129
25372
  "div",
@@ -25161,7 +25404,7 @@ function Lightbox({
25161
25404
  className: mergeClasses("pimolu-lightbox__close", partClasses.close),
25162
25405
  "aria-label": resolvedLabels.close,
25163
25406
  onClick: requestClose,
25164
- children: /* @__PURE__ */ jsx103(CloseIcon6, {})
25407
+ children: /* @__PURE__ */ jsx103(CloseIcon5, {})
25165
25408
  }
25166
25409
  ),
25167
25410
  count > 1 && /* @__PURE__ */ jsx103(
@@ -25257,11 +25500,11 @@ Lightbox.displayName = "PimoluLightbox";
25257
25500
 
25258
25501
  // image-cropper/image-cropper.tsx
25259
25502
  import {
25260
- useCallback as useCallback30,
25261
- useEffect as useEffect47,
25503
+ useCallback as useCallback31,
25504
+ useEffect as useEffect48,
25262
25505
  useId as useId50,
25263
25506
  useRef as useRef56,
25264
- useState as useState62
25507
+ useState as useState63
25265
25508
  } from "react";
25266
25509
  import { jsx as jsx104, jsxs as jsxs78 } from "react/jsx-runtime";
25267
25510
  var HANDLES = [
@@ -25522,12 +25765,12 @@ function ImageCropper({
25522
25765
  const instructionsId = `pimolu-image-cropper-instructions-${useId50()}`;
25523
25766
  const ratio = aspectRatio !== void 0 && Number.isFinite(aspectRatio) && aspectRatio > 0 ? aspectRatio : void 0;
25524
25767
  const sourceKey = cropFromSource(src);
25525
- const [objectUrl, setObjectUrl] = useState62(null);
25526
- const [intrinsic, setIntrinsic] = useState62(null);
25768
+ const [objectUrl, setObjectUrl] = useState63(null);
25769
+ const [intrinsic, setIntrinsic] = useState63(null);
25527
25770
  const sourceAspect = intrinsic?.key === sourceKey ? intrinsic.aspect : null;
25528
25771
  const stageAspect = ratio ?? sourceAspect ?? 1;
25529
25772
  const resolvedSrc = typeof src === "string" ? src : objectUrl;
25530
- const [internalCrop, setInternalCrop] = useState62(
25773
+ const [internalCrop, setInternalCrop] = useState63(
25531
25774
  () => initialCrop ? normalizeCrop(
25532
25775
  initialCrop,
25533
25776
  defaultCrop(
@@ -25557,8 +25800,8 @@ function ImageCropper({
25557
25800
  safeMinZoom,
25558
25801
  safeMaxZoom
25559
25802
  );
25560
- const [zoom, setZoom] = useState62(safeDefaultZoom);
25561
- const [dragging, setDragging] = useState62(false);
25803
+ const [zoom, setZoom] = useState63(safeDefaultZoom);
25804
+ const [dragging, setDragging] = useState63(false);
25562
25805
  const stageRef = useRef56(
25563
25806
  null
25564
25807
  );
@@ -25566,7 +25809,7 @@ function ImageCropper({
25566
25809
  null
25567
25810
  );
25568
25811
  const dragRef = useRef56(null);
25569
- useEffect47(() => {
25812
+ useEffect48(() => {
25570
25813
  setIntrinsic(null);
25571
25814
  if (typeof src === "string") {
25572
25815
  setObjectUrl(null);
@@ -25582,7 +25825,7 @@ function ImageCropper({
25582
25825
  URL.revokeObjectURL(url);
25583
25826
  };
25584
25827
  }, [src]);
25585
- const commitCrop = useCallback30(
25828
+ const commitCrop = useCallback31(
25586
25829
  (next) => {
25587
25830
  const normalized = normalizeCrop(
25588
25831
  next,
@@ -25595,7 +25838,7 @@ function ImageCropper({
25595
25838
  },
25596
25839
  [controlledCrop, fallbackCrop, onChange]
25597
25840
  );
25598
- useEffect47(() => {
25841
+ useEffect48(() => {
25599
25842
  if (controlledCrop !== void 0) return;
25600
25843
  setInternalCrop(
25601
25844
  initialCrop ? normalizeCrop(
@@ -25632,7 +25875,7 @@ function ImageCropper({
25632
25875
  };
25633
25876
  setDragging(true);
25634
25877
  }
25635
- useEffect47(() => {
25878
+ useEffect48(() => {
25636
25879
  if (!dragging) return;
25637
25880
  function handlePointerMove(event) {
25638
25881
  const drag = dragRef.current;
@@ -26046,7 +26289,7 @@ function ImageCropper({
26046
26289
  ImageCropper.displayName = "PimoluImageCropper";
26047
26290
 
26048
26291
  // qr-code/qr-code.tsx
26049
- import { useMemo as useMemo19 } from "react";
26292
+ import { useMemo as useMemo20 } from "react";
26050
26293
  import { jsx as jsx105, jsxs as jsxs79 } from "react/jsx-runtime";
26051
26294
  var BLOCKS = {
26052
26295
  L: [
@@ -26728,7 +26971,7 @@ function QRCode({
26728
26971
  }) {
26729
26972
  const [partClasses, scopeParts] = usePartClasses("qr-code", classNames, true);
26730
26973
  const quietZone = Number.isFinite(margin) ? clamp10(Math.trunc(margin), 0, 16) : 4;
26731
- const { matrix, dimension, path } = useMemo19(() => {
26974
+ const { matrix, dimension, path } = useMemo20(() => {
26732
26975
  const encoded = encodeQrMatrix(value, level, mask);
26733
26976
  const total = encoded.size + quietZone * 2;
26734
26977
  const parts = [];
@@ -26870,10 +27113,10 @@ AppShell.displayName = "PimoluAppShell";
26870
27113
  import {
26871
27114
  createContext as createContext18,
26872
27115
  useContext as useContext18,
26873
- useEffect as useEffect48,
27116
+ useEffect as useEffect49,
26874
27117
  useId as useId51,
26875
27118
  useRef as useRef57,
26876
- useState as useState63
27119
+ useState as useState64
26877
27120
  } from "react";
26878
27121
  import { jsx as jsx107 } from "react/jsx-runtime";
26879
27122
  var MenubarContext = createContext18(null);
@@ -26908,7 +27151,7 @@ function Menubar({
26908
27151
  ...props
26909
27152
  }) {
26910
27153
  const [partClasses, scopeParts] = usePartClasses("menubar", classNames, true);
26911
- const [openValue, setOpenValue] = useState63(
27154
+ const [openValue, setOpenValue] = useState64(
26912
27155
  null
26913
27156
  );
26914
27157
  const menubarRef = useRef57(null);
@@ -26924,7 +27167,7 @@ function Menubar({
26924
27167
  trigger.tabIndex = trigger === active ? 0 : -1;
26925
27168
  });
26926
27169
  }
26927
- useEffect48(() => {
27170
+ useEffect49(() => {
26928
27171
  const triggers = getTriggers();
26929
27172
  if (triggers.length === 0) return;
26930
27173
  const focused = triggers.find(
@@ -26978,7 +27221,7 @@ function Menubar({
26978
27221
  setOpenValue(value);
26979
27222
  }
26980
27223
  }
26981
- useEffect48(() => {
27224
+ useEffect49(() => {
26982
27225
  if (openValue === null) return;
26983
27226
  function handleEscape(event) {
26984
27227
  if (event.key !== "Escape") return;
@@ -27124,7 +27367,7 @@ function MenubarSurface({
27124
27367
  maxHeight: 420
27125
27368
  }
27126
27369
  );
27127
- useEffect48(() => {
27370
+ useEffect49(() => {
27128
27371
  const panel = contentRef.current;
27129
27372
  if (!panel) return;
27130
27373
  const first = panel.querySelector(
@@ -27292,9 +27535,9 @@ MenubarLabel.displayName = "PimoluMenubarLabel";
27292
27535
  import {
27293
27536
  createContext as createContext19,
27294
27537
  useContext as useContext19,
27295
- useEffect as useEffect49,
27538
+ useEffect as useEffect50,
27296
27539
  useRef as useRef58,
27297
- useState as useState64
27540
+ useState as useState65
27298
27541
  } from "react";
27299
27542
  import { jsx as jsx108 } from "react/jsx-runtime";
27300
27543
  var ToolbarContext = createContext19(null);
@@ -27339,7 +27582,7 @@ function Toolbar({
27339
27582
  }) {
27340
27583
  const [partClasses, scopeParts] = usePartClasses("toolbar", classNames, true);
27341
27584
  const rootRef = useRef58(null);
27342
- useEffect49(() => {
27585
+ useEffect50(() => {
27343
27586
  const items = getEnabledItems2(rootRef.current);
27344
27587
  if (items.length === 0) return;
27345
27588
  const focused = items.find(
@@ -27527,10 +27770,10 @@ function ToolbarToggleGroup(props) {
27527
27770
  } = props;
27528
27771
  const multiple = props.type === "multiple";
27529
27772
  const controlledValue = props.value;
27530
- const [singleValue, setSingleValue] = useState64(
27773
+ const [singleValue, setSingleValue] = useState65(
27531
27774
  multiple ? "" : props.defaultValue ?? ""
27532
27775
  );
27533
- const [multipleValue, setMultipleValue] = useState64(
27776
+ const [multipleValue, setMultipleValue] = useState65(
27534
27777
  multiple ? props.defaultValue ?? [] : []
27535
27778
  );
27536
27779
  const value = controlledValue !== void 0 ? controlledValue : multiple ? multipleValue : singleValue;
@@ -27624,7 +27867,7 @@ import {
27624
27867
  isValidElement as isValidElement13,
27625
27868
  useId as useId52,
27626
27869
  useRef as useRef59,
27627
- useState as useState65
27870
+ useState as useState66
27628
27871
  } from "react";
27629
27872
  import { jsx as jsx109, jsxs as jsxs81 } from "react/jsx-runtime";
27630
27873
  function assignNode(ref, node) {
@@ -27679,7 +27922,7 @@ function Popconfirm({
27679
27922
  }) {
27680
27923
  const [partClasses, scopeParts] = usePartClasses("popconfirm", classNames, true);
27681
27924
  const isControlled = controlledOpen !== void 0;
27682
- const [uncontrolledOpen, setUncontrolledOpen] = useState65(defaultOpen);
27925
+ const [uncontrolledOpen, setUncontrolledOpen] = useState66(defaultOpen);
27683
27926
  const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
27684
27927
  const triggerRef = useRef59(null);
27685
27928
  const resolved = useRef59(false);
@@ -27790,20 +28033,20 @@ Popconfirm.displayName = "PimoluPopconfirm";
27790
28033
 
27791
28034
  // tour/tour.tsx
27792
28035
  import {
27793
- useCallback as useCallback31,
27794
- useEffect as useEffect50,
28036
+ useCallback as useCallback32,
28037
+ useEffect as useEffect51,
27795
28038
  useId as useId53,
27796
- useLayoutEffect as useLayoutEffect5,
28039
+ useLayoutEffect as useLayoutEffect6,
27797
28040
  useRef as useRef60,
27798
- useState as useState66
28041
+ useState as useState67
27799
28042
  } from "react";
27800
- import { Fragment as Fragment19, jsx as jsx110, jsxs as jsxs82 } from "react/jsx-runtime";
28043
+ import { Fragment as Fragment20, jsx as jsx110, jsxs as jsxs82 } from "react/jsx-runtime";
27801
28044
  var CARD_WIDTH = 352;
27802
28045
  var CARD_HEIGHT = 190;
27803
28046
  var GAP = 12;
27804
28047
  var VIEWPORT_MARGIN = 12;
27805
28048
  var SPOTLIGHT_PADDING = 8;
27806
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect5 : useEffect50;
28049
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect6 : useEffect51;
27807
28050
  function clamp11(value, min, max) {
27808
28051
  return Math.min(Math.max(value, min), max);
27809
28052
  }
@@ -27955,20 +28198,20 @@ function Tour({
27955
28198
  }) {
27956
28199
  const [partClasses, scopeParts] = usePartClasses("tour", classNames, true);
27957
28200
  const isControlled = controlledOpen !== void 0;
27958
- const [uncontrolledOpen, setUncontrolledOpen] = useState66(defaultOpen);
28201
+ const [uncontrolledOpen, setUncontrolledOpen] = useState67(defaultOpen);
27959
28202
  const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
27960
- const [mounted, setMounted] = useState66(false);
27961
- useEffect50(() => setMounted(true), []);
27962
- const [stepIndex, setStepIndex] = useState66(
28203
+ const [mounted, setMounted] = useState67(false);
28204
+ useEffect51(() => setMounted(true), []);
28205
+ const [stepIndex, setStepIndex] = useState67(
27963
28206
  () => clampStep(initialStep, steps.length)
27964
28207
  );
27965
28208
  const index = clampStep(stepIndex, steps.length);
27966
28209
  const currentStep = steps[index];
27967
28210
  const targetSpec = currentStep?.target;
27968
- const [target, setTarget] = useState66(null);
28211
+ const [target, setTarget] = useState67(null);
27969
28212
  const cardRef = useRef60(null);
27970
- const [cardMounted, setCardMounted] = useState66(false);
27971
- const setCardRef = useCallback31(
28213
+ const [cardMounted, setCardMounted] = useState67(false);
28214
+ const setCardRef = useCallback32(
27972
28215
  (node) => {
27973
28216
  cardRef.current = node;
27974
28217
  setCardMounted(node !== null);
@@ -27978,7 +28221,7 @@ function Tour({
27978
28221
  const scopeRef = useRef60(null);
27979
28222
  const titleId = `pimolu-tour-title-${useId53()}`;
27980
28223
  const descriptionId = `pimolu-tour-description-${useId53()}`;
27981
- const [geometry, setGeometry] = useState66(
28224
+ const [geometry, setGeometry] = useState67(
27982
28225
  () => centeredGeometry(
27983
28226
  1024,
27984
28227
  768,
@@ -27993,13 +28236,13 @@ function Tour({
27993
28236
  }
27994
28237
  onOpenChange?.(next2);
27995
28238
  }
27996
- useEffect50(() => {
28239
+ useEffect51(() => {
27997
28240
  if (isOpen && !wasOpen.current) {
27998
28241
  setStepIndex(clampStep(initialStep, steps.length));
27999
28242
  }
28000
28243
  wasOpen.current = isOpen;
28001
28244
  }, [isOpen, initialStep, steps.length]);
28002
- useEffect50(() => {
28245
+ useEffect51(() => {
28003
28246
  if (!isOpen || !targetSpec) {
28004
28247
  setTarget(null);
28005
28248
  return;
@@ -28020,7 +28263,7 @@ function Tour({
28020
28263
  }
28021
28264
  }
28022
28265
  }, [isOpen, index, targetSpec]);
28023
- const updateGeometry = useCallback31(() => {
28266
+ const updateGeometry = useCallback32(() => {
28024
28267
  if (typeof window === "undefined") return;
28025
28268
  const viewportWidth = window.innerWidth || 1024;
28026
28269
  const viewportHeight = window.innerHeight || 768;
@@ -28095,7 +28338,7 @@ function Tour({
28095
28338
  initialFocus: "container"
28096
28339
  });
28097
28340
  const previousIndex = useRef60(index);
28098
- useEffect50(() => {
28341
+ useEffect51(() => {
28099
28342
  if (!isOpen) {
28100
28343
  previousIndex.current = index;
28101
28344
  return;
@@ -28152,7 +28395,7 @@ function Tour({
28152
28395
  const missingTarget = !target;
28153
28396
  const hasSpotlight = geometry.spotlight != null;
28154
28397
  const lastStep = index === steps.length - 1;
28155
- return scopeParts(/* @__PURE__ */ jsxs82(Fragment19, { children: [
28398
+ return scopeParts(/* @__PURE__ */ jsxs82(Fragment20, { children: [
28156
28399
  /* @__PURE__ */ jsx110("span", { ref: scopeRef, hidden: true }),
28157
28400
  /* @__PURE__ */ jsx110(Portal, { anchorRef: scopeRef, children: /* @__PURE__ */ jsxs82(
28158
28401
  "div",
@@ -28268,9 +28511,9 @@ Tour.displayName = "PimoluTour";
28268
28511
  // notification-center/notification-center.tsx
28269
28512
  import {
28270
28513
  useId as useId54,
28271
- useState as useState67
28514
+ useState as useState68
28272
28515
  } from "react";
28273
- import { Fragment as Fragment20, jsx as jsx111, jsxs as jsxs83 } from "react/jsx-runtime";
28516
+ import { Fragment as Fragment21, jsx as jsx111, jsxs as jsxs83 } from "react/jsx-runtime";
28274
28517
  function BellIcon() {
28275
28518
  return /* @__PURE__ */ jsxs83(
28276
28519
  "svg",
@@ -28292,7 +28535,7 @@ function BellIcon() {
28292
28535
  }
28293
28536
  );
28294
28537
  }
28295
- function CloseIcon7() {
28538
+ function CloseIcon6() {
28296
28539
  return /* @__PURE__ */ jsxs83(
28297
28540
  "svg",
28298
28541
  {
@@ -28335,9 +28578,9 @@ function NotificationCenter({
28335
28578
  }) {
28336
28579
  const [partClasses, scopeParts] = usePartClasses("notification-center", classNames, true);
28337
28580
  const isControlled = controlledOpen !== void 0;
28338
- const [uncontrolledOpen, setUncontrolledOpen] = useState67(defaultOpen);
28581
+ const [uncontrolledOpen, setUncontrolledOpen] = useState68(defaultOpen);
28339
28582
  const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
28340
- const [tab, setTab] = useState67(defaultTab);
28583
+ const [tab, setTab] = useState68(defaultTab);
28341
28584
  const baseId = useId54();
28342
28585
  const panelId = `pimolu-notification-center-${baseId}-panel`;
28343
28586
  const unreadCount = notifications.filter(
@@ -28467,7 +28710,7 @@ function NotificationCenter({
28467
28710
  role: showTabs ? "tabpanel" : void 0,
28468
28711
  "aria-labelledby": showTabs ? `pimolu-notification-center-${baseId}-tab-${tab}` : void 0,
28469
28712
  className: mergeClasses("pimolu-notification-center__body", partClasses.body),
28470
- children: visible.length === 0 ? /* @__PURE__ */ jsx111("div", { className: mergeClasses("pimolu-notification-center__empty", partClasses.empty), children: emptyState ?? /* @__PURE__ */ jsxs83(Fragment20, { children: [
28713
+ children: visible.length === 0 ? /* @__PURE__ */ jsx111("div", { className: mergeClasses("pimolu-notification-center__empty", partClasses.empty), children: emptyState ?? /* @__PURE__ */ jsxs83(Fragment21, { children: [
28471
28714
  /* @__PURE__ */ jsx111(BellIcon, {}),
28472
28715
  /* @__PURE__ */ jsx111("p", { className: mergeClasses("pimolu-notification-center__empty-text", partClasses.emptyText), children: emptyLabel ?? (notifications.length === 0 ? "No notifications yet." : "You're all caught up.") })
28473
28716
  ] }) }) : /* @__PURE__ */ jsx111("ul", { className: mergeClasses("pimolu-notification-center__list", partClasses.list), children: visible.map((notification) => {
@@ -28517,7 +28760,7 @@ function NotificationCenter({
28517
28760
  className: mergeClasses("pimolu-notification-center__dismiss", partClasses.dismiss),
28518
28761
  "aria-label": dismissLabel,
28519
28762
  onClick: () => onDismiss(notification.id),
28520
- children: /* @__PURE__ */ jsx111(CloseIcon7, {})
28763
+ children: /* @__PURE__ */ jsx111(CloseIcon6, {})
28521
28764
  }
28522
28765
  )
28523
28766
  ]
@@ -28567,11 +28810,11 @@ NotificationCenter.displayName = "PimoluNotificationCenter";
28567
28810
 
28568
28811
  // kanban/kanban.tsx
28569
28812
  import {
28570
- Fragment as Fragment21,
28571
- useEffect as useEffect51,
28813
+ Fragment as Fragment22,
28814
+ useEffect as useEffect52,
28572
28815
  useId as useId55,
28573
28816
  useRef as useRef61,
28574
- useState as useState68
28817
+ useState as useState69
28575
28818
  } from "react";
28576
28819
  import { jsx as jsx112, jsxs as jsxs84 } from "react/jsx-runtime";
28577
28820
  var defaultLabels = {
@@ -28757,12 +29000,12 @@ function KanbanCardView({
28757
29000
  onCardKeyDown
28758
29001
  }) {
28759
29002
  const [partClasses, scopeParts] = usePartClasses("kanban", classNames, false);
28760
- const [menuOpen, setMenuOpen] = useState68(false);
29003
+ const [menuOpen, setMenuOpen] = useState69(false);
28761
29004
  const moveRootRef = useRef61(null);
28762
29005
  const moveTriggerRef = useRef61(null);
28763
29006
  const menuRef = useRef61(null);
28764
29007
  const focusFirstItemRef = useRef61(false);
28765
- useEffect51(() => {
29008
+ useEffect52(() => {
28766
29009
  if (!menuOpen) {
28767
29010
  return;
28768
29011
  }
@@ -28776,7 +29019,7 @@ function KanbanCardView({
28776
29019
  document.removeEventListener("mousedown", handlePointerDown);
28777
29020
  };
28778
29021
  }, [menuOpen]);
28779
- useEffect51(() => {
29022
+ useEffect52(() => {
28780
29023
  if (!menuOpen || !focusFirstItemRef.current) {
28781
29024
  return;
28782
29025
  }
@@ -29037,16 +29280,16 @@ function Kanban({
29037
29280
  ...labelOverrides
29038
29281
  };
29039
29282
  const isControlled = controlledColumns !== void 0;
29040
- const [internalColumns, setInternalColumns] = useState68(() => cloneColumns(defaultColumns ?? []));
29283
+ const [internalColumns, setInternalColumns] = useState69(() => cloneColumns(defaultColumns ?? []));
29041
29284
  const boardColumns = controlledColumns ?? internalColumns;
29042
29285
  const baseId = `pimolu-kanban-${useId55()}`;
29043
29286
  const instructionsId = `${baseId}-instructions`;
29044
29287
  const rootRef = useRef61(null);
29045
- const [dragState, setDragState] = useState68(null);
29046
- const [dropTarget, setDropTarget] = useState68(null);
29047
- const [announcement, setAnnouncement] = useState68("");
29048
- const [pendingFocus, setPendingFocus] = useState68(null);
29049
- useEffect51(() => {
29288
+ const [dragState, setDragState] = useState69(null);
29289
+ const [dropTarget, setDropTarget] = useState69(null);
29290
+ const [announcement, setAnnouncement] = useState69("");
29291
+ const [pendingFocus, setPendingFocus] = useState69(null);
29292
+ useEffect52(() => {
29050
29293
  if (!pendingFocus) {
29051
29294
  return;
29052
29295
  }
@@ -29300,7 +29543,7 @@ function Kanban({
29300
29543
  },
29301
29544
  onDrop: (event) => handleDrop(event, column),
29302
29545
  children: [
29303
- column.cards.map((card, index) => /* @__PURE__ */ jsxs84(Fragment21, { children: [
29546
+ column.cards.map((card, index) => /* @__PURE__ */ jsxs84(Fragment22, { children: [
29304
29547
  activeDrop && dropIndex === index && /* @__PURE__ */ jsx112(
29305
29548
  "li",
29306
29549
  {
@@ -29388,12 +29631,12 @@ function Kanban({
29388
29631
 
29389
29632
  // chat/chat.tsx
29390
29633
  import {
29391
- useEffect as useEffect52,
29634
+ useEffect as useEffect53,
29392
29635
  useId as useId56,
29393
29636
  useRef as useRef62,
29394
- useState as useState69
29637
+ useState as useState70
29395
29638
  } from "react";
29396
- import { Fragment as Fragment22, jsx as jsx113, jsxs as jsxs85 } from "react/jsx-runtime";
29639
+ import { Fragment as Fragment23, jsx as jsx113, jsxs as jsxs85 } from "react/jsx-runtime";
29397
29640
  var defaultLabels2 = {
29398
29641
  conversation: "Conversation",
29399
29642
  messages: "Messages",
@@ -29691,11 +29934,11 @@ function Chat({
29691
29934
  ...defaultLabels2,
29692
29935
  ...labelOverrides
29693
29936
  };
29694
- const [draft, setDraft] = useState69("");
29937
+ const [draft, setDraft] = useState70("");
29695
29938
  const listRef = useRef62(null);
29696
29939
  const inputId = `pimolu-chat-${useId56()}`;
29697
29940
  const lastMessageId = messages.length > 0 ? messages[messages.length - 1]?.id : void 0;
29698
- useEffect52(() => {
29941
+ useEffect53(() => {
29699
29942
  const list = listRef.current;
29700
29943
  if (!list) {
29701
29944
  return;
@@ -29785,7 +30028,7 @@ function Chat({
29785
30028
  /* @__PURE__ */ jsx113("span", { children: labels.loading })
29786
30029
  ]
29787
30030
  }
29788
- ) : messages.length === 0 ? /* @__PURE__ */ jsx113("div", { className: mergeClasses("pimolu-chat__empty", partClasses.empty), children: emptyState ?? /* @__PURE__ */ jsxs85(Fragment22, { children: [
30031
+ ) : messages.length === 0 ? /* @__PURE__ */ jsx113("div", { className: mergeClasses("pimolu-chat__empty", partClasses.empty), children: emptyState ?? /* @__PURE__ */ jsxs85(Fragment23, { children: [
29789
30032
  /* @__PURE__ */ jsx113(
29790
30033
  "span",
29791
30034
  {
@@ -29896,11 +30139,11 @@ function Chat({
29896
30139
 
29897
30140
  // scheduler/scheduler.tsx
29898
30141
  import {
29899
- useEffect as useEffect53,
29900
- useMemo as useMemo20,
30142
+ useEffect as useEffect54,
30143
+ useMemo as useMemo21,
29901
30144
  useRef as useRef63,
29902
30145
  useId as useId57,
29903
- useState as useState70
30146
+ useState as useState71
29904
30147
  } from "react";
29905
30148
  import { jsx as jsx114, jsxs as jsxs86 } from "react/jsx-runtime";
29906
30149
  function startOfDay3(date) {
@@ -30021,10 +30264,10 @@ function Scheduler({
30021
30264
  }) {
30022
30265
  const [partClasses, scopeParts] = usePartClasses("scheduler", classNames, true);
30023
30266
  const dateControlled = date !== void 0;
30024
- const [internalDate, setInternalDate] = useState70(
30267
+ const [internalDate, setInternalDate] = useState71(
30025
30268
  () => startOfDay3(date ?? defaultDate ?? /* @__PURE__ */ new Date())
30026
30269
  );
30027
- const [internalView, setInternalView] = useState70(defaultView);
30270
+ const [internalView, setInternalView] = useState71(defaultView);
30028
30271
  const resolvedView = view ?? internalView;
30029
30272
  const visibleDate = startOfDay3(date ?? internalDate);
30030
30273
  const minHour = Math.max(
@@ -30037,7 +30280,7 @@ function Scheduler({
30037
30280
  );
30038
30281
  const hourCount = maxHour - minHour;
30039
30282
  const rangeMinutes = hourCount * 60;
30040
- const days = useMemo20(() => {
30283
+ const days = useMemo21(() => {
30041
30284
  if (resolvedView === "day") {
30042
30285
  return [visibleDate];
30043
30286
  }
@@ -30050,7 +30293,7 @@ function Scheduler({
30050
30293
  (_, index) => addDays2(first, index)
30051
30294
  );
30052
30295
  }, [visibleDate, resolvedView, weekStartsOn]);
30053
- const hours = useMemo20(
30296
+ const hours = useMemo21(
30054
30297
  () => Array.from(
30055
30298
  { length: hourCount },
30056
30299
  (_, index) => minHour + index
@@ -30059,8 +30302,8 @@ function Scheduler({
30059
30302
  );
30060
30303
  const gridRef = useRef63(null);
30061
30304
  const keyboardHintId = `scheduler-keys-${useId57()}`;
30062
- const [activeCell, setActiveCell] = useState70({ row: 1, column: 0 });
30063
- const [editingCell, setEditingCell] = useState70(null);
30305
+ const [activeCell, setActiveCell] = useState71({ row: 1, column: 0 });
30306
+ const [editingCell, setEditingCell] = useState71(null);
30064
30307
  const focusedRow = Math.min(activeCell.row, hours.length);
30065
30308
  const focusedColumn = Math.min(activeCell.column, days.length - 1);
30066
30309
  function handleGridKeyDown(event) {
@@ -30133,7 +30376,7 @@ function Scheduler({
30133
30376
  setActiveCell({ row: nextRow, column: nextColumn });
30134
30377
  next?.focus();
30135
30378
  }
30136
- const normalizedEvents = useMemo20(
30379
+ const normalizedEvents = useMemo21(
30137
30380
  () => events.map((event) => {
30138
30381
  const start = new Date(event.start);
30139
30382
  let end = new Date(event.end);
@@ -30159,7 +30402,7 @@ function Scheduler({
30159
30402
  }),
30160
30403
  [events]
30161
30404
  );
30162
- const fullDateFormatter = useMemo20(
30405
+ const fullDateFormatter = useMemo21(
30163
30406
  () => new Intl.DateTimeFormat(locale, {
30164
30407
  weekday: "long",
30165
30408
  year: "numeric",
@@ -30168,32 +30411,32 @@ function Scheduler({
30168
30411
  }),
30169
30412
  [locale]
30170
30413
  );
30171
- const weekdayFormatter = useMemo20(
30414
+ const weekdayFormatter = useMemo21(
30172
30415
  () => new Intl.DateTimeFormat(locale, {
30173
30416
  weekday: "short"
30174
30417
  }),
30175
30418
  [locale]
30176
30419
  );
30177
- const monthFormatter = useMemo20(
30420
+ const monthFormatter = useMemo21(
30178
30421
  () => new Intl.DateTimeFormat(locale, {
30179
30422
  month: "short"
30180
30423
  }),
30181
30424
  [locale]
30182
30425
  );
30183
- const timeFormatter = useMemo20(
30426
+ const timeFormatter = useMemo21(
30184
30427
  () => new Intl.DateTimeFormat(locale, {
30185
30428
  hour: "numeric",
30186
30429
  minute: "2-digit"
30187
30430
  }),
30188
30431
  [locale]
30189
30432
  );
30190
- const hourFormatter = useMemo20(
30433
+ const hourFormatter = useMemo21(
30191
30434
  () => new Intl.DateTimeFormat(locale, {
30192
30435
  hour: "numeric"
30193
30436
  }),
30194
30437
  [locale]
30195
30438
  );
30196
- const title = useMemo20(() => {
30439
+ const title = useMemo21(() => {
30197
30440
  if (resolvedView === "day") {
30198
30441
  return fullDateFormatter.format(visibleDate);
30199
30442
  }
@@ -30213,7 +30456,7 @@ function Scheduler({
30213
30456
  fullDateFormatter,
30214
30457
  monthFormatter
30215
30458
  ]);
30216
- const dayLayouts = useMemo20(() => {
30459
+ const dayLayouts = useMemo21(() => {
30217
30460
  return days.map((day) => {
30218
30461
  const dayStart = startOfDay3(day);
30219
30462
  const dayEnd = addDays2(dayStart, 1);
@@ -30257,8 +30500,8 @@ function Scheduler({
30257
30500
  const hasVisibleEvents = dayLayouts.some(
30258
30501
  (layout) => layout.allDay.length > 0 || layout.timed.length > 0
30259
30502
  );
30260
- const [now, setNow] = useState70(() => /* @__PURE__ */ new Date());
30261
- useEffect53(() => {
30503
+ const [now, setNow] = useState71(() => /* @__PURE__ */ new Date());
30504
+ useEffect54(() => {
30262
30505
  if (!showCurrentTime) return;
30263
30506
  const timer = window.setInterval(() => {
30264
30507
  setNow(/* @__PURE__ */ new Date());
@@ -30651,8 +30894,8 @@ function Scheduler({
30651
30894
 
30652
30895
  // gantt/gantt.tsx
30653
30896
  import {
30654
- useMemo as useMemo21,
30655
- useState as useState71
30897
+ useMemo as useMemo22,
30898
+ useState as useState72
30656
30899
  } from "react";
30657
30900
  import { jsx as jsx115, jsxs as jsxs87 } from "react/jsx-runtime";
30658
30901
  function startOfDay4(date) {
@@ -30766,16 +31009,16 @@ function Gantt({
30766
31009
  }) {
30767
31010
  const [partClasses, scopeParts] = usePartClasses("gantt", classNames, true);
30768
31011
  const scaleControlled = scale !== void 0;
30769
- const [internalScale, setInternalScale] = useState71(defaultScale);
31012
+ const [internalScale, setInternalScale] = useState72(defaultScale);
30770
31013
  const resolvedScale = scale ?? internalScale;
30771
31014
  const zoomControlled = zoom !== void 0;
30772
- const [internalZoom, setInternalZoom] = useState71(
31015
+ const [internalZoom, setInternalZoom] = useState72(
30773
31016
  () => clampZoom(defaultZoom)
30774
31017
  );
30775
31018
  const resolvedZoom = clampZoom(
30776
31019
  zoom ?? internalZoom
30777
31020
  );
30778
- const normalised = useMemo21(
31021
+ const normalised = useMemo22(
30779
31022
  () => tasks.map((task) => {
30780
31023
  const taskStart = startOfDay4(task.start);
30781
31024
  let taskEnd = endOfDay(task.end);
@@ -30795,7 +31038,7 @@ function Gantt({
30795
31038
  }),
30796
31039
  [tasks]
30797
31040
  );
30798
- const derivedRange = useMemo21(() => {
31041
+ const derivedRange = useMemo22(() => {
30799
31042
  if (normalised.length === 0) {
30800
31043
  const today2 = startOfDay4(/* @__PURE__ */ new Date());
30801
31044
  return {
@@ -30822,7 +31065,7 @@ function Gantt({
30822
31065
  };
30823
31066
  }, [normalised, resolvedScale]);
30824
31067
  const startControlled = start !== void 0;
30825
- const [internalStart, setInternalStart] = useState71(
31068
+ const [internalStart, setInternalStart] = useState72(
30826
31069
  () => defaultStart ? startOfDay4(defaultStart) : null
30827
31070
  );
30828
31071
  const viewStart = start ? startOfDay4(start) : internalStart ?? derivedRange.start;
@@ -30844,7 +31087,7 @@ function Gantt({
30844
31087
  const rangeEndExclusive = viewEnd.getTime() + 1;
30845
31088
  const rangeLength = rangeEndExclusive - rangeStartTime;
30846
31089
  const totalDays = diffDays(viewStart, viewEnd) + 1;
30847
- const fullDateFormatter = useMemo21(
31090
+ const fullDateFormatter = useMemo22(
30848
31091
  () => new Intl.DateTimeFormat(locale, {
30849
31092
  year: "numeric",
30850
31093
  month: "long",
@@ -30852,20 +31095,20 @@ function Gantt({
30852
31095
  }),
30853
31096
  [locale]
30854
31097
  );
30855
- const shortMonthFormatter = useMemo21(
31098
+ const shortMonthFormatter = useMemo22(
30856
31099
  () => new Intl.DateTimeFormat(locale, {
30857
31100
  month: "short"
30858
31101
  }),
30859
31102
  [locale]
30860
31103
  );
30861
- const longMonthFormatter = useMemo21(
31104
+ const longMonthFormatter = useMemo22(
30862
31105
  () => new Intl.DateTimeFormat(locale, {
30863
31106
  month: "long",
30864
31107
  year: "numeric"
30865
31108
  }),
30866
31109
  [locale]
30867
31110
  );
30868
- const rangeLabel = useMemo21(() => {
31111
+ const rangeLabel = useMemo22(() => {
30869
31112
  if (dayNumber4(viewStart) === dayNumber4(viewEnd)) {
30870
31113
  return fullDateFormatter.format(viewStart);
30871
31114
  }
@@ -30882,7 +31125,7 @@ function Gantt({
30882
31125
  fullDateFormatter,
30883
31126
  shortMonthFormatter
30884
31127
  ]);
30885
- const segments = useMemo21(() => {
31128
+ const segments = useMemo22(() => {
30886
31129
  const result = [];
30887
31130
  if (resolvedScale === "month") {
30888
31131
  let cursor = startOfMonth2(viewStart);
@@ -30942,7 +31185,7 @@ function Gantt({
30942
31185
  shortMonthFormatter,
30943
31186
  fullDateFormatter
30944
31187
  ]);
30945
- const rows = useMemo21(() => {
31188
+ const rows = useMemo22(() => {
30946
31189
  const hasGroups = normalised.some(
30947
31190
  (task) => task.source.group
30948
31191
  );
@@ -30983,7 +31226,7 @@ function Gantt({
30983
31226
  });
30984
31227
  return result;
30985
31228
  }, [normalised]);
30986
- const rowMetrics = useMemo21(() => {
31229
+ const rowMetrics = useMemo22(() => {
30987
31230
  const centers = /* @__PURE__ */ new Map();
30988
31231
  let offset = 0;
30989
31232
  rows.forEach((row) => {
@@ -31001,7 +31244,7 @@ function Gantt({
31001
31244
  totalHeight: offset
31002
31245
  };
31003
31246
  }, [rows]);
31004
- const dependencyLinks = useMemo21(() => {
31247
+ const dependencyLinks = useMemo22(() => {
31005
31248
  if (!showDependencies) return [];
31006
31249
  const byId = new Map(
31007
31250
  normalised.map((task) => [
@@ -31558,12 +31801,12 @@ function Gantt({
31558
31801
 
31559
31802
  // file-manager/file-manager.tsx
31560
31803
  import {
31561
- Fragment as Fragment23,
31562
- useMemo as useMemo22,
31804
+ Fragment as Fragment24,
31805
+ useMemo as useMemo23,
31563
31806
  useRef as useRef64,
31564
- useState as useState72
31807
+ useState as useState73
31565
31808
  } from "react";
31566
- import { Fragment as Fragment24, jsx as jsx116, jsxs as jsxs88 } from "react/jsx-runtime";
31809
+ import { Fragment as Fragment25, jsx as jsx116, jsxs as jsxs88 } from "react/jsx-runtime";
31567
31810
  function buildModel(input) {
31568
31811
  const entries = [];
31569
31812
  const byId = /* @__PURE__ */ new Map();
@@ -31703,42 +31946,42 @@ function EntryIcon({ classNames, kind }) {
31703
31946
  if (kind === "folder") {
31704
31947
  content = /* @__PURE__ */ jsx116("path", { d: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" });
31705
31948
  } else if (kind === "image") {
31706
- content = /* @__PURE__ */ jsxs88(Fragment24, { children: [
31949
+ content = /* @__PURE__ */ jsxs88(Fragment25, { children: [
31707
31950
  /* @__PURE__ */ jsx116("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
31708
31951
  /* @__PURE__ */ jsx116("circle", { cx: "8.5", cy: "10", r: "1.5" }),
31709
31952
  /* @__PURE__ */ jsx116("path", { d: "m21 15-4.5-4.5L9 19" })
31710
31953
  ] });
31711
31954
  } else if (kind === "video") {
31712
- content = /* @__PURE__ */ jsxs88(Fragment24, { children: [
31955
+ content = /* @__PURE__ */ jsxs88(Fragment25, { children: [
31713
31956
  /* @__PURE__ */ jsx116("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
31714
31957
  /* @__PURE__ */ jsx116("path", { d: "m10 9 5 3-5 3z" })
31715
31958
  ] });
31716
31959
  } else if (kind === "audio") {
31717
- content = /* @__PURE__ */ jsxs88(Fragment24, { children: [
31960
+ content = /* @__PURE__ */ jsxs88(Fragment25, { children: [
31718
31961
  /* @__PURE__ */ jsx116("path", { d: "M9 18V5l10-2v13" }),
31719
31962
  /* @__PURE__ */ jsx116("circle", { cx: "6.5", cy: "18", r: "2.5" }),
31720
31963
  /* @__PURE__ */ jsx116("circle", { cx: "16.5", cy: "16", r: "2.5" })
31721
31964
  ] });
31722
31965
  } else if (kind === "archive") {
31723
- content = /* @__PURE__ */ jsxs88(Fragment24, { children: [
31966
+ content = /* @__PURE__ */ jsxs88(Fragment25, { children: [
31724
31967
  /* @__PURE__ */ jsx116("path", { d: "M4 5h16v14H4z" }),
31725
31968
  /* @__PURE__ */ jsx116("path", { d: "M10 5v2m4-2v2m-4 2v2m4-2v2m-4 2v2m4-2v2" })
31726
31969
  ] });
31727
31970
  } else if (kind === "pdf") {
31728
- content = /* @__PURE__ */ jsxs88(Fragment24, { children: [
31971
+ content = /* @__PURE__ */ jsxs88(Fragment25, { children: [
31729
31972
  /* @__PURE__ */ jsx116("path", { d: "M6 3h7l5 5v13H6z" }),
31730
31973
  /* @__PURE__ */ jsx116("path", { d: "M13 3v5h5" }),
31731
31974
  /* @__PURE__ */ jsx116("path", { d: "M9 13h6M9 17h4" })
31732
31975
  ] });
31733
31976
  } else if (kind === "spreadsheet") {
31734
- content = /* @__PURE__ */ jsxs88(Fragment24, { children: [
31977
+ content = /* @__PURE__ */ jsxs88(Fragment25, { children: [
31735
31978
  /* @__PURE__ */ jsx116("rect", { x: "4", y: "4", width: "16", height: "16", rx: "1" }),
31736
31979
  /* @__PURE__ */ jsx116("path", { d: "M4 10h16M4 15h16M10 4v16" })
31737
31980
  ] });
31738
31981
  } else if (kind === "code") {
31739
- content = /* @__PURE__ */ jsx116(Fragment24, { children: /* @__PURE__ */ jsx116("path", { d: "m9 7-5 5 5 5M15 7l5 5-5 5" }) });
31982
+ content = /* @__PURE__ */ jsx116(Fragment25, { children: /* @__PURE__ */ jsx116("path", { d: "m9 7-5 5 5 5M15 7l5 5-5 5" }) });
31740
31983
  } else {
31741
- content = /* @__PURE__ */ jsxs88(Fragment24, { children: [
31984
+ content = /* @__PURE__ */ jsxs88(Fragment25, { children: [
31742
31985
  /* @__PURE__ */ jsx116("path", { d: "M6 3h7l5 5v13H6z" }),
31743
31986
  /* @__PURE__ */ jsx116("path", { d: "M13 3v5h5" }),
31744
31987
  kind === "document" && /* @__PURE__ */ jsx116("path", { d: "M9 13h6M9 17h5" })
@@ -31810,30 +32053,30 @@ function FileManager({
31810
32053
  "aria-label": ariaLabel = "File manager"
31811
32054
  }) {
31812
32055
  const [partClasses, scopeParts] = usePartClasses("file-manager", classNames, true);
31813
- const model = useMemo22(
32056
+ const model = useMemo23(
31814
32057
  () => buildModel(entries),
31815
32058
  [entries]
31816
32059
  );
31817
32060
  const viewControlled = view !== void 0;
31818
- const [internalView, setInternalView] = useState72(defaultView);
32061
+ const [internalView, setInternalView] = useState73(defaultView);
31819
32062
  const resolvedView = view ?? internalView;
31820
32063
  const selectionControlled = selected !== void 0;
31821
- const [internalSelection, setInternalSelection] = useState72(() => [...defaultSelected]);
32064
+ const [internalSelection, setInternalSelection] = useState73(() => [...defaultSelected]);
31822
32065
  const selectedIds = [
31823
32066
  ...selected ?? internalSelection
31824
32067
  ];
31825
32068
  const pathControlled = path !== void 0;
31826
- const [internalPath, setInternalPath] = useState72(() => [...defaultPath]);
32069
+ const [internalPath, setInternalPath] = useState73(() => [...defaultPath]);
31827
32070
  const searchControlled = search !== void 0;
31828
- const [internalSearch, setInternalSearch] = useState72(defaultSearch);
32071
+ const [internalSearch, setInternalSearch] = useState73(defaultSearch);
31829
32072
  const searchValue = search ?? internalSearch;
31830
32073
  const sortControlled = sort !== void 0;
31831
- const [internalSort, setInternalSort] = useState72(defaultSort);
32074
+ const [internalSort, setInternalSort] = useState73(defaultSort);
31832
32075
  const resolvedSort = sort ?? internalSort;
31833
- const [anchorId, setAnchorId] = useState72(null);
31834
- const [focusedId, setFocusedId] = useState72(null);
32076
+ const [anchorId, setAnchorId] = useState73(null);
32077
+ const [focusedId, setFocusedId] = useState73(null);
31835
32078
  const itemsRef = useRef64(null);
31836
- const currentPath = useMemo22(() => {
32079
+ const currentPath = useMemo23(() => {
31837
32080
  const result = [];
31838
32081
  (path ?? internalPath).forEach((id) => {
31839
32082
  const entry = model.byId.get(id);
@@ -31844,11 +32087,11 @@ function FileManager({
31844
32087
  return result;
31845
32088
  }, [model, path, internalPath]);
31846
32089
  const currentFolder = currentPath.length > 0 ? currentPath[currentPath.length - 1] : null;
31847
- const currentItems = useMemo22(
32090
+ const currentItems = useMemo23(
31848
32091
  () => model.children.get(currentFolder?.id ?? "") ?? [],
31849
32092
  [model, currentFolder]
31850
32093
  );
31851
- const visibleEntries = useMemo22(() => {
32094
+ const visibleEntries = useMemo23(() => {
31852
32095
  const term = searchValue.trim().toLocaleLowerCase(locale);
31853
32096
  return currentItems.filter(
31854
32097
  (entry) => term.length === 0 ? true : entry.name.toLocaleLowerCase(locale).includes(term)
@@ -31868,13 +32111,13 @@ function FileManager({
31868
32111
  foldersFirst,
31869
32112
  locale
31870
32113
  ]);
31871
- const selectedEntries = useMemo22(
32114
+ const selectedEntries = useMemo23(
31872
32115
  () => selectedIds.map((id) => model.byId.get(id)).filter(
31873
32116
  (entry) => entry !== void 0
31874
32117
  ),
31875
32118
  [selectedIds, model]
31876
32119
  );
31877
- const modifiedFormatter = useMemo22(
32120
+ const modifiedFormatter = useMemo23(
31878
32121
  () => new Intl.DateTimeFormat(locale, {
31879
32122
  year: "numeric",
31880
32123
  month: "short",
@@ -32174,7 +32417,7 @@ function FileManager({
32174
32417
  }
32175
32418
  ),
32176
32419
  /* @__PURE__ */ jsxs88("div", { className: mergeClasses("pimolu-file-manager__location", partClasses.location), children: [
32177
- /* @__PURE__ */ jsx116(Breadcrumbs, { label: "Breadcrumb", children: currentPath.length === 0 ? /* @__PURE__ */ jsx116(BreadcrumbItem, { children: /* @__PURE__ */ jsx116(BreadcrumbPage, { children: rootLabel }) }) : /* @__PURE__ */ jsxs88(Fragment24, { children: [
32420
+ /* @__PURE__ */ jsx116(Breadcrumbs, { label: "Breadcrumb", children: currentPath.length === 0 ? /* @__PURE__ */ jsx116(BreadcrumbItem, { children: /* @__PURE__ */ jsx116(BreadcrumbPage, { children: rootLabel }) }) : /* @__PURE__ */ jsxs88(Fragment25, { children: [
32178
32421
  /* @__PURE__ */ jsx116(BreadcrumbItem, { children: /* @__PURE__ */ jsx116(
32179
32422
  BreadcrumbLink,
32180
32423
  {
@@ -32188,7 +32431,7 @@ function FileManager({
32188
32431
  ) }),
32189
32432
  currentPath.map((folder, index) => {
32190
32433
  const last = index === currentPath.length - 1;
32191
- return /* @__PURE__ */ jsxs88(Fragment23, { children: [
32434
+ return /* @__PURE__ */ jsxs88(Fragment24, { children: [
32192
32435
  /* @__PURE__ */ jsx116(BreadcrumbSeparator, {}),
32193
32436
  /* @__PURE__ */ jsx116(BreadcrumbItem, { children: last ? /* @__PURE__ */ jsx116(BreadcrumbPage, { children: folder.name }) : /* @__PURE__ */ jsx116(
32194
32437
  BreadcrumbLink,
@@ -32330,7 +32573,7 @@ function FileManager({
32330
32573
 
32331
32574
  // page-header/page-header.tsx
32332
32575
  import {
32333
- Fragment as Fragment25,
32576
+ Fragment as Fragment26,
32334
32577
  forwardRef as forwardRef66
32335
32578
  } from "react";
32336
32579
 
@@ -32394,7 +32637,7 @@ var PageHeader = forwardRef66(function PageHeader2({
32394
32637
  children: [
32395
32638
  hasBreadcrumbs && /* @__PURE__ */ jsx117("div", { className: mergeClasses("pimolu-page-header__breadcrumbs", partClasses.breadcrumbs), children: crumbList !== null ? /* @__PURE__ */ jsx117(Breadcrumbs, { children: crumbList.map((crumb, index) => {
32396
32639
  const current = index === crumbList.length - 1;
32397
- return /* @__PURE__ */ jsxs89(Fragment25, { children: [
32640
+ return /* @__PURE__ */ jsxs89(Fragment26, { children: [
32398
32641
  index > 0 && /* @__PURE__ */ jsx117(BreadcrumbSeparator, {}),
32399
32642
  /* @__PURE__ */ jsx117(BreadcrumbItem, { children: current ? /* @__PURE__ */ jsx117(BreadcrumbPage, { children: crumb.label }) : crumb.href ? /* @__PURE__ */ jsx117(BreadcrumbLink, { href: crumb.href, children: crumb.label }) : /* @__PURE__ */ jsx117("span", { className: mergeClasses("pimolu-page-header__crumb", partClasses.crumb), children: crumb.label }) })
32400
32643
  ] }, index);
@@ -32702,9 +32945,9 @@ TableOfContents.displayName = "PimoluTableOfContents";
32702
32945
 
32703
32946
  // anchor/anchor.tsx
32704
32947
  import {
32705
- useEffect as useEffect54,
32948
+ useEffect as useEffect55,
32706
32949
  useRef as useRef65,
32707
- useState as useState73
32950
+ useState as useState74
32708
32951
  } from "react";
32709
32952
  import { jsx as jsx121, jsxs as jsxs93 } from "react/jsx-runtime";
32710
32953
  function classes34(base, ...extra) {
@@ -32729,9 +32972,9 @@ function Anchor({
32729
32972
  ...props
32730
32973
  }) {
32731
32974
  const [partClasses, scopeParts] = usePartClasses("anchor", classNames, true);
32732
- const [copied, setCopied] = useState73(false);
32975
+ const [copied, setCopied] = useState74(false);
32733
32976
  const feedbackTimer = useRef65(void 0);
32734
- useEffect54(
32977
+ useEffect55(
32735
32978
  () => () => {
32736
32979
  if (feedbackTimer.current !== void 0) {
32737
32980
  clearTimeout(feedbackTimer.current);
@@ -32961,11 +33204,11 @@ ApiTable.displayName = "PimoluApiTable";
32961
33204
 
32962
33205
  // code-block/code-block.tsx
32963
33206
  import {
32964
- Fragment as Fragment26,
33207
+ Fragment as Fragment27,
32965
33208
  forwardRef as forwardRef68,
32966
- useEffect as useEffect55,
32967
- useMemo as useMemo23,
32968
- useState as useState74
33209
+ useEffect as useEffect56,
33210
+ useMemo as useMemo24,
33211
+ useState as useState75
32969
33212
  } from "react";
32970
33213
 
32971
33214
  // code-block/code-block.types.ts
@@ -33599,12 +33842,12 @@ var CodeBlock = forwardRef68(function CodeBlock2({
33599
33842
  ...props
33600
33843
  }, ref) {
33601
33844
  const [partClasses, scopeParts] = usePartClasses("code-block", classNames, true);
33602
- const [copyStatus, setCopyStatus] = useState74("idle");
33603
- const lines = useMemo23(
33845
+ const [copyStatus, setCopyStatus] = useState75("idle");
33846
+ const lines = useMemo24(
33604
33847
  () => tokenizeLines(code, language),
33605
33848
  [code, language]
33606
33849
  );
33607
- const highlighted = useMemo23(
33850
+ const highlighted = useMemo24(
33608
33851
  () => new Set(
33609
33852
  (highlightLines ?? []).filter(
33610
33853
  (line) => Number.isInteger(line) && line > 0
@@ -33612,7 +33855,7 @@ var CodeBlock = forwardRef68(function CodeBlock2({
33612
33855
  ),
33613
33856
  [highlightLines]
33614
33857
  );
33615
- useEffect55(() => {
33858
+ useEffect56(() => {
33616
33859
  if (copyStatus === "idle") return;
33617
33860
  const timer = window.setTimeout(() => {
33618
33861
  setCopyStatus("idle");
@@ -33670,7 +33913,7 @@ var CodeBlock = forwardRef68(function CodeBlock2({
33670
33913
  className: mergeClasses("pimolu-codeblock__pre", partClasses.pre),
33671
33914
  style: preStyle,
33672
33915
  "aria-label": filename ? `${language} code from ${filename}` : `${language} code sample`,
33673
- children: /* @__PURE__ */ jsx124("code", { className: mergeClasses("pimolu-codeblock__code", partClasses.code), children: lines.map((tokens, lineIndex) => /* @__PURE__ */ jsxs95(Fragment26, { children: [
33916
+ children: /* @__PURE__ */ jsx124("code", { className: mergeClasses("pimolu-codeblock__code", partClasses.code), children: lines.map((tokens, lineIndex) => /* @__PURE__ */ jsxs95(Fragment27, { children: [
33674
33917
  /* @__PURE__ */ jsxs95(
33675
33918
  "span",
33676
33919
  {
@@ -33722,7 +33965,7 @@ CodeBlock.displayName = "PimoluCodeBlock";
33722
33965
  import {
33723
33966
  forwardRef as forwardRef69,
33724
33967
  useRef as useRef66,
33725
- useState as useState75
33968
+ useState as useState76
33726
33969
  } from "react";
33727
33970
 
33728
33971
  // search-input/search-input.types.ts
@@ -33778,7 +34021,7 @@ var SearchInput = forwardRef69(function SearchInput2({
33778
34021
  const [partClasses, scopeParts] = usePartClasses("search-input", classNames, true);
33779
34022
  const inputRef = useRef66(null);
33780
34023
  const isControlled = value !== void 0;
33781
- const [internalValue, setInternalValue] = useState75(
34024
+ const [internalValue, setInternalValue] = useState76(
33782
34025
  () => defaultValue ?? ""
33783
34026
  );
33784
34027
  const currentValue = isControlled ? value : internalValue;
@@ -33861,10 +34104,10 @@ SearchInput.displayName = "PimoluSearchInput";
33861
34104
  // theme-builder/theme-builder.tsx
33862
34105
  import {
33863
34106
  forwardRef as forwardRef70,
33864
- useEffect as useEffect56,
34107
+ useEffect as useEffect57,
33865
34108
  useId as useId62,
33866
34109
  useRef as useRef67,
33867
- useState as useState76
34110
+ useState as useState77
33868
34111
  } from "react";
33869
34112
 
33870
34113
  // theme-builder/theme-builder.types.ts
@@ -33883,7 +34126,7 @@ var DEFAULT_THEME_BUILDER_BRAND_COLOR = "#5B55E7";
33883
34126
  // theme-builder/theme-builder.tsx
33884
34127
  import { jsx as jsx126, jsxs as jsxs97 } from "react/jsx-runtime";
33885
34128
  function useControllableState(controlled, defaultValue) {
33886
- const [internalValue, setInternalValue] = useState76(defaultValue);
34129
+ const [internalValue, setInternalValue] = useState77(defaultValue);
33887
34130
  const isControlled = controlled !== void 0;
33888
34131
  return {
33889
34132
  value: isControlled ? controlled : internalValue,
@@ -34008,7 +34251,7 @@ var ThemeBuilder = forwardRef70(function ThemeBuilder2({
34008
34251
  const selectedPreset = presets.find(
34009
34252
  (entry) => entry.id === presetId
34010
34253
  );
34011
- useEffect56(() => {
34254
+ useEffect57(() => {
34012
34255
  if (presetState.isControlled) return;
34013
34256
  if (presets.some((entry) => entry.id === presetId)) {
34014
34257
  return;
@@ -34455,15 +34698,15 @@ SplitButton.displayName = "PimoluSplitButton";
34455
34698
  // password-input/password-input.tsx
34456
34699
  import {
34457
34700
  forwardRef as forwardRef73,
34458
- useCallback as useCallback32,
34459
- useEffect as useEffect57,
34701
+ useCallback as useCallback33,
34702
+ useEffect as useEffect58,
34460
34703
  useId as useId63,
34461
- useLayoutEffect as useLayoutEffect6,
34704
+ useLayoutEffect as useLayoutEffect7,
34462
34705
  useRef as useRef68,
34463
- useState as useState77
34706
+ useState as useState78
34464
34707
  } from "react";
34465
- import { Fragment as Fragment27, jsx as jsx129, jsxs as jsxs99 } from "react/jsx-runtime";
34466
- var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? useLayoutEffect6 : useEffect57;
34708
+ import { Fragment as Fragment28, jsx as jsx129, jsxs as jsxs99 } from "react/jsx-runtime";
34709
+ var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? useLayoutEffect7 : useEffect58;
34467
34710
  function VisibilityIcon({
34468
34711
  visible
34469
34712
  }) {
@@ -34479,12 +34722,12 @@ function VisibilityIcon({
34479
34722
  strokeWidth: "1.8",
34480
34723
  strokeLinecap: "round",
34481
34724
  strokeLinejoin: "round",
34482
- children: visible ? /* @__PURE__ */ jsxs99(Fragment27, { children: [
34725
+ children: visible ? /* @__PURE__ */ jsxs99(Fragment28, { children: [
34483
34726
  /* @__PURE__ */ jsx129("path", { d: "M3 3l18 18" }),
34484
34727
  /* @__PURE__ */ jsx129("path", { d: "M10.6 5.2A11.6 11.6 0 0 1 12 5c5 0 9.3 3.2 10 7a10.5 10.5 0 0 1-3.4 5.6" }),
34485
34728
  /* @__PURE__ */ jsx129("path", { d: "M6.3 6.3A10.9 10.9 0 0 0 2 12c.7 3.8 5 7 10 7a10 10 0 0 0 4.2-.9" }),
34486
34729
  /* @__PURE__ */ jsx129("path", { d: "M9.9 9.9a3 3 0 0 0 4.2 4.2" })
34487
- ] }) : /* @__PURE__ */ jsxs99(Fragment27, { children: [
34730
+ ] }) : /* @__PURE__ */ jsxs99(Fragment28, { children: [
34488
34731
  /* @__PURE__ */ jsx129("path", { d: "M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12Z" }),
34489
34732
  /* @__PURE__ */ jsx129("circle", { cx: "12", cy: "12", r: "3" })
34490
34733
  ] })
@@ -34524,8 +34767,8 @@ var PasswordInput = forwardRef73(function PasswordInput2({
34524
34767
  null
34525
34768
  );
34526
34769
  const isControlled = value !== void 0;
34527
- const [visible, setVisible] = useState77(false);
34528
- const setInputRef = useCallback32(
34770
+ const [visible, setVisible] = useState78(false);
34771
+ const setInputRef = useCallback33(
34529
34772
  (node) => {
34530
34773
  inputRef.current = node;
34531
34774
  if (typeof forwardedRef === "function") {
@@ -34799,11 +35042,11 @@ InputGroupButton.displayName = "PimoluInputGroupButton";
34799
35042
  // tree-select/tree-select.tsx
34800
35043
  import {
34801
35044
  forwardRef as forwardRef75,
34802
- useCallback as useCallback33,
34803
- useEffect as useEffect58,
35045
+ useCallback as useCallback34,
35046
+ useEffect as useEffect59,
34804
35047
  useId as useId64,
34805
35048
  useRef as useRef69,
34806
- useState as useState78
35049
+ useState as useState79
34807
35050
  } from "react";
34808
35051
  import { jsx as jsx131, jsxs as jsxs100 } from "react/jsx-runtime";
34809
35052
  function flattenTree(options, isExpanded, forceExpand = false, level = 1, path = []) {
@@ -34910,7 +35153,7 @@ var TreeSelect = forwardRef75(function TreeSelect2({
34910
35153
  text: "",
34911
35154
  time: 0
34912
35155
  });
34913
- const assignRef = useCallback33(
35156
+ const assignRef = useCallback34(
34914
35157
  (node) => {
34915
35158
  triggerRef.current = node;
34916
35159
  if (typeof forwardedRef === "function") {
@@ -34922,12 +35165,12 @@ var TreeSelect = forwardRef75(function TreeSelect2({
34922
35165
  [forwardedRef]
34923
35166
  );
34924
35167
  const isControlled = value !== void 0;
34925
- const [internalValue, setInternalValue] = useState78(defaultValue);
35168
+ const [internalValue, setInternalValue] = useState79(defaultValue);
34926
35169
  const currentValue = isControlled ? value : internalValue;
34927
- const [isOpen, setIsOpen] = useState78(false);
34928
- const [query, setQuery] = useState78("");
34929
- const [activeValue, setActiveValue] = useState78(null);
34930
- const [expandedValues, setExpandedValues] = useState78(() => {
35170
+ const [isOpen, setIsOpen] = useState79(false);
35171
+ const [query, setQuery] = useState79("");
35172
+ const [activeValue, setActiveValue] = useState79(null);
35173
+ const [expandedValues, setExpandedValues] = useState79(() => {
34931
35174
  const path = defaultValue !== void 0 ? findPath(options, defaultValue) : null;
34932
35175
  return new Set(path?.slice(0, -1) ?? []);
34933
35176
  });
@@ -34947,7 +35190,7 @@ var TreeSelect = forwardRef75(function TreeSelect2({
34947
35190
  (node) => node.option.value === activeValue
34948
35191
  );
34949
35192
  const activeNode = activeIndex >= 0 ? visibleNodes[activeIndex] : void 0;
34950
- const closePanel = useCallback33(
35193
+ const closePanel = useCallback34(
34951
35194
  (restoreFocus = false) => {
34952
35195
  setIsOpen(false);
34953
35196
  setQuery("");
@@ -34959,7 +35202,7 @@ var TreeSelect = forwardRef75(function TreeSelect2({
34959
35202
  },
34960
35203
  []
34961
35204
  );
34962
- const openPanel = useCallback33(() => {
35205
+ const openPanel = useCallback34(() => {
34963
35206
  if (disabled) return;
34964
35207
  typeaheadRef.current = { text: "", time: 0 };
34965
35208
  const path = currentValue !== void 0 ? findPath(options, currentValue) : null;
@@ -35174,7 +35417,7 @@ var TreeSelect = forwardRef75(function TreeSelect2({
35174
35417
  onDismiss: () => closePanel(false),
35175
35418
  closeOnEscape: false
35176
35419
  });
35177
- useEffect58(() => {
35420
+ useEffect59(() => {
35178
35421
  if (!isOpen || !activeValue) return;
35179
35422
  panelRef.current?.querySelector(
35180
35423
  '[data-active="true"]'
@@ -35451,15 +35694,15 @@ TreeSelect.displayName = "PimoluTreeSelect";
35451
35694
  // signature/signature.tsx
35452
35695
  import {
35453
35696
  forwardRef as forwardRef76,
35454
- useCallback as useCallback34,
35455
- useEffect as useEffect59,
35697
+ useCallback as useCallback35,
35698
+ useEffect as useEffect60,
35456
35699
  useId as useId65,
35457
- useLayoutEffect as useLayoutEffect7,
35700
+ useLayoutEffect as useLayoutEffect8,
35458
35701
  useRef as useRef70,
35459
- useState as useState79
35702
+ useState as useState80
35460
35703
  } from "react";
35461
35704
  import { jsx as jsx132, jsxs as jsxs101 } from "react/jsx-runtime";
35462
- var useIsomorphicLayoutEffect3 = typeof window !== "undefined" ? useLayoutEffect7 : useEffect59;
35705
+ var useIsomorphicLayoutEffect3 = typeof window !== "undefined" ? useLayoutEffect8 : useEffect60;
35463
35706
  function clamp14(value, min, max) {
35464
35707
  return Math.min(Math.max(value, min), max);
35465
35708
  }
@@ -35575,7 +35818,7 @@ var Signature = forwardRef76(function Signature2({
35575
35818
  defaultValue ?? null
35576
35819
  );
35577
35820
  const lastEmittedRef = useRef70(void 0);
35578
- const assignRef = useCallback34(
35821
+ const assignRef = useCallback35(
35579
35822
  (node) => {
35580
35823
  canvasRef.current = node;
35581
35824
  if (typeof forwardedRef === "function") {
@@ -35587,15 +35830,15 @@ var Signature = forwardRef76(function Signature2({
35587
35830
  [forwardedRef]
35588
35831
  );
35589
35832
  const isControlled = value !== void 0;
35590
- const [internalValue, setInternalValue] = useState79(defaultValue ?? null);
35591
- const [history, setHistory] = useState79(() => [defaultValue ?? null]);
35592
- const [hasInk, setHasInk] = useState79(
35833
+ const [internalValue, setInternalValue] = useState80(defaultValue ?? null);
35834
+ const [history, setHistory] = useState80(() => [defaultValue ?? null]);
35835
+ const [hasInk, setHasInk] = useState80(
35593
35836
  Boolean(defaultValue)
35594
35837
  );
35595
- const [revision, setRevision] = useState79(0);
35596
- const [pixelRatio, setPixelRatio] = useState79(1);
35838
+ const [revision, setRevision] = useState80(0);
35839
+ const [pixelRatio, setPixelRatio] = useState80(1);
35597
35840
  const currentValue = isControlled ? value ?? null : internalValue;
35598
- useEffect59(() => {
35841
+ useEffect60(() => {
35599
35842
  if (typeof window === "undefined") return;
35600
35843
  const ratio = Number(window.devicePixelRatio);
35601
35844
  if (!Number.isFinite(ratio) || ratio <= 0) return;
@@ -35619,7 +35862,7 @@ var Signature = forwardRef76(function Signature2({
35619
35862
  canvas.height = nextHeight;
35620
35863
  }
35621
35864
  }, [safeWidth, safeHeight, pixelRatio]);
35622
- useEffect59(() => {
35865
+ useEffect60(() => {
35623
35866
  const canvas = canvasRef.current;
35624
35867
  if (!canvas) return;
35625
35868
  const context = getContext(canvas);
@@ -35673,7 +35916,7 @@ var Signature = forwardRef76(function Signature2({
35673
35916
  currentValue,
35674
35917
  revision
35675
35918
  ]);
35676
- useEffect59(() => {
35919
+ useEffect60(() => {
35677
35920
  if (!isControlled) return;
35678
35921
  const next = value ?? null;
35679
35922
  if (next === lastEmittedRef.current) return;
@@ -36579,6 +36822,7 @@ export {
36579
36822
  toastVariantMap,
36580
36823
  toggleVariantMap,
36581
36824
  typographyVariantMap,
36825
+ updateToast,
36582
36826
  useForm,
36583
36827
  usePimoluTheme,
36584
36828
  useToast,