@spscommerce/ds-react 5.14.0 → 5.14.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/index.es.js CHANGED
@@ -204,7 +204,7 @@ function SpsButton(props2) {
204
204
  className: clsx("sps-icon", `sps-icon-${icon}`),
205
205
  "aria-hidden": "true"
206
206
  });
207
- const spinner = /* @__PURE__ */ React.createElement("div", {
207
+ const spinner = spinning && /* @__PURE__ */ React.createElement("div", {
208
208
  className: "sps-spinner"
209
209
  }, spinningTitle || t2("design-system:button.spinningTitle"));
210
210
  return /* @__PURE__ */ React.createElement("div", {
@@ -2546,7 +2546,8 @@ function SpsAutocomplete(_a) {
2546
2546
  zeroState,
2547
2547
  loading,
2548
2548
  maxHeightOptionListPx,
2549
- maxHeightOptionListRem
2549
+ maxHeightOptionListRem,
2550
+ "data-testid": testId
2550
2551
  } = _b, rest = __objRest(_b, [
2551
2552
  "className",
2552
2553
  "debounce",
@@ -2564,7 +2565,8 @@ function SpsAutocomplete(_a) {
2564
2565
  "zeroState",
2565
2566
  "loading",
2566
2567
  "maxHeightOptionListPx",
2567
- "maxHeightOptionListRem"
2568
+ "maxHeightOptionListRem",
2569
+ "data-testid"
2568
2570
  ]);
2569
2571
  const meta = formMeta || formControl2;
2570
2572
  const { wrapperId, controlId } = useFormControlId(id2, meta);
@@ -2635,7 +2637,8 @@ function SpsAutocomplete(_a) {
2635
2637
  inputRef: textInput,
2636
2638
  ref: rootRef,
2637
2639
  focusInputOnClick: true,
2638
- onClick: (event) => event.nativeEvent.stopImmediatePropagation()
2640
+ onClick: (event) => event.nativeEvent.stopImmediatePropagation(),
2641
+ "data-testId": `${testId}`
2639
2642
  }, /* @__PURE__ */ React.createElement("div", {
2640
2643
  className: "sps-text-input"
2641
2644
  }, /* @__PURE__ */ React.createElement("div", {
@@ -2653,8 +2656,10 @@ function SpsAutocomplete(_a) {
2653
2656
  onChange: handleChange,
2654
2657
  onKeyDown: handleKeyDown,
2655
2658
  disabled,
2656
- id: controlId
2659
+ id: controlId,
2660
+ "data-testid": `${testId}__input`
2657
2661
  }, rest)), value && !disabled && /* @__PURE__ */ React.createElement("i", {
2662
+ "aria-label": "clear",
2658
2663
  className: "sps-icon sps-icon-x-circle sps-form-control__clear-btn",
2659
2664
  onClick: (event) => clear(event)
2660
2665
  }))), /* @__PURE__ */ React.createElement(SpsOptionList, {
@@ -24232,7 +24237,7 @@ const SpsFormExamples = {
24232
24237
  },
24233
24238
  custom_errors: {
24234
24239
  label: "Custom errors",
24235
- description: () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "When using custom validators you can specify when to show the errors - on Change, on Blur or on Submit.", /* @__PURE__ */ React.createElement("br", null), "On Blur is the the default behavior. If you want to change that behavior you can use ", /* @__PURE__ */ React.createElement("b", null, "useCustomValidator hook"), ". It takes validation function as first argument, validator configuration (object containing errorKey as key and ValidationMode as value) as second argument and dependencies as third argument. useCustomValidator returns a React callback of the validation function with the given dependencies."), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement("b", null, "!Note:"), " useCustomValidator hook will make changes to the global scope and once you set a custom error key you can't change it.")),
24240
+ description: () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "When using custom validators you can specify when to show the errors - on Change, on Blur or on Submit.", /* @__PURE__ */ React.createElement("br", null), "On Blur is the default behavior. If you want to change that behavior you can use ", /* @__PURE__ */ React.createElement("b", null, "useCustomValidator hook"), ". It takes validation function as first argument, validator configuration (object containing errorKey as key and ValidationMode as value) as second argument and dependencies as third argument. useCustomValidator returns a React callback of the validation function with the given dependencies."), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement("b", null, "!Note:"), " useCustomValidator hook will make changes to the global scope and once you set a custom error key you can't change it.")),
24236
24241
  examples: {
24237
24242
  basic: {
24238
24243
  react: code`
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": "5.14.0",
4
+ "version": "5.14.3",
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": "5.14.0",
32
- "@spscommerce/ds-shared": "5.14.0",
33
- "@spscommerce/positioning": "5.14.0",
34
- "@spscommerce/utils": "5.14.0",
31
+ "@spscommerce/ds-colors": "5.14.3",
32
+ "@spscommerce/ds-shared": "5.14.3",
33
+ "@spscommerce/positioning": "5.14.3",
34
+ "@spscommerce/utils": "5.14.3",
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": "5.14.0",
43
- "@spscommerce/ds-shared": "5.14.0",
44
- "@spscommerce/positioning": "5.14.0",
45
- "@spscommerce/utils": "5.14.0",
42
+ "@spscommerce/ds-colors": "5.14.3",
43
+ "@spscommerce/ds-shared": "5.14.3",
44
+ "@spscommerce/positioning": "5.14.3",
45
+ "@spscommerce/utils": "5.14.3",
46
46
  "@testing-library/react": "^9.3.2",
47
47
  "@types/prop-types": "^15.7.1",
48
48
  "@types/react": "^16.9.0",