@sps-woodland/core 8.56.2 → 8.56.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/action-bar/action-bar/ActionBar.js +44 -59
- package/lib/action-bar/action-bar/ActionBar.ve.js +4 -11
- package/lib/action-bar/action-bar-additional-content/ActionBarAdditionalContent.js +14 -22
- package/lib/action-bar/index.js +54 -74
- package/lib/action-bar/index.umd.cjs +1 -1
- package/lib/action-bar/style.css +2 -1
- package/lib/add-to-list/add-to-list/AddToList.js +220 -302
- package/lib/add-to-list/add-to-list/AddToList.ve.js +79 -24
- package/lib/add-to-list/add-to-list/ItemsList.js +42 -67
- package/lib/add-to-list/add-to-list/ListItem.js +24 -50
- package/lib/add-to-list/index.js +393 -453
- package/lib/add-to-list/index.umd.cjs +1 -1
- package/lib/add-to-list/style.css +2 -1
- package/lib/buttons/button/Button.js +95 -121
- package/lib/buttons/button/Button.ve.js +150 -9
- package/lib/buttons/index.js +281 -171
- package/lib/buttons/index.umd.cjs +1 -1
- package/lib/buttons/style.css +2 -1
- package/lib/cards/card/Card.js +19 -27
- package/lib/cards/card/Card.ve.js +4 -4
- package/lib/cards/card-footer/CardFooter.js +12 -13
- package/lib/cards/card-footer/CardFooter.ve.js +4 -4
- package/lib/cards/card-header/CardHeader.js +12 -13
- package/lib/cards/card-header/CardHeader.ve.js +4 -4
- package/lib/cards/card-title/CardTitle.js +11 -12
- package/lib/cards/card-title/CardTitle.ve.js +4 -4
- package/lib/cards/index.js +52 -52
- package/lib/cards/index.umd.cjs +1 -1
- package/lib/cards/style.css +2 -1
- package/lib/column-manager/column-manager/ColumnManager.js +95 -112
- package/lib/column-manager/column-manager/useColumnManager.js +59 -48
- package/lib/column-manager/index.js +2 -5
- package/lib/components/icon/Icon.ve.js +15 -5
- package/lib/components/icon/icons/sprite.svg.js +4 -4
- package/lib/content-row/content-row/ContentRow.js +146 -173
- package/lib/content-row/content-row/ContentRow.ve.js +105 -18
- package/lib/content-row/content-row-col/ContentRowCol.js +37 -48
- package/lib/content-row/content-row-col/ContentRowCol.ve.js +49 -6
- package/lib/content-row/content-row-expansion/ContentRowExpansion.js +16 -24
- package/lib/content-row/index.js +407 -318
- package/lib/content-row/index.umd.cjs +1 -1
- package/lib/content-row/row-list-auto-layout/RowListAutoLayout.js +24 -39
- package/lib/content-row/row-list-auto-layout/RowListAutoLayout.ve.js +13 -5
- package/lib/content-row/style.css +2 -1
- package/lib/content-tiles/content-tile/ContentTile.js +71 -60
- package/lib/content-tiles/content-tile/ContentTile.ve.js +36 -14
- package/lib/content-tiles/content-tile-list/ContentTileList.js +12 -13
- package/lib/content-tiles/content-tile-list/ContentTileList.ve.js +4 -5
- package/lib/content-tiles/index.js +156 -118
- package/lib/content-tiles/index.umd.cjs +1 -1
- package/lib/content-tiles/style.css +2 -1
- package/lib/core.css +2 -1
- package/lib/dropdowns/dropdown/Dropdown.js +56 -68
- package/lib/dropdowns/dropdown/Dropdown.ve.js +37 -8
- package/lib/dropdowns/index.js +171 -171
- package/lib/dropdowns/index.umd.cjs +1 -1
- package/lib/dropdowns/option-list/Option.js +14 -18
- package/lib/dropdowns/option-list/Option.ve.js +4 -5
- package/lib/dropdowns/option-list/OptionList.js +28 -44
- package/lib/dropdowns/option-list/OptionList.ve.js +4 -5
- package/lib/dropdowns/style.css +2 -1
- package/lib/editable-table/EditableTable.js +68 -85
- package/lib/editable-table/index.js +1 -4
- package/lib/feedback-block/FeedbackBlock.js +40 -35
- package/lib/feedback-block/FeedbackBlock.ve.js +56 -7
- package/lib/feedback-block/index.js +132 -85
- package/lib/feedback-block/index.umd.cjs +1 -1
- package/lib/feedback-block/style.css +2 -1
- package/lib/file-upload/file-upload/FileUpload.js +164 -202
- package/lib/file-upload/file-upload/FileUpload.ve.js +84 -18
- package/lib/file-upload/file-upload/mime-type.enum.js +106 -106
- package/lib/file-upload/index.js +390 -353
- package/lib/file-upload/index.umd.cjs +1 -1
- package/lib/file-upload/style.css +2 -1
- package/lib/filter-tiles/filter-tile/FilterTile.js +41 -46
- package/lib/filter-tiles/filter-tile/FilterTile.ve.js +51 -9
- package/lib/filter-tiles/filter-tile-set/FilterTileSet.js +12 -15
- package/lib/filter-tiles/filter-tile-set/FilterTileSet.ve.js +4 -4
- package/lib/filter-tiles/index.js +142 -107
- package/lib/filter-tiles/index.umd.cjs +1 -1
- package/lib/filter-tiles/style.css +2 -1
- package/lib/focused-task/focused-task/FocusedTask.js +52 -74
- package/lib/focused-task/focused-task/FocusedTask.ve.js +13 -12
- package/lib/focused-task/focused-task/useFocusedTask.js +20 -18
- package/lib/focused-task/focused-task-actions/FocusedTaskActions.js +12 -13
- package/lib/focused-task/index.js +127 -144
- package/lib/focused-task/index.umd.cjs +1 -1
- package/lib/focused-task/style.css +2 -1
- package/lib/growler/Growler.js +78 -90
- package/lib/growler/Growler.ve.js +23 -12
- package/lib/growler/GrowlerListProvider.js +38 -39
- package/lib/growler/Sonner.ve.js +17 -12
- package/lib/growler/index.js +249 -274
- package/lib/growler/index.umd.cjs +1 -1
- package/lib/growler/sonner.js +73 -102
- package/lib/growler/style.css +2 -1
- package/lib/index.js +520 -501
- package/lib/index.umd.cjs +4 -4
- package/lib/insight-card/InsightCard.js +90 -84
- package/lib/insight-card/InsightCard.ve.js +148 -15
- package/lib/insight-card/InsightCardSet.js +12 -12
- package/lib/insight-card/index.js +269 -141
- package/lib/insight-card/index.umd.cjs +1 -1
- package/lib/insight-card/style.css +2 -1
- package/lib/key-value-set/index.js +97 -87
- package/lib/key-value-set/index.umd.cjs +1 -1
- package/lib/key-value-set/key-value-set/KeyValueSet.js +17 -21
- package/lib/key-value-set/key-value-set/KeyValueSet.ve.js +10 -5
- package/lib/key-value-set/key-value-set-item/KeyValueSetItem.js +25 -21
- package/lib/key-value-set/key-value-set-item/KeyValueSetItem.ve.js +13 -6
- package/lib/key-value-set/style.css +2 -1
- package/lib/list-bar/advanced-search/AdvancedSearch.js +51 -54
- package/lib/list-bar/advanced-search/AdvancedSearch.ve.js +30 -8
- package/lib/list-bar/index.js +305 -301
- package/lib/list-bar/index.umd.cjs +1 -1
- package/lib/list-bar/list-bar/InputGroupWrapper.js +10 -19
- package/lib/list-bar/list-bar/ListBar.js +105 -121
- package/lib/list-bar/list-bar/ListBar.ve.js +13 -17
- package/lib/list-bar/list-bar/ListBarSearch.js +20 -21
- package/lib/list-bar/list-bar/ListBarSearchInfo.js +8 -12
- package/lib/list-bar/list-bar/ListBarSortBy.js +28 -38
- package/lib/list-bar/search-results-bar/SearchResultsBar.js +38 -28
- package/lib/list-bar/search-results-bar/SearchResultsBar.ve.js +4 -11
- package/lib/list-bar/style.css +2 -1
- package/lib/matrix/index.js +79 -87
- package/lib/matrix/index.umd.cjs +1 -1
- package/lib/matrix/matrix/Matrix.js +18 -26
- package/lib/matrix/matrix/Matrix.ve.js +4 -7
- package/lib/matrix/matrix-body/MatrixBody.js +10 -13
- package/lib/matrix/matrix-cell/MatrixCell.js +23 -18
- package/lib/matrix/matrix-head/MatrixHead.js +10 -13
- package/lib/matrix/matrix-header/MatrixHeader.js +20 -23
- package/lib/matrix/matrix-row/MatrixRow.js +10 -13
- package/lib/matrix/style.css +2 -1
- package/lib/modal/index.js +197 -187
- package/lib/modal/index.umd.cjs +1 -1
- package/lib/modal/modal/Modal.js +90 -108
- package/lib/modal/modal/Modal.ve.js +43 -13
- package/lib/modal/modal/useModal.js +19 -24
- package/lib/modal/modal-footer/ModalFooter.js +11 -12
- package/lib/modal/style.css +2 -1
- package/lib/node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.21.2/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js +49 -0
- package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/index.browser.js +8 -10
- package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/url-alphabet/index.js +4 -4
- package/lib/page-title/heading-level/HeadingLevel.js +8 -12
- package/lib/page-title/index.js +33 -40
- package/lib/page-title/index.umd.cjs +1 -1
- package/lib/page-title/page-subtitle/PageSubtitle.js +13 -18
- package/lib/page-title/page-subtitle/PageSubtitle.ve.js +4 -5
- package/lib/page-title/page-title/PageTitle.js +15 -19
- package/lib/page-title/page-title/PageTitle.ve.js +4 -7
- package/lib/page-title/style.css +2 -1
- package/lib/photo/index.js +174 -177
- package/lib/photo/index.umd.cjs +1 -1
- package/lib/photo/photo/Photo.js +72 -81
- package/lib/photo/photo/Photo.ve.js +21 -7
- package/lib/photo/photo-carousel/PhotoCarousel.js +36 -51
- package/lib/photo/photo-carousel/PhotoCarousel.ve.js +13 -9
- package/lib/photo/style.css +2 -1
- package/lib/product-bar/hooks/usePriorityPlus.js +88 -104
- package/lib/product-bar/index.js +372 -395
- package/lib/product-bar/index.umd.cjs +1 -1
- package/lib/product-bar/product-bar/ProductBar.js +77 -103
- package/lib/product-bar/product-bar/ProductBar.ve.js +46 -15
- package/lib/product-bar/product-bar-name/ProductBarName.js +37 -40
- package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.js +48 -70
- package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.ve.js +4 -8
- package/lib/product-bar/product-bar-tab/ProductBarTab.js +28 -26
- package/lib/product-bar/slack-link/SlackLink.js +26 -30
- package/lib/product-bar/slack-link/SlackLink.ve.js +4 -5
- package/lib/product-bar/style.css +2 -1
- package/lib/product-bar-vertical/index.js +240 -251
- package/lib/product-bar-vertical/index.umd.cjs +1 -1
- package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.js +42 -61
- package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.ve.js +53 -23
- package/lib/product-bar-vertical/product-bar-vertical-header/ProductBarVerticalHeader.js +30 -42
- package/lib/product-bar-vertical/product-bar-vertical-item/ProductBarVerticalItem.js +71 -89
- package/lib/product-bar-vertical/product-bar-vertical-section/ProductBarVerticalSection.js +22 -29
- package/lib/product-bar-vertical/style.css +2 -1
- package/lib/progress-indicators/index.js +372 -255
- package/lib/progress-indicators/index.umd.cjs +1 -1
- package/lib/progress-indicators/progress-bar/ProgressBar.js +66 -110
- package/lib/progress-indicators/progress-bar/ProgressBar.ve.js +66 -13
- package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.js +34 -54
- package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.ve.js +136 -8
- package/lib/progress-indicators/progress-ring/ProgressRing.js +45 -52
- package/lib/progress-indicators/style.css +2 -1
- package/lib/rich-text-editor/index.js +556 -582
- package/lib/rich-text-editor/index.umd.cjs +11 -11
- package/lib/rich-text-editor/rich-text-editor/RTELinkModal.js +29 -33
- package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.js +23 -37
- package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.ve.js +13 -6
- package/lib/rich-text-editor/rich-text-editor/RichTextEditor.js +68 -77
- package/lib/rich-text-editor/rich-text-editor/RichTextEditor.ve.js +21 -8
- package/lib/rich-text-editor/rich-text-editor/hooks/useHtmlToMd.js +14 -20
- package/lib/rich-text-editor/rich-text-editor/hooks/useMdToHtml.js +14 -20
- package/lib/rich-text-editor/rich-text-editor/hooks/useRTEContent.js +33 -27
- package/lib/rich-text-editor/rich-text-editor/hooks/useRTEObserver.js +79 -88
- package/lib/rich-text-editor/rich-text-editor/hooks/useRTESelectionListener.js +28 -36
- package/lib/rich-text-editor/rich-text-editor/hooks/useRTEToolbarButtons.js +195 -211
- package/lib/rich-text-editor/rich-text-editor/icons/BOLD.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/INDENT.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/ITALICS.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/LINK.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/ORDERED_LIST.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/OUTDENT.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/REDO.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/UNDO.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/UNLINK.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/icons/UNORDERED_LIST.svg.js +4 -4
- package/lib/rich-text-editor/rich-text-editor/utils/flattenListItemParagraphs.js +12 -12
- package/lib/rich-text-editor/rich-text-editor/utils/removeUnrepresentableBreaks.js +20 -19
- package/lib/rich-text-editor/rich-text-editor/utils/utils.js +11 -15
- package/lib/rich-text-editor/style.css +2 -1
- package/lib/scrollable-container/ScrollableContainer.js +18 -27
- package/lib/scrollable-container/ScrollableContainer.ve.js +4 -4
- package/lib/scrollable-container/index.js +20 -27
- package/lib/scrollable-container/index.umd.cjs +1 -1
- package/lib/scrollable-container/style.css +2 -1
- package/lib/side-nav/index.js +190 -228
- package/lib/side-nav/index.umd.cjs +1 -1
- package/lib/side-nav/side-nav/SideNav.js +43 -60
- package/lib/side-nav/side-nav/SideNav.ve.js +22 -16
- package/lib/side-nav/side-nav/navContext.js +7 -7
- package/lib/side-nav/side-nav-header/SideNavHeader.js +14 -15
- package/lib/side-nav/side-nav-item/SideNavItem.js +68 -94
- package/lib/side-nav/side-nav-section/SideNavSection.js +16 -26
- package/lib/side-nav/style.css +2 -1
- package/lib/sorting-header/caret/caret.ve.js +13 -5
- package/lib/sorting-header/index.js +269 -251
- package/lib/sorting-header/index.umd.cjs +1 -1
- package/lib/sorting-header/sorting-header/SortingHeader.js +110 -124
- package/lib/sorting-header/sorting-header/SortingHeader.ve.js +30 -6
- package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.js +69 -83
- package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.ve.js +21 -7
- package/lib/sorting-header/style.css +2 -1
- package/lib/style.css +2 -1
- package/lib/tabs/index.js +255 -201
- package/lib/tabs/index.umd.cjs +1 -1
- package/lib/tabs/style.css +2 -1
- package/lib/tabs/tab/Tab.js +24 -27
- package/lib/tabs/tab/Tab.ve.js +76 -6
- package/lib/tabs/tab-panel/TabPanel.js +16 -25
- package/lib/tabs/tabs/Tabs.js +101 -112
- package/lib/tabs/tabs/Tabs.ve.js +13 -11
- package/lib/tags/clickable-tag/ClickableTag.js +86 -90
- package/lib/tags/clickable-tag/ClickableTag.ve.js +66 -9
- package/lib/tags/index.js +342 -199
- package/lib/tags/index.umd.cjs +1 -1
- package/lib/tags/split-tag/SplitTag.js +49 -30
- package/lib/tags/split-tag/SplitTag.ve.js +35 -9
- package/lib/tags/style.css +2 -1
- package/lib/tags/tag/Tag.js +42 -38
- package/lib/tags/tag/Tag.ve.js +41 -6
- package/lib/utils/cl.js +5 -5
- package/lib/zero-state/ZeroState.js +36 -29
- package/lib/zero-state/ZeroState.ve.js +29 -11
- package/lib/zero-state/index.js +103 -78
- package/lib/zero-state/index.umd.cjs +1 -1
- package/lib/zero-state/style.css +2 -1
- package/package.json +12 -12
- package/lib/node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.17.4/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("@sps-woodland/core"),require("@sps-woodland/core/button"),require("@sps-woodland/core/tag"),require("@spscommerce/utils"),require("@spscommerce/ds-react"),require("@spscommerce/i18n"),require("@sps-woodland/tokens")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core","@sps-woodland/core/button","@sps-woodland/core/tag","@spscommerce/utils","@spscommerce/ds-react","@spscommerce/i18n","@sps-woodland/tokens"],v):(n=typeof globalThis<"u"?globalThis:n||self,v(n.ListBar={},n.react,n.spsWoodlandCore,n.spsWoodlandCoreButton,n.spsWoodlandCoreTag,n.spscommerceUtils,n.spscommerceDsReact,n.spscommerceI18n,n.spsWoodlandTokens))})(this,(function(n,v,o,y,z,x,B,C,K){"use strict";function U(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>a[t]})}}return r.default=a,Object.freeze(r)}const e=U(v);var J="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_1o1g57h0",Q="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_1o1g57h1",X="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_1o1g57h2",Z="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_1o1g57h3",$="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_1o1g57h4",ee="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_1o1g57h5",ae="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_1o1g57h6",te="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_1o1g57h7";function R({results:a,selections:r,zeroStateText:t,onClear:s,className:_,children:d,...p}){const{t:l}=C.useWoodlandLanguage(),m=r?Object.keys(r).reduce((i,u)=>(r[u].length>0&&(i[u]=r[u]),i),{}):{};return e.createElement("div",{className:Q,...p},a!=null&&e.createElement("div",{className:X},e.createElement("span",null,l("searchResultsBar.results",{defaultValue:"Results:"})),e.createElement(z.Tag,{className:Z,kind:"info"},e.createElement("span",null,a))),e.createElement("div",{className:$},Object.keys(m).length>0?Object.keys(m).map((i,u)=>e.createElement(e.Fragment,{key:i},e.createElement("span",{key:u,className:ee},i,":"),m[i].map((g,b)=>e.createElement(z.Tag,{className:ae,key:b,kind:"key"},e.createElement("span",null,g))))):e.createElement("span",{className:"font-italic"},t||l("searchResultsBar.noAdvancedSearchSelections",{defaultValue:"No Advanced Search Selections"}))),e.createElement("div",{className:te},e.createElement(y.Button,{fill:!0,noWrap:!0,kind:"link",onClick:s},l("searchResultsBar.clearResults",{defaultValue:"Clear Results"}))))}o.Metadata.set(R,{name:"Search Results Bar",props:{results:{type:"number | string | null"},selections:{type:"{ [key: string]: string[] }"},zeroStateText:{type:"string"},onClear:{type:"() => void"}}});function re(a,r,t){return r in a?Object.defineProperty(a,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[r]=t,a}function P(a,r){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);r&&(s=s.filter(function(_){return Object.getOwnPropertyDescriptor(a,_).enumerable})),t.push.apply(t,s)}return t}function j(a){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?P(Object(t),!0).forEach(function(s){re(a,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach(function(s){Object.defineProperty(a,s,Object.getOwnPropertyDescriptor(t,s))})}return a}var se=(a,r,t)=>{for(var s of Object.keys(a)){var _;if(a[s]!==((_=r[s])!==null&&_!==void 0?_:t[s]))return!1}return!0},T=a=>r=>{var t=a.defaultClassName,s=j(j({},a.defaultVariants),r);for(var _ in s){var d,p=(d=s[_])!==null&&d!==void 0?d:a.defaultVariants[_];if(p!=null){var l=p;typeof l=="boolean"&&(l=l===!0?"true":"false");var m=a.variantClassNames[_][l];m&&(t+=" "+m)}}for(var[i,u]of a.compoundVariants)se(i,s,a.defaultVariants)&&(t+=" "+u);return t},ne=T({defaultClassName:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv1",variantClassNames:{pinned:{true:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv2",false:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv3"}},defaultVariants:{pinned:!1},compoundVariants:[]}),oe="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv4",_e="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv5",le="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv6",ie="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv7",ce="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv8",de="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwv9",pe="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwva",V="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwvb",ue="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwvc",me="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwvd",fe="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwve",he="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_uzzgwvf";function M({children:a}){const r=o.modChildren(a,t=>t.type===y.Button?[{className:o.cl(t.props.className,fe)}]:[]);return e.createElement(e.Fragment,null,r)}function F({onSubmit:a,children:r}){function t(s){s.preventDefault(),a&&a(s)}return e.createElement("form",{onSubmit:t,className:ue,noValidate:!0},e.createElement(B.SpsInputGroup,{className:me},e.createElement(M,null,r)))}o.Metadata.set(F,{name:"ListBarSearch",props:{onSubmit:{type:"FormEventHandler"}}});function L({children:a}){return e.createElement("div",null,a)}o.Metadata.set(L,{name:"ListBarSearchInfo"});function A({advancedSearch:a,onToggleAdvancedSearch:r,title:t,onToolbarPinned:s,selectable:_,isSelected:d,isIndeterminate:p,disableSelection:l=!1,onSelectionChange:m,pinResultsBar:i,pinToolbar:u=!0,advancedSearchToggleText:g,children:b,className:E,...k}){const{t:we}=C.useWoodlandLanguage();let N=null;const[f,D]=e.useState(!1),w=e.useRef(null),h=e.useRef(null),{"data-testid":q}=k,O=x.lockToAnimationFrames(()=>{if(w.current&&u){const c=w.current.getBoundingClientRect();if(!c)return;const Ne=Math.round(c.height),Oe=Math.round(c.top),ze=Math.round(window.scrollY);Ne>0&&Oe<=60&&(typeof N=="number"?ze<=N&&(N=null,D(!1)):(N=Math.round(window.scrollY),D(!0),r&&r(!1)))}});e.useEffect(()=>(window.addEventListener("scroll",O),window.addEventListener("resize",O),()=>{window.removeEventListener("scroll",O),window.removeEventListener("resize",O)}),[]);const S=e.useRef();e.useLayoutEffect(()=>{if(h.current&&w.current&&u){if(f&&S.current)h.current.style.height=S.current.height,h.current.style.width=S.current.width,h.current.style.marginBottom=S.current.marginBottom;else if(!f){h.current.style.height="",h.current.style.width="",h.current.style.marginBottom="";const c=window.getComputedStyle(w.current);S.current={height:c.height,width:c.width,marginBottom:c.marginBottom}}}},[f]);function Se(){r&&r(!a?.isOpen)}function Be(c){s&&s(c)}e.useEffect(()=>{Be(f)},[f]);const[G,Ee,ke,[H],Y]=o.selectChildren(b,[{type:F},{type:L},{type:R},{custom:c=>o.Metadata.isWoodlandComponent(c)&&o.Metadata.get(c).name==="Tabs"}]);return e.createElement("div",{className:o.cl(E),ref:h,...k},e.createElement("div",{className:ne({pinned:f}),ref:w},H?o.addProps(H,{context:"container"}):e.createElement(e.Fragment,null,e.createElement("div",{className:oe},!!_&&e.createElement("div",{className:_e},e.createElement(B.SpsCheckbox,{checked:d,disabled:l,indeterminate:p,onChange:()=>{m?.(!d)}})),e.createElement("div",{className:le},!t&&G,!t&&Ee,G.length>0&&a&&e.createElement("div",{className:ie,"data-testid":`${q}__advanced-search`},e.createElement("div",{className:ce},e.createElement(y.Button,{kind:"link",onClick:Se},g??we("listToolbar.advancedSearchToggle",{defaultValue:"Advanced Search"}))),(a.enteredFields||0)>0&&e.createElement(z.Tag,{className:de,kind:"info","data-testid":`${q}__entered-fields`},e.createElement("span",null,a.enteredFields))),t&&e.createElement("div",{className:pe},t)),f?e.createElement("div",{className:V},e.createElement(o.PortalContext.Provider,{value:{fixed:!0}},Y)):e.createElement("div",{className:V},Y)),e.createElement("div",{className:J},(!f||i)&&ke))))}o.Metadata.set(A,{name:"ListBar",props:{activeTab:{type:"Tab"},advancedSearch:{type:"{ isOpen: boolean, enteredFields: number }"},onToggleAdvancedSearch:{type:"(boolean) => void"},title:{type:"string"},onToolbarPinned:{type:"(boolean) => void"},selectable:{type:"boolean"},disableSelection:{type:"boolean",default:"false"},isSelected:{type:"boolean"},isIndeterminate:{type:"boolean"},onSelectionChange:{type:"(boolean) => void"},pinResultsBar:{type:"boolean"},pinToolbar:{type:"boolean",default:"true"},advancedSearchToggleText:{type:"string"}}});function W({options:a,activeOption:r,onSortChange:t,defaultOption:s,className:_,...d}){const p=(a||[]).map(l=>[{label:l.label,icon:l.icon},()=>{t&&t(l)}]);return e.createElement(B.SpsDropdown,{className:o.cl(_,he),icon:r?.icon||s?.icon,label:r?.label||s?.label,options:p})}o.Metadata.set(W,{name:"ListBarSortBy",props:{options:{type:"SortOption[]"},activeOption:{type:"SortOption"},onSortChange:{type:"(option: SortOption) => void"},defaultOption:{type:"SortOption"}}});var ve=T({defaultClassName:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc0",variantClassNames:{open:{true:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc1",false:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc2"},compact:{true:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc3",false:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc4"}},defaultVariants:{open:!1,compact:!1},compoundVariants:[]}),ye=T({defaultClassName:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc5",variantClassNames:{open:{true:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc6",false:"pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc7"}},defaultVariants:{open:!0},compoundVariants:[]}),ge="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc8",be="pkg_sps-woodland_core__family_list-bar__version_8_56_2__hash_am9pfc9";function I({formArray:a,formGroup:r,formMeta:t,onSubmit:s,controlsDisabled:_,footerLinks:d,isOpen:p,onClear:l,submitButtonText:m,compact:i,className:u,children:g,...b}){const{t:E}=C.useWoodlandLanguage();function k(){l&&l()}return e.createElement("div",{className:o.cl(ve({open:p,compact:i})),...b},e.createElement(B.SpsForm,{onSubmit:s,formArray:a,formGroup:r,formMeta:t},e.createElement("div",{className:ye({open:p})},g),e.createElement("div",{className:ge},d&&e.createElement("div",{id:"footer_links"},o.contentOf(d)),e.createElement("div",{className:be},e.createElement(y.Button,{kind:"default",type:"button",className:K.sprinkles({mr:"sm"}),onClick:k,disabled:_},E("advancedSearch.clear",{defaultValue:"Clear Fields"})),e.createElement(y.Button,{kind:"key",type:"submit",disabled:_},m??E("advancedSearch.search",{defaultValue:"Search"}))))))}o.Metadata.set(I,{name:"Advanced Search",props:{formArray:{type:"SpsFormArray<any>"},formGroup:{type:"SpsFormGroup"},formMeta:{type:"SpsFormSetMeta<any>"},onSubmit:{type:"React.FormEventHandler"},controlsDisabled:{type:"boolean"},footerLinks:{type:"React.ReactNode | (() => React.ReactNode)"},isOpen:{type:"boolean"},onClear:{type:"() => void"},submitButtonText:{type:"string"},compact:{type:"boolean"}}}),n.AdvancedSearch=I,n.InputGroupWrapper=M,n.ListBar=A,n.ListBarSearch=F,n.ListBarSearchInfo=L,n.ListBarSortBy=W,n.SearchResultsBar=R,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("@sps-woodland/core"),require("@sps-woodland/core/button"),require("@sps-woodland/core/tag"),require("@spscommerce/utils"),require("@spscommerce/ds-react"),require("@spscommerce/i18n"),require("@sps-woodland/tokens")):typeof define==`function`&&define.amd?define([`exports`,`react`,`@sps-woodland/core`,`@sps-woodland/core/button`,`@sps-woodland/core/tag`,`@spscommerce/utils`,`@spscommerce/ds-react`,`@spscommerce/i18n`,`@sps-woodland/tokens`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ListBar={},e.react,e.spsWoodlandCore,e.spsWoodlandCoreButton,e.spsWoodlandCoreTag,e.spscommerceUtils,e.spscommerceDsReact,e.spscommerceI18n,e.spsWoodlandTokens))})(this,function(e,t,n,r,i,a,o,s,c){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var l=Object.create,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,p=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,h=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=f(t),a=0,o=i.length,s;a<o;a++)s=i[a],!m.call(e,s)&&s!==n&&u(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=d(t,s))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:l(p(e)),h(t||!e||!e.__esModule||!m.call(e,`default`)?u(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);var g=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h0`,_=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h1`,v=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h4`,y=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h5`,b=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h6`,x=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h7`;function S({results:e,selections:n,zeroStateText:a,onClear:o,className:c,children:l,...u}){let{t:d}=(0,s.useWoodlandLanguage)(),f=n?Object.keys(n).reduce((e,t)=>(n[t].length>0&&(e[t]=n[t]),e),{}):{};return t.createElement(`div`,{className:_,...u},e!=null&&t.createElement(`div`,{className:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h2`},t.createElement(`span`,null,d(`searchResultsBar.results`,{defaultValue:`Results:`})),t.createElement(i.Tag,{className:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h3`,kind:`info`},t.createElement(`span`,null,e))),t.createElement(`div`,{className:v},Object.keys(f).length>0?Object.keys(f).map((e,n)=>t.createElement(t.Fragment,{key:e},t.createElement(`span`,{key:n,className:y},e,`:`),f[e].map((e,n)=>t.createElement(i.Tag,{className:b,key:n,kind:`key`},t.createElement(`span`,null,e))))):t.createElement(`span`,{className:`font-italic`},a||d(`searchResultsBar.noAdvancedSearchSelections`,{defaultValue:`No Advanced Search Selections`}))),t.createElement(`div`,{className:x},t.createElement(r.Button,{fill:!0,noWrap:!0,kind:`link`,onClick:o},d(`searchResultsBar.clearResults`,{defaultValue:`Clear Results`}))))}n.Metadata.set(S,{name:`Search Results Bar`,props:{results:{type:`number | string | null`},selections:{type:`{ [key: string]: string[] }`},zeroStateText:{type:`string`},onClear:{type:`() => void`}}});function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?w(Object(n),!0).forEach(function(t){C(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var E=(e,t,n)=>{for(var r of Object.keys(e))if(e[r]!==(t[r]??n[r]))return!1;return!0},D=e=>t=>{var n=e.defaultClassName,r=T(T({},e.defaultVariants),t);for(var i in r){var a=r[i]??e.defaultVariants[i];if(a!=null){var o=a;typeof o==`boolean`&&(o=o===!0?`true`:`false`);var s=e.variantClassNames[i][o];s&&(n+=` `+s)}}for(var[c,l]of e.compoundVariants)E(c,r,e.defaultVariants)&&(n+=` `+l);return n},O=D({defaultClassName:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv1`,variantClassNames:{pinned:{true:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv2`,false:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv3`}},defaultVariants:{pinned:!1},compoundVariants:[]}),k=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv4`,A=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv6`,j=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwvb`,M=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwvc`,N=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwvd`,P=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwve`,F=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwvf`;function I({children:e}){let i=(0,n.modChildren)(e,e=>e.type===r.Button?[{className:(0,n.cl)(e.props.className,P)}]:[]);return t.createElement(t.Fragment,null,i)}function L({onSubmit:e,children:n}){function r(t){t.preventDefault(),e&&e(t)}return t.createElement(`form`,{onSubmit:r,className:M,noValidate:!0},t.createElement(o.SpsInputGroup,{className:N},t.createElement(I,null,n)))}n.Metadata.set(L,{name:`ListBarSearch`,props:{onSubmit:{type:`FormEventHandler`}}});function R({children:e}){return t.createElement(`div`,null,e)}n.Metadata.set(R,{name:`ListBarSearchInfo`});function z({advancedSearch:e,onToggleAdvancedSearch:c,title:l,onToolbarPinned:u,selectable:d,isSelected:f,isIndeterminate:p,disableSelection:m=!1,onSelectionChange:h,pinResultsBar:_,pinToolbar:v=!0,advancedSearchToggleText:y,children:b,className:x,...C}){let{t:w}=(0,s.useWoodlandLanguage)(),T=null,[E,D]=t.useState(!1),M=t.useRef(null),N=t.useRef(null),{"data-testid":P}=C,F=(0,a.lockToAnimationFrames)(()=>{if(M.current&&v){let e=M.current.getBoundingClientRect();if(!e)return;let t=Math.round(e.height),n=Math.round(e.top),r=Math.round(window.scrollY);t>0&&n<=60&&(typeof T==`number`?r<=T&&(T=null,D(!1)):(T=Math.round(window.scrollY),D(!0),c&&c(!1)))}});t.useEffect(()=>(window.addEventListener(`scroll`,F),window.addEventListener(`resize`,F),()=>{window.removeEventListener(`scroll`,F),window.removeEventListener(`resize`,F)}),[]);let I=t.useRef();t.useLayoutEffect(()=>{if(N.current&&M.current&&v){if(E&&I.current)N.current.style.height=I.current.height,N.current.style.width=I.current.width,N.current.style.marginBottom=I.current.marginBottom;else if(!E){N.current.style.height=``,N.current.style.width=``,N.current.style.marginBottom=``;let e=window.getComputedStyle(M.current);I.current={height:e.height,width:e.width,marginBottom:e.marginBottom}}}},[E]);function z(){c&&c(!e?.isOpen)}function B(e){u&&u(e)}t.useEffect(()=>{B(E)},[E]);let[V,H,U,[W],G]=(0,n.selectChildren)(b,[{type:L},{type:R},{type:S},{custom:e=>n.Metadata.isWoodlandComponent(e)&&n.Metadata.get(e).name===`Tabs`}]);return t.createElement(`div`,{className:(0,n.cl)(x),ref:N,...C},t.createElement(`div`,{className:O({pinned:E}),ref:M},W?(0,n.addProps)(W,{context:`container`}):t.createElement(t.Fragment,null,t.createElement(`div`,{className:k},!!d&&t.createElement(`div`,{className:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv5`},t.createElement(o.SpsCheckbox,{checked:f,disabled:m,indeterminate:p,onChange:()=>{h?.(!f)}})),t.createElement(`div`,{className:A},!l&&V,!l&&H,V.length>0&&e&&t.createElement(`div`,{className:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv7`,"data-testid":`${P}__advanced-search`},t.createElement(`div`,{className:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv8`},t.createElement(r.Button,{kind:`link`,onClick:z},y??w(`listToolbar.advancedSearchToggle`,{defaultValue:`Advanced Search`}))),(e.enteredFields||0)>0&&t.createElement(i.Tag,{className:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv9`,kind:`info`,"data-testid":`${P}__entered-fields`},t.createElement(`span`,null,e.enteredFields))),l&&t.createElement(`div`,{className:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwva`},l)),E?t.createElement(`div`,{className:j},t.createElement(n.PortalContext.Provider,{value:{fixed:!0}},G)):t.createElement(`div`,{className:j},G)),t.createElement(`div`,{className:g},(!E||_)&&U))))}n.Metadata.set(z,{name:`ListBar`,props:{activeTab:{type:`Tab`},advancedSearch:{type:`{ isOpen: boolean, enteredFields: number }`},onToggleAdvancedSearch:{type:`(boolean) => void`},title:{type:`string`},onToolbarPinned:{type:`(boolean) => void`},selectable:{type:`boolean`},disableSelection:{type:`boolean`,default:`false`},isSelected:{type:`boolean`},isIndeterminate:{type:`boolean`},onSelectionChange:{type:`(boolean) => void`},pinResultsBar:{type:`boolean`},pinToolbar:{type:`boolean`,default:`true`},advancedSearchToggleText:{type:`string`}}});function B({options:e,activeOption:r,onSortChange:i,defaultOption:a,className:s,...c}){let l=(e||[]).map(e=>[{label:e.label,icon:e.icon},()=>{i&&i(e)}]);return t.createElement(o.SpsDropdown,{className:(0,n.cl)(s,F),icon:r?.icon||a?.icon,label:r?.label||a?.label,options:l})}n.Metadata.set(B,{name:`ListBarSortBy`,props:{options:{type:`SortOption[]`},activeOption:{type:`SortOption`},onSortChange:{type:`(option: SortOption) => void`},defaultOption:{type:`SortOption`}}});var V=D({defaultClassName:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc0`,variantClassNames:{open:{true:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc1`,false:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc2`},compact:{true:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc3`,false:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc4`}},defaultVariants:{open:!1,compact:!1},compoundVariants:[]}),H=D({defaultClassName:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc5`,variantClassNames:{open:{true:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc6`,false:`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc7`}},defaultVariants:{open:!0},compoundVariants:[]}),U=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc8`,W=`pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_am9pfc9`;function G({formArray:e,formGroup:i,formMeta:a,onSubmit:l,controlsDisabled:u,footerLinks:d,isOpen:f,onClear:p,submitButtonText:m,compact:h,className:g,children:_,...v}){let{t:y}=(0,s.useWoodlandLanguage)();function b(){p&&p()}return t.createElement(`div`,{className:(0,n.cl)(V({open:f,compact:h})),...v},t.createElement(o.SpsForm,{onSubmit:l,formArray:e,formGroup:i,formMeta:a},t.createElement(`div`,{className:H({open:f})},_),t.createElement(`div`,{className:U},d&&t.createElement(`div`,{id:`footer_links`},(0,n.contentOf)(d)),t.createElement(`div`,{className:W},t.createElement(r.Button,{kind:`default`,type:`button`,className:(0,c.sprinkles)({mr:`sm`}),onClick:b,disabled:u},y(`advancedSearch.clear`,{defaultValue:`Clear Fields`})),t.createElement(r.Button,{kind:`key`,type:`submit`,disabled:u},m??y(`advancedSearch.search`,{defaultValue:`Search`}))))))}n.Metadata.set(G,{name:`Advanced Search`,props:{formArray:{type:`SpsFormArray<any>`},formGroup:{type:`SpsFormGroup`},formMeta:{type:`SpsFormSetMeta<any>`},onSubmit:{type:`React.FormEventHandler`},controlsDisabled:{type:`boolean`},footerLinks:{type:`React.ReactNode | (() => React.ReactNode)`},isOpen:{type:`boolean`},onClear:{type:`() => void`},submitButtonText:{type:`string`},compact:{type:`boolean`}}}),e.AdvancedSearch=G,e.InputGroupWrapper=I,e.ListBar=z,e.ListBarSearch=L,e.ListBarSearchInfo=R,e.ListBarSortBy=B,e.SearchResultsBar=S});
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
t,
|
|
10
|
-
(r) => r.type === p ? [
|
|
11
|
-
{
|
|
12
|
-
className: n(r.props.className, a)
|
|
13
|
-
}
|
|
14
|
-
] : []
|
|
15
|
-
);
|
|
16
|
-
return /* @__PURE__ */ o.createElement(o.Fragment, null, e);
|
|
1
|
+
import { inputGroupIconButton as e } from "./ListBar.ve.js";
|
|
2
|
+
import { cl as t, modChildren as n } from "@sps-woodland/core";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { Button as i } from "@sps-woodland/core/button";
|
|
5
|
+
//#region src/list-bar/list-bar/InputGroupWrapper.tsx
|
|
6
|
+
function a({ children: a }) {
|
|
7
|
+
let o = n(a, (n) => n.type === i ? [{ className: t(n.props.className, e) }] : []);
|
|
8
|
+
return /* @__PURE__ */ r.createElement(r.Fragment, null, o);
|
|
17
9
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { a as InputGroupWrapper };
|
|
@@ -1,123 +1,107 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
]);
|
|
83
|
-
return /* @__PURE__ */ e.createElement("div", { className: z(k), ref: n, ...h }, /* @__PURE__ */ e.createElement("div", { className: U({ pinned: r }), ref: a }, E ? H(E, { context: "container" }) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: X }, !!w && /* @__PURE__ */ e.createElement("div", { className: Z }, /* @__PURE__ */ e.createElement(
|
|
84
|
-
q,
|
|
85
|
-
{
|
|
86
|
-
checked: p,
|
|
87
|
-
disabled: C,
|
|
88
|
-
indeterminate: S,
|
|
89
|
-
onChange: () => {
|
|
90
|
-
T?.(!p);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
)), /* @__PURE__ */ e.createElement("div", { className: ee }, !s && y, !s && A, y.length > 0 && l && /* @__PURE__ */ e.createElement(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
className: te,
|
|
97
|
-
"data-testid": `${v}__advanced-search`
|
|
98
|
-
},
|
|
99
|
-
/* @__PURE__ */ e.createElement("div", { className: re }, /* @__PURE__ */ e.createElement($, { kind: "link", onClick: F }, L ?? x("listToolbar.advancedSearchToggle", { defaultValue: "Advanced Search" }))),
|
|
100
|
-
(l.enteredFields || 0) > 0 && /* @__PURE__ */ e.createElement(V, { className: ne, kind: "info", "data-testid": `${v}__entered-fields` }, /* @__PURE__ */ e.createElement("span", null, l.enteredFields))
|
|
101
|
-
), s && /* @__PURE__ */ e.createElement("div", { className: ae }, s)), r ? /* @__PURE__ */ e.createElement("div", { className: b }, /* @__PURE__ */ e.createElement(O.Provider, { value: { fixed: !0 } }, B)) : /* @__PURE__ */ e.createElement("div", { className: b }, B)), /* @__PURE__ */ e.createElement("div", { className: G }, (!r || N) && I))));
|
|
1
|
+
import { searchResultsBarWrapper as e } from "../search-results-bar/SearchResultsBar.ve.js";
|
|
2
|
+
import { SearchResultsBar as t } from "../search-results-bar/SearchResultsBar.js";
|
|
3
|
+
import { listBar as n, listBarContent as r, listBarHeaderContent as i, listBarSearchControls as a } from "./ListBar.ve.js";
|
|
4
|
+
import { ListBarSearch as o } from "./ListBarSearch.js";
|
|
5
|
+
import { ListBarSearchInfo as s } from "./ListBarSearchInfo.js";
|
|
6
|
+
import { Metadata as c, PortalContext as l, addProps as u, cl as d, selectChildren as f } from "@sps-woodland/core";
|
|
7
|
+
import * as p from "react";
|
|
8
|
+
import { useWoodlandLanguage as m } from "@spscommerce/i18n";
|
|
9
|
+
import { lockToAnimationFrames as h } from "@spscommerce/utils";
|
|
10
|
+
import { Button as g } from "@sps-woodland/core/button";
|
|
11
|
+
import { Tag as _ } from "@sps-woodland/core/tag";
|
|
12
|
+
import { SpsCheckbox as v } from "@spscommerce/ds-react";
|
|
13
|
+
//#region src/list-bar/list-bar/ListBar.tsx
|
|
14
|
+
function y({ advancedSearch: y, onToggleAdvancedSearch: b, title: x, onToolbarPinned: S, selectable: C, isSelected: w, isIndeterminate: T, disableSelection: E = !1, onSelectionChange: D, pinResultsBar: O, pinToolbar: k = !0, advancedSearchToggleText: A, children: j, className: M, ...N }) {
|
|
15
|
+
let { t: P } = m(), F = null, [I, L] = p.useState(!1), R = p.useRef(null), z = p.useRef(null), { "data-testid": B } = N, V = h(() => {
|
|
16
|
+
if (R.current && k) {
|
|
17
|
+
let e = R.current.getBoundingClientRect();
|
|
18
|
+
if (!e) return;
|
|
19
|
+
let t = Math.round(e.height), n = Math.round(e.top), r = Math.round(window.scrollY);
|
|
20
|
+
t > 0 && n <= 60 && (typeof F == "number" ? r <= F && (F = null, L(!1)) : (F = Math.round(window.scrollY), L(!0), b && b(!1)));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
p.useEffect(() => (window.addEventListener("scroll", V), window.addEventListener("resize", V), () => {
|
|
24
|
+
window.removeEventListener("scroll", V), window.removeEventListener("resize", V);
|
|
25
|
+
}), []);
|
|
26
|
+
let H = p.useRef();
|
|
27
|
+
p.useLayoutEffect(() => {
|
|
28
|
+
if (z.current && R.current && k) {
|
|
29
|
+
if (I && H.current) z.current.style.height = H.current.height, z.current.style.width = H.current.width, z.current.style.marginBottom = H.current.marginBottom;
|
|
30
|
+
else if (!I) {
|
|
31
|
+
z.current.style.height = "", z.current.style.width = "", z.current.style.marginBottom = "";
|
|
32
|
+
let e = window.getComputedStyle(R.current);
|
|
33
|
+
H.current = {
|
|
34
|
+
height: e.height,
|
|
35
|
+
width: e.width,
|
|
36
|
+
marginBottom: e.marginBottom
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}, [I]);
|
|
41
|
+
function U() {
|
|
42
|
+
b && b(!y?.isOpen);
|
|
43
|
+
}
|
|
44
|
+
function W(e) {
|
|
45
|
+
S && S(e);
|
|
46
|
+
}
|
|
47
|
+
p.useEffect(() => {
|
|
48
|
+
W(I);
|
|
49
|
+
}, [I]);
|
|
50
|
+
let [G, K, q, [J], Y] = f(j, [
|
|
51
|
+
{ type: o },
|
|
52
|
+
{ type: s },
|
|
53
|
+
{ type: t },
|
|
54
|
+
{ custom: (e) => c.isWoodlandComponent(e) && c.get(e).name === "Tabs" }
|
|
55
|
+
]);
|
|
56
|
+
return /* @__PURE__ */ p.createElement("div", {
|
|
57
|
+
className: d(M),
|
|
58
|
+
ref: z,
|
|
59
|
+
...N
|
|
60
|
+
}, /* @__PURE__ */ p.createElement("div", {
|
|
61
|
+
className: n({ pinned: I }),
|
|
62
|
+
ref: R
|
|
63
|
+
}, J ? u(J, { context: "container" }) : /* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("div", { className: r }, !!C && /* @__PURE__ */ p.createElement("div", { className: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv5" }, /* @__PURE__ */ p.createElement(v, {
|
|
64
|
+
checked: w,
|
|
65
|
+
disabled: E,
|
|
66
|
+
indeterminate: T,
|
|
67
|
+
onChange: () => {
|
|
68
|
+
D?.(!w);
|
|
69
|
+
}
|
|
70
|
+
})), /* @__PURE__ */ p.createElement("div", { className: a }, !x && G, !x && K, G.length > 0 && y && /* @__PURE__ */ p.createElement("div", {
|
|
71
|
+
className: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv7",
|
|
72
|
+
"data-testid": `${B}__advanced-search`
|
|
73
|
+
}, /* @__PURE__ */ p.createElement("div", { className: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv8" }, /* @__PURE__ */ p.createElement(g, {
|
|
74
|
+
kind: "link",
|
|
75
|
+
onClick: U
|
|
76
|
+
}, A ?? P("listToolbar.advancedSearchToggle", { defaultValue: "Advanced Search" }))), (y.enteredFields || 0) > 0 && /* @__PURE__ */ p.createElement(_, {
|
|
77
|
+
className: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv9",
|
|
78
|
+
kind: "info",
|
|
79
|
+
"data-testid": `${B}__entered-fields`
|
|
80
|
+
}, /* @__PURE__ */ p.createElement("span", null, y.enteredFields))), x && /* @__PURE__ */ p.createElement("div", { className: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwva" }, x)), I ? /* @__PURE__ */ p.createElement("div", { className: i }, /* @__PURE__ */ p.createElement(l.Provider, { value: { fixed: !0 } }, Y)) : /* @__PURE__ */ p.createElement("div", { className: i }, Y)), /* @__PURE__ */ p.createElement("div", { className: e }, (!I || O) && q))));
|
|
102
81
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
82
|
+
c.set(y, {
|
|
83
|
+
name: "ListBar",
|
|
84
|
+
props: {
|
|
85
|
+
activeTab: { type: "Tab" },
|
|
86
|
+
advancedSearch: { type: "{ isOpen: boolean, enteredFields: number }" },
|
|
87
|
+
onToggleAdvancedSearch: { type: "(boolean) => void" },
|
|
88
|
+
title: { type: "string" },
|
|
89
|
+
onToolbarPinned: { type: "(boolean) => void" },
|
|
90
|
+
selectable: { type: "boolean" },
|
|
91
|
+
disableSelection: {
|
|
92
|
+
type: "boolean",
|
|
93
|
+
default: "false"
|
|
94
|
+
},
|
|
95
|
+
isSelected: { type: "boolean" },
|
|
96
|
+
isIndeterminate: { type: "boolean" },
|
|
97
|
+
onSelectionChange: { type: "(boolean) => void" },
|
|
98
|
+
pinResultsBar: { type: "boolean" },
|
|
99
|
+
pinToolbar: {
|
|
100
|
+
type: "boolean",
|
|
101
|
+
default: "true"
|
|
102
|
+
},
|
|
103
|
+
advancedSearchToggleText: { type: "string" }
|
|
104
|
+
}
|
|
120
105
|
});
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
};
|
|
106
|
+
//#endregion
|
|
107
|
+
export { y as ListBar };
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
+
import { createRuntimeFn as e } from "../../node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.21.2/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
h as listBarSearchField,
|
|
15
|
-
p as listBarSearchForm,
|
|
16
|
-
l as listBarSelectionControls,
|
|
17
|
-
w as listBarSortBy
|
|
18
|
-
};
|
|
3
|
+
//#region src/list-bar/list-bar/ListBar.css.ts
|
|
4
|
+
var t = e({
|
|
5
|
+
defaultClassName: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv1",
|
|
6
|
+
variantClassNames: { pinned: {
|
|
7
|
+
true: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv2",
|
|
8
|
+
false: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv3"
|
|
9
|
+
} },
|
|
10
|
+
defaultVariants: { pinned: !1 },
|
|
11
|
+
compoundVariants: []
|
|
12
|
+
}), n = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv4", r = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv5", i = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv6", a = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv7", o = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv8", s = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwv9", c = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwva", l = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwvb", u = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwvc", d = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwvd", f = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwve", p = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_uzzgwvf";
|
|
13
|
+
//#endregion
|
|
14
|
+
export { f as inputGroupIconButton, t as listBar, s as listBarAdvSearchEnteredFields, c as listBarAdvSearchTitle, a as listBarAdvSearchToggle, o as listBarAdvSearchToggleWrapper, n as listBarContent, l as listBarHeaderContent, i as listBarSearchControls, d as listBarSearchField, u as listBarSearchForm, r as listBarSelectionControls, p as listBarSortBy };
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { listBarSearchField as e, listBarSearchForm as t } from "./ListBar.ve.js";
|
|
2
|
+
import { InputGroupWrapper as n } from "./InputGroupWrapper.js";
|
|
3
|
+
import { Metadata as r } from "@sps-woodland/core";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
import { SpsInputGroup as a } from "@spscommerce/ds-react";
|
|
6
|
+
//#region src/list-bar/list-bar/ListBarSearch.tsx
|
|
7
|
+
function o({ onSubmit: r, children: o }) {
|
|
8
|
+
function s(e) {
|
|
9
|
+
e.preventDefault(), r && r(e);
|
|
10
|
+
}
|
|
11
|
+
return /* @__PURE__ */ i.createElement("form", {
|
|
12
|
+
onSubmit: s,
|
|
13
|
+
className: t,
|
|
14
|
+
noValidate: !0
|
|
15
|
+
}, /* @__PURE__ */ i.createElement(a, { className: e }, /* @__PURE__ */ i.createElement(n, null, o)));
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
onSubmit: { type: "FormEventHandler" }
|
|
19
|
-
}
|
|
17
|
+
r.set(o, {
|
|
18
|
+
name: "ListBarSearch",
|
|
19
|
+
props: { onSubmit: { type: "FormEventHandler" } }
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { o as ListBarSearch };
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return /* @__PURE__ */ e.createElement("div", null, t);
|
|
1
|
+
import { Metadata as e } from "@sps-woodland/core";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
//#region src/list-bar/list-bar/ListBarSearchInfo.tsx
|
|
4
|
+
function n({ children: e }) {
|
|
5
|
+
return /* @__PURE__ */ t.createElement("div", null, e);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
a as ListBarSearchInfo
|
|
13
|
-
};
|
|
7
|
+
e.set(n, { name: "ListBarSearchInfo" });
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as ListBarSearchInfo };
|
|
@@ -1,40 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Metadata as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return /* @__PURE__ */ n.createElement(
|
|
20
|
-
m,
|
|
21
|
-
{
|
|
22
|
-
className: l(p, c),
|
|
23
|
-
icon: o?.icon || e?.icon,
|
|
24
|
-
label: o?.label || e?.label,
|
|
25
|
-
options: a
|
|
26
|
-
}
|
|
27
|
-
);
|
|
1
|
+
import { listBarSortBy as e } from "./ListBar.ve.js";
|
|
2
|
+
import { Metadata as t, cl as n } from "@sps-woodland/core";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { SpsDropdown as i } from "@spscommerce/ds-react";
|
|
5
|
+
//#region src/list-bar/list-bar/ListBarSortBy.tsx
|
|
6
|
+
function a({ options: t, activeOption: a, onSortChange: o, defaultOption: s, className: c, ...l }) {
|
|
7
|
+
let u = (t || []).map((e) => [{
|
|
8
|
+
label: e.label,
|
|
9
|
+
icon: e.icon
|
|
10
|
+
}, () => {
|
|
11
|
+
o && o(e);
|
|
12
|
+
}]);
|
|
13
|
+
return /* @__PURE__ */ r.createElement(i, {
|
|
14
|
+
className: n(c, e),
|
|
15
|
+
icon: a?.icon || s?.icon,
|
|
16
|
+
label: a?.label || s?.label,
|
|
17
|
+
options: u
|
|
18
|
+
});
|
|
28
19
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
t.set(a, {
|
|
21
|
+
name: "ListBarSortBy",
|
|
22
|
+
props: {
|
|
23
|
+
options: { type: "SortOption[]" },
|
|
24
|
+
activeOption: { type: "SortOption" },
|
|
25
|
+
onSortChange: { type: "(option: SortOption) => void" },
|
|
26
|
+
defaultOption: { type: "SortOption" }
|
|
27
|
+
}
|
|
37
28
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { a as ListBarSortBy };
|
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Metadata as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { searchResultsBar as e, searchResultsBarButtons as t, searchResultsBarSelection as n, searchResultsBarSelectionTag as r, searchResultsBarSelections as i } from "./SearchResultsBar.ve.js";
|
|
2
|
+
import { Metadata as a } from "@sps-woodland/core";
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { useWoodlandLanguage as s } from "@spscommerce/i18n";
|
|
5
|
+
import { Button as c } from "@sps-woodland/core/button";
|
|
6
|
+
import { Tag as l } from "@sps-woodland/core/tag";
|
|
7
|
+
//#region src/list-bar/search-results-bar/SearchResultsBar.tsx
|
|
8
|
+
function u({ results: a, selections: u, zeroStateText: d, onClear: f, className: p, children: m, ...h }) {
|
|
9
|
+
let { t: g } = s(), _ = u ? Object.keys(u).reduce((e, t) => (u[t].length > 0 && (e[t] = u[t]), e), {}) : {};
|
|
10
|
+
return /* @__PURE__ */ o.createElement("div", {
|
|
11
|
+
className: e,
|
|
12
|
+
...h
|
|
13
|
+
}, a != null && /* @__PURE__ */ o.createElement("div", { className: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h2" }, /* @__PURE__ */ o.createElement("span", null, g("searchResultsBar.results", { defaultValue: "Results:" })), /* @__PURE__ */ o.createElement(l, {
|
|
14
|
+
className: "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h3",
|
|
15
|
+
kind: "info"
|
|
16
|
+
}, /* @__PURE__ */ o.createElement("span", null, a))), /* @__PURE__ */ o.createElement("div", { className: i }, Object.keys(_).length > 0 ? Object.keys(_).map((e, t) => /* @__PURE__ */ o.createElement(o.Fragment, { key: e }, /* @__PURE__ */ o.createElement("span", {
|
|
17
|
+
key: t,
|
|
18
|
+
className: n
|
|
19
|
+
}, e, ":"), _[e].map((e, t) => /* @__PURE__ */ o.createElement(l, {
|
|
20
|
+
className: r,
|
|
21
|
+
key: t,
|
|
22
|
+
kind: "key"
|
|
23
|
+
}, /* @__PURE__ */ o.createElement("span", null, e))))) : /* @__PURE__ */ o.createElement("span", { className: "font-italic" }, d || g("searchResultsBar.noAdvancedSearchSelections", { defaultValue: "No Advanced Search Selections" }))), /* @__PURE__ */ o.createElement("div", { className: t }, /* @__PURE__ */ o.createElement(c, {
|
|
24
|
+
fill: !0,
|
|
25
|
+
noWrap: !0,
|
|
26
|
+
kind: "link",
|
|
27
|
+
onClick: f
|
|
28
|
+
}, g("searchResultsBar.clearResults", { defaultValue: "Clear Results" }))));
|
|
18
29
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
a.set(u, {
|
|
31
|
+
name: "Search Results Bar",
|
|
32
|
+
props: {
|
|
33
|
+
results: { type: "number | string | null" },
|
|
34
|
+
selections: { type: "{ [key: string]: string[] }" },
|
|
35
|
+
zeroStateText: { type: "string" },
|
|
36
|
+
onClear: { type: "() => void" }
|
|
37
|
+
}
|
|
27
38
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { u as SearchResultsBar };
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
o as searchResultsBarResults,
|
|
8
|
-
h as searchResultsBarSelection,
|
|
9
|
-
i as searchResultsBarSelectionTag,
|
|
10
|
-
l as searchResultsBarSelections,
|
|
11
|
-
a as searchResultsBarWrapper,
|
|
12
|
-
e as searchResutlsBarResultsTag
|
|
13
|
-
};
|
|
3
|
+
//#region src/list-bar/search-results-bar/SearchResultsBar.css.ts
|
|
4
|
+
var e = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h0", t = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h1", n = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h2", r = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h3", i = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h4", a = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h5", o = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h6", s = "pkg_sps-woodland_core__family_list-bar__version_8_56_3__hash_1o1g57h7";
|
|
5
|
+
//#endregion
|
|
6
|
+
export { t as searchResultsBar, s as searchResultsBarButtons, n as searchResultsBarResults, a as searchResultsBarSelection, o as searchResultsBarSelectionTag, i as searchResultsBarSelections, e as searchResultsBarWrapper, r as searchResutlsBarResultsTag };
|