@vuu-ui/vuu-ui-controls 0.8.24-debug → 0.8.25-debug

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/esm/index.js CHANGED
@@ -1,19 +1,13 @@
1
1
  // src/calendar/Calendar.tsx
2
- import { forwardRef as forwardRef14, useCallback as useCallback32 } from "react";
2
+ import { forwardRef as forwardRef15, useCallback as useCallback32 } from "react";
3
3
  import { clsx as clsx6 } from "clsx";
4
4
  import { makePrefixer as makePrefixer8 } from "@salt-ds/core";
5
5
 
6
6
  // src/calendar/internal/CalendarNavigation.tsx
7
- import {
8
- Button as Button2,
9
- makePrefixer as makePrefixer2,
10
- Tooltip,
11
- useId as useId5
12
- } from "@salt-ds/core";
13
- import { ChevronLeftIcon, ChevronRightIcon } from "@salt-ds/icons";
7
+ import { makePrefixer as makePrefixer2, Tooltip, useId as useId5 } from "@salt-ds/core";
14
8
  import { clsx } from "clsx";
15
9
  import {
16
- forwardRef as forwardRef9
10
+ forwardRef as forwardRef10
17
11
  } from "react";
18
12
 
19
13
  // src/dropdown/DropdownBase.tsx
@@ -810,8 +804,24 @@ var useStateRef = (initialValue) => {
810
804
  };
811
805
 
812
806
  // src/dropdown/useClickAway.ts
807
+ import { queryClosest } from "@vuu-ui/vuu-utils";
813
808
  import { useEffect as useEffect3, useRef as useRef5 } from "react";
814
809
  var NO_HANDLERS = [];
810
+ var targetWithinSubPopup = (source, target) => {
811
+ if (source === null) {
812
+ return false;
813
+ }
814
+ const sourcePortal = queryClosest(source, ".vuuPortal");
815
+ const targetPortal = queryClosest(target, ".vuuPortal");
816
+ if (sourcePortal && targetPortal) {
817
+ const targetWithId = targetPortal.querySelector("[id]");
818
+ const targetOwner = sourcePortal.querySelector(
819
+ `[aria-owns="${targetWithId == null ? void 0 : targetWithId.id}"]`
820
+ );
821
+ return targetOwner !== null;
822
+ }
823
+ return false;
824
+ };
815
825
  var useClickAway = ({
816
826
  popperRef,
817
827
  rootRef,
@@ -826,9 +836,12 @@ var useClickAway = ({
826
836
  const [clickHandler, escapeKeyHandler] = isOpen ? [
827
837
  (evt) => {
828
838
  var _a2, _b;
839
+ console.log("click away");
829
840
  const targetElement = evt.target;
830
841
  if (!((_a2 = popperRef.current) == null ? void 0 : _a2.contains(targetElement)) && !((_b = rootRef.current) == null ? void 0 : _b.contains(targetElement))) {
831
- onClose("click-away");
842
+ if (!targetWithinSubPopup(popperRef.current, targetElement)) {
843
+ onClose("click-away");
844
+ }
832
845
  }
833
846
  },
834
847
  (e) => {
@@ -2104,7 +2117,7 @@ var CheckboxIcon = ({
2104
2117
  // src/list/ListItem.tsx
2105
2118
  import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
2106
2119
  var classBase4 = "vuuListItem";
2107
- var ListItemProxy = forwardRef3(function ListItemNextProxy({
2120
+ var ListItemProxy = forwardRef3(function ListItemProxy2({
2108
2121
  height,
2109
2122
  ...htmlAttributes
2110
2123
  }, forwardedRef) {
@@ -2463,9 +2476,7 @@ import {
2463
2476
  import { PopupMenu } from "@vuu-ui/vuu-popups";
2464
2477
  import { asReactElements, useId as useId2 } from "@vuu-ui/vuu-utils";
2465
2478
  import cx5 from "clsx";
2466
- import React2, {
2467
- forwardRef as forwardRef4
2468
- } from "react";
2479
+ import React2, { forwardRef as forwardRef4 } from "react";
2469
2480
 
2470
2481
  // src/overflow-container/useOverflowContainer.ts
2471
2482
  import {
@@ -2505,7 +2516,7 @@ var sortByScreenOrder = (elements) => elements.sort((e1, e2) => {
2505
2516
  return parseInt(idx1) > parseInt(idx2) ? 1 : -1;
2506
2517
  });
2507
2518
  var NO_WRAPPED_ITEMS = [];
2508
- var getNonWrappedAndWrappedItems = (container, orientation = "horizontal") => {
2519
+ var getNonWrappedAndWrappedItems = (container, orientation) => {
2509
2520
  const nonWrappedItems = [];
2510
2521
  const wrappedItems = [];
2511
2522
  let currentPosition = -1;
@@ -2536,9 +2547,9 @@ var getNonWrappedAndWrappedItems = (container, orientation = "horizontal") => {
2536
2547
  }
2537
2548
  return [nonWrappedItems, wrappedItems];
2538
2549
  };
2539
- var applyOverflowClassToWrappedItems = (container, overflowedItems, classBase26) => {
2550
+ var applyOverflowClassToWrappedItems = (container, overflowedItems, classBase30) => {
2540
2551
  let ignoreOverflow = false;
2541
- const className = classBase26 ? `${classBase26}-overflowed` : "overflow";
2552
+ const className = classBase30 ? `${classBase30}-overflowed` : "overflow";
2542
2553
  if (overflowedItems.find(({ index }) => index === "overflow")) {
2543
2554
  if (overflowedItems.length === 1) {
2544
2555
  ignoreOverflow = true;
@@ -2589,22 +2600,23 @@ var highPriorityItemsHaveWrappedButShouldNotHave = (nonWrappedItems, wrappedItem
2589
2600
  return wrappedItems.length > 1 && ((_a2 = wrappedItems.at(-1)) == null ? void 0 : _a2.index) === "overflow";
2590
2601
  }
2591
2602
  };
2592
- var correctForWrappedOverflowIndicator = (container, overflowedItems) => new Promise((resolve) => {
2603
+ var correctForWrappedOverflowIndicator = (container, overflowedItems, orientation) => new Promise((resolve) => {
2593
2604
  requestAnimationFrame(() => {
2594
- const [, o2] = getNonWrappedAndWrappedItems(container);
2605
+ const [, o2] = getNonWrappedAndWrappedItems(container, orientation);
2595
2606
  const newlyOverflowed = getNewItems(overflowedItems, o2);
2596
2607
  newlyOverflowed.forEach((item) => markElementAsWrapped(container, item));
2597
2608
  resolve(o2);
2598
2609
  });
2599
2610
  });
2600
- var correctForWrappedHighPriorityItems = (container, nonWrapped, wrapped) => new Promise((resolve) => {
2611
+ var correctForWrappedHighPriorityItems = (container, nonWrapped, wrapped, orientation) => new Promise((resolve) => {
2601
2612
  requestAnimationFrame(() => {
2602
- const [, o2] = getNonWrappedAndWrappedItems(container);
2613
+ const [, o2] = getNonWrappedAndWrappedItems(container, orientation);
2603
2614
  const highPriorityWrappedItem = getHighestPriorityItem(o2);
2604
2615
  if (highPriorityWrappedItem) {
2605
2616
  const [nonWrappedItems, wrappedItems] = switchWrappedItemIntoView(
2606
2617
  container,
2607
- highPriorityWrappedItem
2618
+ highPriorityWrappedItem,
2619
+ orientation
2608
2620
  );
2609
2621
  resolve([nonWrappedItems, wrappedItems]);
2610
2622
  } else {
@@ -2645,23 +2657,41 @@ var unmarkItemsWhichAreNoLongerWrapped = (container, wrappedItems) => {
2645
2657
  };
2646
2658
  var getOverflowIndicator = (container) => container.querySelector('[data-index="overflow"]');
2647
2659
  var getOverflowedItem = (container) => container.querySelector(".wrapped");
2648
- var getElementWidth = (el) => parseInt(getComputedStyle(el).getPropertyValue("width"));
2649
- var getAvailableSpace = (container, overflowIndicator) => {
2650
- const { right: containerRight } = container.getBoundingClientRect();
2651
- const paddingRight = parseInt(
2652
- getComputedStyle(container).getPropertyValue("padding-right")
2653
- );
2654
- const { right: indicatorRight } = overflowIndicator.getBoundingClientRect();
2655
- return containerRight - paddingRight - indicatorRight;
2660
+ var getElementSize = (el, sizeProperty) => {
2661
+ const size = parseInt(getComputedStyle(el).getPropertyValue(sizeProperty));
2662
+ const margin = sizeProperty === "width" ? parseInt(getComputedStyle(el).getPropertyValue("margin-left")) + parseInt(getComputedStyle(el).getPropertyValue("margin-right")) : parseInt(getComputedStyle(el).getPropertyValue("margin-top")) + parseInt(getComputedStyle(el).getPropertyValue("margin-bottom"));
2663
+ return size + margin;
2664
+ };
2665
+ var getAvailableSpace = (container, overflowIndicator, orientation) => {
2666
+ if (orientation === "horizontal") {
2667
+ const { right: containerRight } = container.getBoundingClientRect();
2668
+ const paddingRight = parseInt(
2669
+ getComputedStyle(container).getPropertyValue("padding-right")
2670
+ );
2671
+ const { right: indicatorRight } = overflowIndicator.getBoundingClientRect();
2672
+ return containerRight - paddingRight - indicatorRight;
2673
+ } else {
2674
+ const { bottom: containerBottom } = container.getBoundingClientRect();
2675
+ const paddingBottom = parseInt(
2676
+ getComputedStyle(container).getPropertyValue("padding-bottom")
2677
+ );
2678
+ const { bottom: indicatorBottom } = overflowIndicator.getBoundingClientRect();
2679
+ return containerBottom - paddingBottom - indicatorBottom;
2680
+ }
2656
2681
  };
2657
- var removeOverflowIndicatorIfNoLongerNeeded = (container) => {
2682
+ var removeOverflowIndicatorIfNoLongerNeeded = (container, orientation) => {
2683
+ const sizeProperty = orientation === "horizontal" ? "width" : "height";
2658
2684
  const overflowIndicator = getOverflowIndicator(container);
2659
- const availableSpace = getAvailableSpace(container, overflowIndicator);
2660
- const indicatorWidth = getElementWidth(overflowIndicator);
2685
+ const availableSpace = getAvailableSpace(
2686
+ container,
2687
+ overflowIndicator,
2688
+ orientation
2689
+ );
2690
+ const indicatorWidth = getElementSize(overflowIndicator, sizeProperty);
2661
2691
  const overflowedItem = getOverflowedItem(container);
2662
- const overflowWidth = getElementWidth(overflowedItem);
2692
+ const overflowWidth = getElementSize(overflowedItem, sizeProperty);
2663
2693
  if (overflowWidth <= availableSpace + indicatorWidth) {
2664
- container.classList.remove("overflowed");
2694
+ container.classList.remove("vuuOverflowContainer-wrapContainer-overflowed");
2665
2695
  overflowedItem.classList.remove("wrapped");
2666
2696
  return true;
2667
2697
  }
@@ -2685,7 +2715,7 @@ var byPriorityDescending = (h1, h2) => {
2685
2715
  var getNonwrappedItemsByPriority = (container) => Array.from(container.querySelectorAll(NON_WRAPPED_ITEM)).sort(
2686
2716
  byPriorityDescending
2687
2717
  );
2688
- var switchWrappedItemIntoView = (container, overflowItem) => {
2718
+ var switchWrappedItemIntoView = (container, overflowItem, orientation) => {
2689
2719
  const unwrappedItems = getNonwrappedItemsByPriority(container);
2690
2720
  const targetElement = getElementByDataIndex3(
2691
2721
  container,
@@ -2694,10 +2724,11 @@ var switchWrappedItemIntoView = (container, overflowItem) => {
2694
2724
  );
2695
2725
  let pos = -1;
2696
2726
  let unwrappedItem = unwrappedItems.at(pos);
2697
- const itemWidth = getElementWidth(unwrappedItem);
2698
- const targetWidth = getElementWidth(targetElement);
2727
+ const sizeProperty = orientation === "horizontal" ? "width" : "height";
2728
+ const itemWidth = getElementSize(unwrappedItem, sizeProperty);
2729
+ const targetWidth = getElementSize(targetElement, sizeProperty);
2699
2730
  const overflowIndicator = getOverflowIndicator(container);
2700
- let availableSpace = getAvailableSpace(container, overflowIndicator) + itemWidth;
2731
+ let availableSpace = getAvailableSpace(container, overflowIndicator, orientation) + itemWidth;
2701
2732
  if (availableSpace >= targetWidth) {
2702
2733
  switchWrapOnElements(targetElement, unwrappedItem);
2703
2734
  } else {
@@ -2717,7 +2748,10 @@ var switchWrappedItemIntoView = (container, overflowItem) => {
2717
2748
  item.classList.add("wrapped");
2718
2749
  });
2719
2750
  }
2720
- const [nonWrappedItems, wrappedItems] = getNonWrappedAndWrappedItems(container);
2751
+ const [nonWrappedItems, wrappedItems] = getNonWrappedAndWrappedItems(
2752
+ container,
2753
+ orientation
2754
+ );
2721
2755
  unmarkItemsWhichAreNoLongerWrapped(container, wrappedItems);
2722
2756
  return [nonWrappedItems, wrappedItems];
2723
2757
  };
@@ -2735,7 +2769,7 @@ var useOverflowContainer = ({
2735
2769
  itemCount,
2736
2770
  onMoveItem,
2737
2771
  onSwitchWrappedItemIntoView,
2738
- orientation = "horizontal"
2772
+ orientation
2739
2773
  }) => {
2740
2774
  const [container, setContainer] = useState6(null);
2741
2775
  const wrappedItemsRef = useRef13(NO_WRAPPED_ITEMS);
@@ -2758,17 +2792,22 @@ var useOverflowContainer = ({
2758
2792
  "vuuOverflowContainer-wrapContainer"
2759
2793
  );
2760
2794
  if (overflowIndicatorHasWrappedButShouldNotHave(wrapped)) {
2761
- wrapped = await correctForWrappedOverflowIndicator(container, wrapped);
2795
+ wrapped = await correctForWrappedOverflowIndicator(
2796
+ container,
2797
+ wrapped,
2798
+ orientation
2799
+ );
2762
2800
  }
2763
2801
  while (highPriorityItemsHaveWrappedButShouldNotHave(nonWrapped, wrapped)) {
2764
2802
  [nonWrapped, wrapped] = await correctForWrappedHighPriorityItems(
2765
2803
  container,
2766
2804
  nonWrapped,
2767
- wrapped
2805
+ wrapped,
2806
+ orientation
2768
2807
  );
2769
2808
  }
2770
2809
  if (wrapped.length === 1) {
2771
- if (removeOverflowIndicatorIfNoLongerNeeded(container)) {
2810
+ if (removeOverflowIndicatorIfNoLongerNeeded(container, orientation)) {
2772
2811
  wrapped = NO_WRAPPED_ITEMS;
2773
2812
  }
2774
2813
  }
@@ -2799,7 +2838,8 @@ var useOverflowContainer = ({
2799
2838
  if (container && hasOverflowItem(options)) {
2800
2839
  const [, wrappedItems] = switchWrappedItemIntoView(
2801
2840
  container,
2802
- options.overflowItem
2841
+ options.overflowItem,
2842
+ orientation
2803
2843
  );
2804
2844
  wrappedItemsRef.current = wrappedItems;
2805
2845
  onSwitchWrappedItemIntoView == null ? void 0 : onSwitchWrappedItemIntoView(options.overflowItem);
@@ -2807,7 +2847,7 @@ var useOverflowContainer = ({
2807
2847
  return true;
2808
2848
  }
2809
2849
  ];
2810
- }, [container, onSwitchWrappedItemIntoView]);
2850
+ }, [container, onSwitchWrappedItemIntoView, orientation]);
2811
2851
  const resizeObserver3 = useMemo5(() => {
2812
2852
  const { sizeProp } = MEASURES[orientation];
2813
2853
  let currentSize = 0;
@@ -2866,12 +2906,10 @@ var WrapContainer = React2.memo(
2866
2906
  PopupMenuProps: PopupMenuProps3,
2867
2907
  allowDragDrop,
2868
2908
  children,
2869
- className: classNameProp,
2870
- height: heightProp,
2871
2909
  id,
2872
2910
  onMoveItem,
2873
2911
  onSwitchWrappedItemIntoView,
2874
- orientation = "horizontal",
2912
+ orientation,
2875
2913
  overflowIcon
2876
2914
  }) => {
2877
2915
  const childElements = asReactElements(children);
@@ -2889,14 +2927,6 @@ var WrapContainer = React2.memo(
2889
2927
  onSwitchWrappedItemIntoView,
2890
2928
  orientation
2891
2929
  });
2892
- const height = orientation === "vertical" ? "100%" : `${heightProp}px`;
2893
- const style = {
2894
- "--overflow-container-height": `${height}`
2895
- };
2896
- const className = cx5(`${classBase5}-wrapContainer`, classNameProp, {
2897
- [`${classBase5}-horizontal`]: orientation === "horizontal",
2898
- [`${classBase5}-vertical`]: orientation === "vertical"
2899
- });
2900
2930
  const content = childElements.map((childEl, i) => {
2901
2931
  const {
2902
2932
  "data-align": align,
@@ -2930,6 +2960,7 @@ var WrapContainer = React2.memo(
2930
2960
  PopupMenu,
2931
2961
  {
2932
2962
  ...PopupMenuProps3,
2963
+ "data-embedded": true,
2933
2964
  icon: overflowIcon,
2934
2965
  menuBuilder,
2935
2966
  menuActionHandler,
@@ -2940,7 +2971,7 @@ var WrapContainer = React2.memo(
2940
2971
  "overflow"
2941
2972
  );
2942
2973
  content.push(overflowIndicator);
2943
- return /* @__PURE__ */ jsxs4("div", { className, ref: rootRef, style, children: [
2974
+ return /* @__PURE__ */ jsxs4("div", { className: cx5(`${classBase5}-wrapContainer`), ref: rootRef, children: [
2944
2975
  content,
2945
2976
  draggable
2946
2977
  ] });
@@ -2952,11 +2983,10 @@ var OverflowContainer = forwardRef4(function OverflowContainer2({
2952
2983
  allowDragDrop = false,
2953
2984
  children,
2954
2985
  className,
2955
- height = 44,
2956
2986
  id: idProp,
2957
2987
  onMoveItem,
2958
2988
  onSwitchWrappedItemIntoView,
2959
- orientation,
2989
+ orientation = "horizontal",
2960
2990
  overflowIcon,
2961
2991
  overflowPosition,
2962
2992
  ...htmlAttributes
@@ -2966,7 +2996,12 @@ var OverflowContainer = forwardRef4(function OverflowContainer2({
2966
2996
  "div",
2967
2997
  {
2968
2998
  ...htmlAttributes,
2969
- className: cx5(cx5(className, classBase5)),
2999
+ className: cx5(
3000
+ cx5(className, classBase5, {
3001
+ "vuuOrientation-horizontal": orientation === "horizontal",
3002
+ "vuuOrientation-vertical": orientation === "vertical"
3003
+ })
3004
+ ),
2970
3005
  id,
2971
3006
  ref: forwardedRef,
2972
3007
  children: /* @__PURE__ */ jsx8(
@@ -2974,7 +3009,6 @@ var OverflowContainer = forwardRef4(function OverflowContainer2({
2974
3009
  {
2975
3010
  PopupMenuProps: PopupMenuProps3,
2976
3011
  allowDragDrop,
2977
- height,
2978
3012
  id,
2979
3013
  orientation,
2980
3014
  overflowIcon,
@@ -5640,7 +5674,14 @@ var List = forwardRef7(function List2({
5640
5674
  style: { ...styleProp, ...sizeStyles },
5641
5675
  tabIndex: listDisabled || disableFocus ? void 0 : tabIndex,
5642
5676
  children: [
5643
- /* @__PURE__ */ jsx13(ListItemProxy, { ref: rowHeightProxyRef, height: itemHeightProp }),
5677
+ /* @__PURE__ */ jsx13(
5678
+ ListItemProxy,
5679
+ {
5680
+ ref: rowHeightProxyRef,
5681
+ height: itemHeightProp
5682
+ },
5683
+ "canary"
5684
+ ),
5644
5685
  collectionHook.data.length === 0 && ListPlaceholder !== void 0 ? /* @__PURE__ */ jsx13(Fragment2, { children: /* @__PURE__ */ jsx13(ListPlaceholder, {}) }) : /* @__PURE__ */ jsx13("div", { className: `${classBase6}-viewport`, onScroll: onVerticalScroll, children: /* @__PURE__ */ jsxs5(
5645
5686
  "div",
5646
5687
  {
@@ -7793,8 +7834,44 @@ function monthDiff(a, b) {
7793
7834
  return b.month - a.month + 12 * (b.year - a.year);
7794
7835
  }
7795
7836
 
7837
+ // src/icon-button/Icon.tsx
7838
+ import cx10 from "clsx";
7839
+ import { jsx as jsx16 } from "react/jsx-runtime";
7840
+ var classBase8 = "vuuIcon";
7841
+ var Icon = ({
7842
+ className,
7843
+ name,
7844
+ size,
7845
+ style: styleProp,
7846
+ ...htmlAttributes
7847
+ }) => {
7848
+ const style = typeof size === "number" ? { ...styleProp, "--vuu-icon-size": `${size}px` } : styleProp;
7849
+ return /* @__PURE__ */ jsx16(
7850
+ "span",
7851
+ {
7852
+ ...htmlAttributes,
7853
+ className: cx10(classBase8, className),
7854
+ "data-icon": name,
7855
+ role: "img",
7856
+ style
7857
+ }
7858
+ );
7859
+ };
7860
+
7861
+ // src/icon-button/IconButton.tsx
7862
+ import cx11 from "clsx";
7863
+ import { Button as Button2 } from "@salt-ds/core";
7864
+ import { forwardRef as forwardRef9 } from "react";
7865
+ import { jsx as jsx17 } from "react/jsx-runtime";
7866
+ var classBase9 = "vuuIconButton";
7867
+ var IconButton = forwardRef9(
7868
+ function IconButton2({ "aria-label": ariaLabel, className, icon, ...buttonProps }, ref) {
7869
+ return /* @__PURE__ */ jsx17(Button2, { ...buttonProps, className: cx11(classBase9, className), ref, children: /* @__PURE__ */ jsx17(Icon, { "aria-label": ariaLabel, name: icon }) });
7870
+ }
7871
+ );
7872
+
7796
7873
  // src/calendar/internal/CalendarNavigation.tsx
7797
- import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
7874
+ import { jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
7798
7875
  var withBaseName2 = makePrefixer2("saltCalendarNavigation");
7799
7876
  function useCalendarNavigation() {
7800
7877
  const {
@@ -7855,16 +7932,16 @@ var ListItemWithTooltip = ({
7855
7932
  item,
7856
7933
  label,
7857
7934
  ...props
7858
- }) => /* @__PURE__ */ jsx16(
7935
+ }) => /* @__PURE__ */ jsx18(
7859
7936
  Tooltip,
7860
7937
  {
7861
7938
  placement: "right",
7862
7939
  disabled: !(item == null ? void 0 : item.disabled),
7863
7940
  content: "This month is out of range",
7864
- children: /* @__PURE__ */ jsx16(ListItem, { ...props, children: label })
7941
+ children: /* @__PURE__ */ jsx18(ListItem, { ...props, children: label })
7865
7942
  }
7866
7943
  );
7867
- var CalendarNavigation = forwardRef9(function CalendarNavigation2(props, ref) {
7944
+ var CalendarNavigation = forwardRef10(function CalendarNavigation2(props, ref) {
7868
7945
  const {
7869
7946
  className,
7870
7947
  MonthDropdownProps,
@@ -7932,33 +8009,29 @@ var CalendarNavigation = forwardRef9(function CalendarNavigation2(props, ref) {
7932
8009
  ref,
7933
8010
  ...rest,
7934
8011
  children: [
7935
- /* @__PURE__ */ jsx16(
8012
+ /* @__PURE__ */ jsx18(
7936
8013
  Tooltip,
7937
8014
  {
7938
8015
  placement: "top",
7939
8016
  disabled: canNavigatePrevious,
7940
8017
  content: "Past dates are out of range",
7941
- children: /* @__PURE__ */ jsx16(
7942
- Button2,
8018
+ children: /* @__PURE__ */ jsx18(
8019
+ IconButton,
7943
8020
  {
8021
+ "aria-label": `Previous Month, ${formatDate(
8022
+ visibleMonth.subtract({ months: 1 })
8023
+ )}`,
7944
8024
  disabled: !canNavigatePrevious,
8025
+ icon: "chevron-left",
7945
8026
  variant: "secondary",
7946
8027
  onClick: handleNavigatePrevious,
7947
8028
  className: withBaseName2("previousButton"),
7948
- focusableWhenDisabled: true,
7949
- children: /* @__PURE__ */ jsx16(
7950
- ChevronLeftIcon,
7951
- {
7952
- "aria-label": `Previous Month, ${formatDate(
7953
- visibleMonth.subtract({ months: 1 })
7954
- )}`
7955
- }
7956
- )
8029
+ focusableWhenDisabled: true
7957
8030
  }
7958
8031
  )
7959
8032
  }
7960
8033
  ),
7961
- /* @__PURE__ */ jsx16(
8034
+ /* @__PURE__ */ jsx18(
7962
8035
  Dropdown2,
7963
8036
  {
7964
8037
  source: months,
@@ -7973,7 +8046,7 @@ var CalendarNavigation = forwardRef9(function CalendarNavigation2(props, ref) {
7973
8046
  fullWidth: true
7974
8047
  }
7975
8048
  ),
7976
- !hideYearDropdown && /* @__PURE__ */ jsx16(
8049
+ !hideYearDropdown && /* @__PURE__ */ jsx18(
7977
8050
  Dropdown2,
7978
8051
  {
7979
8052
  source: years,
@@ -7988,28 +8061,24 @@ var CalendarNavigation = forwardRef9(function CalendarNavigation2(props, ref) {
7988
8061
  fullWidth: true
7989
8062
  }
7990
8063
  ),
7991
- /* @__PURE__ */ jsx16(
8064
+ /* @__PURE__ */ jsx18(
7992
8065
  Tooltip,
7993
8066
  {
7994
8067
  placement: "top",
7995
8068
  disabled: canNavigateNext,
7996
8069
  content: "Future dates are out of range",
7997
- children: /* @__PURE__ */ jsx16(
7998
- Button2,
8070
+ children: /* @__PURE__ */ jsx18(
8071
+ IconButton,
7999
8072
  {
8073
+ "aria-label": `Next Month, ${formatDate(
8074
+ visibleMonth.add({ months: 1 })
8075
+ )}`,
8000
8076
  disabled: !canNavigateNext,
8077
+ icon: "chevron-right",
8001
8078
  variant: "secondary",
8002
8079
  onClick: handleNavigateNext,
8003
8080
  className: withBaseName2("nextButton"),
8004
- focusableWhenDisabled: true,
8005
- children: /* @__PURE__ */ jsx16(
8006
- ChevronRightIcon,
8007
- {
8008
- "aria-label": `Next Month, ${formatDate(
8009
- visibleMonth.add({ months: 1 })
8010
- )}`
8011
- }
8012
- )
8081
+ focusableWhenDisabled: true
8013
8082
  }
8014
8083
  )
8015
8084
  }
@@ -8020,22 +8089,22 @@ var CalendarNavigation = forwardRef9(function CalendarNavigation2(props, ref) {
8020
8089
  });
8021
8090
 
8022
8091
  // src/calendar/internal/CalendarWeekHeader.tsx
8023
- import { forwardRef as forwardRef10 } from "react";
8092
+ import { forwardRef as forwardRef11 } from "react";
8024
8093
  import { clsx as clsx2 } from "clsx";
8025
8094
  import { makePrefixer as makePrefixer3 } from "@salt-ds/core";
8026
- import { jsx as jsx17 } from "react/jsx-runtime";
8095
+ import { jsx as jsx19 } from "react/jsx-runtime";
8027
8096
  var withBaseName3 = makePrefixer3("saltCalendarWeekHeader");
8028
- var CalendarWeekHeader = forwardRef10(function CalendarWeekHeader2({ className, ...rest }, ref) {
8097
+ var CalendarWeekHeader = forwardRef11(function CalendarWeekHeader2({ className, ...rest }, ref) {
8029
8098
  const weekdaysShort = daysForLocale("narrow");
8030
8099
  const weekdaysLong = daysForLocale("long");
8031
- return /* @__PURE__ */ jsx17(
8100
+ return /* @__PURE__ */ jsx19(
8032
8101
  "div",
8033
8102
  {
8034
8103
  "data-testid": "CalendarWeekHeader",
8035
8104
  className: clsx2(withBaseName3(), className),
8036
8105
  ref,
8037
8106
  ...rest,
8038
- children: weekdaysShort.map((day, index) => /* @__PURE__ */ jsx17(
8107
+ children: weekdaysShort.map((day, index) => /* @__PURE__ */ jsx19(
8039
8108
  "small",
8040
8109
  {
8041
8110
  "aria-hidden": "true",
@@ -8049,11 +8118,11 @@ var CalendarWeekHeader = forwardRef10(function CalendarWeekHeader2({ className,
8049
8118
  });
8050
8119
 
8051
8120
  // src/calendar/internal/CalendarCarousel.tsx
8052
- import { forwardRef as forwardRef13, useEffect as useEffect9, useRef as useRef29, useState as useState14 } from "react";
8121
+ import { forwardRef as forwardRef14, useEffect as useEffect9, useRef as useRef29, useState as useState14 } from "react";
8053
8122
 
8054
8123
  // src/calendar/internal/CalendarMonth.tsx
8055
8124
  import {
8056
- forwardRef as forwardRef12
8125
+ forwardRef as forwardRef13
8057
8126
  } from "react";
8058
8127
  import { clsx as clsx5 } from "clsx";
8059
8128
  import { makePrefixer as makePrefixer6 } from "@salt-ds/core";
@@ -8062,7 +8131,7 @@ import { makePrefixer as makePrefixer6 } from "@salt-ds/core";
8062
8131
  import { makePrefixer as makePrefixer5, Tooltip as Tooltip2, useForkRef as useForkRef7 } from "@salt-ds/core";
8063
8132
  import { CloseIcon } from "@salt-ds/icons";
8064
8133
  import { clsx as clsx4 } from "clsx";
8065
- import { forwardRef as forwardRef11, useRef as useRef28 } from "react";
8134
+ import { forwardRef as forwardRef12, useRef as useRef28 } from "react";
8066
8135
 
8067
8136
  // src/calendar/useCalendarDay.ts
8068
8137
  import {
@@ -8393,7 +8462,7 @@ function useCalendarDay({ date, month }, ref) {
8393
8462
  const outOfRange = !$14e0f24ef4ac5c92$export$a18c89cbd24170ff(date, month);
8394
8463
  const focused = $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, focusedDate) && calendarFocused && !outOfRange;
8395
8464
  const tabIndex = $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, focusedDate) && !outOfRange ? 0 : -1;
8396
- const today = $14e0f24ef4ac5c92$export$629b0a497aa65267(date, $14e0f24ef4ac5c92$export$aa8b41735afcabd2());
8465
+ const today2 = $14e0f24ef4ac5c92$export$629b0a497aa65267(date, $14e0f24ef4ac5c92$export$aa8b41735afcabd2());
8397
8466
  const unselectableResult = isDayUnselectable(date) || outOfRange && isOutsideAllowedMonths(date);
8398
8467
  const unselectableReason = typeof unselectableResult !== "boolean" ? unselectableResult == null ? void 0 : unselectableResult.tooltip : "";
8399
8468
  const unselectable = typeof unselectableResult !== "boolean" ? unselectableResult.emphasis : unselectableResult ? "low" : false;
@@ -8407,7 +8476,7 @@ function useCalendarDay({ date, month }, ref) {
8407
8476
  return {
8408
8477
  status: {
8409
8478
  outOfRange,
8410
- today,
8479
+ today: today2,
8411
8480
  unselectable,
8412
8481
  focused,
8413
8482
  hidden,
@@ -8415,7 +8484,7 @@ function useCalendarDay({ date, month }, ref) {
8415
8484
  },
8416
8485
  dayProps: {
8417
8486
  tabIndex,
8418
- "aria-current": today ? "date" : void 0,
8487
+ "aria-current": today2 ? "date" : void 0,
8419
8488
  "aria-hidden": hidden ? "true" : void 0,
8420
8489
  ...eventHandlers,
8421
8490
  ...selectionManager.dayProps
@@ -8425,9 +8494,9 @@ function useCalendarDay({ date, month }, ref) {
8425
8494
  }
8426
8495
 
8427
8496
  // src/calendar/internal/CalendarDay.tsx
8428
- import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
8497
+ import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
8429
8498
  var withBaseName5 = makePrefixer5("saltCalendarDay");
8430
- var CalendarDay = forwardRef11(
8499
+ var CalendarDay = forwardRef12(
8431
8500
  function CalendarDay2(props, ref) {
8432
8501
  const { className, day, renderDayContents, month, TooltipProps: TooltipProps2, ...rest } = props;
8433
8502
  const dayRef = useRef28(null);
@@ -8439,8 +8508,8 @@ var CalendarDay = forwardRef11(
8439
8508
  },
8440
8509
  dayRef
8441
8510
  );
8442
- const { outOfRange, today, unselectable, hidden } = status;
8443
- return /* @__PURE__ */ jsx18(
8511
+ const { outOfRange, today: today2, unselectable, hidden } = status;
8512
+ return /* @__PURE__ */ jsx20(
8444
8513
  Tooltip2,
8445
8514
  {
8446
8515
  hideIcon: true,
@@ -8462,7 +8531,7 @@ var CalendarDay = forwardRef11(
8462
8531
  {
8463
8532
  [withBaseName5("hidden")]: hidden,
8464
8533
  [withBaseName5("outOfRange")]: outOfRange,
8465
- [withBaseName5("today")]: today,
8534
+ [withBaseName5("today")]: today2,
8466
8535
  [withBaseName5("unselectable")]: !!unselectable,
8467
8536
  [withBaseName5("unselectableLow")]: unselectable === "low",
8468
8537
  [withBaseName5("unselectableMedium")]: unselectable === "medium"
@@ -8471,7 +8540,7 @@ var CalendarDay = forwardRef11(
8471
8540
  className
8472
8541
  ),
8473
8542
  children: [
8474
- unselectable === "medium" && /* @__PURE__ */ jsx18(
8543
+ unselectable === "medium" && /* @__PURE__ */ jsx20(
8475
8544
  CloseIcon,
8476
8545
  {
8477
8546
  "aria-hidden": true,
@@ -8489,9 +8558,9 @@ var CalendarDay = forwardRef11(
8489
8558
  );
8490
8559
 
8491
8560
  // src/calendar/internal/CalendarMonth.tsx
8492
- import { jsx as jsx19 } from "react/jsx-runtime";
8561
+ import { jsx as jsx21 } from "react/jsx-runtime";
8493
8562
  var withBaseName6 = makePrefixer6("saltCalendarMonth");
8494
- var CalendarMonth = forwardRef12(
8563
+ var CalendarMonth = forwardRef13(
8495
8564
  function CalendarMonth2(props, ref) {
8496
8565
  const {
8497
8566
  className,
@@ -8511,20 +8580,20 @@ var CalendarMonth = forwardRef12(
8511
8580
  setHoveredDate(event, null);
8512
8581
  onMouseLeave == null ? void 0 : onMouseLeave(event);
8513
8582
  };
8514
- return /* @__PURE__ */ jsx19(
8583
+ return /* @__PURE__ */ jsx21(
8515
8584
  "div",
8516
8585
  {
8517
8586
  className: clsx5(withBaseName6(), className),
8518
8587
  ref,
8519
8588
  onMouseLeave: handleMouseLeave,
8520
8589
  ...rest,
8521
- children: /* @__PURE__ */ jsx19(
8590
+ children: /* @__PURE__ */ jsx21(
8522
8591
  "div",
8523
8592
  {
8524
8593
  "data-testid": "CalendarDateGrid",
8525
8594
  className: withBaseName6("dateGrid"),
8526
8595
  children: days.map((day) => {
8527
- return /* @__PURE__ */ jsx19(
8596
+ return /* @__PURE__ */ jsx21(
8528
8597
  CalendarDay,
8529
8598
  {
8530
8599
  day: day.date,
@@ -8548,7 +8617,7 @@ import {
8548
8617
  useIsomorphicLayoutEffect as useIsomorphicLayoutEffect3,
8549
8618
  usePrevious
8550
8619
  } from "@salt-ds/core";
8551
- import { jsx as jsx20 } from "react/jsx-runtime";
8620
+ import { jsx as jsx22 } from "react/jsx-runtime";
8552
8621
  function getMonths(month) {
8553
8622
  return [month.subtract({ months: 1 }), month, month.add({ months: 1 })];
8554
8623
  }
@@ -8557,7 +8626,7 @@ function usePreviousMonth(visibleMonth) {
8557
8626
  return previous != null ? previous : $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2());
8558
8627
  }
8559
8628
  var withBaseName7 = makePrefixer7("saltCalendarCarousel");
8560
- var CalendarCarousel = forwardRef13(function CalendarCarousel2(props, ref) {
8629
+ var CalendarCarousel = forwardRef14(function CalendarCarousel2(props, ref) {
8561
8630
  const { ...rest } = props;
8562
8631
  const {
8563
8632
  state: { visibleMonth }
@@ -8601,7 +8670,7 @@ var CalendarCarousel = forwardRef13(function CalendarCarousel2(props, ref) {
8601
8670
  }
8602
8671
  return void 0;
8603
8672
  }, [formatDate(visibleMonth)]);
8604
- return /* @__PURE__ */ jsx20(
8673
+ return /* @__PURE__ */ jsx22(
8605
8674
  "div",
8606
8675
  {
8607
8676
  className: withBaseName7(),
@@ -8610,7 +8679,7 @@ var CalendarCarousel = forwardRef13(function CalendarCarousel2(props, ref) {
8610
8679
  position: "relative"
8611
8680
  },
8612
8681
  ref,
8613
- children: /* @__PURE__ */ jsx20("div", { className: withBaseName7("track"), ref: containerRef, children: months.map((date, index) => /* @__PURE__ */ jsx20(
8682
+ children: /* @__PURE__ */ jsx22("div", { className: withBaseName7("track"), ref: containerRef, children: months.map((date, index) => /* @__PURE__ */ jsx22(
8614
8683
  "div",
8615
8684
  {
8616
8685
  className: withBaseName7("slide"),
@@ -8618,7 +8687,7 @@ var CalendarCarousel = forwardRef13(function CalendarCarousel2(props, ref) {
8618
8687
  transform: `translateX(${diffIndex(date, baseIndex) * 100}%)`
8619
8688
  },
8620
8689
  "aria-hidden": index !== 1 ? "true" : void 0,
8621
- children: /* @__PURE__ */ jsx20(CalendarMonth, { isVisible: index === 1, ...rest, date })
8690
+ children: /* @__PURE__ */ jsx22(CalendarMonth, { isVisible: index === 1, ...rest, date })
8622
8691
  },
8623
8692
  formatDate(date)
8624
8693
  )) })
@@ -8752,9 +8821,9 @@ function useCalendar(props) {
8752
8821
  }
8753
8822
 
8754
8823
  // src/calendar/Calendar.tsx
8755
- import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
8824
+ import { jsx as jsx23, jsxs as jsxs9 } from "react/jsx-runtime";
8756
8825
  var withBaseName8 = makePrefixer8("saltCalendar");
8757
- var Calendar = forwardRef14(
8826
+ var Calendar = forwardRef15(
8758
8827
  function Calendar2(props, ref) {
8759
8828
  const {
8760
8829
  className,
@@ -8771,7 +8840,7 @@ var Calendar = forwardRef14(
8771
8840
  const handleBlur = useCallback32(() => {
8772
8841
  setCalendarFocused(false);
8773
8842
  }, [setCalendarFocused]);
8774
- return /* @__PURE__ */ jsx21(
8843
+ return /* @__PURE__ */ jsx23(
8775
8844
  CalendarContext.Provider,
8776
8845
  {
8777
8846
  value: {
@@ -8785,9 +8854,9 @@ var Calendar = forwardRef14(
8785
8854
  role: "application",
8786
8855
  ref,
8787
8856
  children: [
8788
- /* @__PURE__ */ jsx21(CalendarNavigation, { hideYearDropdown }),
8789
- /* @__PURE__ */ jsx21(CalendarWeekHeader, {}),
8790
- /* @__PURE__ */ jsx21(
8857
+ /* @__PURE__ */ jsx23(CalendarNavigation, { hideYearDropdown }),
8858
+ /* @__PURE__ */ jsx23(CalendarWeekHeader, {}),
8859
+ /* @__PURE__ */ jsx23(
8791
8860
  CalendarCarousel,
8792
8861
  {
8793
8862
  onFocus: handleFocus,
@@ -8807,15 +8876,15 @@ var Calendar = forwardRef14(
8807
8876
  // src/combo-box/ComboBox.tsx
8808
8877
  import { useId as useId6 } from "@vuu-ui/vuu-utils";
8809
8878
  import { Input } from "@salt-ds/core";
8810
- import { forwardRef as forwardRef15, useCallback as useCallback34 } from "react";
8879
+ import { forwardRef as forwardRef16, useCallback as useCallback34 } from "react";
8811
8880
 
8812
8881
  // src/list/ChevronIcon.tsx
8813
- import cx10 from "clsx";
8814
- import { jsx as jsx22 } from "react/jsx-runtime";
8815
- var classBase8 = "vuuChevronIcon";
8882
+ import cx12 from "clsx";
8883
+ import { jsx as jsx24 } from "react/jsx-runtime";
8884
+ var classBase10 = "vuuChevronIcon";
8816
8885
  var ChevronIcon = (props) => {
8817
8886
  const { direction, ...htmlAttributes } = props;
8818
- return /* @__PURE__ */ jsx22("span", { ...htmlAttributes, className: cx10(classBase8, direction) });
8887
+ return /* @__PURE__ */ jsx24("span", { ...htmlAttributes, className: cx12(classBase10, direction) });
8819
8888
  };
8820
8889
 
8821
8890
  // src/combo-box/useCombobox.ts
@@ -9172,8 +9241,8 @@ var useCombobox = ({
9172
9241
  };
9173
9242
 
9174
9243
  // src/combo-box/ComboBox.tsx
9175
- import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
9176
- var ComboBox = forwardRef15(function Combobox({
9244
+ import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
9245
+ var ComboBox = forwardRef16(function Combobox({
9177
9246
  InputProps: InputPropsProp,
9178
9247
  ListProps: ListProps3,
9179
9248
  PopupProps,
@@ -9283,7 +9352,7 @@ var ComboBox = forwardRef15(function Combobox({
9283
9352
  onOpenChange(true);
9284
9353
  }
9285
9354
  }, [isOpen, onOpenChange]);
9286
- const endAdornment = endAdornmentProp === null ? null : /* @__PURE__ */ jsx23(
9355
+ const endAdornment = endAdornmentProp === null ? null : /* @__PURE__ */ jsx25(
9287
9356
  ChevronIcon,
9288
9357
  {
9289
9358
  direction: isOpen ? "up" : "down",
@@ -9291,7 +9360,7 @@ var ComboBox = forwardRef15(function Combobox({
9291
9360
  role: "button"
9292
9361
  }
9293
9362
  );
9294
- return /* @__PURE__ */ jsx23(CollectionProvider, { collectionHook, children: /* @__PURE__ */ jsxs10(
9363
+ return /* @__PURE__ */ jsx25(CollectionProvider, { collectionHook, children: /* @__PURE__ */ jsxs10(
9295
9364
  DropdownBase,
9296
9365
  {
9297
9366
  ...props,
@@ -9303,7 +9372,7 @@ var ComboBox = forwardRef15(function Combobox({
9303
9372
  ref: forwardedRef,
9304
9373
  width,
9305
9374
  children: [
9306
- /* @__PURE__ */ jsx23(
9375
+ /* @__PURE__ */ jsx25(
9307
9376
  Input,
9308
9377
  {
9309
9378
  ...InputProps4,
@@ -9312,7 +9381,7 @@ var ComboBox = forwardRef15(function Combobox({
9312
9381
  endAdornment
9313
9382
  }
9314
9383
  ),
9315
- /* @__PURE__ */ jsx23(
9384
+ /* @__PURE__ */ jsx25(
9316
9385
  List,
9317
9386
  {
9318
9387
  ...ListProps3,
@@ -9336,10 +9405,10 @@ var ComboBox = forwardRef15(function Combobox({
9336
9405
 
9337
9406
  // src/cycle-state-button/CycleStateButton.tsx
9338
9407
  import { Button as Button3 } from "@salt-ds/core";
9339
- import cx11 from "clsx";
9340
- import { forwardRef as forwardRef16, useCallback as useCallback35 } from "react";
9341
- import { jsx as jsx24 } from "react/jsx-runtime";
9342
- var classBase9 = "vuuCycleStateButton";
9408
+ import cx13 from "clsx";
9409
+ import { forwardRef as forwardRef17, useCallback as useCallback35 } from "react";
9410
+ import { jsx as jsx26 } from "react/jsx-runtime";
9411
+ var classBase11 = "vuuCycleStateButton";
9343
9412
  var getNextValue = (value, valueList) => {
9344
9413
  const index = valueList.indexOf(value.toUpperCase());
9345
9414
  if (index === valueList.length - 1) {
@@ -9348,7 +9417,7 @@ var getNextValue = (value, valueList) => {
9348
9417
  return valueList[index + 1];
9349
9418
  }
9350
9419
  };
9351
- var CycleStateButton = forwardRef16(function CycleStateButton2({
9420
+ var CycleStateButton = forwardRef17(function CycleStateButton2({
9352
9421
  className,
9353
9422
  onCommit,
9354
9423
  value = "",
@@ -9366,14 +9435,14 @@ var CycleStateButton = forwardRef16(function CycleStateButton2({
9366
9435
  },
9367
9436
  [onCommit, value, values]
9368
9437
  );
9369
- return /* @__PURE__ */ jsx24(
9438
+ return /* @__PURE__ */ jsx26(
9370
9439
  Button3,
9371
9440
  {
9372
9441
  ...buttonProps,
9373
- className: cx11(
9374
- classBase9,
9442
+ className: cx13(
9443
+ classBase11,
9375
9444
  className,
9376
- `${classBase9}-${value.toLowerCase()}`
9445
+ `${classBase11}-${value.toLowerCase()}`
9377
9446
  ),
9378
9447
  onClick: handleClick,
9379
9448
  ref: forwardedRef,
@@ -9382,33 +9451,344 @@ var CycleStateButton = forwardRef16(function CycleStateButton2({
9382
9451
  );
9383
9452
  });
9384
9453
 
9454
+ // src/date-input/DateInput.tsx
9455
+ import { toCalendarDate } from "@vuu-ui/vuu-utils";
9456
+ import { clsx as clsx7 } from "clsx";
9457
+ import {
9458
+ useCallback as useCallback38,
9459
+ useRef as useRef32
9460
+ } from "react";
9461
+
9462
+ // src/date-popup/DatePopup.tsx
9463
+ import { useForkRef as useForkRef8 } from "@salt-ds/core";
9464
+ import cx14 from "clsx";
9465
+ import { forwardRef as forwardRef18 } from "react";
9466
+
9467
+ // src/date-popup/useDatePopup.ts
9468
+ import { useCallback as useCallback36, useMemo as useMemo14, useRef as useRef31, useState as useState17 } from "react";
9469
+ var SELECTED_DAY = ".saltCalendarDay-selected:not(.saltCalendarDay-outOfRange)";
9470
+ var useDatePopup = ({
9471
+ onChange,
9472
+ onPopupClose,
9473
+ onPopupOpen,
9474
+ selectedDate
9475
+ }) => {
9476
+ const [date, setDate] = useState17(selectedDate);
9477
+ const [, forceUpdate] = useState17({});
9478
+ const [isOpen, setIsOpen] = useState17(false);
9479
+ const triggererRef = useRef31(null);
9480
+ const calendarRef = useRef31(null);
9481
+ const visibleMonthRef = useRef31(selectedDate);
9482
+ const setVisibleMonth = useMemo14(() => {
9483
+ const setValue = (v) => {
9484
+ if (v.toString() !== visibleMonthRef.current.toString()) {
9485
+ visibleMonthRef.current = v;
9486
+ forceUpdate({});
9487
+ }
9488
+ };
9489
+ setValue(selectedDate);
9490
+ return setValue;
9491
+ }, [selectedDate]);
9492
+ const handleOpenChange = useCallback36(
9493
+ (open, reason) => {
9494
+ var _a2;
9495
+ setIsOpen(open);
9496
+ if (open) {
9497
+ onPopupOpen == null ? void 0 : onPopupOpen();
9498
+ requestAnimationFrame(() => {
9499
+ var _a3;
9500
+ const el = (_a3 = calendarRef.current) == null ? void 0 : _a3.querySelector(
9501
+ SELECTED_DAY
9502
+ );
9503
+ el == null ? void 0 : el.focus();
9504
+ });
9505
+ } else {
9506
+ if (reason !== "Tab") {
9507
+ (_a2 = triggererRef.current) == null ? void 0 : _a2.focus();
9508
+ }
9509
+ onPopupClose == null ? void 0 : onPopupClose(reason);
9510
+ }
9511
+ },
9512
+ [onPopupClose, onPopupOpen]
9513
+ );
9514
+ const handleDateSelection = useCallback36(
9515
+ (e, date2) => {
9516
+ setDate(date2);
9517
+ console.log(date2.toString());
9518
+ visibleMonthRef.current = date2;
9519
+ handleOpenChange(false, "select");
9520
+ onChange(date2);
9521
+ },
9522
+ [handleOpenChange, onChange]
9523
+ );
9524
+ const handleVisibleMonthChange = useCallback36(
9525
+ (e, date2) => {
9526
+ setVisibleMonth(date2);
9527
+ },
9528
+ [setVisibleMonth]
9529
+ );
9530
+ return {
9531
+ calendarRef,
9532
+ date,
9533
+ handleOpenChange,
9534
+ isOpen,
9535
+ onSelectedDateChange: handleDateSelection,
9536
+ onVisibleMonthChange: handleVisibleMonthChange,
9537
+ triggererRef,
9538
+ visibleMonth: visibleMonthRef.current
9539
+ };
9540
+ };
9541
+
9542
+ // src/date-popup/DatePopup.tsx
9543
+ import { jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
9544
+ var classBase12 = "vuuDatePopup";
9545
+ var tz = $14e0f24ef4ac5c92$export$aa8b41735afcabd2();
9546
+ var today = $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(tz);
9547
+ var DatePopup = forwardRef18(
9548
+ function DatePopup2({
9549
+ selectedDate,
9550
+ onChange,
9551
+ onPopupClose,
9552
+ onPopupOpen,
9553
+ selectionVariant,
9554
+ "data-embedded": dataEmbedded,
9555
+ ...htmlAttributes
9556
+ }, forwardedRef) {
9557
+ const {
9558
+ calendarRef,
9559
+ date,
9560
+ isOpen,
9561
+ onSelectedDateChange,
9562
+ onVisibleMonthChange,
9563
+ handleOpenChange,
9564
+ triggererRef,
9565
+ visibleMonth
9566
+ } = useDatePopup({
9567
+ onChange,
9568
+ onPopupClose,
9569
+ onPopupOpen,
9570
+ selectedDate: selectedDate || today,
9571
+ selectionVariant
9572
+ });
9573
+ return /* @__PURE__ */ jsxs11(
9574
+ DropdownBase,
9575
+ {
9576
+ ...htmlAttributes,
9577
+ className: classBase12,
9578
+ isOpen,
9579
+ placement: "below",
9580
+ onOpenChange: handleOpenChange,
9581
+ children: [
9582
+ /* @__PURE__ */ jsx27(
9583
+ IconButton,
9584
+ {
9585
+ "data-embedded": dataEmbedded,
9586
+ icon: "date",
9587
+ ref: useForkRef8(forwardedRef, triggererRef),
9588
+ variant: "secondary",
9589
+ className: cx14({ "saltButton-active": isOpen })
9590
+ }
9591
+ ),
9592
+ /* @__PURE__ */ jsx27(
9593
+ Calendar,
9594
+ {
9595
+ visibleMonth,
9596
+ ref: calendarRef,
9597
+ selectedDate: date,
9598
+ selectionVariant: "default",
9599
+ onSelectedDateChange,
9600
+ onVisibleMonthChange,
9601
+ className: `${classBase12}-calendar`
9602
+ }
9603
+ )
9604
+ ]
9605
+ }
9606
+ );
9607
+ }
9608
+ );
9609
+
9610
+ // src/date-input/useDatePicker.ts
9611
+ import { useCallback as useCallback37 } from "react";
9612
+ function useDatePicker({ onBlur }) {
9613
+ const handleOnBlur = useCallback37(
9614
+ (e) => {
9615
+ if (!e.currentTarget.contains(e.relatedTarget)) {
9616
+ onBlur == null ? void 0 : onBlur();
9617
+ }
9618
+ },
9619
+ [onBlur]
9620
+ );
9621
+ return {
9622
+ handleOnBlur
9623
+ };
9624
+ }
9625
+
9626
+ // src/date-input/DateInput.tsx
9627
+ import { jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
9628
+ var classBase13 = "vuuDateInput";
9629
+ var DateInput = ({
9630
+ selectedDate,
9631
+ onChange,
9632
+ onBlur,
9633
+ className,
9634
+ ...htmlAttributes
9635
+ }) => {
9636
+ var _a2;
9637
+ const { handleOnBlur } = useDatePicker({ onBlur });
9638
+ const popupRef = useRef32(null);
9639
+ const onInputChange = useCallback38(
9640
+ (e) => {
9641
+ const v = e.target.value;
9642
+ if (v === "")
9643
+ return;
9644
+ else
9645
+ onChange(toCalendarDate(new Date(v)));
9646
+ },
9647
+ [onChange]
9648
+ );
9649
+ const onKeyDown = useCallback38((e) => {
9650
+ if (e.key === "Tab" && !e.shiftKey) {
9651
+ console.log({ button: popupRef.current });
9652
+ requestAnimationFrame(() => {
9653
+ var _a3;
9654
+ (_a3 = popupRef.current) == null ? void 0 : _a3.focus();
9655
+ });
9656
+ }
9657
+ }, []);
9658
+ return /* @__PURE__ */ jsxs12(
9659
+ "div",
9660
+ {
9661
+ ...htmlAttributes,
9662
+ className: clsx7(classBase13, className),
9663
+ onBlur: handleOnBlur,
9664
+ children: [
9665
+ /* @__PURE__ */ jsx28(
9666
+ "input",
9667
+ {
9668
+ "aria-label": "date-input",
9669
+ className: clsx7("saltInput-input", classBase13, className),
9670
+ type: "date",
9671
+ value: (_a2 = selectedDate == null ? void 0 : selectedDate.toString()) != null ? _a2 : "",
9672
+ onChange: onInputChange,
9673
+ onKeyDown,
9674
+ max: "9999-12-31"
9675
+ }
9676
+ ),
9677
+ /* @__PURE__ */ jsx28(
9678
+ DatePopup,
9679
+ {
9680
+ "data-embedded": true,
9681
+ onBlur,
9682
+ onChange,
9683
+ ref: popupRef,
9684
+ selectedDate,
9685
+ selectionVariant: "default"
9686
+ }
9687
+ )
9688
+ ]
9689
+ }
9690
+ );
9691
+ };
9692
+
9693
+ // src/date-input/DateRangeInput.tsx
9694
+ import { toCalendarDate as toCalendarDate2 } from "@vuu-ui/vuu-utils";
9695
+ import cx15 from "clsx";
9696
+ import { useCallback as useCallback39 } from "react";
9697
+ import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
9698
+ var classBase14 = "vuuDateInput";
9699
+ var DateRangeInput = ({
9700
+ selectedDateRange,
9701
+ onChange,
9702
+ className,
9703
+ onBlur
9704
+ }) => {
9705
+ var _a2, _b, _c, _d;
9706
+ const { handleOnBlur } = useDatePicker({ onBlur });
9707
+ const getHandleInputChange = useCallback39(
9708
+ (k) => (e) => {
9709
+ const v = e.target.value;
9710
+ onChange({ ...selectedDateRange, [k]: toCalendarDate2(new Date(v)) });
9711
+ },
9712
+ [selectedDateRange, onChange]
9713
+ );
9714
+ const handleDateInputChange = useCallback39(
9715
+ (dateRange) => {
9716
+ console.log("date range change", {
9717
+ dateRange
9718
+ });
9719
+ },
9720
+ []
9721
+ );
9722
+ return /* @__PURE__ */ jsxs13(
9723
+ "div",
9724
+ {
9725
+ className: cx15("saltInput saltInput-primary", classBase14, className),
9726
+ onBlur: handleOnBlur,
9727
+ children: [
9728
+ /* @__PURE__ */ jsx29(
9729
+ "input",
9730
+ {
9731
+ className: cx15("saltInput-input", classBase14, className),
9732
+ type: "date",
9733
+ value: (_b = (_a2 = selectedDateRange == null ? void 0 : selectedDateRange["startDate"]) == null ? void 0 : _a2.toString()) != null ? _b : "",
9734
+ onChange: getHandleInputChange("startDate"),
9735
+ "aria-label": "date-input",
9736
+ max: "9999-12-31"
9737
+ }
9738
+ ),
9739
+ /* @__PURE__ */ jsx29("span", { children: "\u2014" }),
9740
+ /* @__PURE__ */ jsx29(
9741
+ "input",
9742
+ {
9743
+ className: cx15("saltInput-input", classBase14, className),
9744
+ type: "date",
9745
+ value: (_d = (_c = selectedDateRange == null ? void 0 : selectedDateRange["endDate"]) == null ? void 0 : _c.toString()) != null ? _d : "",
9746
+ onChange: getHandleInputChange("endDate"),
9747
+ "aria-label": "date-input",
9748
+ max: "9999-12-31"
9749
+ }
9750
+ ),
9751
+ /* @__PURE__ */ jsx29(
9752
+ DatePopup,
9753
+ {
9754
+ onBlur,
9755
+ onChange: handleDateInputChange,
9756
+ selectedDate: selectedDateRange == null ? void 0 : selectedDateRange["startDate"],
9757
+ selectionVariant: "range"
9758
+ }
9759
+ )
9760
+ ]
9761
+ }
9762
+ );
9763
+ };
9764
+
9385
9765
  // src/date-picker/DatePicker.tsx
9386
- import { useCallback as useCallback39, useMemo as useMemo14 } from "react";
9387
- import { clsx as clsx9 } from "clsx";
9766
+ import { useCallback as useCallback43, useMemo as useMemo15 } from "react";
9767
+ import { clsx as clsx10 } from "clsx";
9388
9768
 
9389
9769
  // src/date-picker/input/DatePickerInput.tsx
9390
- import { useCallback as useCallback36 } from "react";
9391
- import { toCalendarDate } from "@vuu-ui/vuu-utils";
9392
- import { clsx as clsx7 } from "clsx";
9393
- import { jsx as jsx25 } from "react/jsx-runtime";
9770
+ import { useCallback as useCallback40 } from "react";
9771
+ import { toCalendarDate as toCalendarDate3 } from "@vuu-ui/vuu-utils";
9772
+ import { clsx as clsx8 } from "clsx";
9773
+ import { jsx as jsx30 } from "react/jsx-runtime";
9394
9774
  var baseClass2 = "vuuDatePickerInput";
9395
9775
  var DatePickerInput = (props) => {
9396
9776
  var _a2;
9397
9777
  const { value, onChange, className } = props;
9398
- const onInputChange = useCallback36(
9778
+ const onInputChange = useCallback40(
9399
9779
  (e) => {
9400
9780
  const v = e.target.value;
9401
9781
  if (v === "")
9402
9782
  return;
9403
9783
  else
9404
- onChange(toCalendarDate(new Date(v)));
9784
+ onChange(toCalendarDate3(new Date(v)));
9405
9785
  },
9406
9786
  [onChange]
9407
9787
  );
9408
- return /* @__PURE__ */ jsx25(
9788
+ return /* @__PURE__ */ jsx30(
9409
9789
  "input",
9410
9790
  {
9411
- className: clsx7("saltInput-input", baseClass2, className),
9791
+ className: clsx8("saltInput-input", baseClass2, className),
9412
9792
  type: "date",
9413
9793
  value: (_a2 = value == null ? void 0 : value.toString()) != null ? _a2 : "",
9414
9794
  onChange: onInputChange,
@@ -9421,33 +9801,33 @@ var DatePickerInput = (props) => {
9421
9801
  // src/date-picker/internal/CalendarIconButton.tsx
9422
9802
  import { Button as Button4 } from "@salt-ds/core";
9423
9803
  import { CalendarIcon } from "@salt-ds/icons";
9424
- import { forwardRef as forwardRef17 } from "react";
9425
- import clsx8 from "clsx";
9426
- import { jsx as jsx26 } from "react/jsx-runtime";
9804
+ import { forwardRef as forwardRef19 } from "react";
9805
+ import clsx9 from "clsx";
9806
+ import { jsx as jsx31 } from "react/jsx-runtime";
9427
9807
  var baseClass3 = "vuuDatePicker-calendarIconButton";
9428
- var CalendarIconButton = forwardRef17(function CalendarIconButton2({ className, ...rest }, ref) {
9429
- return /* @__PURE__ */ jsx26(
9808
+ var CalendarIconButton = forwardRef19(function CalendarIconButton2({ className, ...rest }, ref) {
9809
+ return /* @__PURE__ */ jsx31(
9430
9810
  Button4,
9431
9811
  {
9432
- className: clsx8(baseClass3, className),
9812
+ className: clsx9(baseClass3, className),
9433
9813
  variant: "secondary",
9434
9814
  "aria-label": "calendar-icon-button",
9435
9815
  ref,
9436
9816
  ...rest,
9437
- children: /* @__PURE__ */ jsx26(CalendarIcon, {})
9817
+ children: /* @__PURE__ */ jsx31(CalendarIcon, {})
9438
9818
  }
9439
9819
  );
9440
9820
  });
9441
9821
 
9442
9822
  // src/date-picker/useBaseDatePicker.ts
9443
- import { useCallback as useCallback37, useState as useState17 } from "react";
9823
+ import { useCallback as useCallback41, useState as useState18 } from "react";
9444
9824
  function useBaseDatePicker(props) {
9445
9825
  var _a2;
9446
9826
  const { onBlur } = props;
9447
- const [visibleMonth, setVisibleMonth] = useState17(
9827
+ const [visibleMonth, setVisibleMonth] = useState18(
9448
9828
  props.variant === "default" ? props.selectedDate : (_a2 = props.selectedDate) == null ? void 0 : _a2.startDate
9449
9829
  );
9450
- const handleOnBlur = useCallback37(
9830
+ const handleOnBlur = useCallback41(
9451
9831
  (e) => {
9452
9832
  if (!e.currentTarget.contains(e.relatedTarget)) {
9453
9833
  onBlur == null ? void 0 : onBlur();
@@ -9463,15 +9843,15 @@ function useBaseDatePicker(props) {
9463
9843
  }
9464
9844
 
9465
9845
  // src/date-picker/useBaseDatePickerDropdown.ts
9466
- import { useCallback as useCallback38, useRef as useRef31, useState as useState18 } from "react";
9846
+ import { useCallback as useCallback42, useRef as useRef33, useState as useState19 } from "react";
9467
9847
  function useBaseDatePickerDropdown({
9468
9848
  onVisibleMonthChange,
9469
9849
  onSelectedDateChange,
9470
9850
  shouldCloseOnSelectionChange
9471
9851
  }) {
9472
- const [isOpen, setIsOpen] = useState18(false);
9473
- const triggererRef = useRef31(null);
9474
- const handleDateSelection = useCallback38(
9852
+ const [isOpen, setIsOpen] = useState19(false);
9853
+ const triggererRef = useRef33(null);
9854
+ const handleDateSelection = useCallback42(
9475
9855
  (_, d) => {
9476
9856
  var _a2;
9477
9857
  onSelectedDateChange(d);
@@ -9481,7 +9861,7 @@ function useBaseDatePickerDropdown({
9481
9861
  },
9482
9862
  [onSelectedDateChange, shouldCloseOnSelectionChange]
9483
9863
  );
9484
- const handleVisibleMonthChange = useCallback38(
9864
+ const handleVisibleMonthChange = useCallback42(
9485
9865
  (_, d) => {
9486
9866
  var _a2;
9487
9867
  onVisibleMonthChange(d);
@@ -9499,26 +9879,26 @@ function useBaseDatePickerDropdown({
9499
9879
  }
9500
9880
 
9501
9881
  // src/date-picker/DatePicker.tsx
9502
- import { jsx as jsx27, jsxs as jsxs11 } from "react/jsx-runtime";
9882
+ import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
9503
9883
  var baseClass4 = "vuuDatePicker";
9504
9884
  var DatePicker = (props) => {
9505
9885
  const { selectedDate, onSelectedDateChange, onBlur, className } = props;
9506
9886
  const { visibleMonth, handleVisibleMonthChange, handleOnBlur } = useBaseDatePicker({ variant: "default", selectedDate, onBlur });
9507
- const handleInputChange = useCallback39(
9887
+ const handleInputChange = useCallback43(
9508
9888
  (d) => {
9509
9889
  onSelectedDateChange(d);
9510
9890
  handleVisibleMonthChange(d);
9511
9891
  },
9512
9892
  [onSelectedDateChange, handleVisibleMonthChange]
9513
9893
  );
9514
- return /* @__PURE__ */ jsxs11(
9894
+ return /* @__PURE__ */ jsxs14(
9515
9895
  "div",
9516
9896
  {
9517
- className: clsx9("saltInput saltInput-primary", baseClass4, className),
9897
+ className: clsx10("saltInput saltInput-primary", baseClass4, className),
9518
9898
  onBlur: handleOnBlur,
9519
9899
  children: [
9520
- /* @__PURE__ */ jsx27(DatePickerInput, { value: selectedDate, onChange: handleInputChange }),
9521
- /* @__PURE__ */ jsx27(
9900
+ /* @__PURE__ */ jsx32(DatePickerInput, { value: selectedDate, onChange: handleInputChange }),
9901
+ /* @__PURE__ */ jsx32(
9522
9902
  DatePickerDropdown,
9523
9903
  {
9524
9904
  visibleMonth,
@@ -9538,7 +9918,7 @@ var DatePickerDropdown = (props) => {
9538
9918
  className,
9539
9919
  ...rest
9540
9920
  } = props;
9541
- const shouldCloseOnSelectionChange = useCallback39(
9921
+ const shouldCloseOnSelectionChange = useCallback43(
9542
9922
  () => !!closeOnSelection,
9543
9923
  [closeOnSelection]
9544
9924
  );
@@ -9553,8 +9933,8 @@ var DatePickerDropdown = (props) => {
9553
9933
  onSelectedDateChange,
9554
9934
  shouldCloseOnSelectionChange
9555
9935
  });
9556
- const defaultSelectedDate = useMemo14(() => $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2()), []);
9557
- return /* @__PURE__ */ jsxs11(
9936
+ const defaultSelectedDate = useMemo15(() => $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2()), []);
9937
+ return /* @__PURE__ */ jsxs14(
9558
9938
  DropdownBase,
9559
9939
  {
9560
9940
  placement: "below",
@@ -9562,8 +9942,8 @@ var DatePickerDropdown = (props) => {
9562
9942
  onOpenChange: handleOpenChange,
9563
9943
  className,
9564
9944
  children: [
9565
- /* @__PURE__ */ jsx27(CalendarIconButton, { ref: triggererRef }),
9566
- /* @__PURE__ */ jsx27(
9945
+ /* @__PURE__ */ jsx32(CalendarIconButton, { ref: triggererRef }),
9946
+ /* @__PURE__ */ jsx32(
9567
9947
  Calendar,
9568
9948
  {
9569
9949
  selectionVariant: "default",
@@ -9580,32 +9960,32 @@ var DatePickerDropdown = (props) => {
9580
9960
  };
9581
9961
 
9582
9962
  // src/date-picker/DateRangePicker.tsx
9583
- import { useCallback as useCallback41, useMemo as useMemo15 } from "react";
9584
- import { clsx as clsx11 } from "clsx";
9963
+ import { useCallback as useCallback45, useMemo as useMemo16 } from "react";
9964
+ import { clsx as clsx12 } from "clsx";
9585
9965
 
9586
9966
  // src/date-picker/input/DateRangePickerInput.tsx
9587
- import { useCallback as useCallback40 } from "react";
9588
- import { clsx as clsx10 } from "clsx";
9589
- import { jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
9967
+ import { useCallback as useCallback44 } from "react";
9968
+ import { clsx as clsx11 } from "clsx";
9969
+ import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
9590
9970
  var baseClass5 = "vuuDateRangePickerInput";
9591
9971
  var DateRangePickerInput = (props) => {
9592
9972
  const { value, onChange, className } = props;
9593
- const getHandleInputChange = useCallback40(
9973
+ const getHandleInputChange = useCallback44(
9594
9974
  (k) => (d) => {
9595
9975
  onChange({ ...value, [k]: d });
9596
9976
  },
9597
9977
  [value, onChange]
9598
9978
  );
9599
- return /* @__PURE__ */ jsxs12("div", { className: clsx10(baseClass5, className), children: [
9600
- /* @__PURE__ */ jsx28(
9979
+ return /* @__PURE__ */ jsxs15("div", { className: clsx11(baseClass5, className), children: [
9980
+ /* @__PURE__ */ jsx33(
9601
9981
  DatePickerInput,
9602
9982
  {
9603
9983
  value: value == null ? void 0 : value["startDate"],
9604
9984
  onChange: getHandleInputChange("startDate")
9605
9985
  }
9606
9986
  ),
9607
- /* @__PURE__ */ jsx28("span", { children: "\u2014" }),
9608
- /* @__PURE__ */ jsx28(
9987
+ /* @__PURE__ */ jsx33("span", { children: "\u2014" }),
9988
+ /* @__PURE__ */ jsx33(
9609
9989
  DatePickerInput,
9610
9990
  {
9611
9991
  value: value == null ? void 0 : value["endDate"],
@@ -9616,12 +9996,12 @@ var DateRangePickerInput = (props) => {
9616
9996
  };
9617
9997
 
9618
9998
  // src/date-picker/DateRangePicker.tsx
9619
- import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
9999
+ import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
9620
10000
  var baseClass6 = "vuuDatePicker";
9621
10001
  var DateRangePicker = (props) => {
9622
10002
  const { selectedDate, onSelectedDateChange, className, onBlur } = props;
9623
10003
  const { visibleMonth, handleVisibleMonthChange, handleOnBlur } = useBaseDatePicker({ variant: "range", selectedDate, onBlur });
9624
- const handleInputChange = useCallback41(
10004
+ const handleInputChange = useCallback45(
9625
10005
  (r) => {
9626
10006
  var _a2;
9627
10007
  onSelectedDateChange(r);
@@ -9629,14 +10009,14 @@ var DateRangePicker = (props) => {
9629
10009
  },
9630
10010
  [onSelectedDateChange, handleVisibleMonthChange]
9631
10011
  );
9632
- return /* @__PURE__ */ jsxs13(
10012
+ return /* @__PURE__ */ jsxs16(
9633
10013
  "div",
9634
10014
  {
9635
- className: clsx11("saltInput saltInput-primary", baseClass6, className),
10015
+ className: clsx12("saltInput saltInput-primary", baseClass6, className),
9636
10016
  onBlur: handleOnBlur,
9637
10017
  children: [
9638
- /* @__PURE__ */ jsx29(DateRangePickerInput, { value: selectedDate, onChange: handleInputChange }),
9639
- /* @__PURE__ */ jsx29(
10018
+ /* @__PURE__ */ jsx34(DateRangePickerInput, { value: selectedDate, onChange: handleInputChange }),
10019
+ /* @__PURE__ */ jsx34(
9640
10020
  DateRangePickerDropdown,
9641
10021
  {
9642
10022
  ...props,
@@ -9656,7 +10036,7 @@ var DateRangePickerDropdown = (props) => {
9656
10036
  className,
9657
10037
  ...rest
9658
10038
  } = props;
9659
- const shouldCloseOnSelectionChange = useCallback41(
10039
+ const shouldCloseOnSelectionChange = useCallback45(
9660
10040
  (r) => !!(closeOnSelection && r.endDate),
9661
10041
  [closeOnSelection]
9662
10042
  );
@@ -9671,11 +10051,11 @@ var DateRangePickerDropdown = (props) => {
9671
10051
  onSelectedDateChange,
9672
10052
  shouldCloseOnSelectionChange
9673
10053
  });
9674
- const defaultSelectedDate = useMemo15(
10054
+ const defaultSelectedDate = useMemo16(
9675
10055
  () => ({ startDate: $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2()) }),
9676
10056
  []
9677
10057
  );
9678
- return /* @__PURE__ */ jsxs13(
10058
+ return /* @__PURE__ */ jsxs16(
9679
10059
  DropdownBase,
9680
10060
  {
9681
10061
  placement: "below",
@@ -9683,8 +10063,8 @@ var DateRangePickerDropdown = (props) => {
9683
10063
  className,
9684
10064
  onOpenChange: handleOpenChange,
9685
10065
  children: [
9686
- /* @__PURE__ */ jsx29(CalendarIconButton, { ref: triggererRef }),
9687
- /* @__PURE__ */ jsx29(
10066
+ /* @__PURE__ */ jsx34(CalendarIconButton, { ref: triggererRef }),
10067
+ /* @__PURE__ */ jsx34(
9688
10068
  Calendar,
9689
10069
  {
9690
10070
  selectionVariant: "range",
@@ -9737,9 +10117,9 @@ function applyRules(rules, value) {
9737
10117
  import { useLayoutEffectSkipFirst as useLayoutEffectSkipFirst4 } from "@vuu-ui/vuu-utils";
9738
10118
  import { dispatchCustomEvent as dispatchCustomEvent3 } from "@vuu-ui/vuu-utils";
9739
10119
  import {
9740
- useCallback as useCallback42,
9741
- useRef as useRef32,
9742
- useState as useState19
10120
+ useCallback as useCallback46,
10121
+ useRef as useRef34,
10122
+ useState as useState20
9743
10123
  } from "react";
9744
10124
  var WarnCommit = () => {
9745
10125
  console.warn(
@@ -9753,15 +10133,15 @@ var useEditableText = ({
9753
10133
  onCommit,
9754
10134
  type
9755
10135
  }) => {
9756
- const [message, setMessage] = useState19();
9757
- const [value, setValue] = useState19(initialValue);
9758
- const initialValueRef = useRef32(initialValue);
9759
- const isDirtyRef = useRef32(false);
9760
- const hasCommittedRef = useRef32(false);
10136
+ const [message, setMessage] = useState20();
10137
+ const [value, setValue] = useState20(initialValue);
10138
+ const initialValueRef = useRef34(initialValue);
10139
+ const isDirtyRef = useRef34(false);
10140
+ const hasCommittedRef = useRef34(false);
9761
10141
  useLayoutEffectSkipFirst4(() => {
9762
10142
  setValue(initialValue);
9763
10143
  }, [initialValue]);
9764
- const commit = useCallback42(
10144
+ const commit = useCallback46(
9765
10145
  (target) => {
9766
10146
  if (isDirtyRef.current) {
9767
10147
  hasCommittedRef.current = true;
@@ -9787,7 +10167,7 @@ var useEditableText = ({
9787
10167
  },
9788
10168
  [clientSideEditValidationCheck, onCommit, value]
9789
10169
  );
9790
- const handleKeyDown = useCallback42(
10170
+ const handleKeyDown = useCallback46(
9791
10171
  (evt) => {
9792
10172
  if (evt.key === "Enter") {
9793
10173
  commit(evt.target);
@@ -9803,7 +10183,7 @@ var useEditableText = ({
9803
10183
  },
9804
10184
  [commit]
9805
10185
  );
9806
- const handleBlur = useCallback42(
10186
+ const handleBlur = useCallback46(
9807
10187
  (evt) => {
9808
10188
  if (isDirtyRef.current) {
9809
10189
  commit(evt.target);
@@ -9811,7 +10191,7 @@ var useEditableText = ({
9811
10191
  },
9812
10192
  [commit]
9813
10193
  );
9814
- const handleChange = useCallback42(
10194
+ const handleChange = useCallback46(
9815
10195
  (evt) => {
9816
10196
  let typedValue = evt.target.value;
9817
10197
  if (type === "number" && !isNaN(parseFloat(typedValue))) {
@@ -9840,17 +10220,17 @@ var useEditableText = ({
9840
10220
  };
9841
10221
 
9842
10222
  // src/editable-label/EditableLabel.tsx
9843
- import cx12 from "clsx";
10223
+ import cx16 from "clsx";
9844
10224
  import {
9845
- useCallback as useCallback43,
10225
+ useCallback as useCallback47,
9846
10226
  useLayoutEffect as useLayoutEffect3,
9847
- forwardRef as forwardRef18,
9848
- useRef as useRef33
10227
+ forwardRef as forwardRef20,
10228
+ useRef as useRef35
9849
10229
  } from "react";
9850
10230
  import { Input as Input2, useControlled as useControlled8 } from "@salt-ds/core";
9851
- import { jsx as jsx30 } from "react/jsx-runtime";
9852
- var classBase10 = "vuuEditableLabel";
9853
- var EditableLabel = forwardRef18(function EditableLabel2({
10231
+ import { jsx as jsx35 } from "react/jsx-runtime";
10232
+ var classBase15 = "vuuEditableLabel";
10233
+ var EditableLabel = forwardRef20(function EditableLabel2({
9854
10234
  className: classNameProp,
9855
10235
  defaultEditing,
9856
10236
  defaultValue,
@@ -9861,8 +10241,8 @@ var EditableLabel = forwardRef18(function EditableLabel2({
9861
10241
  value: valueProp,
9862
10242
  ...restProps
9863
10243
  }, forwardedRef) {
9864
- const inputRef = useRef33(null);
9865
- const editingRef = useRef33(false);
10244
+ const inputRef = useRef35(null);
10245
+ const editingRef = useRef35(false);
9866
10246
  const [value, setValue] = useControlled8({
9867
10247
  controlled: valueProp,
9868
10248
  default: defaultValue != null ? defaultValue : "",
@@ -9875,13 +10255,13 @@ var EditableLabel = forwardRef18(function EditableLabel2({
9875
10255
  name: "EditableLabel",
9876
10256
  state: "editing"
9877
10257
  });
9878
- const setEditing = useCallback43(
10258
+ const setEditing = useCallback47(
9879
10259
  (value2) => {
9880
10260
  _setEditing(editingRef.current = value2);
9881
10261
  },
9882
10262
  [_setEditing]
9883
10263
  );
9884
- const initialValue = useRef33(value);
10264
+ const initialValue = useRef35(value);
9885
10265
  useLayoutEffect3(() => {
9886
10266
  if (editing) {
9887
10267
  if (inputRef.current !== null) {
@@ -9890,7 +10270,7 @@ var EditableLabel = forwardRef18(function EditableLabel2({
9890
10270
  }
9891
10271
  }
9892
10272
  }, [editing, inputRef]);
9893
- const enterEditMode = useCallback43(() => {
10273
+ const enterEditMode = useCallback47(() => {
9894
10274
  setEditing(true);
9895
10275
  onEnterEditMode && onEnterEditMode();
9896
10276
  }, [onEnterEditMode, setEditing]);
@@ -9932,10 +10312,10 @@ var EditableLabel = forwardRef18(function EditableLabel2({
9932
10312
  exitEditMode({ cancelEdit: true });
9933
10313
  }
9934
10314
  };
9935
- const className = cx12(classBase10, classNameProp, {
9936
- [`${classBase10}-editing`]: editing
10315
+ const className = cx16(classBase15, classNameProp, {
10316
+ [`${classBase15}-editing`]: editing
9937
10317
  });
9938
- return /* @__PURE__ */ jsx30(
10318
+ return /* @__PURE__ */ jsx35(
9939
10319
  "div",
9940
10320
  {
9941
10321
  ...restProps,
@@ -9943,10 +10323,10 @@ var EditableLabel = forwardRef18(function EditableLabel2({
9943
10323
  onDoubleClick: handleDoubleClick,
9944
10324
  "data-text": value,
9945
10325
  ref: forwardedRef,
9946
- children: editing ? /* @__PURE__ */ jsx30(
10326
+ children: editing ? /* @__PURE__ */ jsx35(
9947
10327
  Input2,
9948
10328
  {
9949
- inputProps: { className: `${classBase10}-input`, spellCheck: false },
10329
+ inputProps: { className: `${classBase15}-input`, spellCheck: false },
9950
10330
  value,
9951
10331
  onBlur: handleBlur,
9952
10332
  onChange: handleChange,
@@ -9956,30 +10336,30 @@ var EditableLabel = forwardRef18(function EditableLabel2({
9956
10336
  textAlign: "left",
9957
10337
  variant: "secondary"
9958
10338
  }
9959
- ) : /* @__PURE__ */ jsx30("span", { className: `${classBase10}-label`, children: value })
10339
+ ) : /* @__PURE__ */ jsx35("span", { className: `${classBase15}-label`, children: value })
9960
10340
  }
9961
10341
  );
9962
10342
  });
9963
10343
 
9964
10344
  // src/expando-input/ExpandoInput.tsx
9965
- import cx14 from "clsx";
9966
- import { forwardRef as forwardRef20 } from "react";
10345
+ import cx18 from "clsx";
10346
+ import { forwardRef as forwardRef22 } from "react";
9967
10347
 
9968
10348
  // src/vuu-input/VuuInput.tsx
9969
10349
  import { Tooltip as Tooltip3, useTooltip } from "@vuu-ui/vuu-popups";
9970
10350
  import { isValidNumber as isValidNumber4, useId as useId7 } from "@vuu-ui/vuu-utils";
9971
10351
  import { Input as Input3 } from "@salt-ds/core";
9972
- import cx13 from "clsx";
10352
+ import cx17 from "clsx";
9973
10353
  import {
9974
- forwardRef as forwardRef19,
9975
- useCallback as useCallback44
10354
+ forwardRef as forwardRef21,
10355
+ useCallback as useCallback48
9976
10356
  } from "react";
9977
- import { Fragment as Fragment3, jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
9978
- var classBase11 = "vuuInput";
10357
+ import { Fragment as Fragment3, jsx as jsx36, jsxs as jsxs17 } from "react/jsx-runtime";
10358
+ var classBase16 = "vuuInput";
9979
10359
  var constantInputProps = {
9980
10360
  autoComplete: "off"
9981
10361
  };
9982
- var VuuInput = forwardRef19(function VuuInput2({
10362
+ var VuuInput = forwardRef21(function VuuInput2({
9983
10363
  className,
9984
10364
  errorMessage,
9985
10365
  id: idProp,
@@ -9993,7 +10373,7 @@ var VuuInput = forwardRef19(function VuuInput2({
9993
10373
  id,
9994
10374
  tooltipContent: errorMessage
9995
10375
  });
9996
- const commitValue = useCallback44(
10376
+ const commitValue = useCallback48(
9997
10377
  (evt, value) => {
9998
10378
  if (type === "number") {
9999
10379
  const numericValue = parseFloat(value);
@@ -10010,7 +10390,7 @@ var VuuInput = forwardRef19(function VuuInput2({
10010
10390
  },
10011
10391
  [onCommit, type]
10012
10392
  );
10013
- const handleKeyDown = useCallback44(
10393
+ const handleKeyDown = useCallback48(
10014
10394
  (evt) => {
10015
10395
  if (evt.key === "Enter") {
10016
10396
  evt.preventDefault();
@@ -10022,23 +10402,23 @@ var VuuInput = forwardRef19(function VuuInput2({
10022
10402
  },
10023
10403
  [commitValue, onKeyDown]
10024
10404
  );
10025
- const handleBlur = useCallback44(
10405
+ const handleBlur = useCallback48(
10026
10406
  (evt) => {
10027
10407
  const { value } = evt.target;
10028
10408
  commitValue(evt, value);
10029
10409
  },
10030
10410
  [commitValue]
10031
10411
  );
10032
- const endAdornment = errorMessage ? /* @__PURE__ */ jsx31(
10412
+ const endAdornment = errorMessage ? /* @__PURE__ */ jsx36(
10033
10413
  "span",
10034
10414
  {
10035
10415
  ...anchorProps,
10036
- className: `${classBase11}-errorIcon`,
10416
+ className: `${classBase16}-errorIcon`,
10037
10417
  "data-icon": "error"
10038
10418
  }
10039
10419
  ) : void 0;
10040
- return /* @__PURE__ */ jsxs14(Fragment3, { children: [
10041
- /* @__PURE__ */ jsx31(
10420
+ return /* @__PURE__ */ jsxs17(Fragment3, { children: [
10421
+ /* @__PURE__ */ jsx36(
10042
10422
  Input3,
10043
10423
  {
10044
10424
  ...props,
@@ -10048,23 +10428,23 @@ var VuuInput = forwardRef19(function VuuInput2({
10048
10428
  ...constantInputProps,
10049
10429
  ...props.inputProps
10050
10430
  },
10051
- className: cx13(classBase11, className, {
10052
- [`${classBase11}-errror`]: errorMessage
10431
+ className: cx17(classBase16, className, {
10432
+ [`${classBase16}-errror`]: errorMessage
10053
10433
  }),
10054
10434
  onBlur: handleBlur,
10055
10435
  ref: forwardedRef,
10056
10436
  onKeyDown: handleKeyDown
10057
10437
  }
10058
10438
  ),
10059
- tooltipProps ? /* @__PURE__ */ jsx31(Tooltip3, { ...tooltipProps, status: "error" }) : null
10439
+ tooltipProps ? /* @__PURE__ */ jsx36(Tooltip3, { ...tooltipProps, status: "error" }) : null
10060
10440
  ] });
10061
10441
  });
10062
10442
 
10063
10443
  // src/expando-input/ExpandoInput.tsx
10064
- import { jsx as jsx32 } from "react/jsx-runtime";
10065
- var classBase12 = "vuuExpandoInput";
10444
+ import { jsx as jsx37 } from "react/jsx-runtime";
10445
+ var classBase17 = "vuuExpandoInput";
10066
10446
  var noop = () => void 0;
10067
- var ExpandoInput = forwardRef20(function ExpandoInput2({
10447
+ var ExpandoInput = forwardRef22(function ExpandoInput2({
10068
10448
  className: classNameProp,
10069
10449
  errorMessage,
10070
10450
  value,
@@ -10072,19 +10452,19 @@ var ExpandoInput = forwardRef20(function ExpandoInput2({
10072
10452
  onCommit = noop,
10073
10453
  ...props
10074
10454
  }, forwardedRef) {
10075
- return /* @__PURE__ */ jsx32(
10455
+ return /* @__PURE__ */ jsx37(
10076
10456
  "div",
10077
10457
  {
10078
- className: cx14(classBase12, classNameProp, {
10079
- [`${classBase12}-error`]: errorMessage
10458
+ className: cx18(classBase17, classNameProp, {
10459
+ [`${classBase17}-error`]: errorMessage
10080
10460
  }),
10081
10461
  "data-text": value,
10082
- children: /* @__PURE__ */ jsx32(
10462
+ children: /* @__PURE__ */ jsx37(
10083
10463
  VuuInput,
10084
10464
  {
10085
10465
  ...props,
10086
10466
  errorMessage,
10087
- inputProps: { ...inputProps, className: `${classBase12}-input` },
10467
+ inputProps: { ...inputProps, className: `${classBase17}-input` },
10088
10468
  onCommit,
10089
10469
  ref: forwardedRef,
10090
10470
  style: { padding: 0 },
@@ -10097,53 +10477,18 @@ var ExpandoInput = forwardRef20(function ExpandoInput2({
10097
10477
  );
10098
10478
  });
10099
10479
 
10100
- // src/icon-button/Icon.tsx
10101
- import cx15 from "clsx";
10102
- import { jsx as jsx33 } from "react/jsx-runtime";
10103
- var classBase13 = "vuuIcon";
10104
- var Icon = ({
10105
- className,
10106
- name,
10107
- size,
10108
- style: styleProp,
10109
- ...htmlAttributes
10110
- }) => {
10111
- const style = typeof size === "number" ? { ...styleProp, "--vuu-icon-size": `${size}px` } : styleProp;
10112
- return /* @__PURE__ */ jsx33(
10113
- "span",
10114
- {
10115
- ...htmlAttributes,
10116
- className: cx15(classBase13, className),
10117
- "data-icon": name,
10118
- style
10119
- }
10120
- );
10121
- };
10122
-
10123
- // src/icon-button/IconButton.tsx
10124
- import cx16 from "clsx";
10125
- import { Button as Button5 } from "@salt-ds/core";
10126
- import { forwardRef as forwardRef21 } from "react";
10127
- import { jsx as jsx34 } from "react/jsx-runtime";
10128
- var classBase14 = "vuuIconButton";
10129
- var IconButton = forwardRef21(
10130
- function IconButton2({ className, icon, ...buttonProps }, ref) {
10131
- return /* @__PURE__ */ jsx34(Button5, { ...buttonProps, className: cx16(classBase14, className), ref, children: /* @__PURE__ */ jsx34(Icon, { name: icon }) });
10132
- }
10133
- );
10134
-
10135
10480
  // src/inputs/Checkbox.tsx
10136
- import { jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
10481
+ import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
10137
10482
  var Checkbox = (props) => {
10138
10483
  const { onToggle, checked, label } = props;
10139
- return /* @__PURE__ */ jsxs15(
10484
+ return /* @__PURE__ */ jsxs18(
10140
10485
  "div",
10141
10486
  {
10142
10487
  className: "vuuCheckbox",
10143
10488
  onClick: onToggle,
10144
10489
  onKeyUp: (e) => e.key === " " && onToggle(),
10145
10490
  children: [
10146
- /* @__PURE__ */ jsx35(CheckboxIcon, { tabIndex: 0, checked }),
10491
+ /* @__PURE__ */ jsx38(CheckboxIcon, { tabIndex: 0, checked }),
10147
10492
  label
10148
10493
  ]
10149
10494
  }
@@ -10151,13 +10496,13 @@ var Checkbox = (props) => {
10151
10496
  };
10152
10497
 
10153
10498
  // src/inputs/RadioButton.tsx
10154
- import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
10499
+ import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
10155
10500
  var RadioButton = (props) => {
10156
10501
  const { onClick, checked, label, groupName } = props;
10157
- return /* @__PURE__ */ jsxs16("div", { className: "vuuRadioButton", onClick, children: [
10158
- /* @__PURE__ */ jsxs16("div", { className: "radio", children: [
10159
- /* @__PURE__ */ jsx36("input", { type: "radio", name: groupName }),
10160
- /* @__PURE__ */ jsx36(RadioIcon, { checked })
10502
+ return /* @__PURE__ */ jsxs19("div", { className: "vuuRadioButton", onClick, children: [
10503
+ /* @__PURE__ */ jsxs19("div", { className: "radio", children: [
10504
+ /* @__PURE__ */ jsx39("input", { type: "radio", name: groupName }),
10505
+ /* @__PURE__ */ jsx39(RadioIcon, { checked })
10161
10506
  ] }),
10162
10507
  label
10163
10508
  ] });
@@ -10167,12 +10512,12 @@ var RadioButton = (props) => {
10167
10512
  import { Table } from "@vuu-ui/vuu-table";
10168
10513
  import { useId as useId8 } from "@vuu-ui/vuu-utils";
10169
10514
  import { Input as Input4 } from "@salt-ds/core";
10170
- import { forwardRef as forwardRef22, useMemo as useMemo17 } from "react";
10515
+ import { forwardRef as forwardRef23, useMemo as useMemo18 } from "react";
10171
10516
 
10172
10517
  // src/instrument-picker/SearchCell.tsx
10173
10518
  import { registerComponent } from "@vuu-ui/vuu-utils";
10174
- import { jsx as jsx37, jsxs as jsxs17 } from "react/jsx-runtime";
10175
- var classBase15 = "vuuSearchCell";
10519
+ import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
10520
+ var classBase18 = "vuuSearchCell";
10176
10521
  var SearchCell = ({
10177
10522
  column,
10178
10523
  columnMap,
@@ -10180,8 +10525,8 @@ var SearchCell = ({
10180
10525
  }) => {
10181
10526
  const key = columnMap[column.name];
10182
10527
  const value = row[key];
10183
- return /* @__PURE__ */ jsxs17("div", { className: classBase15, tabIndex: -1, children: [
10184
- /* @__PURE__ */ jsx37("span", { "data-icon": "draggable" }),
10528
+ return /* @__PURE__ */ jsxs20("div", { className: classBase18, tabIndex: -1, children: [
10529
+ /* @__PURE__ */ jsx40("span", { "data-icon": "draggable" }),
10185
10530
  value
10186
10531
  ] });
10187
10532
  };
@@ -10190,44 +10535,38 @@ registerComponent("search-cell", SearchCell, "cell-renderer", {
10190
10535
  });
10191
10536
 
10192
10537
  // src/instrument-picker/useInstrumentPicker.ts
10193
- import {
10194
- useControlledTableNavigation
10195
- } from "@vuu-ui/vuu-table";
10196
- import { useCallback as useCallback45, useMemo as useMemo16, useState as useState20 } from "react";
10197
- var defaultItemToString = (columns, columnMap) => (row) => {
10198
- return columns.map(({ name }) => row[columnMap[name]]).join(" ");
10199
- };
10538
+ import { useControlledTableNavigation } from "@vuu-ui/vuu-table";
10539
+ import { useCallback as useCallback49, useMemo as useMemo17, useState as useState21 } from "react";
10540
+ var defaultItemToString = (row) => Object.values(row.data).join(" ");
10200
10541
  var useInstrumentPicker = ({
10201
- columnMap,
10202
- columns,
10203
10542
  dataSource,
10204
10543
  defaultIsOpen,
10205
10544
  isOpen: isOpenProp,
10206
- itemToString: itemToString2 = defaultItemToString(columns, columnMap),
10545
+ itemToString: itemToString2 = defaultItemToString,
10207
10546
  onOpenChange,
10208
10547
  onSelect,
10209
10548
  searchColumns
10210
10549
  }) => {
10211
- const [value, setValue] = useState20("");
10550
+ const [value, setValue] = useState21("");
10212
10551
  const [isOpen, setIsOpen] = useControlled({
10213
10552
  controlled: isOpenProp,
10214
10553
  default: defaultIsOpen != null ? defaultIsOpen : false,
10215
10554
  name: "useDropdownList"
10216
10555
  });
10217
10556
  const { highlightedIndexRef, onKeyDown, tableRef } = useControlledTableNavigation(-1, dataSource.size);
10218
- const baseFilterPattern = useMemo16(
10557
+ const baseFilterPattern = useMemo17(
10219
10558
  // TODO make this contains once server supports it
10220
10559
  () => searchColumns.map((col) => `${col} starts "__VALUE__"`).join(" or "),
10221
10560
  [searchColumns]
10222
10561
  );
10223
- const handleOpenChange = useCallback45(
10562
+ const handleOpenChange = useCallback49(
10224
10563
  (open, closeReason) => {
10225
10564
  setIsOpen(open);
10226
10565
  onOpenChange == null ? void 0 : onOpenChange(open, closeReason);
10227
10566
  },
10228
10567
  [onOpenChange, setIsOpen]
10229
10568
  );
10230
- const handleInputChange = useCallback45(
10569
+ const handleInputChange = useCallback49(
10231
10570
  (evt) => {
10232
10571
  const { value: value2 } = evt.target;
10233
10572
  setValue(value2);
@@ -10245,11 +10584,11 @@ var useInstrumentPicker = ({
10245
10584
  },
10246
10585
  [baseFilterPattern, dataSource, setIsOpen]
10247
10586
  );
10248
- const handleSelectRow = useCallback45(
10587
+ const handleSelectRow = useCallback49(
10249
10588
  (row) => {
10250
- const value2 = itemToString2(row);
10589
+ const value2 = row === null ? "" : itemToString2(row);
10251
10590
  setValue(value2);
10252
- onSelect(row);
10591
+ onSelect == null ? void 0 : onSelect(row);
10253
10592
  handleOpenChange == null ? void 0 : handleOpenChange(false, "select");
10254
10593
  },
10255
10594
  [handleOpenChange, itemToString2, onSelect]
@@ -10276,12 +10615,12 @@ var useInstrumentPicker = ({
10276
10615
  };
10277
10616
 
10278
10617
  // src/instrument-picker/InstrumentPicker.tsx
10279
- import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
10280
- var classBase16 = "vuuInstrumentPicker";
10618
+ import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
10619
+ var classBase19 = "vuuInstrumentPicker";
10281
10620
  if (typeof SearchCell !== "function") {
10282
10621
  console.warn("Instrument Picker: SearchCell module not loaded ");
10283
10622
  }
10284
- var InstrumentPicker = forwardRef22(function InstrumentPicker2({
10623
+ var InstrumentPicker = forwardRef23(function InstrumentPicker2({
10285
10624
  TableProps: { dataSource, ...TableProps3 },
10286
10625
  className,
10287
10626
  columnMap,
@@ -10313,7 +10652,7 @@ var InstrumentPicker = forwardRef22(function InstrumentPicker2({
10313
10652
  onSelect,
10314
10653
  searchColumns
10315
10654
  });
10316
- const endAdornment = useMemo17(() => /* @__PURE__ */ jsx38("span", { "data-icon": "chevron-down" }), []);
10655
+ const endAdornment = useMemo18(() => /* @__PURE__ */ jsx41("span", { "data-icon": "chevron-down" }), []);
10317
10656
  const tableProps = {
10318
10657
  ...TableProps3,
10319
10658
  config: {
@@ -10321,7 +10660,7 @@ var InstrumentPicker = forwardRef22(function InstrumentPicker2({
10321
10660
  zebraStripes: false
10322
10661
  }
10323
10662
  };
10324
- return /* @__PURE__ */ jsxs18(
10663
+ return /* @__PURE__ */ jsxs21(
10325
10664
  DropdownBase,
10326
10665
  {
10327
10666
  ...htmlAttributes,
@@ -10334,7 +10673,7 @@ var InstrumentPicker = forwardRef22(function InstrumentPicker2({
10334
10673
  ref: forwardedRef,
10335
10674
  width,
10336
10675
  children: [
10337
- /* @__PURE__ */ jsx38(
10676
+ /* @__PURE__ */ jsx41(
10338
10677
  Input4,
10339
10678
  {
10340
10679
  ...inputProps,
@@ -10343,14 +10682,14 @@ var InstrumentPicker = forwardRef22(function InstrumentPicker2({
10343
10682
  value
10344
10683
  }
10345
10684
  ),
10346
- /* @__PURE__ */ jsx38(
10685
+ /* @__PURE__ */ jsx41(
10347
10686
  Table,
10348
10687
  {
10349
10688
  rowHeight: 25,
10350
10689
  renderBufferSize: 100,
10351
10690
  ...tableProps,
10352
10691
  ...tableHandlers,
10353
- className: `${classBase16}-list`,
10692
+ className: `${classBase19}-list`,
10354
10693
  height: 200,
10355
10694
  highlightedIndex,
10356
10695
  dataSource,
@@ -10371,13 +10710,13 @@ import {
10371
10710
  useControlledTableNavigation as useControlledTableNavigation2
10372
10711
  } from "@vuu-ui/vuu-table";
10373
10712
  import { Input as Input5 } from "@salt-ds/core";
10374
- import cx17 from "clsx";
10375
- import { useCallback as useCallback47 } from "react";
10713
+ import cx19 from "clsx";
10714
+ import { useCallback as useCallback51 } from "react";
10376
10715
 
10377
10716
  // src/instrument-search/SearchCell.tsx
10378
10717
  import { registerComponent as registerComponent2 } from "@vuu-ui/vuu-utils";
10379
- import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
10380
- var classBase17 = "vuuSearchCell";
10718
+ import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
10719
+ var classBase20 = "vuuSearchCell";
10381
10720
  var SearchCell2 = ({
10382
10721
  column,
10383
10722
  columnMap,
@@ -10385,8 +10724,8 @@ var SearchCell2 = ({
10385
10724
  }) => {
10386
10725
  const key = columnMap[column.name];
10387
10726
  const value = row[key];
10388
- return /* @__PURE__ */ jsxs19("div", { className: classBase17, tabIndex: -1, children: [
10389
- /* @__PURE__ */ jsx39("span", { "data-icon": "draggable" }),
10727
+ return /* @__PURE__ */ jsxs22("div", { className: classBase20, tabIndex: -1, children: [
10728
+ /* @__PURE__ */ jsx42("span", { "data-icon": "draggable" }),
10390
10729
  value
10391
10730
  ] });
10392
10731
  };
@@ -10395,18 +10734,18 @@ registerComponent2("search-cell", SearchCell2, "cell-renderer", {
10395
10734
  });
10396
10735
 
10397
10736
  // src/instrument-search/useInstrumentSearch.ts
10398
- import { useCallback as useCallback46, useMemo as useMemo18, useState as useState21 } from "react";
10737
+ import { useCallback as useCallback50, useMemo as useMemo19, useState as useState22 } from "react";
10399
10738
  var useInstrumentSearch = ({
10400
10739
  dataSource,
10401
10740
  searchColumns = ["description"]
10402
10741
  }) => {
10403
- const [searchState, setSearchState] = useState21({ searchText: "", filter: "" });
10404
- const baseFilterPattern = useMemo18(
10742
+ const [searchState, setSearchState] = useState22({ searchText: "", filter: "" });
10743
+ const baseFilterPattern = useMemo19(
10405
10744
  // TODO make this contains once server supports it
10406
10745
  () => searchColumns.map((col) => `${col} starts "__VALUE__"`).join(" or "),
10407
10746
  [searchColumns]
10408
10747
  );
10409
- const handleChange = useCallback46(
10748
+ const handleChange = useCallback50(
10410
10749
  (evt) => {
10411
10750
  const { value } = evt.target;
10412
10751
  const filter = baseFilterPattern.replaceAll("__VALUE__", value);
@@ -10430,8 +10769,8 @@ var useInstrumentSearch = ({
10430
10769
  };
10431
10770
 
10432
10771
  // src/instrument-search/InstrumentSearch.tsx
10433
- import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
10434
- var classBase18 = "vuuInstrumentSearch";
10772
+ import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
10773
+ var classBase21 = "vuuInstrumentSearch";
10435
10774
  if (typeof SearchCell2 !== "function") {
10436
10775
  console.warn("Instrument Search: SearchCell module not loaded ");
10437
10776
  }
@@ -10451,7 +10790,7 @@ var defaultTableConfig = {
10451
10790
  ],
10452
10791
  rowSeparators: true
10453
10792
  };
10454
- var searchIcon = /* @__PURE__ */ jsx40("span", { "data-icon": "search" });
10793
+ var searchIcon = /* @__PURE__ */ jsx43("span", { "data-icon": "search" });
10455
10794
  var InstrumentSearch = ({
10456
10795
  TableProps: TableProps3,
10457
10796
  autoFocus = false,
@@ -10467,14 +10806,14 @@ var InstrumentSearch = ({
10467
10806
  searchColumns
10468
10807
  });
10469
10808
  const { highlightedIndexRef, onHighlight, onKeyDown, tableRef } = useControlledTableNavigation2(-1, (_a2 = dataSource == null ? void 0 : dataSource.size) != null ? _a2 : 0);
10470
- const searchCallbackRef = useCallback47((el) => {
10809
+ const searchCallbackRef = useCallback51((el) => {
10471
10810
  setTimeout(() => {
10472
10811
  var _a3;
10473
10812
  (_a3 = el == null ? void 0 : el.querySelector("input")) == null ? void 0 : _a3.focus();
10474
10813
  }, 100);
10475
10814
  }, []);
10476
- return /* @__PURE__ */ jsxs20("div", { ...htmlAttributes, className: cx17(classBase18, className), children: [
10477
- /* @__PURE__ */ jsx40("div", { className: `${classBase18}-inputField`, children: /* @__PURE__ */ jsx40(
10815
+ return /* @__PURE__ */ jsxs23("div", { ...htmlAttributes, className: cx19(classBase21, className), children: [
10816
+ /* @__PURE__ */ jsx43("div", { className: `${classBase21}-inputField`, children: /* @__PURE__ */ jsx43(
10478
10817
  Input5,
10479
10818
  {
10480
10819
  inputProps: { onKeyDown },
@@ -10485,7 +10824,7 @@ var InstrumentSearch = ({
10485
10824
  onChange
10486
10825
  }
10487
10826
  ) }),
10488
- dataSource ? /* @__PURE__ */ jsx40(
10827
+ dataSource ? /* @__PURE__ */ jsx43(
10489
10828
  Table2,
10490
10829
  {
10491
10830
  disableFocus: true,
@@ -10495,7 +10834,7 @@ var InstrumentSearch = ({
10495
10834
  highlightedIndex: highlightedIndexRef.current,
10496
10835
  renderBufferSize: 100,
10497
10836
  ...TableProps3,
10498
- className: `${classBase18}-list`,
10837
+ className: `${classBase21}-list`,
10499
10838
  dataSource,
10500
10839
  navigationStyle: "row",
10501
10840
  onHighlight,
@@ -10514,10 +10853,10 @@ import {
10514
10853
  isValidNumber as isValidNumber5,
10515
10854
  numericFormatter
10516
10855
  } from "@vuu-ui/vuu-utils";
10517
- import { memo, useMemo as useMemo19, useRef as useRef34 } from "react";
10518
- import cx18 from "clsx";
10519
- import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
10520
- var classBase19 = "vuuPriceTicker";
10856
+ import { memo, useMemo as useMemo20, useRef as useRef36 } from "react";
10857
+ import cx20 from "clsx";
10858
+ import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
10859
+ var classBase22 = "vuuPriceTicker";
10521
10860
  var getValueFormatter = (decimals) => numericFormatter({
10522
10861
  type: {
10523
10862
  name: "number",
@@ -10536,14 +10875,14 @@ var PriceTicker = memo(
10536
10875
  showArrow,
10537
10876
  ...htmlAttributes
10538
10877
  }) => {
10539
- const ref = useRef34(INITIAL_VALUE);
10878
+ const ref = useRef36(INITIAL_VALUE);
10540
10879
  const [prevValue, prevDirection] = ref.current;
10541
- const formatNumber = useMemo19(() => getValueFormatter(decimals), [decimals]);
10880
+ const formatNumber = useMemo20(() => getValueFormatter(decimals), [decimals]);
10542
10881
  const direction = isValidNumber5(prevValue) ? getMovingValueDirection(price, prevDirection, prevValue, decimals) : "";
10543
10882
  ref.current = [price, direction];
10544
- return /* @__PURE__ */ jsxs21("div", { ...htmlAttributes, className: cx18(classBase19, className, direction), children: [
10883
+ return /* @__PURE__ */ jsxs24("div", { ...htmlAttributes, className: cx20(classBase22, className, direction), children: [
10545
10884
  formatNumber(price),
10546
- showArrow ? /* @__PURE__ */ jsx41("span", { "data-icon": "price-arrow" }) : null
10885
+ showArrow ? /* @__PURE__ */ jsx44("span", { "data-icon": "price-arrow" }) : null
10547
10886
  ] });
10548
10887
  }
10549
10888
  );
@@ -10551,24 +10890,30 @@ PriceTicker.displayName = "PriceTicker";
10551
10890
 
10552
10891
  // src/split-button/SplitButton.tsx
10553
10892
  import { PopupMenu as PopupMenu2 } from "@vuu-ui/vuu-popups";
10554
- import { Button as Button6 } from "@salt-ds/core";
10893
+ import { Button as Button5, useForkRef as useForkRef9 } from "@salt-ds/core";
10894
+ import { forwardRef as forwardRef24 } from "react";
10555
10895
 
10556
10896
  // src/split-button/useSplitButton.ts
10557
10897
  import { dispatchMouseEvent as dispatchMouseEvent2 } from "@vuu-ui/vuu-utils";
10558
10898
  import {
10559
- useCallback as useCallback48,
10560
- useRef as useRef35
10899
+ useCallback as useCallback52,
10900
+ useRef as useRef37
10561
10901
  } from "react";
10902
+ var focusTargetIsEditableLabel = (target) => {
10903
+ if (target.tagName === "INPUT") {
10904
+ return true;
10905
+ }
10906
+ return false;
10907
+ };
10562
10908
  var useSplitButton = ({
10563
10909
  ButtonProps: ButtonPropsProp,
10564
10910
  PopupMenuProps: PopupMenuProps3,
10565
- classBase: classBase26,
10566
- onClick,
10567
- segmented
10911
+ classBase: classBase30,
10912
+ onClick
10568
10913
  }) => {
10569
- const buttonRef = useRef35(null);
10570
- const rootRef = useRef35(null);
10571
- const onMenuClose = useCallback48((reason) => {
10914
+ const buttonRef = useRef37(null);
10915
+ const rootRef = useRef37(null);
10916
+ const onMenuClose = useCallback52((reason) => {
10572
10917
  var _a2;
10573
10918
  if ((reason == null ? void 0 : reason.type) !== "tab-away") {
10574
10919
  const buttonMain = (_a2 = rootRef.current) == null ? void 0 : _a2.querySelector(
@@ -10580,17 +10925,23 @@ var useSplitButton = ({
10580
10925
  const menuProps = {
10581
10926
  ...PopupMenuProps3,
10582
10927
  anchorElement: rootRef,
10583
- menuClassName: `${classBase26}-menu`,
10928
+ menuClassName: `${classBase30}-menu`,
10584
10929
  onMenuClose,
10585
10930
  popupPlacement: "below-full-width"
10586
10931
  };
10587
- const handleRootFocus = useCallback48(() => {
10932
+ const handleRootFocus = useCallback52((evt) => {
10588
10933
  const { current: splitButton } = rootRef;
10589
10934
  if (!(splitButton == null ? void 0 : splitButton.classList.contains("vuuFocusVisible"))) {
10590
10935
  splitButton == null ? void 0 : splitButton.classList.add("vuuFocusVisible");
10936
+ if (!focusTargetIsEditableLabel(evt.target)) {
10937
+ requestAnimationFrame(() => {
10938
+ var _a2;
10939
+ (_a2 = buttonRef.current) == null ? void 0 : _a2.focus();
10940
+ });
10941
+ }
10591
10942
  }
10592
10943
  }, []);
10593
- const handleRootBlur = useCallback48((evt) => {
10944
+ const handleRootBlur = useCallback52((evt) => {
10594
10945
  const { current: splitButton } = rootRef;
10595
10946
  const target = evt.relatedTarget;
10596
10947
  if (!(splitButton == null ? void 0 : splitButton.contains(target))) {
@@ -10599,29 +10950,23 @@ var useSplitButton = ({
10599
10950
  }
10600
10951
  }
10601
10952
  }, []);
10602
- const handleButtonKeyDown = useCallback48(
10953
+ const handleButtonKeyDown = useCallback52(
10603
10954
  (evt) => {
10604
10955
  var _a2;
10605
10956
  if (evt.key === "ArrowDown") {
10606
10957
  const popupTrigger = (_a2 = rootRef.current) == null ? void 0 : _a2.querySelector(
10607
- `.${classBase26}-trigger`
10958
+ `.${classBase30}-trigger`
10608
10959
  );
10609
10960
  if (popupTrigger) {
10610
10961
  dispatchMouseEvent2(popupTrigger, "click");
10611
10962
  }
10612
10963
  }
10613
10964
  },
10614
- [classBase26]
10615
- );
10616
- const handleClick = useCallback48(
10617
- (evt) => {
10618
- onClick == null ? void 0 : onClick(evt);
10619
- },
10620
- [onClick]
10965
+ [classBase30]
10621
10966
  );
10622
10967
  const ButtonProps6 = {
10623
10968
  ...ButtonPropsProp,
10624
- onClick: segmented ? handleClick : void 0,
10969
+ onClick,
10625
10970
  onKeyDown: handleButtonKeyDown
10626
10971
  };
10627
10972
  return {
@@ -10629,83 +10974,103 @@ var useSplitButton = ({
10629
10974
  PopupMenuProps: menuProps,
10630
10975
  buttonRef,
10631
10976
  rootRef,
10632
- onClick: segmented ? void 0 : handleClick,
10633
10977
  onBlur: handleRootBlur,
10634
10978
  onFocus: handleRootFocus
10635
10979
  };
10636
10980
  };
10637
10981
 
10638
10982
  // src/split-button/SplitButton.tsx
10639
- import cx19 from "clsx";
10640
- import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
10641
- var classBase20 = "vuuSplitButton";
10642
- var SplitButton = ({
10643
- ButtonProps: ButtonPropsProp,
10644
- PopupMenuProps: PopupMenuPropsProp,
10645
- buttonText,
10646
- disabled = false,
10647
- onClick,
10648
- segmented = false,
10649
- variant = "primary",
10650
- ...htmlAttributes
10651
- }) => {
10652
- var _a2;
10653
- const { ButtonProps: ButtonProps6, buttonRef, rootRef, PopupMenuProps: PopupMenuProps3, ...rootProps } = useSplitButton({
10983
+ import cx21 from "clsx";
10984
+ import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
10985
+ var classBase23 = "vuuSplitButton";
10986
+ var SplitButton = forwardRef24(
10987
+ function SplitButton2({
10654
10988
  ButtonProps: ButtonPropsProp,
10655
10989
  PopupMenuProps: PopupMenuPropsProp,
10656
- classBase: classBase20,
10990
+ children,
10991
+ className,
10992
+ disabled = false,
10657
10993
  onClick,
10658
- segmented
10659
- });
10660
- return /* @__PURE__ */ jsxs22(
10661
- "div",
10994
+ segmented = false,
10995
+ variant = "primary",
10996
+ ...htmlAttributes
10997
+ }, forwardedRef) {
10998
+ var _a2;
10999
+ const { ButtonProps: ButtonProps6, buttonRef, rootRef, PopupMenuProps: PopupMenuProps3, ...rootProps } = useSplitButton({
11000
+ ButtonProps: ButtonPropsProp,
11001
+ PopupMenuProps: PopupMenuPropsProp,
11002
+ classBase: classBase23,
11003
+ onClick,
11004
+ segmented
11005
+ });
11006
+ return /* @__PURE__ */ jsxs25(
11007
+ "div",
11008
+ {
11009
+ ...htmlAttributes,
11010
+ ...rootProps,
11011
+ className: cx21(classBase23, `${classBase23}-${variant}`, className, {
11012
+ [`${classBase23}-disabled`]: disabled,
11013
+ [`${classBase23}-segmented`]: segmented
11014
+ }),
11015
+ ref: useForkRef9(forwardedRef, rootRef),
11016
+ "data-showcase-center": true,
11017
+ tabIndex: -1,
11018
+ children: [
11019
+ /* @__PURE__ */ jsx45(
11020
+ Button5,
11021
+ {
11022
+ ...ButtonProps6,
11023
+ className: `${classBase23}-main`,
11024
+ disabled,
11025
+ ref: buttonRef,
11026
+ variant,
11027
+ children
11028
+ }
11029
+ ),
11030
+ /* @__PURE__ */ jsx45(
11031
+ PopupMenu2,
11032
+ {
11033
+ ...PopupMenuProps3,
11034
+ className: `${classBase23}-trigger`,
11035
+ disabled,
11036
+ icon: (_a2 = PopupMenuProps3 == null ? void 0 : PopupMenuProps3.icon) != null ? _a2 : "chevron-down",
11037
+ tabIndex: segmented ? 0 : -1,
11038
+ variant
11039
+ }
11040
+ )
11041
+ ]
11042
+ }
11043
+ );
11044
+ }
11045
+ );
11046
+
11047
+ // src/split-button/SplitStateButton.tsx
11048
+ import cx22 from "clsx";
11049
+ import { forwardRef as forwardRef25 } from "react";
11050
+ import { jsx as jsx46 } from "react/jsx-runtime";
11051
+ var classBase24 = "vuuSplitStateButton";
11052
+ var SplitStateButton = forwardRef25(function SplitStateButton2({ className, selected, ...splitButtonProps }, forwardedRef) {
11053
+ return /* @__PURE__ */ jsx46(
11054
+ SplitButton,
10662
11055
  {
10663
- ...htmlAttributes,
10664
- ...rootProps,
10665
- className: cx19(classBase20, `${classBase20}-${variant}`, {
10666
- [`${classBase20}-disabled`]: disabled,
10667
- [`${classBase20}-segmented`]: segmented
10668
- }),
10669
- ref: rootRef,
10670
- "data-showcase-center": true,
10671
- children: [
10672
- /* @__PURE__ */ jsx42(
10673
- Button6,
10674
- {
10675
- ...ButtonProps6,
10676
- className: `${classBase20}-main`,
10677
- disabled,
10678
- ref: buttonRef,
10679
- variant,
10680
- children: buttonText
10681
- }
10682
- ),
10683
- /* @__PURE__ */ jsx42(
10684
- PopupMenu2,
10685
- {
10686
- ...PopupMenuProps3,
10687
- className: `${classBase20}-trigger`,
10688
- disabled,
10689
- icon: (_a2 = PopupMenuProps3 == null ? void 0 : PopupMenuProps3.icon) != null ? _a2 : "chevron-down",
10690
- tabIndex: segmented ? 0 : -1,
10691
- variant
10692
- }
10693
- )
10694
- ]
11056
+ ...splitButtonProps,
11057
+ "aria-checked": selected,
11058
+ className: cx22(classBase24, className),
11059
+ ref: forwardedRef
10695
11060
  }
10696
11061
  );
10697
- };
11062
+ });
10698
11063
 
10699
11064
  // src/tabstrip/Tabstrip.tsx
10700
11065
  import { asReactElements as asReactElements2, useId as useId9 } from "@vuu-ui/vuu-utils";
10701
- import cx20 from "clsx";
10702
- import React4, { useMemo as useMemo21, useRef as useRef39 } from "react";
11066
+ import cx23 from "clsx";
11067
+ import React4, { useMemo as useMemo22, useRef as useRef41 } from "react";
10703
11068
 
10704
11069
  // src/tabstrip/useTabstrip.ts
10705
11070
  import { dispatchMouseEvent as dispatchMouseEvent4 } from "@vuu-ui/vuu-utils";
10706
11071
  import {
10707
- useCallback as useCallback52,
10708
- useRef as useRef38
11072
+ useCallback as useCallback56,
11073
+ useRef as useRef40
10709
11074
  } from "react";
10710
11075
 
10711
11076
  // src/tabstrip/TabMenuOptions.ts
@@ -10739,22 +11104,22 @@ var getIndexOfEditedItem = (container) => getIndexOfItem(container, ".vuuEditabl
10739
11104
 
10740
11105
  // src/tabstrip/useAnimatedSelectionThumb.ts
10741
11106
  import { isValidNumber as isValidNumber6, MEASURES as MEASURES2 } from "@vuu-ui/vuu-utils";
10742
- import { useCallback as useCallback49, useMemo as useMemo20, useRef as useRef36 } from "react";
11107
+ import { useCallback as useCallback53, useMemo as useMemo21, useRef as useRef38 } from "react";
10743
11108
  var useAnimatedSelectionThumb = (containerRef, activeTabIndex, orientation = "horizontal") => {
10744
- const animationSuspendedRef = useRef36(false);
10745
- const suspendAnimation = useCallback49(() => {
11109
+ const animationSuspendedRef = useRef38(false);
11110
+ const suspendAnimation = useCallback53(() => {
10746
11111
  animationSuspendedRef.current = true;
10747
11112
  }, []);
10748
- const resumeAnimation = useCallback49(() => {
11113
+ const resumeAnimation = useCallback53(() => {
10749
11114
  animationSuspendedRef.current = false;
10750
11115
  }, []);
10751
- const onTransitionEnd = useCallback49(() => {
11116
+ const onTransitionEnd = useCallback53(() => {
10752
11117
  var _a2, _b;
10753
11118
  (_a2 = containerRef.current) == null ? void 0 : _a2.style.setProperty("--tab-thumb-transition", "none");
10754
11119
  (_b = containerRef.current) == null ? void 0 : _b.removeEventListener("transitionend", onTransitionEnd);
10755
11120
  }, [containerRef]);
10756
- const lastSelectedRef = useRef36(-1);
10757
- return useMemo20(() => {
11121
+ const lastSelectedRef = useRef38(-1);
11122
+ return useMemo21(() => {
10758
11123
  var _a2, _b;
10759
11124
  let offset = 0;
10760
11125
  let size = 0;
@@ -10828,9 +11193,9 @@ import {
10828
11193
  getFocusableElement
10829
11194
  } from "@vuu-ui/vuu-utils";
10830
11195
  import {
10831
- useCallback as useCallback50,
10832
- useRef as useRef37,
10833
- useState as useState22
11196
+ useCallback as useCallback54,
11197
+ useRef as useRef39,
11198
+ useState as useState23
10834
11199
  } from "react";
10835
11200
  import {
10836
11201
  ArrowDown as ArrowDown2,
@@ -10888,23 +11253,23 @@ var useKeyboardNavigation2 = ({
10888
11253
  selectedIndex: selectedTabIndex = 0
10889
11254
  }) => {
10890
11255
  const manualActivation = keyBoardActivation === "manual";
10891
- const mouseClickPending = useRef37(false);
10892
- const focusedRef = useRef37(-1);
10893
- const [hasFocus, setHasFocus] = useState22(false);
10894
- const [, forceRefresh] = useState22({});
11256
+ const mouseClickPending = useRef39(false);
11257
+ const focusedRef = useRef39(-1);
11258
+ const [hasFocus, setHasFocus] = useState23(false);
11259
+ const [, forceRefresh] = useState23({});
10895
11260
  const [highlightedIdx, _setHighlightedIdx] = useControlled9({
10896
11261
  controlled: highlightedIdxProp,
10897
11262
  default: defaultHighlightedIdx,
10898
11263
  name: "UseKeyboardNavigation"
10899
11264
  });
10900
- const setHighlightedIdx = useCallback50(
11265
+ const setHighlightedIdx = useCallback54(
10901
11266
  (value) => {
10902
11267
  _setHighlightedIdx(focusedRef.current = value);
10903
11268
  },
10904
11269
  [_setHighlightedIdx]
10905
11270
  );
10906
- const keyboardNavigation = useRef37(false);
10907
- const focusTab = useCallback50(
11271
+ const keyboardNavigation = useRef39(false);
11272
+ const focusTab = useCallback54(
10908
11273
  (tabIndex, immediateFocus = false, withKeyboard, delay = 70) => {
10909
11274
  setHighlightedIdx(tabIndex);
10910
11275
  if (withKeyboard === true && !keyboardNavigation.current) {
@@ -10944,14 +11309,14 @@ var useKeyboardNavigation2 = ({
10944
11309
  }
10945
11310
  }
10946
11311
  };
10947
- const getIndexCount = useCallback50(
11312
+ const getIndexCount = useCallback54(
10948
11313
  () => {
10949
11314
  var _a2, _b;
10950
11315
  return (_b = (_a2 = containerRef.current) == null ? void 0 : _a2.querySelectorAll(`[data-index]`).length) != null ? _b : 0;
10951
11316
  },
10952
11317
  [containerRef]
10953
11318
  );
10954
- const nextFocusableItemIdx = useCallback50(
11319
+ const nextFocusableItemIdx = useCallback54(
10955
11320
  (direction = "fwd", idx) => {
10956
11321
  const indexCount = getIndexCount();
10957
11322
  const index = typeof idx === "number" ? idx : indexCount;
@@ -10971,7 +11336,7 @@ var useKeyboardNavigation2 = ({
10971
11336
  },
10972
11337
  [containerRef, getIndexCount]
10973
11338
  );
10974
- const navigateChildItems = useCallback50(
11339
+ const navigateChildItems = useCallback54(
10975
11340
  (e, forceFocusVisible = false) => {
10976
11341
  const direction = navigation[orientation][e.key];
10977
11342
  const nextIdx = nextFocusableItemIdx(direction, highlightedIdx);
@@ -10993,14 +11358,14 @@ var useKeyboardNavigation2 = ({
10993
11358
  orientation
10994
11359
  ]
10995
11360
  );
10996
- const highlightedTabHasMenu = useCallback50(() => {
11361
+ const highlightedTabHasMenu = useCallback54(() => {
10997
11362
  const el = getElementByPosition(containerRef.current, highlightedIdx);
10998
11363
  if (el) {
10999
11364
  return el.querySelector(".vuuPopupMenu") != null;
11000
11365
  }
11001
11366
  return false;
11002
11367
  }, [containerRef, highlightedIdx]);
11003
- const activateTabMenu = useCallback50(() => {
11368
+ const activateTabMenu = useCallback54(() => {
11004
11369
  const el = getElementByPosition(containerRef.current, highlightedIdx);
11005
11370
  const menuEl = el == null ? void 0 : el.querySelector(".vuuPopupMenu");
11006
11371
  if (menuEl) {
@@ -11008,7 +11373,7 @@ var useKeyboardNavigation2 = ({
11008
11373
  }
11009
11374
  return false;
11010
11375
  }, [containerRef, highlightedIdx]);
11011
- const handleKeyDown = useCallback50(
11376
+ const handleKeyDown = useCallback54(
11012
11377
  (e) => {
11013
11378
  if (getIndexCount() > 0 && isNavigationKey2(e.key, orientation)) {
11014
11379
  e.preventDefault();
@@ -11033,7 +11398,7 @@ var useKeyboardNavigation2 = ({
11033
11398
  const handleItemClick = (_, tabIndex) => {
11034
11399
  setHighlightedIdx(tabIndex);
11035
11400
  };
11036
- const handleFocus = useCallback50(() => {
11401
+ const handleFocus = useCallback54(() => {
11037
11402
  if (!hasFocus) {
11038
11403
  setHasFocus(true);
11039
11404
  if (!mouseClickPending.current) {
@@ -11043,7 +11408,7 @@ var useKeyboardNavigation2 = ({
11043
11408
  }
11044
11409
  }
11045
11410
  }, [hasFocus]);
11046
- const handleContainerMouseDown = useCallback50(() => {
11411
+ const handleContainerMouseDown = useCallback54(() => {
11047
11412
  if (!hasFocus) {
11048
11413
  mouseClickPending.current = true;
11049
11414
  }
@@ -11081,7 +11446,7 @@ var useKeyboardNavigation2 = ({
11081
11446
 
11082
11447
  // src/tabstrip/useSelection.ts
11083
11448
  import { useControlled as useControlled10 } from "@salt-ds/core";
11084
- import { useCallback as useCallback51 } from "react";
11449
+ import { useCallback as useCallback55 } from "react";
11085
11450
  var defaultSelectionKeys2 = ["Enter", " "];
11086
11451
  var isTabElement = (el) => el && el.matches('[class*="vuuTab "]');
11087
11452
  var useSelection2 = ({
@@ -11096,18 +11461,18 @@ var useSelection2 = ({
11096
11461
  name: "Tabstrip",
11097
11462
  state: "value"
11098
11463
  });
11099
- const isSelectionEvent = useCallback51(
11464
+ const isSelectionEvent = useCallback55(
11100
11465
  (evt) => defaultSelectionKeys2.includes(evt.key),
11101
11466
  []
11102
11467
  );
11103
- const selectItem = useCallback51(
11468
+ const selectItem = useCallback55(
11104
11469
  (tabIndex) => {
11105
11470
  setSelected(tabIndex);
11106
11471
  onSelectionChange == null ? void 0 : onSelectionChange(tabIndex);
11107
11472
  },
11108
11473
  [onSelectionChange, setSelected]
11109
11474
  );
11110
- const handleKeyDown = useCallback51(
11475
+ const handleKeyDown = useCallback55(
11111
11476
  (e) => {
11112
11477
  const targetElement = e.target;
11113
11478
  if (isSelectionEvent(e) && highlightedIdx !== selected && isTabElement(targetElement)) {
@@ -11118,7 +11483,7 @@ var useSelection2 = ({
11118
11483
  },
11119
11484
  [isSelectionEvent, highlightedIdx, selected, selectItem]
11120
11485
  );
11121
- const onClick = useCallback51(
11486
+ const onClick = useCallback55(
11122
11487
  (e, tabIndex) => {
11123
11488
  if (tabIndex !== selected) {
11124
11489
  selectItem(tabIndex);
@@ -11158,7 +11523,7 @@ var useTabstrip = ({
11158
11523
  orientation,
11159
11524
  keyBoardActivation
11160
11525
  }) => {
11161
- const lastSelection = useRef38(activeTabIndexProp);
11526
+ const lastSelection = useRef40(activeTabIndexProp);
11162
11527
  const {
11163
11528
  focusTab: keyboardHookFocusTab,
11164
11529
  highlightedIdx,
@@ -11188,7 +11553,7 @@ var useTabstrip = ({
11188
11553
  animateSelectionThumb ? selectionHookSelected : -1,
11189
11554
  orientation
11190
11555
  );
11191
- const handleDrop = useCallback52(
11556
+ const handleDrop = useCallback56(
11192
11557
  ({ fromIndex, toIndex }) => {
11193
11558
  const { current: selected } = lastSelection;
11194
11559
  console.log(
@@ -11230,7 +11595,7 @@ var useTabstrip = ({
11230
11595
  orientation: "horizontal",
11231
11596
  itemQuery: ".vuuOverflowContainer-item"
11232
11597
  });
11233
- const handleExitEditMode = useCallback52(
11598
+ const handleExitEditMode = useCallback56(
11234
11599
  (originalValue, editedValue, allowDeactivation, tabIndex) => {
11235
11600
  console.log(
11236
11601
  `handleExitEditMode ${originalValue} ${editedValue} ${allowDeactivation} ${tabIndex}`
@@ -11242,7 +11607,7 @@ var useTabstrip = ({
11242
11607
  },
11243
11608
  [keyboardHookFocusTab, onExitEditMode]
11244
11609
  );
11245
- const handleClick = useCallback52(
11610
+ const handleClick = useCallback56(
11246
11611
  (evt, tabIndex) => {
11247
11612
  keyboardHookHandleClick(evt, tabIndex);
11248
11613
  selectionHookHandleClick(evt, tabIndex);
@@ -11250,7 +11615,7 @@ var useTabstrip = ({
11250
11615
  // [dragDropHook.isDragging, keyboardHook, selectionHook]
11251
11616
  [keyboardHookHandleClick, selectionHookHandleClick]
11252
11617
  );
11253
- const getEditableLabel = useCallback52(
11618
+ const getEditableLabel = useCallback56(
11254
11619
  (tabIndex = highlightedIdx) => {
11255
11620
  const targetEl = getElementWithIndex(containerRef.current, tabIndex);
11256
11621
  if (targetEl) {
@@ -11259,7 +11624,7 @@ var useTabstrip = ({
11259
11624
  },
11260
11625
  [containerRef, highlightedIdx]
11261
11626
  );
11262
- const tabInEditMode = useCallback52(
11627
+ const tabInEditMode = useCallback56(
11263
11628
  (tabIndex = highlightedIdx) => {
11264
11629
  const editableLabel = getEditableLabel(tabIndex);
11265
11630
  if (editableLabel) {
@@ -11269,7 +11634,7 @@ var useTabstrip = ({
11269
11634
  },
11270
11635
  [getEditableLabel, highlightedIdx]
11271
11636
  );
11272
- const editTab = useCallback52(
11637
+ const editTab = useCallback56(
11273
11638
  (tabIndex = highlightedIdx) => {
11274
11639
  const editableLabelEl = getEditableLabel(tabIndex);
11275
11640
  if (editableLabelEl) {
@@ -11278,7 +11643,7 @@ var useTabstrip = ({
11278
11643
  },
11279
11644
  [getEditableLabel, highlightedIdx]
11280
11645
  );
11281
- const handleKeyDown = useCallback52(
11646
+ const handleKeyDown = useCallback56(
11282
11647
  (evt) => {
11283
11648
  keyboardHookHandleKeyDown(evt);
11284
11649
  if (!evt.defaultPrevented) {
@@ -11290,7 +11655,7 @@ var useTabstrip = ({
11290
11655
  },
11291
11656
  [editTab, keyboardHookHandleKeyDown, selectionHookHandleKeyDown]
11292
11657
  );
11293
- const handleCloseTabFromMenu = useCallback52(
11658
+ const handleCloseTabFromMenu = useCallback56(
11294
11659
  (tabIndex) => {
11295
11660
  const selectedTabIndex = getIndexOfSelectedTab(containerRef.current);
11296
11661
  const newActiveTabIndex = selectedTabIndex > tabIndex ? selectedTabIndex - 1 : selectedTabIndex === tabIndex ? 0 : selectedTabIndex;
@@ -11303,14 +11668,14 @@ var useTabstrip = ({
11303
11668
  },
11304
11669
  [containerRef, onCloseTab, resumeAnimation, suspendAnimation]
11305
11670
  );
11306
- const handleRenameTabFromMenu = useCallback52(
11671
+ const handleRenameTabFromMenu = useCallback56(
11307
11672
  (tabIndex) => {
11308
11673
  editTab(tabIndex);
11309
11674
  return true;
11310
11675
  },
11311
11676
  [editTab]
11312
11677
  );
11313
- const handleTabMenuAction = useCallback52(
11678
+ const handleTabMenuAction = useCallback56(
11314
11679
  (action) => {
11315
11680
  if (isTabMenuOptions(action.options)) {
11316
11681
  switch (action.menuId) {
@@ -11326,7 +11691,7 @@ var useTabstrip = ({
11326
11691
  },
11327
11692
  [handleCloseTabFromMenu, handleRenameTabFromMenu]
11328
11693
  );
11329
- const handleTabMenuClose = useCallback52(() => {
11694
+ const handleTabMenuClose = useCallback56(() => {
11330
11695
  if (!tabInEditMode()) {
11331
11696
  keyboardHookFocusTab(highlightedIdx);
11332
11697
  } else {
@@ -11338,7 +11703,7 @@ var useTabstrip = ({
11338
11703
  keyboardHookSetHighlightedIndex,
11339
11704
  tabInEditMode
11340
11705
  ]);
11341
- const onSwitchWrappedItemIntoView = useCallback52(
11706
+ const onSwitchWrappedItemIntoView = useCallback56(
11342
11707
  (item) => {
11343
11708
  const index = parseInt(item.index);
11344
11709
  if (!isNaN(index)) {
@@ -11351,7 +11716,7 @@ var useTabstrip = ({
11351
11716
  onFocus: keyboardHook.onFocus,
11352
11717
  onKeyDown: handleKeyDown
11353
11718
  };
11354
- const handleAddTabClick = useCallback52(() => {
11719
+ const handleAddTabClick = useCallback56(() => {
11355
11720
  onAddTab == null ? void 0 : onAddTab();
11356
11721
  requestAnimationFrame(() => {
11357
11722
  const selectedTabIndex = getIndexOfSelectedTab(containerRef.current);
@@ -11384,9 +11749,9 @@ var useTabstrip = ({
11384
11749
  };
11385
11750
 
11386
11751
  // src/tabstrip/Tabstrip.tsx
11387
- import { Fragment as Fragment4, jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
11752
+ import { Fragment as Fragment4, jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
11388
11753
  import { createElement as createElement2 } from "react";
11389
- var classBase21 = "vuuTabstrip";
11754
+ var classBase25 = "vuuTabstrip";
11390
11755
  var Tabstrip = ({
11391
11756
  activeTabIndex: activeTabIndexProp,
11392
11757
  allowAddTab,
@@ -11408,9 +11773,10 @@ var Tabstrip = ({
11408
11773
  showTabMenuButton,
11409
11774
  style: styleProp,
11410
11775
  tabClassName,
11776
+ variant = "secondary",
11411
11777
  ...htmlAttributes
11412
11778
  }) => {
11413
- const rootRef = useRef39(null);
11779
+ const rootRef = useRef41(null);
11414
11780
  const {
11415
11781
  activeTabIndex,
11416
11782
  focusVisible,
@@ -11433,12 +11799,12 @@ var Tabstrip = ({
11433
11799
  orientation
11434
11800
  });
11435
11801
  const id = useId9(idProp);
11436
- const className = cx20(classBase21, `${classBase21}-${orientation}`, classNameProp);
11802
+ const className = cx23(classBase25, classNameProp);
11437
11803
  const style = styleProp || containerStyle ? {
11438
11804
  ...styleProp,
11439
11805
  ...containerStyle
11440
11806
  } : void 0;
11441
- const tabs = useMemo21(
11807
+ const tabs = useMemo22(
11442
11808
  () => asReactElements2(children).map((child, index) => {
11443
11809
  const {
11444
11810
  id: tabId = `${id}-tab-${index}`,
@@ -11452,7 +11818,7 @@ var Tabstrip = ({
11452
11818
  return React4.cloneElement(child, {
11453
11819
  ...tabProps,
11454
11820
  ...tabstripHook.navigationProps,
11455
- className: cx20(className2, tabClassName),
11821
+ className: cx23(className2, tabClassName),
11456
11822
  closeable,
11457
11823
  "data-overflow-priority": selected ? "1" : void 0,
11458
11824
  dragging: draggedItemIndex === index,
@@ -11461,7 +11827,7 @@ var Tabstrip = ({
11461
11827
  id: tabId,
11462
11828
  index,
11463
11829
  key: index,
11464
- location: cx20(location, tabLocation),
11830
+ location: cx23(location, tabLocation),
11465
11831
  selected,
11466
11832
  showMenuButton,
11467
11833
  tabIndex: selected ? 0 : -1
@@ -11472,7 +11838,8 @@ var Tabstrip = ({
11472
11838
  {
11473
11839
  ...tabstripHook.navigationProps,
11474
11840
  "aria-label": "Create Tab",
11475
- className: `${classBase21}-addTabButton`,
11841
+ className: `${classBase25}-addTabButton`,
11842
+ "data-embedded": true,
11476
11843
  icon: "add",
11477
11844
  "data-overflow-priority": "1",
11478
11845
  key: "addButton",
@@ -11499,14 +11866,13 @@ var Tabstrip = ({
11499
11866
  location
11500
11867
  ]
11501
11868
  );
11502
- return /* @__PURE__ */ jsxs23(Fragment4, { children: [
11503
- /* @__PURE__ */ jsx43(
11869
+ return /* @__PURE__ */ jsxs26(Fragment4, { children: [
11870
+ /* @__PURE__ */ jsx47(
11504
11871
  OverflowContainer,
11505
11872
  {
11506
11873
  ...htmlAttributes,
11507
11874
  ...tabstripHook.containerProps,
11508
- className,
11509
- height: 29,
11875
+ className: cx23(className, `${classBase25}-${variant}`),
11510
11876
  id,
11511
11877
  orientation,
11512
11878
  overflowIcon: "more-horiz",
@@ -11521,20 +11887,20 @@ var Tabstrip = ({
11521
11887
  };
11522
11888
 
11523
11889
  // src/tabstrip/Tab.tsx
11524
- import { useForkRef as useForkRef8 } from "@salt-ds/core";
11525
- import cx22 from "clsx";
11890
+ import { useForkRef as useForkRef10 } from "@salt-ds/core";
11891
+ import cx25 from "clsx";
11526
11892
  import {
11527
- forwardRef as forwardRef23,
11528
- useCallback as useCallback53,
11529
- useRef as useRef40
11893
+ forwardRef as forwardRef26,
11894
+ useCallback as useCallback57,
11895
+ useRef as useRef42
11530
11896
  } from "react";
11531
11897
 
11532
11898
  // src/tabstrip/TabMenu.tsx
11533
11899
  import { PopupMenu as PopupMenu3 } from "@vuu-ui/vuu-popups";
11534
- import { useMemo as useMemo22 } from "react";
11535
- import cx21 from "clsx";
11536
- import { jsx as jsx44 } from "react/jsx-runtime";
11537
- var classBase22 = "vuuTabMenu";
11900
+ import { useMemo as useMemo23 } from "react";
11901
+ import cx24 from "clsx";
11902
+ import { jsx as jsx48 } from "react/jsx-runtime";
11903
+ var classBase26 = "vuuTabMenu";
11538
11904
  var TabMenu = ({
11539
11905
  allowClose,
11540
11906
  allowRename,
@@ -11545,7 +11911,7 @@ var TabMenu = ({
11545
11911
  onMenuClose,
11546
11912
  index
11547
11913
  }) => {
11548
- const [menuBuilder, menuOptions] = useMemo22(
11914
+ const [menuBuilder, menuOptions] = useMemo23(
11549
11915
  () => [
11550
11916
  (_location, options) => {
11551
11917
  const menuItems = [];
@@ -11571,26 +11937,27 @@ var TabMenu = ({
11571
11937
  index
11572
11938
  ]
11573
11939
  );
11574
- return /* @__PURE__ */ jsx44(
11940
+ return /* @__PURE__ */ jsx48(
11575
11941
  PopupMenu3,
11576
11942
  {
11577
- className: classBase22,
11943
+ "aria-label": "context menu",
11944
+ className: classBase26,
11945
+ "data-embedded": true,
11578
11946
  menuBuilder,
11579
11947
  menuActionHandler: onMenuAction,
11580
- menuLocation: cx21("tab", location),
11948
+ menuLocation: cx24("tab", location),
11581
11949
  menuOptions,
11582
11950
  onMenuClose,
11583
- tabIndex: -1,
11584
- "aria-label": "context menu"
11951
+ tabIndex: -1
11585
11952
  }
11586
11953
  );
11587
11954
  };
11588
11955
 
11589
11956
  // src/tabstrip/Tab.tsx
11590
- import { jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
11591
- var classBase23 = "vuuTab";
11957
+ import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
11958
+ var classBase27 = "vuuTab";
11592
11959
  var noop2 = () => void 0;
11593
- var Tab = forwardRef23(function Tab2({
11960
+ var Tab = forwardRef26(function Tab2({
11594
11961
  ariaControls,
11595
11962
  children,
11596
11963
  className,
@@ -11619,10 +11986,10 @@ var Tab = forwardRef23(function Tab2({
11619
11986
  if (showMenuButton && typeof onMenuAction !== "function") {
11620
11987
  throw Error("Tab onMenuAction must be provided if showMenuButton is set");
11621
11988
  }
11622
- const rootRef = useRef40(null);
11623
- const editableRef = useRef40(null);
11624
- const setForkRef = useForkRef8(ref, rootRef);
11625
- const handleClick = useCallback53(
11989
+ const rootRef = useRef42(null);
11990
+ const editableRef = useRef42(null);
11991
+ const setForkRef = useForkRef10(ref, rootRef);
11992
+ const handleClick = useCallback57(
11626
11993
  (e) => {
11627
11994
  if (!editing) {
11628
11995
  e.preventDefault();
@@ -11647,7 +12014,7 @@ var Tab = forwardRef23(function Tab2({
11647
12014
  };
11648
12015
  const getLabel = () => {
11649
12016
  if (editable) {
11650
- return /* @__PURE__ */ jsx45(
12017
+ return /* @__PURE__ */ jsx49(
11651
12018
  EditableLabel,
11652
12019
  {
11653
12020
  editing,
@@ -11672,18 +12039,18 @@ var Tab = forwardRef23(function Tab2({
11672
12039
  }
11673
12040
  onFocusProp == null ? void 0 : onFocusProp(evt);
11674
12041
  };
11675
- return /* @__PURE__ */ jsxs24(
12042
+ return /* @__PURE__ */ jsxs27(
11676
12043
  "div",
11677
12044
  {
11678
12045
  ...props,
11679
12046
  "aria-controls": ariaControls,
11680
12047
  "aria-selected": selected,
11681
- className: cx22(classBase23, className, {
11682
- [`${classBase23}-closeable`]: closeable,
12048
+ className: cx25(classBase27, className, {
12049
+ [`${classBase27}-closeable`]: closeable,
11683
12050
  "vuuDraggable-dragAway": dragging,
11684
- [`${classBase23}-editing`]: editing,
11685
- [`${classBase23}-selected`]: selected || void 0,
11686
- [`${classBase23}-vertical`]: orientation === "vertical",
12051
+ [`${classBase27}-editing`]: editing,
12052
+ [`${classBase27}-selected`]: selected || void 0,
12053
+ [`${classBase27}-vertical`]: orientation === "vertical",
11687
12054
  [`vuuFocusVisible`]: focusVisible
11688
12055
  }),
11689
12056
  onClick: handleClick,
@@ -11693,15 +12060,15 @@ var Tab = forwardRef23(function Tab2({
11693
12060
  role: "tab",
11694
12061
  tabIndex,
11695
12062
  children: [
11696
- /* @__PURE__ */ jsx45("div", { className: `${classBase23}-main`, children: /* @__PURE__ */ jsx45(
12063
+ /* @__PURE__ */ jsx49("div", { className: `${classBase27}-main`, children: /* @__PURE__ */ jsx49(
11697
12064
  "span",
11698
12065
  {
11699
- className: `${classBase23}-text`,
12066
+ className: `${classBase27}-text`,
11700
12067
  "data-text": editable ? void 0 : label,
11701
12068
  children: children != null ? children : getLabel()
11702
12069
  }
11703
12070
  ) }),
11704
- showMenuButton ? /* @__PURE__ */ jsx45(
12071
+ showMenuButton ? /* @__PURE__ */ jsx49(
11705
12072
  TabMenu,
11706
12073
  {
11707
12074
  allowClose: closeable,
@@ -11721,14 +12088,14 @@ var Tab = forwardRef23(function Tab2({
11721
12088
 
11722
12089
  // src/toolbar/Toolbar.tsx
11723
12090
  import { asReactElements as asReactElements3, useId as useId10 } from "@vuu-ui/vuu-utils";
11724
- import cx23 from "clsx";
11725
- import React5, { useMemo as useMemo23, useRef as useRef43 } from "react";
12091
+ import cx26 from "clsx";
12092
+ import React5, { useMemo as useMemo24, useRef as useRef45 } from "react";
11726
12093
 
11727
12094
  // src/toolbar/useToolbar.ts
11728
12095
  import { isValidNumber as isValidNumber7 } from "@vuu-ui/vuu-utils";
11729
12096
  import {
11730
- useCallback as useCallback56,
11731
- useRef as useRef42
12097
+ useCallback as useCallback60,
12098
+ useRef as useRef44
11732
12099
  } from "react";
11733
12100
 
11734
12101
  // src/toolbar/useKeyboardNavigation.ts
@@ -11740,9 +12107,9 @@ import {
11740
12107
  getFocusableElement as getFocusableElement2
11741
12108
  } from "@vuu-ui/vuu-utils";
11742
12109
  import {
11743
- useCallback as useCallback54,
11744
- useRef as useRef41,
11745
- useState as useState23
12110
+ useCallback as useCallback58,
12111
+ useRef as useRef43,
12112
+ useState as useState24
11746
12113
  } from "react";
11747
12114
  import {
11748
12115
  ArrowDown as ArrowDown3,
@@ -11849,22 +12216,22 @@ var useKeyboardNavigation3 = ({
11849
12216
  onNavigateOutOfBounds,
11850
12217
  orientation
11851
12218
  }) => {
11852
- const mouseClickPending = useRef41(false);
11853
- const focusedRef = useRef41(-1);
11854
- const [hasFocus, setHasFocus] = useState23(false);
12219
+ const mouseClickPending = useRef43(false);
12220
+ const focusedRef = useRef43(-1);
12221
+ const [hasFocus, setHasFocus] = useState24(false);
11855
12222
  const [highlightedIdx, _setHighlightedIdx] = useControlled11({
11856
12223
  controlled: highlightedIdxProp,
11857
12224
  default: defaultHighlightedIdx,
11858
12225
  name: "UseKeyboardNavigation"
11859
12226
  });
11860
- const setHighlightedIdx = useCallback54(
12227
+ const setHighlightedIdx = useCallback58(
11861
12228
  (value) => {
11862
12229
  _setHighlightedIdx(focusedRef.current = value);
11863
12230
  },
11864
12231
  [_setHighlightedIdx]
11865
12232
  );
11866
- const keyboardNavigation = useRef41(false);
11867
- const focusItem = useCallback54(
12233
+ const keyboardNavigation = useRef43(false);
12234
+ const focusItem = useCallback58(
11868
12235
  (itemIndex, immediateFocus = false, withKeyboard, delay = 70) => {
11869
12236
  console.log(`focus item ${itemIndex}`);
11870
12237
  setHighlightedIdx(itemIndex);
@@ -11906,14 +12273,14 @@ var useKeyboardNavigation3 = ({
11906
12273
  }
11907
12274
  }
11908
12275
  };
11909
- const getIndexCount = useCallback54(
12276
+ const getIndexCount = useCallback58(
11910
12277
  () => {
11911
12278
  var _a2, _b;
11912
12279
  return (_b = (_a2 = containerRef.current) == null ? void 0 : _a2.querySelectorAll(`[data-index]`).length) != null ? _b : 0;
11913
12280
  },
11914
12281
  [containerRef]
11915
12282
  );
11916
- const nextFocusableItemIdx = useCallback54(
12283
+ const nextFocusableItemIdx = useCallback58(
11917
12284
  (direction = "fwd", idx) => {
11918
12285
  var _a2;
11919
12286
  const indexCount = getIndexCount();
@@ -11941,7 +12308,7 @@ var useKeyboardNavigation3 = ({
11941
12308
  },
11942
12309
  [containerRef, getIndexCount]
11943
12310
  );
11944
- const navigateChildItems = useCallback54(
12311
+ const navigateChildItems = useCallback58(
11945
12312
  (e) => {
11946
12313
  const direction = navigation2[orientation][e.key];
11947
12314
  const nextIdx = nextFocusableItemIdx(direction, highlightedIdx);
@@ -11961,21 +12328,21 @@ var useKeyboardNavigation3 = ({
11961
12328
  onNavigateOutOfBounds
11962
12329
  ]
11963
12330
  );
11964
- const highlightedItemHasMenu = useCallback54(() => {
12331
+ const highlightedItemHasMenu = useCallback58(() => {
11965
12332
  const el = getElementByPosition2(containerRef.current, highlightedIdx);
11966
12333
  if (el) {
11967
12334
  return el.querySelector(".vuuPopupMenu") != null;
11968
12335
  }
11969
12336
  return false;
11970
12337
  }, [containerRef, highlightedIdx]);
11971
- const highlightedItemInEditState = useCallback54(() => {
12338
+ const highlightedItemInEditState = useCallback58(() => {
11972
12339
  const el = getElementByPosition2(containerRef.current, highlightedIdx);
11973
12340
  if (el) {
11974
12341
  return el.querySelector(".vuuEditableLabel-input") != null;
11975
12342
  }
11976
12343
  return false;
11977
12344
  }, [containerRef, highlightedIdx]);
11978
- const activateItemMenu = useCallback54(() => {
12345
+ const activateItemMenu = useCallback58(() => {
11979
12346
  const el = getElementByPosition2(containerRef.current, highlightedIdx);
11980
12347
  const menuEl = el == null ? void 0 : el.querySelector(".vuuPopupMenu");
11981
12348
  if (menuEl) {
@@ -11983,7 +12350,7 @@ var useKeyboardNavigation3 = ({
11983
12350
  }
11984
12351
  return false;
11985
12352
  }, [containerRef, highlightedIdx]);
11986
- const handleKeyDown = useCallback54(
12353
+ const handleKeyDown = useCallback58(
11987
12354
  (e) => {
11988
12355
  if (getIndexCount() > 0 && isNavigationKey3(e.key, orientation)) {
11989
12356
  e.preventDefault();
@@ -12009,7 +12376,7 @@ var useKeyboardNavigation3 = ({
12009
12376
  const handleItemClick = (_, itemIndex) => {
12010
12377
  setHighlightedIdx(itemIndex);
12011
12378
  };
12012
- const handleFocus = useCallback54(() => {
12379
+ const handleFocus = useCallback58(() => {
12013
12380
  if (!hasFocus) {
12014
12381
  setHasFocus(true);
12015
12382
  if (!mouseClickPending.current) {
@@ -12019,13 +12386,13 @@ var useKeyboardNavigation3 = ({
12019
12386
  }
12020
12387
  }
12021
12388
  }, [hasFocus]);
12022
- const handleContainerMouseDown = useCallback54(() => {
12389
+ const handleContainerMouseDown = useCallback58(() => {
12023
12390
  if (!hasFocus) {
12024
12391
  mouseClickPending.current = true;
12025
12392
  }
12026
12393
  keyboardNavigation.current = false;
12027
12394
  }, [hasFocus]);
12028
- const handleOverflowMenuClose = useCallback54(
12395
+ const handleOverflowMenuClose = useCallback58(
12029
12396
  (closeReason) => {
12030
12397
  if ((closeReason == null ? void 0 : closeReason.type) === "escape") {
12031
12398
  const index = getIndexOfOverflowItem(containerRef.current);
@@ -12070,7 +12437,7 @@ var useKeyboardNavigation3 = ({
12070
12437
 
12071
12438
  // src/toolbar/useSelection.ts
12072
12439
  import { isSelectableElement as isSelectableElement2, getClosestIndexItem } from "@vuu-ui/vuu-utils";
12073
- import { useCallback as useCallback55 } from "react";
12440
+ import { useCallback as useCallback59 } from "react";
12074
12441
  var defaultSelectionKeys3 = ["Enter", " "];
12075
12442
  var NO_SELECTION_HANDLERS = {};
12076
12443
  var useSelection3 = ({
@@ -12086,11 +12453,11 @@ var useSelection3 = ({
12086
12453
  name: "useSelection",
12087
12454
  state: "selected"
12088
12455
  });
12089
- const isSelectionEvent = useCallback55(
12456
+ const isSelectionEvent = useCallback59(
12090
12457
  (evt) => defaultSelectionKeys3.includes(evt.key),
12091
12458
  []
12092
12459
  );
12093
- const selectItem = useCallback55(
12460
+ const selectItem = useCallback59(
12094
12461
  (itemIndex, specialKey = false) => {
12095
12462
  const newSelected = allowMultipleSelection(selectionStrategy, specialKey) ? selected.concat(itemIndex) : [itemIndex];
12096
12463
  setSelected(newSelected);
@@ -12098,7 +12465,7 @@ var useSelection3 = ({
12098
12465
  },
12099
12466
  [onSelectionChange, selected, selectionStrategy, setSelected]
12100
12467
  );
12101
- const deselectItem = useCallback55(
12468
+ const deselectItem = useCallback59(
12102
12469
  (itemIndex, specialKey = false) => {
12103
12470
  const newSelected = selectionStrategy === "deselectable" || selectionStrategy === "multiple-special-key" && !specialKey ? [] : selected.filter((index) => index !== itemIndex);
12104
12471
  setSelected(newSelected);
@@ -12106,7 +12473,7 @@ var useSelection3 = ({
12106
12473
  },
12107
12474
  [onSelectionChange, selected, selectionStrategy, setSelected]
12108
12475
  );
12109
- const handleKeyDown = useCallback55(
12476
+ const handleKeyDown = useCallback59(
12110
12477
  (e) => {
12111
12478
  if (isSelectionEvent(e) && isSelectableElement2(e.target)) {
12112
12479
  if (!selected.includes(highlightedIdx)) {
@@ -12129,7 +12496,7 @@ var useSelection3 = ({
12129
12496
  deselectItem
12130
12497
  ]
12131
12498
  );
12132
- const handleClick = useCallback55(
12499
+ const handleClick = useCallback59(
12133
12500
  (e, itemIndex) => {
12134
12501
  const element = getClosestIndexItem(e.target);
12135
12502
  if (isSelectableElement2(element)) {
@@ -12165,7 +12532,7 @@ var useToolbar = ({
12165
12532
  orientation,
12166
12533
  selectionStrategy
12167
12534
  }) => {
12168
- const lastSelection = useRef42(activeItemIndexProp);
12535
+ const lastSelection = useRef44(activeItemIndexProp);
12169
12536
  const {
12170
12537
  focusItem: keyboardHookFocusItem,
12171
12538
  highlightedIdx,
@@ -12192,7 +12559,7 @@ var useToolbar = ({
12192
12559
  selectionStrategy
12193
12560
  });
12194
12561
  lastSelection.current = selectionHookSelected;
12195
- const handleClick = useCallback56(
12562
+ const handleClick = useCallback60(
12196
12563
  (evt) => {
12197
12564
  var _a2;
12198
12565
  const target = evt.target;
@@ -12207,7 +12574,7 @@ var useToolbar = ({
12207
12574
  },
12208
12575
  [keyboardHookHandleClick, onClick]
12209
12576
  );
12210
- const handleKeyDown = useCallback56(
12577
+ const handleKeyDown = useCallback60(
12211
12578
  (evt) => {
12212
12579
  keyboardHookHandleKeyDown(evt);
12213
12580
  if (!evt.defaultPrevented) {
@@ -12216,7 +12583,7 @@ var useToolbar = ({
12216
12583
  },
12217
12584
  [keyboardHookHandleKeyDown, onKeyDown]
12218
12585
  );
12219
- const onSwitchWrappedItemIntoView = useCallback56(
12586
+ const onSwitchWrappedItemIntoView = useCallback60(
12220
12587
  (item) => {
12221
12588
  const index = parseInt(item.index);
12222
12589
  if (!isNaN(index)) {
@@ -12248,8 +12615,8 @@ var useToolbar = ({
12248
12615
  };
12249
12616
 
12250
12617
  // src/toolbar/Toolbar.tsx
12251
- import { jsx as jsx46 } from "react/jsx-runtime";
12252
- var classBase24 = "vuuToolbar";
12618
+ import { jsx as jsx50 } from "react/jsx-runtime";
12619
+ var classBase28 = "vuuToolbar";
12253
12620
  var Toolbar = ({
12254
12621
  activeItemIndex: activeItemIndexProp,
12255
12622
  alignItems = "start",
@@ -12264,7 +12631,7 @@ var Toolbar = ({
12264
12631
  showSeparators = false,
12265
12632
  ...props
12266
12633
  }) => {
12267
- const rootRef = useRef43(null);
12634
+ const rootRef = useRef45(null);
12268
12635
  const {
12269
12636
  activeItemIndex,
12270
12637
  focusableIdx,
@@ -12281,7 +12648,7 @@ var Toolbar = ({
12281
12648
  selectionStrategy
12282
12649
  });
12283
12650
  const id = useId10(idProp);
12284
- const items = useMemo23(
12651
+ const items = useMemo24(
12285
12652
  () => asReactElements3(children).map((child, index) => {
12286
12653
  const {
12287
12654
  id: itemId = `${id}-tab-${index}`,
@@ -12291,7 +12658,7 @@ var Toolbar = ({
12291
12658
  const selected = activeItemIndex.includes(index);
12292
12659
  return React5.cloneElement(child, {
12293
12660
  ...forwardCallbackProps(ownProps, itemProps),
12294
- className: cx23("vuuToolbarItem", itemClassName),
12661
+ className: cx26("vuuToolbarItem", itemClassName),
12295
12662
  "data-overflow-priority": selected ? "1" : void 0,
12296
12663
  id: itemId,
12297
12664
  key: index,
@@ -12301,15 +12668,15 @@ var Toolbar = ({
12301
12668
  }),
12302
12669
  [activeItemIndex, children, focusableIdx, id, itemProps]
12303
12670
  );
12304
- return /* @__PURE__ */ jsx46(
12671
+ return /* @__PURE__ */ jsx50(
12305
12672
  OverflowContainer,
12306
12673
  {
12307
12674
  ...props,
12308
12675
  ...toolbarHook.containerProps,
12309
- className: cx23(className, classBase24, `${classBase24}-${orientation}`, {
12310
- [`${classBase24}-alignCenter`]: alignItems === "center",
12311
- [`${classBase24}-alignEnd`]: alignItems === "end",
12312
- [`${classBase24}-withSeparators`]: showSeparators
12676
+ className: cx26(className, classBase28, `${classBase28}-${orientation}`, {
12677
+ [`${classBase28}-alignCenter`]: alignItems === "center",
12678
+ [`${classBase28}-alignEnd`]: alignItems === "end",
12679
+ [`${classBase28}-withSeparators`]: showSeparators
12313
12680
  }),
12314
12681
  ...props,
12315
12682
  ref: rootRef,
@@ -12319,11 +12686,11 @@ var Toolbar = ({
12319
12686
  };
12320
12687
 
12321
12688
  // src/tree/Tree.tsx
12322
- import { useForkRef as useForkRef9, useIdMemo as useId11 } from "@salt-ds/core";
12323
- import cx24 from "clsx";
12689
+ import { useForkRef as useForkRef11, useIdMemo as useId11 } from "@salt-ds/core";
12690
+ import cx27 from "clsx";
12324
12691
  import {
12325
- forwardRef as forwardRef24,
12326
- useRef as useRef50
12692
+ forwardRef as forwardRef27,
12693
+ useRef as useRef52
12327
12694
  } from "react";
12328
12695
 
12329
12696
  // src/tree/list-dom-utils.ts
@@ -12342,7 +12709,7 @@ var closestListItem2 = (el) => el.closest("[data-idx],[aria-posinset]");
12342
12709
  var closestListItemIndex2 = (el) => listItemIndex2(closestListItem2(el));
12343
12710
 
12344
12711
  // src/tree/use-items-with-ids.ts
12345
- import { useCallback as useCallback57, useMemo as useMemo24 } from "react";
12712
+ import { useCallback as useCallback61, useMemo as useMemo25 } from "react";
12346
12713
  var PathSeparators2 = /* @__PURE__ */ new Set(["/", "-", "."]);
12347
12714
  var isPathSeparator2 = (char) => PathSeparators2.has(char);
12348
12715
  var isParentPath2 = (parentPath, childPath) => childPath.startsWith(parentPath) && isPathSeparator2(childPath[parentPath.length]);
@@ -12366,7 +12733,7 @@ var useItemsWithIds = (sourceProp, idRoot = "root", {
12366
12733
  return 0;
12367
12734
  }
12368
12735
  };
12369
- const isExpanded2 = useCallback57(
12736
+ const isExpanded2 = useCallback61(
12370
12737
  (path) => {
12371
12738
  if (Array.isArray(revealSelected)) {
12372
12739
  return revealSelected.some((id) => isParentPath2(path, id));
@@ -12375,7 +12742,7 @@ var useItemsWithIds = (sourceProp, idRoot = "root", {
12375
12742
  },
12376
12743
  [defaultExpanded, revealSelected]
12377
12744
  );
12378
- const normalizeItems = useCallback57(
12745
+ const normalizeItems = useCallback61(
12379
12746
  (items, indexer, level = 1, path = "", results = [], flattenedSource2 = []) => {
12380
12747
  let count2 = 0;
12381
12748
  items.forEach((item, i, all) => {
@@ -12419,10 +12786,10 @@ var useItemsWithIds = (sourceProp, idRoot = "root", {
12419
12786
  },
12420
12787
  [collapsibleHeaders, idRoot, isExpanded2]
12421
12788
  );
12422
- const [count, sourceWithIds, flattenedSource] = useMemo24(() => {
12789
+ const [count, sourceWithIds, flattenedSource] = useMemo25(() => {
12423
12790
  return normalizeItems(sourceProp, { index: 0 });
12424
12791
  }, [normalizeItems, sourceProp]);
12425
- const sourceItemById = useCallback57(
12792
+ const sourceItemById = useCallback61(
12426
12793
  (id, target = sourceWithIds) => {
12427
12794
  const sourceWithId = target.find(
12428
12795
  (i) => {
@@ -12443,8 +12810,8 @@ var useItemsWithIds = (sourceProp, idRoot = "root", {
12443
12810
 
12444
12811
  // src/tree/use-selection.ts
12445
12812
  import {
12446
- useCallback as useCallback58,
12447
- useRef as useRef44
12813
+ useCallback as useCallback62,
12814
+ useRef as useRef46
12448
12815
  } from "react";
12449
12816
  import { useControlled as useControlled12 } from "@salt-ds/core";
12450
12817
  var SINGLE = "single";
@@ -12467,8 +12834,8 @@ var useSelection4 = ({
12467
12834
  const singleSelect = selection === SINGLE;
12468
12835
  const multiSelect = selection === MULTI || selection.startsWith(CHECKBOX2);
12469
12836
  const extendedSelect = selection === EXTENDED;
12470
- const lastActive = useRef44(-1);
12471
- const isSelectionEvent = useCallback58(
12837
+ const lastActive = useRef46(-1);
12838
+ const isSelectionEvent = useCallback62(
12472
12839
  (evt) => selectionKeys.includes(evt.key),
12473
12840
  [selectionKeys]
12474
12841
  );
@@ -12477,7 +12844,7 @@ var useSelection4 = ({
12477
12844
  default: defaultSelected != null ? defaultSelected : [],
12478
12845
  name: "selected"
12479
12846
  });
12480
- const selectItemAtIndex = useCallback58(
12847
+ const selectItemAtIndex = useCallback62(
12481
12848
  (evt, idx, id, rangeSelect, preserveExistingSelection = false) => {
12482
12849
  const { current: active } = lastActive;
12483
12850
  const isSelected2 = selected == null ? void 0 : selected.includes(id);
@@ -12518,7 +12885,7 @@ var useSelection4 = ({
12518
12885
  singleSelect
12519
12886
  ]
12520
12887
  );
12521
- const handleKeyDown = useCallback58(
12888
+ const handleKeyDown = useCallback62(
12522
12889
  (evt) => {
12523
12890
  if (~highlightedIdx && isSelectionEvent(evt)) {
12524
12891
  evt.preventDefault();
@@ -12543,7 +12910,7 @@ var useSelection4 = ({
12543
12910
  selectItemAtIndex
12544
12911
  ]
12545
12912
  );
12546
- const handleKeyboardNavigation = useCallback58(
12913
+ const handleKeyboardNavigation = useCallback62(
12547
12914
  (evt, currentIndex) => {
12548
12915
  if (extendedSelect && evt.shiftKey) {
12549
12916
  const item = treeNodes[currentIndex];
@@ -12556,7 +12923,7 @@ var useSelection4 = ({
12556
12923
  onKeyDown: handleKeyDown,
12557
12924
  onKeyboardNavigation: handleKeyboardNavigation
12558
12925
  };
12559
- const handleClick = useCallback58(
12926
+ const handleClick = useCallback62(
12560
12927
  (evt) => {
12561
12928
  if (highlightedIdx !== -1) {
12562
12929
  const item = treeNodes[highlightedIdx];
@@ -12591,18 +12958,18 @@ var useSelection4 = ({
12591
12958
 
12592
12959
  // src/tree/use-viewport-tracking.ts
12593
12960
  import {
12594
- useCallback as useCallback59,
12961
+ useCallback as useCallback63,
12595
12962
  useEffect as useEffect11,
12596
12963
  useLayoutEffect as useLayoutEffect4,
12597
- useRef as useRef45
12964
+ useRef as useRef47
12598
12965
  } from "react";
12599
12966
  var HeightOnly4 = ["height", "scrollHeight"];
12600
12967
  var useViewportTracking2 = (root, highlightedIdx, stickyHeaders = false) => {
12601
- const scrollTop = useRef45(0);
12602
- const scrolling = useRef45(false);
12603
- const rootHeight = useRef45(0);
12604
- const rootScrollHeight = useRef45(0);
12605
- const scrollIntoView = useCallback59(
12968
+ const scrollTop = useRef47(0);
12969
+ const scrolling = useRef47(false);
12970
+ const rootHeight = useRef47(0);
12971
+ const rootScrollHeight = useRef47(0);
12972
+ const scrollIntoView = useCallback63(
12606
12973
  (el) => {
12607
12974
  const targetEl = el.ariaExpanded ? el.firstChild : el;
12608
12975
  const headerHeight = stickyHeaders ? 30 : 0;
@@ -12623,7 +12990,7 @@ var useViewportTracking2 = (root, highlightedIdx, stickyHeaders = false) => {
12623
12990
  },
12624
12991
  [root, stickyHeaders]
12625
12992
  );
12626
- const scrollHandler = useCallback59((e) => {
12993
+ const scrollHandler = useCallback63((e) => {
12627
12994
  scrollTop.current = e.target.scrollTop;
12628
12995
  }, []);
12629
12996
  useEffect11(() => {
@@ -12656,7 +13023,7 @@ var useViewportTracking2 = (root, highlightedIdx, stickyHeaders = false) => {
12656
13023
  }, [highlightedIdx, root, scrollIntoView]);
12657
13024
  useEffect11(() => {
12658
13025
  }, [stickyHeaders]);
12659
- const onResize = useCallback59(({ height, scrollHeight }) => {
13026
+ const onResize = useCallback63(({ height, scrollHeight }) => {
12660
13027
  rootHeight.current = height;
12661
13028
  rootScrollHeight.current = scrollHeight;
12662
13029
  }, []);
@@ -12665,10 +13032,10 @@ var useViewportTracking2 = (root, highlightedIdx, stickyHeaders = false) => {
12665
13032
  };
12666
13033
 
12667
13034
  // src/tree/useTree.ts
12668
- import { useCallback as useCallback63, useRef as useRef49 } from "react";
13035
+ import { useCallback as useCallback67, useRef as useRef51 } from "react";
12669
13036
 
12670
13037
  // src/tree/use-keyboard-navigation.ts
12671
- import { useCallback as useCallback60, useMemo as useMemo25, useRef as useRef46 } from "react";
13038
+ import { useCallback as useCallback64, useMemo as useMemo26, useRef as useRef48 } from "react";
12672
13039
 
12673
13040
  // src/tree/hierarchical-data-utils.ts
12674
13041
  var getNodeParentPath = ({ id }) => {
@@ -12818,7 +13185,7 @@ var useKeyboardNavigation4 = ({
12818
13185
  onKeyboardNavigation,
12819
13186
  selected = []
12820
13187
  }) => {
12821
- const { bwd: ArrowBwd, fwd: ArrowFwd } = useMemo25(
13188
+ const { bwd: ArrowBwd, fwd: ArrowFwd } = useMemo26(
12822
13189
  () => ({
12823
13190
  bwd: ArrowUp4,
12824
13191
  fwd: ArrowDown4
@@ -12830,14 +13197,14 @@ var useKeyboardNavigation4 = ({
12830
13197
  default: defaultHighlightedIdx,
12831
13198
  name: "highlightedIdx"
12832
13199
  });
12833
- const setHighlightedIndex = useCallback60(
13200
+ const setHighlightedIndex = useCallback64(
12834
13201
  (idx) => {
12835
13202
  onHighlight == null ? void 0 : onHighlight(idx);
12836
13203
  setHighlightedIdx(idx);
12837
13204
  },
12838
13205
  [onHighlight, setHighlightedIdx]
12839
13206
  );
12840
- const nextFocusableItemIdx = useCallback60(
13207
+ const nextFocusableItemIdx = useCallback64(
12841
13208
  (key = ArrowFwd, idx = key === ArrowFwd ? -1 : treeNodes.length) => {
12842
13209
  let nextIdx = nextItemIdx4(treeNodes.length, key, idx);
12843
13210
  while (nextIdx !== -1 && (key === ArrowFwd && nextIdx < treeNodes.length || key === ArrowBwd && nextIdx > 0) && !isFocusable3(treeNodes[nextIdx])) {
@@ -12847,10 +13214,10 @@ var useKeyboardNavigation4 = ({
12847
13214
  },
12848
13215
  [ArrowBwd, ArrowFwd, treeNodes]
12849
13216
  );
12850
- const keyBoardNavigation = useRef46(true);
12851
- const ignoreFocus = useRef46(false);
13217
+ const keyBoardNavigation = useRef48(true);
13218
+ const ignoreFocus = useRef48(false);
12852
13219
  const setIgnoreFocus = (value) => ignoreFocus.current = value;
12853
- const handleFocus = useCallback60(() => {
13220
+ const handleFocus = useCallback64(() => {
12854
13221
  if (ignoreFocus.current) {
12855
13222
  ignoreFocus.current = false;
12856
13223
  } else if (selected.length > 0) {
@@ -12863,7 +13230,7 @@ var useKeyboardNavigation4 = ({
12863
13230
  setHighlightedIndex(nextFocusableItemIdx());
12864
13231
  }
12865
13232
  }, [treeNodes, nextFocusableItemIdx, selected, setHighlightedIndex]);
12866
- const navigateChildItems = useCallback60(
13233
+ const navigateChildItems = useCallback64(
12867
13234
  (e) => {
12868
13235
  const nextIdx = nextFocusableItemIdx(e.key, highlightedIdx);
12869
13236
  if (nextIdx !== highlightedIdx) {
@@ -12878,7 +13245,7 @@ var useKeyboardNavigation4 = ({
12878
13245
  setHighlightedIndex
12879
13246
  ]
12880
13247
  );
12881
- const handleKeyDown = useCallback60(
13248
+ const handleKeyDown = useCallback64(
12882
13249
  (e) => {
12883
13250
  if (treeNodes.length > 0 && isNavigationKey4(e, "vertical")) {
12884
13251
  e.preventDefault();
@@ -12889,7 +13256,7 @@ var useKeyboardNavigation4 = ({
12889
13256
  },
12890
13257
  [treeNodes, navigateChildItems]
12891
13258
  );
12892
- const listProps = useMemo25(
13259
+ const listProps = useMemo26(
12893
13260
  () => ({
12894
13261
  onBlur: () => {
12895
13262
  setHighlightedIndex(-1);
@@ -12927,7 +13294,7 @@ var useKeyboardNavigation4 = ({
12927
13294
  };
12928
13295
 
12929
13296
  // src/tree/use-hierarchical-data.ts
12930
- import { useRef as useRef47, useState as useState24 } from "react";
13297
+ import { useRef as useRef49, useState as useState25 } from "react";
12931
13298
  var populateIndices = (nodes, results = [], idx = { value: 0 }) => {
12932
13299
  let skipToNextHeader = false;
12933
13300
  for (const node of nodes) {
@@ -12949,10 +13316,10 @@ var populateIndices = (nodes, results = [], idx = { value: 0 }) => {
12949
13316
  return results;
12950
13317
  };
12951
13318
  var useHierarchicalData = (source) => {
12952
- const externalSource = useRef47(source);
12953
- const statefulSource = useRef47(source);
12954
- const indexPositions = useRef47(populateIndices(source));
12955
- const [, forceUpdate] = useState24({});
13319
+ const externalSource = useRef49(source);
13320
+ const statefulSource = useRef49(source);
13321
+ const indexPositions = useRef49(populateIndices(source));
13322
+ const [, forceUpdate] = useState25({});
12956
13323
  if (source !== externalSource.current) {
12957
13324
  externalSource.current = source;
12958
13325
  statefulSource.current = source;
@@ -12972,7 +13339,7 @@ var useHierarchicalData = (source) => {
12972
13339
  };
12973
13340
 
12974
13341
  // src/tree/use-collapsible-groups.ts
12975
- import { useCallback as useCallback61, useRef as useRef48 } from "react";
13342
+ import { useCallback as useCallback65, useRef as useRef50 } from "react";
12976
13343
  var NO_HANDLERS4 = {};
12977
13344
  var isToggleElement = (element) => element && element.hasAttribute("aria-expanded");
12978
13345
  var useCollapsibleGroups2 = ({
@@ -12982,23 +13349,23 @@ var useCollapsibleGroups2 = ({
12982
13349
  setVisibleData,
12983
13350
  source
12984
13351
  }) => {
12985
- const fullSource = useRef48(source);
12986
- const stateSource = useRef48(fullSource.current);
12987
- const setSource = useCallback61(
13352
+ const fullSource = useRef50(source);
13353
+ const stateSource = useRef50(fullSource.current);
13354
+ const setSource = useCallback65(
12988
13355
  (value) => {
12989
13356
  setVisibleData(stateSource.current = value);
12990
13357
  },
12991
13358
  [setVisibleData]
12992
13359
  );
12993
- const expandNode = useCallback61(
13360
+ const expandNode = useCallback65(
12994
13361
  (nodeList, { id }) => replaceNode(nodeList, id, { expanded: true }),
12995
13362
  []
12996
13363
  );
12997
- const collapseNode = useCallback61(
13364
+ const collapseNode = useCallback65(
12998
13365
  (nodeList, { id }) => replaceNode(nodeList, id, { expanded: false }),
12999
13366
  []
13000
13367
  );
13001
- const handleKeyDown = useCallback61(
13368
+ const handleKeyDown = useCallback65(
13002
13369
  (e) => {
13003
13370
  if (e.key === ArrowRight4 || e.key === Enter2) {
13004
13371
  const node = treeNodes[highlightedIdx];
@@ -13024,7 +13391,7 @@ var useCollapsibleGroups2 = ({
13024
13391
  const listHandlers = collapsibleHeaders ? {
13025
13392
  onKeyDown: handleKeyDown
13026
13393
  } : NO_HANDLERS4;
13027
- const handleClick = useCallback61(
13394
+ const handleClick = useCallback65(
13028
13395
  (evt) => {
13029
13396
  const el = closestListItem2(evt.target);
13030
13397
  if (isToggleElement(el)) {
@@ -13050,14 +13417,14 @@ var useCollapsibleGroups2 = ({
13050
13417
  };
13051
13418
 
13052
13419
  // src/tree/use-tree-keyboard-navigation.ts
13053
- import { useCallback as useCallback62 } from "react";
13420
+ import { useCallback as useCallback66 } from "react";
13054
13421
  var useTreeKeyboardNavigation = ({
13055
13422
  highlightedIdx,
13056
13423
  hiliteItemAtIndex,
13057
13424
  indexPositions,
13058
13425
  source
13059
13426
  }) => {
13060
- const handleKeyDown = useCallback62(
13427
+ const handleKeyDown = useCallback66(
13061
13428
  (e) => {
13062
13429
  if (e.key === ArrowLeft4) {
13063
13430
  const node = indexPositions[highlightedIdx];
@@ -13094,7 +13461,7 @@ var useTree = ({
13094
13461
  selected: selectedProp,
13095
13462
  selection
13096
13463
  }) => {
13097
- const lastSelection = useRef49(EMPTY_ARRAY2);
13464
+ const lastSelection = useRef51(EMPTY_ARRAY2);
13098
13465
  const dataHook = useHierarchicalData(sourceWithIds);
13099
13466
  const handleKeyboardNavigation = (evt, nextIdx) => {
13100
13467
  var _a2, _b;
@@ -13127,7 +13494,7 @@ var useTree = ({
13127
13494
  hiliteItemAtIndex: keyboardHook.hiliteItemAtIndex,
13128
13495
  indexPositions: dataHook.indexPositions
13129
13496
  });
13130
- const handleClick = useCallback63(
13497
+ const handleClick = useCallback67(
13131
13498
  (evt) => {
13132
13499
  var _a2, _b, _c;
13133
13500
  (_a2 = collapsibleHook.listItemHandlers) == null ? void 0 : _a2.onClick(evt);
@@ -13137,7 +13504,7 @@ var useTree = ({
13137
13504
  },
13138
13505
  [collapsibleHook, selectionHook]
13139
13506
  );
13140
- const handleKeyDown = useCallback63(
13507
+ const handleKeyDown = useCallback67(
13141
13508
  (evt) => {
13142
13509
  var _a2, _b, _c, _d, _e, _f, _g, _h;
13143
13510
  (_b = (_a2 = keyboardHook.listProps).onKeyDown) == null ? void 0 : _b.call(_a2, evt);
@@ -13187,14 +13554,14 @@ var useTree = ({
13187
13554
  };
13188
13555
 
13189
13556
  // src/tree/Tree.tsx
13190
- import { jsx as jsx47, jsxs as jsxs25 } from "react/jsx-runtime";
13557
+ import { jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
13191
13558
  import { createElement as createElement3 } from "react";
13192
- var classBase25 = "vuuTree";
13559
+ var classBase29 = "vuuTree";
13193
13560
  var isExpanded = (node) => node.expanded === true;
13194
13561
  var TreeNode = ({ children, idx, ...props }) => {
13195
- return /* @__PURE__ */ jsx47("li", { ...props, children });
13562
+ return /* @__PURE__ */ jsx51("li", { ...props, children });
13196
13563
  };
13197
- var Tree = forwardRef24(function Tree2({
13564
+ var Tree = forwardRef27(function Tree2({
13198
13565
  allowDragDrop,
13199
13566
  className,
13200
13567
  defaultSelected,
@@ -13210,7 +13577,7 @@ var Tree = forwardRef24(function Tree2({
13210
13577
  }, forwardedRef) {
13211
13578
  var _a2;
13212
13579
  const id = useId11(idProp);
13213
- const rootRef = useRef50(null);
13580
+ const rootRef = useRef52(null);
13214
13581
  const [, sourceWithIds, sourceItemById] = useItemsWithIds(source, id, {
13215
13582
  revealSelected: revealSelected ? (_a2 = selectedProp != null ? selectedProp : defaultSelected) != null ? _a2 : false : void 0
13216
13583
  });
@@ -13253,14 +13620,14 @@ var Tree = forwardRef24(function Tree2({
13253
13620
  const allowGroupSelect = groupSelectionEnabled2(groupSelection);
13254
13621
  function addLeafNode(list, item, idx) {
13255
13622
  list.push(
13256
- /* @__PURE__ */ jsxs25(
13623
+ /* @__PURE__ */ jsxs28(
13257
13624
  TreeNode,
13258
13625
  {
13259
13626
  ...propsCommonToAllListItems,
13260
13627
  ...getListItemProps(item, idx, highlightedIdx, selected, focusVisible),
13261
13628
  children: [
13262
- item.icon ? /* @__PURE__ */ jsx47("span", { className: `${classBase25}Node-icon`, "data-icon": item.icon }) : null,
13263
- /* @__PURE__ */ jsx47("span", { children: item.label })
13629
+ item.icon ? /* @__PURE__ */ jsx51("span", { className: `${classBase29}Node-icon`, "data-icon": item.icon }) : null,
13630
+ /* @__PURE__ */ jsx51("span", { children: item.label })
13264
13631
  ]
13265
13632
  }
13266
13633
  )
@@ -13278,9 +13645,9 @@ var Tree = forwardRef24(function Tree2({
13278
13645
  "aria-expanded": child.expanded,
13279
13646
  "aria-level": child.level,
13280
13647
  "aria-selected": selected.includes(id2) || void 0,
13281
- className: cx24(`${classBase25}Node`, {
13648
+ className: cx27(`${classBase29}Node`, {
13282
13649
  focusVisible: focusVisible === i,
13283
- [`${classBase25}Node-toggle`]: !allowGroupSelect
13650
+ [`${classBase29}Node-toggle`]: !allowGroupSelect
13284
13651
  }),
13285
13652
  "data-idx": i,
13286
13653
  "data-highlighted": i === highlightedIdx || void 0,
@@ -13288,20 +13655,20 @@ var Tree = forwardRef24(function Tree2({
13288
13655
  id: id2,
13289
13656
  key: `header-${i}`
13290
13657
  },
13291
- allowGroupSelect ? /* @__PURE__ */ jsxs25("div", { className: `${classBase25}Node-label`, children: [
13292
- /* @__PURE__ */ jsx47("span", { className: `${classBase25}Node-toggle` }),
13658
+ allowGroupSelect ? /* @__PURE__ */ jsxs28("div", { className: `${classBase29}Node-label`, children: [
13659
+ /* @__PURE__ */ jsx51("span", { className: `${classBase29}Node-toggle` }),
13293
13660
  title
13294
- ] }) : /* @__PURE__ */ jsxs25("div", { className: `${classBase25}Node-label`, children: [
13295
- child.icon ? /* @__PURE__ */ jsx47(
13661
+ ] }) : /* @__PURE__ */ jsxs28("div", { className: `${classBase29}Node-label`, children: [
13662
+ child.icon ? /* @__PURE__ */ jsx51(
13296
13663
  "span",
13297
13664
  {
13298
- className: `${classBase25}Node-icon`,
13665
+ className: `${classBase29}Node-icon`,
13299
13666
  "data-icon": child.icon
13300
13667
  }
13301
13668
  ) : null,
13302
- /* @__PURE__ */ jsx47("span", { children: title })
13669
+ /* @__PURE__ */ jsx51("span", { children: title })
13303
13670
  ] }),
13304
- /* @__PURE__ */ jsx47("ul", { role: "group", children: isExpanded(child) ? renderSourceContent(child.childNodes, idx) : "" })
13671
+ /* @__PURE__ */ jsx51("ul", { role: "group", children: isExpanded(child) ? renderSourceContent(child.childNodes, idx) : "" })
13305
13672
  )
13306
13673
  );
13307
13674
  }
@@ -13318,14 +13685,14 @@ var Tree = forwardRef24(function Tree2({
13318
13685
  return listItems;
13319
13686
  }
13320
13687
  }
13321
- return /* @__PURE__ */ jsx47(
13688
+ return /* @__PURE__ */ jsx51(
13322
13689
  "ul",
13323
13690
  {
13324
13691
  ...htmlAttributes,
13325
13692
  ...listProps,
13326
- className: cx24(classBase25, className),
13693
+ className: cx27(classBase29, className),
13327
13694
  id: `Tree-${id}`,
13328
- ref: useForkRef9(rootRef, forwardedRef),
13695
+ ref: useForkRef11(rootRef, forwardedRef),
13329
13696
  role: "tree",
13330
13697
  tabIndex: 0,
13331
13698
  children: renderSourceContent(visibleData)
@@ -13339,7 +13706,7 @@ var getListItemProps = (item, idx, highlightedIdx, selected, focusVisible, class
13339
13706
  "aria-selected": selected.includes(item.id) || void 0,
13340
13707
  "data-idx": idx.value,
13341
13708
  "data-highlighted": idx.value === highlightedIdx || void 0,
13342
- className: cx24("vuuTreeNode", className, {
13709
+ className: cx27("vuuTreeNode", className, {
13343
13710
  focusVisible: focusVisible === idx.value
13344
13711
  })
13345
13712
  });
@@ -13359,7 +13726,10 @@ export {
13359
13726
  CollectionProvider,
13360
13727
  ComboBox,
13361
13728
  CycleStateButton,
13729
+ DateInput,
13362
13730
  DatePicker,
13731
+ DatePopup,
13732
+ DateRangeInput,
13363
13733
  DateRangePicker,
13364
13734
  DragDropProvider,
13365
13735
  DragDropState,
@@ -13400,6 +13770,7 @@ export {
13400
13770
  RadioIcon,
13401
13771
  Space,
13402
13772
  SplitButton,
13773
+ SplitStateButton,
13403
13774
  Tab,
13404
13775
  Tabstrip,
13405
13776
  Toolbar,