@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(r,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("@sps-woodland/core"),require("@spscommerce/utils"),require("@sps-woodland/core/button"),require("@sps-woodland/illustrations"),require("@spscommerce/i18n")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core","@spscommerce/utils","@sps-woodland/core/button","@sps-woodland/illustrations","@spscommerce/i18n"],y):(r=typeof globalThis<"u"?globalThis:r||self,y(r.FileUpload={},r.react,r.spsWoodlandCore,r.spscommerceUtils,r.spsWoodlandCoreButton,r.spsWoodlandIllustrations,r.spscommerceI18n))})(this,(function(r,y,z,ae,A,N,oe){"use strict";function te(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const e=te(y),V={"7Z":["application/x-7z-compressed"],AAC:["audio/aac"],ABW:["application/x-abiword"],ARC:["application/octet-stream"],AVI:["video/x-msvideo"],AZW:["application/vnd.amazon.ebook"],BIN:["application/octet-stream"],BMP:["image/bmp"],BZ:["application/x-bzip"],BZ2:["application/x-bzip2"],CER:["application/pkix-cert","application/x-x509-ca-cert"],CSH:["application/x-csh"],CSS:["text/css"],CSV:["text/csv","application/vnd.ms-excel"],DOC:["application/msword"],DOT:["application/msword"],DOCX:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],DOTX:["application/vnd.openxmlformats-officedocument.wordprocessingml.template"],DOCM:["application/vnd.ms-word.document.macroEnabled.12"],DOTM:["application/vnd.ms-word.template.macroEnabled.12"],EDI:["application/edi-x12","application/edifact"],EML:["application/octet-stream","message/rfc822","multipart/mixed","message/rfc5322","message/rfc6532"],EOT:["application/vnd.ms-fontobject"],EPUB:["application/epub+zip"],ES:["application/ecmascript"],FLV:["video/x-flv"],GIF:["image/gif"],GZ:["application/x-gzip"],HTM:["text/html"],HTML:["text/html"],ICO:["image/x-icon"],ICS:["text/calendar"],JAR:["application/java-archive"],JPEG:["image/jpeg"],JPG:["image/jpeg"],JS:["application/javascript"],JSON:["application/json"],M3U:["audio/x-mpequrl"],MID:["audio/midi"],MIDI:["audio/midi"],MOV:["video/quicktime"],MP3:["audio/mpeg3"],MP4:["video/mp4"],MPEG:["video/mpeg"],MPKG:["application/vnd.apple.installer+xml"],ODP:["application/vnd.oasis.opendocument.presentation"],ODS:["application/vnd.oasis.opendocument.spreadsheet"],ODT:["application/vnd.oasis.opendocument.text"],OGA:["audio/ogg"],OGV:["video/ogg"],OGX:["application/ogg"],OTF:["font/otf"],PNG:["image/png"],PDF:["application/pdf"],POT:["application/vnd.ms-powerpoint"],POTM:["application/vnd.ms-powerpoint.template.macroEnabled.12"],POTX:["application/vnd.openxmlformats-officedocument.presentationml.template"],PPA:["application/vnd.ms-powerpoint"],PPAM:["application/vnd.ms-powerpoint.addin.macroEnabled.12"],PPS:["application/vnd.ms-powerpoint"],PPSM:["application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],PPT:["application/vnd.ms-powerpoint"],PPTM:["application/vnd.ms-powerpoint.presentation.macroEnabled.12"],PPSX:["application/vnd.openxmlformats-officedocument.presentationml.slideshow"],PPTX:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],RAR:["application/x-rar-compressed"],RTF:["application/rtf"],SH:["application/x-sh"],SVG:["image/svg+xml"],SWF:["application/x-shockwave-flash"],TAR:["application/x-tar"],TIF:["image/tiff"],TIFF:["image/tiff"],TS:["application/typescript"],TTF:["font/ttf"],TXT:["text/plain"],VSD:["application/vnd.visio"],WAV:["audio/wav"],WEBA:["audio/webm"],WEBM:["video/webm"],WEBP:["image/webp"],WOFF:["font/woff"],WOFF2:["font/woff2"],XHTML:["application/xhtml+xml"],XLA:["application/vnd.ms-excel"],XLS:["application/vnd.ms-excel"],XLSB:["application/vnd.ms-excel.sheet.binary.macroEnabled.12"],XLT:["application/vnd.ms-excel"],XLAM:["application/vnd.ms-excel.addin.macroEnabled.12"],XLSM:["application/vnd.ms-excel.sheet.macroEnabled.12"],XLSX:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],XLTM:["application/vnd.ms-excel.template.macroEnabled.12"],XLTX:["application/vnd.openxmlformats-officedocument.spreadsheetml.template"],XML:["application/xml"],XUL:["application/vnd.mozilla.xul+xml"],ZIP:["application/zip"]};function ne(a,t,o){return t in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function j(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);t&&(n=n.filter(function(p){return Object.getOwnPropertyDescriptor(a,p).enumerable})),o.push.apply(o,n)}return o}function I(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?j(Object(o),!0).forEach(function(n){ne(a,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):j(Object(o)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(o,n))})}return a}var le=(a,t,o)=>{for(var n of Object.keys(a)){var p;if(a[n]!==((p=t[n])!==null&&p!==void 0?p:o[n]))return!1}return!0},P=a=>t=>{var o=a.defaultClassName,n=I(I({},a.defaultVariants),t);for(var p in n){var m,w=(m=n[p])!==null&&m!==void 0?m:a.defaultVariants[p];if(w!=null){var _=w;typeof _=="boolean"&&(_=_===!0?"true":"false");var s=a.variantClassNames[p][_];s&&(o+=" "+s)}}for(var[T,D]of a.compoundVariants)le(T,n,a.defaultVariants)&&(o+=" "+D);return o},ie=P({defaultClassName:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk0",variantClassNames:{active:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk1",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk2"},mini:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk3",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk4"},error:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk5",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk6"},shown:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk7",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk8"},disabled:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zk9",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zka"}},defaultVariants:{active:!1,mini:!1,error:!1,shown:!0,disabled:!1},compoundVariants:[]}),se=P({defaultClassName:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkb",variantClassNames:{constrainContentWidth:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkc",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkd"},disabled:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zke",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkf"}},defaultVariants:{constrainContentWidth:!1,disabled:!1},compoundVariants:[]}),X="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkg",re=P({defaultClassName:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkh",variantClassNames:{mini:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zki",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkj"},error:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkk",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkl"},disabled:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkm",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkn"}},defaultVariants:{mini:!1,error:!1,disabled:!1},compoundVariants:[]}),pe=P({defaultClassName:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zko",variantClassNames:{mini:{true:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkp",false:"pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkq"}},defaultVariants:{mini:!1},compoundVariants:[]}),_e="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkr",ce="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zks",R="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkt",B="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zku",de="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkv",fe="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkw",ue="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkx",me="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zky",ve="pkg_sps-woodland_core__family_file-upload__version_8_56_2__hash_17kn1zkz";function W({list:a}){return e.createElement(e.Fragment,null,a.map((t,o)=>{const n=Math.floor(t.length/2);return e.createElement("div",{className:ce,key:t},e.createElement("span",{className:R},t.substring(0,n)),e.createElement("div",{className:R},e.createElement("span",null,t.substring(n))),o<a.length-1?",":"")}))}function G({constrainContentWidth:a,description:t,multiple:o=!1,dismissable:n,processing:p,mini:m,downloadLabel:w,acceptExtensions:_,maxSize:s,customRequirement:T,onSelection:D,onDismiss:q,download:Z,shown:b,className:he,disabled:c,children:Ae,...ge}){const F=e.useRef(new Set),M=e.useRef(new Set),[ke,$]=e.useState(b),[Ne,ye]=e.useState([]),[we,Ee]=e.useState(""),[H,Oe]=e.useState(),[xe,S]=e.useState(!1),[E,C]=e.useState(!1),[v,J]=e.useState([]),[h,K]=e.useState([]),[O,ze]=e.useState(""),Q=e.useMemo(()=>new Set([...v,...h]).size,[v,h]),{t:d}=oe.useWoodlandLanguage(),U=(o?d("fileUpload.instructions.other",{defaultValue:"Drag and drop your files here or |browse for files| on your desktop."}):d("fileUpload.instructions.one",{defaultValue:"Drag and drop your file here or |browse for a file| on your desktop."})).split("|"),Y=t||(o?"Files":"File"),f=e.useRef(null);e.useEffect(()=>{b&&$(b)},[b]),e.useEffect(()=>{s&&Te(s)},[s]),e.useEffect(()=>{_&&be(_)},[_]);function Pe(){n&&($(!1),q&&q())}function Te(l){try{Oe(ae.parseFileSize(l))}catch{throw new Error(`Could not parse "${l}" as a file size.`)}}function be(l){const g=(Array.isArray(l)?l:l.trim().split(/\s?,\s?/)).map(i=>i.replace(/^\./,"")),u=g.map(i=>`.${i}`.toLowerCase());ze(u.map((i,k)=>k>0&&k===u.length-1?`or ${i}`:i).join(u.length>2?", ":" ")),F.current.clear(),M.current.clear();for(const i of g){M.current.add(i.toLowerCase());const k=Object.keys(V).includes(i.toUpperCase())?V[i.toUpperCase()]:[];for(const L of k)F.current.add(L)}Ee(u.concat(Array.from(F.current)).join(","))}function ee(l){J([]),K([]);const x=[],g=[],u=l?Array.from(l):[];for(const i of u){const k=i.name.split(".").pop()?.toLowerCase()??"",L=i.type?F.current.has(i.type):M.current.has(k);_&&!L&&g.push(i.name),s&&H&&i.size>H&&x.push(i.name)}x.length||g.length?(C(!0),f.current&&f.current.value&&(f.current.value="")):(ye(u),D(u)),J(x),K(g)}function Fe(l){l.preventDefault(),C(!1),f.current&&f.current.click()}function Se(){Z&&Z()}function Ce(l){l.stopPropagation(),ee(l.target.files),f.current&&f.current.value&&(f.current.value="")}function Ue(l){l.preventDefault(),l.stopPropagation(),S(!0),C(!1)}function De(l){l.preventDefault(),S(!0),C(!1)}function Me(l){l.preventDefault(),S(!1)}function Le(l){l.preventDefault(),l.stopPropagation(),S(!1),l.dataTransfer.files&&ee(l.dataTransfer.files)}return e.createElement("div",{onDrop:c?()=>{}:Le,onDragOver:c?()=>{}:Ue,onDragLeave:c?()=>{}:Me,onDragEnter:c?()=>{}:De,className:z.cl(ie({active:xe,mini:m,error:E,shown:ke,disabled:c}),he),...ge},e.createElement("div",{className:z.cl(se({constrainContentWidth:a,disabled:c}))},p?e.createElement("div",null,e.createElement(z.Spinner,{size:"md","aria-hidden":"true"}),e.createElement("div",{className:X},d("fileUpload.processing",{defaultValue:"Processing Upload..."}))):e.createElement("div",null,e.createElement("div",{className:re({mini:m,error:E,disabled:c}),"aria-hidden":"true"},e.createElement("img",{className:ve,src:E?N.GENERAL_ERROR_LARGE:N.UPLOAD_LARGE,alt:"Upload Icon"})),e.createElement("div",{className:pe({mini:m})},E?e.createElement("div",null,d(Q>1?"fileUpload.cancelled.other":"fileUpload.cancelled.one",{defaultValue:Q>1?"File Upload(s) Failed":"File Upload Failed"})):e.createElement("div",null,d("fileUpload.title",{description:Y,defaultValue:`Upload your ${Y}`}))),E?e.createElement("div",{className:_e},v.length>0&&e.createElement(e.Fragment,null,e.createElement(W,{list:v}),e.createElement("div",{className:B},d(v.length===1?"fileUpload.error.tooLarge.one":"fileUpload.error.tooLarge.other",{size:s,defaultValue:v.length===1?`Selected file is larger than the size limit of ${s}.`:`Selected files are larger than the size limit of ${s}.`}))),h.length>0&&e.createElement(e.Fragment,null,e.createElement(W,{list:h}),e.createElement("div",{className:B},d(h.length===1?"fileUpload.error.wrongType.one":"fileUpload.error.wrongType.other",{fileTypes:O,defaultValue:h.length===1?`Selected file is not an accepted file type: ${O}.`:`Selected files are not accepted file types: ${O}.`})))):e.createElement("span",null),e.createElement("div",{className:X},e.createElement("div",null,e.createElement("span",null,U[0]),c?e.createElement("u",null,U[1]):e.createElement("a",{href:"",onClick:Fe},U[1]),e.createElement("span",null,U[2]))),e.createElement("div",{className:de},_?e.createElement("span",null,"("," ",d("fileUpload.acceptedTypes",{fileTypes:O,defaultValue:`${O} format accepted`})," ",")"):"",s?e.createElement("span",null,"("," ",d("fileUpload.maximumSize",{size:s,defaultValue:`${s} maximum`})," ",")"):"",T?e.createElement("span",null," ",T," "):""),w&&e.createElement("div",{className:fe},e.createElement(A.Button,{disabled:c,kind:"link",icon:"download-cloud",onClick:Se},w)))),n&&!p&&e.createElement("div",{className:ue},e.createElement(A.Button,{disabled:c,kind:"icon",icon:"x",title:d("fileUpload.close",{defaultValue:"Close"}),onClick:Pe})),e.createElement("form",{className:me},e.createElement("input",{ref:f,type:"file",accept:we||"*/*",multiple:o||void 0,onChange:Ce})))}z.Metadata.set(G,{name:"FileUpload",props:{constrainContentWidth:{type:"boolean"},description:{type:"string"},multiple:{type:"boolean"},dismissable:{type:"boolean"},mini:{type:"boolean"},downloadLabel:{type:"string"},acceptExtensions:{type:"string[] | string"},maxSize:{type:"string"},customRequirement:{type:"string"},onSelection:{type:"(files: File[]) => void",required:!0},dismissal:{type:"() => void"},download:{type:"() => void"},disabled:{type:"boolean"}}}),r.FileUpload=G,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("@sps-woodland/core"),require("@spscommerce/utils"),require("@sps-woodland/core/button"),require("@sps-woodland/illustrations"),require("@spscommerce/i18n")):typeof define==`function`&&define.amd?define([`exports`,`react`,`@sps-woodland/core`,`@spscommerce/utils`,`@sps-woodland/core/button`,`@sps-woodland/illustrations`,`@spscommerce/i18n`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FileUpload={},e.react,e.spsWoodlandCore,e.spscommerceUtils,e.spsWoodlandCoreButton,e.spsWoodlandIllustrations,e.spscommerceI18n))})(this,function(e,t,n,r,i,a,o){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var s=Object.create,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=u(t),a=0,o=i.length,s;a<o;a++)s=i[a],!f.call(e,s)&&s!==n&&c(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=l(t,s))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:s(d(e)),p(t||!e||!e.__esModule||!f.call(e,`default`)?c(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);var m={"7Z":[`application/x-7z-compressed`],AAC:[`audio/aac`],ABW:[`application/x-abiword`],ARC:[`application/octet-stream`],AVI:[`video/x-msvideo`],AZW:[`application/vnd.amazon.ebook`],BIN:[`application/octet-stream`],BMP:[`image/bmp`],BZ:[`application/x-bzip`],BZ2:[`application/x-bzip2`],CER:[`application/pkix-cert`,`application/x-x509-ca-cert`],CSH:[`application/x-csh`],CSS:[`text/css`],CSV:[`text/csv`,`application/vnd.ms-excel`],DOC:[`application/msword`],DOT:[`application/msword`],DOCX:[`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],DOTX:[`application/vnd.openxmlformats-officedocument.wordprocessingml.template`],DOCM:[`application/vnd.ms-word.document.macroEnabled.12`],DOTM:[`application/vnd.ms-word.template.macroEnabled.12`],EDI:[`application/edi-x12`,`application/edifact`],EML:[`application/octet-stream`,`message/rfc822`,`multipart/mixed`,`message/rfc5322`,`message/rfc6532`],EOT:[`application/vnd.ms-fontobject`],EPUB:[`application/epub+zip`],ES:[`application/ecmascript`],FLV:[`video/x-flv`],GIF:[`image/gif`],GZ:[`application/x-gzip`],HTM:[`text/html`],HTML:[`text/html`],ICO:[`image/x-icon`],ICS:[`text/calendar`],JAR:[`application/java-archive`],JPEG:[`image/jpeg`],JPG:[`image/jpeg`],JS:[`application/javascript`],JSON:[`application/json`],M3U:[`audio/x-mpequrl`],MID:[`audio/midi`],MIDI:[`audio/midi`],MOV:[`video/quicktime`],MP3:[`audio/mpeg3`],MP4:[`video/mp4`],MPEG:[`video/mpeg`],MPKG:[`application/vnd.apple.installer+xml`],ODP:[`application/vnd.oasis.opendocument.presentation`],ODS:[`application/vnd.oasis.opendocument.spreadsheet`],ODT:[`application/vnd.oasis.opendocument.text`],OGA:[`audio/ogg`],OGV:[`video/ogg`],OGX:[`application/ogg`],OTF:[`font/otf`],PNG:[`image/png`],PDF:[`application/pdf`],POT:[`application/vnd.ms-powerpoint`],POTM:[`application/vnd.ms-powerpoint.template.macroEnabled.12`],POTX:[`application/vnd.openxmlformats-officedocument.presentationml.template`],PPA:[`application/vnd.ms-powerpoint`],PPAM:[`application/vnd.ms-powerpoint.addin.macroEnabled.12`],PPS:[`application/vnd.ms-powerpoint`],PPSM:[`application/vnd.ms-powerpoint.slideshow.macroEnabled.12`],PPT:[`application/vnd.ms-powerpoint`],PPTM:[`application/vnd.ms-powerpoint.presentation.macroEnabled.12`],PPSX:[`application/vnd.openxmlformats-officedocument.presentationml.slideshow`],PPTX:[`application/vnd.openxmlformats-officedocument.presentationml.presentation`],RAR:[`application/x-rar-compressed`],RTF:[`application/rtf`],SH:[`application/x-sh`],SVG:[`image/svg+xml`],SWF:[`application/x-shockwave-flash`],TAR:[`application/x-tar`],TIF:[`image/tiff`],TIFF:[`image/tiff`],TS:[`application/typescript`],TTF:[`font/ttf`],TXT:[`text/plain`],VSD:[`application/vnd.visio`],WAV:[`audio/wav`],WEBA:[`audio/webm`],WEBM:[`video/webm`],WEBP:[`image/webp`],WOFF:[`font/woff`],WOFF2:[`font/woff2`],XHTML:[`application/xhtml+xml`],XLA:[`application/vnd.ms-excel`],XLS:[`application/vnd.ms-excel`],XLSB:[`application/vnd.ms-excel.sheet.binary.macroEnabled.12`],XLT:[`application/vnd.ms-excel`],XLAM:[`application/vnd.ms-excel.addin.macroEnabled.12`],XLSM:[`application/vnd.ms-excel.sheet.macroEnabled.12`],XLSX:[`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],XLTM:[`application/vnd.ms-excel.template.macroEnabled.12`],XLTX:[`application/vnd.openxmlformats-officedocument.spreadsheetml.template`],XML:[`application/xml`],XUL:[`application/vnd.mozilla.xul+xml`],ZIP:[`application/zip`]};function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(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 _(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?g(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var v=(e,t,n)=>{for(var r of Object.keys(e))if(e[r]!==(t[r]??n[r]))return!1;return!0},y=e=>t=>{var n=e.defaultClassName,r=_(_({},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)v(c,r,e.defaultVariants)&&(n+=` `+l);return n},b=y({defaultClassName:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk0`,variantClassNames:{active:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk1`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk2`},mini:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk3`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk4`},error:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk5`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk6`},shown:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk7`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk8`},disabled:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk9`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zka`}},defaultVariants:{active:!1,mini:!1,error:!1,shown:!0,disabled:!1},compoundVariants:[]}),x=y({defaultClassName:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkb`,variantClassNames:{constrainContentWidth:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkc`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkd`},disabled:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zke`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkf`}},defaultVariants:{constrainContentWidth:!1,disabled:!1},compoundVariants:[]}),S=`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkg`,C=y({defaultClassName:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkh`,variantClassNames:{mini:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zki`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkj`},error:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkk`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkl`},disabled:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkm`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkn`}},defaultVariants:{mini:!1,error:!1,disabled:!1},compoundVariants:[]}),w=y({defaultClassName:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zko`,variantClassNames:{mini:{true:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkp`,false:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkq`}},defaultVariants:{mini:!1},compoundVariants:[]}),T=`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkr`,E=`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zks`,D=`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkt`,ee=`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkv`,O=`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zky`,k=`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkz`;function A({list:e}){return t.createElement(t.Fragment,null,e.map((n,r)=>{let i=Math.floor(n.length/2);return t.createElement(`div`,{className:E,key:n},t.createElement(`span`,{className:D},n.substring(0,i)),t.createElement(`div`,{className:D},t.createElement(`span`,null,n.substring(i))),r<e.length-1?`,`:``)}))}function j({constrainContentWidth:e,description:s,multiple:c=!1,dismissable:l,processing:u,mini:d,downloadLabel:f,acceptExtensions:p,maxSize:h,customRequirement:g,onSelection:_,onDismiss:v,download:y,shown:E,className:D,disabled:j,children:te,...ne}){let M=t.useRef(new Set),N=t.useRef(new Set),[P,F]=t.useState(E),[re,I]=t.useState([]),[ie,ae]=t.useState(``),[L,oe]=t.useState(),[R,z]=t.useState(!1),[B,V]=t.useState(!1),[H,U]=t.useState([]),[W,G]=t.useState([]),[K,q]=t.useState(``),J=t.useMemo(()=>new Set([...H,...W]).size,[H,W]),{t:Y}=(0,o.useWoodlandLanguage)(),X=(c?Y(`fileUpload.instructions.other`,{defaultValue:`Drag and drop your files here or |browse for files| on your desktop.`}):Y(`fileUpload.instructions.one`,{defaultValue:`Drag and drop your file here or |browse for a file| on your desktop.`})).split(`|`),Z=s||(c?`Files`:`File`),Q=t.useRef(null);t.useEffect(()=>{E&&F(E)},[E]),t.useEffect(()=>{h&&ce(h)},[h]),t.useEffect(()=>{p&&le(p)},[p]);function se(){l&&(F(!1),v&&v())}function ce(e){try{oe((0,r.parseFileSize)(e))}catch{throw Error(`Could not parse "${e}" as a file size.`)}}function le(e){let t=(Array.isArray(e)?e:e.trim().split(/\s?,\s?/)).map(e=>e.replace(/^\./,``)),n=t.map(e=>`.${e}`.toLowerCase());q(n.map((e,t)=>t>0&&t===n.length-1?`or ${e}`:e).join(n.length>2?`, `:` `)),M.current.clear(),N.current.clear();for(let e of t){N.current.add(e.toLowerCase());let t=Object.keys(m).includes(e.toUpperCase())?m[e.toUpperCase()]:[];for(let e of t)M.current.add(e)}ae(n.concat(Array.from(M.current)).join(`,`))}function $(e){U([]),G([]);let t=[],n=[],r=e?Array.from(e):[];for(let e of r){let r=e.name.split(`.`).pop()?.toLowerCase()??``,i=e.type?M.current.has(e.type):N.current.has(r);p&&!i&&n.push(e.name),h&&L&&e.size>L&&t.push(e.name)}t.length||n.length?(V(!0),Q.current&&Q.current.value&&(Q.current.value=``)):(I(r),_(r)),U(t),G(n)}function ue(e){e.preventDefault(),V(!1),Q.current&&Q.current.click()}function de(){y&&y()}function fe(e){e.stopPropagation(),$(e.target.files),Q.current&&Q.current.value&&(Q.current.value=``)}function pe(e){e.preventDefault(),e.stopPropagation(),z(!0),V(!1)}function me(e){e.preventDefault(),z(!0),V(!1)}function he(e){e.preventDefault(),z(!1)}function ge(e){e.preventDefault(),e.stopPropagation(),z(!1),e.dataTransfer.files&&$(e.dataTransfer.files)}return t.createElement(`div`,{onDrop:j?()=>{}:ge,onDragOver:j?()=>{}:pe,onDragLeave:j?()=>{}:he,onDragEnter:j?()=>{}:me,className:(0,n.cl)(b({active:R,mini:d,error:B,shown:P,disabled:j}),D),...ne},t.createElement(`div`,{className:(0,n.cl)(x({constrainContentWidth:e,disabled:j}))},u?t.createElement(`div`,null,t.createElement(n.Spinner,{size:`md`,"aria-hidden":`true`}),t.createElement(`div`,{className:S},Y(`fileUpload.processing`,{defaultValue:`Processing Upload...`}))):t.createElement(`div`,null,t.createElement(`div`,{className:C({mini:d,error:B,disabled:j}),"aria-hidden":`true`},t.createElement(`img`,{className:k,src:B?a.GENERAL_ERROR_LARGE:a.UPLOAD_LARGE,alt:`Upload Icon`})),t.createElement(`div`,{className:w({mini:d})},B?t.createElement(`div`,null,Y(J>1?`fileUpload.cancelled.other`:`fileUpload.cancelled.one`,{defaultValue:J>1?`File Upload(s) Failed`:`File Upload Failed`})):t.createElement(`div`,null,Y(`fileUpload.title`,{description:Z,defaultValue:`Upload your ${Z}`}))),B?t.createElement(`div`,{className:T},H.length>0&&t.createElement(t.Fragment,null,t.createElement(A,{list:H}),t.createElement(`div`,{className:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zku`},Y(H.length===1?`fileUpload.error.tooLarge.one`:`fileUpload.error.tooLarge.other`,{size:h,defaultValue:H.length===1?`Selected file is larger than the size limit of ${h}.`:`Selected files are larger than the size limit of ${h}.`}))),W.length>0&&t.createElement(t.Fragment,null,t.createElement(A,{list:W}),t.createElement(`div`,{className:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zku`},Y(W.length===1?`fileUpload.error.wrongType.one`:`fileUpload.error.wrongType.other`,{fileTypes:K,defaultValue:W.length===1?`Selected file is not an accepted file type: ${K}.`:`Selected files are not accepted file types: ${K}.`})))):t.createElement(`span`,null),t.createElement(`div`,{className:S},t.createElement(`div`,null,t.createElement(`span`,null,X[0]),j?t.createElement(`u`,null,X[1]):t.createElement(`a`,{href:``,onClick:ue},X[1]),t.createElement(`span`,null,X[2]))),t.createElement(`div`,{className:ee},p?t.createElement(`span`,null,`(`,` `,Y(`fileUpload.acceptedTypes`,{fileTypes:K,defaultValue:`${K} format accepted`}),` `,`)`):``,h?t.createElement(`span`,null,`(`,` `,Y(`fileUpload.maximumSize`,{size:h,defaultValue:`${h} maximum`}),` `,`)`):``,g?t.createElement(`span`,null,` `,g,` `):``),f&&t.createElement(`div`,{className:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkw`},t.createElement(i.Button,{disabled:j,kind:`link`,icon:`download-cloud`,onClick:de},f)))),l&&!u&&t.createElement(`div`,{className:`pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkx`},t.createElement(i.Button,{disabled:j,kind:`icon`,icon:`x`,title:Y(`fileUpload.close`,{defaultValue:`Close`}),onClick:se})),t.createElement(`form`,{className:O},t.createElement(`input`,{ref:Q,type:`file`,accept:ie||`*/*`,multiple:c||void 0,onChange:fe})))}n.Metadata.set(j,{name:`FileUpload`,props:{constrainContentWidth:{type:`boolean`},description:{type:`string`},multiple:{type:`boolean`},dismissable:{type:`boolean`},mini:{type:`boolean`},downloadLabel:{type:`string`},acceptExtensions:{type:`string[] | string`},maxSize:{type:`string`},customRequirement:{type:`string`},onSelection:{type:`(files: File[]) => void`,required:!0},dismissal:{type:`() => void`},download:{type:`() => void`},disabled:{type:`boolean`}}}),e.FileUpload=j});
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
.pkg_sps-woodland_core__family_file-
|
|
1
|
+
.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk0{border-style:dashed;border-width:.0625rem;border-radius:.25rem;padding:1rem;display:block;position:relative}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk1{background-color:#f4ecf2;border-style:solid;border-color:#91467f}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk3{padding:1rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk5{border-color:#de002e}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk8{display:none}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zk9{border-color:#d2d4d4}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkb{color:#4b5356;text-align:center;margin:0 auto}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkc{width:50%}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zke{color:#717779}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkg{font-size:.75rem;line-height:1.25rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkh{color:#717779;margin-bottom:1rem;display:block}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zki{font-size:1.5rem;line-height:1.5rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkj{font-size:3rem;line-height:3rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkk{color:#de002e}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkm{opacity:.5}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zko{margin-bottom:.25rem;font-weight:600}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkp{font-size:1rem;line-height:1.25rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkq{font-size:1.125rem;line-height:1.25rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkr{font-size:.875rem;font-weight:600;line-height:1.25rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zks{white-space:nowrap;justify-content:center;display:flex}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkt{max-width:50%;overflow:hidden}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkt:first-child{text-overflow:ellipsis}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkt:last-child{float:right}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zku{font-weight:400}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkv{margin-top:.25rem;font-size:.75rem;line-height:1.125rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkv>span+span{margin-left:.125rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkw{margin-top:1rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkx{position:absolute;top:.5rem;right:.5rem}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zky{display:none}.pkg_sps-woodland_core__family_file-upload__version_8_56_3__hash_17kn1zkz{height:3rem}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -1,48 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Metadata as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
/* @__PURE__ */ e.createElement(
|
|
25
|
-
"div",
|
|
26
|
-
{
|
|
27
|
-
className: p({ kind: l, active: u }),
|
|
28
|
-
onMouseOver: () => a(!0),
|
|
29
|
-
onMouseOut: () => a(!1)
|
|
30
|
-
},
|
|
31
|
-
/* @__PURE__ */ e.createElement("div", { className: f }, o),
|
|
32
|
-
/* @__PURE__ */ e.createElement("div", { className: y }, n)
|
|
33
|
-
),
|
|
34
|
-
/* @__PURE__ */ e.createElement("div", { className: r(k({ kind: l })) })
|
|
35
|
-
);
|
|
1
|
+
import { tile as e, tileBody as t, tileFooter as n, tileTitle as r, tileValue as i } from "./FilterTile.ve.js";
|
|
2
|
+
import { Metadata as a, cl as o } from "@sps-woodland/core";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
//#region src/filter-tiles/filter-tile/FilterTile.tsx
|
|
5
|
+
function c({ value: a, title: c, active: l, kind: u = "general", className: d, ...f }) {
|
|
6
|
+
let [p, m] = s.useState(!1), h = l || p;
|
|
7
|
+
return /* @__PURE__ */ s.createElement("div", {
|
|
8
|
+
className: o(e, d),
|
|
9
|
+
tabIndex: f.onClick ? 0 : void 0,
|
|
10
|
+
role: f.onClick && "button",
|
|
11
|
+
onKeyDown: f.onClick ? (e) => {
|
|
12
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
|
|
13
|
+
} : void 0,
|
|
14
|
+
...f
|
|
15
|
+
}, /* @__PURE__ */ s.createElement("div", {
|
|
16
|
+
className: t({
|
|
17
|
+
kind: u,
|
|
18
|
+
active: h
|
|
19
|
+
}),
|
|
20
|
+
onMouseOver: () => m(!0),
|
|
21
|
+
onMouseOut: () => m(!1)
|
|
22
|
+
}, /* @__PURE__ */ s.createElement("div", { className: i }, a), /* @__PURE__ */ s.createElement("div", { className: r }, c)), /* @__PURE__ */ s.createElement("div", { className: o(n({ kind: u })) }));
|
|
36
23
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
a.set(c, {
|
|
25
|
+
name: "Fitler tile",
|
|
26
|
+
props: {
|
|
27
|
+
value: {
|
|
28
|
+
type: "number",
|
|
29
|
+
required: !0
|
|
30
|
+
},
|
|
31
|
+
title: {
|
|
32
|
+
type: "string",
|
|
33
|
+
required: !0
|
|
34
|
+
},
|
|
35
|
+
active: { type: "boolean" },
|
|
36
|
+
kind: {
|
|
37
|
+
type: "FilterTileKind",
|
|
38
|
+
default: "general"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
45
41
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { c as FilterTile };
|
|
@@ -1,10 +1,52 @@
|
|
|
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
|
-
|
|
3
|
+
//#region src/filter-tiles/filter-tile/FilterTile.css.ts
|
|
4
|
+
var t = "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv0", n = e({
|
|
5
|
+
defaultClassName: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv1",
|
|
6
|
+
variantClassNames: {
|
|
7
|
+
kind: {
|
|
8
|
+
general: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv2",
|
|
9
|
+
error: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv3",
|
|
10
|
+
success: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv4",
|
|
11
|
+
warning: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv5",
|
|
12
|
+
processing: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv6"
|
|
13
|
+
},
|
|
14
|
+
active: { true: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv7" }
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {},
|
|
17
|
+
compoundVariants: [
|
|
18
|
+
[{
|
|
19
|
+
kind: "general",
|
|
20
|
+
active: !0
|
|
21
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv8"],
|
|
22
|
+
[{
|
|
23
|
+
kind: "warning",
|
|
24
|
+
active: !0
|
|
25
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv9"],
|
|
26
|
+
[{
|
|
27
|
+
kind: "error",
|
|
28
|
+
active: !0
|
|
29
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiva"],
|
|
30
|
+
[{
|
|
31
|
+
kind: "processing",
|
|
32
|
+
active: !0
|
|
33
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivb"],
|
|
34
|
+
[{
|
|
35
|
+
kind: "success",
|
|
36
|
+
active: !0
|
|
37
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivc"]
|
|
38
|
+
]
|
|
39
|
+
}), r = "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivd", i = "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabive", a = e({
|
|
40
|
+
defaultClassName: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivf",
|
|
41
|
+
variantClassNames: { kind: {
|
|
42
|
+
general: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivg",
|
|
43
|
+
error: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivh",
|
|
44
|
+
success: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivi",
|
|
45
|
+
warning: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivj",
|
|
46
|
+
processing: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivk"
|
|
47
|
+
} },
|
|
48
|
+
defaultVariants: { kind: "general" },
|
|
49
|
+
compoundVariants: []
|
|
50
|
+
});
|
|
51
|
+
//#endregion
|
|
52
|
+
export { t as tile, n as tileBody, a as tileFooter, i as tileTitle, r as tileValue };
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Metadata as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { tileSet as e } from "./FilterTileSet.ve.js";
|
|
2
|
+
import { Metadata as t, cl as n } from "@sps-woodland/core";
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
//#region src/filter-tiles/filter-tile-set/FilterTileSet.tsx
|
|
5
|
+
function i({ className: t, children: i, ...a }) {
|
|
6
|
+
return /* @__PURE__ */ r.createElement("div", {
|
|
7
|
+
className: n(e, t),
|
|
8
|
+
...a
|
|
9
|
+
}, i);
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
o as FilterTileSet
|
|
16
|
-
};
|
|
11
|
+
t.set(i, { name: "Filter Tile Set" });
|
|
12
|
+
//#endregion
|
|
13
|
+
export { i as FilterTileSet };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
2
|
+
//#region src/filter-tiles/filter-tile-set/FilterTileSet.css.ts
|
|
3
|
+
var e = "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_4quq2n0";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { e as tileSet };
|
|
@@ -1,113 +1,148 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Metadata as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { Metadata as t, cl as n } from "@sps-woodland/core";
|
|
3
|
+
//#region ../../../node_modules/.pnpm/@vanilla-extract+recipes@0.2.5_@vanilla-extract+css@1.21.2/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js
|
|
4
|
+
function r(e, t, n) {
|
|
5
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
6
|
+
value: n,
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
configurable: !0,
|
|
9
|
+
writable: !0
|
|
10
|
+
}) : e[t] = n, e;
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
function i(e, t) {
|
|
13
|
+
var n = Object.keys(e);
|
|
14
|
+
if (Object.getOwnPropertySymbols) {
|
|
15
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
16
|
+
t && (r = r.filter(function(t) {
|
|
17
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
18
|
+
})), n.push.apply(n, r);
|
|
19
|
+
}
|
|
20
|
+
return n;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
function a(e) {
|
|
23
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
24
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
25
|
+
t % 2 ? i(Object(n), !0).forEach(function(t) {
|
|
26
|
+
r(e, t, n[t]);
|
|
27
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : i(Object(n)).forEach(function(t) {
|
|
28
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return e;
|
|
31
32
|
}
|
|
32
|
-
var
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
title: { type: "string", required: !0 },
|
|
95
|
-
active: { type: "boolean" },
|
|
96
|
-
kind: { type: "FilterTileKind", default: "general" }
|
|
97
|
-
}
|
|
33
|
+
var o = (e, t, n) => {
|
|
34
|
+
for (var r of Object.keys(e)) if (e[r] !== (t[r] ?? n[r])) return !1;
|
|
35
|
+
return !0;
|
|
36
|
+
}, s = (e) => (t) => {
|
|
37
|
+
var n = e.defaultClassName, r = a(a({}, e.defaultVariants), t);
|
|
38
|
+
for (var i in r) {
|
|
39
|
+
var s = r[i] ?? e.defaultVariants[i];
|
|
40
|
+
if (s != null) {
|
|
41
|
+
var c = s;
|
|
42
|
+
typeof c == "boolean" && (c = c === !0 ? "true" : "false");
|
|
43
|
+
var l = e.variantClassNames[i][c];
|
|
44
|
+
l && (n += " " + l);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
for (var [u, d] of e.compoundVariants) o(u, r, e.defaultVariants) && (n += " " + d);
|
|
48
|
+
return n;
|
|
49
|
+
}, c = "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv0", l = s({
|
|
50
|
+
defaultClassName: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv1",
|
|
51
|
+
variantClassNames: {
|
|
52
|
+
kind: {
|
|
53
|
+
general: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv2",
|
|
54
|
+
error: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv3",
|
|
55
|
+
success: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv4",
|
|
56
|
+
warning: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv5",
|
|
57
|
+
processing: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv6"
|
|
58
|
+
},
|
|
59
|
+
active: { true: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv7" }
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {},
|
|
62
|
+
compoundVariants: [
|
|
63
|
+
[{
|
|
64
|
+
kind: "general",
|
|
65
|
+
active: !0
|
|
66
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv8"],
|
|
67
|
+
[{
|
|
68
|
+
kind: "warning",
|
|
69
|
+
active: !0
|
|
70
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv9"],
|
|
71
|
+
[{
|
|
72
|
+
kind: "error",
|
|
73
|
+
active: !0
|
|
74
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiva"],
|
|
75
|
+
[{
|
|
76
|
+
kind: "processing",
|
|
77
|
+
active: !0
|
|
78
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivb"],
|
|
79
|
+
[{
|
|
80
|
+
kind: "success",
|
|
81
|
+
active: !0
|
|
82
|
+
}, "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivc"]
|
|
83
|
+
]
|
|
84
|
+
}), u = "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivd", d = "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabive", f = s({
|
|
85
|
+
defaultClassName: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivf",
|
|
86
|
+
variantClassNames: { kind: {
|
|
87
|
+
general: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivg",
|
|
88
|
+
error: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivh",
|
|
89
|
+
success: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivi",
|
|
90
|
+
warning: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivj",
|
|
91
|
+
processing: "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivk"
|
|
92
|
+
} },
|
|
93
|
+
defaultVariants: { kind: "general" },
|
|
94
|
+
compoundVariants: []
|
|
98
95
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/filter-tiles/filter-tile/FilterTile.tsx
|
|
98
|
+
function p({ value: t, title: r, active: i, kind: a = "general", className: o, ...s }) {
|
|
99
|
+
let [p, m] = e.useState(!1), h = i || p;
|
|
100
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
101
|
+
className: n(c, o),
|
|
102
|
+
tabIndex: s.onClick ? 0 : void 0,
|
|
103
|
+
role: s.onClick && "button",
|
|
104
|
+
onKeyDown: s.onClick ? (e) => {
|
|
105
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
|
|
106
|
+
} : void 0,
|
|
107
|
+
...s
|
|
108
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
|
109
|
+
className: l({
|
|
110
|
+
kind: a,
|
|
111
|
+
active: h
|
|
112
|
+
}),
|
|
113
|
+
onMouseOver: () => m(!0),
|
|
114
|
+
onMouseOut: () => m(!1)
|
|
115
|
+
}, /* @__PURE__ */ e.createElement("div", { className: u }, t), /* @__PURE__ */ e.createElement("div", { className: d }, r)), /* @__PURE__ */ e.createElement("div", { className: n(f({ kind: a })) }));
|
|
106
116
|
}
|
|
107
|
-
|
|
108
|
-
|
|
117
|
+
t.set(p, {
|
|
118
|
+
name: "Fitler tile",
|
|
119
|
+
props: {
|
|
120
|
+
value: {
|
|
121
|
+
type: "number",
|
|
122
|
+
required: !0
|
|
123
|
+
},
|
|
124
|
+
title: {
|
|
125
|
+
type: "string",
|
|
126
|
+
required: !0
|
|
127
|
+
},
|
|
128
|
+
active: { type: "boolean" },
|
|
129
|
+
kind: {
|
|
130
|
+
type: "FilterTileKind",
|
|
131
|
+
default: "general"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
109
134
|
});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/filter-tiles/filter-tile-set/FilterTileSet.css.ts
|
|
137
|
+
var m = "pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_4quq2n0";
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/filter-tiles/filter-tile-set/FilterTileSet.tsx
|
|
140
|
+
function h({ className: t, children: r, ...i }) {
|
|
141
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
142
|
+
className: n(m, t),
|
|
143
|
+
...i
|
|
144
|
+
}, r);
|
|
145
|
+
}
|
|
146
|
+
t.set(h, { name: "Filter Tile Set" });
|
|
147
|
+
//#endregion
|
|
148
|
+
export { p as FilterTile, h as FilterTileSet };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("@sps-woodland/core")):typeof define==`function`&&define.amd?define([`exports`,`react`,`@sps-woodland/core`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FilterTiles={},e.react,e.spsWoodlandCore))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule||!c.call(e,`default`)?i(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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 f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var p=(e,t,n)=>{for(var r of Object.keys(e))if(e[r]!==(t[r]??n[r]))return!1;return!0},m=e=>t=>{var n=e.defaultClassName,r=f(f({},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)p(c,r,e.defaultVariants)&&(n+=` `+l);return n},h=`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv0`,g=m({defaultClassName:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv1`,variantClassNames:{kind:{general:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv2`,error:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv3`,success:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv4`,warning:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv5`,processing:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv6`},active:{true:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv7`}},defaultVariants:{},compoundVariants:[[{kind:`general`,active:!0},`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv8`],[{kind:`warning`,active:!0},`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv9`],[{kind:`error`,active:!0},`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiva`],[{kind:`processing`,active:!0},`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivb`],[{kind:`success`,active:!0},`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivc`]]}),_=`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivd`,v=`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabive`,y=m({defaultClassName:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivf`,variantClassNames:{kind:{general:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivg`,error:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivh`,success:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivi`,warning:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivj`,processing:`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivk`}},defaultVariants:{kind:`general`},compoundVariants:[]});function b({value:e,title:r,active:i,kind:a=`general`,className:o,...s}){let[c,l]=t.useState(!1),u=i||c;return t.createElement(`div`,{className:(0,n.cl)(h,o),tabIndex:s.onClick?0:void 0,role:s.onClick&&`button`,onKeyDown:s.onClick?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click())}:void 0,...s},t.createElement(`div`,{className:g({kind:a,active:u}),onMouseOver:()=>l(!0),onMouseOut:()=>l(!1)},t.createElement(`div`,{className:_},e),t.createElement(`div`,{className:v},r)),t.createElement(`div`,{className:(0,n.cl)(y({kind:a}))}))}n.Metadata.set(b,{name:`Fitler tile`,props:{value:{type:`number`,required:!0},title:{type:`string`,required:!0},active:{type:`boolean`},kind:{type:`FilterTileKind`,default:`general`}}});var x=`pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_4quq2n0`;function S({className:e,children:r,...i}){return t.createElement(`div`,{className:(0,n.cl)(x,e),...i},r)}n.Metadata.set(S,{name:`Filter Tile Set`}),e.FilterTile=b,e.FilterTileSet=S});
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
.pkg_sps-woodland_core__family_filter-
|
|
1
|
+
.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv0{flex-direction:column;flex:1;justify-content:flex-end;min-width:6.875rem;max-width:15.625rem;min-height:6.625rem;margin-left:.25rem;margin-right:.25rem;display:flex}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv0:first-child{margin-left:0}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv0:last-child{margin-right:0}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv0:focus{outline-offset:.125rem;outline:.125rem solid #007db8;box-shadow:0 0 0 6px #fff}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv1{color:#1f282c;cursor:pointer;background-color:#fff;border:.0625rem solid #d2d4d4;border-top-left-radius:.25rem;border-top-right-radius:.25rem;height:100%;padding:1rem}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv8{background-color:#e6f2f8;border-color:#007db8}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiv9{background-color:#fcf1e7;border-color:#e7760b}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabiva{background-color:#fbe6ea;border-color:#de002e}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivb{background-color:#f4ecf2;border-color:#91467f}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivc{background-color:#e7f3ec;border-color:#0b8940}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivd{text-align:center;min-height:1.875rem;font-size:1.875rem;font-weight:600;line-height:1.875rem}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabive{text-align:center;word-break:break-word;justify-content:center;align-items:center;min-height:2.25rem;font-size:.875rem;line-height:1.125rem;display:flex}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivf{height:.25rem}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivg{background-color:#007db8}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivh{background-color:#de002e}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivi{background-color:#0b8940}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivj{background-color:#e7760b}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_1fdabivk{background-color:#91467f}.pkg_sps-woodland_core__family_filter-tiles__version_8_56_3__hash_4quq2n0{display:flex}
|
|
2
|
+
/*$vite$:1*/
|