@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.
- package/lib/action-bar/action-bar/ActionBar.js +44 -59
- package/lib/action-bar/action-bar/ActionBar.ve.js +4 -11
- package/lib/action-bar/action-bar-additional-content/ActionBarAdditionalContent.js +14 -22
- package/lib/action-bar/index.js +54 -74
- package/lib/action-bar/index.umd.cjs +1 -1
- package/lib/action-bar/style.css +2 -1
- package/lib/add-to-list/add-to-list/AddToList.js +220 -302
- package/lib/add-to-list/add-to-list/AddToList.ve.js +79 -24
- package/lib/add-to-list/add-to-list/ItemsList.js +42 -67
- package/lib/add-to-list/add-to-list/ListItem.js +24 -50
- package/lib/add-to-list/index.js +393 -453
- package/lib/add-to-list/index.umd.cjs +1 -1
- package/lib/add-to-list/style.css +2 -1
- package/lib/buttons/button/Button.js +95 -121
- package/lib/buttons/button/Button.ve.js +150 -9
- package/lib/buttons/index.js +281 -171
- package/lib/buttons/index.umd.cjs +1 -1
- package/lib/buttons/style.css +2 -1
- package/lib/cards/card/Card.js +19 -27
- package/lib/cards/card/Card.ve.js +4 -4
- package/lib/cards/card-footer/CardFooter.js +12 -13
- package/lib/cards/card-footer/CardFooter.ve.js +4 -4
- package/lib/cards/card-header/CardHeader.js +12 -13
- package/lib/cards/card-header/CardHeader.ve.js +4 -4
- package/lib/cards/card-title/CardTitle.js +11 -12
- package/lib/cards/card-title/CardTitle.ve.js +4 -4
- package/lib/cards/index.js +52 -52
- package/lib/cards/index.umd.cjs +1 -1
- package/lib/cards/style.css +2 -1
- package/lib/column-manager/column-manager/ColumnManager.js +95 -112
- package/lib/column-manager/column-manager/useColumnManager.js +59 -48
- package/lib/column-manager/index.js +2 -5
- package/lib/components/icon/Icon.ve.js +15 -5
- package/lib/components/icon/icons/sprite.svg.js +4 -4
- package/lib/content-row/content-row/ContentRow.js +146 -173
- package/lib/content-row/content-row/ContentRow.ve.js +105 -18
- package/lib/content-row/content-row-col/ContentRowCol.js +37 -48
- package/lib/content-row/content-row-col/ContentRowCol.ve.js +49 -6
- package/lib/content-row/content-row-expansion/ContentRowExpansion.js +16 -24
- package/lib/content-row/index.js +407 -318
- package/lib/content-row/index.umd.cjs +1 -1
- package/lib/content-row/row-list-auto-layout/RowListAutoLayout.js +24 -39
- package/lib/content-row/row-list-auto-layout/RowListAutoLayout.ve.js +13 -5
- package/lib/content-row/style.css +2 -1
- package/lib/content-tiles/content-tile/ContentTile.js +71 -60
- package/lib/content-tiles/content-tile/ContentTile.ve.js +36 -14
- package/lib/content-tiles/content-tile-list/ContentTileList.js +12 -13
- package/lib/content-tiles/content-tile-list/ContentTileList.ve.js +4 -5
- package/lib/content-tiles/index.js +156 -118
- package/lib/content-tiles/index.umd.cjs +1 -1
- package/lib/content-tiles/style.css +2 -1
- package/lib/core.css +2 -1
- package/lib/dropdowns/dropdown/Dropdown.js +56 -68
- package/lib/dropdowns/dropdown/Dropdown.ve.js +37 -8
- package/lib/dropdowns/index.js +171 -171
- package/lib/dropdowns/index.umd.cjs +1 -1
- package/lib/dropdowns/option-list/Option.js +14 -18
- package/lib/dropdowns/option-list/Option.ve.js +4 -5
- package/lib/dropdowns/option-list/OptionList.js +28 -44
- package/lib/dropdowns/option-list/OptionList.ve.js +4 -5
- package/lib/dropdowns/style.css +2 -1
- package/lib/editable-table/EditableTable.js +68 -85
- package/lib/editable-table/index.js +1 -4
- package/lib/feedback-block/FeedbackBlock.js +40 -35
- package/lib/feedback-block/FeedbackBlock.ve.js +56 -7
- package/lib/feedback-block/index.js +132 -85
- package/lib/feedback-block/index.umd.cjs +1 -1
- package/lib/feedback-block/style.css +2 -1
- package/lib/file-upload/file-upload/FileUpload.js +164 -202
- package/lib/file-upload/file-upload/FileUpload.ve.js +84 -18
- package/lib/file-upload/file-upload/mime-type.enum.js +106 -106
- package/lib/file-upload/index.js +390 -353
- package/lib/file-upload/index.umd.cjs +1 -1
- package/lib/file-upload/style.css +2 -1
- package/lib/filter-tiles/filter-tile/FilterTile.js +41 -46
- package/lib/filter-tiles/filter-tile/FilterTile.ve.js +51 -9
- package/lib/filter-tiles/filter-tile-set/FilterTileSet.js +12 -15
- package/lib/filter-tiles/filter-tile-set/FilterTileSet.ve.js +4 -4
- package/lib/filter-tiles/index.js +142 -107
- package/lib/filter-tiles/index.umd.cjs +1 -1
- package/lib/filter-tiles/style.css +2 -1
- package/lib/focused-task/focused-task/FocusedTask.js +52 -74
- package/lib/focused-task/focused-task/FocusedTask.ve.js +13 -12
- package/lib/focused-task/focused-task/useFocusedTask.js +20 -18
- package/lib/focused-task/focused-task-actions/FocusedTaskActions.js +12 -13
- package/lib/focused-task/index.js +127 -144
- package/lib/focused-task/index.umd.cjs +1 -1
- package/lib/focused-task/style.css +2 -1
- package/lib/growler/Growler.js +78 -90
- package/lib/growler/Growler.ve.js +23 -12
- package/lib/growler/GrowlerListProvider.js +38 -39
- package/lib/growler/Sonner.ve.js +17 -12
- package/lib/growler/index.js +249 -274
- package/lib/growler/index.umd.cjs +1 -1
- package/lib/growler/sonner.js +73 -102
- package/lib/growler/style.css +2 -1
- package/lib/index.js +520 -501
- package/lib/index.umd.cjs +4 -4
- package/lib/insight-card/InsightCard.js +90 -84
- package/lib/insight-card/InsightCard.ve.js +148 -15
- package/lib/insight-card/InsightCardSet.js +12 -12
- package/lib/insight-card/index.js +269 -141
- package/lib/insight-card/index.umd.cjs +1 -1
- package/lib/insight-card/style.css +2 -1
- package/lib/key-value-set/index.js +97 -87
- package/lib/key-value-set/index.umd.cjs +1 -1
- package/lib/key-value-set/key-value-set/KeyValueSet.js +17 -21
- package/lib/key-value-set/key-value-set/KeyValueSet.ve.js +10 -5
- package/lib/key-value-set/key-value-set-item/KeyValueSetItem.js +25 -21
- package/lib/key-value-set/key-value-set-item/KeyValueSetItem.ve.js +13 -6
- package/lib/key-value-set/style.css +2 -1
- package/lib/list-bar/advanced-search/AdvancedSearch.js +51 -54
- package/lib/list-bar/advanced-search/AdvancedSearch.ve.js +30 -8
- package/lib/list-bar/index.js +305 -301
- package/lib/list-bar/index.umd.cjs +1 -1
- package/lib/list-bar/list-bar/InputGroupWrapper.js +10 -19
- package/lib/list-bar/list-bar/ListBar.js +105 -121
- package/lib/list-bar/list-bar/ListBar.ve.js +13 -17
- package/lib/list-bar/list-bar/ListBarSearch.js +20 -21
- package/lib/list-bar/list-bar/ListBarSearchInfo.js +8 -12
- package/lib/list-bar/list-bar/ListBarSortBy.js +28 -38
- package/lib/list-bar/search-results-bar/SearchResultsBar.js +38 -28
- package/lib/list-bar/search-results-bar/SearchResultsBar.ve.js +4 -11
- package/lib/list-bar/style.css +2 -1
- package/lib/matrix/index.js +79 -87
- package/lib/matrix/index.umd.cjs +1 -1
- package/lib/matrix/matrix/Matrix.js +18 -26
- package/lib/matrix/matrix/Matrix.ve.js +4 -7
- package/lib/matrix/matrix-body/MatrixBody.js +10 -13
- package/lib/matrix/matrix-cell/MatrixCell.js +23 -18
- package/lib/matrix/matrix-head/MatrixHead.js +10 -13
- package/lib/matrix/matrix-header/MatrixHeader.js +20 -23
- package/lib/matrix/matrix-row/MatrixRow.js +10 -13
- package/lib/matrix/style.css +2 -1
- package/lib/modal/index.js +197 -187
- package/lib/modal/index.umd.cjs +1 -1
- package/lib/modal/modal/Modal.js +90 -108
- package/lib/modal/modal/Modal.ve.js +43 -13
- package/lib/modal/modal/useModal.js +19 -24
- package/lib/modal/modal-footer/ModalFooter.js +11 -12
- package/lib/modal/style.css +2 -1
- 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
- package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/index.browser.js +8 -10
- package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/url-alphabet/index.js +4 -4
- package/lib/page-title/heading-level/HeadingLevel.js +8 -12
- package/lib/page-title/index.js +33 -40
- package/lib/page-title/index.umd.cjs +1 -1
- package/lib/page-title/page-subtitle/PageSubtitle.js +13 -18
- package/lib/page-title/page-subtitle/PageSubtitle.ve.js +4 -5
- package/lib/page-title/page-title/PageTitle.js +15 -19
- package/lib/page-title/page-title/PageTitle.ve.js +4 -7
- package/lib/page-title/style.css +2 -1
- package/lib/photo/index.js +174 -177
- package/lib/photo/index.umd.cjs +1 -1
- package/lib/photo/photo/Photo.js +72 -81
- package/lib/photo/photo/Photo.ve.js +21 -7
- package/lib/photo/photo-carousel/PhotoCarousel.js +36 -51
- package/lib/photo/photo-carousel/PhotoCarousel.ve.js +13 -9
- package/lib/photo/style.css +2 -1
- package/lib/product-bar/hooks/usePriorityPlus.js +88 -104
- package/lib/product-bar/index.js +372 -395
- package/lib/product-bar/index.umd.cjs +1 -1
- package/lib/product-bar/product-bar/ProductBar.js +77 -103
- package/lib/product-bar/product-bar/ProductBar.ve.js +46 -15
- package/lib/product-bar/product-bar-name/ProductBarName.js +37 -40
- package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.js +48 -70
- package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.ve.js +4 -8
- package/lib/product-bar/product-bar-tab/ProductBarTab.js +28 -26
- package/lib/product-bar/slack-link/SlackLink.js +26 -30
- package/lib/product-bar/slack-link/SlackLink.ve.js +4 -5
- package/lib/product-bar/style.css +2 -1
- package/lib/product-bar-vertical/index.js +240 -251
- package/lib/product-bar-vertical/index.umd.cjs +1 -1
- package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.js +42 -61
- package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.ve.js +53 -23
- package/lib/product-bar-vertical/product-bar-vertical-header/ProductBarVerticalHeader.js +30 -42
- package/lib/product-bar-vertical/product-bar-vertical-item/ProductBarVerticalItem.js +71 -89
- package/lib/product-bar-vertical/product-bar-vertical-section/ProductBarVerticalSection.js +22 -29
- package/lib/product-bar-vertical/style.css +2 -1
- package/lib/progress-indicators/index.js +372 -255
- package/lib/progress-indicators/index.umd.cjs +1 -1
- package/lib/progress-indicators/progress-bar/ProgressBar.js +66 -110
- package/lib/progress-indicators/progress-bar/ProgressBar.ve.js +66 -13
- package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.js +34 -54
- package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.ve.js +136 -8
- package/lib/progress-indicators/progress-ring/ProgressRing.js +45 -52
- package/lib/progress-indicators/style.css +2 -1
- package/lib/rich-text-editor/index.js +556 -582
- package/lib/rich-text-editor/index.umd.cjs +11 -11
- package/lib/rich-text-editor/rich-text-editor/RTELinkModal.js +29 -33
- package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.js +23 -37
- package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.ve.js +13 -6
- package/lib/rich-text-editor/rich-text-editor/RichTextEditor.js +68 -77
- package/lib/rich-text-editor/rich-text-editor/RichTextEditor.ve.js +21 -8
- package/lib/rich-text-editor/rich-text-editor/hooks/useHtmlToMd.js +14 -20
- package/lib/rich-text-editor/rich-text-editor/hooks/useMdToHtml.js +14 -20
- package/lib/rich-text-editor/rich-text-editor/hooks/useRTEContent.js +33 -27
- package/lib/rich-text-editor/rich-text-editor/hooks/useRTEObserver.js +79 -88
- package/lib/rich-text-editor/rich-text-editor/hooks/useRTESelectionListener.js +28 -36
- package/lib/rich-text-editor/rich-text-editor/hooks/useRTEToolbarButtons.js +195 -211
- package/lib/rich-text-editor/rich-text-editor/icons/BOLD.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/INDENT.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/ITALICS.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/LINK.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/ORDERED_LIST.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/OUTDENT.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/REDO.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/UNDO.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/UNLINK.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/UNORDERED_LIST.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/utils/flattenListItemParagraphs.js +12 -12
- package/lib/rich-text-editor/rich-text-editor/utils/removeUnrepresentableBreaks.js +20 -19
- package/lib/rich-text-editor/rich-text-editor/utils/utils.js +11 -15
- package/lib/rich-text-editor/style.css +2 -1
- package/lib/scrollable-container/ScrollableContainer.js +18 -27
- package/lib/scrollable-container/ScrollableContainer.ve.js +4 -4
- package/lib/scrollable-container/index.js +20 -27
- package/lib/scrollable-container/index.umd.cjs +1 -1
- package/lib/scrollable-container/style.css +2 -1
- package/lib/side-nav/index.js +190 -228
- package/lib/side-nav/index.umd.cjs +1 -1
- package/lib/side-nav/side-nav/SideNav.js +43 -60
- package/lib/side-nav/side-nav/SideNav.ve.js +22 -16
- package/lib/side-nav/side-nav/navContext.js +7 -7
- package/lib/side-nav/side-nav-header/SideNavHeader.js +14 -15
- package/lib/side-nav/side-nav-item/SideNavItem.js +68 -94
- package/lib/side-nav/side-nav-section/SideNavSection.js +16 -26
- package/lib/side-nav/style.css +2 -1
- package/lib/sorting-header/caret/caret.ve.js +13 -5
- package/lib/sorting-header/index.js +269 -251
- package/lib/sorting-header/index.umd.cjs +1 -1
- package/lib/sorting-header/sorting-header/SortingHeader.js +110 -124
- package/lib/sorting-header/sorting-header/SortingHeader.ve.js +30 -6
- package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.js +69 -83
- package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.ve.js +21 -7
- package/lib/sorting-header/style.css +2 -1
- package/lib/style.css +2 -1
- package/lib/tabs/index.js +255 -201
- package/lib/tabs/index.umd.cjs +1 -1
- package/lib/tabs/style.css +2 -1
- package/lib/tabs/tab/Tab.js +24 -27
- package/lib/tabs/tab/Tab.ve.js +76 -6
- package/lib/tabs/tab-panel/TabPanel.js +16 -25
- package/lib/tabs/tabs/Tabs.js +101 -112
- package/lib/tabs/tabs/Tabs.ve.js +13 -11
- package/lib/tags/clickable-tag/ClickableTag.js +86 -90
- package/lib/tags/clickable-tag/ClickableTag.ve.js +66 -9
- package/lib/tags/index.js +342 -199
- package/lib/tags/index.umd.cjs +1 -1
- package/lib/tags/split-tag/SplitTag.js +49 -30
- package/lib/tags/split-tag/SplitTag.ve.js +35 -9
- package/lib/tags/style.css +2 -1
- package/lib/tags/tag/Tag.js +42 -38
- package/lib/tags/tag/Tag.ve.js +41 -6
- package/lib/utils/cl.js +5 -5
- package/lib/zero-state/ZeroState.js +36 -29
- package/lib/zero-state/ZeroState.ve.js +29 -11
- package/lib/zero-state/index.js +103 -78
- package/lib/zero-state/index.umd.cjs +1 -1
- package/lib/zero-state/style.css +2 -1
- package/package.json +12 -12
- 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
package/lib/product-bar/index.js
CHANGED
|
@@ -1,410 +1,387 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { useLink as
|
|
4
|
-
import {
|
|
5
|
-
import { useWoodlandLanguage as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
82
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
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
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}) {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
379
|
+
n.set(R, {
|
|
380
|
+
name: "Slack Link",
|
|
381
|
+
props: { channelId: {
|
|
382
|
+
type: "string",
|
|
383
|
+
required: !0
|
|
384
|
+
} }
|
|
404
385
|
});
|
|
405
|
-
|
|
406
|
-
|
|
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 };
|