@sps-woodland/core 8.55.2 → 8.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/action-bar/action-bar/ActionBar.ve.js +1 -1
- package/lib/action-bar/index.js +1 -1
- 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 +1 -1
- package/lib/add-to-list/index.js +1 -1
- 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 +1 -1
- package/lib/buttons/index.js +1 -1
- 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 +1 -1
- package/lib/cards/card-header/CardHeader.ve.js +1 -1
- package/lib/cards/card-title/CardTitle.ve.js +1 -1
- package/lib/cards/index.js +4 -4
- package/lib/cards/index.umd.cjs +1 -1
- package/lib/cards/style.css +1 -1
- package/lib/components/icon/Icon.ve.js +1 -1
- package/lib/content-row/content-row/ContentRow.ve.js +1 -1
- package/lib/content-row/content-row-col/ContentRowCol.ve.js +1 -1
- package/lib/content-row/index.js +3 -3
- package/lib/content-row/index.umd.cjs +1 -1
- package/lib/content-row/row-list-auto-layout/RowListAutoLayout.ve.js +1 -1
- package/lib/content-row/style.css +1 -1
- package/lib/content-tiles/content-tile/ContentTile.ve.js +1 -1
- package/lib/content-tiles/content-tile-list/ContentTileList.ve.js +1 -1
- package/lib/content-tiles/index.js +2 -2
- 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 +1 -1
- package/lib/dropdowns/index.js +3 -3
- 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 +1 -1
- package/lib/feedback-block/index.js +1 -1
- 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 +1 -1
- package/lib/file-upload/index.js +1 -1
- 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 +1 -1
- package/lib/filter-tiles/filter-tile-set/FilterTileSet.ve.js +1 -1
- package/lib/filter-tiles/index.js +2 -2
- 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 +1 -1
- package/lib/focused-task/index.js +1 -1
- package/lib/focused-task/index.umd.cjs +1 -1
- package/lib/focused-task/style.css +1 -1
- package/lib/growler/Growler.ve.js +1 -1
- package/lib/growler/Sonner.ve.js +1 -1
- package/lib/growler/index.js +2 -2
- package/lib/growler/index.umd.cjs +1 -1
- package/lib/growler/style.css +1 -1
- package/lib/index.js +8 -8
- package/lib/index.umd.cjs +1 -1
- package/lib/insight-card/InsightCard.ve.js +1 -1
- package/lib/insight-card/index.js +1 -1
- package/lib/insight-card/index.umd.cjs +1 -1
- package/lib/insight-card/style.css +1 -1
- package/lib/key-value-set/index.js +2 -2
- package/lib/key-value-set/index.umd.cjs +1 -1
- package/lib/key-value-set/key-value-set/KeyValueSet.ve.js +1 -1
- package/lib/key-value-set/key-value-set-item/KeyValueSetItem.ve.js +1 -1
- package/lib/key-value-set/style.css +1 -1
- package/lib/list-bar/advanced-search/AdvancedSearch.ve.js +1 -1
- package/lib/list-bar/index.js +3 -3
- package/lib/list-bar/index.umd.cjs +1 -1
- package/lib/list-bar/list-bar/ListBar.ve.js +1 -1
- package/lib/list-bar/search-results-bar/SearchResultsBar.ve.js +1 -1
- package/lib/list-bar/style.css +1 -1
- package/lib/matrix/index.js +1 -1
- package/lib/matrix/index.umd.cjs +1 -1
- package/lib/matrix/matrix/Matrix.ve.js +1 -1
- package/lib/matrix/style.css +1 -1
- package/lib/modal/index.js +1 -1
- package/lib/modal/index.umd.cjs +1 -1
- package/lib/modal/modal/Modal.ve.js +1 -1
- package/lib/modal/style.css +1 -1
- package/lib/page-title/heading-level/HeadingLevel.d.ts +9 -0
- package/lib/page-title/heading-level/HeadingLevel.d.ts.map +1 -0
- package/lib/page-title/heading-level/HeadingLevel.js +15 -0
- package/lib/page-title/index.d.ts +1 -0
- package/lib/page-title/index.d.ts.map +1 -1
- package/lib/page-title/index.js +35 -22
- package/lib/page-title/index.umd.cjs +1 -1
- package/lib/page-title/page-subtitle/PageSubtitle.js +6 -6
- package/lib/page-title/page-subtitle/PageSubtitle.ve.js +1 -1
- package/lib/page-title/page-title/PageTitle.css.d.ts +1 -0
- package/lib/page-title/page-title/PageTitle.css.d.ts.map +1 -1
- package/lib/page-title/page-title/PageTitle.d.ts +9 -1
- package/lib/page-title/page-title/PageTitle.d.ts.map +1 -1
- package/lib/page-title/page-title/PageTitle.js +13 -10
- package/lib/page-title/page-title/PageTitle.ve.js +2 -1
- package/lib/page-title/style.css +1 -1
- package/lib/photo/index.js +2 -2
- 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 +3 -3
- package/lib/product-bar/index.umd.cjs +1 -1
- package/lib/product-bar/product-bar/ProductBar.ve.js +1 -1
- package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.ve.js +1 -1
- package/lib/product-bar/slack-link/SlackLink.ve.js +1 -1
- package/lib/product-bar/style.css +1 -1
- package/lib/product-bar-vertical/index.js +1 -1
- package/lib/product-bar-vertical/index.umd.cjs +1 -1
- package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.ve.js +1 -1
- package/lib/product-bar-vertical/style.css +1 -1
- package/lib/progress-indicators/index.js +1 -1
- package/lib/progress-indicators/index.umd.cjs +1 -1
- package/lib/progress-indicators/progress-bar/ProgressBar.ve.js +1 -1
- package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.ve.js +1 -1
- package/lib/progress-indicators/style.css +1 -1
- package/lib/rich-text-editor/index.js +2 -2
- package/lib/rich-text-editor/index.umd.cjs +1 -1
- package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.ve.js +1 -1
- package/lib/rich-text-editor/rich-text-editor/RichTextEditor.ve.js +1 -1
- package/lib/rich-text-editor/style.css +1 -1
- package/lib/scrollable-container/ScrollableContainer.ve.js +1 -1
- package/lib/scrollable-container/index.js +1 -1
- package/lib/scrollable-container/index.umd.cjs +1 -1
- package/lib/scrollable-container/style.css +1 -1
- package/lib/side-nav/index.js +1 -1
- package/lib/side-nav/index.umd.cjs +1 -1
- package/lib/side-nav/side-nav/SideNav.ve.js +1 -1
- package/lib/side-nav/style.css +1 -1
- package/lib/sorting-header/caret/caret.ve.js +1 -1
- package/lib/sorting-header/index.js +2 -2
- package/lib/sorting-header/index.umd.cjs +1 -1
- package/lib/sorting-header/sorting-header/SortingHeader.ve.js +1 -1
- package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.ve.js +1 -1
- package/lib/sorting-header/style.css +1 -1
- package/lib/style.css +1 -1
- package/lib/tabs/index.js +2 -2
- package/lib/tabs/index.umd.cjs +1 -1
- package/lib/tabs/style.css +1 -1
- package/lib/tabs/tab/Tab.ve.js +1 -1
- package/lib/tabs/tabs/Tabs.ve.js +1 -1
- package/lib/tags/clickable-tag/ClickableTag.ve.js +1 -1
- package/lib/tags/index.js +3 -3
- package/lib/tags/index.umd.cjs +1 -1
- package/lib/tags/split-tag/SplitTag.ve.js +1 -1
- package/lib/tags/style.css +1 -1
- package/lib/tags/tag/Tag.ve.js +1 -1
- package/lib/zero-state/ZeroState.ve.js +1 -1
- package/lib/zero-state/index.js +1 -1
- package/lib/zero-state/index.umd.cjs +1 -1
- package/lib/zero-state/style.css +1 -1
- package/package.json +10 -10
package/lib/modal/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-
|
|
1
|
+
.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem0{background-color:#fff;border-style:solid;border-width:.0625rem;border-radius:.25rem;display:flex;flex-direction:column;overflow:hidden;max-height:100%}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem1{border-color:#007db8}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem2,.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem3{border-color:#de002e}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem4{border-color:#0b8940}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem5,.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem6{border-color:#e7760b}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem7{border-color:#4b5356}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem8{width:23.75rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksem9{width:36.25rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksema{width:48.75rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemb{width:73.75rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemc{height:100%}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41kseme{align-items:center;color:#fff;display:flex;padding:1rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemf{background-color:#4b5356}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemg,.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemh{background-color:#de002e}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemi{background-color:#007db8}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemj{background-color:#0b8940}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemk,.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41kseml{background-color:#e7760b}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemm{flex-grow:1;font-size:.875rem;font-weight:600;line-height:1.25rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemn{font-weight:600;line-height:.875rem;font-size:.875rem;margin-right:.5rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemo{overflow-y:auto;padding:1rem;flex:1}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemp{align-items:center;background-color:#f3f4f4;display:flex;justify-content:flex-end;padding:.5rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemq{color:#fff;border-width:0}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksemr{padding:0 .25rem}.pkg_sps-woodland_core__family_modal__version_8_56_0__hash_41ksems{position:fixed;z-index:1000;inset:0;background:#f3f4f4cc;display:flex;align-items:start;justify-content:center;padding:4rem 1rem 1rem}.z-stratum-dropdown{z-index:1100}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
+
export declare function HeadingLevelProvider({ level, children, }: React.PropsWithChildren<{
|
|
4
|
+
/** The heading level that a `PageTitle` without an `as` prop renders inside this provider. */
|
|
5
|
+
level: HeadingLevel;
|
|
6
|
+
}>): React.ReactElement;
|
|
7
|
+
/** Returns the level from the nearest `HeadingLevelProvider`, or `undefined` if there is none. */
|
|
8
|
+
export declare function useHeadingLevel(): HeadingLevel | undefined;
|
|
9
|
+
//# sourceMappingURL=HeadingLevel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadingLevel.d.ts","sourceRoot":"","sources":["../../../src/page-title/heading-level/HeadingLevel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAIjD,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,GACT,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACzB,8FAA8F;IAC9F,KAAK,EAAE,YAAY,CAAC;CACrB,CAAC,GAAG,KAAK,CAAC,YAAY,CAEtB;AAED,kGAAkG;AAClG,wBAAgB,eAAe,IAAI,YAAY,GAAG,SAAS,CAE1D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const t = e.createContext(void 0);
|
|
3
|
+
function o({
|
|
4
|
+
level: n,
|
|
5
|
+
children: r
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ e.createElement(t.Provider, { value: n }, r);
|
|
8
|
+
}
|
|
9
|
+
function i() {
|
|
10
|
+
return e.useContext(t);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
o as HeadingLevelProvider,
|
|
14
|
+
i as useHeadingLevel
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/page-title/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/page-title/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC"}
|
package/lib/page-title/index.js
CHANGED
|
@@ -1,32 +1,45 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Metadata as
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
children:
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { Metadata as d, modChildren as h, Icon as c, cl as o, selectChildren as u, addClassName as w } from "@sps-woodland/core";
|
|
3
|
+
var f = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku0", y = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku1";
|
|
4
|
+
function p({
|
|
5
|
+
children: _,
|
|
6
6
|
className: t,
|
|
7
|
-
...
|
|
7
|
+
...n
|
|
8
8
|
}) {
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const l = h(_, (a) => a.type === c ? [{
|
|
10
|
+
className: o(a.props.className, y)
|
|
11
|
+
}] : []);
|
|
12
|
+
return /* @__PURE__ */ e.createElement("div", { className: o(f, t), ...n }, e.Children.toArray(l));
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
name: "Page
|
|
14
|
+
d.set(p, {
|
|
15
|
+
name: "Page Subtitle"
|
|
14
16
|
});
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const m = e.createContext(void 0);
|
|
18
|
+
function E({
|
|
19
|
+
level: _,
|
|
20
|
+
children: t
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ e.createElement(m.Provider, { value: _ }, t);
|
|
23
|
+
}
|
|
24
|
+
function C() {
|
|
25
|
+
return e.useContext(m);
|
|
26
|
+
}
|
|
27
|
+
var k = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl00", N = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl01", T = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl02", x = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl03";
|
|
28
|
+
function P({
|
|
29
|
+
as: _,
|
|
30
|
+
children: t,
|
|
31
|
+
className: n,
|
|
19
32
|
...l
|
|
20
33
|
}) {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
}] : []);
|
|
24
|
-
return /* @__PURE__ */ o.createElement("div", { className: s(w, t), ...l }, e);
|
|
34
|
+
const [[a], g, i] = u(t, [{ type: c }, { type: p }]), s = C(), r = _ ?? (s ? `h${s}` : "h1"), v = a ? w(a, T) : "";
|
|
35
|
+
return /* @__PURE__ */ e.createElement("div", { className: o(k, n), ...l }, v, /* @__PURE__ */ e.createElement("div", { className: N }, r === "div" ? i : e.createElement(r, { className: x }, i), g));
|
|
25
36
|
}
|
|
26
|
-
|
|
27
|
-
name: "Page
|
|
37
|
+
d.set(P, {
|
|
38
|
+
name: "Page Title"
|
|
28
39
|
});
|
|
29
40
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
41
|
+
E as HeadingLevelProvider,
|
|
42
|
+
p as PageSubtitle,
|
|
43
|
+
P as PageTitle,
|
|
44
|
+
C as useHeadingLevel
|
|
32
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react"),require("@sps-woodland/core")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e.PageTitle={},e.react,e.spsWoodlandCore))})(this,(function(e,o,a){"use strict";function m(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const _ in t)if(_!=="default"){const l=Object.getOwnPropertyDescriptor(t,_);Object.defineProperty(n,_,l.get?l:{enumerable:!0,get:()=>t[_]})}}return n.default=t,Object.freeze(n)}const i=m(o);var v="pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku0",h="pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku1";function r({children:t,className:n,..._}){const l=a.modChildren(t,s=>s.type===a.Icon?[{className:a.cl(s.props.className,h)}]:[]);return i.createElement("div",{className:a.cl(v,n),..._},i.Children.toArray(l))}a.Metadata.set(r,{name:"Page Subtitle"});const d=i.createContext(void 0);function w({level:t,children:n}){return i.createElement(d.Provider,{value:t},n)}function c(){return i.useContext(d)}var y="pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl00",b="pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl01",P="pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl02",T="pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl03";function p({as:t,children:n,className:_,...l}){const[[s],C,u]=a.selectChildren(n,[{type:a.Icon},{type:r}]),g=c(),f=t??(g?`h${g}`:"h1"),k=s?a.addClassName(s,P):"";return i.createElement("div",{className:a.cl(y,_),...l},k,i.createElement("div",{className:b},f==="div"?u:i.createElement(f,{className:T},u),C))}a.Metadata.set(p,{name:"Page Title"}),e.HeadingLevelProvider=w,e.PageSubtitle=r,e.PageTitle=p,e.useHeadingLevel=c,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Metadata as l, modChildren as n, Icon as s, cl as
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import { Metadata as l, modChildren as n, Icon as s, cl as a } from "@sps-woodland/core";
|
|
3
3
|
import { pageSubtitleIcon as c, pageSubtitle as p } from "./PageSubtitle.ve.js";
|
|
4
4
|
function d({
|
|
5
|
-
children:
|
|
5
|
+
children: r,
|
|
6
6
|
className: o,
|
|
7
7
|
...m
|
|
8
8
|
}) {
|
|
9
|
-
const
|
|
10
|
-
className:
|
|
9
|
+
const i = n(r, (e) => e.type === s ? [{
|
|
10
|
+
className: a(e.props.className, c)
|
|
11
11
|
}] : []);
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ t.createElement("div", { className: a(p, o), ...m }, t.Children.toArray(i));
|
|
13
13
|
}
|
|
14
14
|
l.set(d, {
|
|
15
15
|
name: "Page Subtitle"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
var e = "pkg_sps-woodland_core__family_page-
|
|
2
|
+
var e = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku0", a = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku1";
|
|
3
3
|
export {
|
|
4
4
|
e as pageSubtitle,
|
|
5
5
|
a as pageSubtitleIcon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTitle.css.d.ts","sourceRoot":"","sources":["../../../src/page-title/page-title/PageTitle.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,QAGpB,CAAC;AAEH,eAAO,MAAM,aAAa,QAMxB,CAAC;AAEH,eAAO,MAAM,aAAa,QAMxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"PageTitle.css.d.ts","sourceRoot":"","sources":["../../../src/page-title/page-title/PageTitle.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,QAGpB,CAAC;AAEH,eAAO,MAAM,aAAa,QAMxB,CAAC;AAEH,eAAO,MAAM,aAAa,QAMxB,CAAC;AAEH,eAAO,MAAM,gBAAgB,QAM3B,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ComponentProps } from "@sps-woodland/core";
|
|
3
|
-
export
|
|
3
|
+
export type PageTitleElement = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
|
|
4
|
+
export declare function PageTitle({ as, children, className, ...rest }: ComponentProps<{
|
|
5
|
+
/**
|
|
6
|
+
* The element that wraps the title text. Use a heading that matches the position of the title
|
|
7
|
+
* in the page outline. Use "div" for a title that is not a heading. Without this prop, the
|
|
8
|
+
* title uses the level from the nearest HeadingLevelProvider, or "h1" if there is none.
|
|
9
|
+
*/
|
|
10
|
+
as?: PageTitleElement;
|
|
11
|
+
}, HTMLDivElement>): React.ReactElement;
|
|
4
12
|
//# sourceMappingURL=PageTitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTitle.d.ts","sourceRoot":"","sources":["../../../src/page-title/page-title/PageTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAY,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"PageTitle.d.ts","sourceRoot":"","sources":["../../../src/page-title/page-title/PageTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAY,MAAM,oBAAoB,CAAC;AAWnE,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAE/E,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,cAAc,CAAC;IAChB;;;;OAIG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAC;CACvB,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,YAAY,CAyBtC"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Metadata as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { Metadata as d, selectChildren as p, Icon as g, addClassName as T, cl as f } from "@sps-woodland/core";
|
|
3
|
+
import { PageSubtitle as h } from "../page-subtitle/PageSubtitle.js";
|
|
4
|
+
import { useHeadingLevel as u } from "../heading-level/HeadingLevel.js";
|
|
5
|
+
import { pageTitleIcon as v, pageTitle as N, pageTitleText as x, pageTitleHeading as C } from "./PageTitle.ve.js";
|
|
6
|
+
function E({
|
|
7
|
+
as: l,
|
|
8
|
+
children: n,
|
|
9
|
+
className: m,
|
|
7
10
|
...c
|
|
8
11
|
}) {
|
|
9
|
-
const [[
|
|
10
|
-
return /* @__PURE__ */
|
|
12
|
+
const [[t], r, a] = p(n, [{ type: g }, { type: h }]), o = u(), i = l ?? (o ? `h${o}` : "h1"), s = t ? T(t, v) : "";
|
|
13
|
+
return /* @__PURE__ */ e.createElement("div", { className: f(N, m), ...c }, s, /* @__PURE__ */ e.createElement("div", { className: x }, i === "div" ? a : e.createElement(i, { className: C }, a), r));
|
|
11
14
|
}
|
|
12
|
-
|
|
15
|
+
d.set(E, {
|
|
13
16
|
name: "Page Title"
|
|
14
17
|
});
|
|
15
18
|
export {
|
|
16
|
-
|
|
19
|
+
E as PageTitle
|
|
17
20
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
var e = "pkg_sps-woodland_core__family_page-
|
|
2
|
+
var e = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl00", a = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl01", l = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl02", o = "pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl03";
|
|
3
3
|
export {
|
|
4
4
|
e as pageTitle,
|
|
5
|
+
o as pageTitleHeading,
|
|
5
6
|
l as pageTitleIcon,
|
|
6
7
|
a as pageTitleText
|
|
7
8
|
};
|
package/lib/page-title/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-woodland_core__family_page-
|
|
1
|
+
.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku0{color:#4b5356;font-size:1.125rem;line-height:1.125rem;margin-top:.25rem}.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_14qi3ku1{font-size:.75rem;line-height:1.125rem;margin-left:.25rem;margin-right:.25rem;margin-top:.25rem}.pkg_sps-woodland_core__family_page-title__version_8_56_0__hash_6nwwl00{display:flex;flex-direction:row}.pkg_sps-woodland_core__family_page-title__version_8_56_0__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_56_0__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_56_0__hash_6nwwl03{color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}
|
package/lib/photo/index.js
CHANGED
|
@@ -56,7 +56,7 @@ var F = (e, a, o) => {
|
|
|
56
56
|
for (var [s, u] of e.compoundVariants)
|
|
57
57
|
F(s, t, e.defaultVariants) && (o += " " + u);
|
|
58
58
|
return o;
|
|
59
|
-
}, L = m({ defaultClassName: "pkg_sps-
|
|
59
|
+
}, L = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w0", variantClassNames: { placeholder: { true: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w1", false: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w2" } }, defaultVariants: { placeholder: !1 }, compoundVariants: [] }), A = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w3", variantClassNames: { mode: { fill: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w4", fit: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w5" } }, defaultVariants: { mode: "fill" }, compoundVariants: [] }), D = "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w6";
|
|
60
60
|
function E({
|
|
61
61
|
className: e,
|
|
62
62
|
src: a,
|
|
@@ -134,7 +134,7 @@ V.set(E, {
|
|
|
134
134
|
placeholderIcon: "IconName"
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
|
-
var C = "pkg_sps-
|
|
137
|
+
var C = "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba10", I = "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba11", z = "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba12", T = "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba13", H = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba14", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba15", false: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba16" } }, defaultVariants: { selected: !1 }, compoundVariants: [] });
|
|
138
138
|
function J({
|
|
139
139
|
children: e,
|
|
140
140
|
className: a,
|
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,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-
|
|
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_56_0__hash_1orib4w0",variantClassNames:{placeholder:{true:"pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w1",false:"pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w2"}},defaultVariants:{placeholder:!1},compoundVariants:[]}),S=g({defaultClassName:"pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w3",variantClassNames:{mode:{fill:"pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w4",fit:"pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w5"}},defaultVariants:{mode:"fill"},compoundVariants:[]}),k="pkg_sps-woodland_core__family_photo__version_8_56_0__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_56_0__hash_1744ba10",P="pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba11",x="pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba12",V="pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba13",W=g({defaultClassName:"pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba14",variantClassNames:{selected:{true:"pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba15",false:"pkg_sps-woodland_core__family_photo__version_8_56_0__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_56_0__hash_1orib4w0", variantClassNames: { placeholder: { true: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w1", false: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w2" } }, defaultVariants: { placeholder: !1 }, compoundVariants: [] }), r = _({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w3", variantClassNames: { mode: { fill: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w4", fit: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w5" } }, defaultVariants: { mode: "fill" }, compoundVariants: [] }), e = "pkg_sps-woodland_core__family_photo__version_8_56_0__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_56_0__hash_1744ba10", e = "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba11", r = "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba12", p = "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba13", t = _({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba14", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba15", false: "pkg_sps-woodland_core__family_photo__version_8_56_0__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_56_0__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_56_0__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_56_0__hash_1orib4w3{visibility:hidden}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w4{height:100%;visibility:visible;width:auto}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w5{height:auto;visibility:visible;width:100%}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1orib4w6{font-size:6em;text-align:center;color:#717779}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba10{display:table;float:right}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba11{display:table-cell;vertical-align:middle}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba12{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba13{display:block;margin-bottom:.5rem;width:100%}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba14{display:block;background:transparent;border:0;cursor:pointer;padding:0}.pkg_sps-woodland_core__family_photo__version_8_56_0__hash_1744ba16{opacity:.4}
|
package/lib/product-bar/index.js
CHANGED
|
@@ -56,7 +56,7 @@ var _e = (e, n, r) => {
|
|
|
56
56
|
for (var [m, i] of e.compoundVariants)
|
|
57
57
|
_e(m, a, e.defaultVariants) && (r += " " + i);
|
|
58
58
|
return r;
|
|
59
|
-
}, ie = "pkg_sps-woodland_core__family_product-
|
|
59
|
+
}, ie = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux0", ue = q({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux1", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux2", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux3" } }, defaultVariants: { fullWidth: !1 }, compoundVariants: [] }), de = q({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux4", variantClassNames: { hideNameText: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux5", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux6" } }, defaultVariants: { hideNameText: !1 }, compoundVariants: [] }), fe = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux7", pe = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux8", me = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux9", he = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxa", X = q({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxb", variantClassNames: { active: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxc", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxd" }, disabled: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxe", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxf" } }, defaultVariants: { active: !1, disabled: !1 }, compoundVariants: [] }), ge = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxg", ve = q({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxh", variantClassNames: { priorityPlus: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxi", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__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,
|
|
@@ -99,7 +99,7 @@ H.set(Z, {
|
|
|
99
99
|
hideNameText: { type: "boolean", default: "false" }
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
var be = "pkg_sps-woodland_core__family_product-
|
|
102
|
+
var be = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn0", ye = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn1", we = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn2", z = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn3", G = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn4";
|
|
103
103
|
function ke({
|
|
104
104
|
items: e,
|
|
105
105
|
wrapperRef: n
|
|
@@ -361,7 +361,7 @@ H.set(Ee, {
|
|
|
361
361
|
enablePriorityPlus: { type: "boolean", default: "true" }
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
|
-
var Be = "pkg_sps-woodland_core__family_product-
|
|
364
|
+
var Be = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy0", je = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy1";
|
|
365
365
|
function Ie({
|
|
366
366
|
channelId: e,
|
|
367
367
|
className: n,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,V){typeof exports=="object"&&typeof module<"u"?V(exports,require("react"),require("@sps-woodland/core"),require("@react-aria/link"),require("@ariakit/react"),require("@spscommerce/i18n")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core","@react-aria/link","@ariakit/react","@spscommerce/i18n"],V):(u=typeof globalThis<"u"?globalThis:u||self,V(u.ProductBar={},u.react,u.spsWoodlandCore,u.reactAriaLink,u.ariakitReact,u.spscommerceI18n))})(this,(function(u,V,c,te,P,U){"use strict";function re(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=re(V);function ne(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,a)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?X(Object(t),!0).forEach(function(a){ne(e,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})}return e}var ae=(e,n,t)=>{for(var a of Object.keys(e)){var s;if(e[a]!==((s=n[a])!==null&&s!==void 0?s:t[a]))return!1}return!0},D=e=>n=>{var t=e.defaultClassName,a=Y(Y({},e.defaultVariants),n);for(var s in a){var o,l=(o=a[s])!==null&&o!==void 0?o:e.defaultVariants[s];if(l!=null){var i=l;typeof i=="boolean"&&(i=i===!0?"true":"false");var h=e.variantClassNames[s][i];h&&(t+=" "+h)}}for(var[g,d]of e.compoundVariants)ae(g,a,e.defaultVariants)&&(t+=" "+d);return t},se="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux0",oe=D({defaultClassName:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux1",variantClassNames:{fullWidth:{true:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux2",false:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux3"}},defaultVariants:{fullWidth:!1},compoundVariants:[]}),le=D({defaultClassName:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux4",variantClassNames:{hideNameText:{true:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux5",false:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux6"}},defaultVariants:{hideNameText:!1},compoundVariants:[]}),ie="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux7",ce="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux8",_e="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjux9",ue="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxa",Z=D({defaultClassName:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxb",variantClassNames:{active:{true:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxc",false:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxd"},disabled:{true:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxe",false:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxf"}},defaultVariants:{active:!1,disabled:!1},compoundVariants:[]}),de="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxg",fe=D({defaultClassName:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxh",variantClassNames:{priorityPlus:{true:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxi",false:"pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_g6gjuxj"}},defaultVariants:{priorityPlus:!1},compoundVariants:[]});function G(e){const n=r.useRef(null),{linkProps:t}=te.useLink(e,n),{active:a,priority:s,...o}=e,l={...o,...t,ref:n,className:c.cl(Z({active:a,disabled:!1}),e.className)},i=e.as??(e.href?"a":"span");return r.createElement(i,{...l},e.children)}c.Metadata.set(G,{name:"Product Bar Tab",props:{active:{type:"boolean",required:!0},href:{type:"string"},priority:{type:"number"}}});const K=r.forwardRef(({children:e,className:n,name:t,logoSrc:a,hideNameText:s=!1,...o},l)=>r.createElement(r.Fragment,null,r.createElement("a",{className:c.cl(le({hideNameText:s}),n),...o,ref:l},a&&r.createElement("img",{className:ie,src:a,"aria-hidden":"true",alt:`${t} Logo`,title:t}),t&&r.createElement("span",{className:c.cl(ce,s&&_e)},t)),r.createElement("span",{className:de})));c.Metadata.set(K,{name:"ProductBarName",props:{name:{type:"string"},logoSrc:{type:"string"},hideNameText:{type:"boolean",default:"false"}}});var pe="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_5klvkn0",me="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_5klvkn1",he="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_5klvkn2",J="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_5klvkn3",Q="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_5klvkn4";function ge({items:e,wrapperRef:n}){const{t}=U.useWoodlandLanguage();if(e.length===0)return null;const a=e.some(o=>o.props?.active),s=t("productBar.more",{defaultValue:"More"});return r.createElement("span",{ref:n},r.createElement(P.MenuProvider,null,r.createElement(P.MenuButton,{className:c.cl(Z({active:a,disabled:!1}),pe),"aria-label":s},s,r.createElement(c.Icon,{icon:"chevron-down",className:me,"aria-hidden":"true"})),r.createElement(P.Menu,{className:he,gutter:4},e.map((o,l)=>{const i=o.props?.active,h=o.props?.children,g=o.props?.onPress,d=o.props?.href,N=o.props?.as,M=()=>{g&&g()};if(d&&N){const C=N;return r.createElement(P.MenuItem,{key:l,className:c.cl(J,i&&Q),render:r.createElement(C,{to:d})},h)}return d?r.createElement(P.MenuItem,{key:l,className:c.cl(J,i&&Q),render:r.createElement("a",{href:d})},h):r.createElement(P.MenuItem,{key:l,className:c.cl(J,i&&Q),onClick:M},h)}))))}function ve(e,n={}){const{enabled:t=!0,minVisibleItems:a=1,debounceMs:s=16}=n,o=r.useRef(null),l=r.useRef(null),i=r.useRef(null),h=r.useRef(null),g=r.useRef(null),d=r.useRef([]),N=r.useRef(0),M=r.useRef(0),C=r.useRef(!1),[W,B]=r.useState(e.length),[H,j]=r.useState(!1),L=r.useCallback(()=>{if(!o.current)return!1;const _=o.current,b=Array.from(_.children),f=i.current;f&&(N.current=f.getBoundingClientRect().width);const w=b.filter(k=>k!==f);if(w.length<e.length)return!1;if(d.current=w.map(k=>k.getBoundingClientRect().width),g.current){const k=g.current.querySelector("span:last-of-type");if(k){const p=k.getBoundingClientRect().width,E=getComputedStyle(g.current),S=parseFloat(E.marginRight)||0,m=Math.max(0,S-8);M.current=p+m}}return C.current=!0,!0},[e.length]),F=r.useCallback(()=>{if(!l.current)return 0;const _=l.current,b=_.getBoundingClientRect(),f=getComputedStyle(_),w=parseFloat(f.paddingLeft)+parseFloat(f.paddingRight),k=parseFloat(f.gap)||0;let p=w;const E=Array.from(_.children),S=E.filter(m=>getComputedStyle(m).display!=="none");S.length>1&&(p+=k*(S.length-1));for(const m of E){if(m===o.current)continue;const z=getComputedStyle(m),A=parseFloat(z.marginLeft)+parseFloat(z.marginRight);if(m===h.current){const x=Array.from(m.children),q=getComputedStyle(m),I=parseFloat(q.gap)||0;for(const y of x){const R=getComputedStyle(y),Ce=parseFloat(R.marginLeft)+parseFloat(R.marginRight);p+=y.getBoundingClientRect().width+Ce}x.length>1&&(p+=I*(x.length-1)),p+=parseFloat(q.paddingLeft)+parseFloat(q.paddingRight),p+=A}else p+=m.getBoundingClientRect().width+A}return Math.max(0,b.width-p-2)},[]),v=r.useRef(!1),O=r.useCallback(()=>{if(!t||!C.current){j(!1),v.current=!1;return}let _=F();const b=d.current,f=N.current||100,w=M.current||0;if(v.current&&w>0&&(_-=w),b.length===0||_<=0){B(e.length),j(!1),v.current=!1;return}if(b.reduce((y,R)=>y+R,0)<=_){B(e.length),j(!1),v.current=!1;return}let p=0,E=0;const S=_-f;for(let y=0;y<b.length;y++){const R=b[y];if(p+R<=S)p+=R,E++;else break}const T=Math.min(a,e.length),m=Math.max(E,T),A=b.slice(0,T).reduce((y,R)=>y+R,0)+f,x=E<T&&A>_&&w>0,q=!x&&_>A+w+20;let I=v.current;x&&!v.current?I=!0:q&&v.current&&(I=!1),I!==v.current&&(v.current=I,j(I)),B(m)},[t,e.length,a,F]);r.useEffect(()=>{if(!t){B(e.length);return}C.current=!1,d.current=[],B(e.length)},[t,e.length]),r.useLayoutEffect(()=>{if(!t||!o.current)return;L()&&O()}),r.useEffect(()=>{if(!t)return;let _;const b=()=>{clearTimeout(_),_=setTimeout(()=>{C.current||L(),O()},s)},f=new ResizeObserver(b);return l.current&&f.observe(l.current),()=>{clearTimeout(_),f.disconnect()}},[t,L,O,s]);const Re=t?e.slice(0,W):e,Ne=t&&W<e.length?e.slice(W):[];return{visibleItems:Re,overflowItems:Ne,containerRef:o,parentRef:l,overflowButtonRef:i,contentRef:h,brandRef:g,hideProductName:H}}function be(e){return[...e].sort((n,t)=>{const a=n.props?.priority??1/0,s=t.props?.priority??1/0;return a===s?0:a-s})}function ye(e,n){if(n.length===0)return{visible:e,overflow:n};const t=n.findIndex(i=>i.props?.active);if(t===-1)return{visible:e,overflow:n};const a=n[t],s=e[e.length-1],o=[...e.slice(0,-1),a],l=[...n.slice(0,t),s,...n.slice(t+1)];return{visible:o,overflow:l}}function $({fullWidth:e,enablePriorityPlus:n=!0,children:t,className:a,...s}){const o=r.useRef(null),[l,i,h]=c.selectChildren(t,[{type:K},{type:G}]),g=r.useMemo(()=>n?be(i):i,[n,i]),{visibleItems:d,overflowItems:N,containerRef:M,parentRef:C,overflowButtonRef:W,contentRef:B,brandRef:H,hideProductName:j}=ve(g,{enabled:n}),{visible:L,overflow:F}=r.useMemo(()=>ye(d,N),[d,N]),v=r.useMemo(()=>{if(!n||!l||l.length===0)return l;const O=l[0];return r.isValidElement(O)?[r.cloneElement(O,{hideNameText:j,ref:H})]:l},[n,l,j,H]);return r.createElement("div",{className:c.cl(se,a),...s,ref:o},r.createElement("nav",{className:oe({fullWidth:e}),ref:C},v,r.createElement("div",{className:fe({priorityPlus:n}),ref:M},L,F.length>0&&r.createElement(ge,{items:F,wrapperRef:W})),r.createElement("div",{className:ue,ref:B},r.createElement(c.PortalContext.Provider,{value:{parentElementRef:o,fixed:!0}},h))))}c.Metadata.set($,{name:"ProductBar",props:{fullWidth:{type:"boolean"},enablePriorityPlus:{type:"boolean",default:"true"}}});var we="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_pqijiy0",ke="pkg_sps-woodland_core__family_product-bar__version_8_55_2__hash_pqijiy1";function ee({channelId:e,className:n,...t}){const{t:a}=U.useWoodlandLanguage();return r.createElement("a",{className:c.cl(we,n),target:"_blank",rel:"noreferrer",href:`https://spscommerce.slack.com/archives/${e}`,...t},r.createElement(c.Icon,{className:ke,icon:"conversation","aria-hidden":"true"}),r.createElement("span",null,a("slackLink.label",{defaultValue:"Chat"})))}c.Metadata.set(ee,{name:"Slack Link",props:{channelId:{type:"string",required:!0}}}),u.ProductBar=$,u.ProductBarName=K,u.ProductBarTab=G,u.SlackLink=ee,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(u,V){typeof exports=="object"&&typeof module<"u"?V(exports,require("react"),require("@sps-woodland/core"),require("@react-aria/link"),require("@ariakit/react"),require("@spscommerce/i18n")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core","@react-aria/link","@ariakit/react","@spscommerce/i18n"],V):(u=typeof globalThis<"u"?globalThis:u||self,V(u.ProductBar={},u.react,u.spsWoodlandCore,u.reactAriaLink,u.ariakitReact,u.spscommerceI18n))})(this,(function(u,V,c,te,P,U){"use strict";function re(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=re(V);function ne(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,a)}return t}function Y(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?X(Object(t),!0).forEach(function(a){ne(e,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})}return e}var ae=(e,n,t)=>{for(var a of Object.keys(e)){var s;if(e[a]!==((s=n[a])!==null&&s!==void 0?s:t[a]))return!1}return!0},D=e=>n=>{var t=e.defaultClassName,a=Y(Y({},e.defaultVariants),n);for(var s in a){var o,l=(o=a[s])!==null&&o!==void 0?o:e.defaultVariants[s];if(l!=null){var i=l;typeof i=="boolean"&&(i=i===!0?"true":"false");var h=e.variantClassNames[s][i];h&&(t+=" "+h)}}for(var[g,d]of e.compoundVariants)ae(g,a,e.defaultVariants)&&(t+=" "+d);return t},se="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux0",oe=D({defaultClassName:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux1",variantClassNames:{fullWidth:{true:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux2",false:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux3"}},defaultVariants:{fullWidth:!1},compoundVariants:[]}),le=D({defaultClassName:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux4",variantClassNames:{hideNameText:{true:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux5",false:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux6"}},defaultVariants:{hideNameText:!1},compoundVariants:[]}),ie="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux7",ce="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux8",_e="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux9",ue="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxa",Z=D({defaultClassName:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxb",variantClassNames:{active:{true:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxc",false:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxd"},disabled:{true:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxe",false:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxf"}},defaultVariants:{active:!1,disabled:!1},compoundVariants:[]}),de="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxg",fe=D({defaultClassName:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxh",variantClassNames:{priorityPlus:{true:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxi",false:"pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxj"}},defaultVariants:{priorityPlus:!1},compoundVariants:[]});function G(e){const n=r.useRef(null),{linkProps:t}=te.useLink(e,n),{active:a,priority:s,...o}=e,l={...o,...t,ref:n,className:c.cl(Z({active:a,disabled:!1}),e.className)},i=e.as??(e.href?"a":"span");return r.createElement(i,{...l},e.children)}c.Metadata.set(G,{name:"Product Bar Tab",props:{active:{type:"boolean",required:!0},href:{type:"string"},priority:{type:"number"}}});const K=r.forwardRef(({children:e,className:n,name:t,logoSrc:a,hideNameText:s=!1,...o},l)=>r.createElement(r.Fragment,null,r.createElement("a",{className:c.cl(le({hideNameText:s}),n),...o,ref:l},a&&r.createElement("img",{className:ie,src:a,"aria-hidden":"true",alt:`${t} Logo`,title:t}),t&&r.createElement("span",{className:c.cl(ce,s&&_e)},t)),r.createElement("span",{className:de})));c.Metadata.set(K,{name:"ProductBarName",props:{name:{type:"string"},logoSrc:{type:"string"},hideNameText:{type:"boolean",default:"false"}}});var pe="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn0",me="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn1",he="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn2",J="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn3",Q="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn4";function ge({items:e,wrapperRef:n}){const{t}=U.useWoodlandLanguage();if(e.length===0)return null;const a=e.some(o=>o.props?.active),s=t("productBar.more",{defaultValue:"More"});return r.createElement("span",{ref:n},r.createElement(P.MenuProvider,null,r.createElement(P.MenuButton,{className:c.cl(Z({active:a,disabled:!1}),pe),"aria-label":s},s,r.createElement(c.Icon,{icon:"chevron-down",className:me,"aria-hidden":"true"})),r.createElement(P.Menu,{className:he,gutter:4},e.map((o,l)=>{const i=o.props?.active,h=o.props?.children,g=o.props?.onPress,d=o.props?.href,N=o.props?.as,M=()=>{g&&g()};if(d&&N){const C=N;return r.createElement(P.MenuItem,{key:l,className:c.cl(J,i&&Q),render:r.createElement(C,{to:d})},h)}return d?r.createElement(P.MenuItem,{key:l,className:c.cl(J,i&&Q),render:r.createElement("a",{href:d})},h):r.createElement(P.MenuItem,{key:l,className:c.cl(J,i&&Q),onClick:M},h)}))))}function ve(e,n={}){const{enabled:t=!0,minVisibleItems:a=1,debounceMs:s=16}=n,o=r.useRef(null),l=r.useRef(null),i=r.useRef(null),h=r.useRef(null),g=r.useRef(null),d=r.useRef([]),N=r.useRef(0),M=r.useRef(0),C=r.useRef(!1),[W,B]=r.useState(e.length),[H,j]=r.useState(!1),L=r.useCallback(()=>{if(!o.current)return!1;const _=o.current,b=Array.from(_.children),f=i.current;f&&(N.current=f.getBoundingClientRect().width);const w=b.filter(k=>k!==f);if(w.length<e.length)return!1;if(d.current=w.map(k=>k.getBoundingClientRect().width),g.current){const k=g.current.querySelector("span:last-of-type");if(k){const p=k.getBoundingClientRect().width,E=getComputedStyle(g.current),S=parseFloat(E.marginRight)||0,m=Math.max(0,S-8);M.current=p+m}}return C.current=!0,!0},[e.length]),F=r.useCallback(()=>{if(!l.current)return 0;const _=l.current,b=_.getBoundingClientRect(),f=getComputedStyle(_),w=parseFloat(f.paddingLeft)+parseFloat(f.paddingRight),k=parseFloat(f.gap)||0;let p=w;const E=Array.from(_.children),S=E.filter(m=>getComputedStyle(m).display!=="none");S.length>1&&(p+=k*(S.length-1));for(const m of E){if(m===o.current)continue;const z=getComputedStyle(m),A=parseFloat(z.marginLeft)+parseFloat(z.marginRight);if(m===h.current){const x=Array.from(m.children),q=getComputedStyle(m),I=parseFloat(q.gap)||0;for(const y of x){const R=getComputedStyle(y),Ce=parseFloat(R.marginLeft)+parseFloat(R.marginRight);p+=y.getBoundingClientRect().width+Ce}x.length>1&&(p+=I*(x.length-1)),p+=parseFloat(q.paddingLeft)+parseFloat(q.paddingRight),p+=A}else p+=m.getBoundingClientRect().width+A}return Math.max(0,b.width-p-2)},[]),v=r.useRef(!1),O=r.useCallback(()=>{if(!t||!C.current){j(!1),v.current=!1;return}let _=F();const b=d.current,f=N.current||100,w=M.current||0;if(v.current&&w>0&&(_-=w),b.length===0||_<=0){B(e.length),j(!1),v.current=!1;return}if(b.reduce((y,R)=>y+R,0)<=_){B(e.length),j(!1),v.current=!1;return}let p=0,E=0;const S=_-f;for(let y=0;y<b.length;y++){const R=b[y];if(p+R<=S)p+=R,E++;else break}const T=Math.min(a,e.length),m=Math.max(E,T),A=b.slice(0,T).reduce((y,R)=>y+R,0)+f,x=E<T&&A>_&&w>0,q=!x&&_>A+w+20;let I=v.current;x&&!v.current?I=!0:q&&v.current&&(I=!1),I!==v.current&&(v.current=I,j(I)),B(m)},[t,e.length,a,F]);r.useEffect(()=>{if(!t){B(e.length);return}C.current=!1,d.current=[],B(e.length)},[t,e.length]),r.useLayoutEffect(()=>{if(!t||!o.current)return;L()&&O()}),r.useEffect(()=>{if(!t)return;let _;const b=()=>{clearTimeout(_),_=setTimeout(()=>{C.current||L(),O()},s)},f=new ResizeObserver(b);return l.current&&f.observe(l.current),()=>{clearTimeout(_),f.disconnect()}},[t,L,O,s]);const Re=t?e.slice(0,W):e,Ne=t&&W<e.length?e.slice(W):[];return{visibleItems:Re,overflowItems:Ne,containerRef:o,parentRef:l,overflowButtonRef:i,contentRef:h,brandRef:g,hideProductName:H}}function be(e){return[...e].sort((n,t)=>{const a=n.props?.priority??1/0,s=t.props?.priority??1/0;return a===s?0:a-s})}function ye(e,n){if(n.length===0)return{visible:e,overflow:n};const t=n.findIndex(i=>i.props?.active);if(t===-1)return{visible:e,overflow:n};const a=n[t],s=e[e.length-1],o=[...e.slice(0,-1),a],l=[...n.slice(0,t),s,...n.slice(t+1)];return{visible:o,overflow:l}}function $({fullWidth:e,enablePriorityPlus:n=!0,children:t,className:a,...s}){const o=r.useRef(null),[l,i,h]=c.selectChildren(t,[{type:K},{type:G}]),g=r.useMemo(()=>n?be(i):i,[n,i]),{visibleItems:d,overflowItems:N,containerRef:M,parentRef:C,overflowButtonRef:W,contentRef:B,brandRef:H,hideProductName:j}=ve(g,{enabled:n}),{visible:L,overflow:F}=r.useMemo(()=>ye(d,N),[d,N]),v=r.useMemo(()=>{if(!n||!l||l.length===0)return l;const O=l[0];return r.isValidElement(O)?[r.cloneElement(O,{hideNameText:j,ref:H})]:l},[n,l,j,H]);return r.createElement("div",{className:c.cl(se,a),...s,ref:o},r.createElement("nav",{className:oe({fullWidth:e}),ref:C},v,r.createElement("div",{className:fe({priorityPlus:n}),ref:M},L,F.length>0&&r.createElement(ge,{items:F,wrapperRef:W})),r.createElement("div",{className:ue,ref:B},r.createElement(c.PortalContext.Provider,{value:{parentElementRef:o,fixed:!0}},h))))}c.Metadata.set($,{name:"ProductBar",props:{fullWidth:{type:"boolean"},enablePriorityPlus:{type:"boolean",default:"true"}}});var we="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy0",ke="pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy1";function ee({channelId:e,className:n,...t}){const{t:a}=U.useWoodlandLanguage();return r.createElement("a",{className:c.cl(we,n),target:"_blank",rel:"noreferrer",href:`https://spscommerce.slack.com/archives/${e}`,...t},r.createElement(c.Icon,{className:ke,icon:"conversation","aria-hidden":"true"}),r.createElement("span",null,a("slackLink.label",{defaultValue:"Chat"})))}c.Metadata.set(ee,{name:"Slack Link",props:{channelId:{type:"string",required:!0}}}),u.ProductBar=$,u.ProductBarName=K,u.ProductBarTab=G,u.SlackLink=ee,Object.defineProperty(u,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 o = "pkg_sps-woodland_core__family_product-
|
|
3
|
+
var o = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux0", s = _({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux1", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux2", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux3" } }, defaultVariants: { fullWidth: !1 }, compoundVariants: [] }), d = _({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux4", variantClassNames: { hideNameText: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux5", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux6" } }, defaultVariants: { hideNameText: !1 }, compoundVariants: [] }), e = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux7", l = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux8", p = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux9", i = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxa", u = _({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxb", variantClassNames: { active: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxc", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxd" }, disabled: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxe", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxf" } }, defaultVariants: { active: !1, disabled: !1 }, compoundVariants: [] }), t = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxg", n = _({ defaultClassName: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxh", variantClassNames: { priorityPlus: { true: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxi", false: "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxj" } }, defaultVariants: { priorityPlus: !1 }, compoundVariants: [] });
|
|
4
4
|
export {
|
|
5
5
|
u as navItem,
|
|
6
6
|
s as productBar,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
var o = "pkg_sps-woodland_core__family_product-
|
|
2
|
+
var o = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn0", r = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn1", a = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn2", e = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn3", v = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn4";
|
|
3
3
|
export {
|
|
4
4
|
o as overflowButton,
|
|
5
5
|
r as overflowButtonChevron,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
var o = "pkg_sps-woodland_core__family_product-
|
|
2
|
+
var o = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy0", a = "pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy1";
|
|
3
3
|
export {
|
|
4
4
|
o as slackLink,
|
|
5
5
|
a as slackLinkIcon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-woodland_core__family_product-
|
|
1
|
+
.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux0{background-color:#fff;box-shadow:0 1px 2px #00000026;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux1{background-color:#fff;display:flex;min-height:3.75rem;padding-top:0;padding-right:2rem;padding-bottom:0;padding-left:2rem;width:1280px;align-items:center}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux2{width:100%}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux4{align-content:center;cursor:pointer;display:flex;margin-right:2rem;text-decoration:none}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux4:hover{text-decoration:none}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux5{margin-right:.5rem}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux7{align-content:center;display:flex;height:1.5rem;margin-right:.5rem;width:1.5rem}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux8{align-content:center;color:#1f282c;display:flex;font-size:1rem;font-weight:600}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjux9{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxa{flex:1;text-align:right}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxb{align-items:center;color:#4b5356!important;font-size:.875rem!important;cursor:pointer;display:flex;height:3.625rem;justify-content:center;margin-top:.125rem;padding-top:0;padding-right:1rem;padding-bottom:0;padding-left:1rem;text-decoration:none}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxb:hover{text-decoration:none}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxc{box-shadow:inset 0 -.125rem #007db8}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxe{color:#d2d4d4}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxg{display:inline-block;height:2.125rem;margin-top:0;margin-right:1rem;margin-bottom:0;margin-left:0;background:#d2d4d4;width:.0625rem}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_g6gjuxh{display:flex;flex-direction:row;padding-left:0;margin-bottom:0;list-style:none}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn0{background:none;border:none;font:inherit;gap:.25rem;flex-shrink:0}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn1{font-size:.75rem;transition:transform .15s ease}[aria-expanded=true] .pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn1{transform:rotate(180deg)}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn2{background:#fff;border-style:solid;border-width:.0625rem;border-radius:.25rem;border-color:#717779;box-shadow:0 2px 8px #00000026;min-width:120px;overflow-y:auto;overscroll-behavior:contain;z-index:100}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn2:focus{outline:.125rem solid #007db8ff!important;outline-offset:.125rem}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn3{align-items:center;color:#4b5356;cursor:pointer;display:flex;font-size:.875rem;font-weight:400;padding:.5rem 1rem;text-decoration:none;white-space:nowrap}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn3:hover{background:#e6f2f8;text-decoration:none}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn3:focus{background:#e6f2f8;outline:.125rem solid #007db8ff!important;outline-offset:-.125rem}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_5klvkn4{font-weight:600;box-shadow:inset 3px 0 #007db8}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy0{align-items:center;display:inline-flex;font-size:.875rem;text-decoration:none}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy0:hover{border-bottom-style:solid;border-bottom-width:.0625rem;border-bottom-color:#007db8;text-decoration:none!important}.pkg_sps-woodland_core__family_product-bar__version_8_56_0__hash_pqijiy1{font-size:1rem;margin-right:.25rem}
|
|
@@ -54,7 +54,7 @@ var K = (a, _, t) => {
|
|
|
54
54
|
for (var [c, f] of a.compoundVariants)
|
|
55
55
|
K(c, l, a.defaultVariants) && (t += " " + f);
|
|
56
56
|
return t;
|
|
57
|
-
}, R = "pkg_sps-woodland_core__family_product-bar-
|
|
57
|
+
}, R = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb800", W = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb801", F = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb802", G = y({ defaultClassName: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb803", variantClassNames: { minimized: { true: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb804", false: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb805" } }, defaultVariants: { minimized: !1 }, compoundVariants: [] }), J = y({ defaultClassName: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb806", variantClassNames: { minimized: { true: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb807", false: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb808" } }, defaultVariants: { minimized: !1 }, compoundVariants: [] }), Q = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb809", U = y({ defaultClassName: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80a", variantClassNames: { minimized: { true: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80b", false: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80c" } }, defaultVariants: { minimized: !1 }, compoundVariants: [] }), X = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80d", Y = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80e", j = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80f", Z = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80g", z = y({ defaultClassName: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80h", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80i", false: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80j" } }, defaultVariants: { selected: !1 }, compoundVariants: [] }), $ = y({ defaultClassName: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80k", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80l", false: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80m" } }, defaultVariants: { selected: !1 }, compoundVariants: [] }), M = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80n", x = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80o", I = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80p", ee = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80q", S = "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80r", ae = y({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80s", false: "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80t" } }, defaultVariants: {}, compoundVariants: [[{ active: !0 }, "pkg_sps-woodland_core__family_product-bar-vertical__version_8_56_0__hash_1l0rb80u"]] });
|
|
58
58
|
function g({
|
|
59
59
|
children: a,
|
|
60
60
|
className: _,
|