@thecb/components 9.3.1-beta.3 → 9.3.1-beta.4
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/dist/index.cjs.js +24 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +24 -29
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/radio-section/RadioSection.js +294 -309
package/dist/index.cjs.js
CHANGED
|
@@ -48690,7 +48690,6 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48690
48690
|
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48691
48691
|
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire,
|
|
48692
48692
|
_ref$legendText = _ref.legendText,
|
|
48693
|
-
legendText = _ref$legendText === void 0 ? "" : _ref$legendText,
|
|
48694
48693
|
_ref$sectionGroups = _ref.sectionGroups,
|
|
48695
48694
|
sectionGroups = _ref$sectionGroups === void 0 ? null : _ref$sectionGroups;
|
|
48696
48695
|
|
|
@@ -48741,38 +48740,30 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48741
48740
|
focused = _useState2[0],
|
|
48742
48741
|
setFocused = _useState2[1];
|
|
48743
48742
|
|
|
48743
|
+
var PrependedItem = function PrependedItem(_ref5) {
|
|
48744
|
+
var themeValues = _ref5.themeValues;
|
|
48745
|
+
return /*#__PURE__*/React__default.createElement(SolidDivider$1, {
|
|
48746
|
+
borderSize: "2px",
|
|
48747
|
+
color: themeValues.borderColor
|
|
48748
|
+
});
|
|
48749
|
+
};
|
|
48750
|
+
|
|
48744
48751
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
48745
|
-
padding: "
|
|
48752
|
+
padding: "0",
|
|
48746
48753
|
border: "1px solid ".concat(themeValues.borderColor),
|
|
48747
48754
|
borderRadius: "4px",
|
|
48748
48755
|
extraStyles: containerStyles
|
|
48749
48756
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48750
|
-
childGap: "0"
|
|
48751
|
-
}, /*#__PURE__*/React__default.createElement("fieldset", {
|
|
48752
|
-
role: "radiogroup",
|
|
48757
|
+
childGap: "0",
|
|
48753
48758
|
tabIndex: "0",
|
|
48754
|
-
"
|
|
48755
|
-
|
|
48756
|
-
|
|
48757
|
-
|
|
48758
|
-
|
|
48759
|
-
}
|
|
48760
|
-
|
|
48761
|
-
|
|
48762
|
-
srOnly: true,
|
|
48763
|
-
padding: "0",
|
|
48764
|
-
margin: "0"
|
|
48765
|
-
}, legendText), sectionGroups && sectionGroups.map(function (sectionGroup) {
|
|
48766
|
-
var prependedItem = "";
|
|
48767
|
-
|
|
48768
|
-
if (sectionGroups.indexOf(sectionGroup) !== 0) {
|
|
48769
|
-
prependedItem = /*#__PURE__*/React__default.createElement(SolidDivider$1, {
|
|
48770
|
-
borderSize: "2px",
|
|
48771
|
-
color: themeValues.borderColor
|
|
48772
|
-
});
|
|
48773
|
-
}
|
|
48774
|
-
|
|
48775
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, prependedItem, sectionGroup.filter(function (unfilteredSection) {
|
|
48759
|
+
role: "radiogroup",
|
|
48760
|
+
"aria-required": isSectionRequired
|
|
48761
|
+
}, sectionGroups && sectionGroups.map(function (sectionGroup) {
|
|
48762
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, {
|
|
48763
|
+
key: "sectiongroup-".concat(sectionGroups.indexOf(sectionGroup))
|
|
48764
|
+
}, sectionGroups.indexOf(sectionGroup) === sectionGroups.length - 1 ? /*#__PURE__*/React__default.createElement(PrependedItem, {
|
|
48765
|
+
themeValues: themeValues
|
|
48766
|
+
}) : "", sectionGroup.filter(function (unfilteredSection) {
|
|
48776
48767
|
return !unfilteredSection.hidden;
|
|
48777
48768
|
}).map(function (section) {
|
|
48778
48769
|
return /*#__PURE__*/React__default.createElement(Motion, {
|
|
@@ -48886,7 +48877,11 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48886
48877
|
animate: openSection === section.id ? "open" : "closed",
|
|
48887
48878
|
initial: initiallyOpen ? "open" : "closed",
|
|
48888
48879
|
key: "item-".concat(section.id),
|
|
48889
|
-
extraStyles: borderStyles
|
|
48880
|
+
extraStyles: borderStyles,
|
|
48881
|
+
role: "radio",
|
|
48882
|
+
"aria-checked": openSection === section.id,
|
|
48883
|
+
"aria-disabled": section.disabled,
|
|
48884
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48890
48885
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48891
48886
|
childGap: "0"
|
|
48892
48887
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48964,7 +48959,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48964
48959
|
variants: wrapper,
|
|
48965
48960
|
extraStyles: "transform-origin: 100% 0;"
|
|
48966
48961
|
}, section.content))));
|
|
48967
|
-
})))
|
|
48962
|
+
})));
|
|
48968
48963
|
};
|
|
48969
48964
|
|
|
48970
48965
|
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$Q);
|