@pod-os/elements 0.7.0 → 0.7.1-2196a40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{animation-5840e4df.js → animation-9bea118f.js} +115 -84
- package/dist/cjs/{app-globals-1aedd05c.js → app-globals-6352043e.js} +1 -1
- package/dist/cjs/{cubic-bezier-dcb7bfef.js → cubic-bezier-0b702a31.js} +13 -12
- package/dist/cjs/data-0c9489d7.js +1510 -0
- package/dist/cjs/dir-011f46ea.js +20 -0
- package/dist/cjs/elements.cjs.js +4 -4
- 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} +1694 -1406
- package/dist/cjs/ion-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +12 -11
- package/dist/cjs/ion-backdrop.cjs.entry.js +4 -4
- package/dist/cjs/ion-breadcrumb.cjs.entry.js +101 -0
- package/dist/cjs/ion-breadcrumbs.cjs.entry.js +133 -0
- package/dist/cjs/ion-buttons_3.cjs.entry.js +793 -0
- package/dist/cjs/ion-card-subtitle.cjs.entry.js +4 -4
- package/dist/cjs/{ion-list-header_3.cjs.entry.js → ion-checkbox_4.cjs.entry.js} +124 -23
- package/dist/cjs/ion-chip.cjs.entry.js +5 -10
- package/dist/cjs/ion-datetime-button.cjs.entry.js +346 -0
- package/dist/cjs/ion-datetime.cjs.entry.js +1548 -856
- package/dist/cjs/ion-fab-button.cjs.entry.js +26 -9
- package/dist/cjs/ion-fab-list.cjs.entry.js +4 -4
- package/dist/cjs/ion-fab.cjs.entry.js +15 -13
- package/dist/cjs/ion-img.cjs.entry.js +28 -4
- package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +5 -5
- package/dist/cjs/ion-infinite-scroll.cjs.entry.js +13 -13
- package/dist/cjs/ion-input.cjs.entry.js +57 -23
- package/dist/cjs/ion-item-option.cjs.entry.js +8 -8
- package/dist/cjs/ion-item-options.cjs.entry.js +5 -5
- package/dist/cjs/ion-item-sliding.cjs.entry.js +59 -63
- package/dist/cjs/ion-loading.cjs.entry.js +37 -36
- package/dist/cjs/ion-menu-button.cjs.entry.js +14 -12
- package/dist/cjs/ion-menu-toggle.cjs.entry.js +8 -7
- package/dist/cjs/ion-menu.cjs.entry.js +71 -57
- package/dist/cjs/ion-modal.cjs.entry.js +1384 -154
- package/dist/cjs/ion-nav-link.cjs.entry.js +5 -2
- package/dist/cjs/ion-nav.cjs.entry.js +177 -171
- package/dist/cjs/ion-picker-column.cjs.entry.js +25 -27
- package/dist/cjs/ion-picker.cjs.entry.js +22 -17
- package/dist/cjs/ion-popover.cjs.entry.js +1208 -182
- package/dist/cjs/ion-range.cjs.entry.js +137 -57
- package/dist/cjs/ion-refresher-content.cjs.entry.js +7 -12
- package/dist/cjs/ion-refresher.cjs.entry.js +150 -148
- package/dist/cjs/ion-reorder-group.cjs.entry.js +42 -35
- package/dist/cjs/ion-reorder.cjs.entry.js +5 -4
- package/dist/cjs/ion-route-redirect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route.cjs.entry.js +1 -1
- package/dist/cjs/ion-router-link.cjs.entry.js +5 -5
- package/dist/cjs/ion-router-outlet.cjs.entry.js +24 -20
- package/dist/cjs/ion-router.cjs.entry.js +291 -194
- package/dist/cjs/ion-segment-button.cjs.entry.js +10 -17
- package/dist/cjs/ion-segment.cjs.entry.js +119 -26
- package/dist/cjs/ion-select-option.cjs.entry.js +3 -3
- package/dist/cjs/ion-select.cjs.entry.js +113 -78
- package/dist/cjs/ion-slide.cjs.entry.js +3 -3
- package/dist/cjs/ion-slides.cjs.entry.js +26 -27
- package/dist/cjs/ion-spinner.cjs.entry.js +10 -9
- package/dist/cjs/ion-split-pane.cjs.entry.js +16 -12
- package/dist/cjs/ion-tab-bar.cjs.entry.js +16 -23
- package/dist/cjs/ion-tab-button.cjs.entry.js +6 -6
- package/dist/cjs/ion-tab.cjs.entry.js +4 -4
- package/dist/cjs/ion-tabs.cjs.entry.js +4 -5
- package/dist/cjs/ion-text.cjs.entry.js +3 -3
- package/dist/cjs/ion-textarea.cjs.entry.js +31 -29
- package/dist/cjs/ion-thumbnail.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +49 -59
- package/dist/cjs/ion-toggle.cjs.entry.js +41 -22
- package/dist/cjs/ion-virtual-scroll.cjs.entry.js +39 -31
- package/dist/cjs/{ionic-global-56e10eb5.js → ionic-global-f2d95fd3.js} +112 -93
- package/dist/cjs/{ios.transition-32e4623d.js → ios.transition-0f31ec9a.js} +78 -53
- package/dist/cjs/{keyboard-9e8103e4.js → keyboard-79afcba2.js} +6 -3
- package/dist/cjs/keyboard-controller-a934d106.js +42 -0
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-169c54f0.js → md.transition-d2a33a23.js} +15 -17
- package/dist/cjs/{menu-toggle-util-087678e0.js → menu-toggle-util-0a43ff7c.js} +5 -2
- package/dist/cjs/{overlays-49fe9ba7.js → overlays-65c716aa.js} +187 -71
- package/dist/cjs/spinner-configs-cd0abbeb.js +147 -0
- package/dist/cjs/{status-tap-ada894ff.js → status-tap-beaa3a71.js} +10 -5
- package/dist/cjs/{swipe-back-c4a778df.js → swipe-back-666ea8e6.js} +34 -15
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/cjs/{theme-2259d0f5.js → theme-fc63803b.js} +9 -5
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/custom-elements/index.js +12689 -4785
- package/dist/custom-elements/{tap-click.js → index2.js} +36 -18
- package/dist/custom-elements/input-shims.js +87 -38
- package/dist/custom-elements/ios.transition.js +74 -50
- package/dist/custom-elements/md.transition.js +11 -14
- package/dist/custom-elements/status-tap.js +7 -4
- package/dist/custom-elements/swipe-back.js +31 -13
- package/dist/elements/elements.css +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/p-0268cbd3.entry.js +7 -0
- package/dist/elements/p-0587332d.entry.js +1 -0
- package/dist/elements/{p-cfc0e54d.js → p-0991c811.js} +3 -0
- package/dist/elements/p-0a69a563.entry.js +1 -0
- package/dist/elements/p-0b95be17.entry.js +1 -0
- package/dist/elements/p-0d284fe0.entry.js +1 -0
- package/dist/elements/p-0fd77b33.entry.js +1 -0
- package/dist/elements/p-120dec2b.entry.js +1 -0
- package/dist/elements/p-12880671.entry.js +1 -0
- package/dist/elements/p-14ccd586.entry.js +1 -0
- package/dist/elements/{p-83d45051.entry.js → p-14df6ac0.entry.js} +1 -1
- package/dist/elements/{p-e860be6a.entry.js → p-17079f06.entry.js} +1 -1
- package/dist/elements/p-19e4a688.js +4 -0
- package/dist/elements/p-1afc4eb4.js +4 -0
- package/dist/elements/p-1beaf6bf.js +4 -0
- package/dist/elements/p-1d1c6a6f.entry.js +1 -0
- package/dist/elements/{p-31d30e42.entry.js → p-1d98f84b.entry.js} +1 -1
- package/dist/elements/p-278ca4c9.js +4 -0
- package/dist/elements/p-27f5629c.entry.js +1 -0
- package/dist/elements/p-29c0f03f.js +4 -0
- package/dist/elements/p-2da59aca.js +4 -0
- package/dist/elements/p-3152143f.js +4 -0
- package/dist/elements/p-343ff720.entry.js +7 -0
- package/dist/elements/p-36d4c9a8.js +4 -0
- package/dist/elements/p-3a30dfb2.entry.js +1 -0
- package/dist/elements/p-3c013bf1.entry.js +1 -0
- package/dist/elements/{p-74ba1e42.entry.js → p-3c318da5.entry.js} +1 -1
- package/dist/elements/p-3cee3222.entry.js +1 -0
- package/dist/elements/p-480b3c4f.entry.js +1 -0
- package/dist/elements/p-4e9d8f18.entry.js +1 -0
- package/dist/elements/p-53e23176.js +2 -0
- package/dist/elements/p-548524f3.js +4 -0
- package/dist/elements/p-5739fa41.entry.js +1 -0
- package/dist/elements/p-5808c505.js +1 -0
- package/dist/elements/p-58a8cc2a.js +4 -0
- package/dist/elements/p-6035415e.entry.js +1 -0
- package/dist/elements/p-60eeae90.js +4 -0
- package/dist/elements/p-610b03ff.entry.js +4 -0
- package/dist/elements/p-67777478.entry.js +1 -0
- package/dist/elements/p-6ab826e1.entry.js +1 -0
- package/dist/elements/p-6f5a2827.entry.js +1 -0
- package/dist/elements/p-779676c5.entry.js +1 -0
- package/dist/elements/p-7916ecc5.entry.js +1 -0
- package/dist/elements/p-79f06b80.entry.js +1 -0
- package/dist/elements/p-7b5991c1.entry.js +1 -0
- package/dist/elements/p-7d0def79.js +5 -0
- package/dist/elements/p-8112afea.js +4 -0
- package/dist/elements/p-83678d7d.entry.js +4 -0
- package/dist/elements/p-87e45c94.entry.js +1 -0
- package/dist/elements/p-8da6a31e.entry.js +1 -0
- package/dist/elements/p-8f80768f.entry.js +4 -0
- package/dist/elements/p-8fe0433b.js +4 -0
- package/dist/elements/{p-4cb27b48.entry.js → p-9147d82b.entry.js} +1 -1
- package/dist/elements/p-97abb434.entry.js +1 -0
- package/dist/elements/p-98497a4b.entry.js +1 -0
- package/dist/elements/p-9c719139.js +4 -0
- package/dist/elements/p-9ca37332.js +4 -0
- package/dist/elements/{p-37de7110.js → p-9d48def2.js} +3 -0
- package/dist/elements/p-a79a6ad9.entry.js +79 -0
- package/dist/elements/p-a805f2f9.entry.js +1 -0
- package/dist/elements/p-a86a5bfa.entry.js +1 -0
- package/dist/elements/{p-9c1dbe52.entry.js → p-ac34eab7.entry.js} +1 -1
- package/dist/elements/p-ad366eab.entry.js +4 -0
- package/dist/elements/p-aef3a931.js +7 -0
- package/dist/elements/p-b0537eb3.entry.js +1 -0
- package/dist/elements/p-b337f3b8.js +4 -0
- package/dist/elements/p-b34bf73f.entry.js +7 -0
- package/dist/elements/p-b41e66f0.entry.js +1 -0
- package/dist/elements/p-b47e7091.entry.js +1 -0
- package/dist/elements/p-b840320e.js +4 -0
- package/dist/elements/p-b934ac5d.entry.js +1 -0
- package/dist/elements/p-b98314e0.entry.js +4 -0
- package/dist/elements/p-bd12806f.entry.js +1 -0
- package/dist/elements/p-c16d38d5.js +4 -0
- package/dist/elements/p-c84205a3.js +4 -0
- package/dist/elements/{p-06675ac7.entry.js → p-cbe318f8.entry.js} +1 -1
- package/dist/elements/p-cfed7395.js +4 -0
- package/dist/elements/p-d22a1dc7.entry.js +7 -0
- package/dist/elements/p-d3e75c94.entry.js +1 -0
- package/dist/elements/p-d8f6d3ce.entry.js +14 -0
- package/dist/elements/p-d9880221.entry.js +4 -0
- package/dist/elements/p-da5db8fb.entry.js +1 -0
- package/dist/elements/{p-91fe653f.js → p-dcc6b03c.js} +3 -0
- package/dist/elements/{p-305e246c.entry.js → p-dd846020.entry.js} +1 -1
- package/dist/elements/p-df240b2a.entry.js +4 -0
- package/dist/elements/p-dffd8689.js +4 -0
- package/dist/elements/p-e495a095.js +4 -0
- package/dist/elements/p-e5fc7d42.entry.js +1 -0
- package/dist/elements/{p-aaa8393e.entry.js → p-eb137e9d.entry.js} +1 -1
- package/dist/elements/p-f4e54a17.js +7 -0
- package/dist/elements/p-f67d0717.entry.js +1 -0
- package/dist/elements/p-f7f4c640.js +1 -0
- package/dist/elements/p-f851b91a.js +4 -0
- package/dist/elements/p-fb27ee76.entry.js +1 -0
- package/dist/elements/p-fbddca35.entry.js +1 -0
- package/dist/elements/p-fc1df8e0.entry.js +7 -0
- package/dist/elements/p-fdac5f3a.js +4 -0
- package/dist/esm/{animation-fe6ed422.js → animation-801a007a.js} +115 -84
- package/dist/esm/{app-globals-27d92837.js → app-globals-05a3abfb.js} +1 -1
- package/dist/esm/{cubic-bezier-108b8579.js → cubic-bezier-538b6253.js} +13 -12
- package/dist/esm/data-62c81c24.js +1463 -0
- package/dist/esm/dir-defb16c6.js +18 -0
- package/dist/esm/elements.js +4 -4
- package/dist/esm/focus-visible-78d55799.js +74 -0
- package/dist/esm/framework-delegate-7e2b767b.js +115 -0
- package/dist/esm/{gesture-controller-8f35af24.js → gesture-controller-c466ff14.js} +6 -2
- package/dist/esm/{haptic-c424e670.js → haptic-e7d5ef4d.js} +38 -9
- package/dist/esm/{hardware-back-button-bb4c578a.js → hardware-back-button-242191a7.js} +11 -8
- package/dist/esm/{helpers-44e3bd9f.js → helpers-aeff219b.js} +113 -16
- package/dist/esm/index-0dbaca1a.js +28 -0
- package/dist/esm/index-1f3d8582.js +34 -0
- package/dist/esm/{index-97199683.js → index-2be9a18b.js} +34 -28
- package/dist/esm/{index-8d682224.js → index-51e4a829.js} +12 -8
- package/dist/esm/{index-8a463a85.js → index-6048aed6.js} +35 -24
- package/dist/esm/index-65ecd543.js +25 -0
- package/dist/esm/{tap-click-a7e55ef5.js → index-b212db1c.js} +37 -19
- package/dist/esm/{index-e4deec27.js → index-cb938ffb.js} +7 -1
- package/dist/esm/{index-3a1bd803.js → index-d39eb62b.js} +35 -20
- package/dist/esm/index-ebf7f059.js +128 -0
- package/dist/esm/{input-shims-3b48722f.js → input-shims-8a389148.js} +89 -38
- package/dist/esm/ion-accordion-group.entry.js +201 -0
- package/dist/esm/ion-accordion.entry.js +332 -0
- package/dist/esm/ion-action-sheet_3.entry.js +859 -0
- package/dist/esm/{ion-app_45.entry.js → ion-app_46.entry.js} +1694 -1407
- package/dist/esm/ion-avatar.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +12 -11
- package/dist/esm/ion-backdrop.entry.js +4 -4
- package/dist/esm/ion-breadcrumb.entry.js +97 -0
- package/dist/esm/ion-breadcrumbs.entry.js +129 -0
- package/dist/esm/ion-buttons_3.entry.js +787 -0
- package/dist/esm/ion-card-subtitle.entry.js +4 -4
- package/dist/esm/{ion-list-header_3.entry.js → ion-checkbox_4.entry.js} +124 -24
- package/dist/esm/ion-chip.entry.js +5 -10
- package/dist/esm/ion-datetime-button.entry.js +342 -0
- package/dist/esm/ion-datetime.entry.js +1548 -856
- package/dist/esm/ion-fab-button.entry.js +26 -9
- package/dist/esm/ion-fab-list.entry.js +4 -4
- package/dist/esm/ion-fab.entry.js +15 -13
- package/dist/esm/ion-img.entry.js +28 -4
- package/dist/esm/ion-infinite-scroll-content.entry.js +5 -5
- package/dist/esm/ion-infinite-scroll.entry.js +13 -13
- package/dist/esm/ion-input.entry.js +57 -23
- package/dist/esm/ion-item-option.entry.js +8 -8
- package/dist/esm/ion-item-options.entry.js +5 -5
- package/dist/esm/ion-item-sliding.entry.js +59 -63
- package/dist/esm/ion-loading.entry.js +37 -36
- package/dist/esm/ion-menu-button.entry.js +14 -12
- package/dist/esm/ion-menu-toggle.entry.js +8 -7
- package/dist/esm/ion-menu.entry.js +71 -57
- package/dist/esm/ion-modal.entry.js +1375 -145
- package/dist/esm/ion-nav-link.entry.js +5 -2
- package/dist/esm/ion-nav.entry.js +177 -171
- package/dist/esm/ion-picker-column.entry.js +25 -27
- package/dist/esm/ion-picker.entry.js +22 -17
- package/dist/esm/ion-popover.entry.js +1208 -182
- package/dist/esm/ion-range.entry.js +137 -57
- package/dist/esm/ion-refresher-content.entry.js +7 -12
- package/dist/esm/ion-refresher.entry.js +149 -147
- package/dist/esm/ion-reorder-group.entry.js +42 -35
- package/dist/esm/ion-reorder.entry.js +5 -4
- package/dist/esm/ion-route-redirect.entry.js +1 -1
- package/dist/esm/ion-route.entry.js +1 -1
- package/dist/esm/ion-router-link.entry.js +5 -5
- package/dist/esm/ion-router-outlet.entry.js +24 -20
- package/dist/esm/ion-router.entry.js +291 -194
- package/dist/esm/ion-segment-button.entry.js +10 -17
- package/dist/esm/ion-segment.entry.js +119 -26
- package/dist/esm/ion-select-option.entry.js +3 -3
- package/dist/esm/ion-select.entry.js +113 -78
- package/dist/esm/ion-slide.entry.js +3 -3
- package/dist/esm/ion-slides.entry.js +26 -27
- package/dist/esm/ion-spinner.entry.js +10 -9
- package/dist/esm/ion-split-pane.entry.js +16 -12
- package/dist/esm/ion-tab-bar.entry.js +16 -23
- package/dist/esm/ion-tab-button.entry.js +6 -6
- package/dist/esm/ion-tab.entry.js +4 -4
- package/dist/esm/ion-tabs.entry.js +4 -5
- package/dist/esm/ion-text.entry.js +3 -3
- package/dist/esm/ion-textarea.entry.js +31 -29
- package/dist/esm/ion-thumbnail.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +49 -59
- package/dist/esm/ion-toggle.entry.js +41 -22
- package/dist/esm/ion-virtual-scroll.entry.js +39 -31
- package/dist/esm/{ionic-global-2e28f7c7.js → ionic-global-6cd57191.js} +112 -93
- package/dist/esm/{ios.transition-a783e3cd.js → ios.transition-bbd952f2.js} +78 -53
- package/dist/{custom-elements/keyboard.js → esm/keyboard-413afe04.js} +6 -3
- package/dist/esm/keyboard-controller-33693bc2.js +40 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-5a4a8c82.js → md.transition-5170a6d3.js} +15 -17
- package/dist/esm/{menu-toggle-util-562dfc9c.js → menu-toggle-util-82bf888a.js} +5 -2
- package/dist/esm/{overlays-fc9a0625.js → overlays-0c7f05e1.js} +186 -71
- package/dist/esm/spinner-configs-cbcd1f62.js +145 -0
- package/dist/esm/{status-tap-69e62ad6.js → status-tap-ad757b8a.js} +10 -5
- package/dist/esm/swipe-back-7ef22876.js +69 -0
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/esm/{theme-d21826a7.js → theme-7cf2cab0.js} +9 -5
- package/package.json +4 -5
- package/LICENSE +0 -21
- package/dist/cjs/button-active-c14dab31.js +0 -66
- package/dist/cjs/focus-visible-16c98640.js +0 -45
- package/dist/cjs/framework-delegate-c45292a3.js +0 -37
- package/dist/cjs/ion-action-sheet.cjs.entry.js +0 -265
- package/dist/cjs/ion-alert.cjs.entry.js +0 -456
- package/dist/cjs/ion-buttons.cjs.entry.js +0 -42
- package/dist/cjs/ion-checkbox.cjs.entry.js +0 -117
- package/dist/cjs/ion-note.cjs.entry.js +0 -29
- package/dist/cjs/ion-select-popover.cjs.entry.js +0 -35
- package/dist/cjs/spinner-configs-fb16b986.js +0 -112
- package/dist/custom-elements/focus-visible.js +0 -43
- package/dist/elements/p-03bda390.js +0 -1
- package/dist/elements/p-0be044f1.entry.js +0 -1
- package/dist/elements/p-119c7c6c.entry.js +0 -1
- package/dist/elements/p-14c7c3ea.entry.js +0 -1
- package/dist/elements/p-1d4a2c61.js +0 -1
- package/dist/elements/p-1d894ac4.entry.js +0 -1
- package/dist/elements/p-1dafa1ce.entry.js +0 -1
- package/dist/elements/p-23b89ccb.entry.js +0 -1
- package/dist/elements/p-2c03b9ab.entry.js +0 -1
- package/dist/elements/p-346985f2.js +0 -1
- package/dist/elements/p-360f1c62.entry.js +0 -1
- package/dist/elements/p-373e1f25.entry.js +0 -1
- package/dist/elements/p-40547acb.entry.js +0 -1
- package/dist/elements/p-40b68014.entry.js +0 -1
- package/dist/elements/p-42e4f702.entry.js +0 -1
- package/dist/elements/p-489807e5.js +0 -1
- package/dist/elements/p-4ad72d54.entry.js +0 -1
- package/dist/elements/p-4cca7b5e.entry.js +0 -1
- package/dist/elements/p-4f24d306.js +0 -1
- package/dist/elements/p-519d6a53.entry.js +0 -1
- package/dist/elements/p-536e8e52.entry.js +0 -1
- package/dist/elements/p-599bb53f.entry.js +0 -1
- package/dist/elements/p-5eb7a546.js +0 -1
- package/dist/elements/p-60df2bed.entry.js +0 -1
- package/dist/elements/p-65133e33.js +0 -1
- package/dist/elements/p-6693fce8.js +0 -1
- package/dist/elements/p-689bdcc1.entry.js +0 -1
- package/dist/elements/p-70713b3d.entry.js +0 -1
- package/dist/elements/p-707d5d76.js +0 -1
- package/dist/elements/p-7212b7f2.js +0 -1
- package/dist/elements/p-73992898.entry.js +0 -1
- package/dist/elements/p-792c1e0f.entry.js +0 -1
- package/dist/elements/p-7e5300af.js +0 -2
- package/dist/elements/p-8068987c.entry.js +0 -1
- package/dist/elements/p-83accf46.entry.js +0 -1
- package/dist/elements/p-86635d06.entry.js +0 -1
- package/dist/elements/p-874c2b44.js +0 -1
- package/dist/elements/p-89c12ce8.entry.js +0 -1
- package/dist/elements/p-8bcba3f7.entry.js +0 -1
- package/dist/elements/p-8c759f51.entry.js +0 -1
- package/dist/elements/p-8f945e6b.entry.js +0 -1
- package/dist/elements/p-9300ab6a.js +0 -1
- package/dist/elements/p-93cacd51.entry.js +0 -1
- package/dist/elements/p-9408d0b4.entry.js +0 -1
- package/dist/elements/p-98c79eda.js +0 -1
- package/dist/elements/p-99f8abed.js +0 -1
- package/dist/elements/p-9ca7e079.js +0 -1
- package/dist/elements/p-a4648b74.entry.js +0 -1
- package/dist/elements/p-aab0f63c.js +0 -1
- package/dist/elements/p-ad4e2295.entry.js +0 -1
- package/dist/elements/p-afb8f7d5.entry.js +0 -1
- package/dist/elements/p-b055ec44.js +0 -1
- package/dist/elements/p-b078d63b.entry.js +0 -1
- package/dist/elements/p-b3460325.entry.js +0 -1
- package/dist/elements/p-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/button-active-fd9d6d91.js +0 -64
- package/dist/esm/focus-visible-edb28f19.js +0 -43
- package/dist/esm/framework-delegate-9cd8048f.js +0 -34
- package/dist/esm/ion-action-sheet.entry.js +0 -261
- package/dist/esm/ion-alert.entry.js +0 -452
- package/dist/esm/ion-buttons.entry.js +0 -38
- package/dist/esm/ion-checkbox.entry.js +0 -113
- package/dist/esm/ion-note.entry.js +0 -25
- package/dist/esm/ion-select-popover.entry.js +0 -31
- package/dist/esm/keyboard-e6abcb80.js +0 -125
- package/dist/esm/spinner-configs-aaf2a1a9.js +0 -110
- package/dist/esm/swipe-back-d84cfc8a.js +0 -50
- package/readme.md +0 -55
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const ionicGlobal = require('./ionic-global-
|
|
7
|
-
const theme = require('./theme-
|
|
5
|
+
const index = require('./index-eaa0d16e.js');
|
|
6
|
+
const ionicGlobal = require('./ionic-global-f2d95fd3.js');
|
|
7
|
+
const theme = require('./theme-fc63803b.js');
|
|
8
8
|
|
|
9
9
|
const cardSubtitleIosCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-600, #666666);margin-left:0;margin-right:0;margin-top:0;margin-bottom:4px;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-size:12px;font-weight:700;letter-spacing:0.4px;text-transform:uppercase}";
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ const CardSubtitle = class {
|
|
|
18
18
|
const mode = ionicGlobal.getIonMode(this);
|
|
19
19
|
return (index.h(index.Host, { role: "heading", "aria-level": "3", class: theme.createColorClasses(this.color, {
|
|
20
20
|
'ion-inherit-color': true,
|
|
21
|
-
[mode]: true
|
|
21
|
+
[mode]: true,
|
|
22
22
|
}) }, index.h("slot", null)));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
@@ -2,10 +2,113 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const ionicGlobal = require('./ionic-global-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
5
|
+
const index = require('./index-eaa0d16e.js');
|
|
6
|
+
const ionicGlobal = require('./ionic-global-f2d95fd3.js');
|
|
7
|
+
const helpers = require('./helpers-cb08f5ae.js');
|
|
8
|
+
const theme = require('./theme-fc63803b.js');
|
|
9
|
+
|
|
10
|
+
const checkboxIosCss = ":host{--background-checked:var(--ion-color-primary, #3880ff);--border-color-checked:var(--ion-color-primary, #3880ff);--checkmark-color:var(--ion-color-primary-contrast, #fff);--checkmark-width:1;--transition:none;display:inline-block;position:relative;user-select:none;z-index:2}:host(.ion-color){--background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.checkbox-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:1px;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--background:var(--ion-item-background, var(--ion-background-color, #fff));--size:26px;width:var(--size);height:var(--size)}:host(.checkbox-disabled){opacity:0.3}:host(.in-item){margin-left:0;margin-right:8px;margin-top:10px;margin-bottom:9px;display:block;position:static}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}:host(.in-item[slot=start]){margin-left:2px;margin-right:20px;margin-top:8px;margin-bottom:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:20px;margin-inline-end:20px}}";
|
|
11
|
+
|
|
12
|
+
const checkboxMdCss = ":host{--background-checked:var(--ion-color-primary, #3880ff);--border-color-checked:var(--ion-color-primary, #3880ff);--checkmark-color:var(--ion-color-primary-contrast, #fff);--checkmark-width:1;--transition:none;display:inline-block;position:relative;user-select:none;z-index:2}:host(.ion-color){--background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;appearance:none;outline:none;display:flex;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.checkbox-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.51);--checkmark-width:3;--background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px;width:var(--size);height:var(--size)}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;transition:stroke-dashoffset 90ms linear 90ms}:host(.checkbox-disabled){opacity:0.3}:host(.in-item){margin-left:0;margin-right:0;margin-top:18px;margin-bottom:18px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:18px;margin-bottom:18px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}";
|
|
13
|
+
|
|
14
|
+
const Checkbox = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
index.registerInstance(this, hostRef);
|
|
17
|
+
this.ionChange = index.createEvent(this, "ionChange", 7);
|
|
18
|
+
this.ionFocus = index.createEvent(this, "ionFocus", 7);
|
|
19
|
+
this.ionBlur = index.createEvent(this, "ionBlur", 7);
|
|
20
|
+
this.ionStyle = index.createEvent(this, "ionStyle", 7);
|
|
21
|
+
this.inputId = `ion-cb-${checkboxIds++}`;
|
|
22
|
+
/**
|
|
23
|
+
* The name of the control, which is submitted with the form data.
|
|
24
|
+
*/
|
|
25
|
+
this.name = this.inputId;
|
|
26
|
+
/**
|
|
27
|
+
* If `true`, the checkbox is selected.
|
|
28
|
+
*/
|
|
29
|
+
this.checked = false;
|
|
30
|
+
/**
|
|
31
|
+
* If `true`, the checkbox will visually appear as indeterminate.
|
|
32
|
+
*/
|
|
33
|
+
this.indeterminate = false;
|
|
34
|
+
/**
|
|
35
|
+
* If `true`, the user cannot interact with the checkbox.
|
|
36
|
+
*/
|
|
37
|
+
this.disabled = false;
|
|
38
|
+
/**
|
|
39
|
+
* The value of the checkbox does not mean if it's checked or not, use the `checked`
|
|
40
|
+
* property for that.
|
|
41
|
+
*
|
|
42
|
+
* The value of a checkbox is analogous to the value of an `<input type="checkbox">`,
|
|
43
|
+
* it's only used when the checkbox participates in a native `<form>`.
|
|
44
|
+
*/
|
|
45
|
+
this.value = 'on';
|
|
46
|
+
this.onClick = (ev) => {
|
|
47
|
+
ev.preventDefault();
|
|
48
|
+
this.setFocus();
|
|
49
|
+
this.checked = !this.checked;
|
|
50
|
+
this.indeterminate = false;
|
|
51
|
+
};
|
|
52
|
+
this.onFocus = () => {
|
|
53
|
+
this.ionFocus.emit();
|
|
54
|
+
};
|
|
55
|
+
this.onBlur = () => {
|
|
56
|
+
this.ionBlur.emit();
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
componentWillLoad() {
|
|
60
|
+
this.emitStyle();
|
|
61
|
+
}
|
|
62
|
+
checkedChanged(isChecked) {
|
|
63
|
+
this.ionChange.emit({
|
|
64
|
+
checked: isChecked,
|
|
65
|
+
value: this.value,
|
|
66
|
+
});
|
|
67
|
+
this.emitStyle();
|
|
68
|
+
}
|
|
69
|
+
disabledChanged() {
|
|
70
|
+
this.emitStyle();
|
|
71
|
+
}
|
|
72
|
+
emitStyle() {
|
|
73
|
+
this.ionStyle.emit({
|
|
74
|
+
'checkbox-checked': this.checked,
|
|
75
|
+
'interactive-disabled': this.disabled,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
setFocus() {
|
|
79
|
+
if (this.focusEl) {
|
|
80
|
+
this.focusEl.focus();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
render() {
|
|
84
|
+
const { color, checked, disabled, el, indeterminate, inputId, name, value } = this;
|
|
85
|
+
const mode = ionicGlobal.getIonMode(this);
|
|
86
|
+
const { label, labelId, labelText } = helpers.getAriaLabel(el, inputId);
|
|
87
|
+
helpers.renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
88
|
+
let path = indeterminate ? (index.h("path", { d: "M6 12L18 12", part: "mark" })) : (index.h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
89
|
+
if (mode === 'md') {
|
|
90
|
+
path = indeterminate ? (index.h("path", { d: "M2 12H22", part: "mark" })) : (index.h("path", { d: "M1.73,12.91 8.1,19.28 22.79,4.59", part: "mark" }));
|
|
91
|
+
}
|
|
92
|
+
return (index.h(index.Host, { onClick: this.onClick, "aria-labelledby": label ? labelId : null, "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, role: "checkbox", class: theme.createColorClasses(color, {
|
|
93
|
+
[mode]: true,
|
|
94
|
+
'in-item': theme.hostContext('ion-item', el),
|
|
95
|
+
'checkbox-checked': checked,
|
|
96
|
+
'checkbox-disabled': disabled,
|
|
97
|
+
'checkbox-indeterminate': indeterminate,
|
|
98
|
+
interactive: true,
|
|
99
|
+
}) }, index.h("svg", { class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path), index.h("label", { htmlFor: inputId }, labelText), index.h("input", { type: "checkbox", "aria-checked": `${checked}`, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) })));
|
|
100
|
+
}
|
|
101
|
+
get el() { return index.getElement(this); }
|
|
102
|
+
static get watchers() { return {
|
|
103
|
+
"checked": ["checkedChanged"],
|
|
104
|
+
"disabled": ["disabledChanged"]
|
|
105
|
+
}; }
|
|
106
|
+
};
|
|
107
|
+
let checkboxIds = 0;
|
|
108
|
+
Checkbox.style = {
|
|
109
|
+
ios: checkboxIosCss,
|
|
110
|
+
md: checkboxMdCss
|
|
111
|
+
};
|
|
9
112
|
|
|
10
113
|
const listHeaderIosCss = ":host{--border-style:solid;--border-width:0;--inner-border-width:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:flex;align-items:center;justify-content:space-between;width:100%;min-height:40px;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);color:var(--color);overflow:hidden}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.list-header-inner{display:flex;position:relative;flex:1;flex-direction:inherit;align-items:inherit;align-self:stretch;min-height:inherit;border-width:var(--inner-border-width);border-style:var(--border-style);border-color:var(--border-color);overflow:inherit;box-sizing:border-box}::slotted(ion-label){flex:1 1 auto}:host(.list-header-lines-inset),:host(.list-header-lines-none){--border-width:0}:host(.list-header-lines-full),:host(.list-header-lines-none){--inner-border-width:0}:host{--background:transparent;--color:var(--ion-color-step-850, #262626);--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));padding-left:calc(var(--ion-safe-area-left, 0px) + 20px);position:relative;align-items:flex-end;font-size:22px;font-weight:700;letter-spacing:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;-webkit-padding-start:calc(var(--ion-safe-area-left, 0px) + 20px);padding-inline-start:calc(var(--ion-safe-area-left, 0px) + 20px)}}::slotted(ion-button),::slotted(ion-label){margin-top:29px;margin-bottom:6px}::slotted(ion-button){margin-left:3px;margin-right:3px;height:1.4em}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-button){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:3px;margin-inline-end:3px}}:host(.list-header-lines-full){--border-width:0 0 0.55px 0}:host(.list-header-lines-inset){--inner-border-width:0 0 0.55px 0}";
|
|
11
114
|
|
|
@@ -63,6 +166,9 @@ const Radio = class {
|
|
|
63
166
|
this.checked = this.radioGroup.value === this.value;
|
|
64
167
|
}
|
|
65
168
|
};
|
|
169
|
+
this.onClick = () => {
|
|
170
|
+
this.checked = this.nativeInput.checked;
|
|
171
|
+
};
|
|
66
172
|
this.onFocus = () => {
|
|
67
173
|
this.ionFocus.emit();
|
|
68
174
|
};
|
|
@@ -84,7 +190,7 @@ const Radio = class {
|
|
|
84
190
|
if (this.value === undefined) {
|
|
85
191
|
this.value = this.inputId;
|
|
86
192
|
}
|
|
87
|
-
const radioGroup = this.radioGroup = this.el.closest('ion-radio-group');
|
|
193
|
+
const radioGroup = (this.radioGroup = this.el.closest('ion-radio-group'));
|
|
88
194
|
if (radioGroup) {
|
|
89
195
|
this.updateState();
|
|
90
196
|
helpers.addEventListener(radioGroup, 'ionChange', this.updateState);
|
|
@@ -110,13 +216,13 @@ const Radio = class {
|
|
|
110
216
|
const { inputId, disabled, checked, color, el, buttonTabindex } = this;
|
|
111
217
|
const mode = ionicGlobal.getIonMode(this);
|
|
112
218
|
const { label, labelId, labelText } = helpers.getAriaLabel(el, inputId);
|
|
113
|
-
return (index.h(index.Host, { "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, "aria-labelledby": label ? labelId : null, role: "radio", tabindex: buttonTabindex, onFocus: this.onFocus, onBlur: this.onBlur, class: theme.createColorClasses(color, {
|
|
219
|
+
return (index.h(index.Host, { "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, "aria-labelledby": label ? labelId : null, role: "radio", tabindex: buttonTabindex, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: theme.createColorClasses(color, {
|
|
114
220
|
[mode]: true,
|
|
115
221
|
'in-item': theme.hostContext('ion-item', el),
|
|
116
|
-
|
|
222
|
+
interactive: true,
|
|
117
223
|
'radio-checked': checked,
|
|
118
224
|
'radio-disabled': disabled,
|
|
119
|
-
}) }, index.h("div", { class: "radio-icon", part: "container" }, index.h("div", { class: "radio-inner", part: "mark" }), index.h("div", { class: "radio-ripple" })), index.h("label", { htmlFor: inputId }, labelText), index.h("input", { type: "radio", checked: checked, disabled: disabled, tabindex: "-1", id: inputId })));
|
|
225
|
+
}) }, index.h("div", { class: "radio-icon", part: "container" }, index.h("div", { class: "radio-inner", part: "mark" }), index.h("div", { class: "radio-ripple" })), index.h("label", { htmlFor: inputId }, labelText), index.h("input", { type: "radio", checked: checked, disabled: disabled, tabindex: "-1", id: inputId, ref: (nativeEl) => (this.nativeInput = nativeEl) })));
|
|
120
226
|
}
|
|
121
227
|
get el() { return index.getElement(this); }
|
|
122
228
|
static get watchers() { return {
|
|
@@ -148,8 +254,8 @@ const RadioGroup = class {
|
|
|
148
254
|
this.setRadioTabindex = (value) => {
|
|
149
255
|
const radios = this.getRadios();
|
|
150
256
|
// Get the first radio that is not disabled and the checked one
|
|
151
|
-
const first = radios.find(radio => !radio.disabled);
|
|
152
|
-
const checked = radios.find(radio =>
|
|
257
|
+
const first = radios.find((radio) => !radio.disabled);
|
|
258
|
+
const checked = radios.find((radio) => radio.value === value && !radio.disabled);
|
|
153
259
|
if (!first && !checked) {
|
|
154
260
|
return;
|
|
155
261
|
}
|
|
@@ -188,7 +294,7 @@ const RadioGroup = class {
|
|
|
188
294
|
// this is used to set aria-labelledby
|
|
189
295
|
const header = this.el.querySelector('ion-list-header') || this.el.querySelector('ion-item-divider');
|
|
190
296
|
if (header) {
|
|
191
|
-
const label = this.label = header.querySelector('ion-label');
|
|
297
|
+
const label = (this.label = header.querySelector('ion-label'));
|
|
192
298
|
if (label) {
|
|
193
299
|
this.labelId = label.id = this.name + '-lbl';
|
|
194
300
|
}
|
|
@@ -204,25 +310,21 @@ const RadioGroup = class {
|
|
|
204
310
|
}
|
|
205
311
|
// Get all radios inside of the radio group and then
|
|
206
312
|
// filter out disabled radios since we need to skip those
|
|
207
|
-
const radios = this.getRadios().filter(radio => !radio.disabled);
|
|
313
|
+
const radios = this.getRadios().filter((radio) => !radio.disabled);
|
|
208
314
|
// Only move the radio if the current focus is in the radio group
|
|
209
315
|
if (ev.target && radios.includes(ev.target)) {
|
|
210
|
-
const index = radios.findIndex(radio => radio === ev.target);
|
|
316
|
+
const index = radios.findIndex((radio) => radio === ev.target);
|
|
211
317
|
const current = radios[index];
|
|
212
318
|
let next;
|
|
213
319
|
// If hitting arrow down or arrow right, move to the next radio
|
|
214
320
|
// If we're on the last radio, move to the first radio
|
|
215
321
|
if (['ArrowDown', 'ArrowRight'].includes(ev.code)) {
|
|
216
|
-
next =
|
|
217
|
-
? radios[0]
|
|
218
|
-
: radios[index + 1];
|
|
322
|
+
next = index === radios.length - 1 ? radios[0] : radios[index + 1];
|
|
219
323
|
}
|
|
220
324
|
// If hitting arrow up or arrow left, move to the previous radio
|
|
221
325
|
// If we're on the first radio, move to the last radio
|
|
222
326
|
if (['ArrowUp', 'ArrowLeft'].includes(ev.code)) {
|
|
223
|
-
next =
|
|
224
|
-
? radios[radios.length - 1]
|
|
225
|
-
: radios[index - 1];
|
|
327
|
+
next = index === 0 ? radios[radios.length - 1] : radios[index - 1];
|
|
226
328
|
}
|
|
227
329
|
if (next && radios.includes(next)) {
|
|
228
330
|
next.setFocus(ev);
|
|
@@ -233,9 +335,7 @@ const RadioGroup = class {
|
|
|
233
335
|
// Update the radio group value when a user presses the
|
|
234
336
|
// space bar on top of a selected radio
|
|
235
337
|
if (['Space'].includes(ev.code)) {
|
|
236
|
-
this.value =
|
|
237
|
-
? undefined
|
|
238
|
-
: current.value;
|
|
338
|
+
this.value = this.allowEmptySelection && this.value !== undefined ? undefined : current.value;
|
|
239
339
|
// Prevent browsers from jumping
|
|
240
340
|
// to the bottom of the screen
|
|
241
341
|
ev.preventDefault();
|
|
@@ -245,7 +345,7 @@ const RadioGroup = class {
|
|
|
245
345
|
render() {
|
|
246
346
|
const { label, labelId } = this;
|
|
247
347
|
const mode = ionicGlobal.getIonMode(this);
|
|
248
|
-
return
|
|
348
|
+
return index.h(index.Host, { role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode });
|
|
249
349
|
}
|
|
250
350
|
get el() { return index.getElement(this); }
|
|
251
351
|
static get watchers() { return {
|
|
@@ -254,6 +354,7 @@ const RadioGroup = class {
|
|
|
254
354
|
};
|
|
255
355
|
let radioGroupIds = 0;
|
|
256
356
|
|
|
357
|
+
exports.ion_checkbox = Checkbox;
|
|
257
358
|
exports.ion_list_header = ListHeader;
|
|
258
359
|
exports.ion_radio = Radio;
|
|
259
360
|
exports.ion_radio_group = RadioGroup;
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const ionicGlobal = require('./ionic-global-
|
|
7
|
-
const theme = require('./theme-
|
|
5
|
+
const index = require('./index-eaa0d16e.js');
|
|
6
|
+
const ionicGlobal = require('./ionic-global-f2d95fd3.js');
|
|
7
|
+
const theme = require('./theme-fc63803b.js');
|
|
8
8
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const chipMdCss = ":host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.12);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.87);border-radius:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:4px;margin-right:4px;margin-top:4px;margin-bottom:4px;padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px;display:inline-flex;position:relative;align-items:center;height:32px;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);font-size:14px;line-height:1;cursor:pointer;overflow:hidden;vertical-align:middle;box-sizing:border-box}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:4px;margin-inline-end:4px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host(.chip-disabled){cursor:default;opacity:0.4;pointer-events:none}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.08);color:var(--ion-color-shade)}:host(.ion-color:focus){background:rgba(var(--ion-color-base-rgb), 0.12)}:host(.ion-color.ion-activated){background:rgba(var(--ion-color-base-rgb), 0.16)}:host(.chip-outline){border-width:1px;border-style:solid}:host(.chip-outline){border-color:rgba(0, 0, 0, 0.32);background:transparent}:host(.chip-outline.ion-color){border-color:rgba(var(--ion-color-base-rgb), 0.32)}:host(.chip-outline:not(.ion-color):focus){background:rgba(0, 0, 0, 0.04)}:host(.chip-outline.ion-activated:not(.ion-color)){background:rgba(0, 0, 0, 0.08)}::slotted(ion-icon){font-size:20px}:host(:not(.ion-color)) ::slotted(ion-icon){color:rgba(0, 0, 0, 0.54)}::slotted(ion-icon:first-child){margin-left:-4px;margin-right:8px;margin-top:-4px;margin-bottom:-4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon:first-child){margin-left:unset;margin-right:unset;-webkit-margin-start:-4px;margin-inline-start:-4px;-webkit-margin-end:8px;margin-inline-end:8px}}::slotted(ion-icon:last-child){margin-left:8px;margin-right:-4px;margin-top:-4px;margin-bottom:-4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon:last-child){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:-4px;margin-inline-end:-4px}}::slotted(ion-avatar){width:24px;height:24px}::slotted(ion-avatar:first-child){margin-left:-8px;margin-right:8px;margin-top:-4px;margin-bottom:-4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-avatar:first-child){margin-left:unset;margin-right:unset;-webkit-margin-start:-8px;margin-inline-start:-8px;-webkit-margin-end:8px;margin-inline-end:8px}}::slotted(ion-avatar:last-child){margin-left:8px;margin-right:-8px;margin-top:-4px;margin-bottom:-4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-avatar:last-child){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:-8px;margin-inline-end:-8px}}:host(:focus){outline:none}:host(:focus){--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.16)}:host(.ion-activated){--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@media (any-hover: hover){:host(:hover){--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.16)}:host(.ion-color:hover){background:rgba(var(--ion-color-base-rgb), 0.12)}:host(.chip-outline:not(.ion-color):hover){background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.04)}}";
|
|
9
|
+
const chipCss = ":host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.12);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.87);border-radius:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:4px;margin-right:4px;margin-top:4px;margin-bottom:4px;padding-left:12px;padding-right:12px;padding-top:7px;padding-bottom:7px;display:inline-flex;position:relative;align-items:center;height:32px;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);font-size:14px;line-height:1;cursor:pointer;overflow:hidden;vertical-align:middle;box-sizing:border-box}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:4px;margin-inline-end:4px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host(.chip-disabled){cursor:default;opacity:0.4;pointer-events:none}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.08);color:var(--ion-color-shade)}:host(.ion-color:focus){background:rgba(var(--ion-color-base-rgb), 0.12)}:host(.ion-color.ion-activated){background:rgba(var(--ion-color-base-rgb), 0.16)}:host(.chip-outline){border-width:1px;border-style:solid}:host(.chip-outline){border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.32);background:transparent}:host(.chip-outline.ion-color){border-color:rgba(var(--ion-color-base-rgb), 0.32)}:host(.chip-outline:not(.ion-color):focus){background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.04)}:host(.chip-outline.ion-activated:not(.ion-color)){background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)}::slotted(ion-icon){font-size:20px}:host(:not(.ion-color)) ::slotted(ion-icon){color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}::slotted(ion-icon:first-child){margin-left:-4px;margin-right:8px;margin-top:-4px;margin-bottom:-4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon:first-child){margin-left:unset;margin-right:unset;-webkit-margin-start:-4px;margin-inline-start:-4px;-webkit-margin-end:8px;margin-inline-end:8px}}::slotted(ion-icon:last-child){margin-left:8px;margin-right:-4px;margin-top:-4px;margin-bottom:-4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon:last-child){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:-4px;margin-inline-end:-4px}}::slotted(ion-avatar){width:24px;height:24px}::slotted(ion-avatar:first-child){margin-left:-8px;margin-right:8px;margin-top:-4px;margin-bottom:-4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-avatar:first-child){margin-left:unset;margin-right:unset;-webkit-margin-start:-8px;margin-inline-start:-8px;-webkit-margin-end:8px;margin-inline-end:8px}}::slotted(ion-avatar:last-child){margin-left:8px;margin-right:-8px;margin-top:-4px;margin-bottom:-4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-avatar:last-child){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:-8px;margin-inline-end:-8px}}:host(:focus){outline:none}:host(:focus){--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.16)}:host(.ion-activated){--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@media (any-hover: hover){:host(:hover){--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.16)}:host(.ion-color:hover){background:rgba(var(--ion-color-base-rgb), 0.12)}:host(.chip-outline:not(.ion-color):hover){background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.04)}}";
|
|
12
10
|
|
|
13
11
|
const Chip = class {
|
|
14
12
|
constructor(hostRef) {
|
|
@@ -32,9 +30,6 @@ const Chip = class {
|
|
|
32
30
|
}) }, index.h("slot", null), mode === 'md' && index.h("ion-ripple-effect", null)));
|
|
33
31
|
}
|
|
34
32
|
};
|
|
35
|
-
Chip.style =
|
|
36
|
-
ios: chipIosCss,
|
|
37
|
-
md: chipMdCss
|
|
38
|
-
};
|
|
33
|
+
Chip.style = chipCss;
|
|
39
34
|
|
|
40
35
|
exports.ion_chip = Chip;
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-eaa0d16e.js');
|
|
6
|
+
const ionicGlobal = require('./ionic-global-f2d95fd3.js');
|
|
7
|
+
const helpers = require('./helpers-cb08f5ae.js');
|
|
8
|
+
const index$1 = require('./index-b2a479e4.js');
|
|
9
|
+
const theme = require('./theme-fc63803b.js');
|
|
10
|
+
const data = require('./data-0c9489d7.js');
|
|
11
|
+
|
|
12
|
+
const iosDatetimeButtonCss = ":host{display:flex;align-items:center;justify-content:center}:host button{border-radius:8px;padding-left:12px;padding-right:12px;padding-top:6px;padding-bottom:6px;margin-left:2px;margin-right:2px;margin-top:0px;margin-bottom:0px;position:relative;transition:150ms color ease-in-out;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;appearance:none;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host button{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host button{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}:host(.time-active) #time-button,:host(.date-active) #date-button{color:var(--ion-color-base)}:host(.datetime-button-disabled){pointer-events:none}:host(.datetime-button-disabled) button{opacity:0.4}";
|
|
13
|
+
|
|
14
|
+
const mdDatetimeButtonCss = ":host{display:flex;align-items:center;justify-content:center}:host button{border-radius:8px;padding-left:12px;padding-right:12px;padding-top:6px;padding-bottom:6px;margin-left:2px;margin-right:2px;margin-top:0px;margin-bottom:0px;position:relative;transition:150ms color ease-in-out;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;appearance:none;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host button{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host button{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}:host(.time-active) #time-button,:host(.date-active) #date-button{color:var(--ion-color-base)}:host(.datetime-button-disabled){pointer-events:none}:host(.datetime-button-disabled) button{opacity:0.4}";
|
|
15
|
+
|
|
16
|
+
const DatetimeButton = class {
|
|
17
|
+
constructor(hostRef) {
|
|
18
|
+
index.registerInstance(this, hostRef);
|
|
19
|
+
this.datetimeEl = null;
|
|
20
|
+
this.overlayEl = null;
|
|
21
|
+
this.datetimePresentation = 'date-time';
|
|
22
|
+
this.datetimeActive = false;
|
|
23
|
+
/**
|
|
24
|
+
* The color to use from your application's color palette.
|
|
25
|
+
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
|
26
|
+
* For more information on colors, see [theming](/docs/theming/basics).
|
|
27
|
+
*/
|
|
28
|
+
this.color = 'primary';
|
|
29
|
+
/**
|
|
30
|
+
* If `true`, the user cannot interact with the button.
|
|
31
|
+
*/
|
|
32
|
+
this.disabled = false;
|
|
33
|
+
/**
|
|
34
|
+
* Accepts one or more string values and converts
|
|
35
|
+
* them to DatetimeParts. This is done so datetime-button
|
|
36
|
+
* can work with an array internally and not need
|
|
37
|
+
* to keep checking if the datetime value is `string` or `string[]`.
|
|
38
|
+
*/
|
|
39
|
+
this.getParsedDateValues = (value) => {
|
|
40
|
+
// TODO FW-2646 Remove value === ''
|
|
41
|
+
if (value === '' || value === undefined || value === null) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
if (Array.isArray(value)) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return [value];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Check the value property on the linked
|
|
51
|
+
* ion-datetime and then format it according
|
|
52
|
+
* to the locale specified on ion-datetime.
|
|
53
|
+
*/
|
|
54
|
+
this.setDateTimeText = () => {
|
|
55
|
+
const { datetimeEl, datetimePresentation } = this;
|
|
56
|
+
if (!datetimeEl) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const { value, locale, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;
|
|
60
|
+
const parsedValues = this.getParsedDateValues(value);
|
|
61
|
+
/**
|
|
62
|
+
* Both ion-datetime and ion-datetime-button default
|
|
63
|
+
* to today's date and time if no value is set.
|
|
64
|
+
*/
|
|
65
|
+
const parsedDatetimes = data.parseDate(parsedValues.length > 0 ? parsedValues : [data.getToday()]);
|
|
66
|
+
/**
|
|
67
|
+
* If developers incorrectly use multiple="true"
|
|
68
|
+
* with non "date" datetimes, then just select
|
|
69
|
+
* the first value so the interface does
|
|
70
|
+
* not appear broken. Datetime will provide a
|
|
71
|
+
* warning in the console.
|
|
72
|
+
*/
|
|
73
|
+
const firstParsedDatetime = parsedDatetimes[0];
|
|
74
|
+
const use24Hour = data.is24Hour(locale, hourCycle);
|
|
75
|
+
// TODO(FW-1865) - Remove once FW-1831 is fixed.
|
|
76
|
+
parsedDatetimes.forEach((parsedDatetime) => {
|
|
77
|
+
parsedDatetime.tzOffset = undefined;
|
|
78
|
+
});
|
|
79
|
+
this.dateText = this.timeText = undefined;
|
|
80
|
+
switch (datetimePresentation) {
|
|
81
|
+
case 'date-time':
|
|
82
|
+
case 'time-date':
|
|
83
|
+
const dateText = data.getMonthDayAndYear(locale, firstParsedDatetime);
|
|
84
|
+
const timeText = data.getLocalizedTime(locale, firstParsedDatetime, use24Hour);
|
|
85
|
+
if (preferWheel) {
|
|
86
|
+
this.dateText = `${dateText} ${timeText}`;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this.dateText = dateText;
|
|
90
|
+
this.timeText = timeText;
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
case 'date':
|
|
94
|
+
if (multiple && parsedValues.length !== 1) {
|
|
95
|
+
let headerText = `${parsedValues.length} days`; // default/fallback for multiple selection
|
|
96
|
+
if (titleSelectedDatesFormatter !== undefined) {
|
|
97
|
+
try {
|
|
98
|
+
headerText = titleSelectedDatesFormatter(parsedValues);
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
index$1.printIonError('Exception in provided `titleSelectedDatesFormatter`: ', e);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
this.dateText = headerText;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
this.dateText = data.getMonthDayAndYear(locale, firstParsedDatetime);
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
case 'time':
|
|
111
|
+
this.timeText = data.getLocalizedTime(locale, firstParsedDatetime, use24Hour);
|
|
112
|
+
break;
|
|
113
|
+
case 'month-year':
|
|
114
|
+
this.dateText = data.getMonthAndYear(locale, firstParsedDatetime);
|
|
115
|
+
break;
|
|
116
|
+
case 'month':
|
|
117
|
+
this.dateText = data.getLocalizedDateTime(locale, firstParsedDatetime, { month: 'long' });
|
|
118
|
+
break;
|
|
119
|
+
case 'year':
|
|
120
|
+
this.dateText = data.getLocalizedDateTime(locale, firstParsedDatetime, { year: 'numeric' });
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Waits for the ion-datetime to re-render.
|
|
126
|
+
* This is needed in order to correctly position
|
|
127
|
+
* a popover relative to the trigger element.
|
|
128
|
+
*/
|
|
129
|
+
this.waitForDatetimeChanges = async () => {
|
|
130
|
+
const { datetimeEl } = this;
|
|
131
|
+
if (!datetimeEl) {
|
|
132
|
+
return Promise.resolve();
|
|
133
|
+
}
|
|
134
|
+
return new Promise((resolve) => {
|
|
135
|
+
helpers.addEventListener(datetimeEl, 'ionRender', resolve, { once: true });
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
this.handleDateClick = async (ev) => {
|
|
139
|
+
const { datetimeEl, datetimePresentation } = this;
|
|
140
|
+
if (!datetimeEl) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
let needsPresentationChange = false;
|
|
144
|
+
/**
|
|
145
|
+
* When clicking the date button,
|
|
146
|
+
* we need to make sure that only a date
|
|
147
|
+
* picker is displayed. For presentation styles
|
|
148
|
+
* that display content other than a date picker,
|
|
149
|
+
* we need to update the presentation style.
|
|
150
|
+
*/
|
|
151
|
+
switch (datetimePresentation) {
|
|
152
|
+
case 'date-time':
|
|
153
|
+
case 'time-date':
|
|
154
|
+
const needsChange = datetimeEl.presentation !== 'date';
|
|
155
|
+
/**
|
|
156
|
+
* The date+time wheel picker
|
|
157
|
+
* shows date and time together,
|
|
158
|
+
* so do not adjust the presentation
|
|
159
|
+
* in that case.
|
|
160
|
+
*/
|
|
161
|
+
if (!datetimeEl.preferWheel && needsChange) {
|
|
162
|
+
datetimeEl.presentation = 'date';
|
|
163
|
+
needsPresentationChange = true;
|
|
164
|
+
}
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Track which button was clicked
|
|
169
|
+
* so that it can have the correct
|
|
170
|
+
* activated styles applied when
|
|
171
|
+
* the modal/popover containing
|
|
172
|
+
* the datetime is opened.
|
|
173
|
+
*/
|
|
174
|
+
this.selectedButton = 'date';
|
|
175
|
+
this.presentOverlay(ev, needsPresentationChange, this.dateTargetEl);
|
|
176
|
+
};
|
|
177
|
+
this.handleTimeClick = (ev) => {
|
|
178
|
+
const { datetimeEl, datetimePresentation } = this;
|
|
179
|
+
if (!datetimeEl) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
let needsPresentationChange = false;
|
|
183
|
+
/**
|
|
184
|
+
* When clicking the time button,
|
|
185
|
+
* we need to make sure that only a time
|
|
186
|
+
* picker is displayed. For presentation styles
|
|
187
|
+
* that display content other than a time picker,
|
|
188
|
+
* we need to update the presentation style.
|
|
189
|
+
*/
|
|
190
|
+
switch (datetimePresentation) {
|
|
191
|
+
case 'date-time':
|
|
192
|
+
case 'time-date':
|
|
193
|
+
const needsChange = datetimeEl.presentation !== 'time';
|
|
194
|
+
if (needsChange) {
|
|
195
|
+
datetimeEl.presentation = 'time';
|
|
196
|
+
needsPresentationChange = true;
|
|
197
|
+
}
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Track which button was clicked
|
|
202
|
+
* so that it can have the correct
|
|
203
|
+
* activated styles applied when
|
|
204
|
+
* the modal/popover containing
|
|
205
|
+
* the datetime is opened.
|
|
206
|
+
*/
|
|
207
|
+
this.selectedButton = 'time';
|
|
208
|
+
this.presentOverlay(ev, needsPresentationChange, this.timeTargetEl);
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* If the datetime is presented in an
|
|
212
|
+
* overlay, the datetime and overlay
|
|
213
|
+
* should be appropriately sized.
|
|
214
|
+
* These classes provide default sizing values
|
|
215
|
+
* that developers can customize.
|
|
216
|
+
* The goal is to provide an overlay that is
|
|
217
|
+
* reasonably sized with a datetime that
|
|
218
|
+
* fills the entire container.
|
|
219
|
+
*/
|
|
220
|
+
this.presentOverlay = async (ev, needsPresentationChange, triggerEl) => {
|
|
221
|
+
const { overlayEl } = this;
|
|
222
|
+
if (!overlayEl) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (overlayEl.tagName === 'ION-POPOVER') {
|
|
226
|
+
/**
|
|
227
|
+
* When the presentation on datetime changes,
|
|
228
|
+
* we need to wait for the component to re-render
|
|
229
|
+
* otherwise the computed width/height of the
|
|
230
|
+
* popover content will be wrong, causing
|
|
231
|
+
* the popover to not align with the trigger element.
|
|
232
|
+
*/
|
|
233
|
+
if (needsPresentationChange) {
|
|
234
|
+
await this.waitForDatetimeChanges();
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* We pass the trigger button element
|
|
238
|
+
* so that the popover aligns with the individual
|
|
239
|
+
* button that was clicked, not the component container.
|
|
240
|
+
*/
|
|
241
|
+
overlayEl.present(Object.assign(Object.assign({}, ev), { detail: {
|
|
242
|
+
ionShadowTarget: triggerEl,
|
|
243
|
+
} }));
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
overlayEl.present();
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
async componentWillLoad() {
|
|
251
|
+
const { datetime } = this;
|
|
252
|
+
if (!datetime) {
|
|
253
|
+
index$1.printIonError('An ID associated with an ion-datetime instance is required for ion-datetime-button to function properly.', this.el);
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const datetimeEl = (this.datetimeEl = document.getElementById(datetime));
|
|
257
|
+
if (!datetimeEl) {
|
|
258
|
+
index$1.printIonError(`No ion-datetime instance found for ID '${datetime}'.`, this.el);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Since the datetime can be used in any context (overlays, accordion, etc)
|
|
263
|
+
* we track when it is visible to determine when it is active.
|
|
264
|
+
* This informs which button is highlighted as well as the
|
|
265
|
+
* aria-expanded state.
|
|
266
|
+
*/
|
|
267
|
+
const io = new IntersectionObserver((entries) => {
|
|
268
|
+
const ev = entries[0];
|
|
269
|
+
this.datetimeActive = ev.isIntersecting;
|
|
270
|
+
}, {
|
|
271
|
+
threshold: 0.01,
|
|
272
|
+
});
|
|
273
|
+
io.observe(datetimeEl);
|
|
274
|
+
/**
|
|
275
|
+
* Get a reference to any modal/popover
|
|
276
|
+
* the datetime is being used in so we can
|
|
277
|
+
* correctly size it when it is presented.
|
|
278
|
+
*/
|
|
279
|
+
const overlayEl = (this.overlayEl = datetimeEl.closest('ion-modal, ion-popover'));
|
|
280
|
+
/**
|
|
281
|
+
* The .ion-datetime-button-overlay class contains
|
|
282
|
+
* styles that allow any modal/popover to be
|
|
283
|
+
* sized according to the dimensions of the datetime.
|
|
284
|
+
* If developers want a smaller/larger overlay all they need
|
|
285
|
+
* to do is change the width/height of the datetime.
|
|
286
|
+
* Additionally, this lets us avoid having to set
|
|
287
|
+
* explicit widths on each variant of datetime.
|
|
288
|
+
*/
|
|
289
|
+
if (overlayEl) {
|
|
290
|
+
overlayEl.classList.add('ion-datetime-button-overlay');
|
|
291
|
+
}
|
|
292
|
+
helpers.componentOnReady(datetimeEl, () => {
|
|
293
|
+
const datetimePresentation = (this.datetimePresentation = datetimeEl.presentation || 'date-time');
|
|
294
|
+
/**
|
|
295
|
+
* Set the initial display
|
|
296
|
+
* in the rendered buttons.
|
|
297
|
+
*
|
|
298
|
+
* From there, we need to listen
|
|
299
|
+
* for ionChange to be emitted
|
|
300
|
+
* from datetime so we know when
|
|
301
|
+
* to re-render the displayed
|
|
302
|
+
* text in the buttons.
|
|
303
|
+
*/
|
|
304
|
+
this.setDateTimeText();
|
|
305
|
+
helpers.addEventListener(datetimeEl, 'ionChange', this.setDateTimeText);
|
|
306
|
+
/**
|
|
307
|
+
* Configure the initial selected button
|
|
308
|
+
* in the event that the datetime is displayed
|
|
309
|
+
* without clicking one of the datetime buttons.
|
|
310
|
+
* For example, a datetime could be expanded
|
|
311
|
+
* in an accordion. In this case users only
|
|
312
|
+
* need to click the accordion header to show
|
|
313
|
+
* the datetime.
|
|
314
|
+
*/
|
|
315
|
+
switch (datetimePresentation) {
|
|
316
|
+
case 'date-time':
|
|
317
|
+
case 'date':
|
|
318
|
+
case 'month-year':
|
|
319
|
+
case 'month':
|
|
320
|
+
case 'year':
|
|
321
|
+
this.selectedButton = 'date';
|
|
322
|
+
break;
|
|
323
|
+
case 'time-date':
|
|
324
|
+
case 'time':
|
|
325
|
+
this.selectedButton = 'time';
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
render() {
|
|
331
|
+
const { color, dateText, timeText, selectedButton, datetimeActive, disabled } = this;
|
|
332
|
+
const mode = ionicGlobal.getIonMode(this);
|
|
333
|
+
return (index.h(index.Host, { class: theme.createColorClasses(color, {
|
|
334
|
+
[mode]: true,
|
|
335
|
+
[`${selectedButton}-active`]: datetimeActive,
|
|
336
|
+
['datetime-button-disabled']: disabled,
|
|
337
|
+
}) }, dateText && (index.h("button", { class: "ion-activatable", id: "date-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleDateClick, disabled: disabled, part: "native", ref: (el) => (this.dateTargetEl = el) }, index.h("slot", { name: "date-target" }, dateText), mode === 'md' && index.h("ion-ripple-effect", null))), timeText && (index.h("button", { class: "ion-activatable", id: "time-button", "aria-expanded": datetimeActive ? 'true' : 'false', onClick: this.handleTimeClick, disabled: disabled, part: "native", ref: (el) => (this.timeTargetEl = el) }, index.h("slot", { name: "time-target" }, timeText), mode === 'md' && index.h("ion-ripple-effect", null)))));
|
|
338
|
+
}
|
|
339
|
+
get el() { return index.getElement(this); }
|
|
340
|
+
};
|
|
341
|
+
DatetimeButton.style = {
|
|
342
|
+
ios: iosDatetimeButtonCss,
|
|
343
|
+
md: mdDatetimeButtonCss
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
exports.ion_datetime_button = DatetimeButton;
|