@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 +1 @@
|
|
|
1
|
-
(function(l,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("@sps-woodland/core")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core"],h):(l=typeof globalThis<"u"?globalThis:l||self,h(l.SideNav={},l.react,l.spsWoodlandCore))})(this,(function(l,h,i){"use strict";function A(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const a=A(h);function q(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function x(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function k(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?x(Object(e),!0).forEach(function(n){q(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):x(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}var H=(t,r,e)=>{for(var n of Object.keys(t)){var s;if(t[n]!==((s=r[n])!==null&&s!==void 0?s:e[n]))return!1}return!0},L=t=>r=>{var e=t.defaultClassName,n=k(k({},t.defaultVariants),r);for(var s in n){var
|
|
1
|
+
(function(l,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("@sps-woodland/core")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core"],h):(l=typeof globalThis<"u"?globalThis:l||self,h(l.SideNav={},l.react,l.spsWoodlandCore))})(this,(function(l,h,i){"use strict";function A(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const a=A(h);function q(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function x(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function k(t){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?x(Object(e),!0).forEach(function(n){q(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):x(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}var H=(t,r,e)=>{for(var n of Object.keys(t)){var s;if(t[n]!==((s=r[n])!==null&&s!==void 0?s:e[n]))return!1}return!0},L=t=>r=>{var e=t.defaultClassName,n=k(k({},t.defaultVariants),r);for(var s in n){var o,c=(o=n[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(c!=null){var d=c;typeof d=="boolean"&&(d=d===!0?"true":"false");var p=t.variantClassNames[s][d];p&&(e+=" "+p)}}for(var[u,m]of t.compoundVariants)H(u,n,t.defaultVariants)&&(e+=" "+m);return e},R="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p0",B="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p1",W="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p2",z="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p3",G="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p4",J="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p5",K="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p6",P="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p7",Q="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8",I=L({defaultClassName:"pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p9",variantClassNames:{selected:{true:"pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pa",false:"pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pb"},inFilter:{true:"pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pc",false:"pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pd"}},defaultVariants:{selected:!1,inFilter:!0},compoundVariants:[]}),U="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pf",V="pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg";function b({children:t,className:r,...e}){return a.createElement("div",{className:B,...e},a.createElement("div",{className:W},t))}i.Metadata.set(b,{name:"SideNavHeader",props:{}});const F=h.createContext({filterValue:"",activeItem:""});function v({children:t,className:r,onSelect:e,as:n,keyId:s,selectableAsParent:o,defaultExpanded:c=!0,expanded:d,onExpandedChange:p,...u}){const m=n??"a",[g,E]=i.selectChildren(t,[{type:v}]),[O,S]=a.useState(c),[N,j]=a.useState(!0),f=a.useContext(F),_=a.useRef(null),y=d!==void 0,C=f.filterValue.length>0?!0:d??O,T=M=>{y||S(M),p?.(M)};return a.useEffect(()=>{j(_.current?.innerText.toLowerCase().includes(f.filterValue.toLowerCase())||!1),f.filterValue.length>0&&!y&&S(!0)},[f]),a.createElement(a.Fragment,null,g.length?a.createElement("ul",{className:Q},a.createElement("li",{ref:_,className:I({selected:o&&f.activeItem===s,inFilter:N}),onClick:()=>{e&&o?e(s):e&&!o&&T(!C)}},a.createElement(m,{className:V,...u},a.createElement("div",null,a.createElement(i.Icon,{className:U,icon:C?"chevron-down":"chevron-right",onClick:()=>{T(!C)}})),E)),C&&g):a.createElement("li",{ref:_,className:I({selected:f.activeItem===s,inFilter:N})},a.createElement(m,{className:V,onClick:()=>{e&&e(s)},...u},t)))}i.Metadata.set(v,{name:"SideNavItem",props:{keyId:{type:"string",required:!0},onSelect:{type:"function"},selectableAsParent:{type:"boolean"},defaultExpanded:{type:"boolean"},expanded:{type:"boolean"},onExpandedChange:{type:"function"},as:{type:"string"}}});function w({children:t,className:r,title:e,onSelect:n,...s}){const[o,c]=i.selectChildren(t,[{type:v}]),d=i.modChildren(o,p=>p.type===v?[{onSelect:n?u=>n(u):()=>{}}]:[]);return a.createElement("div",{className:J,...s},e&&a.createElement("div",{className:K},e),a.createElement("ul",{className:P},d),c)}i.Metadata.set(w,{name:"SideNavSection",props:{title:{type:"string"}}});function D({children:t,className:r,activeNavItem:e,onChange:n,filterable:s,filterInputPlaceholder:o,...c}){const[d,p,u]=i.selectChildren(t,[{type:b},{type:w},{type:v}]),m=a.useRef(e),[g,E]=a.useState(e),[O,S]=a.useState(""),N=_=>{E(_),n&&n(_)},j=i.modChildren(u,_=>_.type===v?[{onSelect:y=>N(y)}]:[]),f=i.modChildren(p,_=>_.type===w?[{onSelect:y=>N(y)}]:[]);return e!==m.current&&(E(e),m.current=e),a.createElement(F.Provider,{value:{filterValue:O,activeItem:g}},a.createElement("div",{className:i.cl(R),...c},d,s&&a.createElement("div",{className:z},a.createElement("div",{className:G},a.createElement("div",{className:"sps-text-input"},a.createElement("div",{className:"sps-form-control"},a.createElement("i",{className:"sps-text-input__icon sps-icon sps-icon-filter"}),a.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:o,onChange:_=>{S(_.target.value)}}))))),f,a.createElement("ul",{className:P},j)))}i.Metadata.set(D,{name:"SideNav",props:{activeNavItem:{type:"string",required:!0},onChange:{type:"(keyId: string) => void"},filterable:{type:"boolean"},filterInputPlaceholder:{type:"string"}}}),l.SideNav=D,l.SideNavHeader=b,l.SideNavItem=v,l.SideNavSection=w,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1,17 +1,17 @@
|
|
|
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 e = "pkg_sps-
|
|
3
|
+
var e = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p0", i = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p1", o = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p2", d = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p3", n = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p4", r = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p5", t = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p6", v = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p7", p = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8", l = _({ defaultClassName: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p9", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pa", false: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pb" }, inFilter: { true: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pc", false: "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pd" } }, defaultVariants: { selected: !1, inFilter: !0 }, compoundVariants: [] }), h = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pf", w = "pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg";
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
v as sideNavBranch,
|
|
6
6
|
e as sideNavContainer,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
p as sideNavExpand,
|
|
8
|
+
h as sideNavExpandIcon,
|
|
9
|
+
d as sideNavFilterSection,
|
|
10
|
+
n as sideNavFilterWrapper,
|
|
11
|
+
i as sideNavHeader,
|
|
12
|
+
l as sideNavLeaf,
|
|
13
|
+
w as sideNavLink,
|
|
14
|
+
r as sideNavSection,
|
|
15
|
+
t as sideNavSectionTitle,
|
|
16
|
+
o as sideNavTitle
|
|
17
17
|
};
|
package/lib/side-nav/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-
|
|
1
|
+
.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p0{word-wrap:break-word;background-clip:border-box;background-color:#fff;border-width:.0625rem;border-style:solid;border-color:#d2d4d4;border-radius:.125rem;display:flex;flex-direction:column;min-width:0;position:relative}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p1{background-color:#fff;border-bottom:.0625rem solid #d2d4d4ff;margin-bottom:0;padding:.5rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p2{align-items:center;display:flex;float:left;font-size:.75rem;font-weight:600;line-height:1.5rem;margin-bottom:0;padding-left:.5rem;text-transform:uppercase}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p2>i{font-size:.875rem;margin-right:.25rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p3{border-bottom:.0625rem solid #d2d4d4ff;padding:.5rem 0}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p4{margin:6px 21px}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p5{margin:0;padding:.5rem 0}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p5+.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p5{border-top:.0625rem solid #d2d4d4ff}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p6{color:#717779;font-size:1rem;font-weight:400;margin:.25rem 0 .5rem 1rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p7{list-style:none;margin-top:0;margin-bottom:0;padding:0;font-size:.875rem;line-height:1.25rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8{padding-left:0}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p9{display:block;width:100%}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pa{background-color:#e6f2f8;box-shadow:inset .125rem 0 #007db8;color:#1f282c;font-weight:700}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pd{display:none}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pe{display:block;width:100%}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pf{font-size:.625rem;vertical-align:middle;display:inline-block;line-height:1.25rem;margin-top:0;margin-right:.25rem;margin-bottom:0;margin-left:-.875rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{color:#1f282c;cursor:pointer;display:flex;font-size:.875rem;line-height:1.25rem;padding:.5rem 1rem .5rem 1.25rem;text-decoration:none}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg:hover{background-color:#f3f4f4}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p9>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{padding-left:2.125rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p9>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{padding-left:3rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p9>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{padding-left:3.875rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p9>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{padding-left:undefined}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pe>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{padding-left:2.125rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pe>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{padding-left:3rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pe>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{padding-left:3.875rem}.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70p8>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pe>.pkg_sps-woodland_core__family_side-nav__version_8_53_13__hash_1wtt70pg{padding-left:undefined}
|
|
@@ -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
|
|
3
|
+
var r = _({ defaultClassName: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf0", variantClassNames: { up: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf1" }, down: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf2" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
r as headerCaret
|
|
6
6
|
};
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Metadata as x, cl as
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { Metadata as x, cl as C, SortDirection as y, getScrollParent as L, selectChildren as T, modChildren as W } from "@sps-woodland/core";
|
|
3
3
|
import { lockToAnimationFrames as G } from "@spscommerce/utils";
|
|
4
|
-
function H(e,
|
|
5
|
-
return
|
|
6
|
-
value:
|
|
4
|
+
function H(e, a, r) {
|
|
5
|
+
return a in e ? Object.defineProperty(e, a, {
|
|
6
|
+
value: r,
|
|
7
7
|
enumerable: !0,
|
|
8
8
|
configurable: !0,
|
|
9
9
|
writable: !0
|
|
10
|
-
}) : e[
|
|
10
|
+
}) : e[a] = r, e;
|
|
11
11
|
}
|
|
12
|
-
function A(e,
|
|
13
|
-
var
|
|
12
|
+
function A(e, a) {
|
|
13
|
+
var r = Object.keys(e);
|
|
14
14
|
if (Object.getOwnPropertySymbols) {
|
|
15
15
|
var t = Object.getOwnPropertySymbols(e);
|
|
16
|
-
|
|
16
|
+
a && (t = t.filter(function(l) {
|
|
17
17
|
return Object.getOwnPropertyDescriptor(e, l).enumerable;
|
|
18
|
-
})),
|
|
18
|
+
})), r.push.apply(r, t);
|
|
19
19
|
}
|
|
20
|
-
return
|
|
20
|
+
return r;
|
|
21
21
|
}
|
|
22
22
|
function D(e) {
|
|
23
|
-
for (var
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
H(e, t,
|
|
27
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
28
|
-
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(
|
|
23
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
24
|
+
var r = arguments[a] != null ? arguments[a] : {};
|
|
25
|
+
a % 2 ? A(Object(r), !0).forEach(function(t) {
|
|
26
|
+
H(e, t, r[t]);
|
|
27
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : A(Object(r)).forEach(function(t) {
|
|
28
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
return e;
|
|
32
32
|
}
|
|
33
|
-
var F = (e,
|
|
33
|
+
var F = (e, a, r) => {
|
|
34
34
|
for (var t of Object.keys(e)) {
|
|
35
35
|
var l;
|
|
36
|
-
if (e[t] !== ((l =
|
|
36
|
+
if (e[t] !== ((l = a[t]) !== null && l !== void 0 ? l : r[t]))
|
|
37
37
|
return !1;
|
|
38
38
|
}
|
|
39
39
|
return !0;
|
|
40
|
-
}, O = (e) => (
|
|
41
|
-
var
|
|
40
|
+
}, O = (e) => (a) => {
|
|
41
|
+
var r = e.defaultClassName, t = D(D({}, e.defaultVariants), a);
|
|
42
42
|
for (var l in t) {
|
|
43
|
-
var
|
|
44
|
-
if (
|
|
45
|
-
var u =
|
|
43
|
+
var c, o = (c = t[l]) !== null && c !== void 0 ? c : e.defaultVariants[l];
|
|
44
|
+
if (o != null) {
|
|
45
|
+
var u = o;
|
|
46
46
|
typeof u == "boolean" && (u = u === !0 ? "true" : "false");
|
|
47
|
-
var
|
|
47
|
+
var m = (
|
|
48
48
|
// @ts-expect-error
|
|
49
49
|
e.variantClassNames[l][u]
|
|
50
50
|
);
|
|
51
|
-
|
|
51
|
+
m && (r += " " + m);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
for (var [
|
|
55
|
-
F(
|
|
56
|
-
return
|
|
57
|
-
}, I = O({ defaultClassName: "pkg_sps-
|
|
54
|
+
for (var [i, p] of e.compoundVariants)
|
|
55
|
+
F(i, t, e.defaultVariants) && (r += " " + p);
|
|
56
|
+
return r;
|
|
57
|
+
}, I = O({ defaultClassName: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf0", variantClassNames: { up: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf1" }, down: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf2" } }, defaultVariants: {}, compoundVariants: [] }), R = O({ defaultClassName: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id0", variantClassNames: { disabled: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id1" }, active: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id2" }, __autoLayout: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id3", false: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id4" } }, defaultVariants: { disabled: !1, active: !1, __autoLayout: !1 }, compoundVariants: [] });
|
|
58
58
|
function B({
|
|
59
59
|
className: e,
|
|
60
|
-
sortKey:
|
|
61
|
-
sort:
|
|
60
|
+
sortKey: a,
|
|
61
|
+
sort: r,
|
|
62
62
|
sortDisabled: t,
|
|
63
63
|
onSortChange: l,
|
|
64
|
-
onClick:
|
|
65
|
-
children:
|
|
64
|
+
onClick: c,
|
|
65
|
+
children: o,
|
|
66
66
|
style: u,
|
|
67
|
-
widthPx:
|
|
68
|
-
widthRem:
|
|
67
|
+
widthPx: m,
|
|
68
|
+
widthRem: i,
|
|
69
69
|
__autoLayout: p = !1,
|
|
70
|
-
...
|
|
70
|
+
..._
|
|
71
71
|
}) {
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
return
|
|
75
|
-
}, [
|
|
76
|
-
|
|
72
|
+
const d = n.useMemo(() => {
|
|
73
|
+
const E = !!a && !t && Array.isArray(r) && r.find((b) => b.key === a);
|
|
74
|
+
return E ? E.direction : void 0;
|
|
75
|
+
}, [r, a, t]), S = m ? m / 16 : i, v = S ? { ...u, width: `${S}rem` } : u, N = (E) => {
|
|
76
|
+
a && !t && l && l([
|
|
77
77
|
{
|
|
78
|
-
key:
|
|
79
|
-
direction:
|
|
78
|
+
key: a,
|
|
79
|
+
direction: d === y.ASCENDING ? y.DESCENDING : y.ASCENDING
|
|
80
80
|
}
|
|
81
|
-
]),
|
|
81
|
+
]), c && c(E);
|
|
82
82
|
};
|
|
83
|
-
return p ? /* @__PURE__ */
|
|
83
|
+
return p ? /* @__PURE__ */ n.createElement(
|
|
84
84
|
"td",
|
|
85
85
|
{
|
|
86
|
-
className:
|
|
86
|
+
className: C(
|
|
87
87
|
e,
|
|
88
|
-
R({ disabled: t, active: !!
|
|
89
|
-
|
|
90
|
-
up:
|
|
91
|
-
down:
|
|
88
|
+
R({ disabled: t, active: !!d, __autoLayout: p }),
|
|
89
|
+
d && I({
|
|
90
|
+
up: d === y.ASCENDING,
|
|
91
|
+
down: d === y.DESCENDING
|
|
92
92
|
})
|
|
93
93
|
),
|
|
94
94
|
onClick: N,
|
|
95
|
-
style:
|
|
96
|
-
...
|
|
95
|
+
style: v,
|
|
96
|
+
..._
|
|
97
97
|
},
|
|
98
|
-
|
|
99
|
-
) : /* @__PURE__ */
|
|
98
|
+
o
|
|
99
|
+
) : /* @__PURE__ */ n.createElement(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
102
|
-
className:
|
|
102
|
+
className: C(
|
|
103
103
|
e,
|
|
104
|
-
R({ disabled: t, active: !!
|
|
105
|
-
|
|
106
|
-
up:
|
|
107
|
-
down:
|
|
104
|
+
R({ disabled: t, active: !!d, __autoLayout: p }),
|
|
105
|
+
d && I({
|
|
106
|
+
up: d === y.ASCENDING,
|
|
107
|
+
down: d === y.DESCENDING
|
|
108
108
|
})
|
|
109
109
|
),
|
|
110
110
|
onClick: N,
|
|
111
|
-
style:
|
|
112
|
-
...
|
|
111
|
+
style: v,
|
|
112
|
+
..._
|
|
113
113
|
},
|
|
114
|
-
|
|
114
|
+
o
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
x.set(B, {
|
|
@@ -125,114 +125,114 @@ x.set(B, {
|
|
|
125
125
|
widthRem: { type: "number" }
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
|
-
var k = O({ defaultClassName: "pkg_sps-
|
|
128
|
+
var k = O({ defaultClassName: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu0", variantClassNames: { pinned: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu1", false: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu2" }, scrollParentIsWindow: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu3", false: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu4" }, __autoLayout: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu5", false: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu6" } }, defaultVariants: { pinned: !1, scrollParentIsWindow: !1, __autoLayout: !1 }, compoundVariants: [[{ pinned: !0, scrollParentIsWindow: !0 }, "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu7"]] }), M = "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu8";
|
|
129
129
|
function Y({
|
|
130
130
|
sort: e,
|
|
131
|
-
onSortChange:
|
|
132
|
-
children:
|
|
131
|
+
onSortChange: a,
|
|
132
|
+
children: r,
|
|
133
133
|
className: t,
|
|
134
134
|
pinSortingHeader: l = !1,
|
|
135
|
-
__autoLayout:
|
|
136
|
-
...
|
|
135
|
+
__autoLayout: c = !1,
|
|
136
|
+
...o
|
|
137
137
|
}) {
|
|
138
|
-
const [u,
|
|
138
|
+
const [u, m] = n.useState(!1), i = n.useRef(null), p = n.useRef(null), _ = n.useRef({
|
|
139
139
|
height: "",
|
|
140
140
|
width: "",
|
|
141
141
|
unpinAtTop: 0,
|
|
142
142
|
unpinAtBottom: 0,
|
|
143
143
|
cellWidths: []
|
|
144
|
-
}),
|
|
145
|
-
const f =
|
|
144
|
+
}), d = n.useCallback(() => i.current && L(i.current) || window, []), S = n.useCallback((s) => {
|
|
145
|
+
const f = s || d();
|
|
146
146
|
return f.scrollY || f.scrollTop || 0;
|
|
147
|
-
}, []),
|
|
148
|
-
(
|
|
149
|
-
if (l &&
|
|
150
|
-
const f =
|
|
151
|
-
if (
|
|
152
|
-
const h =
|
|
153
|
-
|
|
154
|
-
j instanceof HTMLElement && (
|
|
147
|
+
}, []), v = n.useCallback(
|
|
148
|
+
(s) => {
|
|
149
|
+
if (l && i.current) {
|
|
150
|
+
const f = s || d(), g = S(f), w = c ? i.current.parentElement?.parentElement?.getBoundingClientRect() : i.current.parentElement?.getBoundingClientRect();
|
|
151
|
+
if (w) {
|
|
152
|
+
const h = i.current.getBoundingClientRect();
|
|
153
|
+
_.current.height = `${h.height}px`, _.current.width = `${h.width}px`, f === window ? (_.current.unpinAtBottom = w.bottom + g - h.height * 2, _.current.unpinAtTop = h.top + g - h.height) : (_.current.unpinAtBottom = w.bottom + g - h.height * 2, _.current.unpinAtTop = w.top + g), _.current.cellWidths = [], i.current.childNodes.forEach((j, V) => {
|
|
154
|
+
j instanceof HTMLElement && (_.current.cellWidths[V] = `${j.getBoundingClientRect().width}px`);
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
[l]
|
|
160
|
-
), N =
|
|
161
|
-
p.current && (p.current.style.width =
|
|
162
|
-
|
|
160
|
+
), N = n.useCallback(() => {
|
|
161
|
+
p.current && (p.current.style.width = _.current.width, p.current.style.height = _.current.height, p.current.childNodes.forEach((s, f) => {
|
|
162
|
+
s instanceof HTMLElement && (s.style.width = _.current.cellWidths[f] || "");
|
|
163
163
|
}));
|
|
164
164
|
}, []);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
let
|
|
169
|
-
const f =
|
|
170
|
-
return l ? (
|
|
171
|
-
|
|
172
|
-
const { unpinAtTop:
|
|
173
|
-
|
|
174
|
-
}), f.addEventListener("scroll",
|
|
175
|
-
|
|
165
|
+
n.useLayoutEffect(() => {
|
|
166
|
+
v();
|
|
167
|
+
}), n.useLayoutEffect(() => {
|
|
168
|
+
let s;
|
|
169
|
+
const f = d();
|
|
170
|
+
return l ? (s = G(() => {
|
|
171
|
+
v(f);
|
|
172
|
+
const { unpinAtTop: g, unpinAtBottom: w } = _.current, h = S(f);
|
|
173
|
+
g && w && (h >= g && h <= w ? (m(!0), i.current && (i.current.style.visibility = "hidden")) : (m(!1), i.current && (i.current.style.visibility = "visible")));
|
|
174
|
+
}), f.addEventListener("scroll", s), s()) : i.current && (i.current.style.visibility = "visible"), () => {
|
|
175
|
+
s && f.removeEventListener("scroll", s);
|
|
176
176
|
};
|
|
177
|
-
}, [l,
|
|
178
|
-
let
|
|
179
|
-
return u && (
|
|
180
|
-
|
|
181
|
-
}, window.addEventListener("resize",
|
|
182
|
-
|
|
177
|
+
}, [l, v]), n.useLayoutEffect(() => {
|
|
178
|
+
let s;
|
|
179
|
+
return u && (s = () => {
|
|
180
|
+
v(), N();
|
|
181
|
+
}, window.addEventListener("resize", s), s()), () => {
|
|
182
|
+
s && window.removeEventListener("resize", s);
|
|
183
183
|
};
|
|
184
|
-
}, [u,
|
|
185
|
-
const [
|
|
186
|
-
if (
|
|
187
|
-
const
|
|
188
|
-
return /* @__PURE__ */
|
|
184
|
+
}, [u, v, N]);
|
|
185
|
+
const [E] = T(r, [{ type: B }]), b = W(E, () => [{ sort: e, onSortChange: a }]), P = d() === window;
|
|
186
|
+
if (c) {
|
|
187
|
+
const s = /* @__PURE__ */ n.createElement("tr", null, /* @__PURE__ */ n.createElement("td", { className: C(M), colSpan: 100 }));
|
|
188
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
189
189
|
"tr",
|
|
190
190
|
{
|
|
191
|
-
ref:
|
|
192
|
-
className:
|
|
193
|
-
k({ pinned: !1, scrollParentIsWindow: P, __autoLayout:
|
|
191
|
+
ref: i,
|
|
192
|
+
className: C(
|
|
193
|
+
k({ pinned: !1, scrollParentIsWindow: P, __autoLayout: c }),
|
|
194
194
|
t
|
|
195
195
|
),
|
|
196
|
-
...
|
|
196
|
+
...o
|
|
197
197
|
},
|
|
198
198
|
b
|
|
199
|
-
),
|
|
199
|
+
), s, u && /* @__PURE__ */ n.createElement(
|
|
200
200
|
"tr",
|
|
201
201
|
{
|
|
202
202
|
ref: p,
|
|
203
|
-
className:
|
|
203
|
+
className: C(
|
|
204
204
|
t,
|
|
205
|
-
k({ pinned: !0, scrollParentIsWindow: P, __autoLayout:
|
|
205
|
+
k({ pinned: !0, scrollParentIsWindow: P, __autoLayout: c })
|
|
206
206
|
),
|
|
207
|
-
...
|
|
208
|
-
id:
|
|
209
|
-
"data-testid":
|
|
207
|
+
...o,
|
|
208
|
+
id: o.id ? `pinned-${o.id}` : void 0,
|
|
209
|
+
"data-testid": o["data-testid"] ? `pinned-${o["data-testid"]}` : void 0
|
|
210
210
|
},
|
|
211
211
|
b
|
|
212
212
|
));
|
|
213
213
|
}
|
|
214
|
-
return /* @__PURE__ */
|
|
214
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
215
215
|
"div",
|
|
216
216
|
{
|
|
217
|
-
ref:
|
|
218
|
-
className:
|
|
217
|
+
ref: i,
|
|
218
|
+
className: C(
|
|
219
219
|
t,
|
|
220
|
-
k({ pinned: !1, scrollParentIsWindow: P, __autoLayout:
|
|
220
|
+
k({ pinned: !1, scrollParentIsWindow: P, __autoLayout: c })
|
|
221
221
|
),
|
|
222
|
-
...
|
|
222
|
+
...o
|
|
223
223
|
},
|
|
224
224
|
b
|
|
225
|
-
), u && /* @__PURE__ */
|
|
225
|
+
), u && /* @__PURE__ */ n.createElement(
|
|
226
226
|
"div",
|
|
227
227
|
{
|
|
228
228
|
ref: p,
|
|
229
|
-
className:
|
|
229
|
+
className: C(
|
|
230
230
|
t,
|
|
231
|
-
k({ pinned: !0, scrollParentIsWindow: P, __autoLayout:
|
|
231
|
+
k({ pinned: !0, scrollParentIsWindow: P, __autoLayout: c })
|
|
232
232
|
),
|
|
233
|
-
...
|
|
234
|
-
id:
|
|
235
|
-
"data-testid":
|
|
233
|
+
...o,
|
|
234
|
+
id: o.id ? `pinned-${o.id}` : void 0,
|
|
235
|
+
"data-testid": o["data-testid"] ? `pinned-${o["data-testid"]}` : void 0
|
|
236
236
|
},
|
|
237
237
|
b
|
|
238
238
|
));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(m,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("@sps-woodland/core"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core","@spscommerce/utils"],b):(m=typeof globalThis<"u"?globalThis:m||self,b(m.SortingHeader={},m.react,m.spsWoodlandCore,m.spscommerceUtils))})(this,(function(m,b,a,H){"use strict";function V(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const i=V(b);function W(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function A(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(_){return Object.getOwnPropertyDescriptor(e,_).enumerable})),n.push.apply(n,t)}return n}function I(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?A(Object(n),!0).forEach(function(t){W(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var L=(e,r,n)=>{for(var t of Object.keys(e)){var _;if(e[t]!==((_=r[t])!==null&&_!==void 0?_:n[t]))return!1}return!0},D=e=>r=>{var n=e.defaultClassName,t=I(I({},e.defaultVariants),r);for(var _ in t){var u,l=(u=t[_])!==null&&u!==void 0?u:e.defaultVariants[_];if(l!=null){var p=l;typeof p=="boolean"&&(p=p===!0?"true":"false");var v=e.variantClassNames[_][p];v&&(n+=" "+v)}}for(var[o,f]of e.compoundVariants)L(o,t,e.defaultVariants)&&(n+=" "+f);return n},R=D({defaultClassName:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf0",variantClassNames:{up:{true:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf1"},down:{true:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf2"}},defaultVariants:{},compoundVariants:[]}),T=D({defaultClassName:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id0",variantClassNames:{disabled:{true:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id1"},active:{true:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id2"},__autoLayout:{true:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id3",false:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id4"}},defaultVariants:{disabled:!1,active:!1,__autoLayout:!1},compoundVariants:[]});function k({className:e,sortKey:r,sort:n,sortDisabled:t,onSortChange:_,onClick:u,children:l,style:p,widthPx:v,widthRem:o,__autoLayout:f=!1,...d}){const c=i.useMemo(()=>{const S=!!r&&!t&&Array.isArray(n)&&n.find(E=>E.key===r);return S?S.direction:void 0},[n,r,t]),P=v?v/16:o,w=P?{...p,width:`${P}rem`}:p,O=S=>{r&&!t&&_&&_([{key:r,direction:c===a.SortDirection.ASCENDING?a.SortDirection.DESCENDING:a.SortDirection.ASCENDING}]),u&&u(S)};return f?i.createElement("td",{className:a.cl(e,T({disabled:t,active:!!c,__autoLayout:f}),c&&R({up:c===a.SortDirection.ASCENDING,down:c===a.SortDirection.DESCENDING})),onClick:O,style:w,...d},l):i.createElement("div",{className:a.cl(e,T({disabled:t,active:!!c,__autoLayout:f}),c&&R({up:c===a.SortDirection.ASCENDING,down:c===a.SortDirection.DESCENDING})),onClick:O,style:w,...d},l)}a.Metadata.set(k,{name:"Sorting Header Cell",props:{sortKey:{type:"string"},sort:{type:"SortedColumn[]"},sortDisabled:{type:"boolean"},onSortChange:{type:"SortChangeHandler"},widthPx:{type:"number"},widthRem:{type:"number"}}});var j=D({defaultClassName:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu0",variantClassNames:{pinned:{true:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu1",false:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu2"},scrollParentIsWindow:{true:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu3",false:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu4"},__autoLayout:{true:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu5",false:"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu6"}},defaultVariants:{pinned:!1,scrollParentIsWindow:!1,__autoLayout:!1},compoundVariants:[[{pinned:!0,scrollParentIsWindow:!0},"pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu7"]]}),G="pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu8";function x({sort:e,onSortChange:r,children:n,className:t,pinSortingHeader:_=!1,__autoLayout:u=!1,...l}){const[p,v]=i.useState(!1),o=i.useRef(null),f=i.useRef(null),d=i.useRef({height:"",width:"",unpinAtTop:0,unpinAtBottom:0,cellWidths:[]}),c=i.useCallback(()=>o.current&&a.getScrollParent(o.current)||window,[]),P=i.useCallback(s=>{const h=s||c();return h.scrollY||h.scrollTop||0},[]),w=i.useCallback(s=>{if(_&&o.current){const h=s||c(),y=P(h),C=u?o.current.parentElement?.parentElement?.getBoundingClientRect():o.current.parentElement?.getBoundingClientRect();if(C){const g=o.current.getBoundingClientRect();d.current.height=`${g.height}px`,d.current.width=`${g.width}px`,h===window?(d.current.unpinAtBottom=C.bottom+y-g.height*2,d.current.unpinAtTop=g.top+y-g.height):(d.current.unpinAtBottom=C.bottom+y-g.height*2,d.current.unpinAtTop=C.top+y),d.current.cellWidths=[],o.current.childNodes.forEach((B,M)=>{B instanceof HTMLElement&&(d.current.cellWidths[M]=`${B.getBoundingClientRect().width}px`)})}}},[_]),O=i.useCallback(()=>{f.current&&(f.current.style.width=d.current.width,f.current.style.height=d.current.height,f.current.childNodes.forEach((s,h)=>{s instanceof HTMLElement&&(s.style.width=d.current.cellWidths[h]||"")}))},[]);i.useLayoutEffect(()=>{w()}),i.useLayoutEffect(()=>{let s;const h=c();return _?(s=H.lockToAnimationFrames(()=>{w(h);const{unpinAtTop:y,unpinAtBottom:C}=d.current,g=P(h);y&&C&&(g>=y&&g<=C?(v(!0),o.current&&(o.current.style.visibility="hidden")):(v(!1),o.current&&(o.current.style.visibility="visible")))}),h.addEventListener("scroll",s),s()):o.current&&(o.current.style.visibility="visible"),()=>{s&&h.removeEventListener("scroll",s)}},[_,w]),i.useLayoutEffect(()=>{let s;return p&&(s=()=>{w(),O()},window.addEventListener("resize",s),s()),()=>{s&&window.removeEventListener("resize",s)}},[p,w,O]);const[S]=a.selectChildren(n,[{type:k}]),E=a.modChildren(S,()=>[{sort:e,onSortChange:r}]),N=c()===window;if(u){const s=i.createElement("tr",null,i.createElement("td",{className:a.cl(G),colSpan:100}));return i.createElement(i.Fragment,null,i.createElement("tr",{ref:o,className:a.cl(j({pinned:!1,scrollParentIsWindow:N,__autoLayout:u}),t),...l},E),s,p&&i.createElement("tr",{ref:f,className:a.cl(t,j({pinned:!0,scrollParentIsWindow:N,__autoLayout:u})),...l,id:l.id?`pinned-${l.id}`:void 0,"data-testid":l["data-testid"]?`pinned-${l["data-testid"]}`:void 0},E))}return i.createElement(i.Fragment,null,i.createElement("div",{ref:o,className:a.cl(t,j({pinned:!1,scrollParentIsWindow:N,__autoLayout:u})),...l},E),p&&i.createElement("div",{ref:f,className:a.cl(t,j({pinned:!0,scrollParentIsWindow:N,__autoLayout:u})),...l,id:l.id?`pinned-${l.id}`:void 0,"data-testid":l["data-testid"]?`pinned-${l["data-testid"]}`:void 0},E))}a.Metadata.set(x,{name:"Sorting Header",props:{sort:{type:"SortedColumn[]"},onSortChange:{type:"SortChangeHandler"}}}),m.SortingHeader=x,m.SortingHeaderCell=k,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
3
|
+
var e = _({ defaultClassName: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu0", variantClassNames: { pinned: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu1", false: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu2" }, scrollParentIsWindow: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu3", false: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu4" }, __autoLayout: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu5", false: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu6" } }, defaultVariants: { pinned: !1, scrollParentIsWindow: !1, __autoLayout: !1 }, compoundVariants: [[{ pinned: !0, scrollParentIsWindow: !0 }, "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu7"]] }), o = "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu8";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
e as sortingHeader,
|
|
6
|
+
o as sortingHeaderSpacer
|
|
7
7
|
};
|
|
@@ -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
|
|
3
|
+
var o = _({ defaultClassName: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id0", variantClassNames: { disabled: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id1" }, active: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id2" }, __autoLayout: { true: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id3", false: "pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id4" } }, defaultVariants: { disabled: !1, active: !1, __autoLayout: !1 }, compoundVariants: [] });
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
o as headerCell
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-
|
|
1
|
+
.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf0:after{content:"";border-left-color:transparent;border-right-color:transparent;border-style:solid;border-width:.375rem .25rem;height:0;position:absolute;right:.5rem}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf1:after{border-bottom-color:#1f282c;border-top-color:transparent;top:calc(50% - 9px)}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_ax8xqf2:after{border-top-color:#1f282c;border-bottom-color:transparent;top:calc(50% - 3px)}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id0{display:table-cell;vertical-align:middle;color:#4b5356;font-size:.75rem;font-weight:600;line-height:1.25rem;padding:.5rem;position:relative}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id0:hover{background-color:#f3f4f4}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id1{cursor:default}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id1:hover{background-color:#e9e9ea}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id2{color:#1f282c;background-color:#d2d4d4}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id3{text-align:left}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id3:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_11ho8id3:last-child{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu0{padding:0;border-radius:.25rem;vertical-align:bottom;cursor:pointer;background-color:#e9e9ea}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu1{border-radius:0;position:fixed;top:0;z-index:999}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu1:after{content:"";background:linear-gradient(180deg,rgba(0,0,0,.1),transparent);display:block;height:.625rem;position:absolute;top:100%;left:-.0625rem;width:100%}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu5{display:table-row}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu6{display:table;table-layout:fixed;width:100%}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu7{top:3.75rem}.pkg_sps-woodland_core__family_sorting-header__version_8_53_13__hash_1jpcvsu8{height:1rem;background:transparent;border:0}
|