@ionic/core 7.7.2-dev.11707881769.185d2a14 → 7.7.2-dev.11707926434.1affaed4
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/components/action-sheet.js +3 -7
- package/components/alert.js +2 -6
- package/components/data.js +28 -38
- package/components/ion-datetime-button.js +11 -10
- package/components/ion-datetime.js +68 -7
- package/components/ion-loading.js +2 -6
- package/components/ion-modal.js +3 -7
- package/components/ion-picker.js +2 -6
- package/components/ion-toast.js +2 -6
- package/components/item.js +12 -3
- package/components/overlays.js +4 -54
- package/components/popover.js +2 -6
- package/dist/cjs/{app-globals-92ad1b3d.js → app-globals-5a17c5e1.js} +1 -1
- package/dist/cjs/{button-active-2d6520ec.js → button-active-b8c3f603.js} +1 -1
- package/dist/cjs/{data-a5109f09.js → data-6246812e.js} +27 -39
- package/dist/cjs/{hardware-back-button-2696acaf.js → hardware-back-button-d23873bb.js} +2 -2
- package/dist/cjs/{index-0ffe376d.js → index-5a471146.js} +22 -25
- package/dist/cjs/{index-c3580a90.js → index-84351d21.js} +3 -3
- package/dist/cjs/{index-a43f7a0f.js → index-8c679cbf.js} +2 -2
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -12
- package/dist/cjs/ion-alert.cjs.entry.js +7 -11
- package/dist/cjs/ion-app_8.cjs.entry.js +6 -6
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +13 -12
- package/dist/cjs/ion-datetime_3.cjs.entry.js +71 -17
- package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-img.cjs.entry.js +2 -2
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +2 -2
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-loading.cjs.entry.js +6 -10
- package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-modal.cjs.entry.js +8 -12
- package/dist/cjs/ion-nav_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker-column-internal.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-internal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +7 -11
- package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +6 -10
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{ionic-global-59a10130.js → ionic-global-7358c23e.js} +1 -1
- package/dist/cjs/ionic.cjs.js +7 -7
- package/dist/cjs/{ios.transition-c3b11cc3.js → ios.transition-8e40c54e.js} +2 -2
- package/dist/cjs/loader.cjs.js +6 -6
- package/dist/cjs/{md.transition-82a8c649.js → md.transition-597a2479.js} +2 -2
- package/dist/cjs/{overlays-fb7ca451.js → overlays-330df245.js} +6 -56
- package/dist/cjs/{status-tap-692f6d32.js → status-tap-b0bfea34.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/action-sheet/action-sheet.js +5 -9
- package/dist/collection/components/alert/alert.js +4 -8
- package/dist/collection/components/datetime/datetime.js +90 -7
- package/dist/collection/components/datetime/test/basic/datetime.e2e.js +79 -0
- package/dist/collection/components/datetime/test/format.spec.js +65 -1
- package/dist/collection/components/datetime/utils/format.js +28 -20
- package/dist/collection/components/datetime-button/datetime-button.js +11 -10
- package/dist/collection/components/datetime-button/test/basic/datetime-button.e2e.js +66 -0
- package/dist/collection/components/item/item.js +12 -3
- package/dist/collection/components/loading/loading.js +4 -8
- package/dist/collection/components/modal/modal.js +5 -9
- package/dist/collection/components/picker/picker.js +4 -8
- package/dist/collection/components/popover/popover.js +4 -8
- package/dist/collection/components/toast/test/toast.spec.js +0 -12
- package/dist/collection/components/toast/toast.js +4 -8
- package/dist/collection/utils/overlays.js +4 -54
- package/dist/collection/utils/test/overlays/overlays.e2e.js +0 -33
- package/dist/collection/utils/test/overlays/overlays.spec.js +0 -51
- package/dist/docs.json +66 -23
- package/dist/esm/{app-globals-5cf6195b.js → app-globals-47226a12.js} +1 -1
- package/dist/esm/{button-active-47ac8092.js → button-active-4bee452c.js} +1 -1
- package/dist/esm/{data-0f3ab200.js → data-25d50209.js} +28 -38
- package/dist/esm/{hardware-back-button-b410a047.js → hardware-back-button-f42b9c80.js} +2 -2
- package/dist/esm/{index-47b2066d.js → index-48209844.js} +2 -2
- package/dist/esm/{index-0b4beb69.js → index-4b98143d.js} +3 -3
- package/dist/esm/{index-4c30cddd.js → index-73881b51.js} +22 -25
- package/dist/esm/index.js +8 -8
- package/dist/esm/ion-accordion_2.entry.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +8 -12
- package/dist/esm/ion-alert.entry.js +7 -11
- package/dist/esm/ion-app_8.entry.js +6 -6
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +2 -2
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
- package/dist/esm/ion-button_2.entry.js +2 -2
- package/dist/esm/ion-card_5.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +13 -12
- package/dist/esm/ion-datetime_3.entry.js +71 -17
- package/dist/esm/ion-fab_3.entry.js +2 -2
- package/dist/esm/ion-img.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +2 -2
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +4 -4
- package/dist/esm/ion-loading.entry.js +6 -10
- package/dist/esm/ion-menu_3.entry.js +5 -5
- package/dist/esm/ion-modal.entry.js +8 -12
- package/dist/esm/ion-nav_2.entry.js +3 -3
- package/dist/esm/ion-picker-column-internal.entry.js +2 -2
- package/dist/esm/ion-picker-internal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +7 -11
- package/dist/esm/ion-progress-bar.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +2 -2
- package/dist/esm/ion-reorder_2.entry.js +2 -2
- package/dist/esm/ion-ripple-effect.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +4 -4
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +6 -10
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm/{ionic-global-ad9a1810.js → ionic-global-778b7863.js} +1 -1
- package/dist/esm/ionic.js +8 -8
- package/dist/esm/{ios.transition-b76c7020.js → ios.transition-7ff7381d.js} +2 -2
- package/dist/esm/loader.js +7 -7
- package/dist/esm/{md.transition-564937a7.js → md.transition-28a9a26b.js} +2 -2
- package/dist/esm/{overlays-04a9a43f.js → overlays-33ae3ea0.js} +6 -56
- package/dist/esm/{status-tap-5a95077d.js → status-tap-2b335fb7.js} +1 -1
- package/dist/esm-es5/app-globals-47226a12.js +4 -0
- package/dist/esm-es5/{button-active-47ac8092.js → button-active-4bee452c.js} +1 -1
- package/dist/esm-es5/data-25d50209.js +4 -0
- package/dist/esm-es5/{hardware-back-button-b410a047.js → hardware-back-button-f42b9c80.js} +1 -1
- package/dist/esm-es5/{index-47b2066d.js → index-48209844.js} +1 -1
- package/dist/esm-es5/{index-0b4beb69.js → index-4b98143d.js} +1 -1
- package/dist/esm-es5/{index-4c30cddd.js → index-73881b51.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
- package/dist/esm-es5/ion-back-button.entry.js +1 -1
- package/dist/esm-es5/ion-backdrop.entry.js +1 -1
- package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
- package/dist/esm-es5/ion-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-card_5.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-chip.entry.js +1 -1
- package/dist/esm-es5/ion-col_3.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-fab_3.entry.js +1 -1
- package/dist/esm-es5/ion-img.entry.js +1 -1
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
- package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
- package/dist/esm-es5/ion-route_4.entry.js +1 -1
- package/dist/esm-es5/ion-searchbar.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-spinner.entry.js +1 -1
- package/dist/esm-es5/ion-split-pane.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-text.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/{ionic-global-ad9a1810.js → ionic-global-778b7863.js} +1 -1
- package/dist/esm-es5/ionic.js +2 -2
- package/dist/esm-es5/{ios.transition-b76c7020.js → ios.transition-7ff7381d.js} +1 -1
- package/dist/esm-es5/loader.js +2 -2
- package/dist/esm-es5/md.transition-28a9a26b.js +4 -0
- package/dist/esm-es5/{overlays-04a9a43f.js → overlays-33ae3ea0.js} +1 -1
- package/dist/esm-es5/{status-tap-5a95077d.js → status-tap-2b335fb7.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/ionic.js +1 -1
- package/dist/ionic/{p-df504a37.system.js → p-001010b6.system.js} +1 -1
- package/dist/ionic/{p-1924f2e0.system.entry.js → p-016976a7.system.entry.js} +2 -2
- package/dist/ionic/{p-a0b28c69.system.entry.js → p-078fd095.system.entry.js} +1 -1
- package/dist/ionic/{p-ae35294f.system.entry.js → p-0ae25399.system.entry.js} +1 -1
- package/dist/ionic/p-0b955124.system.js +4 -0
- package/dist/ionic/{p-3481d54e.system.entry.js → p-0e29919c.system.entry.js} +1 -1
- package/dist/ionic/{p-8794fa00.system.entry.js → p-0eef8b34.system.entry.js} +1 -1
- package/dist/ionic/{p-fb9f8495.system.entry.js → p-0fd295ef.system.entry.js} +1 -1
- package/dist/ionic/{p-508a4c87.entry.js → p-108f730a.entry.js} +1 -1
- package/dist/ionic/{p-5d7e32ce.js → p-1aa7c019.js} +1 -1
- package/dist/ionic/{p-601e17b4.entry.js → p-1c531ca2.entry.js} +1 -1
- package/dist/ionic/{p-91cb3f9a.entry.js → p-1f583f73.entry.js} +1 -1
- package/dist/ionic/{p-ea25b4c8.system.entry.js → p-1f6cdf2c.system.entry.js} +1 -1
- package/dist/ionic/{p-717e2526.system.entry.js → p-20a6513f.system.entry.js} +1 -1
- package/dist/ionic/{p-cde3ac34.system.entry.js → p-20f7a91e.system.entry.js} +1 -1
- package/dist/ionic/{p-74deb358.system.js → p-25b08bc4.system.js} +1 -1
- package/dist/ionic/p-26138fed.js +4 -0
- package/dist/ionic/{p-bf05cbc7.entry.js → p-2da0a76c.entry.js} +1 -1
- package/dist/ionic/{p-70e34286.system.entry.js → p-2f66e177.system.entry.js} +1 -1
- package/dist/ionic/{p-5cb5f63d.system.entry.js → p-30c9e049.system.entry.js} +1 -1
- package/dist/ionic/{p-16a61810.entry.js → p-333f06ed.entry.js} +1 -1
- package/dist/ionic/{p-de55ec45.js → p-341b4519.js} +1 -1
- package/dist/ionic/{p-bd314f1e.system.entry.js → p-389ff4d2.system.entry.js} +1 -1
- package/dist/ionic/{p-1f16d040.entry.js → p-396c1a55.entry.js} +1 -1
- package/dist/ionic/{p-5e23bea8.system.entry.js → p-3a54c070.system.entry.js} +1 -1
- package/dist/ionic/{p-275705e5.entry.js → p-3a98f8db.entry.js} +1 -1
- package/dist/ionic/{p-502780e4.entry.js → p-3cdbaa49.entry.js} +1 -1
- package/dist/ionic/{p-49aba878.js → p-3eb2da31.js} +1 -1
- package/dist/ionic/{p-6525a8cd.system.js → p-3f028207.system.js} +1 -1
- package/dist/ionic/{p-43a5edee.entry.js → p-400574bf.entry.js} +1 -1
- package/dist/ionic/{p-18beebdf.system.entry.js → p-48af4316.system.entry.js} +2 -2
- package/dist/ionic/{p-ceceac26.js → p-4b2d5b9c.js} +1 -1
- package/dist/ionic/{p-a022b684.system.entry.js → p-4c256bc2.system.entry.js} +1 -1
- package/dist/ionic/{p-b7efc743.system.entry.js → p-4dfc27eb.system.entry.js} +1 -1
- package/dist/ionic/{p-396083cc.entry.js → p-51f08a9f.entry.js} +1 -1
- package/dist/ionic/{p-86813176.system.entry.js → p-58e3ae88.system.entry.js} +1 -1
- package/dist/ionic/{p-31450f73.entry.js → p-5b6aa59a.entry.js} +1 -1
- package/dist/ionic/{p-4fda5c35.entry.js → p-5e60dbc8.entry.js} +1 -1
- package/dist/ionic/{p-1636923f.system.js → p-5eea8b4c.system.js} +1 -1
- package/dist/ionic/{p-cd9a7017.system.entry.js → p-5f456b3c.system.entry.js} +1 -1
- package/dist/ionic/{p-2e1f014a.system.entry.js → p-61c0f8bf.system.entry.js} +1 -1
- package/dist/ionic/{p-a5951821.system.js → p-62a3c609.system.js} +1 -1
- package/dist/ionic/{p-f53d074d.system.entry.js → p-680f96e8.system.entry.js} +1 -1
- package/dist/ionic/p-68ae6719.system.entry.js +4 -0
- package/dist/ionic/{p-5b40d967.entry.js → p-6a34980d.entry.js} +1 -1
- package/dist/ionic/p-6b02edd6.js +4 -0
- package/dist/ionic/{p-afd6d696.system.entry.js → p-6f38d0c5.system.entry.js} +1 -1
- package/dist/ionic/{p-42a9f663.system.entry.js → p-70026e8f.system.entry.js} +1 -1
- package/dist/ionic/{p-72fa96bf.system.js → p-76893257.system.js} +1 -1
- package/dist/ionic/{p-c1797ec5.system.entry.js → p-78edc0cd.system.entry.js} +1 -1
- package/dist/ionic/{p-f0194418.system.entry.js → p-7c32fb95.system.entry.js} +1 -1
- package/dist/ionic/p-7c5e8706.entry.js +4 -0
- package/dist/ionic/{p-05d560ec.entry.js → p-7dc7514a.entry.js} +1 -1
- package/dist/ionic/{p-bd4787eb.entry.js → p-84513dfb.entry.js} +1 -1
- package/dist/ionic/{p-e04b9647.system.entry.js → p-84879f61.system.entry.js} +1 -1
- package/dist/ionic/{p-1131946f.system.entry.js → p-8569d759.system.entry.js} +1 -1
- package/dist/ionic/p-87ae4f6c.system.entry.js +4 -0
- package/dist/ionic/{p-eb07b88f.entry.js → p-8a671f16.entry.js} +1 -1
- package/dist/ionic/{p-123b4809.js → p-8ddc00f7.js} +1 -1
- package/dist/ionic/p-8e16390d.system.js +4 -0
- package/dist/ionic/{p-a8a56449.entry.js → p-8ebd9951.entry.js} +1 -1
- package/dist/ionic/p-8f1ce253.js +4 -0
- package/dist/ionic/{p-c747f89b.system.entry.js → p-92c2178e.system.entry.js} +1 -1
- package/dist/ionic/{p-9cd7ba27.system.js → p-95c44e02.system.js} +1 -1
- package/dist/ionic/{p-95d5a097.entry.js → p-97eca294.entry.js} +1 -1
- package/dist/ionic/{p-a85d9047.system.entry.js → p-9a6ab80a.system.entry.js} +1 -1
- package/dist/ionic/{p-e9f9388e.system.js → p-9beb5039.system.js} +1 -1
- package/dist/ionic/{p-5928fac9.system.entry.js → p-9f5b40c0.system.entry.js} +1 -1
- package/dist/ionic/{p-3d961d93.entry.js → p-9f6397ce.entry.js} +1 -1
- package/dist/ionic/{p-5c6a04bd.entry.js → p-a02b2d75.entry.js} +1 -1
- package/dist/ionic/{p-88e9052d.entry.js → p-a051c371.entry.js} +1 -1
- package/dist/ionic/{p-cb9e71e0.entry.js → p-a19f5ae1.entry.js} +1 -1
- package/dist/ionic/{p-7b1ed642.system.entry.js → p-a1bfaa5c.system.entry.js} +1 -1
- package/dist/ionic/{p-5c580e89.entry.js → p-a2ad515b.entry.js} +1 -1
- package/dist/ionic/{p-3079950e.entry.js → p-aa7ae6aa.entry.js} +1 -1
- package/dist/ionic/{p-caeefe16.system.entry.js → p-aaa4ffb3.system.entry.js} +1 -1
- package/dist/ionic/{p-abcedc15.system.entry.js → p-ac20160b.system.entry.js} +1 -1
- package/dist/ionic/{p-ba97a133.system.entry.js → p-ac979ebf.system.entry.js} +1 -1
- package/dist/ionic/{p-dbd70d97.system.entry.js → p-b37e4ee5.system.entry.js} +1 -1
- package/dist/ionic/{p-c771a6ef.entry.js → p-b498de69.entry.js} +1 -1
- package/dist/ionic/{p-30cd5e7b.js → p-b4d8fe47.js} +1 -1
- package/dist/ionic/{p-337ac0f5.entry.js → p-b8c4df21.entry.js} +1 -1
- package/dist/ionic/{p-89ca4c4b.system.js → p-b94882a9.system.js} +1 -1
- package/dist/ionic/{p-edcada2b.system.entry.js → p-b96699d3.system.entry.js} +1 -1
- package/dist/ionic/{p-64856c3c.system.entry.js → p-bc2c03d7.system.entry.js} +1 -1
- package/dist/ionic/{p-8f872991.entry.js → p-c3790581.entry.js} +1 -1
- package/dist/ionic/p-c5c3710c.js +4 -0
- package/dist/ionic/{p-2e14c533.system.js → p-c6fef62b.system.js} +1 -1
- package/dist/ionic/{p-aaaa615c.system.entry.js → p-c851b204.system.entry.js} +1 -1
- package/dist/ionic/{p-d39ab63d.entry.js → p-ccd419ae.entry.js} +1 -1
- package/dist/ionic/{p-68ba8e77.system.entry.js → p-cd055d60.system.entry.js} +1 -1
- package/dist/ionic/{p-027f3674.entry.js → p-ce2eabd5.entry.js} +1 -1
- package/dist/ionic/{p-b0ff8075.entry.js → p-d7260b87.entry.js} +1 -1
- package/dist/ionic/{p-f840d817.entry.js → p-d74ca358.entry.js} +1 -1
- package/dist/ionic/{p-657ccdd6.entry.js → p-d8607ede.entry.js} +1 -1
- package/dist/ionic/{p-c308f773.entry.js → p-d95c8e90.entry.js} +1 -1
- package/dist/ionic/{p-c11bab7e.entry.js → p-dbb4c012.entry.js} +1 -1
- package/dist/ionic/{p-0457213c.entry.js → p-dce9bc53.entry.js} +1 -1
- package/dist/ionic/{p-7173ba59.system.entry.js → p-df281664.system.entry.js} +1 -1
- package/dist/ionic/{p-2327064c.entry.js → p-df468a8f.entry.js} +1 -1
- package/dist/ionic/p-e1271366.js +5 -0
- package/dist/ionic/{p-b2595011.system.entry.js → p-e68980ff.system.entry.js} +1 -1
- package/dist/ionic/{p-1f19958f.system.entry.js → p-e6aaff14.system.entry.js} +1 -1
- package/dist/ionic/{p-dcb5711d.entry.js → p-ea8fbf09.entry.js} +1 -1
- package/dist/ionic/{p-a3df16b9.system.entry.js → p-eda7a1db.system.entry.js} +1 -1
- package/dist/ionic/{p-64db1331.entry.js → p-efe9180b.entry.js} +1 -1
- package/dist/ionic/{p-64761c90.entry.js → p-f1ad3b3d.entry.js} +1 -1
- package/dist/ionic/{p-94ff532b.entry.js → p-f1cc690e.entry.js} +1 -1
- package/dist/ionic/{p-8e651c29.entry.js → p-f46775e4.entry.js} +1 -1
- package/dist/ionic/p-f74afe3b.entry.js +4 -0
- package/dist/ionic/{p-c39cc96d.system.entry.js → p-f7b43141.system.entry.js} +1 -1
- package/dist/ionic/{p-3a7de59c.entry.js → p-f88dd429.entry.js} +1 -1
- package/dist/ionic/p-f89ae259.js +4 -0
- package/dist/ionic/{p-9056778e.system.entry.js → p-f97b9cdd.system.entry.js} +1 -1
- package/dist/ionic/{p-9ec7208d.system.js → p-fd36799d.system.js} +1 -1
- package/dist/ionic/{p-7ce40e7b.entry.js → p-fd3f475f.entry.js} +1 -1
- package/dist/ionic/{p-d4cadd34.system.js → p-fd9a9db3.system.js} +1 -1
- package/dist/ionic/{p-b6279412.entry.js → p-fe92da17.entry.js} +1 -1
- package/dist/types/components/action-sheet/action-sheet.d.ts +0 -4
- package/dist/types/components/alert/alert.d.ts +0 -4
- package/dist/types/components/datetime/datetime-interface.d.ts +10 -0
- package/dist/types/components/datetime/datetime.d.ts +16 -1
- package/dist/types/components/datetime/utils/format.d.ts +7 -1
- package/dist/types/components/loading/loading.d.ts +0 -4
- package/dist/types/components/modal/modal.d.ts +0 -4
- package/dist/types/components/picker/picker.d.ts +0 -4
- package/dist/types/components/popover/popover.d.ts +0 -4
- package/dist/types/components/toast/toast.d.ts +0 -4
- package/dist/types/components.d.ts +17 -9
- package/hydrate/index.d.ts +1 -1
- package/hydrate/index.js +136 -271
- package/package.json +4 -4
- package/dist/esm-es5/app-globals-5cf6195b.js +0 -4
- package/dist/esm-es5/data-0f3ab200.js +0 -4
- package/dist/esm-es5/md.transition-564937a7.js +0 -4
- package/dist/ionic/p-0b34d3a7.system.js +0 -4
- package/dist/ionic/p-0e23c289.system.entry.js +0 -4
- package/dist/ionic/p-21ca1f1c.js +0 -4
- package/dist/ionic/p-23c73017.entry.js +0 -4
- package/dist/ionic/p-5c2ae448.js +0 -4
- package/dist/ionic/p-7330c044.system.js +0 -4
- package/dist/ionic/p-a6e465f5.entry.js +0 -4
- package/dist/ionic/p-bdca4784.js +0 -4
- package/dist/ionic/p-dbcba5a2.js +0 -4
- package/dist/ionic/p-e81bf09e.system.entry.js +0 -4
- package/dist/ionic/p-ed7a529f.js +0 -5
- package/dist/ionic/p-f7dce541.js +0 -4
|
@@ -9,7 +9,25 @@ const getFormattedDayPeriod = (dayPeriod) => {
|
|
|
9
9
|
}
|
|
10
10
|
return dayPeriod.toUpperCase();
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Including time zone options may lead to the rendered text showing a
|
|
14
|
+
* different time from what was selected in the Datetime, which could cause
|
|
15
|
+
* confusion.
|
|
16
|
+
*/
|
|
17
|
+
export const stripTimeZone = (formatOptions) => {
|
|
18
|
+
/**
|
|
19
|
+
* We do not want to display the time zone name
|
|
20
|
+
*/
|
|
21
|
+
delete formatOptions.timeZoneName;
|
|
22
|
+
/**
|
|
23
|
+
* Setting the time zone to UTC ensures that the value shown is always the
|
|
24
|
+
* same as what was selected and safeguards against older Safari bugs with
|
|
25
|
+
* Intl.DateTimeFormat.
|
|
26
|
+
*/
|
|
27
|
+
formatOptions.timeZone = 'UTC';
|
|
28
|
+
return formatOptions;
|
|
29
|
+
};
|
|
30
|
+
export const getLocalizedTime = (locale, refParts, hourCycle, formatOptions) => {
|
|
13
31
|
const timeParts = {
|
|
14
32
|
hour: refParts.hour,
|
|
15
33
|
minute: refParts.minute,
|
|
@@ -17,28 +35,18 @@ export const getLocalizedTime = (locale, refParts, hourCycle) => {
|
|
|
17
35
|
if (timeParts.hour === undefined || timeParts.minute === undefined) {
|
|
18
36
|
return 'Invalid Time';
|
|
19
37
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* the user's current timezone offset
|
|
27
|
-
* when formatting the time.
|
|
28
|
-
*/
|
|
29
|
-
timeZone: 'UTC',
|
|
38
|
+
const defaultFormatOptions = { hour: 'numeric', minute: 'numeric' };
|
|
39
|
+
/**
|
|
40
|
+
* If any options are provided, don't use any of the defaults.
|
|
41
|
+
*/
|
|
42
|
+
const options = stripTimeZone(formatOptions !== null && formatOptions !== void 0 ? formatOptions : defaultFormatOptions);
|
|
43
|
+
return new Intl.DateTimeFormat(locale, Object.assign(Object.assign({}, options), {
|
|
30
44
|
/**
|
|
31
45
|
* We use hourCycle here instead of hour12 due to:
|
|
32
46
|
* https://bugs.chromium.org/p/chromium/issues/detail?id=1347316&q=hour12&can=2
|
|
33
47
|
*/
|
|
34
|
-
hourCycle
|
|
35
|
-
|
|
36
|
-
* Setting Z at the end indicates that this
|
|
37
|
-
* date string is in the UTC time zone. This
|
|
38
|
-
* prevents new Date from adding the time zone
|
|
39
|
-
* offset when getting the ISO string.
|
|
40
|
-
*/
|
|
41
|
-
}).format(new Date(convertDataToISO(Object.assign({
|
|
48
|
+
hourCycle
|
|
49
|
+
})).format(new Date(convertDataToISO(Object.assign({
|
|
42
50
|
/**
|
|
43
51
|
* JS uses a simplified ISO 8601 format which allows for
|
|
44
52
|
* date-only formats and date-time formats, but not
|
|
@@ -201,7 +209,7 @@ export const getNormalizedDate = (refParts) => {
|
|
|
201
209
|
*/
|
|
202
210
|
export const getLocalizedDateTime = (locale, refParts, options) => {
|
|
203
211
|
const date = getNormalizedDate(refParts);
|
|
204
|
-
return getDateTimeFormat(locale, options).format(date);
|
|
212
|
+
return getDateTimeFormat(locale, stripTimeZone(options)).format(date);
|
|
205
213
|
};
|
|
206
214
|
/**
|
|
207
215
|
* Given a locale, DatetimeParts, and options
|
|
@@ -7,7 +7,7 @@ import { printIonError } from "../../utils/logging/index";
|
|
|
7
7
|
import { createColorClasses } from "../../utils/theme";
|
|
8
8
|
import { getIonMode } from "../../global/ionic-global";
|
|
9
9
|
import { getToday } from "../datetime/utils/data";
|
|
10
|
-
import {
|
|
10
|
+
import { getLocalizedDateTime, getLocalizedTime } from "../datetime/utils/format";
|
|
11
11
|
import { getHourCycle } from "../datetime/utils/helpers";
|
|
12
12
|
import { parseDate } from "../datetime/utils/parse";
|
|
13
13
|
/**
|
|
@@ -43,11 +43,12 @@ export class DatetimeButton {
|
|
|
43
43
|
* to the locale specified on ion-datetime.
|
|
44
44
|
*/
|
|
45
45
|
this.setDateTimeText = () => {
|
|
46
|
+
var _a, _b, _c, _d, _e;
|
|
46
47
|
const { datetimeEl, datetimePresentation } = this;
|
|
47
48
|
if (!datetimeEl) {
|
|
48
49
|
return;
|
|
49
50
|
}
|
|
50
|
-
const { value, locale, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
|
|
51
|
+
const { value, locale, formatOptions, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
|
|
51
52
|
const parsedValues = this.getParsedDateValues(value);
|
|
52
53
|
/**
|
|
53
54
|
* Both ion-datetime and ion-datetime-button default
|
|
@@ -70,8 +71,8 @@ export class DatetimeButton {
|
|
|
70
71
|
switch (datetimePresentation) {
|
|
71
72
|
case 'date-time':
|
|
72
73
|
case 'time-date':
|
|
73
|
-
const dateText =
|
|
74
|
-
const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle);
|
|
74
|
+
const dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { month: 'short', day: 'numeric', year: 'numeric' });
|
|
75
|
+
const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time);
|
|
75
76
|
if (preferWheel) {
|
|
76
77
|
this.dateText = `${dateText} ${timeText}`;
|
|
77
78
|
}
|
|
@@ -94,20 +95,20 @@ export class DatetimeButton {
|
|
|
94
95
|
this.dateText = headerText;
|
|
95
96
|
}
|
|
96
97
|
else {
|
|
97
|
-
this.dateText =
|
|
98
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _b !== void 0 ? _b : { month: 'short', day: 'numeric', year: 'numeric' });
|
|
98
99
|
}
|
|
99
100
|
break;
|
|
100
101
|
case 'time':
|
|
101
|
-
this.timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle);
|
|
102
|
+
this.timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time);
|
|
102
103
|
break;
|
|
103
104
|
case 'month-year':
|
|
104
|
-
this.dateText =
|
|
105
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _c !== void 0 ? _c : { month: 'long', year: 'numeric' });
|
|
105
106
|
break;
|
|
106
107
|
case 'month':
|
|
107
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, { month: 'long' });
|
|
108
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) !== null && _d !== void 0 ? _d : { month: 'long' });
|
|
108
109
|
break;
|
|
109
110
|
case 'year':
|
|
110
|
-
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, { year: 'numeric' });
|
|
111
|
+
this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_e = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) !== null && _e !== void 0 ? _e : { year: 'numeric' });
|
|
111
112
|
break;
|
|
112
113
|
}
|
|
113
114
|
};
|
|
@@ -336,7 +337,7 @@ export class DatetimeButton {
|
|
|
336
337
|
render() {
|
|
337
338
|
const { color, dateText, timeText, selectedButton, datetimeActive, disabled } = this;
|
|
338
339
|
const mode = getIonMode(this);
|
|
339
|
-
return (h(Host, { key: '
|
|
340
|
+
return (h(Host, { key: '861a08f4a239de771875aee9b505e06ac7064b32', class: createColorClasses(color, {
|
|
340
341
|
[mode]: true,
|
|
341
342
|
[`${selectedButton}-active`]: datetimeActive,
|
|
342
343
|
['datetime-button-disabled']: disabled,
|
|
@@ -174,4 +174,70 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
174
174
|
await expect(page.locator('#time-button')).not.toBeVisible();
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
|
+
test.describe(title('datetime-button: formatOptions'), () => {
|
|
178
|
+
test('should include date and time for presentation date-time', async ({ page }) => {
|
|
179
|
+
await page.setContent(`
|
|
180
|
+
<ion-datetime-button datetime="datetime"></ion-datetime-button>
|
|
181
|
+
<ion-datetime id="datetime" presentation="date-time" value="2023-11-02T01:22:00" locale="en-US"></ion-datetime>
|
|
182
|
+
<script>
|
|
183
|
+
const datetime = document.querySelector('ion-datetime');
|
|
184
|
+
datetime.formatOptions = {
|
|
185
|
+
date: {
|
|
186
|
+
weekday: "short",
|
|
187
|
+
month: "long",
|
|
188
|
+
day: "2-digit"
|
|
189
|
+
},
|
|
190
|
+
time: {
|
|
191
|
+
hour: "2-digit",
|
|
192
|
+
minute: "2-digit"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
</script>
|
|
196
|
+
`, config);
|
|
197
|
+
await page.locator('.datetime-ready').waitFor();
|
|
198
|
+
await expect(page.locator('#date-button')).toContainText('Thu, November 02');
|
|
199
|
+
await expect(page.locator('#time-button')).toContainText('01:22 AM');
|
|
200
|
+
});
|
|
201
|
+
test('should include date for presentation date', async ({ page }) => {
|
|
202
|
+
await page.setContent(`
|
|
203
|
+
<ion-datetime-button datetime="datetime"></ion-datetime-button>
|
|
204
|
+
<ion-datetime id="datetime" presentation="date" value="2023-11-02" locale="en-US"></ion-datetime>
|
|
205
|
+
<script>
|
|
206
|
+
const datetime = document.querySelector('ion-datetime');
|
|
207
|
+
datetime.formatOptions = {
|
|
208
|
+
date: {
|
|
209
|
+
weekday: "short",
|
|
210
|
+
month: "long",
|
|
211
|
+
day: "2-digit"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
</script>
|
|
215
|
+
`, config);
|
|
216
|
+
await page.locator('.datetime-ready').waitFor();
|
|
217
|
+
await expect(page.locator('#date-button')).toContainText('Thu, November 02');
|
|
218
|
+
});
|
|
219
|
+
test('should include date and time in same button for preferWheel', async ({ page }) => {
|
|
220
|
+
await page.setContent(`
|
|
221
|
+
<ion-datetime-button datetime="datetime"></ion-datetime-button>
|
|
222
|
+
<ion-datetime id="datetime" presentation="date-time" value="2023-11-02T01:22:00" locale="en-US" prefer-wheel="true"></ion-datetime>
|
|
223
|
+
<script>
|
|
224
|
+
const datetime = document.querySelector('ion-datetime');
|
|
225
|
+
datetime.formatOptions = {
|
|
226
|
+
date: {
|
|
227
|
+
weekday: "short",
|
|
228
|
+
month: "long",
|
|
229
|
+
day: "2-digit"
|
|
230
|
+
},
|
|
231
|
+
time: {
|
|
232
|
+
hour: "2-digit",
|
|
233
|
+
minute: "2-digit"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
</script>
|
|
237
|
+
`, config);
|
|
238
|
+
await page.locator('.datetime-ready').waitFor();
|
|
239
|
+
await page.pause();
|
|
240
|
+
await expect(page.locator('ion-datetime-button')).toContainText('Thu, November 02 01:22 AM');
|
|
241
|
+
});
|
|
242
|
+
});
|
|
177
243
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { Host, forceUpdate, h } from "@stencil/core";
|
|
4
|
+
import { Build, Host, forceUpdate, h } from "@stencil/core";
|
|
5
5
|
import { inheritAttributes, raf } from "../../utils/helpers";
|
|
6
6
|
import { printIonError, printIonWarning } from "../../utils/logging/index";
|
|
7
7
|
import { createColorClasses, hostContext, openURL } from "../../utils/theme";
|
|
@@ -199,6 +199,15 @@ export class Item {
|
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
getFirstInteractive() {
|
|
202
|
+
if (Build.isTesting) {
|
|
203
|
+
/**
|
|
204
|
+
* Pseudo selectors can't be tested in unit tests.
|
|
205
|
+
* It will cause an error when running the tests.
|
|
206
|
+
*
|
|
207
|
+
* TODO: FW-5205 - Remove the build conditional when this is fixed in Stencil
|
|
208
|
+
*/
|
|
209
|
+
return undefined;
|
|
210
|
+
}
|
|
202
211
|
const controls = this.el.querySelectorAll('ion-toggle:not([disabled]), ion-checkbox:not([disabled]), ion-radio:not([disabled]), ion-select:not([disabled])');
|
|
203
212
|
return controls[0];
|
|
204
213
|
}
|
|
@@ -255,7 +264,7 @@ export class Item {
|
|
|
255
264
|
const ariaDisabled = disabled || childStyles['item-interactive-disabled'] ? 'true' : null;
|
|
256
265
|
const fillValue = fill || 'none';
|
|
257
266
|
const inList = hostContext('ion-list', this.el) && !hostContext('ion-radio-group', this.el);
|
|
258
|
-
return (h(Host, { key: '
|
|
267
|
+
return (h(Host, { key: '941d21ee0c46e9fbc566469708579f8871d19c73', "aria-disabled": ariaDisabled, class: Object.assign(Object.assign(Object.assign({}, childStyles), labelColorStyles), createColorClasses(this.color, {
|
|
259
268
|
item: true,
|
|
260
269
|
[mode]: true,
|
|
261
270
|
'item-lines-default': lines === undefined,
|
|
@@ -269,7 +278,7 @@ export class Item {
|
|
|
269
278
|
'ion-activatable': canActivate,
|
|
270
279
|
'ion-focusable': this.focusable,
|
|
271
280
|
'item-rtl': document.dir === 'rtl',
|
|
272
|
-
})), role: inList ? 'listitem' : null }, h(TagType, Object.assign({ key: '
|
|
281
|
+
})), role: inList ? 'listitem' : null }, h(TagType, Object.assign({ key: 'f0be78f964215caea21b54ffac6c2b2988967f7d' }, attrs, inheritedAriaAttributes, { class: "item-native", part: "native", disabled: disabled }, clickFn), h("slot", { key: '255e76ba8f6b5c2d75103dcd787908132f1a84a4', name: "start" }), h("div", { key: '1dee3e342b4fc1703500a545e90ad681582c1292', class: "item-inner" }, h("div", { key: '045c1cf4f03687f41147144c9c714ec426b81829', class: "input-wrapper" }, h("slot", { key: '4f1edcce6cc918e521bb98e70602dfee2b492428' })), h("slot", { key: '2dd468bc4bed5e5dab4372133bcbf4a472e417a3', name: "end" }), showDetail && (h("ion-icon", { icon: detailIcon, lazy: false, class: "item-detail-icon", part: "detail-icon", "aria-hidden": "true", "flip-rtl": detailIcon === chevronForward })), h("div", { key: '116b9c332c6e28f0eb9cb513c36aa3ac5ada17d0', class: "item-inner-highlight" })), canActivate && mode === 'md' && h("ion-ripple-effect", null), h("div", { key: '0bd92b2e3039c34b5d01d9361941af360d68a335', class: "item-highlight" })), h("div", { key: '9287c851c10b8438c787b34a2bf6d76c87af3c15', class: "item-bottom" }, h("slot", { key: '7db1f90077bbc63f3adbf873e0b1721e131d8d8d', name: "error" }), h("slot", { key: '6e90f564af916893a6a9fe6fe30dee15655a554e', name: "helper" }), counterString && h("ion-note", { class: "item-counter" }, counterString))));
|
|
273
282
|
}
|
|
274
283
|
static get is() { return "ion-item"; }
|
|
275
284
|
static get encapsulation() { return "shadow"; }
|
|
@@ -113,10 +113,6 @@ export class Loading {
|
|
|
113
113
|
* This can be useful in a button handler for determining which button was
|
|
114
114
|
* clicked to dismiss the loading.
|
|
115
115
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
116
|
-
*
|
|
117
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
118
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
119
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
120
116
|
*/
|
|
121
117
|
async dismiss(data, role) {
|
|
122
118
|
const unlock = await this.lockController.lock();
|
|
@@ -158,9 +154,9 @@ export class Loading {
|
|
|
158
154
|
* Otherwise, don't set aria-labelledby.
|
|
159
155
|
*/
|
|
160
156
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
161
|
-
return (h(Host, Object.assign({ key: '
|
|
157
|
+
return (h(Host, Object.assign({ key: '81295894ca6e047124918420f2483c092ebf91b9', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
162
158
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
163
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: '
|
|
159
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: 'db9fbd946cf3eb03c3a70f2e71c49ab233df1879', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'd27b03de0b450c0668d4b4077d76bc5b283f03cf', tabindex: "0" }), h("div", { key: '7112719ddd487365c1e36fc4dec32aac888dbb52', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { class: "loading-spinner" }, h("ion-spinner", { name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: '5715dd7dae209ae58e5557cb60f3ae514752b822', tabindex: "0" })));
|
|
164
160
|
}
|
|
165
161
|
static get is() { return "ion-loading"; }
|
|
166
162
|
static get encapsulation() { return "scoped"; }
|
|
@@ -684,7 +680,7 @@ export class Loading {
|
|
|
684
680
|
}, {
|
|
685
681
|
"name": "role",
|
|
686
682
|
"type": "string | undefined",
|
|
687
|
-
"docs": "The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
683
|
+
"docs": "The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
688
684
|
}],
|
|
689
685
|
"references": {
|
|
690
686
|
"Promise": {
|
|
@@ -701,7 +697,7 @@ export class Loading {
|
|
|
701
697
|
"text": "data Any data to emit in the dismiss events."
|
|
702
698
|
}, {
|
|
703
699
|
"name": "param",
|
|
704
|
-
"text": "role The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
700
|
+
"text": "role The role of the element that is dismissing the loading.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the loading.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
705
701
|
}]
|
|
706
702
|
}
|
|
707
703
|
},
|
|
@@ -396,10 +396,6 @@ export class Modal {
|
|
|
396
396
|
*
|
|
397
397
|
* @param data Any data to emit in the dismiss events.
|
|
398
398
|
* @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.
|
|
399
|
-
*
|
|
400
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
401
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
402
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
403
399
|
*/
|
|
404
400
|
async dismiss(data, role) {
|
|
405
401
|
var _a;
|
|
@@ -530,9 +526,9 @@ export class Modal {
|
|
|
530
526
|
const mode = getIonMode(this);
|
|
531
527
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
532
528
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
533
|
-
return (h(Host, Object.assign({ key: '
|
|
529
|
+
return (h(Host, Object.assign({ key: '9a305d82f123283b6200c42d67393b378bb309a8', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
534
530
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
535
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { key: '
|
|
531
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { key: '85e8dc6f19b30fd95db518445929fb0c1d5cdef0', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { class: "modal-shadow" }), h("div", Object.assign({ key: '893a0202d91828e60099311442c2677bee5464e2',
|
|
536
532
|
/*
|
|
537
533
|
role and aria-modal must be used on the
|
|
538
534
|
same element. They must also be set inside the
|
|
@@ -541,7 +537,7 @@ export class Modal {
|
|
|
541
537
|
*/
|
|
542
538
|
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { class: "modal-handle",
|
|
543
539
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
544
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '
|
|
540
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '25187bf4c69d9022930227b8b8748a294176be5f' }))));
|
|
545
541
|
}
|
|
546
542
|
static get is() { return "ion-modal"; }
|
|
547
543
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1236,7 +1232,7 @@ export class Modal {
|
|
|
1236
1232
|
}, {
|
|
1237
1233
|
"name": "role",
|
|
1238
1234
|
"type": "string | undefined",
|
|
1239
|
-
"docs": "The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'
|
|
1235
|
+
"docs": "The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'."
|
|
1240
1236
|
}],
|
|
1241
1237
|
"references": {
|
|
1242
1238
|
"Promise": {
|
|
@@ -1257,7 +1253,7 @@ export class Modal {
|
|
|
1257
1253
|
"text": "data Any data to emit in the dismiss events."
|
|
1258
1254
|
}, {
|
|
1259
1255
|
"name": "param",
|
|
1260
|
-
"text": "role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'
|
|
1256
|
+
"text": "role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'."
|
|
1261
1257
|
}]
|
|
1262
1258
|
}
|
|
1263
1259
|
},
|
|
@@ -109,10 +109,6 @@ export class Picker {
|
|
|
109
109
|
* This can be useful in a button handler for determining which button was
|
|
110
110
|
* clicked to dismiss the picker.
|
|
111
111
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
112
|
-
*
|
|
113
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
114
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
115
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
116
112
|
*/
|
|
117
113
|
async dismiss(data, role) {
|
|
118
114
|
const unlock = await this.lockController.lock();
|
|
@@ -184,11 +180,11 @@ export class Picker {
|
|
|
184
180
|
render() {
|
|
185
181
|
const { htmlAttributes } = this;
|
|
186
182
|
const mode = getIonMode(this);
|
|
187
|
-
return (h(Host, Object.assign({ key: '
|
|
183
|
+
return (h(Host, Object.assign({ key: '8b9049c5315e701dff3f7457be646941bb3cc0df', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
188
184
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
189
185
|
}, class: Object.assign({ [mode]: true,
|
|
190
186
|
// Used internally for styling
|
|
191
|
-
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '
|
|
187
|
+
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '4f62ae6c088108189bfab18b680f0ae50b4cc395', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'c5fd2584ca4470c69bf61582cef2ac72289addba', tabindex: "0" }), h("div", { key: '2e68572dd5ddc4911c1e6bca57a2157b47477348', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: '218526e531998a4d5a6377499acb42f99b347729', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: '4dd711f1fa1f2a4bd24696ae1633da16bbf55879', class: "picker-columns" }, h("div", { key: '440ebd807ca3675b0055e67e0354ac4625ae375d', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-column", { col: c })), h("div", { key: '5cdceda410904470e3742ab416ed3d3a661b6859', class: "picker-below-highlight" }))), h("div", { key: '0c96e8a43a6d4cd4b8b7c9e81c54414eb1d989bf', tabindex: "0" })));
|
|
192
188
|
}
|
|
193
189
|
static get is() { return "ion-picker"; }
|
|
194
190
|
static get encapsulation() { return "scoped"; }
|
|
@@ -697,7 +693,7 @@ export class Picker {
|
|
|
697
693
|
}, {
|
|
698
694
|
"name": "role",
|
|
699
695
|
"type": "string | undefined",
|
|
700
|
-
"docs": "The role of the element that is dismissing the picker.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the picker.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
696
|
+
"docs": "The role of the element that is dismissing the picker.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the picker.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
701
697
|
}],
|
|
702
698
|
"references": {
|
|
703
699
|
"Promise": {
|
|
@@ -714,7 +710,7 @@ export class Picker {
|
|
|
714
710
|
"text": "data Any data to emit in the dismiss events."
|
|
715
711
|
}, {
|
|
716
712
|
"name": "param",
|
|
717
|
-
"text": "role The role of the element that is dismissing the picker.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the picker.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
713
|
+
"text": "role The role of the element that is dismissing the picker.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the picker.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
718
714
|
}]
|
|
719
715
|
}
|
|
720
716
|
},
|
|
@@ -280,10 +280,6 @@ export class Popover {
|
|
|
280
280
|
* @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
|
|
281
281
|
* @param dismissParentPopover If `true`, dismissing this popover will also dismiss
|
|
282
282
|
* a parent popover if this popover is nested. Defaults to `true`.
|
|
283
|
-
*
|
|
284
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
285
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
286
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
287
283
|
*/
|
|
288
284
|
async dismiss(data, role, dismissParentPopover = true) {
|
|
289
285
|
const unlock = await this.lockController.lock();
|
|
@@ -335,9 +331,9 @@ export class Popover {
|
|
|
335
331
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes } = this;
|
|
336
332
|
const desktop = isPlatform('desktop');
|
|
337
333
|
const enableArrow = arrow && !parentPopover;
|
|
338
|
-
return (h(Host, Object.assign({ key: '
|
|
334
|
+
return (h(Host, Object.assign({ key: 'f335ae001173483e6a973b2084f8a7b6b895ae5d', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
339
335
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
340
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: '
|
|
336
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: '8468f39b0a0f30b42ae9cac51950e5f0b9be1069', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { class: "popover-arrow", part: "arrow" }), h("div", { key: 'cb4eeaef385187f3c8e566931844e30edd5451c4', class: "popover-content", part: "content" }, h("slot", { key: '80a5739a4beb6eba150503e426104701954c90b9' })))));
|
|
341
337
|
}
|
|
342
338
|
static get is() { return "ion-popover"; }
|
|
343
339
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1134,7 +1130,7 @@ export class Popover {
|
|
|
1134
1130
|
}, {
|
|
1135
1131
|
"name": "dismissParentPopover",
|
|
1136
1132
|
"type": "boolean",
|
|
1137
|
-
"docs": "If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true
|
|
1133
|
+
"docs": "If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true`."
|
|
1138
1134
|
}],
|
|
1139
1135
|
"references": {
|
|
1140
1136
|
"Promise": {
|
|
@@ -1158,7 +1154,7 @@ export class Popover {
|
|
|
1158
1154
|
"text": "role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'."
|
|
1159
1155
|
}, {
|
|
1160
1156
|
"name": "param",
|
|
1161
|
-
"text": "dismissParentPopover If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true
|
|
1157
|
+
"text": "dismissParentPopover If `true`, dismissing this popover will also dismiss\na parent popover if this popover is nested. Defaults to `true`."
|
|
1162
1158
|
}]
|
|
1163
1159
|
}
|
|
1164
1160
|
},
|
|
@@ -80,18 +80,6 @@ describe('toast: a11y smoke test', () => {
|
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
82
|
describe('toast: duration config', () => {
|
|
83
|
-
afterEach(() => {
|
|
84
|
-
/**
|
|
85
|
-
* Important: Reset the config
|
|
86
|
-
* after each test as it is not
|
|
87
|
-
* automatically reset.
|
|
88
|
-
* Otherwise, toasts in other tests
|
|
89
|
-
* will take on any toastDuration value
|
|
90
|
-
* set and timeouts will potentially run
|
|
91
|
-
* after tests are finished.
|
|
92
|
-
*/
|
|
93
|
-
config.reset({});
|
|
94
|
-
});
|
|
95
83
|
it('should have duration set to 0', async () => {
|
|
96
84
|
const page = await newSpecPage({
|
|
97
85
|
components: [Toast],
|
|
@@ -217,10 +217,6 @@ export class Toast {
|
|
|
217
217
|
* This can be useful in a button handler for determining which button was
|
|
218
218
|
* clicked to dismiss the toast.
|
|
219
219
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
220
|
-
*
|
|
221
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
222
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
223
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
224
220
|
*/
|
|
225
221
|
async dismiss(data, role) {
|
|
226
222
|
var _a, _b;
|
|
@@ -388,9 +384,9 @@ export class Toast {
|
|
|
388
384
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
389
385
|
printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
390
386
|
}
|
|
391
|
-
return (h(Host, Object.assign({ key: '
|
|
387
|
+
return (h(Host, Object.assign({ key: '15a5c3e8d475435c838b70c55ef2e7cc12d6abfb', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
392
388
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
393
|
-
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '
|
|
389
|
+
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'a6ed7fb75ab098dc632d1a546b4d5298675c14c1', class: wrapperClass }, h("div", { key: '68ff7219e9abae0b7c2030369ebffd2fe0edf7de', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '6b45ca5e283d3507c682cbe733e27a94460a7f69', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
394
390
|
}
|
|
395
391
|
static get is() { return "ion-toast"; }
|
|
396
392
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1036,7 +1032,7 @@ export class Toast {
|
|
|
1036
1032
|
}, {
|
|
1037
1033
|
"name": "role",
|
|
1038
1034
|
"type": "string | undefined",
|
|
1039
|
-
"docs": "The role of the element that is dismissing the toast.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the toast.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
1035
|
+
"docs": "The role of the element that is dismissing the toast.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the toast.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
1040
1036
|
}],
|
|
1041
1037
|
"references": {
|
|
1042
1038
|
"Promise": {
|
|
@@ -1058,7 +1054,7 @@ export class Toast {
|
|
|
1058
1054
|
"text": "data Any data to emit in the dismiss events."
|
|
1059
1055
|
}, {
|
|
1060
1056
|
"name": "param",
|
|
1061
|
-
"text": "role The role of the element that is dismissing the toast.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the toast.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
1057
|
+
"text": "role The role of the element that is dismissing the toast.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the toast.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
1062
1058
|
}]
|
|
1063
1059
|
}
|
|
1064
1060
|
},
|
|
@@ -409,15 +409,6 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
411
|
setRootAriaHidden(true);
|
|
412
|
-
/**
|
|
413
|
-
* Hide all other overlays from screen readers so only this one
|
|
414
|
-
* can be read. Note that presenting an overlay always makes
|
|
415
|
-
* it the topmost one.
|
|
416
|
-
*/
|
|
417
|
-
if (doc !== undefined) {
|
|
418
|
-
const presentedOverlays = getPresentedOverlays(doc);
|
|
419
|
-
presentedOverlays.forEach((o) => o.setAttribute('aria-hidden', 'true'));
|
|
420
|
-
}
|
|
421
412
|
overlay.presented = true;
|
|
422
413
|
overlay.willPresent.emit();
|
|
423
414
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
@@ -440,7 +431,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
440
431
|
* from returning focus as a result.
|
|
441
432
|
*/
|
|
442
433
|
if (overlay.el.tagName !== 'ION-TOAST') {
|
|
443
|
-
|
|
434
|
+
focusPreviousElementOnDismiss(overlay.el);
|
|
444
435
|
}
|
|
445
436
|
/**
|
|
446
437
|
* If the focused element is already
|
|
@@ -451,14 +442,6 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
451
442
|
if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
|
|
452
443
|
overlay.el.focus();
|
|
453
444
|
}
|
|
454
|
-
/**
|
|
455
|
-
* If this overlay was previously dismissed without being
|
|
456
|
-
* the topmost one (such as by manually calling dismiss()),
|
|
457
|
-
* it would still have aria-hidden on being presented again.
|
|
458
|
-
* Removing it here ensures the overlay is visible to screen
|
|
459
|
-
* readers.
|
|
460
|
-
*/
|
|
461
|
-
overlay.el.removeAttribute('aria-hidden');
|
|
462
445
|
};
|
|
463
446
|
/**
|
|
464
447
|
* When an overlay component is dismissed,
|
|
@@ -470,7 +453,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
|
|
|
470
453
|
* to where they were before they
|
|
471
454
|
* opened the overlay.
|
|
472
455
|
*/
|
|
473
|
-
const
|
|
456
|
+
const focusPreviousElementOnDismiss = async (overlayEl) => {
|
|
474
457
|
let previousElement = document.activeElement;
|
|
475
458
|
if (!previousElement) {
|
|
476
459
|
return;
|
|
@@ -481,36 +464,10 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
481
464
|
previousElement = shadowRoot.querySelector(focusableQueryString) || previousElement;
|
|
482
465
|
}
|
|
483
466
|
await overlayEl.onDidDismiss();
|
|
484
|
-
|
|
485
|
-
* After onDidDismiss, the overlay loses focus
|
|
486
|
-
* because it is removed from the document
|
|
487
|
-
*
|
|
488
|
-
* > An element will also lose focus [...]
|
|
489
|
-
* > if the element is removed from the document)
|
|
490
|
-
*
|
|
491
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event
|
|
492
|
-
*
|
|
493
|
-
* Additionally, `document.activeElement` returns:
|
|
494
|
-
*
|
|
495
|
-
* > The Element which currently has focus,
|
|
496
|
-
* > `<body>` or null if there is
|
|
497
|
-
* > no focused element.
|
|
498
|
-
*
|
|
499
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement#value
|
|
500
|
-
*
|
|
501
|
-
* However, if the user has already focused
|
|
502
|
-
* an element sometime between onWillDismiss
|
|
503
|
-
* and onDidDismiss (for example, focusing a
|
|
504
|
-
* text box after tapping a button in an
|
|
505
|
-
* action sheet) then don't restore focus to
|
|
506
|
-
* previous element
|
|
507
|
-
*/
|
|
508
|
-
if (document.activeElement === null || document.activeElement === document.body) {
|
|
509
|
-
previousElement.focus();
|
|
510
|
-
}
|
|
467
|
+
previousElement.focus();
|
|
511
468
|
};
|
|
512
469
|
export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
513
|
-
var _a, _b
|
|
470
|
+
var _a, _b;
|
|
514
471
|
if (!overlay.presented) {
|
|
515
472
|
return false;
|
|
516
473
|
}
|
|
@@ -561,13 +518,6 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
561
518
|
console.error(err);
|
|
562
519
|
}
|
|
563
520
|
overlay.el.remove();
|
|
564
|
-
/**
|
|
565
|
-
* If there are other overlays presented, unhide the new
|
|
566
|
-
* topmost one from screen readers.
|
|
567
|
-
*/
|
|
568
|
-
if (doc !== undefined) {
|
|
569
|
-
(_c = getPresentedOverlay(doc)) === null || _c === void 0 ? void 0 : _c.removeAttribute('aria-hidden');
|
|
570
|
-
}
|
|
571
521
|
return true;
|
|
572
522
|
};
|
|
573
523
|
const getAppRoot = (doc) => {
|