@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.esm.js
CHANGED
|
@@ -48682,7 +48682,6 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48682
48682
|
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48683
48683
|
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire,
|
|
48684
48684
|
_ref$legendText = _ref.legendText,
|
|
48685
|
-
legendText = _ref$legendText === void 0 ? "" : _ref$legendText,
|
|
48686
48685
|
_ref$sectionGroups = _ref.sectionGroups,
|
|
48687
48686
|
sectionGroups = _ref$sectionGroups === void 0 ? null : _ref$sectionGroups;
|
|
48688
48687
|
|
|
@@ -48733,38 +48732,30 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48733
48732
|
focused = _useState2[0],
|
|
48734
48733
|
setFocused = _useState2[1];
|
|
48735
48734
|
|
|
48735
|
+
var PrependedItem = function PrependedItem(_ref5) {
|
|
48736
|
+
var themeValues = _ref5.themeValues;
|
|
48737
|
+
return /*#__PURE__*/React.createElement(SolidDivider$1, {
|
|
48738
|
+
borderSize: "2px",
|
|
48739
|
+
color: themeValues.borderColor
|
|
48740
|
+
});
|
|
48741
|
+
};
|
|
48742
|
+
|
|
48736
48743
|
return /*#__PURE__*/React.createElement(Box, {
|
|
48737
|
-
padding: "
|
|
48744
|
+
padding: "0",
|
|
48738
48745
|
border: "1px solid ".concat(themeValues.borderColor),
|
|
48739
48746
|
borderRadius: "4px",
|
|
48740
48747
|
extraStyles: containerStyles
|
|
48741
48748
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48742
|
-
childGap: "0"
|
|
48743
|
-
}, /*#__PURE__*/React.createElement("fieldset", {
|
|
48744
|
-
role: "radiogroup",
|
|
48749
|
+
childGap: "0",
|
|
48745
48750
|
tabIndex: "0",
|
|
48746
|
-
"
|
|
48747
|
-
|
|
48748
|
-
|
|
48749
|
-
|
|
48750
|
-
|
|
48751
|
-
}
|
|
48752
|
-
|
|
48753
|
-
|
|
48754
|
-
srOnly: true,
|
|
48755
|
-
padding: "0",
|
|
48756
|
-
margin: "0"
|
|
48757
|
-
}, legendText), sectionGroups && sectionGroups.map(function (sectionGroup) {
|
|
48758
|
-
var prependedItem = "";
|
|
48759
|
-
|
|
48760
|
-
if (sectionGroups.indexOf(sectionGroup) !== 0) {
|
|
48761
|
-
prependedItem = /*#__PURE__*/React.createElement(SolidDivider$1, {
|
|
48762
|
-
borderSize: "2px",
|
|
48763
|
-
color: themeValues.borderColor
|
|
48764
|
-
});
|
|
48765
|
-
}
|
|
48766
|
-
|
|
48767
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, prependedItem, sectionGroup.filter(function (unfilteredSection) {
|
|
48751
|
+
role: "radiogroup",
|
|
48752
|
+
"aria-required": isSectionRequired
|
|
48753
|
+
}, sectionGroups && sectionGroups.map(function (sectionGroup) {
|
|
48754
|
+
return /*#__PURE__*/React.createElement(Fragment$1, {
|
|
48755
|
+
key: "sectiongroup-".concat(sectionGroups.indexOf(sectionGroup))
|
|
48756
|
+
}, sectionGroups.indexOf(sectionGroup) === sectionGroups.length - 1 ? /*#__PURE__*/React.createElement(PrependedItem, {
|
|
48757
|
+
themeValues: themeValues
|
|
48758
|
+
}) : "", sectionGroup.filter(function (unfilteredSection) {
|
|
48768
48759
|
return !unfilteredSection.hidden;
|
|
48769
48760
|
}).map(function (section) {
|
|
48770
48761
|
return /*#__PURE__*/React.createElement(Motion, {
|
|
@@ -48878,7 +48869,11 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48878
48869
|
animate: openSection === section.id ? "open" : "closed",
|
|
48879
48870
|
initial: initiallyOpen ? "open" : "closed",
|
|
48880
48871
|
key: "item-".concat(section.id),
|
|
48881
|
-
extraStyles: borderStyles
|
|
48872
|
+
extraStyles: borderStyles,
|
|
48873
|
+
role: "radio",
|
|
48874
|
+
"aria-checked": openSection === section.id,
|
|
48875
|
+
"aria-disabled": section.disabled,
|
|
48876
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48882
48877
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48883
48878
|
childGap: "0"
|
|
48884
48879
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48956,7 +48951,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48956
48951
|
variants: wrapper,
|
|
48957
48952
|
extraStyles: "transform-origin: 100% 0;"
|
|
48958
48953
|
}, section.content))));
|
|
48959
|
-
})))
|
|
48954
|
+
})));
|
|
48960
48955
|
};
|
|
48961
48956
|
|
|
48962
48957
|
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$Q);
|