@spscommerce/ds-react 4.36.4 → 5.0.0
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/index.es.js
CHANGED
|
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
import * as React from "react";
|
|
33
33
|
import React__default, { useRef, useEffect, createContext, useMemo as useMemo$1, useContext, useReducer, useState, useCallback as useCallback$1, useLayoutEffect as useLayoutEffect$1 } from "react";
|
|
34
|
-
import { noI18nI18n, ButtonKind, ButtonType, SpsIcon
|
|
34
|
+
import { noI18nI18n, ButtonKind, ButtonType, SpsIcon, SpinnerSize, Position, ZStratum, SpsOptionListOption, DropdownKind, SPS_ACTION_DEFAULTS, ClickableTagKind, TagKind, SpsIconSize, SelectMode, TooltipKind, TooltipShowTrigger, TOOLTIP_HIDE_DELAY_MS_DEFAULT, FeedbackBlockKind, FeedbackBlockIcons, GrowlerKind, GrowlerIcon, GROWLER_VISIBLE_DURATION_MS, GROWLER_FADEOUT_DURATION_MS, SpsInsightTileKind, SpsInsightTileIcons, KeyValueListTitleColor, SortDirection, ModalKind, ModalSize, DEFAULT_PAGE_SIZE_OPTIONS, StdButtonKind, SpsTaskStatus, TASK_QUEUE_NOTIFICATION_DURATION_MS, SpsTaskStatusIcons, SpsFilterTileKind, RingSize, WizardSubstepConditions } from "@spscommerce/ds-shared";
|
|
35
35
|
import { values as values$3, code, debounce, flatten, deepFreeze, setPath, diff, DiffChange, getPath, crumblePath, traversePath, forEachNestedObject, lockToAnimationFrames, constrain } from "@spscommerce/utils";
|
|
36
36
|
import * as ReactDOM from "react-dom";
|
|
37
37
|
import { createPortal, unstable_batchedUpdates } from "react-dom";
|
|
@@ -166,7 +166,7 @@ const propsDoc$1G = {
|
|
|
166
166
|
const propTypes$1K = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
167
167
|
disabled: propTypes$1L.exports.bool,
|
|
168
168
|
href: propTypes$1L.exports.string,
|
|
169
|
-
icon: enumValue(SpsIcon
|
|
169
|
+
icon: enumValue(SpsIcon),
|
|
170
170
|
kind: enumValue(ButtonKind),
|
|
171
171
|
spinning: propTypes$1L.exports.bool,
|
|
172
172
|
spinningTitle: propTypes$1L.exports.string,
|
|
@@ -278,8 +278,7 @@ const propsDoc$1F = __spreadProps(__spreadValues({}, spsFormProps), {
|
|
|
278
278
|
formMeta: "SpsFormArrayMeta<any> | SpsFormGroupMeta<any>",
|
|
279
279
|
isOpen: "boolean",
|
|
280
280
|
onClear: "() => void",
|
|
281
|
-
onSubmit: "React.FormEventHandler"
|
|
282
|
-
pinned: { type: "boolean", deprecated: true }
|
|
281
|
+
onSubmit: "React.FormEventHandler"
|
|
283
282
|
});
|
|
284
283
|
const propTypes$1J = __spreadProps(__spreadValues(__spreadValues({}, spsGlobalPropTypes), spsFormPropTypes), {
|
|
285
284
|
controlsDisabled: propTypes$1L.exports.bool,
|
|
@@ -292,8 +291,7 @@ const propTypes$1J = __spreadProps(__spreadValues(__spreadValues({}, spsGlobalPr
|
|
|
292
291
|
]),
|
|
293
292
|
isOpen: propTypes$1L.exports.bool,
|
|
294
293
|
onClear: fun(),
|
|
295
|
-
onSubmit: fun()
|
|
296
|
-
pinned: propTypes$1L.exports.bool
|
|
294
|
+
onSubmit: fun()
|
|
297
295
|
});
|
|
298
296
|
function SpsAdvancedSearch(props2) {
|
|
299
297
|
const _a = props2, {
|
|
@@ -305,7 +303,6 @@ function SpsAdvancedSearch(props2) {
|
|
|
305
303
|
formGroup: formGroup2,
|
|
306
304
|
formMeta,
|
|
307
305
|
isOpen,
|
|
308
|
-
pinned,
|
|
309
306
|
onClear,
|
|
310
307
|
onSubmit,
|
|
311
308
|
unsafelyReplaceClassName
|
|
@@ -318,18 +315,10 @@ function SpsAdvancedSearch(props2) {
|
|
|
318
315
|
"formGroup",
|
|
319
316
|
"formMeta",
|
|
320
317
|
"isOpen",
|
|
321
|
-
"pinned",
|
|
322
318
|
"onClear",
|
|
323
319
|
"onSubmit",
|
|
324
320
|
"unsafelyReplaceClassName"
|
|
325
321
|
]);
|
|
326
|
-
if (typeof pinned !== "undefined") {
|
|
327
|
-
console.warn(`
|
|
328
|
-
SpsAdvancedSearch: The 'pinned' prop is deprecated.
|
|
329
|
-
The advanced search component will no longer pin, and this prop will be removed in a future release.
|
|
330
|
-
Please remove it from your usage of the component.
|
|
331
|
-
`.replace(/\w{2,}/g, " ").trim());
|
|
332
|
-
}
|
|
333
322
|
const { t: t2 } = React.useContext(I18nContext);
|
|
334
323
|
function handleClear() {
|
|
335
324
|
if (onClear) {
|
|
@@ -1722,7 +1711,7 @@ const propTypes$1G = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
|
1722
1711
|
disabled: propTypes$1L.exports.bool,
|
|
1723
1712
|
formControl: impl(),
|
|
1724
1713
|
formMeta: impl(),
|
|
1725
|
-
icon: enumValue(SpsIcon
|
|
1714
|
+
icon: enumValue(SpsIcon),
|
|
1726
1715
|
onChange: fun(),
|
|
1727
1716
|
placeholder: propTypes$1L.exports.string,
|
|
1728
1717
|
suggestions: propTypes$1L.exports.oneOfType([
|
|
@@ -2021,7 +2010,7 @@ const propsDoc$1C = {
|
|
|
2021
2010
|
const propTypes$1F = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
2022
2011
|
alignLeft: propTypes$1L.exports.bool,
|
|
2023
2012
|
disabled: propTypes$1L.exports.bool,
|
|
2024
|
-
icon: enumValue(SpsIcon
|
|
2013
|
+
icon: enumValue(SpsIcon),
|
|
2025
2014
|
kind: enumValue(DropdownKind),
|
|
2026
2015
|
label: propTypes$1L.exports.string,
|
|
2027
2016
|
options: propTypes$1L.exports.arrayOf(propTypes$1L.exports.oneOfType([propTypes$1L.exports.func, propTypes$1L.exports.any])).isRequired,
|
|
@@ -2083,7 +2072,7 @@ function SpsDropdown(props2) {
|
|
|
2083
2072
|
icon = iconProp;
|
|
2084
2073
|
} else {
|
|
2085
2074
|
kind = DropdownKind.ICON;
|
|
2086
|
-
icon = iconProp || SpsIcon
|
|
2075
|
+
icon = iconProp || SpsIcon.ELLIPSES;
|
|
2087
2076
|
}
|
|
2088
2077
|
const dropdownRef = React.useRef(null);
|
|
2089
2078
|
React.useEffect(() => {
|
|
@@ -5667,35 +5656,10 @@ function SpsClickableTag(props2) {
|
|
|
5667
5656
|
"aria-label": onAdd ? "Add" : "Remove"
|
|
5668
5657
|
}, /* @__PURE__ */ React.createElement("i", {
|
|
5669
5658
|
"aria-hidden": "true",
|
|
5670
|
-
className: `sps-icon sps-icon-${onAdd ? SpsIcon
|
|
5659
|
+
className: `sps-icon sps-icon-${onAdd ? SpsIcon.PLUS_SIGN : SpsIcon.X}`,
|
|
5671
5660
|
"data-testid": `${testId}__icon`
|
|
5672
5661
|
})));
|
|
5673
5662
|
}
|
|
5674
|
-
function SpsMultiSelectTag(props2) {
|
|
5675
|
-
const _a = props2, {
|
|
5676
|
-
active,
|
|
5677
|
-
kind,
|
|
5678
|
-
children
|
|
5679
|
-
} = _a, clickableTagProps = __objRest(_a, [
|
|
5680
|
-
"active",
|
|
5681
|
-
"kind",
|
|
5682
|
-
"children"
|
|
5683
|
-
]);
|
|
5684
|
-
if (kind === MultiSelectTagKind.RED) {
|
|
5685
|
-
console.warn("The red SpsMultiSelectTag style has been removed from SpsClickableTag. This tag will display as blue");
|
|
5686
|
-
clickableTagProps.kind = ClickableTagKind.BLUE;
|
|
5687
|
-
} else if (kind === MultiSelectTagKind.GRAY) {
|
|
5688
|
-
clickableTagProps.kind = ClickableTagKind.GRAY;
|
|
5689
|
-
} else if (kind === MultiSelectTagKind.BLUE) {
|
|
5690
|
-
clickableTagProps.kind = ClickableTagKind.BLUE;
|
|
5691
|
-
}
|
|
5692
|
-
console.warn([
|
|
5693
|
-
"The SpsMultiSelectTag component has been renamed to SpsClickableTag.",
|
|
5694
|
-
"All references to it should be replaced before SpsMultiSelectTag is removed.",
|
|
5695
|
-
"The type of the kind prop is changing from MultiSelectTagKind to ClickableTagKind."
|
|
5696
|
-
].join(" "));
|
|
5697
|
-
return /* @__PURE__ */ React.createElement(SpsClickableTag, __spreadValues({}, clickableTagProps), children);
|
|
5698
|
-
}
|
|
5699
5663
|
Object.assign(SpsClickableTag, {
|
|
5700
5664
|
props: propsDoc$1u,
|
|
5701
5665
|
propTypes: propTypes$1x,
|
|
@@ -13933,7 +13897,7 @@ const propsDoc$1t = {
|
|
|
13933
13897
|
};
|
|
13934
13898
|
const propTypes$1w = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
13935
13899
|
content: propTypes$1L.exports.node,
|
|
13936
|
-
icon: enumValue(SpsIcon
|
|
13900
|
+
icon: enumValue(SpsIcon),
|
|
13937
13901
|
title: propTypes$1L.exports.string
|
|
13938
13902
|
});
|
|
13939
13903
|
function SpsCardHeader(props2) {
|
|
@@ -13975,7 +13939,7 @@ const propsDoc$1s = {
|
|
|
13975
13939
|
kind: "TagKind"
|
|
13976
13940
|
};
|
|
13977
13941
|
const propTypes$1v = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
13978
|
-
icon: enumValue(SpsIcon
|
|
13942
|
+
icon: enumValue(SpsIcon),
|
|
13979
13943
|
kind: enumValue(TagKind)
|
|
13980
13944
|
});
|
|
13981
13945
|
function SpsTag(props2) {
|
|
@@ -14024,12 +13988,12 @@ const propsDoc$1r = {
|
|
|
14024
13988
|
const propTypes$1u = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
14025
13989
|
activateTab: propTypes$1L.exports.func,
|
|
14026
13990
|
active: propTypes$1L.exports.bool,
|
|
14027
|
-
icon: enumValue(SpsIcon
|
|
13991
|
+
icon: enumValue(SpsIcon),
|
|
14028
13992
|
label: propTypes$1L.exports.string,
|
|
14029
13993
|
index: propTypes$1L.exports.number,
|
|
14030
13994
|
tag: propTypes$1L.exports.string,
|
|
14031
13995
|
tagKind: enumValue(TagKind),
|
|
14032
|
-
tagIcon: enumValue(SpsIcon
|
|
13996
|
+
tagIcon: enumValue(SpsIcon)
|
|
14033
13997
|
});
|
|
14034
13998
|
function SpsCardTabbedPane(props2) {
|
|
14035
13999
|
const _a = props2, {
|
|
@@ -14144,7 +14108,7 @@ const propTypes$1t = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
|
14144
14108
|
activeTab: propTypes$1L.exports.string,
|
|
14145
14109
|
footer: nodeOrRenderFn,
|
|
14146
14110
|
headerContent: nodeOrRenderFn,
|
|
14147
|
-
headerIcon: enumValue(SpsIcon
|
|
14111
|
+
headerIcon: enumValue(SpsIcon),
|
|
14148
14112
|
headerTitle: propTypes$1L.exports.string
|
|
14149
14113
|
});
|
|
14150
14114
|
function SpsCard(props2) {
|
|
@@ -14279,7 +14243,7 @@ function SpsColumnChooserColumn(props2) {
|
|
|
14279
14243
|
elementName: name
|
|
14280
14244
|
}),
|
|
14281
14245
|
kind: ButtonKind.ICON,
|
|
14282
|
-
icon: SpsIcon
|
|
14246
|
+
icon: SpsIcon.X,
|
|
14283
14247
|
onClick: () => {
|
|
14284
14248
|
if (onDelete) {
|
|
14285
14249
|
onDelete(value);
|
|
@@ -14404,7 +14368,7 @@ function SpsColumnChooser(props2) {
|
|
|
14404
14368
|
className: classes,
|
|
14405
14369
|
"aria-label": `${state.isVisible ? "Close" : "Open"} Column Chooser`,
|
|
14406
14370
|
kind: ButtonKind.ICON,
|
|
14407
|
-
icon: SpsIcon
|
|
14371
|
+
icon: SpsIcon.TABLE,
|
|
14408
14372
|
onClick: onVisibilityToggle,
|
|
14409
14373
|
"data-testid": "button"
|
|
14410
14374
|
}), state.isVisible && /* @__PURE__ */ React.createElement(SpsCard, {
|
|
@@ -14479,10 +14443,10 @@ const propsDoc$1n = {
|
|
|
14479
14443
|
size: "SpsIconSize"
|
|
14480
14444
|
};
|
|
14481
14445
|
const propTypes$1q = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
14482
|
-
icon: enumValue(SpsIcon
|
|
14446
|
+
icon: enumValue(SpsIcon).isRequired,
|
|
14483
14447
|
size: enumValue(SpsIconSize)
|
|
14484
14448
|
});
|
|
14485
|
-
function
|
|
14449
|
+
function SpsI(props2) {
|
|
14486
14450
|
const _a = props2, {
|
|
14487
14451
|
className,
|
|
14488
14452
|
"data-testid": testId,
|
|
@@ -14503,14 +14467,11 @@ function SpsIcon(props2) {
|
|
|
14503
14467
|
"data-testid": testId
|
|
14504
14468
|
}, rest));
|
|
14505
14469
|
}
|
|
14506
|
-
Object.assign(
|
|
14470
|
+
Object.assign(SpsI, {
|
|
14507
14471
|
props: propsDoc$1n,
|
|
14508
14472
|
propTypes: propTypes$1q,
|
|
14509
14473
|
displayName: "SpsI"
|
|
14510
14474
|
});
|
|
14511
|
-
function SpsI(props2) {
|
|
14512
|
-
return /* @__PURE__ */ React.createElement(SpsIcon, __spreadValues({}, props2));
|
|
14513
|
-
}
|
|
14514
14475
|
Object.assign(SpsI, {
|
|
14515
14476
|
props: propsDoc$1n,
|
|
14516
14477
|
propTypes: propTypes$1q,
|
|
@@ -14688,7 +14649,7 @@ function SpsContentRow(props2) {
|
|
|
14688
14649
|
onClick: handleToggle,
|
|
14689
14650
|
"aria-label": t2(`design-system:contentRow.${isExpanded ? "collapse" : "expand"}`)
|
|
14690
14651
|
}, /* @__PURE__ */ React.createElement(SpsI, {
|
|
14691
|
-
icon: isExpanded ? SpsIcon
|
|
14652
|
+
icon: isExpanded ? SpsIcon.MINUS_CIRCLE : SpsIcon.PLUS_CIRCLE
|
|
14692
14653
|
}));
|
|
14693
14654
|
const classes = clsx(unsafelyReplaceClassName || "sps-content-row", isExpanded && "sps-content-row--expanded", cardSpacing && "sps-content-row--card-spaced", selected && "sps-content-row--selected", alternateLayout && "sps-content-row--alternate-layout", className);
|
|
14694
14655
|
const [columns, [expansion]] = selectChildren(children, [
|
|
@@ -21938,7 +21899,7 @@ function SpsCheckboxDropdown(props2) {
|
|
|
21938
21899
|
}), /* @__PURE__ */ React.createElement(SpsDropdown, {
|
|
21939
21900
|
disabled,
|
|
21940
21901
|
options,
|
|
21941
|
-
icon: SpsIcon
|
|
21902
|
+
icon: SpsIcon.CHEVRON_DOWN
|
|
21942
21903
|
}));
|
|
21943
21904
|
}
|
|
21944
21905
|
Object.assign(SpsCheckboxDropdown, {
|
|
@@ -22165,8 +22126,8 @@ function SpsFieldset({
|
|
|
22165
22126
|
}), legend, tooltip && /* @__PURE__ */ React.createElement("span", {
|
|
22166
22127
|
className: "sps-fieldset__legend-icon",
|
|
22167
22128
|
ref: infoCircleElement
|
|
22168
|
-
}, /* @__PURE__ */ React.createElement(
|
|
22169
|
-
icon: SpsIcon
|
|
22129
|
+
}, /* @__PURE__ */ React.createElement(SpsI, {
|
|
22130
|
+
icon: SpsIcon.INFO_CIRCLE
|
|
22170
22131
|
}))), tooltip && /* @__PURE__ */ React.createElement(SpsTooltip, {
|
|
22171
22132
|
for: infoCircleElement
|
|
22172
22133
|
}, tooltip), /* @__PURE__ */ React.createElement(SpsTooltip, {
|
|
@@ -22544,7 +22505,7 @@ function SpsFocusedTask(props2) {
|
|
|
22544
22505
|
}, /* @__PURE__ */ React.createElement(SpsButton, {
|
|
22545
22506
|
className: "sps-focused-task__close-btn",
|
|
22546
22507
|
kind: ButtonKind.ICON,
|
|
22547
|
-
icon: SpsIcon
|
|
22508
|
+
icon: SpsIcon.X,
|
|
22548
22509
|
onClick: onClose,
|
|
22549
22510
|
title: t2("design-system:focusedTask.close")
|
|
22550
22511
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
@@ -24697,7 +24658,7 @@ const propsDoc$15 = {
|
|
|
24697
24658
|
};
|
|
24698
24659
|
const propTypes$18 = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
24699
24660
|
horizontal: propTypes$1L.exports.bool,
|
|
24700
|
-
icon: enumValue(SpsIcon
|
|
24661
|
+
icon: enumValue(SpsIcon),
|
|
24701
24662
|
kind: enumValue(SpsInsightTileKind),
|
|
24702
24663
|
title: propTypes$1L.exports.string,
|
|
24703
24664
|
metric: propTypes$1L.exports.number || propTypes$1L.exports.string,
|
|
@@ -25166,7 +25127,7 @@ const propTypes$15 = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
|
25166
25127
|
]).isRequired,
|
|
25167
25128
|
stronglySuggested: propTypes$1L.exports.bool,
|
|
25168
25129
|
help: nodeOrRenderFn,
|
|
25169
|
-
helpIcon: enumValue(SpsIcon
|
|
25130
|
+
helpIcon: enumValue(SpsIcon),
|
|
25170
25131
|
helpIconColor: propTypes$1L.exports.string,
|
|
25171
25132
|
errors: nodeOrRenderFn
|
|
25172
25133
|
});
|
|
@@ -25178,7 +25139,7 @@ function SpsLabel(_o) {
|
|
|
25178
25139
|
for: forProp,
|
|
25179
25140
|
stronglySuggested,
|
|
25180
25141
|
help,
|
|
25181
|
-
helpIcon = SpsIcon
|
|
25142
|
+
helpIcon = SpsIcon.QUESTION_CIRCLE,
|
|
25182
25143
|
helpIconColor = "blue200",
|
|
25183
25144
|
errors,
|
|
25184
25145
|
unsafelyReplaceClassName
|
|
@@ -25597,7 +25558,7 @@ function SpsListActionBar(props2) {
|
|
|
25597
25558
|
className: "sps-list-action-bar__clear"
|
|
25598
25559
|
}, /* @__PURE__ */ React.createElement(SpsButton, {
|
|
25599
25560
|
kind: ButtonKind.LINK,
|
|
25600
|
-
icon: SpsIcon
|
|
25561
|
+
icon: SpsIcon.X,
|
|
25601
25562
|
onClick: handleClearClick,
|
|
25602
25563
|
"data-testid": `${testId}__clear-button`
|
|
25603
25564
|
}, t2("design-system:listActionBar.clearSelected")))));
|
|
@@ -28846,7 +28807,7 @@ const propTypes$S = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
|
28846
28807
|
formControl: impl(),
|
|
28847
28808
|
formMeta: impl(),
|
|
28848
28809
|
hideSelected: propTypes$1L.exports.bool,
|
|
28849
|
-
icon: enumValue(SpsIcon
|
|
28810
|
+
icon: enumValue(SpsIcon),
|
|
28850
28811
|
onChange: fun(),
|
|
28851
28812
|
options: propTypes$1L.exports.oneOfType([
|
|
28852
28813
|
propTypes$1L.exports.array,
|
|
@@ -30299,7 +30260,7 @@ function SpsProgressBar(props2) {
|
|
|
30299
30260
|
className: "sps-progress-bar__close-button"
|
|
30300
30261
|
}, /* @__PURE__ */ React.createElement(SpsButton, {
|
|
30301
30262
|
kind: ButtonKind.ICON,
|
|
30302
|
-
icon: SpsIcon
|
|
30263
|
+
icon: SpsIcon.X,
|
|
30303
30264
|
onClick: onClose,
|
|
30304
30265
|
title: t2("design-system:progressBar.closeButtonTitle")
|
|
30305
30266
|
})));
|
|
@@ -30420,7 +30381,7 @@ const propsDoc$H = {
|
|
|
30420
30381
|
iconSize: "SpsIconSize"
|
|
30421
30382
|
};
|
|
30422
30383
|
const propTypes$K = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
30423
|
-
icon: enumValue(SpsIcon
|
|
30384
|
+
icon: enumValue(SpsIcon),
|
|
30424
30385
|
iconSize: enumValue(SpsIconSize)
|
|
30425
30386
|
});
|
|
30426
30387
|
function SpsTooltipTitle({
|
|
@@ -30999,6 +30960,7 @@ function SpsSteppedProgressBar(props2) {
|
|
|
30999
30960
|
className: "sps-stepped-progress-bar__bar-background d-flex align-items-center list-unstyled mb-0"
|
|
31000
30961
|
}, data.map((id2, index) => /* @__PURE__ */ React.createElement("li", {
|
|
31001
30962
|
id: id2,
|
|
30963
|
+
key: id2,
|
|
31002
30964
|
className: clsx("sps-stepped-progress-bar__step", completedStepsCount > index && "sps-stepped-progress-bar__step-complete")
|
|
31003
30965
|
}, findIcon(index) && /* @__PURE__ */ React.createElement(SpsI, {
|
|
31004
30966
|
icon: findIcon(index).icon,
|
|
@@ -32411,7 +32373,7 @@ const propTypes$D = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
|
32411
32373
|
disabled: propTypes$1L.exports.bool,
|
|
32412
32374
|
href: propTypes$1L.exports.string,
|
|
32413
32375
|
label: propTypes$1L.exports.string,
|
|
32414
|
-
icon: enumValue(SpsIcon
|
|
32376
|
+
icon: enumValue(SpsIcon),
|
|
32415
32377
|
kind: enumValue(StdButtonKind),
|
|
32416
32378
|
options: propTypes$1L.exports.arrayOf(propTypes$1L.exports.oneOfType([propTypes$1L.exports.func, propTypes$1L.exports.any]))
|
|
32417
32379
|
});
|
|
@@ -32590,7 +32552,7 @@ function SpsSlackLink(props2) {
|
|
|
32590
32552
|
rel: "noreferrer",
|
|
32591
32553
|
href: `https://spscommerce.slack.com/archives/${channelId}`
|
|
32592
32554
|
}, rest), /* @__PURE__ */ React.createElement("i", {
|
|
32593
|
-
className: `sps-icon sps-icon-${SpsIcon
|
|
32555
|
+
className: `sps-icon sps-icon-${SpsIcon.CONVERSATION}`,
|
|
32594
32556
|
"aria-hidden": "true"
|
|
32595
32557
|
}), /* @__PURE__ */ React.createElement("span", null, t2("design-system:slackLink.label")));
|
|
32596
32558
|
}
|
|
@@ -33620,7 +33582,7 @@ const propTypes$x = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
|
33620
33582
|
disabled: propTypes$1L.exports.bool,
|
|
33621
33583
|
formControl: impl(),
|
|
33622
33584
|
formMeta: impl(),
|
|
33623
|
-
icon: enumValue(SpsIcon
|
|
33585
|
+
icon: enumValue(SpsIcon),
|
|
33624
33586
|
name: propTypes$1L.exports.string,
|
|
33625
33587
|
onChange: fun(),
|
|
33626
33588
|
placeholder: propTypes$1L.exports.string,
|
|
@@ -34677,7 +34639,7 @@ const propsDoc$o = {
|
|
|
34677
34639
|
};
|
|
34678
34640
|
const propTypes$q = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
34679
34641
|
heading: propTypes$1L.exports.string,
|
|
34680
|
-
icon: enumValue(SpsIcon
|
|
34642
|
+
icon: enumValue(SpsIcon)
|
|
34681
34643
|
});
|
|
34682
34644
|
function SpsWorkflow(props2) {
|
|
34683
34645
|
const _a = props2, {
|
|
@@ -34801,7 +34763,7 @@ function SpsWizardSidebar({
|
|
|
34801
34763
|
}, step.percentComplete === 100 ? /* @__PURE__ */ React.createElement("div", {
|
|
34802
34764
|
className: `${CSS_BLOCK$2}__step-complete`
|
|
34803
34765
|
}, /* @__PURE__ */ React.createElement(SpsI, {
|
|
34804
|
-
icon: SpsIcon
|
|
34766
|
+
icon: SpsIcon.CHECKMARK
|
|
34805
34767
|
})) : /* @__PURE__ */ React.createElement(SpsProgressRing, {
|
|
34806
34768
|
size: RingSize.SMALL,
|
|
34807
34769
|
progress: step.percentComplete
|
|
@@ -34984,7 +34946,7 @@ const propsDoc$j = {
|
|
|
34984
34946
|
icon: "SpsIcon"
|
|
34985
34947
|
};
|
|
34986
34948
|
const propTypes$l = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
34987
|
-
icon: enumValue(SpsIcon
|
|
34949
|
+
icon: enumValue(SpsIcon)
|
|
34988
34950
|
});
|
|
34989
34951
|
function SpsWorkflowDocumentStatus(props2) {
|
|
34990
34952
|
const _a = props2, {
|
|
@@ -35027,7 +34989,7 @@ const propsDoc$i = {
|
|
|
35027
34989
|
title: { type: "string", required: true }
|
|
35028
34990
|
};
|
|
35029
34991
|
const propTypes$k = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
35030
|
-
icon: enumValue(SpsIcon
|
|
34992
|
+
icon: enumValue(SpsIcon).isRequired,
|
|
35031
34993
|
title: propTypes$1L.exports.string.isRequired
|
|
35032
34994
|
});
|
|
35033
34995
|
function SpsWorkflowStep(props2) {
|
|
@@ -35195,7 +35157,7 @@ const propsDoc$g = {
|
|
|
35195
35157
|
subHeading: "ReactNodeOrRenderFn"
|
|
35196
35158
|
};
|
|
35197
35159
|
const propTypes$i = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
35198
|
-
icon: enumValue(SpsIcon
|
|
35160
|
+
icon: enumValue(SpsIcon).isRequired,
|
|
35199
35161
|
heading: nodeOrRenderFn,
|
|
35200
35162
|
subHeading: nodeOrRenderFn
|
|
35201
35163
|
});
|
|
@@ -35460,7 +35422,7 @@ function SpsFilterPanelSection(_M) {
|
|
|
35460
35422
|
}
|
|
35461
35423
|
}
|
|
35462
35424
|
}, /* @__PURE__ */ React.createElement(SpsI, {
|
|
35463
|
-
icon: isExpanded ? SpsIcon
|
|
35425
|
+
icon: isExpanded ? SpsIcon.MINUS_CIRCLE : SpsIcon.PLUS_CIRCLE
|
|
35464
35426
|
}));
|
|
35465
35427
|
React.useEffect(() => {
|
|
35466
35428
|
setLocalExpanded(expanded);
|
|
@@ -35503,7 +35465,7 @@ function SpsFilterPanelCap(_O) {
|
|
|
35503
35465
|
}, rest), /* @__PURE__ */ React.createElement("div", {
|
|
35504
35466
|
className: "sps-filter-panel__cap__title-wrapper"
|
|
35505
35467
|
}, /* @__PURE__ */ React.createElement(SpsI, {
|
|
35506
|
-
icon: SpsIcon
|
|
35468
|
+
icon: SpsIcon.FILTER,
|
|
35507
35469
|
size: SpsIconSize.SMALL
|
|
35508
35470
|
}), /* @__PURE__ */ React.createElement("p", null, t2("design-system:filterPanel.title"))), /* @__PURE__ */ React.createElement(SpsButton, {
|
|
35509
35471
|
kind: ButtonKind.LINK,
|
|
@@ -35873,7 +35835,7 @@ function SpsFilterPanelFilterBox(_Q) {
|
|
|
35873
35835
|
className: clsx("sps-filter-panel__filter-box", className)
|
|
35874
35836
|
}, rest), /* @__PURE__ */ React.createElement(SpsTextInput, {
|
|
35875
35837
|
value,
|
|
35876
|
-
icon: SpsIcon
|
|
35838
|
+
icon: SpsIcon.FILTER,
|
|
35877
35839
|
formMeta,
|
|
35878
35840
|
placeholder: placeholder || t2("design-system:filterPanel.filterPlaceholder"),
|
|
35879
35841
|
onChange: onFilterChange
|
|
@@ -36967,7 +36929,7 @@ function SpsCurrencyInput(__) {
|
|
|
36967
36929
|
className: clsx("sps-form-control", disabled && "disabled")
|
|
36968
36930
|
}, /* @__PURE__ */ React.createElement(SpsI, {
|
|
36969
36931
|
className: "sps-text-input__icon",
|
|
36970
|
-
icon: SpsIcon
|
|
36932
|
+
icon: SpsIcon.DOLLAR_SIGN
|
|
36971
36933
|
}), /* @__PURE__ */ React.createElement("input", __spreadValues({
|
|
36972
36934
|
type: "text",
|
|
36973
36935
|
ref: textInput,
|
|
@@ -37082,7 +37044,7 @@ const propsDoc$7 = {
|
|
|
37082
37044
|
const propTypes$7 = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
|
|
37083
37045
|
color: enumValue(TagKind),
|
|
37084
37046
|
href: propTypes$1L.exports.string,
|
|
37085
|
-
icon: enumValue(SpsIcon
|
|
37047
|
+
icon: enumValue(SpsIcon),
|
|
37086
37048
|
tagKey: propTypes$1L.exports.string.isRequired,
|
|
37087
37049
|
value: propTypes$1L.exports.string.isRequired
|
|
37088
37050
|
});
|
|
@@ -37651,4 +37613,4 @@ Object.assign(SpsVr, {
|
|
|
37651
37613
|
propTypes,
|
|
37652
37614
|
displayName: "SpsDescriptionListTerm / SpsDt"
|
|
37653
37615
|
});
|
|
37654
|
-
export { AsTypingErrorKeys, ContentOrderExample, FauxChangeEvent, I18nContext, MANIFEST, OnBlurErrorKeys, PortalContext, SimpleDateUtils, SpsAddRemoveFormRowExamples, SpsAdvancedSearch, SpsAdvancedSearchExamples, SpsAutocomplete, SpsAutocompleteExamples, SpsButton, SpsButtonExamples, SpsButtonGroup, SpsCard, SpsCardExamples, SpsCardTabbedPane, SpsCardV2, SpsCardV2Footer, SpsCardV2Header, SpsCardV2Title, SpsCheckbox, SpsCheckboxDropdown, SpsCheckboxExamples, SpsClickableTag, SpsClickableTagExamples, SpsColumnChooser, SpsColumnChooserColumn, SpsColumnChooserExamples, SpsConditionalField, SpsConditionalFieldExamples, SpsContentRow, SpsContentRowCol, SpsContentRowExamples, SpsContentRowExpansion, SpsCurrencyInput, SpsCurrencyInputExamples, SpsDateRangePicker, SpsDateRangePickerExamples, SpsDateRangePickerV2, SpsDateTime, SpsDatepicker, SpsDatepickerExamples, SpsDatepickerV2, SpsDatetimeExamples, SpsDd, SpsDescriptionList, SpsDescriptionListDefinition, SpsDescriptionListExamples, SpsDescriptionListTerm, SpsDl, SpsDropdown, SpsDropdownExamples, SpsDt, SpsFeedbackBlock, SpsFeedbackBlockExamples, SpsFieldset, SpsFieldsetExamples, SpsFilterPanel, SpsFilterPanelCap, SpsFilterPanelExamples, SpsFilterPanelFilterBox, SpsFilterPanelSection, SpsFilterTile, SpsFilterTileList, SpsFilterTileListExamples, SpsFocusedTask, SpsFocusedTaskActions, SpsFocusedTaskExamples, SpsForm, SpsFormArrayMeta, SpsFormComponentWrapper, SpsFormExamples, SpsFormFieldMeta, SpsFormGroupMeta, SpsFormMetaBase, SpsFormSetMeta, SpsGrowler, SpsGrowlerExamples, SpsI,
|
|
37616
|
+
export { AsTypingErrorKeys, ContentOrderExample, FauxChangeEvent, I18nContext, MANIFEST, OnBlurErrorKeys, PortalContext, SimpleDateUtils, SpsAddRemoveFormRowExamples, SpsAdvancedSearch, SpsAdvancedSearchExamples, SpsAutocomplete, SpsAutocompleteExamples, SpsButton, SpsButtonExamples, SpsButtonGroup, SpsCard, SpsCardExamples, SpsCardTabbedPane, SpsCardV2, SpsCardV2Footer, SpsCardV2Header, SpsCardV2Title, SpsCheckbox, SpsCheckboxDropdown, SpsCheckboxExamples, SpsClickableTag, SpsClickableTagExamples, SpsColumnChooser, SpsColumnChooserColumn, SpsColumnChooserExamples, SpsConditionalField, SpsConditionalFieldExamples, SpsContentRow, SpsContentRowCol, SpsContentRowExamples, SpsContentRowExpansion, SpsCurrencyInput, SpsCurrencyInputExamples, SpsDateRangePicker, SpsDateRangePickerExamples, SpsDateRangePickerV2, SpsDateTime, SpsDatepicker, SpsDatepickerExamples, SpsDatepickerV2, SpsDatetimeExamples, SpsDd, SpsDescriptionList, SpsDescriptionListDefinition, SpsDescriptionListExamples, SpsDescriptionListTerm, SpsDl, SpsDropdown, SpsDropdownExamples, SpsDt, SpsFeedbackBlock, SpsFeedbackBlockExamples, SpsFieldset, SpsFieldsetExamples, SpsFilterPanel, SpsFilterPanelCap, SpsFilterPanelExamples, SpsFilterPanelFilterBox, SpsFilterPanelSection, SpsFilterTile, SpsFilterTileList, SpsFilterTileListExamples, SpsFocusedTask, SpsFocusedTaskActions, SpsFocusedTaskExamples, SpsForm, SpsFormArrayMeta, SpsFormComponentWrapper, SpsFormExamples, SpsFormFieldMeta, SpsFormGroupMeta, SpsFormMetaBase, SpsFormSetMeta, SpsGrowler, SpsGrowlerExamples, SpsI, SpsIconButtonPanel, SpsIncrementor, SpsIncrementorExamples, SpsInputGroup, SpsInsightTile, SpsInsights, SpsKeyValueList, SpsKeyValueListExamples, SpsKeyValueListItem, SpsKeyValueTag, SpsKeyValueTagExamples, SpsLabel, SpsLabelExamples, SpsListActionBar, SpsListActionBarExamples, SpsListToolbar, SpsListToolbarExamples, SpsListToolbarSearch, SpsMicroBlock, SpsMicroBlockExamples, SpsMicroZeroState, SpsModal, SpsModalAction, SpsModalBody, SpsModalExamples, SpsModalFooter, SpsModalHeader, SpsModalOverlay, SpsModalV2, SpsModalV2Footer, SpsMultiSelect, SpsMultiSelectExamples, SpsPageSelector, SpsPageSubtitle, SpsPageTitle, SpsPageTitleExamples, SpsPagination, SpsPaginationExamples, SpsProductBar, SpsProductBarExamples, SpsProductBarTab, SpsProgressBar, SpsProgressBarExamples, SpsProgressRing, SpsRadioButton, SpsRadioButtonExamples, SpsScrollableContainer, SpsScrollableContainerExamples, SpsSearchResultsBar, SpsSearchResultsBarExamples, SpsSelect, SpsSelectExamples, SpsSideNav, SpsSideNavExamples, SpsSlackLink, SpsSlackLinkExamples, SpsSortingHeader, SpsSortingHeaderCell, SpsSortingHeaderExamples, SpsSpinner, SpsSpinnerExamples, SpsSplitButton, SpsSplitButtonExamples, SpsSteppedProgressBar, SpsSteppedProgressBarExamples, SpsSummaryListColumn, SpsSummaryListExamples, SpsSummaryListExpansion, SpsSummaryListRow, SpsTab, SpsTabPanel, SpsTable, SpsTableBody, SpsTableCell, SpsTableExamples, SpsTableHead, SpsTableHeader, SpsTableRow, SpsTabsV2, SpsTag, SpsTagExamples, SpsTaskQueue, SpsTaskQueueExamples, SpsTbody, SpsTd, SpsTextInput, SpsTextInputExamples, SpsTextarea, SpsTextareaExamples, SpsTh, SpsThead, SpsTile, SpsTileList, SpsTileListExamples, SpsToggle, SpsToggleExamples, SpsTooltip, SpsTooltipExamples, SpsTooltipTitle, SpsTr, SpsValidators, SpsVerticalRule, SpsVr, SpsWf, SpsWfDoc, SpsWfDs, SpsWfStep, SpsWizardExamples, SpsWizardSidebar, SpsWizardSubstep, SpsWorkflow, SpsWorkflowDocument, SpsWorkflowDocumentStatus, SpsWorkflowExamples, SpsWorkflowStep, SpsZeroState, SpsZeroStateExamples, TooltipVisibility, contentOf, date, dateConstraint, dateRange, findParentBranches, flipPosition, formArray, formControl, formGroup, getMember, getPosition, selectChildren, toggleTooltipState, useCheckDeprecatedProps, useDidUpdateEffect, useDocumentEventListener, useElementId, useForm, useGrowlers, useInputPopup, usePatchReducer, usePortal, useServerSideValidation, useSpsAction, useSpsForm, validate, weekOfMonth };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/ds-react",
|
|
3
3
|
"description": "SPS Design System React components",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-react",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "
|
|
32
|
-
"@spscommerce/ds-shared": "
|
|
33
|
-
"@spscommerce/positioning": "
|
|
34
|
-
"@spscommerce/utils": "
|
|
31
|
+
"@spscommerce/ds-colors": "5.0.0",
|
|
32
|
+
"@spscommerce/ds-shared": "5.0.0",
|
|
33
|
+
"@spscommerce/positioning": "5.0.0",
|
|
34
|
+
"@spscommerce/utils": "5.0.0",
|
|
35
35
|
"moment": "^2.25.3",
|
|
36
36
|
"moment-timezone": "^0.5.28",
|
|
37
37
|
"react": "^16.9.0",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@react-stately/collections": "^3.3.3",
|
|
42
|
-
"@spscommerce/ds-colors": "
|
|
43
|
-
"@spscommerce/ds-shared": "
|
|
44
|
-
"@spscommerce/positioning": "
|
|
45
|
-
"@spscommerce/utils": "
|
|
42
|
+
"@spscommerce/ds-colors": "5.0.0",
|
|
43
|
+
"@spscommerce/ds-shared": "5.0.0",
|
|
44
|
+
"@spscommerce/positioning": "5.0.0",
|
|
45
|
+
"@spscommerce/utils": "5.0.0",
|
|
46
46
|
"@testing-library/jest-dom": "^4.2.4",
|
|
47
47
|
"@testing-library/react": "^9.3.2",
|
|
48
48
|
"@types/prop-types": "^15.7.1",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { MultiSelectTagKind } from "@spscommerce/ds-shared";
|
|
2
|
-
import * as PropTypes from "../prop-types";
|
|
3
|
-
declare const propTypes: {
|
|
4
|
-
active: PropTypes.Requireable<boolean>;
|
|
5
|
-
kind: PropTypes.Requireable<MultiSelectTagKind>;
|
|
6
|
-
onRemove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
7
|
-
onAdd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
9
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
10
|
-
className: PropTypes.Requireable<string>;
|
|
11
|
-
"data-testid": PropTypes.Requireable<string>;
|
|
12
|
-
unsafelyReplaceClassName: PropTypes.Requireable<string>;
|
|
13
|
-
};
|
|
14
|
-
export declare type SpsMultiSelectTagProps = PropTypes.InferTS<typeof propTypes, HTMLSpanElement>;
|
|
15
|
-
export declare function SpsMultiSelectTag(props: SpsMultiSelectTagProps): JSX.Element;
|
|
16
|
-
export {};
|