@cloudscape-design/chart-components 1.0.22 → 1.0.23
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/core/chart-api/chart-extra-legend.js +2 -2
- package/core/chart-api/chart-extra-legend.js.map +1 -1
- package/core/chart-container.d.ts +3 -2
- package/core/chart-container.js +3 -4
- package/core/chart-container.js.map +1 -1
- package/core/chart-core.js +51 -36
- package/core/chart-core.js.map +1 -1
- package/core/components/core-legend.d.ts +7 -5
- package/core/components/core-legend.js +34 -4
- package/core/components/core-legend.js.map +1 -1
- package/core/interfaces.d.ts +21 -2
- package/core/interfaces.js.map +1 -1
- package/core/styles.css.js +21 -20
- package/core/styles.scoped.css +31 -21
- package/core/styles.selectors.js +21 -20
- package/core/test-classes/styles.css.js +30 -28
- package/core/test-classes/styles.scoped.css +30 -28
- package/core/test-classes/styles.selectors.js +30 -28
- package/core/utils.d.ts +24 -2
- package/core/utils.js +75 -12
- package/core/utils.js.map +1 -1
- package/internal/components/chart-legend/index.d.ts +9 -5
- package/internal/components/chart-legend/index.js +52 -77
- package/internal/components/chart-legend/index.js.map +1 -1
- package/internal/components/chart-legend/styles.css.js +17 -23
- package/internal/components/chart-legend/styles.scoped.css +40 -61
- package/internal/components/chart-legend/styles.selectors.js +17 -23
- package/internal/components/interfaces.d.ts +1 -0
- package/internal/components/interfaces.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal-do-not-use/core-legend/index.d.ts +1 -1
- package/internal-do-not-use/core-legend/index.js +29 -3
- package/internal-do-not-use/core-legend/index.js.map +1 -1
- package/package.json +1 -1
- package/test-utils/dom/internal/core.d.ts +1 -0
- package/test-utils/dom/internal/core.js +4 -1
- package/test-utils/dom/internal/core.js.map +1 -1
- package/test-utils/selectors/internal/core.d.ts +1 -0
- package/test-utils/selectors/internal/core.js +4 -1
- package/test-utils/selectors/internal/core.js.map +1 -1
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"focus-outline": "awsui_focus-
|
|
5
|
-
"item": "
|
|
6
|
-
"root": "
|
|
7
|
-
"
|
|
8
|
-
"list": "
|
|
9
|
-
"list-bottom": "awsui_list-
|
|
10
|
-
"list-bottom-
|
|
11
|
-
"list-bottom-
|
|
12
|
-
"list-side": "awsui_list-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"item-label": "awsui_item-label_1kjc7_oede3_214",
|
|
22
|
-
"actions": "awsui_actions_1kjc7_oede3_224",
|
|
23
|
-
"actions-bottom": "awsui_actions-bottom_1kjc7_oede3_229",
|
|
24
|
-
"actions-side": "awsui_actions-side_1kjc7_oede3_233",
|
|
25
|
-
"actions-divider-bottom": "awsui_actions-divider-bottom_1kjc7_oede3_238",
|
|
26
|
-
"actions-divider-side": "awsui_actions-divider-side_1kjc7_oede3_245"
|
|
4
|
+
"focus-outline": "awsui_focus-outline_1kjc7_1mq3w_15",
|
|
5
|
+
"item": "awsui_item_1kjc7_1mq3w_27",
|
|
6
|
+
"root": "awsui_root_1kjc7_1mq3w_41",
|
|
7
|
+
"list": "awsui_list_1kjc7_1mq3w_85",
|
|
8
|
+
"list-bottom": "awsui_list-bottom_1kjc7_1mq3w_96",
|
|
9
|
+
"list-bottom-start": "awsui_list-bottom-start_1kjc7_1mq3w_100",
|
|
10
|
+
"list-bottom-center": "awsui_list-bottom-center_1kjc7_1mq3w_103",
|
|
11
|
+
"list-bottom-end": "awsui_list-bottom-end_1kjc7_1mq3w_106",
|
|
12
|
+
"list-side": "awsui_list-side_1kjc7_1mq3w_110",
|
|
13
|
+
"item--inactive": "awsui_item--inactive_1kjc7_1mq3w_180",
|
|
14
|
+
"item--dimmed": "awsui_item--dimmed_1kjc7_1mq3w_186",
|
|
15
|
+
"item-label": "awsui_item-label_1kjc7_1mq3w_190",
|
|
16
|
+
"actions": "awsui_actions_1kjc7_1mq3w_200",
|
|
17
|
+
"actions-bottom": "awsui_actions-bottom_1kjc7_1mq3w_205",
|
|
18
|
+
"actions-side": "awsui_actions-side_1kjc7_1mq3w_209",
|
|
19
|
+
"actions-divider-bottom": "awsui_actions-divider-bottom_1kjc7_1mq3w_214",
|
|
20
|
+
"actions-divider-side": "awsui_actions-divider-side_1kjc7_1mq3w_221"
|
|
27
21
|
};
|
|
28
22
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
14
14
|
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
15
|
-
body[data-awsui-focus-visible=true] .awsui_focus-
|
|
15
|
+
body[data-awsui-focus-visible=true] .awsui_focus-outline_1kjc7_1mq3w_15:not(#\9) {
|
|
16
16
|
stroke: var(--color-border-item-focused-uk47pl, #006ce0);
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -24,21 +24,21 @@ body[data-awsui-focus-visible=true] .awsui_focus-outline_1kjc7_oede3_15:not(#\9)
|
|
|
24
24
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
25
25
|
SPDX-License-Identifier: Apache-2.0
|
|
26
26
|
*/
|
|
27
|
-
.
|
|
27
|
+
.awsui_item_1kjc7_1mq3w_27:not(#\9) {
|
|
28
28
|
transition: opacity 90ms linear;
|
|
29
29
|
}
|
|
30
30
|
@media (prefers-reduced-motion: reduce) {
|
|
31
|
-
.
|
|
31
|
+
.awsui_item_1kjc7_1mq3w_27:not(#\9) {
|
|
32
32
|
animation: none;
|
|
33
33
|
transition: none;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
.awsui-motion-disabled .
|
|
36
|
+
.awsui-motion-disabled .awsui_item_1kjc7_1mq3w_27:not(#\9), .awsui-mode-entering .awsui_item_1kjc7_1mq3w_27:not(#\9) {
|
|
37
37
|
animation: none;
|
|
38
38
|
transition: none;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.
|
|
41
|
+
.awsui_root_1kjc7_1mq3w_41:not(#\9) {
|
|
42
42
|
border-collapse: separate;
|
|
43
43
|
border-spacing: 0;
|
|
44
44
|
box-sizing: border-box;
|
|
@@ -71,73 +71,49 @@ body[data-awsui-focus-visible=true] .awsui_focus-outline_1kjc7_oede3_15:not(#\9)
|
|
|
71
71
|
font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
72
72
|
-webkit-font-smoothing: auto;
|
|
73
73
|
-moz-osx-font-smoothing: auto;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
.awsui_root_1kjc7_oede3_41:not(#\9):focus {
|
|
78
|
-
outline: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.awsui_root-side_1kjc7_oede3_81:not(#\9) {
|
|
74
|
+
flex: 1;
|
|
75
|
+
min-height: 0;
|
|
82
76
|
display: flex;
|
|
83
77
|
flex-direction: column;
|
|
78
|
+
inline-size: 100%;
|
|
79
|
+
max-block-size: inherit;
|
|
80
|
+
}
|
|
81
|
+
.awsui_root_1kjc7_1mq3w_41:not(#\9):focus {
|
|
82
|
+
outline: none;
|
|
84
83
|
}
|
|
85
84
|
|
|
86
|
-
.
|
|
85
|
+
.awsui_list_1kjc7_1mq3w_85:not(#\9) {
|
|
87
86
|
display: flex;
|
|
87
|
+
overflow-y: auto;
|
|
88
88
|
list-style: none;
|
|
89
89
|
margin-block: 0;
|
|
90
90
|
margin-inline: 0;
|
|
91
91
|
padding-block: var(--space-static-xxxs-yidks1, 2px);
|
|
92
92
|
padding-inline: var(--space-static-xxxs-yidks1, 2px);
|
|
93
|
-
|
|
93
|
+
margin-block-start: var(--space-scaled-xs-xwoogq, 8px);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.awsui_list-
|
|
96
|
+
.awsui_list-bottom_1kjc7_1mq3w_96:not(#\9) {
|
|
97
97
|
flex-wrap: wrap;
|
|
98
|
-
}
|
|
99
|
-
.awsui_list-bottom_1kjc7_oede3_96.awsui_list-bottom-start_1kjc7_oede3_99:not(#\9) {
|
|
100
|
-
justify-content: start;
|
|
101
|
-
}
|
|
102
|
-
.awsui_list-bottom_1kjc7_oede3_96.awsui_list-bottom-center_1kjc7_oede3_102:not(#\9) {
|
|
103
|
-
justify-content: center;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.awsui_list-side_1kjc7_oede3_106:not(#\9) {
|
|
107
|
-
flex-wrap: nowrap;
|
|
108
|
-
flex-direction: column;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.awsui_legend-bottom_1kjc7_oede3_111:not(#\9) {
|
|
112
|
-
display: flex;
|
|
113
|
-
flex-wrap: wrap;
|
|
114
|
-
flex-direction: row;
|
|
115
|
-
max-inline-size: 100%;
|
|
116
98
|
gap: var(--space-scaled-xxs-pfm1nx, 4px) var(--space-static-m-m6qboo, 16px);
|
|
117
99
|
}
|
|
118
|
-
.
|
|
100
|
+
.awsui_list-bottom_1kjc7_1mq3w_96.awsui_list-bottom-start_1kjc7_1mq3w_100:not(#\9) {
|
|
119
101
|
justify-content: start;
|
|
120
102
|
}
|
|
121
|
-
.
|
|
103
|
+
.awsui_list-bottom_1kjc7_1mq3w_96.awsui_list-bottom-center_1kjc7_1mq3w_103:not(#\9) {
|
|
122
104
|
justify-content: center;
|
|
123
105
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
text-align: start;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.awsui_legend-title-center_1kjc7_oede3_129:not(#\9) {
|
|
130
|
-
text-align: center;
|
|
106
|
+
.awsui_list-bottom_1kjc7_1mq3w_96.awsui_list-bottom-end_1kjc7_1mq3w_106:not(#\9) {
|
|
107
|
+
justify-content: end;
|
|
131
108
|
}
|
|
132
109
|
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
flex-wrap: wrap;
|
|
110
|
+
.awsui_list-side_1kjc7_1mq3w_110:not(#\9) {
|
|
111
|
+
flex-wrap: nowrap;
|
|
136
112
|
flex-direction: column;
|
|
137
113
|
gap: var(--space-scaled-xxs-pfm1nx, 4px) var(--space-static-m-m6qboo, 16px);
|
|
138
114
|
}
|
|
139
115
|
|
|
140
|
-
.
|
|
116
|
+
.awsui_item_1kjc7_1mq3w_27:not(#\9) {
|
|
141
117
|
border-collapse: separate;
|
|
142
118
|
border-spacing: 0;
|
|
143
119
|
box-sizing: border-box;
|
|
@@ -180,16 +156,16 @@ body[data-awsui-focus-visible=true] .awsui_focus-outline_1kjc7_oede3_15:not(#\9)
|
|
|
180
156
|
opacity: 1;
|
|
181
157
|
max-inline-size: 100%;
|
|
182
158
|
}
|
|
183
|
-
.
|
|
159
|
+
.awsui_item_1kjc7_1mq3w_27:not(#\9):focus {
|
|
184
160
|
outline: none;
|
|
185
161
|
}
|
|
186
|
-
body[data-awsui-focus-visible=true] .
|
|
162
|
+
body[data-awsui-focus-visible=true] .awsui_item_1kjc7_1mq3w_27:not(#\9):focus {
|
|
187
163
|
position: relative;
|
|
188
164
|
box-sizing: border-box;
|
|
189
165
|
outline: 2px dotted transparent;
|
|
190
166
|
outline-offset: 1px;
|
|
191
167
|
}
|
|
192
|
-
body[data-awsui-focus-visible=true] .
|
|
168
|
+
body[data-awsui-focus-visible=true] .awsui_item_1kjc7_1mq3w_27:not(#\9):focus::before {
|
|
193
169
|
content: " ";
|
|
194
170
|
display: block;
|
|
195
171
|
position: absolute;
|
|
@@ -201,17 +177,17 @@ body[data-awsui-focus-visible=true] .awsui_item_1kjc7_oede3_27:not(#\9):focus::b
|
|
|
201
177
|
border-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
202
178
|
border: 2px solid var(--color-border-item-focused-uk47pl, #006ce0);
|
|
203
179
|
}
|
|
204
|
-
.
|
|
180
|
+
.awsui_item_1kjc7_1mq3w_27.awsui_item--inactive_1kjc7_1mq3w_180:not(#\9) {
|
|
205
181
|
color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
206
182
|
text-decoration: line-through;
|
|
207
183
|
text-decoration-thickness: 2px;
|
|
208
184
|
text-decoration-color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
209
185
|
}
|
|
210
|
-
.
|
|
186
|
+
.awsui_item_1kjc7_1mq3w_27.awsui_item--dimmed_1kjc7_1mq3w_186:not(#\9) {
|
|
211
187
|
opacity: 0.35;
|
|
212
188
|
}
|
|
213
189
|
|
|
214
|
-
.awsui_item-
|
|
190
|
+
.awsui_item-label_1kjc7_1mq3w_190:not(#\9) {
|
|
215
191
|
overflow: hidden;
|
|
216
192
|
white-space: nowrap;
|
|
217
193
|
text-overflow: ellipsis;
|
|
@@ -221,30 +197,33 @@ body[data-awsui-focus-visible=true] .awsui_item_1kjc7_oede3_27:not(#\9):focus::b
|
|
|
221
197
|
-webkit-box-orient: vertical;
|
|
222
198
|
}
|
|
223
199
|
|
|
224
|
-
.
|
|
200
|
+
.awsui_actions_1kjc7_1mq3w_200:not(#\9) {
|
|
225
201
|
display: flex;
|
|
226
202
|
align-items: center;
|
|
227
203
|
}
|
|
228
204
|
|
|
229
|
-
.awsui_actions-
|
|
205
|
+
.awsui_actions-bottom_1kjc7_1mq3w_205:not(#\9) {
|
|
230
206
|
flex-direction: row;
|
|
231
207
|
}
|
|
232
208
|
|
|
233
|
-
.awsui_actions-
|
|
209
|
+
.awsui_actions-side_1kjc7_1mq3w_209:not(#\9) {
|
|
234
210
|
flex-direction: column;
|
|
235
211
|
align-items: flex-start;
|
|
236
212
|
}
|
|
237
213
|
|
|
238
|
-
.awsui_actions-divider-
|
|
214
|
+
.awsui_actions-divider-bottom_1kjc7_1mq3w_214:not(#\9) {
|
|
239
215
|
inline-size: 1px;
|
|
240
216
|
block-size: 80%;
|
|
241
217
|
margin-inline: var(--space-scaled-xs-xwoogq, 8px);
|
|
242
218
|
background: var(--color-border-divider-default-nr68jt, #c6c6cd);
|
|
243
219
|
}
|
|
244
220
|
|
|
245
|
-
.awsui_actions-divider-
|
|
246
|
-
|
|
247
|
-
|
|
221
|
+
.awsui_actions-divider-side_1kjc7_1mq3w_221:not(#\9) {
|
|
222
|
+
display: block;
|
|
223
|
+
border: 0;
|
|
224
|
+
padding: 0;
|
|
225
|
+
inline-size: 100%;
|
|
248
226
|
margin-block-end: var(--space-scaled-xs-xwoogq, 8px);
|
|
249
|
-
|
|
227
|
+
margin-top: 7px;
|
|
228
|
+
border-top: 1px solid var(--color-border-divider-default-nr68jt, #c6c6cd);
|
|
250
229
|
}
|
|
@@ -2,28 +2,22 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"focus-outline": "awsui_focus-
|
|
6
|
-
"item": "
|
|
7
|
-
"root": "
|
|
8
|
-
"
|
|
9
|
-
"list": "
|
|
10
|
-
"list-bottom": "awsui_list-
|
|
11
|
-
"list-bottom-
|
|
12
|
-
"list-bottom-
|
|
13
|
-
"list-side": "awsui_list-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"item-label": "awsui_item-label_1kjc7_oede3_214",
|
|
23
|
-
"actions": "awsui_actions_1kjc7_oede3_224",
|
|
24
|
-
"actions-bottom": "awsui_actions-bottom_1kjc7_oede3_229",
|
|
25
|
-
"actions-side": "awsui_actions-side_1kjc7_oede3_233",
|
|
26
|
-
"actions-divider-bottom": "awsui_actions-divider-bottom_1kjc7_oede3_238",
|
|
27
|
-
"actions-divider-side": "awsui_actions-divider-side_1kjc7_oede3_245"
|
|
5
|
+
"focus-outline": "awsui_focus-outline_1kjc7_1mq3w_15",
|
|
6
|
+
"item": "awsui_item_1kjc7_1mq3w_27",
|
|
7
|
+
"root": "awsui_root_1kjc7_1mq3w_41",
|
|
8
|
+
"list": "awsui_list_1kjc7_1mq3w_85",
|
|
9
|
+
"list-bottom": "awsui_list-bottom_1kjc7_1mq3w_96",
|
|
10
|
+
"list-bottom-start": "awsui_list-bottom-start_1kjc7_1mq3w_100",
|
|
11
|
+
"list-bottom-center": "awsui_list-bottom-center_1kjc7_1mq3w_103",
|
|
12
|
+
"list-bottom-end": "awsui_list-bottom-end_1kjc7_1mq3w_106",
|
|
13
|
+
"list-side": "awsui_list-side_1kjc7_1mq3w_110",
|
|
14
|
+
"item--inactive": "awsui_item--inactive_1kjc7_1mq3w_180",
|
|
15
|
+
"item--dimmed": "awsui_item--dimmed_1kjc7_1mq3w_186",
|
|
16
|
+
"item-label": "awsui_item-label_1kjc7_1mq3w_190",
|
|
17
|
+
"actions": "awsui_actions_1kjc7_1mq3w_200",
|
|
18
|
+
"actions-bottom": "awsui_actions-bottom_1kjc7_1mq3w_205",
|
|
19
|
+
"actions-side": "awsui_actions-side_1kjc7_1mq3w_209",
|
|
20
|
+
"actions-divider-bottom": "awsui_actions-divider-bottom_1kjc7_1mq3w_214",
|
|
21
|
+
"actions-divider-side": "awsui_actions-divider-side_1kjc7_1mq3w_221"
|
|
28
22
|
};
|
|
29
23
|
|
|
@@ -5,6 +5,7 @@ export interface LegendItem {
|
|
|
5
5
|
marker: React.ReactNode;
|
|
6
6
|
visible: boolean;
|
|
7
7
|
highlighted: boolean;
|
|
8
|
+
isSecondary?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export type GetLegendTooltipContent = (props: GetLegendTooltipContentProps) => LegendTooltipContent;
|
|
10
11
|
export interface GetLegendTooltipContentProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/internal/components/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport interface LegendItem {\n id: string;\n name: string;\n marker: React.ReactNode;\n visible: boolean;\n highlighted: boolean;\n}\n\nexport type GetLegendTooltipContent = (props: GetLegendTooltipContentProps) => LegendTooltipContent;\n\nexport interface GetLegendTooltipContentProps {\n legendItem: LegendItem;\n}\n\nexport interface LegendTooltipContent {\n header: React.ReactNode;\n body: React.ReactNode;\n footer?: React.ReactNode;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/internal/components/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport interface LegendItem {\n id: string;\n name: string;\n marker: React.ReactNode;\n visible: boolean;\n highlighted: boolean;\n isSecondary?: boolean;\n}\n\nexport type GetLegendTooltipContent = (props: GetLegendTooltipContentProps) => LegendTooltipContent;\n\nexport interface GetLegendTooltipContentProps {\n legendItem: LegendItem;\n}\n\nexport interface LegendTooltipContent {\n header: React.ReactNode;\n body: React.ReactNode;\n footer?: React.ReactNode;\n}\n"]}
|
package/internal/environment.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "chart-components";
|
|
2
|
-
export var PACKAGE_VERSION = "1.0.0 (
|
|
2
|
+
export var PACKAGE_VERSION = "1.0.0 (80443d98)";
|
|
3
3
|
export var THEME = "open-source-visual-refresh";
|
|
4
4
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
5
5
|
export var SYSTEM = "console";
|
package/internal/manifest.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CoreLegendProps } from "../../core/interfaces";
|
|
2
|
-
export declare const CoreLegend: ({ items, title, actions, ariaLabel, alignment, onItemHighlight, onClearHighlight, onVisibleItemsChange, getLegendTooltipContent, horizontalAlignment, }: CoreLegendProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare const CoreLegend: ({ items, title, actions, ariaLabel: legendAriaLabel, alignment, onItemHighlight, onClearHighlight, onVisibleItemsChange, getLegendTooltipContent, horizontalAlignment, }: CoreLegendProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import { useInternalI18n } from "@cloudscape-design/components/internal/do-not-use/i18n";
|
|
2
5
|
import { ChartLegend as ChartLegendComponent } from "../../internal/components/chart-legend";
|
|
3
6
|
import { fireNonCancelableEvent } from "../../internal/events";
|
|
4
|
-
export const CoreLegend = ({ items, title, actions, ariaLabel, alignment = "horizontal", onItemHighlight, onClearHighlight, onVisibleItemsChange, getLegendTooltipContent, horizontalAlignment = "start", }) => {
|
|
5
|
-
const
|
|
7
|
+
export const CoreLegend = ({ items, title, actions, ariaLabel: legendAriaLabel, alignment = "horizontal", onItemHighlight, onClearHighlight, onVisibleItemsChange, getLegendTooltipContent, horizontalAlignment = "start", }) => {
|
|
8
|
+
const i18n = useInternalI18n("[charts]");
|
|
9
|
+
const ariaLabel = i18n("i18nStrings.legendAriaLabel", legendAriaLabel);
|
|
10
|
+
const onToggleItem = (itemId) => {
|
|
11
|
+
const visibleItems = items.filter((i) => i.visible).map((i) => i.id);
|
|
12
|
+
if (visibleItems.includes(itemId)) {
|
|
13
|
+
fireNonCancelableEvent(onVisibleItemsChange, {
|
|
14
|
+
items: visibleItems.filter((visibleItemId) => visibleItemId !== itemId),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
fireNonCancelableEvent(onVisibleItemsChange, {
|
|
19
|
+
items: [...visibleItems, itemId],
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const onSelectItem = (itemId) => {
|
|
24
|
+
const visibleItems = items.filter((i) => i.visible).map((i) => i.id);
|
|
25
|
+
if (visibleItems.length === 1 && visibleItems[0] === itemId) {
|
|
26
|
+
fireNonCancelableEvent(onVisibleItemsChange, { items: items.map((i) => i.id) });
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
fireNonCancelableEvent(onVisibleItemsChange, { items: [itemId] });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
6
32
|
if (items.length === 0) {
|
|
7
33
|
return null;
|
|
8
34
|
}
|
|
9
|
-
return (_jsx(ChartLegendComponent, { items: items, actions: actions, legendTitle: title,
|
|
35
|
+
return (_jsx(ChartLegendComponent, { items: items, actions: actions, legendTitle: title, alignment: alignment, horizontalAlignment: horizontalAlignment, ariaLabel: ariaLabel, someHighlighted: items.some((item) => item.highlighted), onToggleItem: onToggleItem, onSelectItem: onSelectItem, getTooltipContent: (props) => { var _a; return (_a = getLegendTooltipContent === null || getLegendTooltipContent === void 0 ? void 0 : getLegendTooltipContent(props)) !== null && _a !== void 0 ? _a : null; }, onItemHighlightExit: () => fireNonCancelableEvent(onClearHighlight), onItemHighlightEnter: (item) => fireNonCancelableEvent(onItemHighlight, { item }) }));
|
|
10
36
|
};
|
|
11
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal-do-not-use/core-legend/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal-do-not-use/core-legend/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAGzF,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE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rE,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE;YAC3D,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACjF;aAAM;YACL,sBAAsB,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;SACnE;IACH,CAAC,CAAC;IAEF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,KAAC,oBAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,KAAK,EAClB,SAAS,EAAE,SAAS,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EACvD,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,WAAC,OAAA,MAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAG,KAAK,CAAC,mCAAI,IAAI,CAAA,EAAA,EACtE,mBAAmB,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,EACnE,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,GACjF,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useInternalI18n } from \"@cloudscape-design/components/internal/do-not-use/i18n\";\n\nimport { CoreLegendProps } from \"../../core/interfaces\";\nimport { ChartLegend as ChartLegendComponent } from \"../../internal/components/chart-legend\";\nimport { fireNonCancelableEvent } from \"../../internal/events\";\n\nexport const CoreLegend = ({\n items,\n title,\n actions,\n ariaLabel: legendAriaLabel,\n alignment = \"horizontal\",\n onItemHighlight,\n onClearHighlight,\n onVisibleItemsChange,\n getLegendTooltipContent,\n horizontalAlignment = \"start\",\n}: CoreLegendProps) => {\n const i18n = useInternalI18n(\"[charts]\");\n const ariaLabel = i18n(\"i18nStrings.legendAriaLabel\", legendAriaLabel);\n\n const onToggleItem = (itemId: string) => {\n const visibleItems = items.filter((i) => i.visible).map((i) => i.id);\n if (visibleItems.includes(itemId)) {\n fireNonCancelableEvent(onVisibleItemsChange, {\n items: visibleItems.filter((visibleItemId) => visibleItemId !== itemId),\n });\n } else {\n fireNonCancelableEvent(onVisibleItemsChange, {\n items: [...visibleItems, itemId],\n });\n }\n };\n\n const onSelectItem = (itemId: string) => {\n const visibleItems = items.filter((i) => i.visible).map((i) => i.id);\n if (visibleItems.length === 1 && visibleItems[0] === itemId) {\n fireNonCancelableEvent(onVisibleItemsChange, { items: items.map((i) => i.id) });\n } else {\n fireNonCancelableEvent(onVisibleItemsChange, { items: [itemId] });\n }\n };\n\n if (items.length === 0) {\n return null;\n }\n\n return (\n <ChartLegendComponent\n items={items}\n actions={actions}\n legendTitle={title}\n alignment={alignment}\n horizontalAlignment={horizontalAlignment}\n ariaLabel={ariaLabel}\n someHighlighted={items.some((item) => item.highlighted)}\n onToggleItem={onToggleItem}\n onSelectItem={onSelectItem}\n getTooltipContent={(props) => getLegendTooltipContent?.(props) ?? null}\n onItemHighlightExit={() => fireNonCancelableEvent(onClearHighlight)}\n onItemHighlightEnter={(item) => fireNonCancelableEvent(onItemHighlight, { item })}\n />\n );\n};\n"]}
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ export default class CoreChartWrapper extends BaseChartWrapper {
|
|
|
6
6
|
findFooter(): null | ElementWrapper;
|
|
7
7
|
findNavigator(): null | ElementWrapper;
|
|
8
8
|
findLegend(): null | CoreChartLegendWrapper;
|
|
9
|
+
findSecondaryLegend(): null | CoreChartLegendWrapper;
|
|
9
10
|
findVerticalAxisTitle(): null | ElementWrapper;
|
|
10
11
|
findHorizontalAxisTitle(): null | ElementWrapper;
|
|
11
12
|
}
|
|
@@ -17,7 +17,10 @@ class CoreChartWrapper extends base_1.default {
|
|
|
17
17
|
return this.findByClassName(styles_selectors_js_1.default["chart-navigator"]);
|
|
18
18
|
}
|
|
19
19
|
findLegend() {
|
|
20
|
-
return this.findComponent(`.${CoreChartLegendWrapper.rootSelector}`, CoreChartLegendWrapper);
|
|
20
|
+
return this.findComponent(`.${CoreChartLegendWrapper.rootSelector}.${styles_selectors_js_1.default["legend-primary"]}`, CoreChartLegendWrapper);
|
|
21
|
+
}
|
|
22
|
+
findSecondaryLegend() {
|
|
23
|
+
return this.findComponent(`.${CoreChartLegendWrapper.rootSelector}.${styles_selectors_js_1.default["legend-secondary"]}`, CoreChartLegendWrapper);
|
|
21
24
|
}
|
|
22
25
|
findVerticalAxisTitle() {
|
|
23
26
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/internal/core.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,uGAAsG;AAGtG,iCAAkE;AAElE,wFAAyE;AAEzE,MAAqB,gBAAiB,SAAQ,cAAgB;IACrD,UAAU;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAW,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3D,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAW,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3D,CAAC;IAEM,aAAa;QAClB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC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AAsB;IACzD,eAAe;QACpB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,uBAAmB,CAAC,YAAY,EAAE,EAAE,uBAAmB,CAAC,CAAC;IACzF,CAAC;CACF;AAJD,wDAIC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport ChartTooltipWrapper from \"@cloudscape-design/components/test-utils/dom/internal/chart-tooltip\";\nimport { ElementWrapper } from \"@cloudscape-design/test-utils-core/dom\";\n\nimport BaseChartWrapper, { BaseChartLegendWrapper } from \"./base\";\n\nimport testClasses from \"../../../core/test-classes/styles.selectors.js\";\n\nexport default class CoreChartWrapper extends BaseChartWrapper {\n public findHeader(): null | ElementWrapper {\n return this.findByClassName(testClasses[\"chart-header\"]);\n }\n\n public findFooter(): null | ElementWrapper {\n return this.findByClassName(testClasses[\"chart-footer\"]);\n }\n\n public findNavigator(): null | ElementWrapper {\n return this.findByClassName(testClasses[\"chart-navigator\"]);\n }\n\n public findLegend(): null | CoreChartLegendWrapper {\n return this.findComponent(\n `.${CoreChartLegendWrapper.rootSelector}.${testClasses[\"legend-primary\"]}`,\n CoreChartLegendWrapper,\n );\n }\n\n public findSecondaryLegend(): null | CoreChartLegendWrapper {\n return this.findComponent(\n `.${CoreChartLegendWrapper.rootSelector}.${testClasses[\"legend-secondary\"]}`,\n CoreChartLegendWrapper,\n );\n }\n\n public findVerticalAxisTitle(): null | ElementWrapper {\n return (\n this.findByClassName(testClasses[\"axis-vertical-title\"]) ??\n this.find(`.highcharts-axis.${testClasses[\"axis-vertical\"]} > .highcharts-axis-title`)\n );\n }\n\n public findHorizontalAxisTitle(): null | ElementWrapper {\n return this.find(`.highcharts-axis.${testClasses[\"axis-horizontal\"]} > .highcharts-axis-title`);\n }\n}\n\nexport class CoreChartLegendWrapper extends BaseChartLegendWrapper {\n public findItemTooltip(): null | ChartTooltipWrapper {\n return this.findComponent(`.${ChartTooltipWrapper.rootSelector}`, ChartTooltipWrapper);\n }\n}\n"]}
|
|
@@ -6,6 +6,7 @@ export default class CoreChartWrapper extends BaseChartWrapper {
|
|
|
6
6
|
findFooter(): ElementWrapper;
|
|
7
7
|
findNavigator(): ElementWrapper;
|
|
8
8
|
findLegend(): CoreChartLegendWrapper;
|
|
9
|
+
findSecondaryLegend(): CoreChartLegendWrapper;
|
|
9
10
|
findVerticalAxisTitle(): ElementWrapper;
|
|
10
11
|
findHorizontalAxisTitle(): ElementWrapper;
|
|
11
12
|
}
|
|
@@ -17,7 +17,10 @@ class CoreChartWrapper extends base_1.default {
|
|
|
17
17
|
return this.findByClassName(styles_selectors_js_1.default["chart-navigator"]);
|
|
18
18
|
}
|
|
19
19
|
findLegend() {
|
|
20
|
-
return this.findComponent(`.${CoreChartLegendWrapper.rootSelector}`, CoreChartLegendWrapper);
|
|
20
|
+
return this.findComponent(`.${CoreChartLegendWrapper.rootSelector}.${styles_selectors_js_1.default["legend-primary"]}`, CoreChartLegendWrapper);
|
|
21
|
+
}
|
|
22
|
+
findSecondaryLegend() {
|
|
23
|
+
return this.findComponent(`.${CoreChartLegendWrapper.rootSelector}.${styles_selectors_js_1.default["legend-secondary"]}`, CoreChartLegendWrapper);
|
|
21
24
|
}
|
|
22
25
|
findVerticalAxisTitle() {
|
|
23
26
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/internal/core.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,6GAA4G;AAE5G,iCAAkE;AAClE,wFAAyE;AACzE,MAAqB,gBAAiB,SAAQ,cAAgB;IACrD,UAAU;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAW,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3D,CAAC;IACM,UAAU;QACf,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAW,CAAC,cAAc,CAAC,CAAC,CAAC;IAC3D,CAAC;IACM,aA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CAAC,oBAAoB,6BAAW,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAAC;IAClG,CAAC;CACF;AAtBD,mCAsBC;AACD,MAAa,sBAAuB,SAAQ,6BAAsB;IACzD,eAAe;QACpB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,uBAAmB,CAAC,YAAY,EAAE,EAAE,uBAAmB,CAAC,CAAC;IACzF,CAAC;CACF;AAJD,wDAIC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport ChartTooltipWrapper from \"@cloudscape-design/components/test-utils/selectors/internal/chart-tooltip\";\nimport { ElementWrapper } from \"@cloudscape-design/test-utils-core/selectors\";\nimport BaseChartWrapper, { BaseChartLegendWrapper } from \"./base\";\nimport testClasses from \"../../../core/test-classes/styles.selectors.js\";\nexport default class CoreChartWrapper extends BaseChartWrapper {\n public findHeader() {\n return this.findByClassName(testClasses[\"chart-header\"]);\n }\n public findFooter() {\n return this.findByClassName(testClasses[\"chart-footer\"]);\n }\n public findNavigator() {\n return this.findByClassName(testClasses[\"chart-navigator\"]);\n }\n public findLegend() {\n return this.findComponent(`.${CoreChartLegendWrapper.rootSelector}.${testClasses[\"legend-primary\"]}`, CoreChartLegendWrapper);\n }\n public findSecondaryLegend() {\n return this.findComponent(`.${CoreChartLegendWrapper.rootSelector}.${testClasses[\"legend-secondary\"]}`, CoreChartLegendWrapper);\n }\n public findVerticalAxisTitle() {\n return this.findByClassName(testClasses[\"axis-vertical-title\"]) ?? this.find(`.highcharts-axis.${testClasses[\"axis-vertical\"]} > .highcharts-axis-title`);\n }\n public findHorizontalAxisTitle() {\n return this.find(`.highcharts-axis.${testClasses[\"axis-horizontal\"]} > .highcharts-axis-title`);\n }\n}\nexport class CoreChartLegendWrapper extends BaseChartLegendWrapper {\n public findItemTooltip() {\n return this.findComponent(`.${ChartTooltipWrapper.rootSelector}`, ChartTooltipWrapper);\n }\n}"]}
|