@charcoal-ui/react 5.7.0 → 5.8.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 +1 -1
- package/dist/index.css +25 -25
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/layered.css +25 -25
- 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/Checkbox/__snapshots__/index.css.snap +22 -0
- package/src/components/Clickable/__snapshots__/index.css.snap +41 -0
- package/src/components/DropdownSelector/__snapshots__/index.css.snap +79 -0
- package/src/components/FieldLabel/__snapshots__/index.css.snap +37 -0
- package/src/components/HintText/__snapshots__/index.css.snap +37 -0
- package/src/components/IconButton/__snapshots__/index.css.snap +107 -0
- package/src/components/LoadingSpinner/__snapshots__/index.css.snap +47 -0
- package/src/components/Modal/__snapshots__/index.css.snap +35 -0
- package/src/components/MultiSelect/__snapshots__/index.css.snap +124 -0
- package/src/components/Pagination/__snapshots__/index.css.snap +109 -0
- package/src/components/Radio/__snapshots__/index.css.snap +18 -0
- package/src/components/SegmentedControl/__snapshots__/index.css.snap +61 -0
- package/src/components/Switch/__snapshots__/index.css.snap +23 -0
- package/src/components/TagItem/__snapshots__/index.css.snap +137 -0
- package/src/components/TextArea/__snapshots__/index.css.snap +78 -0
- package/src/components/TextEllipsis/__snapshots__/index.css.snap +20 -0
- package/src/components/TextField/__snapshots__/index.css.snap +86 -0
- package/src/index.ts +4 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
.charcoal-pagination {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.charcoal-pagination-button {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
appearance: none;
|
|
10
|
+
padding: 0;
|
|
11
|
+
border-style: none;
|
|
12
|
+
outline: none;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
font: inherit;
|
|
15
|
+
margin: 0;
|
|
16
|
+
user-select: none;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
font-weight: 700;
|
|
22
|
+
line-height: 22px;
|
|
23
|
+
|
|
24
|
+
/* HACK:
|
|
25
|
+
* Safari doesn't correctly repaint the elements when they're reordered in response to interaction.
|
|
26
|
+
* This forces it to repaint them. This doesn't work if put on the parents either, has to be here.
|
|
27
|
+
*/
|
|
28
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
29
|
+
-webkit-transform: translateZ(0);
|
|
30
|
+
color: var(--charcoal-text3);
|
|
31
|
+
background-color: var(--charcoal-transparent);
|
|
32
|
+
border-radius: 20px;
|
|
33
|
+
transition: 0.2s background-color,
|
|
34
|
+
0.2s box-shadow;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.charcoal-pagination-button:focus {
|
|
38
|
+
outline: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.charcoal-pagination-button::-moz-focus-inner {
|
|
42
|
+
border-style: none;
|
|
43
|
+
padding: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.charcoal-pagination[data-size='S'] .charcoal-pagination-button {
|
|
47
|
+
min-width: 32px;
|
|
48
|
+
min-height: 32px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.charcoal-pagination[data-size='M'] .charcoal-pagination-button {
|
|
52
|
+
min-width: 40px;
|
|
53
|
+
min-height: 40px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.charcoal-pagination-button[hidden] {
|
|
57
|
+
visibility: hidden;
|
|
58
|
+
display: block;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.charcoal-pagination-button:not(:disabled):not([aria-disabled]):hover, .charcoal-pagination-button[aria-disabled='false']:hover {
|
|
62
|
+
color: var(--charcoal-text3);
|
|
63
|
+
background-color: var(--charcoal-surface3);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.charcoal-pagination-button:not(:disabled):not([aria-disabled]):active, .charcoal-pagination-button[aria-disabled='false']:active {
|
|
67
|
+
color: var(--charcoal-text3);
|
|
68
|
+
background-color: var(--charcoal-surface10);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.charcoal-pagination-button:not(:disabled):not([aria-disabled]):focus, .charcoal-pagination-button[aria-disabled='false']:focus {
|
|
72
|
+
outline: none;
|
|
73
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.charcoal-pagination-button:not(:disabled):not([aria-disabled]):focus-visible, .charcoal-pagination-button[aria-disabled='false']:focus-visible {
|
|
77
|
+
box-shadow: 0 0 0 4px rgba(0, 150, 250, 0.32);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.charcoal-pagination-button:not(:disabled):not([aria-disabled]):focus:not(:focus-visible), .charcoal-pagination-button[aria-disabled='false']:focus:not(:focus-visible) {
|
|
81
|
+
box-shadow: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.charcoal-pagination-button[aria-current] {
|
|
85
|
+
cursor: default;
|
|
86
|
+
background-color: var(--charcoal-surface6);
|
|
87
|
+
color: var(--charcoal-text5);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.charcoal-pagination-button[aria-current]:not(:disabled):not([aria-disabled]):hover, .charcoal-pagination-button[aria-current]:not(:disabled):not([aria-disabled]):active {
|
|
91
|
+
background-color: var(--charcoal-surface6);
|
|
92
|
+
color: var(--charcoal-text5);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.charcoal-pagination-nav-button[hidden] {
|
|
96
|
+
visibility: hidden;
|
|
97
|
+
display: block;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.charcoal-pagination-spacer, .charcoal-pagination-spacer:hover, .charcoal-pagination-spacer:active {
|
|
101
|
+
cursor: default;
|
|
102
|
+
color: var(--charcoal-text3);
|
|
103
|
+
background: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.charcoal-pagination-spacer.charcoal-icon-button:disabled {
|
|
107
|
+
opacity: 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.charcoal-radio__label {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: auto 1fr;
|
|
4
|
+
grid-gap: 4px;
|
|
5
|
+
align-items: center;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.charcoal-radio__label[aria-disabled]:not([aria-disabled='false']) {
|
|
10
|
+
opacity: 0.32;
|
|
11
|
+
cursor: default;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.charcoal-radio__label_div {
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
line-height: 22px;
|
|
17
|
+
color: var(--charcoal-text2);
|
|
18
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.charcoal-segmented-control {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
background-color: var(--charcoal-surface3);
|
|
5
|
+
border-radius: 16px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.charcoal-segmented-control[data-uniform-segment-width='true'], .charcoal-segmented-control[data-full-width='true'] {
|
|
9
|
+
display: inline-grid;
|
|
10
|
+
grid-auto-columns: minmax(80px, 1fr);
|
|
11
|
+
grid-auto-rows: 32px;
|
|
12
|
+
grid-auto-flow: column;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.charcoal-segmented-control[data-full-width='true'] {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.charcoal-segmented-control-radio__label {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
height: 32px;
|
|
26
|
+
padding-right: 16px;
|
|
27
|
+
padding-left: 16px;
|
|
28
|
+
border-radius: 16px;
|
|
29
|
+
color: var(--charcoal-text2);
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
line-height: 22px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.charcoal-segmented-control-radio__label[aria-disabled]:not([aria-disabled='false']) {
|
|
35
|
+
cursor: default;
|
|
36
|
+
opacity: 0.32;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.charcoal-segmented-control-radio__label[data-checked='true'] {
|
|
40
|
+
background-color: var(--charcoal-brand);
|
|
41
|
+
color: var(--charcoal-text5);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.charcoal-segmented-control-radio__label[data-uniform-segment-width='true'], .charcoal-segmented-control-radio__label[data-full-width='true'] {
|
|
45
|
+
justify-content: center;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.charcoal-segmented-control-radio__input {
|
|
50
|
+
position: absolute;
|
|
51
|
+
height: 0px;
|
|
52
|
+
width: 0px;
|
|
53
|
+
padding: 0;
|
|
54
|
+
margin: 0;
|
|
55
|
+
appearance: none;
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
opacity: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.charcoal-switch__label {
|
|
2
|
+
display: inline-grid;
|
|
3
|
+
grid-template-columns: auto 1fr;
|
|
4
|
+
align-items: center;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
outline: 0;
|
|
7
|
+
gap: 4px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.charcoal-switch__label[aria-disabled='true'] {
|
|
11
|
+
opacity: 0.32;
|
|
12
|
+
cursor: default;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.charcoal-switch__label[aria-disabled='true'] > input {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.charcoal-switch__label_div {
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
line-height: 22px;
|
|
22
|
+
color: var(--charcoal-text2);
|
|
23
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
.charcoal-tag-item__labe__text[data-has-translate='true']::after {
|
|
135
|
+
display: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
@@ -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
|
+
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
|
package/src/index.ts
CHANGED
|
@@ -60,6 +60,10 @@ export {
|
|
|
60
60
|
default as DropdownSelector,
|
|
61
61
|
type DropdownSelectorProps,
|
|
62
62
|
} from './components/DropdownSelector'
|
|
63
|
+
export {
|
|
64
|
+
default as MenuItem,
|
|
65
|
+
type MenuItemProps,
|
|
66
|
+
} from './components/DropdownSelector/MenuItem'
|
|
63
67
|
export {
|
|
64
68
|
default as DropdownMenuItem,
|
|
65
69
|
type DropdownMenuItemProps,
|