@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,304 +1,222 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
key: t.id,
|
|
195
|
-
filtering: !!s,
|
|
196
|
-
manualSorting: i,
|
|
197
|
-
id: t.id,
|
|
198
|
-
...n("item")
|
|
199
|
-
},
|
|
200
|
-
t.label,
|
|
201
|
-
!t.required && /* @__PURE__ */ e.createElement(
|
|
202
|
-
F,
|
|
203
|
-
{
|
|
204
|
-
kind: "icon",
|
|
205
|
-
icon: "x",
|
|
206
|
-
"aria-label": c("addToList.remove", {
|
|
207
|
-
elementName: t.label,
|
|
208
|
-
defaultValue: `Remove ${t.label}`
|
|
209
|
-
}),
|
|
210
|
-
onClick: () => {
|
|
211
|
-
S(t.label, m, o);
|
|
212
|
-
},
|
|
213
|
-
className: A,
|
|
214
|
-
...n("move-item-button")
|
|
215
|
-
}
|
|
216
|
-
)
|
|
217
|
-
))) : /* @__PURE__ */ e.createElement(G, null, I ? /* @__PURE__ */ e.createElement(e.Fragment, null, I) : /* @__PURE__ */ e.createElement(
|
|
218
|
-
j,
|
|
219
|
-
{
|
|
220
|
-
heading: c("addToList.noDataZeroStateColumnTitle", {
|
|
221
|
-
defaultValue: "This Column is Empty"
|
|
222
|
-
}),
|
|
223
|
-
subHeading: c("addToList.noDataZeroStateOnColumnSubheading", {
|
|
224
|
-
columnName: b,
|
|
225
|
-
defaultValue: `Move options from the ${b}`
|
|
226
|
-
}),
|
|
227
|
-
artwork: Ce,
|
|
228
|
-
micro: !0,
|
|
229
|
-
...n("on-list-zero-state")
|
|
230
|
-
}
|
|
231
|
-
))
|
|
232
|
-
), /* @__PURE__ */ e.createElement(
|
|
233
|
-
Q,
|
|
234
|
-
{
|
|
235
|
-
headerText: b,
|
|
236
|
-
showCount: !s && V,
|
|
237
|
-
showIcons: $,
|
|
238
|
-
showMoveAllLinks: me,
|
|
239
|
-
showMoreOptionsText: de,
|
|
240
|
-
maxHeight: U,
|
|
241
|
-
vertical: f,
|
|
242
|
-
side: "right",
|
|
243
|
-
className: Ae({ vertical: f }),
|
|
244
|
-
otherHeader: h,
|
|
245
|
-
itemCount: m.length,
|
|
246
|
-
moveAll: W,
|
|
247
|
-
adjustForPhantomDroppableContainer: J,
|
|
248
|
-
...n("off-items-list")
|
|
249
|
-
},
|
|
250
|
-
v.length > 0 ? v.map((t) => /* @__PURE__ */ e.createElement(Y, { key: t.id, className: Fe, ...n("item") }, t.label, /* @__PURE__ */ e.createElement(
|
|
251
|
-
F,
|
|
252
|
-
{
|
|
253
|
-
kind: "icon",
|
|
254
|
-
icon: "plus-sign",
|
|
255
|
-
"aria-label": c("addToList.add", {
|
|
256
|
-
elementName: t.label,
|
|
257
|
-
defaultValue: `Add ${t.label}`
|
|
258
|
-
}),
|
|
259
|
-
onClick: () => {
|
|
260
|
-
S(t.label, o, m);
|
|
261
|
-
},
|
|
262
|
-
className: A,
|
|
263
|
-
...n("move-item-button")
|
|
264
|
-
}
|
|
265
|
-
))) : /* @__PURE__ */ e.createElement(G, null, _ ? /* @__PURE__ */ e.createElement(e.Fragment, null, _) : /* @__PURE__ */ e.createElement(
|
|
266
|
-
j,
|
|
267
|
-
{
|
|
268
|
-
heading: c("addToList.noDataZeroStateColumnTitle", {
|
|
269
|
-
defaultValue: "This Column is Empty"
|
|
270
|
-
}),
|
|
271
|
-
subHeading: c("addToList.noDataZeroStateOffColumnSubheading", {
|
|
272
|
-
columnName: h,
|
|
273
|
-
defaultValue: `Remove options from the ${h}`
|
|
274
|
-
}),
|
|
275
|
-
artwork: xe,
|
|
276
|
-
micro: !0,
|
|
277
|
-
...n("off-list-zero-state")
|
|
278
|
-
}
|
|
279
|
-
))
|
|
280
|
-
)));
|
|
1
|
+
import { nanoid as e } from "../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/index.browser.js";
|
|
2
|
+
import { dragHandle as t, dragPreview as n, draggableBox as r, droppableContainer as i, flexListWrapper as a, leftList as o, offItems as s, phantomDroppableContainer as c, rightList as l, rowButton as u } from "./AddToList.ve.js";
|
|
3
|
+
import { ItemsList as d } from "./ItemsList.js";
|
|
4
|
+
import { ListItem as f } from "./ListItem.js";
|
|
5
|
+
import { Metadata as p, cl as m, useChildTestIdAttrBuilder as h } from "@sps-woodland/core";
|
|
6
|
+
import * as g from "react";
|
|
7
|
+
import { useWoodlandLanguage as ee } from "@spscommerce/i18n";
|
|
8
|
+
import { grid as _ } from "@sps-woodland/tokens";
|
|
9
|
+
import { Button as v } from "@sps-woodland/core/buttons";
|
|
10
|
+
import { SpsTextInput as te, useSpsForm as y } from "@spscommerce/ds-react";
|
|
11
|
+
import { SpsIcon as ne } from "@spscommerce/ds-shared";
|
|
12
|
+
import { DOCUMENT_SEARCH_NO_RESULTS_LARGE as re, DOCUMENT_SEARCH_NO_RESULTS_SMALL as ie } from "@sps-woodland/illustrations";
|
|
13
|
+
import { DragPreview as ae, useButton as oe, useDrag as se, useDrop as ce } from "react-aria";
|
|
14
|
+
import { ZeroState as b } from "@sps-woodland/core/zero-state";
|
|
15
|
+
import { Card as x } from "@sps-woodland/core/card";
|
|
16
|
+
//#region src/add-to-list/add-to-list/AddToList.tsx
|
|
17
|
+
function S({ onList: p, offList: S, onHeader: C, offHeader: w, showFilter: le, showCount: T, showIcons: E, showMoveAllLinks: D, manualSort: O, maxDisplayedItems: ue, maxHeightPx: k, maxHeightRem: de, onChange: A, onListZeroState: j, offListZeroState: M, vertical: N = !1, onListAlphaSort: P = !0, "data-testid": F }) {
|
|
18
|
+
let I = h({ "data-testid": F }), { t: L } = ee(), { formValue: fe, formMeta: R } = y({ filterString: "" }), [z, B] = g.useState(""), V = k ? k / 16 : de, H = V ? `${V}rem` : "", U = g.useCallback((t, n) => (!O && P || n === "right" ? [...t].sort((e, t) => e.label.localeCompare(t.label)) : t).map((t) => {
|
|
19
|
+
let n = { ...t };
|
|
20
|
+
return n.id ||= e(), n;
|
|
21
|
+
}), [O, P]), W = g.useMemo(() => U(p, "left"), [p, U]), G = g.useMemo(() => U(S, "right"), [S, U]), K = g.useCallback((e) => !z || e.label.toLowerCase().includes(z.toLowerCase()), [z]), q = (e, t, n) => {
|
|
22
|
+
let r = n.find((t) => t.label === e);
|
|
23
|
+
r ? t === W ? A({
|
|
24
|
+
onList: [...W, r],
|
|
25
|
+
offList: G.filter((e) => e.label !== r.label)
|
|
26
|
+
}) : n === W && A({
|
|
27
|
+
onList: W.filter((e) => e.label !== r.label),
|
|
28
|
+
offList: [...G, r]
|
|
29
|
+
}) : console.error("could not remove item");
|
|
30
|
+
};
|
|
31
|
+
function pe(e) {
|
|
32
|
+
B(e.target.value);
|
|
33
|
+
}
|
|
34
|
+
function J(e) {
|
|
35
|
+
A(e === "left" ? {
|
|
36
|
+
onList: W.filter((e) => e.required),
|
|
37
|
+
offList: [...G, ...W.filter((e) => !e.required)]
|
|
38
|
+
} : {
|
|
39
|
+
onList: [...W, ...G],
|
|
40
|
+
offList: []
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
let Y = g.useCallback((e) => {
|
|
44
|
+
let { className: t, index: n, isPhantomDroppableContainer: r, children: a, ...o } = e, s = g.useRef(null), { dropProps: l, isDropTarget: u } = ce({
|
|
45
|
+
ref: s,
|
|
46
|
+
async onDrop(e) {
|
|
47
|
+
let t = await Promise.all(e.items.filter((e) => e.kind === "text" && e.types.has("text/plain")).map((e) => e.getText("text/plain"))), { index: r } = JSON.parse(t[0]), i = [...W], [a] = i.splice(r, 1), o = n > r ? n - 1 : n;
|
|
48
|
+
i.splice(o, 0, a), A({
|
|
49
|
+
onList: i,
|
|
50
|
+
offList: G
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return /* @__PURE__ */ g.createElement("div", {
|
|
55
|
+
ref: s,
|
|
56
|
+
...O ? l : [],
|
|
57
|
+
className: m(t, r ? c({ isDropTarget: u }) : i({ isDropTarget: u })),
|
|
58
|
+
...I("droppable-container"),
|
|
59
|
+
...o
|
|
60
|
+
}, a);
|
|
61
|
+
}, [W, O]), X = g.useCallback((e) => {
|
|
62
|
+
let { label: i, data: a, listIndex: o, required: s } = e, c = g.useRef(null), l = g.useRef(null), u = {
|
|
63
|
+
...a,
|
|
64
|
+
index: o
|
|
65
|
+
}, { dragProps: d, dragButtonProps: f, isDragging: p } = se({
|
|
66
|
+
preview: c,
|
|
67
|
+
hasDragButton: !0,
|
|
68
|
+
getItems() {
|
|
69
|
+
return [{ "text/plain": JSON.stringify(u) }];
|
|
70
|
+
}
|
|
71
|
+
}), { buttonProps: h } = oe(f, l);
|
|
72
|
+
return /* @__PURE__ */ g.createElement("div", {
|
|
73
|
+
...O ? d : {},
|
|
74
|
+
role: O ? "button" : "listitem",
|
|
75
|
+
tabIndex: 0,
|
|
76
|
+
id: `${i}${o}-drag`,
|
|
77
|
+
className: m(r({ isDragging: p })),
|
|
78
|
+
...I("draggable-item")
|
|
79
|
+
}, /* @__PURE__ */ g.createElement(Y, { index: o }, O && /* @__PURE__ */ g.createElement("i", {
|
|
80
|
+
...h,
|
|
81
|
+
ref: l,
|
|
82
|
+
className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_3__hash_13b8tx9k"
|
|
83
|
+
}), i, !s && /* @__PURE__ */ g.createElement(v, {
|
|
84
|
+
kind: "icon",
|
|
85
|
+
icon: "x",
|
|
86
|
+
"aria-label": L("addToList.remove", {
|
|
87
|
+
elementName: i,
|
|
88
|
+
defaultValue: `Remove ${i}`
|
|
89
|
+
}),
|
|
90
|
+
onClick: () => {
|
|
91
|
+
q(i, G, W);
|
|
92
|
+
},
|
|
93
|
+
className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_3__hash_13b8tx9x",
|
|
94
|
+
...I("move-item-button")
|
|
95
|
+
})), /* @__PURE__ */ g.createElement(ae, { ref: c }, () => /* @__PURE__ */ g.createElement("div", { className: n }, /* @__PURE__ */ g.createElement("i", { className: t }), i)));
|
|
96
|
+
}, [W, O]), Z = g.useMemo(() => W.filter(K), [W, K]), Q = g.useMemo(() => G.filter(K).slice(0, ue), [G, K]), me = !z && !!D && Z.length > 0, he = !z && !!D && Q.length > 0, ge = !z && G.length > Q.length, $ = !!O && !z && Z.length > 0 && !V;
|
|
97
|
+
return /* @__PURE__ */ g.createElement("div", { "data-testid": F }, le && /* @__PURE__ */ g.createElement("div", { className: _.root }, /* @__PURE__ */ g.createElement("div", { className: m(_[12], "pkg_sps-woodland_core__family_add-to-list__version_8_56_3__hash_13b8tx912") }, /* @__PURE__ */ g.createElement(te, {
|
|
98
|
+
value: fe.filterString,
|
|
99
|
+
formMeta: R.fields.filterString,
|
|
100
|
+
icon: ne.FILTER,
|
|
101
|
+
onChange: pe,
|
|
102
|
+
...I("filter-input")
|
|
103
|
+
}))), /* @__PURE__ */ g.createElement("div", { className: m(a({ vertical: N })) }, /* @__PURE__ */ g.createElement(d, {
|
|
104
|
+
headerText: C,
|
|
105
|
+
showCount: !z && T,
|
|
106
|
+
showIcons: E,
|
|
107
|
+
showMoveAllLinks: me,
|
|
108
|
+
disableMoveAllLinks: W.every((e) => e.required),
|
|
109
|
+
maxHeight: H,
|
|
110
|
+
vertical: N,
|
|
111
|
+
side: "left",
|
|
112
|
+
className: o({ vertical: N }),
|
|
113
|
+
otherHeader: w,
|
|
114
|
+
itemCount: W.length,
|
|
115
|
+
moveAll: J,
|
|
116
|
+
adjustForPhantomDroppableContainer: $,
|
|
117
|
+
...I("on-items-list")
|
|
118
|
+
}, Z.length > 0 ? /* @__PURE__ */ g.createElement(g.Fragment, null, O && !z && Z.map((e, t) => /* @__PURE__ */ g.createElement(g.Fragment, { key: e.id }, /* @__PURE__ */ g.createElement(X, {
|
|
119
|
+
data: e,
|
|
120
|
+
label: e.label,
|
|
121
|
+
required: e.required,
|
|
122
|
+
listIndex: t
|
|
123
|
+
}), t === Z.length - 1 && /* @__PURE__ */ g.createElement(Y, {
|
|
124
|
+
isPhantomDroppableContainer: !0,
|
|
125
|
+
index: t + 1
|
|
126
|
+
}))), (!O || z) && Z.map((e) => /* @__PURE__ */ g.createElement(f, {
|
|
127
|
+
key: e.id,
|
|
128
|
+
filtering: !!z,
|
|
129
|
+
manualSorting: O,
|
|
130
|
+
id: e.id,
|
|
131
|
+
...I("item")
|
|
132
|
+
}, e.label, !e.required && /* @__PURE__ */ g.createElement(v, {
|
|
133
|
+
kind: "icon",
|
|
134
|
+
icon: "x",
|
|
135
|
+
"aria-label": L("addToList.remove", {
|
|
136
|
+
elementName: e.label,
|
|
137
|
+
defaultValue: `Remove ${e.label}`
|
|
138
|
+
}),
|
|
139
|
+
onClick: () => {
|
|
140
|
+
q(e.label, G, W);
|
|
141
|
+
},
|
|
142
|
+
className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_3__hash_13b8tx9x",
|
|
143
|
+
...I("move-item-button")
|
|
144
|
+
})))) : /* @__PURE__ */ g.createElement(x, null, j ? /* @__PURE__ */ g.createElement(g.Fragment, null, j) : /* @__PURE__ */ g.createElement(b, {
|
|
145
|
+
heading: L("addToList.noDataZeroStateColumnTitle", { defaultValue: "This Column is Empty" }),
|
|
146
|
+
subHeading: L("addToList.noDataZeroStateOnColumnSubheading", {
|
|
147
|
+
columnName: w,
|
|
148
|
+
defaultValue: `Move options from the ${w}`
|
|
149
|
+
}),
|
|
150
|
+
artwork: re,
|
|
151
|
+
micro: !0,
|
|
152
|
+
...I("on-list-zero-state")
|
|
153
|
+
}))), /* @__PURE__ */ g.createElement(d, {
|
|
154
|
+
headerText: w,
|
|
155
|
+
showCount: !z && T,
|
|
156
|
+
showIcons: E,
|
|
157
|
+
showMoveAllLinks: he,
|
|
158
|
+
showMoreOptionsText: ge,
|
|
159
|
+
maxHeight: H,
|
|
160
|
+
vertical: N,
|
|
161
|
+
side: "right",
|
|
162
|
+
className: l({ vertical: N }),
|
|
163
|
+
otherHeader: C,
|
|
164
|
+
itemCount: G.length,
|
|
165
|
+
moveAll: J,
|
|
166
|
+
adjustForPhantomDroppableContainer: $,
|
|
167
|
+
...I("off-items-list")
|
|
168
|
+
}, Q.length > 0 ? Q.map((e) => /* @__PURE__ */ g.createElement(f, {
|
|
169
|
+
key: e.id,
|
|
170
|
+
className: s,
|
|
171
|
+
...I("item")
|
|
172
|
+
}, e.label, /* @__PURE__ */ g.createElement(v, {
|
|
173
|
+
kind: "icon",
|
|
174
|
+
icon: "plus-sign",
|
|
175
|
+
"aria-label": L("addToList.add", {
|
|
176
|
+
elementName: e.label,
|
|
177
|
+
defaultValue: `Add ${e.label}`
|
|
178
|
+
}),
|
|
179
|
+
onClick: () => {
|
|
180
|
+
q(e.label, W, G);
|
|
181
|
+
},
|
|
182
|
+
className: u,
|
|
183
|
+
...I("move-item-button")
|
|
184
|
+
}))) : /* @__PURE__ */ g.createElement(x, null, M ? /* @__PURE__ */ g.createElement(g.Fragment, null, M) : /* @__PURE__ */ g.createElement(b, {
|
|
185
|
+
heading: L("addToList.noDataZeroStateColumnTitle", { defaultValue: "This Column is Empty" }),
|
|
186
|
+
subHeading: L("addToList.noDataZeroStateOffColumnSubheading", {
|
|
187
|
+
columnName: C,
|
|
188
|
+
defaultValue: `Remove options from the ${C}`
|
|
189
|
+
}),
|
|
190
|
+
artwork: ie,
|
|
191
|
+
micro: !0,
|
|
192
|
+
...I("off-list-zero-state")
|
|
193
|
+
})))));
|
|
281
194
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
195
|
+
p.set(S, {
|
|
196
|
+
name: "Add To List",
|
|
197
|
+
props: {
|
|
198
|
+
onList: {
|
|
199
|
+
type: "ItemProps[]",
|
|
200
|
+
required: !0
|
|
201
|
+
},
|
|
202
|
+
offList: {
|
|
203
|
+
type: "ItemProps[]",
|
|
204
|
+
required: !0
|
|
205
|
+
},
|
|
206
|
+
onHeader: { type: "string" },
|
|
207
|
+
offHeader: { type: "string" },
|
|
208
|
+
showFilter: { type: "boolean" },
|
|
209
|
+
showCount: { type: "boolean" },
|
|
210
|
+
showIcons: { type: "boolean" },
|
|
211
|
+
showMoveAllLinks: { type: "boolean" },
|
|
212
|
+
manualSort: { type: "boolean" },
|
|
213
|
+
maxDisplayedItems: { type: "number" },
|
|
214
|
+
maxHeight: { type: "string" },
|
|
215
|
+
onChange: { type: "(newValue: AddToListAggregateValue) => void" },
|
|
216
|
+
autoSort: { type: "boolean" },
|
|
217
|
+
onListZeroState: { type: "ZeroState" },
|
|
218
|
+
offListZeroState: { type: "ZeroState" }
|
|
219
|
+
}
|
|
301
220
|
});
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
};
|
|
221
|
+
//#endregion
|
|
222
|
+
export { S as AddToList };
|