@charcoal-ui/react 5.6.0 → 5.8.0-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 +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +566 -586
- package/dist/index.css.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/layered.css +566 -586
- package/dist/layered.css.map +1 -1
- package/package.json +6 -5
- package/src/__tests__/css-output.test.ts +77 -0
- package/src/components/Button/__snapshots__/index.css.snap +123 -0
- package/src/components/Button/index.css +105 -120
- package/src/components/Checkbox/__snapshots__/index.css.snap +22 -0
- package/src/components/Checkbox/index.css +7 -7
- package/src/components/Clickable/__snapshots__/index.css.snap +41 -0
- package/src/components/Clickable/index.css +11 -11
- package/src/components/DropdownSelector/__snapshots__/index.css.snap +79 -0
- package/src/components/DropdownSelector/index.css +33 -33
- package/src/components/FieldLabel/__snapshots__/index.css.snap +37 -0
- package/src/components/FieldLabel/index.css +6 -6
- package/src/components/HintText/__snapshots__/index.css.snap +37 -0
- package/src/components/HintText/index.css +5 -7
- package/src/components/IconButton/__snapshots__/index.css.snap +107 -0
- package/src/components/IconButton/index.css +87 -89
- package/src/components/LoadingSpinner/__snapshots__/index.css.snap +47 -0
- package/src/components/LoadingSpinner/index.css +11 -9
- package/src/components/Modal/__snapshots__/index.css.snap +35 -0
- package/src/components/Modal/index.css +5 -5
- package/src/components/MultiSelect/__snapshots__/index.css.snap +124 -0
- package/src/components/MultiSelect/index.css +74 -82
- package/src/components/Pagination/__snapshots__/index.css.snap +114 -0
- package/src/components/Pagination/index.css +79 -80
- package/src/components/Radio/__snapshots__/index.css.snap +18 -0
- package/src/components/Radio/index.css +4 -4
- package/src/components/SegmentedControl/__snapshots__/index.css.snap +61 -0
- package/src/components/SegmentedControl/index.css +23 -25
- package/src/components/Switch/__snapshots__/index.css.snap +23 -0
- package/src/components/Switch/index.css +7 -7
- package/src/components/TagItem/__snapshots__/index.css.snap +139 -0
- package/src/components/TagItem/index.css +80 -71
- package/src/components/TextArea/__snapshots__/index.css.snap +78 -0
- package/src/components/TextArea/index.css +24 -23
- package/src/components/TextEllipsis/__snapshots__/index.css.snap +20 -0
- package/src/components/TextEllipsis/index.css +10 -10
- package/src/components/TextField/__snapshots__/index.css.snap +86 -0
- package/src/components/TextField/index.css +19 -21
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
outline: 0;
|
|
7
7
|
gap: 4px;
|
|
8
|
-
}
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
9
|
+
&[aria-disabled='true'] {
|
|
10
|
+
opacity: 0.32;
|
|
11
|
+
cursor: default;
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
& > input {
|
|
14
|
+
opacity: 1;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.charcoal-switch__label_div {
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
.charcoal-tag-item {
|
|
2
|
+
--charcoal-tag-item-color: var(--charcoal-text5);
|
|
3
|
+
--charcoal-tag-item-size: 40px;
|
|
4
|
+
--charcoal-tag-item-padding-left: 24px;
|
|
5
|
+
--charcoal-tag-item-padding-right: 24px;
|
|
6
|
+
isolation: isolate;
|
|
7
|
+
position: relative;
|
|
8
|
+
appearance: none;
|
|
9
|
+
outline: none;
|
|
10
|
+
border-style: none;
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
color: var(--charcoal-tag-item-color);
|
|
19
|
+
height: var(--charcoal-tag-item-size);
|
|
20
|
+
padding-top: 4px;
|
|
21
|
+
padding-bottom: 4px;
|
|
22
|
+
padding-left: var(--charcoal-tag-item-padding-left);
|
|
23
|
+
padding-right: var(--charcoal-tag-item-padding-right);
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
transition: 0.2s box-shadow;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.charcoal-tag-item[data-size='M'] {
|
|
30
|
+
--charcoal-tag-item-size: 40px;
|
|
31
|
+
--charcoal-tag-item-padding-left: 24px;
|
|
32
|
+
--charcoal-tag-item-padding-right: 24px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.charcoal-tag-item[data-size='S'] {
|
|
36
|
+
--charcoal-tag-item-size: 32px;
|
|
37
|
+
--charcoal-tag-item-padding-left: 16px;
|
|
38
|
+
--charcoal-tag-item-padding-right: 16px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.charcoal-tag-item[data-state='inactive'] {
|
|
42
|
+
--charcoal-tag-item-color: var(--charcoal-text2);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.charcoal-tag-item[data-state='active'] {
|
|
46
|
+
--charcoal-tag-item-padding-left: 16px;
|
|
47
|
+
--charcoal-tag-item-padding-right: 8px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.charcoal-tag-item:disabled, .charcoal-tag-item[aria-disabled]:not([aria-disabled='false']) {
|
|
51
|
+
opacity: 0.32;
|
|
52
|
+
cursor: default;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.charcoal-tag-item:not(:disabled):not([aria-disabled]):focus-visible, .charcoal-tag-item[aria-disabled='false']:focus-visible {
|
|
56
|
+
outline: none;
|
|
57
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.charcoal-tag-item:not(:disabled):not([aria-disabled]):focus, .charcoal-tag-item[aria-disabled='false']:focus {
|
|
61
|
+
outline: none;
|
|
62
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.charcoal-tag-item:not(:disabled):not([aria-disabled]):focus:not(:focus-visible), .charcoal-tag-item[aria-disabled='false']:focus:not(:focus-visible) {
|
|
66
|
+
box-shadow: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.charcoal-tag-item__bg {
|
|
70
|
+
background-color: var(--charcoal-tag-item-bg);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.charcoal-tag-item__bg[data-bg-variant='image'] {
|
|
74
|
+
background-color: var(--charcoal-surface4);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.charcoal-tag-item__bg[data-bg-variant='image']::before {
|
|
78
|
+
content: '';
|
|
79
|
+
position: absolute;
|
|
80
|
+
z-index: 1;
|
|
81
|
+
top: 0;
|
|
82
|
+
left: 0;
|
|
83
|
+
width: 100%;
|
|
84
|
+
height: 100%;
|
|
85
|
+
background-position: center;
|
|
86
|
+
background-size: cover;
|
|
87
|
+
background-image: var(--charcoal-tag-item-bg);
|
|
88
|
+
mix-blend-mode: overlay;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.charcoal-tag-item__bg[data-state='inactive'] {
|
|
92
|
+
background-color: var(--charcoal-surface3);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.charcoal-tag-item__label {
|
|
96
|
+
height: 100%;
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.charcoal-tag-item__label[data-has-translate='true'] {
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.charcoal-tag-item__label__translated {
|
|
108
|
+
--charcoal-tag-item-text-font-size: 12px;
|
|
109
|
+
--charcoal-tag-item-text-line-height: 20px;
|
|
110
|
+
font-weight: bold;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.charcoal-tag-item__label__translated::before {
|
|
114
|
+
display: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.charcoal-tag-item__label__text {
|
|
118
|
+
--charcoal-tag-item-text-font-size: 14px;
|
|
119
|
+
--charcoal-tag-item-text-line-height: 22px;
|
|
120
|
+
max-width: 152px;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
font-weight: bold;
|
|
123
|
+
color: inherit;
|
|
124
|
+
white-space: nowrap;
|
|
125
|
+
text-overflow: ellipsis;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.charcoal-tag-item__label__text[data-has-translate='true'] {
|
|
129
|
+
--charcoal-tag-item-text-font-size: 10px;
|
|
130
|
+
--charcoal-tag-item-text-line-height: 14px;
|
|
131
|
+
font-weight: normal;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Kept flat: different class name from .charcoal-tag-item__label__text (note: "labe" typo in original) */
|
|
135
|
+
|
|
136
|
+
.charcoal-tag-item__labe__text[data-has-translate='true']::after {
|
|
137
|
+
display: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
@@ -30,72 +30,76 @@
|
|
|
30
30
|
border-radius: 4px;
|
|
31
31
|
|
|
32
32
|
transition: 0.2s box-shadow;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.charcoal-tag-item[data-size='M'] {
|
|
36
|
-
--charcoal-tag-item-size: 40px;
|
|
37
|
-
--charcoal-tag-item-padding-left: 24px;
|
|
38
|
-
--charcoal-tag-item-padding-right: 24px;
|
|
39
|
-
}
|
|
40
|
-
.charcoal-tag-item[data-size='S'] {
|
|
41
|
-
--charcoal-tag-item-size: 32px;
|
|
42
|
-
--charcoal-tag-item-padding-left: 16px;
|
|
43
|
-
--charcoal-tag-item-padding-right: 16px;
|
|
44
|
-
}
|
|
45
|
-
.charcoal-tag-item[data-state='inactive'] {
|
|
46
|
-
--charcoal-tag-item-color: var(--charcoal-text2);
|
|
47
|
-
}
|
|
48
|
-
.charcoal-tag-item[data-state='active'] {
|
|
49
|
-
--charcoal-tag-item-padding-left: 16px;
|
|
50
|
-
--charcoal-tag-item-padding-right: 8px;
|
|
51
|
-
}
|
|
52
33
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
34
|
+
&[data-size='M'] {
|
|
35
|
+
--charcoal-tag-item-size: 40px;
|
|
36
|
+
--charcoal-tag-item-padding-left: 24px;
|
|
37
|
+
--charcoal-tag-item-padding-right: 24px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[data-size='S'] {
|
|
41
|
+
--charcoal-tag-item-size: 32px;
|
|
42
|
+
--charcoal-tag-item-padding-left: 16px;
|
|
43
|
+
--charcoal-tag-item-padding-right: 16px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[data-state='inactive'] {
|
|
47
|
+
--charcoal-tag-item-color: var(--charcoal-text2);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&[data-state='active'] {
|
|
51
|
+
--charcoal-tag-item-padding-left: 16px;
|
|
52
|
+
--charcoal-tag-item-padding-right: 8px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:disabled,
|
|
56
|
+
&[aria-disabled]:not([aria-disabled='false']) {
|
|
57
|
+
opacity: 0.32;
|
|
58
|
+
cursor: default;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:not(:disabled):not([aria-disabled]):focus-visible,
|
|
62
|
+
&[aria-disabled='false']:focus-visible {
|
|
63
|
+
outline: none;
|
|
64
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:not(:disabled):not([aria-disabled]):focus,
|
|
68
|
+
&[aria-disabled='false']:focus {
|
|
69
|
+
outline: none;
|
|
70
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:not(:disabled):not([aria-disabled]):focus:not(:focus-visible),
|
|
74
|
+
&[aria-disabled='false']:focus:not(:focus-visible) {
|
|
75
|
+
box-shadow: none;
|
|
76
|
+
}
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
.charcoal-tag-item__bg {
|
|
76
80
|
background-color: var(--charcoal-tag-item-bg);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.charcoal-tag-item__bg[data-bg-variant='image'] {
|
|
80
|
-
background-color: var(--charcoal-surface4);
|
|
81
|
-
}
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
82
|
+
&[data-bg-variant='image'] {
|
|
83
|
+
background-color: var(--charcoal-surface4);
|
|
84
|
+
|
|
85
|
+
&::before {
|
|
86
|
+
content: '';
|
|
87
|
+
position: absolute;
|
|
88
|
+
z-index: 1;
|
|
89
|
+
top: 0;
|
|
90
|
+
left: 0;
|
|
91
|
+
width: 100%;
|
|
92
|
+
height: 100%;
|
|
93
|
+
background-position: center;
|
|
94
|
+
background-size: cover;
|
|
95
|
+
background-image: var(--charcoal-tag-item-bg);
|
|
96
|
+
mix-blend-mode: overlay;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&[data-state='inactive'] {
|
|
101
|
+
background-color: var(--charcoal-surface3);
|
|
102
|
+
}
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
.charcoal-tag-item__label {
|
|
@@ -104,18 +108,20 @@
|
|
|
104
108
|
flex-direction: column;
|
|
105
109
|
align-items: center;
|
|
106
110
|
justify-content: center;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
|
|
112
|
+
&[data-has-translate='true'] {
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
.charcoal-tag-item__label__translated {
|
|
113
118
|
--charcoal-tag-item-text-font-size: 12px;
|
|
114
119
|
--charcoal-tag-item-text-line-height: 20px;
|
|
115
120
|
font-weight: bold;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
|
|
122
|
+
&::before {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
.charcoal-tag-item__label__text {
|
|
@@ -129,12 +135,15 @@
|
|
|
129
135
|
color: inherit;
|
|
130
136
|
white-space: nowrap;
|
|
131
137
|
text-overflow: ellipsis;
|
|
138
|
+
|
|
139
|
+
&[data-has-translate='true'] {
|
|
140
|
+
--charcoal-tag-item-text-font-size: 10px;
|
|
141
|
+
--charcoal-tag-item-text-line-height: 14px;
|
|
142
|
+
font-weight: normal;
|
|
143
|
+
}
|
|
132
144
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
--charcoal-tag-item-text-line-height: 14px;
|
|
136
|
-
font-weight: normal;
|
|
137
|
-
}
|
|
145
|
+
|
|
146
|
+
/* Kept flat: different class name from .charcoal-tag-item__label__text (note: "labe" typo in original) */
|
|
138
147
|
.charcoal-tag-item__labe__text[data-has-translate='true']::after {
|
|
139
148
|
display: none;
|
|
140
149
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
.charcoal-text-area-root {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: 1fr;
|
|
4
|
+
grid-gap: 4px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.charcoal-text-area-root[aria-disabled='true'] {
|
|
8
|
+
opacity: 0.32;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.charcoal-text-area-container {
|
|
12
|
+
position: relative;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
color: var(--charcoal-text2);
|
|
15
|
+
background-color: var(--charcoal-surface3);
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
transition: 0.2s background-color,
|
|
18
|
+
0.2s box-shadow;
|
|
19
|
+
height: calc(22px * var(--charcoal-text-area-rows) + 18px);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.charcoal-text-area-container[aria-invalid='true'] {
|
|
23
|
+
box-shadow: 0 0 0 4px rgba(255, 43, 0, 0.32);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.charcoal-text-area-container:focus-within {
|
|
27
|
+
outline: none;
|
|
28
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.charcoal-text-area-container:not([aria-disabled='true']):hover {
|
|
32
|
+
background-color: var(--charcoal-surface3-hover);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.charcoal-text-area-container[aria-invalid='true']:focus-within {
|
|
36
|
+
box-shadow: 0 0 0 4px rgba(255, 43, 0, 0.32);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.charcoal-text-area-textarea {
|
|
40
|
+
border: none;
|
|
41
|
+
outline: none;
|
|
42
|
+
resize: none;
|
|
43
|
+
font-family: inherit;
|
|
44
|
+
color: inherit;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
|
|
47
|
+
/* Prevent zooming for iOS Safari */
|
|
48
|
+
transform-origin: top left;
|
|
49
|
+
transform: scale(0.875);
|
|
50
|
+
width: calc(100% / 0.875);
|
|
51
|
+
font-size: calc(14px / 0.875);
|
|
52
|
+
line-height: calc(22px / 0.875);
|
|
53
|
+
padding: calc(9px / 0.875) calc(8px / 0.875);
|
|
54
|
+
height: calc(22px / 0.875 * var(--charcoal-text-area-rows) + 20px);
|
|
55
|
+
|
|
56
|
+
/* Display box-shadow for iOS Safari */
|
|
57
|
+
appearance: none;
|
|
58
|
+
background: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.charcoal-text-area-textarea[data-no-bottom-padding='true'] {
|
|
62
|
+
padding: calc(9px / 0.875) calc(8px / 0.875) 0;
|
|
63
|
+
height: calc(22px / 0.875 * (var(--charcoal-text-area-rows) - 1) + 9px);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.charcoal-text-area-textarea::placeholder {
|
|
67
|
+
color: var(--charcoal-text3);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.charcoal-text-area-counter {
|
|
71
|
+
position: absolute;
|
|
72
|
+
bottom: 9px;
|
|
73
|
+
right: 8px;
|
|
74
|
+
line-height: 22px;
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
color: var(--charcoal-text3);
|
|
77
|
+
}
|
|
78
|
+
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: 1fr;
|
|
4
4
|
grid-gap: 4px;
|
|
5
|
-
}
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
&[aria-disabled='true'] {
|
|
7
|
+
opacity: 0.32;
|
|
8
|
+
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.charcoal-text-area-container {
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
0.2s background-color,
|
|
20
20
|
0.2s box-shadow;
|
|
21
21
|
height: calc(22px * var(--charcoal-text-area-rows) + 18px);
|
|
22
|
-
}
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
23
|
+
&[aria-invalid='true'] {
|
|
24
|
+
box-shadow: 0 0 0 4px rgba(255, 43, 0, 0.32);
|
|
25
|
+
}
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
27
|
+
&:focus-within {
|
|
28
|
+
outline: none;
|
|
29
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
30
|
+
}
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
32
|
+
&:not([aria-disabled='true']):hover {
|
|
33
|
+
background-color: var(--charcoal-surface3-hover);
|
|
34
|
+
}
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
&[aria-invalid='true']:focus-within {
|
|
37
|
+
box-shadow: 0 0 0 4px rgba(255, 43, 0, 0.32);
|
|
38
|
+
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.charcoal-text-area-textarea {
|
|
@@ -59,14 +59,15 @@
|
|
|
59
59
|
appearance: none;
|
|
60
60
|
|
|
61
61
|
background: none;
|
|
62
|
-
}
|
|
63
|
-
.charcoal-text-area-textarea[data-no-bottom-padding='true'] {
|
|
64
|
-
padding: calc(9px / 0.875) calc(8px / 0.875) 0;
|
|
65
|
-
height: calc(22px / 0.875 * (var(--charcoal-text-area-rows) - 1) + 9px);
|
|
66
|
-
}
|
|
67
62
|
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
&[data-no-bottom-padding='true'] {
|
|
64
|
+
padding: calc(9px / 0.875) calc(8px / 0.875) 0;
|
|
65
|
+
height: calc(22px / 0.875 * (var(--charcoal-text-area-rows) - 1) + 9px);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&::placeholder {
|
|
69
|
+
color: var(--charcoal-text3);
|
|
70
|
+
}
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
.charcoal-text-area-counter {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.charcoal-text-ellipsis {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
overflow-wrap: break-word;
|
|
4
|
+
display: -webkit-box;
|
|
5
|
+
-webkit-box-orient: vertical;
|
|
6
|
+
-webkit-line-clamp: var(--charcoal-text-ellipsis-line-limit);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.charcoal-text-ellipsis[data-has-line-height='true'] {
|
|
10
|
+
line-height: var(--charcoal-text-ellipsis-line-height);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.charcoal-text-ellipsis[data-has-line-height='false'] {
|
|
14
|
+
line-height: inherit;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.charcoal-text-ellipsis[data-line-limit='1'][data-use-nowrap='true'] {
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
}
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
display: -webkit-box;
|
|
5
5
|
-webkit-box-orient: vertical;
|
|
6
6
|
-webkit-line-clamp: var(--charcoal-text-ellipsis-line-limit);
|
|
7
|
-
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
8
|
+
&[data-has-line-height='true'] {
|
|
9
|
+
line-height: var(--charcoal-text-ellipsis-line-height);
|
|
10
|
+
}
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
12
|
+
&[data-has-line-height='false'] {
|
|
13
|
+
line-height: inherit;
|
|
14
|
+
}
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
&[data-line-limit='1'][data-use-nowrap='true'] {
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}
|
|
20
20
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.charcoal-text-field-root {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: 1fr;
|
|
4
|
+
grid-gap: 4px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.charcoal-text-field-root[aria-disabled='true'] {
|
|
8
|
+
opacity: 0.32;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.charcoal-text-field-container {
|
|
12
|
+
display: flex;
|
|
13
|
+
height: 40px;
|
|
14
|
+
transition: 0.2s background-color,
|
|
15
|
+
0.2s box-shadow;
|
|
16
|
+
color: var(--charcoal-text2);
|
|
17
|
+
background-color: var(--charcoal-surface3);
|
|
18
|
+
border-radius: 4px;
|
|
19
|
+
padding: 0 8px;
|
|
20
|
+
line-height: 22px;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.charcoal-text-field-container[data-invalid='true'] {
|
|
25
|
+
box-shadow: 0 0 0 4px rgba(255, 43, 0, 0.32);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.charcoal-text-field-container:not([aria-disabled='true']):hover {
|
|
29
|
+
background-color: var(--charcoal-surface3-hover);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.charcoal-text-field-container:not([aria-disabled='true']):focus-within {
|
|
33
|
+
outline: none;
|
|
34
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.charcoal-text-field-container:not([aria-disabled='true'])[data-invalid='true']:focus-within {
|
|
38
|
+
box-shadow: 0 0 0 4px rgba(255, 43, 0, 0.32);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.charcoal-text-field-prefix {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
margin-right: 4px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.charcoal-text-field-suffix {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 8px;
|
|
51
|
+
margin-left: 4px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.charcoal-text-field-input {
|
|
55
|
+
border: none;
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
outline: none;
|
|
58
|
+
font-family: inherit;
|
|
59
|
+
|
|
60
|
+
/* Prevent zooming for iOS Safari */
|
|
61
|
+
transform-origin: top left;
|
|
62
|
+
transform: scale(0.875);
|
|
63
|
+
width: calc(100% / 0.875);
|
|
64
|
+
height: calc(100% / 0.875);
|
|
65
|
+
font-size: calc(14px / 0.875);
|
|
66
|
+
line-height: calc(22px / 0.875);
|
|
67
|
+
padding-left: 0;
|
|
68
|
+
padding-right: 0;
|
|
69
|
+
border-radius: calc(4px / 0.875);
|
|
70
|
+
|
|
71
|
+
/* Display box-shadow for iOS Safari */
|
|
72
|
+
appearance: none;
|
|
73
|
+
background: transparent;
|
|
74
|
+
color: var(--charcoal-text2);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.charcoal-text-field-input::placeholder {
|
|
78
|
+
color: var(--charcoal-text3);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.charcoal-text-field-line-counter {
|
|
82
|
+
line-height: 22px;
|
|
83
|
+
font-size: 14px;
|
|
84
|
+
color: var(--charcoal-text3);
|
|
85
|
+
}
|
|
86
|
+
|