@cloudscape-design/components 3.0.353 → 3.0.354
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/alert/internal.d.ts.map +1 -1
- package/alert/internal.js +15 -13
- package/alert/internal.js.map +1 -1
- package/attribute-editor/styles.css.js +14 -14
- package/attribute-editor/styles.scoped.css +28 -29
- package/attribute-editor/styles.selectors.js +14 -14
- package/breadcrumb-group/item/styles.css.js +9 -9
- package/breadcrumb-group/item/styles.scoped.css +19 -19
- package/breadcrumb-group/item/styles.selectors.js +9 -9
- package/cards/index.d.ts.map +1 -1
- package/cards/index.js +9 -7
- package/cards/index.js.map +1 -1
- package/help-panel/index.d.ts.map +1 -1
- package/help-panel/index.js +3 -1
- package/help-panel/index.js.map +1 -1
- package/help-panel/styles.css.js +4 -4
- package/help-panel/styles.scoped.css +67 -68
- package/help-panel/styles.selectors.js +4 -4
- package/internal/base-component/styles.scoped.css +0 -8
- package/internal/context/link-default-variant-context.d.ts +6 -0
- package/internal/context/link-default-variant-context.d.ts.map +1 -0
- package/internal/context/link-default-variant-context.js +7 -0
- package/internal/context/link-default-variant-context.js.map +1 -0
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/theming/index.cjs +0 -40
- package/internal/generated/theming/index.js +0 -40
- package/internal/manifest.json +1 -1
- package/link/index.d.ts.map +1 -1
- package/link/index.js +2 -2
- package/link/index.js.map +1 -1
- package/link/interfaces.d.ts +7 -0
- package/link/interfaces.d.ts.map +1 -1
- package/link/interfaces.js.map +1 -1
- package/link/internal.d.ts.map +1 -1
- package/link/internal.js +4 -1
- package/link/internal.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +79 -78
- package/link/styles.selectors.js +20 -20
- package/package.json +1 -1
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +3 -1
- package/popover/internal.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +58 -56
- package/table/internal.js.map +1 -1
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +68 -70
- package/text-content/styles.selectors.js +1 -1
- package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js +1 -1
- package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js +1 -1
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/wizard/wizard-navigation.js +1 -1
- package/wizard/wizard-navigation.js.map +1 -1
package/link/styles.scoped.css
CHANGED
|
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_link_4c84z_r9eng_93:not(#\9) {
|
|
94
94
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
95
95
|
border-collapse: separate;
|
|
96
96
|
border-spacing: 0;
|
|
@@ -141,31 +141,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
141
141
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
142
142
|
}
|
|
143
143
|
@media (prefers-reduced-motion: reduce) {
|
|
144
|
-
.
|
|
144
|
+
.awsui_link_4c84z_r9eng_93:not(#\9) {
|
|
145
145
|
animation: none;
|
|
146
146
|
transition: none;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
.awsui-motion-disabled .
|
|
149
|
+
.awsui-motion-disabled .awsui_link_4c84z_r9eng_93:not(#\9), .awsui-mode-entering .awsui_link_4c84z_r9eng_93:not(#\9) {
|
|
150
150
|
animation: none;
|
|
151
151
|
transition: none;
|
|
152
152
|
}
|
|
153
|
-
.
|
|
153
|
+
.awsui_link_4c84z_r9eng_93:not(#\9):hover {
|
|
154
154
|
cursor: pointer;
|
|
155
155
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
156
156
|
}
|
|
157
|
-
.
|
|
157
|
+
.awsui_link_4c84z_r9eng_93:not(#\9):focus {
|
|
158
158
|
outline: none;
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
.awsui_link_4c84z_r9eng_93:not(#\9):active {
|
|
161
161
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
162
162
|
}
|
|
163
|
-
.
|
|
163
|
+
.awsui_link_4c84z_r9eng_93:not(#\9):active, .awsui_link_4c84z_r9eng_93:not(#\9):focus, .awsui_link_4c84z_r9eng_93:not(#\9):hover {
|
|
164
164
|
text-decoration: underline;
|
|
165
165
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
166
166
|
text-decoration-color: currentColor;
|
|
167
167
|
}
|
|
168
|
-
.
|
|
168
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9) {
|
|
169
169
|
-webkit-font-smoothing: inherit;
|
|
170
170
|
-moz-osx-font-smoothing: inherit;
|
|
171
171
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
@@ -180,69 +180,68 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
180
180
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
181
181
|
}
|
|
182
182
|
@media (prefers-reduced-motion: reduce) {
|
|
183
|
-
.
|
|
183
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9) {
|
|
184
184
|
animation: none;
|
|
185
185
|
transition: none;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
.awsui-motion-disabled .
|
|
188
|
+
.awsui-motion-disabled .awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9), .awsui-mode-entering .awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9) {
|
|
189
189
|
animation: none;
|
|
190
190
|
transition: none;
|
|
191
191
|
}
|
|
192
|
-
.
|
|
192
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9):hover {
|
|
193
193
|
cursor: pointer;
|
|
194
194
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
195
195
|
}
|
|
196
|
-
.
|
|
196
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9):focus {
|
|
197
197
|
outline: none;
|
|
198
198
|
}
|
|
199
|
-
.
|
|
199
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9):active {
|
|
200
200
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
201
201
|
}
|
|
202
|
-
.
|
|
202
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9):active, .awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9):focus, .awsui_link_4c84z_r9eng_93.awsui_variant-secondary_4c84z_r9eng_140:not(#\9):hover {
|
|
203
203
|
text-decoration: underline;
|
|
204
204
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
205
205
|
text-decoration-color: currentColor;
|
|
206
206
|
}
|
|
207
|
-
.
|
|
207
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9) {
|
|
208
208
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
209
|
-
font-weight:
|
|
210
|
-
letter-spacing:
|
|
211
|
-
|
|
212
|
-
text-decoration: var(--font-link-primary-decoration-cp88s8, underline);
|
|
209
|
+
font-weight: inherit;
|
|
210
|
+
letter-spacing: normal;
|
|
211
|
+
text-decoration: underline;
|
|
213
212
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
214
|
-
text-decoration-color:
|
|
213
|
+
text-decoration-color: currentColor;
|
|
215
214
|
transition-property: color, -webkit-text-decoration;
|
|
216
215
|
transition-property: color, text-decoration;
|
|
217
216
|
transition-property: color, text-decoration, -webkit-text-decoration;
|
|
218
217
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
219
218
|
}
|
|
220
219
|
@media (prefers-reduced-motion: reduce) {
|
|
221
|
-
.
|
|
220
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9) {
|
|
222
221
|
animation: none;
|
|
223
222
|
transition: none;
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
|
-
.awsui-motion-disabled .
|
|
225
|
+
.awsui-motion-disabled .awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9), .awsui-mode-entering .awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9) {
|
|
227
226
|
animation: none;
|
|
228
227
|
transition: none;
|
|
229
228
|
}
|
|
230
|
-
.
|
|
229
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9):hover {
|
|
231
230
|
cursor: pointer;
|
|
232
231
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
233
232
|
}
|
|
234
|
-
.
|
|
233
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9):focus {
|
|
235
234
|
outline: none;
|
|
236
235
|
}
|
|
237
|
-
.
|
|
236
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9):active {
|
|
238
237
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
239
238
|
}
|
|
240
|
-
.
|
|
239
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9):active, .awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9):focus, .awsui_link_4c84z_r9eng_93.awsui_variant-primary_4c84z_r9eng_177:not(#\9):hover {
|
|
241
240
|
text-decoration: underline;
|
|
242
241
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
243
242
|
text-decoration-color: currentColor;
|
|
244
243
|
}
|
|
245
|
-
.
|
|
244
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9) {
|
|
246
245
|
-webkit-font-smoothing: var(--font-smoothing-webkit-m8nc84, antialiased);
|
|
247
246
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
248
247
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
@@ -257,67 +256,69 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
257
256
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
258
257
|
}
|
|
259
258
|
@media (prefers-reduced-motion: reduce) {
|
|
260
|
-
.
|
|
259
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9) {
|
|
261
260
|
animation: none;
|
|
262
261
|
transition: none;
|
|
263
262
|
}
|
|
264
263
|
}
|
|
265
|
-
.awsui-motion-disabled .
|
|
264
|
+
.awsui-motion-disabled .awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9), .awsui-mode-entering .awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9) {
|
|
266
265
|
animation: none;
|
|
267
266
|
transition: none;
|
|
268
267
|
}
|
|
269
|
-
.
|
|
268
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9):hover {
|
|
270
269
|
cursor: pointer;
|
|
271
270
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
272
271
|
}
|
|
273
|
-
.
|
|
272
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9):focus {
|
|
274
273
|
outline: none;
|
|
275
274
|
}
|
|
276
|
-
.
|
|
275
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9):active {
|
|
277
276
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
278
277
|
}
|
|
279
|
-
.
|
|
278
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9):active, .awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9):focus, .awsui_link_4c84z_r9eng_93.awsui_variant-info_4c84z_r9eng_212:not(#\9):hover {
|
|
280
279
|
text-decoration: underline;
|
|
281
280
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
282
281
|
text-decoration-color: var(--color-text-link-button-underline-hover-gyir88, transparent);
|
|
283
282
|
}
|
|
284
|
-
.
|
|
283
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9) {
|
|
285
284
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
286
285
|
font-weight: var(--font-box-value-large-weight-onoq9k, 700);
|
|
287
|
-
text-decoration:
|
|
286
|
+
text-decoration: underline;
|
|
288
287
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
289
|
-
text-decoration-color:
|
|
288
|
+
text-decoration-color: currentColor;
|
|
289
|
+
text-decoration-thickness: 0.3rem;
|
|
290
290
|
transition-property: color, -webkit-text-decoration;
|
|
291
291
|
transition-property: color, text-decoration;
|
|
292
292
|
transition-property: color, text-decoration, -webkit-text-decoration;
|
|
293
293
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
294
294
|
}
|
|
295
295
|
@media (prefers-reduced-motion: reduce) {
|
|
296
|
-
.
|
|
296
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9) {
|
|
297
297
|
animation: none;
|
|
298
298
|
transition: none;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
.awsui-motion-disabled .
|
|
301
|
+
.awsui-motion-disabled .awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9), .awsui-mode-entering .awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9) {
|
|
302
302
|
animation: none;
|
|
303
303
|
transition: none;
|
|
304
304
|
}
|
|
305
|
-
.
|
|
305
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9):hover {
|
|
306
306
|
cursor: pointer;
|
|
307
307
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9):focus {
|
|
310
310
|
outline: none;
|
|
311
311
|
}
|
|
312
|
-
.
|
|
312
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9):active {
|
|
313
313
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
314
314
|
}
|
|
315
|
-
.
|
|
315
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9):active, .awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9):focus, .awsui_link_4c84z_r9eng_93.awsui_variant-value-large_4c84z_r9eng_249:not(#\9):hover {
|
|
316
316
|
text-decoration: underline;
|
|
317
317
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
318
318
|
text-decoration-color: currentColor;
|
|
319
|
+
text-decoration-thickness: 0.3rem;
|
|
319
320
|
}
|
|
320
|
-
.
|
|
321
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9) {
|
|
321
322
|
color: var(--color-text-interactive-default-lnx6lk, #414d5c);
|
|
322
323
|
font-weight: 700;
|
|
323
324
|
letter-spacing: 0.005em;
|
|
@@ -330,31 +331,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
330
331
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
331
332
|
}
|
|
332
333
|
@media (prefers-reduced-motion: reduce) {
|
|
333
|
-
.
|
|
334
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9) {
|
|
334
335
|
animation: none;
|
|
335
336
|
transition: none;
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
|
-
.awsui-motion-disabled .
|
|
339
|
+
.awsui-motion-disabled .awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9), .awsui-mode-entering .awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9) {
|
|
339
340
|
animation: none;
|
|
340
341
|
transition: none;
|
|
341
342
|
}
|
|
342
|
-
.
|
|
343
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9):hover {
|
|
343
344
|
cursor: pointer;
|
|
344
345
|
color: var(--color-text-interactive-hover-mj8add, #000716);
|
|
345
346
|
}
|
|
346
|
-
.
|
|
347
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9):focus {
|
|
347
348
|
outline: none;
|
|
348
349
|
}
|
|
349
|
-
.
|
|
350
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9):active {
|
|
350
351
|
color: var(--color-text-interactive-active-ox3ozh, #000716);
|
|
351
352
|
}
|
|
352
|
-
.
|
|
353
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9):active, .awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9):focus, .awsui_link_4c84z_r9eng_93.awsui_variant-top-navigation_4c84z_r9eng_285:not(#\9):hover {
|
|
353
354
|
text-decoration: underline;
|
|
354
355
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
355
356
|
text-decoration-color: transparent;
|
|
356
357
|
}
|
|
357
|
-
.
|
|
358
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9) {
|
|
358
359
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
359
360
|
font-weight: var(--font-link-button-weight-jephf1, 700);
|
|
360
361
|
letter-spacing: var(--font-link-button-letter-spacing-yi9f0l, 0.005em);
|
|
@@ -367,31 +368,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
367
368
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
368
369
|
}
|
|
369
370
|
@media (prefers-reduced-motion: reduce) {
|
|
370
|
-
.
|
|
371
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9) {
|
|
371
372
|
animation: none;
|
|
372
373
|
transition: none;
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
|
-
.awsui-motion-disabled .
|
|
376
|
+
.awsui-motion-disabled .awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9), .awsui-mode-entering .awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9) {
|
|
376
377
|
animation: none;
|
|
377
378
|
transition: none;
|
|
378
379
|
}
|
|
379
|
-
.
|
|
380
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9):hover {
|
|
380
381
|
cursor: pointer;
|
|
381
382
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
382
383
|
}
|
|
383
|
-
.
|
|
384
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9):focus {
|
|
384
385
|
outline: none;
|
|
385
386
|
}
|
|
386
|
-
.
|
|
387
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9):active {
|
|
387
388
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
388
389
|
}
|
|
389
|
-
.
|
|
390
|
+
.awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9):active, .awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9):focus, .awsui_link_4c84z_r9eng_93.awsui_variant-recovery_4c84z_r9eng_320:not(#\9):hover {
|
|
390
391
|
text-decoration: underline;
|
|
391
392
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
392
393
|
text-decoration-color: var(--color-text-link-button-underline-hover-gyir88, transparent);
|
|
393
394
|
}
|
|
394
|
-
.
|
|
395
|
+
.awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9) {
|
|
395
396
|
-webkit-font-smoothing: var(--font-smoothing-webkit-m8nc84, antialiased);
|
|
396
397
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
397
398
|
color: var(--color-text-link-button-normal-default-px6yl8, #0972d3);
|
|
@@ -406,42 +407,42 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
406
407
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
407
408
|
}
|
|
408
409
|
@media (prefers-reduced-motion: reduce) {
|
|
409
|
-
.
|
|
410
|
+
.awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9) {
|
|
410
411
|
animation: none;
|
|
411
412
|
transition: none;
|
|
412
413
|
}
|
|
413
414
|
}
|
|
414
|
-
.awsui-motion-disabled .
|
|
415
|
+
.awsui-motion-disabled .awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9), .awsui-mode-entering .awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9) {
|
|
415
416
|
animation: none;
|
|
416
417
|
transition: none;
|
|
417
418
|
}
|
|
418
|
-
.
|
|
419
|
+
.awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9):hover {
|
|
419
420
|
cursor: pointer;
|
|
420
421
|
color: var(--color-text-link-button-normal-hover-4psj43, #033160);
|
|
421
422
|
}
|
|
422
|
-
.
|
|
423
|
+
.awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9):focus {
|
|
423
424
|
outline: none;
|
|
424
425
|
}
|
|
425
|
-
.
|
|
426
|
+
.awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9):active {
|
|
426
427
|
color: var(--color-text-link-button-normal-active-pv8vqs, #033160);
|
|
427
428
|
}
|
|
428
|
-
.
|
|
429
|
+
.awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9):active, .awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9):focus, .awsui_link_4c84z_r9eng_93.awsui_button_4c84z_r9eng_355:not(#\9):hover {
|
|
429
430
|
text-decoration: underline;
|
|
430
431
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
431
432
|
text-decoration-color: transparent;
|
|
432
433
|
}
|
|
433
|
-
.
|
|
434
|
+
.awsui_link_4c84z_r9eng_93.awsui_color-inverted_4c84z_r9eng_392:not(#\9) {
|
|
434
435
|
color: var(--color-text-notification-default-rdawv9, #fbfbfb);
|
|
435
436
|
}
|
|
436
|
-
.
|
|
437
|
+
.awsui_link_4c84z_r9eng_93.awsui_color-inverted_4c84z_r9eng_392:not(#\9):not(.awsui_button_4c84z_r9eng_355) {
|
|
437
438
|
text-decoration: underline;
|
|
438
439
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
439
440
|
text-decoration-color: currentColor;
|
|
440
441
|
}
|
|
441
|
-
.
|
|
442
|
+
.awsui_link_4c84z_r9eng_93.awsui_color-inverted_4c84z_r9eng_392:not(#\9):hover {
|
|
442
443
|
color: var(--color-text-link-inverted-hover-09cw7h, #ffffff);
|
|
443
444
|
}
|
|
444
|
-
body[data-awsui-focus-visible=true] .
|
|
445
|
+
body[data-awsui-focus-visible=true] .awsui_link_4c84z_r9eng_93:not(#\9):focus {
|
|
445
446
|
outline: thin dotted;
|
|
446
447
|
outline: var(--border-link-focus-ring-outline-kkfop6, 0);
|
|
447
448
|
outline-offset: 2px;
|
|
@@ -449,54 +450,54 @@ body[data-awsui-focus-visible=true] .awsui_link_4c84z_1vm3s_93:not(#\9):focus {
|
|
|
449
450
|
border-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
450
451
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-v8hkrl, 2px) var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
451
452
|
}
|
|
452
|
-
.
|
|
453
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-body-s_4c84z_r9eng_411:not(#\9) {
|
|
453
454
|
font-size: var(--font-body-s-size-8339kg, 12px);
|
|
454
455
|
line-height: var(--font-body-s-line-height-uztvf6, 16px);
|
|
455
456
|
letter-spacing: var(--font-body-s-letter-spacing-4obhmb, 0.005em);
|
|
456
457
|
}
|
|
457
|
-
.
|
|
458
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-body-m_4c84z_r9eng_416:not(#\9) {
|
|
458
459
|
font-size: var(--font-body-m-size-dhtyxm, 14px);
|
|
459
460
|
line-height: var(--font-body-m-line-height-5wv9x1, 20px);
|
|
460
461
|
}
|
|
461
|
-
.
|
|
462
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-heading-xs_4c84z_r9eng_420:not(#\9) {
|
|
462
463
|
font-size: var(--font-heading-xs-size-d24gfe, 14px);
|
|
463
464
|
line-height: var(--font-heading-xs-line-height-gyxcvc, 18px);
|
|
464
465
|
}
|
|
465
|
-
.
|
|
466
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-heading-s_4c84z_r9eng_424:not(#\9) {
|
|
466
467
|
font-size: var(--font-heading-s-size-5q52fl, 16px);
|
|
467
468
|
line-height: var(--font-heading-s-line-height-w6crw0, 20px);
|
|
468
469
|
letter-spacing: var(--font-heading-s-letter-spacing-ebpsb6, -0.005em);
|
|
469
470
|
}
|
|
470
|
-
.
|
|
471
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-heading-m_4c84z_r9eng_429:not(#\9) {
|
|
471
472
|
font-size: var(--font-heading-m-size-ytqm4n, 18px);
|
|
472
473
|
line-height: var(--font-heading-m-line-height-bk6bii, 22px);
|
|
473
474
|
letter-spacing: var(--font-heading-m-letter-spacing-fefyfv, -0.01em);
|
|
474
475
|
}
|
|
475
|
-
.
|
|
476
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-heading-l_4c84z_r9eng_434:not(#\9) {
|
|
476
477
|
font-size: var(--font-heading-l-size-hknb7q, 20px);
|
|
477
478
|
line-height: var(--font-heading-l-line-height-thvd8z, 24px);
|
|
478
479
|
letter-spacing: var(--font-heading-l-letter-spacing-r9otw4, -0.015em);
|
|
479
480
|
}
|
|
480
|
-
.
|
|
481
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-heading-xl_4c84z_r9eng_439:not(#\9) {
|
|
481
482
|
font-size: var(--font-heading-xl-size-h632xk, 24px);
|
|
482
483
|
line-height: var(--font-heading-xl-line-height-qs40h8, 30px);
|
|
483
484
|
letter-spacing: var(--font-heading-xl-letter-spacing-6telo5, -0.02em);
|
|
484
485
|
}
|
|
485
|
-
.
|
|
486
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-display-l_4c84z_r9eng_444:not(#\9) {
|
|
486
487
|
font-size: var(--font-display-l-size-0u12dn, 42px);
|
|
487
488
|
line-height: var(--font-display-l-line-height-07o0h7, 48px);
|
|
488
489
|
letter-spacing: var(--font-display-l-letter-spacing-1tbjpl, -0.03em);
|
|
489
490
|
}
|
|
490
|
-
.
|
|
491
|
+
.awsui_link_4c84z_r9eng_93.awsui_font-size-inherit_4c84z_r9eng_449:not(#\9) {
|
|
491
492
|
font-size: inherit;
|
|
492
493
|
line-height: inherit;
|
|
493
494
|
letter-spacing: inherit;
|
|
494
495
|
}
|
|
495
496
|
|
|
496
|
-
.awsui_icon-
|
|
497
|
+
.awsui_icon-wrapper_4c84z_r9eng_455:not(#\9) {
|
|
497
498
|
white-space: nowrap;
|
|
498
499
|
}
|
|
499
500
|
|
|
500
|
-
.
|
|
501
|
+
.awsui_icon_4c84z_r9eng_455:not(#\9) {
|
|
501
502
|
display: inline-block;
|
|
502
503
|
}
|
package/link/styles.selectors.js
CHANGED
|
@@ -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
|
-
"link": "
|
|
6
|
-
"variant-secondary": "awsui_variant-
|
|
7
|
-
"variant-primary": "awsui_variant-
|
|
8
|
-
"variant-info": "awsui_variant-
|
|
9
|
-
"variant-value-large": "awsui_variant-value-
|
|
10
|
-
"variant-top-navigation": "awsui_variant-top-
|
|
11
|
-
"variant-recovery": "awsui_variant-
|
|
12
|
-
"button": "
|
|
13
|
-
"color-inverted": "awsui_color-
|
|
14
|
-
"font-size-body-s": "awsui_font-size-body-
|
|
15
|
-
"font-size-body-m": "awsui_font-size-body-
|
|
16
|
-
"font-size-heading-xs": "awsui_font-size-heading-
|
|
17
|
-
"font-size-heading-s": "awsui_font-size-heading-
|
|
18
|
-
"font-size-heading-m": "awsui_font-size-heading-
|
|
19
|
-
"font-size-heading-l": "awsui_font-size-heading-
|
|
20
|
-
"font-size-heading-xl": "awsui_font-size-heading-
|
|
21
|
-
"font-size-display-l": "awsui_font-size-display-
|
|
22
|
-
"font-size-inherit": "awsui_font-size-
|
|
23
|
-
"icon-wrapper": "awsui_icon-
|
|
24
|
-
"icon": "
|
|
5
|
+
"link": "awsui_link_4c84z_r9eng_93",
|
|
6
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_r9eng_140",
|
|
7
|
+
"variant-primary": "awsui_variant-primary_4c84z_r9eng_177",
|
|
8
|
+
"variant-info": "awsui_variant-info_4c84z_r9eng_212",
|
|
9
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_r9eng_249",
|
|
10
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_r9eng_285",
|
|
11
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_r9eng_320",
|
|
12
|
+
"button": "awsui_button_4c84z_r9eng_355",
|
|
13
|
+
"color-inverted": "awsui_color-inverted_4c84z_r9eng_392",
|
|
14
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_r9eng_411",
|
|
15
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_r9eng_416",
|
|
16
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_r9eng_420",
|
|
17
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_r9eng_424",
|
|
18
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_r9eng_429",
|
|
19
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_r9eng_434",
|
|
20
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_r9eng_439",
|
|
21
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_r9eng_444",
|
|
22
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_r9eng_449",
|
|
23
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_r9eng_455",
|
|
24
|
+
"icon": "awsui_icon_4c84z_r9eng_455"
|
|
25
25
|
};
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["popover/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAS7F,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAK5C,OAAO,EAAE,yBAAyB,EAA0B,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["popover/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAS7F,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAK5C,OAAO,EAAE,yBAAyB,EAA0B,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAQlF,MAAM,WAAW,oBAAqB,SAAQ,YAAY,EAAE,0BAA0B;IACpF,QAAQ,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;;AAED,wBAAiD"}
|
package/popover/internal.js
CHANGED
|
@@ -17,6 +17,7 @@ import { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes'
|
|
|
17
17
|
import { useInternalI18n } from '../i18n/context';
|
|
18
18
|
import { useUniqueId } from '../internal/hooks/use-unique-id';
|
|
19
19
|
import { getFirstFocusable } from '../internal/components/focus-lock/utils';
|
|
20
|
+
import { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';
|
|
20
21
|
export default React.forwardRef(InternalPopover);
|
|
21
22
|
function InternalPopover(_a, ref) {
|
|
22
23
|
var { position = 'right', size = 'medium', fixedWidth = false, triggerType = 'text', dismissButton = true, children, header, content, renderWithPortal = false, __onOpen, __internalRootRef = null } = _a, restProps = __rest(_a, ["position", "size", "fixedWidth", "triggerType", "dismissButton", "children", "header", "content", "renderWithPortal", "__onOpen", "__internalRootRef"]);
|
|
@@ -81,7 +82,8 @@ function InternalPopover(_a, ref) {
|
|
|
81
82
|
};
|
|
82
83
|
const referrerId = useUniqueId();
|
|
83
84
|
const popoverContent = (React.createElement("div", { "aria-live": dismissButton ? undefined : 'polite', "aria-atomic": dismissButton ? undefined : true, className: clsx(popoverClasses, styles['popover-content']), "data-awsui-referrer-id": referrerId }, visible && (React.createElement(PopoverContainer, { size: size, fixedWidth: fixedWidth, position: position, trackRef: triggerRef, arrow: position => React.createElement(Arrow, { position: position }), renderWithPortal: renderWithPortal, zIndex: renderWithPortal ? 7000 : undefined },
|
|
84
|
-
React.createElement(
|
|
85
|
+
React.createElement(LinkDefaultVariantContext.Provider, { value: { defaultVariant: 'primary' } },
|
|
86
|
+
React.createElement(PopoverBody, { dismissButton: dismissButton, dismissAriaLabel: dismissAriaLabel, header: header, onDismiss: onDismiss, overflowVisible: "both" }, content))))));
|
|
85
87
|
const mergedRef = useMergeRefs(popoverRef, __internalRootRef);
|
|
86
88
|
return (React.createElement("span", Object.assign({}, baseProps, { className: clsx(styles.root, baseProps.className), ref: mergedRef, onMouseDown: () => {
|
|
87
89
|
// Indicate there was a click inside popover recently, including nested portals.
|
package/popover/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAEnD,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAC3C,OAAO,WAAW,MAAM,QAAQ,CAAC;AAEjC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAA6B,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,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OAAO,CACI,CACG,CACpB,CACG,CACP,CAAC;IAEF,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAE9D,OAAO,CACL,8CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,EACjD,GAAG,EAAE,SAAS,EACd,WAAW,EAAE,GAAG,EAAE;YAChB,gFAAgF;YAChF,YAAY,CAAC,OAAO,GAAG,qBAAqB,CAAC,GAAG,EAAE;gBAChD,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAEA,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACxB,gDAAY,YAAY,IAAE,IAAI,EAAC,QAAQ,mBAAe,QAAQ,EAAC,EAAE,EAAE,UAAU;YAC3E,8BAAM,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,QAAQ,CAAQ,CACzD,CACV,CAAC,CAAC,CAAC,CACF,8CAAU,YAAY,IAAE,EAAE,EAAE,UAAU,KACnC,QAAQ,CACJ,CACR;QACD,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IACjC,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAC5C,CACvB,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport clsx from 'clsx';\n\nimport { KeyCode } from '../internal/keycode';\nimport { getBaseProps } from '../internal/base-component';\nimport { FormFieldContext } from '../internal/context/form-field-context';\n\nimport Arrow from './arrow';\nimport Portal from '../internal/components/portal';\nimport { PopoverProps } from './interfaces';\nimport PopoverContainer from './container';\nimport PopoverBody from './body';\n\nimport styles from './styles.css.js';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { useInternalI18n } from '../i18n/context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\n\nexport interface InternalPopoverProps extends PopoverProps, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n\n children,\n header,\n content,\n\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const i18n = useInternalI18n('popover');\n const dismissAriaLabel = i18n('dismissAriaLabel', restProps.dismissAriaLabel);\n\n const [visible, setVisible] = useState(false);\n\n const focusTrigger = useCallback(() => {\n if (triggerType === 'text') {\n triggerRef.current?.focus();\n } else {\n triggerRef.current && getFirstFocusable(triggerRef.current)?.focus();\n }\n }, [triggerType]);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n focusTrigger();\n }, [focusTrigger]);\n\n const onTriggerKeyDown = useCallback((event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.tab || event.keyCode === KeyCode.escape) {\n setVisible(false);\n }\n }, []);\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n // useCapture=false makes sure this listener is called after the one attached to the element.\n // the options.capture notation is unsupported by IE.\n document.addEventListener('mousedown', onDocumentClick, false);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, false);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n\n const referrerId = useUniqueId();\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, styles['popover-content'])}\n data-awsui-referrer-id={referrerId}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button {...triggerProps} type=\"button\" aria-haspopup=\"dialog\" id={referrerId}>\n <span className={styles['trigger-inner-text']}>{children}</span>\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n <FormFieldContext.Provider value={{}}>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </FormFieldContext.Provider>\n </span>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["popover/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAEnD,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAC3C,OAAO,WAAW,MAAM,QAAQ,CAAC;AAEjC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAA6B,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAU7F,eAAe,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AAEjD,SAAS,eAAe,CACtB,EAgB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EAAE,GAAG,EAAE;YAChB,gFAAgF;YAChF,YAAY,CAAC,OAAO,GAAG,qBAAqB,CAAC,GAAG,EAAE;gBAChD,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;QAEA,WAAW,KAAK,MAAM,CAAC,CAAC,CAAC,CACxB,gDAAY,YAAY,IAAE,IAAI,EAAC,QAAQ,mBAAe,QAAQ,EAAC,EAAE,EAAE,UAAU;YAC3E,8BAAM,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,IAAG,QAAQ,CAAQ,CACzD,CACV,CAAC,CAAC,CAAC,CACF,8CAAU,YAAY,IAAE,EAAE,EAAE,UAAU,KACnC,QAAQ,CACJ,CACR;QACD,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IACjC,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAC5C,CACvB,CACR,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useRef, useState, useImperativeHandle } from 'react';\nimport clsx from 'clsx';\n\nimport { KeyCode } from '../internal/keycode';\nimport { getBaseProps } from '../internal/base-component';\nimport { FormFieldContext } from '../internal/context/form-field-context';\n\nimport Arrow from './arrow';\nimport Portal from '../internal/components/portal';\nimport { PopoverProps } from './interfaces';\nimport PopoverContainer from './container';\nimport PopoverBody from './body';\n\nimport styles from './styles.css.js';\nimport { NonCancelableEventHandler, fireNonCancelableEvent } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { useInternalI18n } from '../i18n/context';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\n\nexport interface InternalPopoverProps extends PopoverProps, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n}\n\nexport interface InternalPopoverRef {\n dismissPopover: () => void;\n}\n\nexport default React.forwardRef(InternalPopover);\n\nfunction InternalPopover(\n {\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n\n children,\n header,\n content,\n\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef = null,\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<InternalPopoverRef>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const clickFrameId = useRef<number | null>(null);\n\n const i18n = useInternalI18n('popover');\n const dismissAriaLabel = i18n('dismissAriaLabel', restProps.dismissAriaLabel);\n\n const [visible, setVisible] = useState(false);\n\n const focusTrigger = useCallback(() => {\n if (triggerType === 'text') {\n triggerRef.current?.focus();\n } else {\n triggerRef.current && getFirstFocusable(triggerRef.current)?.focus();\n }\n }, [triggerType]);\n\n const onTriggerClick = useCallback(() => {\n fireNonCancelableEvent(__onOpen);\n setVisible(true);\n }, [__onOpen]);\n\n const onDismiss = useCallback(() => {\n setVisible(false);\n focusTrigger();\n }, [focusTrigger]);\n\n const onTriggerKeyDown = useCallback((event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.tab || event.keyCode === KeyCode.escape) {\n setVisible(false);\n }\n }, []);\n\n useImperativeHandle(ref, () => ({\n dismissPopover: onDismiss,\n }));\n\n useEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n const document = triggerRef.current.ownerDocument;\n\n const onDocumentClick = () => {\n // Dismiss popover unless there was a click inside within the last animation frame.\n if (clickFrameId.current === null) {\n setVisible(false);\n }\n };\n\n // useCapture=false makes sure this listener is called after the one attached to the element.\n // the options.capture notation is unsupported by IE.\n document.addEventListener('mousedown', onDocumentClick, false);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick, false);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n\n const referrerId = useUniqueId();\n const popoverContent = (\n <div\n aria-live={dismissButton ? undefined : 'polite'}\n aria-atomic={dismissButton ? undefined : true}\n className={clsx(popoverClasses, styles['popover-content'])}\n data-awsui-referrer-id={referrerId}\n >\n {visible && (\n <PopoverContainer\n size={size}\n fixedWidth={fixedWidth}\n position={position}\n trackRef={triggerRef}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={renderWithPortal}\n zIndex={renderWithPortal ? 7000 : undefined}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <PopoverBody\n dismissButton={dismissButton}\n dismissAriaLabel={dismissAriaLabel}\n header={header}\n onDismiss={onDismiss}\n overflowVisible=\"both\"\n >\n {content}\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n )}\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={mergedRef}\n onMouseDown={() => {\n // Indicate there was a click inside popover recently, including nested portals.\n clickFrameId.current = requestAnimationFrame(() => {\n clickFrameId.current = null;\n });\n }}\n >\n {triggerType === 'text' ? (\n <button {...triggerProps} type=\"button\" aria-haspopup=\"dialog\" id={referrerId}>\n <span className={styles['trigger-inner-text']}>{children}</span>\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n <FormFieldContext.Provider value={{}}>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </FormFieldContext.Provider>\n </span>\n );\n}\n"]}
|
package/table/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["table/internal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["table/internal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,cAAc,CAAC;AA4C/D,QAAA,MAAM,aAAa,qBA4ZK,CAAC;AAEzB,eAAe,aAAa,CAAC"}
|