@thecb/components 10.5.1-beta.4 → 10.5.2-beta.0
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 +358 -16275
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +356 -16276
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/atoms/icons/DisabledAccountsAddIcon.js +200 -0
- package/src/components/atoms/icons/DisabledPaymentMethodsAddIcon.js +62 -0
- package/src/components/atoms/icons/DisabledPropertiesAddIcon.js +54 -0
- package/src/components/atoms/icons/PropertiesAddIcon.js +1 -0
- package/src/components/atoms/icons/icons.stories.js +9 -1
- package/src/components/atoms/icons/index.js +7 -1
- package/src/components/atoms/placeholder/Placeholder.js +85 -26
- package/src/components/atoms/placeholder/Placeholder.stories.js +2 -0
- package/src/components/atoms/placeholder/Placeholder.theme.js +8 -2
- package/src/components/molecules/editable-list/EditableList.js +4 -2
- package/src/components/molecules/editable-list/EditableList.stories.js +1 -3
- package/src/components/molecules/modal/__private__/CloseIconButton.js +0 -1
- /package/src/components/atoms/icons/{ExternalLinkicon.js → ExternalLinkIcon.js} +0 -0
|
@@ -40,7 +40,8 @@ const EditableList = ({
|
|
|
40
40
|
listPadding = "0rem 0rem 1.5rem 0rem",
|
|
41
41
|
qaPrefix,
|
|
42
42
|
ariaLabel,
|
|
43
|
-
editItemAriaRole = ""
|
|
43
|
+
editItemAriaRole = "",
|
|
44
|
+
disablePlaceholder = false
|
|
44
45
|
}) => {
|
|
45
46
|
const addText = `Add a${
|
|
46
47
|
itemName[0].match(/[aieouAIEOU]/) ? "n" : ""
|
|
@@ -161,13 +162,14 @@ const EditableList = ({
|
|
|
161
162
|
);
|
|
162
163
|
})}
|
|
163
164
|
</Box>
|
|
164
|
-
{canAdd && (!maxItems || items.length < maxItems) && (
|
|
165
|
+
{canAdd && !(!maxItems || items.length < maxItems) && (
|
|
165
166
|
<Box padding={items.length === 0 ? "0" : "1rem 0 0"}>
|
|
166
167
|
<Placeholder
|
|
167
168
|
text={addText}
|
|
168
169
|
action={addItem}
|
|
169
170
|
dataQa={"Add " + qaPrefix}
|
|
170
171
|
aria-label={addText}
|
|
172
|
+
isDisabled={disablePlaceholder}
|
|
171
173
|
/>
|
|
172
174
|
</Box>
|
|
173
175
|
)}
|
|
@@ -2,7 +2,6 @@ import React from "react";
|
|
|
2
2
|
import { noop } from "../../../../util/general";
|
|
3
3
|
import ButtonWithAction from "../../../atoms/button-with-action/ButtonWithAction";
|
|
4
4
|
import { CloseIcon } from "../../../atoms/icons/CloseIcon";
|
|
5
|
-
import { button } from "@storybook/addon-knobs";
|
|
6
5
|
|
|
7
6
|
export const CloseIconButton = ({
|
|
8
7
|
buttonExtraStyles = "",
|
|
File without changes
|