@ionic/core 7.4.1-nightly.20230919 → 7.4.1
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 -0
- package/components/alert.js +6 -1
- package/components/button.js +2 -0
- package/components/checkbox.js +9 -4
- package/components/icon.js +6 -0
- package/components/input-shims.js +88 -7
- package/components/ion-accordion-group.js +5 -1
- package/components/ion-accordion.js +2 -0
- package/components/ion-breadcrumbs.js +5 -1
- package/components/ion-datetime.js +10 -0
- package/components/ion-fab-list.js +2 -0
- package/components/ion-fab.js +2 -0
- package/components/ion-img.js +2 -0
- package/components/ion-infinite-scroll.js +3 -0
- package/components/ion-input.js +5 -0
- package/components/ion-item-sliding.js +2 -0
- package/components/ion-loading.js +3 -0
- package/components/ion-menu.js +8 -3
- package/components/ion-modal.js +3 -0
- package/components/ion-nav.js +3 -0
- package/components/ion-picker.js +3 -0
- package/components/ion-range.js +39 -5
- package/components/ion-refresher.js +2 -0
- package/components/ion-reorder-group.js +2 -0
- package/components/ion-route-redirect.js +3 -0
- package/components/ion-route.js +4 -0
- package/components/ion-router-outlet.js +2 -0
- package/components/ion-searchbar.js +4 -0
- package/components/ion-segment-button.js +2 -0
- package/components/ion-segment.js +6 -1
- package/components/ion-select.js +5 -0
- package/components/ion-split-pane.js +4 -0
- package/components/ion-tab-bar.js +2 -0
- package/components/ion-tab.js +2 -0
- package/components/ion-textarea.js +4 -0
- package/components/ion-title.js +2 -0
- package/components/ion-toast.js +3 -0
- package/components/ion-toggle.js +2 -0
- package/components/item.js +48 -10
- package/components/label.js +3 -0
- package/components/overlays.js +30 -10
- package/components/picker-column-internal.js +2 -0
- package/components/picker-column.js +2 -0
- package/components/popover.js +4 -0
- package/components/radio-group.js +3 -1
- package/components/radio.js +5 -0
- package/dist/cjs/{app-globals-a63c2a19.js → app-globals-56164d1a.js} +1 -1
- package/dist/cjs/{button-active-0ff8e82c.js → button-active-32f15660.js} +1 -1
- package/dist/cjs/{index-e6416850.js → index-5121bb90.js} +1 -1
- package/dist/cjs/{index-184fdd62.js → index-6f887430.js} +44 -14
- package/dist/cjs/{index-be8a2ab9.js → index-b183138a.js} +3 -3
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{input-shims-f8569707.js → input-shims-da7dc0de.js} +92 -12
- package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
- package/dist/cjs/ion-alert.cjs.entry.js +4 -4
- package/dist/cjs/ion-app_8.cjs.entry.js +5 -5
- 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 +8 -6
- 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 +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
- 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 +37 -10
- package/dist/cjs/ion-loading.cjs.entry.js +4 -4
- package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-modal.cjs.entry.js +4 -4
- 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 +5 -5
- 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 +34 -7
- 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 +3 -3
- 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 +4 -4
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{ionic-global-6d5d27b5.js → ionic-global-14a0604b.js} +1 -1
- package/dist/cjs/ionic.cjs.js +5 -5
- package/dist/cjs/{ios.transition-80582b44.js → ios.transition-4b93903d.js} +2 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-eeca9fb5.js → md.transition-79f3a215.js} +2 -2
- package/dist/cjs/{overlays-c78a0148.js → overlays-d3a13e61.js} +33 -13
- package/dist/cjs/{status-tap-cc4c6539.js → status-tap-e2e45ff8.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/checkbox/checkbox.js +6 -4
- package/dist/collection/components/checkbox/test/basic/checkbox.e2e.js +17 -0
- package/dist/collection/components/checkbox/test/legacy/basic/checkbox.e2e.js +17 -0
- package/dist/collection/components/item/item.ios.css +4 -0
- package/dist/collection/components/item/item.js +43 -7
- package/dist/collection/components/item/item.md.css +4 -0
- package/dist/collection/components/menu/menu.js +2 -2
- package/dist/collection/components/radio/test/item/radio.e2e.js +23 -0
- package/dist/collection/components/range/range.ios.css +14 -0
- package/dist/collection/components/range/range.js +30 -3
- package/dist/collection/components/range/range.md.css +14 -0
- package/dist/collection/components/range/test/item/range.e2e.js +11 -0
- package/dist/collection/components/select/test/basic/select.e2e.js +21 -0
- package/dist/collection/components/toggle/test/item/toggle.e2e.js +28 -0
- package/dist/collection/utils/input-shims/hacks/scroll-assist.js +86 -4
- package/dist/collection/utils/input-shims/hacks/scroll-data.js +2 -3
- package/dist/collection/utils/overlays.js +29 -9
- package/dist/docs.json +2 -2
- package/dist/esm/{app-globals-c7886b40.js → app-globals-8ae762aa.js} +1 -1
- package/dist/esm/{button-active-b76ae4ec.js → button-active-513e9fff.js} +1 -1
- package/dist/esm/{index-adfb2000.js → index-2d388930.js} +44 -14
- package/dist/esm/{index-48f5e259.js → index-61bddc90.js} +1 -1
- package/dist/esm/{index-01839411.js → index-87684bba.js} +3 -3
- package/dist/esm/index.js +7 -7
- package/dist/esm/{input-shims-af993f05.js → input-shims-d78a3c77.js} +88 -8
- package/dist/esm/ion-accordion_2.entry.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +4 -4
- package/dist/esm/ion-alert.entry.js +4 -4
- package/dist/esm/ion-app_8.entry.js +5 -5
- 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 +8 -6
- 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 +2 -2
- package/dist/esm/ion-datetime_3.entry.js +4 -4
- 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 +37 -10
- package/dist/esm/ion-loading.entry.js +4 -4
- package/dist/esm/ion-menu_3.entry.js +5 -5
- package/dist/esm/ion-modal.entry.js +4 -4
- 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 +5 -5
- 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 +34 -7
- 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 +3 -3
- 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 +4 -4
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm/{ionic-global-9080266a.js → ionic-global-b3fc28dd.js} +1 -1
- package/dist/esm/ionic.js +6 -6
- package/dist/esm/{ios.transition-f43871cd.js → ios.transition-81e1aed6.js} +2 -2
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-12d21ad0.js → md.transition-5becd8b5.js} +2 -2
- package/dist/esm/{overlays-4565894b.js → overlays-8fc6656c.js} +31 -11
- package/dist/esm/{status-tap-121c711d.js → status-tap-c5af0dba.js} +1 -1
- package/dist/esm-es5/app-globals-8ae762aa.js +4 -0
- package/dist/esm-es5/{button-active-b76ae4ec.js → button-active-513e9fff.js} +1 -1
- package/dist/esm-es5/{index-adfb2000.js → index-2d388930.js} +1 -1
- package/dist/esm-es5/{index-48f5e259.js → index-61bddc90.js} +1 -1
- package/dist/esm-es5/{index-01839411.js → index-87684bba.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/input-shims-d78a3c77.js +4 -0
- 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-9080266a.js → ionic-global-b3fc28dd.js} +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-f43871cd.js → ios.transition-81e1aed6.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{md.transition-12d21ad0.js → md.transition-5becd8b5.js} +1 -1
- package/dist/esm-es5/overlays-8fc6656c.js +4 -0
- package/dist/esm-es5/{status-tap-121c711d.js → status-tap-c5af0dba.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-5fc777e6.system.js → p-00aed720.system.js} +1 -1
- package/dist/ionic/{p-a033a91d.system.entry.js → p-03e2e541.system.entry.js} +1 -1
- package/dist/ionic/{p-59b40b60.entry.js → p-04ef1ba6.entry.js} +1 -1
- package/dist/ionic/{p-2b0ecc04.entry.js → p-05f10762.entry.js} +1 -1
- package/dist/ionic/{p-3bf120f8.system.entry.js → p-08c5b9f4.system.entry.js} +1 -1
- package/dist/ionic/p-09e15a2a.system.entry.js +4 -0
- package/dist/ionic/p-0bd3cc92.entry.js +4 -0
- package/dist/ionic/{p-57847936.entry.js → p-116641fe.entry.js} +1 -1
- package/dist/ionic/{p-cd002251.entry.js → p-13a91505.entry.js} +1 -1
- package/dist/ionic/p-13ce151b.entry.js +4 -0
- package/dist/ionic/{p-6ccffb74.system.entry.js → p-1a36bf45.system.entry.js} +1 -1
- package/dist/ionic/{p-1916030e.entry.js → p-1bce805b.entry.js} +1 -1
- package/dist/ionic/{p-46058a1e.system.entry.js → p-1c406ee0.system.entry.js} +1 -1
- package/dist/ionic/{p-42e0558f.entry.js → p-20e5eb3e.entry.js} +1 -1
- package/dist/ionic/{p-3d5a6d14.system.js → p-2309dba2.system.js} +1 -1
- package/dist/ionic/{p-aa702daf.entry.js → p-270aa06b.entry.js} +1 -1
- package/dist/ionic/{p-9eced28c.entry.js → p-27614d55.entry.js} +1 -1
- package/dist/ionic/{p-c7ce7e18.entry.js → p-327fc1bf.entry.js} +1 -1
- package/dist/ionic/p-33630008.system.entry.js +4 -0
- package/dist/ionic/{p-8bcd482b.entry.js → p-3730f493.entry.js} +1 -1
- package/dist/ionic/{p-95188051.system.entry.js → p-37456282.system.entry.js} +1 -1
- package/dist/ionic/{p-07656a8a.entry.js → p-39715fcf.entry.js} +1 -1
- package/dist/ionic/{p-f62bed60.entry.js → p-3ae2faf0.entry.js} +1 -1
- package/dist/ionic/{p-fa8fc77b.system.entry.js → p-3af01ae0.system.entry.js} +1 -1
- package/dist/ionic/p-3cbcb899.entry.js +4 -0
- package/dist/ionic/{p-9e8727d6.entry.js → p-3e5676b7.entry.js} +1 -1
- package/dist/ionic/{p-ff0615d9.system.entry.js → p-40e16caa.system.entry.js} +1 -1
- package/dist/ionic/{p-48d378cf.entry.js → p-42a7b112.entry.js} +1 -1
- package/dist/ionic/{p-e239ab05.system.entry.js → p-4616f20a.system.entry.js} +1 -1
- package/dist/ionic/{p-4e1a58c6.system.entry.js → p-486b567b.system.entry.js} +1 -1
- package/dist/ionic/{p-dfee12f6.entry.js → p-4912b933.entry.js} +1 -1
- package/dist/ionic/{p-3d575698.system.entry.js → p-4a1ac160.system.entry.js} +1 -1
- package/dist/ionic/{p-b052b578.entry.js → p-4eab1bb4.entry.js} +1 -1
- package/dist/ionic/{p-264b5dd9.system.entry.js → p-53bbd357.system.entry.js} +1 -1
- package/dist/ionic/{p-9b53c813.entry.js → p-55b99166.entry.js} +1 -1
- package/dist/ionic/{p-e3ca182a.entry.js → p-568fec78.entry.js} +1 -1
- package/dist/ionic/{p-9be96bf3.system.entry.js → p-5c8c9748.system.entry.js} +1 -1
- package/dist/ionic/{p-d57e8b06.js → p-5e2dc8e0.js} +1 -1
- package/dist/ionic/{p-3c325277.js → p-5e43aa8b.js} +1 -1
- package/dist/ionic/{p-810f1bc9.system.entry.js → p-5e84b718.system.entry.js} +1 -1
- package/dist/ionic/{p-60f22efc.system.entry.js → p-60838ce3.system.entry.js} +1 -1
- package/dist/ionic/{p-5080e623.system.entry.js → p-62428e04.system.entry.js} +1 -1
- package/dist/ionic/{p-516421e2.system.entry.js → p-626f7142.system.entry.js} +1 -1
- package/dist/ionic/{p-a8270ae8.system.entry.js → p-63a73b69.system.entry.js} +1 -1
- package/dist/ionic/{p-5163baf4.system.entry.js → p-6522a762.system.entry.js} +1 -1
- package/dist/ionic/{p-a037b6d5.system.entry.js → p-65a4c12f.system.entry.js} +1 -1
- package/dist/ionic/{p-563068af.js → p-6b7e74ba.js} +1 -1
- package/dist/ionic/{p-6eb7b33c.system.entry.js → p-6ba07931.system.entry.js} +1 -1
- package/dist/ionic/{p-c8c0d58a.system.entry.js → p-6bbf2815.system.entry.js} +1 -1
- package/dist/ionic/{p-74834696.system.entry.js → p-6bc9c436.system.entry.js} +1 -1
- package/dist/ionic/{p-ec344ed1.system.entry.js → p-6ca0e4b2.system.entry.js} +1 -1
- package/dist/ionic/p-6edbc09b.system.js +4 -0
- package/dist/ionic/{p-4446e19f.system.entry.js → p-700a2cb1.system.entry.js} +1 -1
- package/dist/ionic/p-70ab8b73.js +5 -0
- package/dist/ionic/{p-52edd6b0.entry.js → p-7129d04e.entry.js} +1 -1
- package/dist/ionic/p-72a1cbc7.js +4 -0
- package/dist/ionic/{p-2e5930dd.system.js → p-73f50e29.system.js} +1 -1
- package/dist/ionic/{p-204fb8f0.system.entry.js → p-76e8336d.system.entry.js} +1 -1
- package/dist/ionic/p-78a293a5.js +4 -0
- package/dist/ionic/p-7a3caa4e.system.js +4 -0
- package/dist/ionic/{p-32983529.system.entry.js → p-7dc0ee11.system.entry.js} +1 -1
- package/dist/ionic/{p-ab051966.entry.js → p-7e46b6ab.entry.js} +1 -1
- package/dist/ionic/p-7e9e16bf.system.entry.js +4 -0
- package/dist/ionic/{p-6276ba2f.system.entry.js → p-82da795c.system.entry.js} +1 -1
- package/dist/ionic/{p-9f3ad626.system.entry.js → p-82f58c25.system.entry.js} +1 -1
- package/dist/ionic/{p-5df94bf8.entry.js → p-83b7bbf9.entry.js} +1 -1
- package/dist/ionic/{p-ec7ff98b.entry.js → p-88ad9cb6.entry.js} +1 -1
- package/dist/ionic/{p-fdfc7b98.entry.js → p-8b79baf0.entry.js} +1 -1
- package/dist/ionic/{p-5260588f.system.entry.js → p-8e28945a.system.entry.js} +1 -1
- package/dist/ionic/p-8fdd4a2f.system.js +4 -0
- package/dist/ionic/{p-49f2eaa6.entry.js → p-90d892fd.entry.js} +1 -1
- package/dist/ionic/{p-2441ba84.system.js → p-91546be9.system.js} +1 -1
- package/dist/ionic/{p-a122ecd0.system.js → p-918d5f19.system.js} +1 -1
- package/dist/ionic/{p-ff3d728d.system.js → p-93616477.system.js} +1 -1
- package/dist/ionic/{p-629b0629.js → p-972763df.js} +1 -1
- package/dist/ionic/p-9f2e0db9.js +4 -0
- package/dist/ionic/{p-c2d6088f.entry.js → p-a1a2dd4d.entry.js} +1 -1
- package/dist/ionic/{p-c005eb67.system.entry.js → p-a6d8476b.system.entry.js} +1 -1
- package/dist/ionic/{p-28d8b87b.entry.js → p-a720dc73.entry.js} +1 -1
- package/dist/ionic/{p-84084b75.entry.js → p-a8d33949.entry.js} +1 -1
- package/dist/ionic/{p-70f4fbac.entry.js → p-ab7f8f4c.entry.js} +1 -1
- package/dist/ionic/{p-26276eb7.system.entry.js → p-abf426cd.system.entry.js} +1 -1
- package/dist/ionic/{p-9fccec52.system.js → p-b098f738.system.js} +1 -1
- package/dist/ionic/{p-eb91aee6.entry.js → p-b0dd4f33.entry.js} +1 -1
- package/dist/ionic/p-b132c2c0.system.js +4 -0
- package/dist/ionic/{p-b453b38d.entry.js → p-b49fe110.entry.js} +1 -1
- package/dist/ionic/{p-b703ebeb.system.entry.js → p-b5637aeb.system.entry.js} +1 -1
- package/dist/ionic/{p-d74363db.entry.js → p-b95fd3c6.entry.js} +1 -1
- package/dist/ionic/{p-ff0611e6.system.entry.js → p-be321bb6.system.entry.js} +1 -1
- package/dist/ionic/{p-7474a472.system.entry.js → p-bf8224f4.system.entry.js} +1 -1
- package/dist/ionic/{p-0dbfa45f.entry.js → p-bf9b1560.entry.js} +1 -1
- package/dist/ionic/{p-98bfaff3.system.entry.js → p-bfac43d7.system.entry.js} +1 -1
- package/dist/ionic/{p-574411f2.system.entry.js → p-c4d08d6d.system.entry.js} +1 -1
- package/dist/ionic/{p-d8d30fd1.system.entry.js → p-c5729044.system.entry.js} +1 -1
- package/dist/ionic/{p-07f5e286.entry.js → p-c7fca267.entry.js} +1 -1
- package/dist/ionic/{p-041ac2c3.entry.js → p-cc3aa152.entry.js} +1 -1
- package/dist/ionic/{p-6dff4431.entry.js → p-cd12dcd9.entry.js} +1 -1
- package/dist/ionic/{p-d0d09178.system.entry.js → p-cd675d89.system.entry.js} +1 -1
- package/dist/ionic/{p-ef8a8827.system.entry.js → p-ce24ddd7.system.entry.js} +1 -1
- package/dist/ionic/{p-b3f6f321.js → p-ce7a651e.js} +1 -1
- package/dist/ionic/{p-5e549223.system.js → p-d4cea1ba.system.js} +1 -1
- package/dist/ionic/{p-765e6339.entry.js → p-d8b2c214.entry.js} +1 -1
- package/dist/ionic/{p-2ac2278e.system.entry.js → p-de0f1af2.system.entry.js} +1 -1
- package/dist/ionic/{p-5a9dc764.system.entry.js → p-de676d36.system.entry.js} +1 -1
- package/dist/ionic/{p-22e92b06.system.entry.js → p-df699a02.system.entry.js} +1 -1
- package/dist/ionic/{p-99a3df5c.entry.js → p-e24630f9.entry.js} +1 -1
- package/dist/ionic/{p-3f15f60b.entry.js → p-e57a38f3.entry.js} +1 -1
- package/dist/ionic/{p-74ef17ea.system.entry.js → p-e89abe38.system.entry.js} +1 -1
- package/dist/ionic/{p-37c9e295.entry.js → p-ea88031d.entry.js} +1 -1
- package/dist/ionic/{p-47a11fc4.entry.js → p-ebaeeee8.entry.js} +1 -1
- package/dist/ionic/{p-a314559e.system.js → p-ec102360.system.js} +1 -1
- package/dist/ionic/{p-072f99fd.entry.js → p-ee6d9730.entry.js} +1 -1
- package/dist/ionic/{p-bacf09d3.entry.js → p-f0dcf99b.entry.js} +1 -1
- package/dist/ionic/p-f9015336.js +4 -0
- package/dist/ionic/{p-11d0977d.entry.js → p-f920f5ca.entry.js} +1 -1
- package/dist/ionic/p-f978ccd1.js +4 -0
- package/dist/types/components/checkbox/checkbox.d.ts +1 -0
- package/dist/types/components/item/item.d.ts +1 -0
- package/dist/types/components/range/range.d.ts +8 -0
- package/dist/types/utils/browser/index.d.ts +16 -1
- package/dist/types/utils/input-shims/hacks/scroll-data.d.ts +1 -1
- package/dist/types/utils/overlays.d.ts +5 -2
- package/hydrate/index.js +126 -38
- package/package.json +2 -2
- package/dist/esm-es5/app-globals-c7886b40.js +0 -4
- package/dist/esm-es5/input-shims-af993f05.js +0 -4
- package/dist/esm-es5/overlays-4565894b.js +0 -4
- package/dist/ionic/p-4531b920.system.js +0 -4
- package/dist/ionic/p-56495958.js +0 -4
- package/dist/ionic/p-6d640b2b.entry.js +0 -4
- package/dist/ionic/p-75d4ceab.js +0 -4
- package/dist/ionic/p-8f7edf3e.js +0 -4
- package/dist/ionic/p-a18eb556.js +0 -5
- package/dist/ionic/p-a533868d.system.js +0 -4
- package/dist/ionic/p-be187db3.entry.js +0 -4
- package/dist/ionic/p-bfee11b2.system.js +0 -4
- package/dist/ionic/p-c68a8814.system.js +0 -4
- package/dist/ionic/p-cc758251.system.entry.js +0 -4
- package/dist/ionic/p-d898dd46.js +0 -4
- package/dist/ionic/p-dacb0258.js +0 -4
- package/dist/ionic/p-ee55302a.system.entry.js +0 -4
- package/dist/ionic/p-f0c28fbd.entry.js +0 -4
- package/dist/ionic/p-fde174d6.system.entry.js +0 -4
|
@@ -47,5 +47,22 @@ configs({ directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
47
47
|
await checkbox.evaluate((el) => (el.checked = true));
|
|
48
48
|
await expect(ionChange).not.toHaveReceivedEvent();
|
|
49
49
|
});
|
|
50
|
+
test('clicking padded space within item should click the checkbox', async ({ page }) => {
|
|
51
|
+
await page.setContent(`
|
|
52
|
+
<ion-item>
|
|
53
|
+
<ion-checkbox legacy="true" value="my-checkbox"></ion-checkbox>
|
|
54
|
+
</ion-item>
|
|
55
|
+
`, config);
|
|
56
|
+
const itemNative = page.locator('.item-native');
|
|
57
|
+
const ionChange = await page.spyOnEvent('ionChange');
|
|
58
|
+
// Clicks the padded space within the item
|
|
59
|
+
await itemNative.click({
|
|
60
|
+
position: {
|
|
61
|
+
x: 5,
|
|
62
|
+
y: 5,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
expect(ionChange).toHaveReceivedEvent();
|
|
66
|
+
});
|
|
50
67
|
});
|
|
51
68
|
});
|
|
@@ -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";
|
|
@@ -194,8 +194,21 @@ export class Item {
|
|
|
194
194
|
this.el.classList.add('item-has-start-slot');
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
+
getFirstInteractive() {
|
|
198
|
+
if (Build.isTesting) {
|
|
199
|
+
/**
|
|
200
|
+
* Pseudo selectors can't be tested in unit tests.
|
|
201
|
+
* It will cause an error when running the tests.
|
|
202
|
+
*
|
|
203
|
+
* TODO: FW-5205 - Remove the build conditional when this is fixed in Stencil
|
|
204
|
+
*/
|
|
205
|
+
return undefined;
|
|
206
|
+
}
|
|
207
|
+
const controls = this.el.querySelectorAll('ion-toggle:not([disabled]), ion-checkbox:not([disabled]), ion-radio:not([disabled]), ion-select:not([disabled])');
|
|
208
|
+
return controls[0];
|
|
209
|
+
}
|
|
197
210
|
render() {
|
|
198
|
-
const { counterString, detail, detailIcon, download, fill, labelColorStyles, lines, disabled, href, rel, shape, target, routerAnimation, routerDirection, inheritedAriaAttributes, } = this;
|
|
211
|
+
const { counterString, detail, detailIcon, download, fill, labelColorStyles, lines, disabled, href, rel, shape, target, routerAnimation, routerDirection, inheritedAriaAttributes, multipleInputs, } = this;
|
|
199
212
|
const childStyles = {};
|
|
200
213
|
const mode = getIonMode(this);
|
|
201
214
|
const clickable = this.isClickable();
|
|
@@ -209,15 +222,37 @@ export class Item {
|
|
|
209
222
|
rel,
|
|
210
223
|
target,
|
|
211
224
|
};
|
|
225
|
+
let clickFn = {};
|
|
226
|
+
const firstInteractive = this.getFirstInteractive();
|
|
212
227
|
// Only set onClick if the item is clickable to prevent screen
|
|
213
228
|
// readers from reading all items as clickable
|
|
214
|
-
|
|
215
|
-
|
|
229
|
+
if (clickable || (firstInteractive !== undefined && !multipleInputs)) {
|
|
230
|
+
clickFn = {
|
|
216
231
|
onClick: (ev) => {
|
|
217
|
-
|
|
232
|
+
if (clickable) {
|
|
233
|
+
openURL(href, ev, routerDirection, routerAnimation);
|
|
234
|
+
}
|
|
235
|
+
if (firstInteractive !== undefined && !multipleInputs) {
|
|
236
|
+
const path = ev.composedPath();
|
|
237
|
+
const target = path[0];
|
|
238
|
+
if (ev.isTrusted) {
|
|
239
|
+
/**
|
|
240
|
+
* Dispatches a click event to the first interactive element,
|
|
241
|
+
* when it is the result of a user clicking on the item.
|
|
242
|
+
*
|
|
243
|
+
* We check if the click target is in the shadow root,
|
|
244
|
+
* which means the user clicked on the .item-native or
|
|
245
|
+
* .item-inner padding.
|
|
246
|
+
*/
|
|
247
|
+
const clickedWithinShadowRoot = this.el.shadowRoot.contains(target);
|
|
248
|
+
if (clickedWithinShadowRoot) {
|
|
249
|
+
firstInteractive.click();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
218
253
|
},
|
|
219
|
-
}
|
|
220
|
-
|
|
254
|
+
};
|
|
255
|
+
}
|
|
221
256
|
const showDetail = detail !== undefined ? detail : mode === 'ios' && clickable;
|
|
222
257
|
this.itemStyles.forEach((value) => {
|
|
223
258
|
Object.assign(childStyles, value);
|
|
@@ -232,6 +267,7 @@ export class Item {
|
|
|
232
267
|
[`item-lines-${lines}`]: lines !== undefined,
|
|
233
268
|
[`item-fill-${fillValue}`]: true,
|
|
234
269
|
[`item-shape-${shape}`]: shape !== undefined,
|
|
270
|
+
'item-has-interactive-control': firstInteractive !== undefined,
|
|
235
271
|
'item-disabled': disabled,
|
|
236
272
|
'in-list': inList,
|
|
237
273
|
'item-multiple-inputs': this.multipleInputs,
|
|
@@ -7,7 +7,7 @@ import { doc } from "../../utils/browser/index";
|
|
|
7
7
|
import { GESTURE_CONTROLLER } from "../../utils/gesture/index";
|
|
8
8
|
import { inheritAriaAttributes, assert, clamp, isEndSide as isEnd } from "../../utils/helpers";
|
|
9
9
|
import { menuController } from "../../utils/menu-controller/index";
|
|
10
|
-
import {
|
|
10
|
+
import { getPresentedOverlay } from "../../utils/overlays";
|
|
11
11
|
import { config } from "../../global/config";
|
|
12
12
|
import { getIonMode } from "../../global/ionic-global";
|
|
13
13
|
const iosEasing = 'cubic-bezier(0.32,0.72,0,1)';
|
|
@@ -35,7 +35,7 @@ export class Menu {
|
|
|
35
35
|
* open does not contain this ion-menu, then ion-menu's
|
|
36
36
|
* focus trapping should not run.
|
|
37
37
|
*/
|
|
38
|
-
const lastOverlay =
|
|
38
|
+
const lastOverlay = getPresentedOverlay(document);
|
|
39
39
|
if (lastOverlay && !lastOverlay.contains(this.el)) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
@@ -66,4 +66,27 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ title, screenshot, co
|
|
|
66
66
|
await expect(list).toHaveScreenshot(screenshot(`radio-stacked-label-in-item`));
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
|
+
test.describe(title('radio: ionChange'), () => {
|
|
70
|
+
test('clicking padded space within item should click the radio', async ({ page }) => {
|
|
71
|
+
await page.setContent(`
|
|
72
|
+
<ion-radio-group>
|
|
73
|
+
<ion-item>
|
|
74
|
+
<ion-radio>
|
|
75
|
+
<ion-label>Enable Notifications</ion-label>
|
|
76
|
+
</ion-radio>
|
|
77
|
+
</ion-item>
|
|
78
|
+
</ion-radio-group>
|
|
79
|
+
`, config);
|
|
80
|
+
const itemNative = page.locator('.item-native');
|
|
81
|
+
const ionChange = await page.spyOnEvent('ionChange');
|
|
82
|
+
// Clicks the padded space within the item
|
|
83
|
+
await itemNative.click({
|
|
84
|
+
position: {
|
|
85
|
+
x: 5,
|
|
86
|
+
y: 5,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
expect(ionChange).toHaveReceivedEvent();
|
|
90
|
+
});
|
|
91
|
+
});
|
|
69
92
|
});
|
|
@@ -407,6 +407,10 @@
|
|
|
407
407
|
margin-bottom: 0px;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
+
/**
|
|
411
|
+
* 24px was chosen so the knob and its
|
|
412
|
+
* shadow do not get cut off by the item.
|
|
413
|
+
*/
|
|
410
414
|
:host {
|
|
411
415
|
--knob-border-radius: 50%;
|
|
412
416
|
--knob-background: #ffffff;
|
|
@@ -428,6 +432,16 @@
|
|
|
428
432
|
padding-bottom: 8px;
|
|
429
433
|
}
|
|
430
434
|
|
|
435
|
+
:host(.range-item-start-adjustment) {
|
|
436
|
+
-webkit-padding-start: 24px;
|
|
437
|
+
padding-inline-start: 24px;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
:host(.range-item-end-adjustment) {
|
|
441
|
+
-webkit-padding-end: 24px;
|
|
442
|
+
padding-inline-end: 24px;
|
|
443
|
+
}
|
|
444
|
+
|
|
431
445
|
:host(.ion-color) .range-bar-active,
|
|
432
446
|
:host(.ion-color) .range-tick-active {
|
|
433
447
|
background: var(--ion-color-base);
|
|
@@ -372,20 +372,47 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
|
|
|
372
372
|
'legacy-range': true,
|
|
373
373
|
}) }, h("slot", { name: "start" }), this.renderRangeSlider(), h("slot", { name: "end" })));
|
|
374
374
|
}
|
|
375
|
+
/**
|
|
376
|
+
* Returns true if content was passed to the "start" slot
|
|
377
|
+
*/
|
|
378
|
+
get hasStartSlotContent() {
|
|
379
|
+
return this.el.querySelector('[slot="start"]') !== null;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Returns true if content was passed to the "end" slot
|
|
383
|
+
*/
|
|
384
|
+
get hasEndSlotContent() {
|
|
385
|
+
return this.el.querySelector('[slot="end"]') !== null;
|
|
386
|
+
}
|
|
375
387
|
renderRange() {
|
|
376
|
-
const { disabled, el, rangeId, pin, pressedKnob, labelPlacement, label } = this;
|
|
388
|
+
const { disabled, el, hasLabel, rangeId, pin, pressedKnob, labelPlacement, label } = this;
|
|
389
|
+
const inItem = hostContext('ion-item', el);
|
|
390
|
+
/**
|
|
391
|
+
* If there is no start content then the knob at
|
|
392
|
+
* the min value will be cut off by the item margin.
|
|
393
|
+
*/
|
|
394
|
+
const hasStartContent = (hasLabel && (labelPlacement === 'start' || labelPlacement === 'fixed')) || this.hasStartSlotContent;
|
|
395
|
+
const needsStartAdjustment = inItem && !hasStartContent;
|
|
396
|
+
/**
|
|
397
|
+
* If there is no end content then the knob at
|
|
398
|
+
* the max value will be cut off by the item margin.
|
|
399
|
+
*/
|
|
400
|
+
const hasEndContent = (hasLabel && labelPlacement === 'end') || this.hasEndSlotContent;
|
|
401
|
+
const needsEndAdjustment = inItem && !hasEndContent;
|
|
377
402
|
const mode = getIonMode(this);
|
|
378
403
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
379
404
|
return (h(Host, { onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses(this.color, {
|
|
380
405
|
[mode]: true,
|
|
381
|
-
'in-item':
|
|
406
|
+
'in-item': inItem,
|
|
382
407
|
'range-disabled': disabled,
|
|
383
408
|
'range-pressed': pressedKnob !== undefined,
|
|
384
409
|
'range-has-pin': pin,
|
|
385
410
|
[`range-label-placement-${labelPlacement}`]: true,
|
|
411
|
+
'range-item-start-adjustment': needsStartAdjustment,
|
|
412
|
+
'range-item-end-adjustment': needsEndAdjustment,
|
|
386
413
|
}) }, h("label", { class: "range-wrapper", id: "range-label" }, h("div", { class: {
|
|
387
414
|
'label-text-wrapper': true,
|
|
388
|
-
'label-text-wrapper-hidden': !
|
|
415
|
+
'label-text-wrapper-hidden': !hasLabel,
|
|
389
416
|
} }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { class: "native-wrapper" }, h("slot", { name: "start" }), this.renderRangeSlider(), h("slot", { name: "end" })))));
|
|
390
417
|
}
|
|
391
418
|
get hasLabel() {
|
|
@@ -407,6 +407,10 @@
|
|
|
407
407
|
margin-bottom: 0px;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
+
/**
|
|
411
|
+
* 18px was chosen so the knob and its focus/active
|
|
412
|
+
* effects do not get cut off by the item.
|
|
413
|
+
*/
|
|
410
414
|
:host {
|
|
411
415
|
--knob-border-radius: 50%;
|
|
412
416
|
--knob-background: var(--bar-background-active);
|
|
@@ -435,6 +439,16 @@
|
|
|
435
439
|
padding-bottom: 8px;
|
|
436
440
|
}
|
|
437
441
|
|
|
442
|
+
:host(.range-item-start-adjustment) {
|
|
443
|
+
-webkit-padding-start: 18px;
|
|
444
|
+
padding-inline-start: 18px;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
:host(.range-item-end-adjustment) {
|
|
448
|
+
-webkit-padding-end: 18px;
|
|
449
|
+
padding-inline-end: 18px;
|
|
450
|
+
}
|
|
451
|
+
|
|
438
452
|
:host(.ion-color) .range-bar {
|
|
439
453
|
background: rgba(var(--ion-color-base-rgb), 0.26);
|
|
440
454
|
}
|
|
@@ -27,6 +27,17 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
27
27
|
const list = page.locator('ion-list');
|
|
28
28
|
await expect(list).toHaveScreenshot(screenshot(`range-inset-list`));
|
|
29
29
|
});
|
|
30
|
+
test('should render adjustments in item', async ({ page }) => {
|
|
31
|
+
await page.setContent(`
|
|
32
|
+
<ion-list inset="true">
|
|
33
|
+
<ion-item>
|
|
34
|
+
<ion-range value="0" aria-label="true"></ion-range>
|
|
35
|
+
</ion-item>
|
|
36
|
+
</ion-list>
|
|
37
|
+
`, config);
|
|
38
|
+
const list = page.locator('ion-list');
|
|
39
|
+
await expect(list).toHaveScreenshot(screenshot(`range-adjustments`));
|
|
40
|
+
});
|
|
30
41
|
});
|
|
31
42
|
});
|
|
32
43
|
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
@@ -170,5 +170,26 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
170
170
|
await select.evaluate((el) => (el.value = 'banana'));
|
|
171
171
|
await expect(ionChange).not.toHaveReceivedEvent();
|
|
172
172
|
});
|
|
173
|
+
test('clicking padded space within item should click the select', async ({ page }) => {
|
|
174
|
+
await page.setContent(`
|
|
175
|
+
<ion-item>
|
|
176
|
+
<ion-select label="Fruit" interface="action-sheet">
|
|
177
|
+
<ion-select-option value="apple">Apple</ion-select-option>
|
|
178
|
+
<ion-select-option value="banana">Banana</ion-select-option>
|
|
179
|
+
</ion-select>
|
|
180
|
+
</ion-item>
|
|
181
|
+
`, config);
|
|
182
|
+
const itemNative = page.locator('.item-native');
|
|
183
|
+
const ionActionSheetDidPresent = await page.spyOnEvent('ionActionSheetDidPresent');
|
|
184
|
+
// Clicks the padded space within the item
|
|
185
|
+
await itemNative.click({
|
|
186
|
+
position: {
|
|
187
|
+
x: 5,
|
|
188
|
+
y: 5,
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
await ionActionSheetDidPresent.next();
|
|
192
|
+
expect(ionActionSheetDidPresent).toHaveReceivedEvent();
|
|
193
|
+
});
|
|
173
194
|
});
|
|
174
195
|
});
|
|
@@ -73,4 +73,32 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ title, screenshot, co
|
|
|
73
73
|
await expect(list).toHaveScreenshot(screenshot(`toggle-stacked-label-in-item`));
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
|
+
test.describe(title('toggle: ionChange'), () => {
|
|
77
|
+
test('clicking padded space within item should click the toggle', async ({ page }) => {
|
|
78
|
+
await page.setContent(`
|
|
79
|
+
<ion-item>
|
|
80
|
+
<ion-toggle>Size</ion-toggle>
|
|
81
|
+
</ion-item>
|
|
82
|
+
`, config);
|
|
83
|
+
const itemNative = page.locator('.item-native');
|
|
84
|
+
const ionChange = await page.spyOnEvent('ionChange');
|
|
85
|
+
/**
|
|
86
|
+
* Clicks the padded space within the item.
|
|
87
|
+
*
|
|
88
|
+
* We intentionally activate the toggle control when clicking either
|
|
89
|
+
* the label or padded space. This is different than native iOS,
|
|
90
|
+
* but we do it for three reasons:
|
|
91
|
+
* 1. Clicking a label connected to a control is standard behavior for web controls.
|
|
92
|
+
* 2. iOS is inconsistent in their implementation and other controls can be activated by clicking the label.
|
|
93
|
+
* 3. MD is consistent in their implementation and activates controls by clicking the label.
|
|
94
|
+
*/
|
|
95
|
+
await itemNative.click({
|
|
96
|
+
position: {
|
|
97
|
+
x: 5,
|
|
98
|
+
y: 5,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
expect(ionChange).toHaveReceivedEvent();
|
|
102
|
+
});
|
|
103
|
+
});
|
|
76
104
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
+
import { win } from "../../browser/index";
|
|
4
5
|
import { getScrollElement, scrollByPoint } from "../../content";
|
|
5
6
|
import { raf } from "../../helpers";
|
|
6
7
|
import { KeyboardResize } from "../../native/keyboard";
|
|
@@ -20,6 +21,83 @@ export const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, ke
|
|
|
20
21
|
* Resize info is available on Capacitor 4+
|
|
21
22
|
*/
|
|
22
23
|
const addScrollPadding = enableScrollPadding && (keyboardResize === undefined || keyboardResize.mode === KeyboardResize.None);
|
|
24
|
+
/**
|
|
25
|
+
* This tracks whether or not the keyboard has been
|
|
26
|
+
* presented for a single focused text field. Note
|
|
27
|
+
* that it does not track if the keyboard is open
|
|
28
|
+
* in general such as if the keyboard is open for
|
|
29
|
+
* a different focused text field.
|
|
30
|
+
*/
|
|
31
|
+
let hasKeyboardBeenPresentedForTextField = false;
|
|
32
|
+
/**
|
|
33
|
+
* When adding scroll padding we need to know
|
|
34
|
+
* how much of the viewport the keyboard obscures.
|
|
35
|
+
* We do this by subtracting the keyboard height
|
|
36
|
+
* from the platform height.
|
|
37
|
+
*
|
|
38
|
+
* If we compute this value when switching between
|
|
39
|
+
* inputs then the webview may already be resized.
|
|
40
|
+
* At this point, `win.innerHeight` has already accounted
|
|
41
|
+
* for the keyboard meaning we would then subtract
|
|
42
|
+
* the keyboard height again. This will result in the input
|
|
43
|
+
* being scrolled more than it needs to.
|
|
44
|
+
*/
|
|
45
|
+
const platformHeight = win !== undefined ? win.innerHeight : 0;
|
|
46
|
+
/**
|
|
47
|
+
* Scroll assist is run when a text field
|
|
48
|
+
* is focused. However, it may need to
|
|
49
|
+
* re-run when the keyboard size changes
|
|
50
|
+
* such that the text field is now hidden
|
|
51
|
+
* underneath the keyboard.
|
|
52
|
+
* This function re-runs scroll assist
|
|
53
|
+
* when that happens.
|
|
54
|
+
*
|
|
55
|
+
* One limitation of this is on a web browser
|
|
56
|
+
* where native keyboard APIs do not have cross-browser
|
|
57
|
+
* support. `ionKeyboardDidShow` relies on the Visual Viewport API.
|
|
58
|
+
* This means that if the keyboard changes but does not change
|
|
59
|
+
* geometry, then scroll assist will not re-run even if
|
|
60
|
+
* the user has scrolled the text field under the keyboard.
|
|
61
|
+
* This is not a problem when running in Cordova/Capacitor
|
|
62
|
+
* because `ionKeyboardDidShow` uses the native events
|
|
63
|
+
* which fire every time the keyboard changes.
|
|
64
|
+
*/
|
|
65
|
+
const keyboardShow = (ev) => {
|
|
66
|
+
/**
|
|
67
|
+
* If the keyboard has not yet been presented
|
|
68
|
+
* for this text field then the text field has just
|
|
69
|
+
* received focus. In that case, the focusin listener
|
|
70
|
+
* will run scroll assist.
|
|
71
|
+
*/
|
|
72
|
+
if (hasKeyboardBeenPresentedForTextField === false) {
|
|
73
|
+
hasKeyboardBeenPresentedForTextField = true;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Otherwise, the keyboard has already been presented
|
|
78
|
+
* for the focused text field.
|
|
79
|
+
* This means that the keyboard likely changed
|
|
80
|
+
* geometry, and we need to re-run scroll assist.
|
|
81
|
+
* This can happen when the user rotates their device
|
|
82
|
+
* or when they switch keyboards.
|
|
83
|
+
*
|
|
84
|
+
* Make sure we pass in the computed keyboard height
|
|
85
|
+
* rather than the estimated keyboard height.
|
|
86
|
+
*
|
|
87
|
+
* Since the keyboard is already open then we do not
|
|
88
|
+
* need to wait for the webview to resize, so we pass
|
|
89
|
+
* "waitForResize: false".
|
|
90
|
+
*/
|
|
91
|
+
jsSetFocus(componentEl, inputEl, contentEl, footerEl, ev.detail.keyboardHeight, addScrollPadding, disableClonedInput, platformHeight, false);
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Reset the internal state when the text field loses focus.
|
|
95
|
+
*/
|
|
96
|
+
const focusOut = () => {
|
|
97
|
+
hasKeyboardBeenPresentedForTextField = false;
|
|
98
|
+
win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
|
|
99
|
+
componentEl.removeEventListener('focusout', focusOut, true);
|
|
100
|
+
};
|
|
23
101
|
/**
|
|
24
102
|
* When the input is about to receive
|
|
25
103
|
* focus, we need to move it to prevent
|
|
@@ -36,11 +114,15 @@ export const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, ke
|
|
|
36
114
|
inputEl.removeAttribute(SKIP_SCROLL_ASSIST);
|
|
37
115
|
return;
|
|
38
116
|
}
|
|
39
|
-
jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, addScrollPadding, disableClonedInput);
|
|
117
|
+
jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, addScrollPadding, disableClonedInput, platformHeight);
|
|
118
|
+
win === null || win === void 0 ? void 0 : win.addEventListener('ionKeyboardDidShow', keyboardShow);
|
|
119
|
+
componentEl.addEventListener('focusout', focusOut, true);
|
|
40
120
|
};
|
|
41
121
|
componentEl.addEventListener('focusin', focusIn, true);
|
|
42
122
|
return () => {
|
|
43
123
|
componentEl.removeEventListener('focusin', focusIn, true);
|
|
124
|
+
win === null || win === void 0 ? void 0 : win.removeEventListener('ionKeyboardDidShow', keyboardShow);
|
|
125
|
+
componentEl.removeEventListener('focusout', focusOut, true);
|
|
44
126
|
};
|
|
45
127
|
};
|
|
46
128
|
/**
|
|
@@ -59,11 +141,11 @@ const setManualFocus = (el) => {
|
|
|
59
141
|
el.setAttribute(SKIP_SCROLL_ASSIST, 'true');
|
|
60
142
|
el.focus();
|
|
61
143
|
};
|
|
62
|
-
const jsSetFocus = async (componentEl, inputEl, contentEl, footerEl, keyboardHeight, enableScrollPadding, disableClonedInput = false) => {
|
|
144
|
+
const jsSetFocus = async (componentEl, inputEl, contentEl, footerEl, keyboardHeight, enableScrollPadding, disableClonedInput = false, platformHeight = 0, waitForResize = true) => {
|
|
63
145
|
if (!contentEl && !footerEl) {
|
|
64
146
|
return;
|
|
65
147
|
}
|
|
66
|
-
const scrollData = getScrollData(componentEl, (contentEl || footerEl), keyboardHeight);
|
|
148
|
+
const scrollData = getScrollData(componentEl, (contentEl || footerEl), keyboardHeight, platformHeight);
|
|
67
149
|
if (contentEl && Math.abs(scrollData.scrollAmount) < 4) {
|
|
68
150
|
// the text input is in a safe position that doesn't
|
|
69
151
|
// require it to be scrolled into view, just set focus now
|
|
@@ -150,7 +232,7 @@ const jsSetFocus = async (componentEl, inputEl, contentEl, footerEl, keyboardHei
|
|
|
150
232
|
* bandwidth to become available.
|
|
151
233
|
*/
|
|
152
234
|
const totalScrollAmount = scrollEl.scrollHeight - scrollEl.clientHeight;
|
|
153
|
-
if (scrollData.scrollAmount > totalScrollAmount - scrollEl.scrollTop) {
|
|
235
|
+
if (waitForResize && scrollData.scrollAmount > totalScrollAmount - scrollEl.scrollTop) {
|
|
154
236
|
/**
|
|
155
237
|
* On iOS devices, the system will show a "Passwords" bar above the keyboard
|
|
156
238
|
* after the initial keyboard is shown. This prevents the webview from resizing
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { SCROLL_AMOUNT_PADDING } from "./common";
|
|
5
5
|
const SCROLL_ASSIST_SPEED = 0.3;
|
|
6
|
-
export const getScrollData = (componentEl, contentEl, keyboardHeight) => {
|
|
6
|
+
export const getScrollData = (componentEl, contentEl, keyboardHeight, platformHeight) => {
|
|
7
7
|
var _a;
|
|
8
8
|
const itemEl = (_a = componentEl.closest('ion-item,[ion-item]')) !== null && _a !== void 0 ? _a : componentEl;
|
|
9
|
-
return calcScrollData(itemEl.getBoundingClientRect(), contentEl.getBoundingClientRect(), keyboardHeight,
|
|
10
|
-
);
|
|
9
|
+
return calcScrollData(itemEl.getBoundingClientRect(), contentEl.getBoundingClientRect(), keyboardHeight, platformHeight);
|
|
11
10
|
};
|
|
12
11
|
const calcScrollData = (inputRect, contentRect, keyboardHeight, platformHeight) => {
|
|
13
12
|
// compute input's Y values relative to the body
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
+
import { doc } from "./browser/index";
|
|
4
5
|
import { config } from "../global/config";
|
|
5
6
|
import { getIonMode } from "../global/ionic-global";
|
|
6
7
|
import { CoreDelegate } from "./framework-delegate";
|
|
@@ -19,7 +20,7 @@ const createController = (tagName) => {
|
|
|
19
20
|
return dismissOverlay(document, data, role, tagName, id);
|
|
20
21
|
},
|
|
21
22
|
async getTop() {
|
|
22
|
-
return
|
|
23
|
+
return getPresentedOverlay(document, tagName);
|
|
23
24
|
},
|
|
24
25
|
};
|
|
25
26
|
};
|
|
@@ -136,7 +137,7 @@ const focusLastDescendant = (ref, overlay) => {
|
|
|
136
137
|
* Should NOT include: Toast
|
|
137
138
|
*/
|
|
138
139
|
const trapKeyboardFocus = (ev, doc) => {
|
|
139
|
-
const lastOverlay =
|
|
140
|
+
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover');
|
|
140
141
|
const target = ev.target;
|
|
141
142
|
/**
|
|
142
143
|
* If no active overlay, ignore this event.
|
|
@@ -291,7 +292,7 @@ const connectListeners = (doc) => {
|
|
|
291
292
|
}, true);
|
|
292
293
|
// handle back-button click
|
|
293
294
|
doc.addEventListener('ionBackButton', (ev) => {
|
|
294
|
-
const lastOverlay =
|
|
295
|
+
const lastOverlay = getPresentedOverlay(doc);
|
|
295
296
|
if (lastOverlay === null || lastOverlay === void 0 ? void 0 : lastOverlay.backdropDismiss) {
|
|
296
297
|
ev.detail.register(OVERLAY_BACK_BUTTON_PRIORITY, () => {
|
|
297
298
|
return lastOverlay.dismiss(undefined, BACKDROP);
|
|
@@ -301,7 +302,7 @@ const connectListeners = (doc) => {
|
|
|
301
302
|
// handle ESC to close overlay
|
|
302
303
|
doc.addEventListener('keydown', (ev) => {
|
|
303
304
|
if (ev.key === 'Escape') {
|
|
304
|
-
const lastOverlay =
|
|
305
|
+
const lastOverlay = getPresentedOverlay(doc);
|
|
305
306
|
if (lastOverlay === null || lastOverlay === void 0 ? void 0 : lastOverlay.backdropDismiss) {
|
|
306
307
|
lastOverlay.dismiss(undefined, BACKDROP);
|
|
307
308
|
}
|
|
@@ -310,12 +311,15 @@ const connectListeners = (doc) => {
|
|
|
310
311
|
}
|
|
311
312
|
};
|
|
312
313
|
export const dismissOverlay = (doc, data, role, overlayTag, id) => {
|
|
313
|
-
const overlay =
|
|
314
|
+
const overlay = getPresentedOverlay(doc, overlayTag, id);
|
|
314
315
|
if (!overlay) {
|
|
315
316
|
return Promise.reject('overlay does not exist');
|
|
316
317
|
}
|
|
317
318
|
return overlay.dismiss(data, role);
|
|
318
319
|
};
|
|
320
|
+
/**
|
|
321
|
+
* Returns a list of all overlays in the DOM even if they are not presented.
|
|
322
|
+
*/
|
|
319
323
|
export const getOverlays = (doc, selector) => {
|
|
320
324
|
if (selector === undefined) {
|
|
321
325
|
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast';
|
|
@@ -323,14 +327,24 @@ export const getOverlays = (doc, selector) => {
|
|
|
323
327
|
return Array.from(doc.querySelectorAll(selector)).filter((c) => c.overlayIndex > 0);
|
|
324
328
|
};
|
|
325
329
|
/**
|
|
326
|
-
* Returns
|
|
330
|
+
* Returns a list of all presented overlays.
|
|
331
|
+
* Inline overlays can exist in the DOM but not be presented,
|
|
332
|
+
* so there are times when we want to exclude those.
|
|
333
|
+
* @param doc The document to find the element within.
|
|
334
|
+
* @param overlayTag The selector for the overlay, defaults to Ionic overlay components.
|
|
335
|
+
*/
|
|
336
|
+
const getPresentedOverlays = (doc, overlayTag) => {
|
|
337
|
+
return getOverlays(doc, overlayTag).filter((o) => !isOverlayHidden(o));
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* Returns a presented overlay element.
|
|
327
341
|
* @param doc The document to find the element within.
|
|
328
342
|
* @param overlayTag The selector for the overlay, defaults to Ionic overlay components.
|
|
329
343
|
* @param id The unique identifier for the overlay instance.
|
|
330
344
|
* @returns The overlay element or `undefined` if no overlay element is found.
|
|
331
345
|
*/
|
|
332
|
-
export const
|
|
333
|
-
const overlays =
|
|
346
|
+
export const getPresentedOverlay = (doc, overlayTag, id) => {
|
|
347
|
+
const overlays = getPresentedOverlays(doc, overlayTag);
|
|
334
348
|
return id === undefined ? overlays[overlays.length - 1] : overlays.find((o) => o.id === id);
|
|
335
349
|
};
|
|
336
350
|
/**
|
|
@@ -436,7 +450,13 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
|
|
|
436
450
|
if (!overlay.presented) {
|
|
437
451
|
return false;
|
|
438
452
|
}
|
|
439
|
-
|
|
453
|
+
/**
|
|
454
|
+
* If this is the last visible overlay then
|
|
455
|
+
* we want to re-add the root to the accessibility tree.
|
|
456
|
+
*/
|
|
457
|
+
if (doc !== undefined && getPresentedOverlays(doc).length === 1) {
|
|
458
|
+
setRootAriaHidden(false);
|
|
459
|
+
}
|
|
440
460
|
overlay.presented = false;
|
|
441
461
|
try {
|
|
442
462
|
// Overlay contents should not be clickable during dismiss
|
package/dist/docs.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { w as writeTask } from './index-
|
|
4
|
+
import { w as writeTask } from './index-2d388930.js';
|
|
5
5
|
import { h as hapticSelectionEnd, a as hapticSelectionStart, b as hapticSelectionChanged } from './haptic-6447af60.js';
|
|
6
6
|
import { createGesture } from './index-ff313b19.js';
|
|
7
7
|
|