@thecb/components 9.3.1-beta.3 → 9.3.1-beta.5
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 +30 -30
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +30 -30
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/solid-divider/SolidDivider.js +7 -1
- package/src/components/molecules/radio-section/RadioSection.js +297 -308
package/dist/index.esm.js
CHANGED
|
@@ -27569,14 +27569,17 @@ var fallbackValues$x = {
|
|
|
27569
27569
|
var SolidDivider = function SolidDivider(_ref) {
|
|
27570
27570
|
var borderColor = _ref.borderColor,
|
|
27571
27571
|
borderSize = _ref.borderSize,
|
|
27572
|
-
themeValues = _ref.themeValues
|
|
27572
|
+
themeValues = _ref.themeValues,
|
|
27573
|
+
_ref$extraStyles = _ref.extraStyles,
|
|
27574
|
+
extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles;
|
|
27573
27575
|
return /*#__PURE__*/React.createElement(Box, {
|
|
27574
27576
|
padding: "0",
|
|
27575
27577
|
minWidth: "100%",
|
|
27576
27578
|
minHeight: "1px",
|
|
27577
27579
|
borderColor: borderColor || themeValues.borderColor,
|
|
27578
27580
|
borderSize: borderSize || themeValues.borderSize,
|
|
27579
|
-
borderWidthOverride: "0px 0px ".concat(borderSize || themeValues.borderSize, " 0px")
|
|
27581
|
+
borderWidthOverride: "0px 0px ".concat(borderSize || themeValues.borderSize, " 0px"),
|
|
27582
|
+
extraStyles: extraStyles
|
|
27580
27583
|
});
|
|
27581
27584
|
};
|
|
27582
27585
|
|
|
@@ -48682,7 +48685,6 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48682
48685
|
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48683
48686
|
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire,
|
|
48684
48687
|
_ref$legendText = _ref.legendText,
|
|
48685
|
-
legendText = _ref$legendText === void 0 ? "" : _ref$legendText,
|
|
48686
48688
|
_ref$sectionGroups = _ref.sectionGroups,
|
|
48687
48689
|
sectionGroups = _ref$sectionGroups === void 0 ? null : _ref$sectionGroups;
|
|
48688
48690
|
|
|
@@ -48733,38 +48735,32 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48733
48735
|
focused = _useState2[0],
|
|
48734
48736
|
setFocused = _useState2[1];
|
|
48735
48737
|
|
|
48738
|
+
var PrependedItem = function PrependedItem(_ref5) {
|
|
48739
|
+
var themeValues = _ref5.themeValues;
|
|
48740
|
+
return /*#__PURE__*/React.createElement(SolidDivider$1, {
|
|
48741
|
+
borderSize: "2px",
|
|
48742
|
+
borderRadius: "0 0 0 0",
|
|
48743
|
+
color: themeValues.borderColor,
|
|
48744
|
+
extraStyles: "margin-left: -1px; margin-right: -1px; width: cacl(100% + 2px);"
|
|
48745
|
+
});
|
|
48746
|
+
};
|
|
48747
|
+
|
|
48736
48748
|
return /*#__PURE__*/React.createElement(Box, {
|
|
48737
48749
|
padding: "1px",
|
|
48738
48750
|
border: "1px solid ".concat(themeValues.borderColor),
|
|
48739
48751
|
borderRadius: "4px",
|
|
48740
48752
|
extraStyles: containerStyles
|
|
48741
48753
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48742
|
-
childGap: "0"
|
|
48743
|
-
}, /*#__PURE__*/React.createElement("fieldset", {
|
|
48744
|
-
role: "radiogroup",
|
|
48754
|
+
childGap: "0",
|
|
48745
48755
|
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) {
|
|
48756
|
+
role: "radiogroup",
|
|
48757
|
+
"aria-required": isSectionRequired
|
|
48758
|
+
}, sectionGroups && sectionGroups.map(function (sectionGroup) {
|
|
48759
|
+
return /*#__PURE__*/React.createElement(Fragment$1, {
|
|
48760
|
+
key: "sectiongroup-".concat(sectionGroups.indexOf(sectionGroup))
|
|
48761
|
+
}, sectionGroups.indexOf(sectionGroup) !== 0 ? /*#__PURE__*/React.createElement(PrependedItem, {
|
|
48762
|
+
themeValues: themeValues
|
|
48763
|
+
}) : "", sectionGroup.filter(function (unfilteredSection) {
|
|
48768
48764
|
return !unfilteredSection.hidden;
|
|
48769
48765
|
}).map(function (section) {
|
|
48770
48766
|
return /*#__PURE__*/React.createElement(Motion, {
|
|
@@ -48878,7 +48874,11 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48878
48874
|
animate: openSection === section.id ? "open" : "closed",
|
|
48879
48875
|
initial: initiallyOpen ? "open" : "closed",
|
|
48880
48876
|
key: "item-".concat(section.id),
|
|
48881
|
-
extraStyles: borderStyles
|
|
48877
|
+
extraStyles: borderStyles,
|
|
48878
|
+
role: "radio",
|
|
48879
|
+
"aria-checked": openSection === section.id,
|
|
48880
|
+
"aria-disabled": section.disabled,
|
|
48881
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48882
48882
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48883
48883
|
childGap: "0"
|
|
48884
48884
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48956,7 +48956,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48956
48956
|
variants: wrapper,
|
|
48957
48957
|
extraStyles: "transform-origin: 100% 0;"
|
|
48958
48958
|
}, section.content))));
|
|
48959
|
-
})))
|
|
48959
|
+
})));
|
|
48960
48960
|
};
|
|
48961
48961
|
|
|
48962
48962
|
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$Q);
|