@thecb/components 9.0.3-beta.10 → 9.0.3-beta.12
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 +15 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +15 -16
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/radio-section/RadioSection.js +9 -12
- package/src/components/molecules/radio-section/RadioSection.stories.js +40 -1
package/dist/index.cjs.js
CHANGED
|
@@ -48486,7 +48486,7 @@ var fallbackValues$Q = {
|
|
|
48486
48486
|
|
|
48487
48487
|
*/
|
|
48488
48488
|
|
|
48489
|
-
var
|
|
48489
|
+
var idString = function idString(section) {
|
|
48490
48490
|
return typeof section.title === "string" ? createIdFromString(section.title) : section.id;
|
|
48491
48491
|
};
|
|
48492
48492
|
|
|
@@ -48507,9 +48507,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48507
48507
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48508
48508
|
_ref$containerStyles = _ref.containerStyles,
|
|
48509
48509
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48510
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48511
|
-
_ref$rightIconsLabel = _ref.rightIconsLabel,
|
|
48512
|
-
rightIconsLabel = _ref$rightIconsLabel === void 0 ? null : _ref$rightIconsLabel;
|
|
48510
|
+
ariaDescribedBy = _ref.ariaDescribedBy;
|
|
48513
48511
|
|
|
48514
48512
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48515
48513
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48586,7 +48584,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48586
48584
|
key: "item-".concat(section.id),
|
|
48587
48585
|
extraStyles: borderStyles,
|
|
48588
48586
|
role: "radio",
|
|
48589
|
-
"aria-checked": openSection === section.id
|
|
48587
|
+
"aria-checked": openSection === section.id,
|
|
48588
|
+
"aria-disabled": section.disabled
|
|
48590
48589
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48591
48590
|
childGap: "0"
|
|
48592
48591
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48616,10 +48615,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48616
48615
|
}, !section.hideRadioButton && /*#__PURE__*/React__default.createElement(Box, {
|
|
48617
48616
|
padding: "0"
|
|
48618
48617
|
}, /*#__PURE__*/React__default.createElement(RadioButton$2, {
|
|
48619
|
-
id:
|
|
48620
|
-
name:
|
|
48618
|
+
id: "radio-input-".concat(idString(section)),
|
|
48619
|
+
name: idString(section),
|
|
48621
48620
|
ariaDescribedBy: ariaDescribedBy,
|
|
48622
|
-
ariaLabelledBy: "radio-input-".concat(computeSectionId(section)),
|
|
48623
48621
|
radioOn: openSection === section.id,
|
|
48624
48622
|
radioFocused: focused === section.id,
|
|
48625
48623
|
toggleRadio: section.disabled ? noop : function () {
|
|
@@ -48632,19 +48630,20 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48632
48630
|
padding: section.titleIcon ? "0 0 0 8px" : "0"
|
|
48633
48631
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
48634
48632
|
as: "label",
|
|
48635
|
-
|
|
48636
|
-
|
|
48637
|
-
}, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster,
|
|
48638
|
-
childGap: "0.5rem"
|
|
48639
|
-
|
|
48640
|
-
|
|
48641
|
-
}
|
|
48633
|
+
htmlFor: "radio-input-".concat(idString(section)),
|
|
48634
|
+
color: CHARADE_GREY
|
|
48635
|
+
}, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48636
|
+
childGap: "0.5rem",
|
|
48637
|
+
"aria-label": (section === null || section === void 0 ? void 0 : section.rightIconsLabel) || null,
|
|
48638
|
+
role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) || null
|
|
48639
|
+
}, section.rightIcons.map(function (icon) {
|
|
48642
48640
|
return /*#__PURE__*/React__default.createElement(RightIcon, {
|
|
48643
48641
|
src: icon.img,
|
|
48644
48642
|
key: icon.img,
|
|
48645
48643
|
fade: !icon.enabled,
|
|
48646
48644
|
isMobile: isMobile,
|
|
48647
|
-
alt: icon.altText
|
|
48645
|
+
alt: icon.altText,
|
|
48646
|
+
"aria-disabled": !icon.enabled
|
|
48648
48647
|
});
|
|
48649
48648
|
})), section.rightTitleContent && /*#__PURE__*/React__default.createElement(React.Fragment, null, section.rightTitleContent))), /*#__PURE__*/React__default.createElement(AnimatePresence, {
|
|
48650
48649
|
initial: false
|