voyager-ionic-core 7.6.0 → 7.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/data.js +64 -14
- package/components/icon.js +15 -3
- package/components/index7.js +1 -1
- package/components/ion-datetime.js +23 -4
- package/components/ion-input.js +23 -4
- package/components/ion-menu.js +2 -2
- package/components/ion-refresher-content.js +10 -3
- package/components/ion-refresher.js +4 -183
- package/components/ion-select.js +2 -2
- package/components/ion-split-pane.js +2 -2
- package/components/ion-textarea.js +27 -4
- package/components/item.js +2 -2
- package/components/radio-group.js +9 -1
- package/components/refresher.utils.js +196 -0
- package/css/core.css +0 -8
- package/css/core.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/dist/cjs/{app-globals-0af482c7.js → app-globals-7def22c8.js} +1 -1
- package/dist/cjs/{button-active-a5185907.js → button-active-962fe442.js} +1 -1
- package/dist/cjs/{data-36b9094e.js → data-a5109f09.js} +64 -14
- package/dist/cjs/{index-f8f13389.js → index-17ab7794.js} +3 -3
- package/dist/cjs/{index-ce101dc9.js → index-3b012034.js} +1 -1
- package/dist/cjs/{index-bbb4336c.js → index-50dcfe2f.js} +21 -8
- package/dist/cjs/{index-09471526.js → index-f52c6d38.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
- package/dist/cjs/ion-alert.cjs.entry.js +4 -4
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +3 -3
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-button_2.cjs.entry.js +17 -5
- package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +3 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +28 -9
- package/dist/cjs/ion-fab_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-img.cjs.entry.js +2 -2
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +26 -7
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +5 -5
- package/dist/cjs/ion-loading.cjs.entry.js +3 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +7 -7
- package/dist/cjs/ion-modal.cjs.entry.js +4 -4
- package/dist/cjs/ion-nav_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker-column-internal.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-internal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +4 -4
- package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +11 -3
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +30 -15
- package/dist/cjs/ion-reorder_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +3 -3
- package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +29 -6
- package/dist/cjs/ion-toast.cjs.entry.js +3 -3
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/{ionic-global-f4a2093b.js → ionic-global-a4edbf03.js} +1 -1
- package/dist/cjs/ionic.cjs.js +4 -4
- package/dist/cjs/{ios.transition-6787b799.js → ios.transition-b5353f3e.js} +2 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{md.transition-e033d20a.js → md.transition-67157dd9.js} +2 -2
- package/dist/cjs/{overlays-27a6fb16.js → overlays-e77cc023.js} +1 -1
- package/dist/cjs/{status-tap-415acac6.js → status-tap-b5d77c08.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/datetime/datetime.ios.css +3 -1
- package/dist/collection/components/datetime/datetime.js +23 -4
- package/dist/collection/components/datetime/test/basic/datetime.e2e.js +29 -0
- package/dist/collection/components/datetime/test/manipulation.spec.js +133 -1
- package/dist/collection/components/datetime/test/prefer-wheel/datetime.spec.js +27 -0
- package/dist/collection/components/datetime/utils/manipulation.js +65 -15
- package/dist/collection/components/input/input.ios.css +20 -0
- package/dist/collection/components/input/input.js +22 -3
- package/dist/collection/components/input/input.md.css +21 -0
- package/dist/collection/components/input/test/clear-on-edit/input.e2e.js +28 -8
- package/dist/collection/components/input/test/slot/input.e2e.js +6 -2
- package/dist/collection/components/item/item.ios.css +6 -0
- package/dist/collection/components/item/item.md.css +6 -0
- package/dist/collection/components/label/test/a11y/label.e2e.js +25 -0
- package/dist/collection/components/menu/menu.ios.css +3 -4
- package/dist/collection/components/menu/menu.md.css +3 -4
- package/dist/collection/components/menu/test/custom/menu.e2e.js +61 -0
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/radio/test/a11y/radio.e2e.js +15 -1
- package/dist/collection/components/radio/test/legacy/a11y/radio.e2e.js +15 -2
- package/dist/collection/components/radio-group/radio-group.js +9 -1
- package/dist/collection/components/range/range.js +1 -1
- package/dist/collection/components/refresher/refresher.js +3 -0
- package/dist/collection/components/refresher/refresher.utils.js +19 -11
- package/dist/collection/components/refresher-content/refresher-content.js +9 -3
- package/dist/collection/components/select/select.ios.css +20 -0
- package/dist/collection/components/select/select.md.css +21 -0
- package/dist/collection/components/select/test/slot/select.e2e.js +6 -2
- package/dist/collection/components/split-pane/split-pane.ios.css +10 -2
- package/dist/collection/components/split-pane/split-pane.md.css +10 -2
- package/dist/collection/components/textarea/test/clear-on-edit/textarea.e2e.js +36 -0
- package/dist/collection/components/textarea/test/slot/textarea.e2e.js +6 -2
- package/dist/collection/components/textarea/textarea.ios.css +20 -0
- package/dist/collection/components/textarea/textarea.js +26 -3
- package/dist/collection/components/textarea/textarea.md.css +21 -0
- package/dist/docs.json +34 -8
- package/dist/esm/{app-globals-722340c4.js → app-globals-8c62bec2.js} +1 -1
- package/dist/esm/{button-active-c6ee4f50.js → button-active-308d3edd.js} +1 -1
- package/dist/esm/{data-f5c75b4e.js → data-775093f5.js} +64 -14
- package/dist/esm/{index-0c12c22b.js → index-1193f005.js} +1 -1
- package/dist/esm/{index-1932b201.js → index-4743453d.js} +3 -3
- package/dist/esm/{index-08d686eb.js → index-b7d870cf.js} +21 -8
- package/dist/esm/{index-c132c5f1.js → index-f7dc70ba.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/ion-accordion_2.entry.js +3 -3
- package/dist/esm/ion-action-sheet.entry.js +4 -4
- package/dist/esm/ion-alert.entry.js +4 -4
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +3 -3
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +3 -3
- package/dist/esm/ion-button_2.entry.js +17 -5
- package/dist/esm/ion-card_5.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +3 -3
- package/dist/esm/ion-datetime_3.entry.js +28 -9
- package/dist/esm/ion-fab_3.entry.js +3 -3
- package/dist/esm/ion-img.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +26 -7
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +5 -5
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu_3.entry.js +7 -7
- package/dist/esm/ion-modal.entry.js +4 -4
- package/dist/esm/ion-nav_2.entry.js +3 -3
- package/dist/esm/ion-picker-column-internal.entry.js +2 -2
- package/dist/esm/ion-picker-internal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +4 -4
- package/dist/esm/ion-progress-bar.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +11 -3
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +30 -15
- package/dist/esm/ion-reorder_2.entry.js +3 -3
- package/dist/esm/ion-ripple-effect.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +3 -3
- package/dist/esm/ion-segment_2.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +6 -6
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +4 -4
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +29 -6
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/{ionic-global-c0cda98e.js → ionic-global-1f99b929.js} +1 -1
- package/dist/esm/ionic.js +5 -5
- package/dist/esm/{ios.transition-802a84a6.js → ios.transition-3376ccb2.js} +2 -2
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-43c2874d.js → md.transition-f992779f.js} +2 -2
- package/dist/esm/{overlays-32ef481d.js → overlays-b33f6bca.js} +1 -1
- package/dist/esm/{status-tap-2b93b1b5.js → status-tap-16fd8f3d.js} +1 -1
- package/dist/esm-es5/app-globals-8c62bec2.js +4 -0
- package/dist/esm-es5/{button-active-c6ee4f50.js → button-active-308d3edd.js} +1 -1
- package/dist/esm-es5/data-775093f5.js +4 -0
- package/dist/esm-es5/{index-0c12c22b.js → index-1193f005.js} +1 -1
- package/dist/esm-es5/{index-1932b201.js → index-4743453d.js} +1 -1
- package/dist/esm-es5/index-b7d870cf.js +5 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
- package/dist/esm-es5/ion-back-button.entry.js +1 -1
- package/dist/esm-es5/ion-backdrop.entry.js +1 -1
- package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
- package/dist/esm-es5/ion-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-card_5.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-chip.entry.js +1 -1
- package/dist/esm-es5/ion-col_3.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-fab_3.entry.js +1 -1
- package/dist/esm-es5/ion-img.entry.js +1 -1
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
- package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
- package/dist/esm-es5/ion-route_4.entry.js +1 -1
- package/dist/esm-es5/ion-searchbar.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-spinner.entry.js +1 -1
- package/dist/esm-es5/ion-split-pane.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-text.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/{ionic-global-c0cda98e.js → ionic-global-1f99b929.js} +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-802a84a6.js → ios.transition-3376ccb2.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/md.transition-f992779f.js +4 -0
- package/dist/esm-es5/{overlays-32ef481d.js → overlays-b33f6bca.js} +1 -1
- package/dist/esm-es5/{status-tap-2b93b1b5.js → status-tap-16fd8f3d.js} +1 -1
- package/dist/html.html-data.json +13 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/ionic.js +1 -1
- package/dist/ionic/{p-f70970cf.js → p-0235067a.js} +1 -1
- package/dist/ionic/p-02cb0cf0.entry.js +4 -0
- package/dist/ionic/{p-cdbeaadc.js → p-04377cfa.js} +1 -1
- package/dist/ionic/{p-f656e032.system.entry.js → p-043aa6cc.system.entry.js} +1 -1
- package/dist/ionic/{p-c3c3333a.js → p-0509fd34.js} +1 -1
- package/dist/ionic/{p-765f4dde.entry.js → p-0550f802.entry.js} +1 -1
- package/dist/ionic/{p-d032f825.system.entry.js → p-068ec6d3.system.entry.js} +1 -1
- package/dist/ionic/{p-8acae6b0.system.entry.js → p-06abe918.system.entry.js} +1 -1
- package/dist/ionic/{p-5e745192.system.js → p-0aa78a8d.system.js} +1 -1
- package/dist/ionic/{p-b56d0866.system.entry.js → p-0ebc87b7.system.entry.js} +1 -1
- package/dist/ionic/{p-e7ea9815.system.entry.js → p-149567b1.system.entry.js} +1 -1
- package/dist/ionic/{p-b4a51c42.system.js → p-1501b945.system.js} +1 -1
- package/dist/ionic/{p-0add7211.entry.js → p-154e5e06.entry.js} +1 -1
- package/dist/ionic/{p-6f8dbe92.system.entry.js → p-158efe8d.system.entry.js} +1 -1
- package/dist/ionic/{p-8804a472.system.entry.js → p-17d283b9.system.entry.js} +1 -1
- package/dist/ionic/p-18cae04f.js +4 -0
- package/dist/ionic/{p-e3584231.system.js → p-19d9ceb8.system.js} +1 -1
- package/dist/ionic/{p-2d539df1.entry.js → p-1b27ac67.entry.js} +1 -1
- package/dist/ionic/{p-a3277a67.entry.js → p-1c249831.entry.js} +1 -1
- package/dist/ionic/{p-0e53f8ea.system.entry.js → p-20e0e75d.system.entry.js} +1 -1
- package/dist/ionic/p-213e377d.system.entry.js +4 -0
- package/dist/ionic/{p-9f6ee2c0.system.entry.js → p-254ec7c0.system.entry.js} +1 -1
- package/dist/ionic/{p-78aadecb.entry.js → p-26c4bf85.entry.js} +1 -1
- package/dist/ionic/{p-a1987850.entry.js → p-2894d5f6.entry.js} +1 -1
- package/dist/ionic/{p-9738fd82.js → p-290d3fe9.js} +1 -1
- package/dist/ionic/{p-8d69a624.entry.js → p-2b3debd5.entry.js} +1 -1
- package/dist/ionic/{p-958d6ebe.system.entry.js → p-2ba9a9bd.system.entry.js} +2 -2
- package/dist/ionic/{p-c847fb35.system.entry.js → p-328107a5.system.entry.js} +1 -1
- package/dist/ionic/p-328b49db.system.entry.js +4 -0
- package/dist/ionic/{p-1161a793.entry.js → p-3313c481.entry.js} +1 -1
- package/dist/ionic/{p-2938823a.system.entry.js → p-332ea4d3.system.entry.js} +1 -1
- package/dist/ionic/p-3381c3f4.entry.js +4 -0
- package/dist/ionic/{p-a0d7bb5e.system.js → p-3671f1b9.system.js} +1 -1
- package/dist/ionic/{p-b7010c69.system.entry.js → p-39f96ff6.system.entry.js} +1 -1
- package/dist/ionic/{p-98f3d827.entry.js → p-3dfc522b.entry.js} +1 -1
- package/dist/ionic/{p-88fde0e0.entry.js → p-3e8d5e53.entry.js} +1 -1
- package/dist/ionic/{p-ef126ae8.system.entry.js → p-41208f54.system.entry.js} +1 -1
- package/dist/ionic/{p-a0bb7b92.system.entry.js → p-43f03cf4.system.entry.js} +1 -1
- package/dist/ionic/{p-caf21b46.system.entry.js → p-4489dd20.system.entry.js} +1 -1
- package/dist/ionic/{p-72f6ff89.js → p-44a56556.js} +1 -1
- package/dist/ionic/{p-353b349d.entry.js → p-44dc52e5.entry.js} +1 -1
- package/dist/ionic/{p-80fa068e.entry.js → p-47bb15a1.entry.js} +1 -1
- package/dist/ionic/p-4a3218d4.system.entry.js +4 -0
- package/dist/ionic/{p-3f5179b5.entry.js → p-4f400544.entry.js} +1 -1
- package/dist/ionic/{p-16756e94.system.entry.js → p-507ddbfe.system.entry.js} +1 -1
- package/dist/ionic/p-52cfafe9.system.js +5 -0
- package/dist/ionic/{p-4155f352.system.js → p-5ad1fe3b.system.js} +1 -1
- package/dist/ionic/p-5e0c7fdc.entry.js +4 -0
- package/dist/ionic/{p-8f5d30f5.entry.js → p-5ff99b79.entry.js} +1 -1
- package/dist/ionic/{p-d37b441e.entry.js → p-60959b71.entry.js} +1 -1
- package/dist/ionic/{p-28a2c2a2.entry.js → p-61e4d3ec.entry.js} +1 -1
- package/dist/ionic/{p-9709ebd8.system.entry.js → p-6337e56b.system.entry.js} +1 -1
- package/dist/ionic/{p-ada96dd0.system.entry.js → p-648ad047.system.entry.js} +1 -1
- package/dist/ionic/{p-51a087d6.entry.js → p-6855f26a.entry.js} +1 -1
- package/dist/ionic/{p-4fb51e61.system.entry.js → p-69641343.system.entry.js} +1 -1
- package/dist/ionic/{p-47b6ba5b.js → p-6ab03751.js} +1 -1
- package/dist/ionic/{p-517a9885.system.entry.js → p-6c277fa2.system.entry.js} +1 -1
- package/dist/ionic/{p-46d400b4.system.entry.js → p-6e0539ea.system.entry.js} +1 -1
- package/dist/ionic/{p-dee7c1d0.system.entry.js → p-6fba0ce1.system.entry.js} +1 -1
- package/dist/ionic/p-72cb0718.system.entry.js +4 -0
- package/dist/ionic/{p-9eec42cc.system.entry.js → p-745e3339.system.entry.js} +1 -1
- package/dist/ionic/{p-1b19c04b.entry.js → p-767f1a92.entry.js} +1 -1
- package/dist/ionic/{p-c9a21dfd.system.entry.js → p-793a10e0.system.entry.js} +1 -1
- package/dist/ionic/p-799da666.entry.js +4 -0
- package/dist/ionic/{p-5ecae037.js → p-7fae5c36.js} +1 -1
- package/dist/ionic/{p-ea69616e.entry.js → p-84b567a6.entry.js} +1 -1
- package/dist/ionic/{p-b6f9d32a.entry.js → p-85f48531.entry.js} +1 -1
- package/dist/ionic/p-87bb3735.system.js +4 -0
- package/dist/ionic/p-8dae44aa.entry.js +4 -0
- package/dist/ionic/{p-908475e7.system.entry.js → p-8f301ac5.system.entry.js} +1 -1
- package/dist/ionic/{p-cfe57b1b.entry.js → p-928ee57a.entry.js} +1 -1
- package/dist/ionic/{p-953009b1.entry.js → p-93390f78.entry.js} +1 -1
- package/dist/ionic/p-93419ece.system.entry.js +4 -0
- package/dist/ionic/p-97174c1e.js +4 -0
- package/dist/ionic/{p-6de472cb.js → p-98f35d98.js} +1 -1
- package/dist/ionic/p-9a68d8ef.system.js +4 -0
- package/dist/ionic/{p-5b365ca7.system.js → p-9f94c72e.system.js} +1 -1
- package/dist/ionic/{p-1208f939.entry.js → p-9fb45814.entry.js} +1 -1
- package/dist/ionic/{p-3e6b47e8.system.entry.js → p-9fda6824.system.entry.js} +1 -1
- package/dist/ionic/{p-31fcb233.system.js → p-a074be82.system.js} +1 -1
- package/dist/ionic/p-a20bb802.entry.js +4 -0
- package/dist/ionic/{p-17da5ed1.entry.js → p-a3013394.entry.js} +1 -1
- package/dist/ionic/p-a4461d1c.system.entry.js +4 -0
- package/dist/ionic/{p-8314281e.system.js → p-a49931aa.system.js} +1 -1
- package/dist/ionic/{p-e6d68e02.system.entry.js → p-a821750c.system.entry.js} +1 -1
- package/dist/ionic/{p-5bebc7b3.system.entry.js → p-abd5d0d5.system.entry.js} +1 -1
- package/dist/ionic/{p-270e1a1d.entry.js → p-ade3cf46.entry.js} +1 -1
- package/dist/ionic/{p-6fbecbda.entry.js → p-aed4931c.entry.js} +1 -1
- package/dist/ionic/{p-e24ce1e5.system.js → p-afa9f205.system.js} +1 -1
- package/dist/ionic/{p-c91ccbfa.system.entry.js → p-b7058a0e.system.entry.js} +1 -1
- package/dist/ionic/{p-cce9f61a.system.entry.js → p-b7a2ffc9.system.entry.js} +1 -1
- package/dist/ionic/{p-b3b3efba.system.entry.js → p-b8a9e195.system.entry.js} +1 -1
- package/dist/ionic/{p-ddb30596.entry.js → p-b964aba3.entry.js} +1 -1
- package/dist/ionic/{p-9b7f0b0f.entry.js → p-bdf71399.entry.js} +1 -1
- package/dist/ionic/{p-6e70dd1a.system.entry.js → p-beeed22c.system.entry.js} +1 -1
- package/dist/ionic/{p-f8a5bb89.entry.js → p-c08fe2c0.entry.js} +1 -1
- package/dist/ionic/{p-4d67d27a.entry.js → p-c1701827.entry.js} +1 -1
- package/dist/ionic/{p-18ba8221.entry.js → p-c23eff76.entry.js} +1 -1
- package/dist/ionic/{p-b5f9f14c.entry.js → p-c68dd1e0.entry.js} +1 -1
- package/dist/ionic/p-c8aadc98.system.entry.js +4 -0
- package/dist/ionic/{p-3dd98a73.entry.js → p-cad1126a.entry.js} +1 -1
- package/dist/ionic/{p-042e6f4b.entry.js → p-cd1b920b.entry.js} +1 -1
- package/dist/ionic/p-cd574dfa.js +4 -0
- package/dist/ionic/{p-3a45a82b.entry.js → p-cf235986.entry.js} +1 -1
- package/dist/ionic/p-d0748f6d.entry.js +4 -0
- package/dist/ionic/{p-b6f5e4f2.system.entry.js → p-d93eed83.system.entry.js} +1 -1
- package/dist/ionic/{p-e94c392d.entry.js → p-da5e2652.entry.js} +1 -1
- package/dist/ionic/p-da666998.system.entry.js +4 -0
- package/dist/ionic/{p-7d92bf15.system.entry.js → p-dc71e4ef.system.entry.js} +1 -1
- package/dist/ionic/{p-6577aea9.system.entry.js → p-ddd48faf.system.entry.js} +1 -1
- package/dist/ionic/p-e2903cdc.system.entry.js +4 -0
- package/dist/ionic/{p-2092f39f.entry.js → p-e33d1ebc.entry.js} +1 -1
- package/dist/ionic/p-eb246b50.entry.js +4 -0
- package/dist/ionic/p-ee810056.system.entry.js +4 -0
- package/dist/ionic/{p-33a37fad.system.js → p-f6e9c227.system.js} +1 -1
- package/dist/ionic/{p-251666e2.entry.js → p-f894e0ad.entry.js} +1 -1
- package/dist/types/components/datetime/datetime.d.ts +3 -0
- package/dist/types/components/datetime/utils/manipulation.d.ts +34 -7
- package/dist/types/components/input/input.d.ts +3 -0
- package/dist/types/components/modal/modal.d.ts +3 -0
- package/dist/types/components/range/range.d.ts +3 -0
- package/dist/types/components/refresher/refresher.d.ts +3 -0
- package/dist/types/components/refresher/refresher.utils.d.ts +16 -0
- package/dist/types/components/textarea/textarea.d.ts +3 -0
- package/dist/types/components.d.ts +18 -10
- package/hydrate/index.js +221 -83
- package/package.json +7 -7
- package/dist/esm-es5/app-globals-722340c4.js +0 -4
- package/dist/esm-es5/data-f5c75b4e.js +0 -4
- package/dist/esm-es5/index-08d686eb.js +0 -5
- package/dist/esm-es5/md.transition-43c2874d.js +0 -4
- package/dist/ionic/p-01d14eba.system.entry.js +0 -4
- package/dist/ionic/p-1786bc72.js +0 -4
- package/dist/ionic/p-28249b10.system.entry.js +0 -4
- package/dist/ionic/p-2aea8b1e.js +0 -4
- package/dist/ionic/p-2d3b9fa3.system.entry.js +0 -4
- package/dist/ionic/p-350f7292.system.entry.js +0 -4
- package/dist/ionic/p-4233cc1e.system.entry.js +0 -4
- package/dist/ionic/p-564af202.system.entry.js +0 -4
- package/dist/ionic/p-588fdf40.entry.js +0 -4
- package/dist/ionic/p-5e4eec2e.entry.js +0 -4
- package/dist/ionic/p-5eda1d7d.entry.js +0 -4
- package/dist/ionic/p-6ad34705.system.entry.js +0 -4
- package/dist/ionic/p-6de62649.system.entry.js +0 -4
- package/dist/ionic/p-82e3d633.system.js +0 -4
- package/dist/ionic/p-91d33c4a.js +0 -4
- package/dist/ionic/p-9e447eb1.system.js +0 -4
- package/dist/ionic/p-a4afcc88.entry.js +0 -4
- package/dist/ionic/p-a9978d08.entry.js +0 -4
- package/dist/ionic/p-afd6ca9d.entry.js +0 -4
- package/dist/ionic/p-d3b030b8.system.js +0 -5
- package/dist/ionic/p-dc6af8e9.entry.js +0 -4
- package/dist/ionic/p-f0445d82.system.entry.js +0 -4
- package/dist/ionic/p-fba0a6e7.system.entry.js +0 -4
- package/dist/ionic/p-feae5133.entry.js +0 -4
- /package/dist/esm-es5/{index-c132c5f1.js → index-f7dc70ba.js} +0 -0
- /package/dist/ionic/{p-ea96fa73.js → p-831269de.js} +0 -0
- /package/dist/ionic/{p-8050b9b9.system.js → p-dfb6de03.system.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { getPreviousYear, getNextYear, getPreviousMonth, getNextMonth, getPreviousDay, getNextDay, getPreviousWeek, getNextWeek, getEndOfWeek, getStartOfWeek, convert12HourTo24Hour, getInternalHourValue, calculateHourFromAMPM, subtractDays, addDays, validateParts, } from "../utils/manipulation";
|
|
4
|
+
import { getPreviousYear, getNextYear, getPreviousMonth, getNextMonth, getPreviousDay, getNextDay, getPreviousWeek, getNextWeek, getEndOfWeek, getStartOfWeek, convert12HourTo24Hour, getInternalHourValue, calculateHourFromAMPM, subtractDays, addDays, validateParts, getClosestValidDate, } from "../utils/manipulation";
|
|
5
5
|
describe('addDays()', () => {
|
|
6
6
|
it('should correctly add days', () => {
|
|
7
7
|
expect(addDays({
|
|
@@ -431,3 +431,135 @@ describe('validateParts()', () => {
|
|
|
431
431
|
})).toEqual({ month: 1, day: 1, year: 2022, hour: 9, minute: 30 });
|
|
432
432
|
});
|
|
433
433
|
});
|
|
434
|
+
describe('getClosestValidDate()', () => {
|
|
435
|
+
it('should match a date with only month/day/year', () => {
|
|
436
|
+
// October 10, 2023
|
|
437
|
+
const refParts = { month: 10, day: 10, year: 2023 };
|
|
438
|
+
// April 10, 2021
|
|
439
|
+
const minParts = { month: 4, day: 10, year: 2021 };
|
|
440
|
+
// September 14, 2021
|
|
441
|
+
const maxParts = { month: 9, day: 14, year: 2021 };
|
|
442
|
+
// September 4, 2021
|
|
443
|
+
const expected = { month: 9, day: 4, year: 2021, dayOfWeek: undefined };
|
|
444
|
+
expect(getClosestValidDate({
|
|
445
|
+
refParts,
|
|
446
|
+
monthValues: [2, 3, 7, 9, 10],
|
|
447
|
+
dayValues: [4, 15, 25],
|
|
448
|
+
yearValues: [2020, 2021, 2023],
|
|
449
|
+
maxParts,
|
|
450
|
+
minParts,
|
|
451
|
+
})).toEqual(expected);
|
|
452
|
+
});
|
|
453
|
+
it('should match a date when the reference date is before the min', () => {
|
|
454
|
+
// April 2, 2020 3:20 PM
|
|
455
|
+
const refParts = { month: 4, day: 2, year: 2020, hour: 15, minute: 20 };
|
|
456
|
+
// September 10, 2021 10:10 AM
|
|
457
|
+
const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
|
|
458
|
+
// September 14, 2021 10:11 AM
|
|
459
|
+
const maxParts = { month: 9, day: 14, year: 2021, hour: 10, minute: 11 };
|
|
460
|
+
// September 11, 2021 11:15 AM
|
|
461
|
+
const expected = {
|
|
462
|
+
year: 2021,
|
|
463
|
+
day: 11,
|
|
464
|
+
month: 9,
|
|
465
|
+
hour: 11,
|
|
466
|
+
minute: 15,
|
|
467
|
+
ampm: 'am',
|
|
468
|
+
dayOfWeek: undefined,
|
|
469
|
+
};
|
|
470
|
+
expect(getClosestValidDate({
|
|
471
|
+
refParts,
|
|
472
|
+
monthValues: [4, 9, 11],
|
|
473
|
+
dayValues: [11, 12, 13, 14],
|
|
474
|
+
yearValues: [2020, 2021, 2023],
|
|
475
|
+
hourValues: [9, 10, 11],
|
|
476
|
+
minuteValues: [11, 12, 13, 14, 15],
|
|
477
|
+
maxParts,
|
|
478
|
+
minParts,
|
|
479
|
+
})).toEqual(expected);
|
|
480
|
+
});
|
|
481
|
+
it('should match a date when the reference date is before the min', () => {
|
|
482
|
+
// April 2, 2020 3:20 PM
|
|
483
|
+
const refParts = { month: 4, day: 2, year: 2020, hour: 15, minute: 20 };
|
|
484
|
+
// September 10, 2021 10:10 AM
|
|
485
|
+
const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
|
|
486
|
+
// September 10, 2021 10:15 AM
|
|
487
|
+
const maxParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 15 };
|
|
488
|
+
// September 10, 2021 10:15 AM
|
|
489
|
+
const expected = {
|
|
490
|
+
month: 9,
|
|
491
|
+
day: 10,
|
|
492
|
+
year: 2021,
|
|
493
|
+
hour: 10,
|
|
494
|
+
minute: 15,
|
|
495
|
+
ampm: 'am',
|
|
496
|
+
dayOfWeek: undefined,
|
|
497
|
+
};
|
|
498
|
+
expect(getClosestValidDate({
|
|
499
|
+
refParts,
|
|
500
|
+
monthValues: [4, 9, 11],
|
|
501
|
+
dayValues: [10, 12, 13, 14],
|
|
502
|
+
yearValues: [2020, 2021, 2023],
|
|
503
|
+
hourValues: [9, 10, 11],
|
|
504
|
+
minuteValues: [11, 12, 13, 14, 15],
|
|
505
|
+
minParts,
|
|
506
|
+
maxParts,
|
|
507
|
+
})).toEqual(expected);
|
|
508
|
+
});
|
|
509
|
+
it('should only clamp minutes if within the same day and hour as min/max', () => {
|
|
510
|
+
// April 2, 2020 9:16 AM
|
|
511
|
+
const refParts = { month: 4, day: 2, year: 2020, hour: 9, minute: 16 };
|
|
512
|
+
// September 10, 2021 10:10 AM
|
|
513
|
+
const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
|
|
514
|
+
// September 10, 2021 11:15 AM
|
|
515
|
+
const maxParts = { month: 9, day: 10, year: 2021, hour: 11, minute: 15 };
|
|
516
|
+
// September 10, 2021 10:16 AM
|
|
517
|
+
const expected = {
|
|
518
|
+
month: 9,
|
|
519
|
+
day: 10,
|
|
520
|
+
year: 2021,
|
|
521
|
+
hour: 10,
|
|
522
|
+
minute: 16,
|
|
523
|
+
ampm: 'am',
|
|
524
|
+
dayOfWeek: undefined,
|
|
525
|
+
};
|
|
526
|
+
expect(getClosestValidDate({
|
|
527
|
+
refParts,
|
|
528
|
+
monthValues: [4, 9, 11],
|
|
529
|
+
dayValues: [10, 12, 13, 14],
|
|
530
|
+
yearValues: [2020, 2021, 2023],
|
|
531
|
+
hourValues: [9, 10, 11],
|
|
532
|
+
minuteValues: [10, 15, 16],
|
|
533
|
+
minParts,
|
|
534
|
+
maxParts,
|
|
535
|
+
})).toEqual(expected);
|
|
536
|
+
});
|
|
537
|
+
it('should return the closest valid date after adjusting the allowed year', () => {
|
|
538
|
+
// April 2, 2022 9:16 AM
|
|
539
|
+
const refParts = { month: 4, day: 2, year: 2022, hour: 9, minute: 16 };
|
|
540
|
+
// September 10, 2021 10:10 AM
|
|
541
|
+
const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
|
|
542
|
+
// September 10, 2023 11:15 AM
|
|
543
|
+
const maxParts = { month: 9, day: 10, year: 2023, hour: 11, minute: 15 };
|
|
544
|
+
// April 2, 2022 9:16 AM
|
|
545
|
+
const expected = {
|
|
546
|
+
month: 4,
|
|
547
|
+
day: 2,
|
|
548
|
+
year: 2022,
|
|
549
|
+
hour: 9,
|
|
550
|
+
minute: 16,
|
|
551
|
+
ampm: 'am',
|
|
552
|
+
dayOfWeek: undefined,
|
|
553
|
+
};
|
|
554
|
+
expect(getClosestValidDate({
|
|
555
|
+
refParts,
|
|
556
|
+
monthValues: [4, 9, 11],
|
|
557
|
+
dayValues: [2, 10, 12, 13, 14],
|
|
558
|
+
yearValues: [2020, 2021, 2022, 2023],
|
|
559
|
+
hourValues: [9, 10, 11],
|
|
560
|
+
minuteValues: [10, 15, 16],
|
|
561
|
+
minParts,
|
|
562
|
+
maxParts,
|
|
563
|
+
})).toEqual(expected);
|
|
564
|
+
});
|
|
565
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
5
|
+
import { Datetime } from "../../datetime";
|
|
6
|
+
describe('datetime: preferWheel', () => {
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
const mockIntersectionObserver = jest.fn();
|
|
9
|
+
mockIntersectionObserver.mockReturnValue({
|
|
10
|
+
observe: () => null,
|
|
11
|
+
unobserve: () => null,
|
|
12
|
+
disconnect: () => null,
|
|
13
|
+
});
|
|
14
|
+
global.IntersectionObserver = mockIntersectionObserver;
|
|
15
|
+
});
|
|
16
|
+
it('should select the working day when clicking the confirm button', async () => {
|
|
17
|
+
const page = await newSpecPage({
|
|
18
|
+
components: [Datetime],
|
|
19
|
+
html: '<ion-datetime prefer-wheel="true" max="2021" show-default-buttons="true"></ion-datetime>',
|
|
20
|
+
});
|
|
21
|
+
const datetime = page.body.querySelector('ion-datetime');
|
|
22
|
+
const confirmButton = datetime.shadowRoot.querySelector('#confirm-button');
|
|
23
|
+
confirmButton.click();
|
|
24
|
+
await page.waitForChanges();
|
|
25
|
+
expect(datetime.value).toBe('2021-12-31T23:59:00');
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { isSameDay } from "./comparison";
|
|
4
|
+
import { isAfter, isBefore, isSameDay } from "./comparison";
|
|
5
5
|
import { getNumDaysInMonth } from "./helpers";
|
|
6
6
|
import { clampDate, parseAmPm } from "./parse";
|
|
7
7
|
const twoDigit = (val) => {
|
|
@@ -355,32 +355,82 @@ export const validateParts = (parts, minParts, maxParts) => {
|
|
|
355
355
|
* Returns the closest date to refParts
|
|
356
356
|
* that also meets the constraints of
|
|
357
357
|
* the *Values params.
|
|
358
|
-
* @param refParts The reference date
|
|
359
|
-
* @param monthValues The allowed month values
|
|
360
|
-
* @param dayValues The allowed day (of the month) values
|
|
361
|
-
* @param yearValues The allowed year values
|
|
362
|
-
* @param hourValues The allowed hour values
|
|
363
|
-
* @param minuteValues The allowed minute values
|
|
364
358
|
*/
|
|
365
|
-
export const getClosestValidDate = (refParts, monthValues, dayValues, yearValues, hourValues, minuteValues) => {
|
|
359
|
+
export const getClosestValidDate = ({ refParts, monthValues, dayValues, yearValues, hourValues, minuteValues, minParts, maxParts, }) => {
|
|
366
360
|
const { hour, minute, day, month, year } = refParts;
|
|
367
361
|
const copyParts = Object.assign(Object.assign({}, refParts), { dayOfWeek: undefined });
|
|
362
|
+
if (yearValues !== undefined) {
|
|
363
|
+
// Filters out years that are out of the min/max bounds
|
|
364
|
+
const filteredYears = yearValues.filter((year) => {
|
|
365
|
+
if (minParts !== undefined && year < minParts.year) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
if (maxParts !== undefined && year > maxParts.year) {
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
return true;
|
|
372
|
+
});
|
|
373
|
+
copyParts.year = findClosestValue(year, filteredYears);
|
|
374
|
+
}
|
|
368
375
|
if (monthValues !== undefined) {
|
|
369
|
-
|
|
376
|
+
// Filters out months that are out of the min/max bounds
|
|
377
|
+
const filteredMonths = monthValues.filter((month) => {
|
|
378
|
+
if (minParts !== undefined && copyParts.year === minParts.year && month < minParts.month) {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
if (maxParts !== undefined && copyParts.year === maxParts.year && month > maxParts.month) {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
return true;
|
|
385
|
+
});
|
|
386
|
+
copyParts.month = findClosestValue(month, filteredMonths);
|
|
370
387
|
}
|
|
371
388
|
// Day is nullable but cannot be undefined
|
|
372
389
|
if (day !== null && dayValues !== undefined) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
390
|
+
// Filters out days that are out of the min/max bounds
|
|
391
|
+
const filteredDays = dayValues.filter((day) => {
|
|
392
|
+
if (minParts !== undefined && isBefore(Object.assign(Object.assign({}, copyParts), { day }), minParts)) {
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
if (maxParts !== undefined && isAfter(Object.assign(Object.assign({}, copyParts), { day }), maxParts)) {
|
|
396
|
+
return false;
|
|
397
|
+
}
|
|
398
|
+
return true;
|
|
399
|
+
});
|
|
400
|
+
copyParts.day = findClosestValue(day, filteredDays);
|
|
377
401
|
}
|
|
378
402
|
if (hour !== undefined && hourValues !== undefined) {
|
|
379
|
-
|
|
403
|
+
// Filters out hours that are out of the min/max bounds
|
|
404
|
+
const filteredHours = hourValues.filter((hour) => {
|
|
405
|
+
if ((minParts === null || minParts === void 0 ? void 0 : minParts.hour) !== undefined && isSameDay(copyParts, minParts) && hour < minParts.hour) {
|
|
406
|
+
return false;
|
|
407
|
+
}
|
|
408
|
+
if ((maxParts === null || maxParts === void 0 ? void 0 : maxParts.hour) !== undefined && isSameDay(copyParts, maxParts) && hour > maxParts.hour) {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
return true;
|
|
412
|
+
});
|
|
413
|
+
copyParts.hour = findClosestValue(hour, filteredHours);
|
|
380
414
|
copyParts.ampm = parseAmPm(copyParts.hour);
|
|
381
415
|
}
|
|
382
416
|
if (minute !== undefined && minuteValues !== undefined) {
|
|
383
|
-
|
|
417
|
+
// Filters out minutes that are out of the min/max bounds
|
|
418
|
+
const filteredMinutes = minuteValues.filter((minute) => {
|
|
419
|
+
if ((minParts === null || minParts === void 0 ? void 0 : minParts.minute) !== undefined &&
|
|
420
|
+
isSameDay(copyParts, minParts) &&
|
|
421
|
+
copyParts.hour === minParts.hour &&
|
|
422
|
+
minute < minParts.minute) {
|
|
423
|
+
return false;
|
|
424
|
+
}
|
|
425
|
+
if ((maxParts === null || maxParts === void 0 ? void 0 : maxParts.minute) !== undefined &&
|
|
426
|
+
isSameDay(copyParts, maxParts) &&
|
|
427
|
+
copyParts.hour === maxParts.hour &&
|
|
428
|
+
minute > maxParts.minute) {
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
431
|
+
return true;
|
|
432
|
+
});
|
|
433
|
+
copyParts.minute = findClosestValue(minute, filteredMinutes);
|
|
384
434
|
}
|
|
385
435
|
return copyParts;
|
|
386
436
|
};
|
|
@@ -666,10 +666,12 @@
|
|
|
666
666
|
|
|
667
667
|
::slotted([slot=start]) {
|
|
668
668
|
margin-inline-end: 16px;
|
|
669
|
+
margin-inline-start: 0;
|
|
669
670
|
}
|
|
670
671
|
|
|
671
672
|
::slotted([slot=end]) {
|
|
672
673
|
margin-inline-start: 16px;
|
|
674
|
+
margin-inline-end: 0;
|
|
673
675
|
}
|
|
674
676
|
|
|
675
677
|
/**
|
|
@@ -810,4 +812,22 @@
|
|
|
810
812
|
:host(.legacy-input) .native-input[disabled],
|
|
811
813
|
:host(.input-disabled) {
|
|
812
814
|
opacity: 0.3;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Slotted buttons have a lot of default padding that can
|
|
819
|
+
* cause them to look misaligned from other pieces such
|
|
820
|
+
* as the control's label, especially when using a clear
|
|
821
|
+
* fill. We also make them circular to ensure that non-
|
|
822
|
+
* clear buttons and the focus/hover state on clear ones
|
|
823
|
+
* don't look too crowded.
|
|
824
|
+
*/
|
|
825
|
+
::slotted(ion-button[slot=start].button-has-icon-only),
|
|
826
|
+
::slotted(ion-button[slot=end].button-has-icon-only) {
|
|
827
|
+
--border-radius: 50%;
|
|
828
|
+
--padding-start: 0;
|
|
829
|
+
--padding-end: 0;
|
|
830
|
+
--padding-top: 0;
|
|
831
|
+
--padding-bottom: 0;
|
|
832
|
+
aspect-ratio: 1;
|
|
813
833
|
}
|
|
@@ -269,15 +269,34 @@ export class Input {
|
|
|
269
269
|
if (!this.shouldClearOnEdit()) {
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* The following keys do not modify the
|
|
274
|
+
* contents of the input. As a result, pressing
|
|
275
|
+
* them should not edit the input.
|
|
276
|
+
*
|
|
277
|
+
* We can't check to see if the value of the input
|
|
278
|
+
* was changed because we call checkClearOnEdit
|
|
279
|
+
* in a keydown listener, and the key has not yet
|
|
280
|
+
* been added to the input.
|
|
281
|
+
*/
|
|
282
|
+
const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control'];
|
|
283
|
+
const pressedIgnoredKey = IGNORED_KEYS.includes(ev.key);
|
|
272
284
|
/**
|
|
273
285
|
* Clear the input if the control has not been previously cleared during focus.
|
|
274
286
|
* Do not clear if the user hitting enter to submit a form.
|
|
275
287
|
*/
|
|
276
|
-
if (!this.didInputClearOnEdit && this.hasValue() &&
|
|
288
|
+
if (!this.didInputClearOnEdit && this.hasValue() && !pressedIgnoredKey) {
|
|
277
289
|
this.value = '';
|
|
278
290
|
this.emitInputChange(ev);
|
|
279
291
|
}
|
|
280
|
-
|
|
292
|
+
/**
|
|
293
|
+
* Pressing an IGNORED_KEYS first and
|
|
294
|
+
* then an allowed key will cause the input to not
|
|
295
|
+
* be cleared.
|
|
296
|
+
*/
|
|
297
|
+
if (!pressedIgnoredKey) {
|
|
298
|
+
this.didInputClearOnEdit = true;
|
|
299
|
+
}
|
|
281
300
|
}
|
|
282
301
|
hasValue() {
|
|
283
302
|
return this.getValue().length > 0;
|
|
@@ -658,7 +677,7 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
|
|
|
658
677
|
"optional": true,
|
|
659
678
|
"docs": {
|
|
660
679
|
"tags": [],
|
|
661
|
-
"text": "A callback used to format the counter text.\nBy default the counter text is set to \"itemLength / maxLength\"."
|
|
680
|
+
"text": "A callback used to format the counter text.\nBy default the counter text is set to \"itemLength / maxLength\".\n\nSee https://ionicframework.com/docs/troubleshooting/runtime#accessing-this\nif you need to access `this` from within the callback."
|
|
662
681
|
}
|
|
663
682
|
},
|
|
664
683
|
"debounce": {
|
|
@@ -666,10 +666,12 @@
|
|
|
666
666
|
|
|
667
667
|
::slotted([slot=start]) {
|
|
668
668
|
margin-inline-end: 16px;
|
|
669
|
+
margin-inline-start: 0;
|
|
669
670
|
}
|
|
670
671
|
|
|
671
672
|
::slotted([slot=end]) {
|
|
672
673
|
margin-inline-start: 16px;
|
|
674
|
+
margin-inline-end: 0;
|
|
673
675
|
}
|
|
674
676
|
|
|
675
677
|
/**
|
|
@@ -1422,4 +1424,23 @@
|
|
|
1422
1424
|
|
|
1423
1425
|
:host(.input-shape-round) {
|
|
1424
1426
|
--border-radius: 16px;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* Slotted buttons have a lot of default padding that can
|
|
1431
|
+
* cause them to look misaligned from other pieces such
|
|
1432
|
+
* as the control's label, especially when using a clear
|
|
1433
|
+
* fill. We also make them circular to ensure that non-
|
|
1434
|
+
* clear buttons and the focus/hover state on clear ones
|
|
1435
|
+
* don't look too crowded.
|
|
1436
|
+
*/
|
|
1437
|
+
::slotted(ion-button[slot=start].button-has-icon-only),
|
|
1438
|
+
::slotted(ion-button[slot=end].button-has-icon-only) {
|
|
1439
|
+
--border-radius: 50%;
|
|
1440
|
+
--padding-start: 8px;
|
|
1441
|
+
--padding-end: 8px;
|
|
1442
|
+
--padding-top: 8px;
|
|
1443
|
+
--padding-bottom: 8px;
|
|
1444
|
+
aspect-ratio: 1;
|
|
1445
|
+
min-height: 40px;
|
|
1425
1446
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { test, configs } from "../../../../utils/test/playwright/index";
|
|
6
|
+
const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control'];
|
|
6
7
|
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
7
8
|
test.describe(title('input: clearOnEdit'), () => {
|
|
8
9
|
test('should clear when typed into', async ({ page }) => {
|
|
@@ -13,21 +14,40 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
13
14
|
await ionInput.next();
|
|
14
15
|
await expect(input).toHaveJSProperty('value', 'h');
|
|
15
16
|
});
|
|
16
|
-
test('should not clear
|
|
17
|
-
await page.setContent(`<ion-input value="
|
|
17
|
+
test('should not clear the input if it does not have an initial value when typing', async ({ page }) => {
|
|
18
|
+
await page.setContent(`<ion-input label="input" value="" clear-on-edit="true"></ion-input>`, config);
|
|
18
19
|
const input = page.locator('ion-input');
|
|
19
|
-
await input.
|
|
20
|
-
await
|
|
21
|
-
await
|
|
22
|
-
|
|
20
|
+
await input.click();
|
|
21
|
+
await input.type('hello world');
|
|
22
|
+
await expect(input).toHaveJSProperty('value', 'hello world');
|
|
23
|
+
});
|
|
24
|
+
IGNORED_KEYS.forEach((ignoredKey) => {
|
|
25
|
+
test(`should not clear when ${ignoredKey} is pressed`, async ({ page, skip }) => {
|
|
26
|
+
skip.browser((browserName) => browserName === 'firefox' && ignoredKey === 'Meta', 'Firefox incorrectly adds "OS" to the input when pressing the Meta key on Linux');
|
|
27
|
+
await page.setContent(`<ion-input value="abc" clear-on-edit="true" aria-label="input"></ion-input>`, config);
|
|
28
|
+
const input = page.locator('ion-input');
|
|
29
|
+
await input.locator('input').focus();
|
|
30
|
+
await page.keyboard.press(ignoredKey);
|
|
31
|
+
await page.waitForChanges();
|
|
32
|
+
await expect(input).toHaveJSProperty('value', 'abc');
|
|
33
|
+
});
|
|
23
34
|
});
|
|
24
|
-
test('should
|
|
35
|
+
test('should clear after when pressing valid key after pressing ignored key', async ({ page }) => {
|
|
36
|
+
test.info().annotations.push({
|
|
37
|
+
type: 'issue',
|
|
38
|
+
description: 'https://github.com/ionic-team/ionic-framework/issues/28633',
|
|
39
|
+
});
|
|
25
40
|
await page.setContent(`<ion-input value="abc" clear-on-edit="true" aria-label="input"></ion-input>`, config);
|
|
26
41
|
const input = page.locator('ion-input');
|
|
27
42
|
await input.locator('input').focus();
|
|
28
|
-
|
|
43
|
+
// ignored
|
|
44
|
+
await page.keyboard.press('Shift');
|
|
29
45
|
await page.waitForChanges();
|
|
30
46
|
await expect(input).toHaveJSProperty('value', 'abc');
|
|
47
|
+
// allowed
|
|
48
|
+
await page.keyboard.press('a');
|
|
49
|
+
await page.waitForChanges();
|
|
50
|
+
await expect(input).toHaveJSProperty('value', 'a');
|
|
31
51
|
});
|
|
32
52
|
});
|
|
33
53
|
});
|
|
@@ -9,7 +9,9 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
9
9
|
await page.setContent(`
|
|
10
10
|
<ion-input label-placement="start" fill="solid" value="100" label="Weight" clear-input="true">
|
|
11
11
|
<ion-icon slot="start" name="barbell" aria-hidden="true"></ion-icon>
|
|
12
|
-
<ion-
|
|
12
|
+
<ion-button slot="end" aria-label="Show/hide password">
|
|
13
|
+
<ion-icon slot="icon-only" name="lock-closed" aria-hidden="true"></ion-icon>
|
|
14
|
+
</ion-button>
|
|
13
15
|
</ion-input>
|
|
14
16
|
`, config);
|
|
15
17
|
const input = page.locator('ion-input');
|
|
@@ -19,7 +21,9 @@ configs().forEach(({ title, screenshot, config }) => {
|
|
|
19
21
|
await page.setContent(`
|
|
20
22
|
<ion-input label-placement="floating" fill="solid" value="100" label="Weight" clear-input="true">
|
|
21
23
|
<ion-icon slot="start" name="barbell" aria-hidden="true"></ion-icon>
|
|
22
|
-
<ion-
|
|
24
|
+
<ion-button slot="end" aria-label="Show/hide password">
|
|
25
|
+
<ion-icon slot="icon-only" name="lock-closed" aria-hidden="true"></ion-icon>
|
|
26
|
+
</ion-button>
|
|
23
27
|
</ion-input>
|
|
24
28
|
`, config);
|
|
25
29
|
const input = page.locator('ion-input');
|
|
@@ -418,6 +418,12 @@ button, a {
|
|
|
418
418
|
::slotted(ion-label:not([slot=end])) {
|
|
419
419
|
flex: 1;
|
|
420
420
|
width: min-content;
|
|
421
|
+
/**
|
|
422
|
+
* We allow labels in the default
|
|
423
|
+
* slot to grow. However, we do not
|
|
424
|
+
* want them to grow indefinitely.
|
|
425
|
+
*/
|
|
426
|
+
max-width: 100%;
|
|
421
427
|
}
|
|
422
428
|
|
|
423
429
|
:host(.item-input) {
|
|
@@ -418,6 +418,12 @@ button, a {
|
|
|
418
418
|
::slotted(ion-label:not([slot=end])) {
|
|
419
419
|
flex: 1;
|
|
420
420
|
width: min-content;
|
|
421
|
+
/**
|
|
422
|
+
* We allow labels in the default
|
|
423
|
+
* slot to grow. However, we do not
|
|
424
|
+
* want them to grow indefinitely.
|
|
425
|
+
*/
|
|
426
|
+
max-width: 100%;
|
|
421
427
|
}
|
|
422
428
|
|
|
423
429
|
:host(.item-input) {
|
|
@@ -64,3 +64,28 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
+
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
68
|
+
test.describe(title('label: text wrapping in item'), () => {
|
|
69
|
+
test('long text should not cause label to expand infinitely', async ({ page }) => {
|
|
70
|
+
await page.setContent(`
|
|
71
|
+
<style>
|
|
72
|
+
div {
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
78
|
+
<ion-item>
|
|
79
|
+
<ion-label>
|
|
80
|
+
<!-- This text should be truncated with ellipses -->
|
|
81
|
+
<div>
|
|
82
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
83
|
+
</div>
|
|
84
|
+
</ion-label>
|
|
85
|
+
</ion-item>
|
|
86
|
+
`, config);
|
|
87
|
+
const item = page.locator('ion-item');
|
|
88
|
+
await expect(item).toHaveScreenshot(screenshot(`label-item-wrap`));
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
@@ -305,14 +305,13 @@ ion-backdrop {
|
|
|
305
305
|
left: 0;
|
|
306
306
|
right: 0;
|
|
307
307
|
width: auto;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
box-shadow: none !important;
|
|
308
|
+
transform: none;
|
|
309
|
+
box-shadow: none;
|
|
311
310
|
}
|
|
312
311
|
|
|
313
312
|
:host(.menu-pane-visible) ion-backdrop {
|
|
313
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
314
314
|
display: hidden !important;
|
|
315
|
-
/* stylelint-enable declaration-no-important */
|
|
316
315
|
}
|
|
317
316
|
|
|
318
317
|
/**
|
|
@@ -305,14 +305,13 @@ ion-backdrop {
|
|
|
305
305
|
left: 0;
|
|
306
306
|
right: 0;
|
|
307
307
|
width: auto;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
box-shadow: none !important;
|
|
308
|
+
transform: none;
|
|
309
|
+
box-shadow: none;
|
|
311
310
|
}
|
|
312
311
|
|
|
313
312
|
:host(.menu-pane-visible) ion-backdrop {
|
|
313
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
314
314
|
display: hidden !important;
|
|
315
|
-
/* stylelint-enable declaration-no-important */
|
|
316
315
|
}
|
|
317
316
|
|
|
318
317
|
/**
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { expect } from "@playwright/test";
|
|
5
|
+
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
+
/**
|
|
7
|
+
* This behavior does not vary across directions.
|
|
8
|
+
*/
|
|
9
|
+
configs({ directions: ['ltr'] }).forEach(({ title, config, screenshot }) => {
|
|
10
|
+
test.describe(title('menu: custom'), () => {
|
|
11
|
+
test('should allow styling the menu box shadow when inside a split pane', async ({ page }) => {
|
|
12
|
+
test.info().annotations.push({
|
|
13
|
+
type: 'issue',
|
|
14
|
+
description: 'https://github.com/ionic-team/ionic-framework/issues/21530',
|
|
15
|
+
});
|
|
16
|
+
await page.setContent(`
|
|
17
|
+
<style>
|
|
18
|
+
ion-split-pane {
|
|
19
|
+
--side-width: 200px;
|
|
20
|
+
--side-min-width: 200px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ion-menu {
|
|
24
|
+
box-shadow: 10px 5px 5px red;
|
|
25
|
+
z-index: 1;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
|
|
29
|
+
<ion-app>
|
|
30
|
+
<ion-split-pane when="xs" id="splitPane" content-id="split-content">
|
|
31
|
+
<ion-menu side="start" content-id="split-content">
|
|
32
|
+
<ion-header>
|
|
33
|
+
<ion-toolbar color="secondary">
|
|
34
|
+
<ion-title>Menu</ion-title>
|
|
35
|
+
</ion-toolbar>
|
|
36
|
+
</ion-header>
|
|
37
|
+
|
|
38
|
+
<ion-content class="ion-padding">Menu Content</ion-content>
|
|
39
|
+
</ion-menu>
|
|
40
|
+
|
|
41
|
+
<div class="ion-page" id="split-content">
|
|
42
|
+
<ion-header>
|
|
43
|
+
<ion-toolbar>
|
|
44
|
+
<ion-buttons slot="start">
|
|
45
|
+
<ion-menu-button></ion-menu-button>
|
|
46
|
+
</ion-buttons>
|
|
47
|
+
|
|
48
|
+
<ion-title>Content</ion-title>
|
|
49
|
+
</ion-toolbar>
|
|
50
|
+
</ion-header>
|
|
51
|
+
|
|
52
|
+
<ion-content class="ion-padding">Main Content</ion-content>
|
|
53
|
+
</div>
|
|
54
|
+
</ion-split-pane>
|
|
55
|
+
</ion-app>
|
|
56
|
+
`, config);
|
|
57
|
+
const app = page.locator('ion-app');
|
|
58
|
+
await expect(app).toHaveScreenshot(screenshot(`menu-custom-split-pane`));
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -1003,7 +1003,7 @@ export class Modal {
|
|
|
1003
1003
|
"optional": false,
|
|
1004
1004
|
"docs": {
|
|
1005
1005
|
"tags": [],
|
|
1006
|
-
"text": "Determines whether or not a modal can dismiss\nwhen calling the `dismiss` method.\n\nIf the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss.\nIf the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss."
|
|
1006
|
+
"text": "Determines whether or not a modal can dismiss\nwhen calling the `dismiss` method.\n\nIf the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss.\nIf the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss.\n\nSee https://ionicframework.com/docs/troubleshooting/runtime#accessing-this\nif you need to access `this` from within the callback."
|
|
1007
1007
|
},
|
|
1008
1008
|
"attribute": "can-dismiss",
|
|
1009
1009
|
"reflect": false,
|