voyager-ionic-core 8.0.0-beta.1 → 8.0.0-beta.2
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 +2 -2
- package/components/buttons.js +3 -3
- package/components/checkbox.js +3 -3
- package/components/data.js +23 -38
- package/components/hardware-back-button.js +3 -3
- package/components/helpers.js +1 -8
- package/components/input.utils.js +12 -0
- 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 +2 -2
- 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 +11 -10
- package/components/ion-datetime.js +69 -7
- 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 +2 -2
- 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 +6 -6
- 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 +3 -3
- package/components/ion-nav-link.js +1 -1
- package/components/ion-nav.js +1 -1
- package/components/ion-note.js +43 -1
- package/components/ion-picker-legacy.js +2 -2
- package/components/ion-progress-bar.js +1 -1
- package/components/ion-range.js +129 -24
- 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 +34 -5
- 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 +23 -29
- 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-textarea.js +5 -5
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +2 -2
- package/components/ion-toast.js +2 -2
- package/components/ion-toggle.js +3 -3
- package/components/ion-toolbar.js +2 -2
- package/components/item.js +11 -92
- package/components/label.js +5 -5
- package/components/list-header.js +2 -2
- package/components/list.js +1 -1
- package/components/overlays.js +61 -19
- package/components/picker-column-option.js +2 -2
- package/components/picker-column.js +3 -3
- package/components/picker-column2.js +2 -2
- package/components/picker.js +2 -2
- package/components/popover.js +2 -2
- package/components/radio-group.js +1 -1
- package/components/radio.js +3 -3
- package/components/ripple-effect.js +1 -1
- package/components/select-popover.js +13 -19
- package/components/spinner.js +1 -1
- package/dist/cjs/{animation-4ad55058.js → animation-3e7bb91e.js} +1 -1
- package/dist/cjs/{app-globals-4d26cb5a.js → app-globals-e132c781.js} +1 -1
- package/dist/cjs/{button-active-e447f58b.js → button-active-60ecf64d.js} +1 -1
- package/dist/cjs/{data-e2bf21de.js → data-21dc0f81.js} +22 -39
- package/dist/cjs/{framework-delegate-53817ef1.js → framework-delegate-0499d444.js} +1 -1
- package/dist/cjs/{hardware-back-button-4cb049f1.js → hardware-back-button-1c67a5a2.js} +5 -5
- package/dist/cjs/{helpers-b71ca811.js → helpers-668b3d95.js} +1 -8
- package/dist/cjs/{index-7574e3d2.js → index-275cc12e.js} +1 -1
- package/dist/cjs/{index-ea266398.js → index-2d21d526.js} +441 -12
- package/dist/cjs/{index-bbc5b1f7.js → index-ba7ba0af.js} +4 -4
- package/dist/cjs/{index-347883f6.js → index-c49cb371.js} +1 -1
- package/dist/cjs/{index-92bb95d6.js → index-e4b6c97e.js} +4 -4
- package/dist/cjs/index.cjs.js +11 -11
- package/dist/cjs/{input-shims-679d87bc.js → input-shims-b419f083.js} +2 -2
- package/dist/cjs/{input.utils-5175aea1.js → input.utils-32c0a14a.js} +13 -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 +7 -7
- package/dist/cjs/ion-button_2.cjs.entry.js +5 -5
- package/dist/cjs/ion-card_5.cjs.entry.js +11 -11
- package/dist/cjs/ion-checkbox.cjs.entry.js +6 -6
- 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 +14 -13
- package/dist/cjs/ion-datetime_3.cjs.entry.js +77 -18
- 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 +10 -10
- package/dist/cjs/ion-item-option_3.cjs.entry.js +8 -8
- package/dist/cjs/ion-item_8.cjs.entry.js +23 -92
- 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 +12 -12
- package/dist/cjs/ion-nav_2.cjs.entry.js +8 -8
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +5 -5
- package/dist/cjs/ion-picker-column.cjs.entry.js +6 -6
- package/dist/cjs/ion-picker.cjs.entry.js +4 -4
- package/dist/cjs/ion-popover.cjs.entry.js +10 -10
- package/dist/cjs/ion-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/ion-radio_2.cjs.entry.js +7 -7
- package/dist/cjs/ion-range.cjs.entry.js +133 -28
- 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 +31 -7
- package/dist/cjs/ion-segment_2.cjs.entry.js +8 -8
- package/dist/cjs/ion-select_3.cjs.entry.js +13 -13
- 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 +9 -9
- package/dist/cjs/ion-toast.cjs.entry.js +9 -9
- package/dist/cjs/ion-toggle.cjs.entry.js +6 -6
- package/dist/cjs/{ionic-global-59aa7eb7.js → ionic-global-5762eca9.js} +1 -1
- package/dist/cjs/ionic.cjs.js +28 -5
- package/dist/cjs/{ios.transition-997fe325.js → ios.transition-3e119901.js} +4 -4
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-2b76c2c6.js → md.transition-c1392f92.js} +4 -4
- package/dist/cjs/{notch-controller-8e0ae870.js → notch-controller-08a24f39.js} +1 -1
- package/dist/cjs/{overlays-3d02b54f.js → overlays-44b8d0e0.js} +64 -22
- package/dist/cjs/{status-tap-3761c2d4.js → status-tap-32430b3e.js} +3 -3
- package/dist/cjs/{swipe-back-5b71fc62.js → swipe-back-b8484483.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/action-sheet/action-sheet.js +3 -3
- package/dist/collection/components/alert/alert.js +2 -2
- 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 +2 -2
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +2 -2
- package/dist/collection/components/button/button.js +2 -2
- package/dist/collection/components/buttons/buttons.js +2 -2
- 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 +3 -3
- 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 +50 -7
- package/dist/collection/components/datetime/test/basic/datetime.e2e.js +77 -0
- 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 +11 -10
- 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.js +2 -2
- 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.ios.css +2 -0
- package/dist/collection/components/input/input.js +3 -3
- package/dist/collection/components/input/input.md.css +4 -2
- package/dist/collection/components/input/test/highlight/input.e2e.js +144 -0
- package/dist/collection/components/item/item.ios.css +5 -197
- package/dist/collection/components/item/item.js +4 -166
- package/dist/collection/components/item/item.md.css +7 -360
- package/dist/collection/components/item/test/basic/item.e2e.js +0 -5
- package/dist/collection/components/item/test/item.spec.js +1 -1
- 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 -5
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/label/label.md.css +0 -75
- 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 +12 -6
- 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/modal.js +3 -3
- 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 +3 -3
- package/dist/collection/components/picker-column-option/picker-column-option.js +2 -2
- package/dist/collection/components/picker-legacy/picker.js +2 -2
- package/dist/collection/components/picker-legacy-column/picker-column.js +2 -2
- package/dist/collection/components/popover/popover.js +2 -2
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio/radio.js +3 -3
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/range/range.js +129 -24
- 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 +84 -5
- 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.ios.css +5 -0
- package/dist/collection/components/select/select.js +2 -2
- package/dist/collection/components/select/select.md.css +4 -27
- package/dist/collection/components/select/test/highlight/select.e2e.js +88 -4
- 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/textarea/test/highlight/textarea.e2e.js +144 -0
- package/dist/collection/components/textarea/textarea.ios.css +2 -20
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/textarea/textarea.md.css +4 -15
- 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 +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/utils/forms/index.js +0 -1
- package/dist/collection/utils/hardware-back-button.js +2 -2
- package/dist/collection/utils/helpers.js +1 -8
- package/dist/collection/utils/overlays.js +61 -19
- package/dist/collection/utils/slot-mutation-controller.js +12 -0
- package/dist/collection/utils/test/overlays/overlays.spec.js +53 -0
- package/dist/docs.json +158 -189
- package/dist/esm/{animation-a4acf150.js → animation-9a23ed8d.js} +1 -1
- package/dist/esm/{app-globals-cfb6787b.js → app-globals-80842d68.js} +1 -1
- package/dist/esm/{button-active-454e5c57.js → button-active-c6e18fac.js} +1 -1
- package/dist/esm/{data-691286f1.js → data-ae11fd43.js} +23 -38
- package/dist/esm/{framework-delegate-1eb3236c.js → framework-delegate-3fd96df8.js} +1 -1
- package/dist/esm/{hardware-back-button-3a14f99e.js → hardware-back-button-fb295e3a.js} +5 -5
- package/dist/esm/{helpers-ae74b3c9.js → helpers-f51cf76f.js} +1 -8
- package/dist/esm/{index-1f563746.js → index-1262064c.js} +1 -1
- package/dist/esm/{index-9b6d6df3.js → index-5d6a0317.js} +441 -13
- package/dist/esm/{index-5847f4a9.js → index-6da05eef.js} +4 -4
- package/dist/esm/{index-66871a1d.js → index-86688780.js} +1 -1
- package/dist/esm/{index-03086279.js → index-9d7e5d3e.js} +4 -4
- package/dist/esm/index.js +11 -11
- package/dist/esm/{input-shims-56c1f603.js → input-shims-2a4ad5a1.js} +2 -2
- package/dist/esm/{input.utils-482fc893.js → input.utils-d2dee48e.js} +13 -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 +7 -7
- package/dist/esm/ion-button_2.entry.js +5 -5
- package/dist/esm/ion-card_5.entry.js +11 -11
- package/dist/esm/ion-checkbox.entry.js +6 -6
- 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 +14 -13
- package/dist/esm/ion-datetime_3.entry.js +77 -18
- 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 +10 -10
- package/dist/esm/ion-item-option_3.entry.js +8 -8
- package/dist/esm/ion-item_8.entry.js +23 -92
- 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 +12 -12
- package/dist/esm/ion-nav_2.entry.js +8 -8
- package/dist/esm/ion-picker-column-option.entry.js +5 -5
- package/dist/esm/ion-picker-column.entry.js +6 -6
- package/dist/esm/ion-picker.entry.js +4 -4
- package/dist/esm/ion-popover.entry.js +10 -10
- package/dist/esm/ion-progress-bar.entry.js +4 -4
- package/dist/esm/ion-radio_2.entry.js +7 -7
- package/dist/esm/ion-range.entry.js +133 -28
- 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 +31 -7
- package/dist/esm/ion-segment_2.entry.js +8 -8
- package/dist/esm/ion-select_3.entry.js +13 -13
- 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 +9 -9
- package/dist/esm/ion-toast.entry.js +9 -9
- package/dist/esm/ion-toggle.entry.js +6 -6
- package/dist/esm/{ionic-global-c976d684.js → ionic-global-a589c12c.js} +1 -1
- package/dist/esm/ionic.js +29 -6
- package/dist/esm/{ios.transition-a097dbf5.js → ios.transition-fbde96b0.js} +4 -4
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-b4170ef7.js → md.transition-76e0020b.js} +4 -4
- package/dist/esm/{notch-controller-18bf9f76.js → notch-controller-00572cf8.js} +1 -1
- package/dist/esm/{overlays-4ba3b255.js → overlays-b1ac1c63.js} +64 -22
- package/dist/esm/{status-tap-7a12f017.js → status-tap-84b41f36.js} +3 -3
- package/dist/esm/{swipe-back-ae14449a.js → swipe-back-4f2e5d47.js} +1 -1
- package/dist/esm-es5/{animation-a4acf150.js → animation-9a23ed8d.js} +1 -1
- package/dist/esm-es5/app-globals-80842d68.js +4 -0
- package/dist/esm-es5/{button-active-454e5c57.js → button-active-c6e18fac.js} +1 -1
- package/dist/esm-es5/data-ae11fd43.js +4 -0
- package/dist/esm-es5/{framework-delegate-1eb3236c.js → framework-delegate-3fd96df8.js} +1 -1
- package/dist/esm-es5/hardware-back-button-fb295e3a.js +4 -0
- package/dist/esm-es5/helpers-f51cf76f.js +4 -0
- package/dist/esm-es5/index-1262064c.js +4 -0
- package/dist/esm-es5/index-5d6a0317.js +5 -0
- package/dist/esm-es5/{index-5847f4a9.js → index-6da05eef.js} +1 -1
- package/dist/esm-es5/{index-66871a1d.js → index-86688780.js} +1 -1
- package/dist/esm-es5/{index-03086279.js → index-9d7e5d3e.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{input-shims-56c1f603.js → input-shims-2a4ad5a1.js} +1 -1
- package/dist/esm-es5/input.utils-d2dee48e.js +4 -0
- 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-option.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column.entry.js +1 -1
- package/dist/esm-es5/ion-picker.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-c976d684.js → ionic-global-a589c12c.js} +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-a097dbf5.js → ios.transition-fbde96b0.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/md.transition-76e0020b.js +4 -0
- package/dist/esm-es5/{notch-controller-18bf9f76.js → notch-controller-00572cf8.js} +1 -1
- package/dist/esm-es5/overlays-b1ac1c63.js +4 -0
- package/dist/esm-es5/{status-tap-7a12f017.js → status-tap-84b41f36.js} +1 -1
- package/dist/esm-es5/{swipe-back-ae14449a.js → swipe-back-4f2e5d47.js} +1 -1
- package/dist/html.html-data.json +24 -26
- 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-a8cc0027.system.js → p-01171ead.system.js} +1 -1
- package/dist/ionic/{p-5aa60929.js → p-031c5621.js} +1 -1
- package/dist/ionic/{p-d504bc71.entry.js → p-03f3ebd2.entry.js} +1 -1
- package/dist/ionic/{p-a06af32c.system.js → p-04f9ce05.system.js} +1 -1
- package/dist/ionic/{p-7665bbbc.system.entry.js → p-063c093d.system.entry.js} +1 -1
- package/dist/ionic/p-06e951a9.entry.js +4 -0
- package/dist/ionic/{p-77982637.entry.js → p-070cf7c3.entry.js} +1 -1
- package/dist/ionic/{p-7b795aee.system.entry.js → p-07a0190a.system.entry.js} +1 -1
- package/dist/ionic/{p-1bca443b.system.entry.js → p-0afaf65b.system.entry.js} +1 -1
- package/dist/ionic/p-0b175848.entry.js +4 -0
- package/dist/ionic/p-0da58e53.entry.js +4 -0
- package/dist/ionic/p-0eb381c3.system.js +4 -0
- package/dist/ionic/p-144ae947.js +4 -0
- package/dist/ionic/{p-c5b77291.system.entry.js → p-15e2ff5f.system.entry.js} +1 -1
- package/dist/ionic/{p-85cb4733.entry.js → p-19243ae6.entry.js} +1 -1
- package/dist/ionic/p-1acaf641.entry.js +4 -0
- package/dist/ionic/{p-8e83b7f1.system.entry.js → p-1d1394da.system.entry.js} +1 -1
- package/dist/ionic/{p-842777af.js → p-1e5c0c49.js} +1 -1
- package/dist/ionic/{p-1ed99eba.system.entry.js → p-2028668d.system.entry.js} +1 -1
- package/dist/ionic/{p-1a68de09.entry.js → p-2070f8d8.entry.js} +1 -1
- package/dist/ionic/{p-1c436e95.system.entry.js → p-219c17cf.system.entry.js} +1 -1
- package/dist/ionic/p-21e88629.entry.js +4 -0
- package/dist/ionic/{p-41970e75.entry.js → p-234dc736.entry.js} +1 -1
- package/dist/ionic/{p-1600d68c.system.entry.js → p-237b1791.system.entry.js} +1 -1
- package/dist/ionic/{p-27594fc2.js → p-239906f1.js} +1 -1
- package/dist/ionic/{p-85464e28.system.entry.js → p-25648922.system.entry.js} +2 -2
- package/dist/ionic/{p-e38b3c29.entry.js → p-29ecf879.entry.js} +1 -1
- package/dist/ionic/{p-454b36f7.system.entry.js → p-2c560619.system.entry.js} +1 -1
- package/dist/ionic/{p-62f15daf.system.entry.js → p-2e2635b4.system.entry.js} +2 -2
- package/dist/ionic/p-2f53f47a.entry.js +4 -0
- package/dist/ionic/{p-6d95943d.system.js → p-30dfa360.system.js} +1 -1
- package/dist/ionic/p-314ae72a.js +4 -0
- package/dist/ionic/{p-816476b0.system.js → p-33e39575.system.js} +1 -1
- package/dist/ionic/p-355736ea.js +4 -0
- package/dist/ionic/p-373e757d.entry.js +4 -0
- package/dist/ionic/{p-8a50f8d6.system.js → p-3944820a.system.js} +1 -1
- package/dist/ionic/p-39483fc9.js +4 -0
- package/dist/ionic/{p-5afb6e48.entry.js → p-39860681.entry.js} +1 -1
- package/dist/ionic/{p-6fd26009.js → p-3a572692.js} +1 -1
- package/dist/ionic/{p-a5b7a286.entry.js → p-42d9f81e.entry.js} +1 -1
- package/dist/ionic/{p-b4bb9cd0.system.entry.js → p-45a2b1ee.system.entry.js} +1 -1
- package/dist/ionic/{p-15708968.js → p-46a4e4e8.js} +1 -1
- package/dist/ionic/{p-f16bfd53.entry.js → p-48fef2f1.entry.js} +1 -1
- package/dist/ionic/p-493bce1f.entry.js +4 -0
- package/dist/ionic/{p-c38c5dfc.system.js → p-4997d7dc.system.js} +1 -1
- package/dist/ionic/{p-cb944b1a.system.js → p-49a205d0.system.js} +1 -1
- package/dist/ionic/{p-c880c809.js → p-4ba6d7d1.js} +1 -1
- package/dist/ionic/p-4d6ec139.entry.js +4 -0
- package/dist/ionic/p-4d7230bd.system.entry.js +4 -0
- package/dist/ionic/{p-8d4d902b.js → p-4da2ae44.js} +1 -1
- package/dist/ionic/{p-466bdeae.entry.js → p-5054b3db.entry.js} +1 -1
- package/dist/ionic/{p-f7ed6a44.system.entry.js → p-50d19fc7.system.entry.js} +1 -1
- package/dist/ionic/p-513abaf6.system.entry.js +4 -0
- package/dist/ionic/p-517b76cb.entry.js +4 -0
- package/dist/ionic/{p-a6cc38d4.js → p-51b1a6be.js} +1 -1
- package/dist/ionic/p-53c592ec.system.js +4 -0
- package/dist/ionic/{p-ebe0be94.system.entry.js → p-566818dd.system.entry.js} +1 -1
- package/dist/ionic/{p-6e1fa025.js → p-59e86adb.js} +1 -1
- package/dist/ionic/{p-91a72ad6.system.entry.js → p-5f9abba8.system.entry.js} +2 -2
- package/dist/ionic/{p-baa409f1.system.entry.js → p-6042920d.system.entry.js} +2 -2
- package/dist/ionic/{p-7b44b443.entry.js → p-65374504.entry.js} +1 -1
- package/dist/ionic/{p-f3d6085c.entry.js → p-66596659.entry.js} +1 -1
- package/dist/ionic/p-667290b0.system.js +4 -0
- package/dist/ionic/{p-c3a2e5cc.entry.js → p-66e50777.entry.js} +1 -1
- package/dist/ionic/{p-4a8f173c.system.js → p-67dbcd3b.system.js} +1 -1
- package/dist/ionic/{p-95e14c7b.system.js → p-696db6f4.system.js} +1 -1
- package/dist/ionic/p-69df28fd.entry.js +4 -0
- package/dist/ionic/p-6d0e7669.system.entry.js +4 -0
- package/dist/ionic/p-6d1f5de9.system.entry.js +4 -0
- package/dist/ionic/{p-dcfc297d.system.entry.js → p-6d75fbe8.system.entry.js} +1 -1
- package/dist/ionic/{p-d4d0538c.system.entry.js → p-7162350a.system.entry.js} +1 -1
- package/dist/ionic/p-7200f2da.entry.js +4 -0
- package/dist/ionic/{p-81869a97.system.entry.js → p-739f8b95.system.entry.js} +1 -1
- package/dist/ionic/{p-7a3fa32c.entry.js → p-75addf49.entry.js} +1 -1
- package/dist/ionic/{p-1fa738c4.js → p-78b3da77.js} +1 -1
- package/dist/ionic/{p-03f63663.system.js → p-7c7e495d.system.js} +1 -1
- package/dist/ionic/{p-8ab308e9.js → p-7d4f6f18.js} +1 -1
- package/dist/ionic/{p-5c3991e3.system.entry.js → p-824d44c5.system.entry.js} +2 -2
- package/dist/ionic/{p-ded27993.entry.js → p-8c0b08db.entry.js} +1 -1
- package/dist/ionic/p-8dfe436d.system.js +4 -0
- package/dist/ionic/{p-da83d833.system.entry.js → p-91567c90.system.entry.js} +1 -1
- package/dist/ionic/{p-5a055df4.entry.js → p-95648db9.entry.js} +1 -1
- package/dist/ionic/{p-f71082f7.entry.js → p-9c970454.entry.js} +1 -1
- package/dist/ionic/{p-30892e0c.system.js → p-9e3177a5.system.js} +1 -1
- package/dist/ionic/p-a03c993e.entry.js +4 -0
- package/dist/ionic/{p-8aeed464.system.entry.js → p-a37d4fe9.system.entry.js} +1 -1
- package/dist/ionic/{p-3bac30bf.system.entry.js → p-a43fbe0a.system.entry.js} +1 -1
- package/dist/ionic/{p-1a5ed3fe.system.entry.js → p-a5c33d6b.system.entry.js} +1 -1
- package/dist/ionic/p-a7f788ec.entry.js +4 -0
- package/dist/ionic/{p-1e0a18a1.system.entry.js → p-acd64713.system.entry.js} +1 -1
- package/dist/ionic/{p-eec92f77.system.js → p-af9256a0.system.js} +1 -1
- package/dist/ionic/{p-7541ca9f.system.entry.js → p-b0850af6.system.entry.js} +1 -1
- package/dist/ionic/p-b0d35de4.system.js +4 -0
- package/dist/ionic/p-b996756b.entry.js +4 -0
- package/dist/ionic/p-ba9120fe.system.entry.js +4 -0
- package/dist/ionic/p-bb78b64e.entry.js +4 -0
- package/dist/ionic/{p-97135baa.entry.js → p-bbc4f653.entry.js} +1 -1
- package/dist/ionic/p-c34d1515.js +4 -0
- package/dist/ionic/{p-82f5375e.system.entry.js → p-c4390f10.system.entry.js} +1 -1
- package/dist/ionic/p-c629d22b.system.js +5 -0
- package/dist/ionic/p-c834c535.system.entry.js +4 -0
- package/dist/ionic/{p-ad2b216a.system.entry.js → p-c8675b7b.system.entry.js} +1 -1
- package/dist/ionic/{p-6ef5f4da.entry.js → p-c8f7f923.entry.js} +1 -1
- package/dist/ionic/p-c962e9ea.entry.js +4 -0
- package/dist/ionic/{p-e64277c4.entry.js → p-cada6331.entry.js} +1 -1
- package/dist/ionic/p-cc19ecba.system.entry.js +4 -0
- package/dist/ionic/{p-1ea88de9.system.js → p-ce36d285.system.js} +1 -1
- package/dist/ionic/{p-fd94dd20.system.entry.js → p-d09c9468.system.entry.js} +1 -1
- package/dist/ionic/{p-4523be60.entry.js → p-d10bbab7.entry.js} +1 -1
- package/dist/ionic/p-d268f7e2.system.entry.js +4 -0
- package/dist/ionic/{p-4c2cac66.entry.js → p-d3c1c23f.entry.js} +1 -1
- package/dist/ionic/{p-780ff3b5.system.entry.js → p-d4be0d81.system.entry.js} +1 -1
- package/dist/ionic/p-d5ef3a0a.entry.js +4 -0
- package/dist/ionic/p-d60342e3.js +4 -0
- package/dist/ionic/{p-1ce172db.entry.js → p-d85eebc3.entry.js} +1 -1
- package/dist/ionic/{p-09872ec8.system.entry.js → p-d9dfdbb5.system.entry.js} +1 -1
- package/dist/ionic/{p-25850474.entry.js → p-da5bbd4f.entry.js} +1 -1
- package/dist/ionic/{p-7cc01684.js → p-dad515dc.js} +1 -1
- package/dist/ionic/{p-afcd4f49.entry.js → p-de39f314.entry.js} +1 -1
- package/dist/ionic/{p-ddc4e717.entry.js → p-de4c700f.entry.js} +1 -1
- package/dist/ionic/{p-19f6ac6c.system.js → p-e01ebeba.system.js} +1 -1
- package/dist/ionic/{p-602494c6.entry.js → p-e222fdd1.entry.js} +1 -1
- package/dist/ionic/{p-add93c7a.entry.js → p-e5e492d8.entry.js} +1 -1
- package/dist/ionic/{p-874510e9.system.entry.js → p-e9412fe7.system.entry.js} +1 -1
- package/dist/ionic/{p-3410a9cb.system.js → p-ea5173f9.system.js} +1 -1
- package/dist/ionic/{p-4825e380.entry.js → p-eb546888.entry.js} +1 -1
- package/dist/ionic/{p-65d3f0e9.js → p-eee87ebb.js} +1 -1
- package/dist/ionic/p-f012e8f2.system.entry.js +4 -0
- package/dist/ionic/{p-aaca8dd4.system.entry.js → p-f15b0bbc.system.entry.js} +1 -1
- package/dist/ionic/{p-2b3e0d99.system.entry.js → p-f15f8140.system.entry.js} +1 -1
- package/dist/ionic/{p-a71dc777.system.js → p-f3e8c505.system.js} +1 -1
- package/dist/ionic/{p-760dbd5e.js → p-f5cb9689.js} +1 -1
- package/dist/ionic/p-f687573e.system.js +4 -0
- package/dist/ionic/{p-f6a6b7ef.system.entry.js → p-f6db2e96.system.entry.js} +2 -2
- package/dist/ionic/p-f8502e85.js +5 -0
- package/dist/ionic/{p-cd366840.system.entry.js → p-f8dfae89.system.entry.js} +1 -1
- package/dist/ionic/p-fcec3b7a.system.entry.js +4 -0
- package/dist/ionic/{p-cb0e4100.system.entry.js → p-ff740d68.system.entry.js} +1 -1
- package/dist/types/components/datetime/datetime-interface.d.ts +10 -0
- package/dist/types/components/datetime/datetime.d.ts +9 -1
- package/dist/types/components/datetime/utils/format.d.ts +7 -13
- package/dist/types/components/datetime/utils/validate.d.ts +8 -0
- package/dist/types/components/item/item.d.ts +0 -32
- package/dist/types/components/menu/menu-interface.d.ts +1 -0
- package/dist/types/components/menu/menu.d.ts +2 -2
- package/dist/types/components/range/range.d.ts +29 -0
- package/dist/types/components/searchbar/searchbar.d.ts +38 -0
- package/dist/types/components.d.ts +38 -46
- package/dist/types/utils/forms/index.d.ts +0 -1
- package/dist/types/utils/hardware-back-button.d.ts +1 -1
- package/dist/types/utils/helpers.d.ts +0 -1
- package/hydrate/index.js +499 -349
- package/package.json +1 -1
- package/components/note.js +0 -48
- package/dist/collection/components/item/test/legacy/disabled/item.e2e.js +0 -14
- package/dist/collection/utils/forms/form-controller.js +0 -61
- package/dist/esm-es5/app-globals-cfb6787b.js +0 -4
- package/dist/esm-es5/data-691286f1.js +0 -4
- package/dist/esm-es5/hardware-back-button-3a14f99e.js +0 -4
- package/dist/esm-es5/helpers-ae74b3c9.js +0 -4
- package/dist/esm-es5/index-1f563746.js +0 -4
- package/dist/esm-es5/index-9b6d6df3.js +0 -5
- package/dist/esm-es5/input.utils-482fc893.js +0 -4
- package/dist/esm-es5/md.transition-b4170ef7.js +0 -4
- package/dist/esm-es5/overlays-4ba3b255.js +0 -4
- package/dist/ionic/p-060fdc03.entry.js +0 -4
- package/dist/ionic/p-069388dd.system.js +0 -4
- package/dist/ionic/p-06fccad7.entry.js +0 -4
- package/dist/ionic/p-0ca35c1d.system.entry.js +0 -4
- package/dist/ionic/p-134d4936.system.js +0 -4
- package/dist/ionic/p-19e79fe8.entry.js +0 -4
- package/dist/ionic/p-22d2a891.js +0 -4
- package/dist/ionic/p-239262e4.system.entry.js +0 -4
- package/dist/ionic/p-300b2cf1.entry.js +0 -4
- package/dist/ionic/p-32bd7ed7.entry.js +0 -4
- package/dist/ionic/p-43322b14.js +0 -4
- package/dist/ionic/p-4ad02639.entry.js +0 -4
- package/dist/ionic/p-5289aade.js +0 -4
- package/dist/ionic/p-60efe117.js +0 -5
- package/dist/ionic/p-6657681b.system.entry.js +0 -4
- package/dist/ionic/p-66e6860f.system.js +0 -4
- package/dist/ionic/p-6e5eeb35.entry.js +0 -4
- package/dist/ionic/p-6f6d56f1.entry.js +0 -4
- package/dist/ionic/p-70218e28.system.entry.js +0 -4
- package/dist/ionic/p-72bc2484.system.entry.js +0 -4
- package/dist/ionic/p-82d459c1.js +0 -4
- package/dist/ionic/p-8ba5912c.entry.js +0 -4
- package/dist/ionic/p-8d50220b.system.js +0 -4
- package/dist/ionic/p-8d602214.system.js +0 -5
- package/dist/ionic/p-8e3ee444.system.entry.js +0 -4
- package/dist/ionic/p-9382ebab.entry.js +0 -4
- package/dist/ionic/p-942c19cb.entry.js +0 -4
- package/dist/ionic/p-96391c0e.entry.js +0 -4
- package/dist/ionic/p-9d6f351e.js +0 -4
- package/dist/ionic/p-9e3b3f15.system.js +0 -4
- package/dist/ionic/p-a375c9f6.system.entry.js +0 -4
- package/dist/ionic/p-a58ec401.js +0 -4
- package/dist/ionic/p-b1a9e85a.system.entry.js +0 -4
- package/dist/ionic/p-bcb58446.entry.js +0 -4
- package/dist/ionic/p-c2336a9e.system.entry.js +0 -4
- package/dist/ionic/p-cbc3840e.entry.js +0 -4
- package/dist/ionic/p-cf852615.system.entry.js +0 -4
- package/dist/ionic/p-e15eda82.system.js +0 -4
- package/dist/ionic/p-e470466e.entry.js +0 -4
- package/dist/ionic/p-ef99a759.entry.js +0 -4
- package/dist/ionic/p-fc5ddbf6.entry.js +0 -4
- package/dist/ionic/p-feb66f6f.entry.js +0 -4
- package/dist/types/utils/forms/form-controller.d.ts +0 -15
|
@@ -14,11 +14,11 @@ export class CardHeader {
|
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
16
|
const mode = getIonMode(this);
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: '05a406ae897dd0d1564bb9d0e213c5c2c21445fa', class: createColorClasses(this.color, {
|
|
18
18
|
'card-header-translucent': this.translucent,
|
|
19
19
|
'ion-inherit-color': true,
|
|
20
20
|
[mode]: true,
|
|
21
|
-
}) }, h("slot", { key: '
|
|
21
|
+
}) }, h("slot", { key: '505a74bfb528182bad69d519b848ac2060f4552f' })));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "ion-card-header"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -13,10 +13,10 @@ export class CardSubtitle {
|
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
15
|
const mode = getIonMode(this);
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '4494e715bdff695b17df995bca3c9924cc9dec6c', role: "heading", "aria-level": "3", class: createColorClasses(this.color, {
|
|
17
17
|
'ion-inherit-color': true,
|
|
18
18
|
[mode]: true,
|
|
19
|
-
}) }, h("slot", { key: '
|
|
19
|
+
}) }, h("slot", { key: '717e7f2b865b7bb6ae570922eb740c4ae731d85d' })));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "ion-card-subtitle"; }
|
|
22
22
|
static get encapsulation() { return "shadow"; }
|
|
@@ -13,10 +13,10 @@ export class CardTitle {
|
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
15
|
const mode = getIonMode(this);
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '1f26cd9bd47f87540dfaff6ac8150a80bcf14475', role: "heading", "aria-level": "2", class: createColorClasses(this.color, {
|
|
17
17
|
'ion-inherit-color': true,
|
|
18
18
|
[mode]: true,
|
|
19
|
-
}) }, h("slot", { key: '
|
|
19
|
+
}) }, h("slot", { key: 'b2d51db6dc9284e17cb900af557b36ef866cdc3c' })));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "ion-card-title"; }
|
|
22
22
|
static get encapsulation() { return "shadow"; }
|
|
@@ -72,7 +72,7 @@ export class Checkbox {
|
|
|
72
72
|
const mode = getIonMode(this);
|
|
73
73
|
const path = getSVGPath(mode, indeterminate);
|
|
74
74
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '93550068abf4a5103a5d7f06e88e8d004382c203', "aria-checked": indeterminate ? 'mixed' : `${checked}`, class: createColorClasses(color, {
|
|
76
76
|
[mode]: true,
|
|
77
77
|
'in-item': hostContext('ion-item', el),
|
|
78
78
|
'checkbox-checked': checked,
|
|
@@ -82,10 +82,10 @@ export class Checkbox {
|
|
|
82
82
|
[`checkbox-justify-${justify}`]: true,
|
|
83
83
|
[`checkbox-alignment-${alignment}`]: true,
|
|
84
84
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
85
|
-
}), onClick: this.onClick }, h("label", { key: '
|
|
85
|
+
}), onClick: this.onClick }, h("label", { key: '43c0a59f152c8b836fcfcefd29db16962568b1e1', class: "checkbox-wrapper" }, h("input", Object.assign({ key: '7dc4216a96c001216a99349290d7615032952aee', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, inheritedAttributes)), h("div", { key: 'a7454e4c99eb6ea3fe4db171c0071b803949c4d0', class: {
|
|
86
86
|
'label-text-wrapper': true,
|
|
87
87
|
'label-text-wrapper-hidden': el.textContent === '',
|
|
88
|
-
}, part: "label" }, h("slot", { key: '
|
|
88
|
+
}, part: "label" }, h("slot", { key: '41741533b49c0281d8ff496c7b5eeccd944d2b2a' })), h("div", { key: 'e3b43df785386c2cd87fb3a38777c34a7d9b32e0', class: "native-wrapper" }, h("svg", { key: 'd3cfb07ec4c7b3e45b9cf5a049fcc841fdb4e2c3', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
|
|
89
89
|
}
|
|
90
90
|
getSVGPath(mode, indeterminate) {
|
|
91
91
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -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: '6c6497d9397407443784f1b79df0b58d6d24eed2', "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: 'a4d431e3b066420890fcaa30bbc99f1240dff11c' }), mode === 'md' && h("ion-ripple-effect", null)));
|
|
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: 'af31133e071846ac6609a46eabe59cc481dafdb7', 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: 'd11a95925819a0e2dc69966b7893f0d3efc62eb9' })));
|
|
117
117
|
}
|
|
118
118
|
static get is() { return "ion-col"; }
|
|
119
119
|
static get encapsulation() { return "shadow"; }
|
|
@@ -335,7 +335,7 @@ export class Content {
|
|
|
335
335
|
const forceOverscroll = this.shouldForceOverscroll();
|
|
336
336
|
const transitionShadow = mode === 'ios';
|
|
337
337
|
this.resize();
|
|
338
|
-
return (h(Host, { key: '
|
|
338
|
+
return (h(Host, { key: '133795359748c29c2f26f2c4b05315c1ee2ebf14', role: isMainContent ? 'main' : undefined, class: createColorClasses(this.color, {
|
|
339
339
|
[mode]: true,
|
|
340
340
|
'content-sizing': hostContext('ion-popover', this.el),
|
|
341
341
|
overscroll: forceOverscroll,
|
|
@@ -343,12 +343,12 @@ export class Content {
|
|
|
343
343
|
}), style: {
|
|
344
344
|
'--offset-top': `${this.cTop}px`,
|
|
345
345
|
'--offset-bottom': `${this.cBottom}px`,
|
|
346
|
-
} }, h("div", { key: '
|
|
346
|
+
} }, h("div", { key: 'cec324eeb397b9947b48706a726a71c0a338c47b', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), h("div", { key: 'da55ddf94fe7fba83e3625f08ce0561136911828', class: {
|
|
347
347
|
'inner-scroll': true,
|
|
348
348
|
'scroll-x': scrollX,
|
|
349
349
|
'scroll-y': scrollY,
|
|
350
350
|
overscroll: (scrollX || scrollY) && forceOverscroll,
|
|
351
|
-
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '
|
|
351
|
+
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", { key: '5277456fa0cca2680fbb3ae48f90100ba16bf90d' })), transitionShadow ? (h("div", { class: "transition-effect" }, h("div", { class: "transition-cover" }), h("div", { class: "transition-shadow" }))) : null, h("slot", { key: 'e3dfb4aa64d29e5cc24e8b0cd75a7eb1e0d6954c', name: "fixed" })));
|
|
352
352
|
}
|
|
353
353
|
static get is() { return "ion-content"; }
|
|
354
354
|
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';
|
|
@@ -921,7 +932,7 @@ export class Datetime {
|
|
|
921
932
|
});
|
|
922
933
|
}
|
|
923
934
|
componentWillLoad() {
|
|
924
|
-
const { el, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
935
|
+
const { el, formatOptions, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
925
936
|
if (multiple) {
|
|
926
937
|
if (presentation !== 'date') {
|
|
927
938
|
printIonWarning('Multiple date selection is only supported for presentation="date".', el);
|
|
@@ -938,6 +949,10 @@ export class Datetime {
|
|
|
938
949
|
printIonWarning('The highlightedDates property is not supported with preferWheel="true".', el);
|
|
939
950
|
}
|
|
940
951
|
}
|
|
952
|
+
if (formatOptions) {
|
|
953
|
+
checkForPresentationFormatMismatch(el, presentation, formatOptions);
|
|
954
|
+
warnIfTimeZoneProvided(el, formatOptions);
|
|
955
|
+
}
|
|
941
956
|
const hourValues = (this.parsedHourValues = convertToArrayOfNumbers(this.hourValues));
|
|
942
957
|
const minuteValues = (this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues));
|
|
943
958
|
const monthValues = (this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues));
|
|
@@ -1391,7 +1406,7 @@ export class Datetime {
|
|
|
1391
1406
|
return h("slot", { name: "time-label" }, "Time");
|
|
1392
1407
|
}
|
|
1393
1408
|
renderTimeOverlay() {
|
|
1394
|
-
const { disabled, hourCycle, isTimePopoverOpen, locale } = this;
|
|
1409
|
+
const { disabled, hourCycle, isTimePopoverOpen, locale, formatOptions } = this;
|
|
1395
1410
|
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
1396
1411
|
const activePart = this.getActivePartsWithFallback();
|
|
1397
1412
|
return [
|
|
@@ -1411,7 +1426,7 @@ export class Datetime {
|
|
|
1411
1426
|
await popoverRef.onWillDismiss();
|
|
1412
1427
|
this.isTimePopoverOpen = false;
|
|
1413
1428
|
}
|
|
1414
|
-
} }, getLocalizedTime(locale, activePart, computedHourCycle)),
|
|
1429
|
+
} }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time)),
|
|
1415
1430
|
h("ion-popover", { alignment: "center", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {
|
|
1416
1431
|
/**
|
|
1417
1432
|
* Intersection Observers do not consistently fire between Blink and Webkit
|
|
@@ -1434,7 +1449,8 @@ export class Datetime {
|
|
|
1434
1449
|
];
|
|
1435
1450
|
}
|
|
1436
1451
|
getHeaderSelectedDateText() {
|
|
1437
|
-
|
|
1452
|
+
var _a;
|
|
1453
|
+
const { activeParts, formatOptions, multiple, titleSelectedDatesFormatter } = this;
|
|
1438
1454
|
const isArray = Array.isArray(activeParts);
|
|
1439
1455
|
let headerText;
|
|
1440
1456
|
if (multiple && isArray && activeParts.length !== 1) {
|
|
@@ -1450,7 +1466,7 @@ export class Datetime {
|
|
|
1450
1466
|
}
|
|
1451
1467
|
else {
|
|
1452
1468
|
// for exactly 1 day selected (multiple set or not), show a formatted version of that
|
|
1453
|
-
headerText =
|
|
1469
|
+
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' });
|
|
1454
1470
|
}
|
|
1455
1471
|
return headerText;
|
|
1456
1472
|
}
|
|
@@ -1539,7 +1555,7 @@ export class Datetime {
|
|
|
1539
1555
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1540
1556
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1541
1557
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1542
|
-
return (h(Host, { key: '
|
|
1558
|
+
return (h(Host, { key: '1dac1c5d908ba080b2ed4cb9c02fd346ca8e8fa5', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1543
1559
|
[mode]: true,
|
|
1544
1560
|
['datetime-readonly']: readonly,
|
|
1545
1561
|
['datetime-disabled']: disabled,
|
|
@@ -1627,6 +1643,27 @@ export class Datetime {
|
|
|
1627
1643
|
"reflect": false,
|
|
1628
1644
|
"defaultValue": "false"
|
|
1629
1645
|
},
|
|
1646
|
+
"formatOptions": {
|
|
1647
|
+
"type": "unknown",
|
|
1648
|
+
"mutable": false,
|
|
1649
|
+
"complexType": {
|
|
1650
|
+
"original": "FormatOptions",
|
|
1651
|
+
"resolved": "undefined | { date: DateTimeFormatOptions; time?: DateTimeFormatOptions | undefined; } | { date?: DateTimeFormatOptions | undefined; time: DateTimeFormatOptions; }",
|
|
1652
|
+
"references": {
|
|
1653
|
+
"FormatOptions": {
|
|
1654
|
+
"location": "import",
|
|
1655
|
+
"path": "./datetime-interface",
|
|
1656
|
+
"id": "src/components/datetime/datetime-interface.ts::FormatOptions"
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
"required": false,
|
|
1661
|
+
"optional": true,
|
|
1662
|
+
"docs": {
|
|
1663
|
+
"tags": [],
|
|
1664
|
+
"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)."
|
|
1665
|
+
}
|
|
1666
|
+
},
|
|
1630
1667
|
"readonly": {
|
|
1631
1668
|
"type": "boolean",
|
|
1632
1669
|
"mutable": false,
|
|
@@ -2322,6 +2359,9 @@ export class Datetime {
|
|
|
2322
2359
|
static get elementRef() { return "el"; }
|
|
2323
2360
|
static get watchers() {
|
|
2324
2361
|
return [{
|
|
2362
|
+
"propName": "formatOptions",
|
|
2363
|
+
"methodName": "formatOptionsChanged"
|
|
2364
|
+
}, {
|
|
2325
2365
|
"propName": "disabled",
|
|
2326
2366
|
"methodName": "disabledChanged"
|
|
2327
2367
|
}, {
|
|
@@ -2330,6 +2370,9 @@ export class Datetime {
|
|
|
2330
2370
|
}, {
|
|
2331
2371
|
"propName": "max",
|
|
2332
2372
|
"methodName": "maxChanged"
|
|
2373
|
+
}, {
|
|
2374
|
+
"propName": "presentation",
|
|
2375
|
+
"methodName": "presentationChanged"
|
|
2333
2376
|
}, {
|
|
2334
2377
|
"propName": "yearValues",
|
|
2335
2378
|
"methodName": "yearValuesChanged"
|
|
@@ -414,3 +414,80 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
414
414
|
});
|
|
415
415
|
});
|
|
416
416
|
});
|
|
417
|
+
/**
|
|
418
|
+
* This behavior does not differ across
|
|
419
|
+
* directions.
|
|
420
|
+
*/
|
|
421
|
+
configs({ directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
422
|
+
test.describe(title('datetime: formatOptions'), () => {
|
|
423
|
+
test('should format header and time button', async ({ page }) => {
|
|
424
|
+
await page.setContent(`
|
|
425
|
+
<ion-datetime value="2022-02-01T16:30:00">
|
|
426
|
+
<span slot="title">Select Date</span>
|
|
427
|
+
</ion-datetime>
|
|
428
|
+
<script>
|
|
429
|
+
const datetime = document.querySelector('ion-datetime');
|
|
430
|
+
datetime.formatOptions = {
|
|
431
|
+
time: { hour: '2-digit', minute: '2-digit' },
|
|
432
|
+
date: { day: '2-digit', month: 'long', era: 'short' },
|
|
433
|
+
}
|
|
434
|
+
</script>
|
|
435
|
+
`, config);
|
|
436
|
+
await page.locator('.datetime-ready').waitFor();
|
|
437
|
+
const headerDate = page.locator('ion-datetime .datetime-selected-date');
|
|
438
|
+
await expect(headerDate).toHaveText('February 01 AD');
|
|
439
|
+
const timeBody = page.locator('ion-datetime .time-body');
|
|
440
|
+
await expect(timeBody).toHaveText('04:30 PM');
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
/**
|
|
445
|
+
* This behavior does not differ across
|
|
446
|
+
* modes/directions.
|
|
447
|
+
*/
|
|
448
|
+
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
449
|
+
test.describe(title('datetime: formatOptions misconfiguration errors'), () => {
|
|
450
|
+
test('should log a warning if time zone is provided', async ({ page }) => {
|
|
451
|
+
const logs = [];
|
|
452
|
+
page.on('console', (msg) => {
|
|
453
|
+
if (msg.type() === 'warning') {
|
|
454
|
+
logs.push(msg.text());
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
await page.setContent(`
|
|
458
|
+
<ion-datetime value="2022-02-01T16:30:00" presentation="date">
|
|
459
|
+
<span slot="title">Select Date</span>
|
|
460
|
+
</ion-datetime>
|
|
461
|
+
<script>
|
|
462
|
+
const datetime = document.querySelector('ion-datetime');
|
|
463
|
+
datetime.formatOptions = {
|
|
464
|
+
date: { timeZone: 'UTC' },
|
|
465
|
+
}
|
|
466
|
+
</script>
|
|
467
|
+
`, config);
|
|
468
|
+
await page.locator('.datetime-ready').waitFor();
|
|
469
|
+
expect(logs.length).toBe(1);
|
|
470
|
+
expect(logs[0]).toContain('[Ionic Warning]: Datetime: "timeZone" and "timeZoneName" are not supported in "formatOptions".');
|
|
471
|
+
});
|
|
472
|
+
test('should log a warning if the required formatOptions are not provided for a presentation', async ({ page }) => {
|
|
473
|
+
const logs = [];
|
|
474
|
+
page.on('console', (msg) => {
|
|
475
|
+
if (msg.type() === 'warning') {
|
|
476
|
+
logs.push(msg.text());
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
await page.setContent(`
|
|
480
|
+
<ion-datetime value="2022-02-01T16:30:00">
|
|
481
|
+
<span slot="title">Select Date</span>
|
|
482
|
+
</ion-datetime>
|
|
483
|
+
<script>
|
|
484
|
+
const datetime = document.querySelector('ion-datetime');
|
|
485
|
+
datetime.formatOptions = {}
|
|
486
|
+
</script>
|
|
487
|
+
`, config);
|
|
488
|
+
await page.locator('.datetime-ready').waitFor();
|
|
489
|
+
expect(logs.length).toBe(1);
|
|
490
|
+
expect(logs[0]).toContain("[Ionic Warning]: Datetime: The 'date-time' presentation requires either a date or time object (or both) in formatOptions.");
|
|
491
|
+
});
|
|
492
|
+
});
|
|
493
|
+
});
|
|
@@ -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
|
+
};
|