@pod-os/elements 0.6.1-bea440b.0 → 0.7.1-2196a40.0
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/dist/cjs/{animation-5840e4df.js → animation-9bea118f.js} +115 -84
- package/dist/cjs/{app-globals-1aedd05c.js → app-globals-6352043e.js} +1 -1
- package/dist/cjs/{cubic-bezier-dcb7bfef.js → cubic-bezier-0b702a31.js} +13 -12
- package/dist/cjs/data-0c9489d7.js +1510 -0
- package/dist/cjs/dir-011f46ea.js +20 -0
- package/dist/cjs/elements.cjs.js +5 -5
- package/dist/cjs/focus-visible-2624ec15.js +76 -0
- package/dist/cjs/framework-delegate-437c0645.js +119 -0
- package/dist/cjs/{gesture-controller-fbbe9a65.js → gesture-controller-00a6b02f.js} +6 -2
- package/dist/cjs/{haptic-09e73337.js → haptic-7358cb0b.js} +37 -8
- package/dist/cjs/{hardware-back-button-01027575.js → hardware-back-button-25372ec7.js} +11 -8
- package/dist/cjs/{helpers-398ced09.js → helpers-cb08f5ae.js} +115 -15
- package/dist/cjs/{index-2067b305.js → index-1b07c737.js} +35 -24
- package/dist/cjs/{index-68ae43d2.js → index-2dc3637c.js} +34 -28
- package/dist/cjs/index-57b9fa9e.js +30 -0
- package/dist/cjs/{index-d01d9183.js → index-643851c6.js} +34 -19
- package/dist/cjs/index-731691ca.js +48 -0
- package/dist/cjs/{index-6bbae9b1.js → index-7d56774d.js} +12 -8
- package/dist/cjs/index-9fca5d6f.js +140 -0
- package/dist/cjs/index-b2a479e4.js +38 -0
- package/dist/cjs/{index-b4a9ece2.js → index-eaa0d16e.js} +7 -0
- package/dist/cjs/{tap-click-f24cb477.js → index-ed2ce04f.js} +37 -19
- package/dist/cjs/{input-shims-e959d9e2.js → input-shims-427999f7.js} +89 -38
- package/dist/cjs/ion-accordion-group.cjs.entry.js +205 -0
- package/dist/cjs/ion-accordion.cjs.entry.js +336 -0
- package/dist/cjs/ion-action-sheet_3.cjs.entry.js +865 -0
- package/dist/cjs/{ion-app_45.cjs.entry.js → ion-app_46.cjs.entry.js} +1775 -1471
- package/dist/cjs/ion-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +12 -11
- package/dist/cjs/ion-backdrop.cjs.entry.js +4 -4
- package/dist/cjs/ion-breadcrumb.cjs.entry.js +101 -0
- package/dist/cjs/ion-breadcrumbs.cjs.entry.js +133 -0
- package/dist/cjs/ion-buttons_3.cjs.entry.js +793 -0
- package/dist/cjs/ion-card-subtitle.cjs.entry.js +4 -4
- package/dist/cjs/{ion-list-header_3.cjs.entry.js → ion-checkbox_4.cjs.entry.js} +124 -23
- package/dist/cjs/ion-chip.cjs.entry.js +5 -10
- package/dist/cjs/ion-datetime-button.cjs.entry.js +346 -0
- package/dist/cjs/ion-datetime.cjs.entry.js +1548 -856
- package/dist/cjs/ion-fab-button.cjs.entry.js +26 -9
- package/dist/cjs/ion-fab-list.cjs.entry.js +4 -4
- package/dist/cjs/ion-fab.cjs.entry.js +15 -13
- package/dist/cjs/ion-img.cjs.entry.js +28 -4
- package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +5 -5
- package/dist/cjs/ion-infinite-scroll.cjs.entry.js +13 -13
- package/dist/cjs/ion-input.cjs.entry.js +57 -23
- package/dist/cjs/ion-item-option.cjs.entry.js +8 -8
- package/dist/cjs/ion-item-options.cjs.entry.js +5 -5
- package/dist/cjs/ion-item-sliding.cjs.entry.js +59 -63
- package/dist/cjs/ion-loading.cjs.entry.js +37 -36
- package/dist/cjs/ion-menu-button.cjs.entry.js +14 -12
- package/dist/cjs/ion-menu-toggle.cjs.entry.js +8 -7
- package/dist/cjs/ion-menu.cjs.entry.js +71 -57
- package/dist/cjs/ion-modal.cjs.entry.js +1384 -154
- package/dist/cjs/ion-nav-link.cjs.entry.js +5 -2
- package/dist/cjs/ion-nav.cjs.entry.js +177 -171
- package/dist/cjs/ion-picker-column.cjs.entry.js +25 -27
- package/dist/cjs/ion-picker.cjs.entry.js +22 -17
- package/dist/cjs/ion-popover.cjs.entry.js +1208 -182
- package/dist/cjs/ion-range.cjs.entry.js +137 -57
- package/dist/cjs/ion-refresher-content.cjs.entry.js +7 -12
- package/dist/cjs/ion-refresher.cjs.entry.js +150 -148
- package/dist/cjs/ion-reorder-group.cjs.entry.js +42 -35
- package/dist/cjs/ion-reorder.cjs.entry.js +5 -4
- package/dist/cjs/ion-route-redirect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route.cjs.entry.js +1 -1
- package/dist/cjs/ion-router-link.cjs.entry.js +5 -5
- package/dist/cjs/ion-router-outlet.cjs.entry.js +24 -20
- package/dist/cjs/ion-router.cjs.entry.js +291 -194
- package/dist/cjs/ion-segment-button.cjs.entry.js +10 -17
- package/dist/cjs/ion-segment.cjs.entry.js +119 -26
- package/dist/cjs/ion-select-option.cjs.entry.js +3 -3
- package/dist/cjs/ion-select.cjs.entry.js +113 -78
- package/dist/cjs/ion-slide.cjs.entry.js +3 -3
- package/dist/cjs/ion-slides.cjs.entry.js +26 -27
- package/dist/cjs/ion-spinner.cjs.entry.js +10 -9
- package/dist/cjs/ion-split-pane.cjs.entry.js +16 -12
- package/dist/cjs/ion-tab-bar.cjs.entry.js +16 -23
- package/dist/cjs/ion-tab-button.cjs.entry.js +6 -6
- package/dist/cjs/ion-tab.cjs.entry.js +4 -4
- package/dist/cjs/ion-tabs.cjs.entry.js +4 -5
- package/dist/cjs/ion-text.cjs.entry.js +3 -3
- package/dist/cjs/ion-textarea.cjs.entry.js +31 -29
- package/dist/cjs/ion-thumbnail.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +49 -59
- package/dist/cjs/ion-toggle.cjs.entry.js +41 -22
- package/dist/cjs/ion-virtual-scroll.cjs.entry.js +39 -31
- package/dist/cjs/{ionic-global-56e10eb5.js → ionic-global-f2d95fd3.js} +112 -93
- package/dist/cjs/{ios.transition-32e4623d.js → ios.transition-0f31ec9a.js} +78 -53
- package/dist/cjs/{keyboard-9e8103e4.js → keyboard-79afcba2.js} +6 -3
- package/dist/cjs/keyboard-controller-a934d106.js +42 -0
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{md.transition-169c54f0.js → md.transition-d2a33a23.js} +15 -17
- package/dist/cjs/{menu-toggle-util-087678e0.js → menu-toggle-util-0a43ff7c.js} +5 -2
- package/dist/cjs/{overlays-49fe9ba7.js → overlays-65c716aa.js} +187 -71
- package/dist/cjs/spinner-configs-cd0abbeb.js +147 -0
- package/dist/cjs/{status-tap-ada894ff.js → status-tap-beaa3a71.js} +10 -5
- package/dist/cjs/{swipe-back-c4a778df.js → swipe-back-666ea8e6.js} +34 -15
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/cjs/{theme-2259d0f5.js → theme-fc63803b.js} +9 -5
- package/dist/collection/apps/pos-app-image-viewer/pos-app-image-viewer.js +1 -0
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/pos-image/pos-image.css +4 -0
- package/dist/custom-elements/index.js +12770 -4850
- package/dist/custom-elements/{tap-click.js → index2.js} +36 -18
- package/dist/custom-elements/input-shims.js +87 -38
- package/dist/custom-elements/ios.transition.js +74 -50
- package/dist/custom-elements/md.transition.js +11 -14
- package/dist/custom-elements/status-tap.js +7 -4
- package/dist/custom-elements/swipe-back.js +31 -13
- package/dist/elements/elements.css +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/p-0268cbd3.entry.js +7 -0
- package/dist/elements/p-0587332d.entry.js +1 -0
- package/dist/elements/{p-cfc0e54d.js → p-0991c811.js} +3 -0
- package/dist/elements/p-0a69a563.entry.js +1 -0
- package/dist/elements/p-0b95be17.entry.js +1 -0
- package/dist/elements/p-0d284fe0.entry.js +1 -0
- package/dist/elements/p-0fd77b33.entry.js +1 -0
- package/dist/elements/p-120dec2b.entry.js +1 -0
- package/dist/elements/p-12880671.entry.js +1 -0
- package/dist/elements/p-14ccd586.entry.js +1 -0
- package/dist/elements/{p-83d45051.entry.js → p-14df6ac0.entry.js} +1 -1
- package/dist/elements/{p-e860be6a.entry.js → p-17079f06.entry.js} +1 -1
- package/dist/elements/p-19e4a688.js +4 -0
- package/dist/elements/p-1afc4eb4.js +4 -0
- package/dist/elements/p-1beaf6bf.js +4 -0
- package/dist/elements/p-1d1c6a6f.entry.js +1 -0
- package/dist/elements/{p-31d30e42.entry.js → p-1d98f84b.entry.js} +1 -1
- package/dist/elements/p-278ca4c9.js +4 -0
- package/dist/elements/p-27f5629c.entry.js +1 -0
- package/dist/elements/p-29c0f03f.js +4 -0
- package/dist/elements/p-2da59aca.js +4 -0
- package/dist/elements/p-3152143f.js +4 -0
- package/dist/elements/p-343ff720.entry.js +7 -0
- package/dist/elements/p-36d4c9a8.js +4 -0
- package/dist/elements/p-3a30dfb2.entry.js +1 -0
- package/dist/elements/p-3c013bf1.entry.js +1 -0
- package/dist/elements/{p-74ba1e42.entry.js → p-3c318da5.entry.js} +1 -1
- package/dist/elements/p-3cee3222.entry.js +1 -0
- package/dist/elements/p-480b3c4f.entry.js +1 -0
- package/dist/elements/p-4e9d8f18.entry.js +1 -0
- package/dist/elements/p-53e23176.js +2 -0
- package/dist/elements/p-548524f3.js +4 -0
- package/dist/elements/p-5739fa41.entry.js +1 -0
- package/dist/elements/p-5808c505.js +1 -0
- package/dist/elements/p-58a8cc2a.js +4 -0
- package/dist/elements/p-6035415e.entry.js +1 -0
- package/dist/elements/p-60eeae90.js +4 -0
- package/dist/elements/p-610b03ff.entry.js +4 -0
- package/dist/elements/p-67777478.entry.js +1 -0
- package/dist/elements/p-6ab826e1.entry.js +1 -0
- package/dist/elements/p-6f5a2827.entry.js +1 -0
- package/dist/elements/p-779676c5.entry.js +1 -0
- package/dist/elements/p-7916ecc5.entry.js +1 -0
- package/dist/elements/p-79f06b80.entry.js +1 -0
- package/dist/elements/p-7b5991c1.entry.js +1 -0
- package/dist/elements/p-7d0def79.js +5 -0
- package/dist/elements/p-8112afea.js +4 -0
- package/dist/elements/p-83678d7d.entry.js +4 -0
- package/dist/elements/p-87e45c94.entry.js +1 -0
- package/dist/elements/p-8da6a31e.entry.js +1 -0
- package/dist/elements/p-8f80768f.entry.js +4 -0
- package/dist/elements/p-8fe0433b.js +4 -0
- package/dist/elements/{p-4cb27b48.entry.js → p-9147d82b.entry.js} +1 -1
- package/dist/elements/p-97abb434.entry.js +1 -0
- package/dist/elements/p-98497a4b.entry.js +1 -0
- package/dist/elements/p-9c719139.js +4 -0
- package/dist/elements/p-9ca37332.js +4 -0
- package/dist/elements/{p-37de7110.js → p-9d48def2.js} +3 -0
- package/dist/elements/p-a79a6ad9.entry.js +79 -0
- package/dist/elements/p-a805f2f9.entry.js +1 -0
- package/dist/elements/p-a86a5bfa.entry.js +1 -0
- package/dist/elements/{p-9c1dbe52.entry.js → p-ac34eab7.entry.js} +1 -1
- package/dist/elements/p-ad366eab.entry.js +4 -0
- package/dist/elements/p-aef3a931.js +7 -0
- package/dist/elements/p-b0537eb3.entry.js +1 -0
- package/dist/elements/p-b337f3b8.js +4 -0
- package/dist/elements/p-b34bf73f.entry.js +7 -0
- package/dist/elements/p-b41e66f0.entry.js +1 -0
- package/dist/elements/p-b47e7091.entry.js +1 -0
- package/dist/elements/p-b840320e.js +4 -0
- package/dist/elements/p-b934ac5d.entry.js +1 -0
- package/dist/elements/p-b98314e0.entry.js +4 -0
- package/dist/elements/p-bd12806f.entry.js +1 -0
- package/dist/elements/p-c16d38d5.js +4 -0
- package/dist/elements/p-c84205a3.js +4 -0
- package/dist/elements/{p-06675ac7.entry.js → p-cbe318f8.entry.js} +1 -1
- package/dist/elements/p-cfed7395.js +4 -0
- package/dist/elements/p-d22a1dc7.entry.js +7 -0
- package/dist/elements/p-d3e75c94.entry.js +1 -0
- package/dist/elements/p-d8f6d3ce.entry.js +14 -0
- package/dist/elements/p-d9880221.entry.js +4 -0
- package/dist/elements/p-da5db8fb.entry.js +1 -0
- package/dist/elements/{p-91fe653f.js → p-dcc6b03c.js} +3 -0
- package/dist/elements/{p-305e246c.entry.js → p-dd846020.entry.js} +1 -1
- package/dist/elements/p-df240b2a.entry.js +4 -0
- package/dist/elements/p-dffd8689.js +4 -0
- package/dist/elements/p-e495a095.js +4 -0
- package/dist/elements/p-e5fc7d42.entry.js +1 -0
- package/dist/elements/{p-aaa8393e.entry.js → p-eb137e9d.entry.js} +1 -1
- package/dist/elements/p-f4e54a17.js +7 -0
- package/dist/elements/p-f67d0717.entry.js +1 -0
- package/dist/elements/p-f7f4c640.js +1 -0
- package/dist/elements/p-f851b91a.js +4 -0
- package/dist/elements/p-fb27ee76.entry.js +1 -0
- package/dist/elements/p-fbddca35.entry.js +1 -0
- package/dist/elements/p-fc1df8e0.entry.js +7 -0
- package/dist/elements/p-fdac5f3a.js +4 -0
- package/dist/esm/{animation-fe6ed422.js → animation-801a007a.js} +115 -84
- package/dist/esm/{app-globals-27d92837.js → app-globals-05a3abfb.js} +1 -1
- package/dist/esm/{cubic-bezier-108b8579.js → cubic-bezier-538b6253.js} +13 -12
- package/dist/esm/data-62c81c24.js +1463 -0
- package/dist/esm/dir-defb16c6.js +18 -0
- package/dist/esm/elements.js +5 -5
- package/dist/esm/focus-visible-78d55799.js +74 -0
- package/dist/esm/framework-delegate-7e2b767b.js +115 -0
- package/dist/esm/{gesture-controller-8f35af24.js → gesture-controller-c466ff14.js} +6 -2
- package/dist/esm/{haptic-c424e670.js → haptic-e7d5ef4d.js} +38 -9
- package/dist/esm/{hardware-back-button-bb4c578a.js → hardware-back-button-242191a7.js} +11 -8
- package/dist/esm/{helpers-44e3bd9f.js → helpers-aeff219b.js} +113 -16
- package/dist/esm/index-0dbaca1a.js +28 -0
- package/dist/esm/index-1f3d8582.js +34 -0
- package/dist/esm/{index-97199683.js → index-2be9a18b.js} +34 -28
- package/dist/esm/{index-8d682224.js → index-51e4a829.js} +12 -8
- package/dist/esm/{index-8a463a85.js → index-6048aed6.js} +35 -24
- package/dist/esm/index-65ecd543.js +25 -0
- package/dist/esm/{tap-click-a7e55ef5.js → index-b212db1c.js} +37 -19
- package/dist/esm/{index-e4deec27.js → index-cb938ffb.js} +7 -1
- package/dist/esm/{index-3a1bd803.js → index-d39eb62b.js} +35 -20
- package/dist/esm/index-ebf7f059.js +128 -0
- package/dist/esm/{input-shims-3b48722f.js → input-shims-8a389148.js} +89 -38
- package/dist/esm/ion-accordion-group.entry.js +201 -0
- package/dist/esm/ion-accordion.entry.js +332 -0
- package/dist/esm/ion-action-sheet_3.entry.js +859 -0
- package/dist/esm/{ion-app_45.entry.js → ion-app_46.entry.js} +1775 -1472
- package/dist/esm/ion-avatar.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +12 -11
- package/dist/esm/ion-backdrop.entry.js +4 -4
- package/dist/esm/ion-breadcrumb.entry.js +97 -0
- package/dist/esm/ion-breadcrumbs.entry.js +129 -0
- package/dist/esm/ion-buttons_3.entry.js +787 -0
- package/dist/esm/ion-card-subtitle.entry.js +4 -4
- package/dist/esm/{ion-list-header_3.entry.js → ion-checkbox_4.entry.js} +124 -24
- package/dist/esm/ion-chip.entry.js +5 -10
- package/dist/esm/ion-datetime-button.entry.js +342 -0
- package/dist/esm/ion-datetime.entry.js +1548 -856
- package/dist/esm/ion-fab-button.entry.js +26 -9
- package/dist/esm/ion-fab-list.entry.js +4 -4
- package/dist/esm/ion-fab.entry.js +15 -13
- package/dist/esm/ion-img.entry.js +28 -4
- package/dist/esm/ion-infinite-scroll-content.entry.js +5 -5
- package/dist/esm/ion-infinite-scroll.entry.js +13 -13
- package/dist/esm/ion-input.entry.js +57 -23
- package/dist/esm/ion-item-option.entry.js +8 -8
- package/dist/esm/ion-item-options.entry.js +5 -5
- package/dist/esm/ion-item-sliding.entry.js +59 -63
- package/dist/esm/ion-loading.entry.js +37 -36
- package/dist/esm/ion-menu-button.entry.js +14 -12
- package/dist/esm/ion-menu-toggle.entry.js +8 -7
- package/dist/esm/ion-menu.entry.js +71 -57
- package/dist/esm/ion-modal.entry.js +1375 -145
- package/dist/esm/ion-nav-link.entry.js +5 -2
- package/dist/esm/ion-nav.entry.js +177 -171
- package/dist/esm/ion-picker-column.entry.js +25 -27
- package/dist/esm/ion-picker.entry.js +22 -17
- package/dist/esm/ion-popover.entry.js +1208 -182
- package/dist/esm/ion-range.entry.js +137 -57
- package/dist/esm/ion-refresher-content.entry.js +7 -12
- package/dist/esm/ion-refresher.entry.js +149 -147
- package/dist/esm/ion-reorder-group.entry.js +42 -35
- package/dist/esm/ion-reorder.entry.js +5 -4
- package/dist/esm/ion-route-redirect.entry.js +1 -1
- package/dist/esm/ion-route.entry.js +1 -1
- package/dist/esm/ion-router-link.entry.js +5 -5
- package/dist/esm/ion-router-outlet.entry.js +24 -20
- package/dist/esm/ion-router.entry.js +291 -194
- package/dist/esm/ion-segment-button.entry.js +10 -17
- package/dist/esm/ion-segment.entry.js +119 -26
- package/dist/esm/ion-select-option.entry.js +3 -3
- package/dist/esm/ion-select.entry.js +113 -78
- package/dist/esm/ion-slide.entry.js +3 -3
- package/dist/esm/ion-slides.entry.js +26 -27
- package/dist/esm/ion-spinner.entry.js +10 -9
- package/dist/esm/ion-split-pane.entry.js +16 -12
- package/dist/esm/ion-tab-bar.entry.js +16 -23
- package/dist/esm/ion-tab-button.entry.js +6 -6
- package/dist/esm/ion-tab.entry.js +4 -4
- package/dist/esm/ion-tabs.entry.js +4 -5
- package/dist/esm/ion-text.entry.js +3 -3
- package/dist/esm/ion-textarea.entry.js +31 -29
- package/dist/esm/ion-thumbnail.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +49 -59
- package/dist/esm/ion-toggle.entry.js +41 -22
- package/dist/esm/ion-virtual-scroll.entry.js +39 -31
- package/dist/esm/{ionic-global-2e28f7c7.js → ionic-global-6cd57191.js} +112 -93
- package/dist/esm/{ios.transition-a783e3cd.js → ios.transition-bbd952f2.js} +78 -53
- package/dist/{custom-elements/keyboard.js → esm/keyboard-413afe04.js} +6 -3
- package/dist/esm/keyboard-controller-33693bc2.js +40 -0
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-5a4a8c82.js → md.transition-5170a6d3.js} +15 -17
- package/dist/esm/{menu-toggle-util-562dfc9c.js → menu-toggle-util-82bf888a.js} +5 -2
- package/dist/esm/{overlays-fc9a0625.js → overlays-0c7f05e1.js} +186 -71
- package/dist/esm/spinner-configs-cbcd1f62.js +145 -0
- package/dist/esm/{status-tap-69e62ad6.js → status-tap-ad757b8a.js} +10 -5
- package/dist/esm/swipe-back-7ef22876.js +69 -0
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/esm/{theme-d21826a7.js → theme-7cf2cab0.js} +9 -5
- package/package.json +4 -5
- package/LICENSE +0 -21
- package/dist/cjs/button-active-c14dab31.js +0 -66
- package/dist/cjs/focus-visible-16c98640.js +0 -45
- package/dist/cjs/framework-delegate-c45292a3.js +0 -37
- package/dist/cjs/ion-action-sheet.cjs.entry.js +0 -265
- package/dist/cjs/ion-alert.cjs.entry.js +0 -456
- package/dist/cjs/ion-buttons.cjs.entry.js +0 -42
- package/dist/cjs/ion-checkbox.cjs.entry.js +0 -117
- package/dist/cjs/ion-note.cjs.entry.js +0 -29
- package/dist/cjs/ion-select-popover.cjs.entry.js +0 -35
- package/dist/cjs/spinner-configs-fb16b986.js +0 -112
- package/dist/custom-elements/focus-visible.js +0 -43
- package/dist/elements/p-03bda390.js +0 -1
- package/dist/elements/p-0be044f1.entry.js +0 -1
- package/dist/elements/p-119c7c6c.entry.js +0 -1
- package/dist/elements/p-14c7c3ea.entry.js +0 -1
- package/dist/elements/p-1d4a2c61.js +0 -1
- package/dist/elements/p-1d894ac4.entry.js +0 -1
- package/dist/elements/p-1dafa1ce.entry.js +0 -1
- package/dist/elements/p-23b89ccb.entry.js +0 -1
- package/dist/elements/p-2c03b9ab.entry.js +0 -1
- package/dist/elements/p-346985f2.js +0 -1
- package/dist/elements/p-360f1c62.entry.js +0 -1
- package/dist/elements/p-373e1f25.entry.js +0 -1
- package/dist/elements/p-40547acb.entry.js +0 -1
- package/dist/elements/p-40b68014.entry.js +0 -1
- package/dist/elements/p-42e4f702.entry.js +0 -1
- package/dist/elements/p-489807e5.js +0 -1
- package/dist/elements/p-4ad72d54.entry.js +0 -1
- package/dist/elements/p-4cca7b5e.entry.js +0 -1
- package/dist/elements/p-4f24d306.js +0 -1
- package/dist/elements/p-519d6a53.entry.js +0 -1
- package/dist/elements/p-536e8e52.entry.js +0 -1
- package/dist/elements/p-599bb53f.entry.js +0 -1
- package/dist/elements/p-5eb7a546.js +0 -1
- package/dist/elements/p-60df2bed.entry.js +0 -1
- package/dist/elements/p-65133e33.js +0 -1
- package/dist/elements/p-6693fce8.js +0 -1
- package/dist/elements/p-689bdcc1.entry.js +0 -1
- package/dist/elements/p-70713b3d.entry.js +0 -1
- package/dist/elements/p-707d5d76.js +0 -1
- package/dist/elements/p-7212b7f2.js +0 -1
- package/dist/elements/p-73992898.entry.js +0 -1
- package/dist/elements/p-792c1e0f.entry.js +0 -1
- package/dist/elements/p-7e5300af.js +0 -2
- package/dist/elements/p-8068987c.entry.js +0 -1
- package/dist/elements/p-83accf46.entry.js +0 -1
- package/dist/elements/p-86635d06.entry.js +0 -1
- package/dist/elements/p-874c2b44.js +0 -1
- package/dist/elements/p-89c12ce8.entry.js +0 -1
- package/dist/elements/p-8bcba3f7.entry.js +0 -1
- package/dist/elements/p-8c759f51.entry.js +0 -1
- package/dist/elements/p-8f945e6b.entry.js +0 -1
- package/dist/elements/p-9300ab6a.js +0 -1
- package/dist/elements/p-93cacd51.entry.js +0 -1
- package/dist/elements/p-9408d0b4.entry.js +0 -1
- package/dist/elements/p-98c79eda.js +0 -1
- package/dist/elements/p-99f8abed.js +0 -1
- package/dist/elements/p-9ca7e079.js +0 -1
- package/dist/elements/p-a4648b74.entry.js +0 -1
- package/dist/elements/p-aab0f63c.js +0 -1
- package/dist/elements/p-ad4e2295.entry.js +0 -1
- package/dist/elements/p-afb8f7d5.entry.js +0 -1
- package/dist/elements/p-b055ec44.js +0 -1
- package/dist/elements/p-b078d63b.entry.js +0 -1
- package/dist/elements/p-b3460325.entry.js +0 -1
- package/dist/elements/p-b3f4042e.entry.js +0 -67
- package/dist/elements/p-b5406b58.entry.js +0 -1
- package/dist/elements/p-b5ef0c91.entry.js +0 -1
- package/dist/elements/p-b6ba623e.entry.js +0 -1
- package/dist/elements/p-b9926d8b.entry.js +0 -1
- package/dist/elements/p-bfd4cfcd.entry.js +0 -1
- package/dist/elements/p-c08dd7d0.entry.js +0 -1
- package/dist/elements/p-c0db9c51.entry.js +0 -1
- package/dist/elements/p-c1e7fbfb.js +0 -1
- package/dist/elements/p-ca69d6c9.js +0 -1
- package/dist/elements/p-cc4cb1ac.entry.js +0 -1
- package/dist/elements/p-cf8a7031.entry.js +0 -1
- package/dist/elements/p-cff82b6f.js +0 -1
- package/dist/elements/p-d6d1e65f.entry.js +0 -1
- package/dist/elements/p-d9462b66.entry.js +0 -1
- package/dist/elements/p-e2e0fee9.entry.js +0 -1
- package/dist/elements/p-e642b266.entry.js +0 -1
- package/dist/elements/p-e953934f.entry.js +0 -1
- package/dist/elements/p-f0474f46.js +0 -1
- package/dist/elements/p-f10a94f6.entry.js +0 -1
- package/dist/elements/p-f2426182.entry.js +0 -1
- package/dist/elements/p-f327fd21.js +0 -1
- package/dist/elements/p-f84987ee.js +0 -1
- package/dist/elements/p-f8a3367d.entry.js +0 -1
- package/dist/esm/button-active-fd9d6d91.js +0 -64
- package/dist/esm/focus-visible-edb28f19.js +0 -43
- package/dist/esm/framework-delegate-9cd8048f.js +0 -34
- package/dist/esm/ion-action-sheet.entry.js +0 -261
- package/dist/esm/ion-alert.entry.js +0 -452
- package/dist/esm/ion-buttons.entry.js +0 -38
- package/dist/esm/ion-checkbox.entry.js +0 -113
- package/dist/esm/ion-note.entry.js +0 -25
- package/dist/esm/ion-select-popover.entry.js +0 -31
- package/dist/esm/keyboard-e6abcb80.js +0 -125
- package/dist/esm/spinner-configs-aaf2a1a9.js +0 -110
- package/dist/esm/swipe-back-d84cfc8a.js +0 -50
- package/readme.md +0 -55
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { b as clamp } from './helpers-aeff219b.js';
|
|
2
|
+
import { i as isRTL } from './dir-defb16c6.js';
|
|
3
|
+
import { createGesture } from './index-d39eb62b.js';
|
|
4
|
+
import './gesture-controller-c466ff14.js';
|
|
5
|
+
|
|
6
|
+
/*!
|
|
7
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
8
|
+
*/
|
|
9
|
+
const createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) => {
|
|
10
|
+
const win = el.ownerDocument.defaultView;
|
|
11
|
+
const rtl = isRTL(el);
|
|
12
|
+
/**
|
|
13
|
+
* Determine if a gesture is near the edge
|
|
14
|
+
* of the screen. If true, then the swipe
|
|
15
|
+
* to go back gesture should proceed.
|
|
16
|
+
*/
|
|
17
|
+
const isAtEdge = (detail) => {
|
|
18
|
+
const threshold = 50;
|
|
19
|
+
const { startX } = detail;
|
|
20
|
+
if (rtl) {
|
|
21
|
+
return startX >= win.innerWidth - threshold;
|
|
22
|
+
}
|
|
23
|
+
return startX <= threshold;
|
|
24
|
+
};
|
|
25
|
+
const getDeltaX = (detail) => {
|
|
26
|
+
return rtl ? -detail.deltaX : detail.deltaX;
|
|
27
|
+
};
|
|
28
|
+
const getVelocityX = (detail) => {
|
|
29
|
+
return rtl ? -detail.velocityX : detail.velocityX;
|
|
30
|
+
};
|
|
31
|
+
const canStart = (detail) => {
|
|
32
|
+
return isAtEdge(detail) && canStartHandler();
|
|
33
|
+
};
|
|
34
|
+
const onMove = (detail) => {
|
|
35
|
+
// set the transition animation's progress
|
|
36
|
+
const delta = getDeltaX(detail);
|
|
37
|
+
const stepValue = delta / win.innerWidth;
|
|
38
|
+
onMoveHandler(stepValue);
|
|
39
|
+
};
|
|
40
|
+
const onEnd = (detail) => {
|
|
41
|
+
// the swipe back gesture has ended
|
|
42
|
+
const delta = getDeltaX(detail);
|
|
43
|
+
const width = win.innerWidth;
|
|
44
|
+
const stepValue = delta / width;
|
|
45
|
+
const velocity = getVelocityX(detail);
|
|
46
|
+
const z = width / 2.0;
|
|
47
|
+
const shouldComplete = velocity >= 0 && (velocity > 0.2 || delta > z);
|
|
48
|
+
const missing = shouldComplete ? 1 - stepValue : stepValue;
|
|
49
|
+
const missingDistance = missing * width;
|
|
50
|
+
let realDur = 0;
|
|
51
|
+
if (missingDistance > 5) {
|
|
52
|
+
const dur = missingDistance / Math.abs(velocity);
|
|
53
|
+
realDur = Math.min(dur, 540);
|
|
54
|
+
}
|
|
55
|
+
onEndHandler(shouldComplete, stepValue <= 0 ? 0.01 : clamp(0, stepValue, 0.9999), realDur);
|
|
56
|
+
};
|
|
57
|
+
return createGesture({
|
|
58
|
+
el,
|
|
59
|
+
gestureName: 'goback-swipe',
|
|
60
|
+
gesturePriority: 40,
|
|
61
|
+
threshold: 10,
|
|
62
|
+
canStart,
|
|
63
|
+
onStart: onStartHandler,
|
|
64
|
+
onMove,
|
|
65
|
+
onEnd,
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export { createSwipeBackGesture };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
1
4
|
const hostContext = (selector, el) => {
|
|
2
5
|
return el.closest(selector) !== null;
|
|
3
6
|
};
|
|
@@ -5,21 +8,22 @@ const hostContext = (selector, el) => {
|
|
|
5
8
|
* Create the mode and color classes for the component based on the classes passed in
|
|
6
9
|
*/
|
|
7
10
|
const createColorClasses = (color, cssClassMap) => {
|
|
8
|
-
return
|
|
11
|
+
return typeof color === 'string' && color.length > 0
|
|
12
|
+
? Object.assign({ 'ion-color': true, [`ion-color-${color}`]: true }, cssClassMap) : cssClassMap;
|
|
9
13
|
};
|
|
10
14
|
const getClassList = (classes) => {
|
|
11
15
|
if (classes !== undefined) {
|
|
12
16
|
const array = Array.isArray(classes) ? classes : classes.split(' ');
|
|
13
17
|
return array
|
|
14
|
-
.filter(c => c != null)
|
|
15
|
-
.map(c => c.trim())
|
|
16
|
-
.filter(c => c !== '');
|
|
18
|
+
.filter((c) => c != null)
|
|
19
|
+
.map((c) => c.trim())
|
|
20
|
+
.filter((c) => c !== '');
|
|
17
21
|
}
|
|
18
22
|
return [];
|
|
19
23
|
};
|
|
20
24
|
const getClassMap = (classes) => {
|
|
21
25
|
const map = {};
|
|
22
|
-
getClassList(classes).forEach(c => map[c] = true);
|
|
26
|
+
getClassList(classes).forEach((c) => (map[c] = true));
|
|
23
27
|
return map;
|
|
24
28
|
};
|
|
25
29
|
const SCHEME = /^[a-z][a-z0-9+\-.]*:/;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pod-os/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1-2196a40.0",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"generate": "stencil generate"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ionic/core": "^
|
|
24
|
+
"@ionic/core": "^6.3.9",
|
|
25
25
|
"@pod-os/core": "^0.6.0",
|
|
26
|
-
"@stencil/core": "^2.19.
|
|
26
|
+
"@stencil/core": "^2.19.3",
|
|
27
27
|
"@stencil/store": "^1.5.0",
|
|
28
28
|
"jest-when": "^3.5.2",
|
|
29
29
|
"stencil-router-v2": "^0.6.0"
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
"@types/jest": "^26.0.24",
|
|
35
35
|
"jest": "^26.6.3",
|
|
36
36
|
"jest-cli": "^26.6.3",
|
|
37
|
-
"prettier": "^2.
|
|
38
|
-
"puppeteer": "^10.4.0"
|
|
37
|
+
"prettier": "^2.8.0"
|
|
39
38
|
},
|
|
40
39
|
"license": "MIT",
|
|
41
40
|
"repository": {
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index$1 = require('./index-b4a9ece2.js');
|
|
4
|
-
const haptic = require('./haptic-09e73337.js');
|
|
5
|
-
const index = require('./index-d01d9183.js');
|
|
6
|
-
|
|
7
|
-
const createButtonActiveGesture = (el, isButton) => {
|
|
8
|
-
let currentTouchedButton;
|
|
9
|
-
let initialTouchedButton;
|
|
10
|
-
const activateButtonAtPoint = (x, y, hapticFeedbackFn) => {
|
|
11
|
-
if (typeof document === 'undefined') {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
const target = document.elementFromPoint(x, y);
|
|
15
|
-
if (!target || !isButton(target)) {
|
|
16
|
-
clearActiveButton();
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (target !== currentTouchedButton) {
|
|
20
|
-
clearActiveButton();
|
|
21
|
-
setActiveButton(target, hapticFeedbackFn);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const setActiveButton = (button, hapticFeedbackFn) => {
|
|
25
|
-
currentTouchedButton = button;
|
|
26
|
-
if (!initialTouchedButton) {
|
|
27
|
-
initialTouchedButton = currentTouchedButton;
|
|
28
|
-
}
|
|
29
|
-
const buttonToModify = currentTouchedButton;
|
|
30
|
-
index$1.writeTask(() => buttonToModify.classList.add('ion-activated'));
|
|
31
|
-
hapticFeedbackFn();
|
|
32
|
-
};
|
|
33
|
-
const clearActiveButton = (dispatchClick = false) => {
|
|
34
|
-
if (!currentTouchedButton) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const buttonToModify = currentTouchedButton;
|
|
38
|
-
index$1.writeTask(() => buttonToModify.classList.remove('ion-activated'));
|
|
39
|
-
/**
|
|
40
|
-
* Clicking on one button, but releasing on another button
|
|
41
|
-
* does not dispatch a click event in browsers, so we
|
|
42
|
-
* need to do it manually here. Some browsers will
|
|
43
|
-
* dispatch a click if clicking on one button, dragging over
|
|
44
|
-
* another button, and releasing on the original button. In that
|
|
45
|
-
* case, we need to make sure we do not cause a double click there.
|
|
46
|
-
*/
|
|
47
|
-
if (dispatchClick && initialTouchedButton !== currentTouchedButton) {
|
|
48
|
-
currentTouchedButton.click();
|
|
49
|
-
}
|
|
50
|
-
currentTouchedButton = undefined;
|
|
51
|
-
};
|
|
52
|
-
return index.createGesture({
|
|
53
|
-
el,
|
|
54
|
-
gestureName: 'buttonActiveDrag',
|
|
55
|
-
threshold: 0,
|
|
56
|
-
onStart: ev => activateButtonAtPoint(ev.currentX, ev.currentY, haptic.hapticSelectionStart),
|
|
57
|
-
onMove: ev => activateButtonAtPoint(ev.currentX, ev.currentY, haptic.hapticSelectionChanged),
|
|
58
|
-
onEnd: () => {
|
|
59
|
-
clearActiveButton(true);
|
|
60
|
-
haptic.hapticSelectionEnd();
|
|
61
|
-
initialTouchedButton = undefined;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
exports.createButtonActiveGesture = createButtonActiveGesture;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const ION_FOCUSED = 'ion-focused';
|
|
4
|
-
const ION_FOCUSABLE = 'ion-focusable';
|
|
5
|
-
const FOCUS_KEYS = ['Tab', 'ArrowDown', 'Space', 'Escape', ' ', 'Shift', 'Enter', 'ArrowLeft', 'ArrowRight', 'ArrowUp'];
|
|
6
|
-
const startFocusVisible = () => {
|
|
7
|
-
let currentFocus = [];
|
|
8
|
-
let keyboardMode = true;
|
|
9
|
-
const doc = document;
|
|
10
|
-
const setFocus = (elements) => {
|
|
11
|
-
currentFocus.forEach(el => el.classList.remove(ION_FOCUSED));
|
|
12
|
-
elements.forEach(el => el.classList.add(ION_FOCUSED));
|
|
13
|
-
currentFocus = elements;
|
|
14
|
-
};
|
|
15
|
-
const pointerDown = () => {
|
|
16
|
-
keyboardMode = false;
|
|
17
|
-
setFocus([]);
|
|
18
|
-
};
|
|
19
|
-
doc.addEventListener('keydown', ev => {
|
|
20
|
-
keyboardMode = FOCUS_KEYS.includes(ev.key);
|
|
21
|
-
if (!keyboardMode) {
|
|
22
|
-
setFocus([]);
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
doc.addEventListener('focusin', ev => {
|
|
26
|
-
if (keyboardMode && ev.composedPath) {
|
|
27
|
-
const toFocus = ev.composedPath().filter((el) => {
|
|
28
|
-
if (el.classList) {
|
|
29
|
-
return el.classList.contains(ION_FOCUSABLE);
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
32
|
-
});
|
|
33
|
-
setFocus(toFocus);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
doc.addEventListener('focusout', () => {
|
|
37
|
-
if (doc.activeElement === doc.body) {
|
|
38
|
-
setFocus([]);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
doc.addEventListener('touchstart', pointerDown);
|
|
42
|
-
doc.addEventListener('mousedown', pointerDown);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.startFocusVisible = startFocusVisible;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const helpers = require('./helpers-398ced09.js');
|
|
4
|
-
|
|
5
|
-
const attachComponent = async (delegate, container, component, cssClasses, componentProps) => {
|
|
6
|
-
if (delegate) {
|
|
7
|
-
return delegate.attachViewToDom(container, component, componentProps, cssClasses);
|
|
8
|
-
}
|
|
9
|
-
if (typeof component !== 'string' && !(component instanceof HTMLElement)) {
|
|
10
|
-
throw new Error('framework delegate is missing');
|
|
11
|
-
}
|
|
12
|
-
const el = (typeof component === 'string')
|
|
13
|
-
? container.ownerDocument && container.ownerDocument.createElement(component)
|
|
14
|
-
: component;
|
|
15
|
-
if (cssClasses) {
|
|
16
|
-
cssClasses.forEach(c => el.classList.add(c));
|
|
17
|
-
}
|
|
18
|
-
if (componentProps) {
|
|
19
|
-
Object.assign(el, componentProps);
|
|
20
|
-
}
|
|
21
|
-
container.appendChild(el);
|
|
22
|
-
await new Promise(resolve => helpers.componentOnReady(el, resolve));
|
|
23
|
-
return el;
|
|
24
|
-
};
|
|
25
|
-
const detachComponent = (delegate, element) => {
|
|
26
|
-
if (element) {
|
|
27
|
-
if (delegate) {
|
|
28
|
-
const container = element.parentElement;
|
|
29
|
-
return delegate.removeViewFromDom(container, element);
|
|
30
|
-
}
|
|
31
|
-
element.remove();
|
|
32
|
-
}
|
|
33
|
-
return Promise.resolve();
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
exports.attachComponent = attachComponent;
|
|
37
|
-
exports.detachComponent = detachComponent;
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-b4a9ece2.js');
|
|
6
|
-
const ionicGlobal = require('./ionic-global-56e10eb5.js');
|
|
7
|
-
const buttonActive = require('./button-active-c14dab31.js');
|
|
8
|
-
const overlays = require('./overlays-49fe9ba7.js');
|
|
9
|
-
const theme = require('./theme-2259d0f5.js');
|
|
10
|
-
const animation = require('./animation-5840e4df.js');
|
|
11
|
-
require('./haptic-09e73337.js');
|
|
12
|
-
require('./index-d01d9183.js');
|
|
13
|
-
require('./gesture-controller-fbbe9a65.js');
|
|
14
|
-
require('./hardware-back-button-01027575.js');
|
|
15
|
-
require('./helpers-398ced09.js');
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* iOS Action Sheet Enter Animation
|
|
19
|
-
*/
|
|
20
|
-
const iosEnterAnimation = (baseEl) => {
|
|
21
|
-
const baseAnimation = animation.createAnimation();
|
|
22
|
-
const backdropAnimation = animation.createAnimation();
|
|
23
|
-
const wrapperAnimation = animation.createAnimation();
|
|
24
|
-
backdropAnimation
|
|
25
|
-
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
26
|
-
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
27
|
-
.beforeStyles({
|
|
28
|
-
'pointer-events': 'none'
|
|
29
|
-
})
|
|
30
|
-
.afterClearStyles(['pointer-events']);
|
|
31
|
-
wrapperAnimation
|
|
32
|
-
.addElement(baseEl.querySelector('.action-sheet-wrapper'))
|
|
33
|
-
.fromTo('transform', 'translateY(100%)', 'translateY(0%)');
|
|
34
|
-
return baseAnimation
|
|
35
|
-
.addElement(baseEl)
|
|
36
|
-
.easing('cubic-bezier(.36,.66,.04,1)')
|
|
37
|
-
.duration(400)
|
|
38
|
-
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* iOS Action Sheet Leave Animation
|
|
43
|
-
*/
|
|
44
|
-
const iosLeaveAnimation = (baseEl) => {
|
|
45
|
-
const baseAnimation = animation.createAnimation();
|
|
46
|
-
const backdropAnimation = animation.createAnimation();
|
|
47
|
-
const wrapperAnimation = animation.createAnimation();
|
|
48
|
-
backdropAnimation
|
|
49
|
-
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
50
|
-
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
|
51
|
-
wrapperAnimation
|
|
52
|
-
.addElement(baseEl.querySelector('.action-sheet-wrapper'))
|
|
53
|
-
.fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
|
54
|
-
return baseAnimation
|
|
55
|
-
.addElement(baseEl)
|
|
56
|
-
.easing('cubic-bezier(.36,.66,.04,1)')
|
|
57
|
-
.duration(450)
|
|
58
|
-
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* MD Action Sheet Enter Animation
|
|
63
|
-
*/
|
|
64
|
-
const mdEnterAnimation = (baseEl) => {
|
|
65
|
-
const baseAnimation = animation.createAnimation();
|
|
66
|
-
const backdropAnimation = animation.createAnimation();
|
|
67
|
-
const wrapperAnimation = animation.createAnimation();
|
|
68
|
-
backdropAnimation
|
|
69
|
-
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
70
|
-
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
71
|
-
.beforeStyles({
|
|
72
|
-
'pointer-events': 'none'
|
|
73
|
-
})
|
|
74
|
-
.afterClearStyles(['pointer-events']);
|
|
75
|
-
wrapperAnimation
|
|
76
|
-
.addElement(baseEl.querySelector('.action-sheet-wrapper'))
|
|
77
|
-
.fromTo('transform', 'translateY(100%)', 'translateY(0%)');
|
|
78
|
-
return baseAnimation
|
|
79
|
-
.addElement(baseEl)
|
|
80
|
-
.easing('cubic-bezier(.36,.66,.04,1)')
|
|
81
|
-
.duration(400)
|
|
82
|
-
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* MD Action Sheet Leave Animation
|
|
87
|
-
*/
|
|
88
|
-
const mdLeaveAnimation = (baseEl) => {
|
|
89
|
-
const baseAnimation = animation.createAnimation();
|
|
90
|
-
const backdropAnimation = animation.createAnimation();
|
|
91
|
-
const wrapperAnimation = animation.createAnimation();
|
|
92
|
-
backdropAnimation
|
|
93
|
-
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
94
|
-
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
|
95
|
-
wrapperAnimation
|
|
96
|
-
.addElement(baseEl.querySelector('.action-sheet-wrapper'))
|
|
97
|
-
.fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
|
98
|
-
return baseAnimation
|
|
99
|
-
.addElement(baseEl)
|
|
100
|
-
.easing('cubic-bezier(.36,.66,.04,1)')
|
|
101
|
-
.duration(450)
|
|
102
|
-
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const actionSheetIosCss = ".sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:var(--ion-safe-area-bottom, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:flex;flex-flow:column;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-ios{flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-ios{flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color, #fff));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-400, #999999);text-align:center}.action-sheet-container.sc-ion-action-sheet-ios{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-container.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports (backdrop-filter: blur(0)){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{padding-left:10px;padding-right:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, #999999));font-size:13px;font-weight:400;text-align:center}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-title.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:13px;font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{padding-left:18px;padding-right:18px;padding-top:18px;padding-bottom:18px;height:56px;font-size:20px;contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:18px;padding-inline-start:18px;-webkit-padding-end:18px;padding-inline-end:18px}}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:0.3em;font-size:28px;pointer-events:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:unset;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #eb445a)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #eb445a)}}";
|
|
106
|
-
|
|
107
|
-
const actionSheetMdCss = ".sc-ion-action-sheet-md-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);touch-action:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:var(--ion-safe-area-bottom, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-wrapper.sc-ion-action-sheet-md{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-button.sc-ion-action-sheet-md{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-md{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-md{display:flex;flex-flow:column;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-md{flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-md{flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.action-sheet-selected.sc-ion-action-sheet-md{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-md::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-md:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-md:hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);--button-background:transparent;--button-background-selected:currentColor;--button-background-selected-opacity:0;--button-background-activated:transparent;--button-background-activated-opacity:0;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-color:var(--ion-color-step-850, #262626);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}.action-sheet-title.sc-ion-action-sheet-md{padding-left:16px;padding-right:16px;padding-top:20px;padding-bottom:17px;min-height:60px;color:var(--color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));font-size:16px;text-align:start}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-title.sc-ion-action-sheet-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:14px}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:0}.action-sheet-button.sc-ion-action-sheet-md{padding-left:16px;padding-right:16px;padding-top:0;padding-bottom:0;position:relative;height:52px;font-size:16px;text-align:start;contain:strict;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-button.sc-ion-action-sheet-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.action-sheet-icon.sc-ion-action-sheet-md{padding-bottom:4px;margin-left:0;margin-right:32px;margin-top:0;margin-bottom:0;color:var(--color);font-size:24px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.action-sheet-icon.sc-ion-action-sheet-md{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px}}.action-sheet-button-inner.sc-ion-action-sheet-md{justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:bold}";
|
|
108
|
-
|
|
109
|
-
const ActionSheet = class {
|
|
110
|
-
constructor(hostRef) {
|
|
111
|
-
index.registerInstance(this, hostRef);
|
|
112
|
-
this.didPresent = index.createEvent(this, "ionActionSheetDidPresent", 7);
|
|
113
|
-
this.willPresent = index.createEvent(this, "ionActionSheetWillPresent", 7);
|
|
114
|
-
this.willDismiss = index.createEvent(this, "ionActionSheetWillDismiss", 7);
|
|
115
|
-
this.didDismiss = index.createEvent(this, "ionActionSheetDidDismiss", 7);
|
|
116
|
-
this.presented = false;
|
|
117
|
-
/**
|
|
118
|
-
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
|
119
|
-
*/
|
|
120
|
-
this.keyboardClose = true;
|
|
121
|
-
/**
|
|
122
|
-
* An array of buttons for the action sheet.
|
|
123
|
-
*/
|
|
124
|
-
this.buttons = [];
|
|
125
|
-
/**
|
|
126
|
-
* If `true`, the action sheet will be dismissed when the backdrop is clicked.
|
|
127
|
-
*/
|
|
128
|
-
this.backdropDismiss = true;
|
|
129
|
-
/**
|
|
130
|
-
* If `true`, the action sheet will be translucent.
|
|
131
|
-
* Only applies when the mode is `"ios"` and the device supports
|
|
132
|
-
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
|
|
133
|
-
*/
|
|
134
|
-
this.translucent = false;
|
|
135
|
-
/**
|
|
136
|
-
* If `true`, the action sheet will animate.
|
|
137
|
-
*/
|
|
138
|
-
this.animated = true;
|
|
139
|
-
this.onBackdropTap = () => {
|
|
140
|
-
this.dismiss(undefined, overlays.BACKDROP);
|
|
141
|
-
};
|
|
142
|
-
this.dispatchCancelHandler = (ev) => {
|
|
143
|
-
const role = ev.detail.role;
|
|
144
|
-
if (overlays.isCancel(role)) {
|
|
145
|
-
const cancelButton = this.getButtons().find(b => b.role === 'cancel');
|
|
146
|
-
this.callButtonHandler(cancelButton);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Present the action sheet overlay after it has been created.
|
|
152
|
-
*/
|
|
153
|
-
present() {
|
|
154
|
-
return overlays.present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
|
|
155
|
-
}
|
|
156
|
-
connectedCallback() {
|
|
157
|
-
overlays.prepareOverlay(this.el);
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Dismiss the action sheet overlay after it has been presented.
|
|
161
|
-
*
|
|
162
|
-
* @param data Any data to emit in the dismiss events.
|
|
163
|
-
* @param role The role of the element that is dismissing the action sheet.
|
|
164
|
-
* This can be useful in a button handler for determining which button was
|
|
165
|
-
* clicked to dismiss the action sheet.
|
|
166
|
-
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
167
|
-
*/
|
|
168
|
-
dismiss(data, role) {
|
|
169
|
-
return overlays.dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Returns a promise that resolves when the action sheet did dismiss.
|
|
173
|
-
*/
|
|
174
|
-
onDidDismiss() {
|
|
175
|
-
return overlays.eventMethod(this.el, 'ionActionSheetDidDismiss');
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Returns a promise that resolves when the action sheet will dismiss.
|
|
179
|
-
*
|
|
180
|
-
*/
|
|
181
|
-
onWillDismiss() {
|
|
182
|
-
return overlays.eventMethod(this.el, 'ionActionSheetWillDismiss');
|
|
183
|
-
}
|
|
184
|
-
async buttonClick(button) {
|
|
185
|
-
const role = button.role;
|
|
186
|
-
if (overlays.isCancel(role)) {
|
|
187
|
-
return this.dismiss(undefined, role);
|
|
188
|
-
}
|
|
189
|
-
const shouldDismiss = await this.callButtonHandler(button);
|
|
190
|
-
if (shouldDismiss) {
|
|
191
|
-
return this.dismiss(undefined, button.role);
|
|
192
|
-
}
|
|
193
|
-
return Promise.resolve();
|
|
194
|
-
}
|
|
195
|
-
async callButtonHandler(button) {
|
|
196
|
-
if (button) {
|
|
197
|
-
// a handler has been provided, execute it
|
|
198
|
-
// pass the handler the values from the inputs
|
|
199
|
-
const rtn = await overlays.safeCall(button.handler);
|
|
200
|
-
if (rtn === false) {
|
|
201
|
-
// if the return value of the handler is false then do not dismiss
|
|
202
|
-
return false;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
return true;
|
|
206
|
-
}
|
|
207
|
-
getButtons() {
|
|
208
|
-
return this.buttons.map(b => {
|
|
209
|
-
return (typeof b === 'string')
|
|
210
|
-
? { text: b }
|
|
211
|
-
: b;
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
disconnectedCallback() {
|
|
215
|
-
if (this.gesture) {
|
|
216
|
-
this.gesture.destroy();
|
|
217
|
-
this.gesture = undefined;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
componentDidLoad() {
|
|
221
|
-
/**
|
|
222
|
-
* Do not create gesture if:
|
|
223
|
-
* 1. A gesture already exists
|
|
224
|
-
* 2. App is running in MD mode
|
|
225
|
-
* 3. A wrapper ref does not exist
|
|
226
|
-
*/
|
|
227
|
-
const { groupEl, wrapperEl } = this;
|
|
228
|
-
if (this.gesture || ionicGlobal.getIonMode(this) === 'md' || !wrapperEl || !groupEl) {
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
index.readTask(() => {
|
|
232
|
-
const isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
|
|
233
|
-
if (!isScrollable) {
|
|
234
|
-
this.gesture = buttonActive.createButtonActiveGesture(wrapperEl, (refEl) => refEl.classList.contains('action-sheet-button'));
|
|
235
|
-
this.gesture.enable(true);
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
render() {
|
|
240
|
-
const { htmlAttributes } = this;
|
|
241
|
-
const mode = ionicGlobal.getIonMode(this);
|
|
242
|
-
const allButtons = this.getButtons();
|
|
243
|
-
const cancelButton = allButtons.find(b => b.role === 'cancel');
|
|
244
|
-
const buttons = allButtons.filter(b => b.role !== 'cancel');
|
|
245
|
-
return (index.h(index.Host, Object.assign({ role: "dialog", "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
246
|
-
zIndex: `${20000 + this.overlayIndex}`,
|
|
247
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index.h("ion-backdrop", { tappable: this.backdropDismiss }), index.h("div", { tabindex: "0" }), index.h("div", { class: "action-sheet-wrapper ion-overlay-wrapper", role: "dialog", ref: el => this.wrapperEl = el }, index.h("div", { class: "action-sheet-container" }, index.h("div", { class: "action-sheet-group", ref: el => this.groupEl = el }, this.header !== undefined &&
|
|
248
|
-
index.h("div", { class: {
|
|
249
|
-
'action-sheet-title': true,
|
|
250
|
-
'action-sheet-has-sub-title': this.subHeader !== undefined
|
|
251
|
-
} }, this.header, this.subHeader && index.h("div", { class: "action-sheet-sub-title" }, this.subHeader)), buttons.map(b => index.h("button", { type: "button", class: buttonClass(b), onClick: () => this.buttonClick(b) }, index.h("span", { class: "action-sheet-button-inner" }, b.icon && index.h("ion-icon", { icon: b.icon, lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && index.h("ion-ripple-effect", null)))), cancelButton &&
|
|
252
|
-
index.h("div", { class: "action-sheet-group action-sheet-group-cancel" }, index.h("button", { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }, index.h("span", { class: "action-sheet-button-inner" }, cancelButton.icon &&
|
|
253
|
-
index.h("ion-icon", { icon: cancelButton.icon, lazy: false, class: "action-sheet-icon" }), cancelButton.text), mode === 'md' && index.h("ion-ripple-effect", null))))), index.h("div", { tabindex: "0" })));
|
|
254
|
-
}
|
|
255
|
-
get el() { return index.getElement(this); }
|
|
256
|
-
};
|
|
257
|
-
const buttonClass = (button) => {
|
|
258
|
-
return Object.assign({ 'action-sheet-button': true, 'ion-activatable': true, 'ion-focusable': true, [`action-sheet-${button.role}`]: button.role !== undefined }, theme.getClassMap(button.cssClass));
|
|
259
|
-
};
|
|
260
|
-
ActionSheet.style = {
|
|
261
|
-
ios: actionSheetIosCss,
|
|
262
|
-
md: actionSheetMdCss
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
exports.ion_action_sheet = ActionSheet;
|