@thecb/components 7.10.2 → 7.10.3
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/package.json
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
BOSTON_BLUE,
|
|
14
14
|
CHARADE_GREY
|
|
15
15
|
} from "../../../constants/colors";
|
|
16
|
+
import { createIdFromString } from "../../../util/general";
|
|
16
17
|
|
|
17
18
|
const ACTIVE = "ACTIVE";
|
|
18
19
|
const EXPIRED = "EXPIRED";
|
|
@@ -36,6 +37,7 @@ const EditableList = ({
|
|
|
36
37
|
modalProps,
|
|
37
38
|
autoPayMethods,
|
|
38
39
|
as = "p",
|
|
40
|
+
listPadding = "0rem 0rem 1.5rem 0rem",
|
|
39
41
|
qaPrefix,
|
|
40
42
|
ariaLabel
|
|
41
43
|
}) => {
|
|
@@ -43,7 +45,20 @@ const EditableList = ({
|
|
|
43
45
|
itemName[0].match(/[aieouAIEOU]/) ? "n" : ""
|
|
44
46
|
} ${itemName}`;
|
|
45
47
|
return (
|
|
46
|
-
<Box
|
|
48
|
+
<Box
|
|
49
|
+
padding={listPadding}
|
|
50
|
+
as="section"
|
|
51
|
+
aria-labelledby={
|
|
52
|
+
typeof title === "string"
|
|
53
|
+
? `editable-list-${createIdFromString(title)}`
|
|
54
|
+
: ""
|
|
55
|
+
}
|
|
56
|
+
aria-label={
|
|
57
|
+
!title && typeof itemName === "string"
|
|
58
|
+
? `editable-list-${createIdFromString(itemName)}`
|
|
59
|
+
: ""
|
|
60
|
+
}
|
|
61
|
+
>
|
|
47
62
|
<Stack childGap="0rem">
|
|
48
63
|
{title !== "" && (
|
|
49
64
|
<Box padding="0rem 0rem 0.5rem 0rem">
|
|
@@ -52,6 +67,11 @@ const EditableList = ({
|
|
|
52
67
|
weight={titleWeight}
|
|
53
68
|
color={CHARADE_GREY}
|
|
54
69
|
extraStyles="letter-spacing: 0.29px; font-size: 1.125rem;"
|
|
70
|
+
id={
|
|
71
|
+
typeof title === "string"
|
|
72
|
+
? `editable-list-${createIdFromString(title)}`
|
|
73
|
+
: ""
|
|
74
|
+
}
|
|
55
75
|
>
|
|
56
76
|
{title}
|
|
57
77
|
</Title>
|