@pod-os/elements 0.7.1-92705ee.0 → 0.7.1-a71f01c.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} +1906 -1492
- 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 +137 -0
- package/dist/cjs/ion-buttons_3.cjs.entry.js +799 -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 +38 -37
- 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 +1386 -156
- 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 +127 -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 +50 -60
- 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-f7d24abf.js} +190 -72
- 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/{theme-2259d0f5.js → theme-fc63803b.js} +9 -5
- package/dist/collection/collection-manifest.json +10 -4
- package/dist/collection/components/pos-rich-link/pos-rich-link.js +1 -1
- package/dist/components/ResourceAware.js +5 -0
- package/dist/components/action-sheet.js +309 -0
- package/dist/{esm/ion-alert.entry.js → components/alert.js} +150 -105
- package/dist/{esm/animation-fe6ed422.js → components/animation.js} +115 -84
- package/dist/components/app.js +112 -0
- package/dist/components/backdrop.js +82 -0
- package/dist/components/badge.js +42 -0
- package/dist/{esm/button-active-fd9d6d91.js → components/button-active.js} +9 -6
- package/dist/components/button.js +207 -0
- package/dist/{esm/ion-buttons.entry.js → components/buttons.js} +28 -12
- package/dist/components/card-content.js +40 -0
- package/dist/components/card-header.js +51 -0
- package/dist/components/card-title.js +43 -0
- package/dist/components/card.js +102 -0
- package/dist/{esm/ion-checkbox.entry.js → components/checkbox.js} +42 -24
- package/dist/components/col.js +161 -0
- package/dist/components/content.js +356 -0
- package/dist/{esm/cubic-bezier-108b8579.js → components/cubic-bezier.js} +13 -12
- package/dist/components/data.js +1463 -0
- package/dist/components/dir.js +18 -0
- package/dist/components/focus-visible.js +74 -0
- package/dist/components/footer.js +149 -0
- package/dist/components/framework-delegate.js +115 -0
- package/dist/{esm/gesture-controller-8f35af24.js → components/gesture-controller.js} +6 -2
- package/dist/components/grid.js +41 -0
- package/dist/{esm/haptic-c424e670.js → components/haptic.js} +38 -9
- package/dist/{esm/hardware-back-button-bb4c578a.js → components/hardware-back-button.js} +11 -8
- package/dist/components/header.js +360 -0
- package/dist/{esm/helpers-44e3bd9f.js → components/helpers.js} +113 -16
- package/dist/components/icon.js +367 -0
- package/dist/components/index.d.ts +41 -0
- package/dist/components/index.js +123 -0
- package/dist/components/index10.js +28 -0
- package/dist/{esm/tap-click-a7e55ef5.js → components/index11.js} +37 -19
- package/dist/components/index2.js +25 -0
- package/dist/{esm/index-8d682224.js → components/index3.js} +12 -8
- package/dist/components/index4.js +34 -0
- package/dist/components/index5.js +128 -0
- package/dist/{esm/index-97199683.js → components/index6.js} +34 -28
- package/dist/{esm/index-8a463a85.js → components/index7.js} +35 -24
- package/dist/{custom-elements/index.js → components/index8.js} +1049 -20945
- package/dist/{esm/index-3a1bd803.js → components/index9.js} +35 -20
- package/dist/{custom-elements → components}/input-shims.js +88 -38
- package/dist/components/ion-accordion-group.js +228 -0
- package/dist/components/ion-accordion.js +365 -0
- package/dist/components/ion-action-sheet.js +6 -0
- package/dist/components/ion-alert.js +6 -0
- package/dist/components/ion-app.js +6 -0
- package/dist/components/ion-avatar.js +39 -0
- package/dist/components/ion-back-button.js +128 -0
- package/dist/components/ion-backdrop.js +6 -0
- package/dist/components/ion-badge.js +6 -0
- package/dist/components/ion-breadcrumb.js +135 -0
- package/dist/components/ion-breadcrumbs.js +158 -0
- package/dist/components/ion-button.js +6 -0
- package/dist/components/ion-buttons.js +6 -0
- package/dist/components/ion-card-content.js +6 -0
- package/dist/components/ion-card-header.js +6 -0
- package/dist/components/ion-card-subtitle.js +46 -0
- package/dist/components/ion-card-title.js +6 -0
- package/dist/components/ion-card.js +6 -0
- package/dist/components/ion-checkbox.js +6 -0
- package/dist/components/ion-chip.js +59 -0
- package/dist/components/ion-col.js +6 -0
- package/dist/components/ion-content.js +6 -0
- package/dist/components/ion-datetime-button.js +375 -0
- package/dist/components/ion-datetime.js +1802 -0
- package/dist/components/ion-fab-button.js +149 -0
- package/dist/components/ion-fab-list.js +62 -0
- package/dist/components/ion-fab.js +97 -0
- package/dist/components/ion-footer.js +6 -0
- package/dist/components/ion-grid.js +6 -0
- package/dist/components/ion-header.js +6 -0
- package/dist/components/ion-icon.js +6 -0
- package/dist/components/ion-img.js +120 -0
- package/dist/components/ion-infinite-scroll-content.js +59 -0
- package/dist/components/ion-infinite-scroll.js +223 -0
- package/dist/components/ion-input.js +352 -0
- package/dist/components/ion-item-divider.js +6 -0
- package/dist/components/ion-item-group.js +6 -0
- package/dist/components/ion-item-option.js +89 -0
- package/dist/components/ion-item-options.js +63 -0
- package/dist/components/ion-item-sliding.js +419 -0
- package/dist/components/ion-item.js +6 -0
- package/dist/components/ion-label.js +6 -0
- package/dist/components/ion-list-header.js +6 -0
- package/dist/components/ion-list.js +6 -0
- package/dist/components/ion-loading.js +256 -0
- package/dist/components/ion-menu-button.js +107 -0
- package/dist/components/ion-menu-toggle.js +62 -0
- package/dist/components/ion-menu.js +611 -0
- package/dist/components/ion-modal.js +1765 -0
- package/dist/components/ion-nav-link.js +65 -0
- package/dist/components/ion-nav.js +905 -0
- package/dist/components/ion-note.js +6 -0
- package/dist/components/ion-picker-column-internal.js +6 -0
- package/dist/components/ion-picker-column.js +6 -0
- package/dist/components/ion-picker-internal.js +6 -0
- package/dist/components/ion-picker.js +263 -0
- package/dist/components/ion-popover.js +6 -0
- package/dist/components/ion-progress-bar.js +6 -0
- package/dist/components/ion-radio-group.js +6 -0
- package/dist/components/ion-radio.js +6 -0
- package/dist/components/ion-range.js +550 -0
- package/dist/components/ion-refresher-content.js +64 -0
- package/dist/components/ion-refresher.js +826 -0
- package/dist/components/ion-reorder-group.js +303 -0
- package/dist/components/ion-reorder.js +58 -0
- package/dist/components/ion-ripple-effect.js +6 -0
- package/dist/components/ion-route-redirect.js +40 -0
- package/dist/components/ion-route.js +68 -0
- package/dist/components/ion-router-link.js +59 -0
- package/dist/components/ion-router-outlet.js +223 -0
- package/dist/components/ion-router.js +852 -0
- package/dist/components/ion-row.js +6 -0
- package/dist/components/ion-searchbar.js +6 -0
- package/dist/components/ion-segment-button.js +128 -0
- package/dist/components/ion-segment.js +463 -0
- package/dist/components/ion-select-option.js +44 -0
- package/dist/components/ion-select-popover.js +6 -0
- package/dist/components/ion-select.js +596 -0
- package/dist/components/ion-skeleton-text.js +6 -0
- package/dist/components/ion-slide.js +38 -0
- package/dist/components/ion-slides.js +423 -0
- package/dist/components/ion-spinner.js +6 -0
- package/dist/components/ion-split-pane.js +179 -0
- package/dist/components/ion-tab-bar.js +86 -0
- package/dist/components/ion-tab-button.js +132 -0
- package/dist/components/ion-tab.js +86 -0
- package/dist/components/ion-tabs.js +176 -0
- package/dist/components/ion-text.js +40 -0
- package/dist/components/ion-textarea.js +287 -0
- package/dist/components/ion-thumbnail.js +34 -0
- package/dist/components/ion-title.js +6 -0
- package/dist/components/ion-toast.js +317 -0
- package/dist/components/ion-toggle.js +207 -0
- package/dist/components/ion-toolbar.js +6 -0
- package/dist/components/ion-virtual-scroll.js +588 -0
- package/dist/components/ionic-global.js +226 -0
- package/dist/{custom-elements → components}/ios.transition.js +75 -50
- package/dist/components/item-divider.js +54 -0
- package/dist/components/item-group.js +41 -0
- package/dist/components/item.js +323 -0
- package/dist/components/keyboard-controller.js +40 -0
- package/dist/{custom-elements → components}/keyboard.js +6 -3
- package/dist/components/label.js +95 -0
- package/dist/components/list-header.js +45 -0
- package/dist/components/list.js +66 -0
- package/dist/{custom-elements → components}/md.transition.js +12 -14
- package/dist/{esm/menu-toggle-util-562dfc9c.js → components/menu-toggle-util.js} +5 -2
- package/dist/components/note.js +42 -0
- package/dist/{esm/overlays-fc9a0625.js → components/overlays.js} +188 -72
- package/dist/components/picker-column-internal.js +315 -0
- package/dist/components/picker-column.js +343 -0
- package/dist/components/picker-internal.js +486 -0
- package/dist/components/popover.js +1440 -0
- package/dist/components/pos-app-browser.d.ts +11 -0
- package/dist/components/pos-app-browser.js +299 -0
- package/dist/components/pos-app-generic.d.ts +11 -0
- package/dist/components/pos-app-generic.js +6 -0
- package/dist/components/pos-app-generic2.js +194 -0
- package/dist/components/pos-app-image-viewer.d.ts +11 -0
- package/dist/components/pos-app-image-viewer.js +6 -0
- package/dist/components/pos-app-image-viewer2.js +162 -0
- package/dist/components/pos-app-rdf-document.d.ts +11 -0
- package/dist/components/pos-app-rdf-document.js +6 -0
- package/dist/components/pos-app-rdf-document2.js +170 -0
- package/dist/components/pos-app.d.ts +11 -0
- package/dist/components/pos-app.js +6 -0
- package/dist/components/pos-app2.js +53 -0
- package/dist/components/pos-description.d.ts +11 -0
- package/dist/components/pos-description.js +6 -0
- package/dist/components/pos-description2.js +38 -0
- package/dist/components/pos-image.d.ts +11 -0
- package/dist/components/pos-image.js +6 -0
- package/dist/components/pos-image2.js +117 -0
- package/dist/components/pos-label.d.ts +11 -0
- package/dist/components/pos-label.js +6 -0
- package/dist/components/pos-label2.js +38 -0
- package/dist/components/pos-literals.d.ts +11 -0
- package/dist/components/pos-literals.js +6 -0
- package/dist/components/pos-literals2.js +87 -0
- package/dist/components/pos-login.d.ts +11 -0
- package/dist/components/pos-login.js +6 -0
- package/dist/components/pos-login2.js +120 -0
- package/dist/components/pos-navigation-bar.d.ts +11 -0
- package/dist/components/pos-navigation-bar.js +6 -0
- package/dist/components/pos-navigation-bar2.js +52 -0
- package/dist/components/pos-picture.d.ts +11 -0
- package/dist/components/pos-picture.js +6 -0
- package/dist/components/pos-picture2.js +62 -0
- package/dist/components/pos-relations.d.ts +11 -0
- package/dist/components/pos-relations.js +6 -0
- package/dist/components/pos-relations2.js +135 -0
- package/dist/components/pos-resource.d.ts +11 -0
- package/dist/components/pos-resource.js +6 -0
- package/dist/components/pos-resource2.js +126 -0
- package/dist/components/pos-reverse-relations.d.ts +11 -0
- package/dist/components/pos-reverse-relations.js +6 -0
- package/dist/components/pos-reverse-relations2.js +135 -0
- package/dist/components/pos-rich-link.d.ts +11 -0
- package/dist/components/pos-rich-link.js +6 -0
- package/dist/components/pos-rich-link2.js +106 -0
- package/dist/components/pos-router.d.ts +11 -0
- package/dist/components/pos-router.js +6 -0
- package/dist/components/pos-router2.js +813 -0
- package/dist/components/pos-subjects.d.ts +11 -0
- package/dist/components/pos-subjects.js +6 -0
- package/dist/components/pos-subjects2.js +125 -0
- package/dist/components/pos-type-badges.d.ts +11 -0
- package/dist/components/pos-type-badges.js +6 -0
- package/dist/components/pos-type-badges2.js +69 -0
- package/dist/components/pos-type-router.d.ts +11 -0
- package/dist/components/pos-type-router.js +6 -0
- package/dist/components/pos-type-router2.js +241 -0
- package/dist/components/progress-bar.js +91 -0
- package/dist/components/radio-group.js +139 -0
- package/dist/components/radio.js +135 -0
- package/dist/components/ripple-effect.js +107 -0
- package/dist/components/row.js +31 -0
- package/dist/components/searchbar.js +412 -0
- package/dist/components/select-popover.js +174 -0
- package/dist/components/session.js +202 -0
- package/dist/components/skeleton-text.js +46 -0
- package/dist/components/spinner.js +224 -0
- package/dist/{custom-elements → components}/status-tap.js +8 -4
- package/dist/{custom-elements → components}/swipe-back.js +33 -13
- package/dist/{custom-elements → components}/swiper.bundle.js +0 -0
- package/dist/{esm/theme-d21826a7.js → components/theme.js} +9 -5
- package/dist/components/title.js +66 -0
- package/dist/components/toolbar.js +87 -0
- package/dist/elements/elements.css +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/p-00f19b1d.js +4 -0
- package/dist/elements/p-0587332d.entry.js +1 -0
- package/dist/elements/p-07f54139.entry.js +7 -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-0d284fe0.entry.js +1 -0
- package/dist/elements/p-116437b0.entry.js +13 -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-1e617706.entry.js +7 -0
- 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-2a629468.entry.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-3d0f59af.entry.js +7 -0
- package/dist/elements/p-41cb5688.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-667550a9.entry.js +14 -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-7916ecc5.entry.js +1 -0
- package/dist/elements/p-79f06b80.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-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-96aeb07a.entry.js +1 -0
- 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-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-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-bc63f4b6.entry.js +1 -0
- package/dist/elements/p-bd12806f.entry.js +1 -0
- package/dist/elements/p-bf90022d.entry.js +4 -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-d3e75c94.entry.js +1 -0
- package/dist/elements/p-d8e7ebf4.entry.js +7 -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-dffd8689.js +4 -0
- package/dist/elements/p-e3bcb6e8.entry.js +1 -0
- package/dist/elements/p-e495a095.js +4 -0
- package/dist/elements/p-e59d9789.entry.js +1 -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-fdac5f3a.js +4 -0
- package/dist/elements/p-feb0cea8.entry.js +4 -0
- package/dist/esm/animation-801a007a.js +986 -0
- package/dist/esm/{app-globals-27d92837.js → app-globals-05a3abfb.js} +1 -1
- package/dist/esm/cubic-bezier-538b6253.js +90 -0
- 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-c466ff14.js +195 -0
- package/dist/esm/haptic-e7d5ef4d.js +135 -0
- package/dist/esm/hardware-back-button-242191a7.js +71 -0
- package/dist/esm/helpers-aeff219b.js +410 -0
- package/dist/esm/index-0dbaca1a.js +28 -0
- package/dist/esm/index-1f3d8582.js +34 -0
- package/dist/esm/index-2be9a18b.js +312 -0
- package/dist/esm/index-51e4a829.js +137 -0
- package/dist/esm/index-6048aed6.js +224 -0
- package/dist/esm/index-65ecd543.js +25 -0
- package/dist/{custom-elements/tap-click.js → esm/index-b212db1c.js} +37 -19
- package/dist/esm/{index-e4deec27.js → index-cb938ffb.js} +7 -1
- package/dist/esm/index-d39eb62b.js +463 -0
- 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} +1906 -1493
- 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 +133 -0
- package/dist/esm/ion-buttons_3.entry.js +793 -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 +38 -37
- 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 +1377 -147
- 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 +127 -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 +50 -60
- 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/esm/{keyboard-e6abcb80.js → 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-82bf888a.js +12 -0
- package/dist/esm/overlays-bd4abb68.js +502 -0
- 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/theme-7cf2cab0.js +43 -0
- package/dist/types/components.d.ts +0 -13
- package/package.json +7 -8
- 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/cjs/test-component.cjs.entry.js +0 -13
- package/dist/collection/test/TestComponent.js +0 -3
- package/dist/collection/test/mockPodOS.js +0 -35
- package/dist/collection/test/renderFunctionalComponent.js +0 -8
- package/dist/custom-elements/focus-visible.js +0 -43
- package/dist/custom-elements/index.d.ts +0 -165
- 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-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-d01009b8.entry.js +0 -67
- 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/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-note.entry.js +0 -25
- package/dist/esm/ion-select-popover.entry.js +0 -31
- package/dist/esm/spinner-configs-aaf2a1a9.js +0 -110
- package/dist/esm/swipe-back-d84cfc8a.js +0 -50
- package/dist/esm/test-component.entry.js +0 -9
- package/dist/types/test/TestComponent.d.ts +0 -2
- package/dist/types/test/mockPodOS.d.ts +0 -11
- package/dist/types/test/renderFunctionalComponent.d.ts +0 -1
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as config, g as getIonMode } from './ionic-global.js';
|
|
3
|
+
import { g as getTimeGivenProgression } from './cubic-bezier.js';
|
|
4
|
+
import { G as GESTURE_CONTROLLER } from './gesture-controller.js';
|
|
5
|
+
import { j as isEndSide, i as inheritAriaAttributes, k as assert, l as clamp } from './helpers.js';
|
|
6
|
+
import { m as menuController } from './index6.js';
|
|
7
|
+
import { g as getOverlay } from './overlays.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './backdrop.js';
|
|
9
|
+
|
|
10
|
+
const menuIosCss = ":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{left:0;right:auto;top:0;bottom:0;transform:translateX(-9999px);display:flex;position:absolute;flex-direction:column;justify-content:space-between;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);background:var(--background);contain:strict}[dir=rtl] .menu-inner,:host-context([dir=rtl]) .menu-inner{left:unset;right:unset;left:auto;right:0}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;right:auto;left:0}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;right:0;left:auto;}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;transform:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}";
|
|
11
|
+
|
|
12
|
+
const menuMdCss = ":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{left:0;right:auto;top:0;bottom:0;transform:translateX(-9999px);display:flex;position:absolute;flex-direction:column;justify-content:space-between;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);background:var(--background);contain:strict}[dir=rtl] .menu-inner,:host-context([dir=rtl]) .menu-inner{left:unset;right:unset;left:auto;right:0}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;right:auto;left:0}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;right:0;left:auto;}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;transform:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-overlay) .menu-inner{box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18)}";
|
|
13
|
+
|
|
14
|
+
const iosEasing = 'cubic-bezier(0.32,0.72,0,1)';
|
|
15
|
+
const mdEasing = 'cubic-bezier(0.0,0.0,0.2,1)';
|
|
16
|
+
const iosEasingReverse = 'cubic-bezier(1, 0, 0.68, 0.28)';
|
|
17
|
+
const mdEasingReverse = 'cubic-bezier(0.4, 0, 0.6, 1)';
|
|
18
|
+
const focusableQueryString = '[tabindex]:not([tabindex^="-"]), input:not([type=hidden]):not([tabindex^="-"]), textarea:not([tabindex^="-"]), button:not([tabindex^="-"]), select:not([tabindex^="-"]), .ion-focusable:not([tabindex^="-"])';
|
|
19
|
+
const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.__registerHost();
|
|
23
|
+
this.__attachShadow();
|
|
24
|
+
this.ionWillOpen = createEvent(this, "ionWillOpen", 7);
|
|
25
|
+
this.ionWillClose = createEvent(this, "ionWillClose", 7);
|
|
26
|
+
this.ionDidOpen = createEvent(this, "ionDidOpen", 7);
|
|
27
|
+
this.ionDidClose = createEvent(this, "ionDidClose", 7);
|
|
28
|
+
this.ionMenuChange = createEvent(this, "ionMenuChange", 7);
|
|
29
|
+
this.lastOnEnd = 0;
|
|
30
|
+
this.blocker = GESTURE_CONTROLLER.createBlocker({ disableScroll: true });
|
|
31
|
+
this.isAnimating = false;
|
|
32
|
+
this._isOpen = false;
|
|
33
|
+
this.inheritedAttributes = {};
|
|
34
|
+
this.handleFocus = (ev) => {
|
|
35
|
+
/**
|
|
36
|
+
* Overlays have their own focus trapping listener
|
|
37
|
+
* so we do not want the two listeners to conflict
|
|
38
|
+
* with each other. If the top-most overlay that is
|
|
39
|
+
* open does not contain this ion-menu, then ion-menu's
|
|
40
|
+
* focus trapping should not run.
|
|
41
|
+
*/
|
|
42
|
+
const lastOverlay = getOverlay(document);
|
|
43
|
+
if (lastOverlay && !lastOverlay.contains(this.el)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
this.trapKeyboardFocus(ev, document);
|
|
47
|
+
};
|
|
48
|
+
this.isPaneVisible = false;
|
|
49
|
+
this.isEndSide = false;
|
|
50
|
+
/**
|
|
51
|
+
* If `true`, the menu is disabled.
|
|
52
|
+
*/
|
|
53
|
+
this.disabled = false;
|
|
54
|
+
/**
|
|
55
|
+
* Which side of the view the menu should be placed.
|
|
56
|
+
*/
|
|
57
|
+
this.side = 'start';
|
|
58
|
+
/**
|
|
59
|
+
* If `true`, swiping the menu is enabled.
|
|
60
|
+
*/
|
|
61
|
+
this.swipeGesture = true;
|
|
62
|
+
/**
|
|
63
|
+
* The edge threshold for dragging the menu open.
|
|
64
|
+
* If a drag/swipe happens over this value, the menu is not triggered.
|
|
65
|
+
*/
|
|
66
|
+
this.maxEdgeStart = 50;
|
|
67
|
+
}
|
|
68
|
+
typeChanged(type, oldType) {
|
|
69
|
+
const contentEl = this.contentEl;
|
|
70
|
+
if (contentEl) {
|
|
71
|
+
if (oldType !== undefined) {
|
|
72
|
+
contentEl.classList.remove(`menu-content-${oldType}`);
|
|
73
|
+
}
|
|
74
|
+
contentEl.classList.add(`menu-content-${type}`);
|
|
75
|
+
contentEl.removeAttribute('style');
|
|
76
|
+
}
|
|
77
|
+
if (this.menuInnerEl) {
|
|
78
|
+
// Remove effects of previous animations
|
|
79
|
+
this.menuInnerEl.removeAttribute('style');
|
|
80
|
+
}
|
|
81
|
+
this.animation = undefined;
|
|
82
|
+
}
|
|
83
|
+
disabledChanged() {
|
|
84
|
+
this.updateState();
|
|
85
|
+
this.ionMenuChange.emit({
|
|
86
|
+
disabled: this.disabled,
|
|
87
|
+
open: this._isOpen,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
sideChanged() {
|
|
91
|
+
this.isEndSide = isEndSide(this.side);
|
|
92
|
+
}
|
|
93
|
+
swipeGestureChanged() {
|
|
94
|
+
this.updateState();
|
|
95
|
+
}
|
|
96
|
+
async connectedCallback() {
|
|
97
|
+
// TODO: connectedCallback is fired in CE build
|
|
98
|
+
// before WC is defined. This needs to be fixed in Stencil.
|
|
99
|
+
if (typeof customElements !== 'undefined') {
|
|
100
|
+
await customElements.whenDefined('ion-menu');
|
|
101
|
+
}
|
|
102
|
+
if (this.type === undefined) {
|
|
103
|
+
this.type = config.get('menuType', 'overlay');
|
|
104
|
+
}
|
|
105
|
+
if (!Build.isBrowser) {
|
|
106
|
+
this.disabled = true;
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const content = this.contentId !== undefined ? document.getElementById(this.contentId) : null;
|
|
110
|
+
if (content === null) {
|
|
111
|
+
console.error('Menu: must have a "content" element to listen for drag events on.');
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (this.el.contains(content)) {
|
|
115
|
+
console.error(`Menu: "contentId" should refer to the main view's ion-content, not the ion-content inside of the ion-menu.`);
|
|
116
|
+
}
|
|
117
|
+
this.contentEl = content;
|
|
118
|
+
// add menu's content classes
|
|
119
|
+
content.classList.add('menu-content');
|
|
120
|
+
this.typeChanged(this.type, undefined);
|
|
121
|
+
this.sideChanged();
|
|
122
|
+
// register this menu with the app's menu controller
|
|
123
|
+
menuController._register(this);
|
|
124
|
+
this.gesture = (await import('./index9.js')).createGesture({
|
|
125
|
+
el: document,
|
|
126
|
+
gestureName: 'menu-swipe',
|
|
127
|
+
gesturePriority: 30,
|
|
128
|
+
threshold: 10,
|
|
129
|
+
blurOnStart: true,
|
|
130
|
+
canStart: (ev) => this.canStart(ev),
|
|
131
|
+
onWillStart: () => this.onWillStart(),
|
|
132
|
+
onStart: () => this.onStart(),
|
|
133
|
+
onMove: (ev) => this.onMove(ev),
|
|
134
|
+
onEnd: (ev) => this.onEnd(ev),
|
|
135
|
+
});
|
|
136
|
+
this.updateState();
|
|
137
|
+
}
|
|
138
|
+
componentWillLoad() {
|
|
139
|
+
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
140
|
+
}
|
|
141
|
+
async componentDidLoad() {
|
|
142
|
+
this.ionMenuChange.emit({ disabled: this.disabled, open: this._isOpen });
|
|
143
|
+
this.updateState();
|
|
144
|
+
}
|
|
145
|
+
disconnectedCallback() {
|
|
146
|
+
this.blocker.destroy();
|
|
147
|
+
menuController._unregister(this);
|
|
148
|
+
if (this.animation) {
|
|
149
|
+
this.animation.destroy();
|
|
150
|
+
}
|
|
151
|
+
if (this.gesture) {
|
|
152
|
+
this.gesture.destroy();
|
|
153
|
+
this.gesture = undefined;
|
|
154
|
+
}
|
|
155
|
+
this.animation = undefined;
|
|
156
|
+
this.contentEl = this.backdropEl = this.menuInnerEl = undefined;
|
|
157
|
+
}
|
|
158
|
+
onSplitPaneChanged(ev) {
|
|
159
|
+
this.isPaneVisible = ev.detail.isPane(this.el);
|
|
160
|
+
this.updateState();
|
|
161
|
+
}
|
|
162
|
+
onBackdropClick(ev) {
|
|
163
|
+
if (this._isOpen && this.lastOnEnd < ev.timeStamp - 100) {
|
|
164
|
+
const shouldClose = ev.composedPath ? !ev.composedPath().includes(this.menuInnerEl) : false;
|
|
165
|
+
if (shouldClose) {
|
|
166
|
+
ev.preventDefault();
|
|
167
|
+
ev.stopPropagation();
|
|
168
|
+
this.close();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
onKeydown(ev) {
|
|
173
|
+
if (ev.key === 'Escape') {
|
|
174
|
+
this.close();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Returns `true` is the menu is open.
|
|
179
|
+
*/
|
|
180
|
+
isOpen() {
|
|
181
|
+
return Promise.resolve(this._isOpen);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Returns `true` is the menu is active.
|
|
185
|
+
*
|
|
186
|
+
* A menu is active when it can be opened or closed, meaning it's enabled
|
|
187
|
+
* and it's not part of a `ion-split-pane`.
|
|
188
|
+
*/
|
|
189
|
+
isActive() {
|
|
190
|
+
return Promise.resolve(this._isActive());
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Opens the menu. If the menu is already open or it can't be opened,
|
|
194
|
+
* it returns `false`.
|
|
195
|
+
*/
|
|
196
|
+
open(animated = true) {
|
|
197
|
+
return this.setOpen(true, animated);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Closes the menu. If the menu is already closed or it can't be closed,
|
|
201
|
+
* it returns `false`.
|
|
202
|
+
*/
|
|
203
|
+
close(animated = true) {
|
|
204
|
+
return this.setOpen(false, animated);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Toggles the menu. If the menu is already open, it will try to close, otherwise it will try to open it.
|
|
208
|
+
* If the operation can't be completed successfully, it returns `false`.
|
|
209
|
+
*/
|
|
210
|
+
toggle(animated = true) {
|
|
211
|
+
return this.setOpen(!this._isOpen, animated);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Opens or closes the button.
|
|
215
|
+
* If the operation can't be completed successfully, it returns `false`.
|
|
216
|
+
*/
|
|
217
|
+
setOpen(shouldOpen, animated = true) {
|
|
218
|
+
return menuController._setOpen(this, shouldOpen, animated);
|
|
219
|
+
}
|
|
220
|
+
focusFirstDescendant() {
|
|
221
|
+
const { el } = this;
|
|
222
|
+
const firstInput = el.querySelector(focusableQueryString);
|
|
223
|
+
if (firstInput) {
|
|
224
|
+
firstInput.focus();
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
el.focus();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
focusLastDescendant() {
|
|
231
|
+
const { el } = this;
|
|
232
|
+
const inputs = Array.from(el.querySelectorAll(focusableQueryString));
|
|
233
|
+
const lastInput = inputs.length > 0 ? inputs[inputs.length - 1] : null;
|
|
234
|
+
if (lastInput) {
|
|
235
|
+
lastInput.focus();
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
el.focus();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
trapKeyboardFocus(ev, doc) {
|
|
242
|
+
const target = ev.target;
|
|
243
|
+
if (!target) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* If the target is inside the menu contents, let the browser
|
|
248
|
+
* focus as normal and keep a log of the last focused element.
|
|
249
|
+
*/
|
|
250
|
+
if (this.el.contains(target)) {
|
|
251
|
+
this.lastFocus = target;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
/**
|
|
255
|
+
* Otherwise, we are about to have focus go out of the menu.
|
|
256
|
+
* Wrap the focus to either the first or last element.
|
|
257
|
+
*/
|
|
258
|
+
/**
|
|
259
|
+
* Once we call `focusFirstDescendant`, another focus event
|
|
260
|
+
* will fire, which will cause `lastFocus` to be updated
|
|
261
|
+
* before we can run the code after that. We cache the value
|
|
262
|
+
* here to avoid that.
|
|
263
|
+
*/
|
|
264
|
+
this.focusFirstDescendant();
|
|
265
|
+
/**
|
|
266
|
+
* If the cached last focused element is the same as the now-
|
|
267
|
+
* active element, that means the user was on the first element
|
|
268
|
+
* already and pressed Shift + Tab, so we need to wrap to the
|
|
269
|
+
* last descendant.
|
|
270
|
+
*/
|
|
271
|
+
if (this.lastFocus === doc.activeElement) {
|
|
272
|
+
this.focusLastDescendant();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
async _setOpen(shouldOpen, animated = true) {
|
|
277
|
+
// If the menu is disabled or it is currently being animated, let's do nothing
|
|
278
|
+
if (!this._isActive() || this.isAnimating || shouldOpen === this._isOpen) {
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
281
|
+
this.beforeAnimation(shouldOpen);
|
|
282
|
+
await this.loadAnimation();
|
|
283
|
+
await this.startAnimation(shouldOpen, animated);
|
|
284
|
+
this.afterAnimation(shouldOpen);
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
async loadAnimation() {
|
|
288
|
+
// Menu swipe animation takes the menu's inner width as parameter,
|
|
289
|
+
// If `offsetWidth` changes, we need to create a new animation.
|
|
290
|
+
const width = this.menuInnerEl.offsetWidth;
|
|
291
|
+
if (width === this.width && this.animation !== undefined) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
this.width = width;
|
|
295
|
+
// Destroy existing animation
|
|
296
|
+
if (this.animation) {
|
|
297
|
+
this.animation.destroy();
|
|
298
|
+
this.animation = undefined;
|
|
299
|
+
}
|
|
300
|
+
// Create new animation
|
|
301
|
+
this.animation = await menuController._createAnimation(this.type, this);
|
|
302
|
+
if (!config.getBoolean('animated', true)) {
|
|
303
|
+
this.animation.duration(0);
|
|
304
|
+
}
|
|
305
|
+
this.animation.fill('both');
|
|
306
|
+
}
|
|
307
|
+
async startAnimation(shouldOpen, animated) {
|
|
308
|
+
const isReversed = !shouldOpen;
|
|
309
|
+
const mode = getIonMode(this);
|
|
310
|
+
const easing = mode === 'ios' ? iosEasing : mdEasing;
|
|
311
|
+
const easingReverse = mode === 'ios' ? iosEasingReverse : mdEasingReverse;
|
|
312
|
+
const ani = this.animation
|
|
313
|
+
.direction(isReversed ? 'reverse' : 'normal')
|
|
314
|
+
.easing(isReversed ? easingReverse : easing)
|
|
315
|
+
.onFinish(() => {
|
|
316
|
+
if (ani.getDirection() === 'reverse') {
|
|
317
|
+
ani.direction('normal');
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
if (animated) {
|
|
321
|
+
await ani.play();
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
ani.play({ sync: true });
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
_isActive() {
|
|
328
|
+
return !this.disabled && !this.isPaneVisible;
|
|
329
|
+
}
|
|
330
|
+
canSwipe() {
|
|
331
|
+
return this.swipeGesture && !this.isAnimating && this._isActive();
|
|
332
|
+
}
|
|
333
|
+
canStart(detail) {
|
|
334
|
+
// Do not allow swipe gesture if a modal is open
|
|
335
|
+
const isModalPresented = !!document.querySelector('ion-modal.show-modal');
|
|
336
|
+
if (isModalPresented || !this.canSwipe()) {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
if (this._isOpen) {
|
|
340
|
+
return true;
|
|
341
|
+
}
|
|
342
|
+
else if (menuController._getOpenSync()) {
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
return checkEdgeSide(window, detail.currentX, this.isEndSide, this.maxEdgeStart);
|
|
346
|
+
}
|
|
347
|
+
onWillStart() {
|
|
348
|
+
this.beforeAnimation(!this._isOpen);
|
|
349
|
+
return this.loadAnimation();
|
|
350
|
+
}
|
|
351
|
+
onStart() {
|
|
352
|
+
if (!this.isAnimating || !this.animation) {
|
|
353
|
+
assert(false, 'isAnimating has to be true');
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
// the cloned animation should not use an easing curve during seek
|
|
357
|
+
this.animation.progressStart(true, this._isOpen ? 1 : 0);
|
|
358
|
+
}
|
|
359
|
+
onMove(detail) {
|
|
360
|
+
if (!this.isAnimating || !this.animation) {
|
|
361
|
+
assert(false, 'isAnimating has to be true');
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
const delta = computeDelta(detail.deltaX, this._isOpen, this.isEndSide);
|
|
365
|
+
const stepValue = delta / this.width;
|
|
366
|
+
this.animation.progressStep(this._isOpen ? 1 - stepValue : stepValue);
|
|
367
|
+
}
|
|
368
|
+
onEnd(detail) {
|
|
369
|
+
if (!this.isAnimating || !this.animation) {
|
|
370
|
+
assert(false, 'isAnimating has to be true');
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
const isOpen = this._isOpen;
|
|
374
|
+
const isEndSide = this.isEndSide;
|
|
375
|
+
const delta = computeDelta(detail.deltaX, isOpen, isEndSide);
|
|
376
|
+
const width = this.width;
|
|
377
|
+
const stepValue = delta / width;
|
|
378
|
+
const velocity = detail.velocityX;
|
|
379
|
+
const z = width / 2.0;
|
|
380
|
+
const shouldCompleteRight = velocity >= 0 && (velocity > 0.2 || detail.deltaX > z);
|
|
381
|
+
const shouldCompleteLeft = velocity <= 0 && (velocity < -0.2 || detail.deltaX < -z);
|
|
382
|
+
const shouldComplete = isOpen
|
|
383
|
+
? isEndSide
|
|
384
|
+
? shouldCompleteRight
|
|
385
|
+
: shouldCompleteLeft
|
|
386
|
+
: isEndSide
|
|
387
|
+
? shouldCompleteLeft
|
|
388
|
+
: shouldCompleteRight;
|
|
389
|
+
let shouldOpen = !isOpen && shouldComplete;
|
|
390
|
+
if (isOpen && !shouldComplete) {
|
|
391
|
+
shouldOpen = true;
|
|
392
|
+
}
|
|
393
|
+
this.lastOnEnd = detail.currentTime;
|
|
394
|
+
// Account for rounding errors in JS
|
|
395
|
+
let newStepValue = shouldComplete ? 0.001 : -0.001;
|
|
396
|
+
/**
|
|
397
|
+
* stepValue can sometimes return a negative
|
|
398
|
+
* value, but you can't have a negative time value
|
|
399
|
+
* for the cubic bezier curve (at least with web animations)
|
|
400
|
+
*/
|
|
401
|
+
const adjustedStepValue = stepValue < 0 ? 0.01 : stepValue;
|
|
402
|
+
/**
|
|
403
|
+
* Animation will be reversed here, so need to
|
|
404
|
+
* reverse the easing curve as well
|
|
405
|
+
*
|
|
406
|
+
* Additionally, we need to account for the time relative
|
|
407
|
+
* to the new easing curve, as `stepValue` is going to be given
|
|
408
|
+
* in terms of a linear curve.
|
|
409
|
+
*/
|
|
410
|
+
newStepValue +=
|
|
411
|
+
getTimeGivenProgression([0, 0], [0.4, 0], [0.6, 1], [1, 1], clamp(0, adjustedStepValue, 0.9999))[0] || 0;
|
|
412
|
+
const playTo = this._isOpen ? !shouldComplete : shouldComplete;
|
|
413
|
+
this.animation
|
|
414
|
+
.easing('cubic-bezier(0.4, 0.0, 0.6, 1)')
|
|
415
|
+
.onFinish(() => this.afterAnimation(shouldOpen), { oneTimeCallback: true })
|
|
416
|
+
.progressEnd(playTo ? 1 : 0, this._isOpen ? 1 - newStepValue : newStepValue, 300);
|
|
417
|
+
}
|
|
418
|
+
beforeAnimation(shouldOpen) {
|
|
419
|
+
assert(!this.isAnimating, '_before() should not be called while animating');
|
|
420
|
+
// this places the menu into the correct location before it animates in
|
|
421
|
+
// this css class doesn't actually kick off any animations
|
|
422
|
+
this.el.classList.add(SHOW_MENU);
|
|
423
|
+
/**
|
|
424
|
+
* We add a tabindex here so that focus trapping
|
|
425
|
+
* still works even if the menu does not have
|
|
426
|
+
* any focusable elements slotted inside. The
|
|
427
|
+
* focus trapping utility will fallback to focusing
|
|
428
|
+
* the menu so focus does not leave when the menu
|
|
429
|
+
* is open.
|
|
430
|
+
*/
|
|
431
|
+
this.el.setAttribute('tabindex', '0');
|
|
432
|
+
if (this.backdropEl) {
|
|
433
|
+
this.backdropEl.classList.add(SHOW_BACKDROP);
|
|
434
|
+
}
|
|
435
|
+
this.blocker.block();
|
|
436
|
+
this.isAnimating = true;
|
|
437
|
+
if (shouldOpen) {
|
|
438
|
+
this.ionWillOpen.emit();
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
this.ionWillClose.emit();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
afterAnimation(isOpen) {
|
|
445
|
+
var _a;
|
|
446
|
+
assert(this.isAnimating, '_before() should be called while animating');
|
|
447
|
+
// keep opening/closing the menu disabled for a touch more yet
|
|
448
|
+
// only add listeners/css if it's enabled and isOpen
|
|
449
|
+
// and only remove listeners/css if it's not open
|
|
450
|
+
// emit opened/closed events
|
|
451
|
+
this._isOpen = isOpen;
|
|
452
|
+
this.isAnimating = false;
|
|
453
|
+
if (!this._isOpen) {
|
|
454
|
+
this.blocker.unblock();
|
|
455
|
+
}
|
|
456
|
+
if (isOpen) {
|
|
457
|
+
// add css class and hide content behind menu from screen readers
|
|
458
|
+
if (this.contentEl) {
|
|
459
|
+
this.contentEl.classList.add(MENU_CONTENT_OPEN);
|
|
460
|
+
/**
|
|
461
|
+
* When the menu is open and overlaying the main
|
|
462
|
+
* content, the main content should not be announced
|
|
463
|
+
* by the screenreader as the menu is the main
|
|
464
|
+
* focus. This is useful with screenreaders that have
|
|
465
|
+
* "read from top" gestures that read the entire
|
|
466
|
+
* page from top to bottom when activated.
|
|
467
|
+
*/
|
|
468
|
+
this.contentEl.setAttribute('aria-hidden', 'true');
|
|
469
|
+
}
|
|
470
|
+
// emit open event
|
|
471
|
+
this.ionDidOpen.emit();
|
|
472
|
+
/**
|
|
473
|
+
* Move focus to the menu to prepare focus trapping, as long as
|
|
474
|
+
* it isn't already focused. Use the host element instead of the
|
|
475
|
+
* first descendant to avoid the scroll position jumping around.
|
|
476
|
+
*/
|
|
477
|
+
const focusedMenu = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest('ion-menu');
|
|
478
|
+
if (focusedMenu !== this.el) {
|
|
479
|
+
this.el.focus();
|
|
480
|
+
}
|
|
481
|
+
// start focus trapping
|
|
482
|
+
document.addEventListener('focus', this.handleFocus, true);
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
// remove css classes and unhide content from screen readers
|
|
486
|
+
this.el.classList.remove(SHOW_MENU);
|
|
487
|
+
/**
|
|
488
|
+
* Remove tabindex from the menu component
|
|
489
|
+
* so that is cannot be tabbed to.
|
|
490
|
+
*/
|
|
491
|
+
this.el.removeAttribute('tabindex');
|
|
492
|
+
if (this.contentEl) {
|
|
493
|
+
this.contentEl.classList.remove(MENU_CONTENT_OPEN);
|
|
494
|
+
/**
|
|
495
|
+
* Remove aria-hidden so screen readers
|
|
496
|
+
* can announce the main content again
|
|
497
|
+
* now that the menu is not the main focus.
|
|
498
|
+
*/
|
|
499
|
+
this.contentEl.removeAttribute('aria-hidden');
|
|
500
|
+
}
|
|
501
|
+
if (this.backdropEl) {
|
|
502
|
+
this.backdropEl.classList.remove(SHOW_BACKDROP);
|
|
503
|
+
}
|
|
504
|
+
if (this.animation) {
|
|
505
|
+
this.animation.stop();
|
|
506
|
+
}
|
|
507
|
+
// emit close event
|
|
508
|
+
this.ionDidClose.emit();
|
|
509
|
+
// undo focus trapping so multiple menus don't collide
|
|
510
|
+
document.removeEventListener('focus', this.handleFocus, true);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
updateState() {
|
|
514
|
+
const isActive = this._isActive();
|
|
515
|
+
if (this.gesture) {
|
|
516
|
+
this.gesture.enable(isActive && this.swipeGesture);
|
|
517
|
+
}
|
|
518
|
+
// Close menu immediately
|
|
519
|
+
if (!isActive && this._isOpen) {
|
|
520
|
+
// close if this menu is open, and should not be enabled
|
|
521
|
+
this.forceClosing();
|
|
522
|
+
}
|
|
523
|
+
if (!this.disabled) {
|
|
524
|
+
menuController._setActiveMenu(this);
|
|
525
|
+
}
|
|
526
|
+
assert(!this.isAnimating, 'can not be animating');
|
|
527
|
+
}
|
|
528
|
+
forceClosing() {
|
|
529
|
+
assert(this._isOpen, 'menu cannot be closed');
|
|
530
|
+
this.isAnimating = true;
|
|
531
|
+
const ani = this.animation.direction('reverse');
|
|
532
|
+
ani.play({ sync: true });
|
|
533
|
+
this.afterAnimation(false);
|
|
534
|
+
}
|
|
535
|
+
render() {
|
|
536
|
+
const { isEndSide, type, disabled, isPaneVisible, inheritedAttributes } = this;
|
|
537
|
+
const mode = getIonMode(this);
|
|
538
|
+
return (h(Host, { role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
|
|
539
|
+
[mode]: true,
|
|
540
|
+
[`menu-type-${type}`]: true,
|
|
541
|
+
'menu-enabled': !disabled,
|
|
542
|
+
'menu-side-end': isEndSide,
|
|
543
|
+
'menu-side-start': !isEndSide,
|
|
544
|
+
'menu-pane-visible': isPaneVisible,
|
|
545
|
+
} }, h("div", { class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, h("slot", null)), h("ion-backdrop", { ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
|
|
546
|
+
}
|
|
547
|
+
get el() { return this; }
|
|
548
|
+
static get watchers() { return {
|
|
549
|
+
"type": ["typeChanged"],
|
|
550
|
+
"disabled": ["disabledChanged"],
|
|
551
|
+
"side": ["sideChanged"],
|
|
552
|
+
"swipeGesture": ["swipeGestureChanged"]
|
|
553
|
+
}; }
|
|
554
|
+
static get style() { return {
|
|
555
|
+
ios: menuIosCss,
|
|
556
|
+
md: menuMdCss
|
|
557
|
+
}; }
|
|
558
|
+
}, [33, "ion-menu", {
|
|
559
|
+
"contentId": [513, "content-id"],
|
|
560
|
+
"menuId": [513, "menu-id"],
|
|
561
|
+
"type": [1025],
|
|
562
|
+
"disabled": [1028],
|
|
563
|
+
"side": [513],
|
|
564
|
+
"swipeGesture": [4, "swipe-gesture"],
|
|
565
|
+
"maxEdgeStart": [2, "max-edge-start"],
|
|
566
|
+
"isPaneVisible": [32],
|
|
567
|
+
"isEndSide": [32],
|
|
568
|
+
"isOpen": [64],
|
|
569
|
+
"isActive": [64],
|
|
570
|
+
"open": [64],
|
|
571
|
+
"close": [64],
|
|
572
|
+
"toggle": [64],
|
|
573
|
+
"setOpen": [64]
|
|
574
|
+
}, [[16, "ionSplitPaneVisible", "onSplitPaneChanged"], [2, "click", "onBackdropClick"], [0, "keydown", "onKeydown"]]]);
|
|
575
|
+
const computeDelta = (deltaX, isOpen, isEndSide) => {
|
|
576
|
+
return Math.max(0, isOpen !== isEndSide ? -deltaX : deltaX);
|
|
577
|
+
};
|
|
578
|
+
const checkEdgeSide = (win, posX, isEndSide, maxEdgeStart) => {
|
|
579
|
+
if (isEndSide) {
|
|
580
|
+
return posX >= win.innerWidth - maxEdgeStart;
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
583
|
+
return posX <= maxEdgeStart;
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
const SHOW_MENU = 'show-menu';
|
|
587
|
+
const SHOW_BACKDROP = 'show-backdrop';
|
|
588
|
+
const MENU_CONTENT_OPEN = 'menu-content-open';
|
|
589
|
+
function defineCustomElement$1() {
|
|
590
|
+
if (typeof customElements === "undefined") {
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const components = ["ion-menu", "ion-backdrop"];
|
|
594
|
+
components.forEach(tagName => { switch (tagName) {
|
|
595
|
+
case "ion-menu":
|
|
596
|
+
if (!customElements.get(tagName)) {
|
|
597
|
+
customElements.define(tagName, Menu);
|
|
598
|
+
}
|
|
599
|
+
break;
|
|
600
|
+
case "ion-backdrop":
|
|
601
|
+
if (!customElements.get(tagName)) {
|
|
602
|
+
defineCustomElement$2();
|
|
603
|
+
}
|
|
604
|
+
break;
|
|
605
|
+
} });
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
const IonMenu = Menu;
|
|
609
|
+
const defineCustomElement = defineCustomElement$1;
|
|
610
|
+
|
|
611
|
+
export { IonMenu, defineCustomElement };
|