@sps-woodland/core 8.53.12 → 8.53.13
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.ve.js +8 -8
- package/lib/action-bar/index.js +30 -30
- package/lib/action-bar/index.umd.cjs +1 -1
- package/lib/action-bar/style.css +1 -1
- package/lib/add-to-list/add-to-list/AddToList.ve.js +19 -19
- package/lib/add-to-list/index.js +183 -183
- package/lib/add-to-list/index.umd.cjs +1 -1
- package/lib/add-to-list/style.css +1 -1
- package/lib/buttons/button/Button.ve.js +4 -4
- package/lib/buttons/index.js +48 -48
- package/lib/buttons/index.umd.cjs +1 -1
- package/lib/buttons/style.css +1 -1
- package/lib/cards/card/Card.ve.js +1 -1
- package/lib/cards/card-footer/CardFooter.ve.js +2 -2
- package/lib/cards/card-header/CardHeader.ve.js +1 -1
- package/lib/cards/card-title/CardTitle.ve.js +2 -2
- package/lib/cards/index.js +21 -21
- package/lib/cards/index.umd.cjs +1 -1
- package/lib/cards/style.css +1 -1
- package/lib/content-row/content-row/ContentRow.ve.js +13 -13
- package/lib/content-row/content-row-col/ContentRowCol.ve.js +2 -2
- package/lib/content-row/index.js +152 -152
- package/lib/content-row/index.umd.cjs +1 -1
- package/lib/content-row/row-list-auto-layout/RowListAutoLayout.ve.js +2 -2
- package/lib/content-row/style.css +1 -1
- package/lib/content-tiles/content-tile/ContentTile.ve.js +7 -7
- package/lib/content-tiles/content-tile-list/ContentTileList.ve.js +3 -3
- package/lib/content-tiles/index.js +59 -59
- package/lib/content-tiles/index.umd.cjs +1 -1
- package/lib/content-tiles/style.css +1 -1
- package/lib/core.css +1 -1
- package/lib/dropdowns/dropdown/Dropdown.ve.js +3 -3
- package/lib/dropdowns/index.js +84 -84
- package/lib/dropdowns/index.umd.cjs +1 -1
- package/lib/dropdowns/option-list/Option.ve.js +1 -1
- package/lib/dropdowns/option-list/OptionList.ve.js +1 -1
- package/lib/dropdowns/style.css +1 -1
- package/lib/feedback-block/FeedbackBlock.ve.js +3 -3
- package/lib/feedback-block/index.js +54 -54
- package/lib/feedback-block/index.umd.cjs +1 -1
- package/lib/feedback-block/style.css +1 -1
- package/lib/file-upload/file-upload/FileUpload.ve.js +14 -14
- package/lib/file-upload/index.js +110 -110
- package/lib/file-upload/index.umd.cjs +1 -1
- package/lib/file-upload/style.css +1 -1
- package/lib/filter-tiles/filter-tile/FilterTile.ve.js +5 -5
- package/lib/filter-tiles/filter-tile-set/FilterTileSet.ve.js +2 -2
- package/lib/filter-tiles/index.js +55 -55
- package/lib/filter-tiles/index.umd.cjs +1 -1
- package/lib/filter-tiles/style.css +1 -1
- package/lib/focused-task/focused-task/FocusedTask.ve.js +9 -9
- package/lib/focused-task/index.js +49 -49
- package/lib/focused-task/index.umd.cjs +1 -1
- package/lib/focused-task/style.css +1 -1
- package/lib/growler/Growler.ve.js +7 -7
- package/lib/growler/Sonner.ve.js +7 -7
- package/lib/growler/index.js +80 -80
- package/lib/growler/index.umd.cjs +1 -1
- package/lib/growler/style.css +1 -1
- package/lib/index.js +104 -104
- package/lib/index.umd.cjs +2 -2
- package/lib/insight-card/InsightCard.ve.js +7 -7
- package/lib/insight-card/index.js +59 -59
- package/lib/insight-card/index.umd.cjs +1 -1
- package/lib/insight-card/style.css +1 -1
- package/lib/key-value-set/index.js +53 -53
- package/lib/key-value-set/index.umd.cjs +1 -1
- package/lib/key-value-set/key-value-set/KeyValueSet.ve.js +2 -2
- package/lib/key-value-set/key-value-set-item/KeyValueSetItem.ve.js +3 -3
- package/lib/key-value-set/style.css +1 -1
- package/lib/list-bar/advanced-search/AdvancedSearch.ve.js +5 -5
- package/lib/list-bar/index.js +88 -88
- package/lib/list-bar/index.umd.cjs +1 -1
- package/lib/list-bar/list-bar/ListBar.ve.js +12 -12
- package/lib/list-bar/search-results-bar/SearchResultsBar.ve.js +8 -8
- package/lib/list-bar/style.css +1 -1
- package/lib/matrix/index.js +29 -29
- package/lib/matrix/index.umd.cjs +1 -1
- package/lib/matrix/matrix/Matrix.ve.js +2 -2
- package/lib/matrix/style.css +1 -1
- package/lib/modal/index.js +86 -86
- package/lib/modal/index.umd.cjs +1 -1
- package/lib/modal/modal/Modal.ve.js +9 -9
- package/lib/modal/style.css +1 -1
- package/lib/page-title/index.js +17 -17
- package/lib/page-title/index.umd.cjs +1 -1
- package/lib/page-title/page-subtitle/PageSubtitle.ve.js +3 -3
- package/lib/page-title/page-title/PageTitle.ve.js +4 -4
- package/lib/page-title/style.css +1 -1
- package/lib/photo/index.js +67 -67
- package/lib/photo/index.umd.cjs +1 -1
- package/lib/photo/photo/Photo.ve.js +1 -1
- package/lib/photo/photo-carousel/PhotoCarousel.ve.js +1 -1
- package/lib/photo/style.css +1 -1
- package/lib/product-bar/index.js +62 -62
- package/lib/product-bar/index.umd.cjs +1 -1
- package/lib/product-bar/product-bar/ProductBar.ve.js +10 -10
- package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.ve.js +5 -5
- package/lib/product-bar/slack-link/SlackLink.ve.js +2 -2
- package/lib/product-bar/style.css +1 -1
- package/lib/product-bar-vertical/index.js +69 -69
- package/lib/product-bar-vertical/index.umd.cjs +1 -1
- package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.ve.js +20 -20
- package/lib/product-bar-vertical/style.css +1 -1
- package/lib/progress-indicators/index.js +79 -79
- package/lib/progress-indicators/index.umd.cjs +1 -1
- package/lib/progress-indicators/progress-bar/ProgressBar.ve.js +10 -10
- package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.ve.js +4 -4
- package/lib/progress-indicators/style.css +1 -1
- package/lib/rich-text-editor/index.js +85 -85
- package/lib/rich-text-editor/index.umd.cjs +2 -2
- package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.ve.js +2 -2
- package/lib/rich-text-editor/rich-text-editor/RichTextEditor.ve.js +5 -5
- package/lib/rich-text-editor/style.css +1 -1
- package/lib/scrollable-container/ScrollableContainer.ve.js +1 -1
- package/lib/scrollable-container/index.js +8 -8
- package/lib/scrollable-container/index.umd.cjs +1 -1
- package/lib/scrollable-container/style.css +1 -1
- package/lib/side-nav/index.js +78 -78
- package/lib/side-nav/index.umd.cjs +1 -1
- package/lib/side-nav/side-nav/SideNav.ve.js +12 -12
- package/lib/side-nav/style.css +1 -1
- package/lib/sorting-header/caret/caret.ve.js +2 -2
- package/lib/sorting-header/index.js +125 -125
- package/lib/sorting-header/index.umd.cjs +1 -1
- package/lib/sorting-header/sorting-header/SortingHeader.ve.js +3 -3
- package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.ve.js +2 -2
- package/lib/sorting-header/style.css +1 -1
- package/lib/style.css +1 -1
- package/lib/tabs/index.js +100 -100
- package/lib/tabs/index.umd.cjs +1 -1
- package/lib/tabs/style.css +1 -1
- package/lib/tabs/tab/Tab.ve.js +2 -2
- package/lib/tabs/tabs/Tabs.ve.js +5 -5
- package/lib/tags/clickable-tag/ClickableTag.ve.js +4 -4
- package/lib/tags/index.js +80 -80
- package/lib/tags/index.umd.cjs +1 -1
- package/lib/tags/split-tag/SplitTag.ve.js +2 -2
- package/lib/tags/style.css +1 -1
- package/lib/tags/tag/Tag.ve.js +3 -3
- package/lib/zero-state/ZeroState.ve.js +6 -6
- package/lib/zero-state/index.js +42 -42
- package/lib/zero-state/index.umd.cjs +1 -1
- package/lib/zero-state/style.css +1 -1
- package/package.json +10 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
var
|
|
2
|
+
var e = "pkg_sps-woodland_core__family_page-title__version_8_53_13__hash_6nwwl00", a = "pkg_sps-woodland_core__family_page-title__version_8_53_13__hash_6nwwl01", l = "pkg_sps-woodland_core__family_page-title__version_8_53_13__hash_6nwwl02";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
e as pageTitle,
|
|
5
|
+
l as pageTitleIcon,
|
|
6
|
+
a as pageTitleText
|
|
7
7
|
};
|
package/lib/page-title/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-
|
|
1
|
+
.pkg_sps-woodland_core__family_page-title__version_8_53_13__hash_6nwwl00{display:flex;flex-direction:row}.pkg_sps-woodland_core__family_page-title__version_8_53_13__hash_6nwwl01{color:#1f282c;display:flex;flex-direction:column;font-size:1.5rem;line-height:1.5rem}.pkg_sps-woodland_core__family_page-title__version_8_53_13__hash_6nwwl02{align-self:flex-start;font-size:1.125rem;line-height:1.5rem;margin-right:.25rem;margin-top:.1875rem}.pkg_sps-woodland_core__family_page-title__version_8_53_13__hash_14qi3ku0{color:#4b5356;font-size:1.125rem;line-height:1.125rem;margin-top:.25rem}.pkg_sps-woodland_core__family_page-title__version_8_53_13__hash_14qi3ku1{font-size:.75rem;line-height:1.125rem;margin-left:.25rem;margin-right:.25rem;margin-top:.25rem}
|
package/lib/photo/index.js
CHANGED
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
|
-
import { Metadata as V, cl as
|
|
2
|
+
import { Metadata as V, cl as d, Icon as j, selectChildren as W } from "@sps-woodland/core";
|
|
3
3
|
import { grid as h } from "@sps-woodland/tokens";
|
|
4
4
|
import { SpsButton as v } from "@spscommerce/ds-react";
|
|
5
5
|
import { SpsIcon as w, ButtonKind as g } from "@spscommerce/ds-shared";
|
|
6
|
-
function B(e, a,
|
|
6
|
+
function B(e, a, o) {
|
|
7
7
|
return a in e ? Object.defineProperty(e, a, {
|
|
8
|
-
value:
|
|
8
|
+
value: o,
|
|
9
9
|
enumerable: !0,
|
|
10
10
|
configurable: !0,
|
|
11
11
|
writable: !0
|
|
12
|
-
}) : e[a] =
|
|
12
|
+
}) : e[a] = o, e;
|
|
13
13
|
}
|
|
14
14
|
function b(e, a) {
|
|
15
|
-
var
|
|
15
|
+
var o = Object.keys(e);
|
|
16
16
|
if (Object.getOwnPropertySymbols) {
|
|
17
17
|
var t = Object.getOwnPropertySymbols(e);
|
|
18
|
-
a && (t = t.filter(function(
|
|
19
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
20
|
-
})),
|
|
18
|
+
a && (t = t.filter(function(n) {
|
|
19
|
+
return Object.getOwnPropertyDescriptor(e, n).enumerable;
|
|
20
|
+
})), o.push.apply(o, t);
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return o;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function y(e) {
|
|
25
25
|
for (var a = 1; a < arguments.length; a++) {
|
|
26
|
-
var
|
|
27
|
-
a % 2 ? b(Object(
|
|
28
|
-
B(e, t,
|
|
29
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
30
|
-
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(
|
|
26
|
+
var o = arguments[a] != null ? arguments[a] : {};
|
|
27
|
+
a % 2 ? b(Object(o), !0).forEach(function(t) {
|
|
28
|
+
B(e, t, o[t]);
|
|
29
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : b(Object(o)).forEach(function(t) {
|
|
30
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(o, t));
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
return e;
|
|
34
34
|
}
|
|
35
|
-
var F = (e, a,
|
|
35
|
+
var F = (e, a, o) => {
|
|
36
36
|
for (var t of Object.keys(e)) {
|
|
37
|
-
var
|
|
38
|
-
if (e[t] !== ((
|
|
37
|
+
var n;
|
|
38
|
+
if (e[t] !== ((n = a[t]) !== null && n !== void 0 ? n : o[t]))
|
|
39
39
|
return !1;
|
|
40
40
|
}
|
|
41
41
|
return !0;
|
|
42
42
|
}, m = (e) => (a) => {
|
|
43
|
-
var
|
|
44
|
-
for (var
|
|
45
|
-
var
|
|
43
|
+
var o = e.defaultClassName, t = y(y({}, e.defaultVariants), a);
|
|
44
|
+
for (var n in t) {
|
|
45
|
+
var i, c = (i = t[n]) !== null && i !== void 0 ? i : e.defaultVariants[n];
|
|
46
46
|
if (c != null) {
|
|
47
|
-
var
|
|
48
|
-
typeof
|
|
47
|
+
var _ = c;
|
|
48
|
+
typeof _ == "boolean" && (_ = _ === !0 ? "true" : "false");
|
|
49
49
|
var l = (
|
|
50
50
|
// @ts-expect-error
|
|
51
|
-
e.variantClassNames[
|
|
51
|
+
e.variantClassNames[n][_]
|
|
52
52
|
);
|
|
53
|
-
l && (
|
|
53
|
+
l && (o += " " + l);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
for (var [
|
|
57
|
-
F(
|
|
58
|
-
return
|
|
59
|
-
}, L = m({ defaultClassName: "pkg_sps-
|
|
60
|
-
function
|
|
56
|
+
for (var [s, u] of e.compoundVariants)
|
|
57
|
+
F(s, t, e.defaultVariants) && (o += " " + u);
|
|
58
|
+
return o;
|
|
59
|
+
}, L = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w0", variantClassNames: { placeholder: { true: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w1", false: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w2" } }, defaultVariants: { placeholder: !1 }, compoundVariants: [] }), A = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w3", variantClassNames: { mode: { fill: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w4", fit: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w5" } }, defaultVariants: { mode: "fill" }, compoundVariants: [] }), D = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w6";
|
|
60
|
+
function E({
|
|
61
61
|
className: e,
|
|
62
62
|
src: a,
|
|
63
|
-
altText:
|
|
63
|
+
altText: o,
|
|
64
64
|
mode: t = "fill",
|
|
65
|
-
placeholderIcon:
|
|
66
|
-
...
|
|
65
|
+
placeholderIcon: n = "photo",
|
|
66
|
+
...i
|
|
67
67
|
}) {
|
|
68
|
-
const c = r.useRef(null),
|
|
68
|
+
const c = r.useRef(null), _ = r.useRef(null), l = r.useRef(null), s = r.useRef(null), [u, O] = r.useState(), [N, P] = r.useState(!1);
|
|
69
69
|
r.useEffect(() => {
|
|
70
|
-
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
70
|
+
_.current && (l.current && (window.clearInterval(l.current), l.current = null), l.current = window.setInterval(() => {
|
|
71
|
+
if (_.current) {
|
|
72
|
+
const f = _.current.getBoundingClientRect();
|
|
73
|
+
if (f.height) {
|
|
74
74
|
l.current && (window.clearInterval(l.current), l.current = null);
|
|
75
|
-
const p =
|
|
76
|
-
|
|
75
|
+
const p = f.width / f.height > 1;
|
|
76
|
+
P(p === (t === "fit"));
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}, 1e3 / 60));
|
|
80
|
-
}, [c.current,
|
|
81
|
-
|
|
80
|
+
}, [c.current, _.current, a]), r.useEffect(() => {
|
|
81
|
+
s.current && (window.clearInterval(s.current), s.current = null), s.current = window.setInterval(() => {
|
|
82
82
|
if (c.current) {
|
|
83
|
-
const
|
|
84
|
-
|
|
83
|
+
const f = c.current.getBoundingClientRect();
|
|
84
|
+
f.width && (R(f.width), s.current && (window.clearInterval(s.current), s.current = null));
|
|
85
85
|
}
|
|
86
86
|
}, 1e3 / 60);
|
|
87
87
|
}, [c.current]);
|
|
88
|
-
function
|
|
89
|
-
if (
|
|
88
|
+
function R(f) {
|
|
89
|
+
if (f) {
|
|
90
90
|
const p = document?.body?.parentElement?.style?.fontSize || "16px", x = Number(p.substring(0, p.length - 2));
|
|
91
|
-
|
|
91
|
+
O(f / x);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function k() {
|
|
@@ -103,26 +103,26 @@ function O({
|
|
|
103
103
|
"div",
|
|
104
104
|
{
|
|
105
105
|
ref: c,
|
|
106
|
-
className:
|
|
106
|
+
className: d(L({ placeholder: !a }), e),
|
|
107
107
|
style: {
|
|
108
108
|
width: `${u}` && `${u}rem`,
|
|
109
109
|
fontSize: `${k()}rem`,
|
|
110
110
|
height: `${S()}rem`
|
|
111
111
|
},
|
|
112
|
-
...
|
|
112
|
+
...i
|
|
113
113
|
},
|
|
114
114
|
a ? u ? /* @__PURE__ */ r.createElement(
|
|
115
115
|
"img",
|
|
116
116
|
{
|
|
117
|
-
className: A({ mode:
|
|
118
|
-
ref:
|
|
117
|
+
className: A({ mode: N ? "fit" : "fill" }),
|
|
118
|
+
ref: _,
|
|
119
119
|
src: a,
|
|
120
|
-
alt:
|
|
120
|
+
alt: o
|
|
121
121
|
}
|
|
122
|
-
) : /* @__PURE__ */ r.createElement("span", null) : /* @__PURE__ */ r.createElement(j, { className: D, icon:
|
|
122
|
+
) : /* @__PURE__ */ r.createElement("span", null) : /* @__PURE__ */ r.createElement(j, { className: D, icon: n })
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
V.set(
|
|
125
|
+
V.set(E, {
|
|
126
126
|
name: "Photo",
|
|
127
127
|
props: {
|
|
128
128
|
src: "string",
|
|
@@ -134,36 +134,36 @@ V.set(O, {
|
|
|
134
134
|
placeholderIcon: "IconName"
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
var
|
|
137
|
+
var C = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba10", I = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba11", z = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba12", T = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba13", H = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba14", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba15", false: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba16" } }, defaultVariants: { selected: !1 }, compoundVariants: [] });
|
|
138
138
|
function J({
|
|
139
139
|
children: e,
|
|
140
140
|
className: a,
|
|
141
|
-
...
|
|
141
|
+
...o
|
|
142
142
|
}) {
|
|
143
|
-
const [t] = W(e, [{ type:
|
|
143
|
+
const [t] = W(e, [{ type: E }]), [n, i] = r.useState(0);
|
|
144
144
|
function c() {
|
|
145
|
-
|
|
145
|
+
n + 1 === t.length ? i(0) : i(n + 1);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
147
|
+
function _() {
|
|
148
|
+
i(n === 0 ? t.length - 1 : n - 1);
|
|
149
149
|
}
|
|
150
|
-
return /* @__PURE__ */ r.createElement("div", { className: h.root, ...
|
|
150
|
+
return /* @__PURE__ */ r.createElement("div", { className: h.root, ...o }, /* @__PURE__ */ r.createElement("div", { className: d(C) }, /* @__PURE__ */ r.createElement("div", { className: d(I) }, /* @__PURE__ */ r.createElement(
|
|
151
151
|
v,
|
|
152
152
|
{
|
|
153
153
|
tabIndex: 0,
|
|
154
154
|
kind: g.ICON,
|
|
155
155
|
icon: w.ARROW_LEFT_CIRCLE,
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: _
|
|
157
157
|
}
|
|
158
|
-
))), /* @__PURE__ */ r.createElement("div", { className: h[10] }, /* @__PURE__ */ r.createElement("div", { className:
|
|
158
|
+
))), /* @__PURE__ */ r.createElement("div", { className: h[10] }, /* @__PURE__ */ r.createElement("div", { className: d(T, h[12]) }, t[n]), /* @__PURE__ */ r.createElement("div", { className: d(z, h[12]) }, t.map((l, s) => /* @__PURE__ */ r.createElement(
|
|
159
159
|
"button",
|
|
160
160
|
{
|
|
161
161
|
tabIndex: 0,
|
|
162
|
-
className:
|
|
163
|
-
onClick: () =>
|
|
162
|
+
className: d(H({ selected: s === n })),
|
|
163
|
+
onClick: () => i(s)
|
|
164
164
|
},
|
|
165
165
|
l
|
|
166
|
-
)))), /* @__PURE__ */ r.createElement("div", { className:
|
|
166
|
+
)))), /* @__PURE__ */ r.createElement("div", { className: d(C) }, /* @__PURE__ */ r.createElement("div", { className: d(I) }, /* @__PURE__ */ r.createElement(
|
|
167
167
|
v,
|
|
168
168
|
{
|
|
169
169
|
tabIndex: 0,
|
|
@@ -174,6 +174,6 @@ function J({
|
|
|
174
174
|
))));
|
|
175
175
|
}
|
|
176
176
|
export {
|
|
177
|
-
|
|
177
|
+
E as Photo,
|
|
178
178
|
J as PhotoCarousel
|
|
179
179
|
};
|
package/lib/photo/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(s,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@sps-woodland/core"),require("@sps-woodland/tokens"),require("@spscommerce/ds-react"),require("@spscommerce/ds-shared")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core","@sps-woodland/tokens","@spscommerce/ds-react","@spscommerce/ds-shared"],m):(s=typeof globalThis<"u"?globalThis:s||self,m(s.Photo={},s.react,s.spsWoodlandCore,s.spsWoodlandTokens,s.spscommerceDsReact,s.spscommerceDsShared))})(this,(function(s,m,
|
|
1
|
+
(function(s,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@sps-woodland/core"),require("@sps-woodland/tokens"),require("@spscommerce/ds-react"),require("@spscommerce/ds-shared")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core","@sps-woodland/tokens","@spscommerce/ds-react","@spscommerce/ds-shared"],m):(s=typeof globalThis<"u"?globalThis:s||self,m(s.Photo={},s.react,s.spsWoodlandCore,s.spsWoodlandTokens,s.spscommerceDsReact,s.spscommerceDsShared))})(this,(function(s,m,c,h,y,v){"use strict";function E(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=E(m);function N(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?O(Object(t),!0).forEach(function(r){N(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var R=(e,n,t)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=n[r])!==null&&a!==void 0?a:t[r]))return!1}return!0},g=e=>n=>{var t=e.defaultClassName,r=C(C({},e.defaultVariants),n);for(var a in r){var u,d=(u=r[a])!==null&&u!==void 0?u:e.defaultVariants[a];if(d!=null){var l=d;typeof l=="boolean"&&(l=l===!0?"true":"false");var i=e.variantClassNames[a][l];i&&(t+=" "+i)}}for(var[_,f]of e.compoundVariants)R(_,r,e.defaultVariants)&&(t+=" "+f);return t},j=g({defaultClassName:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w0",variantClassNames:{placeholder:{true:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w1",false:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w2"}},defaultVariants:{placeholder:!1},compoundVariants:[]}),S=g({defaultClassName:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w3",variantClassNames:{mode:{fill:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w4",fit:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w5"}},defaultVariants:{mode:"fill"},compoundVariants:[]}),k="pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w6";function b({className:e,src:n,altText:t,mode:r="fill",placeholderIcon:a="photo",...u}){const d=o.useRef(null),l=o.useRef(null),i=o.useRef(null),_=o.useRef(null),[f,B]=o.useState(),[T,F]=o.useState(!1);o.useEffect(()=>{l.current&&(i.current&&(window.clearInterval(i.current),i.current=null),i.current=window.setInterval(()=>{if(l.current){const p=l.current.getBoundingClientRect();if(p.height){i.current&&(window.clearInterval(i.current),i.current=null);const w=p.width/p.height>1;F(w===(r==="fit"))}}},1e3/60))},[d.current,l.current,n]),o.useEffect(()=>{_.current&&(window.clearInterval(_.current),_.current=null),_.current=window.setInterval(()=>{if(d.current){const p=d.current.getBoundingClientRect();p.width&&(L(p.width),_.current&&(window.clearInterval(_.current),_.current=null))}},1e3/60)},[d.current]);function L(p){if(p){const w=document?.body?.parentElement?.style?.fontSize||"16px",A=Number(w.substring(0,w.length-2));B(p/A)}}function q(){if(typeof f<"u")return f*.05}function z(){if(typeof f<"u")return .75*f}return o.createElement("div",{ref:d,className:c.cl(j({placeholder:!n}),e),style:{width:`${f}`&&`${f}rem`,fontSize:`${q()}rem`,height:`${z()}rem`},...u},n?f?o.createElement("img",{className:S({mode:T?"fit":"fill"}),ref:l,src:n,alt:t}):o.createElement("span",null):o.createElement(c.Icon,{className:k,icon:a}))}c.Metadata.set(b,{name:"Photo",props:{src:"string",altText:"string",mode:{type:'"fill" | "fit"',default:'"fill"'},placeholderIcon:"IconName"}});var I="pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba10",P="pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba11",x="pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba12",V="pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba13",W=g({defaultClassName:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba14",variantClassNames:{selected:{true:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba15",false:"pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba16"}},defaultVariants:{selected:!1},compoundVariants:[]});function D({children:e,className:n,...t}){const[r]=c.selectChildren(e,[{type:b}]),[a,u]=o.useState(0);function d(){a+1===r.length?u(0):u(a+1)}function l(){u(a===0?r.length-1:a-1)}return o.createElement("div",{className:h.grid.root,...t},o.createElement("div",{className:c.cl(I)},o.createElement("div",{className:c.cl(P)},o.createElement(y.SpsButton,{tabIndex:0,kind:v.ButtonKind.ICON,icon:v.SpsIcon.ARROW_LEFT_CIRCLE,onClick:l}))),o.createElement("div",{className:h.grid[10]},o.createElement("div",{className:c.cl(V,h.grid[12])},r[a]),o.createElement("div",{className:c.cl(x,h.grid[12])},r.map((i,_)=>o.createElement("button",{tabIndex:0,className:c.cl(W({selected:_===a})),onClick:()=>u(_)},i)))),o.createElement("div",{className:c.cl(I)},o.createElement("div",{className:c.cl(P)},o.createElement(y.SpsButton,{tabIndex:0,kind:v.ButtonKind.ICON,icon:v.SpsIcon.ARROW_RIGHT_CIRCLE,onClick:d}))))}s.Photo=b,s.PhotoCarousel=D,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { createRuntimeFn as _ } from "../../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";
|
|
3
|
-
var s = _({ defaultClassName: "pkg_sps-
|
|
3
|
+
var s = _({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w0", variantClassNames: { placeholder: { true: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w1", false: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w2" } }, defaultVariants: { placeholder: !1 }, compoundVariants: [] }), r = _({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w3", variantClassNames: { mode: { fill: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w4", fit: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w5" } }, defaultVariants: { mode: "fill" }, compoundVariants: [] }), e = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w6";
|
|
4
4
|
export {
|
|
5
5
|
r as photo,
|
|
6
6
|
e as photoPlaceholder,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { createRuntimeFn as _ } from "../../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";
|
|
3
|
-
var s = "pkg_sps-
|
|
3
|
+
var s = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba10", e = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba11", r = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba12", p = "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba13", t = _({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba14", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba15", false: "pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba16" } }, defaultVariants: { selected: !1 }, compoundVariants: [] });
|
|
4
4
|
export {
|
|
5
5
|
e as photoCarouselButton,
|
|
6
6
|
s as photoCarouselButtonWrapper,
|
package/lib/photo/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-
|
|
1
|
+
.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w0{align-items:center;display:flex;justify-content:center;overflow:hidden;padding:0!important;vertical-align:middle}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w1{background:#f3f4f4;box-shadow:inset .0625rem 0 #d2d4d4,inset -.0625rem 0 #d2d4d4,inset 0 .0625rem #d2d4d4,inset 0 -.0625rem #d2d4d4,inset 1em 0 #fff,inset -1em 0 #fff,inset 0 1em #fff,inset 0 -1em #fff}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w3{visibility:hidden}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w4{height:100%;visibility:visible;width:auto}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w5{height:auto;visibility:visible;width:100%}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1orib4w6{font-size:6em;text-align:center;color:#717779}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba10{display:table;float:right}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba11{display:table-cell;vertical-align:middle}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba12{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba13{display:block;margin-bottom:.5rem;width:100%}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba14{display:block;background:transparent;border:0;cursor:pointer;padding:0}.pkg_sps-woodland_core__family_photo__version_8_53_13__hash_1744ba16{opacity:.4}
|
package/lib/product-bar/index.js
CHANGED
|
@@ -32,7 +32,7 @@ function J(e) {
|
|
|
32
32
|
}
|
|
33
33
|
return e;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var _e = (e, n, r) => {
|
|
36
36
|
for (var a of Object.keys(e)) {
|
|
37
37
|
var s;
|
|
38
38
|
if (e[a] !== ((s = n[a]) !== null && s !== void 0 ? s : r[a]))
|
|
@@ -53,10 +53,10 @@ var ie = (e, n, r) => {
|
|
|
53
53
|
p && (r += " " + p);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
for (var [
|
|
57
|
-
|
|
56
|
+
for (var [m, i] of e.compoundVariants)
|
|
57
|
+
_e(m, a, e.defaultVariants) && (r += " " + i);
|
|
58
58
|
return r;
|
|
59
|
-
},
|
|
59
|
+
}, ie = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux0", ue = q({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux1", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux2", false: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux3" } }, defaultVariants: { fullWidth: !1 }, compoundVariants: [] }), de = q({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux4", variantClassNames: { hideNameText: { true: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux5", false: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux6" } }, defaultVariants: { hideNameText: !1 }, compoundVariants: [] }), fe = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux7", pe = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux8", me = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjux9", he = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxa", X = q({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxb", variantClassNames: { active: { true: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxc", false: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxd" }, disabled: { true: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxe", false: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxf" } }, defaultVariants: { active: !1, disabled: !1 }, compoundVariants: [] }), ge = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxg", ve = q({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxh", variantClassNames: { priorityPlus: { true: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxi", false: "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_g6gjuxj" } }, defaultVariants: { priorityPlus: !1 }, compoundVariants: [] });
|
|
60
60
|
function Y(e) {
|
|
61
61
|
const n = t.useRef(null), { linkProps: r } = ae(e, n), { active: a, priority: s, ...o } = e, l = {
|
|
62
62
|
...o,
|
|
@@ -90,7 +90,7 @@ const Z = t.forwardRef(({
|
|
|
90
90
|
alt: `${r} Logo`,
|
|
91
91
|
title: r
|
|
92
92
|
}
|
|
93
|
-
), r && /* @__PURE__ */ t.createElement("span", { className: k(pe, s &&
|
|
93
|
+
), r && /* @__PURE__ */ t.createElement("span", { className: k(pe, s && me) }, r)), /* @__PURE__ */ t.createElement("span", { className: ge })));
|
|
94
94
|
H.set(Z, {
|
|
95
95
|
name: "ProductBarName",
|
|
96
96
|
props: {
|
|
@@ -99,7 +99,7 @@ H.set(Z, {
|
|
|
99
99
|
hideNameText: { type: "boolean", default: "false" }
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
var
|
|
102
|
+
var be = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_5klvkn0", ye = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_5klvkn1", we = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_5klvkn2", z = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_5klvkn3", G = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_5klvkn4";
|
|
103
103
|
function ke({
|
|
104
104
|
items: e,
|
|
105
105
|
wrapperRef: n
|
|
@@ -114,7 +114,7 @@ function ke({
|
|
|
114
114
|
/* @__PURE__ */ t.createElement("span", { ref: n }, /* @__PURE__ */ t.createElement(se, null, /* @__PURE__ */ t.createElement(
|
|
115
115
|
oe,
|
|
116
116
|
{
|
|
117
|
-
className: k(X({ active: a, disabled: !1 }),
|
|
117
|
+
className: k(X({ active: a, disabled: !1 }), be),
|
|
118
118
|
"aria-label": s
|
|
119
119
|
},
|
|
120
120
|
s,
|
|
@@ -122,32 +122,32 @@ function ke({
|
|
|
122
122
|
Q,
|
|
123
123
|
{
|
|
124
124
|
icon: "chevron-down",
|
|
125
|
-
className:
|
|
125
|
+
className: ye,
|
|
126
126
|
"aria-hidden": "true"
|
|
127
127
|
}
|
|
128
128
|
)
|
|
129
|
-
), /* @__PURE__ */ t.createElement(le, { className:
|
|
130
|
-
const c = o.props?.active, p = o.props?.children,
|
|
131
|
-
|
|
129
|
+
), /* @__PURE__ */ t.createElement(le, { className: we, gutter: 4 }, e.map((o, l) => {
|
|
130
|
+
const c = o.props?.active, p = o.props?.children, m = o.props?.onPress, i = o.props?.href, R = o.props?.as, I = () => {
|
|
131
|
+
m && m();
|
|
132
132
|
};
|
|
133
|
-
if (
|
|
133
|
+
if (i && R) {
|
|
134
134
|
const N = R;
|
|
135
135
|
return /* @__PURE__ */ t.createElement(
|
|
136
136
|
D,
|
|
137
137
|
{
|
|
138
138
|
key: l,
|
|
139
139
|
className: k(z, c && G),
|
|
140
|
-
render: /* @__PURE__ */ t.createElement(N, { to:
|
|
140
|
+
render: /* @__PURE__ */ t.createElement(N, { to: i })
|
|
141
141
|
},
|
|
142
142
|
p
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
-
return
|
|
145
|
+
return i ? /* @__PURE__ */ t.createElement(
|
|
146
146
|
D,
|
|
147
147
|
{
|
|
148
148
|
key: l,
|
|
149
149
|
className: k(z, c && G),
|
|
150
|
-
render: /* @__PURE__ */ t.createElement("a", { href:
|
|
150
|
+
render: /* @__PURE__ */ t.createElement("a", { href: i })
|
|
151
151
|
},
|
|
152
152
|
p
|
|
153
153
|
) : /* @__PURE__ */ t.createElement(
|
|
@@ -168,34 +168,34 @@ function Re(e, n = {}) {
|
|
|
168
168
|
minVisibleItems: a = 1,
|
|
169
169
|
debounceMs: s = 16
|
|
170
170
|
// ~1 frame for responsive resize handling
|
|
171
|
-
} = n, o = t.useRef(null), l = t.useRef(null), c = t.useRef(null), p = t.useRef(null),
|
|
171
|
+
} = n, o = t.useRef(null), l = t.useRef(null), c = t.useRef(null), p = t.useRef(null), m = t.useRef(null), i = t.useRef([]), R = t.useRef(0), I = t.useRef(0), N = t.useRef(!1), [M, E] = t.useState(e.length), [A, B] = t.useState(!1), S = t.useCallback(() => {
|
|
172
172
|
if (!o.current) return !1;
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
173
|
+
const _ = o.current, g = Array.from(_.children), u = c.current;
|
|
174
|
+
u && (R.current = u.getBoundingClientRect().width);
|
|
175
|
+
const b = g.filter((y) => y !== u);
|
|
176
|
+
if (b.length < e.length)
|
|
177
177
|
return !1;
|
|
178
|
-
if (
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
181
|
-
const d =
|
|
178
|
+
if (i.current = b.map((y) => y.getBoundingClientRect().width), m.current) {
|
|
179
|
+
const y = m.current.querySelector("span:last-of-type");
|
|
180
|
+
if (y) {
|
|
181
|
+
const d = y.getBoundingClientRect().width, C = getComputedStyle(m.current), P = parseFloat(C.marginRight) || 0, f = Math.max(0, P - 8);
|
|
182
182
|
I.current = d + f;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
return N.current = !0, !0;
|
|
186
186
|
}, [e.length]), V = t.useCallback(() => {
|
|
187
187
|
if (!l.current) return 0;
|
|
188
|
-
const
|
|
189
|
-
let d =
|
|
190
|
-
const C = Array.from(
|
|
191
|
-
P.length > 1 && (d +=
|
|
188
|
+
const _ = l.current, g = _.getBoundingClientRect(), u = getComputedStyle(_), b = parseFloat(u.paddingLeft) + parseFloat(u.paddingRight), y = parseFloat(u.gap) || 0;
|
|
189
|
+
let d = b;
|
|
190
|
+
const C = Array.from(_.children), P = C.filter((f) => getComputedStyle(f).display !== "none");
|
|
191
|
+
P.length > 1 && (d += y * (P.length - 1));
|
|
192
192
|
for (const f of C) {
|
|
193
193
|
if (f === o.current) continue;
|
|
194
194
|
const T = getComputedStyle(f), L = parseFloat(T.marginLeft) + parseFloat(T.marginRight);
|
|
195
195
|
if (f === p.current) {
|
|
196
196
|
const O = Array.from(f.children), F = getComputedStyle(f), j = parseFloat(F.gap) || 0;
|
|
197
197
|
for (const v of O) {
|
|
198
|
-
const
|
|
198
|
+
const w = getComputedStyle(v), te = parseFloat(w.marginLeft) + parseFloat(w.marginRight);
|
|
199
199
|
d += v.getBoundingClientRect().width + te;
|
|
200
200
|
}
|
|
201
201
|
O.length > 1 && (d += j * (O.length - 1)), d += parseFloat(F.paddingLeft) + parseFloat(F.paddingRight), d += L;
|
|
@@ -203,53 +203,53 @@ function Re(e, n = {}) {
|
|
|
203
203
|
d += f.getBoundingClientRect().width + L;
|
|
204
204
|
}
|
|
205
205
|
return Math.max(0, g.width - d - 2);
|
|
206
|
-
}, []),
|
|
206
|
+
}, []), h = t.useRef(!1), x = t.useCallback(() => {
|
|
207
207
|
if (!r || !N.current) {
|
|
208
|
-
B(!1),
|
|
208
|
+
B(!1), h.current = !1;
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
let
|
|
212
|
-
const g =
|
|
213
|
-
if (
|
|
214
|
-
E(e.length), B(!1),
|
|
211
|
+
let _ = V();
|
|
212
|
+
const g = i.current, u = R.current || 100, b = I.current || 0;
|
|
213
|
+
if (h.current && b > 0 && (_ -= b), g.length === 0 || _ <= 0) {
|
|
214
|
+
E(e.length), B(!1), h.current = !1;
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
217
|
-
if (g.reduce((v,
|
|
218
|
-
E(e.length), B(!1),
|
|
217
|
+
if (g.reduce((v, w) => v + w, 0) <= _) {
|
|
218
|
+
E(e.length), B(!1), h.current = !1;
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
221
|
let d = 0, C = 0;
|
|
222
|
-
const P =
|
|
222
|
+
const P = _ - u;
|
|
223
223
|
for (let v = 0; v < g.length; v++) {
|
|
224
|
-
const
|
|
225
|
-
if (d +
|
|
226
|
-
d +=
|
|
224
|
+
const w = g[v];
|
|
225
|
+
if (d + w <= P)
|
|
226
|
+
d += w, C++;
|
|
227
227
|
else
|
|
228
228
|
break;
|
|
229
229
|
}
|
|
230
|
-
const W = Math.min(a, e.length), f = Math.max(C, W), L = g.slice(0, W).reduce((v,
|
|
231
|
-
let j =
|
|
232
|
-
O && !
|
|
230
|
+
const W = Math.min(a, e.length), f = Math.max(C, W), L = g.slice(0, W).reduce((v, w) => v + w, 0) + u, O = C < W && L > _ && b > 0, F = !O && _ > L + b + 20;
|
|
231
|
+
let j = h.current;
|
|
232
|
+
O && !h.current ? j = !0 : F && h.current && (j = !1), j !== h.current && (h.current = j, B(j)), E(f);
|
|
233
233
|
}, [r, e.length, a, V]);
|
|
234
234
|
t.useEffect(() => {
|
|
235
235
|
if (!r) {
|
|
236
236
|
E(e.length);
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
|
-
N.current = !1,
|
|
239
|
+
N.current = !1, i.current = [], E(e.length);
|
|
240
240
|
}, [r, e.length]), t.useLayoutEffect(() => {
|
|
241
241
|
if (!r || !o.current) return;
|
|
242
242
|
S() && x();
|
|
243
243
|
}), t.useEffect(() => {
|
|
244
244
|
if (!r) return;
|
|
245
|
-
let
|
|
245
|
+
let _;
|
|
246
246
|
const g = () => {
|
|
247
|
-
clearTimeout(
|
|
247
|
+
clearTimeout(_), _ = setTimeout(() => {
|
|
248
248
|
N.current || S(), x();
|
|
249
249
|
}, s);
|
|
250
|
-
},
|
|
251
|
-
return l.current &&
|
|
252
|
-
clearTimeout(
|
|
250
|
+
}, u = new ResizeObserver(g);
|
|
251
|
+
return l.current && u.observe(l.current), () => {
|
|
252
|
+
clearTimeout(_), u.disconnect();
|
|
253
253
|
};
|
|
254
254
|
}, [r, S, x, s]);
|
|
255
255
|
const $ = r ? e.slice(0, M) : e, ee = r && M < e.length ? e.slice(M) : [];
|
|
@@ -260,7 +260,7 @@ function Re(e, n = {}) {
|
|
|
260
260
|
parentRef: l,
|
|
261
261
|
overflowButtonRef: c,
|
|
262
262
|
contentRef: p,
|
|
263
|
-
brandRef:
|
|
263
|
+
brandRef: m,
|
|
264
264
|
hideProductName: A
|
|
265
265
|
};
|
|
266
266
|
}
|
|
@@ -293,11 +293,11 @@ function Ee({
|
|
|
293
293
|
const o = t.useRef(null), [l, c, p] = re(r, [
|
|
294
294
|
{ type: Z },
|
|
295
295
|
{ type: Y }
|
|
296
|
-
]),
|
|
296
|
+
]), m = t.useMemo(
|
|
297
297
|
() => n ? Ne(c) : c,
|
|
298
298
|
[n, c]
|
|
299
299
|
), {
|
|
300
|
-
visibleItems:
|
|
300
|
+
visibleItems: i,
|
|
301
301
|
overflowItems: R,
|
|
302
302
|
containerRef: I,
|
|
303
303
|
parentRef: N,
|
|
@@ -305,15 +305,15 @@ function Ee({
|
|
|
305
305
|
contentRef: E,
|
|
306
306
|
brandRef: A,
|
|
307
307
|
hideProductName: B
|
|
308
|
-
} = Re(
|
|
308
|
+
} = Re(m, {
|
|
309
309
|
enabled: n
|
|
310
310
|
}), { visible: S, overflow: V } = t.useMemo(
|
|
311
311
|
() => Ce(
|
|
312
|
-
|
|
312
|
+
i,
|
|
313
313
|
R
|
|
314
314
|
),
|
|
315
|
-
[
|
|
316
|
-
),
|
|
315
|
+
[i, R]
|
|
316
|
+
), h = t.useMemo(() => {
|
|
317
317
|
if (!n || !l || l.length === 0)
|
|
318
318
|
return l;
|
|
319
319
|
const x = l[0];
|
|
@@ -322,13 +322,13 @@ function Ee({
|
|
|
322
322
|
ref: A
|
|
323
323
|
})] : l;
|
|
324
324
|
}, [n, l, B, A]);
|
|
325
|
-
return /* @__PURE__ */ t.createElement("div", { className: k(
|
|
325
|
+
return /* @__PURE__ */ t.createElement("div", { className: k(ie, a), ...s, ref: o }, /* @__PURE__ */ t.createElement(
|
|
326
326
|
"nav",
|
|
327
327
|
{
|
|
328
|
-
className:
|
|
328
|
+
className: ue({ fullWidth: e }),
|
|
329
329
|
ref: N
|
|
330
330
|
},
|
|
331
|
-
|
|
331
|
+
h,
|
|
332
332
|
/* @__PURE__ */ t.createElement(
|
|
333
333
|
"div",
|
|
334
334
|
{
|
|
@@ -347,7 +347,7 @@ function Ee({
|
|
|
347
347
|
/* @__PURE__ */ t.createElement(
|
|
348
348
|
"div",
|
|
349
349
|
{
|
|
350
|
-
className:
|
|
350
|
+
className: he,
|
|
351
351
|
ref: E
|
|
352
352
|
},
|
|
353
353
|
/* @__PURE__ */ t.createElement(ne.Provider, { value: { parentElementRef: o, fixed: !0 } }, p)
|
|
@@ -361,7 +361,7 @@ H.set(Ee, {
|
|
|
361
361
|
enablePriorityPlus: { type: "boolean", default: "true" }
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
|
-
var Be = "pkg_sps-
|
|
364
|
+
var Be = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_pqijiy0", je = "pkg_sps-woodland_core__family_product-bar__version_8_53_13__hash_pqijiy1";
|
|
365
365
|
function Ie({
|
|
366
366
|
channelId: e,
|
|
367
367
|
className: n,
|