@ionic/core 8.8.14-dev.11784222473.142aed23 → 8.8.14-dev.11784243422.11f0110c
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-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-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-279dFMvg.js +4 -0
- package/components/p-BSQPZ79H.js +4 -0
- package/components/{p-BHrrc-3d.js → p-Buf_7zcy.js} +1 -1
- package/components/p-BwKpO3Is.js +4 -0
- package/components/p-C-Rx1zny.js +4 -0
- package/components/p-CHzfYZbv.js +4 -0
- package/components/p-D4h1H_hh.js +4 -0
- package/components/{p-BSEgsdFI.js → p-DhkITZ-y.js} +1 -1
- package/components/{p-5bE_Wz4Y.js → p-DpV-p5Xs.js} +1 -1
- package/components/{p-Cfx4M1Bn.js → p-Dz74mwlk.js} +1 -1
- package/components/p-LMGfIvTf.js +4 -0
- package/components/{p-BLmJ0zRm.js → p-XJWMAP8m.js} +1 -1
- package/components/p-_lHSumhG.js +4 -0
- package/components/p-j9Da6cYO.js +4 -0
- package/components/p-jOtMJMv8.js +4 -0
- package/components/{p-B60hm8Qv.js → p-r0aq7dpt.js} +1 -1
- package/components/p-uTR_dEqg.js +4 -0
- package/components/{p-rCa2eL0j.js → p-wk2QqrAo.js} +1 -1
- package/dist/cjs/config-DWdFbSNK.js +35 -0
- package/dist/cjs/index-Cueg3U4w.js +429 -0
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/ion-action-sheet.cjs.entry.js +27 -7
- package/dist/cjs/ion-alert.cjs.entry.js +64 -25
- package/dist/cjs/ion-app_8.cjs.entry.js +23 -9
- 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_3.cjs.entry.js → ion-datetime.cjs.entry.js} +1 -639
- package/dist/cjs/ion-img.cjs.entry.js +3 -1
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +3 -2
- 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 +10 -5
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +23 -18
- package/dist/cjs/ion-popover.cjs.entry.js +9 -5
- 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 +6 -5
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +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 +84 -30
- package/dist/cjs/ion-select_3.cjs.entry.js +407 -49
- 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 +6 -5
- 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/overlay-control-label-D2sdL2O8.js +50 -0
- package/dist/cjs/{overlays-DdtIYQUH.js → overlays-DSmSrd_4.js} +27 -31
- package/dist/cjs/select-option-render-DTF50t5r.js +124 -0
- package/dist/collection/collection-manifest.json +6 -10
- package/dist/collection/components/action-sheet/action-sheet.ios.css +229 -2
- package/dist/collection/components/action-sheet/action-sheet.js +24 -5
- package/dist/collection/components/action-sheet/action-sheet.md.css +175 -2
- package/dist/collection/components/alert/alert.ios.css +280 -10
- package/dist/collection/components/alert/alert.js +59 -21
- package/dist/collection/components/alert/alert.md.css +269 -20
- package/dist/collection/components/img/img.js +6 -1
- package/dist/collection/components/input/input.js +8 -8
- package/dist/collection/components/loading/loading.js +7 -3
- package/dist/collection/components/modal/modal.ios.css +0 -8
- package/dist/collection/components/modal/modal.js +23 -18
- package/dist/collection/components/modal/modal.md.css +0 -8
- package/dist/collection/components/popover/popover.ios.css +15 -0
- package/dist/collection/components/popover/popover.js +7 -3
- package/dist/collection/components/popover/popover.md.css +15 -0
- 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/router-link/router-link.js +2 -2
- package/dist/collection/components/router-outlet/router-outlet.js +38 -5
- 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 +33 -0
- package/dist/collection/components/select/select.js +323 -16
- package/dist/collection/components/select/select.md.css +33 -0
- package/dist/collection/components/select-modal/select-modal.ios.css +219 -0
- package/dist/collection/components/select-modal/select-modal.js +79 -26
- package/dist/collection/components/select-modal/select-modal.md.css +165 -0
- package/dist/collection/components/select-option/select-option.js +67 -3
- package/dist/collection/components/select-popover/select-popover.ios.css +219 -0
- package/dist/collection/components/select-popover/select-popover.js +78 -26
- package/dist/collection/components/select-popover/select-popover.md.css +165 -0
- 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/overlay-control-label.js +45 -0
- package/dist/collection/utils/overlays.js +26 -30
- package/dist/collection/utils/sanitization/index.js +274 -18
- package/dist/collection/utils/select-option-render.js +119 -0
- package/dist/docs.json +485 -1177
- package/dist/esm/config-BwKpO3Is.js +31 -0
- package/dist/esm/{index-DV3sJJW8.js → index-AlrZKoWR.js} +1 -1
- package/dist/esm/index-DQSkZyOJ.js +424 -0
- package/dist/esm/index.js +3 -2
- package/dist/esm/ion-accordion_2.entry.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +27 -7
- package/dist/esm/ion-alert.entry.js +63 -24
- package/dist/esm/ion-app_8.entry.js +23 -9
- 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_3.entry.js → ion-datetime.entry.js} +5 -641
- package/dist/esm/ion-fab_3.entry.js +1 -1
- package/dist/esm/ion-img.entry.js +4 -2
- package/dist/esm/ion-infinite-scroll_2.entry.js +2 -1
- 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 +9 -4
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +23 -18
- package/dist/esm/ion-popover.entry.js +9 -5
- 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 +5 -4
- 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 +2 -2
- 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 +84 -30
- package/dist/esm/ion-select_3.entry.js +410 -52
- 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 +5 -4
- 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/overlay-control-label-BSQPZ79H.js +47 -0
- package/dist/esm/{overlays-Dg0q2_tJ.js → overlays-DLNOHWNc.js} +28 -32
- package/dist/esm/select-option-render-B8nWZRnd.js +122 -0
- package/dist/html.html-data.json +51 -79
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-038eb991.entry.js +4 -0
- package/dist/ionic/{p-8fce95d5.entry.js → p-14095ba5.entry.js} +1 -1
- package/dist/ionic/{p-3a126bca.entry.js → p-259d0d98.entry.js} +1 -1
- package/dist/ionic/{p-fabcce6c.entry.js → p-341032b3.entry.js} +1 -1
- package/dist/ionic/{p-3a7d1e91.entry.js → p-4502a274.entry.js} +1 -1
- package/dist/ionic/p-4621c387.entry.js +4 -0
- package/dist/ionic/p-4ace7762.entry.js +4 -0
- package/dist/ionic/p-4bb3eb60.entry.js +4 -0
- package/dist/ionic/p-4e9ec5c5.entry.js +4 -0
- package/dist/ionic/{p-874b4bd8.entry.js → p-51cd1643.entry.js} +1 -1
- package/dist/ionic/p-5c3ec490.entry.js +4 -0
- package/dist/ionic/p-5d1ac2c7.entry.js +4 -0
- package/dist/ionic/{p-3ae5f277.entry.js → p-627fabd9.entry.js} +1 -1
- package/dist/ionic/{p-e0be05c5.entry.js → p-629e4703.entry.js} +1 -1
- package/dist/ionic/p-700795f6.entry.js +4 -0
- package/dist/ionic/{p-5d1da0a2.entry.js → p-76e92a84.entry.js} +1 -1
- package/dist/ionic/p-79a36078.entry.js +4 -0
- package/dist/ionic/{p-9f1103ce.entry.js → p-7a37b3ce.entry.js} +1 -1
- package/dist/ionic/{p-3353c229.entry.js → p-80b44b3c.entry.js} +1 -1
- package/dist/ionic/p-913b218a.entry.js +4 -0
- package/dist/ionic/{p-390ca786.entry.js → p-9177f4ac.entry.js} +1 -1
- package/dist/ionic/{p-DV3sJJW8.js → p-AlrZKoWR.js} +1 -1
- package/dist/ionic/p-BDtODLZ4.js +4 -0
- package/dist/ionic/p-BSQPZ79H.js +4 -0
- package/dist/ionic/p-BwKpO3Is.js +4 -0
- package/dist/ionic/p-Cg5-OQYy.js +4 -0
- package/dist/ionic/p-DCOvXkOm.js +4 -0
- package/dist/ionic/{p-4858af1f.entry.js → p-a5213260.entry.js} +1 -1
- package/dist/ionic/{p-37e720da.entry.js → p-a7628bc7.entry.js} +1 -1
- package/dist/ionic/p-a9a33367.entry.js +4 -0
- package/dist/ionic/p-ad728198.entry.js +4 -0
- package/dist/ionic/{p-ef4c3bee.entry.js → p-b1599fca.entry.js} +1 -1
- package/dist/ionic/{p-84d5ce05.entry.js → p-b9ac1fe0.entry.js} +1 -1
- package/dist/ionic/p-bfc8c629.entry.js +4 -0
- package/dist/ionic/p-c08e666a.entry.js +4 -0
- package/dist/ionic/{p-34586ead.entry.js → p-c93553d2.entry.js} +1 -1
- package/dist/ionic/p-ce7992c4.entry.js +4 -0
- package/dist/ionic/{p-75dc25ba.entry.js → p-d2c7f046.entry.js} +1 -1
- package/dist/ionic/{p-c4d8641b.entry.js → p-d8387b99.entry.js} +1 -1
- package/dist/ionic/{p-9a65ac7f.entry.js → p-db1b6738.entry.js} +1 -1
- package/dist/ionic/p-ed797c72.entry.js +4 -0
- package/dist/ionic/{p-8eb8ee76.entry.js → p-ef93ca92.entry.js} +1 -1
- package/dist/ionic/p-f09f9642.entry.js +4 -0
- package/dist/ionic/p-f1c06f82.entry.js +4 -0
- package/dist/ionic/p-f718fccb.entry.js +4 -0
- package/dist/ionic/{p-0fa9c382.entry.js → p-fe4aa1db.entry.js} +1 -1
- package/dist/types/components/img/img.d.ts +2 -0
- package/dist/types/components/input/input.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +11 -4
- package/dist/types/components/router-outlet/router-outlet.d.ts +7 -0
- package/dist/types/components/searchbar/searchbar.d.ts +1 -1
- package/dist/types/components/select/select-interface.d.ts +31 -0
- package/dist/types/components/select/select.d.ts +18 -0
- package/dist/types/components/select-option/select-option.d.ts +42 -1
- package/dist/types/components.d.ts +72 -288
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interface.d.ts +0 -1
- package/dist/types/utils/config.d.ts +0 -8
- package/dist/types/utils/overlay-control-label.d.ts +32 -0
- package/dist/types/utils/overlays.d.ts +11 -9
- package/dist/types/utils/sanitization/index.d.ts +58 -2
- package/dist/types/utils/select-option-render.d.ts +53 -0
- package/hydrate/index.js +1408 -1175
- package/hydrate/index.mjs +1408 -1175
- package/package.json +37 -5
- package/components/ion-picker-legacy-column.d.ts +0 -11
- package/components/ion-picker-legacy-column.js +0 -4
- package/components/ion-picker-legacy.d.ts +0 -11
- package/components/ion-picker-legacy.js +0 -4
- package/components/p-3hGiN2uq.js +0 -4
- package/components/p-BIPPbW0M.js +0 -4
- package/components/p-BUYFy35a.js +0 -4
- package/components/p-BWEZufiK.js +0 -4
- package/components/p-BqpciLfi.js +0 -4
- package/components/p-BsQPAqo9.js +0 -4
- package/components/p-CU5rbWAW.js +0 -4
- package/components/p-k_E4tX5Z.js +0 -4
- package/components/p-nyXeHk23.js +0 -4
- package/dist/cjs/config-xninhj0J.js +0 -201
- package/dist/collection/components/picker-legacy/animations/ios.enter.js +0 -27
- package/dist/collection/components/picker-legacy/animations/ios.leave.js +0 -23
- package/dist/collection/components/picker-legacy/picker-interface.js +0 -1
- package/dist/collection/components/picker-legacy/picker.ios.css +0 -300
- package/dist/collection/components/picker-legacy/picker.js +0 -890
- package/dist/collection/components/picker-legacy/picker.md.css +0 -287
- package/dist/collection/components/picker-legacy-column/picker-column.ios.css +0 -231
- package/dist/collection/components/picker-legacy-column/picker-column.js +0 -422
- package/dist/collection/components/picker-legacy-column/picker-column.md.css +0 -222
- package/dist/collection/components/picker-legacy-column/test/test.utils.js +0 -43
- package/dist/esm/config-DQCONYYp.js +0 -195
- package/dist/ionic/p-01f81ea5.entry.js +0 -4
- package/dist/ionic/p-0cc11f99.entry.js +0 -4
- package/dist/ionic/p-0dc33652.entry.js +0 -4
- package/dist/ionic/p-20b1a044.entry.js +0 -4
- package/dist/ionic/p-21eb76d5.entry.js +0 -4
- package/dist/ionic/p-27d30585.entry.js +0 -4
- package/dist/ionic/p-2a05aa64.entry.js +0 -4
- package/dist/ionic/p-2bb2cb18.entry.js +0 -4
- package/dist/ionic/p-485fda23.entry.js +0 -4
- package/dist/ionic/p-4baa5b82.entry.js +0 -4
- package/dist/ionic/p-5018dfc8.entry.js +0 -4
- package/dist/ionic/p-50e1194a.entry.js +0 -4
- package/dist/ionic/p-5eb8e86d.entry.js +0 -4
- package/dist/ionic/p-65ebdf1b.entry.js +0 -4
- package/dist/ionic/p-6ebdbebe.entry.js +0 -4
- package/dist/ionic/p-9f9db3a2.entry.js +0 -4
- package/dist/ionic/p-D-3ycHmd.js +0 -4
- package/dist/ionic/p-DzWaWHGc.js +0 -4
- package/dist/ionic/p-a21add2f.entry.js +0 -4
- package/dist/ionic/p-ca2ab74d.entry.js +0 -4
- package/dist/ionic/p-ec090e0a.entry.js +0 -4
- package/dist/types/components/picker-legacy/animations/ios.enter.d.ts +0 -5
- package/dist/types/components/picker-legacy/animations/ios.leave.d.ts +0 -5
- package/dist/types/components/picker-legacy/picker-interface.d.ts +0 -52
- package/dist/types/components/picker-legacy/picker.d.ts +0 -158
- package/dist/types/components/picker-legacy-column/picker-column.d.ts +0 -46
- package/dist/types/components/picker-legacy-column/test/test.utils.d.ts +0 -9
package/hydrate/index.mjs
CHANGED
|
@@ -8039,7 +8039,7 @@ const focusElementInOverlay = (hostToFocus, overlay) => {
|
|
|
8039
8039
|
* Should NOT include: Toast
|
|
8040
8040
|
*/
|
|
8041
8041
|
const trapKeyboardFocus = (ev, doc) => {
|
|
8042
|
-
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-
|
|
8042
|
+
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover');
|
|
8043
8043
|
const target = ev.target;
|
|
8044
8044
|
/**
|
|
8045
8045
|
* If no active overlay, ignore this event.
|
|
@@ -8273,7 +8273,7 @@ const dismissOverlay = (doc, data, role, overlayTag, id) => {
|
|
|
8273
8273
|
*/
|
|
8274
8274
|
const getOverlays = (doc, selector) => {
|
|
8275
8275
|
if (selector === undefined) {
|
|
8276
|
-
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-
|
|
8276
|
+
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-popover,ion-toast';
|
|
8277
8277
|
}
|
|
8278
8278
|
return Array.from(doc.querySelectorAll(selector)).filter((c) => c.overlayIndex > 0);
|
|
8279
8279
|
};
|
|
@@ -8335,6 +8335,29 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
8335
8335
|
viewContainer.removeAttribute('aria-hidden');
|
|
8336
8336
|
}
|
|
8337
8337
|
};
|
|
8338
|
+
/**
|
|
8339
|
+
* Cleans up root `aria-hidden` and `backdrop-no-scroll` when
|
|
8340
|
+
* an overlay is removed from the DOM without going through
|
|
8341
|
+
* the `dismiss()` flow (e.g., when a framework unmounts the
|
|
8342
|
+
* overlay during a route change).
|
|
8343
|
+
*
|
|
8344
|
+
* Should be called from an overlay's `disconnectedCallback`
|
|
8345
|
+
* when the overlay was still presented at the time of removal.
|
|
8346
|
+
*/
|
|
8347
|
+
const cleanupRootFocusTrapAccessibility = () => {
|
|
8348
|
+
if (typeof document === 'undefined') {
|
|
8349
|
+
return;
|
|
8350
|
+
}
|
|
8351
|
+
const remainingOverlays = getPresentedOverlays(document);
|
|
8352
|
+
const hasRemainingLocking = remainingOverlays.some((o) => {
|
|
8353
|
+
const el = o;
|
|
8354
|
+
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
|
|
8355
|
+
});
|
|
8356
|
+
if (!hasRemainingLocking) {
|
|
8357
|
+
setRootAriaHidden(false);
|
|
8358
|
+
document.body.classList.remove(BACKDROP_NO_SCROLL);
|
|
8359
|
+
}
|
|
8360
|
+
};
|
|
8338
8361
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
8339
8362
|
var _a, _b;
|
|
8340
8363
|
if (overlay.presented) {
|
|
@@ -8400,30 +8423,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
8400
8423
|
* to the overlay container.
|
|
8401
8424
|
*/
|
|
8402
8425
|
if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
|
|
8403
|
-
|
|
8404
|
-
* Some overlays (e.g. modal) put the dialog role and accessible label
|
|
8405
|
-
* on the `.ion-overlay-wrapper` instead of the host. Screen readers
|
|
8406
|
-
* need focus on the element with `role="dialog"` to properly announce
|
|
8407
|
-
* and navigate the dialog.
|
|
8408
|
-
*
|
|
8409
|
-
* We only target wrappers with `tabindex`, since `role="dialog"` alone
|
|
8410
|
-
* does not make an element focusable. If no focusable dialog wrapper
|
|
8411
|
-
* exists (e.g. picker-legacy), we fall back to the host.
|
|
8412
|
-
*/
|
|
8413
|
-
const overlayWrapper = getElementRoot(overlay.el).querySelector('[role="dialog"][tabindex]');
|
|
8414
|
-
const focusTarget = overlayWrapper !== null && overlayWrapper !== void 0 ? overlayWrapper : overlay.el;
|
|
8415
|
-
/**
|
|
8416
|
-
* `preventScroll` keeps this a pure focus move so the viewport does not
|
|
8417
|
-
* jump when the wrapper is partially off-screen (e.g. a sheet modal).
|
|
8418
|
-
* Guard the options call so an older engine that mishandles it can never
|
|
8419
|
-
* reject present(); we fall back to a plain focus() in that case.
|
|
8420
|
-
*/
|
|
8421
|
-
try {
|
|
8422
|
-
focusTarget.focus({ preventScroll: true });
|
|
8423
|
-
}
|
|
8424
|
-
catch (_c) {
|
|
8425
|
-
focusTarget.focus();
|
|
8426
|
-
}
|
|
8426
|
+
overlay.el.focus();
|
|
8427
8427
|
}
|
|
8428
8428
|
/**
|
|
8429
8429
|
* If this overlay was previously dismissed without being
|
|
@@ -8759,6 +8759,539 @@ const createTriggerController = () => {
|
|
|
8759
8759
|
};
|
|
8760
8760
|
const FOCUS_TRAP_DISABLE_CLASS = 'ion-disable-focus-trap';
|
|
8761
8761
|
|
|
8762
|
+
/**
|
|
8763
|
+
* Sanitize an untrusted HTML string.
|
|
8764
|
+
*
|
|
8765
|
+
* Parses the string into a detached DOM, removes blocked tags, strips
|
|
8766
|
+
* attributes outside the narrow `domStringAllowedAttributes` list (refer
|
|
8767
|
+
* `sanitizeElement`), and scrubs script-scheme URLs. Returns the sanitized
|
|
8768
|
+
* HTML string.
|
|
8769
|
+
*
|
|
8770
|
+
* Use this when you have an HTML string from an unknown source and need to
|
|
8771
|
+
* render it via `innerHTML`. Use `sanitizeDOMTree` instead when you already
|
|
8772
|
+
* have a DOM tree and want to sanitize it in place without a string round
|
|
8773
|
+
* trip. The two apply the same dangerous-vector scrubbing but different
|
|
8774
|
+
* attribute allowlists: this path stays narrow so existing consumers
|
|
8775
|
+
* (toast, loading, alert message, etc.) are unaffected, while
|
|
8776
|
+
* `sanitizeDOMTree` uses the wider rich-content allowlist.
|
|
8777
|
+
*
|
|
8778
|
+
* @param untrustedString - The HTML string to sanitize. Pass an
|
|
8779
|
+
* `IonicSafeString` to bypass sanitization, or `undefined` to short-circuit.
|
|
8780
|
+
* @returns The sanitized HTML string, or `undefined` if the input was
|
|
8781
|
+
* `undefined`. Returns `''` if sanitization fails or the input contains
|
|
8782
|
+
* an inline `onload=` handler.
|
|
8783
|
+
*/
|
|
8784
|
+
const sanitizeDOMString = (untrustedString) => {
|
|
8785
|
+
try {
|
|
8786
|
+
if (untrustedString instanceof IonicSafeString) {
|
|
8787
|
+
return untrustedString.value;
|
|
8788
|
+
}
|
|
8789
|
+
if (!isSanitizerEnabled() || typeof untrustedString !== 'string' || untrustedString === '') {
|
|
8790
|
+
return untrustedString;
|
|
8791
|
+
}
|
|
8792
|
+
/**
|
|
8793
|
+
* onload is fired when appending to a document
|
|
8794
|
+
* fragment in Chrome. If a string
|
|
8795
|
+
* contains onload then we should not
|
|
8796
|
+
* attempt to add this to the fragment.
|
|
8797
|
+
*/
|
|
8798
|
+
if (untrustedString.includes('onload=')) {
|
|
8799
|
+
return '';
|
|
8800
|
+
}
|
|
8801
|
+
/**
|
|
8802
|
+
* Create a document fragment
|
|
8803
|
+
* separate from the main DOM,
|
|
8804
|
+
* create a div to do our work in
|
|
8805
|
+
*/
|
|
8806
|
+
const documentFragment = document.createDocumentFragment();
|
|
8807
|
+
const workingDiv = document.createElement('div');
|
|
8808
|
+
documentFragment.appendChild(workingDiv);
|
|
8809
|
+
workingDiv.innerHTML = untrustedString;
|
|
8810
|
+
/**
|
|
8811
|
+
* Remove any elements
|
|
8812
|
+
* that are blocked
|
|
8813
|
+
*/
|
|
8814
|
+
blockedTags.forEach((blockedTag) => {
|
|
8815
|
+
const getElementsToRemove = documentFragment.querySelectorAll(blockedTag);
|
|
8816
|
+
for (let elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
|
|
8817
|
+
const element = getElementsToRemove[elementIndex];
|
|
8818
|
+
if (element.parentNode) {
|
|
8819
|
+
element.parentNode.removeChild(element);
|
|
8820
|
+
}
|
|
8821
|
+
else {
|
|
8822
|
+
documentFragment.removeChild(element);
|
|
8823
|
+
}
|
|
8824
|
+
/**
|
|
8825
|
+
* We still need to sanitize
|
|
8826
|
+
* the children of this element
|
|
8827
|
+
* as they are left behind
|
|
8828
|
+
*/
|
|
8829
|
+
const childElements = getElementChildren(element);
|
|
8830
|
+
/* eslint-disable-next-line */
|
|
8831
|
+
for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
|
|
8832
|
+
sanitizeElement(childElements[childIndex], domStringAllowedAttributes);
|
|
8833
|
+
}
|
|
8834
|
+
}
|
|
8835
|
+
});
|
|
8836
|
+
/**
|
|
8837
|
+
* Go through remaining elements and remove
|
|
8838
|
+
* non-allowed attribs
|
|
8839
|
+
*/
|
|
8840
|
+
// IE does not support .children on document fragments, only .childNodes
|
|
8841
|
+
const dfChildren = getElementChildren(documentFragment);
|
|
8842
|
+
/* eslint-disable-next-line */
|
|
8843
|
+
for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
|
|
8844
|
+
sanitizeElement(dfChildren[childIndex], domStringAllowedAttributes);
|
|
8845
|
+
}
|
|
8846
|
+
// Append document fragment to div
|
|
8847
|
+
const fragmentDiv = document.createElement('div');
|
|
8848
|
+
fragmentDiv.appendChild(documentFragment);
|
|
8849
|
+
// First child is always the div we did our work in
|
|
8850
|
+
const getInnerDiv = fragmentDiv.querySelector('div');
|
|
8851
|
+
return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
|
|
8852
|
+
}
|
|
8853
|
+
catch (err) {
|
|
8854
|
+
printIonError('sanitizeDOMString', err);
|
|
8855
|
+
return '';
|
|
8856
|
+
}
|
|
8857
|
+
};
|
|
8858
|
+
/**
|
|
8859
|
+
* Sanitize an entire trusted DOM tree in place.
|
|
8860
|
+
*
|
|
8861
|
+
* Removes blocked tags (`script`, `iframe`, etc.) from the subtree and
|
|
8862
|
+
* then sanitizes attributes on every remaining element using the wider
|
|
8863
|
+
* `richContentAllowedAttributes` allowlist (refer `sanitizeElement`).
|
|
8864
|
+
* Component presentational attributes (`size`, `color`, `shape`, inline
|
|
8865
|
+
* SVG, `aria-*`, `data-*`) are preserved; `style`, event handlers (`on*`),
|
|
8866
|
+
* form/navigation-hijack attributes, script-scheme URLs, and non-image
|
|
8867
|
+
* `data:` URLs are stripped.
|
|
8868
|
+
*
|
|
8869
|
+
* Use this when you have a DOM tree the developer controls (e.g.
|
|
8870
|
+
* cloned slot content from a component) and you need to render it
|
|
8871
|
+
* elsewhere safely.
|
|
8872
|
+
*
|
|
8873
|
+
* @param root - The root element whose subtree will be sanitized in
|
|
8874
|
+
* place. No-op when the sanitizer is disabled via `Ionic.config`.
|
|
8875
|
+
*/
|
|
8876
|
+
const sanitizeDOMTree = (root) => {
|
|
8877
|
+
if (!isSanitizerEnabled()) {
|
|
8878
|
+
return;
|
|
8879
|
+
}
|
|
8880
|
+
blockedTags.forEach((tag) => {
|
|
8881
|
+
const matches = root.querySelectorAll(tag);
|
|
8882
|
+
for (let i = matches.length - 1; i >= 0; i--) {
|
|
8883
|
+
matches[i].remove();
|
|
8884
|
+
}
|
|
8885
|
+
});
|
|
8886
|
+
sanitizeElement(root, richContentAllowedAttributes, richContentAllowedAttributePrefixes);
|
|
8887
|
+
};
|
|
8888
|
+
/**
|
|
8889
|
+
* Clean up current element based on allowed attributes
|
|
8890
|
+
* and then recursively dig down into any child elements to
|
|
8891
|
+
* clean those up as well
|
|
8892
|
+
*/
|
|
8893
|
+
// TODO(FW-2832): type (using Element triggers other type errors as well)
|
|
8894
|
+
const sanitizeElement = (element, allowedAttributes, allowedAttributePrefixes = []) => {
|
|
8895
|
+
// IE uses childNodes, so ignore nodes that are not elements
|
|
8896
|
+
if (element.nodeType && element.nodeType !== 1) {
|
|
8897
|
+
return;
|
|
8898
|
+
}
|
|
8899
|
+
/**
|
|
8900
|
+
* If attributes is not a NamedNodeMap
|
|
8901
|
+
* then we should remove the element entirely.
|
|
8902
|
+
* This helps avoid DOM Clobbering attacks where
|
|
8903
|
+
* attributes is overridden.
|
|
8904
|
+
*/
|
|
8905
|
+
if (typeof NamedNodeMap !== 'undefined' && !(element.attributes instanceof NamedNodeMap)) {
|
|
8906
|
+
element.remove();
|
|
8907
|
+
return;
|
|
8908
|
+
}
|
|
8909
|
+
/**
|
|
8910
|
+
* Always strip `style` (CSS injection, `background:url()` beaconing, UI
|
|
8911
|
+
* spoofing). It is never on the allowlist, but it is removed explicitly
|
|
8912
|
+
* here because some engines (e.g. jsdom) don't enumerate the CSSOM-backed
|
|
8913
|
+
* `style` attribute in `element.attributes`, which would let the loop
|
|
8914
|
+
* below skip over it.
|
|
8915
|
+
*/
|
|
8916
|
+
element.removeAttribute('style');
|
|
8917
|
+
for (let i = element.attributes.length - 1; i >= 0; i--) {
|
|
8918
|
+
const attribute = element.attributes.item(i);
|
|
8919
|
+
const attributeName = attribute.name;
|
|
8920
|
+
const lowerName = attributeName.toLowerCase();
|
|
8921
|
+
/**
|
|
8922
|
+
* Remove any attribute that is not on the allowlist. This drops event
|
|
8923
|
+
* handlers (`on*`), `style`, the form/navigation-hijack attributes
|
|
8924
|
+
* (`formaction`, `action`, `target`), namespaced attributes like
|
|
8925
|
+
* `xlink:href`, and anything else not explicitly known to be safe.
|
|
8926
|
+
*/
|
|
8927
|
+
if (!isAttributeAllowed(lowerName, allowedAttributes, allowedAttributePrefixes)) {
|
|
8928
|
+
element.removeAttribute(attributeName);
|
|
8929
|
+
continue;
|
|
8930
|
+
}
|
|
8931
|
+
// clean up any allowed attribs
|
|
8932
|
+
// that attempt to do any JS funny-business
|
|
8933
|
+
const attributeValue = attribute.value;
|
|
8934
|
+
if (attributeValue == null) {
|
|
8935
|
+
continue;
|
|
8936
|
+
}
|
|
8937
|
+
/**
|
|
8938
|
+
* Scrub dangerous schemes from the value. The value is normalized first
|
|
8939
|
+
* (whitespace and ASCII control characters removed) so entity-obfuscated
|
|
8940
|
+
* payloads such as `java	script:`, which the parser decodes to
|
|
8941
|
+
* `java\tscript:`, are still caught. Normalizing the value also covers
|
|
8942
|
+
* namespaced attributes, where the previous `element[attributeName]`
|
|
8943
|
+
* property reflection returned `undefined` and let them slip through.
|
|
8944
|
+
*/
|
|
8945
|
+
const normalizedValue = attributeValue.replace(controlCharactersAndWhitespace, '').toLowerCase();
|
|
8946
|
+
// Script schemes are never allowed, on any attribute.
|
|
8947
|
+
if (normalizedValue.includes('javascript:') || normalizedValue.includes('vbscript:')) {
|
|
8948
|
+
element.removeAttribute(attributeName);
|
|
8949
|
+
continue;
|
|
8950
|
+
}
|
|
8951
|
+
/**
|
|
8952
|
+
* For URL-bearing attributes, allow `data:` URIs only for raster
|
|
8953
|
+
* images. Document-bearing types (`text/html`, `image/svg+xml`,
|
|
8954
|
+
* `application/*`, etc.) can carry markup or script when navigated to
|
|
8955
|
+
* or rendered, so they are stripped, while safe image types are kept so
|
|
8956
|
+
* inline images keep working.
|
|
8957
|
+
*/
|
|
8958
|
+
if (urlAttributes.includes(lowerName) &&
|
|
8959
|
+
normalizedValue.startsWith('data:') &&
|
|
8960
|
+
!safeDataImageUri.test(normalizedValue)) {
|
|
8961
|
+
element.removeAttribute(attributeName);
|
|
8962
|
+
}
|
|
8963
|
+
}
|
|
8964
|
+
/**
|
|
8965
|
+
* Sanitize any nested children
|
|
8966
|
+
*/
|
|
8967
|
+
const childElements = getElementChildren(element);
|
|
8968
|
+
/* eslint-disable-next-line */
|
|
8969
|
+
for (let i = 0; i < childElements.length; i++) {
|
|
8970
|
+
sanitizeElement(childElements[i], allowedAttributes, allowedAttributePrefixes);
|
|
8971
|
+
}
|
|
8972
|
+
};
|
|
8973
|
+
/**
|
|
8974
|
+
* IE doesn't always support .children
|
|
8975
|
+
* so we revert to .childNodes instead
|
|
8976
|
+
*/
|
|
8977
|
+
// TODO(FW-2832): type
|
|
8978
|
+
const getElementChildren = (el) => {
|
|
8979
|
+
return el.children != null ? el.children : el.childNodes;
|
|
8980
|
+
};
|
|
8981
|
+
const isSanitizerEnabled = () => {
|
|
8982
|
+
var _a;
|
|
8983
|
+
const win = window;
|
|
8984
|
+
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
|
|
8985
|
+
if (config) {
|
|
8986
|
+
if (config.get) {
|
|
8987
|
+
return config.get('sanitizerEnabled', true);
|
|
8988
|
+
}
|
|
8989
|
+
else {
|
|
8990
|
+
return config.sanitizerEnabled === true || config.sanitizerEnabled === undefined;
|
|
8991
|
+
}
|
|
8992
|
+
}
|
|
8993
|
+
return true;
|
|
8994
|
+
};
|
|
8995
|
+
/**
|
|
8996
|
+
* Mirror known custom-element DOM properties onto attributes so they
|
|
8997
|
+
* survive `cloneNode`. Call this on a DOM subtree before cloning it for
|
|
8998
|
+
* rendering elsewhere (e.g. cloning slotted option content into an
|
|
8999
|
+
* overlay).
|
|
9000
|
+
*
|
|
9001
|
+
* Only sets the attribute when the property holds a non-empty string
|
|
9002
|
+
* and the attribute isn't already present, so existing attributes
|
|
9003
|
+
* take precedence.
|
|
9004
|
+
*
|
|
9005
|
+
* @param root - The root element whose subtree (and itself) will be
|
|
9006
|
+
* inspected.
|
|
9007
|
+
*/
|
|
9008
|
+
const reflectPropertiesToAttributes = (root) => {
|
|
9009
|
+
const candidates = [];
|
|
9010
|
+
if (root.tagName in elementPropsToReflect) {
|
|
9011
|
+
candidates.push(root);
|
|
9012
|
+
}
|
|
9013
|
+
for (const tagName of Object.keys(elementPropsToReflect)) {
|
|
9014
|
+
candidates.push(...Array.from(root.querySelectorAll(tagName.toLowerCase())));
|
|
9015
|
+
}
|
|
9016
|
+
for (const el of candidates) {
|
|
9017
|
+
if (!(el.tagName in elementPropsToReflect)) {
|
|
9018
|
+
continue;
|
|
9019
|
+
}
|
|
9020
|
+
const props = elementPropsToReflect[el.tagName];
|
|
9021
|
+
for (const prop of props) {
|
|
9022
|
+
const value = el[prop];
|
|
9023
|
+
if (typeof value === 'string' && value.length > 0 && !el.hasAttribute(prop)) {
|
|
9024
|
+
el.setAttribute(prop, value);
|
|
9025
|
+
}
|
|
9026
|
+
}
|
|
9027
|
+
}
|
|
9028
|
+
};
|
|
9029
|
+
/**
|
|
9030
|
+
* Attribute allowlist for `sanitizeDOMString`. Intentionally narrow: this
|
|
9031
|
+
* path sanitizes developer HTML strings rendered via `innerHTML` by
|
|
9032
|
+
* `ion-toast`, `ion-loading`, the `ion-alert` message,
|
|
9033
|
+
* `ion-refresher-content`, and `ion-infinite-scroll-content`, so the list
|
|
9034
|
+
* is kept to the minimum those have always needed. Broadening it here would
|
|
9035
|
+
* change sanitization output for all of those consumers, so the wider
|
|
9036
|
+
* rich-content allowlist below is deliberately scoped to `sanitizeDOMTree`
|
|
9037
|
+
* instead.
|
|
9038
|
+
*/
|
|
9039
|
+
const domStringAllowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
|
|
9040
|
+
/**
|
|
9041
|
+
* Attribute allowlist for `sanitizeDOMTree` (the select rich-content path).
|
|
9042
|
+
* Covers global HTML attributes, the Ionic component presentational props
|
|
9043
|
+
* that cloned rich content (e.g. `ion-select-option` markup) relies on, and
|
|
9044
|
+
* the inert SVG presentation attributes used by inline icons.
|
|
9045
|
+
*
|
|
9046
|
+
* `aria-*` and `data-*` are allowed separately by prefix (refer
|
|
9047
|
+
* `richContentAllowedAttributePrefixes`) since they are inert and not worth
|
|
9048
|
+
* enumerating. URL-bearing names (`href`, `src`) are allowed here, but
|
|
9049
|
+
* their values are still scrubbed for script schemes in `sanitizeElement`.
|
|
9050
|
+
*
|
|
9051
|
+
* Notably absent: `style`, event handlers (`on*`), and the
|
|
9052
|
+
* form/navigation-hijack attributes (`formaction`, `action`, `target`),
|
|
9053
|
+
* which are therefore stripped.
|
|
9054
|
+
*/
|
|
9055
|
+
const richContentAllowedAttributes = [
|
|
9056
|
+
// Global / structural
|
|
9057
|
+
'class',
|
|
9058
|
+
'id',
|
|
9059
|
+
'slot',
|
|
9060
|
+
'name',
|
|
9061
|
+
'title',
|
|
9062
|
+
'alt',
|
|
9063
|
+
'lang',
|
|
9064
|
+
'dir',
|
|
9065
|
+
'role',
|
|
9066
|
+
'type',
|
|
9067
|
+
'value',
|
|
9068
|
+
'disabled',
|
|
9069
|
+
'width',
|
|
9070
|
+
'height',
|
|
9071
|
+
'href',
|
|
9072
|
+
'src',
|
|
9073
|
+
// Ionic component presentational props
|
|
9074
|
+
'color',
|
|
9075
|
+
'size',
|
|
9076
|
+
'shape',
|
|
9077
|
+
'fill',
|
|
9078
|
+
'expand',
|
|
9079
|
+
'mode',
|
|
9080
|
+
'theme',
|
|
9081
|
+
'icon',
|
|
9082
|
+
'label',
|
|
9083
|
+
'label-placement',
|
|
9084
|
+
'justify',
|
|
9085
|
+
'inset',
|
|
9086
|
+
'lines',
|
|
9087
|
+
'ios',
|
|
9088
|
+
'md',
|
|
9089
|
+
// SVG presentation attributes (compared lowercased, e.g. `viewBox`)
|
|
9090
|
+
'xmlns',
|
|
9091
|
+
'viewbox',
|
|
9092
|
+
'preserveaspectratio',
|
|
9093
|
+
'stroke',
|
|
9094
|
+
'stroke-width',
|
|
9095
|
+
'stroke-linecap',
|
|
9096
|
+
'stroke-linejoin',
|
|
9097
|
+
'stroke-opacity',
|
|
9098
|
+
'stroke-dasharray',
|
|
9099
|
+
'fill-rule',
|
|
9100
|
+
'fill-opacity',
|
|
9101
|
+
'clip-rule',
|
|
9102
|
+
'd',
|
|
9103
|
+
'points',
|
|
9104
|
+
'cx',
|
|
9105
|
+
'cy',
|
|
9106
|
+
'r',
|
|
9107
|
+
'rx',
|
|
9108
|
+
'ry',
|
|
9109
|
+
'x',
|
|
9110
|
+
'y',
|
|
9111
|
+
'x1',
|
|
9112
|
+
'y1',
|
|
9113
|
+
'x2',
|
|
9114
|
+
'y2',
|
|
9115
|
+
'transform',
|
|
9116
|
+
'opacity',
|
|
9117
|
+
];
|
|
9118
|
+
/**
|
|
9119
|
+
* Attribute-name prefixes that are always safe to keep in the rich-content
|
|
9120
|
+
* path. `aria-*` and `data-*` attributes cannot execute script or load
|
|
9121
|
+
* resources, so they are allowed wholesale rather than enumerated by name.
|
|
9122
|
+
*/
|
|
9123
|
+
const richContentAllowedAttributePrefixes = ['aria-', 'data-'];
|
|
9124
|
+
/**
|
|
9125
|
+
* Whether an attribute name (already lowercased) is safe to keep, by exact
|
|
9126
|
+
* match or by an allowed prefix.
|
|
9127
|
+
*/
|
|
9128
|
+
const isAttributeAllowed = (lowerName, allowedAttributes, allowedAttributePrefixes) => {
|
|
9129
|
+
if (allowedAttributes.includes(lowerName)) {
|
|
9130
|
+
return true;
|
|
9131
|
+
}
|
|
9132
|
+
return allowedAttributePrefixes.some((prefix) => lowerName.startsWith(prefix));
|
|
9133
|
+
};
|
|
9134
|
+
/**
|
|
9135
|
+
* Matches ASCII control characters and whitespace (including the
|
|
9136
|
+
* non-breaking space). Used to normalize attribute values before matching
|
|
9137
|
+
* a URL scheme so entity-obfuscated payloads such as `java	script:`
|
|
9138
|
+
* (decoded by the parser to `java\tscript:`) can't smuggle a scheme past
|
|
9139
|
+
* the check.
|
|
9140
|
+
*/
|
|
9141
|
+
// eslint-disable-next-line no-control-regex -- matching control characters is the point
|
|
9142
|
+
const controlCharactersAndWhitespace = /[\u0000-\u0020\u007f-\u00a0]/g;
|
|
9143
|
+
/**
|
|
9144
|
+
* Attributes whose values are URLs. Their values are scheme-checked in
|
|
9145
|
+
* `sanitizeElement` (e.g. `data:` filtering) beyond the script-scheme scrub
|
|
9146
|
+
* applied to every attribute.
|
|
9147
|
+
*/
|
|
9148
|
+
const urlAttributes = ['href', 'src'];
|
|
9149
|
+
/**
|
|
9150
|
+
* Matches a `data:` URI for a raster image type that cannot carry script.
|
|
9151
|
+
* `image/svg+xml` is deliberately excluded (SVG can execute script), as are
|
|
9152
|
+
* document types like `text/html` and `application/*`. The value is already
|
|
9153
|
+
* lowercased and whitespace-stripped before this is tested.
|
|
9154
|
+
*/
|
|
9155
|
+
const safeDataImageUri = /^data:image\/(?:png|jpe?g|gif|webp|bmp|avif|x-icon|vnd\.microsoft\.icon)[;,]/;
|
|
9156
|
+
/**
|
|
9157
|
+
* Tags removed entirely (with their subtree) before attribute sanitization.
|
|
9158
|
+
* Exported so tests can assert the set without hardcoding it.
|
|
9159
|
+
*/
|
|
9160
|
+
const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed', 'base'];
|
|
9161
|
+
/**
|
|
9162
|
+
* Properties on custom elements that frameworks (Vue, Angular) often
|
|
9163
|
+
* set as DOM properties rather than attributes. `cloneNode` only copies
|
|
9164
|
+
* attributes, so these values are lost when slotted content is cloned
|
|
9165
|
+
* into an overlay. For each known custom element, we mirror the listed
|
|
9166
|
+
* properties onto attributes so the cloned copy still has the data it
|
|
9167
|
+
* needs to render.
|
|
9168
|
+
*
|
|
9169
|
+
* Keyed by uppercased tagName so the lookup matches `Element.tagName`.
|
|
9170
|
+
*/
|
|
9171
|
+
const elementPropsToReflect = {
|
|
9172
|
+
'ION-ICON': ['icon', 'name', 'src', 'ios', 'md'],
|
|
9173
|
+
};
|
|
9174
|
+
class IonicSafeString {
|
|
9175
|
+
constructor(value) {
|
|
9176
|
+
this.value = value;
|
|
9177
|
+
}
|
|
9178
|
+
}
|
|
9179
|
+
|
|
9180
|
+
/**
|
|
9181
|
+
* Converts a DOM node into a Stencil VNode (or text string) so the
|
|
9182
|
+
* resulting tree is rendered through the component's normal render
|
|
9183
|
+
* path. Rendering through Stencil ensures that scoped CSS classes
|
|
9184
|
+
* (e.g. `sc-ion-action-sheet-ionic`) are applied to every element.
|
|
9185
|
+
*
|
|
9186
|
+
* Highly recommended to pre-sanitize the source DOM (see
|
|
9187
|
+
* `getOptionContent` in select.tsx). This function performs pure
|
|
9188
|
+
* structural conversion — no security filtering.
|
|
9189
|
+
*
|
|
9190
|
+
* Preserves attributes only — properties set imperatively on the source
|
|
9191
|
+
* element (e.g. `input.value` after a user types) won't carry through.
|
|
9192
|
+
* In practice this isn't a concern: interactive controls shouldn't
|
|
9193
|
+
* appear in select-option rich content since they'd nest inside the
|
|
9194
|
+
* overlay's button/radio/checkbox wrapper, which is invalid HTML and
|
|
9195
|
+
* an accessibility issue.
|
|
9196
|
+
*
|
|
9197
|
+
* @param node - The DOM node to convert. Text nodes become strings,
|
|
9198
|
+
* element nodes become VNodes, and any other node types are skipped.
|
|
9199
|
+
* @param keyPrefix - String prefix used to build a stable VNode key,
|
|
9200
|
+
* so Stencil's diff can preserve elements across re-renders.
|
|
9201
|
+
* @param index - Position of this node among its siblings. Combined
|
|
9202
|
+
* with `keyPrefix` to form the final unique key.
|
|
9203
|
+
* @returns The converted VNode, a text string, or `null` if the node
|
|
9204
|
+
* type isn't supported.
|
|
9205
|
+
*
|
|
9206
|
+
* @internal Exported only so it can be unit tested; not part of the
|
|
9207
|
+
* public API.
|
|
9208
|
+
*/
|
|
9209
|
+
const cloneToVNode = (node, keyPrefix, index) => {
|
|
9210
|
+
var _a;
|
|
9211
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
9212
|
+
return (_a = node.textContent) !== null && _a !== void 0 ? _a : '';
|
|
9213
|
+
}
|
|
9214
|
+
if (node.nodeType !== Node.ELEMENT_NODE) {
|
|
9215
|
+
return null;
|
|
9216
|
+
}
|
|
9217
|
+
const el = node;
|
|
9218
|
+
const tag = el.tagName.toLowerCase();
|
|
9219
|
+
const key = `${keyPrefix}-${index}`;
|
|
9220
|
+
const attrs = { key };
|
|
9221
|
+
for (let i = 0; i < el.attributes.length; i++) {
|
|
9222
|
+
const attr = el.attributes.item(i);
|
|
9223
|
+
attrs[attr.name] = attr.value;
|
|
9224
|
+
}
|
|
9225
|
+
const children = Array.from(el.childNodes)
|
|
9226
|
+
.map((child, i) => cloneToVNode(child, key, i))
|
|
9227
|
+
.filter((c) => c !== null);
|
|
9228
|
+
return hAsync(tag, attrs, children);
|
|
9229
|
+
};
|
|
9230
|
+
/**
|
|
9231
|
+
* Renders cloned DOM content as Stencil JSX. Walking the source DOM
|
|
9232
|
+
* into VNodes (rather than injecting it via innerHTML) keeps the
|
|
9233
|
+
* content inside Stencil's render path, so scoped CSS classes are
|
|
9234
|
+
* applied automatically and component attributes like `size` or
|
|
9235
|
+
* `color` survive intact.
|
|
9236
|
+
*
|
|
9237
|
+
* Span elements should be used when this content renders within buttons,
|
|
9238
|
+
* depending on the select interface. Buttons can only have phrasing
|
|
9239
|
+
* content to prevent accessibility issues.
|
|
9240
|
+
*
|
|
9241
|
+
* @param id - Unique identifier for generating stable virtual DOM keys.
|
|
9242
|
+
* @param content - The HTMLElement container whose child nodes will be cloned.
|
|
9243
|
+
* @param className - CSS class applied to the wrapper element.
|
|
9244
|
+
* @param useSpan - Whether to use a span element instead of a div for the wrapper.
|
|
9245
|
+
*/
|
|
9246
|
+
const renderClonedContent = (id, content, className, useSpan = false) => {
|
|
9247
|
+
const Tag = useSpan ? 'span' : 'div';
|
|
9248
|
+
const keyPrefix = `${className}-${id}`;
|
|
9249
|
+
/**
|
|
9250
|
+
* Do not remove. This is the only sanitization pass for callers that pass
|
|
9251
|
+
* an `HTMLElement` straight to `renderOptionLabel` (e.g. vanilla JS)
|
|
9252
|
+
* without going through `getOptionContent`, which sanitizes upstream.
|
|
9253
|
+
* `cloneToVNode` does pure structural conversion and no security
|
|
9254
|
+
* filtering, so dropping this call would reopen an XSS hole on the
|
|
9255
|
+
* direct `HTMLElement` path.
|
|
9256
|
+
*/
|
|
9257
|
+
sanitizeDOMTree(content);
|
|
9258
|
+
return (hAsync(Tag, { class: className, key: keyPrefix }, Array.from(content.childNodes).map((child, i) => cloneToVNode(child, keyPrefix, i))));
|
|
9259
|
+
};
|
|
9260
|
+
/**
|
|
9261
|
+
* Renders the label content for a select option within an overlay
|
|
9262
|
+
* interface based on the presence of rich content.
|
|
9263
|
+
*
|
|
9264
|
+
* Span elements should be used when this content renders within buttons,
|
|
9265
|
+
* depending on the select interface. Buttons can only have phrasing
|
|
9266
|
+
* content to prevent accessibility issues.
|
|
9267
|
+
*
|
|
9268
|
+
* @param option - The content option data containing label, slots,
|
|
9269
|
+
* and description.
|
|
9270
|
+
* @param className - The base CSS class for the label element.
|
|
9271
|
+
* @param useSpan - Whether to use a span element instead of a div for the label.
|
|
9272
|
+
*/
|
|
9273
|
+
const renderOptionLabel = (option, className, useSpan = false) => {
|
|
9274
|
+
const { id, label, startContent, endContent, description } = option;
|
|
9275
|
+
const hasRichContent = !!startContent || !!endContent || !!description;
|
|
9276
|
+
const Tag = useSpan ? 'span' : 'div';
|
|
9277
|
+
// Render simple string label if there is no rich content to display
|
|
9278
|
+
if (!hasRichContent && (typeof label === 'string' || !label)) {
|
|
9279
|
+
return (hAsync(Tag, { class: className, key: `${className}-${id}` }, label));
|
|
9280
|
+
}
|
|
9281
|
+
// Render the main label
|
|
9282
|
+
const labelEl = typeof label === 'string' || !label ? (
|
|
9283
|
+
// Label is a simple string or undefined
|
|
9284
|
+
hAsync(Tag, { key: `${className}-label-${id}` }, label)) : (
|
|
9285
|
+
// Label is an HTMLElement with potential rich content
|
|
9286
|
+
renderClonedContent(id, label, `${className}-text`, useSpan));
|
|
9287
|
+
// No rich content, render just the label
|
|
9288
|
+
if (!hasRichContent) {
|
|
9289
|
+
return (hAsync(Tag, { class: className, key: `${className}-${id}` }, labelEl));
|
|
9290
|
+
}
|
|
9291
|
+
// Render label with rich content (start, end, description)
|
|
9292
|
+
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)));
|
|
9293
|
+
};
|
|
9294
|
+
|
|
8762
9295
|
const hostContext = (selector, el) => {
|
|
8763
9296
|
return el.closest(selector) !== null;
|
|
8764
9297
|
};
|
|
@@ -9614,7 +10147,7 @@ const createAnimation = (animationId) => {
|
|
|
9614
10147
|
/**
|
|
9615
10148
|
* iOS Action Sheet Enter Animation
|
|
9616
10149
|
*/
|
|
9617
|
-
const iosEnterAnimation$
|
|
10150
|
+
const iosEnterAnimation$5 = (baseEl) => {
|
|
9618
10151
|
const baseAnimation = createAnimation();
|
|
9619
10152
|
const backdropAnimation = createAnimation();
|
|
9620
10153
|
const wrapperAnimation = createAnimation();
|
|
@@ -9638,7 +10171,7 @@ const iosEnterAnimation$6 = (baseEl) => {
|
|
|
9638
10171
|
/**
|
|
9639
10172
|
* iOS Action Sheet Leave Animation
|
|
9640
10173
|
*/
|
|
9641
|
-
const iosLeaveAnimation$
|
|
10174
|
+
const iosLeaveAnimation$5 = (baseEl) => {
|
|
9642
10175
|
const baseAnimation = createAnimation();
|
|
9643
10176
|
const backdropAnimation = createAnimation();
|
|
9644
10177
|
const wrapperAnimation = createAnimation();
|
|
@@ -9695,9 +10228,9 @@ const mdLeaveAnimation$5 = (baseEl) => {
|
|
|
9695
10228
|
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
9696
10229
|
};
|
|
9697
10230
|
|
|
9698
|
-
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)}}`;
|
|
10231
|
+
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)}}`;
|
|
9699
10232
|
|
|
9700
|
-
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}`;
|
|
10233
|
+
const actionSheetMdCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-action-sheet-md,.alert-radio-label-has-rich-content.sc-ion-action-sheet-md,.alert-checkbox-label-has-rich-content.sc-ion-action-sheet-md,.select-option-label-has-rich-content.sc-ion-action-sheet-md{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-md,.alert-radio-label-has-rich-content.sc-ion-action-sheet-md,.alert-checkbox-label-has-rich-content.sc-ion-action-sheet-md,.select-option-content.sc-ion-action-sheet-md{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-action-sheet-md,.alert-checkbox-label-text.sc-ion-action-sheet-md,.alert-radio-label-text.sc-ion-action-sheet-md,.select-option-label-text.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-action-sheet-md,.select-option-end.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-action-sheet-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-action-sheet-md: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-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-action-sheet-md::part(label),ion-radio.select-option-has-rich-content.sc-ion-action-sheet-md [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-action-sheet-md::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-action-sheet-md [part~="label"],.select-option-content.sc-ion-action-sheet-md{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-action-sheet-md>ion-avatar.sc-ion-action-sheet-md,.select-option-end.sc-ion-action-sheet-md>ion-avatar.sc-ion-action-sheet-md{width:40px;height:40px}.select-option-start.sc-ion-action-sheet-md>ion-icon.sc-ion-action-sheet-md,.select-option-end.sc-ion-action-sheet-md>ion-icon.sc-ion-action-sheet-md{width:24px;height:24px}.select-option-start.sc-ion-action-sheet-md>ion-img.sc-ion-action-sheet-md,.select-option-start.sc-ion-action-sheet-md>img.sc-ion-action-sheet-md,.select-option-start.sc-ion-action-sheet-md>svg.sc-ion-action-sheet-md,.select-option-start.sc-ion-action-sheet-md>ion-thumbnail.sc-ion-action-sheet-md,.select-option-end.sc-ion-action-sheet-md>ion-img.sc-ion-action-sheet-md,.select-option-end.sc-ion-action-sheet-md>img.sc-ion-action-sheet-md,.select-option-end.sc-ion-action-sheet-md>svg.sc-ion-action-sheet-md,.select-option-end.sc-ion-action-sheet-md>ion-thumbnail.sc-ion-action-sheet-md{width:56px;height:56px}.select-option-start.sc-ion-action-sheet-md>video.sc-ion-action-sheet-md,.select-option-end.sc-ion-action-sheet-md>video.sc-ion-action-sheet-md{width:114px;height:56px}.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.sc-ion-action-sheet-md:disabled ion-icon.sc-ion-action-sheet-md{color:currentColor}.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:not(.ion-activated){color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md:not(.ion-activated)::after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-md: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-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}`;
|
|
9701
10234
|
|
|
9702
10235
|
/**
|
|
9703
10236
|
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
@@ -9794,7 +10327,7 @@ class ActionSheet {
|
|
|
9794
10327
|
async present() {
|
|
9795
10328
|
const unlock = await this.lockController.lock();
|
|
9796
10329
|
await this.delegateController.attachViewToDom();
|
|
9797
|
-
await present(this, 'actionSheetEnter', iosEnterAnimation$
|
|
10330
|
+
await present(this, 'actionSheetEnter', iosEnterAnimation$5, mdEnterAnimation$5);
|
|
9798
10331
|
unlock();
|
|
9799
10332
|
}
|
|
9800
10333
|
/**
|
|
@@ -9811,7 +10344,7 @@ class ActionSheet {
|
|
|
9811
10344
|
*/
|
|
9812
10345
|
async dismiss(data, role) {
|
|
9813
10346
|
const unlock = await this.lockController.lock();
|
|
9814
|
-
const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$
|
|
10347
|
+
const dismissed = await dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation$5, mdLeaveAnimation$5);
|
|
9815
10348
|
if (dismissed) {
|
|
9816
10349
|
this.delegateController.removeViewFromDom();
|
|
9817
10350
|
}
|
|
@@ -9980,6 +10513,10 @@ class ActionSheet {
|
|
|
9980
10513
|
this.gesture = undefined;
|
|
9981
10514
|
}
|
|
9982
10515
|
this.triggerController.removeClickListener();
|
|
10516
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
10517
|
+
if (this.presented) {
|
|
10518
|
+
cleanupRootFocusTrapAccessibility();
|
|
10519
|
+
}
|
|
9983
10520
|
}
|
|
9984
10521
|
componentWillLoad() {
|
|
9985
10522
|
var _a;
|
|
@@ -10068,12 +10605,26 @@ class ActionSheet {
|
|
|
10068
10605
|
if (isRadio) {
|
|
10069
10606
|
htmlAttrs['aria-checked'] = isActiveRadio ? 'true' : 'false';
|
|
10070
10607
|
}
|
|
10071
|
-
|
|
10608
|
+
/**
|
|
10609
|
+
* Cast to `SelectActionSheetButton` to access rich content
|
|
10610
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
10611
|
+
* that are passed through from `ion-select` but not
|
|
10612
|
+
* part of the public `ActionSheetButton` interface.
|
|
10613
|
+
*/
|
|
10614
|
+
const richButton = b;
|
|
10615
|
+
const optionLabelOptions = {
|
|
10616
|
+
id: buttonId,
|
|
10617
|
+
label: richButton.text,
|
|
10618
|
+
startContent: richButton.startContent,
|
|
10619
|
+
endContent: richButton.endContent,
|
|
10620
|
+
description: richButton.description,
|
|
10621
|
+
};
|
|
10622
|
+
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: () => {
|
|
10072
10623
|
if (isRadio) {
|
|
10073
10624
|
this.selectRadioButton(b);
|
|
10074
10625
|
}
|
|
10075
10626
|
this.buttonClick(b);
|
|
10076
|
-
}, 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" }),
|
|
10627
|
+
}, 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" }), renderOptionLabel(optionLabelOptions, 'action-sheet-button-label', true)), mode === 'md' && hAsync("ion-ripple-effect", null)));
|
|
10077
10628
|
});
|
|
10078
10629
|
}
|
|
10079
10630
|
render() {
|
|
@@ -10083,12 +10634,12 @@ class ActionSheet {
|
|
|
10083
10634
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
10084
10635
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
10085
10636
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
10086
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
10637
|
+
return (hAsync(Host, Object.assign({ key: '7685831da9a78b73473246a2cea95cefa79a53c3', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
10087
10638
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
10088
|
-
}, 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: '
|
|
10639
|
+
}, 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: 'c70f00e401cac99b89412d1adb867f35bc855d57', tappable: this.backdropDismiss }), hAsync("div", { key: '3332893ce3098f1435875480b1269b2821d41660', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'eb406b0a9e303d6f94c5c7aa99c6f4c089bfbd41', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: '92ec855379f10e1e0bfce6ff68b45d3cda0c137c', class: "action-sheet-container" }, hAsync("div", { key: 'bc88a396d75396f574961471bf7e6c4edb513353', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (hAsync("div", { key: '33329e0193818888bdcaa443ff5ea301802e0787', id: headerID, class: {
|
|
10089
10640
|
'action-sheet-title': true,
|
|
10090
10641
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
10091
|
-
} }, header, this.subHeader && hAsync("div", { key: '
|
|
10642
|
+
} }, header, this.subHeader && hAsync("div", { key: '92ac5a9217a12b7417f7aca9c4fdb7bf6b051364', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (hAsync("div", { key: '020463b830fa48fc3ae647ea64f2aaa4d0969305', class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({ key: 'cefa9c70a2233f6652a81b1a2eae6e717712144d' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass$2(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { key: '56d7e2f8bfb3644e4476895164d334445fda9b2f', class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { key: '6a4a49254ec5cd96f4e0dce9447f90d8cac81913', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", { key: '7d3c6e8d70b0922ea0f75520856285ce1005c891' })))))), hAsync("div", { key: '958fc43e603c6a7f5d1e649d3326fce0f163b5d0', tabindex: "0", "aria-hidden": "true" })));
|
|
10092
10643
|
}
|
|
10093
10644
|
get el() { return getElement(this); }
|
|
10094
10645
|
static get watchers() { return {
|
|
@@ -10137,178 +10688,59 @@ class ActionSheet {
|
|
|
10137
10688
|
"$attrsToReflect$": []
|
|
10138
10689
|
}; }
|
|
10139
10690
|
}
|
|
10140
|
-
const buttonClass$
|
|
10691
|
+
const buttonClass$2 = (button) => {
|
|
10141
10692
|
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));
|
|
10142
10693
|
};
|
|
10143
10694
|
|
|
10144
10695
|
const ENABLE_HTML_CONTENT_DEFAULT = false;
|
|
10145
10696
|
|
|
10697
|
+
// 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.
|
|
10146
10698
|
/**
|
|
10147
|
-
*
|
|
10148
|
-
*
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
* fragment in Chrome. If a string
|
|
10161
|
-
* contains onload then we should not
|
|
10162
|
-
* attempt to add this to the fragment.
|
|
10163
|
-
*/
|
|
10164
|
-
if (untrustedString.includes('onload=')) {
|
|
10165
|
-
return '';
|
|
10166
|
-
}
|
|
10167
|
-
/**
|
|
10168
|
-
* Create a document fragment
|
|
10169
|
-
* separate from the main DOM,
|
|
10170
|
-
* create a div to do our work in
|
|
10171
|
-
*/
|
|
10172
|
-
const documentFragment = document.createDocumentFragment();
|
|
10173
|
-
const workingDiv = document.createElement('div');
|
|
10174
|
-
documentFragment.appendChild(workingDiv);
|
|
10175
|
-
workingDiv.innerHTML = untrustedString;
|
|
10176
|
-
/**
|
|
10177
|
-
* Remove any elements
|
|
10178
|
-
* that are blocked
|
|
10179
|
-
*/
|
|
10180
|
-
blockedTags.forEach((blockedTag) => {
|
|
10181
|
-
const getElementsToRemove = documentFragment.querySelectorAll(blockedTag);
|
|
10182
|
-
for (let elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
|
|
10183
|
-
const element = getElementsToRemove[elementIndex];
|
|
10184
|
-
if (element.parentNode) {
|
|
10185
|
-
element.parentNode.removeChild(element);
|
|
10186
|
-
}
|
|
10187
|
-
else {
|
|
10188
|
-
documentFragment.removeChild(element);
|
|
10189
|
-
}
|
|
10190
|
-
/**
|
|
10191
|
-
* We still need to sanitize
|
|
10192
|
-
* the children of this element
|
|
10193
|
-
* as they are left behind
|
|
10194
|
-
*/
|
|
10195
|
-
const childElements = getElementChildren(element);
|
|
10196
|
-
/* eslint-disable-next-line */
|
|
10197
|
-
for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
|
|
10198
|
-
sanitizeElement(childElements[childIndex]);
|
|
10199
|
-
}
|
|
10200
|
-
}
|
|
10201
|
-
});
|
|
10202
|
-
/**
|
|
10203
|
-
* Go through remaining elements and remove
|
|
10204
|
-
* non-allowed attribs
|
|
10205
|
-
*/
|
|
10206
|
-
// IE does not support .children on document fragments, only .childNodes
|
|
10207
|
-
const dfChildren = getElementChildren(documentFragment);
|
|
10208
|
-
/* eslint-disable-next-line */
|
|
10209
|
-
for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
|
|
10210
|
-
sanitizeElement(dfChildren[childIndex]);
|
|
10211
|
-
}
|
|
10212
|
-
// Append document fragment to div
|
|
10213
|
-
const fragmentDiv = document.createElement('div');
|
|
10214
|
-
fragmentDiv.appendChild(documentFragment);
|
|
10215
|
-
// First child is always the div we did our work in
|
|
10216
|
-
const getInnerDiv = fragmentDiv.querySelector('div');
|
|
10217
|
-
return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
|
|
10218
|
-
}
|
|
10219
|
-
catch (err) {
|
|
10220
|
-
printIonError('sanitizeDOMString', err);
|
|
10221
|
-
return '';
|
|
10222
|
-
}
|
|
10223
|
-
};
|
|
10224
|
-
/**
|
|
10225
|
-
* Clean up current element based on allowed attributes
|
|
10226
|
-
* and then recursively dig down into any child elements to
|
|
10227
|
-
* clean those up as well
|
|
10699
|
+
* Returns the default `labelPlacement` for a radio or checkbox option
|
|
10700
|
+
* rendered inside an overlay. Defaults follow each mode's established
|
|
10701
|
+
* option-row layout:
|
|
10702
|
+
* - `ios`: `"start"` for radio in `alert` and `popover`. The `modal`
|
|
10703
|
+
* interface flips iOS radio back to `"end"`. Checkbox is always
|
|
10704
|
+
* `"end"` on iOS.
|
|
10705
|
+
* - everything else (e.g. `md`): `"end"`.
|
|
10706
|
+
*
|
|
10707
|
+
* `interfaceType` is optional; only `"modal"` changes the result, so
|
|
10708
|
+
* callers that aren't a modal can omit it.
|
|
10709
|
+
*
|
|
10710
|
+
* Used by `select-popover` and `select-modal` as the fallback when an
|
|
10711
|
+
* option doesn't explicitly set `labelPlacement`.
|
|
10228
10712
|
*/
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
if (element.nodeType && element.nodeType !== 1) {
|
|
10233
|
-
return;
|
|
10234
|
-
}
|
|
10235
|
-
/**
|
|
10236
|
-
* If attributes is not a NamedNodeMap
|
|
10237
|
-
* then we should remove the element entirely.
|
|
10238
|
-
* This helps avoid DOM Clobbering attacks where
|
|
10239
|
-
* attributes is overridden.
|
|
10240
|
-
*/
|
|
10241
|
-
if (typeof NamedNodeMap !== 'undefined' && !(element.attributes instanceof NamedNodeMap)) {
|
|
10242
|
-
element.remove();
|
|
10243
|
-
return;
|
|
10244
|
-
}
|
|
10245
|
-
for (let i = element.attributes.length - 1; i >= 0; i--) {
|
|
10246
|
-
const attribute = element.attributes.item(i);
|
|
10247
|
-
const attributeName = attribute.name;
|
|
10248
|
-
// remove non-allowed attribs
|
|
10249
|
-
if (!allowedAttributes.includes(attributeName.toLowerCase())) {
|
|
10250
|
-
element.removeAttribute(attributeName);
|
|
10251
|
-
continue;
|
|
10252
|
-
}
|
|
10253
|
-
// clean up any allowed attribs
|
|
10254
|
-
// that attempt to do any JS funny-business
|
|
10255
|
-
const attributeValue = attribute.value;
|
|
10256
|
-
/**
|
|
10257
|
-
* We also need to check the property value
|
|
10258
|
-
* as javascript: can allow special characters
|
|
10259
|
-
* such as 	 and still be valid (i.e. java	script)
|
|
10260
|
-
*/
|
|
10261
|
-
const propertyValue = element[attributeName];
|
|
10262
|
-
/* eslint-disable */
|
|
10263
|
-
if ((attributeValue != null && attributeValue.toLowerCase().includes('javascript:')) ||
|
|
10264
|
-
(propertyValue != null && propertyValue.toLowerCase().includes('javascript:'))) {
|
|
10265
|
-
element.removeAttribute(attributeName);
|
|
10266
|
-
}
|
|
10267
|
-
/* eslint-enable */
|
|
10268
|
-
}
|
|
10269
|
-
/**
|
|
10270
|
-
* Sanitize any nested children
|
|
10271
|
-
*/
|
|
10272
|
-
const childElements = getElementChildren(element);
|
|
10273
|
-
/* eslint-disable-next-line */
|
|
10274
|
-
for (let i = 0; i < childElements.length; i++) {
|
|
10275
|
-
sanitizeElement(childElements[i]);
|
|
10713
|
+
const getOverlayLabelPlacement = (mode, control, interfaceType) => {
|
|
10714
|
+
if (mode === 'ios' && control === 'radio' && interfaceType !== 'modal') {
|
|
10715
|
+
return 'start';
|
|
10276
10716
|
}
|
|
10717
|
+
return 'end';
|
|
10277
10718
|
};
|
|
10278
10719
|
/**
|
|
10279
|
-
*
|
|
10280
|
-
*
|
|
10720
|
+
* Returns the default `justify` for a radio or checkbox option rendered
|
|
10721
|
+
* inside an overlay. Defaults follow each mode's option-row layout:
|
|
10722
|
+
* - `ios`: `"space-between"` for radio in `alert` and `popover`. The
|
|
10723
|
+
* `modal` interface falls back to `"start"`. Checkbox is always `"start"`
|
|
10724
|
+
* on iOS.
|
|
10725
|
+
* - everything else (e.g. `md`): `"start"`.
|
|
10726
|
+
*
|
|
10727
|
+
* `interfaceType` is optional; only `"modal"` changes the result, so
|
|
10728
|
+
* callers that aren't a modal can omit it.
|
|
10729
|
+
*
|
|
10730
|
+
* Used by `select-popover` and `select-modal` as the fallback when an
|
|
10731
|
+
* option doesn't explicitly set `justify`.
|
|
10281
10732
|
*/
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
};
|
|
10286
|
-
const isSanitizerEnabled = () => {
|
|
10287
|
-
var _a;
|
|
10288
|
-
const win = window;
|
|
10289
|
-
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
|
|
10290
|
-
if (config) {
|
|
10291
|
-
if (config.get) {
|
|
10292
|
-
return config.get('sanitizerEnabled', true);
|
|
10293
|
-
}
|
|
10294
|
-
else {
|
|
10295
|
-
return config.sanitizerEnabled === true || config.sanitizerEnabled === undefined;
|
|
10296
|
-
}
|
|
10733
|
+
const getOverlayLabelJustify = (mode, control, interfaceType) => {
|
|
10734
|
+
if (mode === 'ios' && control === 'radio' && interfaceType !== 'modal') {
|
|
10735
|
+
return 'space-between';
|
|
10297
10736
|
}
|
|
10298
|
-
return
|
|
10737
|
+
return 'start';
|
|
10299
10738
|
};
|
|
10300
|
-
const allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
|
|
10301
|
-
const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];
|
|
10302
|
-
class IonicSafeString {
|
|
10303
|
-
constructor(value) {
|
|
10304
|
-
this.value = value;
|
|
10305
|
-
}
|
|
10306
|
-
}
|
|
10307
10739
|
|
|
10308
10740
|
/**
|
|
10309
10741
|
* iOS Alert Enter Animation
|
|
10310
10742
|
*/
|
|
10311
|
-
const iosEnterAnimation$
|
|
10743
|
+
const iosEnterAnimation$4 = (baseEl) => {
|
|
10312
10744
|
const baseAnimation = createAnimation();
|
|
10313
10745
|
const backdropAnimation = createAnimation();
|
|
10314
10746
|
const wrapperAnimation = createAnimation();
|
|
@@ -10333,7 +10765,7 @@ const iosEnterAnimation$5 = (baseEl) => {
|
|
|
10333
10765
|
/**
|
|
10334
10766
|
* iOS Alert Leave Animation
|
|
10335
10767
|
*/
|
|
10336
|
-
const iosLeaveAnimation$
|
|
10768
|
+
const iosLeaveAnimation$4 = (baseEl) => {
|
|
10337
10769
|
const baseAnimation = createAnimation();
|
|
10338
10770
|
const backdropAnimation = createAnimation();
|
|
10339
10771
|
const wrapperAnimation = createAnimation();
|
|
@@ -10390,9 +10822,9 @@ const mdLeaveAnimation$4 = (baseEl) => {
|
|
|
10390
10822
|
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
10391
10823
|
};
|
|
10392
10824
|
|
|
10393
|
-
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)}`;
|
|
10825
|
+
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)}`;
|
|
10394
10826
|
|
|
10395
|
-
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)}}`;
|
|
10827
|
+
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)}}`;
|
|
10396
10828
|
|
|
10397
10829
|
// TODO(FW-2832): types
|
|
10398
10830
|
/**
|
|
@@ -10566,22 +10998,7 @@ class Alert {
|
|
|
10566
10998
|
this.inputType = inputTypes.values().next().value;
|
|
10567
10999
|
this.processedInputs = inputs.map((i, index) => {
|
|
10568
11000
|
var _a;
|
|
10569
|
-
return ({
|
|
10570
|
-
type: i.type || 'text',
|
|
10571
|
-
name: i.name || `${index}`,
|
|
10572
|
-
placeholder: i.placeholder || '',
|
|
10573
|
-
value: i.value,
|
|
10574
|
-
label: i.label,
|
|
10575
|
-
checked: !!i.checked,
|
|
10576
|
-
disabled: !!i.disabled,
|
|
10577
|
-
id: i.id || `alert-input-${this.overlayIndex}-${index}`,
|
|
10578
|
-
handler: i.handler,
|
|
10579
|
-
min: i.min,
|
|
10580
|
-
max: i.max,
|
|
10581
|
-
cssClass: (_a = i.cssClass) !== null && _a !== void 0 ? _a : '',
|
|
10582
|
-
attributes: i.attributes || {},
|
|
10583
|
-
tabindex: i.type === 'radio' && i !== focusable ? -1 : 0,
|
|
10584
|
-
});
|
|
11001
|
+
return Object.assign(Object.assign({}, i), { type: i.type || 'text', name: i.name || `${index}`, placeholder: i.placeholder || '', checked: !!i.checked, disabled: !!i.disabled, id: i.id || `alert-input-${this.overlayIndex}-${index}`, cssClass: (_a = i.cssClass) !== null && _a !== void 0 ? _a : '', attributes: i.attributes || {}, tabindex: i.type === 'radio' && i !== focusable ? -1 : 0 });
|
|
10585
11002
|
});
|
|
10586
11003
|
}
|
|
10587
11004
|
connectedCallback() {
|
|
@@ -10609,6 +11026,10 @@ class Alert {
|
|
|
10609
11026
|
this.gesture.destroy();
|
|
10610
11027
|
this.gesture = undefined;
|
|
10611
11028
|
}
|
|
11029
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
11030
|
+
if (this.presented) {
|
|
11031
|
+
cleanupRootFocusTrapAccessibility();
|
|
11032
|
+
}
|
|
10612
11033
|
(_a = this.buttonGroupResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
10613
11034
|
this.buttonGroupResizeObserver = undefined;
|
|
10614
11035
|
}
|
|
@@ -10648,7 +11069,7 @@ class Alert {
|
|
|
10648
11069
|
async present() {
|
|
10649
11070
|
const unlock = await this.lockController.lock();
|
|
10650
11071
|
await this.delegateController.attachViewToDom();
|
|
10651
|
-
await present(this, 'alertEnter', iosEnterAnimation$
|
|
11072
|
+
await present(this, 'alertEnter', iosEnterAnimation$4, mdEnterAnimation$4).then(() => {
|
|
10652
11073
|
var _a, _b;
|
|
10653
11074
|
/**
|
|
10654
11075
|
* Check if alert has only one button and no inputs.
|
|
@@ -10679,7 +11100,7 @@ class Alert {
|
|
|
10679
11100
|
*/
|
|
10680
11101
|
async dismiss(data, role) {
|
|
10681
11102
|
const unlock = await this.lockController.lock();
|
|
10682
|
-
const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$
|
|
11103
|
+
const dismissed = await dismiss(this, data, role, 'alertLeave', iosLeaveAnimation$4, mdLeaveAnimation$4);
|
|
10683
11104
|
if (dismissed) {
|
|
10684
11105
|
this.delegateController.removeViewFromDom();
|
|
10685
11106
|
}
|
|
@@ -10777,14 +11198,61 @@ class Alert {
|
|
|
10777
11198
|
if (inputs.length === 0) {
|
|
10778
11199
|
return null;
|
|
10779
11200
|
}
|
|
10780
|
-
return (hAsync("div", { class: "alert-checkbox-group" }, inputs.map((i) =>
|
|
11201
|
+
return (hAsync("div", { class: "alert-checkbox-group" }, inputs.map((i) => {
|
|
11202
|
+
var _a, _b;
|
|
11203
|
+
/**
|
|
11204
|
+
* Cast to `SelectAlertInput` to access rich content
|
|
11205
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
11206
|
+
* that are passed through from `ion-select` but not
|
|
11207
|
+
* part of the public `AlertInput` interface.
|
|
11208
|
+
*/
|
|
11209
|
+
const richInput = i;
|
|
11210
|
+
const optionLabelOptions = {
|
|
11211
|
+
id: richInput.id,
|
|
11212
|
+
label: richInput.label,
|
|
11213
|
+
startContent: richInput.startContent,
|
|
11214
|
+
endContent: richInput.endContent,
|
|
11215
|
+
description: richInput.description,
|
|
11216
|
+
};
|
|
11217
|
+
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'checkbox');
|
|
11218
|
+
const defaultJustify = getOverlayLabelJustify(mode, 'checkbox');
|
|
11219
|
+
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: {
|
|
11220
|
+
'alert-button-inner': true,
|
|
11221
|
+
[`checkbox-label-placement-${(_a = richInput.labelPlacement) !== null && _a !== void 0 ? _a : defaultLabelPlacement}`]: true,
|
|
11222
|
+
[`checkbox-justify-${(_b = richInput.justify) !== null && _b !== void 0 ? _b : defaultJustify}`]: true,
|
|
11223
|
+
} }, hAsync("div", { class: "alert-checkbox-icon" }, hAsync("div", { class: "alert-checkbox-inner" })), renderOptionLabel(optionLabelOptions, 'alert-checkbox-label')), mode === 'md' && hAsync("ion-ripple-effect", null)));
|
|
11224
|
+
})));
|
|
10781
11225
|
}
|
|
10782
11226
|
renderRadio() {
|
|
10783
11227
|
const inputs = this.processedInputs;
|
|
11228
|
+
const mode = getIonMode$1(this);
|
|
10784
11229
|
if (inputs.length === 0) {
|
|
10785
11230
|
return null;
|
|
10786
11231
|
}
|
|
10787
|
-
return (hAsync("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) =>
|
|
11232
|
+
return (hAsync("div", { class: "alert-radio-group", role: "radiogroup", "aria-activedescendant": this.activeId }, inputs.map((i) => {
|
|
11233
|
+
var _a, _b;
|
|
11234
|
+
/**
|
|
11235
|
+
* Cast to `SelectAlertInput` to access rich content
|
|
11236
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
11237
|
+
* that are passed through from `ion-select` but not
|
|
11238
|
+
* part of the public `AlertInput` interface.
|
|
11239
|
+
*/
|
|
11240
|
+
const richInput = i;
|
|
11241
|
+
const optionLabelOptions = {
|
|
11242
|
+
id: richInput.id,
|
|
11243
|
+
label: richInput.label,
|
|
11244
|
+
startContent: richInput.startContent,
|
|
11245
|
+
endContent: richInput.endContent,
|
|
11246
|
+
description: richInput.description,
|
|
11247
|
+
};
|
|
11248
|
+
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'radio');
|
|
11249
|
+
const defaultJustify = getOverlayLabelJustify(mode, 'radio');
|
|
11250
|
+
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: {
|
|
11251
|
+
'alert-button-inner': true,
|
|
11252
|
+
[`radio-label-placement-${(_a = richInput.labelPlacement) !== null && _a !== void 0 ? _a : defaultLabelPlacement}`]: true,
|
|
11253
|
+
[`radio-justify-${(_b = richInput.justify) !== null && _b !== void 0 ? _b : defaultJustify}`]: true,
|
|
11254
|
+
} }, hAsync("div", { class: "alert-radio-icon" }, hAsync("div", { class: "alert-radio-inner" })), renderOptionLabel(optionLabelOptions, 'alert-radio-label'))));
|
|
11255
|
+
})));
|
|
10788
11256
|
}
|
|
10789
11257
|
renderInput() {
|
|
10790
11258
|
const inputs = this.processedInputs;
|
|
@@ -10864,7 +11332,7 @@ class Alert {
|
|
|
10864
11332
|
'alert-button-group': true,
|
|
10865
11333
|
'alert-button-group-vertical': buttons.length > 2 || this.isButtonGroupWrapped,
|
|
10866
11334
|
};
|
|
10867
|
-
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$
|
|
11335
|
+
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$1(button), tabIndex: 0, onClick: () => this.buttonClick(button) }), hAsync("span", { class: "alert-button-inner" }, button.text), mode === 'md' && hAsync("ion-ripple-effect", null))))));
|
|
10868
11336
|
}
|
|
10869
11337
|
renderAlertMessage(msgId) {
|
|
10870
11338
|
const { customHTMLEnabled, message } = this;
|
|
@@ -10887,9 +11355,9 @@ class Alert {
|
|
|
10887
11355
|
* If neither are defined, do not set aria-labelledby.
|
|
10888
11356
|
*/
|
|
10889
11357
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
10890
|
-
return (hAsync(Host, { key: '
|
|
11358
|
+
return (hAsync(Host, { key: '022f3463b8e6c52064b90ec304c524847c3d5ad3', tabindex: "-1", style: {
|
|
10891
11359
|
zIndex: `${20000 + overlayIndex}`,
|
|
10892
|
-
}, 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: '
|
|
11360
|
+
}, 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: 'c3cd05738bc2834f54707edeb2fae06ec10d6fd2', tappable: this.backdropDismiss }), hAsync("div", { key: 'b44fadd9ba7ddf073854c5035538d11ae8e66bc2', tabindex: "0", "aria-hidden": "true" }), hAsync("div", Object.assign({ key: 'fafea048141a6c7957e62aef31faa8041dd610c1', 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: '3ad9d2d4b7cf425eab8293ddc12eff0fe8df1517', class: "alert-head" }, header && (hAsync("h2", { key: '7d9154f5ee595b7e4da6ecf3a20871f104c1256e', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (hAsync("h2", { key: '1f891f38004be6964e9406b84dd580145c42516a', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (hAsync("h3", { key: '2ab4d344ecb7e384e8f6d3d3e59ee5a1bbcc832c', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), hAsync("div", { key: '78a4ff09aa3aaafcd0dc2a42d036767d83b3cfa2', tabindex: "0", "aria-hidden": "true" })));
|
|
10893
11361
|
}
|
|
10894
11362
|
get el() { return getElement(this); }
|
|
10895
11363
|
static get watchers() { return {
|
|
@@ -10947,7 +11415,7 @@ const inputClass = (input) => {
|
|
|
10947
11415
|
var _a, _b, _c;
|
|
10948
11416
|
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() : ''));
|
|
10949
11417
|
};
|
|
10950
|
-
const buttonClass$
|
|
11418
|
+
const buttonClass$1 = (button) => {
|
|
10951
11419
|
return Object.assign({ 'alert-button': true, 'ion-focusable': true, 'ion-activatable': true, [`alert-button-role-${button.role}`]: button.role !== undefined }, getClassMap(button.cssClass));
|
|
10952
11420
|
};
|
|
10953
11421
|
|
|
@@ -18732,6 +19200,8 @@ const createColorClasses = (color) => {
|
|
|
18732
19200
|
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}`;
|
|
18733
19201
|
|
|
18734
19202
|
/**
|
|
19203
|
+
* @deprecated
|
|
19204
|
+
*
|
|
18735
19205
|
* @part image - The inner `img` element.
|
|
18736
19206
|
*/
|
|
18737
19207
|
class Img {
|
|
@@ -18755,6 +19225,8 @@ class Img {
|
|
|
18755
19225
|
this.inheritedAttributes = inheritAttributes$1(this.el, ['draggable']);
|
|
18756
19226
|
}
|
|
18757
19227
|
componentDidLoad() {
|
|
19228
|
+
printIonWarning('[ion-img] - This component is deprecated and will be removed in Ionic v10. ' +
|
|
19229
|
+
'Use a native <img> with the loading="lazy" attribute instead.', this.el);
|
|
18758
19230
|
this.addIO();
|
|
18759
19231
|
}
|
|
18760
19232
|
disconnectedCallback() {
|
|
@@ -18807,7 +19279,7 @@ class Img {
|
|
|
18807
19279
|
render() {
|
|
18808
19280
|
const { loadSrc, alt, onLoad, loadError, inheritedAttributes } = this;
|
|
18809
19281
|
const { draggable } = inheritedAttributes;
|
|
18810
|
-
return (hAsync(Host, { key: '
|
|
19282
|
+
return (hAsync(Host, { key: '57bfb44d9850381fe7b6fcf0c9019b03f7ef86ec', class: getIonMode$1(this) }, hAsync("img", { key: '888ec06a266fa2751fc0147ede6a567f4e2b29a6', decoding: "async", src: loadSrc, alt: alt, onLoad: onLoad, onError: loadError, part: "image", draggable: isDraggable(draggable) })));
|
|
18811
19283
|
}
|
|
18812
19284
|
get el() { return getElement(this); }
|
|
18813
19285
|
static get watchers() { return {
|
|
@@ -19311,7 +19783,7 @@ class Input {
|
|
|
19311
19783
|
/**
|
|
19312
19784
|
* Whether auto correction should be enabled when the user is entering/editing the text value.
|
|
19313
19785
|
*/
|
|
19314
|
-
this.autocorrect =
|
|
19786
|
+
this.autocorrect = false;
|
|
19315
19787
|
/**
|
|
19316
19788
|
* Sets the [`autofocus` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) on the native input element.
|
|
19317
19789
|
*
|
|
@@ -19768,7 +20240,7 @@ class Input {
|
|
|
19768
20240
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
19769
20241
|
*/
|
|
19770
20242
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
19771
|
-
return (hAsync(Host, { key: '
|
|
20243
|
+
return (hAsync(Host, { key: '6a05f61339d8045285d5820c2508296cc842c210', class: createColorClasses$1(this.color, {
|
|
19772
20244
|
[mode]: true,
|
|
19773
20245
|
'has-value': hasValue,
|
|
19774
20246
|
'has-focus': hasFocus,
|
|
@@ -19779,14 +20251,14 @@ class Input {
|
|
|
19779
20251
|
'in-item': inItem,
|
|
19780
20252
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
19781
20253
|
'input-disabled': disabled,
|
|
19782
|
-
}) }, hAsync("label", { key: '
|
|
20254
|
+
}) }, hAsync("label", { key: 'b546d66f53ea25082494e3a4cb0ce7532ee649d7', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '6af832f2b25fadee7a49adb999166dbc97565e2d', class: "native-wrapper", onClick: this.onLabelClick }, hAsync("slot", { key: 'e7a8895038a8d2503f646acfda20c6c1a99c2839', name: "start" }), hAsync("input", Object.assign({ key: 'ce85703e0434a6322bb4275a924e3cd91c79fa20', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect ? 'on' : 'off', 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: '1e59589fc89a37d7830dc915b4c19d26a8f568c7', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
19783
20255
|
/**
|
|
19784
20256
|
* This prevents mobile browsers from
|
|
19785
20257
|
* blurring the input when the clear
|
|
19786
20258
|
* button is activated.
|
|
19787
20259
|
*/
|
|
19788
20260
|
ev.preventDefault();
|
|
19789
|
-
}, onClick: this.clearTextInput }, hAsync("ion-icon", { key: '
|
|
20261
|
+
}, onClick: this.clearTextInput }, hAsync("ion-icon", { key: '7d443c5061bf6436d3b77a2444676c679b3e62e4', "aria-hidden": "true", icon: clearIconData }))), hAsync("slot", { key: '5516f88d46886348217570ec1fadda0b79b63c01', name: "end" })), shouldRenderHighlight && hAsync("div", { key: '2a1fdb7e7c974654dfbb3afb4fbfd9204e9d9092', class: "input-highlight" })), this.renderBottomContent()));
|
|
19790
20262
|
}
|
|
19791
20263
|
get el() { return getElement(this); }
|
|
19792
20264
|
static get watchers() { return {
|
|
@@ -19814,7 +20286,7 @@ class Input {
|
|
|
19814
20286
|
"color": [513],
|
|
19815
20287
|
"autocapitalize": [1],
|
|
19816
20288
|
"autocomplete": [1],
|
|
19817
|
-
"autocorrect": [
|
|
20289
|
+
"autocorrect": [4],
|
|
19818
20290
|
"autofocus": [4],
|
|
19819
20291
|
"clearInput": [4, "clear-input"],
|
|
19820
20292
|
"clearInputIcon": [1, "clear-input-icon"],
|
|
@@ -21818,7 +22290,7 @@ class ListHeader {
|
|
|
21818
22290
|
/**
|
|
21819
22291
|
* iOS Loading Enter Animation
|
|
21820
22292
|
*/
|
|
21821
|
-
const iosEnterAnimation$
|
|
22293
|
+
const iosEnterAnimation$3 = (baseEl) => {
|
|
21822
22294
|
const baseAnimation = createAnimation();
|
|
21823
22295
|
const backdropAnimation = createAnimation();
|
|
21824
22296
|
const wrapperAnimation = createAnimation();
|
|
@@ -21843,7 +22315,7 @@ const iosEnterAnimation$4 = (baseEl) => {
|
|
|
21843
22315
|
/**
|
|
21844
22316
|
* iOS Loading Leave Animation
|
|
21845
22317
|
*/
|
|
21846
|
-
const iosLeaveAnimation$
|
|
22318
|
+
const iosLeaveAnimation$3 = (baseEl) => {
|
|
21847
22319
|
const baseAnimation = createAnimation();
|
|
21848
22320
|
const backdropAnimation = createAnimation();
|
|
21849
22321
|
const wrapperAnimation = createAnimation();
|
|
@@ -22016,6 +22488,10 @@ class Loading {
|
|
|
22016
22488
|
}
|
|
22017
22489
|
disconnectedCallback() {
|
|
22018
22490
|
this.triggerController.removeClickListener();
|
|
22491
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
22492
|
+
if (this.presented) {
|
|
22493
|
+
cleanupRootFocusTrapAccessibility();
|
|
22494
|
+
}
|
|
22019
22495
|
}
|
|
22020
22496
|
/**
|
|
22021
22497
|
* Present the loading overlay after it has been created.
|
|
@@ -22023,7 +22499,7 @@ class Loading {
|
|
|
22023
22499
|
async present() {
|
|
22024
22500
|
const unlock = await this.lockController.lock();
|
|
22025
22501
|
await this.delegateController.attachViewToDom();
|
|
22026
|
-
await present(this, 'loadingEnter', iosEnterAnimation$
|
|
22502
|
+
await present(this, 'loadingEnter', iosEnterAnimation$3, mdEnterAnimation$3);
|
|
22027
22503
|
if (this.duration > 0) {
|
|
22028
22504
|
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
|
|
22029
22505
|
}
|
|
@@ -22046,7 +22522,7 @@ class Loading {
|
|
|
22046
22522
|
if (this.durationTimeout) {
|
|
22047
22523
|
clearTimeout(this.durationTimeout);
|
|
22048
22524
|
}
|
|
22049
|
-
const dismissed = await dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation$
|
|
22525
|
+
const dismissed = await dismiss(this, data, role, 'loadingLeave', iosLeaveAnimation$3, mdLeaveAnimation$3);
|
|
22050
22526
|
if (dismissed) {
|
|
22051
22527
|
this.delegateController.removeViewFromDom();
|
|
22052
22528
|
}
|
|
@@ -22081,9 +22557,9 @@ class Loading {
|
|
|
22081
22557
|
* Otherwise, don't set aria-labelledby.
|
|
22082
22558
|
*/
|
|
22083
22559
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
22084
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
22560
|
+
return (hAsync(Host, Object.assign({ key: 'ab48bfcee8f7e3e33847a2f262fdc08b9ea804ca', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
22085
22561
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
22086
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '
|
|
22562
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '41baccc7fb6474389a3a3431c208e829ef738b75', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: '7b7290974abbe8db8739b19835aca9f8b5c271c2', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'e32466abfcc92aaad47ea03b1dcb49f66abe4b63', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (hAsync("div", { key: 'c5e6e6f9e3f39dba0225d08d7dd2c1b96a1d83c7', class: "loading-spinner" }, hAsync("ion-spinner", { key: 'f428038959d879404ea898011363aac0b807ad11', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), hAsync("div", { key: '490e531367b86c319fa4260722dcff4dd631fa88', tabindex: "0", "aria-hidden": "true" })));
|
|
22087
22563
|
}
|
|
22088
22564
|
get el() { return getElement(this); }
|
|
22089
22565
|
static get watchers() { return {
|
|
@@ -24357,7 +24833,7 @@ const createEnterAnimation$1 = () => {
|
|
|
24357
24833
|
/**
|
|
24358
24834
|
* iOS Modal Enter Animation for the Card presentation style
|
|
24359
24835
|
*/
|
|
24360
|
-
const iosEnterAnimation$
|
|
24836
|
+
const iosEnterAnimation$2 = (baseEl, opts) => {
|
|
24361
24837
|
const { presentingEl, currentBreakpoint, expandToScroll } = opts;
|
|
24362
24838
|
const root = getElementRoot(baseEl);
|
|
24363
24839
|
const { wrapperAnimation, backdropAnimation, contentAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation$1();
|
|
@@ -24450,7 +24926,7 @@ const createLeaveAnimation$1 = () => {
|
|
|
24450
24926
|
/**
|
|
24451
24927
|
* iOS Modal Leave Animation
|
|
24452
24928
|
*/
|
|
24453
|
-
const iosLeaveAnimation$
|
|
24929
|
+
const iosLeaveAnimation$2 = (baseEl, opts, duration = 500) => {
|
|
24454
24930
|
const { presentingEl, currentBreakpoint } = opts;
|
|
24455
24931
|
const root = getElementRoot(baseEl);
|
|
24456
24932
|
const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetLeaveAnimation(opts) : createLeaveAnimation$1();
|
|
@@ -25553,9 +26029,9 @@ const clearSafeAreaOverrides = (hostEl) => {
|
|
|
25553
26029
|
hostEl.style.removeProperty('--ion-safe-area-right');
|
|
25554
26030
|
};
|
|
25555
26031
|
|
|
25556
|
-
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-
|
|
26032
|
+
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}`;
|
|
25557
26033
|
|
|
25558
|
-
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-
|
|
26034
|
+
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}`;
|
|
25559
26035
|
|
|
25560
26036
|
// TODO(FW-2832): types
|
|
25561
26037
|
/**
|
|
@@ -25625,13 +26101,20 @@ class Modal {
|
|
|
25625
26101
|
/**
|
|
25626
26102
|
* The interaction behavior for the sheet modal when the handle is pressed.
|
|
25627
26103
|
*
|
|
25628
|
-
*
|
|
25629
|
-
*
|
|
26104
|
+
* Handle behavior is unavailable when the `handle` property is set to
|
|
26105
|
+
* `false` or when the `breakpoints` property is not set (using a
|
|
26106
|
+
* fullscreen or card modal).
|
|
26107
|
+
*
|
|
26108
|
+
* Set to `"cycle"` to make the handle focusable and let the sheet modal
|
|
26109
|
+
* cycle between available breakpoints when pressed. This keeps the sheet
|
|
26110
|
+
* operable with assistive technology.
|
|
26111
|
+
*
|
|
26112
|
+
* Set to `"none"` to make the handle purely decorative when pressed and
|
|
26113
|
+
* removed from the tab order.
|
|
25630
26114
|
*
|
|
25631
|
-
*
|
|
25632
|
-
* when the `breakpoints` property is not set (using a fullscreen or card modal).
|
|
26115
|
+
* Defaults to `"cycle"`.
|
|
25633
26116
|
*/
|
|
25634
|
-
this.handleBehavior = '
|
|
26117
|
+
this.handleBehavior = 'cycle';
|
|
25635
26118
|
/**
|
|
25636
26119
|
* If `true`, the modal will be dismissed when the backdrop is clicked.
|
|
25637
26120
|
*/
|
|
@@ -25823,6 +26306,10 @@ class Modal {
|
|
|
25823
26306
|
// Also called in dismiss() — intentional dual cleanup covers both
|
|
25824
26307
|
// dismiss-then-remove and direct DOM removal without dismiss.
|
|
25825
26308
|
this.cleanupSafeAreaOverrides();
|
|
26309
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
26310
|
+
if (this.presented) {
|
|
26311
|
+
cleanupRootFocusTrapAccessibility();
|
|
26312
|
+
}
|
|
25826
26313
|
}
|
|
25827
26314
|
componentWillLoad() {
|
|
25828
26315
|
var _a;
|
|
@@ -25999,7 +26486,7 @@ class Modal {
|
|
|
25999
26486
|
this.statusBarStyle = await StatusBar.getStyle();
|
|
26000
26487
|
setCardStatusBarDark();
|
|
26001
26488
|
}
|
|
26002
|
-
await present(this, 'modalEnter', iosEnterAnimation$
|
|
26489
|
+
await present(this, 'modalEnter', iosEnterAnimation$2, mdEnterAnimation$2, {
|
|
26003
26490
|
presentingEl: presentingElement,
|
|
26004
26491
|
currentBreakpoint: this.initialBreakpoint,
|
|
26005
26492
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
@@ -26061,7 +26548,7 @@ class Modal {
|
|
|
26061
26548
|
// All of the elements needed for the swipe gesture
|
|
26062
26549
|
// should be in the DOM and referenced by now, except
|
|
26063
26550
|
// for the presenting el
|
|
26064
|
-
const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation$
|
|
26551
|
+
const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation$2);
|
|
26065
26552
|
const ani = (this.animation = animationBuilder(el, {
|
|
26066
26553
|
presentingEl: this.presentingElement,
|
|
26067
26554
|
expandToScroll: this.expandToScroll,
|
|
@@ -26080,7 +26567,7 @@ class Modal {
|
|
|
26080
26567
|
if (!wrapperEl || initialBreakpoint === undefined) {
|
|
26081
26568
|
return;
|
|
26082
26569
|
}
|
|
26083
|
-
const animationBuilder = this.enterAnimation || config.get('modalEnter', iosEnterAnimation$
|
|
26570
|
+
const animationBuilder = this.enterAnimation || config.get('modalEnter', iosEnterAnimation$2);
|
|
26084
26571
|
const ani = (this.animation = animationBuilder(this.el, {
|
|
26085
26572
|
presentingEl: this.presentingElement,
|
|
26086
26573
|
currentBreakpoint: initialBreakpoint,
|
|
@@ -26270,7 +26757,7 @@ class Modal {
|
|
|
26270
26757
|
window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
26271
26758
|
this.keyboardOpenCallback = undefined;
|
|
26272
26759
|
}
|
|
26273
|
-
const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation$
|
|
26760
|
+
const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation$2, mdLeaveAnimation$2, {
|
|
26274
26761
|
presentingEl: presentingElement,
|
|
26275
26762
|
currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
|
|
26276
26763
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
@@ -26702,26 +27189,20 @@ class Modal {
|
|
|
26702
27189
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
26703
27190
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
26704
27191
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
26705
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
27192
|
+
return (hAsync(Host, Object.assign({ key: '528f9e354f470e22563938e7531e3f23a97e4200', "no-router": true,
|
|
26706
27193
|
// Allow the modal to be navigable when the handle is focusable
|
|
26707
27194
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
26708
27195
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
26709
|
-
}, 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: '
|
|
27196
|
+
}, 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: '53983c96bc6b30df89986c8d9c978a8e6f78fe80', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '34288a7343b7c47fed00d3abc73957f45f06d2fd', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'f9b37f547bd5c61037bbad1a71bfed80ba8c630b',
|
|
26710
27197
|
/*
|
|
26711
27198
|
role and aria-modal must be used on the
|
|
26712
27199
|
same element. They must also be set inside the
|
|
26713
27200
|
shadow DOM otherwise ion-button will not be highlighted
|
|
26714
27201
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
26715
|
-
|
|
26716
|
-
tabIndex={-1} is required so present() can move focus to this
|
|
26717
|
-
element (which carries the dialog role) instead of the role-less
|
|
26718
|
-
host. role="dialog" alone does not make an element focusable, so
|
|
26719
|
-
without the tabindex focus() would be a no-op and screen readers
|
|
26720
|
-
may not properly announce the dialog and its content when it opens.
|
|
26721
27202
|
*/
|
|
26722
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true",
|
|
27203
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'b8741594108d3ea681ff41ff8f2241a4119578b1', class: "modal-handle",
|
|
26723
27204
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
26724
|
-
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: '
|
|
27205
|
+
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: 'bcc7960fae3fed09076c704d08c3afc46caa0738', onSlotchange: this.onSlotChange }))));
|
|
26725
27206
|
}
|
|
26726
27207
|
get el() { return getElement(this); }
|
|
26727
27208
|
static get watchers() { return {
|
|
@@ -27804,14 +28285,14 @@ class Note {
|
|
|
27804
28285
|
}; }
|
|
27805
28286
|
}
|
|
27806
28287
|
|
|
27807
|
-
const pickerIosCss
|
|
28288
|
+
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)))}`;
|
|
27808
28289
|
|
|
27809
|
-
const pickerMdCss
|
|
28290
|
+
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%)}`;
|
|
27810
28291
|
|
|
27811
28292
|
/**
|
|
27812
28293
|
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
27813
28294
|
*/
|
|
27814
|
-
|
|
28295
|
+
class Picker {
|
|
27815
28296
|
constructor(hostRef) {
|
|
27816
28297
|
registerInstance(this, hostRef);
|
|
27817
28298
|
this.ionInputModeChange = createEvent(this, "ionInputModeChange", 7);
|
|
@@ -28277,8 +28758,8 @@ let Picker$1 = class Picker {
|
|
|
28277
28758
|
}
|
|
28278
28759
|
get el() { return getElement(this); }
|
|
28279
28760
|
static get style() { return {
|
|
28280
|
-
ios: pickerIosCss
|
|
28281
|
-
md: pickerMdCss
|
|
28761
|
+
ios: pickerIosCss(),
|
|
28762
|
+
md: pickerMdCss()
|
|
28282
28763
|
}; }
|
|
28283
28764
|
static get cmpMeta() { return {
|
|
28284
28765
|
"$flags$": 297,
|
|
@@ -28290,359 +28771,44 @@ let Picker$1 = class Picker {
|
|
|
28290
28771
|
"$lazyBundleId$": "-",
|
|
28291
28772
|
"$attrsToReflect$": []
|
|
28292
28773
|
}; }
|
|
28293
|
-
}
|
|
28294
|
-
|
|
28295
|
-
/**
|
|
28296
|
-
* iOS Picker Enter Animation
|
|
28297
|
-
*/
|
|
28298
|
-
const iosEnterAnimation$2 = (baseEl) => {
|
|
28299
|
-
const baseAnimation = createAnimation();
|
|
28300
|
-
const backdropAnimation = createAnimation();
|
|
28301
|
-
const wrapperAnimation = createAnimation();
|
|
28302
|
-
backdropAnimation
|
|
28303
|
-
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
28304
|
-
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
28305
|
-
.beforeStyles({
|
|
28306
|
-
'pointer-events': 'none',
|
|
28307
|
-
})
|
|
28308
|
-
.afterClearStyles(['pointer-events']);
|
|
28309
|
-
wrapperAnimation
|
|
28310
|
-
.addElement(baseEl.querySelector('.picker-wrapper'))
|
|
28311
|
-
.fromTo('transform', 'translateY(100%)', 'translateY(0%)');
|
|
28312
|
-
return baseAnimation
|
|
28313
|
-
.addElement(baseEl)
|
|
28314
|
-
.easing('cubic-bezier(.36,.66,.04,1)')
|
|
28315
|
-
.duration(400)
|
|
28316
|
-
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
28317
|
-
};
|
|
28318
|
-
|
|
28319
|
-
/**
|
|
28320
|
-
* iOS Picker Leave Animation
|
|
28321
|
-
*/
|
|
28322
|
-
const iosLeaveAnimation$2 = (baseEl) => {
|
|
28323
|
-
const baseAnimation = createAnimation();
|
|
28324
|
-
const backdropAnimation = createAnimation();
|
|
28325
|
-
const wrapperAnimation = createAnimation();
|
|
28326
|
-
backdropAnimation
|
|
28327
|
-
.addElement(baseEl.querySelector('ion-backdrop'))
|
|
28328
|
-
.fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
|
|
28329
|
-
wrapperAnimation
|
|
28330
|
-
.addElement(baseEl.querySelector('.picker-wrapper'))
|
|
28331
|
-
.fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
|
28332
|
-
return baseAnimation
|
|
28333
|
-
.addElement(baseEl)
|
|
28334
|
-
.easing('cubic-bezier(.36,.66,.04,1)')
|
|
28335
|
-
.duration(400)
|
|
28336
|
-
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
28337
|
-
};
|
|
28338
|
-
|
|
28339
|
-
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}`;
|
|
28774
|
+
}
|
|
28340
28775
|
|
|
28341
|
-
const
|
|
28776
|
+
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)}}`;
|
|
28342
28777
|
|
|
28343
|
-
// TODO(FW-2832): types
|
|
28344
28778
|
/**
|
|
28345
28779
|
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
28780
|
+
*
|
|
28781
|
+
* @slot prefix - Content to show on the left side of the picker options.
|
|
28782
|
+
* @slot suffix - Content to show on the right side of the picker options.
|
|
28346
28783
|
*/
|
|
28347
|
-
class
|
|
28784
|
+
class PickerColumn {
|
|
28348
28785
|
constructor(hostRef) {
|
|
28349
28786
|
registerInstance(this, hostRef);
|
|
28350
|
-
this.
|
|
28351
|
-
this.
|
|
28352
|
-
this.
|
|
28353
|
-
this.
|
|
28354
|
-
this.
|
|
28355
|
-
this.
|
|
28356
|
-
this.
|
|
28357
|
-
this.didDismissShorthand = createEvent(this, "didDismiss", 7);
|
|
28358
|
-
this.delegateController = createDelegateController(this);
|
|
28359
|
-
this.lockController = createLockController();
|
|
28360
|
-
this.triggerController = createTriggerController();
|
|
28361
|
-
this.presented = false;
|
|
28362
|
-
/** @internal */
|
|
28363
|
-
this.hasController = false;
|
|
28364
|
-
/**
|
|
28365
|
-
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
|
28366
|
-
*/
|
|
28367
|
-
this.keyboardClose = true;
|
|
28787
|
+
this.ionChange = createEvent(this, "ionChange", 7);
|
|
28788
|
+
this.isScrolling = false;
|
|
28789
|
+
this.isColumnVisible = false;
|
|
28790
|
+
this.canExitInputMode = true;
|
|
28791
|
+
this.updateValueTextOnScroll = false;
|
|
28792
|
+
this.ariaLabel = null;
|
|
28793
|
+
this.isActive = false;
|
|
28368
28794
|
/**
|
|
28369
|
-
*
|
|
28795
|
+
* If `true`, the user cannot interact with the picker.
|
|
28370
28796
|
*/
|
|
28371
|
-
this.
|
|
28797
|
+
this.disabled = false;
|
|
28372
28798
|
/**
|
|
28373
|
-
*
|
|
28799
|
+
* The color to use from your application's color palette.
|
|
28800
|
+
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
|
28801
|
+
* For more information on colors, see [theming](/docs/theming/basics).
|
|
28374
28802
|
*/
|
|
28375
|
-
this.
|
|
28803
|
+
this.color = 'primary';
|
|
28376
28804
|
/**
|
|
28377
|
-
*
|
|
28378
|
-
|
|
28379
|
-
|
|
28380
|
-
|
|
28381
|
-
*
|
|
28382
|
-
|
|
28383
|
-
|
|
28384
|
-
/**
|
|
28385
|
-
* If `true`, the picker will be dismissed when the backdrop is clicked.
|
|
28386
|
-
*/
|
|
28387
|
-
this.backdropDismiss = true;
|
|
28388
|
-
/**
|
|
28389
|
-
* If `true`, the picker will animate.
|
|
28390
|
-
*/
|
|
28391
|
-
this.animated = true;
|
|
28392
|
-
/**
|
|
28393
|
-
* If `true`, the picker will open. If `false`, the picker will close.
|
|
28394
|
-
* Use this if you need finer grained control over presentation, otherwise
|
|
28395
|
-
* just use the pickerController or the `trigger` property.
|
|
28396
|
-
* Note: `isOpen` will not automatically be set back to `false` when
|
|
28397
|
-
* the picker dismisses. You will need to do that in your code.
|
|
28398
|
-
*/
|
|
28399
|
-
this.isOpen = false;
|
|
28400
|
-
this.onBackdropTap = () => {
|
|
28401
|
-
this.dismiss(undefined, BACKDROP);
|
|
28402
|
-
};
|
|
28403
|
-
this.dispatchCancelHandler = (ev) => {
|
|
28404
|
-
const role = ev.detail.role;
|
|
28405
|
-
if (isCancel(role)) {
|
|
28406
|
-
const cancelButton = this.buttons.find((b) => b.role === 'cancel');
|
|
28407
|
-
this.callButtonHandler(cancelButton);
|
|
28408
|
-
}
|
|
28409
|
-
};
|
|
28410
|
-
}
|
|
28411
|
-
onIsOpenChange(newValue, oldValue) {
|
|
28412
|
-
if (newValue === true && oldValue === false) {
|
|
28413
|
-
this.present();
|
|
28414
|
-
}
|
|
28415
|
-
else if (newValue === false && oldValue === true) {
|
|
28416
|
-
this.dismiss();
|
|
28417
|
-
}
|
|
28418
|
-
}
|
|
28419
|
-
triggerChanged() {
|
|
28420
|
-
const { trigger, el, triggerController } = this;
|
|
28421
|
-
if (trigger) {
|
|
28422
|
-
triggerController.addClickListener(el, trigger);
|
|
28423
|
-
}
|
|
28424
|
-
}
|
|
28425
|
-
connectedCallback() {
|
|
28426
|
-
prepareOverlay(this.el);
|
|
28427
|
-
this.triggerChanged();
|
|
28428
|
-
}
|
|
28429
|
-
disconnectedCallback() {
|
|
28430
|
-
this.triggerController.removeClickListener();
|
|
28431
|
-
}
|
|
28432
|
-
componentWillLoad() {
|
|
28433
|
-
var _a;
|
|
28434
|
-
if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
28435
|
-
setOverlayId(this.el);
|
|
28436
|
-
}
|
|
28437
|
-
}
|
|
28438
|
-
componentDidLoad() {
|
|
28439
|
-
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);
|
|
28440
|
-
/**
|
|
28441
|
-
* If picker was rendered with isOpen="true"
|
|
28442
|
-
* then we should open picker immediately.
|
|
28443
|
-
*/
|
|
28444
|
-
if (this.isOpen === true) {
|
|
28445
|
-
raf(() => this.present());
|
|
28446
|
-
}
|
|
28447
|
-
/**
|
|
28448
|
-
* When binding values in frameworks such as Angular
|
|
28449
|
-
* it is possible for the value to be set after the Web Component
|
|
28450
|
-
* initializes but before the value watcher is set up in Stencil.
|
|
28451
|
-
* As a result, the watcher callback may not be fired.
|
|
28452
|
-
* We work around this by manually calling the watcher
|
|
28453
|
-
* callback when the component has loaded and the watcher
|
|
28454
|
-
* is configured.
|
|
28455
|
-
*/
|
|
28456
|
-
this.triggerChanged();
|
|
28457
|
-
}
|
|
28458
|
-
/**
|
|
28459
|
-
* Present the picker overlay after it has been created.
|
|
28460
|
-
*/
|
|
28461
|
-
async present() {
|
|
28462
|
-
const unlock = await this.lockController.lock();
|
|
28463
|
-
await this.delegateController.attachViewToDom();
|
|
28464
|
-
await present(this, 'pickerEnter', iosEnterAnimation$2, iosEnterAnimation$2, undefined);
|
|
28465
|
-
if (this.duration > 0) {
|
|
28466
|
-
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
|
|
28467
|
-
}
|
|
28468
|
-
unlock();
|
|
28469
|
-
}
|
|
28470
|
-
/**
|
|
28471
|
-
* Dismiss the picker overlay after it has been presented.
|
|
28472
|
-
*
|
|
28473
|
-
* @param data Any data to emit in the dismiss events.
|
|
28474
|
-
* @param role The role of the element that is dismissing the picker.
|
|
28475
|
-
* This can be useful in a button handler for determining which button was
|
|
28476
|
-
* clicked to dismiss the picker.
|
|
28477
|
-
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
28478
|
-
*/
|
|
28479
|
-
async dismiss(data, role) {
|
|
28480
|
-
const unlock = await this.lockController.lock();
|
|
28481
|
-
if (this.durationTimeout) {
|
|
28482
|
-
clearTimeout(this.durationTimeout);
|
|
28483
|
-
}
|
|
28484
|
-
const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation$2, iosLeaveAnimation$2);
|
|
28485
|
-
if (dismissed) {
|
|
28486
|
-
this.delegateController.removeViewFromDom();
|
|
28487
|
-
}
|
|
28488
|
-
unlock();
|
|
28489
|
-
return dismissed;
|
|
28490
|
-
}
|
|
28491
|
-
/**
|
|
28492
|
-
* Returns a promise that resolves when the picker did dismiss.
|
|
28493
|
-
*/
|
|
28494
|
-
onDidDismiss() {
|
|
28495
|
-
return eventMethod(this.el, 'ionPickerDidDismiss');
|
|
28496
|
-
}
|
|
28497
|
-
/**
|
|
28498
|
-
* Returns a promise that resolves when the picker will dismiss.
|
|
28499
|
-
*/
|
|
28500
|
-
onWillDismiss() {
|
|
28501
|
-
return eventMethod(this.el, 'ionPickerWillDismiss');
|
|
28502
|
-
}
|
|
28503
|
-
/**
|
|
28504
|
-
* Get the column that matches the specified name.
|
|
28505
|
-
*
|
|
28506
|
-
* @param name The name of the column.
|
|
28507
|
-
*/
|
|
28508
|
-
getColumn(name) {
|
|
28509
|
-
return Promise.resolve(this.columns.find((column) => column.name === name));
|
|
28510
|
-
}
|
|
28511
|
-
async buttonClick(button) {
|
|
28512
|
-
const role = button.role;
|
|
28513
|
-
if (isCancel(role)) {
|
|
28514
|
-
return this.dismiss(undefined, role);
|
|
28515
|
-
}
|
|
28516
|
-
const shouldDismiss = await this.callButtonHandler(button);
|
|
28517
|
-
if (shouldDismiss) {
|
|
28518
|
-
return this.dismiss(this.getSelected(), button.role);
|
|
28519
|
-
}
|
|
28520
|
-
return Promise.resolve();
|
|
28521
|
-
}
|
|
28522
|
-
async callButtonHandler(button) {
|
|
28523
|
-
if (button) {
|
|
28524
|
-
// a handler has been provided, execute it
|
|
28525
|
-
// pass the handler the values from the inputs
|
|
28526
|
-
const rtn = await safeCall(button.handler, this.getSelected());
|
|
28527
|
-
if (rtn === false) {
|
|
28528
|
-
// if the return value of the handler is false then do not dismiss
|
|
28529
|
-
return false;
|
|
28530
|
-
}
|
|
28531
|
-
}
|
|
28532
|
-
return true;
|
|
28533
|
-
}
|
|
28534
|
-
getSelected() {
|
|
28535
|
-
const selected = {};
|
|
28536
|
-
this.columns.forEach((col, index) => {
|
|
28537
|
-
const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;
|
|
28538
|
-
selected[col.name] = {
|
|
28539
|
-
text: selectedColumn ? selectedColumn.text : undefined,
|
|
28540
|
-
value: selectedColumn ? selectedColumn.value : undefined,
|
|
28541
|
-
columnIndex: index,
|
|
28542
|
-
};
|
|
28543
|
-
});
|
|
28544
|
-
return selected;
|
|
28545
|
-
}
|
|
28546
|
-
render() {
|
|
28547
|
-
const { htmlAttributes } = this;
|
|
28548
|
-
const mode = getIonMode$1(this);
|
|
28549
|
-
return (hAsync(Host, Object.assign({ key: '80f66d33780d8a1352d24be9cb63a0cc03d01ab5', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
28550
|
-
zIndex: `${20000 + this.overlayIndex}`,
|
|
28551
|
-
}, class: Object.assign({ [mode]: true,
|
|
28552
|
-
// Used internally for styling
|
|
28553
|
-
[`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" })));
|
|
28554
|
-
}
|
|
28555
|
-
get el() { return getElement(this); }
|
|
28556
|
-
static get watchers() { return {
|
|
28557
|
-
"isOpen": [{
|
|
28558
|
-
"onIsOpenChange": 0
|
|
28559
|
-
}],
|
|
28560
|
-
"trigger": [{
|
|
28561
|
-
"triggerChanged": 0
|
|
28562
|
-
}]
|
|
28563
|
-
}; }
|
|
28564
|
-
static get style() { return {
|
|
28565
|
-
ios: pickerIosCss(),
|
|
28566
|
-
md: pickerMdCss()
|
|
28567
|
-
}; }
|
|
28568
|
-
static get cmpMeta() { return {
|
|
28569
|
-
"$flags$": 34,
|
|
28570
|
-
"$tagName$": "ion-picker-legacy",
|
|
28571
|
-
"$members$": {
|
|
28572
|
-
"overlayIndex": [2, "overlay-index"],
|
|
28573
|
-
"delegate": [16],
|
|
28574
|
-
"hasController": [4, "has-controller"],
|
|
28575
|
-
"keyboardClose": [4, "keyboard-close"],
|
|
28576
|
-
"enterAnimation": [16],
|
|
28577
|
-
"leaveAnimation": [16],
|
|
28578
|
-
"buttons": [16],
|
|
28579
|
-
"columns": [16],
|
|
28580
|
-
"cssClass": [1, "css-class"],
|
|
28581
|
-
"duration": [2],
|
|
28582
|
-
"showBackdrop": [4, "show-backdrop"],
|
|
28583
|
-
"backdropDismiss": [4, "backdrop-dismiss"],
|
|
28584
|
-
"animated": [4],
|
|
28585
|
-
"htmlAttributes": [16],
|
|
28586
|
-
"isOpen": [4, "is-open"],
|
|
28587
|
-
"trigger": [1],
|
|
28588
|
-
"presented": [32],
|
|
28589
|
-
"present": [64],
|
|
28590
|
-
"dismiss": [64],
|
|
28591
|
-
"onDidDismiss": [64],
|
|
28592
|
-
"onWillDismiss": [64],
|
|
28593
|
-
"getColumn": [64]
|
|
28594
|
-
},
|
|
28595
|
-
"$listeners$": undefined,
|
|
28596
|
-
"$lazyBundleId$": "-",
|
|
28597
|
-
"$attrsToReflect$": []
|
|
28598
|
-
}; }
|
|
28599
|
-
}
|
|
28600
|
-
const buttonWrapperClass = (button) => {
|
|
28601
|
-
return {
|
|
28602
|
-
[`picker-toolbar-${button.role}`]: button.role !== undefined,
|
|
28603
|
-
'picker-toolbar-button': true,
|
|
28604
|
-
};
|
|
28605
|
-
};
|
|
28606
|
-
const buttonClass$1 = (button) => {
|
|
28607
|
-
return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));
|
|
28608
|
-
};
|
|
28609
|
-
|
|
28610
|
-
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)}}`;
|
|
28611
|
-
|
|
28612
|
-
/**
|
|
28613
|
-
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
|
28614
|
-
*
|
|
28615
|
-
* @slot prefix - Content to show on the left side of the picker options.
|
|
28616
|
-
* @slot suffix - Content to show on the right side of the picker options.
|
|
28617
|
-
*/
|
|
28618
|
-
class PickerColumn {
|
|
28619
|
-
constructor(hostRef) {
|
|
28620
|
-
registerInstance(this, hostRef);
|
|
28621
|
-
this.ionChange = createEvent(this, "ionChange", 7);
|
|
28622
|
-
this.isScrolling = false;
|
|
28623
|
-
this.isColumnVisible = false;
|
|
28624
|
-
this.canExitInputMode = true;
|
|
28625
|
-
this.updateValueTextOnScroll = false;
|
|
28626
|
-
this.ariaLabel = null;
|
|
28627
|
-
this.isActive = false;
|
|
28628
|
-
/**
|
|
28629
|
-
* If `true`, the user cannot interact with the picker.
|
|
28630
|
-
*/
|
|
28631
|
-
this.disabled = false;
|
|
28632
|
-
/**
|
|
28633
|
-
* The color to use from your application's color palette.
|
|
28634
|
-
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
|
28635
|
-
* For more information on colors, see [theming](/docs/theming/basics).
|
|
28636
|
-
*/
|
|
28637
|
-
this.color = 'primary';
|
|
28638
|
-
/**
|
|
28639
|
-
* If `true`, tapping the picker will
|
|
28640
|
-
* reveal a number input keyboard that lets
|
|
28641
|
-
* the user type in values for each picker
|
|
28642
|
-
* column. This is useful when working
|
|
28643
|
-
* with time pickers.
|
|
28644
|
-
*
|
|
28645
|
-
* @internal
|
|
28805
|
+
* If `true`, tapping the picker will
|
|
28806
|
+
* reveal a number input keyboard that lets
|
|
28807
|
+
* the user type in values for each picker
|
|
28808
|
+
* column. This is useful when working
|
|
28809
|
+
* with time pickers.
|
|
28810
|
+
*
|
|
28811
|
+
* @internal
|
|
28646
28812
|
*/
|
|
28647
28813
|
this.numericInput = false;
|
|
28648
28814
|
this.centerPickerItemInView = (target, smooth = true, canExitInputMode = true) => {
|
|
@@ -29098,464 +29264,99 @@ class PickerColumn {
|
|
|
29098
29264
|
*/
|
|
29099
29265
|
if (firstOption !== null && firstOption.value !== value) {
|
|
29100
29266
|
this.setValue(firstOption.value);
|
|
29101
|
-
}
|
|
29102
|
-
}
|
|
29103
|
-
}
|
|
29104
|
-
/** @internal */
|
|
29105
|
-
async scrollActiveItemIntoView(smooth = false) {
|
|
29106
|
-
const activeEl = this.activeItem;
|
|
29107
|
-
if (activeEl) {
|
|
29108
|
-
this.centerPickerItemInView(activeEl, smooth, false);
|
|
29109
|
-
}
|
|
29110
|
-
}
|
|
29111
|
-
/**
|
|
29112
|
-
* Sets the value prop and fires the ionChange event.
|
|
29113
|
-
* This is used when we need to fire ionChange from
|
|
29114
|
-
* user-generated events that cannot be caught with normal
|
|
29115
|
-
* input/change event listeners.
|
|
29116
|
-
* @internal
|
|
29117
|
-
*/
|
|
29118
|
-
async setValue(value) {
|
|
29119
|
-
if (this.disabled === true || this.value === value) {
|
|
29120
|
-
return;
|
|
29121
|
-
}
|
|
29122
|
-
this.value = value;
|
|
29123
|
-
this.ionChange.emit({ value });
|
|
29124
|
-
}
|
|
29125
|
-
/**
|
|
29126
|
-
* Sets focus on the scrollable container within the picker column.
|
|
29127
|
-
* Use this method instead of the global `pickerColumn.focus()`.
|
|
29128
|
-
*/
|
|
29129
|
-
async setFocus() {
|
|
29130
|
-
if (this.assistiveFocusable) {
|
|
29131
|
-
this.assistiveFocusable.focus();
|
|
29132
|
-
}
|
|
29133
|
-
}
|
|
29134
|
-
connectedCallback() {
|
|
29135
|
-
var _a;
|
|
29136
|
-
this.ariaLabel = (_a = this.el.getAttribute('aria-label')) !== null && _a !== void 0 ? _a : 'Select a value';
|
|
29137
|
-
}
|
|
29138
|
-
get activeItem() {
|
|
29139
|
-
const { value } = this;
|
|
29140
|
-
const options = Array.from(this.el.querySelectorAll('ion-picker-column-option'));
|
|
29141
|
-
return options.find((option) => {
|
|
29142
|
-
/**
|
|
29143
|
-
* If the whole picker column is disabled, the current value should appear active
|
|
29144
|
-
* If the current value item is specifically disabled, it should not appear active
|
|
29145
|
-
*/
|
|
29146
|
-
if (!this.disabled && option.disabled) {
|
|
29147
|
-
return false;
|
|
29148
|
-
}
|
|
29149
|
-
return option.value === value;
|
|
29150
|
-
});
|
|
29151
|
-
}
|
|
29152
|
-
render() {
|
|
29153
|
-
const { color, disabled, isActive, numericInput } = this;
|
|
29154
|
-
const mode = getIonMode$1(this);
|
|
29155
|
-
return (hAsync(Host, { key: '234c96a501d7ac413b9b0ea56b33017681e25b40', class: createColorClasses$1(color, {
|
|
29156
|
-
[mode]: true,
|
|
29157
|
-
['picker-column-active']: isActive,
|
|
29158
|
-
['picker-column-numeric-input']: numericInput,
|
|
29159
|
-
['picker-column-disabled']: disabled,
|
|
29160
|
-
}) }, hAsync("slot", { key: '9dc15ea0601ddd2cb2e0a745e91e036a8bd96f8b', name: "prefix" }), hAsync("div", { key: 'de4fe28ee4bc46b7c0420d6ab0df0e7809443da9', class: "picker-opts", ref: (el) => {
|
|
29161
|
-
this.scrollEl = el;
|
|
29162
|
-
}, 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" })));
|
|
29163
|
-
}
|
|
29164
|
-
get el() { return getElement(this); }
|
|
29165
|
-
static get watchers() { return {
|
|
29166
|
-
"aria-label": [{
|
|
29167
|
-
"ariaLabelChanged": 0
|
|
29168
|
-
}],
|
|
29169
|
-
"value": [{
|
|
29170
|
-
"valueChange": 0
|
|
29171
|
-
}]
|
|
29172
|
-
}; }
|
|
29173
|
-
static get style() { return pickerColumnCss(); }
|
|
29174
|
-
static get cmpMeta() { return {
|
|
29175
|
-
"$flags$": 265,
|
|
29176
|
-
"$tagName$": "ion-picker-column",
|
|
29177
|
-
"$members$": {
|
|
29178
|
-
"disabled": [4],
|
|
29179
|
-
"value": [1032],
|
|
29180
|
-
"color": [513],
|
|
29181
|
-
"numericInput": [4, "numeric-input"],
|
|
29182
|
-
"ariaLabel": [32],
|
|
29183
|
-
"isActive": [32],
|
|
29184
|
-
"scrollActiveItemIntoView": [64],
|
|
29185
|
-
"setValue": [64],
|
|
29186
|
-
"setFocus": [64]
|
|
29187
|
-
},
|
|
29188
|
-
"$listeners$": undefined,
|
|
29189
|
-
"$lazyBundleId$": "-",
|
|
29190
|
-
"$attrsToReflect$": [["color", "color"]]
|
|
29191
|
-
}; }
|
|
29192
|
-
}
|
|
29193
|
-
const PICKER_ITEM_ACTIVE_CLASS = 'option-active';
|
|
29194
|
-
|
|
29195
|
-
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}}`;
|
|
29196
|
-
|
|
29197
|
-
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)}`;
|
|
29198
|
-
|
|
29199
|
-
/**
|
|
29200
|
-
* @internal
|
|
29201
|
-
*/
|
|
29202
|
-
class PickerColumnCmp {
|
|
29203
|
-
constructor(hostRef) {
|
|
29204
|
-
registerInstance(this, hostRef);
|
|
29205
|
-
this.ionPickerColChange = createEvent(this, "ionPickerColChange", 7);
|
|
29206
|
-
this.optHeight = 0;
|
|
29207
|
-
this.rotateFactor = 0;
|
|
29208
|
-
this.scaleFactor = 1;
|
|
29209
|
-
this.velocity = 0;
|
|
29210
|
-
this.y = 0;
|
|
29211
|
-
this.noAnimate = true;
|
|
29212
|
-
// `colDidChange` is a flag that gets set when the column is changed
|
|
29213
|
-
// dynamically. When this flag is set, the column will refresh
|
|
29214
|
-
// after the component re-renders to incorporate the new column data.
|
|
29215
|
-
// This is necessary because `this.refresh` queries for the option elements,
|
|
29216
|
-
// so it needs to wait for the latest elements to be available in the DOM.
|
|
29217
|
-
// Ex: column is created with 3 options. User updates the column data
|
|
29218
|
-
// to have 5 options. The column will still think it only has 3 options.
|
|
29219
|
-
this.colDidChange = false;
|
|
29220
|
-
}
|
|
29221
|
-
colChanged() {
|
|
29222
|
-
this.colDidChange = true;
|
|
29223
|
-
}
|
|
29224
|
-
async connectedCallback() {
|
|
29225
|
-
let pickerRotateFactor = 0;
|
|
29226
|
-
let pickerScaleFactor = 0.81;
|
|
29227
|
-
const mode = getIonMode$1(this);
|
|
29228
|
-
if (mode === 'ios') {
|
|
29229
|
-
pickerRotateFactor = -0.46;
|
|
29230
|
-
pickerScaleFactor = 1;
|
|
29231
|
-
}
|
|
29232
|
-
this.rotateFactor = pickerRotateFactor;
|
|
29233
|
-
this.scaleFactor = pickerScaleFactor;
|
|
29234
|
-
this.gesture = (await Promise.resolve().then(function () { return index; })).createGesture({
|
|
29235
|
-
el: this.el,
|
|
29236
|
-
gestureName: 'picker-swipe',
|
|
29237
|
-
gesturePriority: 100,
|
|
29238
|
-
threshold: 0,
|
|
29239
|
-
passive: false,
|
|
29240
|
-
onStart: (ev) => this.onStart(ev),
|
|
29241
|
-
onMove: (ev) => this.onMove(ev),
|
|
29242
|
-
onEnd: (ev) => this.onEnd(ev),
|
|
29243
|
-
});
|
|
29244
|
-
this.gesture.enable();
|
|
29245
|
-
// Options have not been initialized yet
|
|
29246
|
-
// Animation must be disabled through the `noAnimate` flag
|
|
29247
|
-
// Otherwise, the options will render
|
|
29248
|
-
// at the top of the column and transition down
|
|
29249
|
-
this.tmrId = setTimeout(() => {
|
|
29250
|
-
this.noAnimate = false;
|
|
29251
|
-
// After initialization, `refresh()` will be called
|
|
29252
|
-
// At this point, animation will be enabled. The options will
|
|
29253
|
-
// animate as they are being selected.
|
|
29254
|
-
this.refresh(true);
|
|
29255
|
-
}, 250);
|
|
29256
|
-
}
|
|
29257
|
-
componentDidLoad() {
|
|
29258
|
-
this.onDomChange();
|
|
29259
|
-
}
|
|
29260
|
-
componentDidUpdate() {
|
|
29261
|
-
// Options may have changed since last update.
|
|
29262
|
-
if (this.colDidChange) {
|
|
29263
|
-
// Animation must be disabled through the `onDomChange` parameter.
|
|
29264
|
-
// Otherwise, the recently added options will render
|
|
29265
|
-
// at the top of the column and transition down
|
|
29266
|
-
this.onDomChange(true, false);
|
|
29267
|
-
this.colDidChange = false;
|
|
29268
|
-
}
|
|
29269
|
-
}
|
|
29270
|
-
disconnectedCallback() {
|
|
29271
|
-
if (this.rafId !== undefined)
|
|
29272
|
-
cancelAnimationFrame(this.rafId);
|
|
29273
|
-
if (this.tmrId)
|
|
29274
|
-
clearTimeout(this.tmrId);
|
|
29275
|
-
if (this.gesture) {
|
|
29276
|
-
this.gesture.destroy();
|
|
29277
|
-
this.gesture = undefined;
|
|
29278
|
-
}
|
|
29279
|
-
}
|
|
29280
|
-
emitColChange() {
|
|
29281
|
-
this.ionPickerColChange.emit(this.col);
|
|
29282
|
-
}
|
|
29283
|
-
setSelected(selectedIndex, duration) {
|
|
29284
|
-
// if there is a selected index, then figure out it's y position
|
|
29285
|
-
// if there isn't a selected index, then just use the top y position
|
|
29286
|
-
const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;
|
|
29287
|
-
this.velocity = 0;
|
|
29288
|
-
// set what y position we're at
|
|
29289
|
-
if (this.rafId !== undefined)
|
|
29290
|
-
cancelAnimationFrame(this.rafId);
|
|
29291
|
-
this.update(y, duration, true);
|
|
29292
|
-
this.emitColChange();
|
|
29293
|
-
}
|
|
29294
|
-
update(y, duration, saveY) {
|
|
29295
|
-
if (!this.optsEl) {
|
|
29296
|
-
return;
|
|
29297
|
-
}
|
|
29298
|
-
// ensure we've got a good round number :)
|
|
29299
|
-
let translateY = 0;
|
|
29300
|
-
let translateZ = 0;
|
|
29301
|
-
const { col, rotateFactor } = this;
|
|
29302
|
-
const prevSelected = col.selectedIndex;
|
|
29303
|
-
const selectedIndex = (col.selectedIndex = this.indexForY(-y));
|
|
29304
|
-
const durationStr = duration === 0 ? '' : duration + 'ms';
|
|
29305
|
-
const scaleStr = `scale(${this.scaleFactor})`;
|
|
29306
|
-
const children = this.optsEl.children;
|
|
29307
|
-
for (let i = 0; i < children.length; i++) {
|
|
29308
|
-
const button = children[i];
|
|
29309
|
-
const opt = col.options[i];
|
|
29310
|
-
const optOffset = i * this.optHeight + y;
|
|
29311
|
-
let transform = '';
|
|
29312
|
-
if (rotateFactor !== 0) {
|
|
29313
|
-
const rotateX = optOffset * rotateFactor;
|
|
29314
|
-
if (Math.abs(rotateX) <= 90) {
|
|
29315
|
-
translateY = 0;
|
|
29316
|
-
translateZ = 90;
|
|
29317
|
-
transform = `rotateX(${rotateX}deg) `;
|
|
29318
|
-
}
|
|
29319
|
-
else {
|
|
29320
|
-
translateY = -9999;
|
|
29321
|
-
}
|
|
29322
|
-
}
|
|
29323
|
-
else {
|
|
29324
|
-
translateZ = 0;
|
|
29325
|
-
translateY = optOffset;
|
|
29326
|
-
}
|
|
29327
|
-
const selected = selectedIndex === i;
|
|
29328
|
-
transform += `translate3d(0px,${translateY}px,${translateZ}px) `;
|
|
29329
|
-
if (this.scaleFactor !== 1 && !selected) {
|
|
29330
|
-
transform += scaleStr;
|
|
29331
|
-
}
|
|
29332
|
-
// Update transition duration
|
|
29333
|
-
if (this.noAnimate) {
|
|
29334
|
-
opt.duration = 0;
|
|
29335
|
-
button.style.transitionDuration = '';
|
|
29336
|
-
}
|
|
29337
|
-
else if (duration !== opt.duration) {
|
|
29338
|
-
opt.duration = duration;
|
|
29339
|
-
button.style.transitionDuration = durationStr;
|
|
29340
|
-
}
|
|
29341
|
-
// Update transform
|
|
29342
|
-
if (transform !== opt.transform) {
|
|
29343
|
-
opt.transform = transform;
|
|
29344
|
-
}
|
|
29345
|
-
button.style.transform = transform;
|
|
29346
|
-
/**
|
|
29347
|
-
* Ensure that the select column
|
|
29348
|
-
* item has the selected class
|
|
29349
|
-
*/
|
|
29350
|
-
opt.selected = selected;
|
|
29351
|
-
if (selected) {
|
|
29352
|
-
button.classList.add(PICKER_OPT_SELECTED);
|
|
29353
|
-
}
|
|
29354
|
-
else {
|
|
29355
|
-
button.classList.remove(PICKER_OPT_SELECTED);
|
|
29356
|
-
}
|
|
29357
|
-
}
|
|
29358
|
-
this.col.prevSelected = prevSelected;
|
|
29359
|
-
if (saveY) {
|
|
29360
|
-
this.y = y;
|
|
29361
|
-
}
|
|
29362
|
-
if (this.lastIndex !== selectedIndex) {
|
|
29363
|
-
// have not set a last index yet
|
|
29364
|
-
hapticSelectionChanged();
|
|
29365
|
-
this.lastIndex = selectedIndex;
|
|
29366
|
-
}
|
|
29367
|
-
}
|
|
29368
|
-
decelerate() {
|
|
29369
|
-
if (this.velocity !== 0) {
|
|
29370
|
-
// still decelerating
|
|
29371
|
-
this.velocity *= DECELERATION_FRICTION;
|
|
29372
|
-
// do not let it go slower than a velocity of 1
|
|
29373
|
-
this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);
|
|
29374
|
-
let y = this.y + this.velocity;
|
|
29375
|
-
if (y > this.minY) {
|
|
29376
|
-
// whoops, it's trying to scroll up farther than the options we have!
|
|
29377
|
-
y = this.minY;
|
|
29378
|
-
this.velocity = 0;
|
|
29379
|
-
}
|
|
29380
|
-
else if (y < this.maxY) {
|
|
29381
|
-
// gahh, it's trying to scroll down farther than we can!
|
|
29382
|
-
y = this.maxY;
|
|
29383
|
-
this.velocity = 0;
|
|
29384
|
-
}
|
|
29385
|
-
this.update(y, 0, true);
|
|
29386
|
-
const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;
|
|
29387
|
-
if (notLockedIn) {
|
|
29388
|
-
// isn't locked in yet, keep decelerating until it is
|
|
29389
|
-
this.rafId = requestAnimationFrame(() => this.decelerate());
|
|
29390
|
-
}
|
|
29391
|
-
else {
|
|
29392
|
-
this.velocity = 0;
|
|
29393
|
-
this.emitColChange();
|
|
29394
|
-
hapticSelectionEnd();
|
|
29395
|
-
}
|
|
29396
|
-
}
|
|
29397
|
-
else if (this.y % this.optHeight !== 0) {
|
|
29398
|
-
// needs to still get locked into a position so options line up
|
|
29399
|
-
const currentPos = Math.abs(this.y % this.optHeight);
|
|
29400
|
-
// create a velocity in the direction it needs to scroll
|
|
29401
|
-
this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;
|
|
29402
|
-
this.decelerate();
|
|
29403
|
-
}
|
|
29404
|
-
}
|
|
29405
|
-
indexForY(y) {
|
|
29406
|
-
return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);
|
|
29407
|
-
}
|
|
29408
|
-
onStart(detail) {
|
|
29409
|
-
// We have to prevent default in order to block scrolling under the picker
|
|
29410
|
-
// but we DO NOT have to stop propagation, since we still want
|
|
29411
|
-
// some "click" events to capture
|
|
29412
|
-
if (detail.event.cancelable) {
|
|
29413
|
-
detail.event.preventDefault();
|
|
29414
|
-
}
|
|
29415
|
-
detail.event.stopPropagation();
|
|
29416
|
-
hapticSelectionStart();
|
|
29417
|
-
// reset everything
|
|
29418
|
-
if (this.rafId !== undefined)
|
|
29419
|
-
cancelAnimationFrame(this.rafId);
|
|
29420
|
-
const options = this.col.options;
|
|
29421
|
-
let minY = options.length - 1;
|
|
29422
|
-
let maxY = 0;
|
|
29423
|
-
for (let i = 0; i < options.length; i++) {
|
|
29424
|
-
if (!options[i].disabled) {
|
|
29425
|
-
minY = Math.min(minY, i);
|
|
29426
|
-
maxY = Math.max(maxY, i);
|
|
29427
|
-
}
|
|
29428
|
-
}
|
|
29429
|
-
this.minY = -(minY * this.optHeight);
|
|
29430
|
-
this.maxY = -(maxY * this.optHeight);
|
|
29431
|
-
}
|
|
29432
|
-
onMove(detail) {
|
|
29433
|
-
if (detail.event.cancelable) {
|
|
29434
|
-
detail.event.preventDefault();
|
|
29435
|
-
}
|
|
29436
|
-
detail.event.stopPropagation();
|
|
29437
|
-
// update the scroll position relative to pointer start position
|
|
29438
|
-
let y = this.y + detail.deltaY;
|
|
29439
|
-
if (y > this.minY) {
|
|
29440
|
-
// scrolling up higher than scroll area
|
|
29441
|
-
y = Math.pow(y, 0.8);
|
|
29442
|
-
this.bounceFrom = y;
|
|
29443
|
-
}
|
|
29444
|
-
else if (y < this.maxY) {
|
|
29445
|
-
// scrolling down below scroll area
|
|
29446
|
-
y += Math.pow(this.maxY - y, 0.9);
|
|
29447
|
-
this.bounceFrom = y;
|
|
29448
|
-
}
|
|
29449
|
-
else {
|
|
29450
|
-
this.bounceFrom = 0;
|
|
29267
|
+
}
|
|
29451
29268
|
}
|
|
29452
|
-
this.update(y, 0, false);
|
|
29453
29269
|
}
|
|
29454
|
-
|
|
29455
|
-
|
|
29456
|
-
|
|
29457
|
-
|
|
29458
|
-
this.
|
|
29459
|
-
return;
|
|
29270
|
+
/** @internal */
|
|
29271
|
+
async scrollActiveItemIntoView(smooth = false) {
|
|
29272
|
+
const activeEl = this.activeItem;
|
|
29273
|
+
if (activeEl) {
|
|
29274
|
+
this.centerPickerItemInView(activeEl, smooth, false);
|
|
29460
29275
|
}
|
|
29461
|
-
|
|
29462
|
-
|
|
29463
|
-
|
|
29464
|
-
|
|
29276
|
+
}
|
|
29277
|
+
/**
|
|
29278
|
+
* Sets the value prop and fires the ionChange event.
|
|
29279
|
+
* This is used when we need to fire ionChange from
|
|
29280
|
+
* user-generated events that cannot be caught with normal
|
|
29281
|
+
* input/change event listeners.
|
|
29282
|
+
* @internal
|
|
29283
|
+
*/
|
|
29284
|
+
async setValue(value) {
|
|
29285
|
+
if (this.disabled === true || this.value === value) {
|
|
29465
29286
|
return;
|
|
29466
29287
|
}
|
|
29467
|
-
this.
|
|
29468
|
-
|
|
29469
|
-
|
|
29470
|
-
|
|
29471
|
-
|
|
29472
|
-
|
|
29473
|
-
|
|
29474
|
-
|
|
29475
|
-
|
|
29476
|
-
|
|
29477
|
-
const isScrollingUp = detail.deltaY > 0;
|
|
29478
|
-
const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;
|
|
29479
|
-
if (isScrollingUp && optHeightFraction > 0.5) {
|
|
29480
|
-
this.velocity = Math.abs(this.velocity) * -1;
|
|
29481
|
-
}
|
|
29482
|
-
else if (!isScrollingUp && optHeightFraction <= 0.5) {
|
|
29483
|
-
this.velocity = Math.abs(this.velocity);
|
|
29484
|
-
}
|
|
29485
|
-
}
|
|
29486
|
-
this.decelerate();
|
|
29288
|
+
this.value = value;
|
|
29289
|
+
this.ionChange.emit({ value });
|
|
29290
|
+
}
|
|
29291
|
+
/**
|
|
29292
|
+
* Sets focus on the scrollable container within the picker column.
|
|
29293
|
+
* Use this method instead of the global `pickerColumn.focus()`.
|
|
29294
|
+
*/
|
|
29295
|
+
async setFocus() {
|
|
29296
|
+
if (this.assistiveFocusable) {
|
|
29297
|
+
this.assistiveFocusable.focus();
|
|
29487
29298
|
}
|
|
29488
29299
|
}
|
|
29489
|
-
|
|
29300
|
+
connectedCallback() {
|
|
29490
29301
|
var _a;
|
|
29491
|
-
|
|
29492
|
-
let max = 0;
|
|
29493
|
-
const options = this.col.options;
|
|
29494
|
-
for (let i = 0; i < options.length; i++) {
|
|
29495
|
-
if (!options[i].disabled) {
|
|
29496
|
-
min = Math.min(min, i);
|
|
29497
|
-
max = Math.max(max, i);
|
|
29498
|
-
}
|
|
29499
|
-
}
|
|
29500
|
-
/**
|
|
29501
|
-
* Only update selected value if column has a
|
|
29502
|
-
* velocity of 0. If it does not, then the
|
|
29503
|
-
* column is animating might land on
|
|
29504
|
-
* a value different than the value at
|
|
29505
|
-
* selectedIndex
|
|
29506
|
-
*/
|
|
29507
|
-
if (this.velocity !== 0) {
|
|
29508
|
-
return;
|
|
29509
|
-
}
|
|
29510
|
-
const selectedIndex = clamp(min, (_a = this.col.selectedIndex) !== null && _a !== void 0 ? _a : 0, max);
|
|
29511
|
-
if (this.col.prevSelected !== selectedIndex || forceRefresh) {
|
|
29512
|
-
const y = selectedIndex * this.optHeight * -1;
|
|
29513
|
-
const duration = animated ? TRANSITION_DURATION : 0;
|
|
29514
|
-
this.velocity = 0;
|
|
29515
|
-
this.update(y, duration, true);
|
|
29516
|
-
}
|
|
29302
|
+
this.ariaLabel = (_a = this.el.getAttribute('aria-label')) !== null && _a !== void 0 ? _a : 'Select a value';
|
|
29517
29303
|
}
|
|
29518
|
-
|
|
29519
|
-
const
|
|
29520
|
-
|
|
29521
|
-
|
|
29522
|
-
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
|
|
29304
|
+
get activeItem() {
|
|
29305
|
+
const { value } = this;
|
|
29306
|
+
const options = Array.from(this.el.querySelectorAll('ion-picker-column-option'));
|
|
29307
|
+
return options.find((option) => {
|
|
29308
|
+
/**
|
|
29309
|
+
* If the whole picker column is disabled, the current value should appear active
|
|
29310
|
+
* If the current value item is specifically disabled, it should not appear active
|
|
29311
|
+
*/
|
|
29312
|
+
if (!this.disabled && option.disabled) {
|
|
29313
|
+
return false;
|
|
29314
|
+
}
|
|
29315
|
+
return option.value === value;
|
|
29316
|
+
});
|
|
29526
29317
|
}
|
|
29527
29318
|
render() {
|
|
29528
|
-
const
|
|
29319
|
+
const { color, disabled, isActive, numericInput } = this;
|
|
29529
29320
|
const mode = getIonMode$1(this);
|
|
29530
|
-
return (hAsync(Host, { key: '
|
|
29531
|
-
|
|
29532
|
-
|
|
29321
|
+
return (hAsync(Host, { key: '234c96a501d7ac413b9b0ea56b33017681e25b40', class: createColorClasses$1(color, {
|
|
29322
|
+
[mode]: true,
|
|
29323
|
+
['picker-column-active']: isActive,
|
|
29324
|
+
['picker-column-numeric-input']: numericInput,
|
|
29325
|
+
['picker-column-disabled']: disabled,
|
|
29326
|
+
}) }, hAsync("slot", { key: '9dc15ea0601ddd2cb2e0a745e91e036a8bd96f8b', name: "prefix" }), hAsync("div", { key: 'de4fe28ee4bc46b7c0420d6ab0df0e7809443da9', class: "picker-opts", ref: (el) => {
|
|
29327
|
+
this.scrollEl = el;
|
|
29328
|
+
}, 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" })));
|
|
29533
29329
|
}
|
|
29534
29330
|
get el() { return getElement(this); }
|
|
29535
29331
|
static get watchers() { return {
|
|
29536
|
-
"
|
|
29537
|
-
"
|
|
29332
|
+
"aria-label": [{
|
|
29333
|
+
"ariaLabelChanged": 0
|
|
29334
|
+
}],
|
|
29335
|
+
"value": [{
|
|
29336
|
+
"valueChange": 0
|
|
29538
29337
|
}]
|
|
29539
29338
|
}; }
|
|
29540
|
-
static get style() { return
|
|
29541
|
-
ios: pickerColumnIosCss(),
|
|
29542
|
-
md: pickerColumnMdCss()
|
|
29543
|
-
}; }
|
|
29339
|
+
static get style() { return pickerColumnCss(); }
|
|
29544
29340
|
static get cmpMeta() { return {
|
|
29545
|
-
"$flags$":
|
|
29546
|
-
"$tagName$": "ion-picker-
|
|
29341
|
+
"$flags$": 265,
|
|
29342
|
+
"$tagName$": "ion-picker-column",
|
|
29547
29343
|
"$members$": {
|
|
29548
|
-
"
|
|
29344
|
+
"disabled": [4],
|
|
29345
|
+
"value": [1032],
|
|
29346
|
+
"color": [513],
|
|
29347
|
+
"numericInput": [4, "numeric-input"],
|
|
29348
|
+
"ariaLabel": [32],
|
|
29349
|
+
"isActive": [32],
|
|
29350
|
+
"scrollActiveItemIntoView": [64],
|
|
29351
|
+
"setValue": [64],
|
|
29352
|
+
"setFocus": [64]
|
|
29549
29353
|
},
|
|
29550
29354
|
"$listeners$": undefined,
|
|
29551
29355
|
"$lazyBundleId$": "-",
|
|
29552
|
-
"$attrsToReflect$": []
|
|
29356
|
+
"$attrsToReflect$": [["color", "color"]]
|
|
29553
29357
|
}; }
|
|
29554
29358
|
}
|
|
29555
|
-
const
|
|
29556
|
-
const DECELERATION_FRICTION = 0.97;
|
|
29557
|
-
const MAX_PICKER_SPEED = 90;
|
|
29558
|
-
const TRANSITION_DURATION = 150;
|
|
29359
|
+
const PICKER_ITEM_ACTIVE_CLASS = 'option-active';
|
|
29559
29360
|
|
|
29560
29361
|
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}`;
|
|
29561
29362
|
|
|
@@ -30752,9 +30553,9 @@ const mdLeaveAnimation$1 = (baseEl) => {
|
|
|
30752
30553
|
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
30753
30554
|
};
|
|
30754
30555
|
|
|
30755
|
-
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)}}`;
|
|
30556
|
+
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(.select-popover-rich-content){--width:clamp(250px, calc(100vw - 40px), 400px)}: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)}}`;
|
|
30756
30557
|
|
|
30757
|
-
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}`;
|
|
30558
|
+
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(.select-popover-rich-content){--width:clamp(250px, calc(100vw - 40px), 400px)}: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}`;
|
|
30758
30559
|
|
|
30759
30560
|
// TODO(FW-2832): types
|
|
30760
30561
|
/**
|
|
@@ -30978,6 +30779,10 @@ class Popover {
|
|
|
30978
30779
|
this.headerResizeObserver.disconnect();
|
|
30979
30780
|
this.headerResizeObserver = undefined;
|
|
30980
30781
|
}
|
|
30782
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
30783
|
+
if (this.presented) {
|
|
30784
|
+
cleanupRootFocusTrapAccessibility();
|
|
30785
|
+
}
|
|
30981
30786
|
}
|
|
30982
30787
|
componentWillLoad() {
|
|
30983
30788
|
var _a, _b;
|
|
@@ -31216,9 +31021,9 @@ class Popover {
|
|
|
31216
31021
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
31217
31022
|
const desktop = isPlatform('desktop');
|
|
31218
31023
|
const enableArrow = arrow && !parentPopover;
|
|
31219
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
31024
|
+
return (hAsync(Host, Object.assign({ key: 'd7f3aa2c2fa93a93585e3eda9e4a6d0daaa541be', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
31220
31025
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
31221
|
-
}, 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: '
|
|
31026
|
+
}, 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: 'b87be2ef14219997b9c47dcbaf904eb770d0e057', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: 'e6243572faf1b871ae2b34923410b2a6638469f0', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && hAsync("div", { key: '3d4938c9d0764a644398e0e7a4361106da1bd926', class: "popover-arrow", part: "arrow" }), hAsync("div", { key: '24ad6d777828aad2881d56595693e6022fc9cb8e', class: "popover-content", part: "content" }, hAsync("slot", { key: '79f83df74a5c5e3dd7650f15c1aa50795b90a345' })))));
|
|
31222
31027
|
}
|
|
31223
31028
|
get el() { return getElement(this); }
|
|
31224
31029
|
static get watchers() { return {
|
|
@@ -31329,7 +31134,7 @@ class ProgressBar {
|
|
|
31329
31134
|
const mode = getIonMode$1(this);
|
|
31330
31135
|
// If the progress is displayed as a solid bar.
|
|
31331
31136
|
const progressSolid = buffer === 1;
|
|
31332
|
-
return (hAsync(Host, { key: '
|
|
31137
|
+
return (hAsync(Host, { key: 'd7476268ce53b6a4f425b7bc9f01d6935eb411c3', role: "progressbar", "aria-valuenow": type === 'determinate' ? value : null, "aria-valuemin": "0", "aria-valuemax": "1", class: createColorClasses$1(color, {
|
|
31333
31138
|
[mode]: true,
|
|
31334
31139
|
[`progress-bar-${type}`]: true,
|
|
31335
31140
|
'progress-paused': paused,
|
|
@@ -31514,7 +31319,7 @@ class Radio {
|
|
|
31514
31319
|
const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex, alignment } = this;
|
|
31515
31320
|
const mode = getIonMode$1(this);
|
|
31516
31321
|
const inItem = hostContext('ion-item', el);
|
|
31517
|
-
return (hAsync(Host, { key: '
|
|
31322
|
+
return (hAsync(Host, { key: 'd9425b252ed38086420d91d5c680421d121c99f4', onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses$1(color, {
|
|
31518
31323
|
[mode]: true,
|
|
31519
31324
|
'in-item': inItem,
|
|
31520
31325
|
'radio-checked': checked,
|
|
@@ -31525,10 +31330,10 @@ class Radio {
|
|
|
31525
31330
|
// Focus and active styling should not apply when the radio is in an item
|
|
31526
31331
|
'ion-activatable': !inItem,
|
|
31527
31332
|
'ion-focusable': !inItem,
|
|
31528
|
-
}), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, hAsync("label", { key: '
|
|
31333
|
+
}), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, hAsync("label", { key: 'de391fca2aa0b681af5c1d089121596c46e68271', class: "radio-wrapper" }, hAsync("div", { key: '44e4c71645f86a9e73ad58c0e8b41c0558b920f6', class: {
|
|
31529
31334
|
'label-text-wrapper': true,
|
|
31530
31335
|
'label-text-wrapper-hidden': !hasLabel,
|
|
31531
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
31336
|
+
}, part: "label" }, hAsync("slot", { key: '589d7c1b45a1918b5811663daa8f30788e7729f8' })), hAsync("div", { key: '0f61a17b195582d6c9a0c597cd40e6629256e479', class: "native-wrapper" }, this.renderRadioControl()))));
|
|
31532
31337
|
}
|
|
31533
31338
|
get el() { return getElement(this); }
|
|
31534
31339
|
static get watchers() { return {
|
|
@@ -31547,7 +31352,7 @@ class Radio {
|
|
|
31547
31352
|
"color": [513],
|
|
31548
31353
|
"name": [1],
|
|
31549
31354
|
"disabled": [4],
|
|
31550
|
-
"value": [
|
|
31355
|
+
"value": [520],
|
|
31551
31356
|
"labelPlacement": [1, "label-placement"],
|
|
31552
31357
|
"justify": [1],
|
|
31553
31358
|
"alignment": [1],
|
|
@@ -31558,7 +31363,7 @@ class Radio {
|
|
|
31558
31363
|
},
|
|
31559
31364
|
"$listeners$": undefined,
|
|
31560
31365
|
"$lazyBundleId$": "-",
|
|
31561
|
-
"$attrsToReflect$": [["color", "color"]]
|
|
31366
|
+
"$attrsToReflect$": [["color", "color"], ["value", "value"]]
|
|
31562
31367
|
}; }
|
|
31563
31368
|
}
|
|
31564
31369
|
let radioButtonIds = 0;
|
|
@@ -32623,7 +32428,7 @@ class Range {
|
|
|
32623
32428
|
const valueAtMin = dualKnobs ? this.valA === min || this.valB === min : this.valA === min;
|
|
32624
32429
|
const valueAtMax = dualKnobs ? this.valA === max || this.valB === max : this.valA === max;
|
|
32625
32430
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
32626
|
-
return (hAsync(Host, { key: '
|
|
32431
|
+
return (hAsync(Host, { key: 'cd26f0187c0d37c7eb9df923f75c8a0f57c19ab6', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses$1(this.color, {
|
|
32627
32432
|
[mode]: true,
|
|
32628
32433
|
'in-item': inItem,
|
|
32629
32434
|
'range-disabled': disabled,
|
|
@@ -32637,10 +32442,10 @@ class Range {
|
|
|
32637
32442
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
32638
32443
|
'range-value-min': valueAtMin,
|
|
32639
32444
|
'range-value-max': valueAtMax,
|
|
32640
|
-
}) }, hAsync("label", { key: '
|
|
32445
|
+
}) }, hAsync("label", { key: '90224fd24b0e625a17e7972feff73a0ac31e093d', class: "range-wrapper", id: "range-label" }, hAsync("div", { key: 'e07b9fa10983249c425eec26b741f0f628daf2b2', class: {
|
|
32641
32446
|
'label-text-wrapper': true,
|
|
32642
32447
|
'label-text-wrapper-hidden': !hasLabel,
|
|
32643
|
-
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '
|
|
32448
|
+
}, part: "label" }, label !== undefined ? hAsync("div", { class: "label-text" }, label) : hAsync("slot", { name: "label" })), hAsync("div", { key: '9e252f1190838fbae46e724bf665f9b1943600a4', class: "native-wrapper" }, hAsync("slot", { key: '950697dd9636da340de659812daa91fff50e5345', name: "start" }), this.renderRangeSlider(), hAsync("slot", { key: 'd3fce46b29db275af71e6149e725967839ec12b0', name: "end" })))));
|
|
32644
32449
|
}
|
|
32645
32450
|
get el() { return getElement(this); }
|
|
32646
32451
|
static get watchers() { return {
|
|
@@ -33711,7 +33516,7 @@ class Refresher {
|
|
|
33711
33516
|
}
|
|
33712
33517
|
render() {
|
|
33713
33518
|
const mode = getIonMode$1(this);
|
|
33714
|
-
return (hAsync(Host, { key: '
|
|
33519
|
+
return (hAsync(Host, { key: '1dd475095f76491206644828cf89fc6d2ec276d1', slot: "fixed", class: {
|
|
33715
33520
|
[mode]: true,
|
|
33716
33521
|
// Used internally for styling
|
|
33717
33522
|
[`refresher-${mode}`]: true,
|
|
@@ -33937,7 +33742,7 @@ class RefresherContent {
|
|
|
33937
33742
|
const pullingIcon = this.pullingIcon;
|
|
33938
33743
|
const hasSpinner = pullingIcon != null && SPINNERS[pullingIcon] !== undefined;
|
|
33939
33744
|
const mode = getIonMode$1(this);
|
|
33940
|
-
return (hAsync(Host, { key: '
|
|
33745
|
+
return (hAsync(Host, { key: 'ec378d6a302be697c12c4f973a57c6ad2ada070f', class: mode }, hAsync("div", { key: '0055f98f8c5a1ed7979dc8146ec1f82a575860c7', class: "refresher-pulling" }, this.pullingIcon && hasSpinner && (hAsync("div", { key: '4f88468e26370df6889e72aa54ebb395ebf3757d', class: "refresher-pulling-icon" }, hAsync("div", { key: '05b3f8679576aaa6c2d84d60df6629a392df29e2', class: "spinner-arrow-container" }, hAsync("ion-spinner", { key: '0bf6ceea416ce1140c0f10a5bede063cae7054f4', name: this.pullingIcon, paused: true }), mode === 'md' && this.pullingIcon === 'circular' && (hAsync("div", { key: 'b71ede8455837968218edae28504e5e14bbc1f5c', class: "arrow-container" }, hAsync("ion-icon", { key: '30b808288d23d3eac681b1225cd8392fdacfefe1', icon: caretBackSharp, "aria-hidden": "true" })))))), this.pullingIcon && !hasSpinner && (hAsync("div", { key: 'fee1ae7e57ef8a02f5654808dff9dca3002b6702', class: "refresher-pulling-icon" }, hAsync("ion-icon", { key: '55b34a98028adb497fbc2ac66bdb3d5ae5b1705b', icon: this.pullingIcon, lazy: false, "aria-hidden": "true" }))), this.pullingText !== undefined && this.renderPullingText()), hAsync("div", { key: 'ef8f987daa8060cb6f8fd83c0864095042b9eecf', class: "refresher-refreshing" }, this.refreshingSpinner && (hAsync("div", { key: 'cd6fe0e81b34eeae11478fcc8a42044bff6f7a52', class: "refresher-refreshing-icon" }, hAsync("ion-spinner", { key: '9cd778229582b538d54589c4d8e4d470efb64aad', name: this.refreshingSpinner }))), this.refreshingText !== undefined && this.renderRefreshingText())));
|
|
33941
33746
|
}
|
|
33942
33747
|
get el() { return getElement(this); }
|
|
33943
33748
|
static get cmpMeta() { return {
|
|
@@ -33978,7 +33783,7 @@ class Reorder {
|
|
|
33978
33783
|
render() {
|
|
33979
33784
|
const mode = getIonMode$1(this);
|
|
33980
33785
|
const reorderIcon = mode === 'ios' ? reorderThreeOutline : reorderTwoSharp;
|
|
33981
|
-
return (hAsync(Host, { key: '
|
|
33786
|
+
return (hAsync(Host, { key: '4d35db30b5b3df2020d2212abb3cfac94f9bc2b8', class: mode }, hAsync("slot", { key: '68a565ae4a47f6a9f5d6ba845b596fdfa629ece8' }, hAsync("ion-icon", { key: '168fb0f8eb9c02329274488900fcdb05d44cb895', icon: reorderIcon, lazy: false, class: "reorder-icon", part: "icon", "aria-hidden": "true" }))));
|
|
33982
33787
|
}
|
|
33983
33788
|
get el() { return getElement(this); }
|
|
33984
33789
|
static get style() { return {
|
|
@@ -34249,7 +34054,7 @@ class ReorderGroup {
|
|
|
34249
34054
|
}
|
|
34250
34055
|
render() {
|
|
34251
34056
|
const mode = getIonMode$1(this);
|
|
34252
|
-
return (hAsync(Host, { key: '
|
|
34057
|
+
return (hAsync(Host, { key: '3afdc6a6c81bba2f88ea523d4b73c6fccff1b9ec', class: {
|
|
34253
34058
|
[mode]: true,
|
|
34254
34059
|
'reorder-enabled': !this.disabled,
|
|
34255
34060
|
'reorder-list-active': this.state !== 0 /* ReorderGroupState.Idle */,
|
|
@@ -34367,7 +34172,7 @@ class RippleEffect {
|
|
|
34367
34172
|
}
|
|
34368
34173
|
render() {
|
|
34369
34174
|
const mode = getIonMode$1(this);
|
|
34370
|
-
return (hAsync(Host, { key: '
|
|
34175
|
+
return (hAsync(Host, { key: '5e88b5225414e29883256c86f111ded5bdf2ef91', role: "presentation", class: {
|
|
34371
34176
|
[mode]: true,
|
|
34372
34177
|
unbounded: this.unbounded,
|
|
34373
34178
|
} }));
|
|
@@ -35501,10 +35306,10 @@ class RouterLink {
|
|
|
35501
35306
|
rel: this.rel,
|
|
35502
35307
|
target: this.target,
|
|
35503
35308
|
};
|
|
35504
|
-
return (hAsync(Host, { key: '
|
|
35309
|
+
return (hAsync(Host, { key: '6d5fdfa0dcf1eb216173bcc53f1f4d625f3ec551', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
35505
35310
|
[mode]: true,
|
|
35506
35311
|
'ion-activatable': true,
|
|
35507
|
-
}) }, hAsync("a", Object.assign({ key: '
|
|
35312
|
+
}) }, hAsync("a", Object.assign({ key: '85796b7b48581fe9830ba1102dad7d1069de4e17' }, attrs), hAsync("slot", { key: '0f93b0da3ec4ae8f50f624f9e7bed87d13d712d0' }))));
|
|
35508
35313
|
}
|
|
35509
35314
|
static get style() { return routerLinkCss(); }
|
|
35510
35315
|
static get cmpMeta() { return {
|
|
@@ -35543,10 +35348,11 @@ class RouterOutlet {
|
|
|
35543
35348
|
*/
|
|
35544
35349
|
this.animated = true;
|
|
35545
35350
|
}
|
|
35351
|
+
swipeGestureChanged() {
|
|
35352
|
+
this.updateGestureEnabled();
|
|
35353
|
+
}
|
|
35546
35354
|
swipeHandlerChanged() {
|
|
35547
|
-
|
|
35548
|
-
this.gesture.enable(this.swipeHandler !== undefined);
|
|
35549
|
-
}
|
|
35355
|
+
this.updateGestureEnabled();
|
|
35550
35356
|
}
|
|
35551
35357
|
async connectedCallback() {
|
|
35552
35358
|
const onStart = () => {
|
|
@@ -35586,11 +35392,21 @@ class RouterOutlet {
|
|
|
35586
35392
|
this.gestureOrAnimationInProgress = false;
|
|
35587
35393
|
}
|
|
35588
35394
|
});
|
|
35589
|
-
this.
|
|
35395
|
+
if (this.swipeGesture === undefined) {
|
|
35396
|
+
this.swipeGesture = config.getBoolean('swipeBackEnabled', this.mode === 'ios');
|
|
35397
|
+
}
|
|
35398
|
+
else {
|
|
35399
|
+
this.updateGestureEnabled();
|
|
35400
|
+
}
|
|
35590
35401
|
}
|
|
35591
35402
|
componentWillLoad() {
|
|
35592
35403
|
this.ionNavWillLoad.emit();
|
|
35593
35404
|
}
|
|
35405
|
+
updateGestureEnabled() {
|
|
35406
|
+
if (this.gesture) {
|
|
35407
|
+
this.gesture.enable(this.swipeHandler !== undefined && this.swipeGesture === true);
|
|
35408
|
+
}
|
|
35409
|
+
}
|
|
35594
35410
|
disconnectedCallback() {
|
|
35595
35411
|
if (this.gesture) {
|
|
35596
35412
|
this.gesture.destroy();
|
|
@@ -35701,10 +35517,13 @@ class RouterOutlet {
|
|
|
35701
35517
|
return true;
|
|
35702
35518
|
}
|
|
35703
35519
|
render() {
|
|
35704
|
-
return hAsync("slot", { key: '
|
|
35520
|
+
return hAsync("slot", { key: 'ce09e6fbba7b0a2276cdde5245bb37c9a162c1c7' });
|
|
35705
35521
|
}
|
|
35706
35522
|
get el() { return getElement(this); }
|
|
35707
35523
|
static get watchers() { return {
|
|
35524
|
+
"swipeGesture": [{
|
|
35525
|
+
"swipeGestureChanged": 0
|
|
35526
|
+
}],
|
|
35708
35527
|
"swipeHandler": [{
|
|
35709
35528
|
"swipeHandlerChanged": 0
|
|
35710
35529
|
}]
|
|
@@ -35718,6 +35537,7 @@ class RouterOutlet {
|
|
|
35718
35537
|
"delegate": [16],
|
|
35719
35538
|
"animated": [4],
|
|
35720
35539
|
"animation": [16],
|
|
35540
|
+
"swipeGesture": [1028, "swipe-gesture"],
|
|
35721
35541
|
"swipeHandler": [16],
|
|
35722
35542
|
"commit": [64],
|
|
35723
35543
|
"setRouteId": [64],
|
|
@@ -35736,7 +35556,7 @@ class Row {
|
|
|
35736
35556
|
registerInstance(this, hostRef);
|
|
35737
35557
|
}
|
|
35738
35558
|
render() {
|
|
35739
|
-
return (hAsync(Host, { key: '
|
|
35559
|
+
return (hAsync(Host, { key: 'a9066661fff12baaf3e80b2e8c08591af72fe5b8', class: getIonMode$1(this) }, hAsync("slot", { key: '62b103af46d3a5ec9c146019ae300b68a4ae867a' })));
|
|
35740
35560
|
}
|
|
35741
35561
|
static get style() { return rowCss(); }
|
|
35742
35562
|
static get cmpMeta() { return {
|
|
@@ -35788,7 +35608,7 @@ class Searchbar {
|
|
|
35788
35608
|
/**
|
|
35789
35609
|
* Set the input's autocorrect property.
|
|
35790
35610
|
*/
|
|
35791
|
-
this.autocorrect =
|
|
35611
|
+
this.autocorrect = false;
|
|
35792
35612
|
/**
|
|
35793
35613
|
* Set the cancel button icon. Only applies to `md` mode.
|
|
35794
35614
|
* Defaults to `arrow-back-sharp`.
|
|
@@ -36209,8 +36029,8 @@ class Searchbar {
|
|
|
36209
36029
|
const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
|
|
36210
36030
|
const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
|
|
36211
36031
|
const shouldShowCancelButton = this.shouldShowCancelButton();
|
|
36212
|
-
const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '
|
|
36213
|
-
return (hAsync(Host, { key: '
|
|
36032
|
+
const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '73964da43dbd099fc7f3d30cbc4da11087701ac5', "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: '27335a0e35f6c253c074685fa0b088404927bcbb', "aria-hidden": "true" }, mode === 'md' ? (hAsync("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
|
|
36033
|
+
return (hAsync(Host, { key: '1b4f6c4e7dffb02e092f0026ce3875822d98a631', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses$1(this.color, {
|
|
36214
36034
|
[mode]: true,
|
|
36215
36035
|
'searchbar-animated': animated,
|
|
36216
36036
|
'searchbar-disabled': this.disabled,
|
|
@@ -36220,14 +36040,14 @@ class Searchbar {
|
|
|
36220
36040
|
'searchbar-has-focus': this.focused,
|
|
36221
36041
|
'searchbar-should-show-clear': this.shouldShowClearButton(),
|
|
36222
36042
|
'searchbar-should-show-cancel': this.shouldShowCancelButton(),
|
|
36223
|
-
}) }, hAsync("div", { key: '
|
|
36043
|
+
}) }, hAsync("div", { key: '587e1950e329cfb9d3658be5b2a6491e7af9321a', class: "searchbar-input-container" }, hAsync("input", Object.assign({ key: '7f78a3d22cce03af277a538b4d9f85faddf1fa80', "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 ? 'on' : 'off', spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, hAsync("ion-icon", { key: '9fd3e458978b64e9e3358bcbb26471753f6ff2a6', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), hAsync("button", { key: 'c7864c85923668dfa25f5fc4a70c7dbf6da191b7', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
|
|
36224
36044
|
/**
|
|
36225
36045
|
* This prevents mobile browsers from
|
|
36226
36046
|
* blurring the input when the clear
|
|
36227
36047
|
* button is activated.
|
|
36228
36048
|
*/
|
|
36229
36049
|
ev.preventDefault();
|
|
36230
|
-
}, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: '
|
|
36050
|
+
}, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: '47e7a15c6c6d4df4c54c62b042842e499627da05', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
|
|
36231
36051
|
}
|
|
36232
36052
|
get el() { return getElement(this); }
|
|
36233
36053
|
static get watchers() { return {
|
|
@@ -36259,7 +36079,7 @@ class Searchbar {
|
|
|
36259
36079
|
"animated": [4],
|
|
36260
36080
|
"autocapitalize": [1],
|
|
36261
36081
|
"autocomplete": [1],
|
|
36262
|
-
"autocorrect": [
|
|
36082
|
+
"autocorrect": [4],
|
|
36263
36083
|
"cancelButtonIcon": [1, "cancel-button-icon"],
|
|
36264
36084
|
"cancelButtonText": [1, "cancel-button-text"],
|
|
36265
36085
|
"clearIcon": [1, "clear-icon"],
|
|
@@ -36836,14 +36656,14 @@ class Segment {
|
|
|
36836
36656
|
}
|
|
36837
36657
|
render() {
|
|
36838
36658
|
const mode = getIonMode$1(this);
|
|
36839
|
-
return (hAsync(Host, { key: '
|
|
36659
|
+
return (hAsync(Host, { key: 'bb626072e73f09c3433e1a769e09789a00822d8f', role: "tablist", onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
36840
36660
|
[mode]: true,
|
|
36841
36661
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
36842
36662
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
36843
36663
|
'segment-activated': this.activated,
|
|
36844
36664
|
'segment-disabled': this.disabled,
|
|
36845
36665
|
'segment-scrollable': this.scrollable,
|
|
36846
|
-
}) }, hAsync("slot", { key: '
|
|
36666
|
+
}) }, hAsync("slot", { key: '652d5037c2c2dee4d47a5710b1d150e691202d25', onSlotchange: this.onSlottedItemsChange })));
|
|
36847
36667
|
}
|
|
36848
36668
|
get el() { return getElement(this); }
|
|
36849
36669
|
static get watchers() { return {
|
|
@@ -36991,7 +36811,7 @@ class SegmentButton {
|
|
|
36991
36811
|
const { checked, type, disabled, hasIcon, hasLabel, layout, segmentEl } = this;
|
|
36992
36812
|
const mode = getIonMode$1(this);
|
|
36993
36813
|
const hasSegmentColor = () => (segmentEl === null || segmentEl === void 0 ? void 0 : segmentEl.color) !== undefined;
|
|
36994
|
-
return (hAsync(Host, { key: '
|
|
36814
|
+
return (hAsync(Host, { key: '792f621c36260b1fceff2b4ec4fa95d98d51d46b', class: {
|
|
36995
36815
|
[mode]: true,
|
|
36996
36816
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
36997
36817
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
@@ -37007,7 +36827,7 @@ class SegmentButton {
|
|
|
37007
36827
|
'ion-activatable': true,
|
|
37008
36828
|
'ion-activatable-instant': true,
|
|
37009
36829
|
'ion-focusable': true,
|
|
37010
|
-
} }, hAsync("button", Object.assign({ key: '
|
|
36830
|
+
} }, hAsync("button", Object.assign({ key: '860698be6ceb8f08c0ce3d16ba82d4bb56adf030', "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: 'e903a2642ff46797878a941887b5c596d52fd3a3', class: "button-inner" }, hAsync("slot", { key: '5fc6b842ecb7f0ab8df23b344bf6714f38dda89a' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '710aaf6e4fa2b6cb15897a883e88dec17ef3829f' })), hAsync("div", { key: 'a7b036cba32420e9eb3f2d16487df0519ecc5289', part: "indicator", class: "segment-button-indicator segment-button-indicator-animated" }, hAsync("div", { key: 'a0a5f49ea7f2ecab8014f4f9ca473a27db8348b6', part: "indicator-background", class: "segment-button-indicator-background" }))));
|
|
37011
36831
|
}
|
|
37012
36832
|
get el() { return getElement(this); }
|
|
37013
36833
|
static get watchers() { return {
|
|
@@ -37044,7 +36864,7 @@ class SegmentContent {
|
|
|
37044
36864
|
registerInstance(this, hostRef);
|
|
37045
36865
|
}
|
|
37046
36866
|
render() {
|
|
37047
|
-
return (hAsync(Host, { key: '
|
|
36867
|
+
return (hAsync(Host, { key: 'ef39f29c444177c3b083cd35680ba891e4bb6a2a' }, hAsync("slot", { key: '51f9dd9ca084ddd928b376aa9d716509669c32b2' })));
|
|
37048
36868
|
}
|
|
37049
36869
|
static get style() { return segmentContentCss(); }
|
|
37050
36870
|
static get cmpMeta() { return {
|
|
@@ -37163,11 +36983,11 @@ class SegmentView {
|
|
|
37163
36983
|
}
|
|
37164
36984
|
render() {
|
|
37165
36985
|
const { disabled, isManualScroll, swipeGesture } = this;
|
|
37166
|
-
return (hAsync(Host, { key: '
|
|
36986
|
+
return (hAsync(Host, { key: 'a6c6ac0232c4bb6f2a954b3de7993019d71f423a', class: {
|
|
37167
36987
|
'segment-view-disabled': disabled,
|
|
37168
36988
|
'segment-view-scroll-disabled': isManualScroll === false,
|
|
37169
36989
|
'segment-view-swipe-disabled': swipeGesture === false,
|
|
37170
|
-
} }, hAsync("slot", { key: '
|
|
36990
|
+
} }, hAsync("slot", { key: '386305be2a75069c79def12005d9f6b49276763f' })));
|
|
37171
36991
|
}
|
|
37172
36992
|
get el() { return getElement(this); }
|
|
37173
36993
|
static get style() { return {
|
|
@@ -37189,9 +37009,9 @@ class SegmentView {
|
|
|
37189
37009
|
}; }
|
|
37190
37010
|
}
|
|
37191
37011
|
|
|
37192
|
-
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}`;
|
|
37012
|
+
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);--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{--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}`;
|
|
37193
37013
|
|
|
37194
|
-
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}`;
|
|
37014
|
+
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}`;
|
|
37195
37015
|
|
|
37196
37016
|
// TODO(FW-2832): types
|
|
37197
37017
|
/**
|
|
@@ -37226,6 +37046,7 @@ class Select {
|
|
|
37226
37046
|
this.helperTextId = `${this.inputId}-helper-text`;
|
|
37227
37047
|
this.errorTextId = `${this.inputId}-error-text`;
|
|
37228
37048
|
this.inheritedAttributes = {};
|
|
37049
|
+
this.customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
37229
37050
|
this.isExpanded = false;
|
|
37230
37051
|
/**
|
|
37231
37052
|
* The `hasFocus` state ensures the focus class is
|
|
@@ -37351,9 +37172,40 @@ class Select {
|
|
|
37351
37172
|
this.emitStyle();
|
|
37352
37173
|
}
|
|
37353
37174
|
setValue(value) {
|
|
37175
|
+
if (this.isValueEqual(this.value, value)) {
|
|
37176
|
+
return;
|
|
37177
|
+
}
|
|
37354
37178
|
this.value = value;
|
|
37355
37179
|
this.ionChange.emit({ value });
|
|
37356
37180
|
}
|
|
37181
|
+
isValueEqual(currentValue, newValue) {
|
|
37182
|
+
if (this.multiple) {
|
|
37183
|
+
const currentArr = Array.isArray(currentValue) ? currentValue : [];
|
|
37184
|
+
const newArr = Array.isArray(newValue) ? newValue : [];
|
|
37185
|
+
if (currentArr.length !== newArr.length) {
|
|
37186
|
+
return false;
|
|
37187
|
+
}
|
|
37188
|
+
// Multiset compare: each new value must match a distinct current value.
|
|
37189
|
+
// A plain `every(isOptionSelected)` would accept ['a','a'] as equal to
|
|
37190
|
+
// ['a','b'] when both 'a' and 'b' map to options whose values overlap.
|
|
37191
|
+
const remaining = currentArr.slice();
|
|
37192
|
+
return newArr.every((val) => {
|
|
37193
|
+
const idx = remaining.findIndex((c) => compareOptions(c, val, this.compareWith));
|
|
37194
|
+
if (idx === -1) {
|
|
37195
|
+
return false;
|
|
37196
|
+
}
|
|
37197
|
+
remaining.splice(idx, 1);
|
|
37198
|
+
return true;
|
|
37199
|
+
});
|
|
37200
|
+
}
|
|
37201
|
+
if (currentValue == null && newValue == null) {
|
|
37202
|
+
return true;
|
|
37203
|
+
}
|
|
37204
|
+
if (currentValue == null || newValue == null) {
|
|
37205
|
+
return false;
|
|
37206
|
+
}
|
|
37207
|
+
return compareOptions(currentValue, newValue, this.compareWith);
|
|
37208
|
+
}
|
|
37357
37209
|
async connectedCallback() {
|
|
37358
37210
|
const { el } = this;
|
|
37359
37211
|
this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
|
|
@@ -37547,10 +37399,11 @@ class Select {
|
|
|
37547
37399
|
.join(' ');
|
|
37548
37400
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
37549
37401
|
const isSelected = isOptionSelected(selectValue, value, this.compareWith);
|
|
37402
|
+
const { content, startContent, endContent } = extractOptionContent(option, this.customHTMLEnabled);
|
|
37550
37403
|
return {
|
|
37551
|
-
|
|
37552
|
-
text: option.textContent,
|
|
37404
|
+
text: content !== null && content !== void 0 ? content : '',
|
|
37553
37405
|
cssClass: optClass,
|
|
37406
|
+
disabled: option.disabled,
|
|
37554
37407
|
handler: () => {
|
|
37555
37408
|
this.setValue(value);
|
|
37556
37409
|
},
|
|
@@ -37558,6 +37411,9 @@ class Select {
|
|
|
37558
37411
|
'aria-checked': isSelected ? 'true' : 'false',
|
|
37559
37412
|
role: 'radio',
|
|
37560
37413
|
},
|
|
37414
|
+
startContent,
|
|
37415
|
+
endContent,
|
|
37416
|
+
description: option.description,
|
|
37561
37417
|
};
|
|
37562
37418
|
});
|
|
37563
37419
|
// Add "cancel" button
|
|
@@ -37578,13 +37434,19 @@ class Select {
|
|
|
37578
37434
|
.filter((cls) => cls !== 'hydrated')
|
|
37579
37435
|
.join(' ');
|
|
37580
37436
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
37437
|
+
const { content, startContent, endContent } = extractOptionContent(option, this.customHTMLEnabled);
|
|
37581
37438
|
return {
|
|
37582
37439
|
type: inputType,
|
|
37583
37440
|
cssClass: optClass,
|
|
37584
|
-
label:
|
|
37441
|
+
label: content !== null && content !== void 0 ? content : '',
|
|
37585
37442
|
value,
|
|
37586
37443
|
checked: isOptionSelected(selectValue, value, this.compareWith),
|
|
37587
37444
|
disabled: option.disabled,
|
|
37445
|
+
startContent,
|
|
37446
|
+
endContent,
|
|
37447
|
+
description: option.description,
|
|
37448
|
+
labelPlacement: option.labelPlacement,
|
|
37449
|
+
justify: option.justify,
|
|
37588
37450
|
};
|
|
37589
37451
|
});
|
|
37590
37452
|
return alertInputs;
|
|
@@ -37597,8 +37459,9 @@ class Select {
|
|
|
37597
37459
|
.filter((cls) => cls !== 'hydrated')
|
|
37598
37460
|
.join(' ');
|
|
37599
37461
|
const optClass = `${OPTION_CLASS} ${copyClasses}`;
|
|
37462
|
+
const { content, startContent, endContent } = extractOptionContent(option, this.customHTMLEnabled);
|
|
37600
37463
|
return {
|
|
37601
|
-
text:
|
|
37464
|
+
text: content !== null && content !== void 0 ? content : '',
|
|
37602
37465
|
cssClass: optClass,
|
|
37603
37466
|
value,
|
|
37604
37467
|
checked: isOptionSelected(selectValue, value, this.compareWith),
|
|
@@ -37609,6 +37472,11 @@ class Select {
|
|
|
37609
37472
|
this.close();
|
|
37610
37473
|
}
|
|
37611
37474
|
},
|
|
37475
|
+
startContent,
|
|
37476
|
+
endContent,
|
|
37477
|
+
description: option.description,
|
|
37478
|
+
labelPlacement: option.labelPlacement,
|
|
37479
|
+
justify: option.justify,
|
|
37612
37480
|
};
|
|
37613
37481
|
});
|
|
37614
37482
|
return popoverOptions;
|
|
@@ -37641,15 +37509,21 @@ class Select {
|
|
|
37641
37509
|
ionShadowTarget: this.nativeWrapperEl,
|
|
37642
37510
|
} });
|
|
37643
37511
|
}
|
|
37512
|
+
const options = this.createOverlaySelectOptions(this.childOpts, value);
|
|
37513
|
+
const hasRichContent = options.some((opt) => opt.startContent || opt.endContent || opt.description);
|
|
37644
37514
|
const popoverOpts = Object.assign(Object.assign({ mode,
|
|
37645
37515
|
event, alignment: 'center', size,
|
|
37646
|
-
showBackdrop }, interfaceOptions), { component: 'ion-select-popover', cssClass: [
|
|
37516
|
+
showBackdrop }, interfaceOptions), { component: 'ion-select-popover', cssClass: [
|
|
37517
|
+
'select-popover',
|
|
37518
|
+
hasRichContent ? 'select-popover-rich-content' : undefined,
|
|
37519
|
+
interfaceOptions.cssClass,
|
|
37520
|
+
], componentProps: {
|
|
37647
37521
|
header: interfaceOptions.header,
|
|
37648
37522
|
subHeader: interfaceOptions.subHeader,
|
|
37649
37523
|
message: interfaceOptions.message,
|
|
37650
37524
|
multiple,
|
|
37651
37525
|
value,
|
|
37652
|
-
options
|
|
37526
|
+
options,
|
|
37653
37527
|
} });
|
|
37654
37528
|
return popoverController.create(popoverOpts);
|
|
37655
37529
|
}
|
|
@@ -37730,12 +37604,18 @@ class Select {
|
|
|
37730
37604
|
}
|
|
37731
37605
|
return;
|
|
37732
37606
|
}
|
|
37733
|
-
|
|
37607
|
+
/**
|
|
37608
|
+
* Returns the text to display in the select based on the selected value.
|
|
37609
|
+
*
|
|
37610
|
+
* @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`.
|
|
37611
|
+
* @returns The text to display in the select, either with or without HTML based on the `useHTML` parameter.
|
|
37612
|
+
*/
|
|
37613
|
+
getText(useHTML = false) {
|
|
37734
37614
|
const selectedText = this.selectedText;
|
|
37735
37615
|
if (selectedText != null && selectedText !== '') {
|
|
37736
37616
|
return selectedText;
|
|
37737
37617
|
}
|
|
37738
|
-
return generateText(this.childOpts, this.value, this.compareWith);
|
|
37618
|
+
return generateText(this.childOpts, this.value, this.compareWith, useHTML);
|
|
37739
37619
|
}
|
|
37740
37620
|
setFocus() {
|
|
37741
37621
|
if (this.focusEl) {
|
|
@@ -37805,6 +37685,47 @@ class Select {
|
|
|
37805
37685
|
*/
|
|
37806
37686
|
return this.renderLabel();
|
|
37807
37687
|
}
|
|
37688
|
+
/**
|
|
37689
|
+
* Wraps text nodes in the select text with span elements
|
|
37690
|
+
* so spacing can be added between elements without
|
|
37691
|
+
* changing the display to prevent losing the ellipses
|
|
37692
|
+
* behavior.
|
|
37693
|
+
*
|
|
37694
|
+
* Only wraps when the string contains HTML elements
|
|
37695
|
+
* alongside text.
|
|
37696
|
+
*/
|
|
37697
|
+
wrapSelectTextNodes(html) {
|
|
37698
|
+
const temp = document.createElement('div');
|
|
37699
|
+
temp.innerHTML = html;
|
|
37700
|
+
const hasElements = Array.from(temp.childNodes).some((n) => n.nodeType === Node.ELEMENT_NODE);
|
|
37701
|
+
// Return the plain text
|
|
37702
|
+
if (!hasElements) {
|
|
37703
|
+
return html;
|
|
37704
|
+
}
|
|
37705
|
+
Array.from(temp.childNodes).forEach((node) => {
|
|
37706
|
+
var _a, _b, _c, _d;
|
|
37707
|
+
if (node.nodeType === Node.TEXT_NODE && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
37708
|
+
const text = node.textContent;
|
|
37709
|
+
/**
|
|
37710
|
+
* Split comma separator from the text content
|
|
37711
|
+
* e.g., ", Bacon" becomes ", " text node + <span>Bacon</span>.
|
|
37712
|
+
*/
|
|
37713
|
+
const commaMatch = text.match(/^(,\s*)(.*)/);
|
|
37714
|
+
if (commaMatch) {
|
|
37715
|
+
const commaNode = document.createTextNode(commaMatch[1]);
|
|
37716
|
+
const wrapper = document.createElement('span');
|
|
37717
|
+
wrapper.textContent = commaMatch[2];
|
|
37718
|
+
(_b = node.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(wrapper, node);
|
|
37719
|
+
(_c = wrapper.parentNode) === null || _c === void 0 ? void 0 : _c.insertBefore(commaNode, wrapper);
|
|
37720
|
+
return;
|
|
37721
|
+
}
|
|
37722
|
+
const wrapper = document.createElement('span');
|
|
37723
|
+
(_d = node.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(wrapper, node);
|
|
37724
|
+
wrapper.appendChild(node);
|
|
37725
|
+
}
|
|
37726
|
+
});
|
|
37727
|
+
return temp.innerHTML;
|
|
37728
|
+
}
|
|
37808
37729
|
/**
|
|
37809
37730
|
* Renders either the placeholder
|
|
37810
37731
|
* or the selected values based on
|
|
@@ -37812,7 +37733,7 @@ class Select {
|
|
|
37812
37733
|
*/
|
|
37813
37734
|
renderSelectText() {
|
|
37814
37735
|
const { placeholder } = this;
|
|
37815
|
-
const displayValue = this.getText();
|
|
37736
|
+
const displayValue = this.getText(true);
|
|
37816
37737
|
let addPlaceholderClass = false;
|
|
37817
37738
|
let selectText = displayValue;
|
|
37818
37739
|
if (selectText === '' && placeholder !== undefined) {
|
|
@@ -37824,6 +37745,10 @@ class Select {
|
|
|
37824
37745
|
'select-placeholder': addPlaceholderClass,
|
|
37825
37746
|
};
|
|
37826
37747
|
const textPart = addPlaceholderClass ? 'placeholder' : 'text';
|
|
37748
|
+
if (this.customHTMLEnabled) {
|
|
37749
|
+
const wrapped = this.wrapSelectTextNodes(selectText);
|
|
37750
|
+
return hAsync("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart, innerHTML: wrapped });
|
|
37751
|
+
}
|
|
37827
37752
|
return (hAsync("div", { "aria-hidden": "true", class: selectTextClasses, part: textPart }, selectText));
|
|
37828
37753
|
}
|
|
37829
37754
|
/**
|
|
@@ -37846,6 +37771,7 @@ class Select {
|
|
|
37846
37771
|
get ariaLabel() {
|
|
37847
37772
|
var _a;
|
|
37848
37773
|
const { placeholder, inheritedAttributes } = this;
|
|
37774
|
+
// Get the plain text from the selected text
|
|
37849
37775
|
const displayValue = this.getText();
|
|
37850
37776
|
// The aria label should be preferred over visible text if both are specified
|
|
37851
37777
|
const definedLabel = (_a = inheritedAttributes['aria-label']) !== null && _a !== void 0 ? _a : this.labelText;
|
|
@@ -37939,7 +37865,7 @@ class Select {
|
|
|
37939
37865
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
37940
37866
|
*/
|
|
37941
37867
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
37942
|
-
return (hAsync(Host, { key: '
|
|
37868
|
+
return (hAsync(Host, { key: 'a3036d51e0db13332641e9523264ddd1ab031912', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
37943
37869
|
[mode]: true,
|
|
37944
37870
|
'in-item': inItem,
|
|
37945
37871
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -37957,7 +37883,7 @@ class Select {
|
|
|
37957
37883
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
37958
37884
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
37959
37885
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
37960
|
-
}) }, hAsync("label", { key: '
|
|
37886
|
+
}) }, hAsync("label", { key: '58b77f683499b958840721bdb59a9bf822c7f218', class: "select-wrapper", id: "select-label", onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), hAsync("div", { key: '9e68d96524c1b87d6cb1bdce79fa86f2022be04a', class: "select-wrapper-inner", part: "inner" }, hAsync("slot", { key: 'c9bcc5d684d2cefadff6ad3ec91498d5b405afc5', name: "start" }), hAsync("div", { key: '5405bc15ffb3437ca00c64fbbc83d8eb2631c4ea', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: '95e2f041c8517afb1cc6bddb2c3c38cf41f2376e', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: 'f3d2410f678ea22a107121aea1bbda197a618ed6', class: "select-highlight" })), this.renderBottomContent()));
|
|
37961
37887
|
}
|
|
37962
37888
|
get el() { return getElement(this); }
|
|
37963
37889
|
static get watchers() { return {
|
|
@@ -38028,34 +37954,232 @@ const parseValue = (value) => {
|
|
|
38028
37954
|
}
|
|
38029
37955
|
return value.toString();
|
|
38030
37956
|
};
|
|
38031
|
-
const generateText = (opts, value, compareWith) => {
|
|
37957
|
+
const generateText = (opts, value, compareWith, useHTML = false) => {
|
|
38032
37958
|
if (value === undefined) {
|
|
38033
37959
|
return '';
|
|
38034
37960
|
}
|
|
38035
37961
|
if (Array.isArray(value)) {
|
|
38036
37962
|
return value
|
|
38037
|
-
.map((v) => textForValue(opts, v, compareWith))
|
|
37963
|
+
.map((v) => textForValue(opts, v, compareWith, useHTML))
|
|
38038
37964
|
.filter((opt) => opt !== null)
|
|
38039
37965
|
.join(', ');
|
|
38040
37966
|
}
|
|
38041
37967
|
else {
|
|
38042
|
-
return textForValue(opts, value, compareWith) || '';
|
|
37968
|
+
return textForValue(opts, value, compareWith, useHTML) || '';
|
|
38043
37969
|
}
|
|
38044
37970
|
};
|
|
38045
|
-
|
|
37971
|
+
/**
|
|
37972
|
+
* Returns the display text for a given value from the list of options.
|
|
37973
|
+
* When `useHTML` is true, returns sanitized HTML for the select text.
|
|
37974
|
+
* When `useHTML` is false, returns plain text for aria-label and other
|
|
37975
|
+
* text-only contexts.
|
|
37976
|
+
*
|
|
37977
|
+
* @param opts - The list of ion-select-option elements.
|
|
37978
|
+
* @param value - The value to find the matching option for.
|
|
37979
|
+
* @param compareWith - Custom comparison function or property name.
|
|
37980
|
+
* @param useHTML - If true, returns HTML string. If false, returns plain text.
|
|
37981
|
+
*/
|
|
37982
|
+
const textForValue = (opts, value, compareWith, useHTML = false) => {
|
|
38046
37983
|
const selectOpt = opts.find((opt) => {
|
|
38047
37984
|
return compareOptions(value, getOptionValue(opt), compareWith);
|
|
38048
37985
|
});
|
|
38049
|
-
|
|
37986
|
+
const customHTMLEnabled = config.get('innerHTMLTemplatesEnabled', ENABLE_HTML_CONTENT_DEFAULT);
|
|
37987
|
+
if (!selectOpt) {
|
|
37988
|
+
return null;
|
|
37989
|
+
}
|
|
37990
|
+
// Return sanitized HTML for the select text
|
|
37991
|
+
if (customHTMLEnabled && useHTML) {
|
|
37992
|
+
return getOptionContent(selectOpt, undefined, true);
|
|
37993
|
+
}
|
|
37994
|
+
/**
|
|
37995
|
+
* When custom HTML is enabled, extract only the default slot content.
|
|
37996
|
+
* This ensures aria-label and other text-only contexts read only
|
|
37997
|
+
* the relevant option text.
|
|
37998
|
+
*/
|
|
37999
|
+
if (customHTMLEnabled) {
|
|
38000
|
+
const content = getOptionContent(selectOpt);
|
|
38001
|
+
if (typeof content === 'string') {
|
|
38002
|
+
return content;
|
|
38003
|
+
}
|
|
38004
|
+
/**
|
|
38005
|
+
* Elements were found in the default slot, extract and concatenate
|
|
38006
|
+
* their text content while trimming whitespace.
|
|
38007
|
+
*/
|
|
38008
|
+
if (content) {
|
|
38009
|
+
const texts = Array.from(content.childNodes)
|
|
38010
|
+
.map((n) => { var _a; return (_a = n.textContent) === null || _a === void 0 ? void 0 : _a.trim(); })
|
|
38011
|
+
.filter((t) => t);
|
|
38012
|
+
return texts.join(' ') || null;
|
|
38013
|
+
}
|
|
38014
|
+
// Empty option
|
|
38015
|
+
return null;
|
|
38016
|
+
}
|
|
38017
|
+
return getDefaultSlotPlainText(selectOpt);
|
|
38018
|
+
};
|
|
38019
|
+
/**
|
|
38020
|
+
* Trims whitespace from all text nodes within a DOM tree.
|
|
38021
|
+
* This prevents invisible layout shifts and unwanted gaps between
|
|
38022
|
+
* elements when HTML content is injected via innerHTML or cloneNode,
|
|
38023
|
+
* as browsers preserve whitespace (tabs, newlines, spaces) from
|
|
38024
|
+
* the original source markup.
|
|
38025
|
+
*
|
|
38026
|
+
* @param node The root node to start trimming text nodes from.
|
|
38027
|
+
*/
|
|
38028
|
+
const trimTextNodes = (node) => {
|
|
38029
|
+
node.childNodes.forEach((child) => {
|
|
38030
|
+
var _a;
|
|
38031
|
+
if (child.nodeType === Node.TEXT_NODE) {
|
|
38032
|
+
child.textContent = ((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
38033
|
+
}
|
|
38034
|
+
else if (child.nodeType === Node.ELEMENT_NODE) {
|
|
38035
|
+
trimTextNodes(child);
|
|
38036
|
+
}
|
|
38037
|
+
});
|
|
38038
|
+
};
|
|
38039
|
+
/**
|
|
38040
|
+
* Extracts and clones content from an `ion-select-option` element
|
|
38041
|
+
* for rendering within overlay interfaces or the select text when `customHTMLEnabled` is `true`.
|
|
38042
|
+
*
|
|
38043
|
+
* @param option - The `ion-select-option` element to extract content from.
|
|
38044
|
+
* @param slotName - Optional slot name to extract. If omitted, extracts the default slot content.
|
|
38045
|
+
* @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.
|
|
38046
|
+
* @returns When `useHTML` is `true`, a sanitized HTML string. When `false`, a
|
|
38047
|
+
* div element containing cloned child nodes. Returns `null` if no matching
|
|
38048
|
+
* content is found.
|
|
38049
|
+
*/
|
|
38050
|
+
const getOptionContent = (option, slotName, useHTML = false) => {
|
|
38051
|
+
let nodes;
|
|
38052
|
+
if (slotName) {
|
|
38053
|
+
// Named slot: get elements with matching slot attribute
|
|
38054
|
+
nodes = Array.from(option.children).filter((el) => el.getAttribute('slot') === slotName);
|
|
38055
|
+
}
|
|
38056
|
+
else {
|
|
38057
|
+
// Default slot: get nodes without a slot attribute
|
|
38058
|
+
const defaultSlot = getOptionDefaultSlot(option) || [];
|
|
38059
|
+
nodes = defaultSlot.filter((node) => {
|
|
38060
|
+
var _a;
|
|
38061
|
+
/**
|
|
38062
|
+
* Exclude whitespace-only text nodes (newline noise between
|
|
38063
|
+
* markup elements). Element nodes are always kept, even when
|
|
38064
|
+
* their textContent is empty (e.g. <svg>, <img>).
|
|
38065
|
+
*/
|
|
38066
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
38067
|
+
return ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim().length) !== 0;
|
|
38068
|
+
}
|
|
38069
|
+
return true;
|
|
38070
|
+
});
|
|
38071
|
+
}
|
|
38072
|
+
if (nodes.length === 0) {
|
|
38073
|
+
return null;
|
|
38074
|
+
}
|
|
38075
|
+
// Return plain text if no elements are found
|
|
38076
|
+
if (!slotName && nodes.every((n) => n.nodeType === Node.TEXT_NODE)) {
|
|
38077
|
+
return nodes.map((n) => { var _a; return (_a = n.textContent) === null || _a === void 0 ? void 0 : _a.trim(); }).join(' ') || null;
|
|
38078
|
+
}
|
|
38079
|
+
/**
|
|
38080
|
+
* Mirror known custom-element properties (e.g. ion-icon's `icon`)
|
|
38081
|
+
* onto attributes before cloning. Frameworks like Vue set these as
|
|
38082
|
+
* DOM properties, which `cloneNode` doesn't copy, so without this
|
|
38083
|
+
* step the cloned overlay copy renders without the prop's value.
|
|
38084
|
+
*/
|
|
38085
|
+
nodes.forEach((n) => {
|
|
38086
|
+
if (n.nodeType === Node.ELEMENT_NODE) {
|
|
38087
|
+
reflectPropertiesToAttributes(n);
|
|
38088
|
+
}
|
|
38089
|
+
});
|
|
38090
|
+
// Clone each node into a temporary container
|
|
38091
|
+
const container = document.createElement('div');
|
|
38092
|
+
nodes.forEach((n) => {
|
|
38093
|
+
var _a;
|
|
38094
|
+
const clone = n.cloneNode(true);
|
|
38095
|
+
if (clone.nodeType === Node.TEXT_NODE) {
|
|
38096
|
+
clone.textContent = ((_a = clone.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
38097
|
+
}
|
|
38098
|
+
else {
|
|
38099
|
+
trimTextNodes(clone);
|
|
38100
|
+
}
|
|
38101
|
+
container.appendChild(clone);
|
|
38102
|
+
});
|
|
38103
|
+
/**
|
|
38104
|
+
* Sanitize the cloned DOM in place. Trusted attributes (size, color,
|
|
38105
|
+
* shape, etc.) are preserved; event handlers, javascript: URLs, and
|
|
38106
|
+
* blocked tags are stripped.
|
|
38107
|
+
*/
|
|
38108
|
+
sanitizeDOMTree(container);
|
|
38109
|
+
if (useHTML) {
|
|
38110
|
+
return container.innerHTML.trim() || null;
|
|
38111
|
+
}
|
|
38112
|
+
return container;
|
|
38113
|
+
};
|
|
38114
|
+
/**
|
|
38115
|
+
* Returns the child nodes that belong to the default slot of an
|
|
38116
|
+
* option element, excluding any nodes that are assigned to named
|
|
38117
|
+
* slots.
|
|
38118
|
+
*
|
|
38119
|
+
* @param option - The `ion-select-option` element to extract default-slot nodes from.
|
|
38120
|
+
* @returns An array of default slot nodes, or `null` if none are found.
|
|
38121
|
+
*/
|
|
38122
|
+
const getOptionDefaultSlot = (option) => {
|
|
38123
|
+
const defaultSlotNodes = Array.from(option.childNodes).filter((node) => {
|
|
38124
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
38125
|
+
return !node.hasAttribute('slot');
|
|
38126
|
+
}
|
|
38127
|
+
return node.nodeType === Node.TEXT_NODE;
|
|
38128
|
+
});
|
|
38129
|
+
if (defaultSlotNodes.length === 0) {
|
|
38130
|
+
return null;
|
|
38131
|
+
}
|
|
38132
|
+
return defaultSlotNodes;
|
|
38133
|
+
};
|
|
38134
|
+
/**
|
|
38135
|
+
* Extracts plain text from only the default slot of an option,
|
|
38136
|
+
* excluding content assigned to named slots (start/end).
|
|
38137
|
+
*/
|
|
38138
|
+
const getDefaultSlotPlainText = (option) => {
|
|
38139
|
+
const texts = Array.from(option.childNodes)
|
|
38140
|
+
.filter((node) => {
|
|
38141
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
38142
|
+
return !node.hasAttribute('slot');
|
|
38143
|
+
}
|
|
38144
|
+
return node.nodeType === Node.TEXT_NODE;
|
|
38145
|
+
})
|
|
38146
|
+
.filter((node) => node.nodeType === Node.TEXT_NODE)
|
|
38147
|
+
.map((n) => { var _a; return (_a = n.textContent) === null || _a === void 0 ? void 0 : _a.trim(); })
|
|
38148
|
+
.filter((t) => t);
|
|
38149
|
+
return texts.join(' ');
|
|
38150
|
+
};
|
|
38151
|
+
/**
|
|
38152
|
+
* Extracts the rich content from an `ion-select-option`.
|
|
38153
|
+
* When `customHTMLEnabled` is `false`, only the plain text from the
|
|
38154
|
+
* default slot is read and the start and end slots are skipped.
|
|
38155
|
+
*
|
|
38156
|
+
* @param option - The `ion-select-option` element to extract content from.
|
|
38157
|
+
* @param customHTMLEnabled - Whether custom HTML rendering is enabled
|
|
38158
|
+
* via the `innerHTMLTemplatesEnabled` config.
|
|
38159
|
+
*/
|
|
38160
|
+
const extractOptionContent = (option, customHTMLEnabled) => {
|
|
38161
|
+
var _a, _b;
|
|
38162
|
+
if (!customHTMLEnabled) {
|
|
38163
|
+
return {
|
|
38164
|
+
content: getDefaultSlotPlainText(option),
|
|
38165
|
+
startContent: undefined,
|
|
38166
|
+
endContent: undefined,
|
|
38167
|
+
};
|
|
38168
|
+
}
|
|
38169
|
+
return {
|
|
38170
|
+
content: getOptionContent(option),
|
|
38171
|
+
startContent: (_a = getOptionContent(option, 'start')) !== null && _a !== void 0 ? _a : undefined,
|
|
38172
|
+
endContent: (_b = getOptionContent(option, 'end')) !== null && _b !== void 0 ? _b : undefined,
|
|
38173
|
+
};
|
|
38050
38174
|
};
|
|
38051
38175
|
let selectIds = 0;
|
|
38052
38176
|
const OPTION_CLASS = 'select-interface-option';
|
|
38053
38177
|
|
|
38054
|
-
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)}`;
|
|
38178
|
+
const ionicSelectModalMdCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ionic,.alert-radio-label-has-rich-content.sc-ion-select-modal-ionic,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ionic,.select-option-label-has-rich-content.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ionic,.alert-radio-label-has-rich-content.sc-ion-select-modal-ionic,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ionic,.select-option-content.sc-ion-select-modal-ionic{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-ionic,.alert-checkbox-label-text.sc-ion-select-modal-ionic,.alert-radio-label-text.sc-ion-select-modal-ionic,.select-option-label-text.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-ionic{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-select-modal-ionic:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-ionic::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-ionic [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ionic::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ionic [part~="label"],.select-option-content.sc-ion-select-modal-ionic{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-ionic>ion-avatar.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-avatar.sc-ion-select-modal-ionic{width:40px;height:40px}.select-option-start.sc-ion-select-modal-ionic>ion-icon.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-icon.sc-ion-select-modal-ionic{width:24px;height:24px}.select-option-start.sc-ion-select-modal-ionic>ion-img.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>img.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>svg.sc-ion-select-modal-ionic,.select-option-start.sc-ion-select-modal-ionic>ion-thumbnail.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-img.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>img.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>svg.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>ion-thumbnail.sc-ion-select-modal-ionic{width:56px;height:56px}.select-option-start.sc-ion-select-modal-ionic>video.sc-ion-select-modal-ionic,.select-option-end.sc-ion-select-modal-ionic>video.sc-ion-select-modal-ionic{width:114px;height:56px}.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)}`;
|
|
38055
38179
|
|
|
38056
|
-
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)}`;
|
|
38180
|
+
const selectModalIosCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ios,.alert-radio-label-has-rich-content.sc-ion-select-modal-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ios,.select-option-label-has-rich-content.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-ios,.alert-radio-label-has-rich-content.sc-ion-select-modal-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-ios,.select-option-content.sc-ion-select-modal-ios{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-ios,.alert-checkbox-label-text.sc-ion-select-modal-ios,.alert-radio-label-text.sc-ion-select-modal-ios,.select-option-label-text.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-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-select-modal-ios:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-ios::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-ios [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ios::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-ios [part~="label"],.select-option-content.sc-ion-select-modal-ios{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-ios>ion-avatar.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>ion-img.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>ion-thumbnail.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>img.sc-ion-select-modal-ios,.select-option-start.sc-ion-select-modal-ios>svg.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-avatar.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-img.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-thumbnail.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>img.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>svg.sc-ion-select-modal-ios{width:44px;height:44px}.select-option-start.sc-ion-select-modal-ios>ion-icon.sc-ion-select-modal-ios,.select-option-end.sc-ion-select-modal-ios>ion-icon.sc-ion-select-modal-ios{width:28px;height:28px}.action-sheet-button-label-text.sc-ion-select-modal-ios{-ms-flex-pack:center;justify-content:center}.select-option-has-rich-content.sc-ion-select-modal-ios{-webkit-padding-end:16px;padding-inline-end:16px}.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)}`;
|
|
38057
38181
|
|
|
38058
|
-
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)}`;
|
|
38182
|
+
const selectModalMdCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-select-modal-md,.alert-radio-label-has-rich-content.sc-ion-select-modal-md,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-md,.select-option-label-has-rich-content.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-modal-md,.alert-radio-label-has-rich-content.sc-ion-select-modal-md,.alert-checkbox-label-has-rich-content.sc-ion-select-modal-md,.select-option-content.sc-ion-select-modal-md{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-modal-md,.alert-checkbox-label-text.sc-ion-select-modal-md,.alert-radio-label-text.sc-ion-select-modal-md,.select-option-label-text.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-modal-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-select-modal-md:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-modal-md::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-modal-md [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-md::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-modal-md [part~="label"],.select-option-content.sc-ion-select-modal-md{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-modal-md>ion-avatar.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-avatar.sc-ion-select-modal-md{width:40px;height:40px}.select-option-start.sc-ion-select-modal-md>ion-icon.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-icon.sc-ion-select-modal-md{width:24px;height:24px}.select-option-start.sc-ion-select-modal-md>ion-img.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>img.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>svg.sc-ion-select-modal-md,.select-option-start.sc-ion-select-modal-md>ion-thumbnail.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-img.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>img.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>svg.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>ion-thumbnail.sc-ion-select-modal-md{width:56px;height:56px}.select-option-start.sc-ion-select-modal-md>video.sc-ion-select-modal-md,.select-option-end.sc-ion-select-modal-md>video.sc-ion-select-modal-md{width:114px;height:56px}.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)}`;
|
|
38059
38183
|
|
|
38060
38184
|
class SelectModal {
|
|
38061
38185
|
constructor(hostRef) {
|
|
@@ -38109,39 +38233,90 @@ class SelectModal {
|
|
|
38109
38233
|
}
|
|
38110
38234
|
}
|
|
38111
38235
|
renderRadioOptions() {
|
|
38236
|
+
const mode = getIonMode$1(this);
|
|
38112
38237
|
const checked = this.options.filter((o) => o.checked).map((o) => o.value)[0];
|
|
38113
|
-
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option) =>
|
|
38238
|
+
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option, index) => {
|
|
38239
|
+
var _a, _b;
|
|
38240
|
+
/**
|
|
38241
|
+
* Cast to `SelectOverlayOption` to access rich content
|
|
38242
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
38243
|
+
* that are passed through from `ion-select` but not
|
|
38244
|
+
* part of the public `SelectModalOption` interface.
|
|
38245
|
+
*/
|
|
38246
|
+
const richOption = option;
|
|
38247
|
+
const hasRichContent = !!richOption.startContent || !!richOption.endContent || !!richOption.description;
|
|
38248
|
+
const optionLabelOptions = {
|
|
38249
|
+
id: `modal-option-${index}`,
|
|
38250
|
+
label: richOption.text,
|
|
38251
|
+
startContent: richOption.startContent,
|
|
38252
|
+
endContent: richOption.endContent,
|
|
38253
|
+
description: richOption.description,
|
|
38254
|
+
};
|
|
38255
|
+
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'radio', 'modal');
|
|
38256
|
+
const defaultJustify = getOverlayLabelJustify(mode, 'radio', 'modal');
|
|
38257
|
+
return (hAsync("ion-item", { lines: "none",
|
|
38114
38258
|
// TODO FW-4784
|
|
38115
|
-
|
|
38116
|
-
|
|
38117
|
-
|
|
38118
|
-
|
|
38119
|
-
|
|
38120
|
-
|
|
38121
|
-
|
|
38122
|
-
|
|
38123
|
-
|
|
38124
|
-
}
|
|
38125
|
-
|
|
38126
|
-
|
|
38127
|
-
this.pendingEnterTarget = null;
|
|
38128
|
-
if (shouldClose) {
|
|
38259
|
+
disabled: option.disabled, class: Object.assign({
|
|
38260
|
+
// TODO FW-4784
|
|
38261
|
+
'item-radio-checked': option.value === checked
|
|
38262
|
+
}, getClassMap(option.cssClass)) }, hAsync("ion-radio", { class: {
|
|
38263
|
+
'select-option-has-rich-content': hasRichContent,
|
|
38264
|
+
}, value: option.value, disabled: option.disabled, justify: (_a = richOption.justify) !== null && _a !== void 0 ? _a : defaultJustify, labelPlacement: (_b = richOption.labelPlacement) !== null && _b !== void 0 ? _b : defaultLabelPlacement, onClick: () => this.closeModal(), onKeyDown: (ev) => {
|
|
38265
|
+
if (ev.key === 'Enter' && !ev.repeat) {
|
|
38266
|
+
this.pendingEnterTarget = ev.currentTarget;
|
|
38267
|
+
}
|
|
38268
|
+
}, onKeyUp: (ev) => {
|
|
38269
|
+
if (ev.key === ' ') {
|
|
38270
|
+
// Space selects and dismisses in one press.
|
|
38129
38271
|
this.closeModal();
|
|
38130
38272
|
}
|
|
38131
|
-
|
|
38132
|
-
|
|
38273
|
+
else if (ev.key === 'Enter') {
|
|
38274
|
+
const shouldClose = this.pendingEnterTarget === ev.currentTarget;
|
|
38275
|
+
this.pendingEnterTarget = null;
|
|
38276
|
+
if (shouldClose) {
|
|
38277
|
+
this.closeModal();
|
|
38278
|
+
}
|
|
38279
|
+
}
|
|
38280
|
+
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
38281
|
+
})));
|
|
38133
38282
|
}
|
|
38134
38283
|
renderCheckboxOptions() {
|
|
38135
|
-
|
|
38284
|
+
const mode = getIonMode$1(this);
|
|
38285
|
+
return this.options.map((option, index) => {
|
|
38286
|
+
var _a, _b;
|
|
38287
|
+
/**
|
|
38288
|
+
* Cast to `SelectOverlayOption` to access rich content
|
|
38289
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
38290
|
+
* that are passed through from `ion-select` but not
|
|
38291
|
+
* part of the public `SelectModalOption` interface.
|
|
38292
|
+
*/
|
|
38293
|
+
const richOption = option;
|
|
38294
|
+
const hasRichContent = !!richOption.startContent || !!richOption.endContent || !!richOption.description;
|
|
38295
|
+
const optionLabelOptions = {
|
|
38296
|
+
id: `modal-option-${index}`,
|
|
38297
|
+
label: richOption.text,
|
|
38298
|
+
startContent: richOption.startContent,
|
|
38299
|
+
endContent: richOption.endContent,
|
|
38300
|
+
description: richOption.description,
|
|
38301
|
+
};
|
|
38302
|
+
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'checkbox', 'modal');
|
|
38303
|
+
const defaultJustify = getOverlayLabelJustify(mode, 'checkbox', 'modal');
|
|
38304
|
+
return (hAsync("ion-item", {
|
|
38136
38305
|
// TODO FW-4784
|
|
38137
|
-
|
|
38138
|
-
|
|
38139
|
-
|
|
38140
|
-
|
|
38141
|
-
}
|
|
38306
|
+
disabled: option.disabled, class: Object.assign({
|
|
38307
|
+
// TODO FW-4784
|
|
38308
|
+
'item-checkbox-checked': option.checked
|
|
38309
|
+
}, getClassMap(option.cssClass))
|
|
38310
|
+
}, hAsync("ion-checkbox", { class: {
|
|
38311
|
+
'select-option-has-rich-content': hasRichContent,
|
|
38312
|
+
}, 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) => {
|
|
38313
|
+
this.setChecked(ev);
|
|
38314
|
+
this.callOptionHandler(ev);
|
|
38315
|
+
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
38316
|
+
});
|
|
38142
38317
|
}
|
|
38143
38318
|
render() {
|
|
38144
|
-
return (hAsync(Host, { key: '
|
|
38319
|
+
return (hAsync(Host, { key: '2cb1ae057b7a66f5d12c926f618f6b945f019803', class: getIonMode$1(this) }, hAsync("ion-header", { key: 'e41f1c4ad1c71dcc927d210502d6366cea894a14' }, hAsync("ion-toolbar", { key: '1a191dfc8980541469ee4d8996ba4de52cac1ac5' }, this.header !== undefined && hAsync("ion-title", { key: '14ab9cb7d41d15b982c6ccd8ba6cee0e9cb528d9' }, this.header), hAsync("ion-buttons", { key: '80451a2ed3a82138eb1575135cf2ebbd5e8f6e60', slot: "end" }, hAsync("ion-button", { key: '01a315cd739569f3c0b23a4d243d52b69b63dfa7', onClick: () => this.closeModal() }, this.cancelText)))), hAsync("ion-content", { key: 'd953101bae9a91f8108f7a5e411bb1e34338655d' }, hAsync("ion-list", { key: '171a5668afc67b03d2ee87e91cf400b17541bc7f' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
|
|
38145
38320
|
}
|
|
38146
38321
|
get el() { return getElement(this); }
|
|
38147
38322
|
static get style() { return {
|
|
@@ -38166,17 +38341,24 @@ class SelectModal {
|
|
|
38166
38341
|
|
|
38167
38342
|
const selectOptionCss = () => `:host{display:none}`;
|
|
38168
38343
|
|
|
38344
|
+
/**
|
|
38345
|
+
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
38346
|
+
*
|
|
38347
|
+
* @slot - Content is placed between the named slots if provided without a slot.
|
|
38348
|
+
* @slot start - Content is placed to the left of the select option text in LTR, and to the right in RTL.
|
|
38349
|
+
* @slot end - Content is placed to the right of the select option text in LTR, and to the left in RTL.
|
|
38350
|
+
*/
|
|
38169
38351
|
class SelectOption {
|
|
38170
38352
|
constructor(hostRef) {
|
|
38171
38353
|
registerInstance(this, hostRef);
|
|
38172
38354
|
this.inputId = `ion-selopt-${selectOptionIds++}`;
|
|
38173
38355
|
/**
|
|
38174
|
-
* If `true`, the user cannot interact with the select option.
|
|
38356
|
+
* If `true`, the user cannot interact with the select option.
|
|
38175
38357
|
*/
|
|
38176
38358
|
this.disabled = false;
|
|
38177
38359
|
}
|
|
38178
38360
|
render() {
|
|
38179
|
-
return hAsync(Host, { key: '
|
|
38361
|
+
return hAsync(Host, { key: '8b8bef0f5a55f18048708c34d3ea3ff0ff2f1d47', role: "option", id: this.inputId, class: getIonMode$1(this) });
|
|
38180
38362
|
}
|
|
38181
38363
|
get el() { return getElement(this); }
|
|
38182
38364
|
static get style() { return selectOptionCss(); }
|
|
@@ -38185,7 +38367,10 @@ class SelectOption {
|
|
|
38185
38367
|
"$tagName$": "ion-select-option",
|
|
38186
38368
|
"$members$": {
|
|
38187
38369
|
"disabled": [4],
|
|
38188
|
-
"value": [8]
|
|
38370
|
+
"value": [8],
|
|
38371
|
+
"description": [1],
|
|
38372
|
+
"labelPlacement": [1, "label-placement"],
|
|
38373
|
+
"justify": [1]
|
|
38189
38374
|
},
|
|
38190
38375
|
"$listeners$": undefined,
|
|
38191
38376
|
"$lazyBundleId$": "-",
|
|
@@ -38194,9 +38379,9 @@ class SelectOption {
|
|
|
38194
38379
|
}
|
|
38195
38380
|
let selectOptionIds = 0;
|
|
38196
38381
|
|
|
38197
|
-
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}`;
|
|
38382
|
+
const selectPopoverIosCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-select-popover-ios,.alert-radio-label-has-rich-content.sc-ion-select-popover-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-popover-ios,.select-option-label-has-rich-content.sc-ion-select-popover-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-popover-ios,.alert-radio-label-has-rich-content.sc-ion-select-popover-ios,.alert-checkbox-label-has-rich-content.sc-ion-select-popover-ios,.select-option-content.sc-ion-select-popover-ios{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-popover-ios,.alert-checkbox-label-text.sc-ion-select-popover-ios,.alert-radio-label-text.sc-ion-select-popover-ios,.select-option-label-text.sc-ion-select-popover-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-popover-ios,.select-option-end.sc-ion-select-popover-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-popover-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-select-popover-ios:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-popover-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-popover-ios::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-popover-ios [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-popover-ios::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-popover-ios [part~="label"],.select-option-content.sc-ion-select-popover-ios{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-popover-ios>ion-avatar.sc-ion-select-popover-ios,.select-option-start.sc-ion-select-popover-ios>ion-img.sc-ion-select-popover-ios,.select-option-start.sc-ion-select-popover-ios>ion-thumbnail.sc-ion-select-popover-ios,.select-option-start.sc-ion-select-popover-ios>img.sc-ion-select-popover-ios,.select-option-start.sc-ion-select-popover-ios>svg.sc-ion-select-popover-ios,.select-option-end.sc-ion-select-popover-ios>ion-avatar.sc-ion-select-popover-ios,.select-option-end.sc-ion-select-popover-ios>ion-img.sc-ion-select-popover-ios,.select-option-end.sc-ion-select-popover-ios>ion-thumbnail.sc-ion-select-popover-ios,.select-option-end.sc-ion-select-popover-ios>img.sc-ion-select-popover-ios,.select-option-end.sc-ion-select-popover-ios>svg.sc-ion-select-popover-ios{width:44px;height:44px}.select-option-start.sc-ion-select-popover-ios>ion-icon.sc-ion-select-popover-ios,.select-option-end.sc-ion-select-popover-ios>ion-icon.sc-ion-select-popover-ios{width:28px;height:28px}.action-sheet-button-label-text.sc-ion-select-popover-ios{-ms-flex-pack:center;justify-content:center}.select-option-has-rich-content.sc-ion-select-popover-ios{-webkit-padding-end:16px;padding-inline-end:16px}.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}`;
|
|
38198
38383
|
|
|
38199
|
-
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)}`;
|
|
38384
|
+
const selectPopoverMdCss = () => `.action-sheet-button-label-has-rich-content.sc-ion-select-popover-md,.alert-radio-label-has-rich-content.sc-ion-select-popover-md,.alert-checkbox-label-has-rich-content.sc-ion-select-popover-md,.select-option-label-has-rich-content.sc-ion-select-popover-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}.action-sheet-button-label-has-rich-content.sc-ion-select-popover-md,.alert-radio-label-has-rich-content.sc-ion-select-popover-md,.alert-checkbox-label-has-rich-content.sc-ion-select-popover-md,.select-option-content.sc-ion-select-popover-md{-ms-flex:1;flex:1}.action-sheet-button-label-text.sc-ion-select-popover-md,.alert-checkbox-label-text.sc-ion-select-popover-md,.alert-radio-label-text.sc-ion-select-popover-md,.select-option-label-text.sc-ion-select-popover-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}.select-option-start.sc-ion-select-popover-md,.select-option-end.sc-ion-select-popover-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.select-option-description.sc-ion-select-popover-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-select-popover-md:not(.select-option-label-has-rich-content){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-option-label-has-rich-content.sc-ion-select-popover-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ion-radio.select-option-has-rich-content.sc-ion-select-popover-md::part(label),ion-radio.select-option-has-rich-content.sc-ion-select-popover-md [part~="label"],ion-checkbox.select-option-has-rich-content.sc-ion-select-popover-md::part(label),ion-checkbox.select-option-has-rich-content.sc-ion-select-popover-md [part~="label"],.select-option-content.sc-ion-select-popover-md{-ms-flex:1;flex:1;white-space:normal}.select-option-start.sc-ion-select-popover-md>ion-avatar.sc-ion-select-popover-md,.select-option-end.sc-ion-select-popover-md>ion-avatar.sc-ion-select-popover-md{width:40px;height:40px}.select-option-start.sc-ion-select-popover-md>ion-icon.sc-ion-select-popover-md,.select-option-end.sc-ion-select-popover-md>ion-icon.sc-ion-select-popover-md{width:24px;height:24px}.select-option-start.sc-ion-select-popover-md>ion-img.sc-ion-select-popover-md,.select-option-start.sc-ion-select-popover-md>img.sc-ion-select-popover-md,.select-option-start.sc-ion-select-popover-md>svg.sc-ion-select-popover-md,.select-option-start.sc-ion-select-popover-md>ion-thumbnail.sc-ion-select-popover-md,.select-option-end.sc-ion-select-popover-md>ion-img.sc-ion-select-popover-md,.select-option-end.sc-ion-select-popover-md>img.sc-ion-select-popover-md,.select-option-end.sc-ion-select-popover-md>svg.sc-ion-select-popover-md,.select-option-end.sc-ion-select-popover-md>ion-thumbnail.sc-ion-select-popover-md{width:56px;height:56px}.select-option-start.sc-ion-select-popover-md>video.sc-ion-select-popover-md,.select-option-end.sc-ion-select-popover-md>video.sc-ion-select-popover-md{width:114px;height:56px}.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)}`;
|
|
38200
38385
|
|
|
38201
38386
|
/**
|
|
38202
38387
|
* @internal
|
|
@@ -38270,41 +38455,91 @@ class SelectPopover {
|
|
|
38270
38455
|
}
|
|
38271
38456
|
}
|
|
38272
38457
|
renderCheckboxOptions(options) {
|
|
38273
|
-
|
|
38458
|
+
const mode = getIonMode$1(this);
|
|
38459
|
+
return options.map((option, index) => {
|
|
38460
|
+
var _a, _b;
|
|
38461
|
+
/**
|
|
38462
|
+
* Cast to `SelectOverlayOption` to access rich content
|
|
38463
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
38464
|
+
* that are passed through from `ion-select` but not
|
|
38465
|
+
* part of the public `SelectPopoverOption` interface.
|
|
38466
|
+
*/
|
|
38467
|
+
const richOption = option;
|
|
38468
|
+
const hasRichContent = !!richOption.startContent || !!richOption.endContent || !!richOption.description;
|
|
38469
|
+
const optionLabelOptions = {
|
|
38470
|
+
id: `popover-option-${index}`,
|
|
38471
|
+
label: richOption.text,
|
|
38472
|
+
startContent: richOption.startContent,
|
|
38473
|
+
endContent: richOption.endContent,
|
|
38474
|
+
description: richOption.description,
|
|
38475
|
+
};
|
|
38476
|
+
const defaultLabelPlacement = getOverlayLabelPlacement(mode, 'checkbox');
|
|
38477
|
+
const defaultJustify = getOverlayLabelJustify(mode, 'checkbox');
|
|
38478
|
+
return (hAsync("ion-item", {
|
|
38274
38479
|
// TODO FW-4784
|
|
38275
|
-
|
|
38276
|
-
|
|
38277
|
-
|
|
38278
|
-
|
|
38279
|
-
}
|
|
38480
|
+
disabled: option.disabled, class: Object.assign({
|
|
38481
|
+
// TODO FW-4784
|
|
38482
|
+
'item-checkbox-checked': option.checked
|
|
38483
|
+
}, getClassMap(option.cssClass))
|
|
38484
|
+
}, hAsync("ion-checkbox", { class: {
|
|
38485
|
+
'select-option-has-rich-content': hasRichContent,
|
|
38486
|
+
}, 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) => {
|
|
38487
|
+
this.setChecked(ev);
|
|
38488
|
+
this.callOptionHandler(ev);
|
|
38489
|
+
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
38490
|
+
});
|
|
38280
38491
|
}
|
|
38281
38492
|
renderRadioOptions(options) {
|
|
38493
|
+
const mode = getIonMode$1(this);
|
|
38282
38494
|
const checked = options.filter((o) => o.checked).map((o) => o.value)[0];
|
|
38283
|
-
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, options.map((option) =>
|
|
38495
|
+
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, options.map((option, index) => {
|
|
38496
|
+
var _a, _b;
|
|
38497
|
+
/**
|
|
38498
|
+
* Cast to `SelectOverlayOption` to access rich content
|
|
38499
|
+
* fields (`startContent`, `endContent`, `description`)
|
|
38500
|
+
* that are passed through from `ion-select` but not
|
|
38501
|
+
* part of the public `SelectPopoverOption` interface.
|
|
38502
|
+
*/
|
|
38503
|
+
const richOption = option;
|
|
38504
|
+
const hasRichContent = !!richOption.startContent || !!richOption.endContent || !!richOption.description;
|
|
38505
|
+
const optionLabelOptions = {
|
|
38506
|
+
id: `popover-option-${index}`,
|
|
38507
|
+
label: richOption.text,
|
|
38508
|
+
startContent: richOption.startContent,
|
|
38509
|
+
endContent: richOption.endContent,
|
|
38510
|
+
description: richOption.description,
|
|
38511
|
+
};
|
|
38512
|
+
return (hAsync("ion-item", {
|
|
38284
38513
|
// TODO FW-4784
|
|
38285
|
-
|
|
38286
|
-
|
|
38287
|
-
|
|
38288
|
-
|
|
38289
|
-
|
|
38290
|
-
|
|
38291
|
-
|
|
38292
|
-
|
|
38293
|
-
|
|
38294
|
-
|
|
38295
|
-
|
|
38296
|
-
|
|
38297
|
-
|
|
38298
|
-
if (shouldDismiss) {
|
|
38514
|
+
disabled: option.disabled, class: Object.assign({
|
|
38515
|
+
// TODO FW-4784
|
|
38516
|
+
'item-radio-checked': option.value === checked
|
|
38517
|
+
}, getClassMap(option.cssClass))
|
|
38518
|
+
}, hAsync("ion-radio", { class: {
|
|
38519
|
+
'select-option-has-rich-content': hasRichContent,
|
|
38520
|
+
}, value: option.value, disabled: option.disabled, justify: (_a = richOption.justify) !== null && _a !== void 0 ? _a : getOverlayLabelJustify(mode, 'radio'), labelPlacement: (_b = richOption.labelPlacement) !== null && _b !== void 0 ? _b : getOverlayLabelPlacement(mode, 'radio'), onClick: () => this.dismissParentPopover(), onKeyDown: (ev) => {
|
|
38521
|
+
if (ev.key === 'Enter' && !ev.repeat) {
|
|
38522
|
+
this.pendingEnterTarget = ev.currentTarget;
|
|
38523
|
+
}
|
|
38524
|
+
}, onKeyUp: (ev) => {
|
|
38525
|
+
if (ev.key === ' ') {
|
|
38526
|
+
// Space selects and dismisses in one press.
|
|
38299
38527
|
this.dismissParentPopover();
|
|
38300
38528
|
}
|
|
38301
|
-
|
|
38302
|
-
|
|
38529
|
+
else if (ev.key === 'Enter') {
|
|
38530
|
+
const shouldDismiss = this.pendingEnterTarget === ev.currentTarget;
|
|
38531
|
+
this.pendingEnterTarget = null;
|
|
38532
|
+
if (shouldDismiss) {
|
|
38533
|
+
this.dismissParentPopover();
|
|
38534
|
+
}
|
|
38535
|
+
}
|
|
38536
|
+
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
38537
|
+
})));
|
|
38303
38538
|
}
|
|
38304
38539
|
render() {
|
|
38305
38540
|
const { header, message, options, subHeader } = this;
|
|
38306
38541
|
const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
|
|
38307
|
-
return (hAsync(Host, { key: '
|
|
38542
|
+
return (hAsync(Host, { key: 'd0c107e0ca78955a3cfcd9f098a527fb35eff14d', class: getIonMode$1(this) }, hAsync("ion-list", { key: '1e103312e22bf78d2201a0f88cc4fed789f62a2b' }, header !== undefined && hAsync("ion-list-header", { key: '657439905dc480112ed8d7f8d4a01464724de2bd' }, header), hasSubHeaderOrMessage && (hAsync("ion-item", { key: 'e0eaa0250bf233cf846adba5ddc141bf3430c2a8' }, hAsync("ion-label", { key: 'ad1cff877f9d582fbc64f9049603146fd1a1a6f9', class: "ion-text-wrap" }, subHeader !== undefined && hAsync("h3", { key: 'ead921d395b614a99c89a8ffe2a102a620f80767' }, subHeader), message !== undefined && hAsync("p", { key: '3a47e7091528930f33324ccd04d6734217155244' }, message)))), this.renderOptions(options))));
|
|
38308
38543
|
}
|
|
38309
38544
|
get el() { return getElement(this); }
|
|
38310
38545
|
static get style() { return {
|
|
@@ -38354,11 +38589,11 @@ class SkeletonText {
|
|
|
38354
38589
|
const animated = this.animated && config.getBoolean('animated', true);
|
|
38355
38590
|
const inMedia = hostContext('ion-avatar', this.el) || hostContext('ion-thumbnail', this.el);
|
|
38356
38591
|
const mode = getIonMode$1(this);
|
|
38357
|
-
return (hAsync(Host, { key: '
|
|
38592
|
+
return (hAsync(Host, { key: '887d958d982345ce610730ab5c9ae35010430f75', class: {
|
|
38358
38593
|
[mode]: true,
|
|
38359
38594
|
'skeleton-text-animated': animated,
|
|
38360
38595
|
'in-media': inMedia,
|
|
38361
|
-
} }, hAsync("span", { key: '
|
|
38596
|
+
} }, hAsync("span", { key: 'a184f4b9780a2aada0a16729109ac81436e9c9e1' }, "\u00A0")));
|
|
38362
38597
|
}
|
|
38363
38598
|
get el() { return getElement(this); }
|
|
38364
38599
|
static get style() { return skeletonTextCss(); }
|
|
@@ -38410,7 +38645,7 @@ class Spinner {
|
|
|
38410
38645
|
svgs.push(buildLine(spinner, duration, i, spinner.lines));
|
|
38411
38646
|
}
|
|
38412
38647
|
}
|
|
38413
|
-
return (hAsync(Host, { key: '
|
|
38648
|
+
return (hAsync(Host, { key: 'c35ebd01186e860acb9cac260193f0836424fdf4', class: createColorClasses$1(self.color, {
|
|
38414
38649
|
[mode]: true,
|
|
38415
38650
|
[`spinner-${spinnerName}`]: true,
|
|
38416
38651
|
'spinner-paused': self.paused || config.getBoolean('_testing'),
|
|
@@ -38509,12 +38744,12 @@ class SplitPane {
|
|
|
38509
38744
|
}
|
|
38510
38745
|
render() {
|
|
38511
38746
|
const mode = getIonMode$1(this);
|
|
38512
|
-
return (hAsync(Host, { key: '
|
|
38747
|
+
return (hAsync(Host, { key: '694e989fafcfe2453e0a83b3cb736efaa1eb4fec', class: {
|
|
38513
38748
|
[mode]: true,
|
|
38514
38749
|
// Used internally for styling
|
|
38515
38750
|
[`split-pane-${mode}`]: true,
|
|
38516
38751
|
'split-pane-visible': this.visible,
|
|
38517
|
-
} }, hAsync("slot", { key: '
|
|
38752
|
+
} }, hAsync("slot", { key: 'dde7e9382b62cc11971aa233cf98c2314ae4f720' })));
|
|
38518
38753
|
}
|
|
38519
38754
|
get el() { return getElement(this); }
|
|
38520
38755
|
static get watchers() { return {
|
|
@@ -38586,10 +38821,10 @@ class Tab {
|
|
|
38586
38821
|
}
|
|
38587
38822
|
render() {
|
|
38588
38823
|
const { tab, active, component } = this;
|
|
38589
|
-
return (hAsync(Host, { key: '
|
|
38824
|
+
return (hAsync(Host, { key: '745262368a7f45244da459f4fa1730a46dd3e257', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
|
|
38590
38825
|
'ion-page': component === undefined,
|
|
38591
38826
|
'tab-hidden': !active,
|
|
38592
|
-
} }, hAsync("slot", { key: '
|
|
38827
|
+
} }, hAsync("slot", { key: '823d09a6f93bf7c0dc74f2b8717d1d3a62df1ad8' })));
|
|
38593
38828
|
}
|
|
38594
38829
|
get el() { return getElement(this); }
|
|
38595
38830
|
static get watchers() { return {
|
|
@@ -38703,11 +38938,11 @@ class TabBar {
|
|
|
38703
38938
|
const { color, translucent, keyboardVisible } = this;
|
|
38704
38939
|
const mode = getIonMode$1(this);
|
|
38705
38940
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
38706
|
-
return (hAsync(Host, { key: '
|
|
38941
|
+
return (hAsync(Host, { key: '148f65df0818e9d220a9b46db74cb89ab94e62d2', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses$1(color, {
|
|
38707
38942
|
[mode]: true,
|
|
38708
38943
|
'tab-bar-translucent': translucent,
|
|
38709
38944
|
'tab-bar-hidden': shouldHide,
|
|
38710
|
-
}) }, hAsync("slot", { key: '
|
|
38945
|
+
}) }, hAsync("slot", { key: 'a64e235f3703662e2dd7a834f752cc5b1490adbc' })));
|
|
38711
38946
|
}
|
|
38712
38947
|
get el() { return getElement(this); }
|
|
38713
38948
|
static get watchers() { return {
|
|
@@ -38805,7 +39040,7 @@ class TabButton {
|
|
|
38805
39040
|
rel,
|
|
38806
39041
|
target,
|
|
38807
39042
|
};
|
|
38808
|
-
return (hAsync(Host, { key: '
|
|
39043
|
+
return (hAsync(Host, { key: '1034b5a928ecec49bd8efec3730ea1b11a579cf3', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
38809
39044
|
[mode]: true,
|
|
38810
39045
|
'tab-selected': selected,
|
|
38811
39046
|
'tab-disabled': disabled,
|
|
@@ -38817,7 +39052,7 @@ class TabButton {
|
|
|
38817
39052
|
'ion-activatable': true,
|
|
38818
39053
|
'ion-selectable': true,
|
|
38819
39054
|
'ion-focusable': true,
|
|
38820
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
39055
|
+
} }, hAsync("a", Object.assign({ key: '4cc8e695425956ffc7622af27c1b88a45f8a0c68' }, 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: 'c529c166f557e1a5c744873c075b564c49786a2c', class: "button-inner" }, hAsync("slot", { key: 'f832355934d80267cd6e81e58b9c5afce0b42907' })), mode === 'md' && hAsync("ion-ripple-effect", { key: '90e79bdf38ba1cd89fca9ce63465e26a29b49316', type: "unbounded" }))));
|
|
38821
39056
|
}
|
|
38822
39057
|
get el() { return getElement(this); }
|
|
38823
39058
|
static get style() { return {
|
|
@@ -39008,7 +39243,7 @@ class Tabs {
|
|
|
39008
39243
|
return Array.from(this.el.querySelectorAll('ion-tab'));
|
|
39009
39244
|
}
|
|
39010
39245
|
render() {
|
|
39011
|
-
return (hAsync(Host, { key: '
|
|
39246
|
+
return (hAsync(Host, { key: 'ba04a29fdd02d7c758cbaa98cfc589949872d832', onIonTabButtonClick: this.onTabClicked }, hAsync("slot", { key: 'd5794140152e2c251e567eeb06afc392af74749d', name: "top" }), hAsync("div", { key: '26fb83786637fe7288901fbbdb3694b8bc94329f', class: "tabs-inner" }, hAsync("slot", { key: '60c663a8647e684455b533eaf5fa3908f9333ae9' })), hAsync("slot", { key: '2d9f7d07c8cdc72f5df200fa71fa56a9dd822c4c', name: "bottom" })));
|
|
39012
39247
|
}
|
|
39013
39248
|
get el() { return getElement(this); }
|
|
39014
39249
|
static get style() { return tabsCss(); }
|
|
@@ -39048,9 +39283,9 @@ class Text {
|
|
|
39048
39283
|
}
|
|
39049
39284
|
render() {
|
|
39050
39285
|
const mode = getIonMode$1(this);
|
|
39051
|
-
return (hAsync(Host, { key: '
|
|
39286
|
+
return (hAsync(Host, { key: '41ed8da617ed0e07bbfe96e32a000e1c6503e24e', class: createColorClasses$1(this.color, {
|
|
39052
39287
|
[mode]: true,
|
|
39053
|
-
}) }, hAsync("slot", { key: '
|
|
39288
|
+
}) }, hAsync("slot", { key: 'db8de04a2493537b3037f276b03abd92dfa56847' })));
|
|
39054
39289
|
}
|
|
39055
39290
|
static get style() { return textCss(); }
|
|
39056
39291
|
static get cmpMeta() { return {
|
|
@@ -39511,7 +39746,7 @@ class Textarea {
|
|
|
39511
39746
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
39512
39747
|
*/
|
|
39513
39748
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
39514
|
-
return (hAsync(Host, { key: '
|
|
39749
|
+
return (hAsync(Host, { key: 'eca1dfed53189408f614661ef3902cdb73d5f5de', class: createColorClasses$1(this.color, {
|
|
39515
39750
|
[mode]: true,
|
|
39516
39751
|
'has-value': hasValue,
|
|
39517
39752
|
'has-focus': hasFocus,
|
|
@@ -39520,7 +39755,7 @@ class Textarea {
|
|
|
39520
39755
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
39521
39756
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
39522
39757
|
'textarea-disabled': disabled,
|
|
39523
|
-
}) }, hAsync("label", { key: '
|
|
39758
|
+
}) }, hAsync("label", { key: 'd4d835ffedbf8b6de192096e21167ec4f7e01d30', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '39b03e26c23473de31a0237543eaf1e0875e6ed9', class: "textarea-wrapper-inner" }, hAsync("div", { key: 'e9e0997e7dc6d25f09e8439d81e138590c33a151', class: "start-slot-wrapper" }, hAsync("slot", { key: '2d88aace11d74196758e40af27a777eebb270019', name: "start" })), hAsync("div", { key: '8434424404f9fe707f9209ac6495a33bae060538', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, hAsync("textarea", Object.assign({ key: '5bb8eaeba76c39bccadb7c041a10fb077c422dcc', 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: '107707676552f8faca3e708285cc3266061a0394', class: "end-slot-wrapper" }, hAsync("slot", { key: 'dc890ffdce898f3d39a315e7bc432840559be466', name: "end" }))), shouldRenderHighlight && hAsync("div", { key: '4554ad09ac0908cea2e90bfa2301b4cd80ac7242', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
39524
39759
|
}
|
|
39525
39760
|
get el() { return getElement(this); }
|
|
39526
39761
|
static get watchers() { return {
|
|
@@ -39589,7 +39824,7 @@ class Thumbnail {
|
|
|
39589
39824
|
registerInstance(this, hostRef);
|
|
39590
39825
|
}
|
|
39591
39826
|
render() {
|
|
39592
|
-
return (hAsync(Host, { key: '
|
|
39827
|
+
return (hAsync(Host, { key: '833e947c683b482a78f8f0df8c9a68e99478bbaa', class: getIonMode$1(this) }, hAsync("slot", { key: '6d1e9e686db88d91379f14121058dbf035d8ded2' })));
|
|
39593
39828
|
}
|
|
39594
39829
|
static get style() { return thumbnailCss(); }
|
|
39595
39830
|
static get cmpMeta() { return {
|
|
@@ -40449,9 +40684,9 @@ class Toast {
|
|
|
40449
40684
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
40450
40685
|
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);
|
|
40451
40686
|
}
|
|
40452
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
40687
|
+
return (hAsync(Host, Object.assign({ key: '2acb2cd2e12ea0082986495929e4a596d4da2f38', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
40453
40688
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
40454
|
-
}, 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: '
|
|
40689
|
+
}, 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: '8b24ba5d3d51d1ab94b9bf6bb5d6e4b8bb3248a7', class: wrapperClass, part: "wrapper" }, hAsync("div", { key: 'e1ebdf4f0425cc7b1e2688667ee9a2b3c545804a', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (hAsync("ion-icon", { key: '552b1ab8f4e72882cc8e878579c7a594119677e1', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), hAsync("div", { key: '8ac8d64f632fbedadb180132c83043474466bee0', 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')))));
|
|
40455
40690
|
}
|
|
40456
40691
|
get el() { return getElement(this); }
|
|
40457
40692
|
static get watchers() { return {
|
|
@@ -40769,7 +41004,7 @@ class Toggle {
|
|
|
40769
41004
|
const value = this.getValue();
|
|
40770
41005
|
const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
|
|
40771
41006
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
40772
|
-
return (hAsync(Host, { key: '
|
|
41007
|
+
return (hAsync(Host, { key: 'ab093ddb505af61685cbb8571af1e765fc0292f8', 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, {
|
|
40773
41008
|
[mode]: true,
|
|
40774
41009
|
'in-item': hostContext('ion-item', el),
|
|
40775
41010
|
'toggle-activated': activated,
|
|
@@ -40779,10 +41014,10 @@ class Toggle {
|
|
|
40779
41014
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
40780
41015
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
40781
41016
|
[`toggle-${rtl}`]: true,
|
|
40782
|
-
}) }, hAsync("label", { key: '
|
|
41017
|
+
}) }, hAsync("label", { key: 'b4b05e458fcbc767e4392ae43e647b075780cad0', class: "toggle-wrapper", htmlFor: inputId }, hAsync("input", Object.assign({ key: 'c09100447011c51d5b49b4400ec7d72012e3bc6f', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), hAsync("div", { key: '71cf059a999ae572a20127b76907e010ace486ad', class: {
|
|
40783
41018
|
'label-text-wrapper': true,
|
|
40784
41019
|
'label-text-wrapper-hidden': !hasLabel,
|
|
40785
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '
|
|
41020
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: 'c480b96a0ddd926568f73291d71253d6f74438c7' }), this.renderHintText()), hAsync("div", { key: '96a2cbd1673e051a78f8b2b16535ecd3f0ed4339', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
40786
41021
|
}
|
|
40787
41022
|
get el() { return getElement(this); }
|
|
40788
41023
|
static get watchers() { return {
|
|
@@ -40894,10 +41129,10 @@ class Toolbar {
|
|
|
40894
41129
|
this.childrenStyles.forEach((value) => {
|
|
40895
41130
|
Object.assign(childStyles, value);
|
|
40896
41131
|
});
|
|
40897
|
-
return (hAsync(Host, { key: '
|
|
41132
|
+
return (hAsync(Host, { key: '40bad6fa7e94262438da4bbe037dcf8a5fa2df22', class: Object.assign(Object.assign({}, childStyles), createColorClasses$1(this.color, {
|
|
40898
41133
|
[mode]: true,
|
|
40899
41134
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
40900
|
-
})) }, hAsync("div", { key: '
|
|
41135
|
+
})) }, hAsync("div", { key: 'df44c9f0fe3958116ab860b0dad79c53b89f6c59', class: "toolbar-background", part: "background" }), hAsync("div", { key: '2169ffa576875b8d5624211cc0b4bf86191562bc', class: "toolbar-container", part: "container" }, hAsync("slot", { key: 'c8910dcf1ce98ab427fd89c3396a67c2a75bdd07', name: "start" }), hAsync("slot", { key: '05da24d5ef96b9eebd83b534ce02c1f7bcd06680', name: "secondary" }), hAsync("div", { key: '090fea1541e7e2b6ad74a6ded4eadffdb471ccce', class: "toolbar-content", part: "content" }, hAsync("slot", { key: '507e143f92f6fa59ff23d94026411fa2c74f2f8e' })), hAsync("slot", { key: 'f79fdee472e657e26a910cb89d7551943e40e440', name: "primary" }), hAsync("slot", { key: 'dd40fe9ed490cf4346c642e195fdb524dc6cc4f5', name: "end" }))));
|
|
40901
41136
|
}
|
|
40902
41137
|
get el() { return getElement(this); }
|
|
40903
41138
|
static get style() { return {
|
|
@@ -40943,11 +41178,11 @@ class ToolbarTitle {
|
|
|
40943
41178
|
render() {
|
|
40944
41179
|
const mode = getIonMode$1(this);
|
|
40945
41180
|
const size = this.getSize();
|
|
40946
|
-
return (hAsync(Host, { key: '
|
|
41181
|
+
return (hAsync(Host, { key: 'd9317e8e66cb6112717f5a9c252658777efbd873', class: createColorClasses$1(this.color, {
|
|
40947
41182
|
[mode]: true,
|
|
40948
41183
|
[`title-${size}`]: true,
|
|
40949
41184
|
'title-rtl': document.dir === 'rtl',
|
|
40950
|
-
}) }, hAsync("div", { key: '
|
|
41185
|
+
}) }, hAsync("div", { key: 'a4d011d6d409bf006d8efe33667002edb109820a', class: "toolbar-title" }, hAsync("slot", { key: '4ca3303b957a0e5387f1e9058e5adb4c6275afcc' }))));
|
|
40951
41186
|
}
|
|
40952
41187
|
get el() { return getElement(this); }
|
|
40953
41188
|
static get watchers() { return {
|
|
@@ -41027,10 +41262,8 @@ registerComponents([
|
|
|
41027
41262
|
Nav,
|
|
41028
41263
|
NavLink,
|
|
41029
41264
|
Note,
|
|
41030
|
-
Picker$1,
|
|
41031
41265
|
Picker,
|
|
41032
41266
|
PickerColumn,
|
|
41033
|
-
PickerColumnCmp,
|
|
41034
41267
|
PickerColumnOption,
|
|
41035
41268
|
Popover,
|
|
41036
41269
|
ProgressBar,
|