@ionic/core 8.8.14-dev.11784216165.1ecbf364 → 8.8.14-dev.11784222473.142aed23
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/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-back-button.js +1 -1
- package/components/ion-button.js +1 -1
- package/components/ion-card.js +1 -1
- package/components/ion-chip.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-fab-button.js +1 -1
- package/components/ion-img.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-input-password-toggle.js +1 -1
- package/components/ion-input.js +1 -1
- package/components/ion-item-option.js +1 -1
- package/components/ion-item.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-nav.js +1 -1
- package/components/ion-picker-legacy-column.d.ts +11 -0
- package/components/ion-picker-legacy-column.js +4 -0
- package/components/ion-picker-legacy.d.ts +11 -0
- package/components/ion-picker-legacy.js +4 -0
- package/components/ion-popover.js +1 -1
- package/components/ion-progress-bar.js +1 -1
- package/components/ion-radio.js +1 -1
- package/components/ion-range.js +1 -1
- 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-ripple-effect.js +1 -1
- package/components/ion-router-link.js +1 -1
- package/components/ion-router-outlet.js +1 -1
- package/components/ion-router.js +1 -1
- package/components/ion-row.js +1 -1
- package/components/ion-searchbar.js +1 -1
- package/components/ion-segment-button.js +1 -1
- package/components/ion-segment-content.js +1 -1
- package/components/ion-segment-view.js +1 -1
- package/components/ion-segment.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-option.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-skeleton-text.js +1 -1
- package/components/ion-spinner.js +1 -1
- package/components/ion-split-pane.js +1 -1
- package/components/ion-tab-bar.js +1 -1
- package/components/ion-tab-button.js +1 -1
- package/components/ion-tab.js +1 -1
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/ion-toolbar.js +1 -1
- package/components/p-3hGiN2uq.js +4 -0
- package/components/{p-DpV-p5Xs.js → p-5bE_Wz4Y.js} +1 -1
- package/components/{p-r0aq7dpt.js → p-B60hm8Qv.js} +1 -1
- package/components/{p-Buf_7zcy.js → p-BHrrc-3d.js} +1 -1
- package/components/p-BIPPbW0M.js +4 -0
- package/components/{p-XJWMAP8m.js → p-BLmJ0zRm.js} +1 -1
- package/components/{p-DhkITZ-y.js → p-BSEgsdFI.js} +1 -1
- package/components/p-BUYFy35a.js +4 -0
- package/components/p-BWEZufiK.js +4 -0
- package/components/p-BqpciLfi.js +4 -0
- package/components/p-BsQPAqo9.js +4 -0
- package/components/p-CU5rbWAW.js +4 -0
- package/components/{p-Dz74mwlk.js → p-Cfx4M1Bn.js} +1 -1
- package/components/p-k_E4tX5Z.js +4 -0
- package/components/p-nyXeHk23.js +4 -0
- package/components/{p-wk2QqrAo.js → p-rCa2eL0j.js} +1 -1
- package/dist/cjs/config-xninhj0J.js +201 -0
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/ion-action-sheet.cjs.entry.js +7 -27
- package/dist/cjs/ion-alert.cjs.entry.js +25 -64
- package/dist/cjs/ion-app_8.cjs.entry.js +9 -23
- package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
- package/dist/cjs/{ion-datetime.cjs.entry.js → ion-datetime_3.cjs.entry.js} +639 -1
- package/dist/cjs/ion-img.cjs.entry.js +1 -3
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -3
- package/dist/cjs/ion-input.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +5 -10
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +18 -23
- package/dist/cjs/ion-nav_2.cjs.entry.js +115 -2
- package/dist/cjs/ion-popover.cjs.entry.js +5 -9
- package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ion-radio_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-range.cjs.entry.js +3 -3
- package/dist/cjs/ion-refresher_2.cjs.entry.js +5 -6
- 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 +4 -18
- package/dist/cjs/ion-searchbar.cjs.entry.js +5 -5
- package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment-view.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +30 -84
- package/dist/cjs/ion-select_3.cjs.entry.js +49 -407
- 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 +5 -6
- 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-DSmSrd_4.js → overlays-DdtIYQUH.js} +31 -27
- package/dist/collection/collection-manifest.json +10 -6
- package/dist/collection/components/action-sheet/action-sheet.ios.css +2 -229
- package/dist/collection/components/action-sheet/action-sheet.js +5 -24
- package/dist/collection/components/action-sheet/action-sheet.md.css +2 -175
- package/dist/collection/components/alert/alert.ios.css +10 -280
- package/dist/collection/components/alert/alert.js +21 -59
- package/dist/collection/components/alert/alert.md.css +20 -269
- package/dist/collection/components/img/img.js +1 -6
- package/dist/collection/components/input/input.js +8 -8
- package/dist/collection/components/loading/loading.js +3 -7
- package/dist/collection/components/modal/modal.ios.css +8 -0
- package/dist/collection/components/modal/modal.js +18 -23
- package/dist/collection/components/modal/modal.md.css +8 -0
- package/dist/collection/components/nav/nav.js +219 -4
- package/dist/collection/components/picker-legacy/animations/ios.enter.js +27 -0
- package/dist/collection/components/picker-legacy/animations/ios.leave.js +23 -0
- package/dist/collection/components/picker-legacy/picker-interface.js +1 -0
- package/dist/collection/components/picker-legacy/picker.ios.css +300 -0
- package/dist/collection/components/picker-legacy/picker.js +890 -0
- package/dist/collection/components/picker-legacy/picker.md.css +287 -0
- package/dist/collection/components/picker-legacy-column/picker-column.ios.css +231 -0
- package/dist/collection/components/picker-legacy-column/picker-column.js +422 -0
- package/dist/collection/components/picker-legacy-column/picker-column.md.css +222 -0
- package/dist/collection/components/picker-legacy-column/test/test.utils.js +43 -0
- package/dist/collection/components/popover/popover.ios.css +0 -15
- package/dist/collection/components/popover/popover.js +3 -7
- package/dist/collection/components/popover/popover.md.css +0 -15
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio/radio.js +4 -4
- 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/route/route.js +1 -1
- package/dist/collection/components/router/utils/dom.js +3 -22
- package/dist/collection/components/router-link/router-link.js +2 -2
- package/dist/collection/components/router-outlet/router-outlet.js +5 -38
- package/dist/collection/components/row/row.js +1 -1
- package/dist/collection/components/searchbar/searchbar.js +9 -9
- package/dist/collection/components/segment/segment.js +2 -2
- package/dist/collection/components/segment-button/segment-button.js +2 -2
- package/dist/collection/components/segment-content/segment-content.js +1 -1
- package/dist/collection/components/segment-view/segment-view.js +2 -2
- package/dist/collection/components/select/select.ios.css +0 -33
- package/dist/collection/components/select/select.js +16 -323
- package/dist/collection/components/select/select.md.css +0 -33
- package/dist/collection/components/select-modal/select-modal.ios.css +0 -219
- package/dist/collection/components/select-modal/select-modal.js +26 -79
- package/dist/collection/components/select-modal/select-modal.md.css +0 -165
- package/dist/collection/components/select-option/select-option.js +3 -67
- package/dist/collection/components/select-popover/select-popover.ios.css +0 -219
- package/dist/collection/components/select-popover/select-popover.js +26 -78
- package/dist/collection/components/select-popover/select-popover.md.css +0 -165
- 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/index.js +1 -1
- package/dist/collection/utils/overlays.js +30 -26
- package/dist/collection/utils/sanitization/index.js +18 -274
- package/dist/docs.json +1189 -497
- package/dist/esm/config-DQCONYYp.js +195 -0
- package/dist/esm/{index-AlrZKoWR.js → index-DV3sJJW8.js} +1 -1
- package/dist/esm/index.js +2 -3
- package/dist/esm/ion-accordion_2.entry.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +7 -27
- package/dist/esm/ion-alert.entry.js +24 -63
- package/dist/esm/ion-app_8.entry.js +9 -23
- package/dist/esm/ion-avatar_3.entry.js +1 -1
- package/dist/esm/ion-back-button.entry.js +1 -1
- package/dist/esm/ion-breadcrumb_2.entry.js +1 -1
- package/dist/esm/ion-col_3.entry.js +1 -1
- package/dist/esm/{ion-datetime.entry.js → ion-datetime_3.entry.js} +641 -5
- package/dist/esm/ion-fab_3.entry.js +1 -1
- package/dist/esm/ion-img.entry.js +2 -4
- package/dist/esm/ion-infinite-scroll_2.entry.js +1 -2
- package/dist/esm/ion-input-password-toggle.entry.js +1 -1
- package/dist/esm/ion-input.entry.js +5 -5
- package/dist/esm/ion-item_8.entry.js +3 -3
- package/dist/esm/ion-loading.entry.js +4 -9
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +18 -23
- package/dist/esm/ion-nav_2.entry.js +116 -3
- package/dist/esm/ion-popover.entry.js +5 -9
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-radio_2.entry.js +3 -3
- package/dist/esm/ion-range.entry.js +3 -3
- package/dist/esm/ion-refresher_2.entry.js +4 -5
- package/dist/esm/ion-reorder_2.entry.js +3 -3
- package/dist/esm/ion-ripple-effect.entry.js +1 -1
- package/dist/esm/ion-route_4.entry.js +4 -18
- package/dist/esm/ion-searchbar.entry.js +6 -6
- package/dist/esm/ion-segment-content.entry.js +1 -1
- package/dist/esm/ion-segment-view.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +4 -4
- package/dist/esm/ion-select-modal.entry.js +30 -84
- package/dist/esm/ion-select_3.entry.js +52 -410
- 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 +4 -5
- package/dist/esm/ion-toggle.entry.js +4 -4
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-DLNOHWNc.js → overlays-Dg0q2_tJ.js} +32 -28
- package/dist/html.html-data.json +80 -52
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-01f81ea5.entry.js +4 -0
- package/dist/ionic/p-0cc11f99.entry.js +4 -0
- package/dist/ionic/p-0dc33652.entry.js +4 -0
- package/dist/ionic/{p-fe4aa1db.entry.js → p-0fa9c382.entry.js} +1 -1
- package/dist/ionic/p-20b1a044.entry.js +4 -0
- package/dist/ionic/p-21eb76d5.entry.js +4 -0
- package/dist/ionic/p-27d30585.entry.js +4 -0
- package/dist/ionic/p-2a05aa64.entry.js +4 -0
- package/dist/ionic/p-2bb2cb18.entry.js +4 -0
- package/dist/ionic/{p-80b44b3c.entry.js → p-3353c229.entry.js} +1 -1
- package/dist/ionic/{p-c93553d2.entry.js → p-34586ead.entry.js} +1 -1
- package/dist/ionic/{p-a7628bc7.entry.js → p-37e720da.entry.js} +1 -1
- package/dist/ionic/{p-9177f4ac.entry.js → p-390ca786.entry.js} +1 -1
- package/dist/ionic/{p-259d0d98.entry.js → p-3a126bca.entry.js} +1 -1
- package/dist/ionic/{p-4502a274.entry.js → p-3a7d1e91.entry.js} +1 -1
- package/dist/ionic/{p-627fabd9.entry.js → p-3ae5f277.entry.js} +1 -1
- package/dist/ionic/{p-a5213260.entry.js → p-4858af1f.entry.js} +1 -1
- package/dist/ionic/p-485fda23.entry.js +4 -0
- package/dist/ionic/p-4baa5b82.entry.js +4 -0
- package/dist/ionic/p-5018dfc8.entry.js +4 -0
- package/dist/ionic/p-50e1194a.entry.js +4 -0
- package/dist/ionic/{p-76e92a84.entry.js → p-5d1da0a2.entry.js} +1 -1
- package/dist/ionic/p-5eb8e86d.entry.js +4 -0
- package/dist/ionic/p-65ebdf1b.entry.js +4 -0
- package/dist/ionic/p-6ebdbebe.entry.js +4 -0
- package/dist/ionic/{p-d2c7f046.entry.js → p-75dc25ba.entry.js} +1 -1
- package/dist/ionic/{p-b9ac1fe0.entry.js → p-84d5ce05.entry.js} +1 -1
- package/dist/ionic/{p-51cd1643.entry.js → p-874b4bd8.entry.js} +1 -1
- package/dist/ionic/{p-ef93ca92.entry.js → p-8eb8ee76.entry.js} +1 -1
- package/dist/ionic/p-8fce95d5.entry.js +4 -0
- package/dist/ionic/{p-db1b6738.entry.js → p-9a65ac7f.entry.js} +1 -1
- package/dist/ionic/{p-7a37b3ce.entry.js → p-9f1103ce.entry.js} +1 -1
- package/dist/ionic/p-9f9db3a2.entry.js +4 -0
- package/dist/ionic/p-D-3ycHmd.js +4 -0
- package/dist/ionic/{p-AlrZKoWR.js → p-DV3sJJW8.js} +1 -1
- package/dist/ionic/p-DzWaWHGc.js +4 -0
- package/dist/ionic/p-a21add2f.entry.js +4 -0
- package/dist/ionic/{p-d8387b99.entry.js → p-c4d8641b.entry.js} +1 -1
- package/dist/ionic/p-ca2ab74d.entry.js +4 -0
- package/dist/ionic/{p-629e4703.entry.js → p-e0be05c5.entry.js} +1 -1
- package/dist/ionic/p-ec090e0a.entry.js +4 -0
- package/dist/ionic/{p-b1599fca.entry.js → p-ef4c3bee.entry.js} +1 -1
- package/dist/ionic/p-f386f6ae.entry.js +4 -0
- package/dist/ionic/{p-341032b3.entry.js → p-fabcce6c.entry.js} +1 -1
- package/dist/types/components/img/img.d.ts +0 -2
- package/dist/types/components/input/input.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +4 -11
- package/dist/types/components/nav/nav-interface.d.ts +1 -0
- package/dist/types/components/nav/nav.d.ts +22 -2
- package/dist/types/components/picker-legacy/animations/ios.enter.d.ts +5 -0
- package/dist/types/components/picker-legacy/animations/ios.leave.d.ts +5 -0
- package/dist/types/components/picker-legacy/picker-interface.d.ts +52 -0
- package/dist/types/components/picker-legacy/picker.d.ts +158 -0
- package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
- package/dist/types/components/picker-legacy-column/test/test.utils.d.ts +9 -0
- package/dist/types/components/route/route.d.ts +1 -1
- package/dist/types/components/router-outlet/router-outlet.d.ts +0 -7
- package/dist/types/components/searchbar/searchbar.d.ts +1 -1
- package/dist/types/components/select/select-interface.d.ts +0 -31
- package/dist/types/components/select/select.d.ts +0 -18
- package/dist/types/components/select-option/select-option.d.ts +1 -42
- package/dist/types/components.d.ts +303 -74
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/utils/config.d.ts +8 -0
- package/dist/types/utils/overlays.d.ts +9 -11
- package/dist/types/utils/sanitization/index.d.ts +2 -58
- package/hydrate/index.js +1268 -1400
- package/hydrate/index.mjs +1268 -1400
- package/package.json +5 -37
- package/components/p-279dFMvg.js +0 -4
- package/components/p-BSQPZ79H.js +0 -4
- package/components/p-BwKpO3Is.js +0 -4
- package/components/p-C-Rx1zny.js +0 -4
- package/components/p-CHzfYZbv.js +0 -4
- package/components/p-D4h1H_hh.js +0 -4
- package/components/p-LMGfIvTf.js +0 -4
- package/components/p-_lHSumhG.js +0 -4
- package/components/p-j9Da6cYO.js +0 -4
- package/components/p-jOtMJMv8.js +0 -4
- package/components/p-uTR_dEqg.js +0 -4
- package/dist/cjs/config-DWdFbSNK.js +0 -35
- package/dist/cjs/index-Cueg3U4w.js +0 -429
- package/dist/cjs/overlay-control-label-D2sdL2O8.js +0 -50
- package/dist/cjs/select-option-render-DTF50t5r.js +0 -124
- package/dist/collection/utils/overlay-control-label.js +0 -45
- package/dist/collection/utils/select-option-render.js +0 -119
- package/dist/esm/config-BwKpO3Is.js +0 -31
- package/dist/esm/index-DQSkZyOJ.js +0 -424
- package/dist/esm/overlay-control-label-BSQPZ79H.js +0 -47
- package/dist/esm/select-option-render-B8nWZRnd.js +0 -122
- package/dist/ionic/p-038eb991.entry.js +0 -4
- package/dist/ionic/p-4621c387.entry.js +0 -4
- package/dist/ionic/p-4ace7762.entry.js +0 -4
- package/dist/ionic/p-4bb3eb60.entry.js +0 -4
- package/dist/ionic/p-4e9ec5c5.entry.js +0 -4
- package/dist/ionic/p-5c3ec490.entry.js +0 -4
- package/dist/ionic/p-5d1ac2c7.entry.js +0 -4
- package/dist/ionic/p-700795f6.entry.js +0 -4
- package/dist/ionic/p-79a36078.entry.js +0 -4
- package/dist/ionic/p-913b218a.entry.js +0 -4
- package/dist/ionic/p-BDtODLZ4.js +0 -4
- package/dist/ionic/p-BSQPZ79H.js +0 -4
- package/dist/ionic/p-BwKpO3Is.js +0 -4
- package/dist/ionic/p-Cg5-OQYy.js +0 -4
- package/dist/ionic/p-DCOvXkOm.js +0 -4
- package/dist/ionic/p-a18dcb3c.entry.js +0 -4
- package/dist/ionic/p-a9a33367.entry.js +0 -4
- package/dist/ionic/p-ad728198.entry.js +0 -4
- package/dist/ionic/p-bfc8c629.entry.js +0 -4
- package/dist/ionic/p-c08e666a.entry.js +0 -4
- package/dist/ionic/p-c474f471.entry.js +0 -4
- package/dist/ionic/p-ce7992c4.entry.js +0 -4
- package/dist/ionic/p-ed797c72.entry.js +0 -4
- package/dist/ionic/p-f09f9642.entry.js +0 -4
- package/dist/ionic/p-f1c06f82.entry.js +0 -4
- package/dist/ionic/p-f718fccb.entry.js +0 -4
- package/dist/types/utils/overlay-control-label.d.ts +0 -32
- package/dist/types/utils/select-option-render.d.ts +0 -53
package/hydrate/index.js
CHANGED
|
@@ -8041,7 +8041,7 @@ const focusElementInOverlay = (hostToFocus, overlay) => {
|
|
|
8041
8041
|
* Should NOT include: Toast
|
|
8042
8042
|
*/
|
|
8043
8043
|
const trapKeyboardFocus = (ev, doc) => {
|
|
8044
|
-
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover');
|
|
8044
|
+
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover');
|
|
8045
8045
|
const target = ev.target;
|
|
8046
8046
|
/**
|
|
8047
8047
|
* If no active overlay, ignore this event.
|
|
@@ -8275,7 +8275,7 @@ const dismissOverlay = (doc, data, role, overlayTag, id) => {
|
|
|
8275
8275
|
*/
|
|
8276
8276
|
const getOverlays = (doc, selector) => {
|
|
8277
8277
|
if (selector === undefined) {
|
|
8278
|
-
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover,ion-toast';
|
|
8278
|
+
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast';
|
|
8279
8279
|
}
|
|
8280
8280
|
return Array.from(doc.querySelectorAll(selector)).filter((c) => c.overlayIndex > 0);
|
|
8281
8281
|
};
|
|
@@ -8337,29 +8337,6 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
8337
8337
|
viewContainer.removeAttribute('aria-hidden');
|
|
8338
8338
|
}
|
|
8339
8339
|
};
|
|
8340
|
-
/**
|
|
8341
|
-
* Cleans up root `aria-hidden` and `backdrop-no-scroll` when
|
|
8342
|
-
* an overlay is removed from the DOM without going through
|
|
8343
|
-
* the `dismiss()` flow (e.g., when a framework unmounts the
|
|
8344
|
-
* overlay during a route change).
|
|
8345
|
-
*
|
|
8346
|
-
* Should be called from an overlay's `disconnectedCallback`
|
|
8347
|
-
* when the overlay was still presented at the time of removal.
|
|
8348
|
-
*/
|
|
8349
|
-
const cleanupRootFocusTrapAccessibility = () => {
|
|
8350
|
-
if (typeof document === 'undefined') {
|
|
8351
|
-
return;
|
|
8352
|
-
}
|
|
8353
|
-
const remainingOverlays = getPresentedOverlays(document);
|
|
8354
|
-
const hasRemainingLocking = remainingOverlays.some((o) => {
|
|
8355
|
-
const el = o;
|
|
8356
|
-
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
|
|
8357
|
-
});
|
|
8358
|
-
if (!hasRemainingLocking) {
|
|
8359
|
-
setRootAriaHidden(false);
|
|
8360
|
-
document.body.classList.remove(BACKDROP_NO_SCROLL);
|
|
8361
|
-
}
|
|
8362
|
-
};
|
|
8363
8340
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
8364
8341
|
var _a, _b;
|
|
8365
8342
|
if (overlay.presented) {
|
|
@@ -8425,7 +8402,30 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
8425
8402
|
* to the overlay container.
|
|
8426
8403
|
*/
|
|
8427
8404
|
if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
|
|
8428
|
-
|
|
8405
|
+
/**
|
|
8406
|
+
* Some overlays (e.g. modal) put the dialog role and accessible label
|
|
8407
|
+
* on the `.ion-overlay-wrapper` instead of the host. Screen readers
|
|
8408
|
+
* need focus on the element with `role="dialog"` to properly announce
|
|
8409
|
+
* and navigate the dialog.
|
|
8410
|
+
*
|
|
8411
|
+
* We only target wrappers with `tabindex`, since `role="dialog"` alone
|
|
8412
|
+
* does not make an element focusable. If no focusable dialog wrapper
|
|
8413
|
+
* exists (e.g. picker-legacy), we fall back to the host.
|
|
8414
|
+
*/
|
|
8415
|
+
const overlayWrapper = getElementRoot(overlay.el).querySelector('[role="dialog"][tabindex]');
|
|
8416
|
+
const focusTarget = overlayWrapper !== null && overlayWrapper !== void 0 ? overlayWrapper : overlay.el;
|
|
8417
|
+
/**
|
|
8418
|
+
* `preventScroll` keeps this a pure focus move so the viewport does not
|
|
8419
|
+
* jump when the wrapper is partially off-screen (e.g. a sheet modal).
|
|
8420
|
+
* Guard the options call so an older engine that mishandles it can never
|
|
8421
|
+
* reject present(); we fall back to a plain focus() in that case.
|
|
8422
|
+
*/
|
|
8423
|
+
try {
|
|
8424
|
+
focusTarget.focus({ preventScroll: true });
|
|
8425
|
+
}
|
|
8426
|
+
catch (_c) {
|
|
8427
|
+
focusTarget.focus();
|
|
8428
|
+
}
|
|
8429
8429
|
}
|
|
8430
8430
|
/**
|
|
8431
8431
|
* If this overlay was previously dismissed without being
|
|
@@ -8761,539 +8761,6 @@ const createTriggerController = () => {
|
|
|
8761
8761
|
};
|
|
8762
8762
|
const FOCUS_TRAP_DISABLE_CLASS = 'ion-disable-focus-trap';
|
|
8763
8763
|
|
|
8764
|
-
/**
|
|
8765
|
-
* Sanitize an untrusted HTML string.
|
|
8766
|
-
*
|
|
8767
|
-
* Parses the string into a detached DOM, removes blocked tags, strips
|
|
8768
|
-
* attributes outside the narrow `domStringAllowedAttributes` list (refer
|
|
8769
|
-
* `sanitizeElement`), and scrubs script-scheme URLs. Returns the sanitized
|
|
8770
|
-
* HTML string.
|
|
8771
|
-
*
|
|
8772
|
-
* Use this when you have an HTML string from an unknown source and need to
|
|
8773
|
-
* render it via `innerHTML`. Use `sanitizeDOMTree` instead when you already
|
|
8774
|
-
* have a DOM tree and want to sanitize it in place without a string round
|
|
8775
|
-
* trip. The two apply the same dangerous-vector scrubbing but different
|
|
8776
|
-
* attribute allowlists: this path stays narrow so existing consumers
|
|
8777
|
-
* (toast, loading, alert message, etc.) are unaffected, while
|
|
8778
|
-
* `sanitizeDOMTree` uses the wider rich-content allowlist.
|
|
8779
|
-
*
|
|
8780
|
-
* @param untrustedString - The HTML string to sanitize. Pass an
|
|
8781
|
-
* `IonicSafeString` to bypass sanitization, or `undefined` to short-circuit.
|
|
8782
|
-
* @returns The sanitized HTML string, or `undefined` if the input was
|
|
8783
|
-
* `undefined`. Returns `''` if sanitization fails or the input contains
|
|
8784
|
-
* an inline `onload=` handler.
|
|
8785
|
-
*/
|
|
8786
|
-
const sanitizeDOMString = (untrustedString) => {
|
|
8787
|
-
try {
|
|
8788
|
-
if (untrustedString instanceof IonicSafeString) {
|
|
8789
|
-
return untrustedString.value;
|
|
8790
|
-
}
|
|
8791
|
-
if (!isSanitizerEnabled() || typeof untrustedString !== 'string' || untrustedString === '') {
|
|
8792
|
-
return untrustedString;
|
|
8793
|
-
}
|
|
8794
|
-
/**
|
|
8795
|
-
* onload is fired when appending to a document
|
|
8796
|
-
* fragment in Chrome. If a string
|
|
8797
|
-
* contains onload then we should not
|
|
8798
|
-
* attempt to add this to the fragment.
|
|
8799
|
-
*/
|
|
8800
|
-
if (untrustedString.includes('onload=')) {
|
|
8801
|
-
return '';
|
|
8802
|
-
}
|
|
8803
|
-
/**
|
|
8804
|
-
* Create a document fragment
|
|
8805
|
-
* separate from the main DOM,
|
|
8806
|
-
* create a div to do our work in
|
|
8807
|
-
*/
|
|
8808
|
-
const documentFragment = document.createDocumentFragment();
|
|
8809
|
-
const workingDiv = document.createElement('div');
|
|
8810
|
-
documentFragment.appendChild(workingDiv);
|
|
8811
|
-
workingDiv.innerHTML = untrustedString;
|
|
8812
|
-
/**
|
|
8813
|
-
* Remove any elements
|
|
8814
|
-
* that are blocked
|
|
8815
|
-
*/
|
|
8816
|
-
blockedTags.forEach((blockedTag) => {
|
|
8817
|
-
const getElementsToRemove = documentFragment.querySelectorAll(blockedTag);
|
|
8818
|
-
for (let elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
|
|
8819
|
-
const element = getElementsToRemove[elementIndex];
|
|
8820
|
-
if (element.parentNode) {
|
|
8821
|
-
element.parentNode.removeChild(element);
|
|
8822
|
-
}
|
|
8823
|
-
else {
|
|
8824
|
-
documentFragment.removeChild(element);
|
|
8825
|
-
}
|
|
8826
|
-
/**
|
|
8827
|
-
* We still need to sanitize
|
|
8828
|
-
* the children of this element
|
|
8829
|
-
* as they are left behind
|
|
8830
|
-
*/
|
|
8831
|
-
const childElements = getElementChildren(element);
|
|
8832
|
-
/* eslint-disable-next-line */
|
|
8833
|
-
for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
|
|
8834
|
-
sanitizeElement(childElements[childIndex], domStringAllowedAttributes);
|
|
8835
|
-
}
|
|
8836
|
-
}
|
|
8837
|
-
});
|
|
8838
|
-
/**
|
|
8839
|
-
* Go through remaining elements and remove
|
|
8840
|
-
* non-allowed attribs
|
|
8841
|
-
*/
|
|
8842
|
-
// IE does not support .children on document fragments, only .childNodes
|
|
8843
|
-
const dfChildren = getElementChildren(documentFragment);
|
|
8844
|
-
/* eslint-disable-next-line */
|
|
8845
|
-
for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
|
|
8846
|
-
sanitizeElement(dfChildren[childIndex], domStringAllowedAttributes);
|
|
8847
|
-
}
|
|
8848
|
-
// Append document fragment to div
|
|
8849
|
-
const fragmentDiv = document.createElement('div');
|
|
8850
|
-
fragmentDiv.appendChild(documentFragment);
|
|
8851
|
-
// First child is always the div we did our work in
|
|
8852
|
-
const getInnerDiv = fragmentDiv.querySelector('div');
|
|
8853
|
-
return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
|
|
8854
|
-
}
|
|
8855
|
-
catch (err) {
|
|
8856
|
-
printIonError('sanitizeDOMString', err);
|
|
8857
|
-
return '';
|
|
8858
|
-
}
|
|
8859
|
-
};
|
|
8860
|
-
/**
|
|
8861
|
-
* Sanitize an entire trusted DOM tree in place.
|
|
8862
|
-
*
|
|
8863
|
-
* Removes blocked tags (`script`, `iframe`, etc.) from the subtree and
|
|
8864
|
-
* then sanitizes attributes on every remaining element using the wider
|
|
8865
|
-
* `richContentAllowedAttributes` allowlist (refer `sanitizeElement`).
|
|
8866
|
-
* Component presentational attributes (`size`, `color`, `shape`, inline
|
|
8867
|
-
* SVG, `aria-*`, `data-*`) are preserved; `style`, event handlers (`on*`),
|
|
8868
|
-
* form/navigation-hijack attributes, script-scheme URLs, and non-image
|
|
8869
|
-
* `data:` URLs are stripped.
|
|
8870
|
-
*
|
|
8871
|
-
* Use this when you have a DOM tree the developer controls (e.g.
|
|
8872
|
-
* cloned slot content from a component) and you need to render it
|
|
8873
|
-
* elsewhere safely.
|
|
8874
|
-
*
|
|
8875
|
-
* @param root - The root element whose subtree will be sanitized in
|
|
8876
|
-
* place. No-op when the sanitizer is disabled via `Ionic.config`.
|
|
8877
|
-
*/
|
|
8878
|
-
const sanitizeDOMTree = (root) => {
|
|
8879
|
-
if (!isSanitizerEnabled()) {
|
|
8880
|
-
return;
|
|
8881
|
-
}
|
|
8882
|
-
blockedTags.forEach((tag) => {
|
|
8883
|
-
const matches = root.querySelectorAll(tag);
|
|
8884
|
-
for (let i = matches.length - 1; i >= 0; i--) {
|
|
8885
|
-
matches[i].remove();
|
|
8886
|
-
}
|
|
8887
|
-
});
|
|
8888
|
-
sanitizeElement(root, richContentAllowedAttributes, richContentAllowedAttributePrefixes);
|
|
8889
|
-
};
|
|
8890
|
-
/**
|
|
8891
|
-
* Clean up current element based on allowed attributes
|
|
8892
|
-
* and then recursively dig down into any child elements to
|
|
8893
|
-
* clean those up as well
|
|
8894
|
-
*/
|
|
8895
|
-
// TODO(FW-2832): type (using Element triggers other type errors as well)
|
|
8896
|
-
const sanitizeElement = (element, allowedAttributes, allowedAttributePrefixes = []) => {
|
|
8897
|
-
// IE uses childNodes, so ignore nodes that are not elements
|
|
8898
|
-
if (element.nodeType && element.nodeType !== 1) {
|
|
8899
|
-
return;
|
|
8900
|
-
}
|
|
8901
|
-
/**
|
|
8902
|
-
* If attributes is not a NamedNodeMap
|
|
8903
|
-
* then we should remove the element entirely.
|
|
8904
|
-
* This helps avoid DOM Clobbering attacks where
|
|
8905
|
-
* attributes is overridden.
|
|
8906
|
-
*/
|
|
8907
|
-
if (typeof NamedNodeMap !== 'undefined' && !(element.attributes instanceof NamedNodeMap)) {
|
|
8908
|
-
element.remove();
|
|
8909
|
-
return;
|
|
8910
|
-
}
|
|
8911
|
-
/**
|
|
8912
|
-
* Always strip `style` (CSS injection, `background:url()` beaconing, UI
|
|
8913
|
-
* spoofing). It is never on the allowlist, but it is removed explicitly
|
|
8914
|
-
* here because some engines (e.g. jsdom) don't enumerate the CSSOM-backed
|
|
8915
|
-
* `style` attribute in `element.attributes`, which would let the loop
|
|
8916
|
-
* below skip over it.
|
|
8917
|
-
*/
|
|
8918
|
-
element.removeAttribute('style');
|
|
8919
|
-
for (let i = element.attributes.length - 1; i >= 0; i--) {
|
|
8920
|
-
const attribute = element.attributes.item(i);
|
|
8921
|
-
const attributeName = attribute.name;
|
|
8922
|
-
const lowerName = attributeName.toLowerCase();
|
|
8923
|
-
/**
|
|
8924
|
-
* Remove any attribute that is not on the allowlist. This drops event
|
|
8925
|
-
* handlers (`on*`), `style`, the form/navigation-hijack attributes
|
|
8926
|
-
* (`formaction`, `action`, `target`), namespaced attributes like
|
|
8927
|
-
* `xlink:href`, and anything else not explicitly known to be safe.
|
|
8928
|
-
*/
|
|
8929
|
-
if (!isAttributeAllowed(lowerName, allowedAttributes, allowedAttributePrefixes)) {
|
|
8930
|
-
element.removeAttribute(attributeName);
|
|
8931
|
-
continue;
|
|
8932
|
-
}
|
|
8933
|
-
// clean up any allowed attribs
|
|
8934
|
-
// that attempt to do any JS funny-business
|
|
8935
|
-
const attributeValue = attribute.value;
|
|
8936
|
-
if (attributeValue == null) {
|
|
8937
|
-
continue;
|
|
8938
|
-
}
|
|
8939
|
-
/**
|
|
8940
|
-
* Scrub dangerous schemes from the value. The value is normalized first
|
|
8941
|
-
* (whitespace and ASCII control characters removed) so entity-obfuscated
|
|
8942
|
-
* payloads such as `java	script:`, which the parser decodes to
|
|
8943
|
-
* `java\tscript:`, are still caught. Normalizing the value also covers
|
|
8944
|
-
* namespaced attributes, where the previous `element[attributeName]`
|
|
8945
|
-
* property reflection returned `undefined` and let them slip through.
|
|
8946
|
-
*/
|
|
8947
|
-
const normalizedValue = attributeValue.replace(controlCharactersAndWhitespace, '').toLowerCase();
|
|
8948
|
-
// Script schemes are never allowed, on any attribute.
|
|
8949
|
-
if (normalizedValue.includes('javascript:') || normalizedValue.includes('vbscript:')) {
|
|
8950
|
-
element.removeAttribute(attributeName);
|
|
8951
|
-
continue;
|
|
8952
|
-
}
|
|
8953
|
-
/**
|
|
8954
|
-
* For URL-bearing attributes, allow `data:` URIs only for raster
|
|
8955
|
-
* images. Document-bearing types (`text/html`, `image/svg+xml`,
|
|
8956
|
-
* `application/*`, etc.) can carry markup or script when navigated to
|
|
8957
|
-
* or rendered, so they are stripped, while safe image types are kept so
|
|
8958
|
-
* inline images keep working.
|
|
8959
|
-
*/
|
|
8960
|
-
if (urlAttributes.includes(lowerName) &&
|
|
8961
|
-
normalizedValue.startsWith('data:') &&
|
|
8962
|
-
!safeDataImageUri.test(normalizedValue)) {
|
|
8963
|
-
element.removeAttribute(attributeName);
|
|
8964
|
-
}
|
|
8965
|
-
}
|
|
8966
|
-
/**
|
|
8967
|
-
* Sanitize any nested children
|
|
8968
|
-
*/
|
|
8969
|
-
const childElements = getElementChildren(element);
|
|
8970
|
-
/* eslint-disable-next-line */
|
|
8971
|
-
for (let i = 0; i < childElements.length; i++) {
|
|
8972
|
-
sanitizeElement(childElements[i], allowedAttributes, allowedAttributePrefixes);
|
|
8973
|
-
}
|
|
8974
|
-
};
|
|
8975
|
-
/**
|
|
8976
|
-
* IE doesn't always support .children
|
|
8977
|
-
* so we revert to .childNodes instead
|
|
8978
|
-
*/
|
|
8979
|
-
// TODO(FW-2832): type
|
|
8980
|
-
const getElementChildren = (el) => {
|
|
8981
|
-
return el.children != null ? el.children : el.childNodes;
|
|
8982
|
-
};
|
|
8983
|
-
const isSanitizerEnabled = () => {
|
|
8984
|
-
var _a;
|
|
8985
|
-
const win = window;
|
|
8986
|
-
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
|
|
8987
|
-
if (config) {
|
|
8988
|
-
if (config.get) {
|
|
8989
|
-
return config.get('sanitizerEnabled', true);
|
|
8990
|
-
}
|
|
8991
|
-
else {
|
|
8992
|
-
return config.sanitizerEnabled === true || config.sanitizerEnabled === undefined;
|
|
8993
|
-
}
|
|
8994
|
-
}
|
|
8995
|
-
return true;
|
|
8996
|
-
};
|
|
8997
|
-
/**
|
|
8998
|
-
* Mirror known custom-element DOM properties onto attributes so they
|
|
8999
|
-
* survive `cloneNode`. Call this on a DOM subtree before cloning it for
|
|
9000
|
-
* rendering elsewhere (e.g. cloning slotted option content into an
|
|
9001
|
-
* overlay).
|
|
9002
|
-
*
|
|
9003
|
-
* Only sets the attribute when the property holds a non-empty string
|
|
9004
|
-
* and the attribute isn't already present, so existing attributes
|
|
9005
|
-
* take precedence.
|
|
9006
|
-
*
|
|
9007
|
-
* @param root - The root element whose subtree (and itself) will be
|
|
9008
|
-
* inspected.
|
|
9009
|
-
*/
|
|
9010
|
-
const reflectPropertiesToAttributes = (root) => {
|
|
9011
|
-
const candidates = [];
|
|
9012
|
-
if (root.tagName in elementPropsToReflect) {
|
|
9013
|
-
candidates.push(root);
|
|
9014
|
-
}
|
|
9015
|
-
for (const tagName of Object.keys(elementPropsToReflect)) {
|
|
9016
|
-
candidates.push(...Array.from(root.querySelectorAll(tagName.toLowerCase())));
|
|
9017
|
-
}
|
|
9018
|
-
for (const el of candidates) {
|
|
9019
|
-
if (!(el.tagName in elementPropsToReflect)) {
|
|
9020
|
-
continue;
|
|
9021
|
-
}
|
|
9022
|
-
const props = elementPropsToReflect[el.tagName];
|
|
9023
|
-
for (const prop of props) {
|
|
9024
|
-
const value = el[prop];
|
|
9025
|
-
if (typeof value === 'string' && value.length > 0 && !el.hasAttribute(prop)) {
|
|
9026
|
-
el.setAttribute(prop, value);
|
|
9027
|
-
}
|
|
9028
|
-
}
|
|
9029
|
-
}
|
|
9030
|
-
};
|
|
9031
|
-
/**
|
|
9032
|
-
* Attribute allowlist for `sanitizeDOMString`. Intentionally narrow: this
|
|
9033
|
-
* path sanitizes developer HTML strings rendered via `innerHTML` by
|
|
9034
|
-
* `ion-toast`, `ion-loading`, the `ion-alert` message,
|
|
9035
|
-
* `ion-refresher-content`, and `ion-infinite-scroll-content`, so the list
|
|
9036
|
-
* is kept to the minimum those have always needed. Broadening it here would
|
|
9037
|
-
* change sanitization output for all of those consumers, so the wider
|
|
9038
|
-
* rich-content allowlist below is deliberately scoped to `sanitizeDOMTree`
|
|
9039
|
-
* instead.
|
|
9040
|
-
*/
|
|
9041
|
-
const domStringAllowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
|
|
9042
|
-
/**
|
|
9043
|
-
* Attribute allowlist for `sanitizeDOMTree` (the select rich-content path).
|
|
9044
|
-
* Covers global HTML attributes, the Ionic component presentational props
|
|
9045
|
-
* that cloned rich content (e.g. `ion-select-option` markup) relies on, and
|
|
9046
|
-
* the inert SVG presentation attributes used by inline icons.
|
|
9047
|
-
*
|
|
9048
|
-
* `aria-*` and `data-*` are allowed separately by prefix (refer
|
|
9049
|
-
* `richContentAllowedAttributePrefixes`) since they are inert and not worth
|
|
9050
|
-
* enumerating. URL-bearing names (`href`, `src`) are allowed here, but
|
|
9051
|
-
* their values are still scrubbed for script schemes in `sanitizeElement`.
|
|
9052
|
-
*
|
|
9053
|
-
* Notably absent: `style`, event handlers (`on*`), and the
|
|
9054
|
-
* form/navigation-hijack attributes (`formaction`, `action`, `target`),
|
|
9055
|
-
* which are therefore stripped.
|
|
9056
|
-
*/
|
|
9057
|
-
const richContentAllowedAttributes = [
|
|
9058
|
-
// Global / structural
|
|
9059
|
-
'class',
|
|
9060
|
-
'id',
|
|
9061
|
-
'slot',
|
|
9062
|
-
'name',
|
|
9063
|
-
'title',
|
|
9064
|
-
'alt',
|
|
9065
|
-
'lang',
|
|
9066
|
-
'dir',
|
|
9067
|
-
'role',
|
|
9068
|
-
'type',
|
|
9069
|
-
'value',
|
|
9070
|
-
'disabled',
|
|
9071
|
-
'width',
|
|
9072
|
-
'height',
|
|
9073
|
-
'href',
|
|
9074
|
-
'src',
|
|
9075
|
-
// Ionic component presentational props
|
|
9076
|
-
'color',
|
|
9077
|
-
'size',
|
|
9078
|
-
'shape',
|
|
9079
|
-
'fill',
|
|
9080
|
-
'expand',
|
|
9081
|
-
'mode',
|
|
9082
|
-
'theme',
|
|
9083
|
-
'icon',
|
|
9084
|
-
'label',
|
|
9085
|
-
'label-placement',
|
|
9086
|
-
'justify',
|
|
9087
|
-
'inset',
|
|
9088
|
-
'lines',
|
|
9089
|
-
'ios',
|
|
9090
|
-
'md',
|
|
9091
|
-
// SVG presentation attributes (compared lowercased, e.g. `viewBox`)
|
|
9092
|
-
'xmlns',
|
|
9093
|
-
'viewbox',
|
|
9094
|
-
'preserveaspectratio',
|
|
9095
|
-
'stroke',
|
|
9096
|
-
'stroke-width',
|
|
9097
|
-
'stroke-linecap',
|
|
9098
|
-
'stroke-linejoin',
|
|
9099
|
-
'stroke-opacity',
|
|
9100
|
-
'stroke-dasharray',
|
|
9101
|
-
'fill-rule',
|
|
9102
|
-
'fill-opacity',
|
|
9103
|
-
'clip-rule',
|
|
9104
|
-
'd',
|
|
9105
|
-
'points',
|
|
9106
|
-
'cx',
|
|
9107
|
-
'cy',
|
|
9108
|
-
'r',
|
|
9109
|
-
'rx',
|
|
9110
|
-
'ry',
|
|
9111
|
-
'x',
|
|
9112
|
-
'y',
|
|
9113
|
-
'x1',
|
|
9114
|
-
'y1',
|
|
9115
|
-
'x2',
|
|
9116
|
-
'y2',
|
|
9117
|
-
'transform',
|
|
9118
|
-
'opacity',
|
|
9119
|
-
];
|
|
9120
|
-
/**
|
|
9121
|
-
* Attribute-name prefixes that are always safe to keep in the rich-content
|
|
9122
|
-
* path. `aria-*` and `data-*` attributes cannot execute script or load
|
|
9123
|
-
* resources, so they are allowed wholesale rather than enumerated by name.
|
|
9124
|
-
*/
|
|
9125
|
-
const richContentAllowedAttributePrefixes = ['aria-', 'data-'];
|
|
9126
|
-
/**
|
|
9127
|
-
* Whether an attribute name (already lowercased) is safe to keep, by exact
|
|
9128
|
-
* match or by an allowed prefix.
|
|
9129
|
-
*/
|
|
9130
|
-
const isAttributeAllowed = (lowerName, allowedAttributes, allowedAttributePrefixes) => {
|
|
9131
|
-
if (allowedAttributes.includes(lowerName)) {
|
|
9132
|
-
return true;
|
|
9133
|
-
}
|
|
9134
|
-
return allowedAttributePrefixes.some((prefix) => lowerName.startsWith(prefix));
|
|
9135
|
-
};
|
|
9136
|
-
/**
|
|
9137
|
-
* Matches ASCII control characters and whitespace (including the
|
|
9138
|
-
* non-breaking space). Used to normalize attribute values before matching
|
|
9139
|
-
* a URL scheme so entity-obfuscated payloads such as `java	script:`
|
|
9140
|
-
* (decoded by the parser to `java\tscript:`) can't smuggle a scheme past
|
|
9141
|
-
* the check.
|
|
9142
|
-
*/
|
|
9143
|
-
// eslint-disable-next-line no-control-regex -- matching control characters is the point
|
|
9144
|
-
const controlCharactersAndWhitespace = /[\u0000-\u0020\u007f-\u00a0]/g;
|
|
9145
|
-
/**
|
|
9146
|
-
* Attributes whose values are URLs. Their values are scheme-checked in
|
|
9147
|
-
* `sanitizeElement` (e.g. `data:` filtering) beyond the script-scheme scrub
|
|
9148
|
-
* applied to every attribute.
|
|
9149
|
-
*/
|
|
9150
|
-
const urlAttributes = ['href', 'src'];
|
|
9151
|
-
/**
|
|
9152
|
-
* Matches a `data:` URI for a raster image type that cannot carry script.
|
|
9153
|
-
* `image/svg+xml` is deliberately excluded (SVG can execute script), as are
|
|
9154
|
-
* document types like `text/html` and `application/*`. The value is already
|
|
9155
|
-
* lowercased and whitespace-stripped before this is tested.
|
|
9156
|
-
*/
|
|
9157
|
-
const safeDataImageUri = /^data:image\/(?:png|jpe?g|gif|webp|bmp|avif|x-icon|vnd\.microsoft\.icon)[;,]/;
|
|
9158
|
-
/**
|
|
9159
|
-
* Tags removed entirely (with their subtree) before attribute sanitization.
|
|
9160
|
-
* Exported so tests can assert the set without hardcoding it.
|
|
9161
|
-
*/
|
|
9162
|
-
const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed', 'base'];
|
|
9163
|
-
/**
|
|
9164
|
-
* Properties on custom elements that frameworks (Vue, Angular) often
|
|
9165
|
-
* set as DOM properties rather than attributes. `cloneNode` only copies
|
|
9166
|
-
* attributes, so these values are lost when slotted content is cloned
|
|
9167
|
-
* into an overlay. For each known custom element, we mirror the listed
|
|
9168
|
-
* properties onto attributes so the cloned copy still has the data it
|
|
9169
|
-
* needs to render.
|
|
9170
|
-
*
|
|
9171
|
-
* Keyed by uppercased tagName so the lookup matches `Element.tagName`.
|
|
9172
|
-
*/
|
|
9173
|
-
const elementPropsToReflect = {
|
|
9174
|
-
'ION-ICON': ['icon', 'name', 'src', 'ios', 'md'],
|
|
9175
|
-
};
|
|
9176
|
-
class IonicSafeString {
|
|
9177
|
-
constructor(value) {
|
|
9178
|
-
this.value = value;
|
|
9179
|
-
}
|
|
9180
|
-
}
|
|
9181
|
-
|
|
9182
|
-
/**
|
|
9183
|
-
* Converts a DOM node into a Stencil VNode (or text string) so the
|
|
9184
|
-
* resulting tree is rendered through the component's normal render
|
|
9185
|
-
* path. Rendering through Stencil ensures that scoped CSS classes
|
|
9186
|
-
* (e.g. `sc-ion-action-sheet-ionic`) are applied to every element.
|
|
9187
|
-
*
|
|
9188
|
-
* Highly recommended to pre-sanitize the source DOM (see
|
|
9189
|
-
* `getOptionContent` in select.tsx). This function performs pure
|
|
9190
|
-
* structural conversion — no security filtering.
|
|
9191
|
-
*
|
|
9192
|
-
* Preserves attributes only — properties set imperatively on the source
|
|
9193
|
-
* element (e.g. `input.value` after a user types) won't carry through.
|
|
9194
|
-
* In practice this isn't a concern: interactive controls shouldn't
|
|
9195
|
-
* appear in select-option rich content since they'd nest inside the
|
|
9196
|
-
* overlay's button/radio/checkbox wrapper, which is invalid HTML and
|
|
9197
|
-
* an accessibility issue.
|
|
9198
|
-
*
|
|
9199
|
-
* @param node - The DOM node to convert. Text nodes become strings,
|
|
9200
|
-
* element nodes become VNodes, and any other node types are skipped.
|
|
9201
|
-
* @param keyPrefix - String prefix used to build a stable VNode key,
|
|
9202
|
-
* so Stencil's diff can preserve elements across re-renders.
|
|
9203
|
-
* @param index - Position of this node among its siblings. Combined
|
|
9204
|
-
* with `keyPrefix` to form the final unique key.
|
|
9205
|
-
* @returns The converted VNode, a text string, or `null` if the node
|
|
9206
|
-
* type isn't supported.
|
|
9207
|
-
*
|
|
9208
|
-
* @internal Exported only so it can be unit tested; not part of the
|
|
9209
|
-
* public API.
|
|
9210
|
-
*/
|
|
9211
|
-
const cloneToVNode = (node, keyPrefix, index) => {
|
|
9212
|
-
var _a;
|
|
9213
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
9214
|
-
return (_a = node.textContent) !== null && _a !== void 0 ? _a : '';
|
|
9215
|
-
}
|
|
9216
|
-
if (node.nodeType !== Node.ELEMENT_NODE) {
|
|
9217
|
-
return null;
|
|
9218
|
-
}
|
|
9219
|
-
const el = node;
|
|
9220
|
-
const tag = el.tagName.toLowerCase();
|
|
9221
|
-
const key = `${keyPrefix}-${index}`;
|
|
9222
|
-
const attrs = { key };
|
|
9223
|
-
for (let i = 0; i < el.attributes.length; i++) {
|
|
9224
|
-
const attr = el.attributes.item(i);
|
|
9225
|
-
attrs[attr.name] = attr.value;
|
|
9226
|
-
}
|
|
9227
|
-
const children = Array.from(el.childNodes)
|
|
9228
|
-
.map((child, i) => cloneToVNode(child, key, i))
|
|
9229
|
-
.filter((c) => c !== null);
|
|
9230
|
-
return hAsync(tag, attrs, children);
|
|
9231
|
-
};
|
|
9232
|
-
/**
|
|
9233
|
-
* Renders cloned DOM content as Stencil JSX. Walking the source DOM
|
|
9234
|
-
* into VNodes (rather than injecting it via innerHTML) keeps the
|
|
9235
|
-
* content inside Stencil's render path, so scoped CSS classes are
|
|
9236
|
-
* applied automatically and component attributes like `size` or
|
|
9237
|
-
* `color` survive intact.
|
|
9238
|
-
*
|
|
9239
|
-
* Span elements should be used when this content renders within buttons,
|
|
9240
|
-
* depending on the select interface. Buttons can only have phrasing
|
|
9241
|
-
* content to prevent accessibility issues.
|
|
9242
|
-
*
|
|
9243
|
-
* @param id - Unique identifier for generating stable virtual DOM keys.
|
|
9244
|
-
* @param content - The HTMLElement container whose child nodes will be cloned.
|
|
9245
|
-
* @param className - CSS class applied to the wrapper element.
|
|
9246
|
-
* @param useSpan - Whether to use a span element instead of a div for the wrapper.
|
|
9247
|
-
*/
|
|
9248
|
-
const renderClonedContent = (id, content, className, useSpan = false) => {
|
|
9249
|
-
const Tag = useSpan ? 'span' : 'div';
|
|
9250
|
-
const keyPrefix = `${className}-${id}`;
|
|
9251
|
-
/**
|
|
9252
|
-
* Do not remove. This is the only sanitization pass for callers that pass
|
|
9253
|
-
* an `HTMLElement` straight to `renderOptionLabel` (e.g. vanilla JS)
|
|
9254
|
-
* without going through `getOptionContent`, which sanitizes upstream.
|
|
9255
|
-
* `cloneToVNode` does pure structural conversion and no security
|
|
9256
|
-
* filtering, so dropping this call would reopen an XSS hole on the
|
|
9257
|
-
* direct `HTMLElement` path.
|
|
9258
|
-
*/
|
|
9259
|
-
sanitizeDOMTree(content);
|
|
9260
|
-
return (hAsync(Tag, { class: className, key: keyPrefix }, Array.from(content.childNodes).map((child, i) => cloneToVNode(child, keyPrefix, i))));
|
|
9261
|
-
};
|
|
9262
|
-
/**
|
|
9263
|
-
* Renders the label content for a select option within an overlay
|
|
9264
|
-
* interface based on the presence of rich content.
|
|
9265
|
-
*
|
|
9266
|
-
* Span elements should be used when this content renders within buttons,
|
|
9267
|
-
* depending on the select interface. Buttons can only have phrasing
|
|
9268
|
-
* content to prevent accessibility issues.
|
|
9269
|
-
*
|
|
9270
|
-
* @param option - The content option data containing label, slots,
|
|
9271
|
-
* and description.
|
|
9272
|
-
* @param className - The base CSS class for the label element.
|
|
9273
|
-
* @param useSpan - Whether to use a span element instead of a div for the label.
|
|
9274
|
-
*/
|
|
9275
|
-
const renderOptionLabel = (option, className, useSpan = false) => {
|
|
9276
|
-
const { id, label, startContent, endContent, description } = option;
|
|
9277
|
-
const hasRichContent = !!startContent || !!endContent || !!description;
|
|
9278
|
-
const Tag = useSpan ? 'span' : 'div';
|
|
9279
|
-
// Render simple string label if there is no rich content to display
|
|
9280
|
-
if (!hasRichContent && (typeof label === 'string' || !label)) {
|
|
9281
|
-
return (hAsync(Tag, { class: className, key: `${className}-${id}` }, label));
|
|
9282
|
-
}
|
|
9283
|
-
// Render the main label
|
|
9284
|
-
const labelEl = typeof label === 'string' || !label ? (
|
|
9285
|
-
// Label is a simple string or undefined
|
|
9286
|
-
hAsync(Tag, { key: `${className}-label-${id}` }, label)) : (
|
|
9287
|
-
// Label is an HTMLElement with potential rich content
|
|
9288
|
-
renderClonedContent(id, label, `${className}-text`, useSpan));
|
|
9289
|
-
// No rich content, render just the label
|
|
9290
|
-
if (!hasRichContent) {
|
|
9291
|
-
return (hAsync(Tag, { class: className, key: `${className}-${id}` }, labelEl));
|
|
9292
|
-
}
|
|
9293
|
-
// Render label with rich content (start, end, description)
|
|
9294
|
-
return (hAsync(Tag, { class: `${className} ${className}-has-rich-content`, key: `${className}-${id}` }, startContent && renderClonedContent(id, startContent, 'select-option-start', useSpan), hAsync(Tag, { class: "select-option-content", key: `${className}-content-${id}` }, labelEl, description && (hAsync(Tag, { class: "select-option-description", key: `${className}-desc-${id}` }, description))), endContent && renderClonedContent(id, endContent, 'select-option-end', useSpan)));
|
|
9295
|
-
};
|
|
9296
|
-
|
|
9297
8764
|
const hostContext = (selector, el) => {
|
|
9298
8765
|
return el.closest(selector) !== null;
|
|
9299
8766
|
};
|
|
@@ -10149,7 +9616,7 @@ const createAnimation = (animationId) => {
|
|
|
10149
9616
|
/**
|
|
10150
9617
|
* iOS Action Sheet Enter Animation
|
|
10151
9618
|
*/
|
|
10152
|
-
const iosEnterAnimation$
|
|
9619
|
+
const iosEnterAnimation$6 = (baseEl) => {
|
|
10153
9620
|
const baseAnimation = createAnimation();
|
|
10154
9621
|
const backdropAnimation = createAnimation();
|
|
10155
9622
|
const wrapperAnimation = createAnimation();
|
|
@@ -10173,7 +9640,7 @@ const iosEnterAnimation$5 = (baseEl) => {
|
|
|
10173
9640
|
/**
|
|
10174
9641
|
* iOS Action Sheet Leave Animation
|
|
10175
9642
|
*/
|
|
10176
|
-
const iosLeaveAnimation$
|
|
9643
|
+
const iosLeaveAnimation$6 = (baseEl) => {
|
|
10177
9644
|
const baseAnimation = createAnimation();
|
|
10178
9645
|
const backdropAnimation = createAnimation();
|
|
10179
9646
|
const wrapperAnimation = createAnimation();
|
|
@@ -10230,9 +9697,9 @@ const mdLeaveAnimation$5 = (baseEl) => {
|
|
|
10230
9697
|
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
10231
9698
|
};
|
|
10232
9699
|
|
|
10233
|
-
const actionSheetIosCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-action-sheet-ios,.alert-radio-label-has-rich-content.sc-ion-action-sheet-ios,.alert-checkbox-label-has-rich-content.sc-ion-action-sheet-ios,.select-option-label-has-rich-content.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-action-sheet-ios,.alert-radio-label-has-rich-content.sc-ion-action-sheet-ios,.alert-checkbox-label-has-rich-content.sc-ion-action-sheet-ios,.select-option-content.sc-ion-action-sheet-ios{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-action-sheet-ios,.alert-checkbox-label-text.sc-ion-action-sheet-ios,.alert-radio-label-text.sc-ion-action-sheet-ios,.select-option-label-text.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-action-sheet-ios,.select-option-end.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-action-sheet-ios:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-action-sheet-ios::part(label),ion-radio.select-option-has-rich-content.sc-ion-action-sheet-ios [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-action-sheet-ios::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-action-sheet-ios [part~="label"],.select-option-content.sc-ion-action-sheet-ios{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-action-sheet-ios>ion-avatar.sc-ion-action-sheet-ios,.select-option-start.sc-ion-action-sheet-ios>ion-img.sc-ion-action-sheet-ios,.select-option-start.sc-ion-action-sheet-ios>ion-thumbnail.sc-ion-action-sheet-ios,.select-option-start.sc-ion-action-sheet-ios>img.sc-ion-action-sheet-ios,.select-option-start.sc-ion-action-sheet-ios>svg.sc-ion-action-sheet-ios,.select-option-end.sc-ion-action-sheet-ios>ion-avatar.sc-ion-action-sheet-ios,.select-option-end.sc-ion-action-sheet-ios>ion-img.sc-ion-action-sheet-ios,.select-option-end.sc-ion-action-sheet-ios>ion-thumbnail.sc-ion-action-sheet-ios,.select-option-end.sc-ion-action-sheet-ios>img.sc-ion-action-sheet-ios,.select-option-end.sc-ion-action-sheet-ios>svg.sc-ion-action-sheet-ios{width:44px;height:44px}.select-option-start.sc-ion-action-sheet-ios>ion-icon.sc-ion-action-sheet-ios,.select-option-end.sc-ion-action-sheet-ios>ion-icon.sc-ion-action-sheet-ios{width:28px;height:28px}.action-sheet-button-label-text.sc-ion-action-sheet-ios{-ms-flex-pack:center;justify-content:center}.select-option-has-rich-content.sc-ion-action-sheet-ios{-webkit-padding-end:16px;padding-inline-end:16px}.sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios:disabled{color:var(--button-color-disabled);opacity:0.4}.action-sheet-button.sc-ion-action-sheet-ios:disabled ion-icon.sc-ion-action-sheet-ios{color:currentColor}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-ios{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-ios{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios:not(.ion-activated){color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios:not(.ion-activated)::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios:not(.ion-activated).action-sheet-selected::after{background:var(--button-background-focused, var(--button-background-selected));opacity:var(--button-background-focused-opacity, var(--button-background-selected-opacity))}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:not(:disabled):hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:not(:disabled):hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color-step-150, var(--ion-background-color, #fff)));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #0054e9);--button-color-disabled:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--color:var(--ion-color-step-400, var(--ion-text-color-step-600, #999999));text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);padding-bottom:var(--ion-safe-area-bottom, 0);-webkit-box-sizing:content-box;box-sizing:content-box}.action-sheet-container.sc-ion-action-sheet-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;-webkit-backdrop-filter:saturate(280%) blur(20px);backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8))), -webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;-webkit-backdrop-filter:saturate(120%);backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, transparent)) bottom/100% 1px no-repeat transparent;background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-size:max(13px, 0.8125rem);font-weight:400;text-align:center}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:max(13px, 0.8125rem);font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{-webkit-padding-start:14px;padding-inline-start:14px;-webkit-padding-end:14px;padding-inline-end:14px;padding-top:14px;padding-bottom:14px;min-height:56px;font-size:max(20px, 1.25rem);contain:content}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:max(28px, 1.75rem);pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #c5000f)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #c5000f)}}`;
|
|
9700
|
+
const actionSheetIosCss = () => `.sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios:disabled{color:var(--button-color-disabled);opacity:0.4}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-ios{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-ios{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-ios:not(:disabled):hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:not(:disabled):hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--backdrop-opacity:var(--ion-backdrop-opacity, 0.4);--button-background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color, #000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-color-step-150, var(--ion-background-color-step-150, var(--ion-background-color, #fff)));--button-background-selected-opacity:1;--button-color:var(--ion-color-primary, #0054e9);--button-color-disabled:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--color:var(--ion-color-step-400, var(--ion-text-color-step-600, #999999));text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);padding-bottom:var(--ion-safe-area-bottom, 0);-webkit-box-sizing:content-box;box-sizing:content-box}.action-sheet-container.sc-ion-action-sheet-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;-webkit-backdrop-filter:saturate(280%) blur(20px);backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios,.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios{background-color:transparent;background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8))), -webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4)), color-stop(50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background-image:linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%), linear-gradient(0deg, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4), rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.4) 50%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 50%);background-repeat:no-repeat;background-position:top, bottom;background-size:100% calc(100% - 1px), 100% 1px;-webkit-backdrop-filter:saturate(120%);backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:-webkit-gradient(linear, left bottom, left top, from(rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)), color-stop(50%, transparent)) bottom/100% 1px no-repeat transparent;background:linear-gradient(0deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08), rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08) 50%, transparent 50%) bottom/100% 1px no-repeat transparent}.action-sheet-title.sc-ion-action-sheet-ios{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:14px;padding-bottom:13px;color:var(--color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-size:max(13px, 0.8125rem);font-weight:400;text-align:center}.action-sheet-title.action-sheet-has-sub-title.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:6px;padding-bottom:0;font-size:max(13px, 0.8125rem);font-weight:400}.action-sheet-button.sc-ion-action-sheet-ios{-webkit-padding-start:14px;padding-inline-start:14px;-webkit-padding-end:14px;padding-inline-end:14px;padding-top:14px;padding-bottom:14px;min-height:56px;font-size:max(20px, 1.25rem);contain:content}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:max(28px, 1.75rem);pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:bold}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios,.action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger, #c5000f)}@media (any-hover: hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger, #c5000f)}}`;
|
|
10234
9701
|
|
|
10235
|
-
const actionSheetMdCss = () => `.
|
|
9702
|
+
const actionSheetMdCss = () => `.sc-ion-action-sheet-md-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:auto;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;outline:none;font-family:var(--ion-font-family, inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-md{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md:disabled{color:var(--button-color-disabled);opacity:0.4}.action-sheet-button-inner.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;pointer-events:none;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));max-height:calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)))}.action-sheet-group.sc-ion-action-sheet-md{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}@media (any-pointer: coarse){.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}}.action-sheet-group-cancel.sc-ion-action-sheet-md{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-md::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.action-sheet-selected.sc-ion-action-sheet-md{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-md::after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-md::after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}@media (any-hover: hover){.action-sheet-button.sc-ion-action-sheet-md:not(:disabled):hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-md:not(:disabled):hover::after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);--button-background:transparent;--button-background-selected:currentColor;--button-background-selected-opacity:0;--button-background-activated:transparent;--button-background-activated-opacity:0;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--button-color-disabled:var(--button-color);--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54)}.action-sheet-wrapper.sc-ion-action-sheet-md{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:var(--ion-safe-area-top, 0);margin-bottom:0}.action-sheet-title.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:20px;padding-bottom:17px;min-height:60px;color:var(--color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54));font-size:1rem;text-align:start}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:0.875rem}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:var(--ion-safe-area-bottom)}.action-sheet-button.sc-ion-action-sheet-md{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;position:relative;min-height:52px;font-size:1rem;text-align:start;contain:content;overflow:hidden}.action-sheet-icon.sc-ion-action-sheet-md{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px;margin-top:0;margin-bottom:0;color:var(--color);font-size:1.5rem}.action-sheet-button-inner.sc-ion-action-sheet-md{-ms-flex-pack:start;justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:bold}`;
|
|
10236
9703
|
|
|
10237
9704
|
/**
|
|
10238
9705
|
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
@@ -10329,7 +9796,7 @@ class ActionSheet {
|
|
|
10329
9796
|
async present() {
|
|
10330
9797
|
const unlock = await this.lockController.lock();
|
|
10331
9798
|
await this.delegateController.attachViewToDom();
|
|
10332
|
-
await present(this, 'actionSheetEnter', iosEnterAnimation$
|
|
9799
|
+
await present(this, 'actionSheetEnter', iosEnterAnimation$6, mdEnterAnimation$5);
|
|
10333
9800
|
unlock();
|
|
10334
9801
|
}
|
|
10335
9802
|
/**
|
|
@@ -10346,7 +9813,7 @@ class ActionSheet {
|
|
|
10346
9813
|
*/
|
|
10347
9814
|
async dismiss(data, role) {
|
|
10348
9815
|
const unlock = await this.lockController.lock();
|
|
10349
|
-
const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$
|
|
9816
|
+
const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$6, mdLeaveAnimation$5);
|
|
10350
9817
|
if (dismissed) {
|
|
10351
9818
|
this.delegateController.removeViewFromDom();
|
|
10352
9819
|
}
|
|
@@ -10515,10 +9982,6 @@ class ActionSheet {
|
|
|
10515
9982
|
this.gesture = undefined;
|
|
10516
9983
|
}
|
|
10517
9984
|
this.triggerController.removeClickListener();
|
|
10518
|
-
// Clean up aria-hidden if removed without dismiss() being called
|
|
10519
|
-
if (this.presented) {
|
|
10520
|
-
cleanupRootFocusTrapAccessibility();
|
|
10521
|
-
}
|
|
10522
9985
|
}
|
|
10523
9986
|
componentWillLoad() {
|
|
10524
9987
|
var _a;
|
|
@@ -10607,26 +10070,12 @@ class ActionSheet {
|
|
|
10607
10070
|
if (isRadio) {
|
|
10608
10071
|
htmlAttrs['aria-checked'] = isActiveRadio ? 'true' : 'false';
|
|
10609
10072
|
}
|
|
10610
|
-
|
|
10611
|
-
* Cast to `SelectActionSheetButton` to access rich content
|
|
10612
|
-
* fields (`startContent`, `endContent`, `description`)
|
|
10613
|
-
* that are passed through from `ion-select` but not
|
|
10614
|
-
* part of the public `ActionSheetButton` interface.
|
|
10615
|
-
*/
|
|
10616
|
-
const richButton = b;
|
|
10617
|
-
const optionLabelOptions = {
|
|
10618
|
-
id: buttonId,
|
|
10619
|
-
label: richButton.text,
|
|
10620
|
-
startContent: richButton.startContent,
|
|
10621
|
-
endContent: richButton.endContent,
|
|
10622
|
-
description: richButton.description,
|
|
10623
|
-
};
|
|
10624
|
-
return (hAsync("button", Object.assign({}, htmlAttrs, { role: isRadio ? 'radio' : undefined, type: "button", id: buttonId, class: Object.assign(Object.assign({}, buttonClass$2(b)), (isRadio && { 'action-sheet-selected': isActiveRadio })), onClick: () => {
|
|
10073
|
+
return (hAsync("button", Object.assign({}, htmlAttrs, { role: isRadio ? 'radio' : undefined, type: "button", id: buttonId, class: Object.assign(Object.assign({}, buttonClass$3(b)), (isRadio && { 'action-sheet-selected': isActiveRadio })), onClick: () => {
|
|
10625
10074
|
if (isRadio) {
|
|
10626
10075
|
this.selectRadioButton(b);
|
|
10627
10076
|
}
|
|
10628
10077
|
this.buttonClick(b);
|
|
10629
|
-
}, disabled: b.disabled, tabIndex: tabIndex }), hAsync("span", { class: "action-sheet-button-inner" }, b.icon && hAsync("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }),
|
|
10078
|
+
}, disabled: b.disabled, tabIndex: tabIndex }), hAsync("span", { class: "action-sheet-button-inner" }, b.icon && hAsync("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && hAsync("ion-ripple-effect", null)));
|
|
10630
10079
|
});
|
|
10631
10080
|
}
|
|
10632
10081
|
render() {
|
|
@@ -10636,12 +10085,12 @@ class ActionSheet {
|
|
|
10636
10085
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
10637
10086
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
10638
10087
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
10639
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
10088
|
+
return (hAsync(Host, Object.assign({ key: '48b63b870f2816b4cad3c606f3d9956854cee79a', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
10640
10089
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
10641
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '
|
|
10090
|
+
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '41dd5781f139d26b3feea33ab387451aeafacd51', tappable: this.backdropDismiss }), hAsync("div", { key: 'f797c2657782e4e83adf90d2d796108e857a1fc0', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: '8e74209321fc5e8712e3e293c91a6fa036ea45ab', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: 'c811860be2eed0b6c73fc2cc5a59cb94db2e8912', class: "action-sheet-container" }, hAsync("div", { key: 'd36ee14b70d73eb5cd69e0c57bc5cc31daf86ab3', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (hAsync("div", { key: '922695de191edc86451eed2552acc4f54993ea52', id: headerID, class: {
|
|
10642
10091
|
'action-sheet-title': true,
|
|
10643
10092
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
10644
|
-
} }, header, this.subHeader && hAsync("div", { key: '
|
|
10093
|
+
} }, header, this.subHeader && hAsync("div", { key: 'a119d4a93668e829f7106f11cbbdd437310f3e80', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (hAsync("div", { key: '1d27f36d09bedd2e4c61fea9dd9d05f8f9271aef', class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({ key: 'ed13658176c54cc45808a54a0331c297430d9bc6' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass$3(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { key: '5208e3e3535b775a443cef6fb1decd790db69b0c', class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { key: 'b7ba489e1ee50524a5b4af670eef787844a16286', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", { key: 'b3f88898114855853259f0001def26b4bd6e4a98' })))))), hAsync("div", { key: '0dfd0fcdc633bf565990eaa06679608e749cf8f9', tabindex: "0", "aria-hidden": "true" })));
|
|
10645
10094
|
}
|
|
10646
10095
|
get el() { return getElement(this); }
|
|
10647
10096
|
static get watchers() { return {
|
|
@@ -10690,59 +10139,178 @@ class ActionSheet {
|
|
|
10690
10139
|
"$attrsToReflect$": []
|
|
10691
10140
|
}; }
|
|
10692
10141
|
}
|
|
10693
|
-
const buttonClass$
|
|
10142
|
+
const buttonClass$3 = (button) => {
|
|
10694
10143
|
return Object.assign({ 'action-sheet-button': true, 'ion-activatable': !button.disabled, 'ion-focusable': !button.disabled, [`action-sheet-${button.role}`]: button.role !== undefined }, getClassMap(button.cssClass));
|
|
10695
10144
|
};
|
|
10696
10145
|
|
|
10697
10146
|
const ENABLE_HTML_CONTENT_DEFAULT = false;
|
|
10698
10147
|
|
|
10699
|
-
// TODO(FW-6886, FW-6892, FW-6891): Remove this file in favor of the Modular Ionic component config. Each overlay will be able to select its own defaults for label placement and justify based on the interface and mode, so this utility will no longer be necessary.
|
|
10700
10148
|
/**
|
|
10701
|
-
*
|
|
10702
|
-
*
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10149
|
+
* Does a simple sanitization of all elements
|
|
10150
|
+
* in an untrusted string
|
|
10151
|
+
*/
|
|
10152
|
+
const sanitizeDOMString = (untrustedString) => {
|
|
10153
|
+
try {
|
|
10154
|
+
if (untrustedString instanceof IonicSafeString) {
|
|
10155
|
+
return untrustedString.value;
|
|
10156
|
+
}
|
|
10157
|
+
if (!isSanitizerEnabled() || typeof untrustedString !== 'string' || untrustedString === '') {
|
|
10158
|
+
return untrustedString;
|
|
10159
|
+
}
|
|
10160
|
+
/**
|
|
10161
|
+
* onload is fired when appending to a document
|
|
10162
|
+
* fragment in Chrome. If a string
|
|
10163
|
+
* contains onload then we should not
|
|
10164
|
+
* attempt to add this to the fragment.
|
|
10165
|
+
*/
|
|
10166
|
+
if (untrustedString.includes('onload=')) {
|
|
10167
|
+
return '';
|
|
10168
|
+
}
|
|
10169
|
+
/**
|
|
10170
|
+
* Create a document fragment
|
|
10171
|
+
* separate from the main DOM,
|
|
10172
|
+
* create a div to do our work in
|
|
10173
|
+
*/
|
|
10174
|
+
const documentFragment = document.createDocumentFragment();
|
|
10175
|
+
const workingDiv = document.createElement('div');
|
|
10176
|
+
documentFragment.appendChild(workingDiv);
|
|
10177
|
+
workingDiv.innerHTML = untrustedString;
|
|
10178
|
+
/**
|
|
10179
|
+
* Remove any elements
|
|
10180
|
+
* that are blocked
|
|
10181
|
+
*/
|
|
10182
|
+
blockedTags.forEach((blockedTag) => {
|
|
10183
|
+
const getElementsToRemove = documentFragment.querySelectorAll(blockedTag);
|
|
10184
|
+
for (let elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
|
|
10185
|
+
const element = getElementsToRemove[elementIndex];
|
|
10186
|
+
if (element.parentNode) {
|
|
10187
|
+
element.parentNode.removeChild(element);
|
|
10188
|
+
}
|
|
10189
|
+
else {
|
|
10190
|
+
documentFragment.removeChild(element);
|
|
10191
|
+
}
|
|
10192
|
+
/**
|
|
10193
|
+
* We still need to sanitize
|
|
10194
|
+
* the children of this element
|
|
10195
|
+
* as they are left behind
|
|
10196
|
+
*/
|
|
10197
|
+
const childElements = getElementChildren(element);
|
|
10198
|
+
/* eslint-disable-next-line */
|
|
10199
|
+
for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
|
|
10200
|
+
sanitizeElement(childElements[childIndex]);
|
|
10201
|
+
}
|
|
10202
|
+
}
|
|
10203
|
+
});
|
|
10204
|
+
/**
|
|
10205
|
+
* Go through remaining elements and remove
|
|
10206
|
+
* non-allowed attribs
|
|
10207
|
+
*/
|
|
10208
|
+
// IE does not support .children on document fragments, only .childNodes
|
|
10209
|
+
const dfChildren = getElementChildren(documentFragment);
|
|
10210
|
+
/* eslint-disable-next-line */
|
|
10211
|
+
for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
|
|
10212
|
+
sanitizeElement(dfChildren[childIndex]);
|
|
10213
|
+
}
|
|
10214
|
+
// Append document fragment to div
|
|
10215
|
+
const fragmentDiv = document.createElement('div');
|
|
10216
|
+
fragmentDiv.appendChild(documentFragment);
|
|
10217
|
+
// First child is always the div we did our work in
|
|
10218
|
+
const getInnerDiv = fragmentDiv.querySelector('div');
|
|
10219
|
+
return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
|
|
10220
|
+
}
|
|
10221
|
+
catch (err) {
|
|
10222
|
+
printIonError('sanitizeDOMString', err);
|
|
10223
|
+
return '';
|
|
10224
|
+
}
|
|
10225
|
+
};
|
|
10226
|
+
/**
|
|
10227
|
+
* Clean up current element based on allowed attributes
|
|
10228
|
+
* and then recursively dig down into any child elements to
|
|
10229
|
+
* clean those up as well
|
|
10714
10230
|
*/
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10231
|
+
// TODO(FW-2832): type (using Element triggers other type errors as well)
|
|
10232
|
+
const sanitizeElement = (element) => {
|
|
10233
|
+
// IE uses childNodes, so ignore nodes that are not elements
|
|
10234
|
+
if (element.nodeType && element.nodeType !== 1) {
|
|
10235
|
+
return;
|
|
10236
|
+
}
|
|
10237
|
+
/**
|
|
10238
|
+
* If attributes is not a NamedNodeMap
|
|
10239
|
+
* then we should remove the element entirely.
|
|
10240
|
+
* This helps avoid DOM Clobbering attacks where
|
|
10241
|
+
* attributes is overridden.
|
|
10242
|
+
*/
|
|
10243
|
+
if (typeof NamedNodeMap !== 'undefined' && !(element.attributes instanceof NamedNodeMap)) {
|
|
10244
|
+
element.remove();
|
|
10245
|
+
return;
|
|
10246
|
+
}
|
|
10247
|
+
for (let i = element.attributes.length - 1; i >= 0; i--) {
|
|
10248
|
+
const attribute = element.attributes.item(i);
|
|
10249
|
+
const attributeName = attribute.name;
|
|
10250
|
+
// remove non-allowed attribs
|
|
10251
|
+
if (!allowedAttributes.includes(attributeName.toLowerCase())) {
|
|
10252
|
+
element.removeAttribute(attributeName);
|
|
10253
|
+
continue;
|
|
10254
|
+
}
|
|
10255
|
+
// clean up any allowed attribs
|
|
10256
|
+
// that attempt to do any JS funny-business
|
|
10257
|
+
const attributeValue = attribute.value;
|
|
10258
|
+
/**
|
|
10259
|
+
* We also need to check the property value
|
|
10260
|
+
* as javascript: can allow special characters
|
|
10261
|
+
* such as 	 and still be valid (i.e. java	script)
|
|
10262
|
+
*/
|
|
10263
|
+
const propertyValue = element[attributeName];
|
|
10264
|
+
/* eslint-disable */
|
|
10265
|
+
if ((attributeValue != null && attributeValue.toLowerCase().includes('javascript:')) ||
|
|
10266
|
+
(propertyValue != null && propertyValue.toLowerCase().includes('javascript:'))) {
|
|
10267
|
+
element.removeAttribute(attributeName);
|
|
10268
|
+
}
|
|
10269
|
+
/* eslint-enable */
|
|
10270
|
+
}
|
|
10271
|
+
/**
|
|
10272
|
+
* Sanitize any nested children
|
|
10273
|
+
*/
|
|
10274
|
+
const childElements = getElementChildren(element);
|
|
10275
|
+
/* eslint-disable-next-line */
|
|
10276
|
+
for (let i = 0; i < childElements.length; i++) {
|
|
10277
|
+
sanitizeElement(childElements[i]);
|
|
10718
10278
|
}
|
|
10719
|
-
return 'end';
|
|
10720
10279
|
};
|
|
10721
10280
|
/**
|
|
10722
|
-
*
|
|
10723
|
-
*
|
|
10724
|
-
* - `ios`: `"space-between"` for radio in `alert` and `popover`. The
|
|
10725
|
-
* `modal` interface falls back to `"start"`. Checkbox is always `"start"`
|
|
10726
|
-
* on iOS.
|
|
10727
|
-
* - everything else (e.g. `md`): `"start"`.
|
|
10728
|
-
*
|
|
10729
|
-
* `interfaceType` is optional; only `"modal"` changes the result, so
|
|
10730
|
-
* callers that aren't a modal can omit it.
|
|
10731
|
-
*
|
|
10732
|
-
* Used by `select-popover` and `select-modal` as the fallback when an
|
|
10733
|
-
* option doesn't explicitly set `justify`.
|
|
10281
|
+
* IE doesn't always support .children
|
|
10282
|
+
* so we revert to .childNodes instead
|
|
10734
10283
|
*/
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10284
|
+
// TODO(FW-2832): type
|
|
10285
|
+
const getElementChildren = (el) => {
|
|
10286
|
+
return el.children != null ? el.children : el.childNodes;
|
|
10287
|
+
};
|
|
10288
|
+
const isSanitizerEnabled = () => {
|
|
10289
|
+
var _a;
|
|
10290
|
+
const win = window;
|
|
10291
|
+
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
|
|
10292
|
+
if (config) {
|
|
10293
|
+
if (config.get) {
|
|
10294
|
+
return config.get('sanitizerEnabled', true);
|
|
10295
|
+
}
|
|
10296
|
+
else {
|
|
10297
|
+
return config.sanitizerEnabled === true || config.sanitizerEnabled === undefined;
|
|
10298
|
+
}
|
|
10738
10299
|
}
|
|
10739
|
-
return
|
|
10300
|
+
return true;
|
|
10740
10301
|
};
|
|
10302
|
+
const allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
|
|
10303
|
+
const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];
|
|
10304
|
+
class IonicSafeString {
|
|
10305
|
+
constructor(value) {
|
|
10306
|
+
this.value = value;
|
|
10307
|
+
}
|
|
10308
|
+
}
|
|
10741
10309
|
|
|
10742
10310
|
/**
|
|
10743
10311
|
* iOS Alert Enter Animation
|
|
10744
10312
|
*/
|
|
10745
|
-
const iosEnterAnimation$
|
|
10313
|
+
const iosEnterAnimation$5 = (baseEl) => {
|
|
10746
10314
|
const baseAnimation = createAnimation();
|
|
10747
10315
|
const backdropAnimation = createAnimation();
|
|
10748
10316
|
const wrapperAnimation = createAnimation();
|
|
@@ -10767,7 +10335,7 @@ const iosEnterAnimation$4 = (baseEl) => {
|
|
|
10767
10335
|
/**
|
|
10768
10336
|
* iOS Alert Leave Animation
|
|
10769
10337
|
*/
|
|
10770
|
-
const iosLeaveAnimation$
|
|
10338
|
+
const iosLeaveAnimation$5 = (baseEl) => {
|
|
10771
10339
|
const baseAnimation = createAnimation();
|
|
10772
10340
|
const backdropAnimation = createAnimation();
|
|
10773
10341
|
const wrapperAnimation = createAnimation();
|
|
@@ -10824,9 +10392,9 @@ const mdLeaveAnimation$4 = (baseEl) => {
|
|
|
10824
10392
|
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
10825
10393
|
};
|
|
10826
10394
|
|
|
10827
|
-
const alertIosCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-alert-ios,.alert-radio-label-has-rich-content.sc-ion-alert-ios,.alert-checkbox-label-has-rich-content.sc-ion-alert-ios,.select-option-label-has-rich-content.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-alert-ios,.alert-radio-label-has-rich-content.sc-ion-alert-ios,.alert-checkbox-label-has-rich-content.sc-ion-alert-ios,.select-option-content.sc-ion-alert-ios{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-alert-ios,.alert-checkbox-label-text.sc-ion-alert-ios,.alert-radio-label-text.sc-ion-alert-ios,.select-option-label-text.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-alert-ios,.select-option-end.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-alert-ios:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-alert-ios::part(label),ion-radio.select-option-has-rich-content.sc-ion-alert-ios [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-alert-ios::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-alert-ios [part~="label"],.select-option-content.sc-ion-alert-ios{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-alert-ios>ion-avatar.sc-ion-alert-ios,.select-option-start.sc-ion-alert-ios>ion-img.sc-ion-alert-ios,.select-option-start.sc-ion-alert-ios>ion-thumbnail.sc-ion-alert-ios,.select-option-start.sc-ion-alert-ios>img.sc-ion-alert-ios,.select-option-start.sc-ion-alert-ios>svg.sc-ion-alert-ios,.select-option-end.sc-ion-alert-ios>ion-avatar.sc-ion-alert-ios,.select-option-end.sc-ion-alert-ios>ion-img.sc-ion-alert-ios,.select-option-end.sc-ion-alert-ios>ion-thumbnail.sc-ion-alert-ios,.select-option-end.sc-ion-alert-ios>img.sc-ion-alert-ios,.select-option-end.sc-ion-alert-ios>svg.sc-ion-alert-ios{width:44px;height:44px}.select-option-start.sc-ion-alert-ios>ion-icon.sc-ion-alert-ios,.select-option-end.sc-ion-alert-ios>ion-icon.sc-ion-alert-ios{width:28px;height:28px}.action-sheet-button-label-text.sc-ion-alert-ios{-ms-flex-pack:center;justify-content:center}.select-option-has-rich-content.sc-ion-alert-ios{-webkit-padding-end:16px;padding-inline-end:16px}.sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-ios,.alert-radio-label.sc-ion-alert-ios{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.radio-label-placement-start.sc-ion-alert-ios,.checkbox-label-placement-start.sc-ion-alert-ios{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.radio-label-placement-end.sc-ion-alert-ios,.checkbox-label-placement-end.sc-ion-alert-ios{-ms-flex-direction:row;flex-direction:row}.radio-justify-start.sc-ion-alert-ios,.checkbox-justify-start.sc-ion-alert-ios{-ms-flex-pack:start;justify-content:start}.radio-justify-end.sc-ion-alert-ios,.checkbox-justify-end.sc-ion-alert-ios{-ms-flex-pack:end;justify-content:end}.radio-justify-space-between.sc-ion-alert-ios,.checkbox-justify-space-between.sc-ion-alert-ios{-ms-flex-pack:justify;justify-content:space-between}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--max-width:clamp(270px, 16.875rem, 324px);--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:max(14px, 0.875rem)}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:7px;text-align:center}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:max(17px, 1.0625rem);font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));font-size:max(14px, 0.875rem)}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:max(13px, 0.8125rem);text-align:center}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:7px;margin-top:10px;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:7px;padding-bottom:7px;border:0.55px solid var(--ion-color-step-250, var(--ion-background-color-step-250, #bfbfbf));background-color:var(--ion-background-color, #fff);-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:1rem}.alert-input.sc-ion-alert-ios::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-input.sc-ion-alert-ios::-webkit-date-and-time-value{height:18px}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{-ms-scroll-chaining:none;overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{min-height:44px}.alert-radio-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;color:var(--ion-text-color, #000)}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #0054e9)}.alert-radio-icon.sc-ion-alert-ios{position:relative;-ms-flex-negative:0;flex-shrink:0;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{top:-7px;position:absolute;width:6px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .radio-label-placement-end.sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{inset-inline-end:7px}[aria-checked=true].sc-ion-alert-ios .radio-label-placement-start.sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{inset-inline-start:7px}.alert-checkbox-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;color:var(--ion-text-color, #000)}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;margin-top:10px;margin-bottom:10px;position:relative;-ms-flex-negative:0;flex-shrink:0;width:min(1.375rem, 55.836px);height:min(1.375rem, 55.836px);border-width:0.125rem;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}.checkbox-label-placement-end.sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px}.checkbox-label-placement-start.sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{-webkit-margin-start:6px;margin-inline-start:6px;-webkit-margin-end:16px;margin-inline-end:16px}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{top:calc(min(1.375rem, 55.836px) / 8);position:absolute;width:calc(min(1.375rem, 55.836px) / 6 + 1px);height:calc(min(1.375rem, 55.836px) * 0.5);-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:0.125rem;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}[aria-checked=true].sc-ion-alert-ios .checkbox-label-placement-end.sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{inset-inline-start:calc(min(1.375rem, 55.836px) / 3)}[aria-checked=true].sc-ion-alert-ios .checkbox-label-placement-start.sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{inset-inline-end:calc(min(1.375rem, 55.836px) / 3)}.alert-button-group.sc-ion-alert-ios{-webkit-margin-end:-0.55px;margin-inline-end:-0.55px;-ms-flex-wrap:wrap;flex-wrap:wrap}.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios{border-right:none}[dir=rtl].sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}[dir=rtl].sc-ion-alert-ios .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}@supports selector(:dir(rtl)){.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:none}}.alert-button.sc-ion-alert-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;-ms-flex:1 1 auto;flex:1 1 auto;min-width:50%;height:max(44px, 2.75rem);border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #0054e9);font-size:max(17px, 1.0625rem);overflow:hidden}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child{border-right:0}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:first-child:dir(rtl){border-right:0}}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #c5000f)}`;
|
|
10395
|
+
const alertIosCss = () => `.sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-ios,.alert-radio-label.sc-ion-alert-ios{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, var(--ion-background-color-step-100, #f9f9f9)));--max-width:clamp(270px, 16.875rem, 324px);--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:max(14px, 0.875rem)}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.alert-translucent.sc-ion-alert-ios-h .alert-wrapper.sc-ion-alert-ios{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.alert-head.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:7px;text-align:center}.alert-title.sc-ion-alert-ios{margin-top:8px;color:var(--ion-text-color, #000);font-size:max(17px, 1.0625rem);font-weight:600}.alert-sub-title.sc-ion-alert-ios{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));font-size:max(14px, 0.875rem)}.alert-message.sc-ion-alert-ios,.alert-input-group.sc-ion-alert-ios{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:21px;color:var(--ion-text-color, #000);font-size:max(13px, 0.8125rem);text-align:center}.alert-message.sc-ion-alert-ios{max-height:240px}.alert-message.sc-ion-alert-ios:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:12px}.alert-input.sc-ion-alert-ios{border-radius:7px;margin-top:10px;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:7px;padding-bottom:7px;border:0.55px solid var(--ion-color-step-250, var(--ion-background-color-step-250, #bfbfbf));background-color:var(--ion-background-color, #fff);-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:1rem}.alert-input.sc-ion-alert-ios::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-ios::-ms-clear{display:none}.alert-input.sc-ion-alert-ios::-webkit-date-and-time-value{height:18px}.alert-radio-group.sc-ion-alert-ios,.alert-checkbox-group.sc-ion-alert-ios{-ms-scroll-chaining:none;overscroll-behavior:contain;max-height:240px;border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);overflow-y:auto;-webkit-overflow-scrolling:touch}.alert-tappable.sc-ion-alert-ios{min-height:44px}.alert-radio-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;-ms-flex-order:0;order:0;color:var(--ion-text-color, #000)}[aria-checked=true].sc-ion-alert-ios .alert-radio-label.sc-ion-alert-ios{color:var(--ion-color-primary, #0054e9)}.alert-radio-icon.sc-ion-alert-ios{position:relative;-ms-flex-order:1;order:1;min-width:30px}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{top:-7px;position:absolute;width:6px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-radio-inner.sc-ion-alert-ios{inset-inline-start:7px}.alert-checkbox-label.sc-ion-alert-ios{-webkit-padding-start:13px;padding-inline-start:13px;-webkit-padding-end:13px;padding-inline-end:13px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-text-color, #000)}.alert-checkbox-icon.sc-ion-alert-ios{border-radius:50%;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:6px;margin-inline-end:6px;margin-top:10px;margin-bottom:10px;position:relative;width:min(1.375rem, 55.836px);height:min(1.375rem, 55.836px);border-width:0.125rem;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));background-color:var(--ion-item-background, var(--ion-background-color, #fff));contain:strict}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-icon.sc-ion-alert-ios{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{top:calc(min(1.375rem, 55.836px) / 8);position:absolute;width:calc(min(1.375rem, 55.836px) / 6 + 1px);height:calc(min(1.375rem, 55.836px) * 0.5);-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:0.125rem;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-background-color, #fff)}[aria-checked=true].sc-ion-alert-ios .alert-checkbox-inner.sc-ion-alert-ios{inset-inline-start:calc(min(1.375rem, 55.836px) / 3)}.alert-button-group.sc-ion-alert-ios{-webkit-margin-end:-0.55px;margin-inline-end:-0.55px;-ms-flex-wrap:wrap;flex-wrap:wrap}.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios{border-right:none}[dir=rtl].sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}[dir=rtl].sc-ion-alert-ios .alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:none}@supports selector(:dir(rtl)){.alert-button-group-vertical.sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:none}}.alert-button.sc-ion-alert-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:0;-ms-flex:1 1 auto;flex:1 1 auto;min-width:50%;height:max(44px, 2.75rem);border-top:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2);background-color:transparent;color:var(--ion-color-primary, #0054e9);font-size:max(17px, 1.0625rem);overflow:hidden}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:first-child{border-right:0}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:first-child{border-right:0}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:first-child:dir(rtl){border-right:0}}.alert-button.sc-ion-alert-ios:last-child{border-right:0;font-weight:bold}[dir=rtl].sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child,[dir=rtl] .sc-ion-alert-ios-h .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}[dir=rtl].sc-ion-alert-ios .alert-button.sc-ion-alert-ios:last-child{border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}@supports selector(:dir(rtl)){.alert-button.sc-ion-alert-ios:last-child:dir(rtl){border-right:0.55px solid rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)}}.alert-button.ion-activated.sc-ion-alert-ios{background-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.1)}.alert-button-role-destructive.sc-ion-alert-ios,.alert-button-role-destructive.ion-activated.sc-ion-alert-ios,.alert-button-role-destructive.ion-focused.sc-ion-alert-ios{color:var(--ion-color-danger, #c5000f)}`;
|
|
10828
10396
|
|
|
10829
|
-
const alertMdCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-alert-md,.alert-radio-label-has-rich-content.sc-ion-alert-md,.alert-checkbox-label-has-rich-content.sc-ion-alert-md,.select-option-label-has-rich-content.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-alert-md,.alert-radio-label-has-rich-content.sc-ion-alert-md,.alert-checkbox-label-has-rich-content.sc-ion-alert-md,.select-option-content.sc-ion-alert-md{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-alert-md,.alert-checkbox-label-text.sc-ion-alert-md,.alert-radio-label-text.sc-ion-alert-md,.select-option-label-text.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-alert-md,.select-option-end.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}.select-option-label.sc-ion-alert-md:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-alert-md::part(label),ion-radio.select-option-has-rich-content.sc-ion-alert-md [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-alert-md::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-alert-md [part~="label"],.select-option-content.sc-ion-alert-md{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-alert-md>ion-avatar.sc-ion-alert-md,.select-option-end.sc-ion-alert-md>ion-avatar.sc-ion-alert-md{width:40px;height:40px}.select-option-start.sc-ion-alert-md>ion-icon.sc-ion-alert-md,.select-option-end.sc-ion-alert-md>ion-icon.sc-ion-alert-md{width:24px;height:24px}.select-option-start.sc-ion-alert-md>ion-img.sc-ion-alert-md,.select-option-start.sc-ion-alert-md>img.sc-ion-alert-md,.select-option-start.sc-ion-alert-md>svg.sc-ion-alert-md,.select-option-start.sc-ion-alert-md>ion-thumbnail.sc-ion-alert-md,.select-option-end.sc-ion-alert-md>ion-img.sc-ion-alert-md,.select-option-end.sc-ion-alert-md>img.sc-ion-alert-md,.select-option-end.sc-ion-alert-md>svg.sc-ion-alert-md,.select-option-end.sc-ion-alert-md>ion-thumbnail.sc-ion-alert-md{width:56px;height:56px}.select-option-start.sc-ion-alert-md>video.sc-ion-alert-md,.select-option-end.sc-ion-alert-md>video.sc-ion-alert-md{width:114px;height:56px}.sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-md,.alert-radio-label.sc-ion-alert-md{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.radio-label-placement-start.sc-ion-alert-md,.checkbox-label-placement-start.sc-ion-alert-md{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.radio-label-placement-end.sc-ion-alert-md,.checkbox-label-placement-end.sc-ion-alert-md{-ms-flex-direction:row;flex-direction:row}.radio-justify-start.sc-ion-alert-md,.checkbox-justify-start.sc-ion-alert-md{-ms-flex-pack:start;justify-content:start}.radio-justify-end.sc-ion-alert-md,.checkbox-justify-end.sc-ion-alert-md{-ms-flex-pack:end;justify-content:end}.radio-justify-space-between.sc-ion-alert-md,.checkbox-justify-space-between.sc-ion-alert-md{-ms-flex-pack:justify;justify-content:space-between}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:0.875rem}.alert-wrapper.sc-ion-alert-md{border-radius:4px;-webkit-box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px;padding-top:20px;padding-bottom:15px;text-align:start}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1.25rem;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1rem}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.alert-message.sc-ion-alert-md{font-size:1rem}@media screen and (max-width: 767px){.alert-message.sc-ion-alert-md{max-height:266px}}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #0054e9)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;border-top:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));overflow:auto}@media screen and (max-width: 767px){.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{max-height:266px}}.alert-tappable.sc-ion-alert-md{position:relative;min-height:48px}.alert-radio-label.sc-ion-alert-md{padding-top:13px;padding-bottom:13px;max-width:calc(100% - 20px);color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.radio-label-placement-end.sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{-webkit-padding-start:56px;padding-inline-start:56px;-webkit-padding-end:24px;padding-inline-end:24px}.radio-label-placement-start.sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:56px;padding-inline-end:56px}.alert-radio-icon.sc-ion-alert-md{top:0;border-radius:50%;display:block;position:relative;-ms-flex-negative:0;flex-shrink:0;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373))}.radio-label-placement-end.sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{inset-inline-start:24px}.radio-label-placement-start.sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{inset-inline-end:24px}.alert-radio-inner.sc-ion-alert-md{top:3px;border-radius:50%;position:absolute;width:10px;height:10px;-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #0054e9)}.alert-radio-inner.sc-ion-alert-md{inset-inline-start:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626))}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{padding-top:13px;padding-bottom:13px;max-width:calc(100% - 16px);color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.checkbox-label-placement-end.sc-ion-alert-md .alert-checkbox-label.sc-ion-alert-md{-webkit-padding-start:56px;padding-inline-start:56px;-webkit-padding-end:24px;padding-inline-end:24px}.checkbox-label-placement-start.sc-ion-alert-md .alert-checkbox-label.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:56px;padding-inline-end:56px}.alert-checkbox-icon.sc-ion-alert-md{top:0;border-radius:2px;position:relative;-ms-flex-negative:0;flex-shrink:0;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373));contain:strict}.checkbox-label-placement-end.sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{inset-inline-start:24px}.checkbox-label-placement-start.sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{inset-inline-end:24px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{top:0;position:absolute;width:6px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{inset-inline-start:3px}.alert-button-group.sc-ion-alert-md{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.alert-button.sc-ion-alert-md{border-radius:2px;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:0;margin-bottom:0;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #0054e9);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}.alert-button-group.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{-ms-flex-pack:end;justify-content:flex-end}@media screen and (min-width: 768px){.sc-ion-alert-md-h{--max-width:min(100vw - 96px, 560px);--max-height:min(100vh - 96px, 560px)}}`;
|
|
10397
|
+
const alertMdCss = () => `.sc-ion-alert-md-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-alert-md-h{display:none}.alert-top.sc-ion-alert-md-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-label.sc-ion-alert-md,.alert-radio-label.sc-ion-alert-md{overflow-wrap:anywhere}@media (any-pointer: coarse){.alert-checkbox-group.sc-ion-alert-md::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-md::-webkit-scrollbar,.alert-message.sc-ion-alert-md::-webkit-scrollbar{display:none}}.alert-input.sc-ion-alert-md{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-md{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:0.875rem;line-height:1.25rem;z-index:0}.alert-button.ion-focused.sc-ion-alert-md,.alert-tappable.ion-focused.sc-ion-alert-md{background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.alert-button-inner.sc-ion-alert-md{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;min-height:inherit}.alert-input-disabled.sc-ion-alert-md,.alert-checkbox-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md,.alert-radio-button-disabled.sc-ion-alert-md .alert-button-inner.sc-ion-alert-md{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:content}.alert-button.sc-ion-alert-md,.alert-checkbox.sc-ion-alert-md,.alert-input.sc-ion-alert-md,.alert-radio.sc-ion-alert-md{outline:none}.alert-radio-icon.sc-ion-alert-md,.alert-checkbox-icon.sc-ion-alert-md,.alert-checkbox-inner.sc-ion-alert-md{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-md{min-height:37px;resize:none}.sc-ion-alert-md-h{--background:var(--ion-overlay-background-color, var(--ion-background-color, #fff));--max-width:280px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);font-size:0.875rem}.alert-wrapper.sc-ion-alert-md{border-radius:4px;-webkit-box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);box-shadow:0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)}.alert-head.sc-ion-alert-md{-webkit-padding-start:23px;padding-inline-start:23px;-webkit-padding-end:23px;padding-inline-end:23px;padding-top:20px;padding-bottom:15px;text-align:start}.alert-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1.25rem;font-weight:500}.alert-sub-title.sc-ion-alert-md{color:var(--ion-text-color, #000);font-size:1rem}.alert-message.sc-ion-alert-md,.alert-input-group.sc-ion-alert-md{-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px;padding-top:20px;padding-bottom:20px;color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373))}.alert-message.sc-ion-alert-md{font-size:1rem}@media screen and (max-width: 767px){.alert-message.sc-ion-alert-md{max-height:266px}}.alert-message.sc-ion-alert-md:empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-head.sc-ion-alert-md+.alert-message.sc-ion-alert-md{padding-top:0}.alert-input.sc-ion-alert-md{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));color:var(--ion-text-color, #000)}.alert-input.sc-ion-alert-md::-webkit-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-moz-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md:-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-input-placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::placeholder{color:var(--ion-placeholder-color, var(--ion-color-step-400, var(--ion-text-color-step-600, #999999)));font-family:inherit;font-weight:inherit}.alert-input.sc-ion-alert-md::-ms-clear{display:none}.alert-input.sc-ion-alert-md:focus{margin-bottom:4px;border-bottom:2px solid var(--ion-color-primary, #0054e9)}.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{position:relative;border-top:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));border-bottom:1px solid var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));overflow:auto}@media screen and (max-width: 767px){.alert-radio-group.sc-ion-alert-md,.alert-checkbox-group.sc-ion-alert-md{max-height:266px}}.alert-tappable.sc-ion-alert-md{position:relative;min-height:48px}.alert-radio-label.sc-ion-alert-md{-webkit-padding-start:52px;padding-inline-start:52px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-radio-icon.sc-ion-alert-md{top:0;border-radius:50%;display:block;position:relative;width:20px;height:20px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373))}.alert-radio-icon.sc-ion-alert-md{inset-inline-start:26px}.alert-radio-inner.sc-ion-alert-md{top:3px;border-radius:50%;position:absolute;width:10px;height:10px;-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--ion-color-primary, #0054e9)}.alert-radio-inner.sc-ion-alert-md{inset-inline-start:3px}[aria-checked=true].sc-ion-alert-md .alert-radio-label.sc-ion-alert-md{color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626))}[aria-checked=true].sc-ion-alert-md .alert-radio-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-radio-inner.sc-ion-alert-md{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}.alert-checkbox-label.sc-ion-alert-md{-webkit-padding-start:53px;padding-inline-start:53px;-webkit-padding-end:26px;padding-inline-end:26px;padding-top:13px;padding-bottom:13px;-ms-flex:1;flex:1;width:calc(100% - 53px);color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));font-size:1rem}.alert-checkbox-icon.sc-ion-alert-md{top:0;border-radius:2px;position:relative;width:16px;height:16px;border-width:2px;border-style:solid;border-color:var(--ion-color-step-550, var(--ion-background-color-step-550, #737373));contain:strict}.alert-checkbox-icon.sc-ion-alert-md{inset-inline-start:26px}[aria-checked=true].sc-ion-alert-md .alert-checkbox-icon.sc-ion-alert-md{border-color:var(--ion-color-primary, #0054e9);background-color:var(--ion-color-primary, #0054e9)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{top:0;position:absolute;width:6px;height:10px;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--ion-color-primary-contrast, #fff)}[aria-checked=true].sc-ion-alert-md .alert-checkbox-inner.sc-ion-alert-md{inset-inline-start:3px}.alert-button-group.sc-ion-alert-md{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;-ms-flex-pack:end;justify-content:flex-end}.alert-button.sc-ion-alert-md{border-radius:2px;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:0;margin-bottom:0;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;color:var(--ion-color-primary, #0054e9);font-weight:500;text-align:end;text-transform:uppercase;overflow:hidden}.alert-button-inner.sc-ion-alert-md{-ms-flex-pack:end;justify-content:flex-end}@media screen and (min-width: 768px){.sc-ion-alert-md-h{--max-width:min(100vw - 96px, 560px);--max-height:min(100vh - 96px, 560px)}}`;
|
|
10830
10398
|
|
|
10831
10399
|
// TODO(FW-2832): types
|
|
10832
10400
|
/**
|
|
@@ -11000,7 +10568,22 @@ class Alert {
|
|
|
11000
10568
|
this.inputType = inputTypes.values().next().value;
|
|
11001
10569
|
this.processedInputs = inputs.map((i, index) => {
|
|
11002
10570
|
var _a;
|
|
11003
|
-
return
|
|
10571
|
+
return ({
|
|
10572
|
+
type: i.type || 'text',
|
|
10573
|
+
name: i.name || `${index}`,
|
|
10574
|
+
placeholder: i.placeholder || '',
|
|
10575
|
+
value: i.value,
|
|
10576
|
+
label: i.label,
|
|
10577
|
+
checked: !!i.checked,
|
|
10578
|
+
disabled: !!i.disabled,
|
|
10579
|
+
id: i.id || `alert-input-${this.overlayIndex}-${index}`,
|
|
10580
|
+
handler: i.handler,
|
|
10581
|
+
min: i.min,
|
|
10582
|
+
max: i.max,
|
|
10583
|
+
cssClass: (_a = i.cssClass) !== null && _a !== void 0 ? _a : '',
|
|
10584
|
+
attributes: i.attributes || {},
|
|
10585
|
+
tabindex: i.type === 'radio' && i !== focusable ? -1 : 0,
|
|
10586
|
+
});
|
|
11004
10587
|
});
|
|
11005
10588
|
}
|
|
11006
10589
|
connectedCallback() {
|
|
@@ -11028,10 +10611,6 @@ class Alert {
|
|
|
11028
10611
|
this.gesture.destroy();
|
|
11029
10612
|
this.gesture = undefined;
|
|
11030
10613
|
}
|
|
11031
|
-
// Clean up aria-hidden if removed without dismiss() being called
|
|
11032
|
-
if (this.presented) {
|
|
11033
|
-
cleanupRootFocusTrapAccessibility();
|
|
11034
|
-
}
|
|
11035
10614
|
(_a = this.buttonGroupResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
11036
10615
|
this.buttonGroupResizeObserver = undefined;
|
|
11037
10616
|
}
|
|
@@ -11071,7 +10650,7 @@ class Alert {
|
|
|
11071
10650
|
async present() {
|
|
11072
10651
|
const unlock = await this.lockController.lock();
|
|
11073
10652
|
await this.delegateController.attachViewToDom();
|
|
11074
|
-
await present(this, 'alertEnter', iosEnterAnimation$
|
|
10653
|
+
await present(this, 'alertEnter', iosEnterAnimation$5, mdEnterAnimation$4).then(() => {
|
|
11075
10654
|
var _a, _b;
|
|
11076
10655
|
/**
|
|
11077
10656
|
* Check if alert has only one button and no inputs.
|
|
@@ -11102,7 +10681,7 @@ class Alert {
|
|
|
11102
10681
|
*/
|
|
11103
10682
|
async dismiss(data, role) {
|
|
11104
10683
|
const unlock = await this.lockController.lock();
|
|
11105
|
-
const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$
|
|
10684
|
+
const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$5, mdLeaveAnimation$4);
|
|
11106
10685
|
if (dismissed) {
|
|
11107
10686
|
this.delegateController.removeViewFromDom();
|
|
11108
10687
|
}
|
|
@@ -11200,61 +10779,14 @@ class Alert {
|
|
|
11200
10779
|
if (inputs.length === 0) {
|
|
11201
10780
|
return null;
|
|
11202
10781
|
}
|
|
11203
|
-
return (hAsync("div", { class: "alert-checkbox-group" }, inputs.map((i) => {
|
|
11204
|
-
var _a, _b;
|
|
11205
|
-
/**
|
|
11206
|
-
* Cast to `SelectAlertInput` to access rich content
|
|
11207
|
-
* fields (`startContent`, `endContent`, `description`)
|
|
11208
|
-
* that are passed through from `ion-select` but not
|
|
11209
|
-
* part of the public `AlertInput` interface.
|
|
11210
|
-
*/
|
|
11211
|
-
const richInput = i;
|
|
11212
|
-
const optionLabelOptions = {
|
|
11213
|
-
id: richInput.id,
|
|
11214
|
-
label: richInput.label,
|
|
11215
|
-
startContent: richInput.startContent,
|
|
11216
|
-
endContent: richInput.endContent,
|
|
11217
|
-
description: richInput.description,
|
|
11218
|
-
};
|
|
11219
|
-
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'checkbox');
|
|
11220
|
-
const defaultJustify = getOverlayLabelJustify(mode, 'checkbox');
|
|
11221
|
-
return (hAsync("button", { type: "button", onClick: () => this.cbClick(i), "aria-checked": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: i.tabindex, role: "checkbox", class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-tappable': true, 'alert-checkbox': true, 'alert-checkbox-button': true, 'ion-focusable': !i.disabled, 'ion-activatable': !i.disabled, 'alert-checkbox-button-disabled': i.disabled || false }) }, hAsync("div", { class: {
|
|
11222
|
-
'alert-button-inner': true,
|
|
11223
|
-
[`checkbox-label-placement-${(_a = richInput.labelPlacement) !== null && _a !== void 0 ? _a : defaultLabelPlacement}`]: true,
|
|
11224
|
-
[`checkbox-justify-${(_b = richInput.justify) !== null && _b !== void 0 ? _b : defaultJustify}`]: true,
|
|
11225
|
-
} }, hAsync("div", { class: "alert-checkbox-icon" }, hAsync("div", { class: "alert-checkbox-inner" })), renderOptionLabel(optionLabelOptions, 'alert-checkbox-label')), mode === 'md' && hAsync("ion-ripple-effect", null)));
|
|
11226
|
-
})));
|
|
10782
|
+
return (hAsync("div", { class: "alert-checkbox-group" }, inputs.map((i) => (hAsync("button", { type: "button", onClick: () => this.cbClick(i), "aria-checked": `${i.checked}`, id: i.id, disabled: i.disabled, tabIndex: i.tabindex, role: "checkbox", class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-tappable': true, 'alert-checkbox': true, 'alert-checkbox-button': true, 'ion-focusable': true, 'alert-checkbox-button-disabled': i.disabled || false }) }, hAsync("div", { class: "alert-button-inner" }, hAsync("div", { class: "alert-checkbox-icon" }, hAsync("div", { class: "alert-checkbox-inner" })), hAsync("div", { class: "alert-checkbox-label" }, i.label)), mode === 'md' && hAsync("ion-ripple-effect", null))))));
|
|
11227
10783
|
}
|
|
11228
10784
|
renderRadio() {
|
|
11229
10785
|
const inputs = this.processedInputs;
|
|
11230
|
-
const mode = getIonMode$1(this);
|
|
11231
10786
|
if (inputs.length === 0) {
|
|
11232
10787
|
return null;
|
|
11233
10788
|
}
|
|
11234
|
-
return (hAsync("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) => {
|
|
11235
|
-
var _a, _b;
|
|
11236
|
-
/**
|
|
11237
|
-
* Cast to `SelectAlertInput` to access rich content
|
|
11238
|
-
* fields (`startContent`, `endContent`, `description`)
|
|
11239
|
-
* that are passed through from `ion-select` but not
|
|
11240
|
-
* part of the public `AlertInput` interface.
|
|
11241
|
-
*/
|
|
11242
|
-
const richInput = i;
|
|
11243
|
-
const optionLabelOptions = {
|
|
11244
|
-
id: richInput.id,
|
|
11245
|
-
label: richInput.label,
|
|
11246
|
-
startContent: richInput.startContent,
|
|
11247
|
-
endContent: richInput.endContent,
|
|
11248
|
-
description: richInput.description,
|
|
11249
|
-
};
|
|
11250
|
-
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'radio');
|
|
11251
|
-
const defaultJustify = getOverlayLabelJustify(mode, 'radio');
|
|
11252
|
-
return (hAsync("button", { type: "button", onClick: () => this.rbClick(i), "aria-checked": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: i.tabindex, class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-radio-button': true, 'alert-tappable': true, 'alert-radio': true, 'ion-focusable': !i.disabled, 'ion-activatable': !i.disabled, 'alert-radio-button-disabled': i.disabled || false }), role: "radio" }, hAsync("div", { class: {
|
|
11253
|
-
'alert-button-inner': true,
|
|
11254
|
-
[`radio-label-placement-${(_a = richInput.labelPlacement) !== null && _a !== void 0 ? _a : defaultLabelPlacement}`]: true,
|
|
11255
|
-
[`radio-justify-${(_b = richInput.justify) !== null && _b !== void 0 ? _b : defaultJustify}`]: true,
|
|
11256
|
-
} }, hAsync("div", { class: "alert-radio-icon" }, hAsync("div", { class: "alert-radio-inner" })), renderOptionLabel(optionLabelOptions, 'alert-radio-label'))));
|
|
11257
|
-
})));
|
|
10789
|
+
return (hAsync("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) => (hAsync("button", { type: "button", onClick: () => this.rbClick(i), "aria-checked": `${i.checked}`, disabled: i.disabled, id: i.id, tabIndex: i.tabindex, class: Object.assign(Object.assign({}, getClassMap(i.cssClass)), { 'alert-radio-button': true, 'alert-tappable': true, 'alert-radio': true, 'ion-focusable': true, 'alert-radio-button-disabled': i.disabled || false }), role: "radio" }, hAsync("div", { class: "alert-button-inner" }, hAsync("div", { class: "alert-radio-icon" }, hAsync("div", { class: "alert-radio-inner" })), hAsync("div", { class: "alert-radio-label" }, i.label)))))));
|
|
11258
10790
|
}
|
|
11259
10791
|
renderInput() {
|
|
11260
10792
|
const inputs = this.processedInputs;
|
|
@@ -11334,7 +10866,7 @@ class Alert {
|
|
|
11334
10866
|
'alert-button-group': true,
|
|
11335
10867
|
'alert-button-group-vertical': buttons.length > 2 || this.isButtonGroupWrapped,
|
|
11336
10868
|
};
|
|
11337
|
-
return (hAsync("div", { class: alertButtonGroupClass, ref: (el) => (this.buttonGroupEl = el) }, buttons.map((button) => (hAsync("button", Object.assign({}, button.htmlAttributes, { type: "button", id: button.id, class: buttonClass$
|
|
10869
|
+
return (hAsync("div", { class: alertButtonGroupClass, ref: (el) => (this.buttonGroupEl = el) }, buttons.map((button) => (hAsync("button", Object.assign({}, button.htmlAttributes, { type: "button", id: button.id, class: buttonClass$2(button), tabIndex: 0, onClick: () => this.buttonClick(button) }), hAsync("span", { class: "alert-button-inner" }, button.text), mode === 'md' && hAsync("ion-ripple-effect", null))))));
|
|
11338
10870
|
}
|
|
11339
10871
|
renderAlertMessage(msgId) {
|
|
11340
10872
|
const { customHTMLEnabled, message } = this;
|
|
@@ -11357,9 +10889,9 @@ class Alert {
|
|
|
11357
10889
|
* If neither are defined, do not set aria-labelledby.
|
|
11358
10890
|
*/
|
|
11359
10891
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
11360
|
-
return (hAsync(Host, { key: '
|
|
10892
|
+
return (hAsync(Host, { key: '8d54ccd725ea634be080e67b56fa5efe498f496c', tabindex: "-1", style: {
|
|
11361
10893
|
zIndex: `${20000 + overlayIndex}`,
|
|
11362
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '
|
|
10894
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '05a238583342285545587de9dce144a82d779193', tappable: this.backdropDismiss }), hAsync("div", { key: 'e52c53fd9845e66781af01b2a788a291b45a927c', tabindex: "0", "aria-hidden": "true" }), hAsync("div", Object.assign({ key: '8417e52eebca24ff436fab0703666db51072f980', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), hAsync("div", { key: '5c560d4800b24d41961423718108b54be6cd6f91', class: "alert-head" }, header && (hAsync("h2", { key: '8637b64cd5125b2258115d1c11f3743113658608', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (hAsync("h2", { key: '7a4e61a02c29b16b336d8acaf6569b30de6fe71e', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (hAsync("h3", { key: '30844b6a0a7e3dab46514cd548ecffa86dcd59cb', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), hAsync("div", { key: '39c824fee1e60ad8d6234c79d22ceb8bba8004af', tabindex: "0", "aria-hidden": "true" })));
|
|
11363
10895
|
}
|
|
11364
10896
|
get el() { return getElement(this); }
|
|
11365
10897
|
static get watchers() { return {
|
|
@@ -11417,7 +10949,7 @@ const inputClass = (input) => {
|
|
|
11417
10949
|
var _a, _b, _c;
|
|
11418
10950
|
return Object.assign(Object.assign({ 'alert-input': true, 'alert-input-disabled': ((_b = (_a = input.attributes) === null || _a === void 0 ? void 0 : _a.disabled) !== null && _b !== void 0 ? _b : input.disabled) || false }, getClassMap(input.cssClass)), getClassMap(input.attributes ? (_c = input.attributes.class) === null || _c === void 0 ? void 0 : _c.toString() : ''));
|
|
11419
10951
|
};
|
|
11420
|
-
const buttonClass$
|
|
10952
|
+
const buttonClass$2 = (button) => {
|
|
11421
10953
|
return Object.assign({ 'alert-button': true, 'ion-focusable': true, 'ion-activatable': true, [`alert-button-role-${button.role}`]: button.role !== undefined }, getClassMap(button.cssClass));
|
|
11422
10954
|
};
|
|
11423
10955
|
|
|
@@ -19202,8 +18734,6 @@ const createColorClasses = (color) => {
|
|
|
19202
18734
|
const imgCss = () => `:host{display:block;-o-object-fit:contain;object-fit:contain}img{display:block;width:100%;height:100%;-o-object-fit:inherit;object-fit:inherit;-o-object-position:inherit;object-position:inherit}`;
|
|
19203
18735
|
|
|
19204
18736
|
/**
|
|
19205
|
-
* @deprecated
|
|
19206
|
-
*
|
|
19207
18737
|
* @part image - The inner `img` element.
|
|
19208
18738
|
*/
|
|
19209
18739
|
class Img {
|
|
@@ -19227,8 +18757,6 @@ class Img {
|
|
|
19227
18757
|
this.inheritedAttributes = inheritAttributes$1(this.el, ['draggable']);
|
|
19228
18758
|
}
|
|
19229
18759
|
componentDidLoad() {
|
|
19230
|
-
printIonWarning('[ion-img] - This component is deprecated and will be removed in Ionic v10. ' +
|
|
19231
|
-
'Use a native <img> with the loading="lazy" attribute instead.', this.el);
|
|
19232
18760
|
this.addIO();
|
|
19233
18761
|
}
|
|
19234
18762
|
disconnectedCallback() {
|
|
@@ -19281,7 +18809,7 @@ class Img {
|
|
|
19281
18809
|
render() {
|
|
19282
18810
|
const { loadSrc, alt, onLoad, loadError, inheritedAttributes } = this;
|
|
19283
18811
|
const { draggable } = inheritedAttributes;
|
|
19284
|
-
return (hAsync(Host, { key: '
|
|
18812
|
+
return (hAsync(Host, { key: '9bfaa659b0680189fd29f3acb2fdce7f70be6060', class: getIonMode$1(this) }, hAsync("img", { key: 'd484beae0d5cbe0406958bfad40cdd6c05625340', decoding: "async", src: loadSrc, alt: alt, onLoad: onLoad, onError: loadError, part: "image", draggable: isDraggable(draggable) })));
|
|
19285
18813
|
}
|
|
19286
18814
|
get el() { return getElement(this); }
|
|
19287
18815
|
static get watchers() { return {
|
|
@@ -19785,7 +19313,7 @@ class Input {
|
|
|
19785
19313
|
/**
|
|
19786
19314
|
* Whether auto correction should be enabled when the user is entering/editing the text value.
|
|
19787
19315
|
*/
|
|
19788
|
-
this.autocorrect =
|
|
19316
|
+
this.autocorrect = 'off';
|
|
19789
19317
|
/**
|
|
19790
19318
|
* Sets the [`autofocus` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) on the native input element.
|
|
19791
19319
|
*
|
|
@@ -20242,7 +19770,7 @@ class Input {
|
|
|
20242
19770
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
20243
19771
|
*/
|
|
20244
19772
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
20245
|
-
return (hAsync(Host, { key: '
|
|
19773
|
+
return (hAsync(Host, { key: '9ba9cf425b573d2ca9ac34455a0e6b8474c4de6d', class: createColorClasses$1(this.color, {
|
|
20246
19774
|
[mode]: true,
|
|
20247
19775
|
'has-value': hasValue,
|
|
20248
19776
|
'has-focus': hasFocus,
|
|
@@ -20253,14 +19781,14 @@ class Input {
|
|
|
20253
19781
|
'in-item': inItem,
|
|
20254
19782
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
20255
19783
|
'input-disabled': disabled,
|
|
20256
|
-
}) }, hAsync("label", { key: '
|
|
19784
|
+
}) }, hAsync("label", { key: '74b989d0aa5ab38f29f952519868f05119df6005', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '47f2b42e2f74ea866b4f871026e08ab375d7a726', class: "native-wrapper", onClick: this.onLabelClick }, hAsync("slot", { key: 'eaabe5a4a329a356cac3294d15c087d0d131fff2', name: "start" }), hAsync("input", Object.assign({ key: 'c821a984a8a9b7f96f30892c06d8deda093ff24b', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-labelledby": this.getLabelledById() }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (hAsync("button", { key: '62069c11016ee190dc46ab941372e1c4ad8a36ed', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
20257
19785
|
/**
|
|
20258
19786
|
* This prevents mobile browsers from
|
|
20259
19787
|
* blurring the input when the clear
|
|
20260
19788
|
* button is activated.
|
|
20261
19789
|
*/
|
|
20262
19790
|
ev.preventDefault();
|
|
20263
|
-
}, onClick: this.clearTextInput }, hAsync("ion-icon", { key: '
|
|
19791
|
+
}, onClick: this.clearTextInput }, hAsync("ion-icon", { key: 'dd75a516d32110d85382b664c663bd41f177ce12', "aria-hidden": "true", icon: clearIconData }))), hAsync("slot", { key: '330d4b9389f2c62223a5ee24003e96ef3e6b2473', name: "end" })), shouldRenderHighlight && hAsync("div", { key: '8e442bed130ddc84976ab70fd3f8578d6bcc6316', class: "input-highlight" })), this.renderBottomContent()));
|
|
20264
19792
|
}
|
|
20265
19793
|
get el() { return getElement(this); }
|
|
20266
19794
|
static get watchers() { return {
|
|
@@ -20288,7 +19816,7 @@ class Input {
|
|
|
20288
19816
|
"color": [513],
|
|
20289
19817
|
"autocapitalize": [1],
|
|
20290
19818
|
"autocomplete": [1],
|
|
20291
|
-
"autocorrect": [
|
|
19819
|
+
"autocorrect": [1],
|
|
20292
19820
|
"autofocus": [4],
|
|
20293
19821
|
"clearInput": [4, "clear-input"],
|
|
20294
19822
|
"clearInputIcon": [1, "clear-input-icon"],
|
|
@@ -22292,7 +21820,7 @@ class ListHeader {
|
|
|
22292
21820
|
/**
|
|
22293
21821
|
* iOS Loading Enter Animation
|
|
22294
21822
|
*/
|
|
22295
|
-
const iosEnterAnimation$
|
|
21823
|
+
const iosEnterAnimation$4 = (baseEl) => {
|
|
22296
21824
|
const baseAnimation = createAnimation();
|
|
22297
21825
|
const backdropAnimation = createAnimation();
|
|
22298
21826
|
const wrapperAnimation = createAnimation();
|
|
@@ -22317,7 +21845,7 @@ const iosEnterAnimation$3 = (baseEl) => {
|
|
|
22317
21845
|
/**
|
|
22318
21846
|
* iOS Loading Leave Animation
|
|
22319
21847
|
*/
|
|
22320
|
-
const iosLeaveAnimation$
|
|
21848
|
+
const iosLeaveAnimation$4 = (baseEl) => {
|
|
22321
21849
|
const baseAnimation = createAnimation();
|
|
22322
21850
|
const backdropAnimation = createAnimation();
|
|
22323
21851
|
const wrapperAnimation = createAnimation();
|
|
@@ -22490,10 +22018,6 @@ class Loading {
|
|
|
22490
22018
|
}
|
|
22491
22019
|
disconnectedCallback() {
|
|
22492
22020
|
this.triggerController.removeClickListener();
|
|
22493
|
-
// Clean up aria-hidden if removed without dismiss() being called
|
|
22494
|
-
if (this.presented) {
|
|
22495
|
-
cleanupRootFocusTrapAccessibility();
|
|
22496
|
-
}
|
|
22497
22021
|
}
|
|
22498
22022
|
/**
|
|
22499
22023
|
* Present the loading overlay after it has been created.
|
|
@@ -22501,7 +22025,7 @@ class Loading {
|
|
|
22501
22025
|
async present() {
|
|
22502
22026
|
const unlock = await this.lockController.lock();
|
|
22503
22027
|
await this.delegateController.attachViewToDom();
|
|
22504
|
-
await present(this, 'loadingEnter', iosEnterAnimation$
|
|
22028
|
+
await present(this, 'loadingEnter', iosEnterAnimation$4, mdEnterAnimation$3);
|
|
22505
22029
|
if (this.duration > 0) {
|
|
22506
22030
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
|
|
22507
22031
|
}
|
|
@@ -22524,7 +22048,7 @@ class Loading {
|
|
|
22524
22048
|
if (this.durationTimeout) {
|
|
22525
22049
|
clearTimeout(this.durationTimeout);
|
|
22526
22050
|
}
|
|
22527
|
-
const dismissed = await dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation$
|
|
22051
|
+
const dismissed = await dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation$4, mdLeaveAnimation$3);
|
|
22528
22052
|
if (dismissed) {
|
|
22529
22053
|
this.delegateController.removeViewFromDom();
|
|
22530
22054
|
}
|
|
@@ -22559,9 +22083,9 @@ class Loading {
|
|
|
22559
22083
|
* Otherwise, don't set aria-labelledby.
|
|
22560
22084
|
*/
|
|
22561
22085
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
22562
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
22086
|
+
return (hAsync(Host, Object.assign({ key: 'f86ddbc600cb5c396b7de38fb5f49625388c3c3f', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
22563
22087
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
22564
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '
|
|
22088
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: 'b53727aaddc37ef3c685fcc150c6d5193290a847', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: '4c61bede8e0a4e47daa6f1f9d0f364ef6aec0bc3', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: '84e51ceb07118f1eaeb757df28801c255496931b', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (hAsync("div", { key: 'fc97f1912e0fc558b7c309a5bc084415f5f620b2', class: "loading-spinner" }, hAsync("ion-spinner", { key: '6e186d856cd3f10f22c3e317ef00f31b4216459c', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), hAsync("div", { key: 'dcbe9d9a619daa1c08174e73827bdabeb59dde92', tabindex: "0", "aria-hidden": "true" })));
|
|
22565
22089
|
}
|
|
22566
22090
|
get el() { return getElement(this); }
|
|
22567
22091
|
static get watchers() { return {
|
|
@@ -24835,7 +24359,7 @@ const createEnterAnimation$1 = () => {
|
|
|
24835
24359
|
/**
|
|
24836
24360
|
* iOS Modal Enter Animation for the Card presentation style
|
|
24837
24361
|
*/
|
|
24838
|
-
const iosEnterAnimation$
|
|
24362
|
+
const iosEnterAnimation$3 = (baseEl, opts) => {
|
|
24839
24363
|
const { presentingEl, currentBreakpoint, expandToScroll } = opts;
|
|
24840
24364
|
const root = getElementRoot(baseEl);
|
|
24841
24365
|
const { wrapperAnimation, backdropAnimation, contentAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation$1();
|
|
@@ -24928,7 +24452,7 @@ const createLeaveAnimation$1 = () => {
|
|
|
24928
24452
|
/**
|
|
24929
24453
|
* iOS Modal Leave Animation
|
|
24930
24454
|
*/
|
|
24931
|
-
const iosLeaveAnimation$
|
|
24455
|
+
const iosLeaveAnimation$3 = (baseEl, opts, duration = 500) => {
|
|
24932
24456
|
const { presentingEl, currentBreakpoint } = opts;
|
|
24933
24457
|
const root = getElementRoot(baseEl);
|
|
24934
24458
|
const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetLeaveAnimation(opts) : createLeaveAnimation$1();
|
|
@@ -26031,9 +25555,9 @@ const clearSafeAreaOverrides = (hostEl) => {
|
|
|
26031
25555
|
hostEl.style.removeProperty('--ion-safe-area-right');
|
|
26032
25556
|
};
|
|
26033
25557
|
|
|
26034
|
-
const modalIosCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}`;
|
|
25558
|
+
const modalIosCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}`;
|
|
26035
25559
|
|
|
26036
|
-
const modalMdCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}`;
|
|
25560
|
+
const modalMdCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}`;
|
|
26037
25561
|
|
|
26038
25562
|
// TODO(FW-2832): types
|
|
26039
25563
|
/**
|
|
@@ -26103,20 +25627,13 @@ class Modal {
|
|
|
26103
25627
|
/**
|
|
26104
25628
|
* The interaction behavior for the sheet modal when the handle is pressed.
|
|
26105
25629
|
*
|
|
26106
|
-
*
|
|
26107
|
-
* `
|
|
26108
|
-
* fullscreen or card modal).
|
|
26109
|
-
*
|
|
26110
|
-
* Set to `"cycle"` to make the handle focusable and let the sheet modal
|
|
26111
|
-
* cycle between available breakpoints when pressed. This keeps the sheet
|
|
26112
|
-
* operable with assistive technology.
|
|
26113
|
-
*
|
|
26114
|
-
* Set to `"none"` to make the handle purely decorative when pressed and
|
|
26115
|
-
* removed from the tab order.
|
|
25630
|
+
* Defaults to `"none"`, which means the modal will not change size or position when the handle is pressed.
|
|
25631
|
+
* Set to `"cycle"` to let the modal cycle between available breakpoints when pressed.
|
|
26116
25632
|
*
|
|
26117
|
-
*
|
|
25633
|
+
* Handle behavior is unavailable when the `handle` property is set to `false` or
|
|
25634
|
+
* when the `breakpoints` property is not set (using a fullscreen or card modal).
|
|
26118
25635
|
*/
|
|
26119
|
-
this.handleBehavior = '
|
|
25636
|
+
this.handleBehavior = 'none';
|
|
26120
25637
|
/**
|
|
26121
25638
|
* If `true`, the modal will be dismissed when the backdrop is clicked.
|
|
26122
25639
|
*/
|
|
@@ -26308,10 +25825,6 @@ class Modal {
|
|
|
26308
25825
|
// Also called in dismiss() — intentional dual cleanup covers both
|
|
26309
25826
|
// dismiss-then-remove and direct DOM removal without dismiss.
|
|
26310
25827
|
this.cleanupSafeAreaOverrides();
|
|
26311
|
-
// Clean up aria-hidden if removed without dismiss() being called
|
|
26312
|
-
if (this.presented) {
|
|
26313
|
-
cleanupRootFocusTrapAccessibility();
|
|
26314
|
-
}
|
|
26315
25828
|
}
|
|
26316
25829
|
componentWillLoad() {
|
|
26317
25830
|
var _a;
|
|
@@ -26488,7 +26001,7 @@ class Modal {
|
|
|
26488
26001
|
this.statusBarStyle = await StatusBar.getStyle();
|
|
26489
26002
|
setCardStatusBarDark();
|
|
26490
26003
|
}
|
|
26491
|
-
await present(this, 'modalEnter', iosEnterAnimation$
|
|
26004
|
+
await present(this, 'modalEnter', iosEnterAnimation$3, mdEnterAnimation$2, {
|
|
26492
26005
|
presentingEl: presentingElement,
|
|
26493
26006
|
currentBreakpoint: this.initialBreakpoint,
|
|
26494
26007
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
@@ -26550,7 +26063,7 @@ class Modal {
|
|
|
26550
26063
|
// All of the elements needed for the swipe gesture
|
|
26551
26064
|
// should be in the DOM and referenced by now, except
|
|
26552
26065
|
// for the presenting el
|
|
26553
|
-
const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation$
|
|
26066
|
+
const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation$3);
|
|
26554
26067
|
const ani = (this.animation = animationBuilder(el, {
|
|
26555
26068
|
presentingEl: this.presentingElement,
|
|
26556
26069
|
expandToScroll: this.expandToScroll,
|
|
@@ -26569,7 +26082,7 @@ class Modal {
|
|
|
26569
26082
|
if (!wrapperEl || initialBreakpoint === undefined) {
|
|
26570
26083
|
return;
|
|
26571
26084
|
}
|
|
26572
|
-
const animationBuilder = this.enterAnimation || config.get('modalEnter', iosEnterAnimation$
|
|
26085
|
+
const animationBuilder = this.enterAnimation || config.get('modalEnter', iosEnterAnimation$3);
|
|
26573
26086
|
const ani = (this.animation = animationBuilder(this.el, {
|
|
26574
26087
|
presentingEl: this.presentingElement,
|
|
26575
26088
|
currentBreakpoint: initialBreakpoint,
|
|
@@ -26759,7 +26272,7 @@ class Modal {
|
|
|
26759
26272
|
window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
26760
26273
|
this.keyboardOpenCallback = undefined;
|
|
26761
26274
|
}
|
|
26762
|
-
const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation$
|
|
26275
|
+
const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation$3, mdLeaveAnimation$2, {
|
|
26763
26276
|
presentingEl: presentingElement,
|
|
26764
26277
|
currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
|
|
26765
26278
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
@@ -27191,20 +26704,26 @@ class Modal {
|
|
|
27191
26704
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
27192
26705
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
27193
26706
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
27194
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
26707
|
+
return (hAsync(Host, Object.assign({ key: 'ab93657f4a5b4c97168d292b398d975e4b5b4af4', "no-router": true,
|
|
27195
26708
|
// Allow the modal to be navigable when the handle is focusable
|
|
27196
26709
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
27197
26710
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
27198
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '
|
|
26711
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '5ba6315c7c8c64fa04c62f85fd493da5275b2cbd', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'a76c48d41c67f86c18a7481e980e6925e614f85d', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'dccf3c774355429bc0ea7461d9b1ef941ea91902',
|
|
27199
26712
|
/*
|
|
27200
26713
|
role and aria-modal must be used on the
|
|
27201
26714
|
same element. They must also be set inside the
|
|
27202
26715
|
shadow DOM otherwise ion-button will not be highlighted
|
|
27203
26716
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
26717
|
+
|
|
26718
|
+
tabIndex={-1} is required so present() can move focus to this
|
|
26719
|
+
element (which carries the dialog role) instead of the role-less
|
|
26720
|
+
host. role="dialog" alone does not make an element focusable, so
|
|
26721
|
+
without the tabindex focus() would be a no-op and screen readers
|
|
26722
|
+
may not properly announce the dialog and its content when it opens.
|
|
27204
26723
|
*/
|
|
27205
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
26724
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'ba4ebd6364faba46ac8532d1c83cb655ae873a14', class: "modal-handle",
|
|
27206
26725
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
27207
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: '
|
|
26726
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: '11d5921a8ebbcd0017d4f28a33d68049253f63f0', onSlotchange: this.onSlotChange }))));
|
|
27208
26727
|
}
|
|
27209
26728
|
get el() { return getElement(this); }
|
|
27210
26729
|
static get watchers() { return {
|
|
@@ -27307,6 +26826,15 @@ class ViewController {
|
|
|
27307
26826
|
this.state = VIEW_STATE_DESTROYED;
|
|
27308
26827
|
}
|
|
27309
26828
|
}
|
|
26829
|
+
const matches = (view, id, params) => {
|
|
26830
|
+
if (!view) {
|
|
26831
|
+
return false;
|
|
26832
|
+
}
|
|
26833
|
+
if (view.component !== id) {
|
|
26834
|
+
return false;
|
|
26835
|
+
}
|
|
26836
|
+
return shallowEqualStringMap(view.params, params);
|
|
26837
|
+
};
|
|
27310
26838
|
const convertToView = (page, params) => {
|
|
27311
26839
|
if (!page) {
|
|
27312
26840
|
return null;
|
|
@@ -27340,6 +26868,7 @@ class Nav {
|
|
|
27340
26868
|
this.ionNavDidChange = createEvent(this, "ionNavDidChange", 3);
|
|
27341
26869
|
this.transInstr = [];
|
|
27342
26870
|
this.gestureOrAnimationInProgress = false;
|
|
26871
|
+
this.useRouter = false;
|
|
27343
26872
|
this.isTransitioning = false;
|
|
27344
26873
|
this.destroyed = false;
|
|
27345
26874
|
this.views = [];
|
|
@@ -27365,9 +26894,14 @@ class Nav {
|
|
|
27365
26894
|
*/
|
|
27366
26895
|
return;
|
|
27367
26896
|
}
|
|
27368
|
-
|
|
26897
|
+
if (!this.useRouter) {
|
|
26898
|
+
if (this.root !== undefined) {
|
|
26899
|
+
this.setRoot(this.root, this.rootParams);
|
|
26900
|
+
}
|
|
26901
|
+
}
|
|
27369
26902
|
}
|
|
27370
26903
|
componentWillLoad() {
|
|
26904
|
+
this.useRouter = document.querySelector('ion-router') !== null && this.el.closest('[no-router]') === null;
|
|
27371
26905
|
if (this.swipeGesture === undefined) {
|
|
27372
26906
|
const mode = getIonMode$1(this);
|
|
27373
26907
|
this.swipeGesture = config.getBoolean('swipeBackEnabled', mode === 'ios');
|
|
@@ -27532,6 +27066,78 @@ class Nav {
|
|
|
27532
27066
|
opts,
|
|
27533
27067
|
}, done);
|
|
27534
27068
|
}
|
|
27069
|
+
/**
|
|
27070
|
+
* Called by the router to update the view.
|
|
27071
|
+
*
|
|
27072
|
+
* @param id The component tag.
|
|
27073
|
+
* @param params The component params.
|
|
27074
|
+
* @param direction A direction hint.
|
|
27075
|
+
* @param animation an AnimationBuilder.
|
|
27076
|
+
*
|
|
27077
|
+
* @return the status.
|
|
27078
|
+
* @internal
|
|
27079
|
+
*/
|
|
27080
|
+
setRouteId(id, params, direction, animation) {
|
|
27081
|
+
const active = this.getActiveSync();
|
|
27082
|
+
if (matches(active, id, params)) {
|
|
27083
|
+
return Promise.resolve({
|
|
27084
|
+
changed: false,
|
|
27085
|
+
element: active.element,
|
|
27086
|
+
});
|
|
27087
|
+
}
|
|
27088
|
+
let resolve;
|
|
27089
|
+
const promise = new Promise((r) => (resolve = r));
|
|
27090
|
+
let finish;
|
|
27091
|
+
const commonOpts = {
|
|
27092
|
+
updateURL: false,
|
|
27093
|
+
viewIsReady: (enteringEl) => {
|
|
27094
|
+
let mark;
|
|
27095
|
+
const p = new Promise((r) => (mark = r));
|
|
27096
|
+
resolve({
|
|
27097
|
+
changed: true,
|
|
27098
|
+
element: enteringEl,
|
|
27099
|
+
markVisible: async () => {
|
|
27100
|
+
mark();
|
|
27101
|
+
await finish;
|
|
27102
|
+
},
|
|
27103
|
+
});
|
|
27104
|
+
return p;
|
|
27105
|
+
},
|
|
27106
|
+
};
|
|
27107
|
+
if (direction === 'root') {
|
|
27108
|
+
finish = this.setRoot(id, params, commonOpts);
|
|
27109
|
+
}
|
|
27110
|
+
else {
|
|
27111
|
+
// Look for a view matching the target in the view stack.
|
|
27112
|
+
const viewController = this.views.find((v) => matches(v, id, params));
|
|
27113
|
+
if (viewController) {
|
|
27114
|
+
finish = this.popTo(viewController, Object.assign(Object.assign({}, commonOpts), { direction: 'back', animationBuilder: animation }));
|
|
27115
|
+
}
|
|
27116
|
+
else if (direction === 'forward') {
|
|
27117
|
+
finish = this.push(id, params, Object.assign(Object.assign({}, commonOpts), { animationBuilder: animation }));
|
|
27118
|
+
}
|
|
27119
|
+
else if (direction === 'back') {
|
|
27120
|
+
finish = this.setRoot(id, params, Object.assign(Object.assign({}, commonOpts), { direction: 'back', animated: true, animationBuilder: animation }));
|
|
27121
|
+
}
|
|
27122
|
+
}
|
|
27123
|
+
return promise;
|
|
27124
|
+
}
|
|
27125
|
+
/**
|
|
27126
|
+
* Called by <ion-router> to retrieve the current component.
|
|
27127
|
+
*
|
|
27128
|
+
* @internal
|
|
27129
|
+
*/
|
|
27130
|
+
async getRouteId() {
|
|
27131
|
+
const active = this.getActiveSync();
|
|
27132
|
+
if (active) {
|
|
27133
|
+
return {
|
|
27134
|
+
id: active.element.tagName,
|
|
27135
|
+
params: active.params,
|
|
27136
|
+
element: active.element,
|
|
27137
|
+
};
|
|
27138
|
+
}
|
|
27139
|
+
return undefined;
|
|
27140
|
+
}
|
|
27535
27141
|
/**
|
|
27536
27142
|
* Get the active view.
|
|
27537
27143
|
*/
|
|
@@ -27597,6 +27203,25 @@ class Nav {
|
|
|
27597
27203
|
ti.reject = reject;
|
|
27598
27204
|
});
|
|
27599
27205
|
ti.done = done;
|
|
27206
|
+
/**
|
|
27207
|
+
* If using router, check to see if navigation hooks
|
|
27208
|
+
* will allow us to perform this transition. This
|
|
27209
|
+
* is required in order for hooks to work with
|
|
27210
|
+
* the ion-back-button or swipe to go back.
|
|
27211
|
+
*/
|
|
27212
|
+
if (ti.opts && ti.opts.updateURL !== false && this.useRouter) {
|
|
27213
|
+
const router = document.querySelector('ion-router');
|
|
27214
|
+
if (router) {
|
|
27215
|
+
const canTransition = await router.canTransition();
|
|
27216
|
+
if (canTransition === false) {
|
|
27217
|
+
return false;
|
|
27218
|
+
}
|
|
27219
|
+
if (typeof canTransition === 'string') {
|
|
27220
|
+
router.push(canTransition, ti.opts.direction || 'back');
|
|
27221
|
+
return false;
|
|
27222
|
+
}
|
|
27223
|
+
}
|
|
27224
|
+
}
|
|
27600
27225
|
// Normalize empty
|
|
27601
27226
|
if (((_b = ti.insertViews) === null || _b === void 0 ? void 0 : _b.length) === 0) {
|
|
27602
27227
|
ti.insertViews = undefined;
|
|
@@ -27617,6 +27242,13 @@ class Nav {
|
|
|
27617
27242
|
ti.done(result.hasCompleted, result.requiresTransition, result.enteringView, result.leavingView, result.direction);
|
|
27618
27243
|
}
|
|
27619
27244
|
ti.resolve(result.hasCompleted);
|
|
27245
|
+
if (ti.opts.updateURL !== false && this.useRouter) {
|
|
27246
|
+
const router = document.querySelector('ion-router');
|
|
27247
|
+
if (router) {
|
|
27248
|
+
const direction = result.direction === 'back' ? 'back' : 'forward';
|
|
27249
|
+
router.navChanged(direction);
|
|
27250
|
+
}
|
|
27251
|
+
}
|
|
27620
27252
|
}
|
|
27621
27253
|
failed(rejectReason, ti) {
|
|
27622
27254
|
if (this.destroyed) {
|
|
@@ -28046,7 +27678,7 @@ class Nav {
|
|
|
28046
27678
|
}
|
|
28047
27679
|
}
|
|
28048
27680
|
render() {
|
|
28049
|
-
return hAsync("slot", { key: '
|
|
27681
|
+
return hAsync("slot", { key: 'a549286b51b1bb23c9ef51f71148452228d0ab14' });
|
|
28050
27682
|
}
|
|
28051
27683
|
get el() { return getElement(this); }
|
|
28052
27684
|
static get watchers() { return {
|
|
@@ -28077,6 +27709,8 @@ class Nav {
|
|
|
28077
27709
|
"removeIndex": [64],
|
|
28078
27710
|
"setRoot": [64],
|
|
28079
27711
|
"setPages": [64],
|
|
27712
|
+
"setRouteId": [64],
|
|
27713
|
+
"getRouteId": [64],
|
|
28080
27714
|
"getActive": [64],
|
|
28081
27715
|
"getByIndex": [64],
|
|
28082
27716
|
"canGoBack": [64],
|
|
@@ -28172,14 +27806,14 @@ class Note {
|
|
|
28172
27806
|
}; }
|
|
28173
27807
|
}
|
|
28174
27808
|
|
|
28175
|
-
const pickerIosCss = () => `:host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}:host .picker-before{inset-inline-start:0}:host .picker-after{top:116px;height:84px}:host .picker-after{inset-inline-start:0}:host .picker-highlight{border-radius:var(--highlight-border-radius, 8px);left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column:first-of-type){text-align:start}:host ::slotted(ion-picker-column:last-of-type){text-align:end}:host ::slotted(ion-picker-column:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to bottom, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to top, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-highlight{background:var(--highlight-background, var(--ion-color-step-150, var(--ion-background-color-step-150, #eeeeef)))}`;
|
|
27809
|
+
const pickerIosCss$1 = () => `:host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}:host .picker-before{inset-inline-start:0}:host .picker-after{top:116px;height:84px}:host .picker-after{inset-inline-start:0}:host .picker-highlight{border-radius:var(--highlight-border-radius, 8px);left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column:first-of-type){text-align:start}:host ::slotted(ion-picker-column:last-of-type){text-align:end}:host ::slotted(ion-picker-column:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to bottom, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), to(rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8)));background:linear-gradient(to top, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-highlight{background:var(--highlight-background, var(--ion-color-step-150, var(--ion-background-color-step-150, #eeeeef)))}`;
|
|
28176
27810
|
|
|
28177
|
-
const pickerMdCss = () => `:host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}:host .picker-before{inset-inline-start:0}:host .picker-after{top:116px;height:84px}:host .picker-after{inset-inline-start:0}:host .picker-highlight{border-radius:var(--highlight-border-radius, 8px);left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column:first-of-type){text-align:start}:host ::slotted(ion-picker-column:last-of-type){text-align:end}:host ::slotted(ion-picker-column:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to bottom, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to top, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 30%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}`;
|
|
27811
|
+
const pickerMdCss$1 = () => `:host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}:host .picker-before{inset-inline-start:0}:host .picker-after{top:116px;height:84px}:host .picker-after{inset-inline-start:0}:host .picker-highlight{border-radius:var(--highlight-border-radius, 8px);left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);background:var(--highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column:first-of-type){text-align:start}:host ::slotted(ion-picker-column:last-of-type){text-align:end}:host ::slotted(ion-picker-column:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to bottom, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1)), color-stop(90%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0)));background:linear-gradient(to top, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 30%, rgba(var(--fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}`;
|
|
28178
27812
|
|
|
28179
27813
|
/**
|
|
28180
27814
|
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
28181
27815
|
*/
|
|
28182
|
-
class Picker {
|
|
27816
|
+
let Picker$1 = class Picker {
|
|
28183
27817
|
constructor(hostRef) {
|
|
28184
27818
|
registerInstance(this, hostRef);
|
|
28185
27819
|
this.ionInputModeChange = createEvent(this, "ionInputModeChange", 7);
|
|
@@ -28645,8 +28279,8 @@ class Picker {
|
|
|
28645
28279
|
}
|
|
28646
28280
|
get el() { return getElement(this); }
|
|
28647
28281
|
static get style() { return {
|
|
28648
|
-
ios: pickerIosCss(),
|
|
28649
|
-
md: pickerMdCss()
|
|
28282
|
+
ios: pickerIosCss$1(),
|
|
28283
|
+
md: pickerMdCss$1()
|
|
28650
28284
|
}; }
|
|
28651
28285
|
static get cmpMeta() { return {
|
|
28652
28286
|
"$flags$": 297,
|
|
@@ -28658,17 +28292,332 @@ class Picker {
|
|
|
28658
28292
|
"$lazyBundleId$": "-",
|
|
28659
28293
|
"$attrsToReflect$": []
|
|
28660
28294
|
}; }
|
|
28661
|
-
}
|
|
28295
|
+
};
|
|
28662
28296
|
|
|
28663
|
-
|
|
28297
|
+
/**
|
|
28298
|
+
* iOS Picker Enter Animation
|
|
28299
|
+
*/
|
|
28300
|
+
const iosEnterAnimation$2 = (baseEl) => {
|
|
28301
|
+
const baseAnimation = createAnimation();
|
|
28302
|
+
const backdropAnimation = createAnimation();
|
|
28303
|
+
const wrapperAnimation = createAnimation();
|
|
28304
|
+
backdropAnimation
|
|
28305
|
+
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
28306
|
+
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
28307
|
+
.beforeStyles({
|
|
28308
|
+
'pointer-events': 'none',
|
|
28309
|
+
})
|
|
28310
|
+
.afterClearStyles(['pointer-events']);
|
|
28311
|
+
wrapperAnimation
|
|
28312
|
+
.addElement(baseEl.querySelector('.picker-wrapper'))
|
|
28313
|
+
.fromTo('transform', 'translateY(100%)', 'translateY(0%)');
|
|
28314
|
+
return baseAnimation
|
|
28315
|
+
.addElement(baseEl)
|
|
28316
|
+
.easing('cubic-bezier(.36,.66,.04,1)')
|
|
28317
|
+
.duration(400)
|
|
28318
|
+
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
28319
|
+
};
|
|
28664
28320
|
|
|
28665
28321
|
/**
|
|
28666
|
-
*
|
|
28667
|
-
*
|
|
28668
|
-
* @slot prefix - Content to show on the left side of the picker options.
|
|
28669
|
-
* @slot suffix - Content to show on the right side of the picker options.
|
|
28322
|
+
* iOS Picker Leave Animation
|
|
28670
28323
|
*/
|
|
28671
|
-
|
|
28324
|
+
const iosLeaveAnimation$2 = (baseEl) => {
|
|
28325
|
+
const baseAnimation = createAnimation();
|
|
28326
|
+
const backdropAnimation = createAnimation();
|
|
28327
|
+
const wrapperAnimation = createAnimation();
|
|
28328
|
+
backdropAnimation
|
|
28329
|
+
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
28330
|
+
.fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
|
|
28331
|
+
wrapperAnimation
|
|
28332
|
+
.addElement(baseEl.querySelector('.picker-wrapper'))
|
|
28333
|
+
.fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
|
28334
|
+
return baseAnimation
|
|
28335
|
+
.addElement(baseEl)
|
|
28336
|
+
.easing('cubic-bezier(.36,.66,.04,1)')
|
|
28337
|
+
.duration(400)
|
|
28338
|
+
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
28339
|
+
};
|
|
28340
|
+
|
|
28341
|
+
const pickerIosCss = () => `.sc-ion-picker-legacy-ios-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.sc-ion-picker-legacy-ios-h{inset-inline-start:0}.overlay-hidden.sc-ion-picker-legacy-ios-h{display:none}.picker-wrapper.sc-ion-picker-legacy-ios{border-radius:var(--border-radius);left:0;right:0;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}.picker-toolbar.sc-ion-picker-legacy-ios{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-legacy-ios{border:0;font-family:inherit}.picker-button.sc-ion-picker-legacy-ios:active,.picker-button.sc-ion-picker-legacy-ios:focus{outline:none}.picker-columns.sc-ion-picker-legacy-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;overflow:hidden}.picker-above-highlight.sc-ion-picker-legacy-ios,.picker-below-highlight.sc-ion-picker-legacy-ios{display:none;pointer-events:none}.sc-ion-picker-legacy-ios-h{--background:var(--ion-background-color, #fff);--border-width:1px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-legacy-ios{display:-ms-flexbox;display:flex;height:44px;border-bottom:0.55px solid var(--border-color)}.picker-toolbar-button.sc-ion-picker-legacy-ios{-ms-flex:1;flex:1;text-align:end}.picker-toolbar-button.sc-ion-picker-legacy-ios:last-child .picker-button.sc-ion-picker-legacy-ios{font-weight:600}.picker-toolbar-button.sc-ion-picker-legacy-ios:first-child{font-weight:normal;text-align:start}.picker-button.sc-ion-picker-legacy-ios,.picker-button.ion-activated.sc-ion-picker-legacy-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:1em;padding-inline-start:1em;-webkit-padding-end:1em;padding-inline-end:1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #0054e9);font-size:16px}.picker-columns.sc-ion-picker-legacy-ios{height:215px;-webkit-perspective:1000px;perspective:1000px}.picker-above-highlight.sc-ion-picker-legacy-ios{top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:81px;border-bottom:1px solid var(--border-color);background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:10}.picker-above-highlight.sc-ion-picker-legacy-ios{inset-inline-start:0}.picker-below-highlight.sc-ion-picker-legacy-ios{top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:119px;border-top:1px solid var(--border-color);background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 30%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:11}.picker-below-highlight.sc-ion-picker-legacy-ios{inset-inline-start:0}`;
|
|
28342
|
+
|
|
28343
|
+
const pickerMdCss = () => `.sc-ion-picker-legacy-md-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.sc-ion-picker-legacy-md-h{inset-inline-start:0}.overlay-hidden.sc-ion-picker-legacy-md-h{display:none}.picker-wrapper.sc-ion-picker-legacy-md{border-radius:var(--border-radius);left:0;right:0;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}.picker-toolbar.sc-ion-picker-legacy-md{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-legacy-md{border:0;font-family:inherit}.picker-button.sc-ion-picker-legacy-md:active,.picker-button.sc-ion-picker-legacy-md:focus{outline:none}.picker-columns.sc-ion-picker-legacy-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;overflow:hidden}.picker-above-highlight.sc-ion-picker-legacy-md,.picker-below-highlight.sc-ion-picker-legacy-md{display:none;pointer-events:none}.sc-ion-picker-legacy-md-h{--background:var(--ion-background-color, #fff);--border-width:0.55px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-legacy-md{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;height:44px}.picker-button.sc-ion-picker-legacy-md,.picker-button.ion-activated.sc-ion-picker-legacy-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:1.1em;padding-inline-start:1.1em;-webkit-padding-end:1.1em;padding-inline-end:1.1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #0054e9);font-size:14px;font-weight:500;text-transform:uppercase;-webkit-box-shadow:none;box-shadow:none}.picker-columns.sc-ion-picker-legacy-md{height:216px;-webkit-perspective:1800px;perspective:1800px}.picker-above-highlight.sc-ion-picker-legacy-md{top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:81px;border-bottom:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to bottom, var(--ion-background-color, #fff) 20%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:10}.picker-above-highlight.sc-ion-picker-legacy-md{inset-inline-start:0}.picker-below-highlight.sc-ion-picker-legacy-md{top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:119px;border-top:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to top, var(--ion-background-color, #fff) 30%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:11}.picker-below-highlight.sc-ion-picker-legacy-md{inset-inline-start:0}`;
|
|
28344
|
+
|
|
28345
|
+
// TODO(FW-2832): types
|
|
28346
|
+
/**
|
|
28347
|
+
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
28348
|
+
*/
|
|
28349
|
+
class Picker {
|
|
28350
|
+
constructor(hostRef) {
|
|
28351
|
+
registerInstance(this, hostRef);
|
|
28352
|
+
this.didPresent = createEvent(this, "ionPickerDidPresent", 7);
|
|
28353
|
+
this.willPresent = createEvent(this, "ionPickerWillPresent", 7);
|
|
28354
|
+
this.willDismiss = createEvent(this, "ionPickerWillDismiss", 7);
|
|
28355
|
+
this.didDismiss = createEvent(this, "ionPickerDidDismiss", 7);
|
|
28356
|
+
this.didPresentShorthand = createEvent(this, "didPresent", 7);
|
|
28357
|
+
this.willPresentShorthand = createEvent(this, "willPresent", 7);
|
|
28358
|
+
this.willDismissShorthand = createEvent(this, "willDismiss", 7);
|
|
28359
|
+
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
28360
|
+
this.delegateController = createDelegateController(this);
|
|
28361
|
+
this.lockController = createLockController();
|
|
28362
|
+
this.triggerController = createTriggerController();
|
|
28363
|
+
this.presented = false;
|
|
28364
|
+
/** @internal */
|
|
28365
|
+
this.hasController = false;
|
|
28366
|
+
/**
|
|
28367
|
+
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
|
28368
|
+
*/
|
|
28369
|
+
this.keyboardClose = true;
|
|
28370
|
+
/**
|
|
28371
|
+
* Array of buttons to be displayed at the top of the picker.
|
|
28372
|
+
*/
|
|
28373
|
+
this.buttons = [];
|
|
28374
|
+
/**
|
|
28375
|
+
* Array of columns to be displayed in the picker.
|
|
28376
|
+
*/
|
|
28377
|
+
this.columns = [];
|
|
28378
|
+
/**
|
|
28379
|
+
* Number of milliseconds to wait before dismissing the picker.
|
|
28380
|
+
*/
|
|
28381
|
+
this.duration = 0;
|
|
28382
|
+
/**
|
|
28383
|
+
* If `true`, a backdrop will be displayed behind the picker.
|
|
28384
|
+
*/
|
|
28385
|
+
this.showBackdrop = true;
|
|
28386
|
+
/**
|
|
28387
|
+
* If `true`, the picker will be dismissed when the backdrop is clicked.
|
|
28388
|
+
*/
|
|
28389
|
+
this.backdropDismiss = true;
|
|
28390
|
+
/**
|
|
28391
|
+
* If `true`, the picker will animate.
|
|
28392
|
+
*/
|
|
28393
|
+
this.animated = true;
|
|
28394
|
+
/**
|
|
28395
|
+
* If `true`, the picker will open. If `false`, the picker will close.
|
|
28396
|
+
* Use this if you need finer grained control over presentation, otherwise
|
|
28397
|
+
* just use the pickerController or the `trigger` property.
|
|
28398
|
+
* Note: `isOpen` will not automatically be set back to `false` when
|
|
28399
|
+
* the picker dismisses. You will need to do that in your code.
|
|
28400
|
+
*/
|
|
28401
|
+
this.isOpen = false;
|
|
28402
|
+
this.onBackdropTap = () => {
|
|
28403
|
+
this.dismiss(undefined, BACKDROP);
|
|
28404
|
+
};
|
|
28405
|
+
this.dispatchCancelHandler = (ev) => {
|
|
28406
|
+
const role = ev.detail.role;
|
|
28407
|
+
if (isCancel(role)) {
|
|
28408
|
+
const cancelButton = this.buttons.find((b) => b.role === 'cancel');
|
|
28409
|
+
this.callButtonHandler(cancelButton);
|
|
28410
|
+
}
|
|
28411
|
+
};
|
|
28412
|
+
}
|
|
28413
|
+
onIsOpenChange(newValue, oldValue) {
|
|
28414
|
+
if (newValue === true && oldValue === false) {
|
|
28415
|
+
this.present();
|
|
28416
|
+
}
|
|
28417
|
+
else if (newValue === false && oldValue === true) {
|
|
28418
|
+
this.dismiss();
|
|
28419
|
+
}
|
|
28420
|
+
}
|
|
28421
|
+
triggerChanged() {
|
|
28422
|
+
const { trigger, el, triggerController } = this;
|
|
28423
|
+
if (trigger) {
|
|
28424
|
+
triggerController.addClickListener(el, trigger);
|
|
28425
|
+
}
|
|
28426
|
+
}
|
|
28427
|
+
connectedCallback() {
|
|
28428
|
+
prepareOverlay(this.el);
|
|
28429
|
+
this.triggerChanged();
|
|
28430
|
+
}
|
|
28431
|
+
disconnectedCallback() {
|
|
28432
|
+
this.triggerController.removeClickListener();
|
|
28433
|
+
}
|
|
28434
|
+
componentWillLoad() {
|
|
28435
|
+
var _a;
|
|
28436
|
+
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
28437
|
+
setOverlayId(this.el);
|
|
28438
|
+
}
|
|
28439
|
+
}
|
|
28440
|
+
componentDidLoad() {
|
|
28441
|
+
printIonWarning('[ion-picker-legacy] - ion-picker-legacy and ion-picker-legacy-column have been deprecated in favor of new versions of the ion-picker and ion-picker-column components. These new components display inline with your page content allowing for more presentation flexibility than before.', this.el);
|
|
28442
|
+
/**
|
|
28443
|
+
* If picker was rendered with isOpen="true"
|
|
28444
|
+
* then we should open picker immediately.
|
|
28445
|
+
*/
|
|
28446
|
+
if (this.isOpen === true) {
|
|
28447
|
+
raf(() => this.present());
|
|
28448
|
+
}
|
|
28449
|
+
/**
|
|
28450
|
+
* When binding values in frameworks such as Angular
|
|
28451
|
+
* it is possible for the value to be set after the Web Component
|
|
28452
|
+
* initializes but before the value watcher is set up in Stencil.
|
|
28453
|
+
* As a result, the watcher callback may not be fired.
|
|
28454
|
+
* We work around this by manually calling the watcher
|
|
28455
|
+
* callback when the component has loaded and the watcher
|
|
28456
|
+
* is configured.
|
|
28457
|
+
*/
|
|
28458
|
+
this.triggerChanged();
|
|
28459
|
+
}
|
|
28460
|
+
/**
|
|
28461
|
+
* Present the picker overlay after it has been created.
|
|
28462
|
+
*/
|
|
28463
|
+
async present() {
|
|
28464
|
+
const unlock = await this.lockController.lock();
|
|
28465
|
+
await this.delegateController.attachViewToDom();
|
|
28466
|
+
await present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
|
|
28467
|
+
if (this.duration > 0) {
|
|
28468
|
+
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
|
|
28469
|
+
}
|
|
28470
|
+
unlock();
|
|
28471
|
+
}
|
|
28472
|
+
/**
|
|
28473
|
+
* Dismiss the picker overlay after it has been presented.
|
|
28474
|
+
*
|
|
28475
|
+
* @param data Any data to emit in the dismiss events.
|
|
28476
|
+
* @param role The role of the element that is dismissing the picker.
|
|
28477
|
+
* This can be useful in a button handler for determining which button was
|
|
28478
|
+
* clicked to dismiss the picker.
|
|
28479
|
+
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
28480
|
+
*/
|
|
28481
|
+
async dismiss(data, role) {
|
|
28482
|
+
const unlock = await this.lockController.lock();
|
|
28483
|
+
if (this.durationTimeout) {
|
|
28484
|
+
clearTimeout(this.durationTimeout);
|
|
28485
|
+
}
|
|
28486
|
+
const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
|
|
28487
|
+
if (dismissed) {
|
|
28488
|
+
this.delegateController.removeViewFromDom();
|
|
28489
|
+
}
|
|
28490
|
+
unlock();
|
|
28491
|
+
return dismissed;
|
|
28492
|
+
}
|
|
28493
|
+
/**
|
|
28494
|
+
* Returns a promise that resolves when the picker did dismiss.
|
|
28495
|
+
*/
|
|
28496
|
+
onDidDismiss() {
|
|
28497
|
+
return eventMethod(this.el, 'ionPickerDidDismiss');
|
|
28498
|
+
}
|
|
28499
|
+
/**
|
|
28500
|
+
* Returns a promise that resolves when the picker will dismiss.
|
|
28501
|
+
*/
|
|
28502
|
+
onWillDismiss() {
|
|
28503
|
+
return eventMethod(this.el, 'ionPickerWillDismiss');
|
|
28504
|
+
}
|
|
28505
|
+
/**
|
|
28506
|
+
* Get the column that matches the specified name.
|
|
28507
|
+
*
|
|
28508
|
+
* @param name The name of the column.
|
|
28509
|
+
*/
|
|
28510
|
+
getColumn(name) {
|
|
28511
|
+
return Promise.resolve(this.columns.find((column) => column.name === name));
|
|
28512
|
+
}
|
|
28513
|
+
async buttonClick(button) {
|
|
28514
|
+
const role = button.role;
|
|
28515
|
+
if (isCancel(role)) {
|
|
28516
|
+
return this.dismiss(undefined, role);
|
|
28517
|
+
}
|
|
28518
|
+
const shouldDismiss = await this.callButtonHandler(button);
|
|
28519
|
+
if (shouldDismiss) {
|
|
28520
|
+
return this.dismiss(this.getSelected(), button.role);
|
|
28521
|
+
}
|
|
28522
|
+
return Promise.resolve();
|
|
28523
|
+
}
|
|
28524
|
+
async callButtonHandler(button) {
|
|
28525
|
+
if (button) {
|
|
28526
|
+
// a handler has been provided, execute it
|
|
28527
|
+
// pass the handler the values from the inputs
|
|
28528
|
+
const rtn = await safeCall(button.handler, this.getSelected());
|
|
28529
|
+
if (rtn === false) {
|
|
28530
|
+
// if the return value of the handler is false then do not dismiss
|
|
28531
|
+
return false;
|
|
28532
|
+
}
|
|
28533
|
+
}
|
|
28534
|
+
return true;
|
|
28535
|
+
}
|
|
28536
|
+
getSelected() {
|
|
28537
|
+
const selected = {};
|
|
28538
|
+
this.columns.forEach((col, index) => {
|
|
28539
|
+
const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;
|
|
28540
|
+
selected[col.name] = {
|
|
28541
|
+
text: selectedColumn ? selectedColumn.text : undefined,
|
|
28542
|
+
value: selectedColumn ? selectedColumn.value : undefined,
|
|
28543
|
+
columnIndex: index,
|
|
28544
|
+
};
|
|
28545
|
+
});
|
|
28546
|
+
return selected;
|
|
28547
|
+
}
|
|
28548
|
+
render() {
|
|
28549
|
+
const { htmlAttributes } = this;
|
|
28550
|
+
const mode = getIonMode$1(this);
|
|
28551
|
+
return (hAsync(Host, Object.assign({ key: '80f66d33780d8a1352d24be9cb63a0cc03d01ab5', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
28552
|
+
zIndex: `${20000 + this.overlayIndex}`,
|
|
28553
|
+
}, class: Object.assign({ [mode]: true,
|
|
28554
|
+
// Used internally for styling
|
|
28555
|
+
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { key: '97fb8e10ba08b197610cb8c0cdea61103883d55f', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: 'b3969cb6fbf7153623d14e3ca1493d3370efb211', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: '299268483c3727e698d9135bfdf40349a7050ac1', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, hAsync("div", { key: '95394de3ef691899b7dbf416f56fd3e86bbdce3f', class: "picker-toolbar" }, this.buttons.map((b) => (hAsync("div", { class: buttonWrapperClass(b) }, hAsync("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass$1(b) }, b.text))))), hAsync("div", { key: '05f18bb8d00dc0e22f691b7e41f90f729a6c66d7', class: "picker-columns" }, hAsync("div", { key: '4a8fdf224effc0af67fd413e2e6aca8a78d1cf43', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => hAsync("ion-picker-legacy-column", { col: c })), hAsync("div", { key: 'e50a31db45e3f39e9d0fed36a21be9257eec09bf', class: "picker-below-highlight" }))), hAsync("div", { key: '5a78cb2176ac807ea0c195c6b76cd0e8eef9d4c0', tabindex: "0", "aria-hidden": "true" })));
|
|
28556
|
+
}
|
|
28557
|
+
get el() { return getElement(this); }
|
|
28558
|
+
static get watchers() { return {
|
|
28559
|
+
"isOpen": [{
|
|
28560
|
+
"onIsOpenChange": 0
|
|
28561
|
+
}],
|
|
28562
|
+
"trigger": [{
|
|
28563
|
+
"triggerChanged": 0
|
|
28564
|
+
}]
|
|
28565
|
+
}; }
|
|
28566
|
+
static get style() { return {
|
|
28567
|
+
ios: pickerIosCss(),
|
|
28568
|
+
md: pickerMdCss()
|
|
28569
|
+
}; }
|
|
28570
|
+
static get cmpMeta() { return {
|
|
28571
|
+
"$flags$": 34,
|
|
28572
|
+
"$tagName$": "ion-picker-legacy",
|
|
28573
|
+
"$members$": {
|
|
28574
|
+
"overlayIndex": [2, "overlay-index"],
|
|
28575
|
+
"delegate": [16],
|
|
28576
|
+
"hasController": [4, "has-controller"],
|
|
28577
|
+
"keyboardClose": [4, "keyboard-close"],
|
|
28578
|
+
"enterAnimation": [16],
|
|
28579
|
+
"leaveAnimation": [16],
|
|
28580
|
+
"buttons": [16],
|
|
28581
|
+
"columns": [16],
|
|
28582
|
+
"cssClass": [1, "css-class"],
|
|
28583
|
+
"duration": [2],
|
|
28584
|
+
"showBackdrop": [4, "show-backdrop"],
|
|
28585
|
+
"backdropDismiss": [4, "backdrop-dismiss"],
|
|
28586
|
+
"animated": [4],
|
|
28587
|
+
"htmlAttributes": [16],
|
|
28588
|
+
"isOpen": [4, "is-open"],
|
|
28589
|
+
"trigger": [1],
|
|
28590
|
+
"presented": [32],
|
|
28591
|
+
"present": [64],
|
|
28592
|
+
"dismiss": [64],
|
|
28593
|
+
"onDidDismiss": [64],
|
|
28594
|
+
"onWillDismiss": [64],
|
|
28595
|
+
"getColumn": [64]
|
|
28596
|
+
},
|
|
28597
|
+
"$listeners$": undefined,
|
|
28598
|
+
"$lazyBundleId$": "-",
|
|
28599
|
+
"$attrsToReflect$": []
|
|
28600
|
+
}; }
|
|
28601
|
+
}
|
|
28602
|
+
const buttonWrapperClass = (button) => {
|
|
28603
|
+
return {
|
|
28604
|
+
[`picker-toolbar-${button.role}`]: button.role !== undefined,
|
|
28605
|
+
'picker-toolbar-button': true,
|
|
28606
|
+
};
|
|
28607
|
+
};
|
|
28608
|
+
const buttonClass$1 = (button) => {
|
|
28609
|
+
return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));
|
|
28610
|
+
};
|
|
28611
|
+
|
|
28612
|
+
const pickerColumnCss = () => `:host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;max-width:100%;height:200px;font-size:22px;text-align:center}.assistive-focusable{left:0;right:0;top:0;bottom:0;position:absolute;z-index:1;pointer-events:none}.assistive-focusable:focus{outline:none}.picker-opts{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-width:26px;max-height:200px;outline:none;text-align:inherit;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none}.picker-item-empty{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.picker-opts::-webkit-scrollbar{display:none}::slotted(ion-picker-column-option){display:block;scroll-snap-align:center}.picker-item-empty,:host(:not([disabled])) ::slotted(ion-picker-column-option.option-disabled){scroll-snap-align:none}::slotted([slot=prefix]),::slotted([slot=suffix]){max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}::slotted([slot=prefix]){-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;-ms-flex-pack:end;justify-content:end}::slotted([slot=suffix]){-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;-ms-flex-pack:start;justify-content:start}:host(.picker-column-disabled) .picker-opts{overflow-y:hidden}:host(.picker-column-disabled) ::slotted(ion-picker-column-option){cursor:default;opacity:0.4;pointer-events:none}@media (any-hover: hover){:host(:focus) .picker-opts{outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}`;
|
|
28613
|
+
|
|
28614
|
+
/**
|
|
28615
|
+
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
28616
|
+
*
|
|
28617
|
+
* @slot prefix - Content to show on the left side of the picker options.
|
|
28618
|
+
* @slot suffix - Content to show on the right side of the picker options.
|
|
28619
|
+
*/
|
|
28620
|
+
class PickerColumn {
|
|
28672
28621
|
constructor(hostRef) {
|
|
28673
28622
|
registerInstance(this, hostRef);
|
|
28674
28623
|
this.ionChange = createEvent(this, "ionChange", 7);
|
|
@@ -29161,89 +29110,454 @@ class PickerColumn {
|
|
|
29161
29110
|
this.centerPickerItemInView(activeEl, smooth, false);
|
|
29162
29111
|
}
|
|
29163
29112
|
}
|
|
29164
|
-
/**
|
|
29165
|
-
* Sets the value prop and fires the ionChange event.
|
|
29166
|
-
* This is used when we need to fire ionChange from
|
|
29167
|
-
* user-generated events that cannot be caught with normal
|
|
29168
|
-
* input/change event listeners.
|
|
29169
|
-
* @internal
|
|
29170
|
-
*/
|
|
29171
|
-
async setValue(value) {
|
|
29172
|
-
if (this.disabled === true || this.value === value) {
|
|
29113
|
+
/**
|
|
29114
|
+
* Sets the value prop and fires the ionChange event.
|
|
29115
|
+
* This is used when we need to fire ionChange from
|
|
29116
|
+
* user-generated events that cannot be caught with normal
|
|
29117
|
+
* input/change event listeners.
|
|
29118
|
+
* @internal
|
|
29119
|
+
*/
|
|
29120
|
+
async setValue(value) {
|
|
29121
|
+
if (this.disabled === true || this.value === value) {
|
|
29122
|
+
return;
|
|
29123
|
+
}
|
|
29124
|
+
this.value = value;
|
|
29125
|
+
this.ionChange.emit({ value });
|
|
29126
|
+
}
|
|
29127
|
+
/**
|
|
29128
|
+
* Sets focus on the scrollable container within the picker column.
|
|
29129
|
+
* Use this method instead of the global `pickerColumn.focus()`.
|
|
29130
|
+
*/
|
|
29131
|
+
async setFocus() {
|
|
29132
|
+
if (this.assistiveFocusable) {
|
|
29133
|
+
this.assistiveFocusable.focus();
|
|
29134
|
+
}
|
|
29135
|
+
}
|
|
29136
|
+
connectedCallback() {
|
|
29137
|
+
var _a;
|
|
29138
|
+
this.ariaLabel = (_a = this.el.getAttribute('aria-label')) !== null && _a !== void 0 ? _a : 'Select a value';
|
|
29139
|
+
}
|
|
29140
|
+
get activeItem() {
|
|
29141
|
+
const { value } = this;
|
|
29142
|
+
const options = Array.from(this.el.querySelectorAll('ion-picker-column-option'));
|
|
29143
|
+
return options.find((option) => {
|
|
29144
|
+
/**
|
|
29145
|
+
* If the whole picker column is disabled, the current value should appear active
|
|
29146
|
+
* If the current value item is specifically disabled, it should not appear active
|
|
29147
|
+
*/
|
|
29148
|
+
if (!this.disabled && option.disabled) {
|
|
29149
|
+
return false;
|
|
29150
|
+
}
|
|
29151
|
+
return option.value === value;
|
|
29152
|
+
});
|
|
29153
|
+
}
|
|
29154
|
+
render() {
|
|
29155
|
+
const { color, disabled, isActive, numericInput } = this;
|
|
29156
|
+
const mode = getIonMode$1(this);
|
|
29157
|
+
return (hAsync(Host, { key: '234c96a501d7ac413b9b0ea56b33017681e25b40', class: createColorClasses$1(color, {
|
|
29158
|
+
[mode]: true,
|
|
29159
|
+
['picker-column-active']: isActive,
|
|
29160
|
+
['picker-column-numeric-input']: numericInput,
|
|
29161
|
+
['picker-column-disabled']: disabled,
|
|
29162
|
+
}) }, hAsync("slot", { key: '9dc15ea0601ddd2cb2e0a745e91e036a8bd96f8b', name: "prefix" }), hAsync("div", { key: 'de4fe28ee4bc46b7c0420d6ab0df0e7809443da9', class: "picker-opts", ref: (el) => {
|
|
29163
|
+
this.scrollEl = el;
|
|
29164
|
+
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, hAsync("div", { key: '5297617462cc30e9444039ae032d8bdf718349af', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { key: '55ea39ef867bcb1a11a912d52ecd20cb886c5fb3', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { key: '3496730ce6182ebfd33e0ee4bafc130feb575a31', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("slot", { key: '44c3628aa957d60f799dc7019f72fe8b676c7843' }), hAsync("div", { key: '5a1809f6c949678a67e0d4b5bfe93ea335c0161d', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { key: '98fd57f1c66dbaebc2db2dd5da142671b3159fd1', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { key: '85590708abddfa885994e549deac64866fec938f', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), hAsync("slot", { key: 'bb7e674f543696a80fcbfb1f68f2e975826898a6', name: "suffix" })));
|
|
29165
|
+
}
|
|
29166
|
+
get el() { return getElement(this); }
|
|
29167
|
+
static get watchers() { return {
|
|
29168
|
+
"aria-label": [{
|
|
29169
|
+
"ariaLabelChanged": 0
|
|
29170
|
+
}],
|
|
29171
|
+
"value": [{
|
|
29172
|
+
"valueChange": 0
|
|
29173
|
+
}]
|
|
29174
|
+
}; }
|
|
29175
|
+
static get style() { return pickerColumnCss(); }
|
|
29176
|
+
static get cmpMeta() { return {
|
|
29177
|
+
"$flags$": 265,
|
|
29178
|
+
"$tagName$": "ion-picker-column",
|
|
29179
|
+
"$members$": {
|
|
29180
|
+
"disabled": [4],
|
|
29181
|
+
"value": [1032],
|
|
29182
|
+
"color": [513],
|
|
29183
|
+
"numericInput": [4, "numeric-input"],
|
|
29184
|
+
"ariaLabel": [32],
|
|
29185
|
+
"isActive": [32],
|
|
29186
|
+
"scrollActiveItemIntoView": [64],
|
|
29187
|
+
"setValue": [64],
|
|
29188
|
+
"setFocus": [64]
|
|
29189
|
+
},
|
|
29190
|
+
"$listeners$": undefined,
|
|
29191
|
+
"$lazyBundleId$": "-",
|
|
29192
|
+
"$attrsToReflect$": [["color", "color"]]
|
|
29193
|
+
}; }
|
|
29194
|
+
}
|
|
29195
|
+
const PICKER_ITEM_ACTIVE_CLASS = 'option-active';
|
|
29196
|
+
|
|
29197
|
+
const pickerColumnIosCss = () => `.picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}.picker-opt{inset-inline-start:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:20px;line-height:42px;pointer-events:none}.picker-opt{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-transform-origin:center center;transform-origin:center center;height:46px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:20px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}:host-context([dir=rtl]) .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}[dir=rtl] .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}@supports selector(:dir(rtl)){.picker-opt:dir(rtl){-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}}`;
|
|
29198
|
+
|
|
29199
|
+
const pickerColumnMdCss = () => `.picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}.picker-opt{inset-inline-start:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:22px;line-height:42px;pointer-events:none}.picker-opt{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;height:43px;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:22px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}.picker-prefix,.picker-suffix,.picker-opt.picker-opt-selected{color:var(--ion-color-primary, #0054e9)}`;
|
|
29200
|
+
|
|
29201
|
+
/**
|
|
29202
|
+
* @internal
|
|
29203
|
+
*/
|
|
29204
|
+
class PickerColumnCmp {
|
|
29205
|
+
constructor(hostRef) {
|
|
29206
|
+
registerInstance(this, hostRef);
|
|
29207
|
+
this.ionPickerColChange = createEvent(this, "ionPickerColChange", 7);
|
|
29208
|
+
this.optHeight = 0;
|
|
29209
|
+
this.rotateFactor = 0;
|
|
29210
|
+
this.scaleFactor = 1;
|
|
29211
|
+
this.velocity = 0;
|
|
29212
|
+
this.y = 0;
|
|
29213
|
+
this.noAnimate = true;
|
|
29214
|
+
// `colDidChange` is a flag that gets set when the column is changed
|
|
29215
|
+
// dynamically. When this flag is set, the column will refresh
|
|
29216
|
+
// after the component re-renders to incorporate the new column data.
|
|
29217
|
+
// This is necessary because `this.refresh` queries for the option elements,
|
|
29218
|
+
// so it needs to wait for the latest elements to be available in the DOM.
|
|
29219
|
+
// Ex: column is created with 3 options. User updates the column data
|
|
29220
|
+
// to have 5 options. The column will still think it only has 3 options.
|
|
29221
|
+
this.colDidChange = false;
|
|
29222
|
+
}
|
|
29223
|
+
colChanged() {
|
|
29224
|
+
this.colDidChange = true;
|
|
29225
|
+
}
|
|
29226
|
+
async connectedCallback() {
|
|
29227
|
+
let pickerRotateFactor = 0;
|
|
29228
|
+
let pickerScaleFactor = 0.81;
|
|
29229
|
+
const mode = getIonMode$1(this);
|
|
29230
|
+
if (mode === 'ios') {
|
|
29231
|
+
pickerRotateFactor = -0.46;
|
|
29232
|
+
pickerScaleFactor = 1;
|
|
29233
|
+
}
|
|
29234
|
+
this.rotateFactor = pickerRotateFactor;
|
|
29235
|
+
this.scaleFactor = pickerScaleFactor;
|
|
29236
|
+
this.gesture = (await Promise.resolve().then(function () { return index; })).createGesture({
|
|
29237
|
+
el: this.el,
|
|
29238
|
+
gestureName: 'picker-swipe',
|
|
29239
|
+
gesturePriority: 100,
|
|
29240
|
+
threshold: 0,
|
|
29241
|
+
passive: false,
|
|
29242
|
+
onStart: (ev) => this.onStart(ev),
|
|
29243
|
+
onMove: (ev) => this.onMove(ev),
|
|
29244
|
+
onEnd: (ev) => this.onEnd(ev),
|
|
29245
|
+
});
|
|
29246
|
+
this.gesture.enable();
|
|
29247
|
+
// Options have not been initialized yet
|
|
29248
|
+
// Animation must be disabled through the `noAnimate` flag
|
|
29249
|
+
// Otherwise, the options will render
|
|
29250
|
+
// at the top of the column and transition down
|
|
29251
|
+
this.tmrId = setTimeout(() => {
|
|
29252
|
+
this.noAnimate = false;
|
|
29253
|
+
// After initialization, `refresh()` will be called
|
|
29254
|
+
// At this point, animation will be enabled. The options will
|
|
29255
|
+
// animate as they are being selected.
|
|
29256
|
+
this.refresh(true);
|
|
29257
|
+
}, 250);
|
|
29258
|
+
}
|
|
29259
|
+
componentDidLoad() {
|
|
29260
|
+
this.onDomChange();
|
|
29261
|
+
}
|
|
29262
|
+
componentDidUpdate() {
|
|
29263
|
+
// Options may have changed since last update.
|
|
29264
|
+
if (this.colDidChange) {
|
|
29265
|
+
// Animation must be disabled through the `onDomChange` parameter.
|
|
29266
|
+
// Otherwise, the recently added options will render
|
|
29267
|
+
// at the top of the column and transition down
|
|
29268
|
+
this.onDomChange(true, false);
|
|
29269
|
+
this.colDidChange = false;
|
|
29270
|
+
}
|
|
29271
|
+
}
|
|
29272
|
+
disconnectedCallback() {
|
|
29273
|
+
if (this.rafId !== undefined)
|
|
29274
|
+
cancelAnimationFrame(this.rafId);
|
|
29275
|
+
if (this.tmrId)
|
|
29276
|
+
clearTimeout(this.tmrId);
|
|
29277
|
+
if (this.gesture) {
|
|
29278
|
+
this.gesture.destroy();
|
|
29279
|
+
this.gesture = undefined;
|
|
29280
|
+
}
|
|
29281
|
+
}
|
|
29282
|
+
emitColChange() {
|
|
29283
|
+
this.ionPickerColChange.emit(this.col);
|
|
29284
|
+
}
|
|
29285
|
+
setSelected(selectedIndex, duration) {
|
|
29286
|
+
// if there is a selected index, then figure out it's y position
|
|
29287
|
+
// if there isn't a selected index, then just use the top y position
|
|
29288
|
+
const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;
|
|
29289
|
+
this.velocity = 0;
|
|
29290
|
+
// set what y position we're at
|
|
29291
|
+
if (this.rafId !== undefined)
|
|
29292
|
+
cancelAnimationFrame(this.rafId);
|
|
29293
|
+
this.update(y, duration, true);
|
|
29294
|
+
this.emitColChange();
|
|
29295
|
+
}
|
|
29296
|
+
update(y, duration, saveY) {
|
|
29297
|
+
if (!this.optsEl) {
|
|
29298
|
+
return;
|
|
29299
|
+
}
|
|
29300
|
+
// ensure we've got a good round number :)
|
|
29301
|
+
let translateY = 0;
|
|
29302
|
+
let translateZ = 0;
|
|
29303
|
+
const { col, rotateFactor } = this;
|
|
29304
|
+
const prevSelected = col.selectedIndex;
|
|
29305
|
+
const selectedIndex = (col.selectedIndex = this.indexForY(-y));
|
|
29306
|
+
const durationStr = duration === 0 ? '' : duration + 'ms';
|
|
29307
|
+
const scaleStr = `scale(${this.scaleFactor})`;
|
|
29308
|
+
const children = this.optsEl.children;
|
|
29309
|
+
for (let i = 0; i < children.length; i++) {
|
|
29310
|
+
const button = children[i];
|
|
29311
|
+
const opt = col.options[i];
|
|
29312
|
+
const optOffset = i * this.optHeight + y;
|
|
29313
|
+
let transform = '';
|
|
29314
|
+
if (rotateFactor !== 0) {
|
|
29315
|
+
const rotateX = optOffset * rotateFactor;
|
|
29316
|
+
if (Math.abs(rotateX) <= 90) {
|
|
29317
|
+
translateY = 0;
|
|
29318
|
+
translateZ = 90;
|
|
29319
|
+
transform = `rotateX(${rotateX}deg) `;
|
|
29320
|
+
}
|
|
29321
|
+
else {
|
|
29322
|
+
translateY = -9999;
|
|
29323
|
+
}
|
|
29324
|
+
}
|
|
29325
|
+
else {
|
|
29326
|
+
translateZ = 0;
|
|
29327
|
+
translateY = optOffset;
|
|
29328
|
+
}
|
|
29329
|
+
const selected = selectedIndex === i;
|
|
29330
|
+
transform += `translate3d(0px,${translateY}px,${translateZ}px) `;
|
|
29331
|
+
if (this.scaleFactor !== 1 && !selected) {
|
|
29332
|
+
transform += scaleStr;
|
|
29333
|
+
}
|
|
29334
|
+
// Update transition duration
|
|
29335
|
+
if (this.noAnimate) {
|
|
29336
|
+
opt.duration = 0;
|
|
29337
|
+
button.style.transitionDuration = '';
|
|
29338
|
+
}
|
|
29339
|
+
else if (duration !== opt.duration) {
|
|
29340
|
+
opt.duration = duration;
|
|
29341
|
+
button.style.transitionDuration = durationStr;
|
|
29342
|
+
}
|
|
29343
|
+
// Update transform
|
|
29344
|
+
if (transform !== opt.transform) {
|
|
29345
|
+
opt.transform = transform;
|
|
29346
|
+
}
|
|
29347
|
+
button.style.transform = transform;
|
|
29348
|
+
/**
|
|
29349
|
+
* Ensure that the select column
|
|
29350
|
+
* item has the selected class
|
|
29351
|
+
*/
|
|
29352
|
+
opt.selected = selected;
|
|
29353
|
+
if (selected) {
|
|
29354
|
+
button.classList.add(PICKER_OPT_SELECTED);
|
|
29355
|
+
}
|
|
29356
|
+
else {
|
|
29357
|
+
button.classList.remove(PICKER_OPT_SELECTED);
|
|
29358
|
+
}
|
|
29359
|
+
}
|
|
29360
|
+
this.col.prevSelected = prevSelected;
|
|
29361
|
+
if (saveY) {
|
|
29362
|
+
this.y = y;
|
|
29363
|
+
}
|
|
29364
|
+
if (this.lastIndex !== selectedIndex) {
|
|
29365
|
+
// have not set a last index yet
|
|
29366
|
+
hapticSelectionChanged();
|
|
29367
|
+
this.lastIndex = selectedIndex;
|
|
29368
|
+
}
|
|
29369
|
+
}
|
|
29370
|
+
decelerate() {
|
|
29371
|
+
if (this.velocity !== 0) {
|
|
29372
|
+
// still decelerating
|
|
29373
|
+
this.velocity *= DECELERATION_FRICTION;
|
|
29374
|
+
// do not let it go slower than a velocity of 1
|
|
29375
|
+
this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);
|
|
29376
|
+
let y = this.y + this.velocity;
|
|
29377
|
+
if (y > this.minY) {
|
|
29378
|
+
// whoops, it's trying to scroll up farther than the options we have!
|
|
29379
|
+
y = this.minY;
|
|
29380
|
+
this.velocity = 0;
|
|
29381
|
+
}
|
|
29382
|
+
else if (y < this.maxY) {
|
|
29383
|
+
// gahh, it's trying to scroll down farther than we can!
|
|
29384
|
+
y = this.maxY;
|
|
29385
|
+
this.velocity = 0;
|
|
29386
|
+
}
|
|
29387
|
+
this.update(y, 0, true);
|
|
29388
|
+
const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;
|
|
29389
|
+
if (notLockedIn) {
|
|
29390
|
+
// isn't locked in yet, keep decelerating until it is
|
|
29391
|
+
this.rafId = requestAnimationFrame(() => this.decelerate());
|
|
29392
|
+
}
|
|
29393
|
+
else {
|
|
29394
|
+
this.velocity = 0;
|
|
29395
|
+
this.emitColChange();
|
|
29396
|
+
hapticSelectionEnd();
|
|
29397
|
+
}
|
|
29398
|
+
}
|
|
29399
|
+
else if (this.y % this.optHeight !== 0) {
|
|
29400
|
+
// needs to still get locked into a position so options line up
|
|
29401
|
+
const currentPos = Math.abs(this.y % this.optHeight);
|
|
29402
|
+
// create a velocity in the direction it needs to scroll
|
|
29403
|
+
this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;
|
|
29404
|
+
this.decelerate();
|
|
29405
|
+
}
|
|
29406
|
+
}
|
|
29407
|
+
indexForY(y) {
|
|
29408
|
+
return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);
|
|
29409
|
+
}
|
|
29410
|
+
onStart(detail) {
|
|
29411
|
+
// We have to prevent default in order to block scrolling under the picker
|
|
29412
|
+
// but we DO NOT have to stop propagation, since we still want
|
|
29413
|
+
// some "click" events to capture
|
|
29414
|
+
if (detail.event.cancelable) {
|
|
29415
|
+
detail.event.preventDefault();
|
|
29416
|
+
}
|
|
29417
|
+
detail.event.stopPropagation();
|
|
29418
|
+
hapticSelectionStart();
|
|
29419
|
+
// reset everything
|
|
29420
|
+
if (this.rafId !== undefined)
|
|
29421
|
+
cancelAnimationFrame(this.rafId);
|
|
29422
|
+
const options = this.col.options;
|
|
29423
|
+
let minY = options.length - 1;
|
|
29424
|
+
let maxY = 0;
|
|
29425
|
+
for (let i = 0; i < options.length; i++) {
|
|
29426
|
+
if (!options[i].disabled) {
|
|
29427
|
+
minY = Math.min(minY, i);
|
|
29428
|
+
maxY = Math.max(maxY, i);
|
|
29429
|
+
}
|
|
29430
|
+
}
|
|
29431
|
+
this.minY = -(minY * this.optHeight);
|
|
29432
|
+
this.maxY = -(maxY * this.optHeight);
|
|
29433
|
+
}
|
|
29434
|
+
onMove(detail) {
|
|
29435
|
+
if (detail.event.cancelable) {
|
|
29436
|
+
detail.event.preventDefault();
|
|
29437
|
+
}
|
|
29438
|
+
detail.event.stopPropagation();
|
|
29439
|
+
// update the scroll position relative to pointer start position
|
|
29440
|
+
let y = this.y + detail.deltaY;
|
|
29441
|
+
if (y > this.minY) {
|
|
29442
|
+
// scrolling up higher than scroll area
|
|
29443
|
+
y = Math.pow(y, 0.8);
|
|
29444
|
+
this.bounceFrom = y;
|
|
29445
|
+
}
|
|
29446
|
+
else if (y < this.maxY) {
|
|
29447
|
+
// scrolling down below scroll area
|
|
29448
|
+
y += Math.pow(this.maxY - y, 0.9);
|
|
29449
|
+
this.bounceFrom = y;
|
|
29450
|
+
}
|
|
29451
|
+
else {
|
|
29452
|
+
this.bounceFrom = 0;
|
|
29453
|
+
}
|
|
29454
|
+
this.update(y, 0, false);
|
|
29455
|
+
}
|
|
29456
|
+
onEnd(detail) {
|
|
29457
|
+
if (this.bounceFrom > 0) {
|
|
29458
|
+
// bounce back up
|
|
29459
|
+
this.update(this.minY, 100, true);
|
|
29460
|
+
this.emitColChange();
|
|
29173
29461
|
return;
|
|
29174
29462
|
}
|
|
29175
|
-
this.
|
|
29176
|
-
|
|
29177
|
-
|
|
29178
|
-
|
|
29179
|
-
|
|
29180
|
-
|
|
29181
|
-
|
|
29182
|
-
|
|
29183
|
-
|
|
29184
|
-
|
|
29463
|
+
else if (this.bounceFrom < 0) {
|
|
29464
|
+
// bounce back down
|
|
29465
|
+
this.update(this.maxY, 100, true);
|
|
29466
|
+
this.emitColChange();
|
|
29467
|
+
return;
|
|
29468
|
+
}
|
|
29469
|
+
this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
|
|
29470
|
+
if (this.velocity === 0 && detail.deltaY === 0) {
|
|
29471
|
+
const opt = detail.event.target.closest('.picker-opt');
|
|
29472
|
+
if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {
|
|
29473
|
+
this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);
|
|
29474
|
+
}
|
|
29475
|
+
}
|
|
29476
|
+
else {
|
|
29477
|
+
this.y += detail.deltaY;
|
|
29478
|
+
if (Math.abs(detail.velocityY) < 0.05) {
|
|
29479
|
+
const isScrollingUp = detail.deltaY > 0;
|
|
29480
|
+
const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;
|
|
29481
|
+
if (isScrollingUp && optHeightFraction > 0.5) {
|
|
29482
|
+
this.velocity = Math.abs(this.velocity) * -1;
|
|
29483
|
+
}
|
|
29484
|
+
else if (!isScrollingUp && optHeightFraction <= 0.5) {
|
|
29485
|
+
this.velocity = Math.abs(this.velocity);
|
|
29486
|
+
}
|
|
29487
|
+
}
|
|
29488
|
+
this.decelerate();
|
|
29185
29489
|
}
|
|
29186
29490
|
}
|
|
29187
|
-
|
|
29491
|
+
refresh(forceRefresh, animated) {
|
|
29188
29492
|
var _a;
|
|
29189
|
-
|
|
29190
|
-
|
|
29191
|
-
|
|
29192
|
-
|
|
29193
|
-
|
|
29194
|
-
|
|
29195
|
-
|
|
29196
|
-
* If the whole picker column is disabled, the current value should appear active
|
|
29197
|
-
* If the current value item is specifically disabled, it should not appear active
|
|
29198
|
-
*/
|
|
29199
|
-
if (!this.disabled && option.disabled) {
|
|
29200
|
-
return false;
|
|
29493
|
+
let min = this.col.options.length - 1;
|
|
29494
|
+
let max = 0;
|
|
29495
|
+
const options = this.col.options;
|
|
29496
|
+
for (let i = 0; i < options.length; i++) {
|
|
29497
|
+
if (!options[i].disabled) {
|
|
29498
|
+
min = Math.min(min, i);
|
|
29499
|
+
max = Math.max(max, i);
|
|
29201
29500
|
}
|
|
29202
|
-
|
|
29203
|
-
|
|
29501
|
+
}
|
|
29502
|
+
/**
|
|
29503
|
+
* Only update selected value if column has a
|
|
29504
|
+
* velocity of 0. If it does not, then the
|
|
29505
|
+
* column is animating might land on
|
|
29506
|
+
* a value different than the value at
|
|
29507
|
+
* selectedIndex
|
|
29508
|
+
*/
|
|
29509
|
+
if (this.velocity !== 0) {
|
|
29510
|
+
return;
|
|
29511
|
+
}
|
|
29512
|
+
const selectedIndex = clamp(min, (_a = this.col.selectedIndex) !== null && _a !== void 0 ? _a : 0, max);
|
|
29513
|
+
if (this.col.prevSelected !== selectedIndex || forceRefresh) {
|
|
29514
|
+
const y = selectedIndex * this.optHeight * -1;
|
|
29515
|
+
const duration = animated ? TRANSITION_DURATION : 0;
|
|
29516
|
+
this.velocity = 0;
|
|
29517
|
+
this.update(y, duration, true);
|
|
29518
|
+
}
|
|
29519
|
+
}
|
|
29520
|
+
onDomChange(forceRefresh, animated) {
|
|
29521
|
+
const colEl = this.optsEl;
|
|
29522
|
+
if (colEl) {
|
|
29523
|
+
// DOM READ
|
|
29524
|
+
// We perfom a DOM read over a rendered item, this needs to happen after the first render or after the column has changed
|
|
29525
|
+
this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;
|
|
29526
|
+
}
|
|
29527
|
+
this.refresh(forceRefresh, animated);
|
|
29204
29528
|
}
|
|
29205
29529
|
render() {
|
|
29206
|
-
const
|
|
29530
|
+
const col = this.col;
|
|
29207
29531
|
const mode = getIonMode$1(this);
|
|
29208
|
-
return (hAsync(Host, { key: '
|
|
29209
|
-
|
|
29210
|
-
|
|
29211
|
-
['picker-column-numeric-input']: numericInput,
|
|
29212
|
-
['picker-column-disabled']: disabled,
|
|
29213
|
-
}) }, hAsync("slot", { key: '9dc15ea0601ddd2cb2e0a745e91e036a8bd96f8b', name: "prefix" }), hAsync("div", { key: 'de4fe28ee4bc46b7c0420d6ab0df0e7809443da9', class: "picker-opts", ref: (el) => {
|
|
29214
|
-
this.scrollEl = el;
|
|
29215
|
-
}, role: "slider", tabindex: this.disabled ? undefined : 0, "aria-label": this.ariaLabel, "aria-valuemin": 0, "aria-valuemax": 0, "aria-valuenow": 0, "aria-valuetext": this.getOptionValueText(this.activeItem), "aria-orientation": "vertical", onKeyDown: (ev) => this.onKeyDown(ev) }, hAsync("div", { key: '5297617462cc30e9444039ae032d8bdf718349af', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { key: '55ea39ef867bcb1a11a912d52ecd20cb886c5fb3', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { key: '3496730ce6182ebfd33e0ee4bafc130feb575a31', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("slot", { key: '44c3628aa957d60f799dc7019f72fe8b676c7843' }), hAsync("div", { key: '5a1809f6c949678a67e0d4b5bfe93ea335c0161d', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { key: '98fd57f1c66dbaebc2db2dd5da142671b3159fd1', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), hAsync("div", { key: '85590708abddfa885994e549deac64866fec938f', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), hAsync("slot", { key: 'bb7e674f543696a80fcbfb1f68f2e975826898a6', name: "suffix" })));
|
|
29532
|
+
return (hAsync(Host, { key: '86125e95f18837dfd021db01777d72a1562d8ee3', class: Object.assign({ [mode]: true, 'picker-col': true, 'picker-opts-left': this.col.align === 'left', 'picker-opts-right': this.col.align === 'right' }, getClassMap(col.cssClass)), style: {
|
|
29533
|
+
'max-width': this.col.columnWidth,
|
|
29534
|
+
} }, col.prefix && (hAsync("div", { key: 'b0f3d39e0bd128781066ffefb7a1e40d12a9e76d', class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), hAsync("div", { key: '0b106ac4d56916eaaa7f09d1b68348b3754b7bba', class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (hAsync("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (hAsync("div", { key: '00ff2f9dbb4561787e5a5223327c6a2a33f8362e', class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
|
|
29216
29535
|
}
|
|
29217
29536
|
get el() { return getElement(this); }
|
|
29218
29537
|
static get watchers() { return {
|
|
29219
|
-
"
|
|
29220
|
-
"
|
|
29221
|
-
}],
|
|
29222
|
-
"value": [{
|
|
29223
|
-
"valueChange": 0
|
|
29538
|
+
"col": [{
|
|
29539
|
+
"colChanged": 0
|
|
29224
29540
|
}]
|
|
29225
29541
|
}; }
|
|
29226
|
-
static get style() { return
|
|
29542
|
+
static get style() { return {
|
|
29543
|
+
ios: pickerColumnIosCss(),
|
|
29544
|
+
md: pickerColumnMdCss()
|
|
29545
|
+
}; }
|
|
29227
29546
|
static get cmpMeta() { return {
|
|
29228
|
-
"$flags$":
|
|
29229
|
-
"$tagName$": "ion-picker-column",
|
|
29547
|
+
"$flags$": 32,
|
|
29548
|
+
"$tagName$": "ion-picker-legacy-column",
|
|
29230
29549
|
"$members$": {
|
|
29231
|
-
"
|
|
29232
|
-
"value": [1032],
|
|
29233
|
-
"color": [513],
|
|
29234
|
-
"numericInput": [4, "numeric-input"],
|
|
29235
|
-
"ariaLabel": [32],
|
|
29236
|
-
"isActive": [32],
|
|
29237
|
-
"scrollActiveItemIntoView": [64],
|
|
29238
|
-
"setValue": [64],
|
|
29239
|
-
"setFocus": [64]
|
|
29550
|
+
"col": [16]
|
|
29240
29551
|
},
|
|
29241
29552
|
"$listeners$": undefined,
|
|
29242
29553
|
"$lazyBundleId$": "-",
|
|
29243
|
-
"$attrsToReflect$": [
|
|
29554
|
+
"$attrsToReflect$": []
|
|
29244
29555
|
}; }
|
|
29245
29556
|
}
|
|
29246
|
-
const
|
|
29557
|
+
const PICKER_OPT_SELECTED = 'picker-opt-selected';
|
|
29558
|
+
const DECELERATION_FRICTION = 0.97;
|
|
29559
|
+
const MAX_PICKER_SPEED = 90;
|
|
29560
|
+
const TRANSITION_DURATION = 150;
|
|
29247
29561
|
|
|
29248
29562
|
const pickerColumnOptionIosCss = () => `.picker-column-option-button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}:host(.option-disabled){opacity:0.4}:host(.option-disabled) .picker-column-option-button{cursor:default}`;
|
|
29249
29563
|
|
|
@@ -30440,9 +30754,9 @@ const mdLeaveAnimation$1 = (baseEl) => {
|
|
|
30440
30754
|
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
30441
30755
|
};
|
|
30442
30756
|
|
|
30443
|
-
const popoverIosCss = () => `:host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{z-index:10}.popover-content{display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}::slotted(.popover-viewport){--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-start:dir(rtl)){--offset-x:-5px}}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-end:dir(rtl)){--offset-x:5px}}:host
|
|
30757
|
+
const popoverIosCss = () => `:host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{z-index:10}.popover-content{display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}::slotted(.popover-viewport){--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-start:dir(rtl)){--offset-x:-5px}}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-end:dir(rtl)){--offset-x:5px}}:host{--width:200px;--max-height:90%;--box-shadow:none;--backdrop-opacity:var(--ion-backdrop-opacity, 0.08)}:host(.popover-desktop){--box-shadow:0px 4px 16px 0px rgba(0, 0, 0, 0.12)}.popover-content{border-radius:10px}:host(.popover-desktop) .popover-content{border:0.5px solid var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6))}.popover-arrow{display:block;position:absolute;width:20px;height:10px;overflow:hidden;z-index:11}.popover-arrow::after{top:3px;border-radius:3px;position:absolute;width:14px;height:14px;-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--background);content:"";z-index:10}.popover-arrow::after{inset-inline-start:3px}:host(.popover-bottom) .popover-arrow{top:auto;bottom:-10px}:host(.popover-bottom) .popover-arrow::after{top:-6px}:host(.popover-side-left) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host(.popover-side-right) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}:host(.popover-side-top) .popover-arrow{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host(.popover-side-start) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host-context([dir=rtl]):host(.popover-side-start) .popover-arrow,:host-context([dir=rtl]).popover-side-start .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@supports selector(:dir(rtl)){:host(.popover-side-start:dir(rtl)) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}}:host(.popover-side-end) .popover-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}:host-context([dir=rtl]):host(.popover-side-end) .popover-arrow,:host-context([dir=rtl]).popover-side-end .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}@supports selector(:dir(rtl)){:host(.popover-side-end:dir(rtl)) .popover-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}}.popover-arrow,.popover-content{opacity:0}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.popover-translucent) .popover-content,:host(.popover-translucent) .popover-arrow::after{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}`;
|
|
30444
30758
|
|
|
30445
|
-
const popoverMdCss = () => `:host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{z-index:10}.popover-content{display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}::slotted(.popover-viewport){--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-start:dir(rtl)){--offset-x:-5px}}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-end:dir(rtl)){--offset-x:5px}}:host
|
|
30759
|
+
const popoverMdCss = () => `:host{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;--offset-x:0px;--offset-y:0px;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}:host(.popover-nested){pointer-events:none}:host(.popover-nested) .popover-wrapper{pointer-events:auto}:host(.overlay-hidden){display:none}.popover-wrapper{z-index:10}.popover-content{display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}::slotted(.popover-viewport){--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host(.popover-nested.popover-side-left){--offset-x:5px}:host(.popover-nested.popover-side-right){--offset-x:-5px}:host(.popover-nested.popover-side-start){--offset-x:5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-start),:host-context([dir=rtl]).popover-nested.popover-side-start{--offset-x:-5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-start:dir(rtl)){--offset-x:-5px}}:host(.popover-nested.popover-side-end){--offset-x:-5px}:host-context([dir=rtl]):host(.popover-nested.popover-side-end),:host-context([dir=rtl]).popover-nested.popover-side-end{--offset-x:5px}@supports selector(:dir(rtl)){:host(.popover-nested.popover-side-end:dir(rtl)){--offset-x:5px}}:host{--width:250px;--max-height:90%;--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}.popover-content{border-radius:4px;-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]) .popover-content{-webkit-transform-origin:right top;transform-origin:right top}[dir=rtl] .popover-content{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.popover-content:dir(rtl){-webkit-transform-origin:right top;transform-origin:right top}}.popover-viewport{-webkit-transition-delay:100ms;transition-delay:100ms}.popover-wrapper{opacity:0}`;
|
|
30446
30760
|
|
|
30447
30761
|
// TODO(FW-2832): types
|
|
30448
30762
|
/**
|
|
@@ -30666,10 +30980,6 @@ class Popover {
|
|
|
30666
30980
|
this.headerResizeObserver.disconnect();
|
|
30667
30981
|
this.headerResizeObserver = undefined;
|
|
30668
30982
|
}
|
|
30669
|
-
// Clean up aria-hidden if removed without dismiss() being called
|
|
30670
|
-
if (this.presented) {
|
|
30671
|
-
cleanupRootFocusTrapAccessibility();
|
|
30672
|
-
}
|
|
30673
30983
|
}
|
|
30674
30984
|
componentWillLoad() {
|
|
30675
30985
|
var _a, _b;
|
|
@@ -30908,9 +31218,9 @@ class Popover {
|
|
|
30908
31218
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
30909
31219
|
const desktop = isPlatform('desktop');
|
|
30910
31220
|
const enableArrow = arrow && !parentPopover;
|
|
30911
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
31221
|
+
return (hAsync(Host, Object.assign({ key: '2edd8333c630efbce59071f8a383e4326e928dbc', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
30912
31222
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
30913
|
-
}, 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 && hAsync("ion-backdrop", { key: '
|
|
31223
|
+
}, 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 && hAsync("ion-backdrop", { key: 'aac4e68b08197534375e8ea3f8c9ea0c10ab2af4', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: 'b7f4ebf57d4148b32856b0075d286f454be8de5d', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && hAsync("div", { key: '607d94c28d73e8e957175a7c0f6e8a99ec4dcd53', class: "popover-arrow", part: "arrow" }), hAsync("div", { key: '4366a5a5de550c09895e923f345583508e1ec30c', class: "popover-content", part: "content" }, hAsync("slot", { key: 'eb7886fbc99c15b667b7d825d24f1c12d9380f03' })))));
|
|
30914
31224
|
}
|
|
30915
31225
|
get el() { return getElement(this); }
|
|
30916
31226
|
static get watchers() { return {
|
|
@@ -31021,7 +31331,7 @@ class ProgressBar {
|
|
|
31021
31331
|
const mode = getIonMode$1(this);
|
|
31022
31332
|
// If the progress is displayed as a solid bar.
|
|
31023
31333
|
const progressSolid = buffer === 1;
|
|
31024
|
-
return (hAsync(Host, { key: '
|
|
31334
|
+
return (hAsync(Host, { key: 'c859e48f3d24a458239e36d925e5dc003ed07c6b', role: "progressbar", "aria-valuenow": type === 'determinate' ? value : null, "aria-valuemin": "0", "aria-valuemax": "1", class: createColorClasses$1(color, {
|
|
31025
31335
|
[mode]: true,
|
|
31026
31336
|
[`progress-bar-${type}`]: true,
|
|
31027
31337
|
'progress-paused': paused,
|
|
@@ -31206,7 +31516,7 @@ class Radio {
|
|
|
31206
31516
|
const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex, alignment } = this;
|
|
31207
31517
|
const mode = getIonMode$1(this);
|
|
31208
31518
|
const inItem = hostContext('ion-item', el);
|
|
31209
|
-
return (hAsync(Host, { key: '
|
|
31519
|
+
return (hAsync(Host, { key: 'af5dc59ed528150872e907ed1036e3e2decba939', onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses$1(color, {
|
|
31210
31520
|
[mode]: true,
|
|
31211
31521
|
'in-item': inItem,
|
|
31212
31522
|
'radio-checked': checked,
|
|
@@ -31217,10 +31527,10 @@ class Radio {
|
|
|
31217
31527
|
// Focus and active styling should not apply when the radio is in an item
|
|
31218
31528
|
'ion-activatable': !inItem,
|
|
31219
31529
|
'ion-focusable': !inItem,
|
|
31220
|
-
}), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, hAsync("label", { key: '
|
|
31530
|
+
}), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, hAsync("label", { key: '1312aba3259a87fe23a6911cdfa477e309469c8b', class: "radio-wrapper" }, hAsync("div", { key: 'b342aa27e240a300836d2a135658d346b95daf09', class: {
|
|
31221
31531
|
'label-text-wrapper': true,
|
|
31222
31532
|
'label-text-wrapper-hidden': !hasLabel,
|
|
31223
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
31533
|
+
}, part: "label" }, hAsync("slot", { key: '0a4613d29aa783d1882cf889377f7e4fd4fea51d' })), hAsync("div", { key: '191faea79dc4cd8befc4b873f5bd9f5af8ca2acc', class: "native-wrapper" }, this.renderRadioControl()))));
|
|
31224
31534
|
}
|
|
31225
31535
|
get el() { return getElement(this); }
|
|
31226
31536
|
static get watchers() { return {
|
|
@@ -31239,7 +31549,7 @@ class Radio {
|
|
|
31239
31549
|
"color": [513],
|
|
31240
31550
|
"name": [1],
|
|
31241
31551
|
"disabled": [4],
|
|
31242
|
-
"value": [
|
|
31552
|
+
"value": [8],
|
|
31243
31553
|
"labelPlacement": [1, "label-placement"],
|
|
31244
31554
|
"justify": [1],
|
|
31245
31555
|
"alignment": [1],
|
|
@@ -31250,7 +31560,7 @@ class Radio {
|
|
|
31250
31560
|
},
|
|
31251
31561
|
"$listeners$": undefined,
|
|
31252
31562
|
"$lazyBundleId$": "-",
|
|
31253
|
-
"$attrsToReflect$": [["color", "color"]
|
|
31563
|
+
"$attrsToReflect$": [["color", "color"]]
|
|
31254
31564
|
}; }
|
|
31255
31565
|
}
|
|
31256
31566
|
let radioButtonIds = 0;
|
|
@@ -32315,7 +32625,7 @@ class Range {
|
|
|
32315
32625
|
const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
|
|
32316
32626
|
const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
|
|
32317
32627
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
32318
|
-
return (hAsync(Host, { key: '
|
|
32628
|
+
return (hAsync(Host, { key: 'f8063d1234fb113fe55a7902845dd4b4da8b1edb', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses$1(this.color, {
|
|
32319
32629
|
[mode]: true,
|
|
32320
32630
|
'in-item': inItem,
|
|
32321
32631
|
'range-disabled': disabled,
|
|
@@ -32329,10 +32639,10 @@ class Range {
|
|
|
32329
32639
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
32330
32640
|
'range-value-min': valueAtMin,
|
|
32331
32641
|
'range-value-max': valueAtMax,
|
|
32332
|
-
}) }, hAsync("label", { key: '
|
|
32642
|
+
}) }, hAsync("label", { key: 'beead65ab01e3b18e4be59c0ee8ac6ebf32aad7c', class: "range-wrapper", id: "range-label" }, hAsync("div", { key: '03633c689d9d2e4c50a2131bcd560329df49e314', class: {
|
|
32333
32643
|
'label-text-wrapper': true,
|
|
32334
32644
|
'label-text-wrapper-hidden': !hasLabel,
|
|
32335
|
-
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '
|
|
32645
|
+
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: 'c066804263ab6ae7393f8dcc51184b7198844ffa', class: "native-wrapper" }, hAsync("slot", { key: '7e8ea224d72b3e965dd948bee7e45c1a096b6899', name: "start" }), this.renderRangeSlider(), hAsync("slot", { key: '21f242f6f60ff3adce6a2d90b2d4dac1ceaf6624', name: "end" })))));
|
|
32336
32646
|
}
|
|
32337
32647
|
get el() { return getElement(this); }
|
|
32338
32648
|
static get watchers() { return {
|
|
@@ -33403,7 +33713,7 @@ class Refresher {
|
|
|
33403
33713
|
}
|
|
33404
33714
|
render() {
|
|
33405
33715
|
const mode = getIonMode$1(this);
|
|
33406
|
-
return (hAsync(Host, { key: '
|
|
33716
|
+
return (hAsync(Host, { key: '80fa313b0d77161680836bdd6aa334d02c549b41', slot: "fixed", class: {
|
|
33407
33717
|
[mode]: true,
|
|
33408
33718
|
// Used internally for styling
|
|
33409
33719
|
[`refresher-${mode}`]: true,
|
|
@@ -33629,7 +33939,7 @@ class RefresherContent {
|
|
|
33629
33939
|
const pullingIcon = this.pullingIcon;
|
|
33630
33940
|
const hasSpinner = pullingIcon != null && SPINNERS[pullingIcon] !== undefined;
|
|
33631
33941
|
const mode = getIonMode$1(this);
|
|
33632
|
-
return (hAsync(Host, { key: '
|
|
33942
|
+
return (hAsync(Host, { key: '4add42b9fdfded359d1b054d04c2c6ff48e028c8', class: mode }, hAsync("div", { key: '45d4e4e0adfed7f96dd1849767aa2cde947de044', class: "refresher-pulling" }, this.pullingIcon && hasSpinner && (hAsync("div", { key: '6bd6c8ef5bf6e10699eec3bd8646431bfe1077a0', class: "refresher-pulling-icon" }, hAsync("div", { key: '852d20414da53352c8e58bc627e0fda38eff97cb', class: "spinner-arrow-container" }, hAsync("ion-spinner", { key: '0dde3578a80cc4b77a07c4d1db1af80c7eb10c27', name: this.pullingIcon, paused: true }), mode === 'md' && this.pullingIcon === 'circular' && (hAsync("div", { key: 'c71dbfcf416a19c30fed38f722ebf0358c2181dd', class: "arrow-container" }, hAsync("ion-icon", { key: 'fa7c2cf624e7a9c41964e66cabc88c594da6d1fd', icon: caretBackSharp, "aria-hidden": "true" })))))), this.pullingIcon && !hasSpinner && (hAsync("div", { key: '3dd68c9968b421c379d1c4349ba619ee0a189c6d', class: "refresher-pulling-icon" }, hAsync("ion-icon", { key: 'f83bceceae4fa8245f91939fb6db589a595e975b', icon: this.pullingIcon, lazy: false, "aria-hidden": "true" }))), this.pullingText !== undefined && this.renderPullingText()), hAsync("div", { key: '98e22ceb0f7883e871f815f6199f5cb313e2e086', class: "refresher-refreshing" }, this.refreshingSpinner && (hAsync("div", { key: 'faabe8a9b61c02a00994ef978bb82b9ba4537214', class: "refresher-refreshing-icon" }, hAsync("ion-spinner", { key: '029a0c073ee1a07f01211e12ba2abc985cf21ed7', name: this.refreshingSpinner }))), this.refreshingText !== undefined && this.renderRefreshingText())));
|
|
33633
33943
|
}
|
|
33634
33944
|
get el() { return getElement(this); }
|
|
33635
33945
|
static get cmpMeta() { return {
|
|
@@ -33670,7 +33980,7 @@ class Reorder {
|
|
|
33670
33980
|
render() {
|
|
33671
33981
|
const mode = getIonMode$1(this);
|
|
33672
33982
|
const reorderIcon = mode === 'ios' ? reorderThreeOutline : reorderTwoSharp;
|
|
33673
|
-
return (hAsync(Host, { key: '
|
|
33983
|
+
return (hAsync(Host, { key: 'b869db61ca6393cf1476f2111a66b387b567c6d1', class: mode }, hAsync("slot", { key: 'a78edd1776835282b8b5c841377018f36c83296c' }, hAsync("ion-icon", { key: '7fb067c47bbb9a7258e5063f028282cc097d0f94', icon: reorderIcon, lazy: false, class: "reorder-icon", part: "icon", "aria-hidden": "true" }))));
|
|
33674
33984
|
}
|
|
33675
33985
|
get el() { return getElement(this); }
|
|
33676
33986
|
static get style() { return {
|
|
@@ -33941,7 +34251,7 @@ class ReorderGroup {
|
|
|
33941
34251
|
}
|
|
33942
34252
|
render() {
|
|
33943
34253
|
const mode = getIonMode$1(this);
|
|
33944
|
-
return (hAsync(Host, { key: '
|
|
34254
|
+
return (hAsync(Host, { key: '9527bbdedaab63d31f562c874a7332ea60c4b47b', class: {
|
|
33945
34255
|
[mode]: true,
|
|
33946
34256
|
'reorder-enabled': !this.disabled,
|
|
33947
34257
|
'reorder-list-active': this.state !== 0 /* ReorderGroupState.Idle */,
|
|
@@ -34059,7 +34369,7 @@ class RippleEffect {
|
|
|
34059
34369
|
}
|
|
34060
34370
|
render() {
|
|
34061
34371
|
const mode = getIonMode$1(this);
|
|
34062
|
-
return (hAsync(Host, { key: '
|
|
34372
|
+
return (hAsync(Host, { key: '3b59cbb44741569a7350f9638b4392add673b6f1', role: "presentation", class: {
|
|
34063
34373
|
[mode]: true,
|
|
34064
34374
|
unbounded: this.unbounded,
|
|
34065
34375
|
} }));
|
|
@@ -34497,30 +34807,16 @@ const scrollToFragment = async (fragment, shouldContinue = () => true) => {
|
|
|
34497
34807
|
return false;
|
|
34498
34808
|
}
|
|
34499
34809
|
};
|
|
34500
|
-
/** How long the router waits for a navigation outlet before giving up and proceeding. */
|
|
34501
|
-
const NAV_NODE_TIMEOUT = 500;
|
|
34502
34810
|
const waitUntilNavNode = () => {
|
|
34503
34811
|
if (searchNavNode(document.body)) {
|
|
34504
34812
|
return Promise.resolve();
|
|
34505
34813
|
}
|
|
34506
34814
|
return new Promise((resolve) => {
|
|
34507
|
-
|
|
34508
|
-
* Outlets emit `ionNavWillLoad` as they load, so resolve as soon as one does.
|
|
34509
|
-
* A timeout backstops the case where the page has no outlet at all: without it
|
|
34510
|
-
* the router would wait forever and its `componentWillLoad` would never settle,
|
|
34511
|
-
* which in turn prevents the app from signalling that it has finished loading.
|
|
34512
|
-
*/
|
|
34513
|
-
const done = () => {
|
|
34514
|
-
window.removeEventListener('ionNavWillLoad', done);
|
|
34515
|
-
clearTimeout(timeout);
|
|
34516
|
-
resolve();
|
|
34517
|
-
};
|
|
34518
|
-
const timeout = setTimeout(done, NAV_NODE_TIMEOUT);
|
|
34519
|
-
window.addEventListener('ionNavWillLoad', done, { once: true });
|
|
34815
|
+
window.addEventListener('ionNavWillLoad', () => resolve(), { once: true });
|
|
34520
34816
|
});
|
|
34521
34817
|
};
|
|
34522
34818
|
/** Selector for all the outlets supported by the router. */
|
|
34523
|
-
const OUTLET_SELECTOR = ':not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet';
|
|
34819
|
+
const OUTLET_SELECTOR = ':not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet';
|
|
34524
34820
|
const searchNavNode = (root) => {
|
|
34525
34821
|
if (!root) {
|
|
34526
34822
|
return undefined;
|
|
@@ -35207,10 +35503,10 @@ class RouterLink {
|
|
|
35207
35503
|
rel: this.rel,
|
|
35208
35504
|
target: this.target,
|
|
35209
35505
|
};
|
|
35210
|
-
return (hAsync(Host, { key: '
|
|
35506
|
+
return (hAsync(Host, { key: '8372835161d507c7b821b7536c55f912eb6ce704', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
35211
35507
|
[mode]: true,
|
|
35212
35508
|
'ion-activatable': true,
|
|
35213
|
-
}) }, hAsync("a", Object.assign({ key: '
|
|
35509
|
+
}) }, hAsync("a", Object.assign({ key: '315966e14a17760f3f64197e8315200039787897' }, attrs), hAsync("slot", { key: '95fc1697b884225e85e647dddcaa8f4af8b9a979' }))));
|
|
35214
35510
|
}
|
|
35215
35511
|
static get style() { return routerLinkCss(); }
|
|
35216
35512
|
static get cmpMeta() { return {
|
|
@@ -35249,11 +35545,10 @@ class RouterOutlet {
|
|
|
35249
35545
|
*/
|
|
35250
35546
|
this.animated = true;
|
|
35251
35547
|
}
|
|
35252
|
-
swipeGestureChanged() {
|
|
35253
|
-
this.updateGestureEnabled();
|
|
35254
|
-
}
|
|
35255
35548
|
swipeHandlerChanged() {
|
|
35256
|
-
this.
|
|
35549
|
+
if (this.gesture) {
|
|
35550
|
+
this.gesture.enable(this.swipeHandler !== undefined);
|
|
35551
|
+
}
|
|
35257
35552
|
}
|
|
35258
35553
|
async connectedCallback() {
|
|
35259
35554
|
const onStart = () => {
|
|
@@ -35293,21 +35588,11 @@ class RouterOutlet {
|
|
|
35293
35588
|
this.gestureOrAnimationInProgress = false;
|
|
35294
35589
|
}
|
|
35295
35590
|
});
|
|
35296
|
-
|
|
35297
|
-
this.swipeGesture = config.getBoolean('swipeBackEnabled', this.mode === 'ios');
|
|
35298
|
-
}
|
|
35299
|
-
else {
|
|
35300
|
-
this.updateGestureEnabled();
|
|
35301
|
-
}
|
|
35591
|
+
this.swipeHandlerChanged();
|
|
35302
35592
|
}
|
|
35303
35593
|
componentWillLoad() {
|
|
35304
35594
|
this.ionNavWillLoad.emit();
|
|
35305
35595
|
}
|
|
35306
|
-
updateGestureEnabled() {
|
|
35307
|
-
if (this.gesture) {
|
|
35308
|
-
this.gesture.enable(this.swipeHandler !== undefined && this.swipeGesture === true);
|
|
35309
|
-
}
|
|
35310
|
-
}
|
|
35311
35596
|
disconnectedCallback() {
|
|
35312
35597
|
if (this.gesture) {
|
|
35313
35598
|
this.gesture.destroy();
|
|
@@ -35418,13 +35703,10 @@ class RouterOutlet {
|
|
|
35418
35703
|
return true;
|
|
35419
35704
|
}
|
|
35420
35705
|
render() {
|
|
35421
|
-
return hAsync("slot", { key: '
|
|
35706
|
+
return hAsync("slot", { key: '386c41745b61daba161cf75063da97fe29ba36cb' });
|
|
35422
35707
|
}
|
|
35423
35708
|
get el() { return getElement(this); }
|
|
35424
35709
|
static get watchers() { return {
|
|
35425
|
-
"swipeGesture": [{
|
|
35426
|
-
"swipeGestureChanged": 0
|
|
35427
|
-
}],
|
|
35428
35710
|
"swipeHandler": [{
|
|
35429
35711
|
"swipeHandlerChanged": 0
|
|
35430
35712
|
}]
|
|
@@ -35438,7 +35720,6 @@ class RouterOutlet {
|
|
|
35438
35720
|
"delegate": [16],
|
|
35439
35721
|
"animated": [4],
|
|
35440
35722
|
"animation": [16],
|
|
35441
|
-
"swipeGesture": [1028, "swipe-gesture"],
|
|
35442
35723
|
"swipeHandler": [16],
|
|
35443
35724
|
"commit": [64],
|
|
35444
35725
|
"setRouteId": [64],
|
|
@@ -35457,7 +35738,7 @@ class Row {
|
|
|
35457
35738
|
registerInstance(this, hostRef);
|
|
35458
35739
|
}
|
|
35459
35740
|
render() {
|
|
35460
|
-
return (hAsync(Host, { key: '
|
|
35741
|
+
return (hAsync(Host, { key: '8ba906a8cbea060a79ed658c9bf34906f0c11d38', class: getIonMode$1(this) }, hAsync("slot", { key: 'd1009176f45b588fa52c7d9eb336f3c6d3214bb8' })));
|
|
35461
35742
|
}
|
|
35462
35743
|
static get style() { return rowCss(); }
|
|
35463
35744
|
static get cmpMeta() { return {
|
|
@@ -35509,7 +35790,7 @@ class Searchbar {
|
|
|
35509
35790
|
/**
|
|
35510
35791
|
* Set the input's autocorrect property.
|
|
35511
35792
|
*/
|
|
35512
|
-
this.autocorrect =
|
|
35793
|
+
this.autocorrect = 'off';
|
|
35513
35794
|
/**
|
|
35514
35795
|
* Set the cancel button icon. Only applies to `md` mode.
|
|
35515
35796
|
* Defaults to `arrow-back-sharp`.
|
|
@@ -35930,8 +36211,8 @@ class Searchbar {
|
|
|
35930
36211
|
const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
|
|
35931
36212
|
const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
|
|
35932
36213
|
const shouldShowCancelButton = this.shouldShowCancelButton();
|
|
35933
|
-
const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '
|
|
35934
|
-
return (hAsync(Host, { key: '
|
|
36214
|
+
const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '226b7a676b4819cda4062b8334fa8d4c4cee6f1a', "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" }, hAsync("div", { key: '89adb4efa17a78c973bbd5527cfac91d99ceb9bb', "aria-hidden": "true" }, mode === 'md' ? (hAsync("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
|
|
36215
|
+
return (hAsync(Host, { key: '237dd767403dba3cb3d7de8905996e275669da3b', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses$1(this.color, {
|
|
35935
36216
|
[mode]: true,
|
|
35936
36217
|
'searchbar-animated': animated,
|
|
35937
36218
|
'searchbar-disabled': this.disabled,
|
|
@@ -35941,14 +36222,14 @@ class Searchbar {
|
|
|
35941
36222
|
'searchbar-has-focus': this.focused,
|
|
35942
36223
|
'searchbar-should-show-clear': this.shouldShowClearButton(),
|
|
35943
36224
|
'searchbar-should-show-cancel': this.shouldShowCancelButton(),
|
|
35944
|
-
}) }, hAsync("div", { key: '
|
|
36225
|
+
}) }, hAsync("div", { key: '5b4bdf7280bea710304b6975e76390fe6ceb7417', class: "searchbar-input-container" }, hAsync("input", Object.assign({ key: '01a0820a2cf904aec1c7d84b542ab7918d435632', "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, hAsync("ion-icon", { key: 'cd64973206b1cc59d221112861733b7ee25f0323', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), hAsync("button", { key: '2061fa8449bbc576cf8c5130ea613378ea492944', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
|
|
35945
36226
|
/**
|
|
35946
36227
|
* This prevents mobile browsers from
|
|
35947
36228
|
* blurring the input when the clear
|
|
35948
36229
|
* button is activated.
|
|
35949
36230
|
*/
|
|
35950
36231
|
ev.preventDefault();
|
|
35951
|
-
}, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: '
|
|
36232
|
+
}, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: '00df6f7742bff70b1b088d544b8c00e962e7216c', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
|
|
35952
36233
|
}
|
|
35953
36234
|
get el() { return getElement(this); }
|
|
35954
36235
|
static get watchers() { return {
|
|
@@ -35980,7 +36261,7 @@ class Searchbar {
|
|
|
35980
36261
|
"animated": [4],
|
|
35981
36262
|
"autocapitalize": [1],
|
|
35982
36263
|
"autocomplete": [1],
|
|
35983
|
-
"autocorrect": [
|
|
36264
|
+
"autocorrect": [1],
|
|
35984
36265
|
"cancelButtonIcon": [1, "cancel-button-icon"],
|
|
35985
36266
|
"cancelButtonText": [1, "cancel-button-text"],
|
|
35986
36267
|
"clearIcon": [1, "clear-icon"],
|
|
@@ -36557,14 +36838,14 @@ class Segment {
|
|
|
36557
36838
|
}
|
|
36558
36839
|
render() {
|
|
36559
36840
|
const mode = getIonMode$1(this);
|
|
36560
|
-
return (hAsync(Host, { key: '
|
|
36841
|
+
return (hAsync(Host, { key: 'eda6b7b88b7967b55cf9098c59b655b348a42224', role: "tablist", onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
36561
36842
|
[mode]: true,
|
|
36562
36843
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
36563
36844
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
36564
36845
|
'segment-activated': this.activated,
|
|
36565
36846
|
'segment-disabled': this.disabled,
|
|
36566
36847
|
'segment-scrollable': this.scrollable,
|
|
36567
|
-
}) }, hAsync("slot", { key: '
|
|
36848
|
+
}) }, hAsync("slot", { key: 'fdb451f235ce59c5bb50c61a13c69160ece2d5df', onSlotchange: this.onSlottedItemsChange })));
|
|
36568
36849
|
}
|
|
36569
36850
|
get el() { return getElement(this); }
|
|
36570
36851
|
static get watchers() { return {
|
|
@@ -36712,7 +36993,7 @@ class SegmentButton {
|
|
|
36712
36993
|
const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
|
|
36713
36994
|
const mode = getIonMode$1(this);
|
|
36714
36995
|
const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
|
|
36715
|
-
return (hAsync(Host, { key: '
|
|
36996
|
+
return (hAsync(Host, { key: 'f69e2a24198a7c57543dbe66902da039a6569c64', class: {
|
|
36716
36997
|
[mode]: true,
|
|
36717
36998
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
36718
36999
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
@@ -36728,7 +37009,7 @@ class SegmentButton {
|
|
|
36728
37009
|
'ion-activatable': true,
|
|
36729
37010
|
'ion-activatable-instant': true,
|
|
36730
37011
|
'ion-focusable': true,
|
|
36731
|
-
} }, hAsync("button", Object.assign({ key: '
|
|
37012
|
+
} }, hAsync("button", Object.assign({ key: '0a6fea3a374074af19f7ece0ba3a7cf1e269ab6d', "aria-selected": checked ? 'true' : 'false', role: "tab", ref: (el) => (this.nativeEl = el), type: type, class: "button-native", part: "native", disabled: disabled }, this.inheritedAttributes), hAsync("span", { key: '991018a38c59a6f3d76b2e952e5569c874d2c13e', class: "button-inner" }, hAsync("slot", { key: '23c547c80108025027b913c7fcbec189286627a3' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '7faa9d06ab6aa7346d16b0b6808979759a79650c' })), hAsync("div", { key: '0d61badf2c227dc38e20185b2b2bb590a5efa434', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, hAsync("div", { key: 'a84035752b78491c344179d1e61d109fb4bd1cf1', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
36732
37013
|
}
|
|
36733
37014
|
get el() { return getElement(this); }
|
|
36734
37015
|
static get watchers() { return {
|
|
@@ -36765,7 +37046,7 @@ class SegmentContent {
|
|
|
36765
37046
|
registerInstance(this, hostRef);
|
|
36766
37047
|
}
|
|
36767
37048
|
render() {
|
|
36768
|
-
return (hAsync(Host, { key: '
|
|
37049
|
+
return (hAsync(Host, { key: '665f41a854621f898eaf7ba9a49e77cc9326501e' }, hAsync("slot", { key: '635aa57fbf6167dcd36fe8dc5dfc1c313637ac04' })));
|
|
36769
37050
|
}
|
|
36770
37051
|
static get style() { return segmentContentCss(); }
|
|
36771
37052
|
static get cmpMeta() { return {
|
|
@@ -36884,11 +37165,11 @@ class SegmentView {
|
|
|
36884
37165
|
}
|
|
36885
37166
|
render() {
|
|
36886
37167
|
const { disabled, isManualScroll, swipeGesture } = this;
|
|
36887
|
-
return (hAsync(Host, { key: '
|
|
37168
|
+
return (hAsync(Host, { key: '2a6e0a1046af75b1fa0eed20a5fbbb4634480297', class: {
|
|
36888
37169
|
'segment-view-disabled': disabled,
|
|
36889
37170
|
'segment-view-scroll-disabled': isManualScroll === false,
|
|
36890
37171
|
'segment-view-swipe-disabled': swipeGesture === false,
|
|
36891
|
-
} }, hAsync("slot", { key: '
|
|
37172
|
+
} }, hAsync("slot", { key: '644b60d179d0de3fa204e3bef26a3503ceeaf1d6' })));
|
|
36892
37173
|
}
|
|
36893
37174
|
get el() { return getElement(this); }
|
|
36894
37175
|
static get style() { return {
|
|
@@ -36910,9 +37191,9 @@ class SegmentView {
|
|
|
36910
37191
|
}; }
|
|
36911
37192
|
}
|
|
36912
37193
|
|
|
36913
|
-
const selectIosCss = () => `:host{--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--placeholder-color:currentColor;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--background:transparent;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--
|
|
37194
|
+
const selectIosCss = () => `:host{--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--placeholder-color:currentColor;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--background:transparent;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;font-family:var(--ion-font-family, inherit);white-space:nowrap;cursor:pointer;z-index:2}:host(.select-label-placement-floating),:host(.select-label-placement-stacked){min-height:56px}:host(.ion-color){--highlight-color-focused:var(--ion-color-base)}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0}:host(.select-disabled){pointer-events:none}:host(.has-focus) button{border:2px solid #5e9ed6}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0;position:relative;-ms-flex-negative:0;flex-shrink:0}:host(.in-item-color) .select-icon{color:inherit}:host(.select-label-placement-stacked) .select-icon,:host(.select-label-placement-floating) .select-icon{position:absolute;height:100%}:host(.select-ltr.select-label-placement-stacked) .select-icon,:host(.select-ltr.select-label-placement-floating) .select-icon{right:var(--padding-end, 0)}:host(.select-rtl.select-label-placement-stacked) .select-icon,:host(.select-rtl.select-label-placement-floating) .select-icon{left:var(--padding-start, 0)}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:inherit;overflow:hidden}.select-wrapper{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.select-wrapper .select-placeholder{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.select-wrapper-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{-ms-flex-positive:1;flex-grow:1}:host(.ion-touched.ion-invalid){--highlight-color:var(--highlight-color-invalid)}:host(.ion-valid){--highlight-color:var(--highlight-color-valid)}.select-bottom{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:5px;padding-bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-top:var(--border-width) var(--border-style) var(--border-color);font-size:0.75rem;white-space:normal}:host(.has-focus.ion-valid),:host(.select-expanded.ion-valid),:host(.ion-touched.ion-invalid),:host(.select-expanded.ion-touched.ion-invalid){--border-color:var(--highlight-color)}.select-bottom .error-text{display:none;color:var(--highlight-color-invalid)}.select-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .select-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .select-bottom .helper-text{display:none}.label-text-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text,::slotted([slot=label]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden,.select-outline-notch-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden}:host(.select-justify-space-between) .select-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.select-justify-start) .select-wrapper{-ms-flex-pack:start;justify-content:start}:host(.select-justify-end) .select-wrapper{-ms-flex-pack:end;justify-content:end}:host(.select-label-placement-start) .select-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.select-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-end) .select-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.select-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.select-label-placement-stacked) .select-wrapper,:host(.select-label-placement-floating) .select-wrapper{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}:host(.select-label-placement-stacked) .label-text-wrapper,:host(.select-label-placement-floating) .label-text-wrapper{max-width:100%}:host(.select-ltr.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-label-placement-stacked) .native-wrapper,:host(.select-label-placement-floating) .native-wrapper{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0;-ms-flex-positive:1;flex-grow:1;width:100%}:host(.select-label-placement-floating) .label-text-wrapper{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}:host(.select-label-placement-floating:not(.label-floating)) .native-wrapper .select-placeholder{opacity:0}:host(.select-expanded.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-focus.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-value.select-label-placement-floating) .native-wrapper .select-placeholder{opacity:1}:host(.label-floating) .label-text-wrapper{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]:last-of-type){-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}::slotted([slot=end]:first-of-type){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host{--border-width:0.55px;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));--highlight-height:0px}.select-icon{width:1.125rem;height:1.125rem;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{width:calc(100% - 1.125rem - 4px)}:host(.select-disabled){opacity:0.3}::slotted(ion-button[slot=start].button-has-icon-only),::slotted(ion-button[slot=end].button-has-icon-only){--border-radius:50%;--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;aspect-ratio:1}`;
|
|
36914
37195
|
|
|
36915
|
-
const selectMdCss = () => `:host{--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--placeholder-color:currentColor;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--background:transparent;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--select-text-media-height:1.5em;--select-text-media-width:1.5em;--select-text-gap:12px;--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;font-family:var(--ion-font-family, inherit);white-space:nowrap;cursor:pointer;z-index:2}:host(.select-label-placement-floating),:host(.select-label-placement-stacked){min-height:56px}:host(.ion-color){--highlight-color-focused:var(--ion-color-base)}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0}:host(.select-disabled){pointer-events:none}:host(.has-focus) button{border:2px solid #5e9ed6}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0;position:relative;-ms-flex-negative:0;flex-shrink:0}:host(.in-item-color) .select-icon{color:inherit}:host(.select-label-placement-stacked) .select-icon,:host(.select-label-placement-floating) .select-icon{position:absolute;height:100%}:host(.select-ltr.select-label-placement-stacked) .select-icon,:host(.select-ltr.select-label-placement-floating) .select-icon{right:var(--padding-end, 0)}:host(.select-rtl.select-label-placement-stacked) .select-icon,:host(.select-rtl.select-label-placement-floating) .select-icon{left:var(--padding-start, 0)}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:inherit;overflow:hidden}.select-text>*+*{-webkit-margin-start:var(--select-text-gap);margin-inline-start:var(--select-text-gap)}.select-text img,.select-text ion-img,.select-text ion-icon,.select-text ion-thumbnail,.select-text ion-avatar{border-radius:var(--select-text-media-border-radius);width:var(--select-text-media-width);height:var(--select-text-media-height);border-width:var(--select-text-media-border-width);border-style:var(--select-text-media-border-style);border-color:var(--select-text-media-border-color)}.select-wrapper{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.select-wrapper .select-placeholder{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.select-wrapper-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{-ms-flex-positive:1;flex-grow:1}:host(.ion-touched.ion-invalid){--highlight-color:var(--highlight-color-invalid)}:host(.ion-valid){--highlight-color:var(--highlight-color-valid)}.select-bottom{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:5px;padding-bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-top:var(--border-width) var(--border-style) var(--border-color);font-size:0.75rem;white-space:normal}:host(.has-focus.ion-valid),:host(.select-expanded.ion-valid),:host(.ion-touched.ion-invalid),:host(.select-expanded.ion-touched.ion-invalid){--border-color:var(--highlight-color)}.select-bottom .error-text{display:none;color:var(--highlight-color-invalid)}.select-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .select-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .select-bottom .helper-text{display:none}.label-text-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text,::slotted([slot=label]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden,.select-outline-notch-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden}:host(.select-justify-space-between) .select-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.select-justify-start) .select-wrapper{-ms-flex-pack:start;justify-content:start}:host(.select-justify-end) .select-wrapper{-ms-flex-pack:end;justify-content:end}:host(.select-label-placement-start) .select-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.select-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-end) .select-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.select-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.select-label-placement-stacked) .select-wrapper,:host(.select-label-placement-floating) .select-wrapper{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}:host(.select-label-placement-stacked) .label-text-wrapper,:host(.select-label-placement-floating) .label-text-wrapper{max-width:100%}:host(.select-ltr.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-label-placement-stacked) .native-wrapper,:host(.select-label-placement-floating) .native-wrapper{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0;-ms-flex-positive:1;flex-grow:1;width:100%}:host(.select-label-placement-floating) .label-text-wrapper{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}:host(.select-label-placement-floating:not(.label-floating)) .native-wrapper .select-placeholder{opacity:0}:host(.select-expanded.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-focus.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-value.select-label-placement-floating) .native-wrapper .select-placeholder{opacity:1}:host(.label-floating) .label-text-wrapper{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]:last-of-type){-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}::slotted([slot=end]:first-of-type){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.select-fill-solid){--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-500, var(--ion-background-color-step-500, gray));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}:host(.select-fill-solid) .select-wrapper{border-bottom:var(--border-width) var(--border-style) var(--border-color)}:host(.select-expanded.select-fill-solid.ion-valid),:host(.has-focus.select-fill-solid.ion-valid),:host(.select-fill-solid.ion-touched.ion-invalid){--border-color:var(--highlight-color)}:host(.select-fill-solid) .select-bottom{border-top:none}@media (any-hover: hover){:host(.select-fill-solid:hover){--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}:host(.select-fill-solid.select-expanded),:host(.select-fill-solid.has-focus){--background:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--border-color:var(--highlight-color)}:host(.select-fill-solid) .select-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0px;border-end-start-radius:0px}:host(.label-floating.select-fill-solid) .label-text-wrapper{max-width:calc(100% / 0.75)}:host(.in-item.select-expanded.select-fill-solid) .select-wrapper .select-icon,:host(.in-item.has-focus.select-fill-solid) .select-wrapper .select-icon,:host(.in-item.has-focus.ion-valid.select-fill-solid) .select-wrapper .select-icon,:host(.in-item.ion-touched.ion-invalid.select-fill-solid) .select-wrapper .select-icon{color:var(--highlight-color)}:host(.select-fill-outline){--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}:host(.select-fill-outline.select-shape-round){--border-radius:28px;--padding-start:32px;--padding-end:32px}:host(.has-focus.select-fill-outline.ion-valid),:host(.select-fill-outline.ion-touched.ion-invalid){--border-color:var(--highlight-color)}@media (any-hover: hover){:host(.select-fill-outline:hover){--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}:host(.select-fill-outline.select-expanded),:host(.select-fill-outline.has-focus){--border-width:var(--highlight-height);--border-color:var(--highlight-color)}:host(.select-fill-outline) .select-bottom{border-top:none}:host(.select-fill-outline) .select-wrapper{border-bottom:none}:host(.select-ltr.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-fill-outline.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-fill-outline.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-fill-outline.select-label-placement-floating) .label-text-wrapper{position:absolute;max-width:calc(100% - var(--padding-start) - var(--padding-end))}:host(.select-fill-outline) .label-text-wrapper{position:relative;z-index:1}:host(.label-floating.select-fill-outline) .label-text-wrapper{-webkit-transform:translateY(-32%) scale(0.75);transform:translateY(-32%) scale(0.75);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;max-width:calc((100% - var(--padding-start) - var(--padding-end) - 8px) / 0.75)}:host(.select-fill-outline.select-label-placement-stacked) select,:host(.select-fill-outline.select-label-placement-floating) select{margin-left:0;margin-right:0;margin-top:6px;margin-bottom:6px}:host(.select-fill-outline) .select-outline-container{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;width:100%;height:100%}:host(.select-fill-outline) .select-outline-start,:host(.select-fill-outline) .select-outline-end{pointer-events:none}:host(.select-fill-outline) .select-outline-start,:host(.select-fill-outline) .select-outline-notch,:host(.select-fill-outline) .select-outline-end{border-top:var(--border-width) var(--border-style) var(--border-color);border-bottom:var(--border-width) var(--border-style) var(--border-color);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.select-fill-outline) .select-outline-notch{max-width:calc(100% - var(--padding-start) - var(--padding-end))}:host(.select-fill-outline) .notch-spacer{-webkit-padding-end:8px;padding-inline-end:8px;font-size:calc(1em * 0.75);opacity:0;pointer-events:none}:host(.select-fill-outline) .select-outline-start{-webkit-border-start:var(--border-width) var(--border-style) var(--border-color);border-inline-start:var(--border-width) var(--border-style) var(--border-color)}:host(.select-fill-outline) .select-outline-start{border-start-start-radius:var(--border-radius);border-start-end-radius:0px;border-end-end-radius:0px;border-end-start-radius:var(--border-radius)}:host(.select-fill-outline) .select-outline-start{width:calc(var(--padding-start) - 4px)}:host(.select-fill-outline) .select-outline-end{-webkit-border-end:var(--border-width) var(--border-style) var(--border-color);border-inline-end:var(--border-width) var(--border-style) var(--border-color)}:host(.select-fill-outline) .select-outline-end{border-start-start-radius:0px;border-start-end-radius:var(--border-radius);border-end-end-radius:var(--border-radius);border-end-start-radius:0px}:host(.select-fill-outline) .select-outline-end{-ms-flex-positive:1;flex-grow:1}:host(.label-floating.select-fill-outline) .select-outline-notch{border-top:none}:host(.in-item.select-expanded.select-fill-outline) .select-wrapper .select-icon,:host(.in-item.has-focus.select-fill-outline) .select-wrapper .select-icon,:host(.in-item.has-focus.ion-valid.select-fill-outline) .select-wrapper .select-icon,:host(.in-item.ion-touched.ion-invalid.select-fill-outline) .select-wrapper .select-icon{color:var(--highlight-color)}:host{--border-width:1px;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--highlight-height:2px}:host(.select-label-placement-floating.select-expanded) .label-text-wrapper,:host(.select-label-placement-floating.has-focus) .label-text-wrapper,:host(.select-label-placement-stacked.select-expanded) .label-text-wrapper,:host(.select-label-placement-stacked.has-focus) .label-text-wrapper{color:var(--highlight-color)}:host(.has-focus.select-label-placement-floating.ion-valid) .label-text-wrapper,:host(.select-label-placement-floating.ion-touched.ion-invalid) .label-text-wrapper,:host(.has-focus.select-label-placement-stacked.ion-valid) .label-text-wrapper,:host(.select-label-placement-stacked.ion-touched.ion-invalid) .label-text-wrapper{color:var(--highlight-color)}.select-highlight{bottom:-1px;position:absolute;width:100%;height:var(--highlight-height);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 200ms;transition:-webkit-transform 200ms;transition:transform 200ms;transition:transform 200ms, -webkit-transform 200ms;background:var(--highlight-color)}.select-highlight{inset-inline-start:0}:host(.select-expanded) .select-highlight,:host(.has-focus) .select-highlight{-webkit-transform:scale(1);transform:scale(1)}:host(.in-item) .select-highlight{bottom:0}:host(.in-item) .select-highlight{inset-inline-start:0}.select-icon{width:0.8125rem;-webkit-transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host(.select-expanded:not(.has-expanded-icon)) .select-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host(.in-item.select-expanded) .select-wrapper .select-icon,:host(.in-item.has-focus) .select-wrapper .select-icon,:host(.in-item.has-focus.ion-valid) .select-wrapper .select-icon,:host(.in-item.ion-touched.ion-invalid) .select-wrapper .select-icon{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host(.select-expanded) .select-wrapper .select-icon,:host(.has-focus.ion-valid) .select-wrapper .select-icon,:host(.ion-touched.ion-invalid) .select-wrapper .select-icon,:host(.has-focus) .select-wrapper .select-icon{color:var(--highlight-color)}:host(.select-shape-round){--border-radius:16px}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{width:calc(100% - 0.8125rem - 4px)}:host(.select-disabled){opacity:0.38}::slotted(ion-button[slot=start].button-has-icon-only),::slotted(ion-button[slot=end].button-has-icon-only){--border-radius:50%;--padding-start:8px;--padding-end:8px;--padding-top:8px;--padding-bottom:8px;aspect-ratio:1;min-height:40px}`;
|
|
37196
|
+
const selectMdCss = () => `:host{--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--placeholder-color:currentColor;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--background:transparent;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;font-family:var(--ion-font-family, inherit);white-space:nowrap;cursor:pointer;z-index:2}:host(.select-label-placement-floating),:host(.select-label-placement-stacked){min-height:56px}:host(.ion-color){--highlight-color-focused:var(--ion-color-base)}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0}:host(.select-disabled){pointer-events:none}:host(.has-focus) button{border:2px solid #5e9ed6}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0;position:relative;-ms-flex-negative:0;flex-shrink:0}:host(.in-item-color) .select-icon{color:inherit}:host(.select-label-placement-stacked) .select-icon,:host(.select-label-placement-floating) .select-icon{position:absolute;height:100%}:host(.select-ltr.select-label-placement-stacked) .select-icon,:host(.select-ltr.select-label-placement-floating) .select-icon{right:var(--padding-end, 0)}:host(.select-rtl.select-label-placement-stacked) .select-icon,:host(.select-rtl.select-label-placement-floating) .select-icon{left:var(--padding-start, 0)}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:inherit;overflow:hidden}.select-wrapper{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.select-wrapper .select-placeholder{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.select-wrapper-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{-ms-flex-positive:1;flex-grow:1}:host(.ion-touched.ion-invalid){--highlight-color:var(--highlight-color-invalid)}:host(.ion-valid){--highlight-color:var(--highlight-color-valid)}.select-bottom{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:5px;padding-bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;border-top:var(--border-width) var(--border-style) var(--border-color);font-size:0.75rem;white-space:normal}:host(.has-focus.ion-valid),:host(.select-expanded.ion-valid),:host(.ion-touched.ion-invalid),:host(.select-expanded.ion-touched.ion-invalid){--border-color:var(--highlight-color)}.select-bottom .error-text{display:none;color:var(--highlight-color-invalid)}.select-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .select-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .select-bottom .helper-text{display:none}.label-text-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text,::slotted([slot=label]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden,.select-outline-notch-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden}:host(.select-justify-space-between) .select-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.select-justify-start) .select-wrapper{-ms-flex-pack:start;justify-content:start}:host(.select-justify-end) .select-wrapper{-ms-flex-pack:end;justify-content:end}:host(.select-label-placement-start) .select-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.select-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-end) .select-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.select-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.select-label-placement-stacked) .select-wrapper,:host(.select-label-placement-floating) .select-wrapper{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}:host(.select-label-placement-stacked) .label-text-wrapper,:host(.select-label-placement-floating) .label-text-wrapper{max-width:100%}:host(.select-ltr.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-label-placement-stacked) .native-wrapper,:host(.select-label-placement-floating) .native-wrapper{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0;-ms-flex-positive:1;flex-grow:1;width:100%}:host(.select-label-placement-floating) .label-text-wrapper{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}:host(.select-label-placement-floating:not(.label-floating)) .native-wrapper .select-placeholder{opacity:0}:host(.select-expanded.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-focus.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-value.select-label-placement-floating) .native-wrapper .select-placeholder{opacity:1}:host(.label-floating) .label-text-wrapper{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]:last-of-type){-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}::slotted([slot=end]:first-of-type){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.select-fill-solid){--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-500, var(--ion-background-color-step-500, gray));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}:host(.select-fill-solid) .select-wrapper{border-bottom:var(--border-width) var(--border-style) var(--border-color)}:host(.select-expanded.select-fill-solid.ion-valid),:host(.has-focus.select-fill-solid.ion-valid),:host(.select-fill-solid.ion-touched.ion-invalid){--border-color:var(--highlight-color)}:host(.select-fill-solid) .select-bottom{border-top:none}@media (any-hover: hover){:host(.select-fill-solid:hover){--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}:host(.select-fill-solid.select-expanded),:host(.select-fill-solid.has-focus){--background:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--border-color:var(--highlight-color)}:host(.select-fill-solid) .select-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0px;border-end-start-radius:0px}:host(.label-floating.select-fill-solid) .label-text-wrapper{max-width:calc(100% / 0.75)}:host(.in-item.select-expanded.select-fill-solid) .select-wrapper .select-icon,:host(.in-item.has-focus.select-fill-solid) .select-wrapper .select-icon,:host(.in-item.has-focus.ion-valid.select-fill-solid) .select-wrapper .select-icon,:host(.in-item.ion-touched.ion-invalid.select-fill-solid) .select-wrapper .select-icon{color:var(--highlight-color)}:host(.select-fill-outline){--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}:host(.select-fill-outline.select-shape-round){--border-radius:28px;--padding-start:32px;--padding-end:32px}:host(.has-focus.select-fill-outline.ion-valid),:host(.select-fill-outline.ion-touched.ion-invalid){--border-color:var(--highlight-color)}@media (any-hover: hover){:host(.select-fill-outline:hover){--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}:host(.select-fill-outline.select-expanded),:host(.select-fill-outline.has-focus){--border-width:var(--highlight-height);--border-color:var(--highlight-color)}:host(.select-fill-outline) .select-bottom{border-top:none}:host(.select-fill-outline) .select-wrapper{border-bottom:none}:host(.select-ltr.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-fill-outline.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-fill-outline.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-fill-outline.select-label-placement-floating) .label-text-wrapper{position:absolute;max-width:calc(100% - var(--padding-start) - var(--padding-end))}:host(.select-fill-outline) .label-text-wrapper{position:relative;z-index:1}:host(.label-floating.select-fill-outline) .label-text-wrapper{-webkit-transform:translateY(-32%) scale(0.75);transform:translateY(-32%) scale(0.75);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;max-width:calc((100% - var(--padding-start) - var(--padding-end) - 8px) / 0.75)}:host(.select-fill-outline.select-label-placement-stacked) select,:host(.select-fill-outline.select-label-placement-floating) select{margin-left:0;margin-right:0;margin-top:6px;margin-bottom:6px}:host(.select-fill-outline) .select-outline-container{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;width:100%;height:100%}:host(.select-fill-outline) .select-outline-start,:host(.select-fill-outline) .select-outline-end{pointer-events:none}:host(.select-fill-outline) .select-outline-start,:host(.select-fill-outline) .select-outline-notch,:host(.select-fill-outline) .select-outline-end{border-top:var(--border-width) var(--border-style) var(--border-color);border-bottom:var(--border-width) var(--border-style) var(--border-color);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.select-fill-outline) .select-outline-notch{max-width:calc(100% - var(--padding-start) - var(--padding-end))}:host(.select-fill-outline) .notch-spacer{-webkit-padding-end:8px;padding-inline-end:8px;font-size:calc(1em * 0.75);opacity:0;pointer-events:none}:host(.select-fill-outline) .select-outline-start{-webkit-border-start:var(--border-width) var(--border-style) var(--border-color);border-inline-start:var(--border-width) var(--border-style) var(--border-color)}:host(.select-fill-outline) .select-outline-start{border-start-start-radius:var(--border-radius);border-start-end-radius:0px;border-end-end-radius:0px;border-end-start-radius:var(--border-radius)}:host(.select-fill-outline) .select-outline-start{width:calc(var(--padding-start) - 4px)}:host(.select-fill-outline) .select-outline-end{-webkit-border-end:var(--border-width) var(--border-style) var(--border-color);border-inline-end:var(--border-width) var(--border-style) var(--border-color)}:host(.select-fill-outline) .select-outline-end{border-start-start-radius:0px;border-start-end-radius:var(--border-radius);border-end-end-radius:var(--border-radius);border-end-start-radius:0px}:host(.select-fill-outline) .select-outline-end{-ms-flex-positive:1;flex-grow:1}:host(.label-floating.select-fill-outline) .select-outline-notch{border-top:none}:host(.in-item.select-expanded.select-fill-outline) .select-wrapper .select-icon,:host(.in-item.has-focus.select-fill-outline) .select-wrapper .select-icon,:host(.in-item.has-focus.ion-valid.select-fill-outline) .select-wrapper .select-icon,:host(.in-item.ion-touched.ion-invalid.select-fill-outline) .select-wrapper .select-icon{color:var(--highlight-color)}:host{--border-width:1px;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--highlight-height:2px}:host(.select-label-placement-floating.select-expanded) .label-text-wrapper,:host(.select-label-placement-floating.has-focus) .label-text-wrapper,:host(.select-label-placement-stacked.select-expanded) .label-text-wrapper,:host(.select-label-placement-stacked.has-focus) .label-text-wrapper{color:var(--highlight-color)}:host(.has-focus.select-label-placement-floating.ion-valid) .label-text-wrapper,:host(.select-label-placement-floating.ion-touched.ion-invalid) .label-text-wrapper,:host(.has-focus.select-label-placement-stacked.ion-valid) .label-text-wrapper,:host(.select-label-placement-stacked.ion-touched.ion-invalid) .label-text-wrapper{color:var(--highlight-color)}.select-highlight{bottom:-1px;position:absolute;width:100%;height:var(--highlight-height);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 200ms;transition:-webkit-transform 200ms;transition:transform 200ms;transition:transform 200ms, -webkit-transform 200ms;background:var(--highlight-color)}.select-highlight{inset-inline-start:0}:host(.select-expanded) .select-highlight,:host(.has-focus) .select-highlight{-webkit-transform:scale(1);transform:scale(1)}:host(.in-item) .select-highlight{bottom:0}:host(.in-item) .select-highlight{inset-inline-start:0}.select-icon{width:0.8125rem;-webkit-transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host(.select-expanded:not(.has-expanded-icon)) .select-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host(.in-item.select-expanded) .select-wrapper .select-icon,:host(.in-item.has-focus) .select-wrapper .select-icon,:host(.in-item.has-focus.ion-valid) .select-wrapper .select-icon,:host(.in-item.ion-touched.ion-invalid) .select-wrapper .select-icon{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host(.select-expanded) .select-wrapper .select-icon,:host(.has-focus.ion-valid) .select-wrapper .select-icon,:host(.ion-touched.ion-invalid) .select-wrapper .select-icon,:host(.has-focus) .select-wrapper .select-icon{color:var(--highlight-color)}:host(.select-shape-round){--border-radius:16px}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{width:calc(100% - 0.8125rem - 4px)}:host(.select-disabled){opacity:0.38}::slotted(ion-button[slot=start].button-has-icon-only),::slotted(ion-button[slot=end].button-has-icon-only){--border-radius:50%;--padding-start:8px;--padding-end:8px;--padding-top:8px;--padding-bottom:8px;aspect-ratio:1;min-height:40px}`;
|
|
36916
37197
|
|
|
36917
37198
|
// TODO(FW-2832): types
|
|
36918
37199
|
/**
|
|
@@ -36947,7 +37228,6 @@ class Select {
|
|
|
36947
37228
|
this.helperTextId = `${this.inputId}-helper-text`;
|
|
36948
37229
|
this.errorTextId = `${this.inputId}-error-text`;
|
|
36949
37230
|
this.inheritedAttributes = {};
|
|
36950
|
-
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
36951
37231
|
this.isExpanded = false;
|
|
36952
37232
|
/**
|
|
36953
37233
|
* The `hasFocus` state ensures the focus class is
|
|
@@ -37073,40 +37353,9 @@ class Select {
|
|
|
37073
37353
|
this.emitStyle();
|
|
37074
37354
|
}
|
|
37075
37355
|
setValue(value) {
|
|
37076
|
-
if (this.isValueEqual(this.value, value)) {
|
|
37077
|
-
return;
|
|
37078
|
-
}
|
|
37079
37356
|
this.value = value;
|
|
37080
37357
|
this.ionChange.emit({ value });
|
|
37081
37358
|
}
|
|
37082
|
-
isValueEqual(currentValue, newValue) {
|
|
37083
|
-
if (this.multiple) {
|
|
37084
|
-
const currentArr = Array.isArray(currentValue) ? currentValue : [];
|
|
37085
|
-
const newArr = Array.isArray(newValue) ? newValue : [];
|
|
37086
|
-
if (currentArr.length !== newArr.length) {
|
|
37087
|
-
return false;
|
|
37088
|
-
}
|
|
37089
|
-
// Multiset compare: each new value must match a distinct current value.
|
|
37090
|
-
// A plain `every(isOptionSelected)` would accept ['a','a'] as equal to
|
|
37091
|
-
// ['a','b'] when both 'a' and 'b' map to options whose values overlap.
|
|
37092
|
-
const remaining = currentArr.slice();
|
|
37093
|
-
return newArr.every((val) => {
|
|
37094
|
-
const idx = remaining.findIndex((c) => compareOptions(c, val, this.compareWith));
|
|
37095
|
-
if (idx === -1) {
|
|
37096
|
-
return false;
|
|
37097
|
-
}
|
|
37098
|
-
remaining.splice(idx, 1);
|
|
37099
|
-
return true;
|
|
37100
|
-
});
|
|
37101
|
-
}
|
|
37102
|
-
if (currentValue == null && newValue == null) {
|
|
37103
|
-
return true;
|
|
37104
|
-
}
|
|
37105
|
-
if (currentValue == null || newValue == null) {
|
|
37106
|
-
return false;
|
|
37107
|
-
}
|
|
37108
|
-
return compareOptions(currentValue, newValue, this.compareWith);
|
|
37109
|
-
}
|
|
37110
37359
|
async connectedCallback() {
|
|
37111
37360
|
const { el } = this;
|
|
37112
37361
|
this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
|
|
@@ -37300,11 +37549,10 @@ class Select {
|
|
|
37300
37549
|
.join(' ');
|
|
37301
37550
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
37302
37551
|
const isSelected = isOptionSelected(selectValue, value, this.compareWith);
|
|
37303
|
-
const { content, startContent, endContent } = extractOptionContent(option, this.customHTMLEnabled);
|
|
37304
37552
|
return {
|
|
37305
|
-
|
|
37553
|
+
role: isSelected ? 'selected' : '',
|
|
37554
|
+
text: option.textContent,
|
|
37306
37555
|
cssClass: optClass,
|
|
37307
|
-
disabled: option.disabled,
|
|
37308
37556
|
handler: () => {
|
|
37309
37557
|
this.setValue(value);
|
|
37310
37558
|
},
|
|
@@ -37312,9 +37560,6 @@ class Select {
|
|
|
37312
37560
|
'aria-checked': isSelected ? 'true' : 'false',
|
|
37313
37561
|
role: 'radio',
|
|
37314
37562
|
},
|
|
37315
|
-
startContent,
|
|
37316
|
-
endContent,
|
|
37317
|
-
description: option.description,
|
|
37318
37563
|
};
|
|
37319
37564
|
});
|
|
37320
37565
|
// Add "cancel" button
|
|
@@ -37335,19 +37580,13 @@ class Select {
|
|
|
37335
37580
|
.filter((cls) => cls !== 'hydrated')
|
|
37336
37581
|
.join(' ');
|
|
37337
37582
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
37338
|
-
const { content, startContent, endContent } = extractOptionContent(option, this.customHTMLEnabled);
|
|
37339
37583
|
return {
|
|
37340
37584
|
type: inputType,
|
|
37341
37585
|
cssClass: optClass,
|
|
37342
|
-
label:
|
|
37586
|
+
label: option.textContent || '',
|
|
37343
37587
|
value,
|
|
37344
37588
|
checked: isOptionSelected(selectValue, value, this.compareWith),
|
|
37345
37589
|
disabled: option.disabled,
|
|
37346
|
-
startContent,
|
|
37347
|
-
endContent,
|
|
37348
|
-
description: option.description,
|
|
37349
|
-
labelPlacement: option.labelPlacement,
|
|
37350
|
-
justify: option.justify,
|
|
37351
37590
|
};
|
|
37352
37591
|
});
|
|
37353
37592
|
return alertInputs;
|
|
@@ -37360,9 +37599,8 @@ class Select {
|
|
|
37360
37599
|
.filter((cls) => cls !== 'hydrated')
|
|
37361
37600
|
.join(' ');
|
|
37362
37601
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
37363
|
-
const { content, startContent, endContent } = extractOptionContent(option, this.customHTMLEnabled);
|
|
37364
37602
|
return {
|
|
37365
|
-
text:
|
|
37603
|
+
text: option.textContent || '',
|
|
37366
37604
|
cssClass: optClass,
|
|
37367
37605
|
value,
|
|
37368
37606
|
checked: isOptionSelected(selectValue, value, this.compareWith),
|
|
@@ -37373,11 +37611,6 @@ class Select {
|
|
|
37373
37611
|
this.close();
|
|
37374
37612
|
}
|
|
37375
37613
|
},
|
|
37376
|
-
startContent,
|
|
37377
|
-
endContent,
|
|
37378
|
-
description: option.description,
|
|
37379
|
-
labelPlacement: option.labelPlacement,
|
|
37380
|
-
justify: option.justify,
|
|
37381
37614
|
};
|
|
37382
37615
|
});
|
|
37383
37616
|
return popoverOptions;
|
|
@@ -37410,21 +37643,15 @@ class Select {
|
|
|
37410
37643
|
ionShadowTarget: this.nativeWrapperEl,
|
|
37411
37644
|
} });
|
|
37412
37645
|
}
|
|
37413
|
-
const options = this.createOverlaySelectOptions(this.childOpts, value);
|
|
37414
|
-
const hasRichContent = options.some((opt) => opt.startContent || opt.endContent || opt.description);
|
|
37415
37646
|
const popoverOpts = Object.assign(Object.assign({ mode,
|
|
37416
37647
|
event, alignment: 'center', size,
|
|
37417
|
-
showBackdrop }, interfaceOptions), { component: 'ion-select-popover', cssClass: [
|
|
37418
|
-
'select-popover',
|
|
37419
|
-
hasRichContent ? 'select-popover-rich-content' : undefined,
|
|
37420
|
-
interfaceOptions.cssClass,
|
|
37421
|
-
], componentProps: {
|
|
37648
|
+
showBackdrop }, interfaceOptions), { component: 'ion-select-popover', cssClass: ['select-popover', interfaceOptions.cssClass], componentProps: {
|
|
37422
37649
|
header: interfaceOptions.header,
|
|
37423
37650
|
subHeader: interfaceOptions.subHeader,
|
|
37424
37651
|
message: interfaceOptions.message,
|
|
37425
37652
|
multiple,
|
|
37426
37653
|
value,
|
|
37427
|
-
options,
|
|
37654
|
+
options: this.createOverlaySelectOptions(this.childOpts, value),
|
|
37428
37655
|
} });
|
|
37429
37656
|
return popoverController.create(popoverOpts);
|
|
37430
37657
|
}
|
|
@@ -37505,18 +37732,12 @@ class Select {
|
|
|
37505
37732
|
}
|
|
37506
37733
|
return;
|
|
37507
37734
|
}
|
|
37508
|
-
|
|
37509
|
-
* Returns the text to display in the select based on the selected value.
|
|
37510
|
-
*
|
|
37511
|
-
* @param useHTML If `true`, the returned text will include any custom HTML content from the selected option. If `false`, the returned text will be plain text without any HTML. Defaults to `false`.
|
|
37512
|
-
* @returns The text to display in the select, either with or without HTML based on the `useHTML` parameter.
|
|
37513
|
-
*/
|
|
37514
|
-
getText(useHTML = false) {
|
|
37735
|
+
getText() {
|
|
37515
37736
|
const selectedText = this.selectedText;
|
|
37516
37737
|
if (selectedText != null && selectedText !== '') {
|
|
37517
37738
|
return selectedText;
|
|
37518
37739
|
}
|
|
37519
|
-
return generateText(this.childOpts, this.value, this.compareWith
|
|
37740
|
+
return generateText(this.childOpts, this.value, this.compareWith);
|
|
37520
37741
|
}
|
|
37521
37742
|
setFocus() {
|
|
37522
37743
|
if (this.focusEl) {
|
|
@@ -37586,47 +37807,6 @@ class Select {
|
|
|
37586
37807
|
*/
|
|
37587
37808
|
return this.renderLabel();
|
|
37588
37809
|
}
|
|
37589
|
-
/**
|
|
37590
|
-
* Wraps text nodes in the select text with span elements
|
|
37591
|
-
* so spacing can be added between elements without
|
|
37592
|
-
* changing the display to prevent losing the ellipses
|
|
37593
|
-
* behavior.
|
|
37594
|
-
*
|
|
37595
|
-
* Only wraps when the string contains HTML elements
|
|
37596
|
-
* alongside text.
|
|
37597
|
-
*/
|
|
37598
|
-
wrapSelectTextNodes(html) {
|
|
37599
|
-
const temp = document.createElement('div');
|
|
37600
|
-
temp.innerHTML = html;
|
|
37601
|
-
const hasElements = Array.from(temp.childNodes).some((n) => n.nodeType === Node.ELEMENT_NODE);
|
|
37602
|
-
// Return the plain text
|
|
37603
|
-
if (!hasElements) {
|
|
37604
|
-
return html;
|
|
37605
|
-
}
|
|
37606
|
-
Array.from(temp.childNodes).forEach((node) => {
|
|
37607
|
-
var _a, _b, _c, _d;
|
|
37608
|
-
if (node.nodeType === Node.TEXT_NODE && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
37609
|
-
const text = node.textContent;
|
|
37610
|
-
/**
|
|
37611
|
-
* Split comma separator from the text content
|
|
37612
|
-
* e.g., ", Bacon" becomes ", " text node + <span>Bacon</span>.
|
|
37613
|
-
*/
|
|
37614
|
-
const commaMatch = text.match(/^(,\s*)(.*)/);
|
|
37615
|
-
if (commaMatch) {
|
|
37616
|
-
const commaNode = document.createTextNode(commaMatch[1]);
|
|
37617
|
-
const wrapper = document.createElement('span');
|
|
37618
|
-
wrapper.textContent = commaMatch[2];
|
|
37619
|
-
(_b = node.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(wrapper, node);
|
|
37620
|
-
(_c = wrapper.parentNode) === null || _c === void 0 ? void 0 : _c.insertBefore(commaNode, wrapper);
|
|
37621
|
-
return;
|
|
37622
|
-
}
|
|
37623
|
-
const wrapper = document.createElement('span');
|
|
37624
|
-
(_d = node.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(wrapper, node);
|
|
37625
|
-
wrapper.appendChild(node);
|
|
37626
|
-
}
|
|
37627
|
-
});
|
|
37628
|
-
return temp.innerHTML;
|
|
37629
|
-
}
|
|
37630
37810
|
/**
|
|
37631
37811
|
* Renders either the placeholder
|
|
37632
37812
|
* or the selected values based on
|
|
@@ -37634,7 +37814,7 @@ class Select {
|
|
|
37634
37814
|
*/
|
|
37635
37815
|
renderSelectText() {
|
|
37636
37816
|
const { placeholder } = this;
|
|
37637
|
-
const displayValue = this.getText(
|
|
37817
|
+
const displayValue = this.getText();
|
|
37638
37818
|
let addPlaceholderClass = false;
|
|
37639
37819
|
let selectText = displayValue;
|
|
37640
37820
|
if (selectText === '' && placeholder !== undefined) {
|
|
@@ -37646,10 +37826,6 @@ class Select {
|
|
|
37646
37826
|
'select-placeholder': addPlaceholderClass,
|
|
37647
37827
|
};
|
|
37648
37828
|
const textPart = addPlaceholderClass ? 'placeholder' : 'text';
|
|
37649
|
-
if (this.customHTMLEnabled) {
|
|
37650
|
-
const wrapped = this.wrapSelectTextNodes(selectText);
|
|
37651
|
-
return hAsync("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart, innerHTML: wrapped });
|
|
37652
|
-
}
|
|
37653
37829
|
return (hAsync("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart }, selectText));
|
|
37654
37830
|
}
|
|
37655
37831
|
/**
|
|
@@ -37672,7 +37848,6 @@ class Select {
|
|
|
37672
37848
|
get ariaLabel() {
|
|
37673
37849
|
var _a;
|
|
37674
37850
|
const { placeholder, inheritedAttributes } = this;
|
|
37675
|
-
// Get the plain text from the selected text
|
|
37676
37851
|
const displayValue = this.getText();
|
|
37677
37852
|
// The aria label should be preferred over visible text if both are specified
|
|
37678
37853
|
const definedLabel = (_a = inheritedAttributes['aria-label']) !== null && _a !== void 0 ? _a : this.labelText;
|
|
@@ -37766,7 +37941,7 @@ class Select {
|
|
|
37766
37941
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
37767
37942
|
*/
|
|
37768
37943
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
37769
|
-
return (hAsync(Host, { key: '
|
|
37944
|
+
return (hAsync(Host, { key: '5f4ee901b65554eacc9fa52230d06b1a5ff1247c', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
37770
37945
|
[mode]: true,
|
|
37771
37946
|
'in-item': inItem,
|
|
37772
37947
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -37784,7 +37959,7 @@ class Select {
|
|
|
37784
37959
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
37785
37960
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
37786
37961
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
37787
|
-
}) }, hAsync("label", { key: '
|
|
37962
|
+
}) }, hAsync("label", { key: 'd56d89b5b58da2b5eaebada9d1be58ca45c67806', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), hAsync("div", { key: 'bc8bf089c693781ad5b3a5db76a12223867d748e', class: "select-wrapper-inner", part: "inner" }, hAsync("slot", { key: 'e1c12b96f1573eb192608c458ed1f3463174cd89', name: "start" }), hAsync("div", { key: '6ee5e3900d8e462f175649b502ac6faa2f2b9909', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: 'faeaea34aad412e1458beab95d4b1b9ca7b87c41', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: 'aeff51e51c990844869eff9940575ce6b2223135', class: "select-highlight" })), this.renderBottomContent()));
|
|
37788
37963
|
}
|
|
37789
37964
|
get el() { return getElement(this); }
|
|
37790
37965
|
static get watchers() { return {
|
|
@@ -37855,232 +38030,34 @@ const parseValue = (value) => {
|
|
|
37855
38030
|
}
|
|
37856
38031
|
return value.toString();
|
|
37857
38032
|
};
|
|
37858
|
-
const generateText = (opts, value, compareWith
|
|
38033
|
+
const generateText = (opts, value, compareWith) => {
|
|
37859
38034
|
if (value === undefined) {
|
|
37860
38035
|
return '';
|
|
37861
38036
|
}
|
|
37862
38037
|
if (Array.isArray(value)) {
|
|
37863
38038
|
return value
|
|
37864
|
-
.map((v) => textForValue(opts, v, compareWith
|
|
38039
|
+
.map((v) => textForValue(opts, v, compareWith))
|
|
37865
38040
|
.filter((opt) => opt !== null)
|
|
37866
38041
|
.join(', ');
|
|
37867
38042
|
}
|
|
37868
38043
|
else {
|
|
37869
|
-
return textForValue(opts, value, compareWith
|
|
38044
|
+
return textForValue(opts, value, compareWith) || '';
|
|
37870
38045
|
}
|
|
37871
38046
|
};
|
|
37872
|
-
|
|
37873
|
-
* Returns the display text for a given value from the list of options.
|
|
37874
|
-
* When `useHTML` is true, returns sanitized HTML for the select text.
|
|
37875
|
-
* When `useHTML` is false, returns plain text for aria-label and other
|
|
37876
|
-
* text-only contexts.
|
|
37877
|
-
*
|
|
37878
|
-
* @param opts - The list of ion-select-option elements.
|
|
37879
|
-
* @param value - The value to find the matching option for.
|
|
37880
|
-
* @param compareWith - Custom comparison function or property name.
|
|
37881
|
-
* @param useHTML - If true, returns HTML string. If false, returns plain text.
|
|
37882
|
-
*/
|
|
37883
|
-
const textForValue = (opts, value, compareWith, useHTML = false) => {
|
|
38047
|
+
const textForValue = (opts, value, compareWith) => {
|
|
37884
38048
|
const selectOpt = opts.find((opt) => {
|
|
37885
38049
|
return compareOptions(value, getOptionValue(opt), compareWith);
|
|
37886
38050
|
});
|
|
37887
|
-
|
|
37888
|
-
if (!selectOpt) {
|
|
37889
|
-
return null;
|
|
37890
|
-
}
|
|
37891
|
-
// Return sanitized HTML for the select text
|
|
37892
|
-
if (customHTMLEnabled && useHTML) {
|
|
37893
|
-
return getOptionContent(selectOpt, undefined, true);
|
|
37894
|
-
}
|
|
37895
|
-
/**
|
|
37896
|
-
* When custom HTML is enabled, extract only the default slot content.
|
|
37897
|
-
* This ensures aria-label and other text-only contexts read only
|
|
37898
|
-
* the relevant option text.
|
|
37899
|
-
*/
|
|
37900
|
-
if (customHTMLEnabled) {
|
|
37901
|
-
const content = getOptionContent(selectOpt);
|
|
37902
|
-
if (typeof content === 'string') {
|
|
37903
|
-
return content;
|
|
37904
|
-
}
|
|
37905
|
-
/**
|
|
37906
|
-
* Elements were found in the default slot, extract and concatenate
|
|
37907
|
-
* their text content while trimming whitespace.
|
|
37908
|
-
*/
|
|
37909
|
-
if (content) {
|
|
37910
|
-
const texts = Array.from(content.childNodes)
|
|
37911
|
-
.map((n) => { var _a; return (_a = n.textContent) === null || _a === void 0 ? void 0 : _a.trim(); })
|
|
37912
|
-
.filter((t) => t);
|
|
37913
|
-
return texts.join(' ') || null;
|
|
37914
|
-
}
|
|
37915
|
-
// Empty option
|
|
37916
|
-
return null;
|
|
37917
|
-
}
|
|
37918
|
-
return getDefaultSlotPlainText(selectOpt);
|
|
37919
|
-
};
|
|
37920
|
-
/**
|
|
37921
|
-
* Trims whitespace from all text nodes within a DOM tree.
|
|
37922
|
-
* This prevents invisible layout shifts and unwanted gaps between
|
|
37923
|
-
* elements when HTML content is injected via innerHTML or cloneNode,
|
|
37924
|
-
* as browsers preserve whitespace (tabs, newlines, spaces) from
|
|
37925
|
-
* the original source markup.
|
|
37926
|
-
*
|
|
37927
|
-
* @param node The root node to start trimming text nodes from.
|
|
37928
|
-
*/
|
|
37929
|
-
const trimTextNodes = (node) => {
|
|
37930
|
-
node.childNodes.forEach((child) => {
|
|
37931
|
-
var _a;
|
|
37932
|
-
if (child.nodeType === Node.TEXT_NODE) {
|
|
37933
|
-
child.textContent = ((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
37934
|
-
}
|
|
37935
|
-
else if (child.nodeType === Node.ELEMENT_NODE) {
|
|
37936
|
-
trimTextNodes(child);
|
|
37937
|
-
}
|
|
37938
|
-
});
|
|
37939
|
-
};
|
|
37940
|
-
/**
|
|
37941
|
-
* Extracts and clones content from an `ion-select-option` element
|
|
37942
|
-
* for rendering within overlay interfaces or the select text when `customHTMLEnabled` is `true`.
|
|
37943
|
-
*
|
|
37944
|
-
* @param option - The `ion-select-option` element to extract content from.
|
|
37945
|
-
* @param slotName - Optional slot name to extract. If omitted, extracts the default slot content.
|
|
37946
|
-
* @param useHTML - If `true`, the returned string will include any custom HTML content. If `false`, the returned string will be plain text without any HTML.
|
|
37947
|
-
* @returns When `useHTML` is `true`, a sanitized HTML string. When `false`, a
|
|
37948
|
-
* div element containing cloned child nodes. Returns `null` if no matching
|
|
37949
|
-
* content is found.
|
|
37950
|
-
*/
|
|
37951
|
-
const getOptionContent = (option, slotName, useHTML = false) => {
|
|
37952
|
-
let nodes;
|
|
37953
|
-
if (slotName) {
|
|
37954
|
-
// Named slot: get elements with matching slot attribute
|
|
37955
|
-
nodes = Array.from(option.children).filter((el) => el.getAttribute('slot') === slotName);
|
|
37956
|
-
}
|
|
37957
|
-
else {
|
|
37958
|
-
// Default slot: get nodes without a slot attribute
|
|
37959
|
-
const defaultSlot = getOptionDefaultSlot(option) || [];
|
|
37960
|
-
nodes = defaultSlot.filter((node) => {
|
|
37961
|
-
var _a;
|
|
37962
|
-
/**
|
|
37963
|
-
* Exclude whitespace-only text nodes (newline noise between
|
|
37964
|
-
* markup elements). Element nodes are always kept, even when
|
|
37965
|
-
* their textContent is empty (e.g. <svg>, <img>).
|
|
37966
|
-
*/
|
|
37967
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
37968
|
-
return ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim().length) !== 0;
|
|
37969
|
-
}
|
|
37970
|
-
return true;
|
|
37971
|
-
});
|
|
37972
|
-
}
|
|
37973
|
-
if (nodes.length === 0) {
|
|
37974
|
-
return null;
|
|
37975
|
-
}
|
|
37976
|
-
// Return plain text if no elements are found
|
|
37977
|
-
if (!slotName && nodes.every((n) => n.nodeType === Node.TEXT_NODE)) {
|
|
37978
|
-
return nodes.map((n) => { var _a; return (_a = n.textContent) === null || _a === void 0 ? void 0 : _a.trim(); }).join(' ') || null;
|
|
37979
|
-
}
|
|
37980
|
-
/**
|
|
37981
|
-
* Mirror known custom-element properties (e.g. ion-icon's `icon`)
|
|
37982
|
-
* onto attributes before cloning. Frameworks like Vue set these as
|
|
37983
|
-
* DOM properties, which `cloneNode` doesn't copy, so without this
|
|
37984
|
-
* step the cloned overlay copy renders without the prop's value.
|
|
37985
|
-
*/
|
|
37986
|
-
nodes.forEach((n) => {
|
|
37987
|
-
if (n.nodeType === Node.ELEMENT_NODE) {
|
|
37988
|
-
reflectPropertiesToAttributes(n);
|
|
37989
|
-
}
|
|
37990
|
-
});
|
|
37991
|
-
// Clone each node into a temporary container
|
|
37992
|
-
const container = document.createElement('div');
|
|
37993
|
-
nodes.forEach((n) => {
|
|
37994
|
-
var _a;
|
|
37995
|
-
const clone = n.cloneNode(true);
|
|
37996
|
-
if (clone.nodeType === Node.TEXT_NODE) {
|
|
37997
|
-
clone.textContent = ((_a = clone.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
37998
|
-
}
|
|
37999
|
-
else {
|
|
38000
|
-
trimTextNodes(clone);
|
|
38001
|
-
}
|
|
38002
|
-
container.appendChild(clone);
|
|
38003
|
-
});
|
|
38004
|
-
/**
|
|
38005
|
-
* Sanitize the cloned DOM in place. Trusted attributes (size, color,
|
|
38006
|
-
* shape, etc.) are preserved; event handlers, javascript: URLs, and
|
|
38007
|
-
* blocked tags are stripped.
|
|
38008
|
-
*/
|
|
38009
|
-
sanitizeDOMTree(container);
|
|
38010
|
-
if (useHTML) {
|
|
38011
|
-
return container.innerHTML.trim() || null;
|
|
38012
|
-
}
|
|
38013
|
-
return container;
|
|
38014
|
-
};
|
|
38015
|
-
/**
|
|
38016
|
-
* Returns the child nodes that belong to the default slot of an
|
|
38017
|
-
* option element, excluding any nodes that are assigned to named
|
|
38018
|
-
* slots.
|
|
38019
|
-
*
|
|
38020
|
-
* @param option - The `ion-select-option` element to extract default-slot nodes from.
|
|
38021
|
-
* @returns An array of default slot nodes, or `null` if none are found.
|
|
38022
|
-
*/
|
|
38023
|
-
const getOptionDefaultSlot = (option) => {
|
|
38024
|
-
const defaultSlotNodes = Array.from(option.childNodes).filter((node) => {
|
|
38025
|
-
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
38026
|
-
return !node.hasAttribute('slot');
|
|
38027
|
-
}
|
|
38028
|
-
return node.nodeType === Node.TEXT_NODE;
|
|
38029
|
-
});
|
|
38030
|
-
if (defaultSlotNodes.length === 0) {
|
|
38031
|
-
return null;
|
|
38032
|
-
}
|
|
38033
|
-
return defaultSlotNodes;
|
|
38034
|
-
};
|
|
38035
|
-
/**
|
|
38036
|
-
* Extracts plain text from only the default slot of an option,
|
|
38037
|
-
* excluding content assigned to named slots (start/end).
|
|
38038
|
-
*/
|
|
38039
|
-
const getDefaultSlotPlainText = (option) => {
|
|
38040
|
-
const texts = Array.from(option.childNodes)
|
|
38041
|
-
.filter((node) => {
|
|
38042
|
-
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
38043
|
-
return !node.hasAttribute('slot');
|
|
38044
|
-
}
|
|
38045
|
-
return node.nodeType === Node.TEXT_NODE;
|
|
38046
|
-
})
|
|
38047
|
-
.filter((node) => node.nodeType === Node.TEXT_NODE)
|
|
38048
|
-
.map((n) => { var _a; return (_a = n.textContent) === null || _a === void 0 ? void 0 : _a.trim(); })
|
|
38049
|
-
.filter((t) => t);
|
|
38050
|
-
return texts.join(' ');
|
|
38051
|
-
};
|
|
38052
|
-
/**
|
|
38053
|
-
* Extracts the rich content from an `ion-select-option`.
|
|
38054
|
-
* When `customHTMLEnabled` is `false`, only the plain text from the
|
|
38055
|
-
* default slot is read and the start and end slots are skipped.
|
|
38056
|
-
*
|
|
38057
|
-
* @param option - The `ion-select-option` element to extract content from.
|
|
38058
|
-
* @param customHTMLEnabled - Whether custom HTML rendering is enabled
|
|
38059
|
-
* via the `innerHTMLTemplatesEnabled` config.
|
|
38060
|
-
*/
|
|
38061
|
-
const extractOptionContent = (option, customHTMLEnabled) => {
|
|
38062
|
-
var _a, _b;
|
|
38063
|
-
if (!customHTMLEnabled) {
|
|
38064
|
-
return {
|
|
38065
|
-
content: getDefaultSlotPlainText(option),
|
|
38066
|
-
startContent: undefined,
|
|
38067
|
-
endContent: undefined,
|
|
38068
|
-
};
|
|
38069
|
-
}
|
|
38070
|
-
return {
|
|
38071
|
-
content: getOptionContent(option),
|
|
38072
|
-
startContent: (_a = getOptionContent(option, 'start')) !== null && _a !== void 0 ? _a : undefined,
|
|
38073
|
-
endContent: (_b = getOptionContent(option, 'end')) !== null && _b !== void 0 ? _b : undefined,
|
|
38074
|
-
};
|
|
38051
|
+
return selectOpt ? selectOpt.textContent : null;
|
|
38075
38052
|
};
|
|
38076
38053
|
let selectIds = 0;
|
|
38077
38054
|
const OPTION_CLASS = 'select-interface-option';
|
|
38078
38055
|
|
|
38079
|
-
const ionicSelectModalMdCss = () => `.
|
|
38056
|
+
const ionicSelectModalMdCss = () => `.sc-ion-select-modal-ionic-h{height:100%}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-ionic{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-ionic{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-ionic{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}`;
|
|
38080
38057
|
|
|
38081
|
-
const selectModalIosCss = () => `.
|
|
38058
|
+
const selectModalIosCss = () => `.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}`;
|
|
38082
38059
|
|
|
38083
|
-
const selectModalMdCss = () => `.
|
|
38060
|
+
const selectModalMdCss = () => `.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}`;
|
|
38084
38061
|
|
|
38085
38062
|
class SelectModal {
|
|
38086
38063
|
constructor(hostRef) {
|
|
@@ -38134,90 +38111,39 @@ class SelectModal {
|
|
|
38134
38111
|
}
|
|
38135
38112
|
}
|
|
38136
38113
|
renderRadioOptions() {
|
|
38137
|
-
const mode = getIonMode$1(this);
|
|
38138
38114
|
const checked = this.options.filter((o) => o.checked).map((o) => o.value)[0];
|
|
38139
|
-
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option
|
|
38140
|
-
var _a, _b;
|
|
38141
|
-
/**
|
|
38142
|
-
* Cast to `SelectOverlayOption` to access rich content
|
|
38143
|
-
* fields (`startContent`, `endContent`, `description`)
|
|
38144
|
-
* that are passed through from `ion-select` but not
|
|
38145
|
-
* part of the public `SelectModalOption` interface.
|
|
38146
|
-
*/
|
|
38147
|
-
const richOption = option;
|
|
38148
|
-
const hasRichContent = !!richOption.startContent || !!richOption.endContent || !!richOption.description;
|
|
38149
|
-
const optionLabelOptions = {
|
|
38150
|
-
id: `modal-option-${index}`,
|
|
38151
|
-
label: richOption.text,
|
|
38152
|
-
startContent: richOption.startContent,
|
|
38153
|
-
endContent: richOption.endContent,
|
|
38154
|
-
description: richOption.description,
|
|
38155
|
-
};
|
|
38156
|
-
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'radio', 'modal');
|
|
38157
|
-
const defaultJustify = getOverlayLabelJustify(mode, 'radio', 'modal');
|
|
38158
|
-
return (hAsync("ion-item", { lines: "none",
|
|
38115
|
+
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option) => (hAsync("ion-item", { lines: "none", class: Object.assign({
|
|
38159
38116
|
// TODO FW-4784
|
|
38160
|
-
|
|
38161
|
-
|
|
38162
|
-
|
|
38163
|
-
|
|
38164
|
-
|
|
38165
|
-
|
|
38166
|
-
|
|
38167
|
-
|
|
38168
|
-
|
|
38169
|
-
}
|
|
38170
|
-
|
|
38171
|
-
|
|
38117
|
+
'item-radio-checked': option.value === checked
|
|
38118
|
+
}, getClassMap(option.cssClass)) }, hAsync("ion-radio", { value: option.value, disabled: option.disabled, justify: "start", labelPlacement: "end", onClick: () => this.closeModal(), onKeyDown: (ev) => {
|
|
38119
|
+
if (ev.key === 'Enter' && !ev.repeat) {
|
|
38120
|
+
this.pendingEnterTarget = ev.currentTarget;
|
|
38121
|
+
}
|
|
38122
|
+
}, onKeyUp: (ev) => {
|
|
38123
|
+
if (ev.key === ' ') {
|
|
38124
|
+
// Space selects and dismisses in one press.
|
|
38125
|
+
this.closeModal();
|
|
38126
|
+
}
|
|
38127
|
+
else if (ev.key === 'Enter') {
|
|
38128
|
+
const shouldClose = this.pendingEnterTarget === ev.currentTarget;
|
|
38129
|
+
this.pendingEnterTarget = null;
|
|
38130
|
+
if (shouldClose) {
|
|
38172
38131
|
this.closeModal();
|
|
38173
38132
|
}
|
|
38174
|
-
|
|
38175
|
-
|
|
38176
|
-
this.pendingEnterTarget = null;
|
|
38177
|
-
if (shouldClose) {
|
|
38178
|
-
this.closeModal();
|
|
38179
|
-
}
|
|
38180
|
-
}
|
|
38181
|
-
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
38182
|
-
})));
|
|
38133
|
+
}
|
|
38134
|
+
} }, option.text))))));
|
|
38183
38135
|
}
|
|
38184
38136
|
renderCheckboxOptions() {
|
|
38185
|
-
|
|
38186
|
-
return this.options.map((option, index) => {
|
|
38187
|
-
var _a, _b;
|
|
38188
|
-
/**
|
|
38189
|
-
* Cast to `SelectOverlayOption` to access rich content
|
|
38190
|
-
* fields (`startContent`, `endContent`, `description`)
|
|
38191
|
-
* that are passed through from `ion-select` but not
|
|
38192
|
-
* part of the public `SelectModalOption` interface.
|
|
38193
|
-
*/
|
|
38194
|
-
const richOption = option;
|
|
38195
|
-
const hasRichContent = !!richOption.startContent || !!richOption.endContent || !!richOption.description;
|
|
38196
|
-
const optionLabelOptions = {
|
|
38197
|
-
id: `modal-option-${index}`,
|
|
38198
|
-
label: richOption.text,
|
|
38199
|
-
startContent: richOption.startContent,
|
|
38200
|
-
endContent: richOption.endContent,
|
|
38201
|
-
description: richOption.description,
|
|
38202
|
-
};
|
|
38203
|
-
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'checkbox', 'modal');
|
|
38204
|
-
const defaultJustify = getOverlayLabelJustify(mode, 'checkbox', 'modal');
|
|
38205
|
-
return (hAsync("ion-item", {
|
|
38137
|
+
return this.options.map((option) => (hAsync("ion-item", { class: Object.assign({
|
|
38206
38138
|
// TODO FW-4784
|
|
38207
|
-
|
|
38208
|
-
|
|
38209
|
-
|
|
38210
|
-
|
|
38211
|
-
}
|
|
38212
|
-
'select-option-has-rich-content': hasRichContent,
|
|
38213
|
-
}, value: option.value, disabled: option.disabled, checked: option.checked, justify: (_a = richOption.justify) !== null && _a !== void 0 ? _a : defaultJustify, labelPlacement: (_b = richOption.labelPlacement) !== null && _b !== void 0 ? _b : defaultLabelPlacement, onIonChange: (ev) => {
|
|
38214
|
-
this.setChecked(ev);
|
|
38215
|
-
this.callOptionHandler(ev);
|
|
38216
|
-
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
38217
|
-
});
|
|
38139
|
+
'item-checkbox-checked': option.checked
|
|
38140
|
+
}, getClassMap(option.cssClass)) }, hAsync("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
|
|
38141
|
+
this.setChecked(ev);
|
|
38142
|
+
this.callOptionHandler(ev);
|
|
38143
|
+
} }, option.text))));
|
|
38218
38144
|
}
|
|
38219
38145
|
render() {
|
|
38220
|
-
return (hAsync(Host, { key: '
|
|
38146
|
+
return (hAsync(Host, { key: 'fda0bf6f93cd5ec9f3c64f88a52de849e0e140a2', class: getIonMode$1(this) }, hAsync("ion-header", { key: '27c0b17175a53db9ff159feeeb96451a3f011dab' }, hAsync("ion-toolbar", { key: '91a4155ebc317fbc9f1bb3e26a7e94754b953c9b' }, this.header !== undefined && hAsync("ion-title", { key: 'f6dae8e4e381f322cc90efefd9bb6ef81d4d2f3e' }, this.header), hAsync("ion-buttons", { key: 'e7760532fb2e7e7385ed6e62097d92d96ff20148', slot: "end" }, hAsync("ion-button", { key: '4999b6fc46cba138186546dca67b7950855e6fb7', onClick: () => this.closeModal() }, this.cancelText)))), hAsync("ion-content", { key: 'c73f80a4bc25b9061ea65cf11e5d811c1a4d8704' }, hAsync("ion-list", { key: 'b21905d15b36ad5eb45845e768918d2763cf48b1' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
|
|
38221
38147
|
}
|
|
38222
38148
|
get el() { return getElement(this); }
|
|
38223
38149
|
static get style() { return {
|
|
@@ -38242,24 +38168,17 @@ class SelectModal {
|
|
|
38242
38168
|
|
|
38243
38169
|
const selectOptionCss = () => `:host{display:none}`;
|
|
38244
38170
|
|
|
38245
|
-
/**
|
|
38246
|
-
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
38247
|
-
*
|
|
38248
|
-
* @slot - Content is placed between the named slots if provided without a slot.
|
|
38249
|
-
* @slot start - Content is placed to the left of the select option text in LTR, and to the right in RTL.
|
|
38250
|
-
* @slot end - Content is placed to the right of the select option text in LTR, and to the left in RTL.
|
|
38251
|
-
*/
|
|
38252
38171
|
class SelectOption {
|
|
38253
38172
|
constructor(hostRef) {
|
|
38254
38173
|
registerInstance(this, hostRef);
|
|
38255
38174
|
this.inputId = `ion-selopt-${selectOptionIds++}`;
|
|
38256
38175
|
/**
|
|
38257
|
-
* If `true`, the user cannot interact with the select option.
|
|
38176
|
+
* If `true`, the user cannot interact with the select option. This property does not apply when `interface="action-sheet"` as `ion-action-sheet` does not allow for disabled buttons.
|
|
38258
38177
|
*/
|
|
38259
38178
|
this.disabled = false;
|
|
38260
38179
|
}
|
|
38261
38180
|
render() {
|
|
38262
|
-
return hAsync(Host, { key: '
|
|
38181
|
+
return hAsync(Host, { key: '824730b6c1e4f15b716e91b05840e890af5f1577', role: "option", id: this.inputId, class: getIonMode$1(this) });
|
|
38263
38182
|
}
|
|
38264
38183
|
get el() { return getElement(this); }
|
|
38265
38184
|
static get style() { return selectOptionCss(); }
|
|
@@ -38268,10 +38187,7 @@ class SelectOption {
|
|
|
38268
38187
|
"$tagName$": "ion-select-option",
|
|
38269
38188
|
"$members$": {
|
|
38270
38189
|
"disabled": [4],
|
|
38271
|
-
"value": [8]
|
|
38272
|
-
"description": [1],
|
|
38273
|
-
"labelPlacement": [1, "label-placement"],
|
|
38274
|
-
"justify": [1]
|
|
38190
|
+
"value": [8]
|
|
38275
38191
|
},
|
|
38276
38192
|
"$listeners$": undefined,
|
|
38277
38193
|
"$lazyBundleId$": "-",
|
|
@@ -38280,9 +38196,9 @@ class SelectOption {
|
|
|
38280
38196
|
}
|
|
38281
38197
|
let selectOptionIds = 0;
|
|
38282
38198
|
|
|
38283
|
-
const selectPopoverIosCss = () => `.
|
|
38199
|
+
const selectPopoverIosCss = () => `.sc-ion-select-popover-ios-h ion-list.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-ios,ion-label.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-select-popover-ios-h{overflow-y:auto}`;
|
|
38284
38200
|
|
|
38285
|
-
const selectPopoverMdCss = () => `.
|
|
38201
|
+
const selectPopoverMdCss = () => `.sc-ion-select-popover-md-h ion-list.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-md,ion-label.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-select-popover-md-h{overflow-y:auto}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md::part(container),ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md [part~="container"]{display:none}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md::part(label),ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-popover-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-popover-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-popover-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}`;
|
|
38286
38202
|
|
|
38287
38203
|
/**
|
|
38288
38204
|
* @internal
|
|
@@ -38356,91 +38272,41 @@ class SelectPopover {
|
|
|
38356
38272
|
}
|
|
38357
38273
|
}
|
|
38358
38274
|
renderCheckboxOptions(options) {
|
|
38359
|
-
|
|
38360
|
-
return options.map((option, index) => {
|
|
38361
|
-
var _a, _b;
|
|
38362
|
-
/**
|
|
38363
|
-
* Cast to `SelectOverlayOption` to access rich content
|
|
38364
|
-
* fields (`startContent`, `endContent`, `description`)
|
|
38365
|
-
* that are passed through from `ion-select` but not
|
|
38366
|
-
* part of the public `SelectPopoverOption` interface.
|
|
38367
|
-
*/
|
|
38368
|
-
const richOption = option;
|
|
38369
|
-
const hasRichContent = !!richOption.startContent || !!richOption.endContent || !!richOption.description;
|
|
38370
|
-
const optionLabelOptions = {
|
|
38371
|
-
id: `popover-option-${index}`,
|
|
38372
|
-
label: richOption.text,
|
|
38373
|
-
startContent: richOption.startContent,
|
|
38374
|
-
endContent: richOption.endContent,
|
|
38375
|
-
description: richOption.description,
|
|
38376
|
-
};
|
|
38377
|
-
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'checkbox');
|
|
38378
|
-
const defaultJustify = getOverlayLabelJustify(mode, 'checkbox');
|
|
38379
|
-
return (hAsync("ion-item", {
|
|
38275
|
+
return options.map((option) => (hAsync("ion-item", { class: Object.assign({
|
|
38380
38276
|
// TODO FW-4784
|
|
38381
|
-
|
|
38382
|
-
|
|
38383
|
-
|
|
38384
|
-
|
|
38385
|
-
}
|
|
38386
|
-
'select-option-has-rich-content': hasRichContent,
|
|
38387
|
-
}, value: option.value, disabled: option.disabled, checked: option.checked, justify: (_a = richOption.justify) !== null && _a !== void 0 ? _a : defaultJustify, labelPlacement: (_b = richOption.labelPlacement) !== null && _b !== void 0 ? _b : defaultLabelPlacement, onIonChange: (ev) => {
|
|
38388
|
-
this.setChecked(ev);
|
|
38389
|
-
this.callOptionHandler(ev);
|
|
38390
|
-
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
38391
|
-
});
|
|
38277
|
+
'item-checkbox-checked': option.checked
|
|
38278
|
+
}, getClassMap(option.cssClass)) }, hAsync("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
|
|
38279
|
+
this.setChecked(ev);
|
|
38280
|
+
this.callOptionHandler(ev);
|
|
38281
|
+
} }, option.text))));
|
|
38392
38282
|
}
|
|
38393
38283
|
renderRadioOptions(options) {
|
|
38394
|
-
const mode = getIonMode$1(this);
|
|
38395
38284
|
const checked = options.filter((o) => o.checked).map((o) => o.value)[0];
|
|
38396
|
-
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, options.map((option
|
|
38397
|
-
var _a, _b;
|
|
38398
|
-
/**
|
|
38399
|
-
* Cast to `SelectOverlayOption` to access rich content
|
|
38400
|
-
* fields (`startContent`, `endContent`, `description`)
|
|
38401
|
-
* that are passed through from `ion-select` but not
|
|
38402
|
-
* part of the public `SelectPopoverOption` interface.
|
|
38403
|
-
*/
|
|
38404
|
-
const richOption = option;
|
|
38405
|
-
const hasRichContent = !!richOption.startContent || !!richOption.endContent || !!richOption.description;
|
|
38406
|
-
const optionLabelOptions = {
|
|
38407
|
-
id: `popover-option-${index}`,
|
|
38408
|
-
label: richOption.text,
|
|
38409
|
-
startContent: richOption.startContent,
|
|
38410
|
-
endContent: richOption.endContent,
|
|
38411
|
-
description: richOption.description,
|
|
38412
|
-
};
|
|
38413
|
-
return (hAsync("ion-item", {
|
|
38285
|
+
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, options.map((option) => (hAsync("ion-item", { class: Object.assign({
|
|
38414
38286
|
// TODO FW-4784
|
|
38415
|
-
|
|
38416
|
-
|
|
38417
|
-
|
|
38418
|
-
|
|
38419
|
-
|
|
38420
|
-
|
|
38421
|
-
|
|
38422
|
-
|
|
38423
|
-
|
|
38424
|
-
|
|
38425
|
-
|
|
38426
|
-
|
|
38427
|
-
|
|
38287
|
+
'item-radio-checked': option.value === checked
|
|
38288
|
+
}, getClassMap(option.cssClass)) }, hAsync("ion-radio", { value: option.value, disabled: option.disabled, onClick: () => this.dismissParentPopover(), onKeyDown: (ev) => {
|
|
38289
|
+
if (ev.key === 'Enter' && !ev.repeat) {
|
|
38290
|
+
this.pendingEnterTarget = ev.currentTarget;
|
|
38291
|
+
}
|
|
38292
|
+
}, onKeyUp: (ev) => {
|
|
38293
|
+
if (ev.key === ' ') {
|
|
38294
|
+
// Space selects and dismisses in one press.
|
|
38295
|
+
this.dismissParentPopover();
|
|
38296
|
+
}
|
|
38297
|
+
else if (ev.key === 'Enter') {
|
|
38298
|
+
const shouldDismiss = this.pendingEnterTarget === ev.currentTarget;
|
|
38299
|
+
this.pendingEnterTarget = null;
|
|
38300
|
+
if (shouldDismiss) {
|
|
38428
38301
|
this.dismissParentPopover();
|
|
38429
38302
|
}
|
|
38430
|
-
|
|
38431
|
-
|
|
38432
|
-
this.pendingEnterTarget = null;
|
|
38433
|
-
if (shouldDismiss) {
|
|
38434
|
-
this.dismissParentPopover();
|
|
38435
|
-
}
|
|
38436
|
-
}
|
|
38437
|
-
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
38438
|
-
})));
|
|
38303
|
+
}
|
|
38304
|
+
} }, option.text))))));
|
|
38439
38305
|
}
|
|
38440
38306
|
render() {
|
|
38441
38307
|
const { header, message, options, subHeader } = this;
|
|
38442
38308
|
const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
|
|
38443
|
-
return (hAsync(Host, { key: '
|
|
38309
|
+
return (hAsync(Host, { key: 'e7449a1ecfcdbf45a79f8e26a00253c4e146448a', class: getIonMode$1(this) }, hAsync("ion-list", { key: '52abdfc8668c3429a0dcefef8ddedb6647fdd894' }, header !== undefined && hAsync("ion-list-header", { key: '978e5c03728756feafcc60a0e10e6ec59bf2ae11' }, header), hasSubHeaderOrMessage && (hAsync("ion-item", { key: 'e93c44e7f07a76def16e4b11f0fb4780d84ed402' }, hAsync("ion-label", { key: 'bba1aac43b0bc7f4f00978dd8301985233f3725c', class: "ion-text-wrap" }, subHeader !== undefined && hAsync("h3", { key: 'ad96f6017cf2cc5219540bded2c4f1ca3b532de2' }, subHeader), message !== undefined && hAsync("p", { key: '3fd038921dc40c4d0c29734433984b279ccaeec3' }, message)))), this.renderOptions(options))));
|
|
38444
38310
|
}
|
|
38445
38311
|
get el() { return getElement(this); }
|
|
38446
38312
|
static get style() { return {
|
|
@@ -38490,11 +38356,11 @@ class SkeletonText {
|
|
|
38490
38356
|
const animated = this.animated && config.getBoolean('animated', true);
|
|
38491
38357
|
const inMedia = hostContext('ion-avatar', this.el) || hostContext('ion-thumbnail', this.el);
|
|
38492
38358
|
const mode = getIonMode$1(this);
|
|
38493
|
-
return (hAsync(Host, { key: '
|
|
38359
|
+
return (hAsync(Host, { key: 'cb8da9aba121811b9a4ffdae60ed88105897cb3c', class: {
|
|
38494
38360
|
[mode]: true,
|
|
38495
38361
|
'skeleton-text-animated': animated,
|
|
38496
38362
|
'in-media': inMedia,
|
|
38497
|
-
} }, hAsync("span", { key: '
|
|
38363
|
+
} }, hAsync("span", { key: '5379deee3c76d46d615be0cba14b4f60129ffa25' }, "\u00A0")));
|
|
38498
38364
|
}
|
|
38499
38365
|
get el() { return getElement(this); }
|
|
38500
38366
|
static get style() { return skeletonTextCss(); }
|
|
@@ -38546,7 +38412,7 @@ class Spinner {
|
|
|
38546
38412
|
svgs.push(buildLine(spinner, duration, i, spinner.lines));
|
|
38547
38413
|
}
|
|
38548
38414
|
}
|
|
38549
|
-
return (hAsync(Host, { key: '
|
|
38415
|
+
return (hAsync(Host, { key: 'dd1954e557fa14b943e761474e29e4316ba53938', class: createColorClasses$1(self.color, {
|
|
38550
38416
|
[mode]: true,
|
|
38551
38417
|
[`spinner-${spinnerName}`]: true,
|
|
38552
38418
|
'spinner-paused': self.paused || config.getBoolean('_testing'),
|
|
@@ -38645,12 +38511,12 @@ class SplitPane {
|
|
|
38645
38511
|
}
|
|
38646
38512
|
render() {
|
|
38647
38513
|
const mode = getIonMode$1(this);
|
|
38648
|
-
return (hAsync(Host, { key: '
|
|
38514
|
+
return (hAsync(Host, { key: '05c88c009fbe2e223fd261760a2b49da1653ff62', class: {
|
|
38649
38515
|
[mode]: true,
|
|
38650
38516
|
// Used internally for styling
|
|
38651
38517
|
[`split-pane-${mode}`]: true,
|
|
38652
38518
|
'split-pane-visible': this.visible,
|
|
38653
|
-
} }, hAsync("slot", { key: '
|
|
38519
|
+
} }, hAsync("slot", { key: 'b35865082661253c4468520d79234fa5dab5bd35' })));
|
|
38654
38520
|
}
|
|
38655
38521
|
get el() { return getElement(this); }
|
|
38656
38522
|
static get watchers() { return {
|
|
@@ -38722,10 +38588,10 @@ class Tab {
|
|
|
38722
38588
|
}
|
|
38723
38589
|
render() {
|
|
38724
38590
|
const { tab, active, component } = this;
|
|
38725
|
-
return (hAsync(Host, { key: '
|
|
38591
|
+
return (hAsync(Host, { key: 'fbd837bad7a0632336d46a597ace23673b153e48', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
|
|
38726
38592
|
'ion-page': component === undefined,
|
|
38727
38593
|
'tab-hidden': !active,
|
|
38728
|
-
} }, hAsync("slot", { key: '
|
|
38594
|
+
} }, hAsync("slot", { key: '35c218169fda826c9c1337558e0278d0c7f5f26a' })));
|
|
38729
38595
|
}
|
|
38730
38596
|
get el() { return getElement(this); }
|
|
38731
38597
|
static get watchers() { return {
|
|
@@ -38839,11 +38705,11 @@ class TabBar {
|
|
|
38839
38705
|
const { color, translucent, keyboardVisible } = this;
|
|
38840
38706
|
const mode = getIonMode$1(this);
|
|
38841
38707
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
38842
|
-
return (hAsync(Host, { key: '
|
|
38708
|
+
return (hAsync(Host, { key: '24e164eaf81a0bec9237b561465618f10990806c', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses$1(color, {
|
|
38843
38709
|
[mode]: true,
|
|
38844
38710
|
'tab-bar-translucent': translucent,
|
|
38845
38711
|
'tab-bar-hidden': shouldHide,
|
|
38846
|
-
}) }, hAsync("slot", { key: '
|
|
38712
|
+
}) }, hAsync("slot", { key: '0ca29a2d97a7c38bbf43f8d79e271b874b4d9be8' })));
|
|
38847
38713
|
}
|
|
38848
38714
|
get el() { return getElement(this); }
|
|
38849
38715
|
static get watchers() { return {
|
|
@@ -38941,7 +38807,7 @@ class TabButton {
|
|
|
38941
38807
|
rel,
|
|
38942
38808
|
target,
|
|
38943
38809
|
};
|
|
38944
|
-
return (hAsync(Host, { key: '
|
|
38810
|
+
return (hAsync(Host, { key: '638b93ef40701ec3aefb89b1579eb91aaf6d4f8a', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
38945
38811
|
[mode]: true,
|
|
38946
38812
|
'tab-selected': selected,
|
|
38947
38813
|
'tab-disabled': disabled,
|
|
@@ -38953,7 +38819,7 @@ class TabButton {
|
|
|
38953
38819
|
'ion-activatable': true,
|
|
38954
38820
|
'ion-selectable': true,
|
|
38955
38821
|
'ion-focusable': true,
|
|
38956
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
38822
|
+
} }, hAsync("a", Object.assign({ key: 'c053d32fbcdad8d5e4a409956b47164d7a080c6b' }, attrs, { class: "button-native", part: "native", role: "tab", "aria-selected": selected ? 'true' : null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? '-1' : undefined }, inheritedAttributes), hAsync("span", { key: 'b3b460d33ec978a46b069442280d31b23bc8e794', class: "button-inner" }, hAsync("slot", { key: '87b3928475c941263261101b8fae27c6370d4671' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '6532e5b4546aebe4becaebe1c93ce0e6aedaffe7', type: "unbounded" }))));
|
|
38957
38823
|
}
|
|
38958
38824
|
get el() { return getElement(this); }
|
|
38959
38825
|
static get style() { return {
|
|
@@ -39144,7 +39010,7 @@ class Tabs {
|
|
|
39144
39010
|
return Array.from(this.el.querySelectorAll('ion-tab'));
|
|
39145
39011
|
}
|
|
39146
39012
|
render() {
|
|
39147
|
-
return (hAsync(Host, { key: '
|
|
39013
|
+
return (hAsync(Host, { key: 'c7131135b31aa312dc0207602561e1c0f4ac3e53', onIonTabButtonClick: this.onTabClicked }, hAsync("slot", { key: '6c46e91c0389bbcea1f15f35cf3ea513a74ac545', name: "top" }), hAsync("div", { key: '4f1b649d8bb60b61402b97359de204979c5eda52', class: "tabs-inner" }, hAsync("slot", { key: '8d1ef4952be4fb33567376e1083ea4da697fcae0' })), hAsync("slot", { key: '260b8da8031494e9cb4635b3d22c49a433042db1', name: "bottom" })));
|
|
39148
39014
|
}
|
|
39149
39015
|
get el() { return getElement(this); }
|
|
39150
39016
|
static get style() { return tabsCss(); }
|
|
@@ -39184,9 +39050,9 @@ class Text {
|
|
|
39184
39050
|
}
|
|
39185
39051
|
render() {
|
|
39186
39052
|
const mode = getIonMode$1(this);
|
|
39187
|
-
return (hAsync(Host, { key: '
|
|
39053
|
+
return (hAsync(Host, { key: 'bfaa49d35f43b8036725ae8a322c716fc6e43bdf', class: createColorClasses$1(this.color, {
|
|
39188
39054
|
[mode]: true,
|
|
39189
|
-
}) }, hAsync("slot", { key: '
|
|
39055
|
+
}) }, hAsync("slot", { key: 'c04880cd1935b42cbe60f58fd523b4d8a96072dc' })));
|
|
39190
39056
|
}
|
|
39191
39057
|
static get style() { return textCss(); }
|
|
39192
39058
|
static get cmpMeta() { return {
|
|
@@ -39647,7 +39513,7 @@ class Textarea {
|
|
|
39647
39513
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
39648
39514
|
*/
|
|
39649
39515
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
39650
|
-
return (hAsync(Host, { key: '
|
|
39516
|
+
return (hAsync(Host, { key: '4257e84acd46f43390fa2413d0b8f40e16a37499', class: createColorClasses$1(this.color, {
|
|
39651
39517
|
[mode]: true,
|
|
39652
39518
|
'has-value': hasValue,
|
|
39653
39519
|
'has-focus': hasFocus,
|
|
@@ -39656,7 +39522,7 @@ class Textarea {
|
|
|
39656
39522
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
39657
39523
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
39658
39524
|
'textarea-disabled': disabled,
|
|
39659
|
-
}) }, hAsync("label", { key: '
|
|
39525
|
+
}) }, hAsync("label", { key: '003da35bad92ab36777b7ae40855541bf900c64a', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '3cae2d19f96ba2b18a2d64298fdcc4b64ad34ac7', class: "textarea-wrapper-inner" }, hAsync("div", { key: 'e26cb06763d551f7f83b6ea80349871aab18a016', class: "start-slot-wrapper" }, hAsync("slot", { key: '135ba6db893eaca5f2a785fe61e24f33f56f3765', name: "start" })), hAsync("div", { key: '951eabdd01c5e370790cec8578268361dcc8abdc', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, hAsync("textarea", Object.assign({ key: '13d78f1a934b9f8d85cd9ed386dabc786f953f1d', class: "native-textarea", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes), value)), hAsync("div", { key: '699038558019470bccb4853fa65e7aeb069e0baa', class: "end-slot-wrapper" }, hAsync("slot", { key: '19d8c212d7c718aeb6924e10bf8e48cad01314ea', name: "end" }))), shouldRenderHighlight && hAsync("div", { key: '910a9437437ce7cab21e37a1cb4a6b309afda58f', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
39660
39526
|
}
|
|
39661
39527
|
get el() { return getElement(this); }
|
|
39662
39528
|
static get watchers() { return {
|
|
@@ -39725,7 +39591,7 @@ class Thumbnail {
|
|
|
39725
39591
|
registerInstance(this, hostRef);
|
|
39726
39592
|
}
|
|
39727
39593
|
render() {
|
|
39728
|
-
return (hAsync(Host, { key: '
|
|
39594
|
+
return (hAsync(Host, { key: 'b250e01664238f1dca8f9757b15bc3d5d9387ffa', class: getIonMode$1(this) }, hAsync("slot", { key: '72cb568bccabc983c5186a7596ef6c6d4ebf5ad9' })));
|
|
39729
39595
|
}
|
|
39730
39596
|
static get style() { return thumbnailCss(); }
|
|
39731
39597
|
static get cmpMeta() { return {
|
|
@@ -40585,9 +40451,9 @@ class Toast {
|
|
|
40585
40451
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
40586
40452
|
printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
40587
40453
|
}
|
|
40588
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
40454
|
+
return (hAsync(Host, Object.assign({ key: 'b5256edcf33d0ef51e6c5080c84e1ca58abe2ae0', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
40589
40455
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
40590
|
-
}, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '
|
|
40456
|
+
}, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '0860f7e895d8bc66e44c4d924ca569f4cbb1a749', class: wrapperClass, part: "wrapper" }, hAsync("div", { key: '28784199c880a3f664677c8f5560b7caa8903251', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (hAsync("ion-icon", { key: '0a63ba1336ad43d2aec14e49055eb46c112359c2', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), hAsync("div", { key: 'ecec8107af582dc55d4b3828dd7f3054a29f26b1', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
40591
40457
|
}
|
|
40592
40458
|
get el() { return getElement(this); }
|
|
40593
40459
|
static get watchers() { return {
|
|
@@ -40905,7 +40771,7 @@ class Toggle {
|
|
|
40905
40771
|
const value = this.getValue();
|
|
40906
40772
|
const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
|
|
40907
40773
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
40908
|
-
return (hAsync(Host, { key: '
|
|
40774
|
+
return (hAsync(Host, { key: '736e1dcfca34fd41f6f0632652e7f86d6996a232', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses$1(color, {
|
|
40909
40775
|
[mode]: true,
|
|
40910
40776
|
'in-item': hostContext('ion-item', el),
|
|
40911
40777
|
'toggle-activated': activated,
|
|
@@ -40915,10 +40781,10 @@ class Toggle {
|
|
|
40915
40781
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
40916
40782
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
40917
40783
|
[`toggle-${rtl}`]: true,
|
|
40918
|
-
}) }, hAsync("label", { key: '
|
|
40784
|
+
}) }, hAsync("label", { key: 'e697739fd3964c1c6c23331cf7e38a9841c46a6a', class: "toggle-wrapper", htmlFor: inputId }, hAsync("input", Object.assign({ key: '3d500b8c1bc879591249d183c1abb3f5f26aff6b', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), hAsync("div", { key: 'e38f3fe0e66b4ca434fd81514f5ef771c2960841', class: {
|
|
40919
40785
|
'label-text-wrapper': true,
|
|
40920
40786
|
'label-text-wrapper-hidden': !hasLabel,
|
|
40921
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '
|
|
40787
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '006dd3558264d69ab020c07005b348adc4ecdd5b' }), this.renderHintText()), hAsync("div", { key: 'dd4e52de31caabee41ec1bc58efecd1e213368c9', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
40922
40788
|
}
|
|
40923
40789
|
get el() { return getElement(this); }
|
|
40924
40790
|
static get watchers() { return {
|
|
@@ -41030,10 +40896,10 @@ class Toolbar {
|
|
|
41030
40896
|
this.childrenStyles.forEach((value) => {
|
|
41031
40897
|
Object.assign(childStyles, value);
|
|
41032
40898
|
});
|
|
41033
|
-
return (hAsync(Host, { key: '
|
|
40899
|
+
return (hAsync(Host, { key: 'b849db2863778dee6c5a251bffa1b3a657aeb036', class: Object.assign(Object.assign({}, childStyles), createColorClasses$1(this.color, {
|
|
41034
40900
|
[mode]: true,
|
|
41035
40901
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
41036
|
-
})) }, hAsync("div", { key: '
|
|
40902
|
+
})) }, hAsync("div", { key: '67f5bba9c4f527c3f35bfe1313a2b85741f9b246', class: "toolbar-background", part: "background" }), hAsync("div", { key: '085e8c68f056e5b0deb9d1606431fbeb45dae8e5', class: "toolbar-container", part: "container" }, hAsync("slot", { key: '15227c79c3baf883fd8c43fdb7e1313453933c79', name: "start" }), hAsync("slot", { key: '0b8a7f7e685aa31c80d9bc03446ccc3a9d07e0e8', name: "secondary" }), hAsync("div", { key: '57e4628c1fa89df79dd80456259db961bb691404', class: "toolbar-content", part: "content" }, hAsync("slot", { key: '82c2f6e1acf8d96db259bd8baf295881801edbd5' })), hAsync("slot", { key: 'b2d4afb15214199f206c0a5e08b581e4c9c2f58a', name: "primary" }), hAsync("slot", { key: 'bfb909a0c472f8834046c2ea23bef2f562167ad3', name: "end" }))));
|
|
41037
40903
|
}
|
|
41038
40904
|
get el() { return getElement(this); }
|
|
41039
40905
|
static get style() { return {
|
|
@@ -41079,11 +40945,11 @@ class ToolbarTitle {
|
|
|
41079
40945
|
render() {
|
|
41080
40946
|
const mode = getIonMode$1(this);
|
|
41081
40947
|
const size = this.getSize();
|
|
41082
|
-
return (hAsync(Host, { key: '
|
|
40948
|
+
return (hAsync(Host, { key: '44e63f8439df64c470692904427b417e19406476', class: createColorClasses$1(this.color, {
|
|
41083
40949
|
[mode]: true,
|
|
41084
40950
|
[`title-${size}`]: true,
|
|
41085
40951
|
'title-rtl': document.dir === 'rtl',
|
|
41086
|
-
}) }, hAsync("div", { key: '
|
|
40952
|
+
}) }, hAsync("div", { key: '784cf60a0db16045391891cc8fad0c7dbeba4039', class: "toolbar-title" }, hAsync("slot", { key: '0c720a50479ba257e8756337aeb9b0ab7516a227' }))));
|
|
41087
40953
|
}
|
|
41088
40954
|
get el() { return getElement(this); }
|
|
41089
40955
|
static get watchers() { return {
|
|
@@ -41163,8 +41029,10 @@ registerComponents([
|
|
|
41163
41029
|
Nav,
|
|
41164
41030
|
NavLink,
|
|
41165
41031
|
Note,
|
|
41032
|
+
Picker$1,
|
|
41166
41033
|
Picker,
|
|
41167
41034
|
PickerColumn,
|
|
41035
|
+
PickerColumnCmp,
|
|
41168
41036
|
PickerColumnOption,
|
|
41169
41037
|
Popover,
|
|
41170
41038
|
ProgressBar,
|