@spscommerce/ds-react 7.18.0-beta → 7.19.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.
@@ -18996,9 +18996,12 @@ const tN = {
18996
18996
  SpsTextInput,
18997
18997
  SpsRadioButton,
18998
18998
  SpsCheckbox,
18999
+ addOnChangeErrorKey,
18999
19000
  } from "@spscommerce/ds-react";
19000
19001
 
19001
19002
  function DemoComponent() {
19003
+ addOnChangeErrorKey("mustSelectAColor");
19004
+
19002
19005
  function mustSelectAColorValidator(value) {
19003
19006
  if (value.radio === "b") {
19004
19007
  if (value.colors.filter(Boolean).length === 0) {
@@ -19011,7 +19014,7 @@ const tN = {
19011
19014
  };
19012
19015
 
19013
19016
  const COLOR_OPTIONS = ["Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet"];
19014
- const { formValue, formMeta, updateForm } = useSpsForm({
19017
+ const { formValue, formMeta, updateForm, validateForm } = useSpsForm({
19015
19018
  topFieldset: {
19016
19019
  text: "",
19017
19020
  nestedFieldset: {
@@ -19024,8 +19027,8 @@ const tN = {
19024
19027
  });
19025
19028
 
19026
19029
  React.useEffect(() => {
19027
- formMeta.fields.topFieldset.fields.nestedFieldset.fields.radio.markAsDirty();
19028
- }, [])
19030
+ validateForm();
19031
+ }, []);
19029
19032
 
19030
19033
  return (
19031
19034
  <SpsForm formMeta={formMeta}>
@@ -25416,7 +25419,7 @@ function Gu(e) {
25416
25419
  className: "ml-1 mr-1",
25417
25420
  disabled: m
25418
25421
  }
25419
- ), "Per Page"), f ? /* @__PURE__ */ s.createElement("div", { className: "sps-pagination__details" }, `Viewing ${v.indices[0]} - ${v.indices[1]}`) : /* @__PURE__ */ s.createElement("div", { className: "sps-pagination__details" }, `Viewing ${v.indices[0]} - ${v.indices[1]} of ${k()}`), /* @__PURE__ */ s.createElement(
25422
+ ), "Per Page"), f ? /* @__PURE__ */ s.createElement("div", { className: "sps-pagination__details" }, `Viewing ${v.indices[0]} - ${v.indices[1]} of many`) : /* @__PURE__ */ s.createElement("div", { className: "sps-pagination__details" }, `Viewing ${v.indices[0]} - ${v.indices[1]} of ${k()}`), /* @__PURE__ */ s.createElement(
25420
25423
  Ai,
25421
25424
  {
25422
25425
  numPages: v.numPages,