@cloudscape-design/components-themeable 3.0.627 → 3.0.628
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/internal/components/dropdown/styles.scss +9 -3
- package/lib/internal/template/internal/components/dropdown/styles.css.js +20 -20
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +46 -40
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/mixed-line-bar-chart/data-series.d.ts.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/data-series.js +3 -0
- package/lib/internal/template/mixed-line-bar-chart/data-series.js.map +1 -1
- package/package.json +1 -1
|
@@ -92,12 +92,18 @@
|
|
|
92
92
|
inline-size: max-content;
|
|
93
93
|
max-inline-size: var(#{custom-props.$dropdownDefaultMaxWidth}, 100%);
|
|
94
94
|
}
|
|
95
|
-
&.hide-block-border > .dropdown-content-wrapper {
|
|
96
|
-
border-block: none;
|
|
97
|
-
}
|
|
98
95
|
&.interior > .dropdown-content-wrapper {
|
|
99
96
|
margin-block-start: -1px;
|
|
100
97
|
}
|
|
98
|
+
&.hide-block-border > .dropdown-content-wrapper {
|
|
99
|
+
border-block-start: none;
|
|
100
|
+
}
|
|
101
|
+
&.hide-block-border:not(.dropdown-drop-up) > .dropdown-content-wrapper {
|
|
102
|
+
border-block-end: none;
|
|
103
|
+
}
|
|
104
|
+
&.hide-block-border.refresh > .dropdown-content-wrapper {
|
|
105
|
+
border-block-end: none;
|
|
106
|
+
}
|
|
101
107
|
&.open {
|
|
102
108
|
display: block;
|
|
103
109
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"dropdown-content-wrapper": "awsui_dropdown-content-
|
|
5
|
-
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-
|
|
6
|
-
"refresh": "
|
|
7
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
8
|
-
"root": "
|
|
9
|
-
"interior": "
|
|
10
|
-
"dropdown": "
|
|
11
|
-
"use-portal": "awsui_use-
|
|
12
|
-
"is-empty": "awsui_is-
|
|
13
|
-
"dropdown-drop-up": "awsui_dropdown-drop-
|
|
14
|
-
"with-limited-width": "awsui_with-limited-
|
|
15
|
-
"dropdown-drop-left": "awsui_dropdown-drop-
|
|
16
|
-
"dropdown-drop-right": "awsui_dropdown-drop-
|
|
17
|
-
"occupy-entire-width": "awsui_occupy-entire-
|
|
18
|
-
"stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-
|
|
19
|
-
"hide-block-border": "awsui_hide-block-
|
|
20
|
-
"open": "
|
|
21
|
-
"nowrap": "
|
|
22
|
-
"dropdown-content": "awsui_dropdown-
|
|
23
|
-
"stretch-trigger-height": "awsui_stretch-trigger-
|
|
4
|
+
"dropdown-content-wrapper": "awsui_dropdown-content-wrapper_qwoo0_ozrto_99",
|
|
5
|
+
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-dropdown_qwoo0_ozrto_1",
|
|
6
|
+
"refresh": "awsui_refresh_qwoo0_ozrto_120",
|
|
7
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_qwoo0_ozrto_1",
|
|
8
|
+
"root": "awsui_root_qwoo0_ozrto_149",
|
|
9
|
+
"interior": "awsui_interior_qwoo0_ozrto_185",
|
|
10
|
+
"dropdown": "awsui_dropdown_qwoo0_ozrto_99",
|
|
11
|
+
"use-portal": "awsui_use-portal_qwoo0_ozrto_196",
|
|
12
|
+
"is-empty": "awsui_is-empty_qwoo0_ozrto_248",
|
|
13
|
+
"dropdown-drop-up": "awsui_dropdown-drop-up_qwoo0_ozrto_255",
|
|
14
|
+
"with-limited-width": "awsui_with-limited-width_qwoo0_ozrto_259",
|
|
15
|
+
"dropdown-drop-left": "awsui_dropdown-drop-left_qwoo0_ozrto_262",
|
|
16
|
+
"dropdown-drop-right": "awsui_dropdown-drop-right_qwoo0_ozrto_268",
|
|
17
|
+
"occupy-entire-width": "awsui_occupy-entire-width_qwoo0_ozrto_274",
|
|
18
|
+
"stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-width_qwoo0_ozrto_277",
|
|
19
|
+
"hide-block-border": "awsui_hide-block-border_qwoo0_ozrto_284",
|
|
20
|
+
"open": "awsui_open_qwoo0_ozrto_293",
|
|
21
|
+
"nowrap": "awsui_nowrap_qwoo0_ozrto_302",
|
|
22
|
+
"dropdown-content": "awsui_dropdown-content_qwoo0_ozrto_99",
|
|
23
|
+
"stretch-trigger-height": "awsui_stretch-trigger-height_qwoo0_ozrto_313"
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -96,10 +96,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
96
96
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
97
97
|
SPDX-License-Identifier: Apache-2.0
|
|
98
98
|
*/
|
|
99
|
-
.awsui_dropdown-content-
|
|
100
|
-
animation: awsui_awsui-motion-fade-in-
|
|
99
|
+
.awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
100
|
+
animation: awsui_awsui-motion-fade-in-dropdown_qwoo0_ozrto_1 var(--motion-duration-show-quick-kypzaj, 135ms) var(--motion-easing-show-quick-lvi5i8, ease-out);
|
|
101
101
|
}
|
|
102
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
102
|
+
@keyframes awsui_awsui-motion-fade-in-dropdown_qwoo0_ozrto_1 {
|
|
103
103
|
from {
|
|
104
104
|
opacity: 0.4;
|
|
105
105
|
}
|
|
@@ -108,22 +108,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
@media (prefers-reduced-motion: reduce) {
|
|
111
|
-
.awsui_dropdown-content-
|
|
111
|
+
.awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
112
112
|
animation: none;
|
|
113
113
|
transition: none;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
.awsui-motion-disabled .awsui_dropdown-content-
|
|
116
|
+
.awsui-motion-disabled .awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9), .awsui-mode-entering .awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
117
117
|
animation: none;
|
|
118
118
|
transition: none;
|
|
119
119
|
}
|
|
120
|
-
.awsui_dropdown-content-
|
|
120
|
+
.awsui_dropdown-content-wrapper_qwoo0_ozrto_99.awsui_refresh_qwoo0_ozrto_120:not(#\9) {
|
|
121
121
|
transform-origin: top;
|
|
122
|
-
animation-name: awsui_awsui-motion-fade-in-
|
|
122
|
+
animation-name: awsui_awsui-motion-fade-in-0_qwoo0_ozrto_1;
|
|
123
123
|
animation-duration: var(--motion-duration-show-quick-kypzaj, 135ms);
|
|
124
124
|
animation-timing-function: var(--motion-easing-show-quick-lvi5i8, ease-out);
|
|
125
125
|
}
|
|
126
|
-
@keyframes awsui_awsui-motion-fade-in-
|
|
126
|
+
@keyframes awsui_awsui-motion-fade-in-0_qwoo0_ozrto_1 {
|
|
127
127
|
from {
|
|
128
128
|
opacity: 0;
|
|
129
129
|
}
|
|
@@ -132,12 +132,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
@media (prefers-reduced-motion: reduce) {
|
|
135
|
-
.awsui_dropdown-content-
|
|
135
|
+
.awsui_dropdown-content-wrapper_qwoo0_ozrto_99.awsui_refresh_qwoo0_ozrto_120:not(#\9) {
|
|
136
136
|
animation: none;
|
|
137
137
|
transition: none;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
.awsui-motion-disabled .awsui_dropdown-content-
|
|
140
|
+
.awsui-motion-disabled .awsui_dropdown-content-wrapper_qwoo0_ozrto_99.awsui_refresh_qwoo0_ozrto_120:not(#\9), .awsui-mode-entering .awsui_dropdown-content-wrapper_qwoo0_ozrto_99.awsui_refresh_qwoo0_ozrto_120:not(#\9) {
|
|
141
141
|
animation: none;
|
|
142
142
|
transition: none;
|
|
143
143
|
}
|
|
@@ -146,7 +146,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
146
146
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
147
147
|
SPDX-License-Identifier: Apache-2.0
|
|
148
148
|
*/
|
|
149
|
-
.
|
|
149
|
+
.awsui_root_qwoo0_ozrto_149:not(#\9) {
|
|
150
150
|
border-collapse: separate;
|
|
151
151
|
border-spacing: 0;
|
|
152
152
|
box-sizing: border-box;
|
|
@@ -183,11 +183,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
183
183
|
position: relative;
|
|
184
184
|
white-space: inherit;
|
|
185
185
|
}
|
|
186
|
-
.
|
|
186
|
+
.awsui_root_qwoo0_ozrto_149.awsui_interior_qwoo0_ozrto_185:not(#\9) {
|
|
187
187
|
position: static;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
.
|
|
190
|
+
.awsui_dropdown_qwoo0_ozrto_99:not(#\9) {
|
|
191
191
|
position: absolute;
|
|
192
192
|
display: none;
|
|
193
193
|
z-index: 2000;
|
|
@@ -195,24 +195,24 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
195
195
|
user-select: none;
|
|
196
196
|
transform-origin: top;
|
|
197
197
|
}
|
|
198
|
-
.
|
|
198
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_use-portal_qwoo0_ozrto_196:not(#\9) {
|
|
199
199
|
z-index: 7000;
|
|
200
200
|
}
|
|
201
|
-
.
|
|
201
|
+
.awsui_dropdown_qwoo0_ozrto_99:not(#\9):not(.awsui_interior_qwoo0_ozrto_185) {
|
|
202
202
|
transform: translateY(0px);
|
|
203
203
|
transition: transform var(--motion-duration-show-quick-kypzaj, 135ms);
|
|
204
204
|
}
|
|
205
205
|
@media (prefers-reduced-motion: reduce) {
|
|
206
|
-
.
|
|
206
|
+
.awsui_dropdown_qwoo0_ozrto_99:not(#\9):not(.awsui_interior_qwoo0_ozrto_185) {
|
|
207
207
|
animation: none;
|
|
208
208
|
transition: none;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
.awsui-motion-disabled .
|
|
211
|
+
.awsui-motion-disabled .awsui_dropdown_qwoo0_ozrto_99:not(#\9):not(.awsui_interior_qwoo0_ozrto_185), .awsui-mode-entering .awsui_dropdown_qwoo0_ozrto_99:not(#\9):not(.awsui_interior_qwoo0_ozrto_185) {
|
|
212
212
|
animation: none;
|
|
213
213
|
transition: none;
|
|
214
214
|
}
|
|
215
|
-
.awsui_dropdown-content-
|
|
215
|
+
.awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
216
216
|
position: relative;
|
|
217
217
|
background-color: var(--color-background-dropdown-item-default-s7k0er, #ffffff);
|
|
218
218
|
outline: none;
|
|
@@ -224,7 +224,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
224
224
|
border-block: var(--border-divider-list-width-471u6a, 1px) solid var(--color-border-container-top-9shhmi, #eaeded);
|
|
225
225
|
box-sizing: border-box;
|
|
226
226
|
}
|
|
227
|
-
.awsui_dropdown-content-
|
|
227
|
+
.awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9)::after {
|
|
228
228
|
content: "";
|
|
229
229
|
position: absolute;
|
|
230
230
|
z-index: 1;
|
|
@@ -242,70 +242,76 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
242
242
|
pointer-events: none;
|
|
243
243
|
}
|
|
244
244
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
245
|
-
.awsui_dropdown-content-
|
|
245
|
+
.awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
246
246
|
border-block: var(--border-field-width-yoy972, 1px) solid var(--color-border-container-top-9shhmi, #eaeded);
|
|
247
247
|
border-inline: var(--border-field-width-yoy972, 1px) solid var(--color-border-container-top-9shhmi, #eaeded);
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
.awsui_dropdown-content-
|
|
250
|
+
.awsui_dropdown-content-wrapper_qwoo0_ozrto_99.awsui_is-empty_qwoo0_ozrto_248:not(#\9)::after {
|
|
251
251
|
display: none;
|
|
252
252
|
}
|
|
253
|
-
.
|
|
253
|
+
.awsui_dropdown_qwoo0_ozrto_99 > .awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
254
254
|
border-block-start: var(--border-divider-list-width-471u6a, 1px) solid var(--color-border-container-top-9shhmi, #eaeded);
|
|
255
255
|
border-block-end: var(--border-divider-list-width-471u6a, 1px) solid var(--color-border-dropdown-group-mkqzrv, #eaeded);
|
|
256
256
|
}
|
|
257
|
-
.awsui_dropdown-drop-
|
|
257
|
+
.awsui_dropdown-drop-up_qwoo0_ozrto_255 > .awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
258
258
|
transform-origin: bottom;
|
|
259
259
|
box-shadow: var(--shadow-dropup-ovsp4h, 0 -1px 1px 0 rgba(0, 28, 36, 0.3), 1px -1px 1px 0 rgba(0, 28, 36, 0.15), -1px -1px 1px 0 rgba(0, 28, 36, 0.15));
|
|
260
260
|
}
|
|
261
|
-
.awsui_dropdown-drop-
|
|
261
|
+
.awsui_dropdown-drop-up_qwoo0_ozrto_255.awsui_with-limited-width_qwoo0_ozrto_259 > .awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
262
262
|
border-block-start: none;
|
|
263
263
|
}
|
|
264
|
-
.awsui_dropdown-drop-
|
|
264
|
+
.awsui_dropdown-drop-left_qwoo0_ozrto_262:not(#\9) {
|
|
265
265
|
inset-inline-end: 0;
|
|
266
266
|
}
|
|
267
|
-
.awsui_dropdown-drop-
|
|
267
|
+
.awsui_dropdown-drop-left_qwoo0_ozrto_262:not(#\9):dir(rtl) {
|
|
268
268
|
inset-inline-end: unset;
|
|
269
269
|
}
|
|
270
|
-
.awsui_dropdown-drop-
|
|
270
|
+
.awsui_dropdown-drop-right_qwoo0_ozrto_268:not(#\9) {
|
|
271
271
|
inset-inline-start: 0;
|
|
272
272
|
}
|
|
273
|
-
.awsui_dropdown-drop-
|
|
273
|
+
.awsui_dropdown-drop-right_qwoo0_ozrto_268:not(#\9):dir(rtl) {
|
|
274
274
|
inset-inline-start: unset;
|
|
275
275
|
}
|
|
276
|
-
.
|
|
276
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_occupy-entire-width_qwoo0_ozrto_274:not(#\9) {
|
|
277
277
|
min-inline-size: 100%;
|
|
278
278
|
}
|
|
279
|
-
.
|
|
279
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_stretch-beyond-trigger-width_qwoo0_ozrto_277:not(#\9) {
|
|
280
280
|
inline-size: max-content;
|
|
281
281
|
max-inline-size: var(--awsui-dropdown-default-max-width-lgosor, 100%);
|
|
282
282
|
}
|
|
283
|
-
.
|
|
284
|
-
border-block: none;
|
|
285
|
-
}
|
|
286
|
-
.awsui_dropdown_qwoo0_1bmeb_99.awsui_interior_qwoo0_1bmeb_185 > .awsui_dropdown-content-wrapper_qwoo0_1bmeb_99:not(#\9) {
|
|
283
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_interior_qwoo0_ozrto_185 > .awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
287
284
|
margin-block-start: -1px;
|
|
288
285
|
}
|
|
289
|
-
.
|
|
286
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_hide-block-border_qwoo0_ozrto_284 > .awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
287
|
+
border-block-start: none;
|
|
288
|
+
}
|
|
289
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_hide-block-border_qwoo0_ozrto_284:not(#\9):not(.awsui_dropdown-drop-up_qwoo0_ozrto_255) > .awsui_dropdown-content-wrapper_qwoo0_ozrto_99 {
|
|
290
|
+
border-block-end: none;
|
|
291
|
+
}
|
|
292
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_hide-block-border_qwoo0_ozrto_284.awsui_refresh_qwoo0_ozrto_120 > .awsui_dropdown-content-wrapper_qwoo0_ozrto_99:not(#\9) {
|
|
293
|
+
border-block-end: none;
|
|
294
|
+
}
|
|
295
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_open_qwoo0_ozrto_293:not(#\9) {
|
|
290
296
|
display: block;
|
|
291
297
|
}
|
|
292
|
-
.
|
|
298
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_open_qwoo0_ozrto_293:not(#\9):not(.awsui_interior_qwoo0_ozrto_185).awsui_refresh_qwoo0_ozrto_120[data-animating=true] {
|
|
293
299
|
transform: translateY(4px);
|
|
294
300
|
}
|
|
295
|
-
.
|
|
301
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_open_qwoo0_ozrto_293:not(#\9):not(.awsui_interior_qwoo0_ozrto_185).awsui_refresh_qwoo0_ozrto_120[data-animating=true].awsui_dropdown-drop-up_qwoo0_ozrto_255 {
|
|
296
302
|
transform: translateY(-4px);
|
|
297
303
|
}
|
|
298
|
-
.
|
|
304
|
+
.awsui_dropdown_qwoo0_ozrto_99.awsui_open_qwoo0_ozrto_293.awsui_nowrap_qwoo0_ozrto_302:not(#\9) {
|
|
299
305
|
white-space: nowrap;
|
|
300
306
|
overflow: scroll;
|
|
301
307
|
}
|
|
302
308
|
|
|
303
|
-
.awsui_dropdown-
|
|
309
|
+
.awsui_dropdown-content_qwoo0_ozrto_99:not(#\9) {
|
|
304
310
|
display: flex;
|
|
305
311
|
flex-direction: column;
|
|
306
312
|
inline-size: 100%;
|
|
307
313
|
}
|
|
308
314
|
|
|
309
|
-
.awsui_stretch-trigger-
|
|
315
|
+
.awsui_stretch-trigger-height_qwoo0_ozrto_313:not(#\9) {
|
|
310
316
|
block-size: 100%;
|
|
311
317
|
}
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"dropdown-content-wrapper": "awsui_dropdown-content-
|
|
6
|
-
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-
|
|
7
|
-
"refresh": "
|
|
8
|
-
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-
|
|
9
|
-
"root": "
|
|
10
|
-
"interior": "
|
|
11
|
-
"dropdown": "
|
|
12
|
-
"use-portal": "awsui_use-
|
|
13
|
-
"is-empty": "awsui_is-
|
|
14
|
-
"dropdown-drop-up": "awsui_dropdown-drop-
|
|
15
|
-
"with-limited-width": "awsui_with-limited-
|
|
16
|
-
"dropdown-drop-left": "awsui_dropdown-drop-
|
|
17
|
-
"dropdown-drop-right": "awsui_dropdown-drop-
|
|
18
|
-
"occupy-entire-width": "awsui_occupy-entire-
|
|
19
|
-
"stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-
|
|
20
|
-
"hide-block-border": "awsui_hide-block-
|
|
21
|
-
"open": "
|
|
22
|
-
"nowrap": "
|
|
23
|
-
"dropdown-content": "awsui_dropdown-
|
|
24
|
-
"stretch-trigger-height": "awsui_stretch-trigger-
|
|
5
|
+
"dropdown-content-wrapper": "awsui_dropdown-content-wrapper_qwoo0_ozrto_99",
|
|
6
|
+
"awsui-motion-fade-in-dropdown": "awsui_awsui-motion-fade-in-dropdown_qwoo0_ozrto_1",
|
|
7
|
+
"refresh": "awsui_refresh_qwoo0_ozrto_120",
|
|
8
|
+
"awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_qwoo0_ozrto_1",
|
|
9
|
+
"root": "awsui_root_qwoo0_ozrto_149",
|
|
10
|
+
"interior": "awsui_interior_qwoo0_ozrto_185",
|
|
11
|
+
"dropdown": "awsui_dropdown_qwoo0_ozrto_99",
|
|
12
|
+
"use-portal": "awsui_use-portal_qwoo0_ozrto_196",
|
|
13
|
+
"is-empty": "awsui_is-empty_qwoo0_ozrto_248",
|
|
14
|
+
"dropdown-drop-up": "awsui_dropdown-drop-up_qwoo0_ozrto_255",
|
|
15
|
+
"with-limited-width": "awsui_with-limited-width_qwoo0_ozrto_259",
|
|
16
|
+
"dropdown-drop-left": "awsui_dropdown-drop-left_qwoo0_ozrto_262",
|
|
17
|
+
"dropdown-drop-right": "awsui_dropdown-drop-right_qwoo0_ozrto_268",
|
|
18
|
+
"occupy-entire-width": "awsui_occupy-entire-width_qwoo0_ozrto_274",
|
|
19
|
+
"stretch-beyond-trigger-width": "awsui_stretch-beyond-trigger-width_qwoo0_ozrto_277",
|
|
20
|
+
"hide-block-border": "awsui_hide-block-border_qwoo0_ozrto_284",
|
|
21
|
+
"open": "awsui_open_qwoo0_ozrto_293",
|
|
22
|
+
"nowrap": "awsui_nowrap_qwoo0_ozrto_302",
|
|
23
|
+
"dropdown-content": "awsui_dropdown-content_qwoo0_ozrto_99",
|
|
24
|
+
"stretch-trigger-height": "awsui_stretch-trigger-height_qwoo0_ozrto_313"
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-series.d.ts","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/data-series.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAG9F,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAQ3F,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAA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AAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,SAAS,cAAc,EAAE,EAC3D,IAAI,EACJ,UAAU,EACV,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,MAAM,EACN,MAAM,GACP,EAAE,eAAe,CAAC,CAAC,CAAC,eAsFpB"}
|
|
@@ -22,6 +22,9 @@ export default function DataSeries({ axis, plotHeight, plotWidth, highlightedGro
|
|
|
22
22
|
if (series.type === 'bar') {
|
|
23
23
|
barData.push(series.data);
|
|
24
24
|
}
|
|
25
|
+
else {
|
|
26
|
+
barData.push([]);
|
|
27
|
+
}
|
|
25
28
|
});
|
|
26
29
|
return calculateOffsetMaps(barData);
|
|
27
30
|
}, [visibleSeries, stackedBars]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-series.js","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/data-series.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,SAAS,MAAM,cAAc,CAAC;AAGrC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAkB,MAAM,SAAS,CAAC;AAE9D,qEAAqE;AACrE,MAAM,YAAY,GAAG,CAAC,CAAC;AAmBvB,MAAM,CAAC,OAAO,UAAU,UAAU,CAA2B,EAC3D,IAAI,EACJ,UAAU,EACV,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,WA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EAAE,oBAAoB,CAAC,KAAK,CAAC,EAC9C,qBAAqB,EAAE,qBAAqB,GAC5C,CACH,CAAC;aACL;QACH,CAAC,CAAC,CACA,CACH,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { ChartScale, NumericChartScale } from '../internal/components/cartesian-chart/scales';\nimport LineSeries from './line-series';\nimport BarSeries from './bar-series';\nimport { ChartDataTypes, InternalChartSeries, MixedLineBarChartProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { calculateOffsetMaps, StackedOffsets } from './utils';\n\n// Should have the same value as the `border-line-chart-width` token.\nconst STROKE_WIDTH = 2;\n\nexport interface DataSeriesProps<T> {\n axis: 'x' | 'y';\n\n plotHeight: number;\n plotWidth: number;\n\n highlightedSeries: MixedLineBarChartProps.ChartSeries<T> | null;\n highlightedGroupIndex: number | null;\n\n stackedBars: boolean;\n isGroupNavigation: boolean;\n\n visibleSeries: ReadonlyArray<InternalChartSeries<T>>;\n xScale: ChartScale;\n yScale: NumericChartScale;\n}\n\nexport default function DataSeries<T extends ChartDataTypes>({\n axis,\n plotHeight,\n plotWidth,\n highlightedGroupIndex,\n highlightedSeries,\n stackedBars,\n isGroupNavigation,\n visibleSeries,\n xScale,\n yScale,\n}: DataSeriesProps<T>) {\n const chartAreaClipPath = useUniqueId('awsui-mixed-line-bar-chart__chart-area-');\n\n // Lines get a small extra space at the top and bottom to account for the strokes when they are at the edge of the graph.\n const lineAreaClipPath = useUniqueId('awsui-line-chart__chart-area-');\n\n const stackedBarOffsetMaps: StackedOffsets[] = useMemo(() => {\n if (!stackedBars) {\n return [];\n }\n\n const barData: Array<readonly MixedLineBarChartProps.Datum<ChartDataTypes>[]> = [];\n visibleSeries.forEach(({ series }) => {\n if (series.type === 'bar') {\n barData.push(series.data);\n }\n });\n return calculateOffsetMaps(barData);\n }, [visibleSeries, stackedBars]);\n\n return (\n <>\n <defs aria-hidden=\"true\">\n <clipPath id={chartAreaClipPath}>\n <rect x={0} y={0} width={plotWidth} height={plotHeight} />\n </clipPath>\n <clipPath id={lineAreaClipPath}>\n <rect x={0} y={-STROKE_WIDTH / 2} width={plotWidth} height={plotHeight + STROKE_WIDTH} />\n </clipPath>\n </defs>\n <g aria-hidden={isGroupNavigation ? true : undefined} role=\"group\">\n {visibleSeries.map(({ series, color }, index) => {\n const isHighlighted = series === highlightedSeries;\n const isDimmed = !!highlightedSeries && !isHighlighted;\n\n switch (series.type) {\n case 'line':\n case 'threshold': {\n return (\n <g\n key={index}\n role=\"group\"\n aria-label={series.title}\n className={clsx(styles.series, styles[`series--${series.type}`], {\n [styles['series--highlighted']]: isHighlighted,\n [styles['series--dimmed']]: isDimmed,\n })}\n >\n <LineSeries\n axis={axis}\n series={series}\n color={color}\n xScale={xScale}\n yScale={yScale}\n chartAreaClipPath={lineAreaClipPath}\n />\n </g>\n );\n }\n\n case 'bar':\n return (\n <BarSeries\n key={index}\n axis={axis}\n series={series}\n color={color}\n totalSeriesCount={visibleSeries.filter(s => s.series.type === 'bar').length}\n seriesIndex={index}\n xScale={xScale}\n yScale={yScale}\n plotSize={axis === 'y' ? plotWidth : plotHeight}\n highlighted={isHighlighted}\n dimmed={isDimmed}\n chartAreaClipPath={chartAreaClipPath}\n stackedBarOffsets={stackedBarOffsetMaps[index]}\n highlightedGroupIndex={highlightedGroupIndex}\n />\n );\n }\n })}\n </g>\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"data-series.js","sourceRoot":"","sources":["../../../src/mixed-line-bar-chart/data-series.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW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V,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,MAAM,EAC3E,WAAW,EAAE,KAAK,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAC/C,WAAW,EAAE,aAAa,EAC1B,MAAM,EAAE,QAAQ,EAChB,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAC9C,qBAAqB,EAAE,qBAAqB,GAC5C,CACH,CAAC;aACL;QACH,CAAC,CAAC,CACA,CACH,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useMemo } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { ChartScale, NumericChartScale } from '../internal/components/cartesian-chart/scales';\nimport LineSeries from './line-series';\nimport BarSeries from './bar-series';\nimport { ChartDataTypes, InternalChartSeries, MixedLineBarChartProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport { calculateOffsetMaps, StackedOffsets } from './utils';\n\n// Should have the same value as the `border-line-chart-width` token.\nconst STROKE_WIDTH = 2;\n\nexport interface DataSeriesProps<T> {\n axis: 'x' | 'y';\n\n plotHeight: number;\n plotWidth: number;\n\n highlightedSeries: MixedLineBarChartProps.ChartSeries<T> | null;\n highlightedGroupIndex: number | null;\n\n stackedBars: boolean;\n isGroupNavigation: boolean;\n\n visibleSeries: ReadonlyArray<InternalChartSeries<T>>;\n xScale: ChartScale;\n yScale: NumericChartScale;\n}\n\nexport default function DataSeries<T extends ChartDataTypes>({\n axis,\n plotHeight,\n plotWidth,\n highlightedGroupIndex,\n highlightedSeries,\n stackedBars,\n isGroupNavigation,\n visibleSeries,\n xScale,\n yScale,\n}: DataSeriesProps<T>) {\n const chartAreaClipPath = useUniqueId('awsui-mixed-line-bar-chart__chart-area-');\n\n // Lines get a small extra space at the top and bottom to account for the strokes when they are at the edge of the graph.\n const lineAreaClipPath = useUniqueId('awsui-line-chart__chart-area-');\n\n const stackedBarOffsetMaps: StackedOffsets[] = useMemo(() => {\n if (!stackedBars) {\n return [];\n }\n\n const barData: Array<readonly MixedLineBarChartProps.Datum<ChartDataTypes>[]> = [];\n visibleSeries.forEach(({ series }) => {\n if (series.type === 'bar') {\n barData.push(series.data);\n } else {\n barData.push([]);\n }\n });\n return calculateOffsetMaps(barData);\n }, [visibleSeries, stackedBars]);\n\n return (\n <>\n <defs aria-hidden=\"true\">\n <clipPath id={chartAreaClipPath}>\n <rect x={0} y={0} width={plotWidth} height={plotHeight} />\n </clipPath>\n <clipPath id={lineAreaClipPath}>\n <rect x={0} y={-STROKE_WIDTH / 2} width={plotWidth} height={plotHeight + STROKE_WIDTH} />\n </clipPath>\n </defs>\n <g aria-hidden={isGroupNavigation ? true : undefined} role=\"group\">\n {visibleSeries.map(({ series, color }, index) => {\n const isHighlighted = series === highlightedSeries;\n const isDimmed = !!highlightedSeries && !isHighlighted;\n\n switch (series.type) {\n case 'line':\n case 'threshold': {\n return (\n <g\n key={index}\n role=\"group\"\n aria-label={series.title}\n className={clsx(styles.series, styles[`series--${series.type}`], {\n [styles['series--highlighted']]: isHighlighted,\n [styles['series--dimmed']]: isDimmed,\n })}\n >\n <LineSeries\n axis={axis}\n series={series}\n color={color}\n xScale={xScale}\n yScale={yScale}\n chartAreaClipPath={lineAreaClipPath}\n />\n </g>\n );\n }\n\n case 'bar':\n return (\n <BarSeries\n key={index}\n axis={axis}\n series={series}\n color={color}\n totalSeriesCount={visibleSeries.filter(s => s.series.type === 'bar').length}\n seriesIndex={index}\n xScale={xScale}\n yScale={yScale}\n plotSize={axis === 'y' ? plotWidth : plotHeight}\n highlighted={isHighlighted}\n dimmed={isDimmed}\n chartAreaClipPath={chartAreaClipPath}\n stackedBarOffsets={stackedBarOffsetMaps[index]}\n highlightedGroupIndex={highlightedGroupIndex}\n />\n );\n }\n })}\n </g>\n </>\n );\n}\n"]}
|