@spscommerce/ds-react 5.33.10 → 5.33.11
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/fieldset/SpsFieldset.d.ts +1 -1
- package/lib/index.cjs.js +51 -51
- package/lib/index.es.js +5 -10
- package/package.json +11 -11
package/lib/index.es.js
CHANGED
|
@@ -23060,7 +23060,7 @@ function SpsFieldset({
|
|
|
23060
23060
|
legend,
|
|
23061
23061
|
unsafelyReplaceClassName,
|
|
23062
23062
|
optional = false,
|
|
23063
|
-
enabled,
|
|
23063
|
+
enabled = false,
|
|
23064
23064
|
onToggled,
|
|
23065
23065
|
tooltip,
|
|
23066
23066
|
"data-testid": testId
|
|
@@ -23070,14 +23070,9 @@ function SpsFieldset({
|
|
|
23070
23070
|
const infoCircleElement = React.useRef(null);
|
|
23071
23071
|
const [showTip, setShowTip] = React.useState(TooltipVisibility.HIDDEN);
|
|
23072
23072
|
const [wasFocused, setWasFocused] = React.useState(false);
|
|
23073
|
-
const [isChecked,
|
|
23074
|
-
|
|
23075
|
-
|
|
23076
|
-
}, [enabled]);
|
|
23077
|
-
React.useEffect(() => {
|
|
23078
|
-
if (typeof onToggled === "function") {
|
|
23079
|
-
onToggled(isChecked);
|
|
23080
|
-
}
|
|
23073
|
+
const [isChecked, setIsChecked] = React.useState(enabled);
|
|
23074
|
+
useDidUpdateEffect(() => {
|
|
23075
|
+
onToggled == null ? void 0 : onToggled(isChecked);
|
|
23081
23076
|
}, [isChecked]);
|
|
23082
23077
|
React.useEffect(() => {
|
|
23083
23078
|
if (formControlSet || formMeta) {
|
|
@@ -23109,7 +23104,7 @@ function SpsFieldset({
|
|
|
23109
23104
|
checked: isChecked,
|
|
23110
23105
|
className: "d-inline-flex",
|
|
23111
23106
|
onChange: () => {
|
|
23112
|
-
|
|
23107
|
+
setIsChecked(!isChecked);
|
|
23113
23108
|
},
|
|
23114
23109
|
"data-testid": `${testId}__checkbox`
|
|
23115
23110
|
}), legend, tooltip && /* @__PURE__ */ React.createElement("span", {
|
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.33.
|
|
4
|
+
"version": "5.33.11",
|
|
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,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "5.33.
|
|
32
|
-
"@spscommerce/ds-illustrations": "5.33.
|
|
33
|
-
"@spscommerce/ds-shared": "5.33.
|
|
34
|
-
"@spscommerce/positioning": "5.33.
|
|
35
|
-
"@spscommerce/utils": "5.33.
|
|
31
|
+
"@spscommerce/ds-colors": "5.33.11",
|
|
32
|
+
"@spscommerce/ds-illustrations": "5.33.11",
|
|
33
|
+
"@spscommerce/ds-shared": "5.33.11",
|
|
34
|
+
"@spscommerce/positioning": "5.33.11",
|
|
35
|
+
"@spscommerce/utils": "5.33.11",
|
|
36
36
|
"moment": "^2.25.3",
|
|
37
37
|
"moment-timezone": "^0.5.28",
|
|
38
38
|
"react": "^16.9.0",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@react-stately/collections": "^3.3.3",
|
|
43
|
-
"@spscommerce/ds-colors": "5.33.
|
|
44
|
-
"@spscommerce/ds-illustrations": "5.33.
|
|
45
|
-
"@spscommerce/ds-shared": "5.33.
|
|
46
|
-
"@spscommerce/positioning": "5.33.
|
|
47
|
-
"@spscommerce/utils": "5.33.
|
|
43
|
+
"@spscommerce/ds-colors": "5.33.11",
|
|
44
|
+
"@spscommerce/ds-illustrations": "5.33.11",
|
|
45
|
+
"@spscommerce/ds-shared": "5.33.11",
|
|
46
|
+
"@spscommerce/positioning": "5.33.11",
|
|
47
|
+
"@spscommerce/utils": "5.33.11",
|
|
48
48
|
"@testing-library/react": "^9.3.2",
|
|
49
49
|
"@types/prop-types": "^15.7.1",
|
|
50
50
|
"@types/react": "^16.9.0",
|