twenty-ui 2.48.0 → 2.49.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.
Files changed (203) hide show
  1. package/README.md +27 -2
  2. package/dist/Avatar-C6WxBgjS.cjs +1 -0
  3. package/dist/{Avatar-D-QA0RE5.js → Avatar-ifVlxbx_.js} +18 -17
  4. package/dist/{Button-D5enZ0Qz.js → Button-DIw804CX.js} +1 -1
  5. package/dist/{Button-Dbi5P05r.cjs → Button-DTm1WDzp.cjs} +1 -1
  6. package/dist/Dropdown-1OAJvS1f.js +1000 -0
  7. package/dist/Dropdown-Bl4OXCf9.cjs +1 -0
  8. package/dist/{ListItem-CjnrSbka.js → ListItem-DizNUBT8.js} +1 -1
  9. package/dist/{ListItem-CHTR-GLd.cjs → ListItem-DwBb-I1D.cjs} +1 -1
  10. package/dist/{ProgressBar-BvT1dyFo.js → ProgressBar-B3xACTV2.js} +1 -1
  11. package/dist/{ProgressBar-DfFz0fFB.cjs → ProgressBar-OpSMnDBz.cjs} +1 -1
  12. package/dist/{Radio-DMI1B7o5.js → Radio-BEAztmPu.js} +1 -1
  13. package/dist/{Radio-xmHgGHQO.cjs → Radio-Dx6b4SYZ.cjs} +1 -1
  14. package/dist/ResizeHandle-B1MuHTNA.cjs +1 -0
  15. package/dist/{ResizeHandle-C1kQ3MYR.js → ResizeHandle-B30OYZxS.js} +56 -55
  16. package/dist/Shortcut-Bp9iDdQg.js +73 -0
  17. package/dist/Shortcut-N8TELGPI.cjs +1 -0
  18. package/dist/{TintedIconTile-4BGa8g8n.js → TintedIconTile-B1XDtGrF.js} +1 -1
  19. package/dist/{TintedIconTile-CU2hCerq.cjs → TintedIconTile-DO1XJXCQ.cjs} +1 -1
  20. package/dist/components/__stories__/reading-direction/DirectionalLayoutExample.d.ts +3 -1
  21. package/dist/components/code-editor.cjs +1 -1
  22. package/dist/components/code-editor.mjs +52 -51
  23. package/dist/components/data-display.cjs +1 -1
  24. package/dist/components/data-display.mjs +2 -2
  25. package/dist/components/feedback.cjs +1 -1
  26. package/dist/components/feedback.mjs +1 -1
  27. package/dist/components/input/CountrySelect/CountrySelect.d.ts +5 -2
  28. package/dist/components/input/CountrySelect/__stories__/CountrySelectPartsExample.d.ts +11 -0
  29. package/dist/components/input/CountrySelect/internal/CountrySelectComponent.d.ts +2 -0
  30. package/dist/components/input/CountrySelect/internal/CountrySelectContext.d.ts +2 -0
  31. package/dist/components/input/CountrySelect/internal/CountrySelectContextValue.d.ts +11 -0
  32. package/dist/components/input/CountrySelect/internal/CountrySelectDropdown.d.ts +4 -0
  33. package/dist/components/input/CountrySelect/internal/CountrySelectOptions.d.ts +2 -11
  34. package/dist/components/input/CountrySelect/internal/CountrySelectOptionsContent.d.ts +2 -0
  35. package/dist/components/input/CountrySelect/internal/CountrySelectRoot.d.ts +2 -0
  36. package/dist/components/input/CountrySelect/internal/CountrySelectTrigger.d.ts +2 -0
  37. package/dist/components/input/CountrySelect/internal/NO_COUNTRY_SELECTION_VALUE.d.ts +1 -0
  38. package/dist/components/input/CountrySelect/internal/PreparedCountryChoice.d.ts +5 -0
  39. package/dist/components/input/CountrySelect/internal/getCountrySelectionValue.d.ts +1 -0
  40. package/dist/components/input/CountrySelect/internal/useCountrySelectContextOrThrow.d.ts +1 -0
  41. package/dist/components/input/CountrySelect/types/CountryChoice.d.ts +1 -0
  42. package/dist/components/input/CountrySelect/types/CountrySelectOptionsProps.d.ts +10 -0
  43. package/dist/components/input/CountrySelect/types/CountrySelectOptionsState.d.ts +4 -0
  44. package/dist/components/input/CountrySelect/types/CountrySelectProps.d.ts +7 -13
  45. package/dist/components/input/CountrySelect/types/CountrySelectRootProps.d.ts +12 -0
  46. package/dist/components/input/CountrySelect/types/CountrySelectTriggerProps.d.ts +6 -0
  47. package/dist/components/input/CurrencyPicker/CurrencyPicker.d.ts +4 -3
  48. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerChangingDefaultExample.d.ts +5 -0
  49. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledExample.d.ts +5 -0
  50. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerControlledSearchExample.d.ts +5 -0
  51. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerExample.d.ts +3 -4
  52. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerListLabelExample.d.ts +1 -0
  53. package/dist/components/input/CurrencyPicker/__stories__/CurrencyPickerRootStateExample.d.ts +1 -0
  54. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerContext.d.ts +11 -0
  55. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerOptions.d.ts +1 -1
  56. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerRoot.d.ts +2 -0
  57. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerShorthand.d.ts +2 -0
  58. package/dist/components/input/CurrencyPicker/internal/CurrencyPickerTrigger.d.ts +1 -1
  59. package/dist/components/input/CurrencyPicker/internal/PreparedCurrencyPickerOption.d.ts +7 -0
  60. package/dist/components/input/CurrencyPicker/internal/getCurrencyPickerSearchText.d.ts +2 -0
  61. package/dist/components/input/CurrencyPicker/internal/useCurrencyPickerContextOrThrow.d.ts +7 -0
  62. package/dist/components/input/CurrencyPicker/types/CurrencyPickerChangeEventDetails.d.ts +2 -0
  63. package/dist/components/input/CurrencyPicker/types/CurrencyPickerOption.d.ts +1 -0
  64. package/dist/components/input/CurrencyPicker/types/CurrencyPickerOptionsProps.d.ts +6 -5
  65. package/dist/components/input/CurrencyPicker/types/CurrencyPickerProps.d.ts +10 -0
  66. package/dist/components/input/CurrencyPicker/types/CurrencyPickerRootProps.d.ts +17 -0
  67. package/dist/components/input/CurrencyPicker/types/CurrencyPickerState.d.ts +6 -0
  68. package/dist/components/input/CurrencyPicker/types/CurrencyPickerTriggerProps.d.ts +3 -2
  69. package/dist/components/input/IconButton/__stories__/IconButtonExample.d.ts +7 -0
  70. package/dist/components/input/PhoneCountryPicker/PhoneCountryPicker.d.ts +5 -3
  71. package/dist/components/input/PhoneCountryPicker/__stories__/PhoneCountryPickerExample.d.ts +7 -3
  72. package/dist/components/input/PhoneCountryPicker/__stories__/testDisabledPhoneCountryPicker.d.ts +5 -0
  73. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryCallingCodeDirection.d.ts +3 -0
  74. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountryNullSelection.d.ts +5 -0
  75. package/dist/components/input/PhoneCountryPicker/__stories__/testPhoneCountrySelection.d.ts +5 -0
  76. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerContext.d.ts +9 -0
  77. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerOptions.d.ts +1 -1
  78. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerRoot.d.ts +2 -0
  79. package/dist/components/input/PhoneCountryPicker/internal/PhoneCountryPickerTrigger.d.ts +1 -1
  80. package/dist/components/input/PhoneCountryPicker/internal/PreparedPhoneCountryOption.d.ts +5 -0
  81. package/dist/components/input/PhoneCountryPicker/internal/getPhoneCountryOptionTooltipLabel.d.ts +2 -0
  82. package/dist/components/input/PhoneCountryPicker/internal/matchesPhoneCountrySearch.d.ts +6 -0
  83. package/dist/components/input/PhoneCountryPicker/internal/usePhoneCountryPickerContextOrThrow.d.ts +7 -0
  84. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryOption.d.ts +1 -0
  85. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerOptionsProps.d.ts +4 -5
  86. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerProps.d.ts +10 -0
  87. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerRootProps.d.ts +12 -0
  88. package/dist/components/input/PhoneCountryPicker/types/PhoneCountryPickerTriggerProps.d.ts +1 -3
  89. package/dist/components/input/index.d.ts +10 -0
  90. package/dist/components/input.cjs +1 -1
  91. package/dist/components/input.mjs +13 -13
  92. package/dist/components/layout/OverflowingList/internal/measureItemWidths.d.ts +1 -2
  93. package/dist/components/layout/OverflowingList/internal/measureOverflowingListLayout.d.ts +1 -2
  94. package/dist/components/layout.cjs +1 -1
  95. package/dist/components/layout.mjs +1 -1
  96. package/dist/components/navigation/Dropdown/Dropdown.d.ts +2 -1
  97. package/dist/components/navigation/Dropdown/__stories__/DropdownIconGridExample.d.ts +3 -0
  98. package/dist/components/navigation/Dropdown/__stories__/DropdownSelectionGroupsExample.d.ts +1 -0
  99. package/dist/components/navigation/Dropdown/internal/DropdownContextValue.d.ts +6 -1
  100. package/dist/components/navigation/Dropdown/internal/DropdownOptionItem.d.ts +1 -1
  101. package/dist/components/navigation/Dropdown/internal/DropdownOptionItemOwner.d.ts +7 -0
  102. package/dist/components/navigation/Dropdown/internal/DropdownSelectionContext.d.ts +2 -0
  103. package/dist/components/navigation/Dropdown/internal/DropdownSelectionContextValue.d.ts +9 -0
  104. package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroup.d.ts +2 -0
  105. package/dist/components/navigation/Dropdown/internal/DropdownSelectionGroupEffect.d.ts +11 -0
  106. package/dist/components/navigation/Dropdown/internal/createDropdownSelectionEventDetails.d.ts +5 -0
  107. package/dist/components/navigation/Dropdown/internal/dropdownItemActivation.d.ts +11 -0
  108. package/dist/components/navigation/Dropdown/internal/getDropdownItemExplicitId.d.ts +2 -2
  109. package/dist/components/navigation/Dropdown/internal/getDropdownOptionItemRole.d.ts +9 -0
  110. package/dist/components/navigation/Dropdown/internal/getDropdownSelectionGroupState.d.ts +6 -0
  111. package/dist/components/navigation/Dropdown/internal/getTrailingFocusGuard.d.ts +1 -0
  112. package/dist/components/navigation/Dropdown/internal/isDropdownOptionItemSelected.d.ts +6 -0
  113. package/dist/components/navigation/Dropdown/internal/useDropdownSelections.d.ts +12 -0
  114. package/dist/components/navigation/Dropdown/types/DropdownOptionItemProps.d.ts +7 -2
  115. package/dist/components/navigation/Dropdown/types/DropdownOptionItemSelectEventDetails.d.ts +2 -0
  116. package/dist/components/navigation/Dropdown/types/DropdownOptionItemState.d.ts +5 -0
  117. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupChangeEventDetails.d.ts +7 -0
  118. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupProps.d.ts +21 -0
  119. package/dist/components/navigation/Dropdown/types/DropdownSelectionGroupState.d.ts +7 -0
  120. package/dist/components/navigation/index.d.ts +5 -0
  121. package/dist/components/navigation.cjs +1 -1
  122. package/dist/components/navigation.mjs +2 -2
  123. package/dist/components/settings.cjs +1 -1
  124. package/dist/components/settings.mjs +1 -1
  125. package/dist/components.cjs +1 -1
  126. package/dist/components.mjs +22 -22
  127. package/dist/data-display-BSKGlijb.cjs +1 -0
  128. package/dist/{data-display-KyZbLLy-.js → data-display-BtXCGOGw.js} +81 -80
  129. package/dist/{data-display-0QO_WDSs.js → data-display-DtXIhJ4B.js} +45 -44
  130. package/dist/data-display-XV3ht1rC.cjs +2 -0
  131. package/dist/doNotTranslate-BSVT8Xyd.js +4 -0
  132. package/dist/doNotTranslate-CHE7WmRS.cjs +1 -0
  133. package/dist/feedback-Cs-38OH4.cjs +1 -0
  134. package/dist/{feedback-CM6fatE8.js → feedback-DTyVVcTb.js} +198 -197
  135. package/dist/index.cjs +1 -1
  136. package/dist/index.mjs +42 -42
  137. package/dist/{input-CJDYNwoO.cjs → input-B_rBplmn.cjs} +1 -1
  138. package/dist/input-BrjD91wv.js +785 -0
  139. package/dist/input-ChlFcqIS.cjs +1 -0
  140. package/dist/{input-DRpDiMRi.js → input-D1oyk0tD.js} +2 -2
  141. package/dist/layout-CthYckvl.cjs +1 -0
  142. package/dist/layout-DQcjBu08.js +439 -0
  143. package/dist/{navigation-B1SRvzKK.js → navigation-B6nka3bW.js} +125 -128
  144. package/dist/navigation-CIVYqPc5.js +132 -0
  145. package/dist/navigation-CflGBYv-.cjs +1 -0
  146. package/dist/navigation-DoInK0Sp.cjs +1 -0
  147. package/dist/preventDismissingClickActivation-AaqHBLnW.js +45 -0
  148. package/dist/preventDismissingClickActivation-CIhWvKCu.cjs +1 -0
  149. package/dist/primitives/data-display.cjs +1 -1
  150. package/dist/primitives/data-display.mjs +2 -2
  151. package/dist/primitives/feedback.cjs +1 -1
  152. package/dist/primitives/feedback.mjs +1 -1
  153. package/dist/primitives/input/Radio/__stories__/RadioCardContent.d.ts +8 -0
  154. package/dist/primitives/input.cjs +1 -1
  155. package/dist/primitives/input.mjs +3 -3
  156. package/dist/primitives/layout/ResizeHandle/__stories__/ResizableNotesExample.d.ts +2 -0
  157. package/dist/primitives/layout.cjs +1 -1
  158. package/dist/primitives/layout.mjs +1 -1
  159. package/dist/primitives/navigation.cjs +1 -1
  160. package/dist/primitives/navigation.mjs +2 -2
  161. package/dist/primitives/typography.cjs +1 -1
  162. package/dist/primitives/typography.mjs +2 -2
  163. package/dist/primitives.cjs +1 -1
  164. package/dist/primitives.mjs +11 -11
  165. package/dist/{settings-BjEZiHXE.js → settings-BgVuLpg9.js} +1 -1
  166. package/dist/{settings-BAYsnlZJ.cjs → settings-CPXhrmbK.cjs} +1 -1
  167. package/dist/style.css +1 -1
  168. package/dist/testing/GroupedCatalog.d.ts +14 -0
  169. package/dist/testing/index.d.ts +1 -0
  170. package/dist/testing.cjs +1 -1
  171. package/dist/testing.mjs +96 -66
  172. package/dist/{typography-fOTFr0jS.js → typography-DT2eKLvd.js} +1 -1
  173. package/dist/{typography-B5QEuPaL.cjs → typography-bKeSMuJd.cjs} +1 -1
  174. package/dist/useIsMobile-Byp9AIq-.cjs +1 -0
  175. package/dist/useIsMobile-D1ImfQnE.js +38 -0
  176. package/dist/utilities/internal/doNotTranslate.d.ts +1 -0
  177. package/dist/utilities-BKCMZyqZ.js +53 -0
  178. package/dist/utilities-xZh8D2gd.cjs +1 -0
  179. package/dist/utilities.cjs +1 -1
  180. package/dist/utilities.mjs +3 -3
  181. package/package.json +3 -3
  182. package/dist/Avatar-CQhIEazb.cjs +0 -1
  183. package/dist/Dropdown-BKjAaZS0.cjs +0 -1
  184. package/dist/Dropdown-C2hXrjvD.js +0 -820
  185. package/dist/ResizeHandle-DI4LHIQm.cjs +0 -1
  186. package/dist/Shortcut-BvWUZ3pb.js +0 -72
  187. package/dist/Shortcut-CgrdLv_L.cjs +0 -1
  188. package/dist/data-display-CPmTJAWJ.cjs +0 -1
  189. package/dist/data-display-DjhAHvj1.cjs +0 -2
  190. package/dist/feedback-ybO4n69s.cjs +0 -1
  191. package/dist/input-3D2lXywH.cjs +0 -1
  192. package/dist/input-TM3nUdu6.js +0 -554
  193. package/dist/layout-BszCDxAO.js +0 -441
  194. package/dist/layout-VaIq7Sjr.cjs +0 -1
  195. package/dist/navigation-CYAs2LnR.js +0 -131
  196. package/dist/navigation-CthkGHJ8.cjs +0 -1
  197. package/dist/navigation-DrOV5E67.cjs +0 -1
  198. package/dist/preventDismissingClickActivation-CzWqpjiX.js +0 -44
  199. package/dist/preventDismissingClickActivation-DZxTSLV3.cjs +0 -1
  200. package/dist/useIsMobile-DxOPI2_E.cjs +0 -1
  201. package/dist/useIsMobile-nrufFzMb.js +0 -37
  202. package/dist/utilities-BeLfNQ0Q.cjs +0 -1
  203. package/dist/utilities-CEi9I09B.js +0 -52
@@ -1,441 +0,0 @@
1
- import { t as v } from "./isDefined-fMi6eQ4r.js";
2
- import { r as we, t as Fe } from "./OverflowingTextWithTooltip-BmUROIah.js";
3
- import { t as V } from "./Popover-CWeCV7X9.js";
4
- import { t as Ce } from "./Heading-pXllCJCO.js";
5
- import { useRender as Y } from "@base-ui/react/use-render";
6
- import { isFunction as Q, isNonEmptyString as Ie, isString as J, isUndefined as Oe } from "@sniptt/guards";
7
- import { clsx as D } from "clsx";
8
- import { cloneElement as Le, isValidElement as Ee, memo as ce, useCallback as j, useId as Ne, useLayoutEffect as X, useRef as W, useState as $ } from "react";
9
- import { Fragment as G, jsx as m, jsxs as U } from "react/jsx-runtime";
10
- import { mergeProps as Se } from "@base-ui/react/merge-props";
11
- import { useMergedRefs as H } from "@base-ui/utils/useMergedRefs";
12
- import { useStableCallback as k } from "@base-ui/utils/useStableCallback";
13
- import { useControlled as Me } from "@base-ui/utils/useControlled";
14
- var De = "_container_1hm4x_1", Te = "_layer_1hm4x_9", xe = "_visible_1hm4x_23", Ae = "_hidden_1hm4x_28", R = {
15
- container: De,
16
- layer: Te,
17
- visible: xe,
18
- hidden: Ae
19
- }, _t = ({ isActive: t, activeIcon: e, inactiveIcon: n, className: r, render: s, ref: a, ...l }) => Y({
20
- defaultTagName: "span",
21
- render: s,
22
- ref: a,
23
- props: {
24
- ...l,
25
- className: D(R.container, r),
26
- children: /* @__PURE__ */ U(G, { children: [/* @__PURE__ */ m("span", {
27
- "aria-hidden": "true",
28
- className: D(R.layer, t ? R.hidden : R.visible),
29
- children: n
30
- }), /* @__PURE__ */ m("span", {
31
- "aria-hidden": "true",
32
- className: D(R.layer, t ? R.visible : R.hidden),
33
- children: e
34
- })] })
35
- }
36
- }), Re = "_root_eheyl_1", We = "_items_eheyl_11", Ue = "_item_eheyl_11", ke = "_popupItem_eheyl_45", ze = "_trigger_eheyl_49", Ke = "_popup_eheyl_45", K = {
37
- root: Re,
38
- items: We,
39
- item: Ue,
40
- popupItem: ke,
41
- trigger: ze,
42
- popup: Ke
43
- }, Ve = ({ props: t, state: e, render: n }) => {
44
- const r = Ee(n) ? n : void 0, s = H(t.ref, r?.props.ref);
45
- if (Q(n)) return n(t, e);
46
- const a = {
47
- ...Se(t, r?.props),
48
- children: t.children,
49
- ref: s
50
- };
51
- return v(r) ? Le(r, a) : /* @__PURE__ */ m("div", { ...a });
52
- }, Be = ce(({ elementRef: t, isHidden: e, onFocusLost: n }) => (X(() => {
53
- const r = t.current, s = v(r) && r.contains(r.ownerDocument.activeElement);
54
- e && s && n(r);
55
- }, [
56
- t,
57
- e,
58
- n
59
- ]), null)), le = (t) => j((e) => {
60
- if (v(e))
61
- return () => {
62
- const n = e.ownerDocument, r = e.contains(n.activeElement);
63
- queueMicrotask(() => {
64
- const s = n.activeElement === n.body;
65
- r && !e.isConnected && s && t(e);
66
- });
67
- };
68
- }, [t]), oe = ({ children: t, index: e, isHidden: n, isLastVisible: r, isInPopup: s, onFocusLost: a }) => {
69
- const l = W(null), i = k((o) => {
70
- a({
71
- index: e,
72
- element: o,
73
- isInPopup: s
74
- });
75
- });
76
- return /* @__PURE__ */ U(G, { children: [/* @__PURE__ */ m("div", {
77
- ref: H(l, le(i)),
78
- className: s ? K.popupItem : K.item,
79
- "data-item-index": e,
80
- "data-hidden": n || void 0,
81
- "data-last-visible": r || void 0,
82
- "aria-hidden": n || void 0,
83
- inert: n,
84
- children: t
85
- }), /* @__PURE__ */ m(Be, {
86
- elementRef: l,
87
- isHidden: n,
88
- onFocusLost: i
89
- })] });
90
- }, se = ({ itemWidths: t, availableWidth: e, gap: n, includePartialItem: r }) => {
91
- let s = 0, a = 0;
92
- for (const l of t) {
93
- const i = s + l + (a > 0 ? n : 0);
94
- if (a !== 0 && i > e) {
95
- const o = s + n < e;
96
- return r && o ? a + 1 : a;
97
- }
98
- s = i, a += 1;
99
- }
100
- return a;
101
- }, He = ({ items: t, itemElements: e, supportsSynchronousLayout: n }) => {
102
- if (!n) return e.map((s) => s.scrollWidth);
103
- t.setAttribute("data-measuring", "");
104
- const r = e.map((s) => s.clientWidth);
105
- return t.removeAttribute("data-measuring"), r;
106
- }, $e = ({ container: t, items: e, trigger: n, itemElements: r, itemCount: s, reserveCountSpace: a, supportsSynchronousLayout: l }) => {
107
- const i = He({
108
- items: e,
109
- itemElements: r,
110
- supportsSynchronousLayout: l
111
- }), o = parseFloat(getComputedStyle(e).columnGap) || 0, u = t.clientWidth, p = s > se({
112
- itemWidths: i,
113
- availableWidth: u,
114
- gap: o,
115
- includePartialItem: !1
116
- }), F = n?.offsetWidth ?? 0;
117
- return {
118
- visibleItemCount: se({
119
- itemWidths: i,
120
- availableWidth: a && p ? Math.max(0, u - F - o) : u,
121
- gap: o,
122
- includePartialItem: !0
123
- }),
124
- hasOverflow: p
125
- };
126
- }, qe = 100, je = ce(({ containerRef: t, itemsRef: e, triggerRef: n, itemCount: r, inlineItemCount: s, reserveCountSpace: a, isMeasurementEnabled: l, isOpen: i, onLayoutChange: o, onOverflowUnavailable: u }) => {
127
- const p = W(void 0), F = W(void 0), I = k(() => ({
128
- itemCount: r,
129
- inlineItemCount: s,
130
- reserveCountSpace: a,
131
- isOpen: i
132
- })), C = k(o), N = k(u);
133
- return X(() => {
134
- const y = t.current, O = e.current;
135
- if (!l || !v(y) || !v(O)) {
136
- F.current = void 0;
137
- return;
138
- }
139
- const T = v(globalThis.ResizeObserver), E = /* @__PURE__ */ new Set(), g = () => {
140
- const M = Array.from(O.children), z = /* @__PURE__ */ new Set([y, ...M]);
141
- v(n.current) && z.add(n.current);
142
- for (const b of E) z.has(b) || (S?.unobserve(b), E.delete(b));
143
- for (const b of z) E.has(b) || (S?.observe(b), E.add(b));
144
- const c = I();
145
- if (M.length !== c.inlineItemCount) return;
146
- const h = $e({
147
- container: y,
148
- items: O,
149
- trigger: n.current,
150
- itemElements: M,
151
- itemCount: c.itemCount,
152
- reserveCountSpace: c.reserveCountSpace,
153
- supportsSynchronousLayout: T
154
- }), d = F.current, x = v(d) && d.isOpen && !d.layout.hasOverflow, A = c.isOpen && !h.hasOverflow;
155
- F.current = {
156
- layout: h,
157
- isOpen: c.isOpen
158
- }, C(h), A && !x && N();
159
- }, S = T ? new ResizeObserver(g) : void 0;
160
- p.current = g, g();
161
- const _ = new MutationObserver(g);
162
- if (_.observe(O, {
163
- attributes: !0,
164
- attributeFilter: [
165
- "class",
166
- "style",
167
- "hidden"
168
- ],
169
- characterData: !0,
170
- childList: !0,
171
- subtree: !0
172
- }), _.observe(y, { childList: !0 }), !v(S)) {
173
- const M = setInterval(g, qe);
174
- return window.addEventListener("resize", g), () => {
175
- p.current = void 0, clearInterval(M), _.disconnect(), window.removeEventListener("resize", g);
176
- };
177
- }
178
- return () => {
179
- p.current = void 0, _.disconnect(), S.disconnect();
180
- };
181
- }, [
182
- t,
183
- e,
184
- n,
185
- l,
186
- I,
187
- C,
188
- N
189
- ]), X(() => {
190
- p.current?.();
191
- }, [
192
- r,
193
- s,
194
- a,
195
- i
196
- ]), null;
197
- }), Ge = ({ itemCount: t, inlineItemCount: e }) => {
198
- const n = W(null), r = W(null), s = W(null), [a, l] = $({
199
- visibleItemCount: e,
200
- hasOverflow: t > e
201
- });
202
- return {
203
- containerRef: n,
204
- itemsRef: r,
205
- triggerRef: s,
206
- updateLayout: j((i) => {
207
- l((o) => o.visibleItemCount !== i.visibleItemCount || o.hasOverflow !== i.hasOverflow ? i : o);
208
- }, []),
209
- ...a
210
- };
211
- }, Je = "button, a[href], input, select, textarea, [tabindex]", ae = ({ items: t, popup: e, trigger: n, root: r, removedIndex: s, excludedItem: a }) => {
212
- const l = [...Array.from(t?.children ?? []), ...Array.from(e?.children ?? [])].filter((i) => i !== a).sort((i, o) => Math.abs(Number(i.getAttribute("data-item-index")) - s) - Math.abs(Number(o.getAttribute("data-item-index")) - s) || Number(o.getAttribute("data-item-index")) - Number(i.getAttribute("data-item-index")));
213
- for (const i of l)
214
- if (!i.hasAttribute("inert")) {
215
- for (const o of Array.from(i.querySelectorAll(Je))) if (!o.matches(":disabled") && !v(o.closest("[inert]")) && (o.focus(), o.ownerDocument.activeElement === o))
216
- return;
217
- }
218
- n?.focus(), !(v(n) && n.ownerDocument.activeElement === n) && r?.focus();
219
- }, Qe = ({ containerRef: t, itemsRef: e, triggerRef: n, popup: r, itemCount: s, canExpand: a, isPopupOpen: l, isOpen: i, isHovered: o, showOverflowCount: u, onFocusCapture: p, onBlurCapture: F }) => {
220
- const [I, C] = $(!1), [N, y] = $(), O = u ?? N ?? (o || I || i), T = k(({ index: c, element: h, isInPopup: d }) => {
221
- ae({
222
- items: d && a ? null : e.current,
223
- popup: d && l ? r : null,
224
- trigger: n.current,
225
- root: t.current,
226
- removedIndex: c,
227
- excludedItem: h
228
- });
229
- }), E = j(() => {
230
- const c = t.current;
231
- c?.focus(), C(c?.ownerDocument.activeElement === c), y(void 0);
232
- }, [t]), g = k(() => {
233
- if (l) return;
234
- const c = t.current, h = c?.ownerDocument, d = h?.activeElement, x = v(d) && e.current?.contains(d) && !v(d.closest("[inert]")), A = v(d) && d !== h?.body && !c?.contains(d) && !r?.contains(d);
235
- if (x || A) return;
236
- if (!a) {
237
- ae({
238
- items: e.current,
239
- popup: null,
240
- trigger: null,
241
- root: c,
242
- removedIndex: s
243
- });
244
- return;
245
- }
246
- const b = n.current;
247
- if (v(b) && !b.matches(":disabled")) {
248
- b.focus({ preventScroll: !0 });
249
- return;
250
- }
251
- c?.focus({ preventScroll: !0 });
252
- }), S = j(() => (queueMicrotask(g), !1), [g]), _ = le(E);
253
- return {
254
- hasFocus: I,
255
- isCountVisible: O,
256
- restoreItemFocus: T,
257
- schedulePopupFocusRestoration: S,
258
- resetFocusWhenFocusedTriggerUnmounts: _,
259
- handleFocusCapture: (c) => {
260
- C(!0), e.current?.contains(c.target) && y((h) => h ?? O), p?.(c);
261
- },
262
- handleBlurCapture: (c) => {
263
- C(c.currentTarget.contains(c.relatedTarget) || (r?.contains(c.relatedTarget) ?? !1)), e.current?.contains(c.relatedTarget) || y(void 0), F?.(c);
264
- }
265
- };
266
- }, L = (t) => t.stopPropagation(), yt = ({ children: t, showOverflowCount: e, maxInlineCount: n, overflowLabel: r = "Show all items", open: s, defaultOpen: a = !1, onOpenChange: l, actionsRef: i, triggerProps: o, popupProps: u, className: p, onMouseEnter: F, onMouseLeave: I, onFocusCapture: C, onBlurCapture: N, ref: y, ...O }) => {
267
- const [T, E] = $(!1), [g, S] = $(null), [_, M] = Me({
268
- controlled: s,
269
- default: a,
270
- name: "OverflowingList",
271
- state: "open"
272
- }), z = W(null), c = i ?? z, h = v(n) && Number.isFinite(n) ? Math.min(t.length, Math.max(0, Math.floor(n))) : t.length, { containerRef: d, itemsRef: x, triggerRef: A, visibleItemCount: b, hasOverflow: ue, updateLayout: de } = Ge({
273
- itemCount: t.length,
274
- inlineItemCount: h
275
- }), q = ue && (_ || e !== !1), Z = _ && q, { hasFocus: me, isCountVisible: P, restoreItemFocus: ee, schedulePopupFocusRestoration: fe, resetFocusWhenFocusedTriggerUnmounts: ve, handleFocusCapture: he, handleBlurCapture: be } = Qe({
276
- containerRef: d,
277
- itemsRef: x,
278
- triggerRef: A,
279
- popup: g,
280
- itemCount: t.length,
281
- canExpand: q,
282
- isPopupOpen: Z,
283
- isOpen: _,
284
- isHovered: T,
285
- showOverflowCount: e,
286
- onFocusCapture: C,
287
- onBlurCapture: N
288
- }), te = (e ?? (T || me)) || _, pe = H(d, y), _e = H(A, ve, o?.ref), ye = H(S, u?.ref), ne = te && e !== !1 ? b : h, re = t.length - b, ge = k(() => {
289
- c.current?.close();
290
- });
291
- return /* @__PURE__ */ U(G, { children: [/* @__PURE__ */ U("div", {
292
- ...O,
293
- ref: pe,
294
- tabIndex: O.tabIndex ?? -1,
295
- className: D(K.root, p),
296
- onMouseEnter: (f) => {
297
- E(!0), F?.(f);
298
- },
299
- onMouseLeave: (f) => {
300
- E(!1), I?.(f);
301
- },
302
- onFocusCapture: he,
303
- onBlurCapture: be,
304
- children: [/* @__PURE__ */ m("div", {
305
- ref: x,
306
- className: K.items,
307
- children: t.slice(0, h).map((f, w) => /* @__PURE__ */ m(oe, {
308
- index: w,
309
- isHidden: w >= ne,
310
- isLastVisible: e !== !1 && w === ne - 1,
311
- isInPopup: !1,
312
- onFocusLost: ee,
313
- children: f
314
- }, f.key ?? w))
315
- }), (q || _) && /* @__PURE__ */ U(V.Root, {
316
- open: Z,
317
- actionsRef: c,
318
- onOpenChange: (f, w) => {
319
- l?.(f, w), w.isCanceled || M(f);
320
- },
321
- children: [q && /* @__PURE__ */ m(V.Trigger, {
322
- type: "button",
323
- "aria-label": `+${re} ${r}`,
324
- ...o,
325
- onClick: o?.onClick ?? L,
326
- onMouseDown: o?.onMouseDown ?? L,
327
- onPointerDown: o?.onPointerDown ?? L,
328
- onKeyDown: o?.onKeyDown ?? L,
329
- onKeyUp: o?.onKeyUp ?? L,
330
- ref: _e,
331
- className: (f) => D(K.trigger, Q(o?.className) ? o.className(f) : o?.className),
332
- "data-visible": P || void 0,
333
- children: Oe(o?.children) ? `+${re}` : o.children
334
- }), /* @__PURE__ */ m(V.Portal, { children: /* @__PURE__ */ m(V.Positioner, {
335
- anchor: d,
336
- align: "start",
337
- sideOffset: -9,
338
- alignOffset: -7,
339
- children: /* @__PURE__ */ m(V.Popup, {
340
- "aria-label": r,
341
- ...u,
342
- onClick: u?.onClick ?? L,
343
- onMouseDown: u?.onMouseDown ?? L,
344
- onPointerDown: u?.onPointerDown ?? L,
345
- onKeyDown: u?.onKeyDown ?? L,
346
- onKeyUp: u?.onKeyUp ?? L,
347
- ref: ye,
348
- render: (f, w) => /* @__PURE__ */ m(Ve, {
349
- props: f,
350
- state: w,
351
- render: u?.render
352
- }),
353
- finalFocus: u?.finalFocus ?? fe,
354
- className: (f) => D(K.popup, Q(u?.className) ? u.className(f) : u?.className),
355
- "data-overflowing-list-popup": "",
356
- children: t.map((f, w) => /* @__PURE__ */ m(oe, {
357
- index: w,
358
- isHidden: !1,
359
- isLastVisible: !1,
360
- isInPopup: !0,
361
- onFocusLost: ee,
362
- children: f
363
- }, f.key ?? w))
364
- })
365
- }) })]
366
- })]
367
- }), /* @__PURE__ */ m(je, {
368
- containerRef: d,
369
- itemsRef: x,
370
- triggerRef: A,
371
- itemCount: t.length,
372
- inlineItemCount: h,
373
- reserveCountSpace: P,
374
- isMeasurementEnabled: te,
375
- isOpen: _,
376
- onLayoutChange: de,
377
- onOverflowUnavailable: ge
378
- })] });
379
- }, Xe = "_header_1dz7y_1", Ye = "_titleRow_1dz7y_8", Ze = "_title_1dz7y_8", Pe = "_actions_1dz7y_21", et = "_description_1dz7y_27", B = {
380
- header: Xe,
381
- titleRow: Ye,
382
- title: Ze,
383
- actions: Pe,
384
- description: et
385
- }, tt = ({ title: t, description: e, actions: n, level: r = 2, size: s = "md", color: a = "primary", descriptionLineClamp: l = 5, isDescriptionFocusable: i = !1, render: o, ref: u, className: p, ...F }) => {
386
- const I = Ne(), C = J(e) ? Ie(e) : v(e) && e !== !1, N = J(e) && l !== !1, y = J(e) ? /* @__PURE__ */ m(we, {
387
- style: { whiteSpace: "pre-wrap" },
388
- children: e
389
- }) : e;
390
- return Y({
391
- render: o,
392
- ref: u,
393
- props: {
394
- ...F,
395
- className: D(B.header, p),
396
- children: /* @__PURE__ */ U(G, { children: [/* @__PURE__ */ U("div", {
397
- className: B.titleRow,
398
- children: [/* @__PURE__ */ m(Ce, {
399
- level: r,
400
- size: s,
401
- color: a,
402
- className: B.title,
403
- "aria-describedby": C ? I : void 0,
404
- children: t
405
- }), v(n) && /* @__PURE__ */ m("div", {
406
- className: B.actions,
407
- children: n
408
- })]
409
- }), C && /* @__PURE__ */ m("div", {
410
- id: I,
411
- className: B.description,
412
- children: N ? /* @__PURE__ */ m(Fe, {
413
- text: e,
414
- lineClamp: l,
415
- isTooltipMultiline: !0,
416
- isFocusable: i
417
- }) : y
418
- })] })
419
- }
420
- });
421
- }, nt = "_root_ztxxm_1", rt = "_fullWidth_ztxxm_20", ie = {
422
- root: nt,
423
- fullWidth: rt
424
- }, ot = ({ align: t = "left", color: e = "primary", fullWidth: n = !0, className: r, render: s, ref: a, ...l }) => Y({
425
- render: s,
426
- ref: a,
427
- props: {
428
- ...l,
429
- "data-align": t,
430
- "data-color": e,
431
- className: D(ie.root, n && ie.fullWidth, r)
432
- }
433
- }), gt = {
434
- Root: ot,
435
- Header: tt
436
- };
437
- export {
438
- yt as n,
439
- _t as r,
440
- gt as t
441
- };
@@ -1 +0,0 @@
1
- const h=require("./isDefined-DS2Q42p5.cjs"),Y=require("./OverflowingTextWithTooltip-Z2daM0_x.cjs"),z=require("./Popover-CneCJTvD.cjs"),he=require("./Heading-CTRYClCO.cjs");let H=require("@base-ui/react/use-render"),j=require("@sniptt/guards"),N=require("clsx"),d=require("react"),i=require("react/jsx-runtime"),be=require("@base-ui/react/merge-props"),V=require("@base-ui/utils/useMergedRefs"),q=require("@base-ui/utils/useStableCallback"),_e=require("@base-ui/utils/useControlled");var ge="_container_1hm4x_1",pe="_layer_1hm4x_9",ye="_visible_1hm4x_23",xe="_hidden_1hm4x_28",A={container:ge,layer:pe,visible:ye,hidden:xe},Ce=({isActive:t,activeIcon:e,inactiveIcon:n,className:s,render:o,ref:a,...u})=>(0,H.useRender)({defaultTagName:"span",render:o,ref:a,props:{...u,className:(0,N.clsx)(A.container,s),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{"aria-hidden":"true",className:(0,N.clsx)(A.layer,t?A.hidden:A.visible),children:n}),(0,i.jsx)("span",{"aria-hidden":"true",className:(0,N.clsx)(A.layer,t?A.visible:A.hidden),children:e})]})}}),we="_root_eheyl_1",Fe="_items_eheyl_11",De="_item_eheyl_11",Ie="_popupItem_eheyl_45",Oe="_trigger_eheyl_49",Se="_popup_eheyl_45",U={root:we,items:Fe,item:De,popupItem:Ie,trigger:Oe,popup:Se},Le=({props:t,state:e,render:n})=>{const s=(0,d.isValidElement)(n)?n:void 0,o=(0,V.useMergedRefs)(t.ref,s?.props.ref);if((0,j.isFunction)(n))return n(t,e);const a={...(0,be.mergeProps)(t,s?.props),children:t.children,ref:o};return h.isDefined(s)?(0,d.cloneElement)(s,a):(0,i.jsx)("div",{...a})},Re=(0,d.memo)(({elementRef:t,isHidden:e,onFocusLost:n})=>((0,d.useLayoutEffect)(()=>{const s=t.current,o=h.isDefined(s)&&s.contains(s.ownerDocument.activeElement);e&&o&&n(s)},[t,e,n]),null)),se=t=>(0,d.useCallback)(e=>{if(h.isDefined(e))return()=>{const n=e.ownerDocument,s=e.contains(n.activeElement);queueMicrotask(()=>{const o=n.activeElement===n.body;s&&!e.isConnected&&o&&t(e)})}},[t]),Z=({children:t,index:e,isHidden:n,isLastVisible:s,isInPopup:o,onFocusLost:a})=>{const u=(0,d.useRef)(null),l=(0,q.useStableCallback)(r=>{a({index:e,element:r,isInPopup:o})});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:(0,V.useMergedRefs)(u,se(l)),className:o?U.popupItem:U.item,"data-item-index":e,"data-hidden":n||void 0,"data-last-visible":s||void 0,"aria-hidden":n||void 0,inert:n,children:t}),(0,i.jsx)(Re,{elementRef:u,isHidden:n,onFocusLost:l})]})},ee=({itemWidths:t,availableWidth:e,gap:n,includePartialItem:s})=>{let o=0,a=0;for(const u of t){const l=o+u+(a>0?n:0);if(a!==0&&l>e){const r=o+n<e;return s&&r?a+1:a}o=l,a+=1}return a},Ee=({items:t,itemElements:e,supportsSynchronousLayout:n})=>{if(!n)return e.map(o=>o.scrollWidth);t.setAttribute("data-measuring","");const s=e.map(o=>o.clientWidth);return t.removeAttribute("data-measuring"),s},je=({container:t,items:e,trigger:n,itemElements:s,itemCount:o,reserveCountSpace:a,supportsSynchronousLayout:u})=>{const l=Ee({items:e,itemElements:s,supportsSynchronousLayout:u}),r=parseFloat(getComputedStyle(e).columnGap)||0,f=t.clientWidth,g=o>ee({itemWidths:l,availableWidth:f,gap:r,includePartialItem:!1}),w=n?.offsetWidth??0;return{visibleItemCount:ee({itemWidths:l,availableWidth:a&&g?Math.max(0,f-w-r):f,gap:r,includePartialItem:!0}),hasOverflow:g}},Ne=100,Me=(0,d.memo)(({containerRef:t,itemsRef:e,triggerRef:n,itemCount:s,inlineItemCount:o,reserveCountSpace:a,isMeasurementEnabled:u,isOpen:l,onLayoutChange:r,onOverflowUnavailable:f})=>{const g=(0,d.useRef)(void 0),w=(0,d.useRef)(void 0),D=(0,q.useStableCallback)(()=>({itemCount:s,inlineItemCount:o,reserveCountSpace:a,isOpen:l})),F=(0,q.useStableCallback)(r),L=(0,q.useStableCallback)(f);return(0,d.useLayoutEffect)(()=>{const y=t.current,I=e.current;if(!u||!h.isDefined(y)||!h.isDefined(I)){w.current=void 0;return}const M=h.isDefined(globalThis.ResizeObserver),S=new Set,x=()=>{const E=Array.from(I.children),W=new Set([y,...E]);h.isDefined(n.current)&&W.add(n.current);for(const _ of S)W.has(_)||(R?.unobserve(_),S.delete(_));for(const _ of W)S.has(_)||(R?.observe(_),S.add(_));const c=D();if(E.length!==c.inlineItemCount)return;const b=je({container:y,items:I,trigger:n.current,itemElements:E,itemCount:c.itemCount,reserveCountSpace:c.reserveCountSpace,supportsSynchronousLayout:M}),m=w.current,T=h.isDefined(m)&&m.isOpen&&!m.layout.hasOverflow,k=c.isOpen&&!b.hasOverflow;w.current={layout:b,isOpen:c.isOpen},F(b),k&&!T&&L()},R=M?new ResizeObserver(x):void 0;g.current=x,x();const p=new MutationObserver(x);if(p.observe(I,{attributes:!0,attributeFilter:["class","style","hidden"],characterData:!0,childList:!0,subtree:!0}),p.observe(y,{childList:!0}),!h.isDefined(R)){const E=setInterval(x,Ne);return window.addEventListener("resize",x),()=>{g.current=void 0,clearInterval(E),p.disconnect(),window.removeEventListener("resize",x)}}return()=>{g.current=void 0,p.disconnect(),R.disconnect()}},[t,e,n,u,D,F,L]),(0,d.useLayoutEffect)(()=>{g.current?.()},[s,o,a,l]),null}),Te=({itemCount:t,inlineItemCount:e})=>{const n=(0,d.useRef)(null),s=(0,d.useRef)(null),o=(0,d.useRef)(null),[a,u]=(0,d.useState)({visibleItemCount:e,hasOverflow:t>e});return{containerRef:n,itemsRef:s,triggerRef:o,updateLayout:(0,d.useCallback)(l=>{u(r=>r.visibleItemCount!==l.visibleItemCount||r.hasOverflow!==l.hasOverflow?l:r)},[]),...a}},ke="button, a[href], input, select, textarea, [tabindex]",te=({items:t,popup:e,trigger:n,root:s,removedIndex:o,excludedItem:a})=>{const u=[...Array.from(t?.children??[]),...Array.from(e?.children??[])].filter(l=>l!==a).sort((l,r)=>Math.abs(Number(l.getAttribute("data-item-index"))-o)-Math.abs(Number(r.getAttribute("data-item-index"))-o)||Number(r.getAttribute("data-item-index"))-Number(l.getAttribute("data-item-index")));for(const l of u)if(!l.hasAttribute("inert")){for(const r of Array.from(l.querySelectorAll(ke)))if(!r.matches(":disabled")&&!h.isDefined(r.closest("[inert]"))&&(r.focus(),r.ownerDocument.activeElement===r))return}n?.focus(),!(h.isDefined(n)&&n.ownerDocument.activeElement===n)&&s?.focus()},Ae=({containerRef:t,itemsRef:e,triggerRef:n,popup:s,itemCount:o,canExpand:a,isPopupOpen:u,isOpen:l,isHovered:r,showOverflowCount:f,onFocusCapture:g,onBlurCapture:w})=>{const[D,F]=(0,d.useState)(!1),[L,y]=(0,d.useState)(),I=f??L??(r||D||l),M=(0,q.useStableCallback)(({index:c,element:b,isInPopup:m})=>{te({items:m&&a?null:e.current,popup:m&&u?s:null,trigger:n.current,root:t.current,removedIndex:c,excludedItem:b})}),S=(0,d.useCallback)(()=>{const c=t.current;c?.focus(),F(c?.ownerDocument.activeElement===c),y(void 0)},[t]),x=(0,q.useStableCallback)(()=>{if(u)return;const c=t.current,b=c?.ownerDocument,m=b?.activeElement,T=h.isDefined(m)&&e.current?.contains(m)&&!h.isDefined(m.closest("[inert]")),k=h.isDefined(m)&&m!==b?.body&&!c?.contains(m)&&!s?.contains(m);if(T||k)return;if(!a){te({items:e.current,popup:null,trigger:null,root:c,removedIndex:o});return}const _=n.current;if(h.isDefined(_)&&!_.matches(":disabled")){_.focus({preventScroll:!0});return}c?.focus({preventScroll:!0})}),R=(0,d.useCallback)(()=>(queueMicrotask(x),!1),[x]),p=se(S);return{hasFocus:D,isCountVisible:I,restoreItemFocus:M,schedulePopupFocusRestoration:R,resetFocusWhenFocusedTriggerUnmounts:p,handleFocusCapture:c=>{F(!0),e.current?.contains(c.target)&&y(b=>b??I),g?.(c)},handleBlurCapture:c=>{F(c.currentTarget.contains(c.relatedTarget)||(s?.contains(c.relatedTarget)??!1)),e.current?.contains(c.relatedTarget)||y(void 0),w?.(c)}}},O=t=>t.stopPropagation(),qe=({children:t,showOverflowCount:e,maxInlineCount:n,overflowLabel:s="Show all items",open:o,defaultOpen:a=!1,onOpenChange:u,actionsRef:l,triggerProps:r,popupProps:f,className:g,onMouseEnter:w,onMouseLeave:D,onFocusCapture:F,onBlurCapture:L,ref:y,...I})=>{const[M,S]=(0,d.useState)(!1),[x,R]=(0,d.useState)(null),[p,E]=(0,_e.useControlled)({controlled:o,default:a,name:"OverflowingList",state:"open"}),W=(0,d.useRef)(null),c=l??W,b=h.isDefined(n)&&Number.isFinite(n)?Math.min(t.length,Math.max(0,Math.floor(n))):t.length,{containerRef:m,itemsRef:T,triggerRef:k,visibleItemCount:_,hasOverflow:re,updateLayout:oe}=Te({itemCount:t.length,inlineItemCount:b}),B=re&&(p||e!==!1),P=p&&B,{hasFocus:ae,isCountVisible:$,restoreItemFocus:G,schedulePopupFocusRestoration:ie,resetFocusWhenFocusedTriggerUnmounts:le,handleFocusCapture:ce,handleBlurCapture:ue}=Ae({containerRef:m,itemsRef:T,triggerRef:k,popup:x,itemCount:t.length,canExpand:B,isPopupOpen:P,isOpen:p,isHovered:M,showOverflowCount:e,onFocusCapture:F,onBlurCapture:L}),J=(e??(M||ae))||p,de=(0,V.useMergedRefs)(m,y),fe=(0,V.useMergedRefs)(k,le,r?.ref),me=(0,V.useMergedRefs)(R,f?.ref),Q=J&&e!==!1?_:b,X=t.length-_,ve=(0,q.useStableCallback)(()=>{c.current?.close()});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{...I,ref:de,tabIndex:I.tabIndex??-1,className:(0,N.clsx)(U.root,g),onMouseEnter:v=>{S(!0),w?.(v)},onMouseLeave:v=>{S(!1),D?.(v)},onFocusCapture:ce,onBlurCapture:ue,children:[(0,i.jsx)("div",{ref:T,className:U.items,children:t.slice(0,b).map((v,C)=>(0,i.jsx)(Z,{index:C,isHidden:C>=Q,isLastVisible:e!==!1&&C===Q-1,isInPopup:!1,onFocusLost:G,children:v},v.key??C))}),(B||p)&&(0,i.jsxs)(z.Popover.Root,{open:P,actionsRef:c,onOpenChange:(v,C)=>{u?.(v,C),C.isCanceled||E(v)},children:[B&&(0,i.jsx)(z.Popover.Trigger,{type:"button","aria-label":`+${X} ${s}`,...r,onClick:r?.onClick??O,onMouseDown:r?.onMouseDown??O,onPointerDown:r?.onPointerDown??O,onKeyDown:r?.onKeyDown??O,onKeyUp:r?.onKeyUp??O,ref:fe,className:v=>(0,N.clsx)(U.trigger,(0,j.isFunction)(r?.className)?r.className(v):r?.className),"data-visible":$||void 0,children:(0,j.isUndefined)(r?.children)?`+${X}`:r.children}),(0,i.jsx)(z.Popover.Portal,{children:(0,i.jsx)(z.Popover.Positioner,{anchor:m,align:"start",sideOffset:-9,alignOffset:-7,children:(0,i.jsx)(z.Popover.Popup,{"aria-label":s,...f,onClick:f?.onClick??O,onMouseDown:f?.onMouseDown??O,onPointerDown:f?.onPointerDown??O,onKeyDown:f?.onKeyDown??O,onKeyUp:f?.onKeyUp??O,ref:me,render:(v,C)=>(0,i.jsx)(Le,{props:v,state:C,render:f?.render}),finalFocus:f?.finalFocus??ie,className:v=>(0,N.clsx)(U.popup,(0,j.isFunction)(f?.className)?f.className(v):f?.className),"data-overflowing-list-popup":"",children:t.map((v,C)=>(0,i.jsx)(Z,{index:C,isHidden:!1,isLastVisible:!1,isInPopup:!0,onFocusLost:G,children:v},v.key??C))})})})]})]}),(0,i.jsx)(Me,{containerRef:m,itemsRef:T,triggerRef:k,itemCount:t.length,inlineItemCount:b,reserveCountSpace:$,isMeasurementEnabled:J,isOpen:p,onLayoutChange:oe,onOverflowUnavailable:ve})]})},We="_header_1dz7y_1",Ue="_titleRow_1dz7y_8",ze="_title_1dz7y_8",Ke="_actions_1dz7y_21",Ve="_description_1dz7y_27",K={header:We,titleRow:Ue,title:ze,actions:Ke,description:Ve},Be=({title:t,description:e,actions:n,level:s=2,size:o="md",color:a="primary",descriptionLineClamp:u=5,isDescriptionFocusable:l=!1,render:r,ref:f,className:g,...w})=>{const D=(0,d.useId)(),F=(0,j.isString)(e)?(0,j.isNonEmptyString)(e):h.isDefined(e)&&e!==!1,L=(0,j.isString)(e)&&u!==!1,y=(0,j.isString)(e)?(0,i.jsx)(Y.Text,{style:{whiteSpace:"pre-wrap"},children:e}):e;return(0,H.useRender)({render:r,ref:f,props:{...w,className:(0,N.clsx)(K.header,g),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:K.titleRow,children:[(0,i.jsx)(he.Heading,{level:s,size:o,color:a,className:K.title,"aria-describedby":F?D:void 0,children:t}),h.isDefined(n)&&(0,i.jsx)("div",{className:K.actions,children:n})]}),F&&(0,i.jsx)("div",{id:D,className:K.description,children:L?(0,i.jsx)(Y.OverflowingTextWithTooltip,{text:e,lineClamp:u,isTooltipMultiline:!0,isFocusable:l}):y})]})}})},He="_root_ztxxm_1",Pe="_fullWidth_ztxxm_20",ne={root:He,fullWidth:Pe},$e=({align:t="left",color:e="primary",fullWidth:n=!0,className:s,render:o,ref:a,...u})=>(0,H.useRender)({render:o,ref:a,props:{...u,"data-align":t,"data-color":e,className:(0,N.clsx)(ne.root,n&&ne.fullWidth,s)}}),Ge={Root:$e,Header:Be};Object.defineProperty(exports,"AnimatedIconCrossfade",{enumerable:!0,get:function(){return Ce}});Object.defineProperty(exports,"OverflowingList",{enumerable:!0,get:function(){return qe}});Object.defineProperty(exports,"Section",{enumerable:!0,get:function(){return Ge}});
@@ -1,131 +0,0 @@
1
- import { t as T } from "./isDefined-fMi6eQ4r.js";
2
- import { t as p } from "./mergeClassNames-ClFMR1v0.js";
3
- import { n as _, t as v } from "./TabsTabContent-DVcObDp6.js";
4
- import { useRender as x } from "@base-ui/react/use-render";
5
- import { isString as B } from "@sniptt/guards";
6
- import { clsx as N } from "clsx";
7
- import { jsx as l, jsxs as L } from "react/jsx-runtime";
8
- import { useDirection as R } from "@base-ui/react/direction-provider";
9
- import { Tabs as g } from "@base-ui/react/tabs";
10
- var K = "_root_ikxnr_1", C = "_list_ikxnr_13", O = "_item_ikxnr_24", S = "_content_ikxnr_35", D = "_separator_ikxnr_55", b = {
11
- root: K,
12
- list: C,
13
- item: O,
14
- content: S,
15
- separator: D
16
- }, H = ({ children: a, href: r, render: i, title: o, current: t, className: s, ref: e, "aria-current": n = t ? "page" : void 0, ...m }) => x({
17
- defaultTagName: T(r) ? "a" : "span",
18
- render: i,
19
- ref: e,
20
- props: {
21
- ...m,
22
- children: a,
23
- href: r,
24
- title: o ?? (B(a) ? a : void 0),
25
- "aria-current": n,
26
- "data-linked": T(r) || void 0,
27
- className: N(b.content, s)
28
- }
29
- }), ta = ({ links: a, className: r, render: i, ref: o, "aria-label": t = "Breadcrumb", ...s }) => x({
30
- defaultTagName: "nav",
31
- render: i,
32
- ref: o,
33
- props: {
34
- ...s,
35
- "aria-label": t,
36
- className: N(b.root, r),
37
- children: /* @__PURE__ */ l("ol", {
38
- className: b.list,
39
- children: a.map((e, n) => /* @__PURE__ */ L("li", {
40
- className: b.item,
41
- children: [n > 0 && /* @__PURE__ */ l("span", {
42
- className: b.separator,
43
- "aria-hidden": "true",
44
- children: "/"
45
- }), /* @__PURE__ */ l(H, {
46
- ...e,
47
- current: n === a.length - 1
48
- })]
49
- }, n))
50
- })
51
- }
52
- }), P = ({ className: a, ...r }) => /* @__PURE__ */ l(g.Indicator, {
53
- ...r,
54
- className: p(_.indicator, a)
55
- }), U = '[role="tab"]', j = '[role="tablist"]', q = "[hidden], [inert]", k = (a) => a.hasAttribute("data-disabled") || a.hasAttribute("disabled") || a.getAttribute("aria-disabled") === "true" || T(a.closest(q)), z = ({ event: a, direction: r, loopFocus: i }) => {
56
- if (a.altKey || a.ctrlKey || a.metaKey || a.shiftKey) return;
57
- const o = a.currentTarget, t = [];
58
- o.querySelectorAll(U).forEach((d) => {
59
- d.closest(j) === o && t.push(d);
60
- });
61
- const s = t.findIndex((d) => d === a.target);
62
- if (s === -1) return;
63
- const e = r === "rtl" ? ["ArrowLeft", "ArrowRight"] : ["ArrowRight", "ArrowLeft"], [n, m] = o.getAttribute("data-orientation") === "vertical" ? ["ArrowDown", "ArrowUp"] : e;
64
- if (![
65
- n,
66
- m,
67
- "Home",
68
- "End"
69
- ].includes(a.key)) return;
70
- const h = a.key === m;
71
- let u = s + (h ? -1 : 1);
72
- a.key === "Home" && (u = 0), a.key === "End" && (u = t.length - 1);
73
- const E = u < 0 || u >= t.length, w = h ? t.length - 1 : 0, y = t[E && i ? w : u];
74
- if (!T(y) || !k(y)) return;
75
- a.preventBaseUIHandler(), a.preventDefault();
76
- const f = t.filter((d) => !k(d));
77
- let c;
78
- if (a.key === "Home" && (c = f[0]), a.key === "End" && (c = f[f.length - 1]), a.key === n || a.key === m) {
79
- const d = h ? [...f].reverse() : f;
80
- c = d.find((A) => h ? t.indexOf(A) < s : t.indexOf(A) > s), c ??= i ? d[0] : void 0;
81
- }
82
- if (!T(c) || c === a.target) return;
83
- a.stopPropagation();
84
- const I = c;
85
- queueMicrotask(() => I.focus());
86
- }, M = ({ className: a, onKeyDown: r, loopFocus: i = !0, ...o }) => {
87
- const t = R(), s = (e) => {
88
- if (r?.(e), e.defaultPrevented) {
89
- e.preventBaseUIHandler();
90
- return;
91
- }
92
- e.baseUIHandlerPrevented || z({
93
- event: e,
94
- direction: t,
95
- loopFocus: i
96
- });
97
- };
98
- return /* @__PURE__ */ l(g.List, {
99
- ...o,
100
- loopFocus: i,
101
- onKeyDown: s,
102
- className: p(_.list, a)
103
- });
104
- }, V = ({ className: a, ...r }) => /* @__PURE__ */ l(g.Panel, {
105
- ...r,
106
- className: p(_.panel, a)
107
- }), $ = ({ className: a, ...r }) => /* @__PURE__ */ l(g.Root, {
108
- ...r,
109
- className: p(_.root, a)
110
- }), G = ({ className: a, children: r, startIcon: i, endIcon: o, badge: t, highlighted: s = !1, size: e = "sm", ...n }) => /* @__PURE__ */ l(g.Tab, {
111
- ...n,
112
- className: p(_.tab, a),
113
- "data-size": e,
114
- "data-highlighted": s || void 0,
115
- children: /* @__PURE__ */ l(v, {
116
- startIcon: i,
117
- endIcon: o,
118
- badge: t,
119
- children: r
120
- })
121
- }), ea = {
122
- Root: $,
123
- List: M,
124
- Tab: G,
125
- Indicator: P,
126
- Panel: V
127
- };
128
- export {
129
- ta as n,
130
- ea as t
131
- };
@@ -1 +0,0 @@
1
- const T=require("./isDefined-DS2Q42p5.cjs"),g=require("./mergeClassNames-D4lshrT6.cjs"),c=require("./TabsTabContent-Co27Y2TU.cjs");let A=require("@base-ui/react/use-render"),v=require("@sniptt/guards"),k=require("clsx"),d=require("react/jsx-runtime"),w=require("@base-ui/react/direction-provider"),x=require("@base-ui/react/tabs");var C="_root_ikxnr_1",I="_list_ikxnr_13",B="_item_ikxnr_24",D="_content_ikxnr_35",L="_separator_ikxnr_55",f={root:C,list:I,item:B,content:D,separator:L},R=({children:e,href:r,render:i,title:n,current:a,className:s,ref:t,"aria-current":l=a?"page":void 0,...b})=>(0,A.useRender)({defaultTagName:T.isDefined(r)?"a":"span",render:i,ref:t,props:{...b,children:e,href:r,title:n??((0,v.isString)(e)?e:void 0),"aria-current":l,"data-linked":T.isDefined(r)||void 0,className:(0,k.clsx)(f.content,s)}}),K=({links:e,className:r,render:i,ref:n,"aria-label":a="Breadcrumb",...s})=>(0,A.useRender)({defaultTagName:"nav",render:i,ref:n,props:{...s,"aria-label":a,className:(0,k.clsx)(f.root,r),children:(0,d.jsx)("ol",{className:f.list,children:e.map((t,l)=>(0,d.jsxs)("li",{className:f.item,children:[l>0&&(0,d.jsx)("span",{className:f.separator,"aria-hidden":"true",children:"/"}),(0,d.jsx)(R,{...t,current:l===e.length-1})]},l))})}}),O=({className:e,...r})=>(0,d.jsx)(x.Tabs.Indicator,{...r,className:g.mergeClassNames(c.Tab_module_default.indicator,e)}),P='[role="tab"]',S='[role="tablist"]',H="[hidden], [inert]",y=e=>e.hasAttribute("data-disabled")||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"||T.isDefined(e.closest(H)),U=({event:e,direction:r,loopFocus:i})=>{if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;const n=e.currentTarget,a=[];n.querySelectorAll(P).forEach(o=>{o.closest(S)===n&&a.push(o)});const s=a.findIndex(o=>o===e.target);if(s===-1)return;const t=r==="rtl"?["ArrowLeft","ArrowRight"]:["ArrowRight","ArrowLeft"],[l,b]=n.getAttribute("data-orientation")==="vertical"?["ArrowDown","ArrowUp"]:t;if(![l,b,"Home","End"].includes(e.key))return;const p=e.key===b;let _=s+(p?-1:1);e.key==="Home"&&(_=0),e.key==="End"&&(_=a.length-1);const q=_<0||_>=a.length,E=p?a.length-1:0,N=a[q&&i?E:_];if(!T.isDefined(N)||!y(N))return;e.preventBaseUIHandler(),e.preventDefault();const m=a.filter(o=>!y(o));let u;if(e.key==="Home"&&(u=m[0]),e.key==="End"&&(u=m[m.length-1]),e.key===l||e.key===b){const o=p?[...m].reverse():m;u=o.find(h=>p?a.indexOf(h)<s:a.indexOf(h)>s),u??=i?o[0]:void 0}if(!T.isDefined(u)||u===e.target)return;e.stopPropagation();const j=u;queueMicrotask(()=>j.focus())},z=({className:e,onKeyDown:r,loopFocus:i=!0,...n})=>{const a=(0,w.useDirection)(),s=t=>{if(r?.(t),t.defaultPrevented){t.preventBaseUIHandler();return}t.baseUIHandlerPrevented||U({event:t,direction:a,loopFocus:i})};return(0,d.jsx)(x.Tabs.List,{...n,loopFocus:i,onKeyDown:s,className:g.mergeClassNames(c.Tab_module_default.list,e)})},M=({className:e,...r})=>(0,d.jsx)(x.Tabs.Panel,{...r,className:g.mergeClassNames(c.Tab_module_default.panel,e)}),V=({className:e,...r})=>(0,d.jsx)(x.Tabs.Root,{...r,className:g.mergeClassNames(c.Tab_module_default.root,e)}),G=({className:e,children:r,startIcon:i,endIcon:n,badge:a,highlighted:s=!1,size:t="sm",...l})=>(0,d.jsx)(x.Tabs.Tab,{...l,className:g.mergeClassNames(c.Tab_module_default.tab,e),"data-size":t,"data-highlighted":s||void 0,children:(0,d.jsx)(c.TabsTabContent,{startIcon:i,endIcon:n,badge:a,children:r})}),J={Root:V,List:z,Tab:G,Indicator:O,Panel:M};Object.defineProperty(exports,"Breadcrumb",{enumerable:!0,get:function(){return K}});Object.defineProperty(exports,"Tabs",{enumerable:!0,get:function(){return J}});
@@ -1 +0,0 @@
1
- const g=require("./theme-1XkFz8Qu.cjs"),_=require("./isDefined-DS2Q42p5.cjs"),Z=require("./mergeClassNames-D4lshrT6.cjs"),ee=require("./TintedIconTile-CU2hCerq.cjs"),te=require("./Shortcut-CgrdLv_L.cjs"),N=require("./Button-Dbi5P05r.cjs"),ne=require("./Tooltip-Bg9Uk01p.cjs"),w=require("./OverflowingTextWithTooltip-Z2daM0_x.cjs"),re=require("./ListItem-CHTR-GLd.cjs"),ae=require("./Dropdown-BKjAaZS0.cjs"),ie=require("./Avatar-CQhIEazb.cjs"),oe=require("./handleClickableElementKeyDown-CByqtBhO.cjs"),P=require("./TabsTabContent-Co27Y2TU.cjs");let j=require("@sniptt/guards"),f=require("clsx"),k=require("react"),e=require("react/jsx-runtime"),se=require("@base-ui/react/button"),C=require("@tabler/icons-react");var ue=()=>{const{pageId:n,goToPage:a,goBack:r,canGoBack:s}=ae.useDropdownContext();return{page:n,goToPage:t=>a({id:t}),goBack:r,canGoBack:s}},le=({color:n,selected:a,focused:r,indicator:s,startIcon:t,endIcon:o,description:l,descriptionPlacement:u,shortcut:d,shortcutJoinLabel:i,hasSubmenu:m,disabled:c=!1,type:v="button",children:I,...x})=>(0,e.jsx)(re.ListItem,{color:n,selected:a,focused:r,indicator:s,startIcon:t,endIcon:o,description:l,descriptionPlacement:u,shortcut:d,shortcutJoinLabel:i,hasSubmenu:m,disabled:c,render:(0,e.jsx)(se.Button,{...x,nativeButton:!0,type:v,disabled:c}),children:I}),de={gray:"Gray",tomato:"Tomato",red:"Red",ruby:"Ruby",crimson:"Crimson",pink:"Pink",plum:"Plum",purple:"Purple",violet:"Violet",iris:"Iris",cyan:"Cyan",turquoise:"Turquoise",sky:"Sky",blue:"Blue",jade:"Jade",green:"Green",grass:"Grass",mint:"Mint",lime:"Lime",bronze:"Bronze",gold:"Gold",brown:"Brown",orange:"Orange",amber:"Amber",yellow:"Yellow"},ce="_iconContainer_1ivx0_1",me="_withBackground_1ivx0_9",O={iconContainer:ce,withBackground:me},M=({children:n,className:a,hasBackground:r=!0})=>(0,e.jsx)("div",{className:(0,f.clsx)(O.iconContainer,r&&O.withBackground,a),children:n}),E=({Icon:n,iconThemeColor:a,withContainer:r=!1,withContainerBackground:s=!0})=>{const t=g.useTheme();if(!n)return null;if(_.isDefined(a))return(0,e.jsx)(ee.TintedIconTile,{icon:(0,e.jsx)(n,{size:t.icon.size.md,stroke:t.icon.stroke.sm}),color:a,style:{width:t.icon.size.md,height:t.icon.size.md}});const o=(0,e.jsx)(n,{size:t.icon.size.md,stroke:t.icon.stroke.sm});return r?(0,e.jsx)(M,{hasBackground:s,children:o}):o},ve="_iconSwapContainer_g9ywp_1",_e="_defaultIcon_g9ywp_8",fe="_hoverIcon_g9ywp_13",L={iconSwapContainer:ve,defaultIcon:_e,hoverIcon:fe},he=({leadingContent:n,withIconContainer:a=!1,withIconContainerBackground:r=!0,gripIconColor:s})=>{const t=g.useTheme();if(!_.isDefined(n))return null;const o=(0,e.jsxs)("div",{className:L.iconSwapContainer,children:[(0,e.jsx)("div",{className:(0,f.clsx)(L.defaultIcon,"grip-swap-default-icon"),children:n}),(0,e.jsx)("div",{className:(0,f.clsx)(L.hoverIcon,"grip-swap-hover-icon"),children:(0,e.jsx)(C.IconGripVertical,{size:t.icon.size.md,stroke:t.icon.stroke.sm,color:s})})]});return a?(0,e.jsx)(M,{hasBackground:r,children:o}):o},Ie="_hoverableMenuItemBase_1jkew_54",ge="_menuItemBase_1jkew_1",be="_menuItemLabel_1jkew_136",xe="_menuItemLabelLight_1jkew_145",je="_noIconFiller_1jkew_155",ye="_menuItemLeftContent_1jkew_159",pe="_menuItemRightContent_1jkew_172",Ce="_draggableItem_1jkew_183",Me="_menuItemIconCheckContainer_1jkew_189",ke="_menuItemContextualText_1jkew_196",Se="_rightMenuItemContextualText_1jkew_206",h={hoverableMenuItemBase:Ie,menuItemBase:ge,menuItemLabel:be,menuItemLabelLight:xe,noIconFiller:je,menuItemLeftContent:ye,menuItemRightContent:pe,draggableItem:Ce,menuItemIconCheckContainer:Me,menuItemContextualText:ke,rightMenuItemContextualText:Se},we=(0,k.forwardRef)(({accent:n,isKeySelected:a,isHoverBackgroundDisabled:r,hovered:s,disabled:t,focused:o,className:l,children:u,...d},i)=>(0,e.jsx)("div",{ref:i,className:(0,f.clsx)(h.menuItemBase,l),"data-accent":n,"data-key-selected":a||void 0,"data-hover-background-disabled":r||void 0,"data-disabled":t||void 0,"data-focused":o||void 0,...d,children:u}));we.displayName="StyledMenuItemBase";var b=(n,a)=>{const r=(0,k.forwardRef)(({className:s,children:t,...o},l)=>(0,e.jsx)("div",{ref:l,className:(0,f.clsx)(n,s),...o,children:t}));return r.displayName=a,r},Le=b(h.menuItemLabel,"StyledMenuItemLabel"),$e=b(h.menuItemLabelLight,"StyledMenuItemLabelLight"),Ye=b(h.noIconFiller,"StyledNoIconFiller"),F=b(h.menuItemLeftContent,"StyledMenuItemLeftContent"),T=b(h.menuItemRightContent,"StyledMenuItemRightContent"),R=b(h.draggableItem,"StyledDraggableItem"),B=(0,k.forwardRef)(({accent:n,isKeySelected:a,isHoverBackgroundDisabled:r,hovered:s,disabled:t,focused:o,isIconDisplayedOnHoverOnly:l,cursor:u,className:d,children:i,...m},c)=>(0,e.jsx)("div",{ref:c,className:(0,f.clsx)(h.hoverableMenuItemBase,d),"data-accent":n,"data-key-selected":a||void 0,"data-hover-background-disabled":r||void 0,"data-disabled":t||void 0,"data-focused":o||void 0,"data-icon-displayed-on-hover-only":l||void 0,"data-cursor":u,...m,children:i}));B.displayName="StyledHoverableMenuItemBase";var qe=b(h.menuItemContextualText,"StyledMenuItemContextualText"),Te=b(h.rightMenuItemContextualText,"StyledRightMenuItemContextualText"),Be="_mainText_d0zu3_1",ze="_menuItemLabelRight_d0zu3_9",G={mainText:Be,menuItemLabelRight:ze},De=({LeftComponent:n,LeftIcon:a,iconThemeColor:r})=>{if(_.isDefined(n))return n;if(_.isDefined(a))return(0,e.jsx)(E,{Icon:a,iconThemeColor:r})},z=({className:n,LeftComponent:a,LeftIcon:r,iconThemeColor:s,withIconContainer:t=!1,withIconContainerBackground:o=!0,text:l,contextualText:u,contextualTextPosition:d="left",gripMode:i="never",disabled:m=!1})=>{const c=g.useTheme(),v=t?g.themeCssVariables.font.color.tertiary:m?g.themeCssVariables.font.color.extraLight:g.themeCssVariables.font.color.light,I=De({LeftComponent:a,LeftIcon:r,iconThemeColor:s}),x=t&&!_.isDefined(s);return(0,e.jsxs)(F,{className:n,children:[i==="always"&&(t?(0,e.jsx)(M,{hasBackground:o,children:(0,e.jsx)(R,{children:(0,e.jsx)(C.IconGripVertical,{size:c.icon.size.md,stroke:c.icon.stroke.sm,color:v})})}):(0,e.jsx)(R,{children:(0,e.jsx)(C.IconGripVertical,{size:c.icon.size.md,stroke:c.icon.stroke.sm,color:v})})),i==="always"&&(x&&_.isDefined(I)?(0,e.jsx)(M,{hasBackground:o,children:I}):I),i==="onHover"&&(0,e.jsx)(he,{leadingContent:I,withIconContainer:x,withIconContainerBackground:o,gripIconColor:v}),i==="never"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(E,{Icon:r,iconThemeColor:s,withContainer:t,withContainerBackground:o}),a]}),(0,e.jsxs)(Le,{children:[(0,j.isString)(l)?(0,e.jsx)("div",{className:G.mainText,children:(0,e.jsx)(w.OverflowingTextWithTooltip,{text:l})}):l,d==="left"&&(0,e.jsx)(e.Fragment,{children:(0,j.isString)(u)?(0,j.isNonEmptyString)(u)&&(0,e.jsx)(qe,{children:(0,e.jsx)(w.OverflowingTextWithTooltip,{text:`· ${u}`,tooltipContent:u})}):u})]}),d==="right"&&(0,e.jsx)("div",{className:G.menuItemLabelRight,children:(0,e.jsx)(Te,{children:(0,j.isString)(u)?(0,e.jsx)(w.OverflowingTextWithTooltip,{text:u}):u})})]})},Ne="_subMenuIcon_j232v_1",Pe="_subMenuIconOpened_j232v_9",A={subMenuIcon:Ne,subMenuIconOpened:Pe},V=({accent:n="default",className:a,withIconContainer:r=!1,withIconContainerBackground:s=!0,iconButtons:t,isIconDisplayedOnHoverOnly:o=!0,LeftIcon:l,iconThemeColor:u,LeftComponent:d,RightIcon:i,RightComponent:m,onClick:c,onMouseEnter:v,onMouseLeave:I,testId:x,text:W,contextualTextPosition:H="left",contextualText:K,hasSubMenu:J=!1,disabled:y=!1,focused:U=!1,selected:$=!1,shortcut:D,shortcutJoinLabel:Y,isSubMenuOpened:Q=!1})=>{const p=g.useTheme(),X=S=>{c&&(S.preventDefault(),S.stopPropagation(),c?.(S))};return(0,e.jsxs)(B,{"data-testid":x??void 0,onClick:y?void 0:X,disabled:y,className:a,accent:n,isIconDisplayedOnHoverOnly:o,onMouseEnter:v,onMouseLeave:I,focused:U||$,children:[(0,e.jsx)(z,{LeftIcon:l??void 0,iconThemeColor:u,LeftComponent:d,withIconContainer:r,withIconContainerBackground:s,text:W,contextualText:K,contextualTextPosition:H,disabled:y}),(0,e.jsxs)(T,{children:[t&&(0,e.jsx)(T,{className:"hoverable-buttons",children:t}),_.isDefined(D)&&(0,e.jsx)(te.Shortcut,{shortcut:D,sequenceJoinLabel:Y}),i&&(0,e.jsx)(i,{size:p.icon.size.md,stroke:p.icon.stroke.sm}),m,J&&(0,e.jsx)("div",{className:(0,f.clsx)(A.subMenuIcon,Q&&A.subMenuIconOpened),style:{visibility:y?"hidden":"visible"},children:(0,e.jsx)(C.IconChevronRight,{size:p.icon.size.sm,color:p.font.color.light})})]})]})},Oe=({accent:n="default",className:a,iconButtons:r,isIconDisplayedOnHoverOnly:s=!0,isTooltipOpen:t,onClick:o,onMouseEnter:l,onMouseLeave:u,testId:d,avatar:i,hasSubMenu:m=!1,text:c,contextualText:v})=>(0,e.jsx)(V,{accent:n,className:a,iconButtons:r,isIconDisplayedOnHoverOnly:s,isTooltipOpen:t,LeftComponent:_.isDefined(i)?(0,e.jsx)(ie.Avatar,{name:i.name,src:i.src,colorSeed:i.colorSeed,size:i.size,shape:i.shape}):void 0,onClick:o,onMouseEnter:l,onMouseLeave:u,testId:d,text:c,contextualText:v,hasSubMenu:m}),Re=({LeftIcon:n,LeftComponent:a,withIconContainer:r=!1,accent:s="default",iconButtons:t,onClick:o,text:l,contextualText:u,isDragDisabled:d=!1,className:i,isIconDisplayedOnHoverOnly:m=!0,gripMode:c="never"})=>(0,e.jsxs)(B,{onClick:o,accent:s,className:i,isIconDisplayedOnHoverOnly:m,cursor:c!=="never"?d?"default":"drag":"default",children:[(0,e.jsx)(z,{LeftIcon:n,LeftComponent:a,text:l,contextualText:u,withIconContainer:r,disabled:d,gripMode:c}),t&&(0,e.jsx)(T,{className:"hoverable-buttons",children:t})]}),Ge="_suggestionMenuItem_1qyjt_1",Ae={suggestionMenuItem:Ge},Ee=({LeftIcon:n,withIconContainer:a=!1,text:r,contextualText:s=void 0,contextualTextPosition:t="left",className:o,selected:l,onClick:u})=>{const d=i=>{u&&(i.preventDefault(),i.stopPropagation(),u?.(i))};return(0,e.jsx)("li",{className:(0,f.clsx)(Ae.suggestionMenuItem,o),"data-selected":l||void 0,role:_.isDefined(u)?"button":void 0,tabIndex:_.isDefined(u)?0:void 0,onClick:d,onKeyDown:oe.handleClickableElementKeyDown,children:(0,e.jsx)(F,{children:(0,e.jsx)(z,{LeftIcon:n??void 0,text:r,contextualText:s,contextualTextPosition:t,withIconContainer:a})})})},Fe="_menuPicker_o8ra4_1",Ve="_iconContainer_o8ra4_41",We="_label_o8ra4_50",q={menuPicker:Fe,iconContainer:Ve,label:We},He=({id:n,icon:a,label:r,selected:s=!1,disabled:t=!1,showLabel:o=!0,onClick:l,className:u,testId:d,tooltipContent:i,tooltipDelay:m=0,tooltipOffset:c=5})=>{const v=g.useTheme();return(0,e.jsx)(ne.Tooltip,{content:i,disabled:!(0,j.isNonEmptyString)(i),sideOffset:c,side:"bottom",positionMethod:"fixed",delay:m,children:(0,e.jsxs)("button",{id:n,disabled:t,onClick:l,className:(0,f.clsx)(q.menuPicker,u),"data-testid":d,"data-selected":s?"":void 0,"aria-pressed":s,"aria-disabled":t,"aria-label":r,children:[(0,e.jsx)("div",{className:q.iconContainer,children:(0,e.jsx)(a,{size:v.icon.size.md,stroke:v.icon.stroke.sm})}),_.isDefined(r)&&o&&(0,e.jsx)("div",{className:q.label,"data-selected":s?"":void 0,"data-disabled":t?"":void 0,children:r})]})})},Ke="_button_quwcq_1",Je={button:Ke},Ue=({active:n=!1,className:a,children:r,startIcon:s,endIcon:t,badge:o,size:l,...u})=>{const d=(0,k.useContext)(N.ButtonGroupContext),i=l??d?.size??"sm";return(0,e.jsx)(N.Button,{...u,variant:"ghost",size:i,"data-active":n||void 0,className:Z.mergeClassNames((0,f.clsx)(P.Tab_module_default.tab,Je.button),a),children:(0,e.jsx)(P.TabsTabContent,{startIcon:s,endIcon:t,badge:o,children:r})})};Object.defineProperty(exports,"DEFAULT_COLOR_LABELS",{enumerable:!0,get:function(){return de}});Object.defineProperty(exports,"ListItemButton",{enumerable:!0,get:function(){return le}});Object.defineProperty(exports,"MenuItem",{enumerable:!0,get:function(){return V}});Object.defineProperty(exports,"MenuItemAvatar",{enumerable:!0,get:function(){return Oe}});Object.defineProperty(exports,"MenuItemDraggable",{enumerable:!0,get:function(){return Re}});Object.defineProperty(exports,"MenuItemSuggestion",{enumerable:!0,get:function(){return Ee}});Object.defineProperty(exports,"MenuPicker",{enumerable:!0,get:function(){return He}});Object.defineProperty(exports,"TabButton",{enumerable:!0,get:function(){return Ue}});Object.defineProperty(exports,"useDropdownPage",{enumerable:!0,get:function(){return ue}});