@cloudscape-design/components-themeable 3.0.974 → 3.0.976
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/drawer/styles.scss +14 -0
- package/lib/internal/scss/link/styles.scss +1 -1
- package/lib/internal/template/annotation-context/index.js +2 -2
- package/lib/internal/template/annotation-context/index.js.map +1 -1
- package/lib/internal/template/app-layout/runtime-drawer/index.js +1 -1
- package/lib/internal/template/app-layout/runtime-drawer/index.js.map +1 -1
- package/lib/internal/template/app-layout/runtime-drawer/use-runtime-drawer-context.d.ts +6 -0
- package/lib/internal/template/app-layout/runtime-drawer/use-runtime-drawer-context.d.ts.map +1 -0
- package/lib/internal/template/app-layout/runtime-drawer/use-runtime-drawer-context.js +29 -0
- package/lib/internal/template/app-layout/runtime-drawer/use-runtime-drawer-context.js.map +1 -0
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +7 -2
- package/lib/internal/template/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -1
- package/lib/internal/template/app-layout-toolbar/analytics-metadata/interfaces.d.ts +18 -0
- package/lib/internal/template/app-layout-toolbar/analytics-metadata/interfaces.d.ts.map +1 -0
- package/lib/internal/template/app-layout-toolbar/analytics-metadata/interfaces.js +4 -0
- package/lib/internal/template/app-layout-toolbar/analytics-metadata/interfaces.js.map +1 -0
- package/lib/internal/template/app-layout-toolbar/index.d.ts.map +1 -1
- package/lib/internal/template/app-layout-toolbar/index.js +9 -1
- package/lib/internal/template/app-layout-toolbar/index.js.map +1 -1
- package/lib/internal/template/date-input/internal.d.ts.map +1 -1
- package/lib/internal/template/date-input/internal.js +3 -16
- package/lib/internal/template/date-input/internal.js.map +1 -1
- package/lib/internal/template/date-input/utils.d.ts +7 -0
- package/lib/internal/template/date-input/utils.d.ts.map +1 -0
- package/lib/internal/template/date-input/utils.js +25 -0
- package/lib/internal/template/date-input/utils.js.map +1 -0
- package/lib/internal/template/date-range-picker/calendar/grids/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/grids/interfaces.d.ts +3 -4
- package/lib/internal/template/date-range-picker/calendar/grids/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/grids/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/header/header-button.d.ts +0 -2
- package/lib/internal/template/date-range-picker/calendar/header/header-button.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/header/header-button.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/header/index.d.ts +2 -3
- package/lib/internal/template/date-range-picker/calendar/header/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/header/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/index.d.ts +2 -2
- package/lib/internal/template/date-range-picker/calendar/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/index.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/range-inputs.d.ts +3 -3
- package/lib/internal/template/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/range-inputs.js.map +1 -1
- package/lib/internal/template/date-range-picker/dropdown.d.ts +2 -2
- package/lib/internal/template/date-range-picker/dropdown.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/dropdown.js.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.d.ts +2 -7
- package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/relative-range/index.d.ts +2 -2
- package/lib/internal/template/date-range-picker/relative-range/index.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/relative-range/index.js.map +1 -1
- package/lib/internal/template/drawer/implementation.d.ts +1 -1
- package/lib/internal/template/drawer/implementation.d.ts.map +1 -1
- package/lib/internal/template/drawer/implementation.js +4 -2
- package/lib/internal/template/drawer/implementation.js.map +1 -1
- package/lib/internal/template/drawer/interfaces.d.ts +4 -0
- package/lib/internal/template/drawer/interfaces.d.ts.map +1 -1
- package/lib/internal/template/drawer/interfaces.js.map +1 -1
- package/lib/internal/template/drawer/styles.css.js +6 -5
- package/lib/internal/template/drawer/styles.scoped.css +23 -10
- package/lib/internal/template/drawer/styles.selectors.js +6 -5
- package/lib/internal/template/i18n/provider.js +2 -2
- package/lib/internal/template/i18n/provider.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/index.js +2 -2
- package/lib/internal/template/internal/components/drag-handle/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts +2 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js +8 -2
- package/lib/internal/template/internal/components/drag-handle-wrapper/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.d.ts +2 -0
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/interfaces.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.d.ts.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.js +2 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/portal-overlay.js.map +1 -1
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/theming/index.cjs +4 -0
- package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +18 -0
- package/lib/internal/template/internal/generated/theming/index.d.ts +18 -0
- package/lib/internal/template/internal/generated/theming/index.js +4 -0
- package/lib/internal/template/internal/hooks/use-base-component/index.d.ts.map +1 -1
- package/lib/internal/template/internal/hooks/use-base-component/index.js +8 -5
- package/lib/internal/template/internal/hooks/use-base-component/index.js.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/alert-flash-content.d.ts +2 -0
- package/lib/internal/template/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/alert-flash-content.js.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +6 -0
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.js +17 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
- package/lib/internal/template/internal/plugins/helpers/use-discovered-content.d.ts +7 -7
- package/lib/internal/template/internal/plugins/helpers/use-discovered-content.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/helpers/use-discovered-content.js +5 -2
- package/lib/internal/template/internal/plugins/helpers/use-discovered-content.js.map +1 -1
- package/lib/internal/template/link/styles.css.js +20 -20
- package/lib/internal/template/link/styles.scoped.css +73 -71
- package/lib/internal/template/link/styles.selectors.js +20 -20
- package/lib/internal/template/popover/container.d.ts.map +1 -1
- package/lib/internal/template/popover/container.js +20 -7
- package/lib/internal/template/popover/container.js.map +1 -1
- package/lib/internal/template/table/body-cell/inline-editor.d.ts.map +1 -1
- package/lib/internal/template/table/body-cell/inline-editor.js +2 -1
- package/lib/internal/template/table/body-cell/inline-editor.js.map +1 -1
- package/lib/internal/template/test-utils/dom/drawer/index.d.ts +1 -0
- package/lib/internal/template/test-utils/dom/drawer/index.js +3 -0
- package/lib/internal/template/test-utils/dom/drawer/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/drawer/index.d.ts +1 -0
- package/lib/internal/template/test-utils/selectors/drawer/index.js +3 -0
- package/lib/internal/template/test-utils/selectors/drawer/index.js.map +1 -1
- package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/internal/template/internal/hooks/use-telemetry/index.d.ts +0 -3
- package/lib/internal/template/internal/hooks/use-telemetry/index.d.ts.map +0 -1
- package/lib/internal/template/internal/hooks/use-telemetry/index.js +0 -12
- package/lib/internal/template/internal/hooks/use-telemetry/index.js.map +0 -1
|
@@ -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_ula7o_145:not(#\9) {
|
|
146
146
|
border-collapse: separate;
|
|
147
147
|
border-spacing: 0;
|
|
148
148
|
box-sizing: border-box;
|
|
@@ -188,30 +188,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
188
188
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
189
189
|
}
|
|
190
190
|
@media (prefers-reduced-motion: reduce) {
|
|
191
|
-
.
|
|
191
|
+
.awsui_link_4c84z_ula7o_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_ula7o_145:not(#\9), .awsui-mode-entering .awsui_link_4c84z_ula7o_145:not(#\9) {
|
|
197
197
|
animation: none;
|
|
198
198
|
transition: none;
|
|
199
199
|
}
|
|
200
|
-
.
|
|
200
|
+
.awsui_link_4c84z_ula7o_145:not(#\9):hover {
|
|
201
201
|
cursor: pointer;
|
|
202
202
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
203
203
|
}
|
|
204
|
-
.
|
|
204
|
+
.awsui_link_4c84z_ula7o_145:not(#\9):focus {
|
|
205
205
|
outline: none;
|
|
206
206
|
}
|
|
207
|
-
.
|
|
207
|
+
.awsui_link_4c84z_ula7o_145:not(#\9):active {
|
|
208
208
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
209
209
|
}
|
|
210
|
-
.
|
|
210
|
+
.awsui_link_4c84z_ula7o_145:not(#\9):active, .awsui_link_4c84z_ula7o_145:not(#\9):focus, .awsui_link_4c84z_ula7o_145:not(#\9):hover {
|
|
211
211
|
text-decoration-line: underline;
|
|
212
212
|
text-decoration-color: currentColor;
|
|
213
213
|
}
|
|
214
|
-
.
|
|
214
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9) {
|
|
215
215
|
-webkit-font-smoothing: inherit;
|
|
216
216
|
-moz-osx-font-smoothing: inherit;
|
|
217
217
|
color: var(--color-text-link-default-kjmmv0, #0073bb);
|
|
@@ -225,30 +225,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
225
225
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
226
226
|
}
|
|
227
227
|
@media (prefers-reduced-motion: reduce) {
|
|
228
|
-
.
|
|
228
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211: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_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9), .awsui-mode-entering .awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9) {
|
|
234
234
|
animation: none;
|
|
235
235
|
transition: none;
|
|
236
236
|
}
|
|
237
|
-
.
|
|
237
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9):hover {
|
|
238
238
|
cursor: pointer;
|
|
239
239
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
240
240
|
}
|
|
241
|
-
.
|
|
241
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9):focus {
|
|
242
242
|
outline: none;
|
|
243
243
|
}
|
|
244
|
-
.
|
|
244
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9):active {
|
|
245
245
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
246
246
|
}
|
|
247
|
-
.
|
|
247
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9):active, .awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9):focus, .awsui_link_4c84z_ula7o_145.awsui_variant-secondary_4c84z_ula7o_211:not(#\9):hover {
|
|
248
248
|
text-decoration-line: underline;
|
|
249
249
|
text-decoration-color: currentColor;
|
|
250
250
|
}
|
|
251
|
-
.
|
|
251
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9) {
|
|
252
252
|
color: var(--color-text-link-default-kjmmv0, #0073bb);
|
|
253
253
|
font-weight: inherit;
|
|
254
254
|
letter-spacing: normal;
|
|
@@ -260,30 +260,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
260
260
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
261
261
|
}
|
|
262
262
|
@media (prefers-reduced-motion: reduce) {
|
|
263
|
-
.
|
|
263
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246: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_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9), .awsui-mode-entering .awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9) {
|
|
269
269
|
animation: none;
|
|
270
270
|
transition: none;
|
|
271
271
|
}
|
|
272
|
-
.
|
|
272
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9):hover {
|
|
273
273
|
cursor: pointer;
|
|
274
274
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
275
275
|
}
|
|
276
|
-
.
|
|
276
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9):focus {
|
|
277
277
|
outline: none;
|
|
278
278
|
}
|
|
279
|
-
.
|
|
279
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9):active {
|
|
280
280
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
281
281
|
}
|
|
282
|
-
.
|
|
282
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9):active, .awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9):focus, .awsui_link_4c84z_ula7o_145.awsui_variant-primary_4c84z_ula7o_246:not(#\9):hover {
|
|
283
283
|
text-decoration-line: underline;
|
|
284
284
|
text-decoration-color: currentColor;
|
|
285
285
|
}
|
|
286
|
-
.
|
|
286
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9) {
|
|
287
287
|
-webkit-font-smoothing: var(--font-smoothing-webkit-px4az4, auto);
|
|
288
288
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-ev3sgf, auto);
|
|
289
289
|
color: var(--color-text-link-default-kjmmv0, #0073bb);
|
|
@@ -297,30 +297,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
297
297
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
298
298
|
}
|
|
299
299
|
@media (prefers-reduced-motion: reduce) {
|
|
300
|
-
.
|
|
300
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279: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_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9), .awsui-mode-entering .awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9) {
|
|
306
306
|
animation: none;
|
|
307
307
|
transition: none;
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9):hover {
|
|
310
310
|
cursor: pointer;
|
|
311
311
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
312
312
|
}
|
|
313
|
-
.
|
|
313
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9):focus {
|
|
314
314
|
outline: none;
|
|
315
315
|
}
|
|
316
|
-
.
|
|
316
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9):active {
|
|
317
317
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
318
318
|
}
|
|
319
|
-
.
|
|
319
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9):active, .awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9):focus, .awsui_link_4c84z_ula7o_145.awsui_variant-info_4c84z_ula7o_279:not(#\9):hover {
|
|
320
320
|
text-decoration-line: underline;
|
|
321
321
|
text-decoration-color: var(--color-text-link-button-underline-hover-s0fj6r, currentColor);
|
|
322
322
|
}
|
|
323
|
-
.
|
|
323
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9) {
|
|
324
324
|
color: var(--color-text-link-default-kjmmv0, #0073bb);
|
|
325
325
|
font-weight: var(--font-box-value-large-weight-zc1blz, 300);
|
|
326
326
|
text-decoration-line: underline;
|
|
@@ -331,30 +331,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
331
331
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
332
332
|
}
|
|
333
333
|
@media (prefers-reduced-motion: reduce) {
|
|
334
|
-
.
|
|
334
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314: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_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9), .awsui-mode-entering .awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9) {
|
|
340
340
|
animation: none;
|
|
341
341
|
transition: none;
|
|
342
342
|
}
|
|
343
|
-
.
|
|
343
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9):hover {
|
|
344
344
|
cursor: pointer;
|
|
345
345
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
346
346
|
}
|
|
347
|
-
.
|
|
347
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9):focus {
|
|
348
348
|
outline: none;
|
|
349
349
|
}
|
|
350
|
-
.
|
|
350
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9):active {
|
|
351
351
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
352
352
|
}
|
|
353
|
-
.
|
|
353
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9):active, .awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9):focus, .awsui_link_4c84z_ula7o_145.awsui_variant-value-large_4c84z_ula7o_314:not(#\9):hover {
|
|
354
354
|
text-decoration-line: underline;
|
|
355
355
|
text-decoration-color: currentColor;
|
|
356
356
|
}
|
|
357
|
-
.
|
|
357
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9) {
|
|
358
|
+
-webkit-font-smoothing: var(--font-smoothing-webkit-px4az4, auto);
|
|
359
|
+
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-ev3sgf, auto);
|
|
358
360
|
color: var(--color-text-interactive-default-mf3cev, #545b64);
|
|
359
361
|
font-weight: 700;
|
|
360
362
|
letter-spacing: 0.005em;
|
|
@@ -366,30 +368,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
366
368
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
367
369
|
}
|
|
368
370
|
@media (prefers-reduced-motion: reduce) {
|
|
369
|
-
.
|
|
371
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9) {
|
|
370
372
|
animation: none;
|
|
371
373
|
transition: none;
|
|
372
374
|
}
|
|
373
375
|
}
|
|
374
|
-
.awsui-motion-disabled .
|
|
376
|
+
.awsui-motion-disabled .awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9), .awsui-mode-entering .awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9) {
|
|
375
377
|
animation: none;
|
|
376
378
|
transition: none;
|
|
377
379
|
}
|
|
378
|
-
.
|
|
380
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9):hover {
|
|
379
381
|
cursor: pointer;
|
|
380
382
|
color: var(--color-text-interactive-hover-kceoak, #16191f);
|
|
381
383
|
}
|
|
382
|
-
.
|
|
384
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9):focus {
|
|
383
385
|
outline: none;
|
|
384
386
|
}
|
|
385
|
-
.
|
|
387
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9):active {
|
|
386
388
|
color: var(--color-text-interactive-active-8tdg02, #16191f);
|
|
387
389
|
}
|
|
388
|
-
.
|
|
390
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9):active, .awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9):focus, .awsui_link_4c84z_ula7o_145.awsui_variant-top-navigation_4c84z_ula7o_346:not(#\9):hover {
|
|
389
391
|
text-decoration-line: underline;
|
|
390
392
|
text-decoration-color: transparent;
|
|
391
393
|
}
|
|
392
|
-
.
|
|
394
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9) {
|
|
393
395
|
color: var(--color-text-link-default-kjmmv0, #0073bb);
|
|
394
396
|
font-weight: var(--font-link-button-weight-bnpz8h, 400);
|
|
395
397
|
letter-spacing: var(--font-link-button-letter-spacing-yobz7z, normal);
|
|
@@ -401,30 +403,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
401
403
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
402
404
|
}
|
|
403
405
|
@media (prefers-reduced-motion: reduce) {
|
|
404
|
-
.
|
|
406
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9) {
|
|
405
407
|
animation: none;
|
|
406
408
|
transition: none;
|
|
407
409
|
}
|
|
408
410
|
}
|
|
409
|
-
.awsui-motion-disabled .
|
|
411
|
+
.awsui-motion-disabled .awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9), .awsui-mode-entering .awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9) {
|
|
410
412
|
animation: none;
|
|
411
413
|
transition: none;
|
|
412
414
|
}
|
|
413
|
-
.
|
|
415
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9):hover {
|
|
414
416
|
cursor: pointer;
|
|
415
417
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
416
418
|
}
|
|
417
|
-
.
|
|
419
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9):focus {
|
|
418
420
|
outline: none;
|
|
419
421
|
}
|
|
420
|
-
.
|
|
422
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9):active {
|
|
421
423
|
color: var(--color-text-link-hover-05b2tl, #0a4a74);
|
|
422
424
|
}
|
|
423
|
-
.
|
|
425
|
+
.awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9):active, .awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9):focus, .awsui_link_4c84z_ula7o_145.awsui_variant-recovery_4c84z_ula7o_381:not(#\9):hover {
|
|
424
426
|
text-decoration-line: underline;
|
|
425
427
|
text-decoration-color: var(--color-text-link-button-underline-hover-s0fj6r, currentColor);
|
|
426
428
|
}
|
|
427
|
-
.
|
|
429
|
+
.awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9) {
|
|
428
430
|
-webkit-font-smoothing: var(--font-smoothing-webkit-px4az4, auto);
|
|
429
431
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-ev3sgf, auto);
|
|
430
432
|
color: var(--color-text-link-button-normal-default-7njzn7, #545b64);
|
|
@@ -438,40 +440,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
438
440
|
transition-duration: var(--motion-duration-refresh-only-medium-h3wrr6, 0ms);
|
|
439
441
|
}
|
|
440
442
|
@media (prefers-reduced-motion: reduce) {
|
|
441
|
-
.
|
|
443
|
+
.awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9) {
|
|
442
444
|
animation: none;
|
|
443
445
|
transition: none;
|
|
444
446
|
}
|
|
445
447
|
}
|
|
446
|
-
.awsui-motion-disabled .
|
|
448
|
+
.awsui-motion-disabled .awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9), .awsui-mode-entering .awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9) {
|
|
447
449
|
animation: none;
|
|
448
450
|
transition: none;
|
|
449
451
|
}
|
|
450
|
-
.
|
|
452
|
+
.awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9):hover {
|
|
451
453
|
cursor: pointer;
|
|
452
454
|
color: var(--color-text-link-button-normal-hover-1v61nm, #16191f);
|
|
453
455
|
}
|
|
454
|
-
.
|
|
456
|
+
.awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9):focus {
|
|
455
457
|
outline: none;
|
|
456
458
|
}
|
|
457
|
-
.
|
|
459
|
+
.awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9):active {
|
|
458
460
|
color: var(--color-text-link-button-normal-active-4k7lx5, #16191f);
|
|
459
461
|
}
|
|
460
|
-
.
|
|
462
|
+
.awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9):active, .awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9):focus, .awsui_link_4c84z_ula7o_145.awsui_button_4c84z_ula7o_414:not(#\9):hover {
|
|
461
463
|
text-decoration-line: underline;
|
|
462
464
|
text-decoration-color: transparent;
|
|
463
465
|
}
|
|
464
|
-
.
|
|
466
|
+
.awsui_link_4c84z_ula7o_145.awsui_color-inverted_4c84z_ula7o_449:not(#\9) {
|
|
465
467
|
color: var(--color-text-notification-default-fmebm4, #fafafa);
|
|
466
468
|
}
|
|
467
|
-
.
|
|
469
|
+
.awsui_link_4c84z_ula7o_145.awsui_color-inverted_4c84z_ula7o_449:not(#\9):not(.awsui_button_4c84z_ula7o_414) {
|
|
468
470
|
text-decoration-line: underline;
|
|
469
471
|
text-decoration-color: currentColor;
|
|
470
472
|
}
|
|
471
|
-
.
|
|
473
|
+
.awsui_link_4c84z_ula7o_145.awsui_color-inverted_4c84z_ula7o_449:not(#\9):hover {
|
|
472
474
|
color: var(--color-text-link-inverted-hover-7jk1d1, #fafafa);
|
|
473
475
|
}
|
|
474
|
-
body[data-awsui-focus-visible=true] .
|
|
476
|
+
body[data-awsui-focus-visible=true] .awsui_link_4c84z_ula7o_145:not(#\9):focus {
|
|
475
477
|
outline: thin dotted;
|
|
476
478
|
outline: var(--border-link-focus-ring-outline-c5423y, 5px auto Highlight);
|
|
477
479
|
outline-offset: 2px;
|
|
@@ -482,61 +484,61 @@ body[data-awsui-focus-visible=true] .awsui_link_4c84z_1x9wg_145:not(#\9):focus {
|
|
|
482
484
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-9xsko1, 2px);
|
|
483
485
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-woh62o, 0px) var(--color-border-item-focused-vx5mpq, #0073bb);
|
|
484
486
|
}
|
|
485
|
-
.
|
|
487
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-body-s_4c84z_ula7o_470:not(#\9) {
|
|
486
488
|
font-size: var(--font-size-body-s-psgqn2, 12px);
|
|
487
489
|
line-height: var(--line-height-body-s-otgtsr, 16px);
|
|
488
490
|
letter-spacing: var(--letter-spacing-body-s-egrcsd, normal);
|
|
489
491
|
text-underline-offset: 0.3em;
|
|
490
492
|
text-decoration-thickness: 1px;
|
|
491
493
|
}
|
|
492
|
-
.
|
|
494
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-body-m_4c84z_ula7o_477:not(#\9) {
|
|
493
495
|
font-size: var(--font-size-body-m-vv54cm, 14px);
|
|
494
496
|
line-height: var(--line-height-body-m-bedeoh, 22px);
|
|
495
497
|
text-underline-offset: 0.25em;
|
|
496
498
|
text-decoration-thickness: 1px;
|
|
497
499
|
}
|
|
498
|
-
.
|
|
500
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-heading-xs_4c84z_ula7o_483:not(#\9) {
|
|
499
501
|
font-size: var(--font-size-heading-xs-c20ika, 16px);
|
|
500
502
|
line-height: var(--line-height-heading-xs-fuzanp, 20px);
|
|
501
503
|
text-underline-offset: 0.25em;
|
|
502
504
|
text-decoration-thickness: 1px;
|
|
503
505
|
}
|
|
504
|
-
.
|
|
506
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-heading-s_4c84z_ula7o_489:not(#\9) {
|
|
505
507
|
font-size: var(--font-size-heading-s-yde02v, 16px);
|
|
506
508
|
line-height: var(--line-height-heading-s-j2axh8, 20px);
|
|
507
509
|
letter-spacing: var(--letter-spacing-heading-s-696sxe, normal);
|
|
508
510
|
text-underline-offset: 0.3em;
|
|
509
511
|
text-decoration-thickness: 1px;
|
|
510
512
|
}
|
|
511
|
-
.
|
|
513
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-heading-m_4c84z_ula7o_496:not(#\9) {
|
|
512
514
|
font-size: var(--font-size-heading-m-56jjln, 18px);
|
|
513
515
|
line-height: var(--line-height-heading-m-irezqt, 22px);
|
|
514
516
|
letter-spacing: var(--letter-spacing-heading-m-93y02s, normal);
|
|
515
517
|
text-underline-offset: 0.25em;
|
|
516
518
|
text-decoration-thickness: 1px;
|
|
517
519
|
}
|
|
518
|
-
.
|
|
520
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-heading-l_4c84z_ula7o_503:not(#\9) {
|
|
519
521
|
font-size: var(--font-size-heading-l-qgg2za, 18px);
|
|
520
522
|
line-height: var(--line-height-heading-l-vhgtnq, 22px);
|
|
521
523
|
letter-spacing: var(--letter-spacing-heading-l-spdx5v, normal);
|
|
522
524
|
text-underline-offset: 0.25em;
|
|
523
525
|
text-decoration-thickness: 1px;
|
|
524
526
|
}
|
|
525
|
-
.
|
|
527
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-heading-xl_4c84z_ula7o_510:not(#\9) {
|
|
526
528
|
font-size: var(--font-size-heading-xl-w5di2k, 28px);
|
|
527
529
|
line-height: var(--line-height-heading-xl-vs1f23, 36px);
|
|
528
530
|
letter-spacing: var(--letter-spacing-heading-xl-33zwds, normal);
|
|
529
531
|
text-underline-offset: 0.25em;
|
|
530
532
|
text-decoration-thickness: 1px;
|
|
531
533
|
}
|
|
532
|
-
.
|
|
534
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-display-l_4c84z_ula7o_517:not(#\9) {
|
|
533
535
|
font-size: var(--font-size-display-l-h1h1h9, 44px);
|
|
534
536
|
line-height: var(--line-height-display-l-3zghmm, 56px);
|
|
535
537
|
letter-spacing: var(--letter-spacing-display-l-dniym1, normal);
|
|
536
538
|
text-underline-offset: 0.25em;
|
|
537
539
|
text-decoration-thickness: 2px;
|
|
538
540
|
}
|
|
539
|
-
.
|
|
541
|
+
.awsui_link_4c84z_ula7o_145.awsui_font-size-inherit_4c84z_ula7o_524:not(#\9) {
|
|
540
542
|
font-size: inherit;
|
|
541
543
|
line-height: inherit;
|
|
542
544
|
letter-spacing: inherit;
|
|
@@ -544,10 +546,10 @@ body[data-awsui-focus-visible=true] .awsui_link_4c84z_1x9wg_145:not(#\9):focus {
|
|
|
544
546
|
text-decoration-thickness: 1px;
|
|
545
547
|
}
|
|
546
548
|
|
|
547
|
-
.awsui_icon-
|
|
549
|
+
.awsui_icon-wrapper_4c84z_ula7o_532:not(#\9) {
|
|
548
550
|
white-space: nowrap;
|
|
549
551
|
}
|
|
550
552
|
|
|
551
|
-
.
|
|
553
|
+
.awsui_icon_4c84z_ula7o_532:not(#\9) {
|
|
552
554
|
display: inline-block;
|
|
553
555
|
}
|
|
@@ -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_ula7o_145",
|
|
6
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_ula7o_211",
|
|
7
|
+
"variant-primary": "awsui_variant-primary_4c84z_ula7o_246",
|
|
8
|
+
"variant-info": "awsui_variant-info_4c84z_ula7o_279",
|
|
9
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_ula7o_314",
|
|
10
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_ula7o_346",
|
|
11
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_ula7o_381",
|
|
12
|
+
"button": "awsui_button_4c84z_ula7o_414",
|
|
13
|
+
"color-inverted": "awsui_color-inverted_4c84z_ula7o_449",
|
|
14
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_ula7o_470",
|
|
15
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_ula7o_477",
|
|
16
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_ula7o_483",
|
|
17
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_ula7o_489",
|
|
18
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_ula7o_496",
|
|
19
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_ula7o_503",
|
|
20
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_ula7o_510",
|
|
21
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_ula7o_517",
|
|
22
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_ula7o_524",
|
|
23
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_ula7o_532",
|
|
24
|
+
"icon": "awsui_icon_4c84z_ula7o_532"
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../src/popover/container.tsx"],"names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;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,QAAQ,EACR,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EACR,mBAAmB,EACnB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,SAAS,GACV,EAAE,qBAAqB,sBAiIvB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
1
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
4
|
import React, { useLayoutEffect, useRef } from 'react';
|
|
@@ -50,10 +51,9 @@ export default function PopoverContainer({ position, trackRef, getTrack: externa
|
|
|
50
51
|
/*
|
|
51
52
|
This is a heuristic. Some layout changes are caused by user clicks (e.g. toggling the tools panel, submitting a form),
|
|
52
53
|
and by tracking the click event we can adapt the popover's position to the new layout.
|
|
53
|
-
|
|
54
|
-
TODO: extend this to Enter and Spacebar?
|
|
55
54
|
*/
|
|
56
|
-
const
|
|
55
|
+
const controller = new AbortController();
|
|
56
|
+
const onClick = (event) => __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
if (
|
|
58
58
|
// Do not update position if keepPosition is true.
|
|
59
59
|
keepPosition ||
|
|
@@ -62,13 +62,26 @@ export default function PopoverContainer({ position, trackRef, getTrack: externa
|
|
|
62
62
|
nodeContains(getTrack.current(), event.target)) {
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
// Continuously update the popover position for one second to account for any layout changes
|
|
66
|
+
// and animations. On browsers where `requestIdleCallback` is supported,
|
|
67
|
+
// this runs only while the CPU is otherwise idle. In other browsers (mainly Safari), we call it
|
|
68
|
+
// with a low frequency.
|
|
69
|
+
const targetTime = performance.now() + 1000;
|
|
70
|
+
while (performance.now() < targetTime) {
|
|
71
|
+
if (controller.signal.aborted) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
66
74
|
updatePositionHandler();
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
if (typeof requestIdleCallback !== 'undefined') {
|
|
76
|
+
yield new Promise(r => requestIdleCallback(r));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
yield new Promise(r => setTimeout(r, 50));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
69
83
|
const updatePositionOnResize = () => requestAnimationFrame(() => updatePositionHandler());
|
|
70
84
|
const refreshPosition = () => requestAnimationFrame(() => positionHandlerRef.current());
|
|
71
|
-
const controller = new AbortController();
|
|
72
85
|
window.addEventListener('click', onClick, { signal: controller.signal });
|
|
73
86
|
window.addEventListener('resize', updatePositionOnResize, { signal: controller.signal });
|
|
74
87
|
window.addEventListener('scroll', refreshPosition, { capture: true, signal: controller.signal });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/popover/container.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAE3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqCrC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,QAAQ,EACR,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EACR,mBAAmB,EACnB,KAAK,EACL,QAAQ,EACR,MAAM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AC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC9B,6BACE,GAAG,EAAE,UAAU,EACf,KAAK,kCAAO,YAAY,KAAE,MAAM,KAChC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,IAAI,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC;QAEzE,6BACE,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,4BAA4B,gBAAgB,EAAE,CAAC,CAAC,iBACrF,IAAI,IAEhB,KAAK,CAAC,gBAAgB,CAAC,CACpB;QAEN,6BACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,uBAAuB,IAAI,EAAE,CAAC,EAAE;gBAC/E,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,UAAU;gBACnC,CAAC,MAAM,CAAC,0BAA0B,OAAO,EAAE,CAAC,CAAC,EAAE,OAAO;aACvD,CAAC,IAED,SAAS,CAAC,CAAC,CAAC,CACX,6BAAK,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC;YAClC,6BAAK,GAAG,EAAE,UAAU,IAAG,QAAQ,CAAO,CAClC,CACP,CAAC,CAAC,CAAC,CACF,6BAAK,GAAG,EAAE,UAAU,IAAG,QAAQ,CAAO,CACvC,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { InternalPosition, PopoverProps } from './interfaces';\nimport usePopoverPosition from './use-popover-position.js';\n\nimport styles from './styles.css.js';\n\ninterface PopoverContainerProps {\n /** References the element the container is positioned against. */\n trackRef?: React.RefObject<HTMLElement | SVGElement>;\n getTrack?: () => null | HTMLElement | SVGElement;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n minVisibleBlockSize?: number;\n position: PopoverProps.Position;\n zIndex?: React.CSSProperties['zIndex'];\n arrow: (position: InternalPosition | null) => React.ReactNode;\n children: React.ReactNode;\n renderWithPortal?: boolean;\n size: PopoverProps.Size | 'content';\n fixedWidth: boolean;\n variant?: 'annotation';\n // When keepPosition is true, the popover will not recalculate its position when it resizes nor when it receives clicks.\n keepPosition?: boolean;\n // When allowScrollToFit is true, we will scroll to the the popover if it overflows the viewport even when choosing the best possible position for it.\n // Do not use this if the popover is open on hover, in order to avoid unexpected movement.\n allowScrollToFit?: boolean;\n allowVerticalOverflow?: boolean;\n // Whether the popover should be hidden when the trigger is scrolled away.\n hideOnOverscroll?: boolean;\n hoverArea?: boolean;\n className?: string;\n}\n\nexport default function PopoverContainer({\n position,\n trackRef,\n getTrack: externalGetTrack,\n trackKey,\n minVisibleBlockSize,\n arrow,\n children,\n zIndex,\n renderWithPortal,\n size,\n fixedWidth,\n variant,\n keepPosition,\n allowScrollToFit,\n allowVerticalOverflow,\n hideOnOverscroll,\n hoverArea,\n className,\n}: PopoverContainerProps) {\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const getTrack = useRef(() => {\n if (trackRef) {\n return trackRef.current;\n }\n if (externalGetTrack) {\n return externalGetTrack();\n }\n throw new Error('Invariant violation: must provide either trackRef or getTrack.');\n });\n\n // Updates the position handler.\n const { updatePositionHandler, popoverStyle, internalPosition, positionHandlerRef, isOverscrolling } =\n usePopoverPosition({\n popoverRef,\n bodyRef,\n arrowRef,\n getTrack: getTrack.current,\n contentRef,\n allowScrollToFit,\n allowVerticalOverflow,\n preferredPosition: position,\n renderWithPortal,\n keepPosition,\n hideOnOverscroll,\n minVisibleBlockSize,\n });\n\n // Recalculate position when properties change.\n useLayoutEffect(() => {\n updatePositionHandler();\n }, [updatePositionHandler, trackKey]);\n\n // Recalculate position when content size changes.\n useResizeObserver(contentRef, () => {\n updatePositionHandler(true);\n });\n\n // Recalculate position on DOM events.\n useLayoutEffect(() => {\n /*\n This is a heuristic. Some layout changes are caused by user clicks (e.g. toggling the tools panel, submitting a form),\n and by tracking the click event we can adapt the popover's position to the new layout.\n\n TODO: extend this to Enter and Spacebar?\n */\n\n const onClick = (event: UIEvent | KeyboardEvent) => {\n if (\n // Do not update position if keepPosition is true.\n keepPosition ||\n // If the click was on the trigger, this will make the popover appear or disappear,\n // so no need to update its position either in this case.\n nodeContains(getTrack.current(), event.target)\n ) {\n return;\n }\n\n requestAnimationFrame(() => {\n updatePositionHandler();\n });\n };\n\n const updatePositionOnResize = () => requestAnimationFrame(() => updatePositionHandler());\n const refreshPosition = () => requestAnimationFrame(() => positionHandlerRef.current());\n const controller = new AbortController();\n\n window.addEventListener('click', onClick, { signal: controller.signal });\n window.addEventListener('resize', updatePositionOnResize, { signal: controller.signal });\n window.addEventListener('scroll', refreshPosition, { capture: true, signal: controller.signal });\n\n return () => {\n controller.abort();\n };\n }, [hideOnOverscroll, keepPosition, positionHandlerRef, trackRef, updatePositionHandler]);\n\n return isOverscrolling ? null : (\n <div\n ref={popoverRef}\n style={{ ...popoverStyle, zIndex }}\n className={clsx(styles.container, isRefresh && styles.refresh, className)}\n >\n <div\n ref={arrowRef}\n className={clsx(styles[`container-arrow`], styles[`container-arrow-position-${internalPosition}`])}\n aria-hidden={true}\n >\n {arrow(internalPosition)}\n </div>\n\n <div\n ref={bodyRef}\n className={clsx(styles['container-body'], styles[`container-body-size-${size}`], {\n [styles['fixed-width']]: fixedWidth,\n [styles[`container-body-variant-${variant}`]]: variant,\n })}\n >\n {hoverArea ? (\n <div className={styles['hover-area']}>\n <div ref={contentRef}>{children}</div>\n </div>\n ) : (\n <div ref={contentRef}>{children}</div>\n )}\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/popover/container.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAE3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqCrC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,QAAQ,EACR,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EACR,mBAAmB,EACnB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,SAAS,GACa;IACtB,MAAM,OAAO,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAErD,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAA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E,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAE1F,OAAO,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC9B,6BACE,GAAG,EAAE,UAAU,EACf,KAAK,kCAAO,YAAY,KAAE,MAAM,KAChC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,IAAI,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC;QAEzE,6BACE,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,4BAA4B,gBAAgB,EAAE,CAAC,CAAC,iBACrF,IAAI,IAEhB,KAAK,CAAC,gBAAgB,CAAC,CACpB;QAEN,6BACE,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,uBAAuB,IAAI,EAAE,CAAC,EAAE;gBAC/E,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,UAAU;gBACnC,CAAC,MAAM,CAAC,0BAA0B,OAAO,EAAE,CAAC,CAAC,EAAE,OAAO;aACvD,CAAC,IAED,SAAS,CAAC,CAAC,CAAC,CACX,6BAAK,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC;YAClC,6BAAK,GAAG,EAAE,UAAU,IAAG,QAAQ,CAAO,CAClC,CACP,CAAC,CAAC,CAAC,CACF,6BAAK,GAAG,EAAE,UAAU,IAAG,QAAQ,CAAO,CACvC,CACG,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { InternalPosition, PopoverProps } from './interfaces';\nimport usePopoverPosition from './use-popover-position.js';\n\nimport styles from './styles.css.js';\n\ninterface PopoverContainerProps {\n /** References the element the container is positioned against. */\n trackRef?: React.RefObject<HTMLElement | SVGElement>;\n getTrack?: () => null | HTMLElement | SVGElement;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n minVisibleBlockSize?: number;\n position: PopoverProps.Position;\n zIndex?: React.CSSProperties['zIndex'];\n arrow: (position: InternalPosition | null) => React.ReactNode;\n children: React.ReactNode;\n renderWithPortal?: boolean;\n size: PopoverProps.Size | 'content';\n fixedWidth: boolean;\n variant?: 'annotation';\n // When keepPosition is true, the popover will not recalculate its position when it resizes nor when it receives clicks.\n keepPosition?: boolean;\n // When allowScrollToFit is true, we will scroll to the the popover if it overflows the viewport even when choosing the best possible position for it.\n // Do not use this if the popover is open on hover, in order to avoid unexpected movement.\n allowScrollToFit?: boolean;\n allowVerticalOverflow?: boolean;\n // Whether the popover should be hidden when the trigger is scrolled away.\n hideOnOverscroll?: boolean;\n hoverArea?: boolean;\n className?: string;\n}\n\nexport default function PopoverContainer({\n position,\n trackRef,\n getTrack: externalGetTrack,\n trackKey,\n minVisibleBlockSize,\n arrow,\n children,\n zIndex,\n renderWithPortal,\n size,\n fixedWidth,\n variant,\n keepPosition,\n allowScrollToFit,\n allowVerticalOverflow,\n hideOnOverscroll,\n hoverArea,\n className,\n}: PopoverContainerProps) {\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const isRefresh = useVisualRefresh();\n\n const getTrack = useRef(() => {\n if (trackRef) {\n return trackRef.current;\n }\n if (externalGetTrack) {\n return externalGetTrack();\n }\n throw new Error('Invariant violation: must provide either trackRef or getTrack.');\n });\n\n // Updates the position handler.\n const { updatePositionHandler, popoverStyle, internalPosition, positionHandlerRef, isOverscrolling } =\n usePopoverPosition({\n popoverRef,\n bodyRef,\n arrowRef,\n getTrack: getTrack.current,\n contentRef,\n allowScrollToFit,\n allowVerticalOverflow,\n preferredPosition: position,\n renderWithPortal,\n keepPosition,\n hideOnOverscroll,\n minVisibleBlockSize,\n });\n\n // Recalculate position when properties change.\n useLayoutEffect(() => {\n updatePositionHandler();\n }, [updatePositionHandler, trackKey]);\n\n // Recalculate position when content size changes.\n useResizeObserver(contentRef, () => {\n updatePositionHandler(true);\n });\n\n // Recalculate position on DOM events.\n useLayoutEffect(() => {\n /*\n This is a heuristic. Some layout changes are caused by user clicks (e.g. toggling the tools panel, submitting a form),\n and by tracking the click event we can adapt the popover's position to the new layout.\n */\n\n const controller = new AbortController();\n\n const onClick = async (event: UIEvent | KeyboardEvent) => {\n if (\n // Do not update position if keepPosition is true.\n keepPosition ||\n // If the click was on the trigger, this will make the popover appear or disappear,\n // so no need to update its position either in this case.\n nodeContains(getTrack.current(), event.target)\n ) {\n return;\n }\n\n // Continuously update the popover position for one second to account for any layout changes\n // and animations. On browsers where `requestIdleCallback` is supported,\n // this runs only while the CPU is otherwise idle. In other browsers (mainly Safari), we call it\n // with a low frequency.\n const targetTime = performance.now() + 1_000;\n\n while (performance.now() < targetTime) {\n if (controller.signal.aborted) {\n break;\n }\n\n updatePositionHandler();\n\n if (typeof requestIdleCallback !== 'undefined') {\n await new Promise(r => requestIdleCallback(r));\n } else {\n await new Promise(r => setTimeout(r, 50));\n }\n }\n };\n\n const updatePositionOnResize = () => requestAnimationFrame(() => updatePositionHandler());\n const refreshPosition = () => requestAnimationFrame(() => positionHandlerRef.current());\n\n window.addEventListener('click', onClick, { signal: controller.signal });\n window.addEventListener('resize', updatePositionOnResize, { signal: controller.signal });\n window.addEventListener('scroll', refreshPosition, { capture: true, signal: controller.signal });\n\n return () => {\n controller.abort();\n };\n }, [hideOnOverscroll, keepPosition, positionHandlerRef, trackRef, updatePositionHandler]);\n\n return isOverscrolling ? null : (\n <div\n ref={popoverRef}\n style={{ ...popoverStyle, zIndex }}\n className={clsx(styles.container, isRefresh && styles.refresh, className)}\n >\n <div\n ref={arrowRef}\n className={clsx(styles[`container-arrow`], styles[`container-arrow-position-${internalPosition}`])}\n aria-hidden={true}\n >\n {arrow(internalPosition)}\n </div>\n\n <div\n ref={bodyRef}\n className={clsx(styles['container-body'], styles[`container-body-size-${size}`], {\n [styles['fixed-width']]: fixedWidth,\n [styles[`container-body-variant-${variant}`]]: variant,\n })}\n >\n {hoverArea ? (\n <div className={styles['hover-area']}>\n <div ref={contentRef}>{children}</div>\n </div>\n ) : (\n <div ref={contentRef}>{children}</div>\n )}\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-editor.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/inline-editor.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,UAAU,gBAAgB;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,iBAAiB,CAAC,QAAQ;IAClC,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,EACrC,UAAU,EACV,IAAI,EACJ,MAAM,EACN,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,iBAAiB,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"inline-editor.d.ts","sourceRoot":"","sources":["../../../../src/table/body-cell/inline-editor.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,UAAU,gBAAgB;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,iBAAiB,CAAC,QAAQ;IAClC,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,EACrC,UAAU,EACV,IAAI,EACJ,MAAM,EACN,SAAS,EACT,UAAU,EACV,UAAU,GACX,EAAE,iBAAiB,CAAC,QAAQ,CAAC,eA2H7B"}
|
|
@@ -31,7 +31,8 @@ export function InlineEditor({ ariaLabels, item, column, onEditEnd, submitEdit,
|
|
|
31
31
|
function onSubmitClick(evt) {
|
|
32
32
|
var _a;
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
evt.preventDefault();
|
|
34
|
+
evt.preventDefault(); // Prevents the form from navigating away
|
|
35
|
+
evt.stopPropagation(); // Prevents any outer form elements from submitting
|
|
35
36
|
if (currentEditValue === undefined) {
|
|
36
37
|
finishEdit();
|
|
37
38
|
return;
|