@thecb/components 9.6.0-beta.0 → 9.6.0-beta.2
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 +10 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -9
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.js +4 -2
- package/src/components/molecules/editable-list/EditableList.js +1 -3
- package/src/components/molecules/editable-list/EditableList.stories.js +0 -31
package/dist/index.cjs.js
CHANGED
|
@@ -12884,7 +12884,7 @@ var SpinnerIcon = function SpinnerIcon(_ref3) {
|
|
|
12884
12884
|
}))))));
|
|
12885
12885
|
};
|
|
12886
12886
|
|
|
12887
|
-
var _excluded$h = ["action", "variant", "text", "textWrap", "isLoading", "loadingColor", "dataQa", "textExtraStyles", "contentOverride", "extraStyles", "tabIndex", "children", "extraDisabledStyles"];
|
|
12887
|
+
var _excluded$h = ["action", "variant", "text", "textWrap", "isLoading", "loadingColor", "dataQa", "textExtraStyles", "contentOverride", "extraStyles", "tabIndex", "children", "extraDisabledStyles", "as", "innerAs"];
|
|
12888
12888
|
var rotate$1 = posed.div({
|
|
12889
12889
|
fixed: {
|
|
12890
12890
|
rotate: "0deg"
|
|
@@ -12959,6 +12959,10 @@ var ButtonWithAction = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
12959
12959
|
tabIndex = _ref2.tabIndex,
|
|
12960
12960
|
children = _ref2.children,
|
|
12961
12961
|
extraDisabledStyles = _ref2.extraDisabledStyles,
|
|
12962
|
+
_ref2$as = _ref2.as,
|
|
12963
|
+
as = _ref2$as === void 0 ? "button" : _ref2$as,
|
|
12964
|
+
_ref2$innerAs = _ref2.innerAs,
|
|
12965
|
+
innerAs = _ref2$innerAs === void 0 ? "div" : _ref2$innerAs,
|
|
12962
12966
|
rest = _objectWithoutProperties(_ref2, _excluded$h);
|
|
12963
12967
|
|
|
12964
12968
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
@@ -12978,7 +12982,7 @@ var ButtonWithAction = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
12978
12982
|
hoverStyles: hoverStyles,
|
|
12979
12983
|
activeStyles: activeStyles,
|
|
12980
12984
|
disabledStyles: disabledStyles,
|
|
12981
|
-
as:
|
|
12985
|
+
as: as,
|
|
12982
12986
|
onClick: isLoading ? undefined : action,
|
|
12983
12987
|
borderRadius: "2px",
|
|
12984
12988
|
theme: themeContext,
|
|
@@ -12986,8 +12990,8 @@ var ButtonWithAction = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
12986
12990
|
dataQa: dataQa,
|
|
12987
12991
|
tabIndex: tabIndex
|
|
12988
12992
|
}, rest), contentOverride ? children : /*#__PURE__*/React__default.createElement(Center, {
|
|
12989
|
-
|
|
12990
|
-
|
|
12993
|
+
as: innerAs,
|
|
12994
|
+
intrinsic: true
|
|
12991
12995
|
}, isLoading ? /*#__PURE__*/React__default.createElement(Spinner, {
|
|
12992
12996
|
color: loadingColor,
|
|
12993
12997
|
isMobile: isMobile
|
|
@@ -40272,9 +40276,7 @@ var EditableList = function EditableList(_ref) {
|
|
|
40272
40276
|
_ref$listPadding = _ref.listPadding,
|
|
40273
40277
|
listPadding = _ref$listPadding === void 0 ? "0rem 0rem 1.5rem 0rem" : _ref$listPadding,
|
|
40274
40278
|
qaPrefix = _ref.qaPrefix,
|
|
40275
|
-
ariaLabel = _ref.ariaLabel
|
|
40276
|
-
_ref$editItemAriaRole = _ref.editItemAriaRole,
|
|
40277
|
-
editItemAriaRole = _ref$editItemAriaRole === void 0 ? "" : _ref$editItemAriaRole;
|
|
40279
|
+
ariaLabel = _ref.ariaLabel;
|
|
40278
40280
|
var addText = "Add a".concat(itemName[0].match(/[aieouAIEOU]/) ? "n" : "", " ").concat(itemName);
|
|
40279
40281
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
40280
40282
|
padding: listPadding,
|
|
@@ -40350,8 +40352,7 @@ var EditableList = function EditableList(_ref) {
|
|
|
40350
40352
|
return editItem(item.id);
|
|
40351
40353
|
},
|
|
40352
40354
|
extraStyles: "min-width: 0;",
|
|
40353
|
-
"aria-label": "Edit ".concat(ariaLabel || itemName)
|
|
40354
|
-
role: editItemAriaRole
|
|
40355
|
+
"aria-label": "Edit ".concat(ariaLabel || itemName)
|
|
40355
40356
|
}))));
|
|
40356
40357
|
})), canAdd && (!maxItems || items.length < maxItems) && /*#__PURE__*/React__default.createElement(Box, {
|
|
40357
40358
|
padding: items.length === 0 ? "0" : "1rem 0 0"
|