@cloudscape-design/components 3.0.1155 → 3.0.1156
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/anchor-navigation/styles.css.js +8 -8
- package/anchor-navigation/styles.scoped.css +21 -21
- package/anchor-navigation/styles.selectors.js +8 -8
- package/app-layout/visual-refresh/styles.css.js +86 -86
- package/app-layout/visual-refresh/styles.scoped.css +164 -163
- package/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +84 -81
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/toolbar-container.js.map +1 -1
- package/attribute-editor/styles.css.js +15 -15
- package/attribute-editor/styles.scoped.css +28 -28
- package/attribute-editor/styles.selectors.js +15 -15
- package/box/styles.css.js +192 -192
- package/box/styles.scoped.css +241 -241
- package/box/styles.selectors.js +192 -192
- package/breadcrumb-group/item/styles.css.js +7 -7
- package/breadcrumb-group/item/styles.scoped.css +28 -28
- package/breadcrumb-group/item/styles.selectors.js +7 -7
- package/button/styles.css.js +22 -22
- package/button/styles.scoped.css +78 -78
- package/button/styles.selectors.js +22 -22
- package/button-dropdown/item-element/styles.css.js +20 -20
- package/button-dropdown/item-element/styles.scoped.css +35 -35
- package/button-dropdown/item-element/styles.selectors.js +20 -20
- package/cards/styles.css.js +39 -39
- package/cards/styles.scoped.css +51 -51
- package/cards/styles.selectors.js +39 -39
- package/code-editor/styles.css.js +33 -33
- package/code-editor/styles.scoped.css +139 -139
- package/code-editor/styles.selectors.js +33 -33
- package/drawer/implementation.d.ts +1 -0
- package/drawer/implementation.d.ts.map +1 -1
- package/drawer/implementation.js +13 -4
- package/drawer/implementation.js.map +1 -1
- package/drawer/interfaces.d.ts +7 -0
- package/drawer/interfaces.d.ts.map +1 -1
- package/drawer/interfaces.js.map +1 -1
- package/drawer/styles.css.js +12 -8
- package/drawer/styles.scoped.css +35 -13
- package/drawer/styles.selectors.js +12 -8
- package/drawer/use-sticky-footer.d.ts +11 -0
- package/drawer/use-sticky-footer.d.ts.map +1 -0
- package/drawer/use-sticky-footer.js +35 -0
- package/drawer/use-sticky-footer.js.map +1 -0
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +75 -75
- package/help-panel/styles.selectors.js +6 -6
- package/icon/styles.css.js +39 -39
- package/icon/styles.scoped.css +87 -87
- package/icon/styles.selectors.js +39 -39
- package/internal/base-component/styles.scoped.css +62 -50
- package/internal/components/button-trigger/styles.css.js +13 -13
- package/internal/components/button-trigger/styles.scoped.css +29 -29
- package/internal/components/button-trigger/styles.selectors.js +13 -13
- package/internal/components/cartesian-chart/styles.css.js +28 -28
- package/internal/components/cartesian-chart/styles.scoped.css +33 -33
- package/internal/components/cartesian-chart/styles.selectors.js +28 -28
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +25 -25
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.js +8 -8
- package/internal/generated/theming/index.cjs +24 -24
- package/internal/generated/theming/index.js +24 -24
- package/internal/hooks/use-portal-mode-classes/index.d.ts +3 -1
- package/internal/hooks/use-portal-mode-classes/index.d.ts.map +1 -1
- package/internal/hooks/use-portal-mode-classes/index.js +2 -2
- package/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/key-value-pairs/styles.css.js +8 -8
- package/key-value-pairs/styles.scoped.css +10 -10
- package/key-value-pairs/styles.selectors.js +8 -8
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +91 -91
- package/link/styles.selectors.js +20 -20
- package/package.json +1 -1
- package/popover/internal.js +1 -1
- package/popover/internal.js.map +1 -1
- package/popover/styles.css.js +57 -57
- package/popover/styles.scoped.css +87 -87
- package/popover/styles.selectors.js +57 -57
- package/progress-bar/styles.css.js +19 -19
- package/progress-bar/styles.scoped.css +31 -31
- package/progress-bar/styles.selectors.js +19 -19
- package/side-navigation/styles.css.js +30 -30
- package/side-navigation/styles.scoped.css +47 -47
- package/side-navigation/styles.selectors.js +30 -30
- package/split-panel/icons/styles.css.js +22 -22
- package/split-panel/icons/styles.scoped.css +25 -25
- package/split-panel/icons/styles.selectors.js +22 -22
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +13 -13
- package/tag-editor/styles.selectors.js +3 -3
- package/test-utils/dom/drawer/index.d.ts +1 -0
- package/test-utils/dom/drawer/index.js +3 -0
- package/test-utils/dom/drawer/index.js.map +1 -1
- package/test-utils/selectors/drawer/index.d.ts +1 -0
- package/test-utils/selectors/drawer/index.js +3 -0
- package/test-utils/selectors/drawer/index.js.map +1 -1
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +66 -66
- package/text-content/styles.selectors.js +1 -1
- package/token/styles.css.js +14 -14
- package/token/styles.scoped.css +29 -29
- package/token/styles.selectors.js +14 -14
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +28 -28
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
package/link/styles.scoped.css
CHANGED
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_link_4c84z_jd3tb_145:not(#\9) {
|
|
146
146
|
border-collapse: separate;
|
|
147
147
|
border-spacing: 0;
|
|
148
148
|
box-sizing: border-box;
|
|
@@ -177,7 +177,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
177
177
|
--awsui-style-focus-ring-box-shadow-d43v8n: 0 0 0 var(--awsui-style-focus-ring-border-width-d43v8n, var(--border-link-focus-ring-shadow-spread-39uvxr, 2px)) var(--awsui-style-focus-ring-border-color-d43v8n, var(--color-border-item-focused-uk47pl, #006ce0));
|
|
178
178
|
text-underline-offset: 0.25em;
|
|
179
179
|
text-decoration-thickness: 1px;
|
|
180
|
-
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-
|
|
180
|
+
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-hude44, #006ce0));
|
|
181
181
|
font-weight: inherit;
|
|
182
182
|
letter-spacing: normal;
|
|
183
183
|
text-decoration-line: none;
|
|
@@ -188,33 +188,33 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
188
188
|
transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
189
189
|
}
|
|
190
190
|
@media (prefers-reduced-motion: reduce) {
|
|
191
|
-
.
|
|
191
|
+
.awsui_link_4c84z_jd3tb_145:not(#\9) {
|
|
192
192
|
animation: none;
|
|
193
193
|
transition: none;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
.awsui-motion-disabled .
|
|
196
|
+
.awsui-motion-disabled .awsui_link_4c84z_jd3tb_145:not(#\9), .awsui-mode-entering .awsui_link_4c84z_jd3tb_145:not(#\9) {
|
|
197
197
|
animation: none;
|
|
198
198
|
transition: none;
|
|
199
199
|
}
|
|
200
|
-
.
|
|
200
|
+
.awsui_link_4c84z_jd3tb_145:not(#\9):hover {
|
|
201
201
|
cursor: pointer;
|
|
202
|
-
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-
|
|
202
|
+
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
203
203
|
}
|
|
204
|
-
.
|
|
204
|
+
.awsui_link_4c84z_jd3tb_145:not(#\9):focus {
|
|
205
205
|
outline: none;
|
|
206
206
|
}
|
|
207
|
-
.
|
|
208
|
-
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-
|
|
207
|
+
.awsui_link_4c84z_jd3tb_145:not(#\9):active {
|
|
208
|
+
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
209
209
|
}
|
|
210
|
-
.
|
|
210
|
+
.awsui_link_4c84z_jd3tb_145:not(#\9):active, .awsui_link_4c84z_jd3tb_145:not(#\9):focus, .awsui_link_4c84z_jd3tb_145:not(#\9):hover {
|
|
211
211
|
text-decoration-line: underline;
|
|
212
212
|
text-decoration-color: currentColor;
|
|
213
213
|
}
|
|
214
|
-
.
|
|
214
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9) {
|
|
215
215
|
-webkit-font-smoothing: inherit;
|
|
216
216
|
-moz-osx-font-smoothing: inherit;
|
|
217
|
-
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-
|
|
217
|
+
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-hude44, #006ce0));
|
|
218
218
|
font-weight: inherit;
|
|
219
219
|
letter-spacing: normal;
|
|
220
220
|
text-decoration-line: none;
|
|
@@ -225,31 +225,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
225
225
|
transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
226
226
|
}
|
|
227
227
|
@media (prefers-reduced-motion: reduce) {
|
|
228
|
-
.
|
|
228
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9) {
|
|
229
229
|
animation: none;
|
|
230
230
|
transition: none;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
.awsui-motion-disabled .
|
|
233
|
+
.awsui-motion-disabled .awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9), .awsui-mode-entering .awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9) {
|
|
234
234
|
animation: none;
|
|
235
235
|
transition: none;
|
|
236
236
|
}
|
|
237
|
-
.
|
|
237
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9):hover {
|
|
238
238
|
cursor: pointer;
|
|
239
|
-
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-
|
|
239
|
+
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
240
240
|
}
|
|
241
|
-
.
|
|
241
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9):focus {
|
|
242
242
|
outline: none;
|
|
243
243
|
}
|
|
244
|
-
.
|
|
245
|
-
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-
|
|
244
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9):active {
|
|
245
|
+
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
246
246
|
}
|
|
247
|
-
.
|
|
247
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9):active, .awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9):focus, .awsui_link_4c84z_jd3tb_145.awsui_variant-secondary_4c84z_jd3tb_212:not(#\9):hover {
|
|
248
248
|
text-decoration-line: underline;
|
|
249
249
|
text-decoration-color: currentColor;
|
|
250
250
|
}
|
|
251
|
-
.
|
|
252
|
-
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-
|
|
251
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9) {
|
|
252
|
+
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-hude44, #006ce0));
|
|
253
253
|
font-weight: inherit;
|
|
254
254
|
letter-spacing: normal;
|
|
255
255
|
text-decoration-line: underline;
|
|
@@ -260,33 +260,33 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
260
260
|
transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
261
261
|
}
|
|
262
262
|
@media (prefers-reduced-motion: reduce) {
|
|
263
|
-
.
|
|
263
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9) {
|
|
264
264
|
animation: none;
|
|
265
265
|
transition: none;
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
.awsui-motion-disabled .
|
|
268
|
+
.awsui-motion-disabled .awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9), .awsui-mode-entering .awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9) {
|
|
269
269
|
animation: none;
|
|
270
270
|
transition: none;
|
|
271
271
|
}
|
|
272
|
-
.
|
|
272
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9):hover {
|
|
273
273
|
cursor: pointer;
|
|
274
|
-
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-
|
|
274
|
+
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
275
275
|
}
|
|
276
|
-
.
|
|
276
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9):focus {
|
|
277
277
|
outline: none;
|
|
278
278
|
}
|
|
279
|
-
.
|
|
280
|
-
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-
|
|
279
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9):active {
|
|
280
|
+
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
281
281
|
}
|
|
282
|
-
.
|
|
282
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9):active, .awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9):focus, .awsui_link_4c84z_jd3tb_145.awsui_variant-primary_4c84z_jd3tb_247:not(#\9):hover {
|
|
283
283
|
text-decoration-line: underline;
|
|
284
284
|
text-decoration-color: currentColor;
|
|
285
285
|
}
|
|
286
|
-
.
|
|
286
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9) {
|
|
287
287
|
-webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
|
|
288
288
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
|
|
289
|
-
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-
|
|
289
|
+
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-hude44, #006ce0));
|
|
290
290
|
font-weight: 700;
|
|
291
291
|
letter-spacing: 0.005em;
|
|
292
292
|
text-decoration-line: none;
|
|
@@ -297,31 +297,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
297
297
|
transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
298
298
|
}
|
|
299
299
|
@media (prefers-reduced-motion: reduce) {
|
|
300
|
-
.
|
|
300
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9) {
|
|
301
301
|
animation: none;
|
|
302
302
|
transition: none;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
.awsui-motion-disabled .
|
|
305
|
+
.awsui-motion-disabled .awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9), .awsui-mode-entering .awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9) {
|
|
306
306
|
animation: none;
|
|
307
307
|
transition: none;
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9):hover {
|
|
310
310
|
cursor: pointer;
|
|
311
|
-
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-
|
|
311
|
+
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
312
312
|
}
|
|
313
|
-
.
|
|
313
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9):focus {
|
|
314
314
|
outline: none;
|
|
315
315
|
}
|
|
316
|
-
.
|
|
317
|
-
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-
|
|
316
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9):active {
|
|
317
|
+
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
318
318
|
}
|
|
319
|
-
.
|
|
319
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9):active, .awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9):focus, .awsui_link_4c84z_jd3tb_145.awsui_variant-info_4c84z_jd3tb_280:not(#\9):hover {
|
|
320
320
|
text-decoration-line: underline;
|
|
321
321
|
text-decoration-color: var(--color-text-link-button-underline-hover-cn3mqh, transparent);
|
|
322
322
|
}
|
|
323
|
-
.
|
|
324
|
-
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-
|
|
323
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9) {
|
|
324
|
+
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-hude44, #006ce0));
|
|
325
325
|
font-weight: var(--font-box-value-large-weight-wr00sw, 700);
|
|
326
326
|
text-decoration-line: underline;
|
|
327
327
|
text-decoration-color: currentColor;
|
|
@@ -331,30 +331,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
331
331
|
transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
332
332
|
}
|
|
333
333
|
@media (prefers-reduced-motion: reduce) {
|
|
334
|
-
.
|
|
334
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9) {
|
|
335
335
|
animation: none;
|
|
336
336
|
transition: none;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
.awsui-motion-disabled .
|
|
339
|
+
.awsui-motion-disabled .awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9), .awsui-mode-entering .awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9) {
|
|
340
340
|
animation: none;
|
|
341
341
|
transition: none;
|
|
342
342
|
}
|
|
343
|
-
.
|
|
343
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9):hover {
|
|
344
344
|
cursor: pointer;
|
|
345
|
-
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-
|
|
345
|
+
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
346
346
|
}
|
|
347
|
-
.
|
|
347
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9):focus {
|
|
348
348
|
outline: none;
|
|
349
349
|
}
|
|
350
|
-
.
|
|
351
|
-
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-
|
|
350
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9):active {
|
|
351
|
+
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
352
352
|
}
|
|
353
|
-
.
|
|
353
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9):active, .awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9):focus, .awsui_link_4c84z_jd3tb_145.awsui_variant-value-large_4c84z_jd3tb_315:not(#\9):hover {
|
|
354
354
|
text-decoration-line: underline;
|
|
355
355
|
text-decoration-color: currentColor;
|
|
356
356
|
}
|
|
357
|
-
.
|
|
357
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9) {
|
|
358
358
|
-webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
|
|
359
359
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
|
|
360
360
|
color: var(--awsui-style-color-default-d43v8n, var(--color-text-interactive-default-ugh9wp, #424650));
|
|
@@ -368,31 +368,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
368
368
|
transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
369
369
|
}
|
|
370
370
|
@media (prefers-reduced-motion: reduce) {
|
|
371
|
-
.
|
|
371
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9) {
|
|
372
372
|
animation: none;
|
|
373
373
|
transition: none;
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
.awsui-motion-disabled .
|
|
376
|
+
.awsui-motion-disabled .awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9), .awsui-mode-entering .awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9) {
|
|
377
377
|
animation: none;
|
|
378
378
|
transition: none;
|
|
379
379
|
}
|
|
380
|
-
.
|
|
380
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9):hover {
|
|
381
381
|
cursor: pointer;
|
|
382
382
|
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-interactive-hover-6naf7i, #0f141a));
|
|
383
383
|
}
|
|
384
|
-
.
|
|
384
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9):focus {
|
|
385
385
|
outline: none;
|
|
386
386
|
}
|
|
387
|
-
.
|
|
387
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9):active {
|
|
388
388
|
color: var(--awsui-style-color-active-d43v8n, var(--color-text-interactive-active-uoe6zi, #0f141a));
|
|
389
389
|
}
|
|
390
|
-
.
|
|
390
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9):active, .awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9):focus, .awsui_link_4c84z_jd3tb_145.awsui_variant-top-navigation_4c84z_jd3tb_347:not(#\9):hover {
|
|
391
391
|
text-decoration-line: underline;
|
|
392
392
|
text-decoration-color: transparent;
|
|
393
393
|
}
|
|
394
|
-
.
|
|
395
|
-
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-
|
|
394
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9) {
|
|
395
|
+
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-default-hude44, #006ce0));
|
|
396
396
|
font-weight: var(--font-link-button-weight-vslyg9, 700);
|
|
397
397
|
letter-spacing: var(--font-link-button-letter-spacing-imtxwq, 0.005em);
|
|
398
398
|
text-decoration-line: underline;
|
|
@@ -403,33 +403,33 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
403
403
|
transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
404
404
|
}
|
|
405
405
|
@media (prefers-reduced-motion: reduce) {
|
|
406
|
-
.
|
|
406
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9) {
|
|
407
407
|
animation: none;
|
|
408
408
|
transition: none;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
.awsui-motion-disabled .
|
|
411
|
+
.awsui-motion-disabled .awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9), .awsui-mode-entering .awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9) {
|
|
412
412
|
animation: none;
|
|
413
413
|
transition: none;
|
|
414
414
|
}
|
|
415
|
-
.
|
|
415
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9):hover {
|
|
416
416
|
cursor: pointer;
|
|
417
|
-
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-
|
|
417
|
+
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
418
418
|
}
|
|
419
|
-
.
|
|
419
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9):focus {
|
|
420
420
|
outline: none;
|
|
421
421
|
}
|
|
422
|
-
.
|
|
423
|
-
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-
|
|
422
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9):active {
|
|
423
|
+
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-hover-2hfec2, #002b66));
|
|
424
424
|
}
|
|
425
|
-
.
|
|
425
|
+
.awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9):active, .awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9):focus, .awsui_link_4c84z_jd3tb_145.awsui_variant-recovery_4c84z_jd3tb_382:not(#\9):hover {
|
|
426
426
|
text-decoration-line: underline;
|
|
427
427
|
text-decoration-color: var(--color-text-link-button-underline-hover-cn3mqh, transparent);
|
|
428
428
|
}
|
|
429
|
-
.
|
|
429
|
+
.awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9) {
|
|
430
430
|
-webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
|
|
431
431
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
|
|
432
|
-
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-button-normal-default-
|
|
432
|
+
color: var(--awsui-style-color-default-d43v8n, var(--color-text-link-button-normal-default-srprth, #006ce0));
|
|
433
433
|
font-weight: 700;
|
|
434
434
|
letter-spacing: var(--font-button-letter-spacing-ufowe3, 0.005em);
|
|
435
435
|
text-decoration-line: none;
|
|
@@ -440,40 +440,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
440
440
|
transition-duration: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
441
441
|
}
|
|
442
442
|
@media (prefers-reduced-motion: reduce) {
|
|
443
|
-
.
|
|
443
|
+
.awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9) {
|
|
444
444
|
animation: none;
|
|
445
445
|
transition: none;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
.awsui-motion-disabled .
|
|
448
|
+
.awsui-motion-disabled .awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9), .awsui-mode-entering .awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9) {
|
|
449
449
|
animation: none;
|
|
450
450
|
transition: none;
|
|
451
451
|
}
|
|
452
|
-
.
|
|
452
|
+
.awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9):hover {
|
|
453
453
|
cursor: pointer;
|
|
454
|
-
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-button-normal-hover-
|
|
454
|
+
color: var(--awsui-style-color-hover-d43v8n, var(--color-text-link-button-normal-hover-jrnyw3, #002b66));
|
|
455
455
|
}
|
|
456
|
-
.
|
|
456
|
+
.awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9):focus {
|
|
457
457
|
outline: none;
|
|
458
458
|
}
|
|
459
|
-
.
|
|
459
|
+
.awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9):active {
|
|
460
460
|
color: var(--awsui-style-color-active-d43v8n, var(--color-text-link-button-normal-active-js9ryu, #002b66));
|
|
461
461
|
}
|
|
462
|
-
.
|
|
462
|
+
.awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9):active, .awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9):focus, .awsui_link_4c84z_jd3tb_145.awsui_button_4c84z_jd3tb_415:not(#\9):hover {
|
|
463
463
|
text-decoration-line: underline;
|
|
464
464
|
text-decoration-color: transparent;
|
|
465
465
|
}
|
|
466
|
-
.
|
|
466
|
+
.awsui_link_4c84z_jd3tb_145.awsui_color-inverted_4c84z_jd3tb_450:not(#\9) {
|
|
467
467
|
color: var(--color-text-notification-default-1iey72, #f9f9fa);
|
|
468
468
|
}
|
|
469
|
-
.
|
|
469
|
+
.awsui_link_4c84z_jd3tb_145.awsui_color-inverted_4c84z_jd3tb_450:not(#\9):not(.awsui_button_4c84z_jd3tb_415) {
|
|
470
470
|
text-decoration-line: underline;
|
|
471
471
|
text-decoration-color: currentColor;
|
|
472
472
|
}
|
|
473
|
-
.
|
|
473
|
+
.awsui_link_4c84z_jd3tb_145.awsui_color-inverted_4c84z_jd3tb_450:not(#\9):hover {
|
|
474
474
|
color: var(--color-text-link-inverted-hover-ocd3u3, #ffffff);
|
|
475
475
|
}
|
|
476
|
-
body[data-awsui-focus-visible=true] .
|
|
476
|
+
body[data-awsui-focus-visible=true] .awsui_link_4c84z_jd3tb_145:not(#\9):focus {
|
|
477
477
|
outline: thin dotted;
|
|
478
478
|
outline: var(--border-link-focus-ring-outline-1p0hnu, 0);
|
|
479
479
|
outline-offset: 2px;
|
|
@@ -484,61 +484,61 @@ body[data-awsui-focus-visible=true] .awsui_link_4c84z_glb2h_145:not(#\9):focus {
|
|
|
484
484
|
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-d43v8n, var(--border-radius-control-default-focus-ring-1uabki, 4px));
|
|
485
485
|
box-shadow: var(--awsui-style-focus-ring-box-shadow-d43v8n);
|
|
486
486
|
}
|
|
487
|
-
.
|
|
487
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-body-s_4c84z_jd3tb_471:not(#\9) {
|
|
488
488
|
font-size: var(--font-size-body-s-smc8cv, 12px);
|
|
489
489
|
line-height: var(--line-height-body-s-nu5hx1, 16px);
|
|
490
490
|
letter-spacing: var(--letter-spacing-body-s-gq78ok, 0.005em);
|
|
491
491
|
text-underline-offset: 0.3em;
|
|
492
492
|
text-decoration-thickness: 1px;
|
|
493
493
|
}
|
|
494
|
-
.
|
|
494
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-body-m_4c84z_jd3tb_478:not(#\9) {
|
|
495
495
|
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
496
496
|
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
497
497
|
text-underline-offset: 0.25em;
|
|
498
498
|
text-decoration-thickness: 1px;
|
|
499
499
|
}
|
|
500
|
-
.
|
|
500
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-heading-xs_4c84z_jd3tb_484:not(#\9) {
|
|
501
501
|
font-size: var(--font-size-heading-xs-j8yzxv, 14px);
|
|
502
502
|
line-height: var(--line-height-heading-xs-q9j004, 18px);
|
|
503
503
|
text-underline-offset: 0.25em;
|
|
504
504
|
text-decoration-thickness: 1px;
|
|
505
505
|
}
|
|
506
|
-
.
|
|
506
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-heading-s_4c84z_jd3tb_490:not(#\9) {
|
|
507
507
|
font-size: var(--font-size-heading-s-zp08en, 16px);
|
|
508
508
|
line-height: var(--line-height-heading-s-hmi4vc, 20px);
|
|
509
509
|
letter-spacing: var(--letter-spacing-heading-s-4st9ep, -0.005em);
|
|
510
510
|
text-underline-offset: 0.3em;
|
|
511
511
|
text-decoration-thickness: 1px;
|
|
512
512
|
}
|
|
513
|
-
.
|
|
513
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-heading-m_4c84z_jd3tb_497:not(#\9) {
|
|
514
514
|
font-size: var(--font-size-heading-m-170yiy, 18px);
|
|
515
515
|
line-height: var(--line-height-heading-m-uoaqdh, 22px);
|
|
516
516
|
letter-spacing: var(--letter-spacing-heading-m-29ewnk, -0.01em);
|
|
517
517
|
text-underline-offset: 0.25em;
|
|
518
518
|
text-decoration-thickness: 1px;
|
|
519
519
|
}
|
|
520
|
-
.
|
|
520
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-heading-l_4c84z_jd3tb_504:not(#\9) {
|
|
521
521
|
font-size: var(--font-size-heading-l-vnacx6, 20px);
|
|
522
522
|
line-height: var(--line-height-heading-l-mg5bx6, 24px);
|
|
523
523
|
letter-spacing: var(--letter-spacing-heading-l-5v6ibv, -0.015em);
|
|
524
524
|
text-underline-offset: 0.25em;
|
|
525
525
|
text-decoration-thickness: 1px;
|
|
526
526
|
}
|
|
527
|
-
.
|
|
527
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-heading-xl_4c84z_jd3tb_511:not(#\9) {
|
|
528
528
|
font-size: var(--font-size-heading-xl-wvkbur, 24px);
|
|
529
529
|
line-height: var(--line-height-heading-xl-hko6p0, 30px);
|
|
530
530
|
letter-spacing: var(--letter-spacing-heading-xl-ckkb6u, -0.02em);
|
|
531
531
|
text-underline-offset: 0.25em;
|
|
532
532
|
text-decoration-thickness: 1px;
|
|
533
533
|
}
|
|
534
|
-
.
|
|
534
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-display-l_4c84z_jd3tb_518:not(#\9) {
|
|
535
535
|
font-size: var(--font-size-display-l-wa6woo, 42px);
|
|
536
536
|
line-height: var(--line-height-display-l-vwanzp, 48px);
|
|
537
537
|
letter-spacing: var(--letter-spacing-display-l-elyyxk, -0.03em);
|
|
538
538
|
text-underline-offset: 0.25em;
|
|
539
539
|
text-decoration-thickness: 2px;
|
|
540
540
|
}
|
|
541
|
-
.
|
|
541
|
+
.awsui_link_4c84z_jd3tb_145.awsui_font-size-inherit_4c84z_jd3tb_525:not(#\9) {
|
|
542
542
|
font-size: inherit;
|
|
543
543
|
line-height: inherit;
|
|
544
544
|
letter-spacing: inherit;
|
|
@@ -546,10 +546,10 @@ body[data-awsui-focus-visible=true] .awsui_link_4c84z_glb2h_145:not(#\9):focus {
|
|
|
546
546
|
text-decoration-thickness: 1px;
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
-
.awsui_icon-
|
|
549
|
+
.awsui_icon-wrapper_4c84z_jd3tb_533:not(#\9) {
|
|
550
550
|
white-space: nowrap;
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
-
.
|
|
553
|
+
.awsui_icon_4c84z_jd3tb_533:not(#\9) {
|
|
554
554
|
display: inline-block;
|
|
555
555
|
}
|
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_jd3tb_145",
|
|
6
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_jd3tb_212",
|
|
7
|
+
"variant-primary": "awsui_variant-primary_4c84z_jd3tb_247",
|
|
8
|
+
"variant-info": "awsui_variant-info_4c84z_jd3tb_280",
|
|
9
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_jd3tb_315",
|
|
10
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_jd3tb_347",
|
|
11
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_jd3tb_382",
|
|
12
|
+
"button": "awsui_button_4c84z_jd3tb_415",
|
|
13
|
+
"color-inverted": "awsui_color-inverted_4c84z_jd3tb_450",
|
|
14
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_jd3tb_471",
|
|
15
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_jd3tb_478",
|
|
16
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_jd3tb_484",
|
|
17
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_jd3tb_490",
|
|
18
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_jd3tb_497",
|
|
19
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_jd3tb_504",
|
|
20
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_jd3tb_511",
|
|
21
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_jd3tb_518",
|
|
22
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_jd3tb_525",
|
|
23
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_jd3tb_533",
|
|
24
|
+
"icon": "awsui_icon_4c84z_jd3tb_533"
|
|
25
25
|
};
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"./internal/base-component/index.js",
|
|
154
154
|
"./internal/base-component/styles.css.js"
|
|
155
155
|
],
|
|
156
|
-
"version": "3.0.
|
|
156
|
+
"version": "3.0.1156",
|
|
157
157
|
"repository": {
|
|
158
158
|
"type": "git",
|
|
159
159
|
"url": "https://github.com/cloudscape-design/components.git"
|
package/popover/internal.js
CHANGED
|
@@ -78,7 +78,7 @@ function InternalPopover({ position = 'right', size = 'medium', fixedWidth = fal
|
|
|
78
78
|
document.removeEventListener('mousedown', onDocumentClick);
|
|
79
79
|
};
|
|
80
80
|
}, []);
|
|
81
|
-
const popoverClasses = usePortalModeClasses(triggerRef);
|
|
81
|
+
const popoverClasses = usePortalModeClasses(triggerRef, { resetVisualContext: true });
|
|
82
82
|
const triggerProps = {
|
|
83
83
|
// https://github.com/microsoft/TypeScript/issues/36659
|
|
84
84
|
ref: triggerRef,
|
package/popover/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE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E;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,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAC/C,mCACM,YAAY,EAChB,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,eAAe,KAAK,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC,EACjG,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAC,QAAQ,mBACC,QAAQ,EACtB,EAAE,EAAE,UAAU,gBACF,gBAAgB,IAE3B,QAAQ,CACF,CACV,CAAC,CAAC,CAAC,CACF,iCAAU,YAAY,EAAE,EAAE,EAAE,UAAU,IACnC,QAAQ,CACJ,CACR;QACA,OAAO,IAAI,CACV,oBAAC,qBAAqB,QACnB,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAChD,CACzB,CACI,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, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { Portal, useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { useSingleTabStopNavigation } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { KeyCode } from '../internal/keycode';\nimport Arrow from './arrow';\nimport PopoverBody from './body';\nimport ConditionalLiveRegion from './conditional-live-region';\nimport PopoverContainer from './container';\nimport { PopoverProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface InternalPopoverProps extends Omit<PopoverProps, 'triggerType' | 'size'>, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n triggerType?: PopoverProps.TriggerType | 'filtering-token';\n size: PopoverProps.Size | 'content';\n __closeAnalyticsAction?: string;\n isInline?: boolean;\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 triggerAriaLabel,\n\n wrapTriggerText = true,\n isInline = false,\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef,\n __closeAnalyticsAction,\n\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<PopoverProps.Ref>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | 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 (['text', 'text-inline'].includes(triggerType)) {\n triggerRef.current?.focus();\n } else if (triggerRef.current) {\n 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(\n (event: React.KeyboardEvent) => {\n const isEscapeKey = event.keyCode === KeyCode.escape;\n const isTabKey = event.keyCode === KeyCode.tab;\n if (isEscapeKey && visible) {\n event.stopPropagation();\n }\n if (isTabKey || isEscapeKey) {\n setVisible(false);\n }\n },\n [visible]\n );\n\n useImperativeHandle(ref, () => ({\n dismiss: () => {\n setVisible(false);\n },\n focus: () => {\n setVisible(false);\n focusTrigger();\n },\n }));\n\n const clickFrameId = useRef<number | null>(null);\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 document.addEventListener('mousedown', onDocumentClick);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef);\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);\n\n const referrerId = useUniqueId();\n\n const popoverContent = (\n <div\n className={clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content'])}\n data-awsui-referrer-id={referrerId}\n >\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 closeAnalyticsAction={__closeAnalyticsAction}\n >\n <ConditionalLiveRegion condition={!dismissButton}>{content}</ConditionalLiveRegion>\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n triggerType === 'filtering-token' && styles['root-filtering-token'],\n isInline && styles['no-wrap']\n )}\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 {['text', 'text-inline'].includes(triggerType) ? (\n <button\n {...triggerProps}\n className={clsx(triggerProps.className, wrapTriggerText === false && styles['overflow-ellipsis'])}\n tabIndex={triggerTabIndex}\n type=\"button\"\n aria-haspopup=\"dialog\"\n id={referrerId}\n aria-label={triggerAriaLabel}\n >\n {children}\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n {visible && (\n <ResetContextsForModal>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </ResetContextsForModal>\n )}\n </span>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/popover/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAE3F,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,qBAAqB,MAAM,8CAA8C,CAAC;AACjF,OAAO,EA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AQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAC/C,mCACM,YAAY,EAChB,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,eAAe,KAAK,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC,EACjG,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAC,QAAQ,mBACC,QAAQ,EACtB,EAAE,EAAE,UAAU,gBACF,gBAAgB,IAE3B,QAAQ,CACF,CACV,CAAC,CAAC,CAAC,CACF,iCAAU,YAAY,EAAE,EAAE,EAAE,UAAU,IACnC,QAAQ,CACJ,CACR;QACA,OAAO,IAAI,CACV,oBAAC,qBAAqB,QACnB,gBAAgB,CAAC,CAAC,CAAC,oBAAC,MAAM,QAAE,cAAc,CAAU,CAAC,CAAC,CAAC,cAAc,CAChD,CACzB,CACI,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, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { Portal, useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { useSingleTabStopNavigation } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { getFirstFocusable } from '../internal/components/focus-lock/utils';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport ResetContextsForModal from '../internal/context/reset-contexts-for-modal';\nimport { fireNonCancelableEvent, NonCancelableEventHandler } from '../internal/events/index';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport { KeyCode } from '../internal/keycode';\nimport Arrow from './arrow';\nimport PopoverBody from './body';\nimport ConditionalLiveRegion from './conditional-live-region';\nimport PopoverContainer from './container';\nimport { PopoverProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface InternalPopoverProps extends Omit<PopoverProps, 'triggerType' | 'size'>, InternalBaseComponentProps {\n __onOpen?: NonCancelableEventHandler<null>;\n triggerType?: PopoverProps.TriggerType | 'filtering-token';\n size: PopoverProps.Size | 'content';\n __closeAnalyticsAction?: string;\n isInline?: boolean;\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 triggerAriaLabel,\n\n wrapTriggerText = true,\n isInline = false,\n renderWithPortal = false,\n\n __onOpen,\n __internalRootRef,\n __closeAnalyticsAction,\n\n ...restProps\n }: InternalPopoverProps,\n ref: React.Ref<PopoverProps.Ref>\n) {\n const baseProps = getBaseProps(restProps);\n const triggerRef = useRef<HTMLElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | 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 (['text', 'text-inline'].includes(triggerType)) {\n triggerRef.current?.focus();\n } else if (triggerRef.current) {\n 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(\n (event: React.KeyboardEvent) => {\n const isEscapeKey = event.keyCode === KeyCode.escape;\n const isTabKey = event.keyCode === KeyCode.tab;\n if (isEscapeKey && visible) {\n event.stopPropagation();\n }\n if (isTabKey || isEscapeKey) {\n setVisible(false);\n }\n },\n [visible]\n );\n\n useImperativeHandle(ref, () => ({\n dismiss: () => {\n setVisible(false);\n },\n focus: () => {\n setVisible(false);\n focusTrigger();\n },\n }));\n\n const clickFrameId = useRef<number | null>(null);\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 document.addEventListener('mousedown', onDocumentClick);\n\n return () => {\n document.removeEventListener('mousedown', onDocumentClick);\n };\n }, []);\n\n const popoverClasses = usePortalModeClasses(triggerRef, { resetVisualContext: true });\n\n const triggerProps = {\n // https://github.com/microsoft/TypeScript/issues/36659\n ref: triggerRef as any,\n onClick: onTriggerClick,\n onKeyDown: onTriggerKeyDown,\n className: clsx(styles.trigger, styles[`trigger-type-${triggerType}`]),\n };\n const { tabIndex: triggerTabIndex } = useSingleTabStopNavigation(triggerRef);\n\n const referrerId = useUniqueId();\n\n const popoverContent = (\n <div\n className={clsx(popoverClasses, !renderWithPortal && styles['popover-inline-content'])}\n data-awsui-referrer-id={referrerId}\n >\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 closeAnalyticsAction={__closeAnalyticsAction}\n >\n <ConditionalLiveRegion condition={!dismissButton}>{content}</ConditionalLiveRegion>\n </PopoverBody>\n </LinkDefaultVariantContext.Provider>\n </PopoverContainer>\n </div>\n );\n\n const mergedRef = useMergeRefs(popoverRef, __internalRootRef);\n\n return (\n <span\n {...baseProps}\n className={clsx(\n styles.root,\n baseProps.className,\n triggerType === 'filtering-token' && styles['root-filtering-token'],\n isInline && styles['no-wrap']\n )}\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 {['text', 'text-inline'].includes(triggerType) ? (\n <button\n {...triggerProps}\n className={clsx(triggerProps.className, wrapTriggerText === false && styles['overflow-ellipsis'])}\n tabIndex={triggerTabIndex}\n type=\"button\"\n aria-haspopup=\"dialog\"\n id={referrerId}\n aria-label={triggerAriaLabel}\n >\n {children}\n </button>\n ) : (\n <span {...triggerProps} id={referrerId}>\n {children}\n </span>\n )}\n {visible && (\n <ResetContextsForModal>\n {renderWithPortal ? <Portal>{popoverContent}</Portal> : popoverContent}\n </ResetContextsForModal>\n )}\n </span>\n );\n}\n"]}
|