@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
package/lib/tags/index.js
CHANGED
|
@@ -1,209 +1,352 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { useWoodlandLanguage as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { Icon as t, Metadata as n, cl as r } from "@sps-woodland/core";
|
|
3
|
+
import { useWoodlandLanguage as i } from "@spscommerce/i18n";
|
|
4
|
+
//#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
|
|
5
|
+
function a(e, t, n) {
|
|
6
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
7
|
+
value: n,
|
|
8
|
+
enumerable: !0,
|
|
9
|
+
configurable: !0,
|
|
10
|
+
writable: !0
|
|
11
|
+
}) : e[t] = n, e;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
function o(e, t) {
|
|
14
|
+
var n = Object.keys(e);
|
|
15
|
+
if (Object.getOwnPropertySymbols) {
|
|
16
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
17
|
+
t && (r = r.filter(function(t) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
19
|
+
})), n.push.apply(n, r);
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
function s(e) {
|
|
24
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
25
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
26
|
+
t % 2 ? o(Object(n), !0).forEach(function(t) {
|
|
27
|
+
a(e, t, n[t]);
|
|
28
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o(Object(n)).forEach(function(t) {
|
|
29
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return e;
|
|
32
33
|
}
|
|
33
|
-
var
|
|
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
|
-
|
|
34
|
+
var c = (e, t, n) => {
|
|
35
|
+
for (var r of Object.keys(e)) if (e[r] !== (t[r] ?? n[r])) return !1;
|
|
36
|
+
return !0;
|
|
37
|
+
}, l = (e) => (t) => {
|
|
38
|
+
var n = e.defaultClassName, r = s(s({}, e.defaultVariants), t);
|
|
39
|
+
for (var i in r) {
|
|
40
|
+
var a = r[i] ?? e.defaultVariants[i];
|
|
41
|
+
if (a != null) {
|
|
42
|
+
var o = a;
|
|
43
|
+
typeof o == "boolean" && (o = o === !0 ? "true" : "false");
|
|
44
|
+
var l = e.variantClassNames[i][o];
|
|
45
|
+
l && (n += " " + l);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
for (var [u, d] of e.compoundVariants) c(u, r, e.defaultVariants) && (n += " " + d);
|
|
49
|
+
return n;
|
|
50
|
+
}, u = l({
|
|
51
|
+
defaultClassName: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r0",
|
|
52
|
+
variantClassNames: {
|
|
53
|
+
kind: {
|
|
54
|
+
default: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r1",
|
|
55
|
+
key: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r2",
|
|
56
|
+
warning: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r3",
|
|
57
|
+
error: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r4",
|
|
58
|
+
pending: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r5",
|
|
59
|
+
success: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r6",
|
|
60
|
+
info: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r7"
|
|
61
|
+
},
|
|
62
|
+
wrap: {
|
|
63
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r8",
|
|
64
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r9"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
defaultVariants: {
|
|
68
|
+
kind: "default",
|
|
69
|
+
wrap: !1
|
|
70
|
+
},
|
|
71
|
+
compoundVariants: []
|
|
72
|
+
}), d = l({
|
|
73
|
+
defaultClassName: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2ra",
|
|
74
|
+
variantClassNames: { kind: {
|
|
75
|
+
default: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rb",
|
|
76
|
+
key: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rc",
|
|
77
|
+
warning: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rd",
|
|
78
|
+
error: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2re",
|
|
79
|
+
pending: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rf",
|
|
80
|
+
success: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rg",
|
|
81
|
+
info: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rh",
|
|
82
|
+
custom: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2ri"
|
|
83
|
+
} },
|
|
84
|
+
defaultVariants: { kind: "default" },
|
|
85
|
+
compoundVariants: []
|
|
86
|
+
}), f = Object.freeze({
|
|
87
|
+
default: "info-circle",
|
|
88
|
+
key: "info-circle",
|
|
89
|
+
warning: "status-warning",
|
|
90
|
+
error: "status-error",
|
|
91
|
+
pending: "status-in-process",
|
|
92
|
+
success: "status-ok",
|
|
93
|
+
info: "info-circle"
|
|
66
94
|
});
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
className: f(E({ kind: d ? "custom" : s })),
|
|
80
|
-
icon: n
|
|
81
|
-
}
|
|
82
|
-
), a);
|
|
95
|
+
function p({ children: n, className: i, kind: a = "default", icon: o, wrap: s, ...c }) {
|
|
96
|
+
let l = typeof o == "string", p = o && l ? o : o ? f[a] : void 0;
|
|
97
|
+
return /* @__PURE__ */ e.createElement("span", {
|
|
98
|
+
className: r(u({
|
|
99
|
+
kind: a,
|
|
100
|
+
wrap: s
|
|
101
|
+
}), i),
|
|
102
|
+
...c
|
|
103
|
+
}, p && /* @__PURE__ */ e.createElement(t, {
|
|
104
|
+
className: r(d({ kind: l ? "custom" : a })),
|
|
105
|
+
icon: p
|
|
106
|
+
}), n);
|
|
83
107
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
108
|
+
n.set(p, {
|
|
109
|
+
name: "Tag",
|
|
110
|
+
props: {
|
|
111
|
+
kind: {
|
|
112
|
+
type: "TagKind",
|
|
113
|
+
default: "default"
|
|
114
|
+
},
|
|
115
|
+
icon: {
|
|
116
|
+
type: "boolean | IconName",
|
|
117
|
+
default: "false"
|
|
118
|
+
},
|
|
119
|
+
wrap: {
|
|
120
|
+
type: "boolean",
|
|
121
|
+
default: "false"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
91
124
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/tags/clickable-tag/ClickableTag.css.ts
|
|
127
|
+
var m = l({
|
|
128
|
+
defaultClassName: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu50",
|
|
129
|
+
variantClassNames: {
|
|
130
|
+
kind: {
|
|
131
|
+
blue: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu51",
|
|
132
|
+
gray: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu52"
|
|
133
|
+
},
|
|
134
|
+
disabled: {
|
|
135
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu53",
|
|
136
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu54"
|
|
137
|
+
},
|
|
138
|
+
wrap: {
|
|
139
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu55",
|
|
140
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu56"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
defaultVariants: {
|
|
144
|
+
kind: "blue",
|
|
145
|
+
disabled: !1,
|
|
146
|
+
wrap: !1
|
|
147
|
+
},
|
|
148
|
+
compoundVariants: []
|
|
149
|
+
}), h = l({
|
|
150
|
+
defaultClassName: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu57",
|
|
151
|
+
variantClassNames: {
|
|
152
|
+
link: {
|
|
153
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu58",
|
|
154
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu59"
|
|
155
|
+
},
|
|
156
|
+
wrap: {
|
|
157
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5a",
|
|
158
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5b"
|
|
159
|
+
},
|
|
160
|
+
disabled: {
|
|
161
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5c",
|
|
162
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5d"
|
|
163
|
+
},
|
|
164
|
+
addOrRemove: {
|
|
165
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5e",
|
|
166
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5f"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
defaultVariants: {
|
|
170
|
+
link: !1,
|
|
171
|
+
wrap: !1,
|
|
172
|
+
disabled: !1,
|
|
173
|
+
addOrRemove: !1
|
|
174
|
+
},
|
|
175
|
+
compoundVariants: [[{
|
|
176
|
+
disabled: !1,
|
|
177
|
+
wrap: !1,
|
|
178
|
+
addOrRemove: !0
|
|
179
|
+
}, "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5g"]]
|
|
180
|
+
}), g = l({
|
|
181
|
+
defaultClassName: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5h",
|
|
182
|
+
variantClassNames: { wrap: {
|
|
183
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5i",
|
|
184
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5j"
|
|
185
|
+
} },
|
|
186
|
+
defaultVariants: { wrap: !1 },
|
|
187
|
+
compoundVariants: []
|
|
188
|
+
}), _ = "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5l";
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/tags/clickable-tag/ClickableTag.tsx
|
|
191
|
+
function v({ children: n, className: a, onClick: o, disabled: s, wrap: c, href: l, target: u, kind: d, onAdd: f, onRemove: p, ...v }) {
|
|
192
|
+
let { t: y } = i(), b = e.Children.toArray(n).filter((e) => typeof e == "string").join("");
|
|
193
|
+
e.useEffect(() => {
|
|
194
|
+
if (p && f) throw Error("Clickable tag should have onRemove or onAdd, not both");
|
|
195
|
+
}, [f, p]);
|
|
196
|
+
function x(e) {
|
|
197
|
+
f ? f() : p && p(), e.stopPropagation();
|
|
198
|
+
}
|
|
199
|
+
function S(e) {
|
|
200
|
+
e.stopPropagation(), s ? e.preventDefault() : o && o(e);
|
|
201
|
+
}
|
|
202
|
+
let C = !!o && !l;
|
|
203
|
+
function w(e) {
|
|
204
|
+
s || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), e.currentTarget.click());
|
|
205
|
+
}
|
|
206
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
207
|
+
className: r(m({
|
|
208
|
+
kind: d,
|
|
209
|
+
disabled: s,
|
|
210
|
+
wrap: c
|
|
211
|
+
}), a),
|
|
212
|
+
...v
|
|
213
|
+
}, /* @__PURE__ */ e.createElement("span", {
|
|
214
|
+
className: r(h({
|
|
215
|
+
link: !!l || !!o,
|
|
216
|
+
disabled: s,
|
|
217
|
+
wrap: c,
|
|
218
|
+
addOrRemove: f || p
|
|
219
|
+
})),
|
|
220
|
+
onClick: S,
|
|
221
|
+
title: b,
|
|
222
|
+
...C ? {
|
|
223
|
+
role: "button",
|
|
224
|
+
tabIndex: s ? void 0 : 0,
|
|
225
|
+
"aria-disabled": s || void 0,
|
|
226
|
+
onKeyDown: w
|
|
227
|
+
} : {}
|
|
228
|
+
}, l ? /* @__PURE__ */ e.createElement("a", {
|
|
229
|
+
className: _,
|
|
230
|
+
href: l,
|
|
231
|
+
target: u
|
|
232
|
+
}, n) : n), (f || p) && !s && /* @__PURE__ */ e.createElement("div", {
|
|
233
|
+
className: r(g({ wrap: c })),
|
|
234
|
+
role: "button",
|
|
235
|
+
onClick: x,
|
|
236
|
+
onKeyDown: w,
|
|
237
|
+
tabIndex: 0,
|
|
238
|
+
"aria-label": f ? `${y("clickableTag.add", {
|
|
239
|
+
elementName: b,
|
|
240
|
+
defaultValue: `Add ${b}`
|
|
241
|
+
})}` : `${y("clickableTag.remove", {
|
|
242
|
+
elementName: b,
|
|
243
|
+
defaultValue: `Remove ${b}`
|
|
244
|
+
})}`
|
|
245
|
+
}, /* @__PURE__ */ e.createElement(t, {
|
|
246
|
+
className: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5k",
|
|
247
|
+
"aria-hidden": "true",
|
|
248
|
+
icon: f ? "plus-sign" : "x"
|
|
249
|
+
})));
|
|
165
250
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
251
|
+
n.set(v, {
|
|
252
|
+
name: "Clickable Tag",
|
|
253
|
+
props: {
|
|
254
|
+
disabled: {
|
|
255
|
+
type: "boolean",
|
|
256
|
+
default: "false"
|
|
257
|
+
},
|
|
258
|
+
wrap: {
|
|
259
|
+
type: "boolean",
|
|
260
|
+
default: "false"
|
|
261
|
+
},
|
|
262
|
+
href: { type: "string" },
|
|
263
|
+
target: { type: "'_blank' | '_self' | '_parent' | '_top'" },
|
|
264
|
+
kind: {
|
|
265
|
+
type: "ClickableTagKind",
|
|
266
|
+
default: "blue"
|
|
267
|
+
},
|
|
268
|
+
onAdd: { type: "() => void" },
|
|
269
|
+
onRemove: { type: "() => void" }
|
|
270
|
+
}
|
|
177
271
|
});
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/tags/split-tag/SplitTag.css.ts
|
|
274
|
+
var y = l({
|
|
275
|
+
defaultClassName: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf0",
|
|
276
|
+
variantClassNames: { wrap: {
|
|
277
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf1",
|
|
278
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf2"
|
|
279
|
+
} },
|
|
280
|
+
defaultVariants: { wrap: !1 },
|
|
281
|
+
compoundVariants: []
|
|
282
|
+
}), b = "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf3", x = l({
|
|
283
|
+
defaultClassName: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf5",
|
|
284
|
+
variantClassNames: {
|
|
285
|
+
href: {
|
|
286
|
+
true: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf6",
|
|
287
|
+
false: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf7"
|
|
288
|
+
},
|
|
289
|
+
kind: {
|
|
290
|
+
default: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf8",
|
|
291
|
+
key: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf9",
|
|
292
|
+
warning: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfa",
|
|
293
|
+
error: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfb",
|
|
294
|
+
pending: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfc",
|
|
295
|
+
success: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfd",
|
|
296
|
+
info: "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfe"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
defaultVariants: {
|
|
300
|
+
href: !1,
|
|
301
|
+
kind: "default"
|
|
302
|
+
},
|
|
303
|
+
compoundVariants: []
|
|
304
|
+
}), S = "pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrff";
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region src/tags/split-tag/SplitTag.tsx
|
|
307
|
+
function C({ children: t, className: n, color: i = "default", href: a, target: o, icon: s, tagKey: c, value: l, wrap: u = !1, ...d }) {
|
|
308
|
+
return /* @__PURE__ */ e.createElement("span", {
|
|
309
|
+
className: r(y({ wrap: u }), n),
|
|
310
|
+
...d
|
|
311
|
+
}, /* @__PURE__ */ e.createElement(p, {
|
|
312
|
+
className: r(b),
|
|
313
|
+
icon: s,
|
|
314
|
+
kind: i,
|
|
315
|
+
wrap: u
|
|
316
|
+
}, c && /* @__PURE__ */ e.createElement("span", { className: r("pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf4") }, c)), /* @__PURE__ */ e.createElement(p, {
|
|
317
|
+
className: r(x({
|
|
318
|
+
href: !!a,
|
|
319
|
+
kind: i
|
|
320
|
+
})),
|
|
321
|
+
wrap: u
|
|
322
|
+
}, a ? /* @__PURE__ */ e.createElement("a", {
|
|
323
|
+
className: S,
|
|
324
|
+
href: a,
|
|
325
|
+
target: o
|
|
326
|
+
}, l) : l));
|
|
192
327
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
328
|
+
n.set(C, {
|
|
329
|
+
name: "Split Tag",
|
|
330
|
+
props: {
|
|
331
|
+
color: {
|
|
332
|
+
type: "TagKind",
|
|
333
|
+
default: "key"
|
|
334
|
+
},
|
|
335
|
+
href: { type: "string" },
|
|
336
|
+
target: { type: "'_blank' | '_self' | '_parent' | '_top'" },
|
|
337
|
+
icon: {
|
|
338
|
+
type: "boolean | IconName",
|
|
339
|
+
default: "false"
|
|
340
|
+
},
|
|
341
|
+
tagKey: {
|
|
342
|
+
type: "string",
|
|
343
|
+
required: !0
|
|
344
|
+
},
|
|
345
|
+
value: {
|
|
346
|
+
type: "string",
|
|
347
|
+
required: !0
|
|
348
|
+
}
|
|
349
|
+
}
|
|
203
350
|
});
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
M as SplitTag,
|
|
207
|
-
m as Tag,
|
|
208
|
-
P as TagIcons
|
|
209
|
-
};
|
|
351
|
+
//#endregion
|
|
352
|
+
export { v as ClickableTag, C as SplitTag, p as Tag, f as TagIcons };
|
package/lib/tags/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("@sps-woodland/core"),require("@spscommerce/i18n")):typeof define==`function`&&define.amd?define([`exports`,`react`,`@sps-woodland/core`,`@spscommerce/i18n`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.Tags={},e.react,e.spsWoodlandCore,e.spscommerceI18n))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:i(c(e)),u(t||!e||!e.__esModule||!l.call(e,`default`)?a(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(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 p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?f(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var m=(e,t,n)=>{for(var r of Object.keys(e))if(e[r]!==(t[r]??n[r]))return!1;return!0},h=e=>t=>{var n=e.defaultClassName,r=p(p({},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)m(c,r,e.defaultVariants)&&(n+=` `+l);return n},g=h({defaultClassName:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r0`,variantClassNames:{kind:{default:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r1`,key:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r2`,warning:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r3`,error:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r4`,pending:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r5`,success:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r6`,info:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r7`},wrap:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r8`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2r9`}},defaultVariants:{kind:`default`,wrap:!1},compoundVariants:[]}),_=h({defaultClassName:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2ra`,variantClassNames:{kind:{default:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rb`,key:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rc`,warning:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rd`,error:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2re`,pending:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rf`,success:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rg`,info:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2rh`,custom:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_k59j2ri`}},defaultVariants:{kind:`default`},compoundVariants:[]}),v=Object.freeze({default:`info-circle`,key:`info-circle`,warning:`status-warning`,error:`status-error`,pending:`status-in-process`,success:`status-ok`,info:`info-circle`});function y({children:e,className:r,kind:i=`default`,icon:a,wrap:o,...s}){let c=typeof a==`string`,l=a&&c?a:a?v[i]:void 0;return t.createElement(`span`,{className:(0,n.cl)(g({kind:i,wrap:o}),r),...s},l&&t.createElement(n.Icon,{className:(0,n.cl)(_({kind:c?`custom`:i})),icon:l}),e)}n.Metadata.set(y,{name:`Tag`,props:{kind:{type:`TagKind`,default:`default`},icon:{type:`boolean | IconName`,default:`false`},wrap:{type:`boolean`,default:`false`}}});var b=h({defaultClassName:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu50`,variantClassNames:{kind:{blue:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu51`,gray:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu52`},disabled:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu53`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu54`},wrap:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu55`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu56`}},defaultVariants:{kind:`blue`,disabled:!1,wrap:!1},compoundVariants:[]}),x=h({defaultClassName:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu57`,variantClassNames:{link:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu58`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu59`},wrap:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5a`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5b`},disabled:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5c`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5d`},addOrRemove:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5e`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5f`}},defaultVariants:{link:!1,wrap:!1,disabled:!1,addOrRemove:!1},compoundVariants:[[{disabled:!1,wrap:!1,addOrRemove:!0},`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5g`]]}),S=h({defaultClassName:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5h`,variantClassNames:{wrap:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5i`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5j`}},defaultVariants:{wrap:!1},compoundVariants:[]}),C=`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5l`;function w({children:e,className:i,onClick:a,disabled:o,wrap:s,href:c,target:l,kind:u,onAdd:d,onRemove:f,...p}){let{t:m}=(0,r.useWoodlandLanguage)(),h=t.Children.toArray(e).filter(e=>typeof e==`string`).join(``);t.useEffect(()=>{if(f&&d)throw Error(`Clickable tag should have onRemove or onAdd, not both`)},[d,f]);function g(e){d?d():f&&f(),e.stopPropagation()}function _(e){e.stopPropagation(),o?e.preventDefault():a&&a(e)}let v=!!a&&!c;function y(e){o||e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.currentTarget.click())}return t.createElement(`div`,{className:(0,n.cl)(b({kind:u,disabled:o,wrap:s}),i),...p},t.createElement(`span`,{className:(0,n.cl)(x({link:!!c||!!a,disabled:o,wrap:s,addOrRemove:d||f})),onClick:_,title:h,...v?{role:`button`,tabIndex:o?void 0:0,"aria-disabled":o||void 0,onKeyDown:y}:{}},c?t.createElement(`a`,{className:C,href:c,target:l},e):e),(d||f)&&!o&&t.createElement(`div`,{className:(0,n.cl)(S({wrap:s})),role:`button`,onClick:g,onKeyDown:y,tabIndex:0,"aria-label":d?`${m(`clickableTag.add`,{elementName:h,defaultValue:`Add ${h}`})}`:`${m(`clickableTag.remove`,{elementName:h,defaultValue:`Remove ${h}`})}`},t.createElement(n.Icon,{className:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_1avalu5k`,"aria-hidden":`true`,icon:d?`plus-sign`:`x`})))}n.Metadata.set(w,{name:`Clickable Tag`,props:{disabled:{type:`boolean`,default:`false`},wrap:{type:`boolean`,default:`false`},href:{type:`string`},target:{type:`'_blank' | '_self' | '_parent' | '_top'`},kind:{type:`ClickableTagKind`,default:`blue`},onAdd:{type:`() => void`},onRemove:{type:`() => void`}}});var T=h({defaultClassName:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf0`,variantClassNames:{wrap:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf1`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf2`}},defaultVariants:{wrap:!1},compoundVariants:[]}),E=`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf3`,D=h({defaultClassName:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf5`,variantClassNames:{href:{true:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf6`,false:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf7`},kind:{default:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf8`,key:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf9`,warning:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfa`,error:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfb`,pending:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfc`,success:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfd`,info:`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrfe`}},defaultVariants:{href:!1,kind:`default`},compoundVariants:[]}),O=`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrff`;function k({children:e,className:r,color:i=`default`,href:a,target:o,icon:s,tagKey:c,value:l,wrap:u=!1,...d}){return t.createElement(`span`,{className:(0,n.cl)(T({wrap:u}),r),...d},t.createElement(y,{className:(0,n.cl)(E),icon:s,kind:i,wrap:u},c&&t.createElement(`span`,{className:(0,n.cl)(`pkg_sps-woodland_core__family_tags__version_8_56_3__hash_16xtnrf4`)},c)),t.createElement(y,{className:(0,n.cl)(D({href:!!a,kind:i})),wrap:u},a?t.createElement(`a`,{className:O,href:a,target:o},l):l))}n.Metadata.set(k,{name:`Split Tag`,props:{color:{type:`TagKind`,default:`key`},href:{type:`string`},target:{type:`'_blank' | '_self' | '_parent' | '_top'`},icon:{type:`boolean | IconName`,default:`false`},tagKey:{type:`string`,required:!0},value:{type:`string`,required:!0}}}),e.ClickableTag=w,e.SplitTag=k,e.Tag=y,e.TagIcons=v});
|