@sps-woodland/core 8.56.2 → 8.56.3

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 (262) hide show
  1. package/lib/action-bar/action-bar/ActionBar.js +44 -59
  2. package/lib/action-bar/action-bar/ActionBar.ve.js +4 -11
  3. package/lib/action-bar/action-bar-additional-content/ActionBarAdditionalContent.js +14 -22
  4. package/lib/action-bar/index.js +54 -74
  5. package/lib/action-bar/index.umd.cjs +1 -1
  6. package/lib/action-bar/style.css +2 -1
  7. package/lib/add-to-list/add-to-list/AddToList.js +220 -302
  8. package/lib/add-to-list/add-to-list/AddToList.ve.js +79 -24
  9. package/lib/add-to-list/add-to-list/ItemsList.js +42 -67
  10. package/lib/add-to-list/add-to-list/ListItem.js +24 -50
  11. package/lib/add-to-list/index.js +393 -453
  12. package/lib/add-to-list/index.umd.cjs +1 -1
  13. package/lib/add-to-list/style.css +2 -1
  14. package/lib/buttons/button/Button.js +95 -121
  15. package/lib/buttons/button/Button.ve.js +150 -9
  16. package/lib/buttons/index.js +281 -171
  17. package/lib/buttons/index.umd.cjs +1 -1
  18. package/lib/buttons/style.css +2 -1
  19. package/lib/cards/card/Card.js +19 -27
  20. package/lib/cards/card/Card.ve.js +4 -4
  21. package/lib/cards/card-footer/CardFooter.js +12 -13
  22. package/lib/cards/card-footer/CardFooter.ve.js +4 -4
  23. package/lib/cards/card-header/CardHeader.js +12 -13
  24. package/lib/cards/card-header/CardHeader.ve.js +4 -4
  25. package/lib/cards/card-title/CardTitle.js +11 -12
  26. package/lib/cards/card-title/CardTitle.ve.js +4 -4
  27. package/lib/cards/index.js +52 -52
  28. package/lib/cards/index.umd.cjs +1 -1
  29. package/lib/cards/style.css +2 -1
  30. package/lib/column-manager/column-manager/ColumnManager.js +95 -112
  31. package/lib/column-manager/column-manager/useColumnManager.js +59 -48
  32. package/lib/column-manager/index.js +2 -5
  33. package/lib/components/icon/Icon.ve.js +15 -5
  34. package/lib/components/icon/icons/sprite.svg.js +4 -4
  35. package/lib/content-row/content-row/ContentRow.js +146 -173
  36. package/lib/content-row/content-row/ContentRow.ve.js +105 -18
  37. package/lib/content-row/content-row-col/ContentRowCol.js +37 -48
  38. package/lib/content-row/content-row-col/ContentRowCol.ve.js +49 -6
  39. package/lib/content-row/content-row-expansion/ContentRowExpansion.js +16 -24
  40. package/lib/content-row/index.js +407 -318
  41. package/lib/content-row/index.umd.cjs +1 -1
  42. package/lib/content-row/row-list-auto-layout/RowListAutoLayout.js +24 -39
  43. package/lib/content-row/row-list-auto-layout/RowListAutoLayout.ve.js +13 -5
  44. package/lib/content-row/style.css +2 -1
  45. package/lib/content-tiles/content-tile/ContentTile.js +71 -60
  46. package/lib/content-tiles/content-tile/ContentTile.ve.js +36 -14
  47. package/lib/content-tiles/content-tile-list/ContentTileList.js +12 -13
  48. package/lib/content-tiles/content-tile-list/ContentTileList.ve.js +4 -5
  49. package/lib/content-tiles/index.js +156 -118
  50. package/lib/content-tiles/index.umd.cjs +1 -1
  51. package/lib/content-tiles/style.css +2 -1
  52. package/lib/core.css +2 -1
  53. package/lib/dropdowns/dropdown/Dropdown.js +56 -68
  54. package/lib/dropdowns/dropdown/Dropdown.ve.js +37 -8
  55. package/lib/dropdowns/index.js +171 -171
  56. package/lib/dropdowns/index.umd.cjs +1 -1
  57. package/lib/dropdowns/option-list/Option.js +14 -18
  58. package/lib/dropdowns/option-list/Option.ve.js +4 -5
  59. package/lib/dropdowns/option-list/OptionList.js +28 -44
  60. package/lib/dropdowns/option-list/OptionList.ve.js +4 -5
  61. package/lib/dropdowns/style.css +2 -1
  62. package/lib/editable-table/EditableTable.js +68 -85
  63. package/lib/editable-table/index.js +1 -4
  64. package/lib/feedback-block/FeedbackBlock.js +40 -35
  65. package/lib/feedback-block/FeedbackBlock.ve.js +56 -7
  66. package/lib/feedback-block/index.js +132 -85
  67. package/lib/feedback-block/index.umd.cjs +1 -1
  68. package/lib/feedback-block/style.css +2 -1
  69. package/lib/file-upload/file-upload/FileUpload.js +164 -202
  70. package/lib/file-upload/file-upload/FileUpload.ve.js +84 -18
  71. package/lib/file-upload/file-upload/mime-type.enum.js +106 -106
  72. package/lib/file-upload/index.js +390 -353
  73. package/lib/file-upload/index.umd.cjs +1 -1
  74. package/lib/file-upload/style.css +2 -1
  75. package/lib/filter-tiles/filter-tile/FilterTile.js +41 -46
  76. package/lib/filter-tiles/filter-tile/FilterTile.ve.js +51 -9
  77. package/lib/filter-tiles/filter-tile-set/FilterTileSet.js +12 -15
  78. package/lib/filter-tiles/filter-tile-set/FilterTileSet.ve.js +4 -4
  79. package/lib/filter-tiles/index.js +142 -107
  80. package/lib/filter-tiles/index.umd.cjs +1 -1
  81. package/lib/filter-tiles/style.css +2 -1
  82. package/lib/focused-task/focused-task/FocusedTask.js +52 -74
  83. package/lib/focused-task/focused-task/FocusedTask.ve.js +13 -12
  84. package/lib/focused-task/focused-task/useFocusedTask.js +20 -18
  85. package/lib/focused-task/focused-task-actions/FocusedTaskActions.js +12 -13
  86. package/lib/focused-task/index.js +127 -144
  87. package/lib/focused-task/index.umd.cjs +1 -1
  88. package/lib/focused-task/style.css +2 -1
  89. package/lib/growler/Growler.js +78 -90
  90. package/lib/growler/Growler.ve.js +23 -12
  91. package/lib/growler/GrowlerListProvider.js +38 -39
  92. package/lib/growler/Sonner.ve.js +17 -12
  93. package/lib/growler/index.js +249 -274
  94. package/lib/growler/index.umd.cjs +1 -1
  95. package/lib/growler/sonner.js +73 -102
  96. package/lib/growler/style.css +2 -1
  97. package/lib/index.js +520 -501
  98. package/lib/index.umd.cjs +4 -4
  99. package/lib/insight-card/InsightCard.js +90 -84
  100. package/lib/insight-card/InsightCard.ve.js +148 -15
  101. package/lib/insight-card/InsightCardSet.js +12 -12
  102. package/lib/insight-card/index.js +269 -141
  103. package/lib/insight-card/index.umd.cjs +1 -1
  104. package/lib/insight-card/style.css +2 -1
  105. package/lib/key-value-set/index.js +97 -87
  106. package/lib/key-value-set/index.umd.cjs +1 -1
  107. package/lib/key-value-set/key-value-set/KeyValueSet.js +17 -21
  108. package/lib/key-value-set/key-value-set/KeyValueSet.ve.js +10 -5
  109. package/lib/key-value-set/key-value-set-item/KeyValueSetItem.js +25 -21
  110. package/lib/key-value-set/key-value-set-item/KeyValueSetItem.ve.js +13 -6
  111. package/lib/key-value-set/style.css +2 -1
  112. package/lib/list-bar/advanced-search/AdvancedSearch.js +51 -54
  113. package/lib/list-bar/advanced-search/AdvancedSearch.ve.js +30 -8
  114. package/lib/list-bar/index.js +305 -301
  115. package/lib/list-bar/index.umd.cjs +1 -1
  116. package/lib/list-bar/list-bar/InputGroupWrapper.js +10 -19
  117. package/lib/list-bar/list-bar/ListBar.js +105 -121
  118. package/lib/list-bar/list-bar/ListBar.ve.js +13 -17
  119. package/lib/list-bar/list-bar/ListBarSearch.js +20 -21
  120. package/lib/list-bar/list-bar/ListBarSearchInfo.js +8 -12
  121. package/lib/list-bar/list-bar/ListBarSortBy.js +28 -38
  122. package/lib/list-bar/search-results-bar/SearchResultsBar.js +38 -28
  123. package/lib/list-bar/search-results-bar/SearchResultsBar.ve.js +4 -11
  124. package/lib/list-bar/style.css +2 -1
  125. package/lib/matrix/index.js +79 -87
  126. package/lib/matrix/index.umd.cjs +1 -1
  127. package/lib/matrix/matrix/Matrix.js +18 -26
  128. package/lib/matrix/matrix/Matrix.ve.js +4 -7
  129. package/lib/matrix/matrix-body/MatrixBody.js +10 -13
  130. package/lib/matrix/matrix-cell/MatrixCell.js +23 -18
  131. package/lib/matrix/matrix-head/MatrixHead.js +10 -13
  132. package/lib/matrix/matrix-header/MatrixHeader.js +20 -23
  133. package/lib/matrix/matrix-row/MatrixRow.js +10 -13
  134. package/lib/matrix/style.css +2 -1
  135. package/lib/modal/index.js +197 -187
  136. package/lib/modal/index.umd.cjs +1 -1
  137. package/lib/modal/modal/Modal.js +90 -108
  138. package/lib/modal/modal/Modal.ve.js +43 -13
  139. package/lib/modal/modal/useModal.js +19 -24
  140. package/lib/modal/modal-footer/ModalFooter.js +11 -12
  141. package/lib/modal/style.css +2 -1
  142. package/lib/node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.21.2/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js +49 -0
  143. package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/index.browser.js +8 -10
  144. package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/url-alphabet/index.js +4 -4
  145. package/lib/page-title/heading-level/HeadingLevel.js +8 -12
  146. package/lib/page-title/index.js +33 -40
  147. package/lib/page-title/index.umd.cjs +1 -1
  148. package/lib/page-title/page-subtitle/PageSubtitle.js +13 -18
  149. package/lib/page-title/page-subtitle/PageSubtitle.ve.js +4 -5
  150. package/lib/page-title/page-title/PageTitle.js +15 -19
  151. package/lib/page-title/page-title/PageTitle.ve.js +4 -7
  152. package/lib/page-title/style.css +2 -1
  153. package/lib/photo/index.js +174 -177
  154. package/lib/photo/index.umd.cjs +1 -1
  155. package/lib/photo/photo/Photo.js +72 -81
  156. package/lib/photo/photo/Photo.ve.js +21 -7
  157. package/lib/photo/photo-carousel/PhotoCarousel.js +36 -51
  158. package/lib/photo/photo-carousel/PhotoCarousel.ve.js +13 -9
  159. package/lib/photo/style.css +2 -1
  160. package/lib/product-bar/hooks/usePriorityPlus.js +88 -104
  161. package/lib/product-bar/index.js +372 -395
  162. package/lib/product-bar/index.umd.cjs +1 -1
  163. package/lib/product-bar/product-bar/ProductBar.js +77 -103
  164. package/lib/product-bar/product-bar/ProductBar.ve.js +46 -15
  165. package/lib/product-bar/product-bar-name/ProductBarName.js +37 -40
  166. package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.js +48 -70
  167. package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.ve.js +4 -8
  168. package/lib/product-bar/product-bar-tab/ProductBarTab.js +28 -26
  169. package/lib/product-bar/slack-link/SlackLink.js +26 -30
  170. package/lib/product-bar/slack-link/SlackLink.ve.js +4 -5
  171. package/lib/product-bar/style.css +2 -1
  172. package/lib/product-bar-vertical/index.js +240 -251
  173. package/lib/product-bar-vertical/index.umd.cjs +1 -1
  174. package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.js +42 -61
  175. package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.ve.js +53 -23
  176. package/lib/product-bar-vertical/product-bar-vertical-header/ProductBarVerticalHeader.js +30 -42
  177. package/lib/product-bar-vertical/product-bar-vertical-item/ProductBarVerticalItem.js +71 -89
  178. package/lib/product-bar-vertical/product-bar-vertical-section/ProductBarVerticalSection.js +22 -29
  179. package/lib/product-bar-vertical/style.css +2 -1
  180. package/lib/progress-indicators/index.js +372 -255
  181. package/lib/progress-indicators/index.umd.cjs +1 -1
  182. package/lib/progress-indicators/progress-bar/ProgressBar.js +66 -110
  183. package/lib/progress-indicators/progress-bar/ProgressBar.ve.js +66 -13
  184. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.js +34 -54
  185. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.ve.js +136 -8
  186. package/lib/progress-indicators/progress-ring/ProgressRing.js +45 -52
  187. package/lib/progress-indicators/style.css +2 -1
  188. package/lib/rich-text-editor/index.js +556 -582
  189. package/lib/rich-text-editor/index.umd.cjs +11 -11
  190. package/lib/rich-text-editor/rich-text-editor/RTELinkModal.js +29 -33
  191. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.js +23 -37
  192. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.ve.js +13 -6
  193. package/lib/rich-text-editor/rich-text-editor/RichTextEditor.js +68 -77
  194. package/lib/rich-text-editor/rich-text-editor/RichTextEditor.ve.js +21 -8
  195. package/lib/rich-text-editor/rich-text-editor/hooks/useHtmlToMd.js +14 -20
  196. package/lib/rich-text-editor/rich-text-editor/hooks/useMdToHtml.js +14 -20
  197. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEContent.js +33 -27
  198. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEObserver.js +79 -88
  199. package/lib/rich-text-editor/rich-text-editor/hooks/useRTESelectionListener.js +28 -36
  200. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEToolbarButtons.js +195 -211
  201. package/lib/rich-text-editor/rich-text-editor/icons/BOLD.svg.js +4 -4
  202. package/lib/rich-text-editor/rich-text-editor/icons/INDENT.svg.js +4 -4
  203. package/lib/rich-text-editor/rich-text-editor/icons/ITALICS.svg.js +4 -4
  204. package/lib/rich-text-editor/rich-text-editor/icons/LINK.svg.js +4 -4
  205. package/lib/rich-text-editor/rich-text-editor/icons/ORDERED_LIST.svg.js +4 -4
  206. package/lib/rich-text-editor/rich-text-editor/icons/OUTDENT.svg.js +4 -4
  207. package/lib/rich-text-editor/rich-text-editor/icons/REDO.svg.js +4 -4
  208. package/lib/rich-text-editor/rich-text-editor/icons/UNDO.svg.js +4 -4
  209. package/lib/rich-text-editor/rich-text-editor/icons/UNLINK.svg.js +4 -4
  210. package/lib/rich-text-editor/rich-text-editor/icons/UNORDERED_LIST.svg.js +4 -4
  211. package/lib/rich-text-editor/rich-text-editor/utils/flattenListItemParagraphs.js +12 -12
  212. package/lib/rich-text-editor/rich-text-editor/utils/removeUnrepresentableBreaks.js +20 -19
  213. package/lib/rich-text-editor/rich-text-editor/utils/utils.js +11 -15
  214. package/lib/rich-text-editor/style.css +2 -1
  215. package/lib/scrollable-container/ScrollableContainer.js +18 -27
  216. package/lib/scrollable-container/ScrollableContainer.ve.js +4 -4
  217. package/lib/scrollable-container/index.js +20 -27
  218. package/lib/scrollable-container/index.umd.cjs +1 -1
  219. package/lib/scrollable-container/style.css +2 -1
  220. package/lib/side-nav/index.js +190 -228
  221. package/lib/side-nav/index.umd.cjs +1 -1
  222. package/lib/side-nav/side-nav/SideNav.js +43 -60
  223. package/lib/side-nav/side-nav/SideNav.ve.js +22 -16
  224. package/lib/side-nav/side-nav/navContext.js +7 -7
  225. package/lib/side-nav/side-nav-header/SideNavHeader.js +14 -15
  226. package/lib/side-nav/side-nav-item/SideNavItem.js +68 -94
  227. package/lib/side-nav/side-nav-section/SideNavSection.js +16 -26
  228. package/lib/side-nav/style.css +2 -1
  229. package/lib/sorting-header/caret/caret.ve.js +13 -5
  230. package/lib/sorting-header/index.js +269 -251
  231. package/lib/sorting-header/index.umd.cjs +1 -1
  232. package/lib/sorting-header/sorting-header/SortingHeader.js +110 -124
  233. package/lib/sorting-header/sorting-header/SortingHeader.ve.js +30 -6
  234. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.js +69 -83
  235. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.ve.js +21 -7
  236. package/lib/sorting-header/style.css +2 -1
  237. package/lib/style.css +2 -1
  238. package/lib/tabs/index.js +255 -201
  239. package/lib/tabs/index.umd.cjs +1 -1
  240. package/lib/tabs/style.css +2 -1
  241. package/lib/tabs/tab/Tab.js +24 -27
  242. package/lib/tabs/tab/Tab.ve.js +76 -6
  243. package/lib/tabs/tab-panel/TabPanel.js +16 -25
  244. package/lib/tabs/tabs/Tabs.js +101 -112
  245. package/lib/tabs/tabs/Tabs.ve.js +13 -11
  246. package/lib/tags/clickable-tag/ClickableTag.js +86 -90
  247. package/lib/tags/clickable-tag/ClickableTag.ve.js +66 -9
  248. package/lib/tags/index.js +342 -199
  249. package/lib/tags/index.umd.cjs +1 -1
  250. package/lib/tags/split-tag/SplitTag.js +49 -30
  251. package/lib/tags/split-tag/SplitTag.ve.js +35 -9
  252. package/lib/tags/style.css +2 -1
  253. package/lib/tags/tag/Tag.js +42 -38
  254. package/lib/tags/tag/Tag.ve.js +41 -6
  255. package/lib/utils/cl.js +5 -5
  256. package/lib/zero-state/ZeroState.js +36 -29
  257. package/lib/zero-state/ZeroState.ve.js +29 -11
  258. package/lib/zero-state/index.js +103 -78
  259. package/lib/zero-state/index.umd.cjs +1 -1
  260. package/lib/zero-state/style.css +2 -1
  261. package/package.json +12 -12
  262. package/lib/node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.17.4/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js +0 -57
@@ -1,410 +1,387 @@
1
- import * as t from "react";
2
- import { Metadata as D, cl as k, Icon as Q, selectChildren as re, PortalContext as ne } from "@sps-woodland/core";
3
- import { useLink as ae } from "@react-aria/link";
4
- import { MenuProvider as oe, MenuButton as se, Menu as le, MenuItem as q } from "@ariakit/react";
5
- import { useWoodlandLanguage as U } from "@spscommerce/i18n";
6
- function _e(e, n, r) {
7
- return n in e ? Object.defineProperty(e, n, {
8
- value: r,
9
- enumerable: !0,
10
- configurable: !0,
11
- writable: !0
12
- }) : e[n] = r, e;
1
+ import * as e from "react";
2
+ import { Icon as t, Metadata as n, PortalContext as r, cl as i, selectChildren as a } from "@sps-woodland/core";
3
+ import { useLink as o } from "@react-aria/link";
4
+ import { Menu as s, MenuButton as c, MenuItem as l, MenuProvider as u } from "@ariakit/react";
5
+ import { useWoodlandLanguage as d } from "@spscommerce/i18n";
6
+ //#region ../../../node_modules/.pnpm/@vanilla-extract+recipes@0.2.5_@vanilla-extract+css@1.21.2/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js
7
+ function f(e, t, n) {
8
+ return t in e ? Object.defineProperty(e, t, {
9
+ value: n,
10
+ enumerable: !0,
11
+ configurable: !0,
12
+ writable: !0
13
+ }) : e[t] = n, e;
13
14
  }
14
- function G(e, n) {
15
- var r = Object.keys(e);
16
- if (Object.getOwnPropertySymbols) {
17
- var a = Object.getOwnPropertySymbols(e);
18
- n && (a = a.filter(function(s) {
19
- return Object.getOwnPropertyDescriptor(e, s).enumerable;
20
- })), r.push.apply(r, a);
21
- }
22
- return r;
15
+ function p(e, t) {
16
+ var n = Object.keys(e);
17
+ if (Object.getOwnPropertySymbols) {
18
+ var r = Object.getOwnPropertySymbols(e);
19
+ t && (r = r.filter(function(t) {
20
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
21
+ })), n.push.apply(n, r);
22
+ }
23
+ return n;
23
24
  }
24
- function J(e) {
25
- for (var n = 1; n < arguments.length; n++) {
26
- var r = arguments[n] != null ? arguments[n] : {};
27
- n % 2 ? G(Object(r), !0).forEach(function(a) {
28
- _e(e, a, r[a]);
29
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : G(Object(r)).forEach(function(a) {
30
- Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(r, a));
31
- });
32
- }
33
- return e;
25
+ function m(e) {
26
+ for (var t = 1; t < arguments.length; t++) {
27
+ var n = arguments[t] == null ? {} : arguments[t];
28
+ t % 2 ? p(Object(n), !0).forEach(function(t) {
29
+ f(e, t, n[t]);
30
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : p(Object(n)).forEach(function(t) {
31
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
32
+ });
33
+ }
34
+ return e;
34
35
  }
35
- var ce = (e, n, r) => {
36
- for (var a of Object.keys(e)) {
37
- var s;
38
- if (e[a] !== ((s = n[a]) !== null && s !== void 0 ? s : r[a]))
39
- return !1;
40
- }
41
- return !0;
42
- }, H = (e) => (n) => {
43
- var r = e.defaultClassName, a = J(J({}, e.defaultVariants), n);
44
- for (var s in a) {
45
- var o, l = (o = a[s]) !== null && o !== void 0 ? o : e.defaultVariants[s];
46
- if (l != null) {
47
- var _ = l;
48
- typeof _ == "boolean" && (_ = _ === !0 ? "true" : "false");
49
- var p = (
50
- // @ts-expect-error
51
- e.variantClassNames[s][_]
52
- );
53
- p && (r += " " + p);
54
- }
55
- }
56
- for (var [m, i] of e.compoundVariants)
57
- ce(m, a, e.defaultVariants) && (r += " " + i);
58
- return r;
59
- }, ie = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux0", ue = H({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux1", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux2", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux3" } }, defaultVariants: { fullWidth: !1 }, compoundVariants: [] }), de = H({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux4", variantClassNames: { hideNameText: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux5", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux6" } }, defaultVariants: { hideNameText: !1 }, compoundVariants: [] }), fe = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux7", pe = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux8", me = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjux9", he = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxa", X = H({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxb", variantClassNames: { active: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxc", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxd" }, disabled: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxe", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxf" } }, defaultVariants: { active: !1, disabled: !1 }, compoundVariants: [] }), ge = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxg", ve = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxh", be = H({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxi", variantClassNames: { priorityPlus: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxj", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_g6gjuxk" } }, defaultVariants: { priorityPlus: !1 }, compoundVariants: [] });
60
- function Y(e) {
61
- const n = t.useRef(null), { linkProps: r } = ae(e, n), { active: a, priority: s, ...o } = e, l = e.as ?? (e.href ? "a" : "button"), _ = {
62
- ...o,
63
- ...r,
64
- ref: n,
65
- className: k(
66
- X({ active: a, disabled: !1 }),
67
- l === "button" && ge,
68
- e.className
69
- )
70
- };
71
- return /* @__PURE__ */ t.createElement(l, { ..._ }, e.children);
36
+ var h = (e, t, n) => {
37
+ for (var r of Object.keys(e)) if (e[r] !== (t[r] ?? n[r])) return !1;
38
+ return !0;
39
+ }, g = (e) => (t) => {
40
+ var n = e.defaultClassName, r = m(m({}, e.defaultVariants), t);
41
+ for (var i in r) {
42
+ var a = r[i] ?? e.defaultVariants[i];
43
+ if (a != null) {
44
+ var o = a;
45
+ typeof o == "boolean" && (o = o === !0 ? "true" : "false");
46
+ var s = e.variantClassNames[i][o];
47
+ s && (n += " " + s);
48
+ }
49
+ }
50
+ for (var [c, l] of e.compoundVariants) h(c, r, e.defaultVariants) && (n += " " + l);
51
+ return n;
52
+ }, _ = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux0", v = g({
53
+ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux1",
54
+ variantClassNames: { fullWidth: {
55
+ true: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux2",
56
+ false: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux3"
57
+ } },
58
+ defaultVariants: { fullWidth: !1 },
59
+ compoundVariants: []
60
+ }), y = g({
61
+ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux4",
62
+ variantClassNames: { hideNameText: {
63
+ true: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux5",
64
+ false: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux6"
65
+ } },
66
+ defaultVariants: { hideNameText: !1 },
67
+ compoundVariants: []
68
+ }), b = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxa", x = g({
69
+ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxb",
70
+ variantClassNames: {
71
+ active: {
72
+ true: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxc",
73
+ false: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxd"
74
+ },
75
+ disabled: {
76
+ true: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxe",
77
+ false: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxf"
78
+ }
79
+ },
80
+ defaultVariants: {
81
+ active: !1,
82
+ disabled: !1
83
+ },
84
+ compoundVariants: []
85
+ }), S = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxh", C = g({
86
+ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxi",
87
+ variantClassNames: { priorityPlus: {
88
+ true: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxj",
89
+ false: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxk"
90
+ } },
91
+ defaultVariants: { priorityPlus: !1 },
92
+ compoundVariants: []
93
+ });
94
+ //#endregion
95
+ //#region src/product-bar/product-bar-tab/ProductBarTab.tsx
96
+ function w(t) {
97
+ let n = e.useRef(null), { linkProps: r } = o(t, n), { active: a, priority: s, ...c } = t, l = t.as ?? (t.href ? "a" : "button"), u = {
98
+ ...c,
99
+ ...r,
100
+ ref: n,
101
+ className: i(x({
102
+ active: a,
103
+ disabled: !1
104
+ }), l === "button" && "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjuxg", t.className)
105
+ };
106
+ return /* @__PURE__ */ e.createElement(l, u, t.children);
72
107
  }
73
- D.set(Y, {
74
- name: "Product Bar Tab",
75
- props: {
76
- active: { type: "boolean", required: !0 },
77
- href: { type: "string" },
78
- priority: { type: "number" }
79
- }
108
+ n.set(w, {
109
+ name: "Product Bar Tab",
110
+ props: {
111
+ active: {
112
+ type: "boolean",
113
+ required: !0
114
+ },
115
+ href: { type: "string" },
116
+ priority: { type: "number" }
117
+ }
80
118
  });
81
- function ye(e) {
82
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
119
+ //#endregion
120
+ //#region src/product-bar/product-bar-name/ProductBarName.tsx
121
+ function T(e) {
122
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
83
123
  }
84
- const Z = t.forwardRef(
85
- ({ children: e, className: n, name: r, logoSrc: a, hideNameText: s = !1, ...o }, l) => {
86
- const _ = !!o.onClick && !("href" in o && o.href);
87
- return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
88
- "a",
89
- {
90
- className: k(de({ hideNameText: s }), n),
91
- ..._ ? { role: "button", tabIndex: 0, onKeyDown: ye } : {},
92
- ...o,
93
- ref: l
94
- },
95
- a && /* @__PURE__ */ t.createElement(
96
- "img",
97
- {
98
- className: fe,
99
- src: a,
100
- "aria-hidden": "true",
101
- alt: `${r} Logo`,
102
- title: r
103
- }
104
- ),
105
- r && /* @__PURE__ */ t.createElement("span", { className: k(pe, s && me) }, r)
106
- ), /* @__PURE__ */ t.createElement("span", { className: ve }));
107
- }
108
- );
109
- D.set(Z, {
110
- name: "ProductBarName",
111
- props: {
112
- name: { type: "string" },
113
- logoSrc: { type: "string" },
114
- hideNameText: { type: "boolean", default: "false" }
115
- }
124
+ var E = e.forwardRef(({ children: t, className: n, name: r, logoSrc: a, hideNameText: o = !1, ...s }, c) => {
125
+ let l = !!s.onClick && !("href" in s && s.href);
126
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("a", {
127
+ className: i(y({ hideNameText: o }), n),
128
+ ...l ? {
129
+ role: "button",
130
+ tabIndex: 0,
131
+ onKeyDown: T
132
+ } : {},
133
+ ...s,
134
+ ref: c
135
+ }, a && /* @__PURE__ */ e.createElement("img", {
136
+ className: "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux7",
137
+ src: a,
138
+ "aria-hidden": "true",
139
+ alt: `${r} Logo`,
140
+ title: r
141
+ }), r && /* @__PURE__ */ e.createElement("span", { className: i("pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux8", o && "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_g6gjux9") }, r)), /* @__PURE__ */ e.createElement("span", { className: S }));
142
+ });
143
+ n.set(E, {
144
+ name: "ProductBarName",
145
+ props: {
146
+ name: { type: "string" },
147
+ logoSrc: { type: "string" },
148
+ hideNameText: {
149
+ type: "boolean",
150
+ default: "false"
151
+ }
152
+ }
116
153
  });
117
- var we = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_5klvkn0", ke = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_5klvkn1", Re = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_5klvkn2", z = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_5klvkn3", K = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_5klvkn4";
118
- function Ce({
119
- items: e,
120
- wrapperRef: n
121
- }) {
122
- const { t: r } = U();
123
- if (e.length === 0)
124
- return null;
125
- const a = e.some((o) => o.props?.active), s = r("productBar.more", { defaultValue: "More" });
126
- return (
127
- // Wrap in span for width measurement - don't put ref directly on MenuButton
128
- // as it interferes with ariakit's internal anchor element ref handling
129
- /* @__PURE__ */ t.createElement("span", { ref: n }, /* @__PURE__ */ t.createElement(oe, null, /* @__PURE__ */ t.createElement(
130
- se,
131
- {
132
- className: k(X({ active: a, disabled: !1 }), we),
133
- "aria-label": s
134
- },
135
- s,
136
- /* @__PURE__ */ t.createElement(
137
- Q,
138
- {
139
- icon: "chevron-down",
140
- className: ke,
141
- "aria-hidden": "true"
142
- }
143
- )
144
- ), /* @__PURE__ */ t.createElement(le, { className: Re, gutter: 4 }, e.map((o, l) => {
145
- const _ = o.props?.active, p = o.props?.children, m = o.props?.onPress, i = o.props?.href, R = o.props?.as, I = () => {
146
- m && m();
147
- };
148
- if (i && R) {
149
- const C = R;
150
- return /* @__PURE__ */ t.createElement(
151
- q,
152
- {
153
- key: l,
154
- className: k(z, _ && K),
155
- render: /* @__PURE__ */ t.createElement(C, { to: i })
156
- },
157
- p
158
- );
159
- }
160
- return i ? /* @__PURE__ */ t.createElement(
161
- q,
162
- {
163
- key: l,
164
- className: k(z, _ && K),
165
- render: /* @__PURE__ */ t.createElement("a", { href: i })
166
- },
167
- p
168
- ) : /* @__PURE__ */ t.createElement(
169
- q,
170
- {
171
- key: l,
172
- className: k(z, _ && K),
173
- onClick: I
174
- },
175
- p
176
- );
177
- }))))
178
- );
154
+ //#endregion
155
+ //#region src/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.css.ts
156
+ var D = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_5klvkn0", O = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_5klvkn1", k = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_5klvkn2", A = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_5klvkn3";
157
+ //#endregion
158
+ //#region src/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.tsx
159
+ function j({ items: n, wrapperRef: r }) {
160
+ let { t: a } = d();
161
+ if (n.length === 0) return null;
162
+ let o = n.some((e) => e.props?.active), f = a("productBar.more", { defaultValue: "More" });
163
+ return /* @__PURE__ */ e.createElement("span", { ref: r }, /* @__PURE__ */ e.createElement(u, null, /* @__PURE__ */ e.createElement(c, {
164
+ className: i(x({
165
+ active: o,
166
+ disabled: !1
167
+ }), D),
168
+ "aria-label": f
169
+ }, f, /* @__PURE__ */ e.createElement(t, {
170
+ icon: "chevron-down",
171
+ className: O,
172
+ "aria-hidden": "true"
173
+ })), /* @__PURE__ */ e.createElement(s, {
174
+ className: k,
175
+ gutter: 4
176
+ }, n.map((t, n) => {
177
+ let r = t.props?.active, a = t.props?.children, o = t.props?.onPress, s = t.props?.href, c = t.props?.as, u = () => {
178
+ o && o();
179
+ };
180
+ if (s && c) {
181
+ let t = c;
182
+ return /* @__PURE__ */ e.createElement(l, {
183
+ key: n,
184
+ className: i(A, r && "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_5klvkn4"),
185
+ render: /* @__PURE__ */ e.createElement(t, { to: s })
186
+ }, a);
187
+ }
188
+ return s ? /* @__PURE__ */ e.createElement(l, {
189
+ key: n,
190
+ className: i(A, r && "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_5klvkn4"),
191
+ render: /* @__PURE__ */ e.createElement("a", { href: s })
192
+ }, a) : /* @__PURE__ */ e.createElement(l, {
193
+ key: n,
194
+ className: i(A, r && "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_5klvkn4"),
195
+ onClick: u
196
+ }, a);
197
+ }))));
179
198
  }
180
- function Ee(e, n = {}) {
181
- const {
182
- enabled: r = !0,
183
- minVisibleItems: a = 1,
184
- debounceMs: s = 16
185
- // ~1 frame for responsive resize handling
186
- } = n, o = t.useRef(null), l = t.useRef(null), _ = t.useRef(null), p = t.useRef(null), m = t.useRef(null), i = t.useRef([]), R = t.useRef(0), I = t.useRef(0), C = t.useRef(!1), [M, N] = t.useState(e.length), [A, B] = t.useState(!1), S = t.useCallback(() => {
187
- if (!o.current) return !1;
188
- const c = o.current, g = Array.from(c.children), u = _.current;
189
- u && (R.current = u.getBoundingClientRect().width);
190
- const b = g.filter((y) => y !== u);
191
- if (b.length < e.length)
192
- return !1;
193
- if (i.current = b.map((y) => y.getBoundingClientRect().width), m.current) {
194
- const y = m.current.querySelector("span:last-of-type");
195
- if (y) {
196
- const d = y.getBoundingClientRect().width, E = getComputedStyle(m.current), P = parseFloat(E.marginRight) || 0, f = Math.max(0, P - 8);
197
- I.current = d + f;
198
- }
199
- }
200
- return C.current = !0, !0;
201
- }, [e.length]), V = t.useCallback(() => {
202
- if (!l.current) return 0;
203
- const c = l.current, g = c.getBoundingClientRect(), u = getComputedStyle(c), b = parseFloat(u.paddingLeft) + parseFloat(u.paddingRight), y = parseFloat(u.gap) || 0;
204
- let d = b;
205
- const E = Array.from(c.children), P = E.filter((f) => getComputedStyle(f).display !== "none");
206
- P.length > 1 && (d += y * (P.length - 1));
207
- for (const f of E) {
208
- if (f === o.current) continue;
209
- const T = getComputedStyle(f), L = parseFloat(T.marginLeft) + parseFloat(T.marginRight);
210
- if (f === p.current) {
211
- const O = Array.from(f.children), F = getComputedStyle(f), j = parseFloat(F.gap) || 0;
212
- for (const v of O) {
213
- const w = getComputedStyle(v), te = parseFloat(w.marginLeft) + parseFloat(w.marginRight);
214
- d += v.getBoundingClientRect().width + te;
215
- }
216
- O.length > 1 && (d += j * (O.length - 1)), d += parseFloat(F.paddingLeft) + parseFloat(F.paddingRight), d += L;
217
- } else
218
- d += f.getBoundingClientRect().width + L;
219
- }
220
- return Math.max(0, g.width - d - 2);
221
- }, []), h = t.useRef(!1), x = t.useCallback(() => {
222
- if (!r || !C.current) {
223
- B(!1), h.current = !1;
224
- return;
225
- }
226
- let c = V();
227
- const g = i.current, u = R.current || 100, b = I.current || 0;
228
- if (h.current && b > 0 && (c -= b), g.length === 0 || c <= 0) {
229
- N(e.length), B(!1), h.current = !1;
230
- return;
231
- }
232
- if (g.reduce((v, w) => v + w, 0) <= c) {
233
- N(e.length), B(!1), h.current = !1;
234
- return;
235
- }
236
- let d = 0, E = 0;
237
- const P = c - u;
238
- for (let v = 0; v < g.length; v++) {
239
- const w = g[v];
240
- if (d + w <= P)
241
- d += w, E++;
242
- else
243
- break;
244
- }
245
- const W = Math.min(a, e.length), f = Math.max(E, W), L = g.slice(0, W).reduce((v, w) => v + w, 0) + u, O = E < W && L > c && b > 0, F = !O && c > L + b + 20;
246
- let j = h.current;
247
- O && !h.current ? j = !0 : F && h.current && (j = !1), j !== h.current && (h.current = j, B(j)), N(f);
248
- }, [r, e.length, a, V]);
249
- t.useEffect(() => {
250
- if (!r) {
251
- N(e.length);
252
- return;
253
- }
254
- C.current = !1, i.current = [], N(e.length);
255
- }, [r, e.length]), t.useLayoutEffect(() => {
256
- if (!r || !o.current) return;
257
- S() && x();
258
- }), t.useEffect(() => {
259
- if (!r) return;
260
- let c;
261
- const g = () => {
262
- clearTimeout(c), c = setTimeout(() => {
263
- C.current || S(), x();
264
- }, s);
265
- }, u = new ResizeObserver(g);
266
- return l.current && u.observe(l.current), () => {
267
- clearTimeout(c), u.disconnect();
268
- };
269
- }, [r, S, x, s]);
270
- const $ = r ? e.slice(0, M) : e, ee = r && M < e.length ? e.slice(M) : [];
271
- return {
272
- visibleItems: $,
273
- overflowItems: ee,
274
- containerRef: o,
275
- parentRef: l,
276
- overflowButtonRef: _,
277
- contentRef: p,
278
- brandRef: m,
279
- hideProductName: A
280
- };
199
+ //#endregion
200
+ //#region src/product-bar/hooks/usePriorityPlus.ts
201
+ function M(t, n = {}) {
202
+ let { enabled: r = !0, minVisibleItems: i = 1, debounceMs: a = 16 } = n, o = e.useRef(null), s = e.useRef(null), c = e.useRef(null), l = e.useRef(null), u = e.useRef(null), d = e.useRef([]), f = e.useRef(0), p = e.useRef(0), m = e.useRef(!1), [h, g] = e.useState(t.length), [_, v] = e.useState(!1), y = e.useCallback(() => {
203
+ if (!o.current) return !1;
204
+ let e = o.current, n = Array.from(e.children), r = c.current;
205
+ r && (f.current = r.getBoundingClientRect().width);
206
+ let i = n.filter((e) => e !== r);
207
+ if (i.length < t.length) return !1;
208
+ if (d.current = i.map((e) => e.getBoundingClientRect().width), u.current) {
209
+ let e = u.current.querySelector("span:last-of-type");
210
+ if (e) {
211
+ let t = e.getBoundingClientRect().width, n = getComputedStyle(u.current), r = parseFloat(n.marginRight) || 0, i = Math.max(0, r - 8);
212
+ p.current = t + i;
213
+ }
214
+ }
215
+ return m.current = !0, !0;
216
+ }, [t.length]), b = e.useCallback(() => {
217
+ if (!s.current) return 0;
218
+ let e = s.current, t = e.getBoundingClientRect(), n = getComputedStyle(e), r = parseFloat(n.paddingLeft) + parseFloat(n.paddingRight), i = parseFloat(n.gap) || 0, a = r, c = Array.from(e.children), u = c.filter((e) => getComputedStyle(e).display !== "none");
219
+ u.length > 1 && (a += i * (u.length - 1));
220
+ for (let e of c) {
221
+ if (e === o.current) continue;
222
+ let t = getComputedStyle(e), n = parseFloat(t.marginLeft) + parseFloat(t.marginRight);
223
+ if (e === l.current) {
224
+ let t = Array.from(e.children), r = getComputedStyle(e), i = parseFloat(r.gap) || 0;
225
+ for (let e of t) {
226
+ let t = getComputedStyle(e), n = parseFloat(t.marginLeft) + parseFloat(t.marginRight);
227
+ a += e.getBoundingClientRect().width + n;
228
+ }
229
+ t.length > 1 && (a += i * (t.length - 1)), a += parseFloat(r.paddingLeft) + parseFloat(r.paddingRight), a += n;
230
+ } else a += e.getBoundingClientRect().width + n;
231
+ }
232
+ return Math.max(0, t.width - a - 2);
233
+ }, []), x = e.useRef(!1), S = e.useCallback(() => {
234
+ if (!r || !m.current) {
235
+ v(!1), x.current = !1;
236
+ return;
237
+ }
238
+ let e = b(), n = d.current, a = f.current || 100, o = p.current || 0;
239
+ if (x.current && o > 0 && (e -= o), n.length === 0 || e <= 0 || n.reduce((e, t) => e + t, 0) <= e) {
240
+ g(t.length), v(!1), x.current = !1;
241
+ return;
242
+ }
243
+ let s = 0, c = 0, l = e - a;
244
+ for (let e = 0; e < n.length; e++) {
245
+ let t = n[e];
246
+ if (s + t <= l) s += t, c++;
247
+ else break;
248
+ }
249
+ let u = Math.min(i, t.length), h = Math.max(c, u), _ = n.slice(0, u).reduce((e, t) => e + t, 0) + a, y = c < u && _ > e && o > 0, S = !y && e > _ + o + 20, C = x.current;
250
+ y && !x.current ? C = !0 : S && x.current && (C = !1), C !== x.current && (x.current = C, v(C)), g(h);
251
+ }, [
252
+ r,
253
+ t.length,
254
+ i,
255
+ b
256
+ ]);
257
+ return e.useEffect(() => {
258
+ r && (m.current = !1, d.current = []), g(t.length);
259
+ }, [r, t.length]), e.useLayoutEffect(() => {
260
+ r && o.current && y() && S();
261
+ }), e.useEffect(() => {
262
+ if (!r) return;
263
+ let e, t = new ResizeObserver(() => {
264
+ clearTimeout(e), e = setTimeout(() => {
265
+ m.current || y(), S();
266
+ }, a);
267
+ });
268
+ return s.current && t.observe(s.current), () => {
269
+ clearTimeout(e), t.disconnect();
270
+ };
271
+ }, [
272
+ r,
273
+ y,
274
+ S,
275
+ a
276
+ ]), {
277
+ visibleItems: r ? t.slice(0, h) : t,
278
+ overflowItems: r && h < t.length ? t.slice(h) : [],
279
+ containerRef: o,
280
+ parentRef: s,
281
+ overflowButtonRef: c,
282
+ contentRef: l,
283
+ brandRef: u,
284
+ hideProductName: _
285
+ };
281
286
  }
282
- function Ne(e) {
283
- return [...e].sort((n, r) => {
284
- const a = n.props?.priority ?? 1 / 0, s = r.props?.priority ?? 1 / 0;
285
- return a === s ? 0 : a - s;
286
- });
287
+ //#endregion
288
+ //#region src/product-bar/product-bar/ProductBar.tsx
289
+ function N(e) {
290
+ return [...e].sort((e, t) => {
291
+ let n = e.props?.priority ?? Infinity, r = t.props?.priority ?? Infinity;
292
+ return n === r ? 0 : n - r;
293
+ });
287
294
  }
288
- function Be(e, n) {
289
- if (n.length === 0)
290
- return { visible: e, overflow: n };
291
- const r = n.findIndex((_) => _.props?.active);
292
- if (r === -1)
293
- return { visible: e, overflow: n };
294
- const a = n[r], s = e[e.length - 1], o = [...e.slice(0, -1), a], l = [
295
- ...n.slice(0, r),
296
- s,
297
- ...n.slice(r + 1)
298
- ];
299
- return { visible: o, overflow: l };
295
+ function P(e, t) {
296
+ if (t.length === 0) return {
297
+ visible: e,
298
+ overflow: t
299
+ };
300
+ let n = t.findIndex((e) => e.props?.active);
301
+ if (n === -1) return {
302
+ visible: e,
303
+ overflow: t
304
+ };
305
+ let r = t[n], i = e[e.length - 1];
306
+ return {
307
+ visible: [...e.slice(0, -1), r],
308
+ overflow: [
309
+ ...t.slice(0, n),
310
+ i,
311
+ ...t.slice(n + 1)
312
+ ]
313
+ };
300
314
  }
301
- function je({
302
- fullWidth: e,
303
- enablePriorityPlus: n = !0,
304
- children: r,
305
- className: a,
306
- ...s
307
- }) {
308
- const o = t.useRef(null), [l, _, p] = re(r, [
309
- { type: Z },
310
- { type: Y }
311
- ]), m = t.useMemo(
312
- () => n ? Ne(_) : _,
313
- [n, _]
314
- ), {
315
- visibleItems: i,
316
- overflowItems: R,
317
- containerRef: I,
318
- parentRef: C,
319
- overflowButtonRef: M,
320
- contentRef: N,
321
- brandRef: A,
322
- hideProductName: B
323
- } = Ee(m, {
324
- enabled: n
325
- }), { visible: S, overflow: V } = t.useMemo(
326
- () => Be(
327
- i,
328
- R
329
- ),
330
- [i, R]
331
- ), h = t.useMemo(() => {
332
- if (!n || !l || l.length === 0)
333
- return l;
334
- const x = l[0];
335
- return t.isValidElement(x) ? [t.cloneElement(x, {
336
- hideNameText: B,
337
- ref: A
338
- })] : l;
339
- }, [n, l, B, A]);
340
- return /* @__PURE__ */ t.createElement("div", { className: k(ie, a), ...s, ref: o }, /* @__PURE__ */ t.createElement(
341
- "nav",
342
- {
343
- className: ue({ fullWidth: e }),
344
- ref: C
345
- },
346
- h,
347
- /* @__PURE__ */ t.createElement(
348
- "div",
349
- {
350
- className: be({ priorityPlus: n }),
351
- ref: I
352
- },
353
- S,
354
- V.length > 0 && /* @__PURE__ */ t.createElement(
355
- Ce,
356
- {
357
- items: V,
358
- wrapperRef: M
359
- }
360
- )
361
- ),
362
- /* @__PURE__ */ t.createElement(
363
- "div",
364
- {
365
- className: he,
366
- ref: N
367
- },
368
- /* @__PURE__ */ t.createElement(ne.Provider, { value: { parentElementRef: o, fixed: !0 } }, p)
369
- )
370
- ));
315
+ function F({ fullWidth: t, enablePriorityPlus: n = !0, children: o, className: s, ...c }) {
316
+ let l = e.useRef(null), [u, d, f] = a(o, [{ type: E }, { type: w }]), { visibleItems: p, overflowItems: m, containerRef: h, parentRef: g, overflowButtonRef: y, contentRef: x, brandRef: S, hideProductName: T } = M(e.useMemo(() => n ? N(d) : d, [n, d]), { enabled: n }), { visible: D, overflow: O } = e.useMemo(() => P(p, m), [p, m]), k = e.useMemo(() => {
317
+ if (!n || !u || u.length === 0) return u;
318
+ let t = u[0];
319
+ return e.isValidElement(t) ? [e.cloneElement(t, {
320
+ hideNameText: T,
321
+ ref: S
322
+ })] : u;
323
+ }, [
324
+ n,
325
+ u,
326
+ T,
327
+ S
328
+ ]);
329
+ return /* @__PURE__ */ e.createElement("div", {
330
+ className: i(_, s),
331
+ ...c,
332
+ ref: l
333
+ }, /* @__PURE__ */ e.createElement("nav", {
334
+ className: v({ fullWidth: t }),
335
+ ref: g
336
+ }, k, /* @__PURE__ */ e.createElement("div", {
337
+ className: C({ priorityPlus: n }),
338
+ ref: h
339
+ }, D, O.length > 0 && /* @__PURE__ */ e.createElement(j, {
340
+ items: O,
341
+ wrapperRef: y
342
+ })), /* @__PURE__ */ e.createElement("div", {
343
+ className: b,
344
+ ref: x
345
+ }, /* @__PURE__ */ e.createElement(r.Provider, { value: {
346
+ parentElementRef: l,
347
+ fixed: !0
348
+ } }, f))));
371
349
  }
372
- D.set(je, {
373
- name: "ProductBar",
374
- props: {
375
- fullWidth: { type: "boolean" },
376
- enablePriorityPlus: { type: "boolean", default: "true" }
377
- }
350
+ n.set(F, {
351
+ name: "ProductBar",
352
+ props: {
353
+ fullWidth: { type: "boolean" },
354
+ enablePriorityPlus: {
355
+ type: "boolean",
356
+ default: "true"
357
+ }
358
+ }
378
359
  });
379
- var Ie = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_pqijiy0", xe = "pkg_sps-woodland_core__family_product-bar__version_8_56_2__hash_pqijiy1";
380
- function Pe({
381
- channelId: e,
382
- className: n,
383
- ...r
384
- }) {
385
- const { t: a } = U();
386
- return /* @__PURE__ */ t.createElement(
387
- "a",
388
- {
389
- className: k(Ie, n),
390
- target: "_blank",
391
- rel: "noreferrer",
392
- href: `https://spscommerce.slack.com/archives/${e}`,
393
- ...r
394
- },
395
- /* @__PURE__ */ t.createElement(Q, { className: xe, icon: "conversation", "aria-hidden": "true" }),
396
- /* @__PURE__ */ t.createElement("span", null, a("slackLink.label", { defaultValue: "Chat" }))
397
- );
360
+ //#endregion
361
+ //#region src/product-bar/slack-link/SlackLink.css.ts
362
+ var I = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_pqijiy0", L = "pkg_sps-woodland_core__family_product-bar__version_8_56_3__hash_pqijiy1";
363
+ //#endregion
364
+ //#region src/product-bar/slack-link/SlackLink.tsx
365
+ function R({ channelId: n, className: r, ...a }) {
366
+ let { t: o } = d();
367
+ return /* @__PURE__ */ e.createElement("a", {
368
+ className: i(I, r),
369
+ target: "_blank",
370
+ rel: "noreferrer",
371
+ href: `https://spscommerce.slack.com/archives/${n}`,
372
+ ...a
373
+ }, /* @__PURE__ */ e.createElement(t, {
374
+ className: L,
375
+ icon: "conversation",
376
+ "aria-hidden": "true"
377
+ }), /* @__PURE__ */ e.createElement("span", null, o("slackLink.label", { defaultValue: "Chat" })));
398
378
  }
399
- D.set(Pe, {
400
- name: "Slack Link",
401
- props: {
402
- channelId: { type: "string", required: !0 }
403
- }
379
+ n.set(R, {
380
+ name: "Slack Link",
381
+ props: { channelId: {
382
+ type: "string",
383
+ required: !0
384
+ } }
404
385
  });
405
- export {
406
- je as ProductBar,
407
- Z as ProductBarName,
408
- Y as ProductBarTab,
409
- Pe as SlackLink
410
- };
386
+ //#endregion
387
+ export { F as ProductBar, E as ProductBarName, w as ProductBarTab, R as SlackLink };