@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,223 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, writeTask, readTask, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as getIonMode } from './ionic-global.js';
|
|
3
|
+
import { f as findClosestIonContent, p as printIonContentErrorMsg, g as getScrollElement } from './index5.js';
|
|
4
|
+
|
|
5
|
+
const infiniteScrollCss = "ion-infinite-scroll{display:none;width:100%}.infinite-scroll-enabled{display:block}";
|
|
6
|
+
|
|
7
|
+
const InfiniteScroll = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.ionInfinite = createEvent(this, "ionInfinite", 7);
|
|
12
|
+
this.thrPx = 0;
|
|
13
|
+
this.thrPc = 0;
|
|
14
|
+
this.didFire = false;
|
|
15
|
+
this.isBusy = false;
|
|
16
|
+
this.isLoading = false;
|
|
17
|
+
/**
|
|
18
|
+
* The threshold distance from the bottom
|
|
19
|
+
* of the content to call the `infinite` output event when scrolled.
|
|
20
|
+
* The threshold value can be either a percent, or
|
|
21
|
+
* in pixels. For example, use the value of `10%` for the `infinite`
|
|
22
|
+
* output event to get called when the user has scrolled 10%
|
|
23
|
+
* from the bottom of the page. Use the value `100px` when the
|
|
24
|
+
* scroll is within 100 pixels from the bottom of the page.
|
|
25
|
+
*/
|
|
26
|
+
this.threshold = '15%';
|
|
27
|
+
/**
|
|
28
|
+
* If `true`, the infinite scroll will be hidden and scroll event listeners
|
|
29
|
+
* will be removed.
|
|
30
|
+
*
|
|
31
|
+
* Set this to true to disable the infinite scroll from actively
|
|
32
|
+
* trying to receive new data while scrolling. This is useful
|
|
33
|
+
* when it is known that there is no more data that can be added, and
|
|
34
|
+
* the infinite scroll is no longer needed.
|
|
35
|
+
*/
|
|
36
|
+
this.disabled = false;
|
|
37
|
+
/**
|
|
38
|
+
* The position of the infinite scroll element.
|
|
39
|
+
* The value can be either `top` or `bottom`.
|
|
40
|
+
*/
|
|
41
|
+
this.position = 'bottom';
|
|
42
|
+
this.onScroll = () => {
|
|
43
|
+
const scrollEl = this.scrollEl;
|
|
44
|
+
if (!scrollEl || !this.canStart()) {
|
|
45
|
+
return 1;
|
|
46
|
+
}
|
|
47
|
+
const infiniteHeight = this.el.offsetHeight;
|
|
48
|
+
if (infiniteHeight === 0) {
|
|
49
|
+
// if there is no height of this element then do nothing
|
|
50
|
+
return 2;
|
|
51
|
+
}
|
|
52
|
+
const scrollTop = scrollEl.scrollTop;
|
|
53
|
+
const scrollHeight = scrollEl.scrollHeight;
|
|
54
|
+
const height = scrollEl.offsetHeight;
|
|
55
|
+
const threshold = this.thrPc !== 0 ? height * this.thrPc : this.thrPx;
|
|
56
|
+
const distanceFromInfinite = this.position === 'bottom'
|
|
57
|
+
? scrollHeight - infiniteHeight - scrollTop - threshold - height
|
|
58
|
+
: scrollTop - infiniteHeight - threshold;
|
|
59
|
+
if (distanceFromInfinite < 0) {
|
|
60
|
+
if (!this.didFire) {
|
|
61
|
+
this.isLoading = true;
|
|
62
|
+
this.didFire = true;
|
|
63
|
+
this.ionInfinite.emit();
|
|
64
|
+
return 3;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.didFire = false;
|
|
69
|
+
}
|
|
70
|
+
return 4;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
thresholdChanged() {
|
|
74
|
+
const val = this.threshold;
|
|
75
|
+
if (val.lastIndexOf('%') > -1) {
|
|
76
|
+
this.thrPx = 0;
|
|
77
|
+
this.thrPc = parseFloat(val) / 100;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this.thrPx = parseFloat(val);
|
|
81
|
+
this.thrPc = 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
disabledChanged() {
|
|
85
|
+
const disabled = this.disabled;
|
|
86
|
+
if (disabled) {
|
|
87
|
+
this.isLoading = false;
|
|
88
|
+
this.isBusy = false;
|
|
89
|
+
}
|
|
90
|
+
this.enableScrollEvents(!disabled);
|
|
91
|
+
}
|
|
92
|
+
async connectedCallback() {
|
|
93
|
+
const contentEl = findClosestIonContent(this.el);
|
|
94
|
+
if (!contentEl) {
|
|
95
|
+
printIonContentErrorMsg(this.el);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.scrollEl = await getScrollElement(contentEl);
|
|
99
|
+
this.thresholdChanged();
|
|
100
|
+
this.disabledChanged();
|
|
101
|
+
if (this.position === 'top') {
|
|
102
|
+
writeTask(() => {
|
|
103
|
+
if (this.scrollEl) {
|
|
104
|
+
this.scrollEl.scrollTop = this.scrollEl.scrollHeight - this.scrollEl.clientHeight;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
disconnectedCallback() {
|
|
110
|
+
this.enableScrollEvents(false);
|
|
111
|
+
this.scrollEl = undefined;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Call `complete()` within the `ionInfinite` output event handler when
|
|
115
|
+
* your async operation has completed. For example, the `loading`
|
|
116
|
+
* state is while the app is performing an asynchronous operation,
|
|
117
|
+
* such as receiving more data from an AJAX request to add more items
|
|
118
|
+
* to a data list. Once the data has been received and UI updated, you
|
|
119
|
+
* then call this method to signify that the loading has completed.
|
|
120
|
+
* This method will change the infinite scroll's state from `loading`
|
|
121
|
+
* to `enabled`.
|
|
122
|
+
*/
|
|
123
|
+
async complete() {
|
|
124
|
+
const scrollEl = this.scrollEl;
|
|
125
|
+
if (!this.isLoading || !scrollEl) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this.isLoading = false;
|
|
129
|
+
if (this.position === 'top') {
|
|
130
|
+
/**
|
|
131
|
+
* New content is being added at the top, but the scrollTop position stays the same,
|
|
132
|
+
* which causes a scroll jump visually. This algorithm makes sure to prevent this.
|
|
133
|
+
* (Frame 1)
|
|
134
|
+
* - complete() is called, but the UI hasn't had time to update yet.
|
|
135
|
+
* - Save the current content dimensions.
|
|
136
|
+
* - Wait for the next frame using _dom.read, so the UI will be updated.
|
|
137
|
+
* (Frame 2)
|
|
138
|
+
* - Read the new content dimensions.
|
|
139
|
+
* - Calculate the height difference and the new scroll position.
|
|
140
|
+
* - Delay the scroll position change until other possible dom reads are done using _dom.write to be performant.
|
|
141
|
+
* (Still frame 2, if I'm correct)
|
|
142
|
+
* - Change the scroll position (= visually maintain the scroll position).
|
|
143
|
+
* - Change the state to re-enable the InfiniteScroll.
|
|
144
|
+
* - This should be after changing the scroll position, or it could
|
|
145
|
+
* cause the InfiniteScroll to be triggered again immediately.
|
|
146
|
+
* (Frame 3)
|
|
147
|
+
* Done.
|
|
148
|
+
*/
|
|
149
|
+
this.isBusy = true;
|
|
150
|
+
// ******** DOM READ ****************
|
|
151
|
+
// Save the current content dimensions before the UI updates
|
|
152
|
+
const prev = scrollEl.scrollHeight - scrollEl.scrollTop;
|
|
153
|
+
// ******** DOM READ ****************
|
|
154
|
+
requestAnimationFrame(() => {
|
|
155
|
+
readTask(() => {
|
|
156
|
+
// UI has updated, save the new content dimensions
|
|
157
|
+
const scrollHeight = scrollEl.scrollHeight;
|
|
158
|
+
// New content was added on top, so the scroll position should be changed immediately to prevent it from jumping around
|
|
159
|
+
const newScrollTop = scrollHeight - prev;
|
|
160
|
+
// ******** DOM WRITE ****************
|
|
161
|
+
requestAnimationFrame(() => {
|
|
162
|
+
writeTask(() => {
|
|
163
|
+
scrollEl.scrollTop = newScrollTop;
|
|
164
|
+
this.isBusy = false;
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
canStart() {
|
|
172
|
+
return !this.disabled && !this.isBusy && !!this.scrollEl && !this.isLoading;
|
|
173
|
+
}
|
|
174
|
+
enableScrollEvents(shouldListen) {
|
|
175
|
+
if (this.scrollEl) {
|
|
176
|
+
if (shouldListen) {
|
|
177
|
+
this.scrollEl.addEventListener('scroll', this.onScroll);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
this.scrollEl.removeEventListener('scroll', this.onScroll);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
render() {
|
|
185
|
+
const mode = getIonMode(this);
|
|
186
|
+
const disabled = this.disabled;
|
|
187
|
+
return (h(Host, { class: {
|
|
188
|
+
[mode]: true,
|
|
189
|
+
'infinite-scroll-loading': this.isLoading,
|
|
190
|
+
'infinite-scroll-enabled': !disabled,
|
|
191
|
+
} }));
|
|
192
|
+
}
|
|
193
|
+
get el() { return this; }
|
|
194
|
+
static get watchers() { return {
|
|
195
|
+
"threshold": ["thresholdChanged"],
|
|
196
|
+
"disabled": ["disabledChanged"]
|
|
197
|
+
}; }
|
|
198
|
+
static get style() { return infiniteScrollCss; }
|
|
199
|
+
}, [0, "ion-infinite-scroll", {
|
|
200
|
+
"threshold": [1],
|
|
201
|
+
"disabled": [4],
|
|
202
|
+
"position": [1],
|
|
203
|
+
"isLoading": [32],
|
|
204
|
+
"complete": [64]
|
|
205
|
+
}]);
|
|
206
|
+
function defineCustomElement$1() {
|
|
207
|
+
if (typeof customElements === "undefined") {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const components = ["ion-infinite-scroll"];
|
|
211
|
+
components.forEach(tagName => { switch (tagName) {
|
|
212
|
+
case "ion-infinite-scroll":
|
|
213
|
+
if (!customElements.get(tagName)) {
|
|
214
|
+
customElements.define(tagName, InfiniteScroll);
|
|
215
|
+
}
|
|
216
|
+
break;
|
|
217
|
+
} });
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const IonInfiniteScroll = InfiniteScroll;
|
|
221
|
+
const defineCustomElement = defineCustomElement$1;
|
|
222
|
+
|
|
223
|
+
export { IonInfiniteScroll, defineCustomElement };
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { j as closeCircle, k as closeSharp } from './index2.js';
|
|
3
|
+
import { g as getIonMode } from './ionic-global.js';
|
|
4
|
+
import { f as debounceEvent, i as inheritAriaAttributes, e as inheritAttributes, h as findItemLabel } from './helpers.js';
|
|
5
|
+
import { c as createColorClasses } from './theme.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
7
|
+
|
|
8
|
+
const inputIosCss = ".sc-ion-input-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--background:transparent;--color:initial;display:flex;position:relative;flex:1;align-items:center;width:100%;padding:0 !important;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item.sc-ion-input-ios-h:not(.item-label),ion-item:not(.item-label) .sc-ion-input-ios-h{--padding-start:0}.ion-color.sc-ion-input-ios-h{color:var(--ion-color-base)}.native-input.sc-ion-input-ios{border-radius:var(--border-radius);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-input.sc-ion-input-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-input.sc-ion-input-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-ios:invalid{box-shadow:none}.native-input.sc-ion-input-ios::-ms-clear{display:none}.native-input[disabled].sc-ion-input-ios:not(.cloned-input){opacity:0.4}.cloned-input.sc-ion-input-ios{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-input-ios .cloned-input.sc-ion-input-ios,[dir=rtl].sc-ion-input-ios-h .cloned-input.sc-ion-input-ios,[dir=rtl] .sc-ion-input-ios-h .cloned-input.sc-ion-input-ios{left:unset;right:unset;right:0}.cloned-input.sc-ion-input-ios:disabled{opacity:1}.input-clear-icon.sc-ion-input-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;background-position:center;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;visibility:hidden;appearance:none}.input-clear-icon.sc-ion-input-ios ion-icon.sc-ion-input-ios{color:var(--ion-color-step-600, #666666)}.input-clear-icon.sc-ion-input-ios:focus{opacity:0.5}.has-value.sc-ion-input-ios-h .input-clear-icon.sc-ion-input-ios{visibility:visible}.has-focus.sc-ion-input-ios-h{pointer-events:none}.has-focus.sc-ion-input-ios-h input.sc-ion-input-ios,.has-focus.sc-ion-input-ios-h a.sc-ion-input-ios,.has-focus.sc-ion-input-ios-h button.sc-ion-input-ios{pointer-events:auto}.item-label-floating.item-has-placeholder.sc-ion-input-ios-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-input-ios-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-input-ios-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-input-ios-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-input-ios-h{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:0;font-size:inherit}.item-label-stacked.sc-ion-input-ios-h,.item-label-stacked .sc-ion-input-ios-h,.item-label-floating.sc-ion-input-ios-h,.item-label-floating .sc-ion-input-ios-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0px}.input-clear-icon.sc-ion-input-ios ion-icon.sc-ion-input-ios{width:18px;height:18px}";
|
|
9
|
+
|
|
10
|
+
const inputMdCss = ".sc-ion-input-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--background:transparent;--color:initial;display:flex;position:relative;flex:1;align-items:center;width:100%;padding:0 !important;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item.sc-ion-input-md-h:not(.item-label),ion-item:not(.item-label) .sc-ion-input-md-h{--padding-start:0}.ion-color.sc-ion-input-md-h{color:var(--ion-color-base)}.native-input.sc-ion-input-md{border-radius:var(--border-radius);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-input.sc-ion-input-md{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-input.sc-ion-input-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-md:invalid{box-shadow:none}.native-input.sc-ion-input-md::-ms-clear{display:none}.native-input[disabled].sc-ion-input-md:not(.cloned-input){opacity:0.4}.cloned-input.sc-ion-input-md{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-input-md .cloned-input.sc-ion-input-md,[dir=rtl].sc-ion-input-md-h .cloned-input.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h .cloned-input.sc-ion-input-md{left:unset;right:unset;right:0}.cloned-input.sc-ion-input-md:disabled{opacity:1}.input-clear-icon.sc-ion-input-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;background-position:center;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;visibility:hidden;appearance:none}.input-clear-icon.sc-ion-input-md ion-icon.sc-ion-input-md{color:var(--ion-color-step-600, #666666)}.input-clear-icon.sc-ion-input-md:focus{opacity:0.5}.has-value.sc-ion-input-md-h .input-clear-icon.sc-ion-input-md{visibility:visible}.has-focus.sc-ion-input-md-h{pointer-events:none}.has-focus.sc-ion-input-md-h input.sc-ion-input-md,.has-focus.sc-ion-input-md-h a.sc-ion-input-md,.has-focus.sc-ion-input-md-h button.sc-ion-input-md{pointer-events:auto}.item-label-floating.item-has-placeholder.sc-ion-input-md-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-input-md-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-input-md-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-input-md-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-input-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:8px;font-size:inherit}.item-label-stacked.sc-ion-input-md-h,.item-label-stacked .sc-ion-input-md-h,.item-label-floating.sc-ion-input-md-h,.item-label-floating .sc-ion-input-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}.input-clear-icon.sc-ion-input-md ion-icon.sc-ion-input-md{width:22px;height:22px}";
|
|
11
|
+
|
|
12
|
+
const Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.__registerHost();
|
|
16
|
+
this.ionInput = createEvent(this, "ionInput", 7);
|
|
17
|
+
this.ionChange = createEvent(this, "ionChange", 7);
|
|
18
|
+
this.ionBlur = createEvent(this, "ionBlur", 7);
|
|
19
|
+
this.ionFocus = createEvent(this, "ionFocus", 7);
|
|
20
|
+
this.ionStyle = createEvent(this, "ionStyle", 7);
|
|
21
|
+
this.inputId = `ion-input-${inputIds++}`;
|
|
22
|
+
this.didBlurAfterEdit = false;
|
|
23
|
+
this.inheritedAttributes = {};
|
|
24
|
+
this.isComposing = false;
|
|
25
|
+
/**
|
|
26
|
+
* This is required for a WebKit bug which requires us to
|
|
27
|
+
* blur and focus an input to properly focus the input in
|
|
28
|
+
* an item with delegatesFocus. It will no longer be needed
|
|
29
|
+
* with iOS 14.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
this.fireFocusEvents = true;
|
|
34
|
+
this.hasFocus = false;
|
|
35
|
+
/**
|
|
36
|
+
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
|
37
|
+
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
|
38
|
+
*/
|
|
39
|
+
this.autocapitalize = 'off';
|
|
40
|
+
/**
|
|
41
|
+
* Indicates whether the value of the control can be automatically completed by the browser.
|
|
42
|
+
*/
|
|
43
|
+
this.autocomplete = 'off';
|
|
44
|
+
/**
|
|
45
|
+
* Whether auto correction should be enabled when the user is entering/editing the text value.
|
|
46
|
+
*/
|
|
47
|
+
this.autocorrect = 'off';
|
|
48
|
+
/**
|
|
49
|
+
* This Boolean attribute lets you specify that a form control should have input focus when the page loads.
|
|
50
|
+
*/
|
|
51
|
+
this.autofocus = false;
|
|
52
|
+
/**
|
|
53
|
+
* If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.
|
|
54
|
+
*/
|
|
55
|
+
this.clearInput = false;
|
|
56
|
+
/**
|
|
57
|
+
* Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
|
|
58
|
+
*/
|
|
59
|
+
this.debounce = 0;
|
|
60
|
+
/**
|
|
61
|
+
* If `true`, the user cannot interact with the input.
|
|
62
|
+
*/
|
|
63
|
+
this.disabled = false;
|
|
64
|
+
/**
|
|
65
|
+
* The name of the control, which is submitted with the form data.
|
|
66
|
+
*/
|
|
67
|
+
this.name = this.inputId;
|
|
68
|
+
/**
|
|
69
|
+
* If `true`, the user cannot modify the value.
|
|
70
|
+
*/
|
|
71
|
+
this.readonly = false;
|
|
72
|
+
/**
|
|
73
|
+
* If `true`, the user must fill in a value before submitting a form.
|
|
74
|
+
*/
|
|
75
|
+
this.required = false;
|
|
76
|
+
/**
|
|
77
|
+
* If `true`, the element will have its spelling and grammar checked.
|
|
78
|
+
*/
|
|
79
|
+
this.spellcheck = false;
|
|
80
|
+
/**
|
|
81
|
+
* The type of control to display. The default type is text.
|
|
82
|
+
*/
|
|
83
|
+
this.type = 'text';
|
|
84
|
+
/**
|
|
85
|
+
* The value of the input.
|
|
86
|
+
*/
|
|
87
|
+
this.value = '';
|
|
88
|
+
this.onInput = (ev) => {
|
|
89
|
+
const input = ev.target;
|
|
90
|
+
if (input) {
|
|
91
|
+
this.value = input.value || '';
|
|
92
|
+
}
|
|
93
|
+
this.ionInput.emit(ev);
|
|
94
|
+
};
|
|
95
|
+
this.onBlur = (ev) => {
|
|
96
|
+
this.hasFocus = false;
|
|
97
|
+
this.focusChanged();
|
|
98
|
+
this.emitStyle();
|
|
99
|
+
if (this.fireFocusEvents) {
|
|
100
|
+
this.ionBlur.emit(ev);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
this.onFocus = (ev) => {
|
|
104
|
+
this.hasFocus = true;
|
|
105
|
+
this.focusChanged();
|
|
106
|
+
this.emitStyle();
|
|
107
|
+
if (this.fireFocusEvents) {
|
|
108
|
+
this.ionFocus.emit(ev);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
this.onKeydown = (ev) => {
|
|
112
|
+
if (this.shouldClearOnEdit()) {
|
|
113
|
+
// Did the input value change after it was blurred and edited?
|
|
114
|
+
// Do not clear if user is hitting Enter to submit form
|
|
115
|
+
if (this.didBlurAfterEdit && this.hasValue() && ev.key !== 'Enter') {
|
|
116
|
+
// Clear the input
|
|
117
|
+
this.clearTextInput();
|
|
118
|
+
}
|
|
119
|
+
// Reset the flag
|
|
120
|
+
this.didBlurAfterEdit = false;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
this.onCompositionStart = () => {
|
|
124
|
+
this.isComposing = true;
|
|
125
|
+
};
|
|
126
|
+
this.onCompositionEnd = () => {
|
|
127
|
+
this.isComposing = false;
|
|
128
|
+
};
|
|
129
|
+
this.clearTextInput = (ev) => {
|
|
130
|
+
if (this.clearInput && !this.readonly && !this.disabled && ev) {
|
|
131
|
+
ev.preventDefault();
|
|
132
|
+
ev.stopPropagation();
|
|
133
|
+
// Attempt to focus input again after pressing clear button
|
|
134
|
+
this.setFocus();
|
|
135
|
+
}
|
|
136
|
+
this.value = '';
|
|
137
|
+
/**
|
|
138
|
+
* This is needed for clearOnEdit
|
|
139
|
+
* Otherwise the value will not be cleared
|
|
140
|
+
* if user is inside the input
|
|
141
|
+
*/
|
|
142
|
+
if (this.nativeInput) {
|
|
143
|
+
this.nativeInput.value = '';
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
debounceChanged() {
|
|
148
|
+
this.ionChange = debounceEvent(this.ionChange, this.debounce);
|
|
149
|
+
}
|
|
150
|
+
disabledChanged() {
|
|
151
|
+
this.emitStyle();
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Update the item classes when the placeholder changes
|
|
155
|
+
*/
|
|
156
|
+
placeholderChanged() {
|
|
157
|
+
this.emitStyle();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Update the native input element when the value changes
|
|
161
|
+
*/
|
|
162
|
+
valueChanged() {
|
|
163
|
+
const nativeInput = this.nativeInput;
|
|
164
|
+
const value = this.getValue();
|
|
165
|
+
if (nativeInput && nativeInput.value !== value && !this.isComposing) {
|
|
166
|
+
/**
|
|
167
|
+
* Assigning the native input's value on attribute
|
|
168
|
+
* value change, allows `ionInput` implementations
|
|
169
|
+
* to override the control's value.
|
|
170
|
+
*
|
|
171
|
+
* Used for patterns such as input trimming (removing whitespace),
|
|
172
|
+
* or input masking.
|
|
173
|
+
*/
|
|
174
|
+
nativeInput.value = value;
|
|
175
|
+
}
|
|
176
|
+
this.emitStyle();
|
|
177
|
+
this.ionChange.emit({ value: this.value == null ? this.value : this.value.toString() });
|
|
178
|
+
}
|
|
179
|
+
componentWillLoad() {
|
|
180
|
+
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['tabindex', 'title', 'data-form-type']));
|
|
181
|
+
}
|
|
182
|
+
connectedCallback() {
|
|
183
|
+
this.emitStyle();
|
|
184
|
+
this.debounceChanged();
|
|
185
|
+
if (Build.isBrowser) {
|
|
186
|
+
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
|
187
|
+
detail: this.el,
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
componentDidLoad() {
|
|
192
|
+
const nativeInput = this.nativeInput;
|
|
193
|
+
if (nativeInput) {
|
|
194
|
+
// TODO: FW-729 Update to JSX bindings when Stencil resolves bug with:
|
|
195
|
+
// https://github.com/ionic-team/stencil/issues/3235
|
|
196
|
+
nativeInput.addEventListener('compositionstart', this.onCompositionStart);
|
|
197
|
+
nativeInput.addEventListener('compositionend', this.onCompositionEnd);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
disconnectedCallback() {
|
|
201
|
+
if (Build.isBrowser) {
|
|
202
|
+
document.dispatchEvent(new CustomEvent('ionInputDidUnload', {
|
|
203
|
+
detail: this.el,
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
206
|
+
const nativeInput = this.nativeInput;
|
|
207
|
+
if (nativeInput) {
|
|
208
|
+
nativeInput.removeEventListener('compositionstart', this.onCompositionStart);
|
|
209
|
+
nativeInput.removeEventListener('compositionEnd', this.onCompositionEnd);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global
|
|
214
|
+
* `input.focus()`.
|
|
215
|
+
*/
|
|
216
|
+
async setFocus() {
|
|
217
|
+
if (this.nativeInput) {
|
|
218
|
+
this.nativeInput.focus();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Sets blur on the native `input` in `ion-input`. Use this method instead of the global
|
|
223
|
+
* `input.blur()`.
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
|
+
async setBlur() {
|
|
227
|
+
if (this.nativeInput) {
|
|
228
|
+
this.nativeInput.blur();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Returns the native `<input>` element used under the hood.
|
|
233
|
+
*/
|
|
234
|
+
getInputElement() {
|
|
235
|
+
return Promise.resolve(this.nativeInput);
|
|
236
|
+
}
|
|
237
|
+
shouldClearOnEdit() {
|
|
238
|
+
const { type, clearOnEdit } = this;
|
|
239
|
+
return clearOnEdit === undefined ? type === 'password' : clearOnEdit;
|
|
240
|
+
}
|
|
241
|
+
getValue() {
|
|
242
|
+
return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();
|
|
243
|
+
}
|
|
244
|
+
emitStyle() {
|
|
245
|
+
this.ionStyle.emit({
|
|
246
|
+
interactive: true,
|
|
247
|
+
input: true,
|
|
248
|
+
'has-placeholder': this.placeholder !== undefined,
|
|
249
|
+
'has-value': this.hasValue(),
|
|
250
|
+
'has-focus': this.hasFocus,
|
|
251
|
+
'interactive-disabled': this.disabled,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
focusChanged() {
|
|
255
|
+
// If clearOnEdit is enabled and the input blurred but has a value, set a flag
|
|
256
|
+
if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {
|
|
257
|
+
this.didBlurAfterEdit = true;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
hasValue() {
|
|
261
|
+
return this.getValue().length > 0;
|
|
262
|
+
}
|
|
263
|
+
render() {
|
|
264
|
+
const mode = getIonMode(this);
|
|
265
|
+
const value = this.getValue();
|
|
266
|
+
const labelId = this.inputId + '-lbl';
|
|
267
|
+
const label = findItemLabel(this.el);
|
|
268
|
+
if (label) {
|
|
269
|
+
label.id = labelId;
|
|
270
|
+
}
|
|
271
|
+
return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses(this.color, {
|
|
272
|
+
[mode]: true,
|
|
273
|
+
'has-value': this.hasValue(),
|
|
274
|
+
'has-focus': this.hasFocus,
|
|
275
|
+
}) }, h("input", Object.assign({ class: "native-input", ref: (input) => (this.nativeInput = input), "aria-labelledby": label ? labelId : null, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown }, this.inheritedAttributes)), this.clearInput && !this.readonly && !this.disabled && (h("button", { "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
276
|
+
/**
|
|
277
|
+
* This prevents mobile browsers from
|
|
278
|
+
* blurring the input when the clear
|
|
279
|
+
* button is activated.
|
|
280
|
+
*/
|
|
281
|
+
ev.preventDefault();
|
|
282
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { "aria-hidden": "true", icon: mode === 'ios' ? closeCircle : closeSharp })))));
|
|
283
|
+
}
|
|
284
|
+
get el() { return this; }
|
|
285
|
+
static get watchers() { return {
|
|
286
|
+
"debounce": ["debounceChanged"],
|
|
287
|
+
"disabled": ["disabledChanged"],
|
|
288
|
+
"placeholder": ["placeholderChanged"],
|
|
289
|
+
"value": ["valueChanged"]
|
|
290
|
+
}; }
|
|
291
|
+
static get style() { return {
|
|
292
|
+
ios: inputIosCss,
|
|
293
|
+
md: inputMdCss
|
|
294
|
+
}; }
|
|
295
|
+
}, [34, "ion-input", {
|
|
296
|
+
"fireFocusEvents": [4, "fire-focus-events"],
|
|
297
|
+
"color": [513],
|
|
298
|
+
"accept": [1],
|
|
299
|
+
"autocapitalize": [1],
|
|
300
|
+
"autocomplete": [1],
|
|
301
|
+
"autocorrect": [1],
|
|
302
|
+
"autofocus": [4],
|
|
303
|
+
"clearInput": [4, "clear-input"],
|
|
304
|
+
"clearOnEdit": [4, "clear-on-edit"],
|
|
305
|
+
"debounce": [2],
|
|
306
|
+
"disabled": [4],
|
|
307
|
+
"enterkeyhint": [1],
|
|
308
|
+
"inputmode": [1],
|
|
309
|
+
"max": [8],
|
|
310
|
+
"maxlength": [2],
|
|
311
|
+
"min": [8],
|
|
312
|
+
"minlength": [2],
|
|
313
|
+
"multiple": [4],
|
|
314
|
+
"name": [1],
|
|
315
|
+
"pattern": [1],
|
|
316
|
+
"placeholder": [1],
|
|
317
|
+
"readonly": [4],
|
|
318
|
+
"required": [4],
|
|
319
|
+
"spellcheck": [4],
|
|
320
|
+
"step": [1],
|
|
321
|
+
"size": [2],
|
|
322
|
+
"type": [1],
|
|
323
|
+
"value": [1032],
|
|
324
|
+
"hasFocus": [32],
|
|
325
|
+
"setFocus": [64],
|
|
326
|
+
"setBlur": [64],
|
|
327
|
+
"getInputElement": [64]
|
|
328
|
+
}]);
|
|
329
|
+
let inputIds = 0;
|
|
330
|
+
function defineCustomElement$1() {
|
|
331
|
+
if (typeof customElements === "undefined") {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const components = ["ion-input", "ion-icon"];
|
|
335
|
+
components.forEach(tagName => { switch (tagName) {
|
|
336
|
+
case "ion-input":
|
|
337
|
+
if (!customElements.get(tagName)) {
|
|
338
|
+
customElements.define(tagName, Input);
|
|
339
|
+
}
|
|
340
|
+
break;
|
|
341
|
+
case "ion-icon":
|
|
342
|
+
if (!customElements.get(tagName)) {
|
|
343
|
+
defineCustomElement$2();
|
|
344
|
+
}
|
|
345
|
+
break;
|
|
346
|
+
} });
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const IonInput = Input;
|
|
350
|
+
const defineCustomElement = defineCustomElement$1;
|
|
351
|
+
|
|
352
|
+
export { IonInput, defineCustomElement };
|