@cloudscape-design/components 3.0.401 → 3.0.402

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.
Files changed (71) hide show
  1. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  2. package/app-layout/visual-refresh/context.js +8 -4
  3. package/app-layout/visual-refresh/context.js.map +1 -1
  4. package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  5. package/app-layout/visual-refresh/drawers.js +10 -9
  6. package/app-layout/visual-refresh/drawers.js.map +1 -1
  7. package/app-layout/visual-refresh/main.d.ts.map +1 -1
  8. package/app-layout/visual-refresh/main.js +2 -1
  9. package/app-layout/visual-refresh/main.js.map +1 -1
  10. package/app-layout/visual-refresh/styles.css.js +76 -74
  11. package/app-layout/visual-refresh/styles.scoped.css +183 -177
  12. package/app-layout/visual-refresh/styles.selectors.js +76 -74
  13. package/container/internal.d.ts.map +1 -1
  14. package/container/internal.js +7 -3
  15. package/container/internal.js.map +1 -1
  16. package/expandable-section/expandable-section-container.d.ts +1 -4
  17. package/expandable-section/expandable-section-container.d.ts.map +1 -1
  18. package/expandable-section/expandable-section-container.js +5 -3
  19. package/expandable-section/expandable-section-container.js.map +1 -1
  20. package/expandable-section/index.d.ts.map +1 -1
  21. package/expandable-section/index.js +1 -13
  22. package/expandable-section/index.js.map +1 -1
  23. package/expandable-section/internal.d.ts +2 -3
  24. package/expandable-section/internal.d.ts.map +1 -1
  25. package/expandable-section/internal.js +2 -2
  26. package/expandable-section/internal.js.map +1 -1
  27. package/form/index.d.ts.map +1 -1
  28. package/form/index.js +6 -4
  29. package/form/index.js.map +1 -1
  30. package/internal/analytics/components/analytics-funnel.d.ts +2 -2
  31. package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  32. package/internal/analytics/components/analytics-funnel.js +6 -4
  33. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  34. package/internal/analytics/context/analytics-context.d.ts +1 -0
  35. package/internal/analytics/context/analytics-context.d.ts.map +1 -1
  36. package/internal/analytics/context/analytics-context.js +1 -0
  37. package/internal/analytics/context/analytics-context.js.map +1 -1
  38. package/internal/analytics/hooks/use-funnel.d.ts +1 -0
  39. package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
  40. package/internal/analytics/hooks/use-funnel.js +5 -1
  41. package/internal/analytics/hooks/use-funnel.js.map +1 -1
  42. package/internal/analytics/interfaces.d.ts +1 -0
  43. package/internal/analytics/interfaces.d.ts.map +1 -1
  44. package/internal/analytics/interfaces.js.map +1 -1
  45. package/internal/context/modal-context.d.ts +8 -0
  46. package/internal/context/modal-context.d.ts.map +1 -0
  47. package/internal/context/modal-context.js +9 -0
  48. package/internal/context/modal-context.js.map +1 -0
  49. package/internal/environment.js +1 -1
  50. package/internal/environment.json +1 -1
  51. package/internal/manifest.json +1 -1
  52. package/modal/internal.d.ts.map +1 -1
  53. package/modal/internal.js +23 -18
  54. package/modal/internal.js.map +1 -1
  55. package/package.json +1 -1
  56. package/pie-chart/styles.css.js +27 -27
  57. package/pie-chart/styles.scoped.css +60 -42
  58. package/pie-chart/styles.selectors.js +27 -27
  59. package/pie-chart/utils.d.ts.map +1 -1
  60. package/pie-chart/utils.js +2 -1
  61. package/pie-chart/utils.js.map +1 -1
  62. package/property-filter/utils.d.ts +1 -1
  63. package/split-panel/side.d.ts.map +1 -1
  64. package/split-panel/side.js +0 -1
  65. package/split-panel/side.js.map +1 -1
  66. package/split-panel/styles.css.js +55 -56
  67. package/split-panel/styles.scoped.css +80 -84
  68. package/split-panel/styles.selectors.js +55 -56
  69. package/table/internal.d.ts.map +1 -1
  70. package/table/internal.js +4 -4
  71. package/table/internal.js.map +1 -1
@@ -1,32 +1,32 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "segment__path": "awsui_segment__path_1edmh_14hg0_97",
5
- "segment": "awsui_segment_1edmh_14hg0_97",
6
- "segment__hover": "awsui_segment__hover_1edmh_14hg0_124",
7
- "label": "awsui_label_1edmh_14hg0_138",
8
- "root": "awsui_root_1edmh_14hg0_156",
9
- "content": "awsui_content_1edmh_14hg0_160",
10
- "content--small": "awsui_content--small_1edmh_14hg0_160",
11
- "content--without-labels": "awsui_content--without-labels_1edmh_14hg0_163",
12
- "content--medium": "awsui_content--medium_1edmh_14hg0_166",
13
- "content--large": "awsui_content--large_1edmh_14hg0_172",
14
- "content--fit-height": "awsui_content--fit-height_1edmh_14hg0_179",
15
- "status-container": "awsui_status-container_1edmh_14hg0_183",
16
- "chart-container": "awsui_chart-container_1edmh_14hg0_187",
17
- "chart-container--fit-height": "awsui_chart-container--fit-height_1edmh_14hg0_191",
18
- "chart-container-chart-plot": "awsui_chart-container-chart-plot_1edmh_14hg0_196",
19
- "chart-container-chart-plot--fit-height": "awsui_chart-container-chart-plot--fit-height_1edmh_14hg0_199",
20
- "inner-content": "awsui_inner-content_1edmh_14hg0_208",
21
- "segment__highlight": "awsui_segment__highlight_1edmh_14hg0_222",
22
- "segment--dimmed": "awsui_segment--dimmed_1edmh_14hg0_237",
23
- "segment--highlighted": "awsui_segment--highlighted_1edmh_14hg0_240",
24
- "label--dimmed": "awsui_label--dimmed_1edmh_14hg0_257",
25
- "label--align-right": "awsui_label--align-right_1edmh_14hg0_260",
26
- "label-text": "awsui_label-text_1edmh_14hg0_268",
27
- "label__description": "awsui_label__description_1edmh_14hg0_276",
28
- "label-line": "awsui_label-line_1edmh_14hg0_283",
29
- "label--highlighted": "awsui_label--highlighted_1edmh_14hg0_287",
30
- "popover-header": "awsui_popover-header_1edmh_14hg0_291"
4
+ "segment__path": "awsui_segment__path_1edmh_hud94_97",
5
+ "segment": "awsui_segment_1edmh_hud94_97",
6
+ "segment__hover": "awsui_segment__hover_1edmh_hud94_124",
7
+ "label": "awsui_label_1edmh_hud94_138",
8
+ "root": "awsui_root_1edmh_hud94_156",
9
+ "content": "awsui_content_1edmh_hud94_160",
10
+ "content--small": "awsui_content--small_1edmh_hud94_160",
11
+ "content--fit-height": "awsui_content--fit-height_1edmh_hud94_163",
12
+ "content--without-labels": "awsui_content--without-labels_1edmh_hud94_166",
13
+ "content--medium": "awsui_content--medium_1edmh_hud94_172",
14
+ "content--large": "awsui_content--large_1edmh_hud94_184",
15
+ "status-container": "awsui_status-container_1edmh_hud94_201",
16
+ "chart-container": "awsui_chart-container_1edmh_hud94_205",
17
+ "chart-container--fit-height": "awsui_chart-container--fit-height_1edmh_hud94_209",
18
+ "chart-container-chart-plot": "awsui_chart-container-chart-plot_1edmh_hud94_214",
19
+ "chart-container-chart-plot--fit-height": "awsui_chart-container-chart-plot--fit-height_1edmh_hud94_217",
20
+ "inner-content": "awsui_inner-content_1edmh_hud94_226",
21
+ "segment__highlight": "awsui_segment__highlight_1edmh_hud94_240",
22
+ "segment--dimmed": "awsui_segment--dimmed_1edmh_hud94_255",
23
+ "segment--highlighted": "awsui_segment--highlighted_1edmh_hud94_258",
24
+ "label--dimmed": "awsui_label--dimmed_1edmh_hud94_275",
25
+ "label--align-right": "awsui_label--align-right_1edmh_hud94_278",
26
+ "label-text": "awsui_label-text_1edmh_hud94_286",
27
+ "label__description": "awsui_label__description_1edmh_hud94_294",
28
+ "label-line": "awsui_label-line_1edmh_hud94_301",
29
+ "label--highlighted": "awsui_label--highlighted_1edmh_hud94_305",
30
+ "popover-header": "awsui_popover-header_1edmh_hud94_309"
31
31
  };
32
32
 
@@ -94,57 +94,57 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
94
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
- .awsui_segment__path_1edmh_14hg0_97:not(#\9) {
97
+ .awsui_segment__path_1edmh_hud94_97:not(#\9) {
98
98
  transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
99
99
  }
100
100
  @media (prefers-reduced-motion: reduce) {
101
- .awsui_segment__path_1edmh_14hg0_97:not(#\9) {
101
+ .awsui_segment__path_1edmh_hud94_97:not(#\9) {
102
102
  animation: none;
103
103
  transition: none;
104
104
  }
105
105
  }
106
- .awsui-motion-disabled .awsui_segment__path_1edmh_14hg0_97:not(#\9), .awsui-mode-entering .awsui_segment__path_1edmh_14hg0_97:not(#\9) {
106
+ .awsui-motion-disabled .awsui_segment__path_1edmh_hud94_97:not(#\9), .awsui-mode-entering .awsui_segment__path_1edmh_hud94_97:not(#\9) {
107
107
  animation: none;
108
108
  transition: none;
109
109
  }
110
110
 
111
- .awsui_segment_1edmh_14hg0_97:not(#\9) {
111
+ .awsui_segment_1edmh_hud94_97:not(#\9) {
112
112
  transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
113
113
  }
114
114
  @media (prefers-reduced-motion: reduce) {
115
- .awsui_segment_1edmh_14hg0_97:not(#\9) {
115
+ .awsui_segment_1edmh_hud94_97:not(#\9) {
116
116
  animation: none;
117
117
  transition: none;
118
118
  }
119
119
  }
120
- .awsui-motion-disabled .awsui_segment_1edmh_14hg0_97:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_14hg0_97:not(#\9) {
120
+ .awsui-motion-disabled .awsui_segment_1edmh_hud94_97:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_hud94_97:not(#\9) {
121
121
  animation: none;
122
122
  transition: none;
123
123
  }
124
- .awsui_segment_1edmh_14hg0_97 > .awsui_segment__hover_1edmh_14hg0_124:not(#\9) {
124
+ .awsui_segment_1edmh_hud94_97 > .awsui_segment__hover_1edmh_hud94_124:not(#\9) {
125
125
  transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
126
126
  }
127
127
  @media (prefers-reduced-motion: reduce) {
128
- .awsui_segment_1edmh_14hg0_97 > .awsui_segment__hover_1edmh_14hg0_124:not(#\9) {
128
+ .awsui_segment_1edmh_hud94_97 > .awsui_segment__hover_1edmh_hud94_124:not(#\9) {
129
129
  animation: none;
130
130
  transition: none;
131
131
  }
132
132
  }
133
- .awsui-motion-disabled .awsui_segment_1edmh_14hg0_97 > .awsui_segment__hover_1edmh_14hg0_124:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_14hg0_97 > .awsui_segment__hover_1edmh_14hg0_124:not(#\9) {
133
+ .awsui-motion-disabled .awsui_segment_1edmh_hud94_97 > .awsui_segment__hover_1edmh_hud94_124:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_hud94_97 > .awsui_segment__hover_1edmh_hud94_124:not(#\9) {
134
134
  animation: none;
135
135
  transition: none;
136
136
  }
137
137
 
138
- .awsui_label_1edmh_14hg0_138:not(#\9) {
138
+ .awsui_label_1edmh_hud94_138:not(#\9) {
139
139
  transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
140
140
  }
141
141
  @media (prefers-reduced-motion: reduce) {
142
- .awsui_label_1edmh_14hg0_138:not(#\9) {
142
+ .awsui_label_1edmh_hud94_138:not(#\9) {
143
143
  animation: none;
144
144
  transition: none;
145
145
  }
146
146
  }
147
- .awsui-motion-disabled .awsui_label_1edmh_14hg0_138:not(#\9), .awsui-mode-entering .awsui_label_1edmh_14hg0_138:not(#\9) {
147
+ .awsui-motion-disabled .awsui_label_1edmh_hud94_138:not(#\9), .awsui-mode-entering .awsui_label_1edmh_hud94_138:not(#\9) {
148
148
  animation: none;
149
149
  transition: none;
150
150
  }
@@ -153,50 +153,68 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
153
153
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
154
154
  SPDX-License-Identifier: Apache-2.0
155
155
  */
156
- .awsui_root_1edmh_14hg0_156:not(#\9) {
156
+ .awsui_root_1edmh_hud94_156:not(#\9) {
157
157
  /* used in test-utils */
158
158
  }
159
159
 
160
- .awsui_content_1edmh_14hg0_160.awsui_content--small_1edmh_14hg0_160:not(#\9) {
160
+ .awsui_content_1edmh_hud94_160.awsui_content--small_1edmh_hud94_160:not(#\9) {
161
161
  min-height: calc(2 * (50px + var(--space-xs-zb16t3, 8px) + calc(2 * var(--line-height-body-m-30ar75, 20px))));
162
162
  }
163
- .awsui_content_1edmh_14hg0_160.awsui_content--small_1edmh_14hg0_160.awsui_content--without-labels_1edmh_14hg0_163:not(#\9) {
163
+ .awsui_content_1edmh_hud94_160.awsui_content--small_1edmh_hud94_160.awsui_content--fit-height_1edmh_hud94_163:not(#\9) {
164
+ min-height: calc(2 * (30px + calc(2 * var(--line-height-body-m-30ar75, 20px))));
165
+ }
166
+ .awsui_content_1edmh_hud94_160.awsui_content--small_1edmh_hud94_160.awsui_content--without-labels_1edmh_hud94_166:not(#\9) {
164
167
  min-height: calc(2 * (50px + var(--space-xs-zb16t3, 8px)));
165
168
  }
166
- .awsui_content_1edmh_14hg0_160.awsui_content--medium_1edmh_14hg0_166:not(#\9) {
169
+ .awsui_content_1edmh_hud94_160.awsui_content--small_1edmh_hud94_160.awsui_content--without-labels_1edmh_hud94_166.awsui_content--fit-height_1edmh_hud94_163:not(#\9) {
170
+ min-height: calc(2 * (30px));
171
+ }
172
+ .awsui_content_1edmh_hud94_160.awsui_content--medium_1edmh_hud94_172:not(#\9) {
167
173
  min-height: calc(2 * (100px + var(--space-s-34lx8l, 12px) + calc(2 * var(--line-height-body-m-30ar75, 20px))));
168
174
  }
169
- .awsui_content_1edmh_14hg0_160.awsui_content--medium_1edmh_14hg0_166.awsui_content--without-labels_1edmh_14hg0_163:not(#\9) {
175
+ .awsui_content_1edmh_hud94_160.awsui_content--medium_1edmh_hud94_172.awsui_content--fit-height_1edmh_hud94_163:not(#\9) {
176
+ min-height: calc(2 * (100px + calc(2 * var(--line-height-body-m-30ar75, 20px))));
177
+ }
178
+ .awsui_content_1edmh_hud94_160.awsui_content--medium_1edmh_hud94_172.awsui_content--without-labels_1edmh_hud94_166:not(#\9) {
170
179
  min-height: calc(2 * (100px + var(--space-s-34lx8l, 12px)));
171
180
  }
172
- .awsui_content_1edmh_14hg0_160.awsui_content--large_1edmh_14hg0_172:not(#\9) {
181
+ .awsui_content_1edmh_hud94_160.awsui_content--medium_1edmh_hud94_172.awsui_content--without-labels_1edmh_hud94_166.awsui_content--fit-height_1edmh_hud94_163:not(#\9) {
182
+ min-height: calc(2 * (100px));
183
+ }
184
+ .awsui_content_1edmh_hud94_160.awsui_content--large_1edmh_hud94_184:not(#\9) {
173
185
  min-height: calc(2 * (140px + var(--space-s-34lx8l, 12px) + calc(2 * var(--line-height-body-m-30ar75, 20px))));
174
186
  }
175
- .awsui_content_1edmh_14hg0_160.awsui_content--large_1edmh_14hg0_172.awsui_content--without-labels_1edmh_14hg0_163:not(#\9) {
187
+ .awsui_content_1edmh_hud94_160.awsui_content--large_1edmh_hud94_184.awsui_content--fit-height_1edmh_hud94_163:not(#\9) {
188
+ min-height: calc(2 * (140px + calc(2 * var(--line-height-body-m-30ar75, 20px))));
189
+ }
190
+ .awsui_content_1edmh_hud94_160.awsui_content--large_1edmh_hud94_184.awsui_content--without-labels_1edmh_hud94_166:not(#\9) {
176
191
  min-height: calc(2 * (140px + var(--space-s-34lx8l, 12px)));
177
192
  }
193
+ .awsui_content_1edmh_hud94_160.awsui_content--large_1edmh_hud94_184.awsui_content--without-labels_1edmh_hud94_166.awsui_content--fit-height_1edmh_hud94_163:not(#\9) {
194
+ min-height: calc(2 * (140px));
195
+ }
178
196
 
179
- .awsui_content--fit-height_1edmh_14hg0_179:not(#\9) {
197
+ .awsui_content--fit-height_1edmh_hud94_163:not(#\9) {
180
198
  flex: 1;
181
199
  }
182
200
 
183
- .awsui_status-container_1edmh_14hg0_183:not(#\9) {
201
+ .awsui_status-container_1edmh_hud94_201:not(#\9) {
184
202
  /* used in test utils */
185
203
  }
186
204
 
187
- .awsui_chart-container_1edmh_14hg0_187:not(#\9) {
205
+ .awsui_chart-container_1edmh_hud94_205:not(#\9) {
188
206
  display: flex;
189
207
  flex: 1;
190
208
  }
191
- .awsui_chart-container--fit-height_1edmh_14hg0_191:not(#\9) {
209
+ .awsui_chart-container--fit-height_1edmh_hud94_209:not(#\9) {
192
210
  height: 100%;
193
211
  min-height: inherit;
194
212
  }
195
213
 
196
- .awsui_chart-container-chart-plot_1edmh_14hg0_196:not(#\9) {
214
+ .awsui_chart-container-chart-plot_1edmh_hud94_214:not(#\9) {
197
215
  display: contents;
198
216
  }
199
- .awsui_chart-container-chart-plot--fit-height_1edmh_14hg0_199:not(#\9) {
217
+ .awsui_chart-container-chart-plot--fit-height_1edmh_hud94_217:not(#\9) {
200
218
  display: block;
201
219
  position: absolute;
202
220
  top: 0;
@@ -205,7 +223,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
205
223
  left: 0;
206
224
  }
207
225
 
208
- .awsui_inner-content_1edmh_14hg0_208:not(#\9) {
226
+ .awsui_inner-content_1edmh_hud94_226:not(#\9) {
209
227
  display: flex;
210
228
  position: absolute;
211
229
  flex-direction: column;
@@ -219,53 +237,53 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
219
237
  pointer-events: none;
220
238
  }
221
239
 
222
- .awsui_segment__highlight_1edmh_14hg0_222:not(#\9) {
240
+ .awsui_segment__highlight_1edmh_hud94_240:not(#\9) {
223
241
  stroke: none;
224
242
  opacity: 0;
225
243
  }
226
244
 
227
- .awsui_segment_1edmh_14hg0_97:not(#\9) {
245
+ .awsui_segment_1edmh_hud94_97:not(#\9) {
228
246
  stroke: var(--color-background-container-content-4un1ap, #ffffff);
229
247
  stroke-width: 2px;
230
248
  stroke-linejoin: round;
231
249
  opacity: 1;
232
250
  cursor: pointer;
233
251
  }
234
- .awsui_segment_1edmh_14hg0_97:not(#\9):focus {
252
+ .awsui_segment_1edmh_hud94_97:not(#\9):focus {
235
253
  outline: none;
236
254
  }
237
- .awsui_segment_1edmh_14hg0_97.awsui_segment--dimmed_1edmh_14hg0_237:not(#\9) {
255
+ .awsui_segment_1edmh_hud94_97.awsui_segment--dimmed_1edmh_hud94_255:not(#\9) {
238
256
  opacity: 0.35;
239
257
  }
240
- .awsui_segment_1edmh_14hg0_97.awsui_segment--highlighted_1edmh_14hg0_240 > .awsui_segment__highlight_1edmh_14hg0_222:not(#\9), .awsui_segment_1edmh_14hg0_97:not(#\9):hover:not(.awsui_segment--dimmed_1edmh_14hg0_237) > .awsui_segment__highlight_1edmh_14hg0_222 {
258
+ .awsui_segment_1edmh_hud94_97.awsui_segment--highlighted_1edmh_hud94_258 > .awsui_segment__highlight_1edmh_hud94_240:not(#\9), .awsui_segment_1edmh_hud94_97:not(#\9):hover:not(.awsui_segment--dimmed_1edmh_hud94_255) > .awsui_segment__highlight_1edmh_hud94_240 {
241
259
  opacity: 1;
242
260
  }
243
261
 
244
- .awsui_label_1edmh_14hg0_138:not(#\9) {
262
+ .awsui_label_1edmh_hud94_138:not(#\9) {
245
263
  color: var(--color-text-heading-default-rtslvy, #000716);
246
264
  opacity: 1;
247
265
  /* stylelint-disable-next-line selector-max-type */
248
266
  /* stylelint-disable-next-line selector-max-type */
249
267
  }
250
- .awsui_label_1edmh_14hg0_138 > line:not(#\9) {
268
+ .awsui_label_1edmh_hud94_138 > line:not(#\9) {
251
269
  stroke: var(--color-stroke-chart-line-ppq5nh, #7d8998);
252
270
  stroke-width: var(--border-divider-section-width-8a5uu9, 2px);
253
271
  }
254
- .awsui_label_1edmh_14hg0_138 > div:not(#\9) {
272
+ .awsui_label_1edmh_hud94_138 > div:not(#\9) {
255
273
  margin-top: -0.75em;
256
274
  }
257
- .awsui_label_1edmh_14hg0_138.awsui_label--dimmed_1edmh_14hg0_257:not(#\9) {
275
+ .awsui_label_1edmh_hud94_138.awsui_label--dimmed_1edmh_hud94_275:not(#\9) {
258
276
  opacity: 0.35;
259
277
  }
260
- .awsui_label_1edmh_14hg0_138.awsui_label--align-right_1edmh_14hg0_260:not(#\9) {
278
+ .awsui_label_1edmh_hud94_138.awsui_label--align-right_1edmh_hud94_278:not(#\9) {
261
279
  /* stylelint-disable-next-line selector-max-type */
262
280
  }
263
- .awsui_label_1edmh_14hg0_138.awsui_label--align-right_1edmh_14hg0_260 > div:not(#\9) {
281
+ .awsui_label_1edmh_hud94_138.awsui_label--align-right_1edmh_hud94_278 > div:not(#\9) {
264
282
  text-align: right;
265
283
  }
266
284
 
267
285
  /* stylelint-disable-next-line selector-max-type */
268
- .awsui_label-text_1edmh_14hg0_268 > text:not(#\9) {
286
+ .awsui_label-text_1edmh_hud94_286 > text:not(#\9) {
269
287
  font-size: var(--font-size-body-m-x4okxb, 14px);
270
288
  line-height: var(--line-height-body-m-30ar75, 20px);
271
289
  font-weight: var(--font-display-label-weight-815ja9, 700);
@@ -273,22 +291,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
273
291
  dominant-baseline: middle;
274
292
  }
275
293
 
276
- text.awsui_label__description_1edmh_14hg0_276:not(#\9) {
294
+ text.awsui_label__description_1edmh_hud94_294:not(#\9) {
277
295
  font-size: var(--font-chart-detail-size-1n389u, 12px);
278
296
  font-weight: 400;
279
297
  color: var(--color-text-group-label-zuh0h0, #414d5c);
280
298
  fill: var(--color-text-group-label-zuh0h0, #414d5c);
281
299
  }
282
300
 
283
- .awsui_label-line_1edmh_14hg0_283:not(#\9) {
301
+ .awsui_label-line_1edmh_hud94_301:not(#\9) {
284
302
  /* used in component code */
285
303
  }
286
304
 
287
- .awsui_label--highlighted_1edmh_14hg0_287:not(#\9) {
305
+ .awsui_label--highlighted_1edmh_hud94_305:not(#\9) {
288
306
  /* used in test-utils */
289
307
  }
290
308
 
291
- .awsui_popover-header_1edmh_14hg0_291:not(#\9) {
309
+ .awsui_popover-header_1edmh_hud94_309:not(#\9) {
292
310
  display: inline-flex;
293
311
  align-items: flex-start;
294
312
  }
@@ -2,32 +2,32 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "segment__path": "awsui_segment__path_1edmh_14hg0_97",
6
- "segment": "awsui_segment_1edmh_14hg0_97",
7
- "segment__hover": "awsui_segment__hover_1edmh_14hg0_124",
8
- "label": "awsui_label_1edmh_14hg0_138",
9
- "root": "awsui_root_1edmh_14hg0_156",
10
- "content": "awsui_content_1edmh_14hg0_160",
11
- "content--small": "awsui_content--small_1edmh_14hg0_160",
12
- "content--without-labels": "awsui_content--without-labels_1edmh_14hg0_163",
13
- "content--medium": "awsui_content--medium_1edmh_14hg0_166",
14
- "content--large": "awsui_content--large_1edmh_14hg0_172",
15
- "content--fit-height": "awsui_content--fit-height_1edmh_14hg0_179",
16
- "status-container": "awsui_status-container_1edmh_14hg0_183",
17
- "chart-container": "awsui_chart-container_1edmh_14hg0_187",
18
- "chart-container--fit-height": "awsui_chart-container--fit-height_1edmh_14hg0_191",
19
- "chart-container-chart-plot": "awsui_chart-container-chart-plot_1edmh_14hg0_196",
20
- "chart-container-chart-plot--fit-height": "awsui_chart-container-chart-plot--fit-height_1edmh_14hg0_199",
21
- "inner-content": "awsui_inner-content_1edmh_14hg0_208",
22
- "segment__highlight": "awsui_segment__highlight_1edmh_14hg0_222",
23
- "segment--dimmed": "awsui_segment--dimmed_1edmh_14hg0_237",
24
- "segment--highlighted": "awsui_segment--highlighted_1edmh_14hg0_240",
25
- "label--dimmed": "awsui_label--dimmed_1edmh_14hg0_257",
26
- "label--align-right": "awsui_label--align-right_1edmh_14hg0_260",
27
- "label-text": "awsui_label-text_1edmh_14hg0_268",
28
- "label__description": "awsui_label__description_1edmh_14hg0_276",
29
- "label-line": "awsui_label-line_1edmh_14hg0_283",
30
- "label--highlighted": "awsui_label--highlighted_1edmh_14hg0_287",
31
- "popover-header": "awsui_popover-header_1edmh_14hg0_291"
5
+ "segment__path": "awsui_segment__path_1edmh_hud94_97",
6
+ "segment": "awsui_segment_1edmh_hud94_97",
7
+ "segment__hover": "awsui_segment__hover_1edmh_hud94_124",
8
+ "label": "awsui_label_1edmh_hud94_138",
9
+ "root": "awsui_root_1edmh_hud94_156",
10
+ "content": "awsui_content_1edmh_hud94_160",
11
+ "content--small": "awsui_content--small_1edmh_hud94_160",
12
+ "content--fit-height": "awsui_content--fit-height_1edmh_hud94_163",
13
+ "content--without-labels": "awsui_content--without-labels_1edmh_hud94_166",
14
+ "content--medium": "awsui_content--medium_1edmh_hud94_172",
15
+ "content--large": "awsui_content--large_1edmh_hud94_184",
16
+ "status-container": "awsui_status-container_1edmh_hud94_201",
17
+ "chart-container": "awsui_chart-container_1edmh_hud94_205",
18
+ "chart-container--fit-height": "awsui_chart-container--fit-height_1edmh_hud94_209",
19
+ "chart-container-chart-plot": "awsui_chart-container-chart-plot_1edmh_hud94_214",
20
+ "chart-container-chart-plot--fit-height": "awsui_chart-container-chart-plot--fit-height_1edmh_hud94_217",
21
+ "inner-content": "awsui_inner-content_1edmh_hud94_226",
22
+ "segment__highlight": "awsui_segment__highlight_1edmh_hud94_240",
23
+ "segment--dimmed": "awsui_segment--dimmed_1edmh_hud94_255",
24
+ "segment--highlighted": "awsui_segment--highlighted_1edmh_hud94_258",
25
+ "label--dimmed": "awsui_label--dimmed_1edmh_hud94_275",
26
+ "label--align-right": "awsui_label--align-right_1edmh_hud94_278",
27
+ "label-text": "awsui_label-text_1edmh_hud94_286",
28
+ "label__description": "awsui_label__description_1edmh_hud94_294",
29
+ "label-line": "awsui_label-line_1edmh_hud94_301",
30
+ "label--highlighted": "awsui_label--highlighted_1edmh_hud94_305",
31
+ "popover-header": "awsui_popover-header_1edmh_hud94_309"
32
32
  };
33
33
 
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"lib/default/","sources":["pie-chart/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAA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MA2B1F,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import styles from './styles.css.js';
2
+ const minRadius = 30;
2
3
  const paddingLabels = 44; // = 2 * (size-lineHeight-body-100)
3
4
  const defaultPadding = 12; // = space-s
4
5
  const smallPadding = 8; // = space-xs
@@ -52,7 +53,7 @@ export function getDimensionsBySize({ size, hasLabels, visualRefresh, }) {
52
53
  const padding = sizeSpec[matchedSize].padding;
53
54
  const paddingLabels = hasLabels ? sizeSpec[matchedSize].paddingLabels : 0;
54
55
  const radiiRatio = sizeSpec[matchedSize].outerRadius / sizeSpec[matchedSize].innerRadius;
55
- const outerRadius = (size - 2 * paddingLabels - 2 * padding) / 2;
56
+ const outerRadius = Math.max(minRadius, (size - 2 * paddingLabels - 2 * padding) / 2);
56
57
  const innerRadius = outerRadius / radiiRatio;
57
58
  return Object.assign(Object.assign({}, sizeSpec[matchedSize]), { outerRadius, innerRadius, size: matchedSize });
58
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"lib/default/","sources":["pie-chart/utils.ts"],"names":[],"mappings":"AAIA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAWrC,MAAM,aAAa,GAAG,EAAE,CAAC,CAAC,mCAAmC;AAC7D,MAAM,cAAc,GAAG,EAAE,CAAC,CAAC,YAAY;AACvC,MAAM,YAAY,GAAG,CAAC,CAAC,CAAC,aAAa;AACrC,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;AAEvD,MAAM,CAAC,MAAM,gBAAgB,GAA0D;IACrF,KAAK,EAAE;QACL,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,EAAE;QACf,iBAAiB,EAAE,YAAY;QAC/B,OAAO,EAAE,YAAY;QACrB,aAAa;KACd;IACD,MAAM,EAAE;QACN,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,GAAG;QAChB,iBAAiB,EAAE,cAAc;QACjC,OAAO,EAAE,cAAc;QACvB,aAAa;KACd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AAc,GAAG,CAAC,EAAE;QAC9C,OAAO,CAAC,CAAC;KACV;IACD,IAAI,gBAAgB,GAAG,IAAI,CAAC,EAAE,IAAI,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE;QAC1D,OAAO,IAAI,CAAC,EAAE,CAAC;KAChB;IAED,MAAM,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAClC,cAAc,EACd,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,cAAc,CAAC,EAClC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,cAAc,CAC7B,CAAC;IACF,MAAM,qBAAqB,GAAG,IAAI,CAAC,GAAG,CACpC,gBAAgB,EAChB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAAC,EACpC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAC/B,CAAC;IACF,IAAI,mBAAmB,GAAG,qBAAqB,EAAE;QAC/C,OAAO,cAAc,CAAC;KACvB;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ComponentFormatFunction } from '../i18n/context';\nimport { PieChartProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport interface Dimension {\n innerRadius: number;\n outerRadius: number;\n padding: number;\n paddingLabels: number;\n innerLabelPadding: number;\n cornerRadius?: number;\n}\n\nconst paddingLabels = 44; // = 2 * (size-lineHeight-body-100)\nconst defaultPadding = 12; // = space-s\nconst smallPadding = 8; // = space-xs\nexport const minLabelLineAngularPadding = Math.PI / 20;\n\nexport const dimensionsBySize: Record<NonNullable<PieChartProps['size']>, Dimension> = {\n small: {\n innerRadius: 33,\n outerRadius: 50,\n innerLabelPadding: smallPadding,\n padding: smallPadding,\n paddingLabels,\n },\n medium: {\n innerRadius: 66,\n outerRadius: 100,\n innerLabelPadding: defaultPadding,\n padding: defaultPadding,\n paddingLabels,\n },\n large: {\n innerRadius: 93,\n outerRadius: 140,\n innerLabelPadding: defaultPadding,\n padding: defaultPadding,\n paddingLabels,\n },\n};\n\nexport const refreshDimensionsBySize: Record<NonNullable<PieChartProps['size']>, Dimension> = {\n small: {\n ...dimensionsBySize.small,\n innerRadius: 38,\n cornerRadius: 3,\n },\n medium: {\n ...dimensionsBySize.medium,\n innerRadius: 75,\n cornerRadius: 4,\n },\n large: {\n ...dimensionsBySize.large,\n innerRadius: 105,\n cornerRadius: 5,\n },\n};\n\n/**\n * When `size` is a string (\"small\", \"medium\" or \"large\") the predefined pie chart element dimensions for classic and visual refresh are used.\n * When `size` is a number the outer and inner radii are computed and the rest of the dimensions are taken from the closest predefined size.\n */\nexport function getDimensionsBySize({\n size,\n hasLabels,\n visualRefresh,\n}: {\n size: NonNullable<PieChartProps['size']> | number;\n hasLabels: boolean;\n visualRefresh?: boolean;\n}): Dimension & { size: NonNullable<PieChartProps['size']> } {\n if (typeof size === 'string') {\n const dimensions = visualRefresh ? refreshDimensionsBySize[size] : dimensionsBySize[size];\n return { ...dimensions, size };\n }\n const sizeSpec = visualRefresh ? refreshDimensionsBySize : dimensionsBySize;\n const getPixelSize = (d: Dimension) => d.outerRadius * 2 + d.padding * 2 + (hasLabels ? d.paddingLabels : 0) * 2;\n\n let matchedSize: NonNullable<PieChartProps['size']> = 'small';\n if (size > getPixelSize(sizeSpec.medium)) {\n matchedSize = 'medium';\n }\n if (size > getPixelSize(sizeSpec.large)) {\n matchedSize = 'large';\n }\n\n const padding = sizeSpec[matchedSize].padding;\n const paddingLabels = hasLabels ? sizeSpec[matchedSize].paddingLabels : 0;\n const radiiRatio = sizeSpec[matchedSize].outerRadius / sizeSpec[matchedSize].innerRadius;\n const outerRadius = (size - 2 * paddingLabels - 2 * padding) / 2;\n const innerRadius = outerRadius / radiiRatio;\n\n return { ...sizeSpec[matchedSize], outerRadius, innerRadius, size: matchedSize };\n}\n\nexport const defaultDetails =\n (i18n: ComponentFormatFunction<'pie-chart'>, i18nStrings: PieChartProps.I18nStrings) =>\n (datum: PieChartProps.Datum, dataSum: number) =>\n [\n { key: i18n('i18nStrings.detailsValue', i18nStrings.detailsValue) || '', value: datum.value },\n {\n key: i18n('i18nStrings.detailsPercentage', i18nStrings.detailsPercentage) || '',\n value: `${((datum.value * 100) / dataSum).toFixed(0)}%`,\n },\n ];\n\n/**\n * Adjusts the position of the given label nodes to avoid visual overlapping.\n * @param nodes List of label nodes of the entire chart (both left and right side)\n * @param markers Markers array that was calculated in <Labels>, but we just need the `endY` values\n * @param leftSide Boolean flag whether we are processing the left or right side of the chart labels\n */\nexport const balanceLabelNodes = (\n nodes: NodeListOf<SVGGElement>,\n markers: Array<{ endY: number; endX: number }>,\n leftSide: boolean,\n radius: number\n) => {\n const MARGIN = 10;\n\n let previousBBox: { x: number; y: number; height: number } | null = null;\n\n // When traversing the right side of labels, we start at the beginning of the array and go forwards.\n // For the left side, we need to traverse backwards from the end, so that overlapping nodes are pushed down in the right order.\n let i = leftSide ? nodes.length - 1 : 0;\n\n while ((leftSide && i >= 0) || (!leftSide && i < nodes.length)) {\n const node = nodes[i];\n\n // Currently using dataset attributes to determine the base position.\n // This implementation can be changed back to using `getBBox` when we drop IE11 support.\n // Unfortunately, there is no good alternative for `getBBox` that is supported by IE11.\n // `getBoundingClientRect` works for width and height calculations in SVG, but the x/y positions are inaccurate.\n const x = parseFloat(node.getAttribute('data-x') || '0');\n const y = parseFloat(node.getAttribute('data-y') || '0');\n const box = {\n x,\n y,\n height: node.getBoundingClientRect().height,\n };\n\n const marker = markers[i];\n\n if (leftSide) {\n i--;\n } else {\n i++;\n }\n\n if (!previousBBox) {\n previousBBox = box;\n node.setAttribute('transform', '');\n continue;\n }\n\n if ((!leftSide && box.x < 0) || (leftSide && box.x >= 0)) {\n // We have reached a label that is on the other side of the chart, so we're done.\n break;\n }\n\n node.setAttribute('transform', '');\n\n // Calculate how much the current node is overlapping with the previous one.\n const yOffset = previousBBox.y + previousBBox.height + MARGIN - box.y;\n\n if (yOffset > 0) {\n const xOffset = computeXOffset(box, yOffset, radius) * (leftSide ? -1 : 1);\n // Move the label down.\n node.setAttribute('transform', `translate(${xOffset} ${yOffset})`);\n\n // Adjust the attached line accordingly.\n const lineNode = node.parentNode?.querySelector(`.${styles['label-line']}`);\n if (lineNode) {\n const { endY, endX } = marker;\n lineNode.setAttribute('y2', '' + (endY + yOffset));\n lineNode.setAttribute('x2', '' + (endX + xOffset));\n }\n\n // Update the position accordingly to inform the next label\n box.y += yOffset;\n box.x += xOffset;\n }\n\n previousBBox = box;\n }\n};\n\nconst squareDistance = (edge: [number, number]): number => Math.pow(edge[0], 2) + Math.pow(edge[1], 2);\n\nconst computeXOffset = (box: { x: number; y: number; height: number }, yOffset: number, radius: number): number => {\n const upperEdge: [number, number] = [box.x, box.y + yOffset];\n const lowerEdge: [number, number] = [box.x, box.y + box.height + yOffset];\n const closestEdge = squareDistance(upperEdge) < squareDistance(lowerEdge) ? upperEdge : lowerEdge;\n\n if (squareDistance(closestEdge) < Math.pow(radius, 2)) {\n return Math.sqrt(Math.pow(radius, 2) - Math.pow(closestEdge[1], 2)) - Math.abs(closestEdge[0]);\n }\n return 0;\n};\n\nexport const computeSmartAngle = (startAngle: number, endAngle: number, optimize = false): number => {\n if (!optimize || endAngle - startAngle < 2 * minLabelLineAngularPadding) {\n return (endAngle + startAngle) / 2;\n }\n const paddedStartAngle = startAngle + minLabelLineAngularPadding;\n const paddedEndAngle = endAngle - minLabelLineAngularPadding;\n if (paddedStartAngle < 0 && paddedEndAngle > 0) {\n return 0;\n }\n if (paddedStartAngle < Math.PI && paddedEndAngle > Math.PI) {\n return Math.PI;\n }\n\n const endAngleMinDistance = Math.min(\n paddedEndAngle,\n Math.abs(Math.PI - paddedEndAngle),\n 2 * Math.PI - paddedEndAngle\n );\n const startAngleMinDistance = Math.min(\n paddedStartAngle,\n Math.abs(Math.PI - paddedStartAngle),\n 2 * Math.PI - paddedStartAngle\n );\n if (endAngleMinDistance < startAngleMinDistance) {\n return paddedEndAngle;\n }\n return paddedStartAngle;\n};\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"lib/default/","sources":["pie-chart/utils.ts"],"names":[],"mappings":"AAIA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAWrC,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,aAAa,GAAG,EAAE,CAAC,CAAC,mCAAmC;AAC7D,MAAM,cAAc,GAAG,EAAE,CAAC,CAAC,YAAY;AACvC,MAAM,YAAY,GAAG,CAAC,CAAC,CAAC,aAAa;AACrC,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;AAEvD,MAAM,CAAC,MAAM,gBAAgB,GAA0D;IACrF,KAAK,EAAE;QACL,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,EAAE;QACf,iBAAiB,EAAE,YAAY;QAC/B,OAAO,EAAE,YAAY;QACrB,aAAa;KACd;IACD,MAAM,EAAE;QACN,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,GAAG;QAChB,iBAAiB,EAAE,cAAc;QACjC,OAAO,EAAE,cAAc;QACvB,aAAa;KACd;IACD,KAAK,EAAE;QACL,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,GAAG;QAChB,iBAAiB,EAAE,cAAc;QACjC,OAAO,EAAE,cAAc;QACvB,aAAa;KACd;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAA0D;IAC5F,KAAK,kCACA,gBAAgB,CAAC,KAAK,KACzB,WAAW,EAAE,EAAE,EACf,YAAY,EAAE,CAAC,GAChB;IACD,MAAM,kCACD,gBAAgB,CAAC,MAAM,KAC1B,WAAW,EAAE,EAAE,EACf,YAAY,EAAE,CAAC,GAChB;IACD,KAAK,kCACA,gBAAgB,CAAC,KAAK,KACzB,WAAW,EAAE,GAAG,EAChB,YAAY,EAAE,CAAC,GAChB;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,U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AAI,CAAC,EAAE,GAAG,gBAAgB,CAAC,EACpC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,gBAAgB,CAC/B,CAAC;IACF,IAAI,mBAAmB,GAAG,qBAAqB,EAAE;QAC/C,OAAO,cAAc,CAAC;KACvB;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ComponentFormatFunction } from '../i18n/context';\nimport { PieChartProps } from './interfaces';\nimport styles from './styles.css.js';\n\nexport interface Dimension {\n innerRadius: number;\n outerRadius: number;\n padding: number;\n paddingLabels: number;\n innerLabelPadding: number;\n cornerRadius?: number;\n}\n\nconst minRadius = 30;\nconst paddingLabels = 44; // = 2 * (size-lineHeight-body-100)\nconst defaultPadding = 12; // = space-s\nconst smallPadding = 8; // = space-xs\nexport const minLabelLineAngularPadding = Math.PI / 20;\n\nexport const dimensionsBySize: Record<NonNullable<PieChartProps['size']>, Dimension> = {\n small: {\n innerRadius: 33,\n outerRadius: 50,\n innerLabelPadding: smallPadding,\n padding: smallPadding,\n paddingLabels,\n },\n medium: {\n innerRadius: 66,\n outerRadius: 100,\n innerLabelPadding: defaultPadding,\n padding: defaultPadding,\n paddingLabels,\n },\n large: {\n innerRadius: 93,\n outerRadius: 140,\n innerLabelPadding: defaultPadding,\n padding: defaultPadding,\n paddingLabels,\n },\n};\n\nexport const refreshDimensionsBySize: Record<NonNullable<PieChartProps['size']>, Dimension> = {\n small: {\n ...dimensionsBySize.small,\n innerRadius: 38,\n cornerRadius: 3,\n },\n medium: {\n ...dimensionsBySize.medium,\n innerRadius: 75,\n cornerRadius: 4,\n },\n large: {\n ...dimensionsBySize.large,\n innerRadius: 105,\n cornerRadius: 5,\n },\n};\n\n/**\n * When `size` is a string (\"small\", \"medium\" or \"large\") the predefined pie chart element dimensions for classic and visual refresh are used.\n * When `size` is a number the outer and inner radii are computed and the rest of the dimensions are taken from the closest predefined size.\n */\nexport function getDimensionsBySize({\n size,\n hasLabels,\n visualRefresh,\n}: {\n size: NonNullable<PieChartProps['size']> | number;\n hasLabels: boolean;\n visualRefresh?: boolean;\n}): Dimension & { size: NonNullable<PieChartProps['size']> } {\n if (typeof size === 'string') {\n const dimensions = visualRefresh ? refreshDimensionsBySize[size] : dimensionsBySize[size];\n return { ...dimensions, size };\n }\n const sizeSpec = visualRefresh ? refreshDimensionsBySize : dimensionsBySize;\n const getPixelSize = (d: Dimension) => d.outerRadius * 2 + d.padding * 2 + (hasLabels ? d.paddingLabels : 0) * 2;\n\n let matchedSize: NonNullable<PieChartProps['size']> = 'small';\n if (size > getPixelSize(sizeSpec.medium)) {\n matchedSize = 'medium';\n }\n if (size > getPixelSize(sizeSpec.large)) {\n matchedSize = 'large';\n }\n\n const padding = sizeSpec[matchedSize].padding;\n const paddingLabels = hasLabels ? sizeSpec[matchedSize].paddingLabels : 0;\n const radiiRatio = sizeSpec[matchedSize].outerRadius / sizeSpec[matchedSize].innerRadius;\n const outerRadius = Math.max(minRadius, (size - 2 * paddingLabels - 2 * padding) / 2);\n const innerRadius = outerRadius / radiiRatio;\n\n return { ...sizeSpec[matchedSize], outerRadius, innerRadius, size: matchedSize };\n}\n\nexport const defaultDetails =\n (i18n: ComponentFormatFunction<'pie-chart'>, i18nStrings: PieChartProps.I18nStrings) =>\n (datum: PieChartProps.Datum, dataSum: number) =>\n [\n { key: i18n('i18nStrings.detailsValue', i18nStrings.detailsValue) || '', value: datum.value },\n {\n key: i18n('i18nStrings.detailsPercentage', i18nStrings.detailsPercentage) || '',\n value: `${((datum.value * 100) / dataSum).toFixed(0)}%`,\n },\n ];\n\n/**\n * Adjusts the position of the given label nodes to avoid visual overlapping.\n * @param nodes List of label nodes of the entire chart (both left and right side)\n * @param markers Markers array that was calculated in <Labels>, but we just need the `endY` values\n * @param leftSide Boolean flag whether we are processing the left or right side of the chart labels\n */\nexport const balanceLabelNodes = (\n nodes: NodeListOf<SVGGElement>,\n markers: Array<{ endY: number; endX: number }>,\n leftSide: boolean,\n radius: number\n) => {\n const MARGIN = 10;\n\n let previousBBox: { x: number; y: number; height: number } | null = null;\n\n // When traversing the right side of labels, we start at the beginning of the array and go forwards.\n // For the left side, we need to traverse backwards from the end, so that overlapping nodes are pushed down in the right order.\n let i = leftSide ? nodes.length - 1 : 0;\n\n while ((leftSide && i >= 0) || (!leftSide && i < nodes.length)) {\n const node = nodes[i];\n\n // Currently using dataset attributes to determine the base position.\n // This implementation can be changed back to using `getBBox` when we drop IE11 support.\n // Unfortunately, there is no good alternative for `getBBox` that is supported by IE11.\n // `getBoundingClientRect` works for width and height calculations in SVG, but the x/y positions are inaccurate.\n const x = parseFloat(node.getAttribute('data-x') || '0');\n const y = parseFloat(node.getAttribute('data-y') || '0');\n const box = {\n x,\n y,\n height: node.getBoundingClientRect().height,\n };\n\n const marker = markers[i];\n\n if (leftSide) {\n i--;\n } else {\n i++;\n }\n\n if (!previousBBox) {\n previousBBox = box;\n node.setAttribute('transform', '');\n continue;\n }\n\n if ((!leftSide && box.x < 0) || (leftSide && box.x >= 0)) {\n // We have reached a label that is on the other side of the chart, so we're done.\n break;\n }\n\n node.setAttribute('transform', '');\n\n // Calculate how much the current node is overlapping with the previous one.\n const yOffset = previousBBox.y + previousBBox.height + MARGIN - box.y;\n\n if (yOffset > 0) {\n const xOffset = computeXOffset(box, yOffset, radius) * (leftSide ? -1 : 1);\n // Move the label down.\n node.setAttribute('transform', `translate(${xOffset} ${yOffset})`);\n\n // Adjust the attached line accordingly.\n const lineNode = node.parentNode?.querySelector(`.${styles['label-line']}`);\n if (lineNode) {\n const { endY, endX } = marker;\n lineNode.setAttribute('y2', '' + (endY + yOffset));\n lineNode.setAttribute('x2', '' + (endX + xOffset));\n }\n\n // Update the position accordingly to inform the next label\n box.y += yOffset;\n box.x += xOffset;\n }\n\n previousBBox = box;\n }\n};\n\nconst squareDistance = (edge: [number, number]): number => Math.pow(edge[0], 2) + Math.pow(edge[1], 2);\n\nconst computeXOffset = (box: { x: number; y: number; height: number }, yOffset: number, radius: number): number => {\n const upperEdge: [number, number] = [box.x, box.y + yOffset];\n const lowerEdge: [number, number] = [box.x, box.y + box.height + yOffset];\n const closestEdge = squareDistance(upperEdge) < squareDistance(lowerEdge) ? upperEdge : lowerEdge;\n\n if (squareDistance(closestEdge) < Math.pow(radius, 2)) {\n return Math.sqrt(Math.pow(radius, 2) - Math.pow(closestEdge[1], 2)) - Math.abs(closestEdge[0]);\n }\n return 0;\n};\n\nexport const computeSmartAngle = (startAngle: number, endAngle: number, optimize = false): number => {\n if (!optimize || endAngle - startAngle < 2 * minLabelLineAngularPadding) {\n return (endAngle + startAngle) / 2;\n }\n const paddedStartAngle = startAngle + minLabelLineAngularPadding;\n const paddedEndAngle = endAngle - minLabelLineAngularPadding;\n if (paddedStartAngle < 0 && paddedEndAngle > 0) {\n return 0;\n }\n if (paddedStartAngle < Math.PI && paddedEndAngle > Math.PI) {\n return Math.PI;\n }\n\n const endAngleMinDistance = Math.min(\n paddedEndAngle,\n Math.abs(Math.PI - paddedEndAngle),\n 2 * Math.PI - paddedEndAngle\n );\n const startAngleMinDistance = Math.min(\n paddedStartAngle,\n Math.abs(Math.PI - paddedStartAngle),\n 2 * Math.PI - paddedStartAngle\n );\n if (endAngleMinDistance < startAngleMinDistance) {\n return paddedEndAngle;\n }\n return paddedStartAngle;\n};\n"]}
@@ -6,7 +6,7 @@ export declare function matchTokenValue(token: Token, filteringOptions: readonly
6
6
  export declare function getPropertyByKey(filteringProperties: readonly InternalFilteringProperty[], key: string): InternalFilteringProperty<any> | undefined;
7
7
  export declare function getFormattedToken(filteringProperties: readonly InternalFilteringProperty[], token: Token): {
8
8
  property: string | undefined;
9
- operator: import("@cloudscape-design/collection-hooks").PropertyFilterOperator;
9
+ operator: string;
10
10
  value: any;
11
11
  label: string;
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"side.d.ts","sourceRoot":"lib/default/","sources":["split-panel/side.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAItD,UAAU,0BAA2B,SAAQ,sBAAsB;IACjE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;CAC7C;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,aAAa,EACb,SAAS,EACT,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,QAAQ,GACT,EAAE,0BAA0B,eAgD5B"}
1
+ {"version":3,"file":"side.d.ts","sourceRoot":"lib/default/","sources":["split-panel/side.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAItD,UAAU,0BAA2B,SAAQ,sBAAsB;IACjE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;CAC7C;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,aAAa,EACb,SAAS,EACT,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,QAAQ,GACT,EAAE,0BAA0B,eA+C5B"}
@@ -24,7 +24,6 @@ export function SplitPanelContentSide({ baseProps, splitPanelRef, toggleRef, hea
24
24
  isOpen ? (React.createElement("div", { className: styles['slider-wrapper-side'] }, resizeHandle)) : (React.createElement(InternalButton, { className: clsx(styles['open-button'], styles['open-button-side']), iconName: "angle-left", variant: "icon", formAction: "none", ariaLabel: openButtonAriaLabel, ariaExpanded: isOpen, ref: isRefresh ? null : toggleRef })),
25
25
  React.createElement("div", { className: styles['content-side'], "aria-hidden": !isOpen },
26
26
  React.createElement("div", { className: clsx(styles['pane-header-wrapper-side']) }, header),
27
- React.createElement("hr", { className: styles['header-divider'] }),
28
27
  React.createElement("div", { className: clsx(styles['pane-content-wrapper-side']) }, children)))));
29
28
  }
30
29
  //# sourceMappingURL=side.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"side.js","sourceRoot":"lib/default/","sources":["split-panel/side.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAO/E,MAAM,UAAU,qBAAqB,CAAC,EACpC,SAAS,EACT,aAAa,EACb,SAAS,EACT,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,QAAQ,GACmB;IAC3B,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC3D,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,CACL,6CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE;YACxF,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,MAAM;SACnC,CAAC,EACF,KAAK,EAAE;YACL,KAAK,EAAE,MAAM,IAAI,SAAS,CAAC,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,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport { ButtonProps } from '../button/interfaces';\nimport InternalButton from '../button/internal';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { SplitPanelContentProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\n\ninterface SplitPanelContentSideProps extends SplitPanelContentProps {\n openButtonAriaLabel?: string;\n toggleRef: React.RefObject<ButtonProps.Ref>;\n}\n\nexport function SplitPanelContentSide({\n baseProps,\n splitPanelRef,\n toggleRef,\n header,\n children,\n resizeHandle,\n isOpen,\n cappedSize,\n openButtonAriaLabel,\n panelHeaderId,\n onToggle,\n}: SplitPanelContentSideProps) {\n const { topOffset, bottomOffset } = useSplitPanelContext();\n const isRefresh = useVisualRefresh();\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.drawer, styles.root, styles['position-side'], {\n [styles['drawer-closed']]: !isOpen,\n })}\n style={{\n width: isOpen && isRefresh ? cappedSize : undefined,\n maxWidth: isRefresh ? '100%' : undefined,\n }}\n ref={splitPanelRef}\n >\n <div\n className={clsx(styles['drawer-content-side'], {\n [styles.refresh]: isRefresh,\n })}\n style={{\n top: topOffset,\n bottom: bottomOffset,\n }}\n onClick={() => !isOpen && onToggle()}\n aria-labelledby={panelHeaderId}\n role=\"region\"\n >\n {isOpen ? (\n <div className={styles['slider-wrapper-side']}>{resizeHandle}</div>\n ) : (\n <InternalButton\n className={clsx(styles['open-button'], styles['open-button-side'])}\n iconName=\"angle-left\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={openButtonAriaLabel}\n ariaExpanded={isOpen}\n ref={isRefresh ? null : toggleRef}\n />\n )}\n <div className={styles['content-side']} aria-hidden={!isOpen}>\n <div className={clsx(styles['pane-header-wrapper-side'])}>{header}</div>\n <hr className={styles['header-divider']} />\n <div className={clsx(styles['pane-content-wrapper-side'])}>{children}</div>\n </div>\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"side.js","sourceRoot":"lib/default/","sources":["split-panel/side.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAO/E,MAAM,UAAU,qBAAqB,CAAC,EACpC,SAAS,EACT,aAAa,EACb,SAAS,EACT,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,QAAQ,GACmB;IAC3B,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC3D,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,CACL,6CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE;YACxF,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,MAAM;SACnC,CAAC,EACF,KAAK,EAAE;YACL,KAAK,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;YACnD,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;SACzC,EACD,GAAG,EAAE,aAAa;QAElB,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,EAAE;gBAC7C,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS;aAC5B,CAAC,EACF,KAAK,EAAE;gBACL,GAAG,EAAE,SAAS;gBACd,MAAM,EAAE,YAAY;aACrB,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,IAAI,QAAQ,EAAE,qBACnB,aAAa,EAC9B,IAAI,EAAC,QAAQ;YAEZ,MAAM,CAAC,CAAC,CAAC,CACR,6BAAK,SAAS,EAAE,MAAM,CAAC,qBAAqB,CAAC,IAAG,YAAY,CAAO,CACpE,CAAC,CAAC,CAAC,CACF,oBAAC,cAAc,IACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC,EAClE,QAAQ,EAAC,YAAY,EACrB,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,mBAAmB,EAC9B,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,GACjC,CACH;YACD,6BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,iBAAe,CAAC,MAAM;gBAC1D,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,IAAG,MAAM,CAAO;gBACxE,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,IAAG,QAAQ,CAAO,CACvE,CACF,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\nimport { ButtonProps } from '../button/interfaces';\nimport InternalButton from '../button/internal';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { SplitPanelContentProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { useSplitPanelContext } from '../internal/context/split-panel-context';\n\ninterface SplitPanelContentSideProps extends SplitPanelContentProps {\n openButtonAriaLabel?: string;\n toggleRef: React.RefObject<ButtonProps.Ref>;\n}\n\nexport function SplitPanelContentSide({\n baseProps,\n splitPanelRef,\n toggleRef,\n header,\n children,\n resizeHandle,\n isOpen,\n cappedSize,\n openButtonAriaLabel,\n panelHeaderId,\n onToggle,\n}: SplitPanelContentSideProps) {\n const { topOffset, bottomOffset } = useSplitPanelContext();\n const isRefresh = useVisualRefresh();\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.drawer, styles.root, styles['position-side'], {\n [styles['drawer-closed']]: !isOpen,\n })}\n style={{\n width: isOpen && isRefresh ? cappedSize : undefined,\n maxWidth: isRefresh ? '100%' : undefined,\n }}\n ref={splitPanelRef}\n >\n <div\n className={clsx(styles['drawer-content-side'], {\n [styles.refresh]: isRefresh,\n })}\n style={{\n top: topOffset,\n bottom: bottomOffset,\n }}\n onClick={() => !isOpen && onToggle()}\n aria-labelledby={panelHeaderId}\n role=\"region\"\n >\n {isOpen ? (\n <div className={styles['slider-wrapper-side']}>{resizeHandle}</div>\n ) : (\n <InternalButton\n className={clsx(styles['open-button'], styles['open-button-side'])}\n iconName=\"angle-left\"\n variant=\"icon\"\n formAction=\"none\"\n ariaLabel={openButtonAriaLabel}\n ariaExpanded={isOpen}\n ref={isRefresh ? null : toggleRef}\n />\n )}\n <div className={styles['content-side']} aria-hidden={!isOpen}>\n <div className={clsx(styles['pane-header-wrapper-side'])}>{header}</div>\n <div className={clsx(styles['pane-content-wrapper-side'])}>{children}</div>\n </div>\n </div>\n </div>\n );\n}\n"]}