cetec-design-system 4.2.0-0 → 4.4.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { createContext, useContext, useMemo, forwardRef, createElement, useLayoutEffect, useState, useRef, useSyncExternalStore, useEffect, useCallback, useId as useId$1, isValidElement, Children, cloneElement, useReducer } from "react";
3
+ import { createContext, useContext, useMemo, forwardRef, createElement, useLayoutEffect, useState, useRef, useSyncExternalStore, useCallback, useEffect, useId as useId$1, isValidElement, Children, cloneElement, useReducer, Fragment as Fragment$1 } from "react";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import { b as breakpoints, c as containerSizes } from "./containerSizes-nJuD-1Ap.js";
6
6
  import { useForm } from "@tanstack/react-form";
@@ -974,7 +974,7 @@ const spinnerVariantKeys = [
974
974
  "inverse",
975
975
  "centered"
976
976
  ];
977
- const getVariantProps$v = (variants) => ({ ...spinnerDefaultVariants, ...compact(variants) });
977
+ const getVariantProps$x = (variants) => ({ ...spinnerDefaultVariants, ...compact(variants) });
978
978
  const spinner = /* @__PURE__ */ Object.assign(spinnerFn, {
979
979
  __recipe__: false,
980
980
  __name__: "spinner",
@@ -999,7 +999,7 @@ const spinner = /* @__PURE__ */ Object.assign(spinnerFn, {
999
999
  splitVariantProps(props) {
1000
1000
  return splitProps$1(props, spinnerVariantKeys);
1001
1001
  },
1002
- getVariantProps: getVariantProps$v
1002
+ getVariantProps: getVariantProps$x
1003
1003
  });
1004
1004
  const tagFn = /* @__PURE__ */ createRecipe("tag", {
1005
1005
  "variant": "default",
@@ -1667,7 +1667,7 @@ const toggleFn = memo((props = {}) => {
1667
1667
  return Object.fromEntries(toggleSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
1668
1668
  });
1669
1669
  const toggleVariantKeys = [];
1670
- const getVariantProps$u = (variants) => ({ ...toggleDefaultVariants, ...compact(variants) });
1670
+ const getVariantProps$w = (variants) => ({ ...toggleDefaultVariants, ...compact(variants) });
1671
1671
  const toggle = /* @__PURE__ */ Object.assign(toggleFn, {
1672
1672
  __recipe__: false,
1673
1673
  __name__: "toggle",
@@ -1678,7 +1678,7 @@ const toggle = /* @__PURE__ */ Object.assign(toggleFn, {
1678
1678
  splitVariantProps(props) {
1679
1679
  return splitProps$1(props, toggleVariantKeys);
1680
1680
  },
1681
- getVariantProps: getVariantProps$u
1681
+ getVariantProps: getVariantProps$w
1682
1682
  });
1683
1683
  const alertDefaultVariants = {
1684
1684
  "tone": "info"
@@ -1721,7 +1721,7 @@ const alertFn = memo((props = {}) => {
1721
1721
  const alertVariantKeys = [
1722
1722
  "tone"
1723
1723
  ];
1724
- const getVariantProps$t = (variants) => ({ ...alertDefaultVariants, ...compact(variants) });
1724
+ const getVariantProps$v = (variants) => ({ ...alertDefaultVariants, ...compact(variants) });
1725
1725
  const alert = /* @__PURE__ */ Object.assign(alertFn, {
1726
1726
  __recipe__: false,
1727
1727
  __name__: "alert",
@@ -1740,7 +1740,7 @@ const alert = /* @__PURE__ */ Object.assign(alertFn, {
1740
1740
  splitVariantProps(props) {
1741
1741
  return splitProps$1(props, alertVariantKeys);
1742
1742
  },
1743
- getVariantProps: getVariantProps$t
1743
+ getVariantProps: getVariantProps$v
1744
1744
  });
1745
1745
  const autocompleteDefaultVariants = {
1746
1746
  "size": "md",
@@ -1797,7 +1797,7 @@ const autocompleteVariantKeys = [
1797
1797
  "layer",
1798
1798
  "size"
1799
1799
  ];
1800
- const getVariantProps$s = (variants) => ({ ...autocompleteDefaultVariants, ...compact(variants) });
1800
+ const getVariantProps$u = (variants) => ({ ...autocompleteDefaultVariants, ...compact(variants) });
1801
1801
  const autocomplete = /* @__PURE__ */ Object.assign(autocompleteFn, {
1802
1802
  __recipe__: false,
1803
1803
  __name__: "autocomplete",
@@ -1819,7 +1819,7 @@ const autocomplete = /* @__PURE__ */ Object.assign(autocompleteFn, {
1819
1819
  splitVariantProps(props) {
1820
1820
  return splitProps$1(props, autocompleteVariantKeys);
1821
1821
  },
1822
- getVariantProps: getVariantProps$s
1822
+ getVariantProps: getVariantProps$u
1823
1823
  });
1824
1824
  const avatarDefaultVariants = {
1825
1825
  "size": "md",
@@ -1856,7 +1856,7 @@ const avatarVariantKeys = [
1856
1856
  "size",
1857
1857
  "shape"
1858
1858
  ];
1859
- const getVariantProps$r = (variants) => ({ ...avatarDefaultVariants, ...compact(variants) });
1859
+ const getVariantProps$t = (variants) => ({ ...avatarDefaultVariants, ...compact(variants) });
1860
1860
  const avatar = /* @__PURE__ */ Object.assign(avatarFn, {
1861
1861
  __recipe__: false,
1862
1862
  __name__: "avatar",
@@ -1881,7 +1881,7 @@ const avatar = /* @__PURE__ */ Object.assign(avatarFn, {
1881
1881
  splitVariantProps(props) {
1882
1882
  return splitProps$1(props, avatarVariantKeys);
1883
1883
  },
1884
- getVariantProps: getVariantProps$r
1884
+ getVariantProps: getVariantProps$t
1885
1885
  });
1886
1886
  const badgeDefaultVariants = {
1887
1887
  "size": "md",
@@ -1908,7 +1908,7 @@ const badgeVariantKeys = [
1908
1908
  "dot",
1909
1909
  "variant"
1910
1910
  ];
1911
- const getVariantProps$q = (variants) => ({ ...badgeDefaultVariants, ...compact(variants) });
1911
+ const getVariantProps$s = (variants) => ({ ...badgeDefaultVariants, ...compact(variants) });
1912
1912
  const badge = /* @__PURE__ */ Object.assign(badgeFn, {
1913
1913
  __recipe__: false,
1914
1914
  __name__: "badge",
@@ -1944,7 +1944,7 @@ const badge = /* @__PURE__ */ Object.assign(badgeFn, {
1944
1944
  splitVariantProps(props) {
1945
1945
  return splitProps$1(props, badgeVariantKeys);
1946
1946
  },
1947
- getVariantProps: getVariantProps$q
1947
+ getVariantProps: getVariantProps$s
1948
1948
  });
1949
1949
  const breadcrumbsDefaultVariants = {};
1950
1950
  const breadcrumbsCompoundVariants = [];
@@ -1971,7 +1971,7 @@ const breadcrumbsFn = memo((props = {}) => {
1971
1971
  return Object.fromEntries(breadcrumbsSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
1972
1972
  });
1973
1973
  const breadcrumbsVariantKeys = [];
1974
- const getVariantProps$p = (variants) => ({ ...breadcrumbsDefaultVariants, ...compact(variants) });
1974
+ const getVariantProps$r = (variants) => ({ ...breadcrumbsDefaultVariants, ...compact(variants) });
1975
1975
  const breadcrumbs = /* @__PURE__ */ Object.assign(breadcrumbsFn, {
1976
1976
  __recipe__: false,
1977
1977
  __name__: "breadcrumbs",
@@ -1982,7 +1982,7 @@ const breadcrumbs = /* @__PURE__ */ Object.assign(breadcrumbsFn, {
1982
1982
  splitVariantProps(props) {
1983
1983
  return splitProps$1(props, breadcrumbsVariantKeys);
1984
1984
  },
1985
- getVariantProps: getVariantProps$p
1985
+ getVariantProps: getVariantProps$r
1986
1986
  });
1987
1987
  const buttonDefaultVariants = {
1988
1988
  "variant": "standard",
@@ -2013,7 +2013,7 @@ const buttonVariantKeys = [
2013
2013
  "before",
2014
2014
  "after"
2015
2015
  ];
2016
- const getVariantProps$o = (variants) => ({ ...buttonDefaultVariants, ...compact(variants) });
2016
+ const getVariantProps$q = (variants) => ({ ...buttonDefaultVariants, ...compact(variants) });
2017
2017
  const button = /* @__PURE__ */ Object.assign(buttonFn, {
2018
2018
  __recipe__: false,
2019
2019
  __name__: "button",
@@ -2047,7 +2047,7 @@ const button = /* @__PURE__ */ Object.assign(buttonFn, {
2047
2047
  splitVariantProps(props) {
2048
2048
  return splitProps$1(props, buttonVariantKeys);
2049
2049
  },
2050
- getVariantProps: getVariantProps$o
2050
+ getVariantProps: getVariantProps$q
2051
2051
  });
2052
2052
  const calendarDefaultVariants = {
2053
2053
  "type": "days"
@@ -2086,7 +2086,7 @@ const calendarFn = memo((props = {}) => {
2086
2086
  const calendarVariantKeys = [
2087
2087
  "type"
2088
2088
  ];
2089
- const getVariantProps$n = (variants) => ({ ...calendarDefaultVariants, ...compact(variants) });
2089
+ const getVariantProps$p = (variants) => ({ ...calendarDefaultVariants, ...compact(variants) });
2090
2090
  const calendar = /* @__PURE__ */ Object.assign(calendarFn, {
2091
2091
  __recipe__: false,
2092
2092
  __name__: "calendar",
@@ -2103,7 +2103,7 @@ const calendar = /* @__PURE__ */ Object.assign(calendarFn, {
2103
2103
  splitVariantProps(props) {
2104
2104
  return splitProps$1(props, calendarVariantKeys);
2105
2105
  },
2106
- getVariantProps: getVariantProps$n
2106
+ getVariantProps: getVariantProps$p
2107
2107
  });
2108
2108
  const checkboxDefaultVariants = {};
2109
2109
  const checkboxCompoundVariants = [];
@@ -2130,7 +2130,7 @@ const checkboxFn = memo((props = {}) => {
2130
2130
  return Object.fromEntries(checkboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
2131
2131
  });
2132
2132
  const checkboxVariantKeys = [];
2133
- const getVariantProps$m = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) });
2133
+ const getVariantProps$o = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) });
2134
2134
  const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
2135
2135
  __recipe__: false,
2136
2136
  __name__: "checkbox",
@@ -2141,7 +2141,7 @@ const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
2141
2141
  splitVariantProps(props) {
2142
2142
  return splitProps$1(props, checkboxVariantKeys);
2143
2143
  },
2144
- getVariantProps: getVariantProps$m
2144
+ getVariantProps: getVariantProps$o
2145
2145
  });
2146
2146
  const chipDefaultVariants = {
2147
2147
  "size": "md"
@@ -2179,7 +2179,7 @@ const chipVariantKeys = [
2179
2179
  "after",
2180
2180
  "dismissable"
2181
2181
  ];
2182
- const getVariantProps$l = (variants) => ({ ...chipDefaultVariants, ...compact(variants) });
2182
+ const getVariantProps$n = (variants) => ({ ...chipDefaultVariants, ...compact(variants) });
2183
2183
  const chip = /* @__PURE__ */ Object.assign(chipFn, {
2184
2184
  __recipe__: false,
2185
2185
  __name__: "chip",
@@ -2206,7 +2206,7 @@ const chip = /* @__PURE__ */ Object.assign(chipFn, {
2206
2206
  splitVariantProps(props) {
2207
2207
  return splitProps$1(props, chipVariantKeys);
2208
2208
  },
2209
- getVariantProps: getVariantProps$l
2209
+ getVariantProps: getVariantProps$n
2210
2210
  });
2211
2211
  const codeBlockDefaultVariants = {
2212
2212
  "tone": "default",
@@ -2275,7 +2275,7 @@ const codeBlockVariantKeys = [
2275
2275
  "collapsed",
2276
2276
  "actionGutter"
2277
2277
  ];
2278
- const getVariantProps$k = (variants) => ({ ...codeBlockDefaultVariants, ...compact(variants) });
2278
+ const getVariantProps$m = (variants) => ({ ...codeBlockDefaultVariants, ...compact(variants) });
2279
2279
  const codeBlock = /* @__PURE__ */ Object.assign(codeBlockFn, {
2280
2280
  __recipe__: false,
2281
2281
  __name__: "codeBlock",
@@ -2311,7 +2311,7 @@ const codeBlock = /* @__PURE__ */ Object.assign(codeBlockFn, {
2311
2311
  splitVariantProps(props) {
2312
2312
  return splitProps$1(props, codeBlockVariantKeys);
2313
2313
  },
2314
- getVariantProps: getVariantProps$k
2314
+ getVariantProps: getVariantProps$m
2315
2315
  });
2316
2316
  const dateMenusDefaultVariants = {};
2317
2317
  const dateMenusCompoundVariants = [];
@@ -2334,7 +2334,7 @@ const dateMenusFn = memo((props = {}) => {
2334
2334
  return Object.fromEntries(dateMenusSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
2335
2335
  });
2336
2336
  const dateMenusVariantKeys = [];
2337
- const getVariantProps$j = (variants) => ({ ...dateMenusDefaultVariants, ...compact(variants) });
2337
+ const getVariantProps$l = (variants) => ({ ...dateMenusDefaultVariants, ...compact(variants) });
2338
2338
  const dateMenus = /* @__PURE__ */ Object.assign(dateMenusFn, {
2339
2339
  __recipe__: false,
2340
2340
  __name__: "dateMenus",
@@ -2345,7 +2345,7 @@ const dateMenus = /* @__PURE__ */ Object.assign(dateMenusFn, {
2345
2345
  splitVariantProps(props) {
2346
2346
  return splitProps$1(props, dateMenusVariantKeys);
2347
2347
  },
2348
- getVariantProps: getVariantProps$j
2348
+ getVariantProps: getVariantProps$l
2349
2349
  });
2350
2350
  const dateTimeMenusDefaultVariants = {};
2351
2351
  const dateTimeMenusCompoundVariants = [];
@@ -2368,7 +2368,7 @@ const dateTimeMenusFn = memo((props = {}) => {
2368
2368
  return Object.fromEntries(dateTimeMenusSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
2369
2369
  });
2370
2370
  const dateTimeMenusVariantKeys = [];
2371
- const getVariantProps$i = (variants) => ({ ...dateTimeMenusDefaultVariants, ...compact(variants) });
2371
+ const getVariantProps$k = (variants) => ({ ...dateTimeMenusDefaultVariants, ...compact(variants) });
2372
2372
  const dateTimeMenus = /* @__PURE__ */ Object.assign(dateTimeMenusFn, {
2373
2373
  __recipe__: false,
2374
2374
  __name__: "dateTimeMenus",
@@ -2379,7 +2379,7 @@ const dateTimeMenus = /* @__PURE__ */ Object.assign(dateTimeMenusFn, {
2379
2379
  splitVariantProps(props) {
2380
2380
  return splitProps$1(props, dateTimeMenusVariantKeys);
2381
2381
  },
2382
- getVariantProps: getVariantProps$i
2382
+ getVariantProps: getVariantProps$k
2383
2383
  });
2384
2384
  const drawerDefaultVariants = {
2385
2385
  "side": "right",
@@ -2426,7 +2426,7 @@ const drawerVariantKeys = [
2426
2426
  "size",
2427
2427
  "scrollable"
2428
2428
  ];
2429
- const getVariantProps$h = (variants) => ({ ...drawerDefaultVariants, ...compact(variants) });
2429
+ const getVariantProps$j = (variants) => ({ ...drawerDefaultVariants, ...compact(variants) });
2430
2430
  const drawer = /* @__PURE__ */ Object.assign(drawerFn, {
2431
2431
  __recipe__: false,
2432
2432
  __name__: "drawer",
@@ -2453,7 +2453,65 @@ const drawer = /* @__PURE__ */ Object.assign(drawerFn, {
2453
2453
  splitVariantProps(props) {
2454
2454
  return splitProps$1(props, drawerVariantKeys);
2455
2455
  },
2456
- getVariantProps: getVariantProps$h
2456
+ getVariantProps: getVariantProps$j
2457
+ });
2458
+ const filterTokenDefaultVariants = {};
2459
+ const filterTokenCompoundVariants = [];
2460
+ const filterTokenSlotNames = [
2461
+ [
2462
+ "root",
2463
+ "filterToken__root"
2464
+ ],
2465
+ [
2466
+ "part",
2467
+ "filterToken__part"
2468
+ ],
2469
+ [
2470
+ "field",
2471
+ "filterToken__field"
2472
+ ],
2473
+ [
2474
+ "operator",
2475
+ "filterToken__operator"
2476
+ ],
2477
+ [
2478
+ "value",
2479
+ "filterToken__value"
2480
+ ],
2481
+ [
2482
+ "valueText",
2483
+ "filterToken__valueText"
2484
+ ],
2485
+ [
2486
+ "count",
2487
+ "filterToken__count"
2488
+ ],
2489
+ [
2490
+ "editor",
2491
+ "filterToken__editor"
2492
+ ],
2493
+ [
2494
+ "remove",
2495
+ "filterToken__remove"
2496
+ ]
2497
+ ];
2498
+ const filterTokenSlotFns = /* @__PURE__ */ filterTokenSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, filterTokenDefaultVariants, getSlotCompoundVariant(filterTokenCompoundVariants, slotName))]);
2499
+ const filterTokenFn = memo((props = {}) => {
2500
+ return Object.fromEntries(filterTokenSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
2501
+ });
2502
+ const filterTokenVariantKeys = [];
2503
+ const getVariantProps$i = (variants) => ({ ...filterTokenDefaultVariants, ...compact(variants) });
2504
+ const filterToken = /* @__PURE__ */ Object.assign(filterTokenFn, {
2505
+ __recipe__: false,
2506
+ __name__: "filterToken",
2507
+ raw: (props) => props,
2508
+ classNameMap: {},
2509
+ variantKeys: filterTokenVariantKeys,
2510
+ variantMap: {},
2511
+ splitVariantProps(props) {
2512
+ return splitProps$1(props, filterTokenVariantKeys);
2513
+ },
2514
+ getVariantProps: getVariantProps$i
2457
2515
  });
2458
2516
  const formFieldDefaultVariants = {
2459
2517
  "layout": "default",
@@ -2482,7 +2540,7 @@ const formFieldVariantKeys = [
2482
2540
  "layout",
2483
2541
  "size"
2484
2542
  ];
2485
- const getVariantProps$g = (variants) => ({ ...formFieldDefaultVariants, ...compact(variants) });
2543
+ const getVariantProps$h = (variants) => ({ ...formFieldDefaultVariants, ...compact(variants) });
2486
2544
  const formField = /* @__PURE__ */ Object.assign(formFieldFn, {
2487
2545
  __recipe__: false,
2488
2546
  __name__: "formField",
@@ -2504,7 +2562,7 @@ const formField = /* @__PURE__ */ Object.assign(formFieldFn, {
2504
2562
  splitVariantProps(props) {
2505
2563
  return splitProps$1(props, formFieldVariantKeys);
2506
2564
  },
2507
- getVariantProps: getVariantProps$g
2565
+ getVariantProps: getVariantProps$h
2508
2566
  });
2509
2567
  const iconButtonDefaultVariants = {
2510
2568
  "variant": "standard",
@@ -2533,7 +2591,7 @@ const iconButtonVariantKeys = [
2533
2591
  "variant",
2534
2592
  "size"
2535
2593
  ];
2536
- const getVariantProps$f = (variants) => ({ ...iconButtonDefaultVariants, ...compact(variants) });
2594
+ const getVariantProps$g = (variants) => ({ ...iconButtonDefaultVariants, ...compact(variants) });
2537
2595
  const iconButton = /* @__PURE__ */ Object.assign(iconButtonFn, {
2538
2596
  __recipe__: false,
2539
2597
  __name__: "iconButton",
@@ -2561,7 +2619,7 @@ const iconButton = /* @__PURE__ */ Object.assign(iconButtonFn, {
2561
2619
  splitVariantProps(props) {
2562
2620
  return splitProps$1(props, iconButtonVariantKeys);
2563
2621
  },
2564
- getVariantProps: getVariantProps$f
2622
+ getVariantProps: getVariantProps$g
2565
2623
  });
2566
2624
  const inlineNoteDefaultVariants = {
2567
2625
  "tone": "info"
@@ -2588,7 +2646,7 @@ const inlineNoteFn = memo((props = {}) => {
2588
2646
  const inlineNoteVariantKeys = [
2589
2647
  "tone"
2590
2648
  ];
2591
- const getVariantProps$e = (variants) => ({ ...inlineNoteDefaultVariants, ...compact(variants) });
2649
+ const getVariantProps$f = (variants) => ({ ...inlineNoteDefaultVariants, ...compact(variants) });
2592
2650
  const inlineNote = /* @__PURE__ */ Object.assign(inlineNoteFn, {
2593
2651
  __recipe__: false,
2594
2652
  __name__: "inlineNote",
@@ -2607,7 +2665,7 @@ const inlineNote = /* @__PURE__ */ Object.assign(inlineNoteFn, {
2607
2665
  splitVariantProps(props) {
2608
2666
  return splitProps$1(props, inlineNoteVariantKeys);
2609
2667
  },
2610
- getVariantProps: getVariantProps$e
2668
+ getVariantProps: getVariantProps$f
2611
2669
  });
2612
2670
  const kbdDefaultVariants = {
2613
2671
  "variant": "default"
@@ -2630,7 +2688,7 @@ const kbdFn = memo((props = {}) => {
2630
2688
  const kbdVariantKeys = [
2631
2689
  "variant"
2632
2690
  ];
2633
- const getVariantProps$d = (variants) => ({ ...kbdDefaultVariants, ...compact(variants) });
2691
+ const getVariantProps$e = (variants) => ({ ...kbdDefaultVariants, ...compact(variants) });
2634
2692
  const kbd = /* @__PURE__ */ Object.assign(kbdFn, {
2635
2693
  __recipe__: false,
2636
2694
  __name__: "kbd",
@@ -2646,7 +2704,7 @@ const kbd = /* @__PURE__ */ Object.assign(kbdFn, {
2646
2704
  splitVariantProps(props) {
2647
2705
  return splitProps$1(props, kbdVariantKeys);
2648
2706
  },
2649
- getVariantProps: getVariantProps$d
2707
+ getVariantProps: getVariantProps$e
2650
2708
  });
2651
2709
  const listItemGroupDefaultVariants = {
2652
2710
  "density": "compact"
@@ -2673,7 +2731,7 @@ const listItemGroupFn = memo((props = {}) => {
2673
2731
  const listItemGroupVariantKeys = [
2674
2732
  "density"
2675
2733
  ];
2676
- const getVariantProps$c = (variants) => ({ ...listItemGroupDefaultVariants, ...compact(variants) });
2734
+ const getVariantProps$d = (variants) => ({ ...listItemGroupDefaultVariants, ...compact(variants) });
2677
2735
  const listItemGroup = /* @__PURE__ */ Object.assign(listItemGroupFn, {
2678
2736
  __recipe__: false,
2679
2737
  __name__: "listItemGroup",
@@ -2690,7 +2748,7 @@ const listItemGroup = /* @__PURE__ */ Object.assign(listItemGroupFn, {
2690
2748
  splitVariantProps(props) {
2691
2749
  return splitProps$1(props, listItemGroupVariantKeys);
2692
2750
  },
2693
- getVariantProps: getVariantProps$c
2751
+ getVariantProps: getVariantProps$d
2694
2752
  });
2695
2753
  const listItemDefaultVariants = {
2696
2754
  "variant": "default",
@@ -2746,7 +2804,7 @@ const listItemVariantKeys = [
2746
2804
  "iconBefore",
2747
2805
  "iconAfter"
2748
2806
  ];
2749
- const getVariantProps$b = (variants) => ({ ...listItemDefaultVariants, ...compact(variants) });
2807
+ const getVariantProps$c = (variants) => ({ ...listItemDefaultVariants, ...compact(variants) });
2750
2808
  const listItem = /* @__PURE__ */ Object.assign(listItemFn, {
2751
2809
  __recipe__: false,
2752
2810
  __name__: "listItem",
@@ -2781,7 +2839,7 @@ const listItem = /* @__PURE__ */ Object.assign(listItemFn, {
2781
2839
  splitVariantProps(props) {
2782
2840
  return splitProps$1(props, listItemVariantKeys);
2783
2841
  },
2784
- getVariantProps: getVariantProps$b
2842
+ getVariantProps: getVariantProps$c
2785
2843
  });
2786
2844
  const menuDefaultVariants = {
2787
2845
  "density": "compact",
@@ -2828,7 +2886,7 @@ const menuVariantKeys = [
2828
2886
  "panel",
2829
2887
  "scrollable"
2830
2888
  ];
2831
- const getVariantProps$a = (variants) => ({ ...menuDefaultVariants, ...compact(variants) });
2889
+ const getVariantProps$b = (variants) => ({ ...menuDefaultVariants, ...compact(variants) });
2832
2890
  const menu = /* @__PURE__ */ Object.assign(menuFn, {
2833
2891
  __recipe__: false,
2834
2892
  __name__: "menu",
@@ -2855,7 +2913,7 @@ const menu = /* @__PURE__ */ Object.assign(menuFn, {
2855
2913
  splitVariantProps(props) {
2856
2914
  return splitProps$1(props, menuVariantKeys);
2857
2915
  },
2858
- getVariantProps: getVariantProps$a
2916
+ getVariantProps: getVariantProps$b
2859
2917
  });
2860
2918
  const modalDefaultVariants = {
2861
2919
  "size": "md",
@@ -2904,7 +2962,7 @@ const modalVariantKeys = [
2904
2962
  "size",
2905
2963
  "position"
2906
2964
  ];
2907
- const getVariantProps$9 = (variants) => ({ ...modalDefaultVariants, ...compact(variants) });
2965
+ const getVariantProps$a = (variants) => ({ ...modalDefaultVariants, ...compact(variants) });
2908
2966
  const modal = /* @__PURE__ */ Object.assign(modalFn, {
2909
2967
  __recipe__: false,
2910
2968
  __name__: "modal",
@@ -2928,7 +2986,7 @@ const modal = /* @__PURE__ */ Object.assign(modalFn, {
2928
2986
  splitVariantProps(props) {
2929
2987
  return splitProps$1(props, modalVariantKeys);
2930
2988
  },
2931
- getVariantProps: getVariantProps$9
2989
+ getVariantProps: getVariantProps$a
2932
2990
  });
2933
2991
  const pageBannerDefaultVariants = {
2934
2992
  "tone": "info"
@@ -2963,7 +3021,7 @@ const pageBannerFn = memo((props = {}) => {
2963
3021
  const pageBannerVariantKeys = [
2964
3022
  "tone"
2965
3023
  ];
2966
- const getVariantProps$8 = (variants) => ({ ...pageBannerDefaultVariants, ...compact(variants) });
3024
+ const getVariantProps$9 = (variants) => ({ ...pageBannerDefaultVariants, ...compact(variants) });
2967
3025
  const pageBanner = /* @__PURE__ */ Object.assign(pageBannerFn, {
2968
3026
  __recipe__: false,
2969
3027
  __name__: "pageBanner",
@@ -2982,7 +3040,7 @@ const pageBanner = /* @__PURE__ */ Object.assign(pageBannerFn, {
2982
3040
  splitVariantProps(props) {
2983
3041
  return splitProps$1(props, pageBannerVariantKeys);
2984
3042
  },
2985
- getVariantProps: getVariantProps$8
3043
+ getVariantProps: getVariantProps$9
2986
3044
  });
2987
3045
  const radioDefaultVariants = {};
2988
3046
  const radioCompoundVariants = [];
@@ -3009,7 +3067,7 @@ const radioFn = memo((props = {}) => {
3009
3067
  return Object.fromEntries(radioSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
3010
3068
  });
3011
3069
  const radioVariantKeys = [];
3012
- const getVariantProps$7 = (variants) => ({ ...radioDefaultVariants, ...compact(variants) });
3070
+ const getVariantProps$8 = (variants) => ({ ...radioDefaultVariants, ...compact(variants) });
3013
3071
  const radio = /* @__PURE__ */ Object.assign(radioFn, {
3014
3072
  __recipe__: false,
3015
3073
  __name__: "radio",
@@ -3020,7 +3078,7 @@ const radio = /* @__PURE__ */ Object.assign(radioFn, {
3020
3078
  splitVariantProps(props) {
3021
3079
  return splitProps$1(props, radioVariantKeys);
3022
3080
  },
3023
- getVariantProps: getVariantProps$7
3081
+ getVariantProps: getVariantProps$8
3024
3082
  });
3025
3083
  const segmentedFieldsDefaultVariants = {
3026
3084
  "size": "md"
@@ -3055,7 +3113,7 @@ const segmentedFieldsVariantKeys = [
3055
3113
  "before",
3056
3114
  "after"
3057
3115
  ];
3058
- const getVariantProps$6 = (variants) => ({ ...segmentedFieldsDefaultVariants, ...compact(variants) });
3116
+ const getVariantProps$7 = (variants) => ({ ...segmentedFieldsDefaultVariants, ...compact(variants) });
3059
3117
  const segmentedFields = /* @__PURE__ */ Object.assign(segmentedFieldsFn, {
3060
3118
  __recipe__: false,
3061
3119
  __name__: "segmentedFields",
@@ -3088,7 +3146,7 @@ const segmentedFields = /* @__PURE__ */ Object.assign(segmentedFieldsFn, {
3088
3146
  splitVariantProps(props) {
3089
3147
  return splitProps$1(props, segmentedFieldsVariantKeys);
3090
3148
  },
3091
- getVariantProps: getVariantProps$6
3149
+ getVariantProps: getVariantProps$7
3092
3150
  });
3093
3151
  const segmentedInputsDefaultVariants = {
3094
3152
  "size": "md"
@@ -3115,7 +3173,7 @@ const segmentedInputsFn = memo((props = {}) => {
3115
3173
  const segmentedInputsVariantKeys = [
3116
3174
  "size"
3117
3175
  ];
3118
- const getVariantProps$5 = (variants) => ({ ...segmentedInputsDefaultVariants, ...compact(variants) });
3176
+ const getVariantProps$6 = (variants) => ({ ...segmentedInputsDefaultVariants, ...compact(variants) });
3119
3177
  const segmentedInputs = /* @__PURE__ */ Object.assign(segmentedInputsFn, {
3120
3178
  __recipe__: false,
3121
3179
  __name__: "segmentedInputs",
@@ -3133,7 +3191,7 @@ const segmentedInputs = /* @__PURE__ */ Object.assign(segmentedInputsFn, {
3133
3191
  splitVariantProps(props) {
3134
3192
  return splitProps$1(props, segmentedInputsVariantKeys);
3135
3193
  },
3136
- getVariantProps: getVariantProps$5
3194
+ getVariantProps: getVariantProps$6
3137
3195
  });
3138
3196
  const selectDefaultVariants = {
3139
3197
  "size": "md"
@@ -3183,7 +3241,7 @@ const selectVariantKeys = [
3183
3241
  "multiple",
3184
3242
  "autoSize"
3185
3243
  ];
3186
- const getVariantProps$4 = (variants) => ({ ...selectDefaultVariants, ...compact(variants) });
3244
+ const getVariantProps$5 = (variants) => ({ ...selectDefaultVariants, ...compact(variants) });
3187
3245
  const select = /* @__PURE__ */ Object.assign(selectFn, {
3188
3246
  __recipe__: false,
3189
3247
  __name__: "select",
@@ -3211,6 +3269,73 @@ const select = /* @__PURE__ */ Object.assign(selectFn, {
3211
3269
  splitVariantProps(props) {
3212
3270
  return splitProps$1(props, selectVariantKeys);
3213
3271
  },
3272
+ getVariantProps: getVariantProps$5
3273
+ });
3274
+ const tabsDefaultVariants = {
3275
+ "hasOverflow": false
3276
+ };
3277
+ const tabsCompoundVariants = [];
3278
+ const tabsSlotNames = [
3279
+ [
3280
+ "root",
3281
+ "tabs__root"
3282
+ ],
3283
+ [
3284
+ "strip",
3285
+ "tabs__strip"
3286
+ ],
3287
+ [
3288
+ "list",
3289
+ "tabs__list"
3290
+ ],
3291
+ [
3292
+ "tab",
3293
+ "tabs__tab"
3294
+ ],
3295
+ [
3296
+ "badge",
3297
+ "tabs__badge"
3298
+ ],
3299
+ [
3300
+ "overflow",
3301
+ "tabs__overflow"
3302
+ ],
3303
+ [
3304
+ "menu",
3305
+ "tabs__menu"
3306
+ ],
3307
+ [
3308
+ "panel",
3309
+ "tabs__panel"
3310
+ ]
3311
+ ];
3312
+ const tabsSlotFns = /* @__PURE__ */ tabsSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, tabsDefaultVariants, getSlotCompoundVariant(tabsCompoundVariants, slotName))]);
3313
+ const tabsFn = memo((props = {}) => {
3314
+ return Object.fromEntries(tabsSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
3315
+ });
3316
+ const tabsVariantKeys = [
3317
+ "hasOverflow",
3318
+ "overflowed"
3319
+ ];
3320
+ const getVariantProps$4 = (variants) => ({ ...tabsDefaultVariants, ...compact(variants) });
3321
+ const tabs = /* @__PURE__ */ Object.assign(tabsFn, {
3322
+ __recipe__: false,
3323
+ __name__: "tabs",
3324
+ raw: (props) => props,
3325
+ classNameMap: {},
3326
+ variantKeys: tabsVariantKeys,
3327
+ variantMap: {
3328
+ "hasOverflow": [
3329
+ "false",
3330
+ "true"
3331
+ ],
3332
+ "overflowed": [
3333
+ "true"
3334
+ ]
3335
+ },
3336
+ splitVariantProps(props) {
3337
+ return splitProps$1(props, tabsVariantKeys);
3338
+ },
3214
3339
  getVariantProps: getVariantProps$4
3215
3340
  });
3216
3341
  const textInputDefaultVariants = {
@@ -15395,6 +15520,7 @@ const defaultLocaleLabels = {
15395
15520
  dismiss: "Dismiss",
15396
15521
  closeDialog: "Close dialog",
15397
15522
  removeItem: (item) => `Remove ${item}`,
15523
+ removeFilter: (filter) => `Remove filter: ${filter}`,
15398
15524
  switchToTheme: (nextTheme) => `Switch to ${nextTheme} theme`,
15399
15525
  selectPlaceholder: "Select...",
15400
15526
  noResults: "No results found",
@@ -15930,6 +16056,239 @@ function useContainerQuery(containerRef, size2, direction = "min") {
15930
16056
  () => false
15931
16057
  );
15932
16058
  }
16059
+ const DEFAULT_RESERVE = 32;
16060
+ const areKeysEqual = (a, b) => a.length === b.length && a.every((key, index2) => key === b[index2]);
16061
+ const syncObservedElements = (observer, current, desired) => {
16062
+ for (const element of current) {
16063
+ if (!desired.has(element)) observer == null ? void 0 : observer.unobserve(element);
16064
+ }
16065
+ for (const element of desired) {
16066
+ if (!current.has(element)) observer == null ? void 0 : observer.observe(element);
16067
+ }
16068
+ return desired;
16069
+ };
16070
+ const useOverflowItems = ({
16071
+ items,
16072
+ containerRef,
16073
+ getItemElement,
16074
+ activeItem = null,
16075
+ reserve = DEFAULT_RESERVE,
16076
+ reserveRef,
16077
+ enabled = true
16078
+ }) => {
16079
+ const [visible, setVisible] = useState(() => [...items]);
16080
+ const [overflow, setOverflow] = useState([]);
16081
+ const [forcedItem, setForcedItem] = useState(null);
16082
+ const frameRef = useRef(null);
16083
+ const itemsRef = useRef(items);
16084
+ const activeItemRef = useRef(activeItem);
16085
+ const forcedItemRef = useRef(forcedItem);
16086
+ const requestsRef = useRef([]);
16087
+ const lastActiveItemRef = useRef(activeItem);
16088
+ const reserveValueRef = useRef(reserve);
16089
+ const reserveElementRef = useRef(null);
16090
+ const enabledRef = useRef(enabled);
16091
+ const observerRef = useRef(null);
16092
+ const observedElementsRef = useRef(/* @__PURE__ */ new Set());
16093
+ const pendingVisibilityRef = useRef(null);
16094
+ const measure = useCallback(() => {
16095
+ var _a;
16096
+ const container = containerRef.current;
16097
+ const currentItems = itemsRef.current;
16098
+ if (!enabledRef.current || !container) {
16099
+ setVisible(
16100
+ (current) => areKeysEqual(current, currentItems) ? current : [...currentItems]
16101
+ );
16102
+ setOverflow((current) => current.length === 0 ? current : []);
16103
+ return;
16104
+ }
16105
+ const styles = globalThis.getComputedStyle(container);
16106
+ const paddingInline = Number.parseFloat(styles.paddingLeft || "0") + Number.parseFloat(styles.paddingRight || "0");
16107
+ const gap = Number.parseFloat(styles.columnGap || "0") || 0;
16108
+ const fullWidth = container.clientWidth - paddingInline;
16109
+ const widths = currentItems.map(
16110
+ (key) => {
16111
+ var _a2;
16112
+ return ((_a2 = getItemElement(key)) == null ? void 0 : _a2.offsetWidth) ?? Number.POSITIVE_INFINITY;
16113
+ }
16114
+ );
16115
+ const forcedKey = forcedItemRef.current;
16116
+ const activeKey = activeItemRef.current;
16117
+ const priorityItem = forcedKey ?? activeKey;
16118
+ const priorityIndex = priorityItem === null ? -1 : currentItems.indexOf(priorityItem);
16119
+ const anchor = priorityIndex === -1 ? 0 : priorityIndex;
16120
+ const requiredIndices = [
16121
+ ...new Set(
16122
+ [forcedKey, activeKey].filter((key) => key !== null).map((key) => currentItems.indexOf(key)).filter((index2) => index2 !== -1)
16123
+ )
16124
+ ];
16125
+ const byDistanceFromActive = currentItems.map((_key, index2) => index2).sort((a, b) => {
16126
+ const distance = Math.abs(a - anchor) - Math.abs(b - anchor);
16127
+ return distance === 0 ? a - b : distance;
16128
+ });
16129
+ const fit = (forcedIndices, usable) => {
16130
+ const kept2 = /* @__PURE__ */ new Set();
16131
+ let used = 0;
16132
+ for (const index2 of forcedIndices) {
16133
+ used += (widths[index2] ?? 0) + (kept2.size > 0 ? gap : 0);
16134
+ kept2.add(index2);
16135
+ }
16136
+ for (const index2 of byDistanceFromActive) {
16137
+ if (kept2.has(index2)) continue;
16138
+ const width = (widths[index2] ?? 0) + (kept2.size > 0 ? gap : 0);
16139
+ if (used + width > usable) break;
16140
+ used += width;
16141
+ kept2.add(index2);
16142
+ }
16143
+ return kept2;
16144
+ };
16145
+ let kept = fit([], fullWidth);
16146
+ if (kept.size < currentItems.length) {
16147
+ const reservedWidth = ((_a = reserveElementRef.current) == null ? void 0 : _a.offsetWidth) ?? reserveValueRef.current;
16148
+ const usable = fullWidth - reservedWidth;
16149
+ kept = fit([], usable);
16150
+ if (requiredIndices.some((index2) => !kept.has(index2))) {
16151
+ kept = fit(requiredIndices, usable);
16152
+ }
16153
+ }
16154
+ const nextVisible = [];
16155
+ const nextOverflow = [];
16156
+ currentItems.forEach((key, index2) => {
16157
+ if (kept.has(index2)) {
16158
+ nextVisible.push(key);
16159
+ } else {
16160
+ nextOverflow.push(key);
16161
+ }
16162
+ });
16163
+ setVisible(
16164
+ (current) => areKeysEqual(current, nextVisible) ? current : nextVisible
16165
+ );
16166
+ setOverflow(
16167
+ (current) => areKeysEqual(current, nextOverflow) ? current : nextOverflow
16168
+ );
16169
+ }, [containerRef, getItemElement]);
16170
+ const ensureVisible = useCallback(
16171
+ (key, onVisible) => {
16172
+ if (!itemsRef.current.includes(key)) return;
16173
+ const requests = requestsRef.current;
16174
+ const isTracked = requests.length > 0 || key !== activeItemRef.current;
16175
+ if (isTracked) {
16176
+ requestsRef.current = [
16177
+ ...requests.filter((request) => request !== key),
16178
+ key
16179
+ ];
16180
+ setForcedItem(key);
16181
+ }
16182
+ if (!overflow.includes(key)) {
16183
+ pendingVisibilityRef.current = null;
16184
+ onVisible == null ? void 0 : onVisible();
16185
+ return;
16186
+ }
16187
+ pendingVisibilityRef.current = { key, onVisible };
16188
+ setForcedItem(key);
16189
+ },
16190
+ [overflow]
16191
+ );
16192
+ useLayoutEffect(() => {
16193
+ const schedule = () => {
16194
+ if (frameRef.current !== null) {
16195
+ globalThis.cancelAnimationFrame(frameRef.current);
16196
+ }
16197
+ frameRef.current = globalThis.requestAnimationFrame(() => {
16198
+ frameRef.current = null;
16199
+ measure();
16200
+ });
16201
+ };
16202
+ const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(schedule);
16203
+ observerRef.current = observer;
16204
+ globalThis.addEventListener("resize", schedule);
16205
+ return () => {
16206
+ observer == null ? void 0 : observer.disconnect();
16207
+ observerRef.current = null;
16208
+ observedElementsRef.current.clear();
16209
+ globalThis.removeEventListener("resize", schedule);
16210
+ if (frameRef.current !== null) {
16211
+ globalThis.cancelAnimationFrame(frameRef.current);
16212
+ frameRef.current = null;
16213
+ }
16214
+ };
16215
+ }, [measure]);
16216
+ useLayoutEffect(() => {
16217
+ if (!areKeysEqual(itemsRef.current, items)) {
16218
+ itemsRef.current = [...items];
16219
+ }
16220
+ activeItemRef.current = activeItem;
16221
+ forcedItemRef.current = forcedItem;
16222
+ reserveValueRef.current = reserve;
16223
+ reserveElementRef.current = (reserveRef == null ? void 0 : reserveRef.current) ?? null;
16224
+ enabledRef.current = enabled;
16225
+ const desiredElements = /* @__PURE__ */ new Set();
16226
+ const container = containerRef.current;
16227
+ if (enabled && container) {
16228
+ desiredElements.add(container);
16229
+ if (reserveElementRef.current) {
16230
+ desiredElements.add(reserveElementRef.current);
16231
+ }
16232
+ for (const key of itemsRef.current) {
16233
+ const element = getItemElement(key);
16234
+ if (element) desiredElements.add(element);
16235
+ }
16236
+ }
16237
+ observedElementsRef.current = syncObservedElements(
16238
+ observerRef.current,
16239
+ observedElementsRef.current,
16240
+ desiredElements
16241
+ );
16242
+ measure();
16243
+ }, [
16244
+ activeItem,
16245
+ containerRef,
16246
+ enabled,
16247
+ forcedItem,
16248
+ getItemElement,
16249
+ items,
16250
+ measure,
16251
+ reserve,
16252
+ reserveRef
16253
+ ]);
16254
+ useLayoutEffect(() => {
16255
+ var _a;
16256
+ const pending = pendingVisibilityRef.current;
16257
+ if (!pending) return;
16258
+ if (!itemsRef.current.includes(pending.key)) {
16259
+ pendingVisibilityRef.current = null;
16260
+ setForcedItem(null);
16261
+ return;
16262
+ }
16263
+ if (overflow.includes(pending.key)) return;
16264
+ pendingVisibilityRef.current = null;
16265
+ (_a = pending.onVisible) == null ? void 0 : _a.call(pending);
16266
+ }, [overflow]);
16267
+ useLayoutEffect(() => {
16268
+ if (lastActiveItemRef.current !== activeItem) {
16269
+ lastActiveItemRef.current = activeItem;
16270
+ const requests = requestsRef.current;
16271
+ const index2 = activeItem === null ? -1 : requests.indexOf(activeItem);
16272
+ requestsRef.current = index2 === -1 ? [] : requests.slice(index2 + 1);
16273
+ }
16274
+ if (forcedItem === null) return;
16275
+ const isRemoved = !items.includes(forcedItem);
16276
+ if (!isRemoved && requestsRef.current.length > 0) return;
16277
+ const pending = pendingVisibilityRef.current;
16278
+ if (pending && (isRemoved || pending.key !== activeItem)) {
16279
+ pendingVisibilityRef.current = null;
16280
+ }
16281
+ requestsRef.current = [];
16282
+ setForcedItem(null);
16283
+ }, [activeItem, forcedItem, items]);
16284
+ return {
16285
+ visible,
16286
+ overflow,
16287
+ hasOverflow: overflow.length > 0,
16288
+ measure,
16289
+ ensureVisible
16290
+ };
16291
+ };
15933
16292
  function useClipboard(options = {}) {
15934
16293
  const { timeout = 2e3 } = options;
15935
16294
  const [copied, setCopied] = useState(false);
@@ -18721,6 +19080,20 @@ const DateTimeInput = (props) => {
18721
19080
  };
18722
19081
  const FloatingLayerContext = createContext("elevated");
18723
19082
  const useFloatingLayer = () => useContext(FloatingLayerContext);
19083
+ const getCompoundComponentType = (node, markerKey) => {
19084
+ if (!node || typeof node !== "object" || !("type" in node)) {
19085
+ return null;
19086
+ }
19087
+ const component = node.type;
19088
+ if (typeof component !== "function" && typeof component !== "object" || component === null) {
19089
+ return null;
19090
+ }
19091
+ const marker = component[markerKey];
19092
+ return typeof marker === "string" ? marker : null;
19093
+ };
19094
+ const setCompoundComponentType = (component, markerKey, componentType) => {
19095
+ Object.assign(component, { [markerKey]: componentType });
19096
+ };
18724
19097
  const MENU_COMPONENT_TYPES = {
18725
19098
  group: "MenuGroup",
18726
19099
  item: "MenuItem",
@@ -18792,14 +19165,7 @@ const isItemMatch = ({
18792
19165
  return textValue.toLowerCase().includes(query.trim().toLowerCase());
18793
19166
  };
18794
19167
  const getComponentType = (node) => {
18795
- if (!node || typeof node !== "object") {
18796
- return null;
18797
- }
18798
- if (!("type" in node)) {
18799
- return null;
18800
- }
18801
- const type = node.type;
18802
- return (type == null ? void 0 : type[menuComponentTypeKey]) ?? null;
19168
+ return getCompoundComponentType(node, menuComponentTypeKey);
18803
19169
  };
18804
19170
  const hasMatchingItems = (children, filterContext) => {
18805
19171
  return Children.toArray(children).some((childNode) => {
@@ -19705,7 +20071,11 @@ const MenuGroup = (props) => {
19705
20071
  }
19706
20072
  );
19707
20073
  };
19708
- MenuGroup[menuComponentTypeKey] = MENU_COMPONENT_TYPES.group;
20074
+ setCompoundComponentType(
20075
+ MenuGroup,
20076
+ menuComponentTypeKey,
20077
+ MENU_COMPONENT_TYPES.group
20078
+ );
19709
20079
  const getHighlightParts = (value, query) => {
19710
20080
  const safeQuery = query.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
19711
20081
  const regExp = new RegExp(`(${safeQuery})`, "ig");
@@ -20002,7 +20372,11 @@ const MenuItem = (props) => {
20002
20372
  }
20003
20373
  );
20004
20374
  };
20005
- MenuItem[menuComponentTypeKey] = MENU_COMPONENT_TYPES.item;
20375
+ setCompoundComponentType(
20376
+ MenuItem,
20377
+ menuComponentTypeKey,
20378
+ MENU_COMPONENT_TYPES.item
20379
+ );
20006
20380
  const MenuProvider = ({ children, root, filter }) => {
20007
20381
  const rootValue = {
20008
20382
  ...defaultMenuRootContextValue,
@@ -20488,7 +20862,11 @@ const SubMenu = (props) => {
20488
20862
  ) }) })
20489
20863
  ] });
20490
20864
  };
20491
- SubMenu[menuComponentTypeKey] = MENU_COMPONENT_TYPES.subMenu;
20865
+ setCompoundComponentType(
20866
+ SubMenu,
20867
+ menuComponentTypeKey,
20868
+ MENU_COMPONENT_TYPES.subMenu
20869
+ );
20492
20870
  const DateMenu = (props) => {
20493
20871
  const {
20494
20872
  trigger,
@@ -22251,6 +22629,130 @@ const DrawerFooter = (props) => {
22251
22629
  const classes = drawer();
22252
22630
  return /* @__PURE__ */ jsx(Box, { className: cx(classes.footer, className), ...otherProps, children });
22253
22631
  };
22632
+ const MAX_VISIBLE_VALUES = 2;
22633
+ const FilterToken = (props) => {
22634
+ const {
22635
+ field,
22636
+ operator,
22637
+ value,
22638
+ state = "applied",
22639
+ tone = "default",
22640
+ operatorLocked,
22641
+ editor,
22642
+ disabled,
22643
+ retainFocus,
22644
+ onFieldClick,
22645
+ onOperatorClick,
22646
+ onValueClick,
22647
+ onRemove,
22648
+ removeLabel,
22649
+ ...rest
22650
+ } = props;
22651
+ const [className, otherProps] = splitProps(rest);
22652
+ const classes = filterToken();
22653
+ const { labels } = useLocale();
22654
+ const values = Array.isArray(value) ? value : void 0;
22655
+ const fullValue = Array.isArray(value) ? value.join(", ") : value;
22656
+ const hidden = values ? Math.max(0, values.length - MAX_VISIBLE_VALUES) : 0;
22657
+ const shownValue = values ? values.slice(0, MAX_VISIBLE_VALUES).join(", ") : value;
22658
+ const sentence = [field, operator, fullValue].filter(Boolean).join(" ");
22659
+ const keepFocus = retainFocus ? (e) => e.preventDefault() : void 0;
22660
+ const valueTextRef = useRef(null);
22661
+ const [clipped, setClipped] = useState(false);
22662
+ useLayoutEffect(() => {
22663
+ const node = valueTextRef.current;
22664
+ if (!node) {
22665
+ setClipped(false);
22666
+ return;
22667
+ }
22668
+ const check = () => setClipped(node.scrollWidth > node.clientWidth);
22669
+ check();
22670
+ if (typeof ResizeObserver === "undefined") return;
22671
+ const observer = new ResizeObserver(check);
22672
+ observer.observe(node);
22673
+ return () => observer.disconnect();
22674
+ }, [shownValue, editor]);
22675
+ const part = (slot, content, onClick, extra) => onClick ? /* @__PURE__ */ jsx(
22676
+ Box,
22677
+ {
22678
+ as: "button",
22679
+ type: "button",
22680
+ className: cx(classes.part, slot),
22681
+ disabled,
22682
+ onMouseDown: keepFocus,
22683
+ onClick,
22684
+ ...extra,
22685
+ children: content
22686
+ }
22687
+ ) : /* @__PURE__ */ jsx(Box, { as: "span", className: cx(classes.part, slot), ...extra, children: content });
22688
+ const valueContent = /* @__PURE__ */ jsxs(Fragment, { children: [
22689
+ /* @__PURE__ */ jsx(
22690
+ Box,
22691
+ {
22692
+ as: "span",
22693
+ ref: valueTextRef,
22694
+ className: classes.valueText,
22695
+ "aria-hidden": hidden > 0 || void 0,
22696
+ children: shownValue || "…"
22697
+ }
22698
+ ),
22699
+ hidden > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
22700
+ /* @__PURE__ */ jsx(Box, { as: "span", className: classes.count, "aria-hidden": true, children: `+${hidden}` }),
22701
+ /* @__PURE__ */ jsx(Box, { as: "span", srOnly: true, children: fullValue })
22702
+ ] })
22703
+ ] });
22704
+ return /* @__PURE__ */ jsxs(
22705
+ Box,
22706
+ {
22707
+ ...dsComponent("FilterToken"),
22708
+ as: "span",
22709
+ role: "group",
22710
+ "aria-label": sentence,
22711
+ className: cx(classes.root, className),
22712
+ "data-state": state,
22713
+ "data-tone": tone,
22714
+ "data-disabled": disabled || void 0,
22715
+ ...otherProps,
22716
+ children: [
22717
+ part(classes.field, field, onFieldClick ?? onValueClick),
22718
+ part(
22719
+ classes.operator,
22720
+ operator,
22721
+ operatorLocked ? void 0 : onOperatorClick,
22722
+ operatorLocked ? { "data-locked": true } : void 0
22723
+ ),
22724
+ editor !== void 0 ? (
22725
+ // `inert` keeps a disabled token's editor out of the tab order.
22726
+ /* @__PURE__ */ jsxs(
22727
+ Box,
22728
+ {
22729
+ as: "span",
22730
+ className: cx(classes.part, classes.editor),
22731
+ inert: disabled || void 0,
22732
+ children: [
22733
+ shownValue && /* @__PURE__ */ jsx(Box, { as: "span", className: classes.value, children: valueContent }),
22734
+ editor
22735
+ ]
22736
+ }
22737
+ )
22738
+ ) : value !== void 0 && /* @__PURE__ */ jsx(Tooltip, { text: fullValue ?? "", disabled: hidden === 0 && !clipped, children: part(classes.value, valueContent, onValueClick) }),
22739
+ onRemove && state !== "removing" && /* @__PURE__ */ jsx(
22740
+ Box,
22741
+ {
22742
+ as: "button",
22743
+ type: "button",
22744
+ className: classes.remove,
22745
+ "aria-label": removeLabel ?? labels.removeFilter(sentence),
22746
+ disabled,
22747
+ onMouseDown: keepFocus,
22748
+ onClick: onRemove,
22749
+ children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "16", "aria-hidden": true })
22750
+ }
22751
+ )
22752
+ ]
22753
+ }
22754
+ );
22755
+ };
22254
22756
  const Required = () => {
22255
22757
  return /* @__PURE__ */ jsx(Text, { color: "text.danger", fontSize: "inherit", lineHeight: "tight", children: "*" });
22256
22758
  };
@@ -22999,6 +23501,569 @@ const RadioInput = (props) => {
22999
23501
  }
23000
23502
  );
23001
23503
  };
23504
+ const TabsContext = createContext(null);
23505
+ const TabPanelActiveContext = createContext(true);
23506
+ const TabsProvider = TabsContext.Provider;
23507
+ const TabPanelActiveProvider = TabPanelActiveContext.Provider;
23508
+ const useTabsContext = () => {
23509
+ const context2 = useContext(TabsContext);
23510
+ if (!context2) {
23511
+ throw new Error("Tabs compound components must be used within <Tabs />");
23512
+ }
23513
+ return context2;
23514
+ };
23515
+ const useTabPanelActive = () => useContext(TabPanelActiveContext);
23516
+ const TABS_COMPONENT_TYPES = {
23517
+ tab: "Tab",
23518
+ panel: "TabPanel"
23519
+ };
23520
+ const tabsComponentTypeKey = "__tabsComponentType";
23521
+ const getTabsComponentType = (node) => {
23522
+ return getCompoundComponentType(node, tabsComponentTypeKey);
23523
+ };
23524
+ const flattenTabsChildren = (children) => {
23525
+ const flattened = [];
23526
+ const visit = (nodes, keyPrefix) => {
23527
+ Children.toArray(nodes).forEach((child) => {
23528
+ if (isValidElement(child) && child.type === Fragment$1) {
23529
+ visit(child.props.children, `${keyPrefix}${String(child.key)}/`);
23530
+ return;
23531
+ }
23532
+ flattened.push(
23533
+ keyPrefix !== "" && isValidElement(child) ? cloneElement(child, { key: `${keyPrefix}${String(child.key)}` }) : child
23534
+ );
23535
+ });
23536
+ };
23537
+ visit(children, "");
23538
+ return flattened;
23539
+ };
23540
+ const overflowedTabClass = tabs({ overflowed: true }).tab;
23541
+ const badgeTooltipClasses = tooltip({ size: "md", hasTitle: false });
23542
+ const Tab = (props) => {
23543
+ const {
23544
+ value,
23545
+ children,
23546
+ // Read by `Tabs` off this element's props for the overflow menu. It is
23547
+ // pulled out here so it never reaches the DOM as a stray attribute.
23548
+ label: _label,
23549
+ badge: badge2,
23550
+ badgeTooltip,
23551
+ disabled = false,
23552
+ onClick,
23553
+ onKeyDown,
23554
+ ref,
23555
+ ...rest
23556
+ } = props;
23557
+ const {
23558
+ classes,
23559
+ getPanelId,
23560
+ getTabId,
23561
+ onTabKeyDown,
23562
+ overflowValues,
23563
+ registerTabElement,
23564
+ selectTab,
23565
+ selectedValue
23566
+ } = useTabsContext();
23567
+ const isSelected = selectedValue === value;
23568
+ const isOverflowed = overflowValues.includes(value);
23569
+ const [className, otherProps] = splitProps(rest);
23570
+ const setElement = useCallback(
23571
+ (element) => {
23572
+ registerTabElement(value, element);
23573
+ },
23574
+ [registerTabElement, value]
23575
+ );
23576
+ const tabClassName = isOverflowed ? overflowedTabClass : classes.tab;
23577
+ const hasBadge = typeof badge2 === "number" && badge2 !== 0;
23578
+ const hasBadgeTooltip = hasBadge && Boolean(badgeTooltip) && !isOverflowed;
23579
+ const [isTooltipOpen, setIsTooltipOpen] = useState(false);
23580
+ const arrowRef = useRef(null);
23581
+ const tooltipOpen = hasBadgeTooltip && isTooltipOpen;
23582
+ const { refs, elements, floatingStyles, context: context2 } = useOverlayFloating({
23583
+ open: tooltipOpen,
23584
+ onOpenChange: setIsTooltipOpen,
23585
+ placement: "bottom",
23586
+ middleware: createOverlayMiddleware({
23587
+ offset: 8,
23588
+ extras: [arrow({ element: arrowRef })]
23589
+ })
23590
+ });
23591
+ const hover = useHover(context2, { enabled: hasBadgeTooltip, move: false });
23592
+ const focus = useFocus(context2, { enabled: hasBadgeTooltip });
23593
+ const dismiss = useDismiss(context2, { enabled: hasBadgeTooltip });
23594
+ const role = useRole(context2, { enabled: hasBadgeTooltip, role: "tooltip" });
23595
+ const { getReferenceProps, getFloatingProps } = useInteractions([
23596
+ hover,
23597
+ focus,
23598
+ dismiss,
23599
+ role
23600
+ ]);
23601
+ const mergedRef = useMergeRefs([setElement, refs.setReference, ref]);
23602
+ const badgeElement = hasBadge ? /* @__PURE__ */ jsx(Box, { ref: refs.setPositionReference, className: classes.badge, children: /* @__PURE__ */ jsx(Badge, { count: badge2, variant: "subtle" }) }) : null;
23603
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
23604
+ /* @__PURE__ */ jsxs(
23605
+ Box,
23606
+ {
23607
+ ...{
23608
+ as: "button",
23609
+ type: "button"
23610
+ },
23611
+ ref: mergedRef,
23612
+ role: "tab",
23613
+ "aria-selected": isSelected,
23614
+ "aria-controls": getPanelId(value),
23615
+ "aria-hidden": isOverflowed || void 0,
23616
+ disabled,
23617
+ tabIndex: isSelected && !isOverflowed ? 0 : -1,
23618
+ className: cx(tabClassName, className),
23619
+ ...getReferenceProps({
23620
+ ...otherProps,
23621
+ onClick: (event) => {
23622
+ onClick == null ? void 0 : onClick(event);
23623
+ if (disabled || event.defaultPrevented) return;
23624
+ selectTab(event, value, "clicked-on-tab");
23625
+ },
23626
+ onKeyDown: (event) => {
23627
+ onKeyDown == null ? void 0 : onKeyDown(event);
23628
+ if (!event.defaultPrevented) onTabKeyDown(event);
23629
+ }
23630
+ }),
23631
+ id: getTabId(value),
23632
+ children: [
23633
+ children,
23634
+ badgeElement
23635
+ ]
23636
+ }
23637
+ ),
23638
+ tooltipOpen ? /* @__PURE__ */ jsx(FloatingPortal, { children: /* @__PURE__ */ jsx(DsChainPortalRoot, { reference: elements.domReference, children: /* @__PURE__ */ jsxs(
23639
+ Box,
23640
+ {
23641
+ ...dsComponent("Tooltip"),
23642
+ ref: refs.setFloating,
23643
+ style: floatingStyles,
23644
+ className: badgeTooltipClasses.tooltipContent,
23645
+ ...getFloatingProps(),
23646
+ children: [
23647
+ /* @__PURE__ */ jsx(Box, { className: badgeTooltipClasses.text, children: badgeTooltip }),
23648
+ /* @__PURE__ */ jsx(
23649
+ FloatingArrow,
23650
+ {
23651
+ ref: arrowRef,
23652
+ context: context2,
23653
+ fill: token.var("colors.bg.neutral.inverse")
23654
+ }
23655
+ )
23656
+ ]
23657
+ }
23658
+ ) }) }) : null
23659
+ ] });
23660
+ };
23661
+ setCompoundComponentType(Tab, tabsComponentTypeKey, TABS_COMPONENT_TYPES.tab);
23662
+ const TabPanel = (props) => {
23663
+ const { value, children, ...rest } = props;
23664
+ const { classes, getPanelId, getTabId, selectedValue, unmountInactive } = useTabsContext();
23665
+ const isActive = selectedValue === value;
23666
+ const [className, otherProps] = splitProps(rest);
23667
+ if (unmountInactive && !isActive) {
23668
+ return null;
23669
+ }
23670
+ const renderProps = { isActive };
23671
+ const content = typeof children === "function" ? children(renderProps) : children;
23672
+ return /* @__PURE__ */ jsx(TabPanelActiveProvider, { value: isActive, children: /* @__PURE__ */ jsx(
23673
+ Box,
23674
+ {
23675
+ role: "tabpanel",
23676
+ "aria-labelledby": getTabId(value),
23677
+ tabIndex: isActive ? 0 : -1,
23678
+ display: isActive ? "block" : "none",
23679
+ _hidden: { display: "none" },
23680
+ className: cx(classes.panel, className),
23681
+ ...otherProps,
23682
+ id: getPanelId(value),
23683
+ hidden: !isActive,
23684
+ children: content
23685
+ }
23686
+ ) });
23687
+ };
23688
+ setCompoundComponentType(
23689
+ TabPanel,
23690
+ tabsComponentTypeKey,
23691
+ TABS_COMPONENT_TYPES.panel
23692
+ );
23693
+ const getNodeText = (node) => {
23694
+ if (node === null || node === void 0 || typeof node === "boolean") {
23695
+ return "";
23696
+ }
23697
+ if (typeof node === "string" || typeof node === "number") {
23698
+ return String(node);
23699
+ }
23700
+ if (Array.isArray(node)) {
23701
+ return node.map((child) => getNodeText(child)).join("");
23702
+ }
23703
+ if (isValidElement(node)) {
23704
+ return getNodeText(node.props.children);
23705
+ }
23706
+ return "";
23707
+ };
23708
+ const useTabs = ({
23709
+ children,
23710
+ value,
23711
+ defaultValue,
23712
+ onChange,
23713
+ listRef,
23714
+ overflowRef
23715
+ }) => {
23716
+ var _a;
23717
+ const tabs2 = useMemo(() => {
23718
+ const descriptors = [];
23719
+ flattenTabsChildren(children).forEach((child) => {
23720
+ if (!isValidElement(child) || getTabsComponentType(child) !== TABS_COMPONENT_TYPES.tab) {
23721
+ return;
23722
+ }
23723
+ const props = child.props;
23724
+ if (typeof props.value !== "string") return;
23725
+ descriptors.push({
23726
+ value: props.value,
23727
+ // An explicit `label` overrides the flattened children, which in turn
23728
+ // fall back to `value` when the children carry no text at all.
23729
+ label: props.label || getNodeText(props.children) || props.value,
23730
+ disabled: Boolean(props.disabled),
23731
+ badge: props.badge,
23732
+ badgeTooltip: props.badgeTooltip
23733
+ });
23734
+ });
23735
+ return descriptors;
23736
+ }, [children]);
23737
+ const tabValues = useMemo(() => tabs2.map((tab) => tab.value), [tabs2]);
23738
+ const firstValue = (_a = tabs2.find((tab) => !tab.disabled)) == null ? void 0 : _a.value;
23739
+ const [storedValue, setStoredValue, isControlled] = useControllableState({
23740
+ value,
23741
+ defaultValue: defaultValue ?? firstValue ?? ""
23742
+ });
23743
+ const requestedValueRef = useRef(storedValue);
23744
+ const pendingRequestsRef = useRef([]);
23745
+ const recordRequest = useCallback((nextValue) => {
23746
+ requestedValueRef.current = nextValue;
23747
+ pendingRequestsRef.current = [
23748
+ ...pendingRequestsRef.current.filter((pending) => pending !== nextValue),
23749
+ nextValue
23750
+ ];
23751
+ }, []);
23752
+ useEffect(() => {
23753
+ const pending = pendingRequestsRef.current;
23754
+ const index2 = pending.indexOf(storedValue);
23755
+ if (index2 === -1) {
23756
+ pendingRequestsRef.current = [];
23757
+ requestedValueRef.current = storedValue;
23758
+ return;
23759
+ }
23760
+ pendingRequestsRef.current = pending.slice(index2 + 1);
23761
+ }, [storedValue]);
23762
+ const storedTab = tabs2.find((tab) => tab.value === storedValue);
23763
+ const isStoredValueSelectable = Boolean(storedTab && !storedTab.disabled);
23764
+ const selectedValue = isStoredValueSelectable ? storedValue : firstValue;
23765
+ const fallbackNotificationRef = useRef(null);
23766
+ useEffect(() => {
23767
+ if (isStoredValueSelectable) {
23768
+ fallbackNotificationRef.current = null;
23769
+ return;
23770
+ }
23771
+ const notificationKey = JSON.stringify([storedValue, firstValue ?? null]);
23772
+ if (fallbackNotificationRef.current === notificationKey) return;
23773
+ fallbackNotificationRef.current = notificationKey;
23774
+ if (!isControlled) {
23775
+ setStoredValue(firstValue ?? "");
23776
+ }
23777
+ if (firstValue !== void 0) {
23778
+ recordRequest(firstValue);
23779
+ onChange == null ? void 0 : onChange(null, firstValue, "fallback-after-removal");
23780
+ }
23781
+ }, [
23782
+ firstValue,
23783
+ isControlled,
23784
+ isStoredValueSelectable,
23785
+ onChange,
23786
+ recordRequest,
23787
+ setStoredValue,
23788
+ storedValue
23789
+ ]);
23790
+ const elementsRef = useRef(/* @__PURE__ */ new Map());
23791
+ const registerTabElement = useCallback(
23792
+ (tabValue, element) => {
23793
+ if (element) {
23794
+ elementsRef.current.set(tabValue, element);
23795
+ } else {
23796
+ elementsRef.current.delete(tabValue);
23797
+ }
23798
+ },
23799
+ []
23800
+ );
23801
+ const getItemElement = useCallback(
23802
+ (tabValue) => elementsRef.current.get(tabValue) ?? null,
23803
+ []
23804
+ );
23805
+ const { ensureVisible, overflow, hasOverflow } = useOverflowItems({
23806
+ items: tabValues,
23807
+ containerRef: listRef,
23808
+ getItemElement,
23809
+ activeItem: selectedValue ?? null,
23810
+ reserveRef: overflowRef
23811
+ });
23812
+ const selectTab = useCallback(
23813
+ (event, nextValue, reason) => {
23814
+ if (nextValue === storedValue && requestedValueRef.current === storedValue) {
23815
+ return;
23816
+ }
23817
+ recordRequest(nextValue);
23818
+ setStoredValue(nextValue);
23819
+ onChange == null ? void 0 : onChange(event, nextValue, reason);
23820
+ },
23821
+ [onChange, recordRequest, setStoredValue, storedValue]
23822
+ );
23823
+ const focusTab = useCallback(
23824
+ (tabValue, options) => {
23825
+ ensureVisible(tabValue, () => {
23826
+ const focus = () => {
23827
+ var _a2;
23828
+ return (_a2 = elementsRef.current.get(tabValue)) == null ? void 0 : _a2.focus();
23829
+ };
23830
+ if (options == null ? void 0 : options.afterMenuClose) {
23831
+ queueMicrotask(focus);
23832
+ } else {
23833
+ focus();
23834
+ }
23835
+ });
23836
+ },
23837
+ [ensureVisible]
23838
+ );
23839
+ const onTabKeyDown = useCallback(
23840
+ (event) => {
23841
+ const navigable = tabs2.filter((tab) => !tab.disabled).map((tab) => tab.value);
23842
+ if (navigable.length === 0) return;
23843
+ let currentValue = selectedValue;
23844
+ for (const [tabValue, element] of elementsRef.current) {
23845
+ if (element === event.currentTarget) {
23846
+ currentValue = tabValue;
23847
+ break;
23848
+ }
23849
+ }
23850
+ const currentIndex = currentValue === void 0 ? 0 : Math.max(0, navigable.indexOf(currentValue));
23851
+ let nextIndex;
23852
+ switch (event.key) {
23853
+ case "ArrowRight":
23854
+ nextIndex = (currentIndex + 1) % navigable.length;
23855
+ break;
23856
+ case "ArrowLeft":
23857
+ nextIndex = (currentIndex - 1 + navigable.length) % navigable.length;
23858
+ break;
23859
+ case "Home":
23860
+ nextIndex = 0;
23861
+ break;
23862
+ case "End":
23863
+ nextIndex = navigable.length - 1;
23864
+ break;
23865
+ default:
23866
+ return;
23867
+ }
23868
+ event.preventDefault();
23869
+ const nextValue = navigable[nextIndex];
23870
+ if (nextValue === void 0) return;
23871
+ selectTab(event, nextValue, "clicked-on-tab");
23872
+ focusTab(nextValue);
23873
+ },
23874
+ [focusTab, selectTab, selectedValue, tabs2]
23875
+ );
23876
+ const overflowTabs = useMemo(
23877
+ () => overflow.map((item) => tabs2.find((tab) => tab.value === item)).filter((tab) => Boolean(tab)),
23878
+ [overflow, tabs2]
23879
+ );
23880
+ return {
23881
+ hasOverflow,
23882
+ focusTab,
23883
+ onTabKeyDown,
23884
+ overflowTabs,
23885
+ overflowValues: overflow,
23886
+ registerTabElement,
23887
+ selectTab,
23888
+ selectedValue,
23889
+ tabs: tabs2
23890
+ };
23891
+ };
23892
+ const TabsOverflowMenu = ({
23893
+ className,
23894
+ focusTab,
23895
+ tabs: tabs2,
23896
+ selectTab,
23897
+ selectedValue
23898
+ }) => {
23899
+ const [isOpen, setIsOpen] = useState(false);
23900
+ return /* @__PURE__ */ jsx(
23901
+ Menu,
23902
+ {
23903
+ open: isOpen,
23904
+ onOpenChange: setIsOpen,
23905
+ placement: "bottom-end",
23906
+ className,
23907
+ trigger: /* @__PURE__ */ jsx(
23908
+ IconButton,
23909
+ {
23910
+ variant: "ghost",
23911
+ size: "md",
23912
+ iconName: isOpen ? "caret-up" : "caret-down",
23913
+ altText: "More tabs",
23914
+ "aria-haspopup": "menu"
23915
+ }
23916
+ ),
23917
+ children: tabs2.map((tab) => {
23918
+ const hasBadge = typeof tab.badge === "number" && tab.badge !== 0;
23919
+ return /* @__PURE__ */ jsx(
23920
+ MenuItem,
23921
+ {
23922
+ label: hasBadge ? `${tab.label} (${String(tab.badge)})` : tab.label,
23923
+ description: hasBadge ? tab.badgeTooltip : void 0,
23924
+ disabled: tab.disabled,
23925
+ selected: tab.value === selectedValue,
23926
+ role: "menuitemradio",
23927
+ "aria-checked": tab.value === selectedValue,
23928
+ onClick: (event) => {
23929
+ selectTab(event, tab.value, "selected-from-overflow");
23930
+ setIsOpen(false);
23931
+ focusTab(tab.value, { afterMenuClose: true });
23932
+ }
23933
+ },
23934
+ tab.value
23935
+ );
23936
+ })
23937
+ }
23938
+ );
23939
+ };
23940
+ const Tabs = (props) => {
23941
+ const {
23942
+ children,
23943
+ value,
23944
+ defaultValue,
23945
+ onChange,
23946
+ unmountInactive = false,
23947
+ "aria-label": ariaLabel,
23948
+ "aria-labelledby": ariaLabelledBy,
23949
+ ...rest
23950
+ } = props;
23951
+ const [className, otherProps] = splitProps(rest);
23952
+ const listRef = useRef(null);
23953
+ const overflowRef = useRef(null);
23954
+ const baseId = useId$1();
23955
+ const {
23956
+ focusTab,
23957
+ hasOverflow,
23958
+ onTabKeyDown,
23959
+ overflowTabs,
23960
+ overflowValues,
23961
+ registerTabElement,
23962
+ selectTab,
23963
+ selectedValue
23964
+ } = useTabs({
23965
+ children,
23966
+ value,
23967
+ defaultValue,
23968
+ onChange,
23969
+ listRef,
23970
+ overflowRef
23971
+ });
23972
+ const classes = useMemo(
23973
+ () => tabs({ hasOverflow }),
23974
+ [hasOverflow]
23975
+ );
23976
+ const [tabChildren, restChildren] = useMemo(() => {
23977
+ const strip = [];
23978
+ const below = [];
23979
+ flattenTabsChildren(children).forEach((child) => {
23980
+ if (getTabsComponentType(child) === TABS_COMPONENT_TYPES.tab) {
23981
+ strip.push(child);
23982
+ } else {
23983
+ below.push(child);
23984
+ }
23985
+ });
23986
+ return [strip, below];
23987
+ }, [children]);
23988
+ const contextValue = useMemo(
23989
+ () => ({
23990
+ classes,
23991
+ // Values are free text; encoding keeps spaces out of the IDs that
23992
+ // `aria-controls` and `aria-labelledby` parse as token lists.
23993
+ getPanelId: (tabValue) => `${baseId}-panel-${encodeURIComponent(tabValue)}`,
23994
+ getTabId: (tabValue) => `${baseId}-tab-${encodeURIComponent(tabValue)}`,
23995
+ onTabKeyDown,
23996
+ overflowValues,
23997
+ registerTabElement,
23998
+ selectTab,
23999
+ selectedValue,
24000
+ unmountInactive
24001
+ }),
24002
+ [
24003
+ baseId,
24004
+ classes,
24005
+ onTabKeyDown,
24006
+ overflowValues,
24007
+ registerTabElement,
24008
+ selectTab,
24009
+ selectedValue,
24010
+ unmountInactive
24011
+ ]
24012
+ );
24013
+ return /* @__PURE__ */ jsx(TabsProvider, { value: contextValue, children: /* @__PURE__ */ jsxs(
24014
+ Box,
24015
+ {
24016
+ ...dsComponent("Tabs"),
24017
+ className: cx(classes.root, className),
24018
+ ...otherProps,
24019
+ children: [
24020
+ /* @__PURE__ */ jsxs(Box, { className: classes.strip, children: [
24021
+ /* @__PURE__ */ jsx(
24022
+ Box,
24023
+ {
24024
+ ref: listRef,
24025
+ role: "tablist",
24026
+ "aria-label": ariaLabel,
24027
+ "aria-labelledby": ariaLabelledBy,
24028
+ "aria-orientation": "horizontal",
24029
+ className: classes.list,
24030
+ children: tabChildren
24031
+ }
24032
+ ),
24033
+ /* @__PURE__ */ jsx(
24034
+ Box,
24035
+ {
24036
+ ref: overflowRef,
24037
+ className: classes.overflow,
24038
+ "aria-hidden": !hasOverflow || void 0,
24039
+ children: hasOverflow ? /* @__PURE__ */ jsx(
24040
+ TabsOverflowMenu,
24041
+ {
24042
+ className: classes.menu,
24043
+ focusTab,
24044
+ tabs: overflowTabs,
24045
+ selectTab,
24046
+ selectedValue
24047
+ }
24048
+ ) : /* @__PURE__ */ jsx(
24049
+ IconButton,
24050
+ {
24051
+ variant: "ghost",
24052
+ size: "md",
24053
+ iconName: "caret-down",
24054
+ altText: "More tabs",
24055
+ disabled: true,
24056
+ tabIndex: -1
24057
+ }
24058
+ )
24059
+ }
24060
+ )
24061
+ ] }),
24062
+ restChildren
24063
+ ]
24064
+ }
24065
+ ) });
24066
+ };
23002
24067
  const AutocompleteListbox = (props) => {
23003
24068
  const { labels } = useLocale();
23004
24069
  const {
@@ -25149,6 +26214,7 @@ export {
25149
26214
  DrawerFooter,
25150
26215
  DrawerHeader,
25151
26216
  DsChainScope,
26217
+ FilterToken,
25152
26218
  FormField,
25153
26219
  Heading,
25154
26220
  HighlightText,
@@ -25186,6 +26252,9 @@ export {
25186
26252
  Skeleton,
25187
26253
  Spinner,
25188
26254
  SubMenu,
26255
+ Tab,
26256
+ TabPanel,
26257
+ Tabs,
25189
26258
  Tag,
25190
26259
  Text,
25191
26260
  TextInput,
@@ -25223,6 +26292,9 @@ export {
25223
26292
  useMenuListContext,
25224
26293
  useMenuRootContext,
25225
26294
  useModalWrapperContext,
26295
+ useOverflowItems,
26296
+ useTabPanelActive,
26297
+ useTabsContext,
25226
26298
  useTheme,
25227
26299
  useToast
25228
26300
  };