@ionic/core 9.0.3-dev.11788456135.1ab1d6cd → 9.0.3-dev.11790116791.11c9cd1e
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-accordion-group.js +1 -1
- package/components/ion-accordion.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-app.js +1 -1
- package/components/ion-avatar.js +1 -1
- package/components/ion-back-button.js +1 -1
- package/components/ion-backdrop.js +1 -1
- package/components/ion-badge.js +1 -1
- package/components/ion-breadcrumb.js +1 -1
- package/components/ion-breadcrumbs.js +1 -1
- package/components/ion-button.js +1 -1
- package/components/ion-buttons.js +1 -1
- package/components/ion-card-content.js +1 -1
- package/components/ion-card-header.js +1 -1
- package/components/ion-card-subtitle.js +1 -1
- package/components/ion-card-title.js +1 -1
- package/components/ion-card.js +1 -1
- package/components/ion-checkbox.js +1 -1
- package/components/ion-chip.js +1 -1
- package/components/ion-col.js +1 -1
- package/components/ion-content.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-divider.js +1 -1
- package/components/ion-fab-button.js +1 -1
- package/components/ion-fab-list.js +1 -1
- package/components/ion-fab.js +1 -1
- package/components/ion-footer.js +1 -1
- package/components/ion-gallery-item.js +1 -1
- package/components/ion-gallery.js +1 -1
- package/components/ion-grid.js +1 -1
- package/components/ion-header.js +1 -1
- package/components/ion-img.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-infinite-scroll.js +1 -1
- package/components/ion-input-otp.js +1 -1
- package/components/ion-input-password-toggle.js +1 -1
- package/components/ion-input.js +1 -1
- package/components/ion-item-divider.js +1 -1
- package/components/ion-item-group.js +1 -1
- package/components/ion-item-option.js +1 -1
- package/components/ion-item-options.js +1 -1
- package/components/ion-item-sliding.js +1 -1
- package/components/ion-item.js +1 -1
- package/components/ion-label.js +1 -1
- package/components/ion-list-header.js +1 -1
- package/components/ion-list.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-menu-toggle.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-nav.js +1 -1
- package/components/ion-note.js +1 -1
- package/components/ion-picker-column-option.js +1 -1
- package/components/ion-picker-column.js +1 -1
- package/components/ion-picker.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-progress-bar.js +1 -1
- package/components/ion-radio-group.js +1 -1
- package/components/ion-radio.js +1 -1
- package/components/ion-range.js +1 -1
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-refresher.js +1 -1
- package/components/ion-reorder-group.js +1 -1
- package/components/ion-reorder.js +1 -1
- package/components/ion-ripple-effect.js +1 -1
- package/components/ion-router-link.js +1 -1
- package/components/ion-router-outlet.js +1 -1
- package/components/ion-router.js +1 -1
- package/components/ion-row.js +1 -1
- package/components/ion-searchbar.js +1 -1
- package/components/ion-segment-button.js +1 -1
- package/components/ion-segment.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-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-0Zqw1uai.js +4 -0
- package/{dist/ionic/p-BqQ15K9a.js → components/p-0rXxxCTt.js} +1 -1
- package/components/{p-CTTmpA7l.js → p-3cjGQppH.js} +1 -1
- package/components/{p-W8Yq_OMR.js → p-B5AgguuG.js} +1 -1
- package/components/{p-BZmR0M4X.js → p-BNEGSmbp.js} +1 -1
- package/components/p-BSIw8XlU.js +4 -0
- package/components/{p-ZxET9sbA.js → p-BW5EN2Xi.js} +1 -1
- package/components/p-BYk20Mf5.js +4 -0
- package/components/p-BYnI-EJn.js +4 -0
- package/components/p-B_aT3oAQ.js +4 -0
- package/components/{p-CPXKIYkL.js → p-BkZBiLB3.js} +1 -1
- package/components/p-BouoWyEU.js +4 -0
- package/components/p-BqvZYIdI.js +4 -0
- package/components/p-BrRaGlll.js +4 -0
- package/components/{p-BBz0jPCg.js → p-C2CD_fhN.js} +1 -1
- package/components/{p-CsQsFkwO.js → p-C4xXkVID.js} +1 -1
- package/components/{p-VLn2Ytmp.js → p-CEKVY_H-.js} +1 -1
- package/components/{p-DkQNAyg8.js → p-CGj2vPt5.js} +1 -1
- package/components/{p-DgIAZUGe.js → p-CJp2AnUY.js} +1 -1
- package/components/p-CO6vPcgh.js +4 -0
- package/components/{p-DhBOoebx.js → p-Ce2nAsLZ.js} +1 -1
- package/components/{p-JAFy4ZHv.js → p-Cf8Sc9qN.js} +1 -1
- package/components/p-Cfk7czUn.js +4 -0
- package/components/{p-DNrr6r3I.js → p-CiRvXVG4.js} +1 -1
- package/components/p-Cl4FcpPX.js +4 -0
- package/components/{p-CtLeQL1G.js → p-CmZn5IDl.js} +1 -1
- package/components/p-D8HKWBJm.js +4 -0
- package/components/{p-EayFnjkU.js → p-D9UifuBV.js} +1 -1
- package/components/p-DBFO9oVW.js +4 -0
- package/components/{p-BGP1kR6j.js → p-DCpIv6ib.js} +1 -1
- package/components/p-DKWIsI1o.js +4 -0
- package/components/p-DQKxHcJi.js +4 -0
- package/components/p-DT2MRyId.js +4 -0
- package/components/{p-DWBpR7SJ.js → p-DdEyFcAR.js} +1 -1
- package/components/{p-DOdd_Inr.js → p-DrnBmDva.js} +1 -1
- package/components/{p-DGfjyB0v.js → p-Dsp7VCux.js} +1 -1
- package/components/p-DwTxdFPM.js +4 -0
- package/components/p-DxjhU4Lj.js +4 -0
- package/components/p-HWerNWEa.js +4 -0
- package/components/{p-D5lFNdff.js → p-M-IrAJS3.js} +1 -1
- package/components/p-Xl2x2-Ol.js +4 -0
- package/components/p-YP5ydNow.js +4 -0
- package/components/p-_FtneEj3.js +4 -0
- package/components/{p-C9cwz4xv.js → p-eDabxF6I.js} +1 -1
- package/components/p-fKHu5GWX.js +4 -0
- package/components/p-gGbm4ACs.js +4 -0
- package/components/p-hJBybumI.js +4 -0
- package/components/{p-Be00fpKV.js → p-jG41Us4a.js} +1 -1
- package/components/{p-CvRAtS4n.js → p-ndDJHQew.js} +1 -1
- package/components/p-oaWlbHN_.js +4 -0
- package/{dist/ionic/p-DpE9LgN6.js → components/p-oe85PI7E.js} +1 -1
- package/components/p-tglOeKd7.js +4 -0
- package/css/ionic/bundle.ionic.css +1 -1
- package/css/ionic/bundle.ionic.css.map +1 -1
- package/css/ionic/core.ionic.css +1 -1
- package/css/ionic/core.ionic.css.map +1 -1
- package/css/ionic/global.bundle.ionic.css +1 -1
- package/css/ionic/global.bundle.ionic.css.map +1 -1
- package/css/ionic/ionic-swiper.ionic.css +1 -1
- package/css/ionic/ionic-swiper.ionic.css.map +1 -1
- package/css/ionic/link.ionic.css +1 -1
- package/css/ionic/link.ionic.css.map +1 -1
- package/css/ionic/typography.ionic.css +1 -1
- package/css/ionic/typography.ionic.css.map +1 -1
- package/dist/cjs/{animation-DVrkairK.js → animation-Dfev6yFW.js} +1 -1
- package/dist/cjs/{app-globals-CTxe9MxF.js → app-globals-BwOspzE5.js} +1 -1
- package/dist/cjs/{button-active-B8t6YMNb.js → button-active-DfzJC914.js} +1 -1
- package/dist/cjs/{capacitor-w_r4U-_S.js → capacitor-B7dK21VK.js} +1 -1
- package/dist/cjs/{clear-button-press-controller-BKSn-dVq.js → clear-button-press-controller-B49x92PF.js} +1 -1
- package/dist/cjs/{focus-visible-BIj-I3-C.js → focus-visible-DGPRKkcx.js} +52 -2
- package/dist/cjs/{framework-delegate-Dmce7iqZ.js → framework-delegate-BKYAwcZK.js} +1 -1
- package/dist/cjs/{haptic-DZEv3V5s.js → haptic-CMs5ejXB.js} +1 -1
- package/dist/cjs/{helpers-DFJMw-qZ.js → helpers-D5NVnu5x.js} +16 -1
- package/dist/cjs/{index-DN51-BQl.js → index-6hDA5UlZ.js} +3 -3
- package/dist/cjs/{index-BoQA7njo.js → index-Byoi861q.js} +3 -3
- package/dist/cjs/{index-DWP810QI.js → index-CutlvfR4.js} +1 -1
- package/dist/cjs/{index-Bm6y0Ibt.js → index-Y8n2FvXS.js} +3 -3
- package/dist/cjs/index.cjs.js +10 -10
- package/dist/cjs/{input-shims-BFGH5o2Z.js → input-shims-SVR_4pAX.js} +6 -6
- package/dist/cjs/ion-accordion_2.cjs.entry.js +14 -19
- package/dist/cjs/ion-action-sheet.cjs.entry.js +10 -10
- package/dist/cjs/ion-alert.cjs.entry.js +13 -13
- package/dist/cjs/ion-app_8.cjs.entry.js +14 -14
- package/dist/cjs/ion-avatar_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-back-button.cjs.entry.js +14 -16
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +19 -32
- package/dist/cjs/ion-button_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-card_5.cjs.entry.js +6 -6
- package/dist/cjs/ion-checkbox.cjs.entry.js +26 -18
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime-button.cjs.entry.js +3 -3
- package/dist/cjs/ion-datetime.cjs.entry.js +20 -56
- package/dist/cjs/ion-divider.cjs.entry.js +2 -2
- package/dist/cjs/ion-fab_3.cjs.entry.js +12 -17
- package/dist/cjs/ion-gallery-item.cjs.entry.js +1 -1
- package/dist/cjs/ion-gallery.cjs.entry.js +3 -3
- package/dist/cjs/ion-img.cjs.entry.js +3 -3
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-input-otp.cjs.entry.js +4 -4
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +19 -31
- package/dist/cjs/ion-input.cjs.entry.js +17 -33
- package/dist/cjs/ion-item-option_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-item_8.cjs.entry.js +15 -20
- package/dist/cjs/ion-loading.cjs.entry.js +6 -6
- package/dist/cjs/ion-menu_3.cjs.entry.js +16 -19
- package/dist/cjs/ion-modal.cjs.entry.js +12 -12
- package/dist/cjs/ion-nav_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker-column.cjs.entry.js +5 -5
- package/dist/cjs/ion-picker.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +8 -8
- package/dist/cjs/ion-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/ion-radio_2.cjs.entry.js +5 -5
- package/dist/cjs/ion-range.cjs.entry.js +5 -5
- package/dist/cjs/ion-refresher_2.cjs.entry.js +17 -12
- package/dist/cjs/ion-reorder_2.cjs.entry.js +11 -19
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route_4.cjs.entry.js +4 -4
- package/dist/cjs/ion-searchbar.cjs.entry.js +13 -42
- package/dist/cjs/ion-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +17 -16
- package/dist/cjs/ion-select_3.cjs.entry.js +20 -44
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +9 -9
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +1 -1
- package/dist/cjs/ion-textarea.cjs.entry.js +17 -25
- package/dist/cjs/ion-toast.cjs.entry.js +7 -7
- package/dist/cjs/ion-toggle.cjs.entry.js +18 -34
- package/dist/cjs/{ionic-global-BaVLW54G.js → ionic-global-CRAqTE7M.js} +5 -5
- package/dist/cjs/ionic.cjs.js +2 -2
- package/dist/cjs/{ios.transition-Bm4N3WK1.js → ios.transition-BluJBTN6.js} +5 -5
- package/dist/cjs/{keyboard-9uOUQmB-.js → keyboard-B44EnZyJ.js} +1 -1
- package/dist/cjs/{keyboard-5cEsoK5l.js → keyboard-CR7Eg8u3.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{md.transition-Z-7hu2x1.js → md.transition-TBHPCec3.js} +5 -5
- package/dist/cjs/{overlays-Jn6TNpc3.js → overlays-B5YzPlbv.js} +5 -5
- package/dist/cjs/{scroll-hide-controller-DQ9ulQ11.js → scroll-hide-controller-Bht8yQkC.js} +3 -3
- package/dist/cjs/{slot-mutation-controller-C9i1ymbP.js → slot-mutation-controller-CinDJgCY.js} +2 -2
- package/dist/cjs/{status-tap-DT7J4fZQ.js → status-tap-Aq-o5Csp.js} +3 -3
- package/dist/cjs/{swipe-back-BIbF7bVy.js → swipe-back-Byqp-bJI.js} +2 -2
- package/dist/collection/components/accordion/accordion.ionic.css +10 -12
- package/dist/collection/components/accordion/accordion.js +9 -14
- package/dist/collection/components/accordion-group/accordion-group.ionic.css +6 -6
- package/dist/collection/components/action-sheet/action-sheet.ionic.css +22 -26
- package/dist/collection/components/alert/alert.ionic.css +46 -54
- package/dist/collection/components/alert/alert.js +3 -3
- package/dist/collection/components/avatar/avatar.ionic.css +29 -35
- package/dist/collection/components/back-button/back-button.js +11 -13
- package/dist/collection/components/backdrop/backdrop.ionic.css +1 -1
- package/dist/collection/components/badge/badge.ionic.css +15 -18
- package/dist/collection/components/breadcrumb/breadcrumb.js +16 -28
- package/dist/collection/components/button/button.ionic.css +22 -26
- package/dist/collection/components/buttons/buttons.ionic.css +1 -1
- package/dist/collection/components/card/card.ionic.css +7 -7
- package/dist/collection/components/card-content/card-content.ionic.css +3 -4
- package/dist/collection/components/card-subtitle/card-subtitle.ionic.css +4 -5
- package/dist/collection/components/checkbox/checkbox.ionic.css +51 -59
- package/dist/collection/components/checkbox/checkbox.ios.css +33 -29
- package/dist/collection/components/checkbox/checkbox.js +23 -13
- package/dist/collection/components/checkbox/checkbox.md.css +33 -29
- package/dist/collection/components/chip/chip.ionic.css +12 -13
- package/dist/collection/components/datetime/datetime.ionic.css +43 -49
- package/dist/collection/components/datetime/datetime.ios.css +5 -10
- package/dist/collection/components/datetime/datetime.js +12 -48
- package/dist/collection/components/datetime/datetime.md.css +5 -10
- package/dist/collection/components/divider/divider.ionic.css +1 -1
- package/dist/collection/components/fab-button/fab-button.js +9 -14
- package/dist/collection/components/header/header.ionic.css +1 -1
- package/dist/collection/components/input/input.ionic.css +142 -122
- package/dist/collection/components/input/input.js +11 -27
- package/dist/collection/components/input-otp/input-otp.ionic.css +29 -31
- package/dist/collection/components/input-password-toggle/input-password-toggle.ionic.css +1 -1
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +18 -28
- package/dist/collection/components/item/item.ionic.css +9 -10
- package/dist/collection/components/item/item.js +10 -15
- package/dist/collection/components/item-option/item-option.ionic.css +5 -6
- package/dist/collection/components/item-sliding/item-sliding.ionic.css +1 -1
- package/dist/collection/components/list-header/list-header.ionic.css +4 -5
- package/dist/collection/components/menu-button/menu-button.js +9 -12
- package/dist/collection/components/modal/modal.ionic.css +3 -3
- package/dist/collection/components/popover/popover.ionic.css +1 -1
- package/dist/collection/components/progress-bar/progress-bar.ionic.css +3 -3
- package/dist/collection/components/radio/radio.ionic.css +9 -10
- package/dist/collection/components/radio-group/radio-group.ionic.css +5 -6
- package/dist/collection/components/range/range.ionic.css +11 -12
- package/dist/collection/components/refresher-content/refresher-content.js +10 -4
- package/dist/collection/components/reorder/reorder.js +5 -13
- package/dist/collection/components/searchbar/searchbar.ionic.css +17 -18
- package/dist/collection/components/searchbar/searchbar.js +8 -35
- package/dist/collection/components/segment-button/segment-button.ionic.css +8 -9
- package/dist/collection/components/select/select.ionic.css +213 -105
- package/dist/collection/components/select/select.js +14 -39
- package/dist/collection/components/select-modal/select-modal.ionic.css +13 -16
- package/dist/collection/components/select-modal/select-modal.js +12 -10
- package/dist/collection/components/select-popover/select-popover.ionic.css +11 -13
- package/dist/collection/components/spinner/spinner.ionic.css +2 -2
- package/dist/collection/components/tab-bar/tab-bar.ionic.css +6 -6
- package/dist/collection/components/tab-button/tab-button.ionic.css +4 -5
- package/dist/collection/components/textarea/textarea.ionic.css +173 -128
- package/dist/collection/components/textarea/textarea.ios.css +0 -4
- package/dist/collection/components/textarea/textarea.js +13 -18
- package/dist/collection/components/textarea/textarea.md.css +0 -4
- package/dist/collection/components/title/title.ionic.css +6 -8
- package/dist/collection/components/toast/toast.ionic.css +16 -19
- package/dist/collection/components/toggle/toggle.ionic.css +14 -16
- package/dist/collection/components/toggle/toggle.js +12 -26
- package/dist/collection/components/toolbar/toolbar.ionic.css +1 -1
- package/dist/collection/utils/focus-trap.js +2 -2
- package/dist/collection/utils/focus-visible.js +51 -2
- package/dist/collection/utils/helpers.js +15 -1
- package/dist/collection/utils/overlays.js +2 -2
- package/dist/collection/utils/test/playwright/field-geometry.js +34 -0
- package/dist/collection/utils/test/playwright/index.js +1 -0
- package/dist/docs.json +60 -25
- package/dist/esm/{animation-DXpoXT3G.js → animation-CSQV6dzD.js} +1 -1
- package/dist/esm/{app-globals-gnMsODWu.js → app-globals-PWSz-l_N.js} +1 -1
- package/dist/esm/{button-active-DtDlu9-d.js → button-active-C57xZQjg.js} +1 -1
- package/dist/esm/{capacitor-CMyaZHxy.js → capacitor-DBIFQa2o.js} +1 -1
- package/dist/esm/{clear-button-press-controller-CWOPHFBc.js → clear-button-press-controller-Dd5_yhOF.js} +1 -1
- package/dist/esm/{focus-visible-vXpMhGrs.js → focus-visible-BYk20Mf5.js} +52 -3
- package/dist/esm/{framework-delegate-DUQ69ajj.js → framework-delegate-BGk11dmh.js} +1 -1
- package/dist/esm/{haptic-Dal3yCq6.js → haptic-PEF9NVXM.js} +1 -1
- package/dist/esm/{helpers-DTqW6MzS.js → helpers-COVHAPv8.js} +16 -2
- package/dist/esm/{index-CpKLzrYn.js → index-B7Bz5x4m.js} +1 -1
- package/dist/esm/{index-BqQ15K9a.js → index-BkJpfpXI.js} +1 -1
- package/dist/esm/{index-C2QkTAgc.js → index-DHp8pAEm.js} +3 -3
- package/dist/esm/{index-D_YUqPZN.js → index-Detgiv22.js} +3 -3
- package/dist/esm/{index-D76uuG8P.js → index-MCAWImIY.js} +3 -3
- package/dist/esm/index.js +10 -10
- package/dist/esm/{input-shims-DgFi_b6v.js → input-shims-rVCP_KOP.js} +6 -6
- package/dist/esm/ion-accordion_2.entry.js +15 -20
- package/dist/esm/ion-action-sheet.entry.js +10 -10
- package/dist/esm/ion-alert.entry.js +13 -13
- package/dist/esm/ion-app_8.entry.js +14 -14
- package/dist/esm/ion-avatar_3.entry.js +3 -3
- package/dist/esm/ion-back-button.entry.js +15 -17
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +20 -33
- package/dist/esm/ion-button_2.entry.js +4 -4
- package/dist/esm/ion-card_5.entry.js +6 -6
- package/dist/esm/ion-checkbox.entry.js +27 -19
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +1 -1
- package/dist/esm/ion-datetime-button.entry.js +3 -3
- package/dist/esm/ion-datetime.entry.js +21 -57
- package/dist/esm/ion-divider.entry.js +2 -2
- package/dist/esm/ion-fab_3.entry.js +13 -18
- package/dist/esm/ion-gallery-item.entry.js +1 -1
- package/dist/esm/ion-gallery.entry.js +3 -3
- package/dist/esm/ion-img.entry.js +3 -3
- package/dist/esm/ion-infinite-scroll_2.entry.js +4 -4
- package/dist/esm/ion-input-otp.entry.js +4 -4
- package/dist/esm/ion-input-password-toggle.entry.js +20 -32
- package/dist/esm/ion-input.entry.js +18 -34
- package/dist/esm/ion-item-option_3.entry.js +6 -6
- package/dist/esm/ion-item_8.entry.js +16 -21
- package/dist/esm/ion-loading.entry.js +6 -6
- package/dist/esm/ion-menu_3.entry.js +17 -20
- package/dist/esm/ion-modal.entry.js +12 -12
- package/dist/esm/ion-nav_2.entry.js +6 -6
- package/dist/esm/ion-picker-column-option.entry.js +3 -3
- package/dist/esm/ion-picker-column.entry.js +5 -5
- package/dist/esm/ion-picker.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +8 -8
- package/dist/esm/ion-progress-bar.entry.js +4 -4
- package/dist/esm/ion-radio_2.entry.js +5 -5
- package/dist/esm/ion-range.entry.js +5 -5
- package/dist/esm/ion-refresher_2.entry.js +18 -13
- package/dist/esm/ion-reorder_2.entry.js +12 -20
- package/dist/esm/ion-ripple-effect.entry.js +1 -1
- package/dist/esm/ion-route_4.entry.js +4 -4
- package/dist/esm/ion-searchbar.entry.js +14 -43
- package/dist/esm/ion-segment_2.entry.js +4 -4
- package/dist/esm/ion-select-modal.entry.js +19 -18
- package/dist/esm/ion-select_3.entry.js +21 -45
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +1 -1
- package/dist/esm/ion-tab-bar_2.entry.js +9 -9
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +1 -1
- package/dist/esm/ion-textarea.entry.js +17 -25
- package/dist/esm/ion-toast.entry.js +7 -7
- package/dist/esm/ion-toggle.entry.js +19 -35
- package/dist/esm/{ionic-global-oK2heABF.js → ionic-global-DPSBlusf.js} +5 -5
- package/dist/esm/ionic.js +2 -2
- package/dist/esm/{ios.transition-D6rsx0aJ.js → ios.transition-Dg02Css6.js} +5 -5
- package/dist/esm/{keyboard-YBye__Ay.js → keyboard-0MlGMI-U.js} +3 -3
- package/dist/esm/{keyboard-Dzp50ozz.js → keyboard-C09oMZsY.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{md.transition-0y4So3tu.js → md.transition-DWmGdm6c.js} +5 -5
- package/dist/esm/{overlays-CLlfG_qy.js → overlays-Bv7M5ll5.js} +5 -5
- package/dist/esm/{scroll-hide-controller-BUZm0jSI.js → scroll-hide-controller-Tp5xjq2E.js} +3 -3
- package/dist/esm/{slot-mutation-controller-C5Vj7Od7.js → slot-mutation-controller-PS17pZ-_.js} +2 -2
- package/dist/esm/{status-tap-VmNhEOZr.js → status-tap-_VvGTiUU.js} +3 -3
- package/dist/esm/{swipe-back-BHHiqew-.js → swipe-back-D2R5S8HL.js} +2 -2
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-3bb43e22.entry.js → p-054bdefd.entry.js} +1 -1
- package/dist/ionic/p-155f3baf.entry.js +4 -0
- package/dist/ionic/{p-2e3acd77.entry.js → p-18d55baa.entry.js} +1 -1
- package/dist/ionic/p-1d40a19c.entry.js +4 -0
- package/dist/ionic/p-221d7b0b.entry.js +4 -0
- package/dist/ionic/p-30858188.entry.js +4 -0
- package/dist/ionic/{p-924182fc.entry.js → p-3111972e.entry.js} +1 -1
- package/dist/ionic/p-323b7322.entry.js +4 -0
- package/dist/ionic/p-32ed09fe.entry.js +4 -0
- package/dist/ionic/{p-d0368d31.entry.js → p-343f72d0.entry.js} +1 -1
- package/dist/ionic/{p-db011674.entry.js → p-37faa244.entry.js} +1 -1
- package/dist/ionic/p-3966cd77.entry.js +4 -0
- package/dist/ionic/p-4030db68.entry.js +4 -0
- package/dist/ionic/p-42a054ee.entry.js +4 -0
- package/dist/ionic/{p-fdb940e3.entry.js → p-42cfdcb7.entry.js} +1 -1
- package/dist/ionic/p-44cd6a88.entry.js +4 -0
- package/dist/ionic/{p-886236f0.entry.js → p-6589a3f6.entry.js} +1 -1
- package/dist/ionic/p-68ffe393.entry.js +4 -0
- package/dist/ionic/p-6b9b6175.entry.js +4 -0
- package/dist/ionic/{p-84b5eafe.entry.js → p-6c99f6c8.entry.js} +1 -1
- package/dist/ionic/{p-dc000de0.entry.js → p-6c9d8e84.entry.js} +1 -1
- package/dist/ionic/p-6fe03c66.entry.js +4 -0
- package/dist/ionic/p-747c4c1e.entry.js +4 -0
- package/dist/ionic/p-7b769a8c.entry.js +4 -0
- package/dist/ionic/p-7e07f60d.entry.js +4 -0
- package/dist/ionic/p-7e9a0222.entry.js +4 -0
- package/dist/ionic/p-8f052ddf.entry.js +4 -0
- package/dist/ionic/p-8fb06684.entry.js +4 -0
- package/dist/ionic/p-91a7e3df.entry.js +4 -0
- package/dist/ionic/p-9344a53d.entry.js +4 -0
- package/dist/ionic/{p-55e13406.entry.js → p-93c69512.entry.js} +1 -1
- package/dist/ionic/{p-b83de44e.entry.js → p-96f73def.entry.js} +1 -1
- package/dist/ionic/p-9c0cae6a.entry.js +4 -0
- package/dist/ionic/{p-CsmXfOZY.js → p-B3Kiljjq.js} +1 -1
- package/dist/ionic/p-BN5wKnhU.js +4 -0
- package/dist/ionic/p-BQmJoNKC.js +4 -0
- package/dist/ionic/p-BYk20Mf5.js +4 -0
- package/{components/p-Cc3oC60a.js → dist/ionic/p-BkJpfpXI.js} +1 -1
- package/{components/p-CN41sVGB.js → dist/ionic/p-Bp2Gog3I.js} +1 -1
- package/dist/ionic/p-Br2aTSXv.js +4 -0
- package/dist/ionic/{p-D8HyO4-0.js → p-BxyvWHWp.js} +1 -1
- package/dist/ionic/p-C-5bbxTv.js +4 -0
- package/dist/ionic/p-CalV2EFO.js +4 -0
- package/dist/ionic/p-Ck7LvynN.js +4 -0
- package/dist/ionic/{p-BnRvdoDY.js → p-CpbV2dkG.js} +1 -1
- package/dist/ionic/p-CyqXbsry.js +4 -0
- package/dist/ionic/{p-Izgzy5eB.js → p-DAdCwTwc.js} +1 -1
- package/dist/ionic/{p-DAFzmzMJ.js → p-DWu51GL8.js} +1 -1
- package/dist/ionic/p-DYl9g-Nn.js +4 -0
- package/dist/ionic/p-DhRGeAiB.js +4 -0
- package/dist/ionic/{p-BdqFx5km.js → p-Dynoer0Z.js} +1 -1
- package/dist/ionic/p-HzpJgzPY.js +4 -0
- package/dist/ionic/{p-Cs5kzNVE.js → p-PrbehP8l.js} +1 -1
- package/dist/ionic/p-XIxYRztg.js +4 -0
- package/dist/ionic/{p-B3L20Lav.js → p-_RfHVD7s.js} +1 -1
- package/dist/ionic/{p-8a7bf6c7.entry.js → p-a69ccce3.entry.js} +1 -1
- package/dist/ionic/p-a8bce8c2.entry.js +4 -0
- package/dist/ionic/p-aa658bb9.entry.js +4 -0
- package/dist/ionic/p-ada3f6b9.entry.js +4 -0
- package/dist/ionic/p-b2d4bb26.entry.js +4 -0
- package/dist/ionic/p-b9f0ce4c.entry.js +4 -0
- package/dist/ionic/{p-30c4458b.entry.js → p-be5bc00a.entry.js} +1 -1
- package/dist/ionic/p-bfe9bfae.entry.js +4 -0
- package/dist/ionic/p-c85c7436.entry.js +4 -0
- package/dist/ionic/p-caa7801f.entry.js +4 -0
- package/dist/ionic/{p-46709a42.entry.js → p-d97fabaa.entry.js} +1 -1
- package/dist/ionic/p-da319993.entry.js +4 -0
- package/dist/ionic/p-df1c1199.entry.js +4 -0
- package/dist/ionic/{p-2c3704b9.entry.js → p-e02e6d2b.entry.js} +1 -1
- package/dist/ionic/{p-6b23289a.entry.js → p-e10326b5.entry.js} +1 -1
- package/dist/ionic/{p-d1d3048b.entry.js → p-e8e3b85f.entry.js} +1 -1
- package/dist/ionic/p-ec90ddaf.entry.js +4 -0
- package/dist/ionic/{p-cd05447f.entry.js → p-ee6708ce.entry.js} +1 -1
- package/dist/ionic/{p-e939adf3.entry.js → p-f301235c.entry.js} +1 -1
- package/dist/ionic/p-fd0666a5.entry.js +4 -0
- package/dist/ionic/{p-CP5-2cXj.js → p-j9My4oCO.js} +1 -1
- package/dist/ionic/p-pQdkMmul.js +4 -0
- package/dist/ionic/p-sXOU046_.js +4 -0
- package/dist/types/components/accordion/accordion.d.ts +7 -1
- package/dist/types/components/back-button/back-button.d.ts +8 -2
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +12 -2
- package/dist/types/components/checkbox/checkbox.d.ts +12 -1
- package/dist/types/components/datetime/datetime.d.ts +4 -4
- package/dist/types/components/fab-button/fab-button.d.ts +7 -1
- package/dist/types/components/input/input.d.ts +7 -10
- package/dist/types/components/input-password-toggle/input-password-toggle.d.ts +14 -2
- package/dist/types/components/item/item.d.ts +7 -1
- package/dist/types/components/menu-button/menu-button.d.ts +6 -1
- package/dist/types/components/refresher-content/refresher-content.d.ts +6 -0
- package/dist/types/components/reorder/reorder.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +7 -12
- package/dist/types/components/select-modal/select-modal.d.ts +6 -1
- package/dist/types/components/textarea/textarea.d.ts +8 -8
- package/dist/types/components/toggle/toggle.d.ts +5 -2
- package/dist/types/utils/config.d.ts +22 -2
- package/dist/types/utils/focus-visible.d.ts +20 -0
- package/dist/types/utils/helpers.d.ts +7 -0
- package/dist/types/utils/test/playwright/field-geometry.d.ts +13 -0
- package/dist/types/utils/test/playwright/index.d.ts +1 -0
- package/hydrate/index.js +318 -417
- package/hydrate/index.mjs +318 -417
- package/package.json +4 -5
- package/components/p-B1AK6oR-.js +0 -4
- package/components/p-B8dfyFoB.js +0 -4
- package/components/p-B9UT2JwK.js +0 -4
- package/components/p-BDqjX7Z_.js +0 -4
- package/components/p-BQUTtt8S.js +0 -4
- package/components/p-BYSs-jZz.js +0 -4
- package/components/p-BZtGrrX4.js +0 -4
- package/components/p-BdAOHgnb.js +0 -4
- package/components/p-C8aonLbo.js +0 -4
- package/components/p-CDmCFFLL.js +0 -4
- package/components/p-CPdOdJa7.js +0 -4
- package/components/p-CksPhDEa.js +0 -4
- package/components/p-Cm78Kk79.js +0 -4
- package/components/p-CmEe-Llj.js +0 -4
- package/components/p-D1t981Ih.js +0 -4
- package/components/p-D9jEKvVd.js +0 -4
- package/components/p-DG-ZC7Js.js +0 -4
- package/components/p-DJkuoL4u.js +0 -4
- package/components/p-DOoxQDxg.js +0 -4
- package/components/p-DcOWEjmv.js +0 -4
- package/components/p-DgEOEy6x.js +0 -4
- package/components/p-Dhi5xtNS.js +0 -4
- package/components/p-DtPgvez6.js +0 -4
- package/components/p-DwAij6DN.js +0 -4
- package/components/p-DzaPYdjZ.js +0 -4
- package/components/p-Dzuh_AKJ.js +0 -4
- package/components/p-Uo-TYRpE.js +0 -4
- package/components/p-cKiRADSB.js +0 -4
- package/components/p-e73ca-aN.js +0 -4
- package/components/p-fIOYmaqA.js +0 -4
- package/components/p-fh4o6dKR.js +0 -4
- package/components/p-vXpMhGrs.js +0 -4
- package/dist/cjs/caret-down-vtVgfXIs.js +0 -8
- package/dist/cjs/caret-left-CxZXLRv5.js +0 -8
- package/dist/cjs/caret-right-CRCgv98E.js +0 -8
- package/dist/cjs/list-a-7GSA6K.js +0 -8
- package/dist/cjs/x-BTF99yFH.js +0 -8
- package/dist/esm/caret-down-D1t981Ih.js +0 -6
- package/dist/esm/caret-left-fIOYmaqA.js +0 -6
- package/dist/esm/caret-right-BYSs-jZz.js +0 -6
- package/dist/esm/list-Dhi5xtNS.js +0 -6
- package/dist/esm/x-BDqjX7Z_.js +0 -6
- package/dist/ionic/p-04d96dad.entry.js +0 -4
- package/dist/ionic/p-08f20edc.entry.js +0 -4
- package/dist/ionic/p-0a924e6a.entry.js +0 -4
- package/dist/ionic/p-0f268972.entry.js +0 -4
- package/dist/ionic/p-18c6af89.entry.js +0 -4
- package/dist/ionic/p-1cc2a196.entry.js +0 -4
- package/dist/ionic/p-201f484e.entry.js +0 -4
- package/dist/ionic/p-26efcc45.entry.js +0 -4
- package/dist/ionic/p-2da21af7.entry.js +0 -4
- package/dist/ionic/p-2fc1521f.entry.js +0 -4
- package/dist/ionic/p-32be916d.entry.js +0 -4
- package/dist/ionic/p-384fb50d.entry.js +0 -4
- package/dist/ionic/p-4QzQhqmw.js +0 -4
- package/dist/ionic/p-5217eb00.entry.js +0 -4
- package/dist/ionic/p-73309d35.entry.js +0 -4
- package/dist/ionic/p-74ab5f49.entry.js +0 -4
- package/dist/ionic/p-7d2f3242.entry.js +0 -4
- package/dist/ionic/p-7e28cc53.entry.js +0 -4
- package/dist/ionic/p-83d13d56.entry.js +0 -4
- package/dist/ionic/p-854b95f9.entry.js +0 -4
- package/dist/ionic/p-8NLG9fne.js +0 -4
- package/dist/ionic/p-8dcd18cf.entry.js +0 -4
- package/dist/ionic/p-92f21db6.entry.js +0 -4
- package/dist/ionic/p-9ca59419.entry.js +0 -4
- package/dist/ionic/p-B6aOaV_m.js +0 -4
- package/dist/ionic/p-BDqjX7Z_.js +0 -4
- package/dist/ionic/p-BVv5nqxG.js +0 -4
- package/dist/ionic/p-BYSs-jZz.js +0 -4
- package/dist/ionic/p-CD4Mty1V.js +0 -4
- package/dist/ionic/p-CLVGlNRl.js +0 -4
- package/dist/ionic/p-CRbXZpID.js +0 -4
- package/dist/ionic/p-CZ-V4tB0.js +0 -4
- package/dist/ionic/p-CyXL8sF6.js +0 -4
- package/dist/ionic/p-D1ej8PMz.js +0 -4
- package/dist/ionic/p-D1t981Ih.js +0 -4
- package/dist/ionic/p-Dhi5xtNS.js +0 -4
- package/dist/ionic/p-DvXo4Ng9.js +0 -4
- package/dist/ionic/p-ac4ea8db.entry.js +0 -4
- package/dist/ionic/p-b10dc124.entry.js +0 -4
- package/dist/ionic/p-b411d90d.entry.js +0 -4
- package/dist/ionic/p-b7ce4a50.entry.js +0 -4
- package/dist/ionic/p-c7035f3f.entry.js +0 -4
- package/dist/ionic/p-c91fc9d4.entry.js +0 -4
- package/dist/ionic/p-cd4791d5.entry.js +0 -4
- package/dist/ionic/p-ce1ab874.entry.js +0 -4
- package/dist/ionic/p-e9480e7f.entry.js +0 -4
- package/dist/ionic/p-e9fdff49.entry.js +0 -4
- package/dist/ionic/p-f29b784f.entry.js +0 -4
- package/dist/ionic/p-f82b13a6.entry.js +0 -4
- package/dist/ionic/p-fIOYmaqA.js +0 -4
- package/dist/ionic/p-psKsVoNI.js +0 -4
- package/dist/ionic/p-si7ttuvL.js +0 -4
- package/dist/ionic/p-vXpMhGrs.js +0 -4
|
@@ -25,6 +25,9 @@ import { getCounterText } from "../input/input.utils";
|
|
|
25
25
|
* @part error-text - Supporting text displayed beneath the textarea label when the textarea is invalid and touched.
|
|
26
26
|
* @part counter - The character counter displayed when the counter property is set.
|
|
27
27
|
* @part bottom - The container element for helper text, error text, and counter.
|
|
28
|
+
* @part start - The wrapper element for the content in the start slot.
|
|
29
|
+
* @part control - The wrapper element containing the label and the native textarea. The `"ionic"` theme flattens this wrapper, so it cannot be given a box of its own there.
|
|
30
|
+
* @part end - The wrapper element for the content in the end slot.
|
|
28
31
|
*/
|
|
29
32
|
export class Textarea {
|
|
30
33
|
constructor() {
|
|
@@ -528,32 +531,24 @@ export class Textarea {
|
|
|
528
531
|
const { inputId, disabled } = this;
|
|
529
532
|
return (h("textarea", { class: "native-textarea", part: "native", 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 }, this.getValue()));
|
|
530
533
|
}
|
|
531
|
-
/**
|
|
532
|
-
* The ionic theme keeps the label above a field box that wraps the slots and
|
|
533
|
-
* the textarea, so the label can size independently of the slotted content.
|
|
534
|
-
*/
|
|
535
534
|
renderStartContainer() {
|
|
536
|
-
return (h("div", { key: "start", class: "textarea-start", ref: (el) => (this.startContainerEl = el) }, h("slot", { name: "start" })));
|
|
535
|
+
return (h("div", { key: "start", class: "textarea-start", part: "start", ref: (el) => (this.startContainerEl = el) }, h("slot", { name: "start" })));
|
|
537
536
|
}
|
|
538
537
|
renderEndContainer() {
|
|
539
|
-
return (h("div", { key: "end", class: "textarea-end" }, h("slot", { name: "end" })));
|
|
540
|
-
}
|
|
541
|
-
renderIonicField() {
|
|
542
|
-
return [
|
|
543
|
-
this.renderLabel(),
|
|
544
|
-
h("div", { key: "inner", class: "textarea-wrapper-inner" }, this.getFill() === 'outline' && h("div", { key: "outline", class: "textarea-outline" }), this.renderStartContainer(), h("div", { key: "control", class: "textarea-control" }, h("div", { class: "native-wrapper", ref: (el) => (this.textareaWrapper = el), part: "container" }, this.renderNativeTextarea())), this.renderEndContainer()),
|
|
545
|
-
];
|
|
538
|
+
return (h("div", { key: "end", class: "textarea-end", part: "end" }, h("slot", { name: "end" })));
|
|
546
539
|
}
|
|
547
540
|
/**
|
|
548
|
-
*
|
|
549
|
-
*
|
|
541
|
+
* Every theme renders the same label and control structure, aside from the md
|
|
542
|
+
* outline container below. The label is nested alongside the textarea so the
|
|
543
|
+
* ios and md floating label can escape the control and clear the start and
|
|
544
|
+
* end slots. The ionic theme lifts it outside the field with grid instead.
|
|
550
545
|
*/
|
|
551
|
-
|
|
546
|
+
renderField() {
|
|
552
547
|
const hasOutlineFill = getIonTheme(this) === 'md' && this.getFill() === 'outline';
|
|
553
548
|
return [
|
|
554
549
|
hasOutlineFill && this.renderOutlineContainer(),
|
|
555
550
|
this.renderStartContainer(),
|
|
556
|
-
h("div", { key: "control", class: "textarea-control" }, this.renderLabel(), h("div", { class: "native-wrapper", ref: (el) => (this.textareaWrapper = el), part: "container" }, this.renderNativeTextarea())),
|
|
551
|
+
h("div", { key: "control", class: "textarea-control", part: "control" }, this.renderLabel(), h("div", { class: "native-wrapper", ref: (el) => (this.textareaWrapper = el), part: "container" }, this.renderNativeTextarea())),
|
|
557
552
|
this.renderEndContainer(),
|
|
558
553
|
];
|
|
559
554
|
}
|
|
@@ -616,7 +611,7 @@ export class Textarea {
|
|
|
616
611
|
* the textarea has a value or is focused.
|
|
617
612
|
*/
|
|
618
613
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus));
|
|
619
|
-
return (h(Host, { key: '
|
|
614
|
+
return (h(Host, { key: '696d649f4d05739857823887be65ae9252ba77dc', class: createColorClasses(this.color, {
|
|
620
615
|
[theme]: true,
|
|
621
616
|
'has-value': hasValue,
|
|
622
617
|
'has-focus': hasFocus,
|
|
@@ -628,7 +623,7 @@ export class Textarea {
|
|
|
628
623
|
'in-item': inItem,
|
|
629
624
|
'textarea-disabled': disabled,
|
|
630
625
|
'textarea-readonly': readonly,
|
|
631
|
-
}) }, h("label", { key: '
|
|
626
|
+
}) }, h("label", { key: '61e64a211779e73def2b5d55a19dfc2f76463968', class: "textarea-wrapper", htmlFor: inputId, onMouseDown: this.onLabelPointerDown, onClick: this.onLabelClick, part: "wrapper" }, this.renderField(), shouldRenderHighlight && h("div", { key: '4ada5405635e1155e6b750ed797fd1ab82e6b314', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
632
627
|
}
|
|
633
628
|
static get is() { return "ion-textarea"; }
|
|
634
629
|
static get encapsulation() { return "shadow"; }
|
|
@@ -107,21 +107,19 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
:host {
|
|
110
|
+
font-family: var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");
|
|
110
111
|
font-size: var(--token-font-size-450, 1.125rem);
|
|
111
112
|
font-weight: var(--token-font-weight-medium, 500);
|
|
112
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0
|
|
113
|
-
line-height: var(--token-font-line-height-700,
|
|
114
|
-
text-decoration: none;
|
|
115
|
-
text-transform: none;
|
|
113
|
+
letter-spacing: var(--token-font-letter-spacing-0, 0);
|
|
114
|
+
line-height: var(--token-font-line-height-700, 1.75rem);
|
|
116
115
|
box-sizing: border-box;
|
|
117
116
|
pointer-events: none;
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
:host(.title-large) {
|
|
120
|
+
font-family: var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");
|
|
121
121
|
font-size: var(--token-font-size-700, 1.75rem);
|
|
122
122
|
font-weight: var(--token-font-weight-medium, 500);
|
|
123
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0
|
|
124
|
-
line-height: var(--token-font-line-height-900,
|
|
125
|
-
text-decoration: none;
|
|
126
|
-
text-transform: none;
|
|
123
|
+
letter-spacing: var(--token-font-letter-spacing-0, 0);
|
|
124
|
+
line-height: var(--token-font-line-height-900, 2.25rem);
|
|
127
125
|
}
|
|
@@ -235,16 +235,15 @@
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
:host {
|
|
238
|
-
--box-shadow: var(--token-elevation-4, 0px
|
|
238
|
+
--box-shadow: var(--token-elevation-4, var(--token-shadow-offset-0, 0px) var(--token-shadow-offset-15, 15px) var(--token-shadow-blur-48, 48px) var(--token-shadow-spread-0, 0px) var(--token-shadow-7, rgba(0, 0, 0, 0.1803921569)), var(--token-shadow-offset-0, 0px) var(--token-shadow-offset-3, 3px) var(--token-shadow-blur-12, 12px) var(--token-shadow-spread-0, 0px) var(--token-shadow-5, rgba(0, 0, 0, 0.1215686275)));
|
|
239
239
|
--max-width: 343px;
|
|
240
240
|
--start: var(--token-space-200, var(--token-scale-200, 8px));
|
|
241
241
|
--end: var(--token-space-200, var(--token-scale-200, 8px));
|
|
242
|
+
font-family: var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");
|
|
242
243
|
font-size: var(--token-font-size-350, 0.875rem);
|
|
243
244
|
font-weight: var(--token-font-weight-medium, 500);
|
|
244
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0
|
|
245
|
-
line-height: var(--token-font-line-height-600,
|
|
246
|
-
text-decoration: none;
|
|
247
|
-
text-transform: none;
|
|
245
|
+
letter-spacing: var(--token-font-letter-spacing-0, 0);
|
|
246
|
+
line-height: var(--token-font-line-height-600, 1.5rem);
|
|
248
247
|
z-index: 1001;
|
|
249
248
|
}
|
|
250
249
|
|
|
@@ -302,12 +301,11 @@
|
|
|
302
301
|
}
|
|
303
302
|
|
|
304
303
|
.toast-header {
|
|
304
|
+
font-family: var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");
|
|
305
305
|
font-size: var(--token-font-size-450, 1.125rem);
|
|
306
306
|
font-weight: var(--token-font-weight-medium, 500);
|
|
307
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0
|
|
308
|
-
line-height: var(--token-font-line-height-700,
|
|
309
|
-
text-decoration: none;
|
|
310
|
-
text-transform: none;
|
|
307
|
+
letter-spacing: var(--token-font-letter-spacing-0, 0);
|
|
308
|
+
line-height: var(--token-font-line-height-700, 1.75rem);
|
|
311
309
|
}
|
|
312
310
|
|
|
313
311
|
.toast-layout-baseline .toast-button-group-start {
|
|
@@ -333,12 +331,11 @@
|
|
|
333
331
|
}
|
|
334
332
|
|
|
335
333
|
.toast-button {
|
|
334
|
+
font-family: var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");
|
|
336
335
|
font-size: var(--token-font-size-350, 0.875rem);
|
|
337
336
|
font-weight: var(--token-font-weight-regular, 400);
|
|
338
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0
|
|
339
|
-
line-height: var(--token-font-line-height-600,
|
|
340
|
-
text-decoration: none;
|
|
341
|
-
text-transform: none;
|
|
337
|
+
letter-spacing: var(--token-font-letter-spacing-0, 0);
|
|
338
|
+
line-height: var(--token-font-line-height-600, 1.5rem);
|
|
342
339
|
padding-left: 0;
|
|
343
340
|
padding-right: 0;
|
|
344
341
|
padding-top: 0;
|
|
@@ -362,8 +359,8 @@
|
|
|
362
359
|
}
|
|
363
360
|
|
|
364
361
|
:host(.toast-hue-bold) {
|
|
365
|
-
--background: var(--token-bg-neutral-boldest-default, var(--token-primitives-neutral-1200, #
|
|
366
|
-
--background-activated: var(--token-bg-neutral-boldest-press, var(--token-primitives-base-black, #
|
|
362
|
+
--background: var(--token-bg-neutral-boldest-default, var(--token-primitives-neutral-1200, #242528));
|
|
363
|
+
--background-activated: var(--token-bg-neutral-boldest-press, var(--token-primitives-base-black, #131518));
|
|
367
364
|
--color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
368
365
|
--button-color: var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));
|
|
369
366
|
}
|
|
@@ -379,13 +376,13 @@
|
|
|
379
376
|
|
|
380
377
|
:host(.toast-hue-subtle) {
|
|
381
378
|
--background: var(--token-bg-neutral-subtlest-default, var(--token-primitives-base-white, #ffffff));
|
|
382
|
-
--background-activated: var(--token-bg-neutral-subtlest-press, var(--token-primitives-neutral-200, #
|
|
383
|
-
--color: var(--token-text-default, var(--token-primitives-neutral-1200, #
|
|
384
|
-
--button-color: var(--token-text-link-default, var(--token-semantics-primary-
|
|
379
|
+
--background-activated: var(--token-bg-neutral-subtlest-press, var(--token-primitives-neutral-200, #ebeef2));
|
|
380
|
+
--color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
381
|
+
--button-color: var(--token-text-link-default, var(--token-semantics-primary-800, var(--token-primitives-blue-800, #0f54da)));
|
|
385
382
|
}
|
|
386
383
|
|
|
387
384
|
:host(.toast-hue-subtle) .toast-button-cancel {
|
|
388
|
-
color: var(--token-icon-subtlest, var(--token-primitives-neutral-800, #
|
|
385
|
+
color: var(--token-icon-subtlest, var(--token-primitives-neutral-800, #6c727a));
|
|
389
386
|
}
|
|
390
387
|
|
|
391
388
|
:host(.toast-hue-subtle.ion-color) .toast-wrapper {
|
|
@@ -370,10 +370,10 @@ input {
|
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
:host {
|
|
373
|
-
--track-background: var(--token-primitives-neutral-500, #
|
|
373
|
+
--track-background: var(--token-primitives-neutral-500, #9fa5ad);
|
|
374
374
|
--track-background-checked: var(--ion-color-primary, var(--token-bg-primary-base-default, var(--token-semantics-primary-base, var(--token-semantics-primary-700, var(--token-primitives-blue-700, #105cef)))));
|
|
375
375
|
--border-radius: var(--token-border-radius-full, 999px);
|
|
376
|
-
--focus-ring-color: var(--token-border-focus-default, var(--token-primitives-blue-400, #b5c0f7));
|
|
376
|
+
--focus-ring-color: var(--token-border-focus-default, var(--token-semantics-primary-400, var(--token-primitives-blue-400, #b5c0f7)));
|
|
377
377
|
--focus-ring-width: var(--token-border-size-050, var(--token-scale-050, 2px));
|
|
378
378
|
--handle-background: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
|
|
379
379
|
--handle-background-checked: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
|
|
@@ -384,12 +384,11 @@ input {
|
|
|
384
384
|
--handle-spacing: var(--token-space-050, var(--token-scale-050, 2px));
|
|
385
385
|
--handle-transition: transform 300ms, width 120ms ease-in-out 80ms, left 110ms ease-in-out 80ms,
|
|
386
386
|
right 110ms ease-in-out 80ms;
|
|
387
|
+
font-family: var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");
|
|
387
388
|
font-size: var(--token-font-size-350, 0.875rem);
|
|
388
389
|
font-weight: var(--token-font-weight-regular, 400);
|
|
389
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0
|
|
390
|
-
line-height: var(--token-font-line-height-600,
|
|
391
|
-
text-decoration: none;
|
|
392
|
-
text-transform: none;
|
|
390
|
+
letter-spacing: var(--token-font-letter-spacing-0, 0);
|
|
391
|
+
line-height: var(--token-font-line-height-600, 1.5rem);
|
|
393
392
|
z-index: 2;
|
|
394
393
|
}
|
|
395
394
|
|
|
@@ -413,24 +412,23 @@ input {
|
|
|
413
412
|
}
|
|
414
413
|
|
|
415
414
|
.toggle-bottom {
|
|
415
|
+
font-family: var(--token-font-family, -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol");
|
|
416
416
|
font-size: var(--token-font-size-300, 0.75rem);
|
|
417
417
|
font-weight: var(--token-font-weight-medium, 500);
|
|
418
|
-
letter-spacing: var(--token-font-letter-spacing-0, 0
|
|
419
|
-
line-height: var(--token-font-line-height-500,
|
|
420
|
-
text-decoration: none;
|
|
421
|
-
text-transform: none;
|
|
418
|
+
letter-spacing: var(--token-font-letter-spacing-0, 0);
|
|
419
|
+
line-height: var(--token-font-line-height-500, 1.25rem);
|
|
422
420
|
}
|
|
423
421
|
|
|
424
422
|
.toggle-bottom .error-text {
|
|
425
|
-
color: var(--token-text-danger, var(--token-semantics-danger-
|
|
423
|
+
color: var(--token-text-danger, var(--token-semantics-danger-800, var(--token-primitives-red-800, #d2002b)));
|
|
426
424
|
}
|
|
427
425
|
|
|
428
426
|
.toggle-bottom .helper-text {
|
|
429
|
-
color: var(--token-text-subtlest, var(--token-primitives-neutral-800, #
|
|
427
|
+
color: var(--token-text-subtlest, var(--token-primitives-neutral-800, #6c727a));
|
|
430
428
|
}
|
|
431
429
|
|
|
432
430
|
:host(.ion-focused) .toggle-icon {
|
|
433
|
-
outline: var(--focus-ring-width)
|
|
431
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
434
432
|
outline-offset: var(--focus-ring-width);
|
|
435
433
|
}
|
|
436
434
|
|
|
@@ -439,7 +437,7 @@ input {
|
|
|
439
437
|
}
|
|
440
438
|
|
|
441
439
|
:host(.ion-activated) .toggle-icon {
|
|
442
|
-
background: var(--token-bg-neutral-base-press, var(--token-primitives-neutral-
|
|
440
|
+
background: var(--token-bg-neutral-base-press, var(--token-primitives-neutral-500, #9fa5ad));
|
|
443
441
|
}
|
|
444
442
|
|
|
445
443
|
:host(.ion-activated.toggle-checked) .toggle-icon {
|
|
@@ -462,7 +460,7 @@ input {
|
|
|
462
460
|
display: flex;
|
|
463
461
|
align-items: center;
|
|
464
462
|
justify-content: center;
|
|
465
|
-
color: var(--token-text-default, var(--token-primitives-neutral-1200, #
|
|
463
|
+
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
466
464
|
}
|
|
467
465
|
|
|
468
466
|
.toggle-inner .toggle-switch-icon {
|
|
@@ -488,7 +486,7 @@ input {
|
|
|
488
486
|
margin-inline-start: 0;
|
|
489
487
|
-webkit-margin-end: var(--token-space-400, var(--token-scale-400, 16px));
|
|
490
488
|
margin-inline-end: var(--token-space-400, var(--token-scale-400, 16px));
|
|
491
|
-
color: var(--token-text-default, var(--token-primitives-neutral-1200, #
|
|
489
|
+
color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
492
490
|
}
|
|
493
491
|
|
|
494
492
|
/**
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import checkRegular from "@phosphor-icons/core/assets/regular/check.svg";
|
|
5
|
-
import minusRegular from "@phosphor-icons/core/assets/regular/minus.svg";
|
|
6
4
|
import { Build, Host, forceUpdate, h } from "@stencil/core";
|
|
7
5
|
import { checkInvalidState, createItemMultipleInputsObserver } from "../../utils/forms/index";
|
|
8
6
|
import { renderHiddenInput, inheritAriaAttributes } from "../../utils/helpers";
|
|
@@ -249,22 +247,17 @@ export class Toggle {
|
|
|
249
247
|
setFocus() {
|
|
250
248
|
this.el.focus();
|
|
251
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* Get the default icon to use for the checked icon based on the theme.
|
|
252
|
+
*/
|
|
252
253
|
get toggleDefaultCheckedIcon() {
|
|
253
|
-
// Determine the theme and map to default
|
|
254
|
+
// Determine the theme and map to the default icon
|
|
254
255
|
const theme = getIonTheme(this);
|
|
255
|
-
|
|
256
|
-
ios: removeOutline,
|
|
257
|
-
ionic: checkRegular,
|
|
258
|
-
md: checkmarkOutline,
|
|
259
|
-
};
|
|
260
|
-
// Get the default icon based on the theme, falling back to 'md' icon if necessary
|
|
261
|
-
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
|
|
262
|
-
// Return the default icon
|
|
263
|
-
return defaultIcon;
|
|
256
|
+
return theme === 'ios' ? removeOutline : checkmarkOutline;
|
|
264
257
|
}
|
|
265
258
|
/**
|
|
266
259
|
* Get the icon to use for the checked icon.
|
|
267
|
-
*
|
|
260
|
+
* Use the icon set in the config.
|
|
268
261
|
* If no icon is set in the config, use the default icon.
|
|
269
262
|
*/
|
|
270
263
|
get toggleCheckedIcon() {
|
|
@@ -272,20 +265,13 @@ export class Toggle {
|
|
|
272
265
|
}
|
|
273
266
|
/**
|
|
274
267
|
* Get the icon to use for the unchecked icon.
|
|
275
|
-
*
|
|
268
|
+
* Use the icon set in the config.
|
|
276
269
|
* If no icon is set in the config, use the default icon.
|
|
277
270
|
*/
|
|
278
271
|
get toggleUncheckedIcon() {
|
|
279
|
-
// Determine the theme and map to default
|
|
272
|
+
// Determine the theme and map to the default icon
|
|
280
273
|
const theme = getIonTheme(this);
|
|
281
|
-
const
|
|
282
|
-
ios: ellipseOutline,
|
|
283
|
-
ionic: minusRegular,
|
|
284
|
-
md: removeOutline,
|
|
285
|
-
};
|
|
286
|
-
// Get the default icon based on the theme, falling back to 'md' icon if necessary
|
|
287
|
-
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
|
|
288
|
-
// Return the configured toggle unchecked icon or the default icon
|
|
274
|
+
const defaultIcon = theme === 'ios' ? ellipseOutline : removeOutline;
|
|
289
275
|
return config.get('toggleUncheckedIcon', defaultIcon);
|
|
290
276
|
}
|
|
291
277
|
renderOnOffSwitchLabels(checked) {
|
|
@@ -354,7 +340,7 @@ export class Toggle {
|
|
|
354
340
|
// The attributes are matched too because the class needs the item to render.
|
|
355
341
|
const inClickableItem = hostContext('ion-item.ion-activatable, ion-item[button], ion-item[href]', el);
|
|
356
342
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
357
|
-
return (h(Host, { key: '
|
|
343
|
+
return (h(Host, { key: '030fcdcc6074a283de193a04b4c52a9dda2a89b3', 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(color, {
|
|
358
344
|
[theme]: true,
|
|
359
345
|
'in-item': inItem,
|
|
360
346
|
// `ion-focusable` has to stay on because it is what makes the item focusable.
|
|
@@ -369,10 +355,10 @@ export class Toggle {
|
|
|
369
355
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
370
356
|
[`toggle-${rtl}`]: true,
|
|
371
357
|
'ion-activatable': isIonicTheme,
|
|
372
|
-
}) }, h("label", { key: '
|
|
358
|
+
}) }, h("label", { key: '1d7d4f534661093ea5ea7c885ca7ba355983ff88', class: "toggle-wrapper", htmlFor: inputId }, h("input", { key: '43de25ac1c815db634915c302c934d0827b32b4c', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required, ...inheritedAttributes }), h("div", { key: '9ed1fd6cd5b912b25628a2e2c29f0d758e0a7a24', class: {
|
|
373
359
|
'label-text-wrapper': true,
|
|
374
360
|
'label-text-wrapper-hidden': !hasLabel,
|
|
375
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
361
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '0b7834f1e125d8a9c0acc7577f344812ccaf52fe' }), this.renderHintText()), h("div", { key: '16bebe3d305cccbfcf4d85eb16ac3fe94ae2c59c', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
376
362
|
}
|
|
377
363
|
static get is() { return "ion-toggle"; }
|
|
378
364
|
static get encapsulation() { return "shadow"; }
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
*/
|
|
161
161
|
:host {
|
|
162
162
|
--background: var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));
|
|
163
|
-
--color: var(--token-text-default, var(--token-primitives-neutral-1200, #
|
|
163
|
+
--color: var(--token-text-default, var(--token-primitives-neutral-1200, #242528));
|
|
164
164
|
--border-color: currentColor;
|
|
165
165
|
--padding-top: var(--token-space-200, var(--token-scale-200, 8px));
|
|
166
166
|
--padding-bottom: var(--token-space-200, var(--token-scale-200, 8px));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { focusRedirectedElement } from "./helpers";
|
|
5
5
|
/**
|
|
6
6
|
* This query string selects elements that
|
|
7
7
|
* are eligible to receive focus. We select
|
|
@@ -85,7 +85,7 @@ const focusElementInContext = (hostToFocus, fallbackElement) => {
|
|
|
85
85
|
radioGroup.setFocus();
|
|
86
86
|
}
|
|
87
87
|
else {
|
|
88
|
-
|
|
88
|
+
focusRedirectedElement(elementToFocus);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
else {
|
|
@@ -39,9 +39,36 @@ export const focusElements = (elements) => {
|
|
|
39
39
|
const focusVisible = getOrInitFocusVisibleUtility();
|
|
40
40
|
focusVisible.setFocus(elements);
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* Reports whether the most recent interaction on the page was keyboard-driven.
|
|
44
|
+
*
|
|
45
|
+
* Check this before drawing the keyboard focus indicator programmatically.
|
|
46
|
+
*
|
|
47
|
+
* @returns `true` while the user is navigating with a keyboard, and before the
|
|
48
|
+
* first interaction on the page.
|
|
49
|
+
*/
|
|
50
|
+
export const isKeyboardMode = () => getOrInitFocusVisibleUtility().isKeyboardMode();
|
|
51
|
+
/**
|
|
52
|
+
* Watches how the user is interacting with the page and marks the focused
|
|
53
|
+
* element with `ion-focused`, so the keyboard focus indicator is only drawn
|
|
54
|
+
* while the user navigates with a keyboard.
|
|
55
|
+
*
|
|
56
|
+
* @param rootEl Scopes the utility to this element's shadow root, so it only
|
|
57
|
+
* reacts to interactions inside it. Omit it to listen on the document.
|
|
58
|
+
* @returns `setFocus` to mark elements focused programmatically, and `destroy`
|
|
59
|
+
* to detach the listeners.
|
|
60
|
+
*/
|
|
42
61
|
export const startFocusVisible = (rootEl) => {
|
|
43
62
|
let currentFocus = [];
|
|
63
|
+
/*
|
|
64
|
+
* Starts as `true` so an element focused before the user has interacted,
|
|
65
|
+
* such as one focused on page load, still draws an indicator.
|
|
66
|
+
*/
|
|
44
67
|
let keyboardMode = true;
|
|
68
|
+
/*
|
|
69
|
+
* `ref` is where the listeners go and `root` is the element focus falls back
|
|
70
|
+
* to once it leaves everything inside `ref`.
|
|
71
|
+
*/
|
|
45
72
|
const ref = rootEl ? rootEl.shadowRoot : document;
|
|
46
73
|
const root = rootEl ? rootEl : document.body;
|
|
47
74
|
const setFocus = (elements) => {
|
|
@@ -53,12 +80,24 @@ export const startFocusVisible = (rootEl) => {
|
|
|
53
80
|
keyboardMode = false;
|
|
54
81
|
setFocus([]);
|
|
55
82
|
};
|
|
83
|
+
/*
|
|
84
|
+
* Only the keys that move focus keep the indicator on. Any other key means
|
|
85
|
+
* the user is typing into the focused element rather than navigating, so the
|
|
86
|
+
* indicator is dropped.
|
|
87
|
+
*/
|
|
56
88
|
const onKeydown = (ev) => {
|
|
57
89
|
keyboardMode = FOCUS_KEYS.includes(ev.key);
|
|
58
90
|
if (!keyboardMode) {
|
|
59
91
|
setFocus([]);
|
|
60
92
|
}
|
|
61
93
|
};
|
|
94
|
+
/*
|
|
95
|
+
* The indicator does not always belong to the element that took focus. The
|
|
96
|
+
* composed path is walked so every `ion-focusable` ancestor is marked too,
|
|
97
|
+
* which is how an `ion-item` draws the indicator for a checkbox slotted into
|
|
98
|
+
* it, since a checkbox in an item drops the class itself. The composed path
|
|
99
|
+
* is used because it reaches hosts across shadow boundaries.
|
|
100
|
+
*/
|
|
62
101
|
const onFocusin = (ev) => {
|
|
63
102
|
if (keyboardMode && ev.composedPath !== undefined) {
|
|
64
103
|
const toFocus = ev.composedPath().filter((el) => {
|
|
@@ -71,18 +110,27 @@ export const startFocusVisible = (rootEl) => {
|
|
|
71
110
|
setFocus(toFocus);
|
|
72
111
|
}
|
|
73
112
|
};
|
|
113
|
+
/*
|
|
114
|
+
* Focus landing back on `root` means it left every focusable element, so
|
|
115
|
+
* nothing should stay marked. Focus moving between elements is left alone
|
|
116
|
+
* because `onFocusin` marks the new one.
|
|
117
|
+
*/
|
|
74
118
|
const onFocusout = () => {
|
|
75
119
|
if (ref.activeElement === root) {
|
|
76
120
|
setFocus([]);
|
|
77
121
|
}
|
|
78
122
|
};
|
|
79
|
-
|
|
123
|
+
/*
|
|
124
|
+
* Capture phase, so the mode is current for the overlay focus trap, which
|
|
125
|
+
* intercepts Tab in its own capture listener.
|
|
126
|
+
*/
|
|
127
|
+
ref.addEventListener('keydown', onKeydown, true);
|
|
80
128
|
ref.addEventListener('focusin', onFocusin);
|
|
81
129
|
ref.addEventListener('focusout', onFocusout);
|
|
82
130
|
ref.addEventListener('touchstart', pointerDown, { passive: true });
|
|
83
131
|
ref.addEventListener('mousedown', pointerDown);
|
|
84
132
|
const destroy = () => {
|
|
85
|
-
ref.removeEventListener('keydown', onKeydown);
|
|
133
|
+
ref.removeEventListener('keydown', onKeydown, true);
|
|
86
134
|
ref.removeEventListener('focusin', onFocusin);
|
|
87
135
|
ref.removeEventListener('focusout', onFocusout);
|
|
88
136
|
ref.removeEventListener('touchstart', pointerDown);
|
|
@@ -91,5 +139,6 @@ export const startFocusVisible = (rootEl) => {
|
|
|
91
139
|
return {
|
|
92
140
|
destroy,
|
|
93
141
|
setFocus,
|
|
142
|
+
isKeyboardMode: () => keyboardMode,
|
|
94
143
|
};
|
|
95
144
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { focusElements } from "./focus-visible";
|
|
4
|
+
import { focusElements, isKeyboardMode } from "./focus-visible";
|
|
5
5
|
import { printIonError } from "./logging/index";
|
|
6
6
|
import { isRTL } from "./rtl/index";
|
|
7
7
|
import { config } from "../global/config";
|
|
@@ -275,6 +275,20 @@ export const focusVisibleElement = (el) => {
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
|
+
/**
|
|
279
|
+
* Focuses an element a focus trap is redirecting focus to. Only draws the
|
|
280
|
+
* keyboard focus indicator when the user is navigating with a keyboard, so a
|
|
281
|
+
* redirect caused by a tap or click does not leave the element looking as
|
|
282
|
+
* though it was tabbed to.
|
|
283
|
+
*/
|
|
284
|
+
export const focusRedirectedElement = (el) => {
|
|
285
|
+
if (isKeyboardMode()) {
|
|
286
|
+
focusVisibleElement(el);
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
el.focus();
|
|
290
|
+
}
|
|
291
|
+
};
|
|
278
292
|
/**
|
|
279
293
|
* Clears the keyboard focus ring (`ion-focused`) that the focus-visible
|
|
280
294
|
* utility may have applied to elements during a programmatic focus.
|
|
@@ -10,7 +10,7 @@ import { getIonMode, getIonTheme } from "../global/ionic-global";
|
|
|
10
10
|
import { CoreDelegate } from "./framework-delegate";
|
|
11
11
|
import { BACKDROP_NO_SCROLL } from "./gesture/gesture-controller";
|
|
12
12
|
import { OVERLAY_BACK_BUTTON_PRIORITY } from "./hardware-back-button";
|
|
13
|
-
import { addEventListener, componentOnReady, focusVisibleElement, getElementRoot, removeEventListener, } from "./helpers";
|
|
13
|
+
import { addEventListener, componentOnReady, focusRedirectedElement, focusVisibleElement, getElementRoot, removeEventListener, } from "./helpers";
|
|
14
14
|
let lastOverlayIndex = 0;
|
|
15
15
|
let lastId = 0;
|
|
16
16
|
export const activeAnimations = new WeakMap();
|
|
@@ -230,7 +230,7 @@ const focusElementInOverlay = (hostToFocus, overlay) => {
|
|
|
230
230
|
elementToFocus = shadowRoot.querySelector(focusableQueryString) || hostToFocus;
|
|
231
231
|
}
|
|
232
232
|
if (elementToFocus) {
|
|
233
|
-
|
|
233
|
+
focusRedirectedElement(elementToFocus);
|
|
234
234
|
}
|
|
235
235
|
else {
|
|
236
236
|
// Focus overlay instead of letting focus escape
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { expect } from "@playwright/test";
|
|
5
|
+
/**
|
|
6
|
+
* These tracks are adjacent with no gap, so the edges are meant to be equal.
|
|
7
|
+
* Engines round fractional track origins differently, and a real ordering
|
|
8
|
+
* regression moves a cell by a whole track, so a pixel of slack is safe.
|
|
9
|
+
*/
|
|
10
|
+
const EDGE_TOLERANCE = 1;
|
|
11
|
+
/**
|
|
12
|
+
* Asserts that a form field's start slot, control and end slot occupy one row,
|
|
13
|
+
* in inline order.
|
|
14
|
+
*
|
|
15
|
+
* The ionic theme lays these out as grid columns. An invalid column template is
|
|
16
|
+
* dropped silently, and the cells then auto-place into a row each, so checking
|
|
17
|
+
* that they share a row is what catches it.
|
|
18
|
+
*
|
|
19
|
+
* @param host The form field element.
|
|
20
|
+
* @param prefix The component's cell-class prefix: `input`, `select` or `textarea`.
|
|
21
|
+
*/
|
|
22
|
+
export const expectFieldCellsShareARow = async (host, prefix) => {
|
|
23
|
+
const start = await host.locator(`.${prefix}-start`).boundingBox();
|
|
24
|
+
const native = await host.locator('.native-wrapper').boundingBox();
|
|
25
|
+
const end = await host.locator(`.${prefix}-end`).boundingBox();
|
|
26
|
+
expect(native).not.toBeNull();
|
|
27
|
+
for (const cell of [start, end]) {
|
|
28
|
+
expect(cell).not.toBeNull();
|
|
29
|
+
expect(cell.y).toBeLessThan(native.y + native.height);
|
|
30
|
+
expect(native.y).toBeLessThan(cell.y + cell.height);
|
|
31
|
+
}
|
|
32
|
+
expect(native.x).toBeGreaterThan(start.x + start.width - EDGE_TOLERANCE);
|
|
33
|
+
expect(end.x).toBeGreaterThan(native.x + native.width - EDGE_TOLERANCE);
|
|
34
|
+
};
|