@thecb/components 9.3.1-beta.2 → 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 +25 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +25 -27
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/radio-section/RadioSection.js +294 -302
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,39 +48740,34 @@ 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, null);
|
|
48770
|
-
}
|
|
48771
|
-
|
|
48772
|
-
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) {
|
|
48773
48767
|
return !unfilteredSection.hidden;
|
|
48774
48768
|
}).map(function (section) {
|
|
48775
48769
|
return /*#__PURE__*/React__default.createElement(Motion, {
|
|
48776
|
-
tabIndex: section.hideRadioButton || section.disabled ? "-1" : "0",
|
|
48770
|
+
tabIndex: section.hidden || section.hideRadioButton || section.disabled ? "-1" : "0",
|
|
48777
48771
|
onKeyDown: function onKeyDown(e) {
|
|
48778
48772
|
return !section.disabled && handleKeyDown(section.id, e);
|
|
48779
48773
|
},
|
|
@@ -48883,7 +48877,11 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48883
48877
|
animate: openSection === section.id ? "open" : "closed",
|
|
48884
48878
|
initial: initiallyOpen ? "open" : "closed",
|
|
48885
48879
|
key: "item-".concat(section.id),
|
|
48886
|
-
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
|
|
48887
48885
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48888
48886
|
childGap: "0"
|
|
48889
48887
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48961,7 +48959,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48961
48959
|
variants: wrapper,
|
|
48962
48960
|
extraStyles: "transform-origin: 100% 0;"
|
|
48963
48961
|
}, section.content))));
|
|
48964
|
-
})))
|
|
48962
|
+
})));
|
|
48965
48963
|
};
|
|
48966
48964
|
|
|
48967
48965
|
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$Q);
|