voyager-ionic-core 8.3.3 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/action-sheet.js +2 -2
- package/components/alert.js +7 -5
- package/components/backdrop.js +1 -1
- package/components/button.js +2 -2
- package/components/buttons.js +2 -2
- package/components/checkbox.js +7 -5
- package/components/content.js +446 -0
- package/components/header.js +356 -0
- package/components/index4.js +2 -2
- package/components/ion-app.js +1 -1
- 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 +1 -441
- package/components/ion-datetime-button.js +2 -2
- package/components/ion-datetime.js +2 -2
- 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 +1 -351
- 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-password-toggle.js +3 -3
- package/components/ion-input.js +20 -5
- 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 +19 -19
- package/components/ion-modal.js +1 -1737
- package/components/ion-nav-link.js +1 -1
- package/components/ion-nav.js +1 -1
- package/components/ion-note.js +2 -2
- package/components/ion-picker-legacy.js +2 -2
- package/components/ion-progress-bar.js +1 -1
- package/components/ion-range.js +3 -3
- 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 +4 -4
- package/components/ion-segment-button.js +24 -5
- package/components/ion-segment-content.d.ts +11 -0
- package/components/ion-segment-content.js +37 -0
- package/components/ion-segment-view.d.ts +11 -0
- package/components/ion-segment-view.js +140 -0
- package/components/ion-segment.js +110 -15
- package/components/ion-select-modal.d.ts +11 -0
- package/components/ion-select-modal.js +9 -0
- package/components/ion-select-option.js +1 -1
- package/components/ion-select.js +114 -41
- 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 +19 -4
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +1 -70
- package/components/ion-toast.js +2 -2
- package/components/ion-toggle.js +3 -3
- package/components/ion-toolbar.js +1 -88
- package/components/label.js +2 -2
- package/components/list-header.js +2 -2
- package/components/list.js +1 -1
- package/components/modal.js +1742 -0
- package/components/overlays.js +62 -7
- 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 +5 -3
- package/components/radio.js +7 -5
- package/components/ripple-effect.js +1 -1
- package/components/select-modal.js +197 -0
- package/components/select-popover.js +1 -1
- package/components/spinner.js +1 -1
- package/components/title.js +75 -0
- package/components/toolbar.js +93 -0
- package/dist/cjs/{index-9cd00dc3.js → index-8e789962.js} +2 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +3 -3
- package/dist/cjs/ion-alert.cjs.entry.js +8 -6
- package/dist/cjs/ion-app_8.cjs.entry.js +15 -15
- package/dist/cjs/ion-avatar_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-card_5.cjs.entry.js +8 -8
- package/dist/cjs/ion-checkbox.cjs.entry.js +5 -4
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +7 -7
- package/dist/cjs/ion-fab_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-img.cjs.entry.js +1 -1
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ion-input.cjs.entry.js +20 -5
- package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +12 -12
- package/dist/cjs/ion-loading.cjs.entry.js +3 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +24 -24
- package/dist/cjs/ion-modal.cjs.entry.js +5 -5
- package/dist/cjs/ion-nav_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-column.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +3 -3
- package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ion-radio_2.cjs.entry.js +12 -8
- package/dist/cjs/ion-range.cjs.entry.js +3 -3
- package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +4 -4
- package/dist/cjs/ion-segment-content.cjs.entry.js +23 -0
- package/dist/cjs/ion-segment-view.cjs.entry.js +122 -0
- package/dist/cjs/ion-segment_2.cjs.entry.js +132 -19
- package/dist/cjs/ion-select-modal.cjs.entry.js +111 -0
- package/dist/cjs/ion-select_3.cjs.entry.js +40 -15
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +19 -4
- package/dist/cjs/ion-toast.cjs.entry.js +3 -3
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-0123d7d4.js → overlays-ba0f6986.js} +62 -7
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/action-sheet/action-sheet.js +2 -2
- package/dist/collection/components/alert/alert.js +7 -5
- package/dist/collection/components/app/app.js +1 -1
- 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.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 +29 -4
- 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 +2 -2
- package/dist/collection/components/datetime-button/datetime-button.js +2 -2
- 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.js +20 -5
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +3 -3
- 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.js +2 -2
- 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 +47 -27
- 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 +4 -4
- 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 +9 -7
- package/dist/collection/components/radio-group/radio-group.js +5 -3
- package/dist/collection/components/range/range.js +3 -3
- 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 +4 -4
- package/dist/collection/components/segment/segment.js +115 -14
- package/dist/collection/components/segment-button/segment-button.js +40 -5
- package/dist/collection/components/segment-content/segment-content.css +6 -0
- package/dist/collection/components/segment-content/segment-content.js +21 -0
- package/dist/collection/components/segment-view/segment-view-interface.js +1 -0
- package/dist/collection/components/segment-view/segment-view.ios.css +83 -0
- package/dist/collection/components/segment-view/segment-view.js +227 -0
- package/dist/collection/components/segment-view/segment-view.md.css +83 -0
- package/dist/collection/components/select/select.js +61 -16
- package/dist/collection/components/select-modal/select-modal-interface.js +1 -0
- package/dist/collection/components/select-modal/select-modal.ios.css +3 -0
- package/dist/collection/components/select-modal/select-modal.js +159 -0
- package/dist/collection/components/select-modal/select-modal.md.css +110 -0
- package/dist/collection/components/select-modal/test/fixtures.js +48 -0
- 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/textarea.js +19 -4
- 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/menu-controller/index.js +2 -2
- package/dist/collection/utils/overlays.js +62 -7
- package/dist/docs.json +426 -29
- package/dist/esm/{index-fe1782b1.js → index-24b48b06.js} +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +3 -3
- package/dist/esm/ion-alert.entry.js +8 -6
- package/dist/esm/ion-app_8.entry.js +15 -15
- package/dist/esm/ion-avatar_3.entry.js +4 -4
- package/dist/esm/ion-back-button.entry.js +2 -2
- package/dist/esm/ion-backdrop.entry.js +1 -1
- package/dist/esm/ion-breadcrumb_2.entry.js +6 -6
- package/dist/esm/ion-button_2.entry.js +2 -2
- package/dist/esm/ion-card_5.entry.js +8 -8
- package/dist/esm/ion-checkbox.entry.js +5 -4
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +5 -5
- package/dist/esm/ion-datetime-button.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +7 -7
- package/dist/esm/ion-fab_3.entry.js +6 -6
- package/dist/esm/ion-img.entry.js +1 -1
- package/dist/esm/ion-infinite-scroll_2.entry.js +3 -3
- package/dist/esm/ion-input-password-toggle.entry.js +3 -3
- package/dist/esm/ion-input.entry.js +20 -5
- package/dist/esm/ion-item-option_3.entry.js +4 -4
- package/dist/esm/ion-item_8.entry.js +12 -12
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu_3.entry.js +24 -24
- package/dist/esm/ion-modal.entry.js +5 -5
- package/dist/esm/ion-nav_2.entry.js +2 -2
- package/dist/esm/ion-picker-column-option.entry.js +2 -2
- package/dist/esm/ion-picker-column.entry.js +3 -3
- package/dist/esm/ion-picker.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +3 -3
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-radio_2.entry.js +12 -8
- package/dist/esm/ion-range.entry.js +3 -3
- package/dist/esm/ion-refresher_2.entry.js +2 -2
- package/dist/esm/ion-reorder_2.entry.js +2 -2
- package/dist/esm/ion-ripple-effect.entry.js +1 -1
- package/dist/esm/ion-route_4.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +4 -4
- package/dist/esm/ion-segment-content.entry.js +19 -0
- package/dist/esm/ion-segment-view.entry.js +118 -0
- package/dist/esm/ion-segment_2.entry.js +132 -19
- package/dist/esm/ion-select-modal.entry.js +107 -0
- package/dist/esm/ion-select_3.entry.js +40 -15
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +19 -4
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-9c75ec54.js → overlays-ae10d43d.js} +62 -7
- package/dist/esm-es5/{index-fe1782b1.js → index-24b48b06.js} +1 -1
- package/dist/esm-es5/index.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 +2 -2
- 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-password-toggle.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-content.entry.js +4 -0
- package/dist/esm-es5/ion-segment-view.entry.js +4 -0
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select-modal.entry.js +4 -0
- 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.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/overlays-ae10d43d.js +4 -0
- package/dist/html.html-data.json +65 -2
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-313ccc01.system.entry.js → p-01186920.system.entry.js} +1 -1
- package/dist/ionic/{p-ecb57d24.system.entry.js → p-0161caf9.system.entry.js} +1 -1
- package/dist/ionic/p-0437ace4.system.entry.js +4 -0
- package/dist/ionic/p-04fc24ee.system.js +4 -0
- package/dist/ionic/{p-e3e1e3de.entry.js → p-081a4ce4.entry.js} +1 -1
- package/dist/ionic/p-09cf2394.entry.js +4 -0
- package/dist/ionic/p-14be4015.entry.js +4 -0
- package/dist/ionic/p-15e76dd1.entry.js +4 -0
- package/dist/ionic/{p-003eecb9.entry.js → p-16188af7.entry.js} +1 -1
- package/dist/ionic/p-16799667.system.entry.js +4 -0
- package/dist/ionic/p-16bfb979.system.entry.js +4 -0
- package/dist/ionic/{p-b54fc1ae.entry.js → p-19ec4f42.entry.js} +1 -1
- package/dist/ionic/p-1b7605a7.system.entry.js +4 -0
- package/dist/ionic/p-1c1b8e1f.entry.js +4 -0
- package/dist/ionic/{p-8b6232a6.system.entry.js → p-1e010627.system.entry.js} +2 -2
- package/dist/ionic/{p-f50ae0d5.system.entry.js → p-1e41f2aa.system.entry.js} +1 -1
- package/dist/ionic/{p-cdb11938.system.entry.js → p-1e67b266.system.entry.js} +1 -1
- package/dist/ionic/{p-bd25d639.system.entry.js → p-1ebd1e27.system.entry.js} +1 -1
- package/dist/ionic/{p-836d39d4.system.entry.js → p-2172893e.system.entry.js} +1 -1
- package/dist/ionic/{p-4a0a4204.system.entry.js → p-2507278c.system.entry.js} +1 -1
- package/dist/ionic/{p-75c0dc65.system.entry.js → p-2799c6d3.system.entry.js} +1 -1
- package/dist/ionic/{p-a879ecb7.system.entry.js → p-2abae1cc.system.entry.js} +1 -1
- package/dist/ionic/{p-293ed6ac.system.entry.js → p-2b838f86.system.entry.js} +1 -1
- package/dist/ionic/{p-4a82bd1c.system.entry.js → p-2e46590d.system.entry.js} +1 -1
- package/dist/ionic/p-2fc0dafe.entry.js +4 -0
- package/dist/ionic/p-322c5fb4.system.js +2 -2
- package/dist/ionic/p-33a8a71b.entry.js +4 -0
- package/dist/ionic/{p-4b0fedb7.system.entry.js → p-37cb43bd.system.entry.js} +1 -1
- package/dist/ionic/{p-ad9b5007.system.entry.js → p-3b419d79.system.entry.js} +1 -1
- package/dist/ionic/p-424eb140.system.entry.js +4 -0
- package/dist/ionic/{p-b7657e8d.entry.js → p-4439fc2a.entry.js} +1 -1
- package/dist/ionic/{p-ed6962d3.system.entry.js → p-4561cd09.system.entry.js} +1 -1
- package/dist/ionic/{p-c34659b9.entry.js → p-45693d7e.entry.js} +1 -1
- package/dist/ionic/p-49a0e74c.entry.js +4 -0
- package/dist/ionic/{p-9fef1364.entry.js → p-4a274c89.entry.js} +1 -1
- package/dist/ionic/{p-d57661a1.entry.js → p-4b000207.entry.js} +1 -1
- package/dist/ionic/{p-fd0cb4ef.entry.js → p-4ec778aa.entry.js} +1 -1
- package/dist/ionic/{p-f559ac5b.entry.js → p-51796b2d.entry.js} +1 -1
- package/dist/ionic/{p-9ece8dcf.entry.js → p-52d7a191.entry.js} +1 -1
- package/dist/ionic/{p-8ed31163.system.entry.js → p-5393e8bb.system.entry.js} +1 -1
- package/dist/ionic/{p-ce705aac.system.entry.js → p-567de071.system.entry.js} +1 -1
- package/dist/ionic/{p-95823c62.system.entry.js → p-5823babc.system.entry.js} +2 -2
- package/dist/ionic/{p-baffaf8d.system.entry.js → p-58d5df0c.system.entry.js} +1 -1
- package/dist/ionic/{p-521eca2e.entry.js → p-5ab1b709.entry.js} +1 -1
- package/dist/ionic/{p-cff5585e.system.entry.js → p-5b5c1505.system.entry.js} +1 -1
- package/dist/ionic/{p-8d44cf1f.entry.js → p-5b932840.entry.js} +1 -1
- package/dist/ionic/{p-9cc3bcc5.system.entry.js → p-5bd39e5e.system.entry.js} +2 -2
- package/dist/ionic/p-5c831f49.js +4 -0
- package/dist/ionic/{p-5800e441.entry.js → p-5f79d8c5.entry.js} +1 -1
- package/dist/ionic/{p-772dacba.system.entry.js → p-5fce0c0b.system.entry.js} +1 -1
- package/dist/ionic/{p-233e6c93.entry.js → p-62af944c.entry.js} +1 -1
- package/dist/ionic/{p-00b01a55.system.entry.js → p-63b0abde.system.entry.js} +1 -1
- package/dist/ionic/p-6734db42.system.entry.js +4 -0
- package/dist/ionic/p-69666e8a.system.entry.js +4 -0
- package/dist/ionic/{p-5e842258.entry.js → p-6d32975a.entry.js} +1 -1
- package/dist/ionic/p-73dc4950.entry.js +4 -0
- package/dist/ionic/{p-fcd71204.system.entry.js → p-7458862e.system.entry.js} +1 -1
- package/dist/ionic/{p-a3711608.system.entry.js → p-797eeea8.system.entry.js} +1 -1
- package/dist/ionic/{p-f8c8b9ba.entry.js → p-7b9a2b23.entry.js} +1 -1
- package/dist/ionic/{p-6817cf42.system.entry.js → p-7ed1657c.system.entry.js} +1 -1
- package/dist/ionic/{p-22c020db.system.entry.js → p-857ca696.system.entry.js} +1 -1
- package/dist/ionic/{p-a4d51b8d.system.js → p-8f05ba3b.system.js} +1 -1
- package/dist/ionic/p-908d6080.entry.js +4 -0
- package/dist/ionic/{p-af999a31.entry.js → p-937a7e21.entry.js} +1 -1
- package/dist/ionic/{p-4c8fceb0.entry.js → p-95775830.entry.js} +1 -1
- package/dist/ionic/{p-973f0b15.system.entry.js → p-98231c01.system.entry.js} +1 -1
- package/dist/ionic/{p-25928b83.system.entry.js → p-985a7e17.system.entry.js} +1 -1
- package/dist/ionic/{p-e3a5da9d.entry.js → p-98ff6b32.entry.js} +1 -1
- package/dist/ionic/p-9910f786.entry.js +4 -0
- package/dist/ionic/{p-6e85e450.entry.js → p-9df2c6fb.entry.js} +1 -1
- package/dist/ionic/{p-7251fed5.entry.js → p-9ee1e8a6.entry.js} +1 -1
- package/dist/ionic/{p-da263d8e.entry.js → p-9fa07aec.entry.js} +1 -1
- package/dist/ionic/{p-a41699db.entry.js → p-a1051806.entry.js} +1 -1
- package/dist/ionic/p-a1b9a163.entry.js +4 -0
- package/dist/ionic/p-a34b4d94.entry.js +4 -0
- package/dist/ionic/{p-8836d0eb.system.entry.js → p-a49378bb.system.entry.js} +1 -1
- package/dist/ionic/{p-6b8893dd.entry.js → p-a61cba41.entry.js} +1 -1
- package/dist/ionic/p-adbc4bdf.entry.js +4 -0
- package/dist/ionic/{p-49bc6544.entry.js → p-afecb188.entry.js} +1 -1
- package/dist/ionic/{p-755b27f0.system.entry.js → p-b335ffed.system.entry.js} +1 -1
- package/dist/ionic/{p-e3f13b08.js → p-b82d4cab.js} +1 -1
- package/dist/ionic/{p-68c4df55.entry.js → p-b9d7015f.entry.js} +1 -1
- package/dist/ionic/{p-7243df6f.entry.js → p-bb0db172.entry.js} +1 -1
- package/dist/ionic/{p-df83e308.system.entry.js → p-bc36ad98.system.entry.js} +1 -1
- package/dist/ionic/{p-773d118d.entry.js → p-bdad26e3.entry.js} +1 -1
- package/dist/ionic/p-c29f8157.system.entry.js +4 -0
- package/dist/ionic/p-c2b74d92.system.entry.js +4 -0
- package/dist/ionic/{p-176b372f.entry.js → p-c41ac815.entry.js} +1 -1
- package/dist/ionic/{p-5417b9bb.entry.js → p-c9f3a539.entry.js} +1 -1
- package/dist/ionic/{p-2ea1ca4f.system.entry.js → p-ca065903.system.entry.js} +1 -1
- package/dist/ionic/{p-2ca6eac2.system.entry.js → p-cac0e0b3.system.entry.js} +1 -1
- package/dist/ionic/{p-3c968c7f.system.entry.js → p-d18ab582.system.entry.js} +2 -2
- package/dist/ionic/{p-92d7a3d1.entry.js → p-d7aa6b00.entry.js} +1 -1
- package/dist/ionic/{p-21cfd4de.entry.js → p-da074ff7.entry.js} +1 -1
- package/dist/ionic/{p-5e66bcf2.entry.js → p-db0c8e7d.entry.js} +1 -1
- package/dist/ionic/{p-89a0a446.entry.js → p-de930745.entry.js} +1 -1
- package/dist/ionic/p-e2252ad6.entry.js +4 -0
- package/dist/ionic/{p-960803fc.system.entry.js → p-e4ee80be.system.entry.js} +1 -1
- package/dist/ionic/p-e563a35c.entry.js +4 -0
- package/dist/ionic/{p-7740e32c.system.js → p-e7ed4a7f.system.js} +1 -1
- package/dist/ionic/{p-0373d924.system.entry.js → p-ebf042e0.system.entry.js} +1 -1
- package/dist/ionic/{p-9b6c6302.system.entry.js → p-ed75fcfb.system.entry.js} +1 -1
- package/dist/ionic/p-f10b70a1.entry.js +4 -0
- package/dist/ionic/{p-01503bbd.system.entry.js → p-f3102647.system.entry.js} +1 -1
- package/dist/ionic/{p-6562e0a9.system.entry.js → p-fca6ef5f.system.entry.js} +1 -1
- package/dist/ionic/{p-b0180ce1.system.entry.js → p-ffd131f9.system.entry.js} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +2 -1
- package/dist/types/components/input/input.d.ts +3 -0
- package/dist/types/components/menu/menu-interface.d.ts +5 -2
- package/dist/types/components/menu/menu.d.ts +6 -6
- package/dist/types/components/radio/radio.d.ts +1 -1
- package/dist/types/components/segment/segment.d.ts +21 -1
- package/dist/types/components/segment-button/segment-button.d.ts +4 -0
- package/dist/types/components/segment-content/segment-content.d.ts +4 -0
- package/dist/types/components/segment-view/segment-view-interface.d.ts +4 -0
- package/dist/types/components/segment-view/segment-view.d.ts +55 -0
- package/dist/types/components/select/select-interface.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +5 -4
- package/dist/types/components/select-modal/select-modal-interface.d.ts +10 -0
- package/dist/types/components/select-modal/select-modal.d.ts +16 -0
- package/dist/types/components/select-modal/test/fixtures.d.ts +16 -0
- package/dist/types/components/textarea/textarea.d.ts +3 -0
- package/dist/types/components.d.ts +103 -13
- package/dist/types/utils/overlays-interface.d.ts +1 -1
- package/hydrate/index.js +708 -225
- package/hydrate/index.mjs +708 -225
- package/package.json +1 -1
- package/dist/esm-es5/overlays-9c75ec54.js +0 -4
- package/dist/ionic/p-0fa0c92b.entry.js +0 -4
- package/dist/ionic/p-100b83fd.system.entry.js +0 -4
- package/dist/ionic/p-2200e26b.entry.js +0 -4
- package/dist/ionic/p-2b7c93b4.entry.js +0 -4
- package/dist/ionic/p-2c4bdd9d.entry.js +0 -4
- package/dist/ionic/p-44d1539c.system.entry.js +0 -4
- package/dist/ionic/p-53854390.entry.js +0 -4
- package/dist/ionic/p-72ffd137.system.entry.js +0 -4
- package/dist/ionic/p-82ab7ccb.entry.js +0 -4
- package/dist/ionic/p-9172535c.entry.js +0 -4
- package/dist/ionic/p-93f37ceb.system.entry.js +0 -4
- package/dist/ionic/p-98871496.system.js +0 -4
- package/dist/ionic/p-9c23044d.entry.js +0 -4
- package/dist/ionic/p-a0c88dc2.system.entry.js +0 -4
- package/dist/ionic/p-a440397c.js +0 -4
- package/dist/ionic/p-a72fb8a1.system.entry.js +0 -4
- package/dist/ionic/p-ab8a2ff1.entry.js +0 -4
- package/dist/ionic/p-b4c950f8.entry.js +0 -4
- package/dist/ionic/p-bfa2e81c.entry.js +0 -4
- package/dist/ionic/p-d77e12ca.entry.js +0 -4
- package/dist/ionic/p-f88ebc36.entry.js +0 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, d as createEvent, h, f as Host, i as getElement } from './index-28849c61.js';
|
|
5
|
-
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod, F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-
|
|
5
|
+
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod, F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-ae10d43d.js';
|
|
6
6
|
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-63d1a679.js';
|
|
7
7
|
import { r as raf, g as getElementRoot, a as addEventListener, k as hasLazyBuild } from './helpers-da915de8.js';
|
|
8
8
|
import { c as createLockController } from './lock-controller-316928be.js';
|
|
@@ -1294,9 +1294,9 @@ const Popover = class {
|
|
|
1294
1294
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
1295
1295
|
const desktop = isPlatform('desktop');
|
|
1296
1296
|
const enableArrow = arrow && !parentPopover;
|
|
1297
|
-
return (h(Host, Object.assign({ key: '
|
|
1297
|
+
return (h(Host, Object.assign({ key: 'ffe8b37c9ffb5cac210a7307e6cdfcf78712905b', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
1298
1298
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
1299
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: '
|
|
1299
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: '12b3ffa3928b4d56a4f09c3d2f5d493d47b45255', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: '2c2862d5c7e75b637973c712b4982bf4978c0cdf', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '0cfacc52afaa7abc28c1b7742889d7a1c23a37ad', class: "popover-arrow", part: "arrow" }), h("div", { key: '3ef570c44d4fe7f063dd419008c92c8c40d3cd22', class: "popover-content", part: "content" }, h("slot", { key: '6fc5dfdce20fee1642bc1f05d41b5bf7d1034457' })))));
|
|
1300
1300
|
}
|
|
1301
1301
|
get el() { return getElement(this); }
|
|
1302
1302
|
static get watchers() { return {
|
|
@@ -27,7 +27,7 @@ const ProgressBar = class {
|
|
|
27
27
|
const mode = getIonMode(this);
|
|
28
28
|
// If the progress is displayed as a solid bar.
|
|
29
29
|
const progressSolid = buffer === 1;
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '8d8ddf0b26fe33803d3a6168cbedd523d1a888e7', role: "progressbar", "aria-valuenow": type === 'determinate' ? value : null, "aria-valuemin": "0", "aria-valuemax": "1", class: createColorClasses(color, {
|
|
31
31
|
[mode]: true,
|
|
32
32
|
[`progress-bar-${type}`]: true,
|
|
33
33
|
'progress-paused': paused,
|
|
@@ -84,8 +84,10 @@ const Radio = class {
|
|
|
84
84
|
}
|
|
85
85
|
/** @internal */
|
|
86
86
|
async setFocus(ev) {
|
|
87
|
-
ev
|
|
88
|
-
|
|
87
|
+
if (ev !== undefined) {
|
|
88
|
+
ev.stopPropagation();
|
|
89
|
+
ev.preventDefault();
|
|
90
|
+
}
|
|
89
91
|
this.el.focus();
|
|
90
92
|
}
|
|
91
93
|
/** @internal */
|
|
@@ -119,7 +121,7 @@ const Radio = class {
|
|
|
119
121
|
const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex, alignment } = this;
|
|
120
122
|
const mode = getIonMode(this);
|
|
121
123
|
const inItem = hostContext('ion-item', el);
|
|
122
|
-
return (h(Host, { key: '
|
|
124
|
+
return (h(Host, { key: '5a0adab55ad009305de4856fa1b9f93f2279a734', onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
123
125
|
[mode]: true,
|
|
124
126
|
'in-item': inItem,
|
|
125
127
|
'radio-checked': checked,
|
|
@@ -130,10 +132,10 @@ const Radio = class {
|
|
|
130
132
|
// Focus and active styling should not apply when the radio is in an item
|
|
131
133
|
'ion-activatable': !inItem,
|
|
132
134
|
'ion-focusable': !inItem,
|
|
133
|
-
}), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, h("label", { key: '
|
|
135
|
+
}), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, h("label", { key: 'f5673a798e6d87868339f046445f707e1d93b7b6', class: "radio-wrapper" }, h("div", { key: 'e9190c06f75a171cab63e3f74ccf771c3ed87005', class: {
|
|
134
136
|
'label-text-wrapper': true,
|
|
135
137
|
'label-text-wrapper-hidden': !hasLabel,
|
|
136
|
-
}, part: "label" }, h("slot", { key: '
|
|
138
|
+
}, part: "label" }, h("slot", { key: '6cedf4e7b3bd03e4a635727dd7b6094bab64af64' })), h("div", { key: '26dd48d9d2848b7f100b732abdc4a3171adde483', class: "native-wrapper" }, this.renderRadioControl()))));
|
|
137
139
|
}
|
|
138
140
|
get el() { return getElement(this); }
|
|
139
141
|
static get watchers() { return {
|
|
@@ -245,7 +247,9 @@ const RadioGroup = class {
|
|
|
245
247
|
this.ionChange.emit({ value, event });
|
|
246
248
|
}
|
|
247
249
|
onKeydown(ev) {
|
|
248
|
-
|
|
250
|
+
// We don't want the value to automatically change/emit when the radio group is part of a select interface
|
|
251
|
+
// as this will cause the interface to close when navigating through the radio group options
|
|
252
|
+
const inSelectInterface = !!this.el.closest('ion-select-popover') || !!this.el.closest('ion-select-modal');
|
|
249
253
|
if (ev.target && !this.el.contains(ev.target)) {
|
|
250
254
|
return;
|
|
251
255
|
}
|
|
@@ -269,7 +273,7 @@ const RadioGroup = class {
|
|
|
269
273
|
}
|
|
270
274
|
if (next && radios.includes(next)) {
|
|
271
275
|
next.setFocus(ev);
|
|
272
|
-
if (!
|
|
276
|
+
if (!inSelectInterface) {
|
|
273
277
|
this.value = next.value;
|
|
274
278
|
this.emitValueChange(ev);
|
|
275
279
|
}
|
|
@@ -298,7 +302,7 @@ const RadioGroup = class {
|
|
|
298
302
|
const { label, labelId, el, name, value } = this;
|
|
299
303
|
const mode = getIonMode(this);
|
|
300
304
|
renderHiddenInput(true, el, name, value, false);
|
|
301
|
-
return h(Host, { key: '
|
|
305
|
+
return h(Host, { key: '99f543b9caa8e2d30a80e7ea7ecf6b6fdacc76eb', role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode });
|
|
302
306
|
}
|
|
303
307
|
get el() { return getElement(this); }
|
|
304
308
|
static get watchers() { return {
|
|
@@ -603,7 +603,7 @@ const Range = class {
|
|
|
603
603
|
const needsEndAdjustment = inItem && !hasEndContent;
|
|
604
604
|
const mode = getIonMode(this);
|
|
605
605
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
606
|
-
return (h(Host, { key: '
|
|
606
|
+
return (h(Host, { key: '05c699caaead7cc74deaae2a958c4632191473a8', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses(this.color, {
|
|
607
607
|
[mode]: true,
|
|
608
608
|
'in-item': inItem,
|
|
609
609
|
'range-disabled': disabled,
|
|
@@ -612,10 +612,10 @@ const Range = class {
|
|
|
612
612
|
[`range-label-placement-${labelPlacement}`]: true,
|
|
613
613
|
'range-item-start-adjustment': needsStartAdjustment,
|
|
614
614
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
615
|
-
}) }, h("label", { key: '
|
|
615
|
+
}) }, h("label", { key: '959837bcc48c4bda33ae1f62b66ef444329a2961', class: "range-wrapper", id: "range-label" }, h("div", { key: 'a434c6b5c26f57f52b3af98d881e7e6a179c89fc', class: {
|
|
616
616
|
'label-text-wrapper': true,
|
|
617
617
|
'label-text-wrapper-hidden': !hasLabel,
|
|
618
|
-
}, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '
|
|
618
|
+
}, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '87df1037b6b3337bd1fab05d33a26bf658c57914', class: "native-wrapper" }, h("slot", { key: '2cb88f101da49b70aeae29b0bf5445fac241bb2f', name: "start" }), this.renderRangeSlider(), h("slot", { key: '17b835cfb2bd9b8e1957afd425543ff02b913d83', name: "end" })))));
|
|
619
619
|
}
|
|
620
620
|
get el() { return getElement(this); }
|
|
621
621
|
static get watchers() { return {
|
|
@@ -823,7 +823,7 @@ const Refresher = class {
|
|
|
823
823
|
}
|
|
824
824
|
render() {
|
|
825
825
|
const mode = getIonMode(this);
|
|
826
|
-
return (h(Host, { key: '
|
|
826
|
+
return (h(Host, { key: '9d4ac22988aec2c6af0b0c90934c52f62f0e4ce3', slot: "fixed", class: {
|
|
827
827
|
[mode]: true,
|
|
828
828
|
// Used internally for styling
|
|
829
829
|
[`refresher-${mode}`]: true,
|
|
@@ -890,7 +890,7 @@ const RefresherContent = class {
|
|
|
890
890
|
const pullingIcon = this.pullingIcon;
|
|
891
891
|
const hasSpinner = pullingIcon != null && SPINNERS[pullingIcon] !== undefined;
|
|
892
892
|
const mode = getIonMode(this);
|
|
893
|
-
return (h(Host, { key: '
|
|
893
|
+
return (h(Host, { key: '19633bbcf02e3dba885d6bdcdaf2269bf4c8e2f5', class: mode }, h("div", { key: '28922e434a55a6cac0476fe2bee56941ce0d1c02', class: "refresher-pulling" }, this.pullingIcon && hasSpinner && (h("div", { key: 'fe575bf996021884677e9b23a3215d63caf894f5', class: "refresher-pulling-icon" }, h("div", { key: '59fe12297fd95bc33b8df8cd35316e2a1c084d91', class: "spinner-arrow-container" }, h("ion-spinner", { key: 'af9cc013ae04945c140b2865610ca73edb52ab48', name: this.pullingIcon, paused: true }), mode === 'md' && this.pullingIcon === 'circular' && (h("div", { key: '34df66ad1b0f706a0532957251aa2c20bf4587d8', class: "arrow-container" }, h("ion-icon", { key: 'ffdb5c123e606b823491c6c51cc2b497f62581bb', icon: caretBackSharp, "aria-hidden": "true" })))))), this.pullingIcon && !hasSpinner && (h("div", { key: 'ac3a2032bb969264d20fa057e9123441005d7a9d', class: "refresher-pulling-icon" }, h("ion-icon", { key: 'd969d10915548e72aae289b52154366f3dd39b31', icon: this.pullingIcon, lazy: false, "aria-hidden": "true" }))), this.pullingText !== undefined && this.renderPullingText()), h("div", { key: 'a8f854f81a94812d7bef8ce088331d94f49ff53d', class: "refresher-refreshing" }, this.refreshingSpinner && (h("div", { key: 'a1f646945370e40c844d62bc0c647443ae9dfbe7', class: "refresher-refreshing-icon" }, h("ion-spinner", { key: 'ab3ff4047769b6436e222b46d193c1e8b23e2fce', name: this.refreshingSpinner }))), this.refreshingText !== undefined && this.renderRefreshingText())));
|
|
894
894
|
}
|
|
895
895
|
get el() { return getElement(this); }
|
|
896
896
|
};
|
|
@@ -33,7 +33,7 @@ const Reorder = class {
|
|
|
33
33
|
render() {
|
|
34
34
|
const mode = getIonMode(this);
|
|
35
35
|
const reorderIcon = mode === 'ios' ? reorderThreeOutline : reorderTwoSharp;
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '27266e30bcb7e10c57fb6d546399cfb1f1c93b23', class: mode }, h("slot", { key: '8745cb9a31458e884c27eed1fb90d104fe9a79eb' }, h("ion-icon", { key: '6c4b9631a2f5610f1e21b2db025b6702d0d593bf', icon: reorderIcon, lazy: false, class: "reorder-icon", part: "icon", "aria-hidden": "true" }))));
|
|
37
37
|
}
|
|
38
38
|
get el() { return getElement(this); }
|
|
39
39
|
};
|
|
@@ -279,7 +279,7 @@ const ReorderGroup = class {
|
|
|
279
279
|
}
|
|
280
280
|
render() {
|
|
281
281
|
const mode = getIonMode(this);
|
|
282
|
-
return (h(Host, { key: '
|
|
282
|
+
return (h(Host, { key: 'a38c7fbceb677201330a602273d5b55abb32da19', class: {
|
|
283
283
|
[mode]: true,
|
|
284
284
|
'reorder-enabled': !this.disabled,
|
|
285
285
|
'reorder-list-active': this.state !== 0 /* ReorderGroupState.Idle */,
|
|
@@ -64,7 +64,7 @@ const RippleEffect = class {
|
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
66
|
const mode = getIonMode(this);
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: '7ae559bda5d2c1856a45bfa150c2cb4f83373f8e', role: "presentation", class: {
|
|
68
68
|
[mode]: true,
|
|
69
69
|
unbounded: this.unbounded,
|
|
70
70
|
} }));
|
|
@@ -878,10 +878,10 @@ const RouterLink = class {
|
|
|
878
878
|
rel: this.rel,
|
|
879
879
|
target: this.target,
|
|
880
880
|
};
|
|
881
|
-
return (h(Host, { key: '
|
|
881
|
+
return (h(Host, { key: '529ceed5beaf92d7b4cc315c82f449eac18310e8', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
882
882
|
[mode]: true,
|
|
883
883
|
'ion-activatable': true,
|
|
884
|
-
}) }, h("a", Object.assign({ key: '
|
|
884
|
+
}) }, h("a", Object.assign({ key: 'd5f1f8b256695d70bdafd20ff3d1b625963fa2da' }, attrs), h("slot", { key: '613fcdb36a71e076f989551ea21f1d5c118b1cd2' }))));
|
|
885
885
|
}
|
|
886
886
|
};
|
|
887
887
|
RouterLink.style = IonRouterLinkStyle0;
|
|
@@ -389,8 +389,8 @@ const Searchbar = class {
|
|
|
389
389
|
const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
|
|
390
390
|
const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
|
|
391
391
|
const shouldShowCancelButton = this.shouldShowCancelButton();
|
|
392
|
-
const cancelButton = this.showCancelButton !== 'never' && (h("button", { key: '
|
|
393
|
-
return (h(Host, { key: '
|
|
392
|
+
const cancelButton = this.showCancelButton !== 'never' && (h("button", { key: '0ef595eb1628928d4c7fdb166b8e41768700fa6e', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, h("div", { key: 'ea2c9b36d991acf5af7662059cb6b045f683ca94', "aria-hidden": "true" }, mode === 'md' ? (h("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
|
|
393
|
+
return (h(Host, { key: '17d57ece5852d03047e4d53ddad6c9d88a432a00', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses(this.color, {
|
|
394
394
|
[mode]: true,
|
|
395
395
|
'searchbar-animated': animated,
|
|
396
396
|
'searchbar-disabled': this.disabled,
|
|
@@ -400,14 +400,14 @@ const Searchbar = class {
|
|
|
400
400
|
'searchbar-has-focus': this.focused,
|
|
401
401
|
'searchbar-should-show-clear': this.shouldShowClearButton(),
|
|
402
402
|
'searchbar-should-show-cancel': this.shouldShowCancelButton(),
|
|
403
|
-
}) }, h("div", { key: '
|
|
403
|
+
}) }, h("div", { key: 'f67c2124e70c24eef0a271516e9c4bdaf7e98ceb', class: "searchbar-input-container" }, h("input", Object.assign({ key: '8c7f7ccc6809cca30ccc8c4e98e349d3f916321d', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: autocapitalize === 'default' ? undefined : autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, h("ion-icon", { key: 'f06524d3163b3883bbde937862aa1e0e8f49f6e1', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), h("button", { key: '9f7ba2bec93412ecb674b197be13db1de308bb57', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
|
|
404
404
|
/**
|
|
405
405
|
* This prevents mobile browsers from
|
|
406
406
|
* blurring the input when the clear
|
|
407
407
|
* button is activated.
|
|
408
408
|
*/
|
|
409
409
|
ev.preventDefault();
|
|
410
|
-
}, onClick: () => this.onClearInput(true) }, h("ion-icon", { key: '
|
|
410
|
+
}, onClick: () => this.onClearInput(true) }, h("ion-icon", { key: '19fc3dbc722acc47ff7eb3c94ad4de8aed38dff4', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
|
|
411
411
|
}
|
|
412
412
|
get el() { return getElement(this); }
|
|
413
413
|
static get watchers() { return {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { r as registerInstance, h, f as Host } from './index-28849c61.js';
|
|
5
|
+
|
|
6
|
+
const segmentContentCss = ":host{scroll-snap-align:center;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}";
|
|
7
|
+
const IonSegmentContentStyle0 = segmentContentCss;
|
|
8
|
+
|
|
9
|
+
const SegmentContent = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h(Host, { key: '03684b2999ac64fe13e376fd7e7f279976e9d4f2' }, h("slot", { key: '143031075bf33ca19e7cfd76fc8a67b83ccaf11c' })));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
SegmentContent.style = IonSegmentContentStyle0;
|
|
18
|
+
|
|
19
|
+
export { SegmentContent as ion_segment_content };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { r as registerInstance, d as createEvent, h, f as Host, i as getElement } from './index-28849c61.js';
|
|
5
|
+
|
|
6
|
+
const segmentViewIosCss = ":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}";
|
|
7
|
+
const IonSegmentViewIosStyle0 = segmentViewIosCss;
|
|
8
|
+
|
|
9
|
+
const segmentViewMdCss = ":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}";
|
|
10
|
+
const IonSegmentViewMdStyle0 = segmentViewMdCss;
|
|
11
|
+
|
|
12
|
+
const SegmentView = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
registerInstance(this, hostRef);
|
|
15
|
+
this.ionSegmentViewScroll = createEvent(this, "ionSegmentViewScroll", 7);
|
|
16
|
+
this.scrollEndTimeout = null;
|
|
17
|
+
this.isTouching = false;
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
this.isManualScroll = undefined;
|
|
20
|
+
}
|
|
21
|
+
handleScroll(ev) {
|
|
22
|
+
var _a;
|
|
23
|
+
const { scrollLeft, scrollWidth, clientWidth } = ev.target;
|
|
24
|
+
const scrollRatio = scrollLeft / (scrollWidth - clientWidth);
|
|
25
|
+
this.ionSegmentViewScroll.emit({
|
|
26
|
+
scrollRatio,
|
|
27
|
+
isManualScroll: (_a = this.isManualScroll) !== null && _a !== void 0 ? _a : true,
|
|
28
|
+
});
|
|
29
|
+
// Reset the timeout to check for scroll end
|
|
30
|
+
this.resetScrollEndTimeout();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Handle touch start event to know when the user is actively dragging the segment view.
|
|
34
|
+
*/
|
|
35
|
+
handleScrollStart() {
|
|
36
|
+
if (this.scrollEndTimeout) {
|
|
37
|
+
clearTimeout(this.scrollEndTimeout);
|
|
38
|
+
this.scrollEndTimeout = null;
|
|
39
|
+
}
|
|
40
|
+
this.isTouching = true;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Handle touch end event to know when the user is no longer dragging the segment view.
|
|
44
|
+
*/
|
|
45
|
+
handleTouchEnd() {
|
|
46
|
+
this.isTouching = false;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Reset the scroll end detection timer. This is called on every scroll event.
|
|
50
|
+
*/
|
|
51
|
+
resetScrollEndTimeout() {
|
|
52
|
+
if (this.scrollEndTimeout) {
|
|
53
|
+
clearTimeout(this.scrollEndTimeout);
|
|
54
|
+
this.scrollEndTimeout = null;
|
|
55
|
+
}
|
|
56
|
+
this.scrollEndTimeout = setTimeout(() => {
|
|
57
|
+
this.checkForScrollEnd();
|
|
58
|
+
},
|
|
59
|
+
// Setting this to a lower value may result in inconsistencies in behavior
|
|
60
|
+
// across browsers (particularly Firefox).
|
|
61
|
+
// Ideally, all of this logic is removed once the scroll end event is
|
|
62
|
+
// supported on all browsers (https://caniuse.com/?search=scrollend)
|
|
63
|
+
100);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Check if the scroll has ended and the user is not actively touching.
|
|
67
|
+
* If the conditions are met (active content is enabled and no active touch),
|
|
68
|
+
* reset the scroll position and emit the scroll end event.
|
|
69
|
+
*/
|
|
70
|
+
checkForScrollEnd() {
|
|
71
|
+
// Only emit scroll end event if the active content is not disabled and
|
|
72
|
+
// the user is not touching the segment view
|
|
73
|
+
if (!this.isTouching) {
|
|
74
|
+
this.isManualScroll = undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*
|
|
80
|
+
* This method is used to programmatically set the displayed segment content
|
|
81
|
+
* in the segment view. Calling this method will update the `value` of the
|
|
82
|
+
* corresponding segment button.
|
|
83
|
+
*
|
|
84
|
+
* @param id: The id of the segment content to display.
|
|
85
|
+
* @param smoothScroll: Whether to animate the scroll transition.
|
|
86
|
+
*/
|
|
87
|
+
async setContent(id, smoothScroll = true) {
|
|
88
|
+
const contents = this.getSegmentContents();
|
|
89
|
+
const index = contents.findIndex((content) => content.id === id);
|
|
90
|
+
if (index === -1)
|
|
91
|
+
return;
|
|
92
|
+
this.isManualScroll = false;
|
|
93
|
+
this.resetScrollEndTimeout();
|
|
94
|
+
const contentWidth = this.el.offsetWidth;
|
|
95
|
+
this.el.scrollTo({
|
|
96
|
+
top: 0,
|
|
97
|
+
left: index * contentWidth,
|
|
98
|
+
behavior: smoothScroll ? 'smooth' : 'instant',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
getSegmentContents() {
|
|
102
|
+
return Array.from(this.el.querySelectorAll('ion-segment-content'));
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
const { disabled, isManualScroll } = this;
|
|
106
|
+
return (h(Host, { key: '9f4f11d31c4db776f077e59ae895b35dd4454717', class: {
|
|
107
|
+
'segment-view-disabled': disabled,
|
|
108
|
+
'segment-view-scroll-disabled': isManualScroll === false,
|
|
109
|
+
} }, h("slot", { key: 'ea58b21f031cee2ab2b70580f336deaefa364538' })));
|
|
110
|
+
}
|
|
111
|
+
get el() { return getElement(this); }
|
|
112
|
+
};
|
|
113
|
+
SegmentView.style = {
|
|
114
|
+
ios: IonSegmentViewIosStyle0,
|
|
115
|
+
md: IonSegmentViewMdStyle0
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export { SegmentView as ion_segment_view };
|
|
@@ -19,6 +19,7 @@ const Segment = class {
|
|
|
19
19
|
this.ionChange = createEvent(this, "ionChange", 7);
|
|
20
20
|
this.ionSelect = createEvent(this, "ionSelect", 7);
|
|
21
21
|
this.ionStyle = createEvent(this, "ionStyle", 7);
|
|
22
|
+
this.segmentViewEl = null;
|
|
22
23
|
this.onClick = (ev) => {
|
|
23
24
|
const current = ev.target;
|
|
24
25
|
const previous = this.checked;
|
|
@@ -33,7 +34,13 @@ const Segment = class {
|
|
|
33
34
|
if (current !== previous) {
|
|
34
35
|
this.emitValueChange();
|
|
35
36
|
}
|
|
36
|
-
if (this.
|
|
37
|
+
if (this.segmentViewEl) {
|
|
38
|
+
this.updateSegmentView();
|
|
39
|
+
if (this.scrollable && previous) {
|
|
40
|
+
this.checkButton(previous, current);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else if (this.scrollable || !this.swipeGesture) {
|
|
37
44
|
if (previous) {
|
|
38
45
|
this.checkButton(previous, current);
|
|
39
46
|
}
|
|
@@ -89,19 +96,49 @@ const Segment = class {
|
|
|
89
96
|
swipeGestureChanged() {
|
|
90
97
|
this.gestureChanged();
|
|
91
98
|
}
|
|
92
|
-
valueChanged(value) {
|
|
99
|
+
valueChanged(value, oldValue) {
|
|
100
|
+
// Force a value to exist if we're using a segment view
|
|
101
|
+
if (this.segmentViewEl && value === undefined) {
|
|
102
|
+
this.value = this.getButtons()[0].value;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (oldValue !== undefined && value !== undefined) {
|
|
106
|
+
const buttons = this.getButtons();
|
|
107
|
+
const previous = buttons.find((button) => button.value === oldValue);
|
|
108
|
+
const current = buttons.find((button) => button.value === value);
|
|
109
|
+
if (previous && current) {
|
|
110
|
+
if (!this.segmentViewEl) {
|
|
111
|
+
this.checkButton(previous, current);
|
|
112
|
+
}
|
|
113
|
+
else if (this.triggerScrollOnValueChange !== false) {
|
|
114
|
+
this.updateSegmentView();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else if (value !== undefined && oldValue === undefined && this.segmentViewEl) {
|
|
119
|
+
this.updateSegmentView();
|
|
120
|
+
}
|
|
93
121
|
/**
|
|
94
122
|
* `ionSelect` is emitted every time the value changes (internal or external changes).
|
|
95
123
|
* Used by `ion-segment-button` to determine if the button should be checked.
|
|
96
124
|
*/
|
|
97
125
|
this.ionSelect.emit({ value });
|
|
98
|
-
|
|
126
|
+
// The scroll listener should handle scrolling the active button into view as needed
|
|
127
|
+
if (!this.segmentViewEl) {
|
|
128
|
+
this.scrollActiveButtonIntoView();
|
|
129
|
+
}
|
|
130
|
+
this.triggerScrollOnValueChange = undefined;
|
|
99
131
|
}
|
|
100
132
|
disabledChanged() {
|
|
101
133
|
this.gestureChanged();
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
button
|
|
134
|
+
if (!this.segmentViewEl) {
|
|
135
|
+
const buttons = this.getButtons();
|
|
136
|
+
for (const button of buttons) {
|
|
137
|
+
button.disabled = this.disabled;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
this.segmentViewEl.disabled = this.disabled;
|
|
105
142
|
}
|
|
106
143
|
}
|
|
107
144
|
gestureChanged() {
|
|
@@ -111,6 +148,10 @@ const Segment = class {
|
|
|
111
148
|
}
|
|
112
149
|
connectedCallback() {
|
|
113
150
|
this.emitStyle();
|
|
151
|
+
this.segmentViewEl = this.getSegmentView();
|
|
152
|
+
}
|
|
153
|
+
disconnectedCallback() {
|
|
154
|
+
this.segmentViewEl = null;
|
|
114
155
|
}
|
|
115
156
|
componentWillLoad() {
|
|
116
157
|
this.emitStyle();
|
|
@@ -144,6 +185,9 @@ const Segment = class {
|
|
|
144
185
|
if (this.disabled) {
|
|
145
186
|
this.disabledChanged();
|
|
146
187
|
}
|
|
188
|
+
// Update segment view based on the initial value,
|
|
189
|
+
// but do not animate the scroll
|
|
190
|
+
this.updateSegmentView(false);
|
|
147
191
|
}
|
|
148
192
|
onStart(detail) {
|
|
149
193
|
this.valueBeforeGesture = this.value;
|
|
@@ -160,6 +204,7 @@ const Segment = class {
|
|
|
160
204
|
if (value !== undefined) {
|
|
161
205
|
if (this.valueBeforeGesture !== value) {
|
|
162
206
|
this.emitValueChange();
|
|
207
|
+
this.updateSegmentView();
|
|
163
208
|
}
|
|
164
209
|
}
|
|
165
210
|
this.valueBeforeGesture = undefined;
|
|
@@ -187,12 +232,7 @@ const Segment = class {
|
|
|
187
232
|
setActivated(activated) {
|
|
188
233
|
const buttons = this.getButtons();
|
|
189
234
|
buttons.forEach((button) => {
|
|
190
|
-
|
|
191
|
-
button.classList.add('segment-button-activated');
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
button.classList.remove('segment-button-activated');
|
|
195
|
-
}
|
|
235
|
+
button.classList.toggle('segment-button-activated', activated);
|
|
196
236
|
});
|
|
197
237
|
this.activated = activated;
|
|
198
238
|
}
|
|
@@ -243,6 +283,7 @@ const Segment = class {
|
|
|
243
283
|
currentIndicator.classList.add('segment-button-indicator-animated');
|
|
244
284
|
// Remove the transform to slide the indicator back to the button clicked
|
|
245
285
|
currentIndicator.style.setProperty('transform', '');
|
|
286
|
+
this.scrollActiveButtonIntoView(true);
|
|
246
287
|
});
|
|
247
288
|
this.value = current.value;
|
|
248
289
|
this.setCheckedClasses();
|
|
@@ -258,6 +299,60 @@ const Segment = class {
|
|
|
258
299
|
buttons[next].classList.add('segment-button-after-checked');
|
|
259
300
|
}
|
|
260
301
|
}
|
|
302
|
+
getSegmentView() {
|
|
303
|
+
const buttons = this.getButtons();
|
|
304
|
+
// Get the first button with a contentId
|
|
305
|
+
const firstContentId = buttons.find((button) => button.contentId);
|
|
306
|
+
// Get the segment content with an id matching the button's contentId
|
|
307
|
+
const segmentContent = document.querySelector(`ion-segment-content[id="${firstContentId === null || firstContentId === void 0 ? void 0 : firstContentId.contentId}"]`);
|
|
308
|
+
// Return the segment view for that matching segment content
|
|
309
|
+
return segmentContent === null || segmentContent === void 0 ? void 0 : segmentContent.closest('ion-segment-view');
|
|
310
|
+
}
|
|
311
|
+
handleSegmentViewScroll(ev) {
|
|
312
|
+
const { scrollRatio, isManualScroll } = ev.detail;
|
|
313
|
+
if (!isManualScroll) {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
const dispatchedFrom = ev.target;
|
|
317
|
+
const segmentViewEl = this.segmentViewEl;
|
|
318
|
+
const segmentEl = this.el;
|
|
319
|
+
// Only update the indicator if the event was dispatched from the correct segment view
|
|
320
|
+
if (ev.composedPath().includes(segmentViewEl) || (dispatchedFrom === null || dispatchedFrom === void 0 ? void 0 : dispatchedFrom.contains(segmentEl))) {
|
|
321
|
+
const buttons = this.getButtons();
|
|
322
|
+
// If no buttons are found or there is no value set then do nothing
|
|
323
|
+
if (!buttons.length)
|
|
324
|
+
return;
|
|
325
|
+
const index = buttons.findIndex((button) => button.value === this.value);
|
|
326
|
+
const current = buttons[index];
|
|
327
|
+
const nextIndex = Math.round(scrollRatio * (buttons.length - 1));
|
|
328
|
+
if (this.lastNextIndex === undefined || this.lastNextIndex !== nextIndex) {
|
|
329
|
+
this.lastNextIndex = nextIndex;
|
|
330
|
+
this.triggerScrollOnValueChange = false;
|
|
331
|
+
this.checkButton(current, buttons[nextIndex]);
|
|
332
|
+
this.emitValueChange();
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Finds the related segment view and sets its current content
|
|
338
|
+
* based on the selected segment button. This method
|
|
339
|
+
* should be called on initial load of the segment,
|
|
340
|
+
* after the gesture is completed (if dragging between segments)
|
|
341
|
+
* and when a segment button is clicked directly.
|
|
342
|
+
*/
|
|
343
|
+
updateSegmentView(smoothScroll = true) {
|
|
344
|
+
const buttons = this.getButtons();
|
|
345
|
+
const button = buttons.find((btn) => btn.value === this.value);
|
|
346
|
+
// If the button does not have a contentId then there is
|
|
347
|
+
// no associated segment view to update
|
|
348
|
+
if (!(button === null || button === void 0 ? void 0 : button.contentId)) {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
const segmentView = this.segmentViewEl;
|
|
352
|
+
if (segmentView) {
|
|
353
|
+
segmentView.setContent(button.contentId, smoothScroll);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
261
356
|
scrollActiveButtonIntoView(smoothScroll = true) {
|
|
262
357
|
const { scrollable, value, el } = this;
|
|
263
358
|
if (scrollable) {
|
|
@@ -440,14 +535,14 @@ const Segment = class {
|
|
|
440
535
|
}
|
|
441
536
|
render() {
|
|
442
537
|
const mode = getIonMode(this);
|
|
443
|
-
return (h(Host, { key: '
|
|
538
|
+
return (h(Host, { key: '66bd7a565ba73540b3bbe56dd23b95e59bcef9bc', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
|
|
444
539
|
[mode]: true,
|
|
445
540
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
446
541
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
447
542
|
'segment-activated': this.activated,
|
|
448
543
|
'segment-disabled': this.disabled,
|
|
449
544
|
'segment-scrollable': this.scrollable,
|
|
450
|
-
}) }, h("slot", { key: '
|
|
545
|
+
}) }, h("slot", { key: '782c521b1a33729b8eab1c4b879bc3f2ff48ae1b', onSlotchange: this.onSlottedItemsChange })));
|
|
451
546
|
}
|
|
452
547
|
get el() { return getElement(this); }
|
|
453
548
|
static get watchers() { return {
|
|
@@ -487,6 +582,7 @@ const SegmentButton = class {
|
|
|
487
582
|
}
|
|
488
583
|
};
|
|
489
584
|
this.checked = false;
|
|
585
|
+
this.contentId = undefined;
|
|
490
586
|
this.disabled = false;
|
|
491
587
|
this.layout = 'icon-top';
|
|
492
588
|
this.type = 'button';
|
|
@@ -502,6 +598,26 @@ const SegmentButton = class {
|
|
|
502
598
|
addEventListener(segmentEl, 'ionSelect', this.updateState);
|
|
503
599
|
addEventListener(segmentEl, 'ionStyle', this.updateStyle);
|
|
504
600
|
}
|
|
601
|
+
// Return if there is no contentId defined
|
|
602
|
+
if (!this.contentId)
|
|
603
|
+
return;
|
|
604
|
+
// Attempt to find the Segment Content by its contentId
|
|
605
|
+
const segmentContent = document.getElementById(this.contentId);
|
|
606
|
+
// If no associated Segment Content exists, log an error and return
|
|
607
|
+
if (!segmentContent) {
|
|
608
|
+
console.error(`Segment Button: Unable to find Segment Content with id="${this.contentId}".`);
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
// Ensure the found element is a valid ION-SEGMENT-CONTENT
|
|
612
|
+
if (segmentContent.tagName !== 'ION-SEGMENT-CONTENT') {
|
|
613
|
+
console.error(`Segment Button: Element with id="${this.contentId}" is not an <ion-segment-content> element.`);
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
// Prevent buttons from being disabled when associated with segment content
|
|
617
|
+
if (this.disabled) {
|
|
618
|
+
console.warn(`Segment Button: Segment buttons cannot be disabled when associated with an <ion-segment-content>.`);
|
|
619
|
+
this.disabled = false;
|
|
620
|
+
}
|
|
505
621
|
}
|
|
506
622
|
disconnectedCallback() {
|
|
507
623
|
const segmentEl = this.segmentEl;
|
|
@@ -535,7 +651,7 @@ const SegmentButton = class {
|
|
|
535
651
|
const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
|
|
536
652
|
const mode = getIonMode(this);
|
|
537
653
|
const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
|
|
538
|
-
return (h(Host, { key: '
|
|
654
|
+
return (h(Host, { key: 'd50a5d5e2f6206e8523598f258d8217d2903f69b', class: {
|
|
539
655
|
[mode]: true,
|
|
540
656
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
541
657
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
@@ -551,10 +667,7 @@ const SegmentButton = class {
|
|
|
551
667
|
'ion-activatable': true,
|
|
552
668
|
'ion-activatable-instant': true,
|
|
553
669
|
'ion-focusable': true,
|
|
554
|
-
} }, h("button", Object.assign({ key: '
|
|
555
|
-
'segment-button-indicator': true,
|
|
556
|
-
'segment-button-indicator-animated': true,
|
|
557
|
-
} }, h("div", { key: '65c72a151080998c1e548c87d4d4ebd5c7dda72f', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
670
|
+
} }, h("button", Object.assign({ key: 'b4f6f145286ba8ab79669e11035b906daa85ae7e', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), h("span", { key: '67965996c9ffe70553875e00d3da0ae5b2b1d814', class: "button-inner" }, h("slot", { key: '5087988fe45a8fdf388ec44c395d0b745b207806' })), mode === 'md' && h("ion-ripple-effect", { key: 'b24858de0750bbc769b3183fac0077dfe817ba27' })), h("div", { key: '97b4359432acd1c9da0816360cd1df9472e183f7', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, h("div", { key: '0561738ea15b0986f4ed3d8276d5e6f2d13f7e51', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
558
671
|
}
|
|
559
672
|
get el() { return getElement(this); }
|
|
560
673
|
static get watchers() { return {
|