voyager-ionic-core 7.7.2 → 7.8.6
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/action-sheet.js +3 -3
- package/components/alert.js +2 -2
- package/components/backdrop.js +1 -1
- package/components/button.js +4 -4
- package/components/buttons.js +1 -1
- package/components/checkbox.js +1 -1
- package/components/data.js +23 -38
- package/components/hardware-back-button.js +3 -3
- package/components/helpers.js +2 -2
- package/components/input-shims.js +5 -5
- package/components/ion-app.js +4 -4
- package/components/ion-avatar.js +1 -1
- package/components/ion-back-button.js +2 -2
- package/components/ion-badge.js +2 -2
- package/components/ion-breadcrumb.js +4 -4
- package/components/ion-breadcrumbs.js +2 -2
- package/components/ion-card-content.js +1 -1
- package/components/ion-card-header.js +2 -2
- package/components/ion-card-subtitle.js +2 -2
- package/components/ion-card-title.js +2 -2
- package/components/ion-card.js +1 -1
- package/components/ion-chip.js +2 -2
- package/components/ion-col.js +2 -2
- package/components/ion-content.js +3 -3
- package/components/ion-datetime-button.js +12 -11
- package/components/ion-datetime.js +75 -12
- package/components/ion-fab-button.js +2 -2
- package/components/ion-fab-list.js +2 -2
- package/components/ion-fab.js +2 -2
- package/components/ion-footer.js +2 -2
- package/components/ion-grid.js +2 -2
- package/components/ion-header.js +3 -3
- package/components/ion-img.js +1 -1
- package/components/ion-infinite-scroll-content.js +2 -2
- package/components/ion-infinite-scroll.js +1 -1
- package/components/ion-input.js +8 -0
- package/components/ion-item-divider.js +2 -2
- package/components/ion-item-group.js +1 -1
- package/components/ion-item-option.js +2 -2
- package/components/ion-item-options.js +1 -1
- package/components/ion-item-sliding.js +1 -1
- package/components/ion-loading.js +2 -2
- package/components/ion-menu-button.js +2 -2
- package/components/ion-menu-toggle.js +2 -2
- package/components/ion-menu.js +3 -3
- package/components/ion-modal.js +81 -25
- package/components/ion-nav-link.js +1 -1
- package/components/ion-nav.js +1 -1
- package/components/ion-picker.js +2 -2
- package/components/ion-progress-bar.js +1 -1
- package/components/ion-range.js +126 -21
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-refresher.js +1 -1
- package/components/ion-reorder-group.js +1 -1
- package/components/ion-reorder.js +1 -1
- package/components/ion-router-link.js +2 -2
- package/components/ion-router-outlet.js +1 -1
- package/components/ion-row.js +1 -1
- package/components/ion-searchbar.js +35 -6
- package/components/ion-segment-button.js +3 -3
- package/components/ion-segment.js +2 -2
- package/components/ion-select-option.js +1 -1
- package/components/ion-select.js +3 -3
- package/components/ion-skeleton-text.js +2 -2
- package/components/ion-split-pane.js +2 -2
- package/components/ion-tab-bar.js +2 -2
- package/components/ion-tab-button.js +2 -2
- package/components/ion-tab.js +2 -2
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +2 -2
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +2 -2
- package/components/ion-toast.js +2 -2
- package/components/ion-toolbar.js +2 -2
- package/components/item.js +1 -1
- package/components/label.js +3 -3
- package/components/list-header.js +2 -2
- package/components/list.js +1 -1
- package/components/note.js +2 -2
- package/components/overlays.js +127 -39
- package/components/picker-column-internal.js +8 -4
- package/components/picker-column.js +2 -2
- package/components/picker-internal.js +2 -2
- package/components/popover.js +4 -4
- package/components/radio-group.js +1 -1
- package/components/ripple-effect.js +1 -1
- package/components/select-popover.js +1 -1
- package/components/spinner.js +1 -1
- package/css/core.css +1 -561
- package/css/core.css.map +1 -1
- package/css/display.css +1 -131
- package/css/display.css.map +1 -1
- package/css/flex-utils.css +1 -81
- package/css/flex-utils.css.map +1 -1
- package/css/float-elements.css +1 -293
- package/css/float-elements.css.map +1 -1
- package/css/global.bundle.css +1 -457
- package/css/global.bundle.css.map +1 -1
- package/css/ionic-swiper.css +1 -127
- package/css/ionic-swiper.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/normalize.css +1 -150
- package/css/normalize.css.map +1 -1
- package/css/padding.css +1 -202
- package/css/padding.css.map +1 -1
- package/css/structure.css +1 -152
- package/css/structure.css.map +1 -1
- package/css/text-alignment.css +1 -243
- package/css/text-alignment.css.map +1 -1
- package/css/text-transformation.css +1 -158
- package/css/text-transformation.css.map +1 -1
- package/css/typography.css +1 -157
- package/css/typography.css.map +1 -1
- package/css/utils.bundle.css +1 -1100
- package/css/utils.bundle.css.map +1 -1
- package/dist/cjs/{animation-fdab9de5.js → animation-c2840aea.js} +1 -1
- package/dist/cjs/{app-globals-92ad1b3d.js → app-globals-c5eb104c.js} +1 -1
- package/dist/cjs/{button-active-2d6520ec.js → button-active-181d142e.js} +1 -1
- package/dist/cjs/{data-a5109f09.js → data-4487a815.js} +22 -39
- package/dist/cjs/{form-controller-7b90d7b7.js → form-controller-c83330c0.js} +1 -1
- package/dist/cjs/{framework-delegate-a3e6d060.js → framework-delegate-e0e13baa.js} +1 -1
- package/dist/cjs/{hardware-back-button-2696acaf.js → hardware-back-button-adba3ac7.js} +5 -5
- package/dist/cjs/{helpers-2e1028fa.js → helpers-da4c0ed1.js} +2 -2
- package/dist/cjs/{index-c3580a90.js → index-1f7c54f8.js} +4 -4
- package/dist/cjs/{index-0ffe376d.js → index-22617dd6.js} +51 -7
- package/dist/cjs/{index-a43f7a0f.js → index-5c38afe7.js} +4 -4
- package/dist/cjs/{index-10da82ce.js → index-62290fec.js} +1 -1
- package/dist/cjs/{index-53d162b2.js → index-bef98850.js} +1 -1
- package/dist/cjs/index.cjs.js +11 -11
- package/dist/cjs/{input-shims-6f804705.js → input-shims-05ac9905.js} +7 -7
- package/dist/cjs/{input.utils-d693d18a.js → input.utils-d7dca90f.js} +1 -1
- package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +11 -11
- package/dist/cjs/ion-alert.cjs.entry.js +10 -10
- package/dist/cjs/ion-app_8.cjs.entry.js +29 -29
- package/dist/cjs/ion-avatar_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-back-button.cjs.entry.js +5 -5
- package/dist/cjs/ion-backdrop.cjs.entry.js +3 -3
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +9 -9
- package/dist/cjs/ion-button_2.cjs.entry.js +7 -7
- package/dist/cjs/ion-card_5.cjs.entry.js +11 -11
- package/dist/cjs/ion-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/ion-chip.cjs.entry.js +4 -4
- package/dist/cjs/ion-col_3.cjs.entry.js +7 -7
- package/dist/cjs/ion-datetime-button.cjs.entry.js +15 -14
- package/dist/cjs/ion-datetime_3.cjs.entry.js +83 -23
- package/dist/cjs/ion-fab_3.cjs.entry.js +9 -9
- package/dist/cjs/ion-img.cjs.entry.js +4 -4
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +7 -7
- package/dist/cjs/ion-input.cjs.entry.js +14 -6
- package/dist/cjs/ion-item-option_3.cjs.entry.js +8 -8
- package/dist/cjs/ion-item_8.cjs.entry.js +17 -17
- package/dist/cjs/ion-loading.cjs.entry.js +9 -9
- package/dist/cjs/ion-menu_3.cjs.entry.js +14 -14
- package/dist/cjs/ion-modal.cjs.entry.js +90 -34
- package/dist/cjs/ion-nav_2.cjs.entry.js +8 -8
- package/dist/cjs/ion-picker-column-internal.cjs.entry.js +11 -7
- package/dist/cjs/ion-picker-internal.cjs.entry.js +4 -4
- package/dist/cjs/ion-popover.cjs.entry.js +12 -12
- package/dist/cjs/ion-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/ion-radio_2.cjs.entry.js +5 -5
- package/dist/cjs/ion-range.cjs.entry.js +131 -26
- package/dist/cjs/ion-refresher_2.cjs.entry.js +7 -7
- package/dist/cjs/ion-reorder_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +3 -3
- package/dist/cjs/ion-route_4.cjs.entry.js +5 -5
- package/dist/cjs/ion-searchbar.cjs.entry.js +32 -8
- package/dist/cjs/ion-segment_2.cjs.entry.js +8 -8
- package/dist/cjs/ion-select_3.cjs.entry.js +12 -12
- package/dist/cjs/ion-spinner.cjs.entry.js +3 -3
- package/dist/cjs/ion-split-pane.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +7 -7
- package/dist/cjs/ion-tab_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-text.cjs.entry.js +4 -4
- package/dist/cjs/ion-textarea.cjs.entry.js +6 -6
- package/dist/cjs/ion-toast.cjs.entry.js +9 -9
- package/dist/cjs/ion-toggle.cjs.entry.js +4 -4
- package/dist/cjs/{ionic-global-59a10130.js → ionic-global-c5503e93.js} +1 -1
- package/dist/cjs/ionic.cjs.js +5 -5
- package/dist/cjs/{ios.transition-c3b11cc3.js → ios.transition-30830fc4.js} +4 -4
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-82a8c649.js → md.transition-7f581866.js} +4 -4
- package/dist/cjs/{notch-controller-db0127c4.js → notch-controller-bfbcbb7a.js} +1 -1
- package/dist/cjs/{overlays-fb7ca451.js → overlays-129dfc13.js} +129 -41
- package/dist/cjs/{status-tap-692f6d32.js → status-tap-03d82840.js} +3 -3
- package/dist/cjs/{swipe-back-7a848bb8.js → swipe-back-dcd0d4a9.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/action-sheet/action-sheet.js +3 -3
- package/dist/collection/components/alert/alert.js +2 -2
- package/dist/collection/components/alert/test/a11y/alert.e2e.js +4 -0
- package/dist/collection/components/app/app.js +4 -4
- package/dist/collection/components/avatar/avatar.js +1 -1
- package/dist/collection/components/back-button/back-button.js +2 -2
- package/dist/collection/components/backdrop/backdrop.js +1 -1
- package/dist/collection/components/badge/badge.js +2 -2
- package/dist/collection/components/breadcrumb/breadcrumb.js +4 -4
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +2 -2
- package/dist/collection/components/button/button.ios.css +5 -5
- package/dist/collection/components/button/button.js +2 -2
- package/dist/collection/components/button/button.md.css +4 -5
- package/dist/collection/components/buttons/buttons.js +1 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/card-content/card-content.js +1 -1
- package/dist/collection/components/card-header/card-header.js +2 -2
- package/dist/collection/components/card-subtitle/card-subtitle.js +2 -2
- package/dist/collection/components/card-title/card-title.js +2 -2
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/checkbox/test/checkbox.spec.js +12 -0
- package/dist/collection/components/chip/chip.js +2 -2
- package/dist/collection/components/col/col.js +2 -2
- package/dist/collection/components/content/content.js +3 -3
- package/dist/collection/components/datetime/datetime.js +56 -12
- package/dist/collection/components/datetime/test/basic/datetime.e2e.js +80 -1
- package/dist/collection/components/datetime/test/format.spec.js +65 -15
- package/dist/collection/components/datetime/utils/format.js +24 -37
- package/dist/collection/components/datetime/utils/validate.js +45 -0
- package/dist/collection/components/datetime-button/datetime-button.js +12 -11
- package/dist/collection/components/datetime-button/test/basic/datetime-button.e2e.js +65 -0
- package/dist/collection/components/fab/fab.js +2 -2
- package/dist/collection/components/fab-button/fab-button.js +2 -2
- package/dist/collection/components/fab-list/fab-list.js +2 -2
- package/dist/collection/components/footer/footer.js +2 -2
- package/dist/collection/components/grid/grid.js +2 -2
- package/dist/collection/components/header/header.ios.css +5 -2
- package/dist/collection/components/header/header.js +2 -2
- package/dist/collection/components/header/test/basic/header.e2e.js +77 -0
- package/dist/collection/components/img/img.js +1 -1
- package/dist/collection/components/infinite-scroll/infinite-scroll.js +1 -1
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +2 -2
- package/dist/collection/components/input/input.js +8 -0
- package/dist/collection/components/item/item.js +1 -1
- package/dist/collection/components/item/test/buttons/item.e2e.js +20 -4
- package/dist/collection/components/item-divider/item-divider.js +2 -2
- package/dist/collection/components/item-group/item-group.js +1 -1
- package/dist/collection/components/item-option/item-option.js +2 -2
- package/dist/collection/components/item-options/item-options.js +1 -1
- package/dist/collection/components/item-sliding/item-sliding.js +1 -1
- package/dist/collection/components/label/label.ios.css +0 -4
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/label/label.md.css +0 -4
- package/dist/collection/components/label/test/item/item.e2e.js +24 -0
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list-header/list-header.js +2 -2
- package/dist/collection/components/loading/loading.js +2 -2
- package/dist/collection/components/menu/menu.js +3 -3
- package/dist/collection/components/menu-button/menu-button.js +2 -2
- package/dist/collection/components/menu-toggle/menu-toggle.js +2 -2
- package/dist/collection/components/modal/gestures/sheet.js +45 -20
- package/dist/collection/components/modal/modal.js +38 -6
- package/dist/collection/components/modal/test/modal-attributes.spec.js +32 -0
- package/dist/collection/components/nav/nav.js +1 -1
- package/dist/collection/components/nav-link/nav-link.js +1 -1
- package/dist/collection/components/note/note.js +2 -2
- package/dist/collection/components/picker/picker.js +2 -2
- package/dist/collection/components/picker-column/picker-column.js +2 -2
- package/dist/collection/components/picker-column-internal/picker-column-internal.js +8 -4
- package/dist/collection/components/picker-internal/picker-internal.js +2 -2
- package/dist/collection/components/popover/popover.ios.css +0 -1
- package/dist/collection/components/popover/popover.js +2 -2
- package/dist/collection/components/popover/popover.md.css +0 -1
- package/dist/collection/components/popover/test/basic/popover.e2e.js +76 -0
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/range/range.js +126 -21
- package/dist/collection/components/range/test/range-events.e2e.js +27 -0
- package/dist/collection/components/refresher/refresher.js +1 -1
- package/dist/collection/components/refresher-content/refresher-content.js +1 -1
- package/dist/collection/components/reorder/reorder.js +1 -1
- package/dist/collection/components/reorder-group/reorder-group.js +1 -1
- package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
- package/dist/collection/components/router-link/router-link.js +2 -2
- package/dist/collection/components/router-outlet/router-outlet.js +1 -1
- package/dist/collection/components/row/row.js +1 -1
- package/dist/collection/components/searchbar/searchbar.js +86 -6
- package/dist/collection/components/searchbar/test/searchbar.spec.js +20 -2
- package/dist/collection/components/segment/segment.js +2 -2
- package/dist/collection/components/segment-button/segment-button.js +3 -3
- package/dist/collection/components/select/select.js +3 -3
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/select-popover/select-popover.js +1 -1
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/thumbnail/thumbnail.js +1 -1
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toggle/toggle.js +1 -1
- package/dist/collection/components/toolbar/test/basic/toolbar.e2e.js +133 -5
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/utils/hardware-back-button.js +2 -2
- package/dist/collection/utils/helpers.js +1 -1
- package/dist/collection/utils/input-shims/hacks/scroll-assist.js +5 -5
- package/dist/collection/utils/overlays.js +127 -39
- package/dist/collection/utils/test/overlays/overlays.e2e.js +89 -0
- package/dist/collection/utils/test/overlays/overlays.spec.js +53 -0
- package/dist/docs.json +117 -4
- package/dist/esm/{animation-60dbdd13.js → animation-6a0c5338.js} +1 -1
- package/dist/esm/{app-globals-5cf6195b.js → app-globals-318eef52.js} +1 -1
- package/dist/esm/{button-active-47ac8092.js → button-active-414be235.js} +1 -1
- package/dist/esm/{data-0f3ab200.js → data-bb424ba8.js} +23 -38
- package/dist/esm/{form-controller-014aa89f.js → form-controller-21dd62b1.js} +1 -1
- package/dist/esm/{framework-delegate-fed7fe7c.js → framework-delegate-ed4ba327.js} +1 -1
- package/dist/esm/{hardware-back-button-b410a047.js → hardware-back-button-6107a37c.js} +5 -5
- package/dist/esm/{helpers-c0b9ca37.js → helpers-be245865.js} +2 -2
- package/dist/esm/{index-d64f34ea.js → index-020f5464.js} +1 -1
- package/dist/esm/{index-47b2066d.js → index-6e05b96e.js} +4 -4
- package/dist/esm/{index-4c30cddd.js → index-a1a47f01.js} +51 -7
- package/dist/esm/{index-eb12ef92.js → index-f3946ac1.js} +1 -1
- package/dist/esm/{index-0b4beb69.js → index-fae1515c.js} +4 -4
- package/dist/esm/index.js +11 -11
- package/dist/esm/{input-shims-b90ca55f.js → input-shims-a52daa3a.js} +7 -7
- package/dist/esm/{input.utils-6e9b0046.js → input.utils-a445f677.js} +1 -1
- package/dist/esm/ion-accordion_2.entry.js +3 -3
- package/dist/esm/ion-action-sheet.entry.js +11 -11
- package/dist/esm/ion-alert.entry.js +10 -10
- package/dist/esm/ion-app_8.entry.js +29 -29
- package/dist/esm/ion-avatar_3.entry.js +6 -6
- package/dist/esm/ion-back-button.entry.js +5 -5
- package/dist/esm/ion-backdrop.entry.js +3 -3
- package/dist/esm/ion-breadcrumb_2.entry.js +9 -9
- package/dist/esm/ion-button_2.entry.js +7 -7
- package/dist/esm/ion-card_5.entry.js +11 -11
- package/dist/esm/ion-checkbox.entry.js +5 -5
- package/dist/esm/ion-chip.entry.js +4 -4
- package/dist/esm/ion-col_3.entry.js +7 -7
- package/dist/esm/ion-datetime-button.entry.js +15 -14
- package/dist/esm/ion-datetime_3.entry.js +83 -23
- package/dist/esm/ion-fab_3.entry.js +9 -9
- package/dist/esm/ion-img.entry.js +4 -4
- package/dist/esm/ion-infinite-scroll_2.entry.js +7 -7
- package/dist/esm/ion-input.entry.js +14 -6
- package/dist/esm/ion-item-option_3.entry.js +8 -8
- package/dist/esm/ion-item_8.entry.js +17 -17
- package/dist/esm/ion-loading.entry.js +9 -9
- package/dist/esm/ion-menu_3.entry.js +14 -14
- package/dist/esm/ion-modal.entry.js +90 -34
- package/dist/esm/ion-nav_2.entry.js +8 -8
- package/dist/esm/ion-picker-column-internal.entry.js +11 -7
- package/dist/esm/ion-picker-internal.entry.js +4 -4
- package/dist/esm/ion-popover.entry.js +12 -12
- package/dist/esm/ion-progress-bar.entry.js +4 -4
- package/dist/esm/ion-radio_2.entry.js +5 -5
- package/dist/esm/ion-range.entry.js +131 -26
- package/dist/esm/ion-refresher_2.entry.js +7 -7
- package/dist/esm/ion-reorder_2.entry.js +6 -6
- package/dist/esm/ion-ripple-effect.entry.js +3 -3
- package/dist/esm/ion-route_4.entry.js +5 -5
- package/dist/esm/ion-searchbar.entry.js +32 -8
- package/dist/esm/ion-segment_2.entry.js +8 -8
- package/dist/esm/ion-select_3.entry.js +12 -12
- package/dist/esm/ion-spinner.entry.js +3 -3
- package/dist/esm/ion-split-pane.entry.js +4 -4
- package/dist/esm/ion-tab-bar_2.entry.js +7 -7
- package/dist/esm/ion-tab_2.entry.js +6 -6
- package/dist/esm/ion-text.entry.js +4 -4
- package/dist/esm/ion-textarea.entry.js +6 -6
- package/dist/esm/ion-toast.entry.js +9 -9
- package/dist/esm/ion-toggle.entry.js +4 -4
- package/dist/esm/{ionic-global-ad9a1810.js → ionic-global-94f25d1b.js} +1 -1
- package/dist/esm/ionic.js +6 -6
- package/dist/esm/{ios.transition-b76c7020.js → ios.transition-a50a9a55.js} +4 -4
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-564937a7.js → md.transition-0da92976.js} +4 -4
- package/dist/esm/{notch-controller-15d281a4.js → notch-controller-6bd3e0f9.js} +1 -1
- package/dist/esm/{overlays-04a9a43f.js → overlays-b874c3c3.js} +129 -41
- package/dist/esm/{status-tap-5a95077d.js → status-tap-dfea3607.js} +3 -3
- package/dist/esm/{swipe-back-fa0ec5cd.js → swipe-back-c6d0e5d9.js} +1 -1
- package/dist/esm-es5/{animation-60dbdd13.js → animation-6a0c5338.js} +1 -1
- package/dist/esm-es5/app-globals-318eef52.js +4 -0
- package/dist/esm-es5/{button-active-47ac8092.js → button-active-414be235.js} +1 -1
- package/dist/esm-es5/data-bb424ba8.js +4 -0
- package/dist/esm-es5/{form-controller-014aa89f.js → form-controller-21dd62b1.js} +1 -1
- package/dist/esm-es5/framework-delegate-ed4ba327.js +4 -0
- package/dist/esm-es5/hardware-back-button-6107a37c.js +4 -0
- package/dist/esm-es5/helpers-be245865.js +4 -0
- package/dist/esm-es5/index-020f5464.js +4 -0
- package/dist/esm-es5/index-6e05b96e.js +4 -0
- package/dist/esm-es5/index-a1a47f01.js +5 -0
- package/dist/esm-es5/{index-eb12ef92.js → index-f3946ac1.js} +1 -1
- package/dist/esm-es5/{index-0b4beb69.js → index-fae1515c.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/input-shims-a52daa3a.js +4 -0
- package/dist/esm-es5/{input.utils-6e9b0046.js → input.utils-a445f677.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-ad9a1810.js → ionic-global-94f25d1b.js} +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-b76c7020.js → ios.transition-a50a9a55.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/md.transition-0da92976.js +4 -0
- package/dist/esm-es5/{notch-controller-15d281a4.js → notch-controller-6bd3e0f9.js} +1 -1
- package/dist/esm-es5/overlays-b874c3c3.js +4 -0
- package/dist/esm-es5/{status-tap-5a95077d.js → status-tap-dfea3607.js} +1 -1
- package/dist/esm-es5/{swipe-back-fa0ec5cd.js → swipe-back-c6d0e5d9.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-30cd5e7b.js → p-0047bd0e.js} +1 -1
- package/dist/ionic/{p-70e34286.system.entry.js → p-01a1ff55.system.entry.js} +1 -1
- package/dist/ionic/{p-b0ff8075.entry.js → p-01de45e4.entry.js} +1 -1
- package/dist/ionic/{p-2e14c533.system.js → p-0609a7d8.system.js} +1 -1
- package/dist/ionic/p-08ab4c96.js +4 -0
- package/dist/ionic/{p-e04b9647.system.entry.js → p-094cb5ba.system.entry.js} +1 -1
- package/dist/ionic/p-0aac3a1c.js +4 -0
- package/dist/ionic/{p-de55ec45.js → p-0b743628.js} +1 -1
- package/dist/ionic/{p-b253ad7f.js → p-12a8643e.js} +1 -1
- package/dist/ionic/p-185d82fc.entry.js +4 -0
- package/dist/ionic/p-193921ce.entry.js +4 -0
- package/dist/ionic/{p-b8c685a7.system.js → p-1bc9b5f5.system.js} +1 -1
- package/dist/ionic/p-1cd372ed.js +4 -0
- package/dist/ionic/{p-123b4809.js → p-1e151efb.js} +1 -1
- package/dist/ionic/{p-bf05cbc7.entry.js → p-211d8901.entry.js} +1 -1
- package/dist/ionic/p-212f2c37.entry.js +4 -0
- package/dist/ionic/p-2433bf5e.system.js +4 -0
- package/dist/ionic/p-2732a6ce.entry.js +4 -0
- package/dist/ionic/{p-89ca4c4b.system.js → p-280f1fe7.system.js} +1 -1
- package/dist/ionic/{p-94be3ad7.js → p-2c118b1e.js} +1 -1
- package/dist/ionic/p-2c1408df.system.js +5 -0
- package/dist/ionic/p-2e2808f3.entry.js +4 -0
- package/dist/ionic/{p-0457213c.entry.js → p-32086ea4.entry.js} +1 -1
- package/dist/ionic/{p-16a61810.entry.js → p-339dee28.entry.js} +1 -1
- package/dist/ionic/{p-88e9052d.entry.js → p-34e2b446.entry.js} +1 -1
- package/dist/ionic/{p-eb07b88f.entry.js → p-374838e4.entry.js} +1 -1
- package/dist/ionic/p-3789920e.js +4 -0
- package/dist/ionic/{p-bdca4784.js → p-37aab7f7.js} +1 -1
- package/dist/ionic/p-3b7d328b.system.entry.js +4 -0
- package/dist/ionic/{p-f53d074d.system.entry.js → p-3b9edd02.system.entry.js} +1 -1
- package/dist/ionic/{p-5e23bea8.system.entry.js → p-3d23a234.system.entry.js} +1 -1
- package/dist/ionic/{p-717e2526.system.entry.js → p-3f75319a.system.entry.js} +2 -2
- package/dist/ionic/{p-c858f685.js → p-46bcc2f5.js} +1 -1
- package/dist/ionic/p-47686f0a.system.entry.js +4 -0
- package/dist/ionic/{p-afd6d696.system.entry.js → p-47d7ffb4.system.entry.js} +1 -1
- package/dist/ionic/{p-7b1ed642.system.entry.js → p-48331301.system.entry.js} +1 -1
- package/dist/ionic/{p-a3df16b9.system.entry.js → p-491ec3d6.system.entry.js} +1 -1
- package/dist/ionic/p-495aabd4.system.entry.js +4 -0
- package/dist/ionic/{p-cde3ac34.system.entry.js → p-49616da4.system.entry.js} +1 -1
- package/dist/ionic/p-4c68b459.system.entry.js +4 -0
- package/dist/ionic/{p-5cb5f63d.system.entry.js → p-4cc54847.system.entry.js} +1 -1
- package/dist/ionic/p-4da978ac.entry.js +4 -0
- package/dist/ionic/{p-a022b684.system.entry.js → p-4f9018d4.system.entry.js} +1 -1
- package/dist/ionic/{p-3481d54e.system.entry.js → p-55ae3e14.system.entry.js} +1 -1
- package/dist/ionic/{p-aaaa615c.system.entry.js → p-56271222.system.entry.js} +1 -1
- package/dist/ionic/{p-42a9f663.system.entry.js → p-565a12d7.system.entry.js} +1 -1
- package/dist/ionic/{p-d39ab63d.entry.js → p-56b810d5.entry.js} +1 -1
- package/dist/ionic/{p-31c495c2.js → p-56ee6d9a.js} +1 -1
- package/dist/ionic/{p-a85d9047.system.entry.js → p-5a0345f7.system.entry.js} +1 -1
- package/dist/ionic/{p-ba97a133.system.entry.js → p-5b8d7cdb.system.entry.js} +1 -1
- package/dist/ionic/p-5d2011e1.entry.js +4 -0
- package/dist/ionic/p-5f3d659f.entry.js +4 -0
- package/dist/ionic/p-6236eae6.entry.js +4 -0
- package/dist/ionic/{p-8794fa00.system.entry.js → p-625ef2fb.system.entry.js} +1 -1
- package/dist/ionic/{p-6871553b.system.js → p-62b7320a.system.js} +1 -1
- package/dist/ionic/{p-6525a8cd.system.js → p-638865d1.system.js} +1 -1
- package/dist/ionic/p-662cccde.entry.js +4 -0
- package/dist/ionic/p-68416ff0.entry.js +4 -0
- package/dist/ionic/{p-c747f89b.system.entry.js → p-686ddecb.system.entry.js} +2 -2
- package/dist/ionic/p-6a6550fa.js +4 -0
- package/dist/ionic/p-6a6c61b1.system.entry.js +4 -0
- package/dist/ionic/p-6afef6c1.system.js +4 -0
- package/dist/ionic/{p-abcedc15.system.entry.js → p-6b178502.system.entry.js} +1 -1
- package/dist/ionic/p-6c45c617.js +4 -0
- package/dist/ionic/{p-74deb358.system.js → p-6ecddf53.system.js} +1 -1
- package/dist/ionic/{p-5c580e89.entry.js → p-70929384.entry.js} +1 -1
- package/dist/ionic/p-73d70509.system.js +4 -0
- package/dist/ionic/{p-ae35294f.system.entry.js → p-776f7b9e.system.entry.js} +1 -1
- package/dist/ionic/{p-a3f572a7.js → p-779aede8.js} +1 -1
- package/dist/ionic/p-7872e970.system.entry.js +4 -0
- package/dist/ionic/{p-657ccdd6.entry.js → p-804ffec9.entry.js} +1 -1
- package/dist/ionic/{p-a0b28c69.system.entry.js → p-81c8fa81.system.entry.js} +1 -1
- package/dist/ionic/{p-8e651c29.entry.js → p-8294b727.entry.js} +1 -1
- package/dist/ionic/p-8528c070.entry.js +4 -0
- package/dist/ionic/p-87e81684.system.entry.js +4 -0
- package/dist/ionic/p-8954015c.entry.js +4 -0
- package/dist/ionic/p-8a1b0abb.system.js +4 -0
- package/dist/ionic/{p-5928fac9.system.entry.js → p-8a335b91.system.entry.js} +1 -1
- package/dist/ionic/{p-cd9a7017.system.entry.js → p-8eba832c.system.entry.js} +1 -1
- package/dist/ionic/{p-91cb3f9a.entry.js → p-8ed4de58.entry.js} +1 -1
- package/dist/ionic/{p-502780e4.entry.js → p-917bb906.entry.js} +1 -1
- package/dist/ionic/{p-b2595011.system.entry.js → p-93f86b06.system.entry.js} +1 -1
- package/dist/ionic/{p-9393a49f.js → p-942a9358.js} +1 -1
- package/dist/ionic/p-9625a2e6.entry.js +4 -0
- package/dist/ionic/{p-f0194418.system.entry.js → p-9bc8bd0c.system.entry.js} +1 -1
- package/dist/ionic/{p-18beebdf.system.entry.js → p-9d53b773.system.entry.js} +2 -2
- package/dist/ionic/{p-dcb5711d.entry.js → p-9fbfbaef.entry.js} +1 -1
- package/dist/ionic/p-a04ecf1a.system.js +4 -0
- package/dist/ionic/{p-c2289cd1.js → p-a1036ce7.js} +1 -1
- package/dist/ionic/{p-ea25b4c8.system.entry.js → p-a3b2d4a7.system.entry.js} +2 -2
- package/dist/ionic/{p-5f169eba.entry.js → p-a5cd2e1f.entry.js} +1 -1
- package/dist/ionic/p-a5d9fafe.entry.js +4 -0
- package/dist/ionic/{p-49543c9c.system.js → p-a667dd1f.system.js} +1 -1
- package/dist/ionic/{p-df504a37.system.js → p-a875459d.system.js} +1 -1
- package/dist/ionic/p-ad60590b.entry.js +4 -0
- package/dist/ionic/{p-1924f2e0.system.entry.js → p-b1bebf4a.system.entry.js} +2 -2
- package/dist/ionic/p-b535c93a.entry.js +4 -0
- package/dist/ionic/p-b8735394.entry.js +4 -0
- package/dist/ionic/p-bb5bbcdf.js +4 -0
- package/dist/ionic/{p-37c33319.system.js → p-bd313b73.system.js} +1 -1
- package/dist/ionic/p-c379d010.system.entry.js +4 -0
- package/dist/ionic/{p-7173ba59.system.entry.js → p-c5ce0862.system.entry.js} +2 -2
- package/dist/ionic/p-c76ef1ea.entry.js +4 -0
- package/dist/ionic/p-c8580577.system.js +4 -0
- package/dist/ionic/{p-275705e5.entry.js → p-cc0cf2d1.entry.js} +1 -1
- package/dist/ionic/{p-c39cc96d.system.entry.js → p-d3a95477.system.entry.js} +1 -1
- package/dist/ionic/{p-ceceac26.js → p-d68ecea4.js} +1 -1
- package/dist/ionic/p-d873a8c2.system.entry.js +4 -0
- package/dist/ionic/{p-64db1331.entry.js → p-dbd77435.entry.js} +1 -1
- package/dist/ionic/p-dc2d302c.entry.js +4 -0
- package/dist/ionic/{p-601e17b4.entry.js → p-dd2996cf.entry.js} +1 -1
- package/dist/ionic/{p-508a4c87.entry.js → p-dec423a3.entry.js} +1 -1
- package/dist/ionic/{p-1131946f.system.entry.js → p-deeae694.system.entry.js} +1 -1
- package/dist/ionic/p-e06d65b3.system.entry.js +4 -0
- package/dist/ionic/{p-d4cadd34.system.js → p-e0948431.system.js} +1 -1
- package/dist/ionic/{p-86813176.system.entry.js → p-e15cfec4.system.entry.js} +1 -1
- package/dist/ionic/p-e1bd8d9c.system.entry.js +4 -0
- package/dist/ionic/{p-1636923f.system.js → p-e34eefb5.system.js} +1 -1
- package/dist/ionic/{p-b6279412.entry.js → p-e57a212a.entry.js} +1 -1
- package/dist/ionic/{p-3471a7c0.system.entry.js → p-e6ee6ead.system.entry.js} +1 -1
- package/dist/ionic/p-e7055fb8.entry.js +4 -0
- package/dist/ionic/p-ea723fc4.entry.js +4 -0
- package/dist/ionic/p-ead0d463.js +5 -0
- package/dist/ionic/{p-30d77a91.system.js → p-ebc1ca90.system.js} +1 -1
- package/dist/ionic/p-ed3ad350.entry.js +4 -0
- package/dist/ionic/{p-5d7e32ce.js → p-efef9f3a.js} +1 -1
- package/dist/ionic/p-f4ccaa64.entry.js +4 -0
- package/dist/ionic/p-f4fb429a.system.js +4 -0
- package/dist/ionic/{p-a5951821.system.js → p-f549716b.system.js} +1 -1
- package/dist/ionic/p-f6a50d5c.entry.js +4 -0
- package/dist/ionic/p-fbd01db3.system.js +4 -0
- package/dist/ionic/p-fc053a55.entry.js +4 -0
- package/dist/ionic/{p-1f19958f.system.entry.js → p-fd059a23.system.entry.js} +1 -1
- package/dist/ionic/{p-f8c96502.system.entry.js → p-fdcf1482.system.entry.js} +1 -1
- package/dist/ionic/{p-e2bb92ed.system.js → p-fe320051.system.js} +1 -1
- package/dist/ionic/{p-3079950e.entry.js → p-fe3ae39d.entry.js} +1 -1
- package/dist/types/components/datetime/datetime-interface.d.ts +10 -0
- package/dist/types/components/datetime/datetime.d.ts +10 -1
- package/dist/types/components/datetime/utils/format.d.ts +7 -13
- package/dist/types/components/datetime/utils/manipulation.d.ts +7 -7
- package/dist/types/components/datetime/utils/state.d.ts +2 -2
- package/dist/types/components/datetime/utils/validate.d.ts +8 -0
- package/dist/types/components/input/input.utils.d.ts +1 -1
- package/dist/types/components/range/range.d.ts +29 -0
- package/dist/types/components/searchbar/searchbar.d.ts +37 -0
- package/dist/types/components/toggle/toggle.d.ts +1 -1
- package/dist/types/components.d.ts +36 -4
- package/dist/types/utils/framework-delegate.d.ts +1 -1
- package/dist/types/utils/hardware-back-button.d.ts +1 -1
- package/dist/types/utils/helpers.d.ts +1 -1
- package/dist/types/utils/keyboard/keyboard-controller.d.ts +1 -1
- package/dist/types/utils/overlays.d.ts +7 -2
- package/hydrate/index.js +737 -340
- package/package.json +9 -5
- package/dist/collection/components/modal/test/a11y/modal.spec.js +0 -22
- package/dist/esm-es5/app-globals-5cf6195b.js +0 -4
- package/dist/esm-es5/data-0f3ab200.js +0 -4
- package/dist/esm-es5/framework-delegate-fed7fe7c.js +0 -4
- package/dist/esm-es5/hardware-back-button-b410a047.js +0 -4
- package/dist/esm-es5/helpers-c0b9ca37.js +0 -4
- package/dist/esm-es5/index-47b2066d.js +0 -4
- package/dist/esm-es5/index-4c30cddd.js +0 -5
- package/dist/esm-es5/index-d64f34ea.js +0 -4
- package/dist/esm-es5/input-shims-b90ca55f.js +0 -4
- package/dist/esm-es5/md.transition-564937a7.js +0 -4
- package/dist/esm-es5/overlays-04a9a43f.js +0 -4
- package/dist/ionic/p-027f3674.entry.js +0 -4
- package/dist/ionic/p-05d560ec.entry.js +0 -4
- package/dist/ionic/p-0b34d3a7.system.js +0 -4
- package/dist/ionic/p-0e23c289.system.entry.js +0 -4
- package/dist/ionic/p-1f16d040.entry.js +0 -4
- package/dist/ionic/p-21ca1f1c.js +0 -4
- package/dist/ionic/p-2327064c.entry.js +0 -4
- package/dist/ionic/p-23c73017.entry.js +0 -4
- package/dist/ionic/p-2e1f014a.system.entry.js +0 -4
- package/dist/ionic/p-337ac0f5.entry.js +0 -4
- package/dist/ionic/p-396083cc.entry.js +0 -4
- package/dist/ionic/p-3a7de59c.entry.js +0 -4
- package/dist/ionic/p-3c6f02cf.system.js +0 -4
- package/dist/ionic/p-3d961d93.entry.js +0 -4
- package/dist/ionic/p-3e9ad72a.system.entry.js +0 -4
- package/dist/ionic/p-43a5edee.entry.js +0 -4
- package/dist/ionic/p-49aba878.js +0 -4
- package/dist/ionic/p-4f777b5e.js +0 -4
- package/dist/ionic/p-4fda5c35.entry.js +0 -4
- package/dist/ionic/p-5b40d967.entry.js +0 -4
- package/dist/ionic/p-5c2ae448.js +0 -4
- package/dist/ionic/p-5c6a04bd.entry.js +0 -4
- package/dist/ionic/p-61ba2137.system.js +0 -4
- package/dist/ionic/p-64761c90.entry.js +0 -4
- package/dist/ionic/p-64856c3c.system.entry.js +0 -4
- package/dist/ionic/p-6486e393.system.entry.js +0 -4
- package/dist/ionic/p-667e3e2d.entry.js +0 -4
- package/dist/ionic/p-68ba8e77.system.entry.js +0 -4
- package/dist/ionic/p-72fa96bf.system.js +0 -5
- package/dist/ionic/p-7330c044.system.js +0 -4
- package/dist/ionic/p-7ce40e7b.entry.js +0 -4
- package/dist/ionic/p-9056778e.system.entry.js +0 -4
- package/dist/ionic/p-95d5a097.entry.js +0 -4
- package/dist/ionic/p-9cd7ba27.system.js +0 -4
- package/dist/ionic/p-9ec7208d.system.js +0 -4
- package/dist/ionic/p-a6e465f5.entry.js +0 -4
- package/dist/ionic/p-a8a56449.entry.js +0 -4
- package/dist/ionic/p-bd4787eb.entry.js +0 -4
- package/dist/ionic/p-c11bab7e.entry.js +0 -4
- package/dist/ionic/p-c1797ec5.system.entry.js +0 -4
- package/dist/ionic/p-c308f773.entry.js +0 -4
- package/dist/ionic/p-c80c7e90.system.js +0 -4
- package/dist/ionic/p-cb9e71e0.entry.js +0 -4
- package/dist/ionic/p-db30f71b.entry.js +0 -4
- package/dist/ionic/p-dbcba5a2.js +0 -4
- package/dist/ionic/p-e81bf09e.system.entry.js +0 -4
- package/dist/ionic/p-e9f9388e.system.js +0 -4
- package/dist/ionic/p-ed7a529f.js +0 -5
- package/dist/ionic/p-edcada2b.system.entry.js +0 -4
- package/dist/ionic/p-f460c7ae.entry.js +0 -4
- package/dist/ionic/p-f7dce541.js +0 -4
- package/dist/ionic/p-f840d817.entry.js +0 -4
- package/dist/ionic/p-fb9f8495.system.entry.js +0 -4
- package/dist/ionic/p-fd2aa50c.js +0 -4
- /package/dist/ionic/{p-b5839dc2.js → p-1b3ffb2f.js} +0 -0
- /package/dist/ionic/{p-fd8ced99.system.js → p-5fc8d5ef.system.js} +0 -0
|
@@ -32,3 +32,15 @@ describe('ion-checkbox: disabled', () => {
|
|
|
32
32
|
expect(checkbox.checked).toBe(false);
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
|
+
describe('ion-checkbox: indeterminate', () => {
|
|
36
|
+
it('should have a mixed value for aria-checked', async () => {
|
|
37
|
+
const page = await newSpecPage({
|
|
38
|
+
components: [Checkbox],
|
|
39
|
+
html: `
|
|
40
|
+
<ion-checkbox indeterminate="true">Checkbox</ion-checkbox>
|
|
41
|
+
`,
|
|
42
|
+
});
|
|
43
|
+
const checkbox = page.body.querySelector('ion-checkbox');
|
|
44
|
+
expect(checkbox.getAttribute('aria-checked')).toBe('mixed');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -15,12 +15,12 @@ export class Chip {
|
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
17
|
const mode = getIonMode(this);
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: '886c26b6e7b3e3ca8622a4a0926bdf6dea0a71d4', "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses(this.color, {
|
|
19
19
|
[mode]: true,
|
|
20
20
|
'chip-outline': this.outline,
|
|
21
21
|
'chip-disabled': this.disabled,
|
|
22
22
|
'ion-activatable': true,
|
|
23
|
-
}) }, h("slot", { key: '
|
|
23
|
+
}) }, h("slot", { key: 'd24353e79ac84013758cee1acb1b0f9b2ebb4d67' }), mode === 'md' && h("ion-ripple-effect", { key: 'b69bb3ce3d464251d5e11ba6a5240e4567f72f05' })));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "ion-chip"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -111,9 +111,9 @@ export class Col {
|
|
|
111
111
|
render() {
|
|
112
112
|
const isRTL = document.dir === 'rtl';
|
|
113
113
|
const mode = getIonMode(this);
|
|
114
|
-
return (h(Host, { key: '
|
|
114
|
+
return (h(Host, { key: '56ecf3b3f2be05d5f179f2d136d4ab05a4525da9', class: {
|
|
115
115
|
[mode]: true,
|
|
116
|
-
}, style: Object.assign(Object.assign(Object.assign(Object.assign({}, this.calculateOffset(isRTL)), this.calculatePull(isRTL)), this.calculatePush(isRTL)), this.calculateSize()) }, h("slot", { key: '
|
|
116
|
+
}, style: Object.assign(Object.assign(Object.assign(Object.assign({}, this.calculateOffset(isRTL)), this.calculatePull(isRTL)), this.calculatePush(isRTL)), this.calculateSize()) }, h("slot", { key: '8f1113d39dcb709300ebbeaf81bc092c1dd8da3e' })));
|
|
117
117
|
}
|
|
118
118
|
static get is() { return "ion-col"; }
|
|
119
119
|
static get encapsulation() { return "shadow"; }
|
|
@@ -336,7 +336,7 @@ export class Content {
|
|
|
336
336
|
const transitionShadow = mode === 'ios';
|
|
337
337
|
const TagType = isMainContent ? 'main' : 'div';
|
|
338
338
|
this.resize();
|
|
339
|
-
return (h(Host, { key: '
|
|
339
|
+
return (h(Host, { key: 'e13815c0e6f6095150b112d3a1aaf2f509aa0d0b', class: createColorClasses(this.color, {
|
|
340
340
|
[mode]: true,
|
|
341
341
|
'content-sizing': hostContext('ion-popover', this.el),
|
|
342
342
|
overscroll: forceOverscroll,
|
|
@@ -344,12 +344,12 @@ export class Content {
|
|
|
344
344
|
}), style: {
|
|
345
345
|
'--offset-top': `${this.cTop}px`,
|
|
346
346
|
'--offset-bottom': `${this.cBottom}px`,
|
|
347
|
-
} }, h("div", { key: '
|
|
347
|
+
} }, h("div", { key: '8006c4a10d8f7dc83c646246961d018a8097236e', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), h(TagType, { key: '4dd2f58421493f7a4ca42f8f5d7b85cda8e320ea', class: {
|
|
348
348
|
'inner-scroll': true,
|
|
349
349
|
'scroll-x': scrollX,
|
|
350
350
|
'scroll-y': scrollY,
|
|
351
351
|
overscroll: (scrollX || scrollY) && forceOverscroll,
|
|
352
|
-
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '
|
|
352
|
+
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '37904f8f1d8319156cd901feb21930ef674fe0f7' })), transitionShadow ? (h("div", { class: "transition-effect" }, h("div", { class: "transition-cover" }), h("div", { class: "transition-shadow" }))) : null, h("slot", { key: '8f696583903af0548d064dca1a6bae060e127485', name: "fixed" })));
|
|
353
353
|
}
|
|
354
354
|
static get is() { return "ion-content"; }
|
|
355
355
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,11 +11,12 @@ import { caretDownSharp, caretUpSharp, chevronBack, chevronDown, chevronForward
|
|
|
11
11
|
import { getIonMode } from "../../global/ionic-global";
|
|
12
12
|
import { isSameDay, warnIfValueOutOfBounds, isBefore, isAfter } from "./utils/comparison";
|
|
13
13
|
import { generateMonths, getDaysOfMonth, getDaysOfWeek, getToday, getMonthColumnData, getDayColumnData, getYearColumnData, getTimeColumnsData, getCombinedDateColumnData, } from "./utils/data";
|
|
14
|
-
import { formatValue,
|
|
14
|
+
import { formatValue, getLocalizedDateTime, getLocalizedTime, getMonthAndYear } from "./utils/format";
|
|
15
15
|
import { isLocaleDayPeriodRTL, isMonthFirstLocale, getNumDaysInMonth, getHourCycle } from "./utils/helpers";
|
|
16
16
|
import { calculateHourFromAMPM, convertDataToISO, getClosestValidDate, getEndOfWeek, getNextDay, getNextMonth, getNextWeek, getNextYear, getPreviousDay, getPreviousMonth, getPreviousWeek, getPreviousYear, getStartOfWeek, validateParts, } from "./utils/manipulation";
|
|
17
17
|
import { clampDate, convertToArrayOfNumbers, getPartsFromCalendarDay, parseAmPm, parseDate, parseMaxParts, parseMinParts, } from "./utils/parse";
|
|
18
18
|
import { getCalendarDayState, getHighlightStyles, isDayDisabled, isMonthDisabled, isNextMonthDisabled, isPrevMonthDisabled, } from "./utils/state";
|
|
19
|
+
import { checkForPresentationFormatMismatch, warnIfTimeZoneProvided } from "./utils/validate";
|
|
19
20
|
/**
|
|
20
21
|
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
21
22
|
*
|
|
@@ -650,6 +651,7 @@ export class Datetime {
|
|
|
650
651
|
this.color = 'primary';
|
|
651
652
|
this.name = this.inputId;
|
|
652
653
|
this.disabled = false;
|
|
654
|
+
this.formatOptions = undefined;
|
|
653
655
|
this.readonly = false;
|
|
654
656
|
this.isDateEnabled = undefined;
|
|
655
657
|
this.min = undefined;
|
|
@@ -677,6 +679,11 @@ export class Datetime {
|
|
|
677
679
|
this.size = 'fixed';
|
|
678
680
|
this.preferWheel = false;
|
|
679
681
|
}
|
|
682
|
+
formatOptionsChanged() {
|
|
683
|
+
const { el, formatOptions, presentation } = this;
|
|
684
|
+
checkForPresentationFormatMismatch(el, presentation, formatOptions);
|
|
685
|
+
warnIfTimeZoneProvided(el, formatOptions);
|
|
686
|
+
}
|
|
680
687
|
disabledChanged() {
|
|
681
688
|
this.emitStyle();
|
|
682
689
|
}
|
|
@@ -686,6 +693,10 @@ export class Datetime {
|
|
|
686
693
|
maxChanged() {
|
|
687
694
|
this.processMaxParts();
|
|
688
695
|
}
|
|
696
|
+
presentationChanged() {
|
|
697
|
+
const { el, formatOptions, presentation } = this;
|
|
698
|
+
checkForPresentationFormatMismatch(el, presentation, formatOptions);
|
|
699
|
+
}
|
|
689
700
|
get isGridStyle() {
|
|
690
701
|
const { presentation, preferWheel } = this;
|
|
691
702
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
@@ -788,6 +799,7 @@ export class Datetime {
|
|
|
788
799
|
this.initializeKeyboardListeners();
|
|
789
800
|
}
|
|
790
801
|
componentDidLoad() {
|
|
802
|
+
const { el, intersectionTrackerRef } = this;
|
|
791
803
|
/**
|
|
792
804
|
* If a scrollable element is hidden using `display: none`,
|
|
793
805
|
* it will not have a scroll height meaning we cannot scroll elements
|
|
@@ -813,14 +825,14 @@ export class Datetime {
|
|
|
813
825
|
this.el.classList.add('datetime-ready');
|
|
814
826
|
});
|
|
815
827
|
};
|
|
816
|
-
const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01 });
|
|
828
|
+
const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01, root: el });
|
|
817
829
|
/**
|
|
818
830
|
* Use raf to avoid a race condition between the component loading and
|
|
819
831
|
* its display animation starting (such as when shown in a modal). This
|
|
820
832
|
* could cause the datetime to start at a visibility of 0, erroneously
|
|
821
833
|
* triggering the `hiddenIO` observer below.
|
|
822
834
|
*/
|
|
823
|
-
raf(() => visibleIO === null || visibleIO === void 0 ? void 0 : visibleIO.observe(
|
|
835
|
+
raf(() => visibleIO === null || visibleIO === void 0 ? void 0 : visibleIO.observe(intersectionTrackerRef));
|
|
824
836
|
/**
|
|
825
837
|
* We need to clean up listeners when the datetime is hidden
|
|
826
838
|
* in a popover/modal so that we can properly scroll containers
|
|
@@ -846,8 +858,8 @@ export class Datetime {
|
|
|
846
858
|
this.el.classList.remove('datetime-ready');
|
|
847
859
|
});
|
|
848
860
|
};
|
|
849
|
-
const hiddenIO = new IntersectionObserver(hiddenCallback, { threshold: 0 });
|
|
850
|
-
raf(() => hiddenIO === null || hiddenIO === void 0 ? void 0 : hiddenIO.observe(
|
|
861
|
+
const hiddenIO = new IntersectionObserver(hiddenCallback, { threshold: 0, root: el });
|
|
862
|
+
raf(() => hiddenIO === null || hiddenIO === void 0 ? void 0 : hiddenIO.observe(intersectionTrackerRef));
|
|
851
863
|
/**
|
|
852
864
|
* Datetime uses Ionic components that emit
|
|
853
865
|
* ionFocus and ionBlur. These events are
|
|
@@ -921,7 +933,7 @@ export class Datetime {
|
|
|
921
933
|
});
|
|
922
934
|
}
|
|
923
935
|
componentWillLoad() {
|
|
924
|
-
const { el, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
936
|
+
const { el, formatOptions, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
925
937
|
if (multiple) {
|
|
926
938
|
if (presentation !== 'date') {
|
|
927
939
|
printIonWarning('Multiple date selection is only supported for presentation="date".', el);
|
|
@@ -938,6 +950,10 @@ export class Datetime {
|
|
|
938
950
|
printIonWarning('The highlightedDates property is not supported with preferWheel="true".', el);
|
|
939
951
|
}
|
|
940
952
|
}
|
|
953
|
+
if (formatOptions) {
|
|
954
|
+
checkForPresentationFormatMismatch(el, presentation, formatOptions);
|
|
955
|
+
warnIfTimeZoneProvided(el, formatOptions);
|
|
956
|
+
}
|
|
941
957
|
const hourValues = (this.parsedHourValues = convertToArrayOfNumbers(this.hourValues));
|
|
942
958
|
const minuteValues = (this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues));
|
|
943
959
|
const monthValues = (this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues));
|
|
@@ -1445,7 +1461,7 @@ export class Datetime {
|
|
|
1445
1461
|
return h("slot", { name: "time-label" }, "Time");
|
|
1446
1462
|
}
|
|
1447
1463
|
renderTimeOverlay() {
|
|
1448
|
-
const { disabled, hourCycle, isTimePopoverOpen, locale } = this;
|
|
1464
|
+
const { disabled, hourCycle, isTimePopoverOpen, locale, formatOptions } = this;
|
|
1449
1465
|
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
1450
1466
|
const activePart = this.getActivePartsWithFallback();
|
|
1451
1467
|
return [
|
|
@@ -1465,7 +1481,7 @@ export class Datetime {
|
|
|
1465
1481
|
await popoverRef.onWillDismiss();
|
|
1466
1482
|
this.isTimePopoverOpen = false;
|
|
1467
1483
|
}
|
|
1468
|
-
} }, getLocalizedTime(locale, activePart, computedHourCycle)),
|
|
1484
|
+
} }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time)),
|
|
1469
1485
|
h("ion-popover", { alignment: "center", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {
|
|
1470
1486
|
/**
|
|
1471
1487
|
* Intersection Observers do not consistently fire between Blink and Webkit
|
|
@@ -1488,7 +1504,8 @@ export class Datetime {
|
|
|
1488
1504
|
];
|
|
1489
1505
|
}
|
|
1490
1506
|
getHeaderSelectedDateText() {
|
|
1491
|
-
|
|
1507
|
+
var _a;
|
|
1508
|
+
const { activeParts, formatOptions, multiple, titleSelectedDatesFormatter } = this;
|
|
1492
1509
|
const isArray = Array.isArray(activeParts);
|
|
1493
1510
|
let headerText;
|
|
1494
1511
|
if (multiple && isArray && activeParts.length !== 1) {
|
|
@@ -1504,7 +1521,7 @@ export class Datetime {
|
|
|
1504
1521
|
}
|
|
1505
1522
|
else {
|
|
1506
1523
|
// for exactly 1 day selected (multiple set or not), show a formatted version of that
|
|
1507
|
-
headerText =
|
|
1524
|
+
headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { weekday: 'short', month: 'short', day: 'numeric' });
|
|
1508
1525
|
}
|
|
1509
1526
|
return headerText;
|
|
1510
1527
|
}
|
|
@@ -1593,7 +1610,7 @@ export class Datetime {
|
|
|
1593
1610
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1594
1611
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1595
1612
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1596
|
-
return (h(Host, { key: '
|
|
1613
|
+
return (h(Host, { key: '8490192beb6c5c6064ed8f2a7be2d51846f84f36', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1597
1614
|
[mode]: true,
|
|
1598
1615
|
['datetime-readonly']: readonly,
|
|
1599
1616
|
['datetime-disabled']: disabled,
|
|
@@ -1603,7 +1620,7 @@ export class Datetime {
|
|
|
1603
1620
|
[`datetime-size-${size}`]: true,
|
|
1604
1621
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1605
1622
|
[`datetime-grid`]: isGridStyle,
|
|
1606
|
-
})) }, this.renderDatetime(mode)));
|
|
1623
|
+
})) }, h("div", { key: 'a2959c07ed871f9004a2f11ab1385a5a7b5737fd', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1607
1624
|
}
|
|
1608
1625
|
static get is() { return "ion-datetime"; }
|
|
1609
1626
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1681,6 +1698,27 @@ export class Datetime {
|
|
|
1681
1698
|
"reflect": false,
|
|
1682
1699
|
"defaultValue": "false"
|
|
1683
1700
|
},
|
|
1701
|
+
"formatOptions": {
|
|
1702
|
+
"type": "unknown",
|
|
1703
|
+
"mutable": false,
|
|
1704
|
+
"complexType": {
|
|
1705
|
+
"original": "FormatOptions",
|
|
1706
|
+
"resolved": "undefined | { date: DateTimeFormatOptions; time?: DateTimeFormatOptions | undefined; } | { date?: DateTimeFormatOptions | undefined; time: DateTimeFormatOptions; }",
|
|
1707
|
+
"references": {
|
|
1708
|
+
"FormatOptions": {
|
|
1709
|
+
"location": "import",
|
|
1710
|
+
"path": "./datetime-interface",
|
|
1711
|
+
"id": "src/components/datetime/datetime-interface.ts::FormatOptions"
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
},
|
|
1715
|
+
"required": false,
|
|
1716
|
+
"optional": true,
|
|
1717
|
+
"docs": {
|
|
1718
|
+
"tags": [],
|
|
1719
|
+
"text": "Formatting options for dates and times.\nShould include a 'date' and/or 'time' object, each of which is of type [Intl.DateTimeFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options)."
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1684
1722
|
"readonly": {
|
|
1685
1723
|
"type": "boolean",
|
|
1686
1724
|
"mutable": false,
|
|
@@ -2376,6 +2414,9 @@ export class Datetime {
|
|
|
2376
2414
|
static get elementRef() { return "el"; }
|
|
2377
2415
|
static get watchers() {
|
|
2378
2416
|
return [{
|
|
2417
|
+
"propName": "formatOptions",
|
|
2418
|
+
"methodName": "formatOptionsChanged"
|
|
2419
|
+
}, {
|
|
2379
2420
|
"propName": "disabled",
|
|
2380
2421
|
"methodName": "disabledChanged"
|
|
2381
2422
|
}, {
|
|
@@ -2384,6 +2425,9 @@ export class Datetime {
|
|
|
2384
2425
|
}, {
|
|
2385
2426
|
"propName": "max",
|
|
2386
2427
|
"methodName": "maxChanged"
|
|
2428
|
+
}, {
|
|
2429
|
+
"propName": "presentation",
|
|
2430
|
+
"methodName": "presentationChanged"
|
|
2387
2431
|
}, {
|
|
2388
2432
|
"propName": "yearValues",
|
|
2389
2433
|
"methodName": "yearValuesChanged"
|
|
@@ -233,7 +233,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
233
233
|
*/
|
|
234
234
|
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
235
235
|
test.describe(title('datetime: visibility'), () => {
|
|
236
|
-
|
|
236
|
+
// TODO FW-6015 re-enable on webkit when bug is fixed
|
|
237
|
+
test('should reset month/year interface when hiding datetime', async ({ page, skip }) => {
|
|
238
|
+
skip.browser('webkit', 'This is buggy in a headless Linux environment: https://bugs.webkit.org/show_bug.cgi?id=270358');
|
|
237
239
|
await page.setContent(`
|
|
238
240
|
<ion-datetime></ion-datetime>
|
|
239
241
|
`, config);
|
|
@@ -402,3 +404,80 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
402
404
|
});
|
|
403
405
|
});
|
|
404
406
|
});
|
|
407
|
+
/**
|
|
408
|
+
* This behavior does not differ across
|
|
409
|
+
* directions.
|
|
410
|
+
*/
|
|
411
|
+
configs({ directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
412
|
+
test.describe(title('datetime: formatOptions'), () => {
|
|
413
|
+
test('should format header and time button', async ({ page }) => {
|
|
414
|
+
await page.setContent(`
|
|
415
|
+
<ion-datetime value="2022-02-01T16:30:00">
|
|
416
|
+
<span slot="title">Select Date</span>
|
|
417
|
+
</ion-datetime>
|
|
418
|
+
<script>
|
|
419
|
+
const datetime = document.querySelector('ion-datetime');
|
|
420
|
+
datetime.formatOptions = {
|
|
421
|
+
time: { hour: '2-digit', minute: '2-digit' },
|
|
422
|
+
date: { day: '2-digit', month: 'long', era: 'short' },
|
|
423
|
+
}
|
|
424
|
+
</script>
|
|
425
|
+
`, config);
|
|
426
|
+
await page.locator('.datetime-ready').waitFor();
|
|
427
|
+
const headerDate = page.locator('ion-datetime .datetime-selected-date');
|
|
428
|
+
await expect(headerDate).toHaveText('February 01 AD');
|
|
429
|
+
const timeBody = page.locator('ion-datetime .time-body');
|
|
430
|
+
await expect(timeBody).toHaveText('04:30 PM');
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
/**
|
|
435
|
+
* This behavior does not differ across
|
|
436
|
+
* modes/directions.
|
|
437
|
+
*/
|
|
438
|
+
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
439
|
+
test.describe(title('datetime: formatOptions misconfiguration errors'), () => {
|
|
440
|
+
test('should log a warning if time zone is provided', async ({ page }) => {
|
|
441
|
+
const logs = [];
|
|
442
|
+
page.on('console', (msg) => {
|
|
443
|
+
if (msg.type() === 'warning') {
|
|
444
|
+
logs.push(msg.text());
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
await page.setContent(`
|
|
448
|
+
<ion-datetime value="2022-02-01T16:30:00" presentation="date">
|
|
449
|
+
<span slot="title">Select Date</span>
|
|
450
|
+
</ion-datetime>
|
|
451
|
+
<script>
|
|
452
|
+
const datetime = document.querySelector('ion-datetime');
|
|
453
|
+
datetime.formatOptions = {
|
|
454
|
+
date: { timeZone: 'UTC' },
|
|
455
|
+
}
|
|
456
|
+
</script>
|
|
457
|
+
`, config);
|
|
458
|
+
await page.locator('.datetime-ready').waitFor();
|
|
459
|
+
expect(logs.length).toBe(1);
|
|
460
|
+
expect(logs[0]).toContain('[Ionic Warning]: Datetime: "timeZone" and "timeZoneName" are not supported in "formatOptions".');
|
|
461
|
+
});
|
|
462
|
+
test('should log a warning if the required formatOptions are not provided for a presentation', async ({ page }) => {
|
|
463
|
+
const logs = [];
|
|
464
|
+
page.on('console', (msg) => {
|
|
465
|
+
if (msg.type() === 'warning') {
|
|
466
|
+
logs.push(msg.text());
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
await page.setContent(`
|
|
470
|
+
<ion-datetime value="2022-02-01T16:30:00">
|
|
471
|
+
<span slot="title">Select Date</span>
|
|
472
|
+
</ion-datetime>
|
|
473
|
+
<script>
|
|
474
|
+
const datetime = document.querySelector('ion-datetime');
|
|
475
|
+
datetime.formatOptions = {}
|
|
476
|
+
</script>
|
|
477
|
+
`, config);
|
|
478
|
+
await page.locator('.datetime-ready').waitFor();
|
|
479
|
+
expect(logs.length).toBe(1);
|
|
480
|
+
expect(logs[0]).toContain("[Ionic Warning]: Datetime: The 'date-time' presentation requires either a date or time object (or both) in formatOptions.");
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { generateDayAriaLabel,
|
|
4
|
+
import { generateDayAriaLabel, getFormattedHour, addTimePadding, getMonthAndYear, getLocalizedDayPeriod, getLocalizedTime, stripTimeZone, } from "../utils/format";
|
|
5
5
|
describe('generateDayAriaLabel()', () => {
|
|
6
6
|
it('should return Wednesday, May 12', () => {
|
|
7
7
|
const reference = { month: 5, day: 12, year: 2021 };
|
|
@@ -24,20 +24,6 @@ describe('generateDayAriaLabel()', () => {
|
|
|
24
24
|
expect(generateDayAriaLabel('en-US', false, reference)).toEqual('Saturday, April 1');
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
|
-
describe('getMonthAndDay()', () => {
|
|
28
|
-
it('should return Tue, May 11', () => {
|
|
29
|
-
expect(getMonthAndDay('en-US', { month: 5, day: 11, year: 2021 })).toEqual('Tue, May 11');
|
|
30
|
-
});
|
|
31
|
-
it('should return mar, 11 may', () => {
|
|
32
|
-
expect(getMonthAndDay('es-ES', { month: 5, day: 11, year: 2021 })).toEqual('mar, 11 may');
|
|
33
|
-
});
|
|
34
|
-
it('should return Sat, Apr 1', () => {
|
|
35
|
-
expect(getMonthAndDay('en-US', { month: 4, day: 1, year: 2006 })).toEqual('Sat, Apr 1');
|
|
36
|
-
});
|
|
37
|
-
it('should return sáb, 1 abr', () => {
|
|
38
|
-
expect(getMonthAndDay('es-ES', { month: 4, day: 1, year: 2006 })).toEqual('sáb, 1 abr');
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
27
|
describe('getFormattedHour()', () => {
|
|
42
28
|
it('should only add padding if using 24 hour time', () => {
|
|
43
29
|
expect(getFormattedHour(1, 'h11')).toEqual('1');
|
|
@@ -121,4 +107,68 @@ describe('getLocalizedTime', () => {
|
|
|
121
107
|
expect(getLocalizedTime('en-US', datetimeParts, 'h12')).toEqual('10:40 PM');
|
|
122
108
|
expect(getLocalizedTime('en-US', datetimeParts, 'h23')).toEqual('22:40');
|
|
123
109
|
});
|
|
110
|
+
it('should use formatOptions', () => {
|
|
111
|
+
const datetimeParts = {
|
|
112
|
+
day: 1,
|
|
113
|
+
month: 1,
|
|
114
|
+
year: 2022,
|
|
115
|
+
hour: 9,
|
|
116
|
+
minute: 40,
|
|
117
|
+
};
|
|
118
|
+
const formatOptions = {
|
|
119
|
+
hour: '2-digit',
|
|
120
|
+
minute: '2-digit',
|
|
121
|
+
dayPeriod: 'short',
|
|
122
|
+
day: '2-digit',
|
|
123
|
+
};
|
|
124
|
+
// Even though this method is intended to be used for time, the date may be displayed as well when passing formatOptions
|
|
125
|
+
expect(getLocalizedTime('en-US', datetimeParts, 'h12', formatOptions)).toEqual('01, 09:40 in the morning');
|
|
126
|
+
});
|
|
127
|
+
it('should override provided time zone with UTC', () => {
|
|
128
|
+
const datetimeParts = {
|
|
129
|
+
day: 1,
|
|
130
|
+
month: 1,
|
|
131
|
+
year: 2022,
|
|
132
|
+
hour: 9,
|
|
133
|
+
minute: 40,
|
|
134
|
+
};
|
|
135
|
+
const formatOptions = {
|
|
136
|
+
timeZone: 'Australia/Sydney',
|
|
137
|
+
timeZoneName: 'long',
|
|
138
|
+
hour: 'numeric',
|
|
139
|
+
minute: 'numeric',
|
|
140
|
+
};
|
|
141
|
+
expect(getLocalizedTime('en-US', datetimeParts, 'h12', formatOptions)).toEqual('9:40 AM');
|
|
142
|
+
});
|
|
143
|
+
it('should not include time zone name', () => {
|
|
144
|
+
const datetimeParts = {
|
|
145
|
+
day: 1,
|
|
146
|
+
month: 1,
|
|
147
|
+
year: 2022,
|
|
148
|
+
hour: 9,
|
|
149
|
+
minute: 40,
|
|
150
|
+
};
|
|
151
|
+
const formatOptions = {
|
|
152
|
+
timeZone: 'America/Los_Angeles',
|
|
153
|
+
timeZoneName: 'long',
|
|
154
|
+
hour: 'numeric',
|
|
155
|
+
minute: 'numeric',
|
|
156
|
+
};
|
|
157
|
+
expect(getLocalizedTime('en-US', datetimeParts, 'h12', formatOptions)).toEqual('9:40 AM');
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
describe('stripTimeZone', () => {
|
|
161
|
+
it('should remove the time zone name from the options and set the time zone to UTC', () => {
|
|
162
|
+
const formatOptions = {
|
|
163
|
+
timeZone: 'America/Los_Angeles',
|
|
164
|
+
timeZoneName: 'long',
|
|
165
|
+
hour: 'numeric',
|
|
166
|
+
minute: 'numeric',
|
|
167
|
+
};
|
|
168
|
+
expect(stripTimeZone(formatOptions)).toEqual({
|
|
169
|
+
timeZone: 'UTC',
|
|
170
|
+
hour: 'numeric',
|
|
171
|
+
minute: 'numeric',
|
|
172
|
+
});
|
|
173
|
+
});
|
|
124
174
|
});
|
|
@@ -9,7 +9,26 @@ const getFormattedDayPeriod = (dayPeriod) => {
|
|
|
9
9
|
}
|
|
10
10
|
return dayPeriod.toUpperCase();
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Including time zone options may lead to the rendered text showing a
|
|
14
|
+
* different time from what was selected in the Datetime, which could cause
|
|
15
|
+
* confusion.
|
|
16
|
+
*/
|
|
17
|
+
export const stripTimeZone = (formatOptions) => {
|
|
18
|
+
return Object.assign(Object.assign({}, formatOptions), {
|
|
19
|
+
/**
|
|
20
|
+
* Setting the time zone to UTC ensures that the value shown is always the
|
|
21
|
+
* same as what was selected and safeguards against older Safari bugs with
|
|
22
|
+
* Intl.DateTimeFormat.
|
|
23
|
+
*/
|
|
24
|
+
timeZone: 'UTC',
|
|
25
|
+
/**
|
|
26
|
+
* We do not want to display the time zone name
|
|
27
|
+
*/
|
|
28
|
+
timeZoneName: undefined
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export const getLocalizedTime = (locale, refParts, hourCycle, formatOptions = { hour: 'numeric', minute: 'numeric' }) => {
|
|
13
32
|
const timeParts = {
|
|
14
33
|
hour: refParts.hour,
|
|
15
34
|
minute: refParts.minute,
|
|
@@ -17,28 +36,13 @@ export const getLocalizedTime = (locale, refParts, hourCycle) => {
|
|
|
17
36
|
if (timeParts.hour === undefined || timeParts.minute === undefined) {
|
|
18
37
|
return 'Invalid Time';
|
|
19
38
|
}
|
|
20
|
-
return new Intl.DateTimeFormat(locale, {
|
|
21
|
-
hour: 'numeric',
|
|
22
|
-
minute: 'numeric',
|
|
23
|
-
/**
|
|
24
|
-
* Setting the timeZone to UTC prevents
|
|
25
|
-
* new Intl.DatetimeFormat from subtracting
|
|
26
|
-
* the user's current timezone offset
|
|
27
|
-
* when formatting the time.
|
|
28
|
-
*/
|
|
29
|
-
timeZone: 'UTC',
|
|
39
|
+
return new Intl.DateTimeFormat(locale, Object.assign(Object.assign({}, stripTimeZone(formatOptions)), {
|
|
30
40
|
/**
|
|
31
41
|
* We use hourCycle here instead of hour12 due to:
|
|
32
42
|
* https://bugs.chromium.org/p/chromium/issues/detail?id=1347316&q=hour12&can=2
|
|
33
43
|
*/
|
|
34
|
-
hourCycle
|
|
35
|
-
|
|
36
|
-
* Setting Z at the end indicates that this
|
|
37
|
-
* date string is in the UTC time zone. This
|
|
38
|
-
* prevents new Date from adding the time zone
|
|
39
|
-
* offset when getting the ISO string.
|
|
40
|
-
*/
|
|
41
|
-
}).format(new Date(convertDataToISO(Object.assign({
|
|
44
|
+
hourCycle
|
|
45
|
+
})).format(new Date(convertDataToISO(Object.assign({
|
|
42
46
|
/**
|
|
43
47
|
* JS uses a simplified ISO 8601 format which allows for
|
|
44
48
|
* date-only formats and date-time formats, but not
|
|
@@ -125,14 +129,6 @@ export const generateDayAriaLabel = (locale, today, refParts) => {
|
|
|
125
129
|
*/
|
|
126
130
|
return today ? `Today, ${labelString}` : labelString;
|
|
127
131
|
};
|
|
128
|
-
/**
|
|
129
|
-
* Gets the day of the week, month, and day
|
|
130
|
-
* Used for the header in MD mode.
|
|
131
|
-
*/
|
|
132
|
-
export const getMonthAndDay = (locale, refParts) => {
|
|
133
|
-
const date = getNormalizedDate(refParts);
|
|
134
|
-
return new Intl.DateTimeFormat(locale, { weekday: 'short', month: 'short', day: 'numeric', timeZone: 'UTC' }).format(date);
|
|
135
|
-
};
|
|
136
132
|
/**
|
|
137
133
|
* Given a locale and a date object,
|
|
138
134
|
* return a formatted string that includes
|
|
@@ -143,15 +139,6 @@ export const getMonthAndYear = (locale, refParts) => {
|
|
|
143
139
|
const date = getNormalizedDate(refParts);
|
|
144
140
|
return new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric', timeZone: 'UTC' }).format(date);
|
|
145
141
|
};
|
|
146
|
-
/**
|
|
147
|
-
* Given a locale and a date object,
|
|
148
|
-
* return a formatted string that includes
|
|
149
|
-
* the short month, numeric day, and full year.
|
|
150
|
-
* Example: Apr 22, 2021
|
|
151
|
-
*/
|
|
152
|
-
export const getMonthDayAndYear = (locale, refParts) => {
|
|
153
|
-
return getLocalizedDateTime(locale, refParts, { month: 'short', day: 'numeric', year: 'numeric' });
|
|
154
|
-
};
|
|
155
142
|
/**
|
|
156
143
|
* Given a locale and a date object,
|
|
157
144
|
* return a formatted string that includes
|
|
@@ -201,7 +188,7 @@ export const getNormalizedDate = (refParts) => {
|
|
|
201
188
|
*/
|
|
202
189
|
export const getLocalizedDateTime = (locale, refParts, options) => {
|
|
203
190
|
const date = getNormalizedDate(refParts);
|
|
204
|
-
return getDateTimeFormat(locale, options).format(date);
|
|
191
|
+
return getDateTimeFormat(locale, stripTimeZone(options)).format(date);
|
|
205
192
|
};
|
|
206
193
|
/**
|
|
207
194
|
* Given a locale, DatetimeParts, and options
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { printIonWarning } from "../../../utils/logging/index";
|
|
5
|
+
/**
|
|
6
|
+
* If a time zone is provided in the format options, the rendered text could
|
|
7
|
+
* differ from what was selected in the Datetime, which could cause
|
|
8
|
+
* confusion.
|
|
9
|
+
*/
|
|
10
|
+
export const warnIfTimeZoneProvided = (el, formatOptions) => {
|
|
11
|
+
var _a, _b, _c, _d;
|
|
12
|
+
if (((_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _a === void 0 ? void 0 : _a.timeZone) ||
|
|
13
|
+
((_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _b === void 0 ? void 0 : _b.timeZoneName) ||
|
|
14
|
+
((_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _c === void 0 ? void 0 : _c.timeZone) ||
|
|
15
|
+
((_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _d === void 0 ? void 0 : _d.timeZoneName)) {
|
|
16
|
+
printIonWarning('Datetime: "timeZone" and "timeZoneName" are not supported in "formatOptions".', el);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const checkForPresentationFormatMismatch = (el, presentation, formatOptions) => {
|
|
20
|
+
// formatOptions is not required
|
|
21
|
+
if (!formatOptions)
|
|
22
|
+
return;
|
|
23
|
+
// If formatOptions is provided, the date and/or time objects are required, depending on the presentation
|
|
24
|
+
switch (presentation) {
|
|
25
|
+
case 'date':
|
|
26
|
+
case 'month-year':
|
|
27
|
+
case 'month':
|
|
28
|
+
case 'year':
|
|
29
|
+
if (formatOptions.date === undefined) {
|
|
30
|
+
printIonWarning(`Datetime: The '${presentation}' presentation requires a date object in formatOptions.`, el);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
case 'time':
|
|
34
|
+
if (formatOptions.time === undefined) {
|
|
35
|
+
printIonWarning(`Datetime: The 'time' presentation requires a time object in formatOptions.`, el);
|
|
36
|
+
}
|
|
37
|
+
break;
|
|
38
|
+
case 'date-time':
|
|
39
|
+
case 'time-date':
|
|
40
|
+
if (formatOptions.date === undefined && formatOptions.time === undefined) {
|
|
41
|
+
printIonWarning(`Datetime: The '${presentation}' presentation requires either a date or time object (or both) in formatOptions.`, el);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
};
|