voyager-ionic-core 8.3.4 → 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/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 +3 -3
- 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 +2 -2
- 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/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 +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +7 -5
- 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 +6 -6
- 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 +3 -3
- 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 +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +23 -23
- package/dist/cjs/ion-modal.cjs.entry.js +4 -4
- 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 +2 -2
- 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 +39 -14
- 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 +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- 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/collection/collection-manifest.json +3 -0
- 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 +3 -3
- 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 +2 -2
- package/dist/collection/components/thumbnail/thumbnail.js +1 -1
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/utils/menu-controller/index.js +2 -2
- package/dist/docs.json +426 -29
- package/dist/esm/{index-fe1782b1.js → index-24b48b06.js} +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-alert.entry.js +7 -5
- 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 +6 -6
- 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 +3 -3
- 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 +2 -2
- package/dist/esm/ion-menu_3.entry.js +24 -24
- package/dist/esm/ion-modal.entry.js +4 -4
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/ion-toast.entry.js +2 -2
- 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-es5/{index-fe1782b1.js → index-24b48b06.js} +1 -1
- package/dist/esm-es5/index.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/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-0790b342.system.entry.js → p-0161caf9.system.entry.js} +1 -1
- package/dist/ionic/p-0437ace4.system.entry.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-d754c709.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-148b8abb.entry.js → p-2fc0dafe.entry.js} +1 -1
- package/dist/ionic/p-322c5fb4.system.js +2 -2
- package/dist/ionic/{p-60cc7986.entry.js → p-33a8a71b.entry.js} +1 -1
- package/dist/ionic/{p-18105026.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-be71fe0f.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-6d50faff.entry.js → p-4a274c89.entry.js} +1 -1
- package/dist/ionic/{p-41c89b8d.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-79e7be3a.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-c71f301f.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-f0ab13a8.system.entry.js → p-5bd39e5e.system.entry.js} +2 -2
- package/dist/ionic/{p-5800e441.entry.js → p-5f79d8c5.entry.js} +1 -1
- package/dist/ionic/{p-53add985.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-79b12fda.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-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-d58f21d2.entry.js → p-a1051806.entry.js} +1 -1
- package/dist/ionic/{p-6ceb04b5.entry.js → p-a1b9a163.entry.js} +1 -1
- 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-be715dd3.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-9e208825.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-dda5c73d.entry.js → p-e563a35c.entry.js} +1 -1
- 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/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.d.ts +103 -13
- package/dist/types/utils/overlays-interface.d.ts +1 -1
- package/hydrate/index.js +610 -212
- package/hydrate/index.mjs +610 -212
- package/package.json +1 -1
- package/dist/ionic/p-110e03be.system.entry.js +0 -4
- package/dist/ionic/p-2200e26b.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-63d65dbc.system.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-87a4407b.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-9895e7f3.entry.js +0 -4
- package/dist/ionic/p-a0c88dc2.system.entry.js +0 -4
- package/dist/ionic/p-a89dac49.entry.js +0 -4
- package/dist/ionic/p-f88ebc36.entry.js +0 -4
|
@@ -11,6 +11,7 @@ import { getIonMode } from "../../global/ionic-global";
|
|
|
11
11
|
*/
|
|
12
12
|
export class Segment {
|
|
13
13
|
constructor() {
|
|
14
|
+
this.segmentViewEl = null;
|
|
14
15
|
this.onClick = (ev) => {
|
|
15
16
|
const current = ev.target;
|
|
16
17
|
const previous = this.checked;
|
|
@@ -25,7 +26,13 @@ export class Segment {
|
|
|
25
26
|
if (current !== previous) {
|
|
26
27
|
this.emitValueChange();
|
|
27
28
|
}
|
|
28
|
-
if (this.
|
|
29
|
+
if (this.segmentViewEl) {
|
|
30
|
+
this.updateSegmentView();
|
|
31
|
+
if (this.scrollable && previous) {
|
|
32
|
+
this.checkButton(previous, current);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else if (this.scrollable || !this.swipeGesture) {
|
|
29
36
|
if (previous) {
|
|
30
37
|
this.checkButton(previous, current);
|
|
31
38
|
}
|
|
@@ -81,19 +88,49 @@ export class Segment {
|
|
|
81
88
|
swipeGestureChanged() {
|
|
82
89
|
this.gestureChanged();
|
|
83
90
|
}
|
|
84
|
-
valueChanged(value) {
|
|
91
|
+
valueChanged(value, oldValue) {
|
|
92
|
+
// Force a value to exist if we're using a segment view
|
|
93
|
+
if (this.segmentViewEl && value === undefined) {
|
|
94
|
+
this.value = this.getButtons()[0].value;
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (oldValue !== undefined && value !== undefined) {
|
|
98
|
+
const buttons = this.getButtons();
|
|
99
|
+
const previous = buttons.find((button) => button.value === oldValue);
|
|
100
|
+
const current = buttons.find((button) => button.value === value);
|
|
101
|
+
if (previous && current) {
|
|
102
|
+
if (!this.segmentViewEl) {
|
|
103
|
+
this.checkButton(previous, current);
|
|
104
|
+
}
|
|
105
|
+
else if (this.triggerScrollOnValueChange !== false) {
|
|
106
|
+
this.updateSegmentView();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else if (value !== undefined && oldValue === undefined && this.segmentViewEl) {
|
|
111
|
+
this.updateSegmentView();
|
|
112
|
+
}
|
|
85
113
|
/**
|
|
86
114
|
* `ionSelect` is emitted every time the value changes (internal or external changes).
|
|
87
115
|
* Used by `ion-segment-button` to determine if the button should be checked.
|
|
88
116
|
*/
|
|
89
117
|
this.ionSelect.emit({ value });
|
|
90
|
-
|
|
118
|
+
// The scroll listener should handle scrolling the active button into view as needed
|
|
119
|
+
if (!this.segmentViewEl) {
|
|
120
|
+
this.scrollActiveButtonIntoView();
|
|
121
|
+
}
|
|
122
|
+
this.triggerScrollOnValueChange = undefined;
|
|
91
123
|
}
|
|
92
124
|
disabledChanged() {
|
|
93
125
|
this.gestureChanged();
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
button
|
|
126
|
+
if (!this.segmentViewEl) {
|
|
127
|
+
const buttons = this.getButtons();
|
|
128
|
+
for (const button of buttons) {
|
|
129
|
+
button.disabled = this.disabled;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.segmentViewEl.disabled = this.disabled;
|
|
97
134
|
}
|
|
98
135
|
}
|
|
99
136
|
gestureChanged() {
|
|
@@ -103,6 +140,10 @@ export class Segment {
|
|
|
103
140
|
}
|
|
104
141
|
connectedCallback() {
|
|
105
142
|
this.emitStyle();
|
|
143
|
+
this.segmentViewEl = this.getSegmentView();
|
|
144
|
+
}
|
|
145
|
+
disconnectedCallback() {
|
|
146
|
+
this.segmentViewEl = null;
|
|
106
147
|
}
|
|
107
148
|
componentWillLoad() {
|
|
108
149
|
this.emitStyle();
|
|
@@ -136,6 +177,9 @@ export class Segment {
|
|
|
136
177
|
if (this.disabled) {
|
|
137
178
|
this.disabledChanged();
|
|
138
179
|
}
|
|
180
|
+
// Update segment view based on the initial value,
|
|
181
|
+
// but do not animate the scroll
|
|
182
|
+
this.updateSegmentView(false);
|
|
139
183
|
}
|
|
140
184
|
onStart(detail) {
|
|
141
185
|
this.valueBeforeGesture = this.value;
|
|
@@ -152,6 +196,7 @@ export class Segment {
|
|
|
152
196
|
if (value !== undefined) {
|
|
153
197
|
if (this.valueBeforeGesture !== value) {
|
|
154
198
|
this.emitValueChange();
|
|
199
|
+
this.updateSegmentView();
|
|
155
200
|
}
|
|
156
201
|
}
|
|
157
202
|
this.valueBeforeGesture = undefined;
|
|
@@ -179,12 +224,7 @@ export class Segment {
|
|
|
179
224
|
setActivated(activated) {
|
|
180
225
|
const buttons = this.getButtons();
|
|
181
226
|
buttons.forEach((button) => {
|
|
182
|
-
|
|
183
|
-
button.classList.add('segment-button-activated');
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
button.classList.remove('segment-button-activated');
|
|
187
|
-
}
|
|
227
|
+
button.classList.toggle('segment-button-activated', activated);
|
|
188
228
|
});
|
|
189
229
|
this.activated = activated;
|
|
190
230
|
}
|
|
@@ -235,6 +275,7 @@ export class Segment {
|
|
|
235
275
|
currentIndicator.classList.add('segment-button-indicator-animated');
|
|
236
276
|
// Remove the transform to slide the indicator back to the button clicked
|
|
237
277
|
currentIndicator.style.setProperty('transform', '');
|
|
278
|
+
this.scrollActiveButtonIntoView(true);
|
|
238
279
|
});
|
|
239
280
|
this.value = current.value;
|
|
240
281
|
this.setCheckedClasses();
|
|
@@ -250,6 +291,60 @@ export class Segment {
|
|
|
250
291
|
buttons[next].classList.add('segment-button-after-checked');
|
|
251
292
|
}
|
|
252
293
|
}
|
|
294
|
+
getSegmentView() {
|
|
295
|
+
const buttons = this.getButtons();
|
|
296
|
+
// Get the first button with a contentId
|
|
297
|
+
const firstContentId = buttons.find((button) => button.contentId);
|
|
298
|
+
// Get the segment content with an id matching the button's contentId
|
|
299
|
+
const segmentContent = document.querySelector(`ion-segment-content[id="${firstContentId === null || firstContentId === void 0 ? void 0 : firstContentId.contentId}"]`);
|
|
300
|
+
// Return the segment view for that matching segment content
|
|
301
|
+
return segmentContent === null || segmentContent === void 0 ? void 0 : segmentContent.closest('ion-segment-view');
|
|
302
|
+
}
|
|
303
|
+
handleSegmentViewScroll(ev) {
|
|
304
|
+
const { scrollRatio, isManualScroll } = ev.detail;
|
|
305
|
+
if (!isManualScroll) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
const dispatchedFrom = ev.target;
|
|
309
|
+
const segmentViewEl = this.segmentViewEl;
|
|
310
|
+
const segmentEl = this.el;
|
|
311
|
+
// Only update the indicator if the event was dispatched from the correct segment view
|
|
312
|
+
if (ev.composedPath().includes(segmentViewEl) || (dispatchedFrom === null || dispatchedFrom === void 0 ? void 0 : dispatchedFrom.contains(segmentEl))) {
|
|
313
|
+
const buttons = this.getButtons();
|
|
314
|
+
// If no buttons are found or there is no value set then do nothing
|
|
315
|
+
if (!buttons.length)
|
|
316
|
+
return;
|
|
317
|
+
const index = buttons.findIndex((button) => button.value === this.value);
|
|
318
|
+
const current = buttons[index];
|
|
319
|
+
const nextIndex = Math.round(scrollRatio * (buttons.length - 1));
|
|
320
|
+
if (this.lastNextIndex === undefined || this.lastNextIndex !== nextIndex) {
|
|
321
|
+
this.lastNextIndex = nextIndex;
|
|
322
|
+
this.triggerScrollOnValueChange = false;
|
|
323
|
+
this.checkButton(current, buttons[nextIndex]);
|
|
324
|
+
this.emitValueChange();
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Finds the related segment view and sets its current content
|
|
330
|
+
* based on the selected segment button. This method
|
|
331
|
+
* should be called on initial load of the segment,
|
|
332
|
+
* after the gesture is completed (if dragging between segments)
|
|
333
|
+
* and when a segment button is clicked directly.
|
|
334
|
+
*/
|
|
335
|
+
updateSegmentView(smoothScroll = true) {
|
|
336
|
+
const buttons = this.getButtons();
|
|
337
|
+
const button = buttons.find((btn) => btn.value === this.value);
|
|
338
|
+
// If the button does not have a contentId then there is
|
|
339
|
+
// no associated segment view to update
|
|
340
|
+
if (!(button === null || button === void 0 ? void 0 : button.contentId)) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
const segmentView = this.segmentViewEl;
|
|
344
|
+
if (segmentView) {
|
|
345
|
+
segmentView.setContent(button.contentId, smoothScroll);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
253
348
|
scrollActiveButtonIntoView(smoothScroll = true) {
|
|
254
349
|
const { scrollable, value, el } = this;
|
|
255
350
|
if (scrollable) {
|
|
@@ -434,14 +529,14 @@ export class Segment {
|
|
|
434
529
|
}
|
|
435
530
|
render() {
|
|
436
531
|
const mode = getIonMode(this);
|
|
437
|
-
return (h(Host, { key: '
|
|
532
|
+
return (h(Host, { key: '66bd7a565ba73540b3bbe56dd23b95e59bcef9bc', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
|
|
438
533
|
[mode]: true,
|
|
439
534
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
440
535
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
441
536
|
'segment-activated': this.activated,
|
|
442
537
|
'segment-disabled': this.disabled,
|
|
443
538
|
'segment-scrollable': this.scrollable,
|
|
444
|
-
}) }, h("slot", { key: '
|
|
539
|
+
}) }, h("slot", { key: '782c521b1a33729b8eab1c4b879bc3f2ff48ae1b', onSlotchange: this.onSlottedItemsChange })));
|
|
445
540
|
}
|
|
446
541
|
static get is() { return "ion-segment"; }
|
|
447
542
|
static get encapsulation() { return "shadow"; }
|
|
@@ -674,6 +769,12 @@ export class Segment {
|
|
|
674
769
|
}
|
|
675
770
|
static get listeners() {
|
|
676
771
|
return [{
|
|
772
|
+
"name": "ionSegmentViewScroll",
|
|
773
|
+
"method": "handleSegmentViewScroll",
|
|
774
|
+
"target": "body",
|
|
775
|
+
"capture": false,
|
|
776
|
+
"passive": false
|
|
777
|
+
}, {
|
|
677
778
|
"name": "keydown",
|
|
678
779
|
"method": "onKeyDown",
|
|
679
780
|
"target": undefined,
|
|
@@ -30,6 +30,7 @@ export class SegmentButton {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
this.checked = false;
|
|
33
|
+
this.contentId = undefined;
|
|
33
34
|
this.disabled = false;
|
|
34
35
|
this.layout = 'icon-top';
|
|
35
36
|
this.type = 'button';
|
|
@@ -45,6 +46,26 @@ export class SegmentButton {
|
|
|
45
46
|
addEventListener(segmentEl, 'ionSelect', this.updateState);
|
|
46
47
|
addEventListener(segmentEl, 'ionStyle', this.updateStyle);
|
|
47
48
|
}
|
|
49
|
+
// Return if there is no contentId defined
|
|
50
|
+
if (!this.contentId)
|
|
51
|
+
return;
|
|
52
|
+
// Attempt to find the Segment Content by its contentId
|
|
53
|
+
const segmentContent = document.getElementById(this.contentId);
|
|
54
|
+
// If no associated Segment Content exists, log an error and return
|
|
55
|
+
if (!segmentContent) {
|
|
56
|
+
console.error(`Segment Button: Unable to find Segment Content with id="${this.contentId}".`);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
// Ensure the found element is a valid ION-SEGMENT-CONTENT
|
|
60
|
+
if (segmentContent.tagName !== 'ION-SEGMENT-CONTENT') {
|
|
61
|
+
console.error(`Segment Button: Element with id="${this.contentId}" is not an <ion-segment-content> element.`);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Prevent buttons from being disabled when associated with segment content
|
|
65
|
+
if (this.disabled) {
|
|
66
|
+
console.warn(`Segment Button: Segment buttons cannot be disabled when associated with an <ion-segment-content>.`);
|
|
67
|
+
this.disabled = false;
|
|
68
|
+
}
|
|
48
69
|
}
|
|
49
70
|
disconnectedCallback() {
|
|
50
71
|
const segmentEl = this.segmentEl;
|
|
@@ -78,7 +99,7 @@ export class SegmentButton {
|
|
|
78
99
|
const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
|
|
79
100
|
const mode = getIonMode(this);
|
|
80
101
|
const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
|
|
81
|
-
return (h(Host, { key: '
|
|
102
|
+
return (h(Host, { key: 'd50a5d5e2f6206e8523598f258d8217d2903f69b', class: {
|
|
82
103
|
[mode]: true,
|
|
83
104
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
84
105
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
@@ -94,10 +115,7 @@ export class SegmentButton {
|
|
|
94
115
|
'ion-activatable': true,
|
|
95
116
|
'ion-activatable-instant': true,
|
|
96
117
|
'ion-focusable': true,
|
|
97
|
-
} }, h("button", Object.assign({ key: '
|
|
98
|
-
'segment-button-indicator': true,
|
|
99
|
-
'segment-button-indicator-animated': true,
|
|
100
|
-
} }, h("div", { key: '65c72a151080998c1e548c87d4d4ebd5c7dda72f', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
118
|
+
} }, 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" }))));
|
|
101
119
|
}
|
|
102
120
|
static get is() { return "ion-segment-button"; }
|
|
103
121
|
static get encapsulation() { return "shadow"; }
|
|
@@ -115,6 +133,23 @@ export class SegmentButton {
|
|
|
115
133
|
}
|
|
116
134
|
static get properties() {
|
|
117
135
|
return {
|
|
136
|
+
"contentId": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "string",
|
|
141
|
+
"resolved": "string | undefined",
|
|
142
|
+
"references": {}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": true,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": "The `id` of the segment content."
|
|
149
|
+
},
|
|
150
|
+
"attribute": "content-id",
|
|
151
|
+
"reflect": true
|
|
152
|
+
},
|
|
118
153
|
"disabled": {
|
|
119
154
|
"type": "boolean",
|
|
120
155
|
"mutable": true,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { Host, h } from "@stencil/core";
|
|
5
|
+
export class SegmentContent {
|
|
6
|
+
render() {
|
|
7
|
+
return (h(Host, { key: '03684b2999ac64fe13e376fd7e7f279976e9d4f2' }, h("slot", { key: '143031075bf33ca19e7cfd76fc8a67b83ccaf11c' })));
|
|
8
|
+
}
|
|
9
|
+
static get is() { return "ion-segment-content"; }
|
|
10
|
+
static get encapsulation() { return "shadow"; }
|
|
11
|
+
static get originalStyleUrls() {
|
|
12
|
+
return {
|
|
13
|
+
"$": ["segment-content.scss"]
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
static get styleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["segment-content.css"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
overflow-x: scroll;
|
|
5
|
+
scroll-snap-type: x mandatory;
|
|
6
|
+
/* Hide scrollbar in Firefox */
|
|
7
|
+
scrollbar-width: none;
|
|
8
|
+
/* Hide scrollbar in IE and Edge */
|
|
9
|
+
-ms-overflow-style: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Hide scrollbar in webkit */
|
|
13
|
+
:host::-webkit-scrollbar {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host(.segment-view-disabled) {
|
|
18
|
+
touch-action: none;
|
|
19
|
+
overflow-x: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host(.segment-view-scroll-disabled) {
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Convert a font size to a dynamic font size.
|
|
28
|
+
* Fonts that participate in Dynamic Type should use
|
|
29
|
+
* dynamic font sizes.
|
|
30
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
31
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
32
|
+
* convert to a unit other than $baselineUnit.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* Convert a font size to a dynamic font size but impose
|
|
36
|
+
* a maximum font size.
|
|
37
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
38
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
39
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
40
|
+
* convert to a unit other than $baselineUnit.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Convert a font size to a dynamic font size but impose
|
|
44
|
+
* a minimum font size.
|
|
45
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
46
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
47
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
48
|
+
* convert to a unit other than $baselineUnit.
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* Convert a font size to a dynamic font size but impose
|
|
52
|
+
* maximum and minimum font sizes.
|
|
53
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
54
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
55
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
56
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
57
|
+
* convert to a unit other than $baselineUnit.
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* A heuristic that applies CSS to tablet
|
|
61
|
+
* viewports.
|
|
62
|
+
*
|
|
63
|
+
* Usage:
|
|
64
|
+
* @include tablet-viewport() {
|
|
65
|
+
* :host {
|
|
66
|
+
* background-color: green;
|
|
67
|
+
* }
|
|
68
|
+
* }
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* A heuristic that applies CSS to mobile
|
|
72
|
+
* viewports (i.e. phones, not tablets).
|
|
73
|
+
*
|
|
74
|
+
* Usage:
|
|
75
|
+
* @include mobile-viewport() {
|
|
76
|
+
* :host {
|
|
77
|
+
* background-color: blue;
|
|
78
|
+
* }
|
|
79
|
+
* }
|
|
80
|
+
*/
|
|
81
|
+
:host(.segment-view-disabled) {
|
|
82
|
+
opacity: 0.3;
|
|
83
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { Host, h } from "@stencil/core";
|
|
5
|
+
export class SegmentView {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.scrollEndTimeout = null;
|
|
8
|
+
this.isTouching = false;
|
|
9
|
+
this.disabled = false;
|
|
10
|
+
this.isManualScroll = undefined;
|
|
11
|
+
}
|
|
12
|
+
handleScroll(ev) {
|
|
13
|
+
var _a;
|
|
14
|
+
const { scrollLeft, scrollWidth, clientWidth } = ev.target;
|
|
15
|
+
const scrollRatio = scrollLeft / (scrollWidth - clientWidth);
|
|
16
|
+
this.ionSegmentViewScroll.emit({
|
|
17
|
+
scrollRatio,
|
|
18
|
+
isManualScroll: (_a = this.isManualScroll) !== null && _a !== void 0 ? _a : true,
|
|
19
|
+
});
|
|
20
|
+
// Reset the timeout to check for scroll end
|
|
21
|
+
this.resetScrollEndTimeout();
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Handle touch start event to know when the user is actively dragging the segment view.
|
|
25
|
+
*/
|
|
26
|
+
handleScrollStart() {
|
|
27
|
+
if (this.scrollEndTimeout) {
|
|
28
|
+
clearTimeout(this.scrollEndTimeout);
|
|
29
|
+
this.scrollEndTimeout = null;
|
|
30
|
+
}
|
|
31
|
+
this.isTouching = true;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Handle touch end event to know when the user is no longer dragging the segment view.
|
|
35
|
+
*/
|
|
36
|
+
handleTouchEnd() {
|
|
37
|
+
this.isTouching = false;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Reset the scroll end detection timer. This is called on every scroll event.
|
|
41
|
+
*/
|
|
42
|
+
resetScrollEndTimeout() {
|
|
43
|
+
if (this.scrollEndTimeout) {
|
|
44
|
+
clearTimeout(this.scrollEndTimeout);
|
|
45
|
+
this.scrollEndTimeout = null;
|
|
46
|
+
}
|
|
47
|
+
this.scrollEndTimeout = setTimeout(() => {
|
|
48
|
+
this.checkForScrollEnd();
|
|
49
|
+
},
|
|
50
|
+
// Setting this to a lower value may result in inconsistencies in behavior
|
|
51
|
+
// across browsers (particularly Firefox).
|
|
52
|
+
// Ideally, all of this logic is removed once the scroll end event is
|
|
53
|
+
// supported on all browsers (https://caniuse.com/?search=scrollend)
|
|
54
|
+
100);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Check if the scroll has ended and the user is not actively touching.
|
|
58
|
+
* If the conditions are met (active content is enabled and no active touch),
|
|
59
|
+
* reset the scroll position and emit the scroll end event.
|
|
60
|
+
*/
|
|
61
|
+
checkForScrollEnd() {
|
|
62
|
+
// Only emit scroll end event if the active content is not disabled and
|
|
63
|
+
// the user is not touching the segment view
|
|
64
|
+
if (!this.isTouching) {
|
|
65
|
+
this.isManualScroll = undefined;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
*
|
|
71
|
+
* This method is used to programmatically set the displayed segment content
|
|
72
|
+
* in the segment view. Calling this method will update the `value` of the
|
|
73
|
+
* corresponding segment button.
|
|
74
|
+
*
|
|
75
|
+
* @param id: The id of the segment content to display.
|
|
76
|
+
* @param smoothScroll: Whether to animate the scroll transition.
|
|
77
|
+
*/
|
|
78
|
+
async setContent(id, smoothScroll = true) {
|
|
79
|
+
const contents = this.getSegmentContents();
|
|
80
|
+
const index = contents.findIndex((content) => content.id === id);
|
|
81
|
+
if (index === -1)
|
|
82
|
+
return;
|
|
83
|
+
this.isManualScroll = false;
|
|
84
|
+
this.resetScrollEndTimeout();
|
|
85
|
+
const contentWidth = this.el.offsetWidth;
|
|
86
|
+
this.el.scrollTo({
|
|
87
|
+
top: 0,
|
|
88
|
+
left: index * contentWidth,
|
|
89
|
+
behavior: smoothScroll ? 'smooth' : 'instant',
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
getSegmentContents() {
|
|
93
|
+
return Array.from(this.el.querySelectorAll('ion-segment-content'));
|
|
94
|
+
}
|
|
95
|
+
render() {
|
|
96
|
+
const { disabled, isManualScroll } = this;
|
|
97
|
+
return (h(Host, { key: '9f4f11d31c4db776f077e59ae895b35dd4454717', class: {
|
|
98
|
+
'segment-view-disabled': disabled,
|
|
99
|
+
'segment-view-scroll-disabled': isManualScroll === false,
|
|
100
|
+
} }, h("slot", { key: 'ea58b21f031cee2ab2b70580f336deaefa364538' })));
|
|
101
|
+
}
|
|
102
|
+
static get is() { return "ion-segment-view"; }
|
|
103
|
+
static get encapsulation() { return "shadow"; }
|
|
104
|
+
static get originalStyleUrls() {
|
|
105
|
+
return {
|
|
106
|
+
"ios": ["segment-view.ios.scss"],
|
|
107
|
+
"md": ["segment-view.md.scss"]
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
static get styleUrls() {
|
|
111
|
+
return {
|
|
112
|
+
"ios": ["segment-view.ios.css"],
|
|
113
|
+
"md": ["segment-view.md.css"]
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static get properties() {
|
|
117
|
+
return {
|
|
118
|
+
"disabled": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "boolean",
|
|
123
|
+
"resolved": "boolean",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": "If `true`, the segment view cannot be interacted with."
|
|
131
|
+
},
|
|
132
|
+
"attribute": "disabled",
|
|
133
|
+
"reflect": false,
|
|
134
|
+
"defaultValue": "false"
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
static get states() {
|
|
139
|
+
return {
|
|
140
|
+
"isManualScroll": {}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
static get events() {
|
|
144
|
+
return [{
|
|
145
|
+
"method": "ionSegmentViewScroll",
|
|
146
|
+
"name": "ionSegmentViewScroll",
|
|
147
|
+
"bubbles": true,
|
|
148
|
+
"cancelable": true,
|
|
149
|
+
"composed": true,
|
|
150
|
+
"docs": {
|
|
151
|
+
"tags": [],
|
|
152
|
+
"text": "Emitted when the segment view is scrolled."
|
|
153
|
+
},
|
|
154
|
+
"complexType": {
|
|
155
|
+
"original": "SegmentViewScrollEvent",
|
|
156
|
+
"resolved": "SegmentViewScrollEvent",
|
|
157
|
+
"references": {
|
|
158
|
+
"SegmentViewScrollEvent": {
|
|
159
|
+
"location": "import",
|
|
160
|
+
"path": "./segment-view-interface",
|
|
161
|
+
"id": "src/components/segment-view/segment-view-interface.ts::SegmentViewScrollEvent"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}];
|
|
166
|
+
}
|
|
167
|
+
static get methods() {
|
|
168
|
+
return {
|
|
169
|
+
"setContent": {
|
|
170
|
+
"complexType": {
|
|
171
|
+
"signature": "(id: string, smoothScroll?: boolean) => Promise<void>",
|
|
172
|
+
"parameters": [{
|
|
173
|
+
"name": "id",
|
|
174
|
+
"type": "string",
|
|
175
|
+
"docs": ": The id of the segment content to display."
|
|
176
|
+
}, {
|
|
177
|
+
"name": "smoothScroll",
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"docs": ": Whether to animate the scroll transition."
|
|
180
|
+
}],
|
|
181
|
+
"references": {
|
|
182
|
+
"Promise": {
|
|
183
|
+
"location": "global",
|
|
184
|
+
"id": "global::Promise"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"return": "Promise<void>"
|
|
188
|
+
},
|
|
189
|
+
"docs": {
|
|
190
|
+
"text": "",
|
|
191
|
+
"tags": [{
|
|
192
|
+
"name": "internal",
|
|
193
|
+
"text": "This method is used to programmatically set the displayed segment content\nin the segment view. Calling this method will update the `value` of the\ncorresponding segment button."
|
|
194
|
+
}, {
|
|
195
|
+
"name": "param",
|
|
196
|
+
"text": "id : The id of the segment content to display."
|
|
197
|
+
}, {
|
|
198
|
+
"name": "param",
|
|
199
|
+
"text": "smoothScroll : Whether to animate the scroll transition."
|
|
200
|
+
}]
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
static get elementRef() { return "el"; }
|
|
206
|
+
static get listeners() {
|
|
207
|
+
return [{
|
|
208
|
+
"name": "scroll",
|
|
209
|
+
"method": "handleScroll",
|
|
210
|
+
"target": undefined,
|
|
211
|
+
"capture": false,
|
|
212
|
+
"passive": true
|
|
213
|
+
}, {
|
|
214
|
+
"name": "touchstart",
|
|
215
|
+
"method": "handleScrollStart",
|
|
216
|
+
"target": undefined,
|
|
217
|
+
"capture": false,
|
|
218
|
+
"passive": true
|
|
219
|
+
}, {
|
|
220
|
+
"name": "touchend",
|
|
221
|
+
"method": "handleTouchEnd",
|
|
222
|
+
"target": undefined,
|
|
223
|
+
"capture": false,
|
|
224
|
+
"passive": true
|
|
225
|
+
}];
|
|
226
|
+
}
|
|
227
|
+
}
|