@ionic/core 8.7.10-dev.11762798751.11b77c85 → 8.7.10-dev.11763406256.1a4bac8c
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/checkbox.js +63 -9
- package/components/ion-input.js +7 -6
- package/components/ion-searchbar.js +6 -6
- package/components/ion-select.js +7 -6
- package/components/ion-textarea.js +2 -1
- package/components/ion-toggle.js +62 -12
- package/components/notch-controller.js +153 -0
- package/components/radio-group.js +60 -7
- package/components/validity.js +1 -150
- package/dist/cjs/{animation-D_c13yq_.js → animation-Bt3H9L1C.js} +1 -1
- package/dist/cjs/{app-globals--1qFsqEw.js → app-globals-Ciccnk9_.js} +1 -1
- package/dist/cjs/{button-active-CQiBOKCI.js → button-active-CMc8cD90.js} +1 -1
- package/dist/cjs/{config-DL8XJF0D.js → config-C5fsO43a.js} +1 -1
- package/dist/cjs/{data-DtEHxOpt.js → data-JwZKaIQB.js} +1 -1
- package/dist/cjs/{framework-delegate-DmSgIb_h.js → framework-delegate-DMJRBuDi.js} +1 -1
- package/dist/cjs/{hardware-back-button-C72O8m7E.js → hardware-back-button-VCK4V3mG.js} +1 -1
- package/dist/cjs/{helpers-xCoR213K.js → helpers-DrTqNghc.js} +1 -1
- package/dist/cjs/{index-WEBAL2Zz.js → index-094mMFB-.js} +4 -4
- package/dist/cjs/{index-DOeyHw27.js → index-C534ULug.js} +2 -2
- package/dist/cjs/{index-FugOCm8C.js → index-CO6eryBo.js} +2 -2
- package/dist/cjs/{index-qWlbeMTM.js → index-D6Wc6v08.js} +3 -41
- package/dist/cjs/{index-FdJ4-6Rg.js → index-DrMUZJj6.js} +5 -5
- package/dist/cjs/index.cjs.js +12 -12
- package/dist/cjs/{input-shims-CYpwizql.js → input-shims-CW0KUFTQ.js} +3 -3
- package/dist/cjs/{input.utils-DhlH-Ng5.js → input.utils-B_QROI2g.js} +2 -2
- package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -8
- package/dist/cjs/ion-alert.cjs.entry.js +9 -9
- package/dist/cjs/ion-app_8.cjs.entry.js +12 -12
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +3 -3
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-button_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-card_5.cjs.entry.js +3 -3
- package/dist/cjs/ion-checkbox.cjs.entry.js +63 -11
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -4
- package/dist/cjs/ion-datetime_3.cjs.entry.js +8 -8
- package/dist/cjs/ion-fab_3.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 +5 -5
- package/dist/cjs/ion-input-otp.cjs.entry.js +3 -3
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +11 -10
- package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +3 -3
- package/dist/cjs/ion-loading.cjs.entry.js +8 -8
- package/dist/cjs/ion-menu_3.cjs.entry.js +8 -8
- package/dist/cjs/ion-modal.cjs.entry.js +9 -9
- 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 +3 -3
- 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 +3 -3
- package/dist/cjs/ion-radio_2.cjs.entry.js +60 -9
- package/dist/cjs/ion-range.cjs.entry.js +4 -4
- package/dist/cjs/ion-refresher_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-reorder_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +3 -3
- package/dist/cjs/ion-searchbar.cjs.entry.js +8 -8
- package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment-view.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-select-modal.cjs.entry.js +6 -6
- package/dist/cjs/ion-select_3.cjs.entry.js +13 -12
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +3 -3
- 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 +7 -6
- package/dist/cjs/ion-toast.cjs.entry.js +8 -8
- package/dist/cjs/ion-toggle.cjs.entry.js +61 -13
- package/dist/cjs/{ionic-global-CR8JSFWa.js → ionic-global-HMVqOFGO.js} +1 -1
- package/dist/cjs/ionic.cjs.js +5 -5
- package/dist/cjs/{ios.transition-MQamiuLS.js → ios.transition-BOt_uW73.js} +4 -4
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-VK5nuqXu.js → md.transition-Dt968VXB.js} +4 -4
- package/dist/cjs/{validity-ilhIJL9Q.js → notch-controller-Bzqhjm4f.js} +1 -15
- package/dist/cjs/{overlays-DcMnmLe2.js → overlays-DxIZwUXI.js} +5 -5
- package/dist/cjs/{status-tap-C0NZlIwJ.js → status-tap-g0sWWkXk.js} +3 -3
- package/dist/cjs/{swipe-back-CdOHy9bk.js → swipe-back-BIayeNOD.js} +2 -2
- package/dist/cjs/validity-BpS37YFM.js +19 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/checkbox/checkbox.js +67 -9
- package/dist/collection/components/input/input.js +8 -8
- package/dist/collection/components/radio-group/radio-group.js +64 -7
- package/dist/collection/components/searchbar/searchbar.js +9 -9
- package/dist/collection/components/select/select.js +5 -5
- package/dist/collection/components/toggle/toggle.js +62 -12
- package/dist/docs.json +25 -15
- package/dist/esm/{animation-BMjqGaKJ.js → animation-Dt8bGnA-.js} +1 -1
- package/dist/esm/{app-globals-CXKe5CYv.js → app-globals-BDSf8fOA.js} +1 -1
- package/dist/esm/{button-active-DsHCf5yJ.js → button-active-L570Swow.js} +1 -1
- package/dist/esm/{config-FyGnL1d5.js → config-mCdtaoPe.js} +1 -1
- package/dist/esm/{data-VwBJONjN.js → data-DCORV9FH.js} +1 -1
- package/dist/esm/{framework-delegate-DA71As64.js → framework-delegate-BYawdMXj.js} +1 -1
- package/dist/esm/{hardware-back-button-gEuwgxq4.js → hardware-back-button-CPLxO-Ev.js} +1 -1
- package/dist/esm/{helpers-Br4puuoA.js → helpers-DEn3pfjm.js} +1 -1
- package/dist/esm/{index-nzxJGPo-.js → index-Bs3kT4bc.js} +2 -2
- package/dist/esm/{index-COOKa-0k.js → index-C8IsBmNU.js} +3 -41
- package/dist/esm/{index-DNUVD4sY.js → index-CvDIirVx.js} +5 -5
- package/dist/esm/{index-CZzUL5H7.js → index-ceb5RaMT.js} +2 -2
- package/dist/esm/{index-DKnepNGf.js → index-r2D9DEro.js} +4 -4
- package/dist/esm/index.js +12 -12
- package/dist/esm/{input-shims-G0QQ_JXi.js → input-shims-DyOpfTg6.js} +3 -3
- package/dist/esm/{input.utils-BRuJbV55.js → input.utils-DrvTa8gz.js} +2 -2
- package/dist/esm/ion-accordion_2.entry.js +3 -3
- package/dist/esm/ion-action-sheet.entry.js +8 -8
- package/dist/esm/ion-alert.entry.js +9 -9
- package/dist/esm/ion-app_8.entry.js +12 -12
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +3 -3
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +3 -3
- package/dist/esm/ion-button_2.entry.js +3 -3
- package/dist/esm/ion-card_5.entry.js +3 -3
- package/dist/esm/ion-checkbox.entry.js +63 -11
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +4 -4
- package/dist/esm/ion-datetime_3.entry.js +8 -8
- package/dist/esm/ion-fab_3.entry.js +3 -3
- package/dist/esm/ion-img.entry.js +3 -3
- package/dist/esm/ion-infinite-scroll_2.entry.js +5 -5
- package/dist/esm/ion-input-otp.entry.js +3 -3
- package/dist/esm/ion-input-password-toggle.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +10 -9
- package/dist/esm/ion-item-option_3.entry.js +4 -4
- package/dist/esm/ion-item_8.entry.js +3 -3
- package/dist/esm/ion-loading.entry.js +8 -8
- package/dist/esm/ion-menu_3.entry.js +8 -8
- package/dist/esm/ion-modal.entry.js +9 -9
- 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 +3 -3
- 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 +3 -3
- package/dist/esm/ion-radio_2.entry.js +60 -9
- package/dist/esm/ion-range.entry.js +4 -4
- package/dist/esm/ion-refresher_2.entry.js +6 -6
- package/dist/esm/ion-reorder_2.entry.js +4 -4
- package/dist/esm/ion-ripple-effect.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +3 -3
- package/dist/esm/ion-searchbar.entry.js +8 -8
- package/dist/esm/ion-segment-content.entry.js +1 -1
- package/dist/esm/ion-segment-view.entry.js +1 -1
- package/dist/esm/ion-segment_2.entry.js +3 -3
- package/dist/esm/ion-select-modal.entry.js +6 -6
- package/dist/esm/ion-select_3.entry.js +12 -11
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +3 -3
- 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 +6 -5
- package/dist/esm/ion-toast.entry.js +8 -8
- package/dist/esm/ion-toggle.entry.js +61 -13
- package/dist/esm/{ionic-global-ssiordoc.js → ionic-global-CDrldh-5.js} +1 -1
- package/dist/esm/ionic.js +6 -6
- package/dist/esm/{ios.transition-CdWk5te_.js → ios.transition-BDzw0_Hm.js} +4 -4
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-CTwmjwnm.js → md.transition-BzDYi3qq.js} +4 -4
- package/dist/esm/{validity-CwxNVaqN.js → notch-controller-BwelN_JM.js} +2 -15
- package/dist/esm/{overlays-DNIbGUWk.js → overlays-BymNv-BL.js} +5 -5
- package/dist/esm/{status-tap-B6uPB7F5.js → status-tap-5DQ7Fc4V.js} +3 -3
- package/dist/esm/{swipe-back-INesdA_O.js → swipe-back-BKw2CAHc.js} +2 -2
- package/dist/esm/validity-DJztqcrH.js +17 -0
- package/dist/html.html-data.json +18 -2
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-2b9e100d.entry.js → p-020af078.entry.js} +1 -1
- package/dist/ionic/p-074839fc.entry.js +4 -0
- package/dist/ionic/{p-964e89ac.entry.js → p-0b80d700.entry.js} +1 -1
- package/dist/ionic/{p-894e8953.entry.js → p-0dfa5a37.entry.js} +1 -1
- package/dist/ionic/{p-3807749f.entry.js → p-11518b31.entry.js} +1 -1
- package/dist/ionic/{p-fcd74818.entry.js → p-15193d01.entry.js} +1 -1
- package/dist/ionic/{p-c49f0f68.entry.js → p-1647c46c.entry.js} +1 -1
- package/dist/ionic/{p-116a97cb.entry.js → p-2a939845.entry.js} +1 -1
- package/dist/ionic/{p-3c522786.entry.js → p-316c0420.entry.js} +1 -1
- package/dist/ionic/{p-860f309a.entry.js → p-31f7095f.entry.js} +1 -1
- package/dist/ionic/{p-adde497f.entry.js → p-370e4237.entry.js} +1 -1
- package/dist/ionic/{p-ef8c7682.entry.js → p-3a6caca9.entry.js} +1 -1
- package/dist/ionic/p-40c261a3.entry.js +4 -0
- package/dist/ionic/{p-06881392.entry.js → p-43ed1ef5.entry.js} +1 -1
- package/dist/ionic/{p-a66bbfa0.entry.js → p-46d74291.entry.js} +1 -1
- package/dist/ionic/{p-7047a7b7.entry.js → p-49d06882.entry.js} +1 -1
- package/dist/ionic/{p-d0f6b9a7.entry.js → p-4c85d268.entry.js} +1 -1
- package/dist/ionic/p-4e41ea20.entry.js +4 -0
- package/dist/ionic/{p-5d600703.entry.js → p-4efea47a.entry.js} +1 -1
- package/dist/ionic/{p-dfd6acb5.entry.js → p-510d86e1.entry.js} +1 -1
- package/dist/ionic/p-51a60e0f.entry.js +4 -0
- package/dist/ionic/{p-dfc6f4b1.entry.js → p-582824c5.entry.js} +1 -1
- package/dist/ionic/{p-259e4068.entry.js → p-6241ce47.entry.js} +1 -1
- package/dist/ionic/{p-4ede0a73.entry.js → p-639dd543.entry.js} +1 -1
- package/dist/ionic/{p-7a19f3d1.entry.js → p-6444c606.entry.js} +1 -1
- package/dist/ionic/{p-c7f3e813.entry.js → p-675b1a31.entry.js} +1 -1
- package/dist/ionic/{p-db44afdd.entry.js → p-6d070558.entry.js} +1 -1
- package/dist/ionic/{p-5dcbb52f.entry.js → p-7268efa5.entry.js} +1 -1
- package/dist/ionic/{p-c6b68ac0.entry.js → p-72c38b88.entry.js} +1 -1
- package/dist/ionic/p-7380261c.entry.js +4 -0
- package/dist/ionic/{p-a41048a1.entry.js → p-79bd78f9.entry.js} +1 -1
- package/dist/ionic/{p-295a2119.entry.js → p-7da39a4d.entry.js} +1 -1
- package/dist/ionic/{p-d24d55cb.entry.js → p-83be404e.entry.js} +1 -1
- package/dist/ionic/{p-70c66710.entry.js → p-86f53961.entry.js} +1 -1
- package/dist/ionic/{p-db648b6a.entry.js → p-94de5cfa.entry.js} +1 -1
- package/dist/ionic/{p-6fe93af5.entry.js → p-9575b654.entry.js} +1 -1
- package/dist/ionic/{p-bef7bd83.entry.js → p-98fc09eb.entry.js} +1 -1
- package/dist/ionic/{p-BA44xiai.js → p-B0q1YL7N.js} +1 -1
- package/dist/ionic/p-BFvmZNyx.js +4 -0
- package/dist/ionic/p-BKc55Xev.js +4 -0
- package/dist/ionic/{p-baqdazzM.js → p-BOVrCkpJ.js} +1 -1
- package/dist/ionic/{p-CT3hZD31.js → p-BYEqWnSg.js} +1 -1
- package/dist/ionic/p-Bmgaetn_.js +4 -0
- package/dist/ionic/{p-CUek2VVk.js → p-C7hRNDhM.js} +1 -1
- package/dist/ionic/p-C8IsBmNU.js +5 -0
- package/dist/ionic/{p-CYTVJxfQ.js → p-CJxh_yLS.js} +1 -1
- package/dist/ionic/{p-C8VsQFea.js → p-CTfR9YZG.js} +1 -1
- package/dist/ionic/p-CwgG81ZD.js +4 -0
- package/dist/ionic/{p-UCpjvnQe.js → p-D-eFFUkA.js} +1 -1
- package/dist/ionic/{p-DddcVlzx.js → p-D0dMcSkw.js} +1 -1
- package/dist/ionic/{p-ynapDa0U.js → p-D87hU-Ly.js} +1 -1
- package/dist/ionic/{p-C9IcKRgw.js → p-DCv9sLH2.js} +1 -1
- package/dist/ionic/p-DDb5r57F.js +4 -0
- package/dist/ionic/p-DJztqcrH.js +4 -0
- package/dist/ionic/{p-yu2f42Nv.js → p-DNcfiJwE.js} +1 -1
- package/dist/ionic/{p-CETqdl8n.js → p-DUt5fQmA.js} +1 -1
- package/dist/ionic/p-DZRJwG4S.js +4 -0
- package/dist/ionic/{p-D8G3beZX.js → p-DbQ5QkTP.js} +1 -1
- package/dist/ionic/{p-BUluHF_z.js → p-Dc45iWE4.js} +1 -1
- package/dist/ionic/{p-Bzed_Vkc.js → p-QHYY4sjU.js} +1 -1
- package/dist/ionic/{p-3ca55cd6.entry.js → p-a127bee2.entry.js} +1 -1
- package/dist/ionic/{p-b3da5db0.entry.js → p-a80f1b04.entry.js} +1 -1
- package/dist/ionic/{p-948228a2.entry.js → p-ac4eb91d.entry.js} +1 -1
- package/dist/ionic/{p-7078b759.entry.js → p-b0a7585c.entry.js} +1 -1
- package/dist/ionic/{p-3549e539.entry.js → p-b57c6d3e.entry.js} +1 -1
- package/dist/ionic/p-c19f63d0.entry.js +4 -0
- package/dist/ionic/{p-e1547a17.entry.js → p-cc45bcbc.entry.js} +1 -1
- package/dist/ionic/{p-e1c3b35d.entry.js → p-d0a2a1ab.entry.js} +1 -1
- package/dist/ionic/{p-89c2d5ea.entry.js → p-d126e8d3.entry.js} +1 -1
- package/dist/ionic/p-d1f54e28.entry.js +4 -0
- package/dist/ionic/p-d3014190.entry.js +4 -0
- package/dist/ionic/{p-93d7685c.entry.js → p-da7d04cc.entry.js} +1 -1
- package/dist/ionic/p-dbbe606a.entry.js +4 -0
- package/dist/ionic/{p-0144ab54.entry.js → p-e16b69e1.entry.js} +1 -1
- package/dist/ionic/{p-d27a5c0b.entry.js → p-f8f22cc0.entry.js} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +9 -1
- package/dist/types/components/header/header.utils.d.ts +1 -2
- package/dist/types/components/input/input.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.d.ts +9 -1
- package/dist/types/components/searchbar/searchbar.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +2 -2
- package/dist/types/components/toggle/toggle.d.ts +7 -1
- package/dist/types/components.d.ts +8 -8
- package/dist/types/stencil-public-runtime.d.ts +9 -19
- package/dist/types/utils/forms/validity.d.ts +1 -1
- package/dist/types/utils/gesture/listener.d.ts +1 -2
- package/hydrate/index.js +369 -356
- package/hydrate/index.mjs +369 -356
- package/package.json +3 -3
- package/dist/ionic/p-0188f4a6.entry.js +0 -4
- package/dist/ionic/p-14e08559.entry.js +0 -4
- package/dist/ionic/p-22bcfae9.entry.js +0 -4
- package/dist/ionic/p-45c80fd7.entry.js +0 -4
- package/dist/ionic/p-49a21ffb.entry.js +0 -4
- package/dist/ionic/p-5cf136b5.entry.js +0 -4
- package/dist/ionic/p-9fc9dfae.entry.js +0 -4
- package/dist/ionic/p-BS-HlVX0.js +0 -4
- package/dist/ionic/p-BWS2Niqo.js +0 -4
- package/dist/ionic/p-CCKqmAua.js +0 -4
- package/dist/ionic/p-COOKa-0k.js +0 -5
- package/dist/ionic/p-CSQuMCUi.js +0 -4
- package/dist/ionic/p-PfJ1h_Zm.js +0 -4
- package/dist/ionic/p-edcc6f4f.entry.js +0 -4
- package/dist/ionic/p-f53597ee.entry.js +0 -4
- package/dist/ionic/p-w2EzNm9e.js +0 -4
package/hydrate/index.mjs
CHANGED
|
@@ -128,7 +128,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
|
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
const NAMESPACE = 'ionic';
|
|
131
|
-
const BUILD = /* ionic */ { hydratedSelectorName: "hydrated", slotRelocation: true,
|
|
131
|
+
const BUILD = /* ionic */ { hydratedSelectorName: "hydrated", slotRelocation: true, updatable: true};
|
|
132
132
|
|
|
133
133
|
// TODO(FW-2832): types
|
|
134
134
|
class Config {
|
|
@@ -390,7 +390,7 @@ const initialize = (userConfig = {}) => {
|
|
|
390
390
|
const globalScripts = initialize;
|
|
391
391
|
|
|
392
392
|
/*
|
|
393
|
-
Stencil Hydrate Platform v4.38.
|
|
393
|
+
Stencil Hydrate Platform v4.38.0 | MIT Licensed | https://stenciljs.com
|
|
394
394
|
*/
|
|
395
395
|
var __defProp = Object.defineProperty;
|
|
396
396
|
var __export = (target, all) => {
|
|
@@ -426,40 +426,6 @@ var TYPE_CONSTANT = "type";
|
|
|
426
426
|
var VALUE_CONSTANT = "value";
|
|
427
427
|
var SERIALIZED_PREFIX = "serialized:";
|
|
428
428
|
|
|
429
|
-
// src/utils/es2022-rewire-class-members.ts
|
|
430
|
-
var reWireGetterSetter = (instance, hostRef) => {
|
|
431
|
-
var _a;
|
|
432
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
433
|
-
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
434
|
-
members.map(([memberName, [memberFlags]]) => {
|
|
435
|
-
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
436
|
-
const ogValue = instance[memberName];
|
|
437
|
-
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
438
|
-
if (ogDescriptor) {
|
|
439
|
-
Object.defineProperty(instance, memberName, {
|
|
440
|
-
get() {
|
|
441
|
-
return ogDescriptor.get.call(this);
|
|
442
|
-
},
|
|
443
|
-
set(newValue) {
|
|
444
|
-
ogDescriptor.set.call(this, newValue);
|
|
445
|
-
},
|
|
446
|
-
configurable: true,
|
|
447
|
-
enumerable: true
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
};
|
|
454
|
-
function getPropertyDescriptor(obj, memberName) {
|
|
455
|
-
while (obj) {
|
|
456
|
-
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
457
|
-
if (desc == null ? void 0 : desc.get) return desc;
|
|
458
|
-
obj = Object.getPrototypeOf(obj);
|
|
459
|
-
}
|
|
460
|
-
return void 0;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
429
|
// src/utils/helpers.ts
|
|
464
430
|
var isDef = (v) => v != null && v !== void 0;
|
|
465
431
|
var isComplexType = (o) => {
|
|
@@ -3679,9 +3645,6 @@ var registerInstance = (lazyInstance, hostRef) => {
|
|
|
3679
3645
|
if (!hostRef) return void 0;
|
|
3680
3646
|
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
3681
3647
|
hostRef.$lazyInstance$ = lazyInstance;
|
|
3682
|
-
if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
|
|
3683
|
-
reWireGetterSetter(lazyInstance, hostRef);
|
|
3684
|
-
}
|
|
3685
3648
|
return hostRef;
|
|
3686
3649
|
};
|
|
3687
3650
|
var registerHost = (elm, cmpMeta) => {
|
|
@@ -9720,6 +9683,202 @@ class CardTitle {
|
|
|
9720
9683
|
}; }
|
|
9721
9684
|
}
|
|
9722
9685
|
|
|
9686
|
+
/**
|
|
9687
|
+
* A utility to calculate the size of an outline notch
|
|
9688
|
+
* width relative to the content passed. This is used in
|
|
9689
|
+
* components such as `ion-select` with `fill="outline"`
|
|
9690
|
+
* where we need to pass slotted HTML content. This is not
|
|
9691
|
+
* needed when rendering plaintext content because we can
|
|
9692
|
+
* render the plaintext again hidden with `opacity: 0` inside
|
|
9693
|
+
* of the notch. As a result we can rely on the intrinsic size
|
|
9694
|
+
* of the element to correctly compute the notch width. We
|
|
9695
|
+
* cannot do this with slotted content because we cannot project
|
|
9696
|
+
* it into 2 places at once.
|
|
9697
|
+
*
|
|
9698
|
+
* @internal
|
|
9699
|
+
* @param el: The host element
|
|
9700
|
+
* @param getNotchSpacerEl: A function that returns a reference to the notch spacer element inside of the component template.
|
|
9701
|
+
* @param getLabelSlot: A function that returns a reference to the slotted content.
|
|
9702
|
+
*/
|
|
9703
|
+
const createNotchController = (el, getNotchSpacerEl, getLabelSlot) => {
|
|
9704
|
+
let notchVisibilityIO;
|
|
9705
|
+
const needsExplicitNotchWidth = () => {
|
|
9706
|
+
const notchSpacerEl = getNotchSpacerEl();
|
|
9707
|
+
if (
|
|
9708
|
+
/**
|
|
9709
|
+
* If the notch is not being used
|
|
9710
|
+
* then we do not need to set the notch width.
|
|
9711
|
+
*/
|
|
9712
|
+
notchSpacerEl === undefined ||
|
|
9713
|
+
/**
|
|
9714
|
+
* If either the label property is being
|
|
9715
|
+
* used or the label slot is not defined,
|
|
9716
|
+
* then we do not need to estimate the notch width.
|
|
9717
|
+
*/
|
|
9718
|
+
el.label !== undefined ||
|
|
9719
|
+
getLabelSlot() === null) {
|
|
9720
|
+
return false;
|
|
9721
|
+
}
|
|
9722
|
+
return true;
|
|
9723
|
+
};
|
|
9724
|
+
const calculateNotchWidth = () => {
|
|
9725
|
+
if (needsExplicitNotchWidth()) {
|
|
9726
|
+
/**
|
|
9727
|
+
* Run this the frame after
|
|
9728
|
+
* the browser has re-painted the host element.
|
|
9729
|
+
* Otherwise, the label element may have a width
|
|
9730
|
+
* of 0 and the IntersectionObserver will be used.
|
|
9731
|
+
*/
|
|
9732
|
+
raf(() => {
|
|
9733
|
+
setNotchWidth();
|
|
9734
|
+
});
|
|
9735
|
+
}
|
|
9736
|
+
};
|
|
9737
|
+
/**
|
|
9738
|
+
* When using a label prop we can render
|
|
9739
|
+
* the label value inside of the notch and
|
|
9740
|
+
* let the browser calculate the size of the notch.
|
|
9741
|
+
* However, we cannot render the label slot in multiple
|
|
9742
|
+
* places so we need to manually calculate the notch dimension
|
|
9743
|
+
* based on the size of the slotted content.
|
|
9744
|
+
*
|
|
9745
|
+
* This function should only be used to set the notch width
|
|
9746
|
+
* on slotted label content. The notch width for label prop
|
|
9747
|
+
* content is automatically calculated based on the
|
|
9748
|
+
* intrinsic size of the label text.
|
|
9749
|
+
*/
|
|
9750
|
+
const setNotchWidth = () => {
|
|
9751
|
+
const notchSpacerEl = getNotchSpacerEl();
|
|
9752
|
+
if (notchSpacerEl === undefined) {
|
|
9753
|
+
return;
|
|
9754
|
+
}
|
|
9755
|
+
if (!needsExplicitNotchWidth()) {
|
|
9756
|
+
notchSpacerEl.style.removeProperty('width');
|
|
9757
|
+
return;
|
|
9758
|
+
}
|
|
9759
|
+
const width = getLabelSlot().scrollWidth;
|
|
9760
|
+
if (
|
|
9761
|
+
/**
|
|
9762
|
+
* If the computed width of the label is 0
|
|
9763
|
+
* and notchSpacerEl's offsetParent is null
|
|
9764
|
+
* then that means the element is hidden.
|
|
9765
|
+
* As a result, we need to wait for the element
|
|
9766
|
+
* to become visible before setting the notch width.
|
|
9767
|
+
*
|
|
9768
|
+
* We do not check el.offsetParent because
|
|
9769
|
+
* that can be null if the host element has
|
|
9770
|
+
* position: fixed applied to it.
|
|
9771
|
+
* notchSpacerEl does not have position: fixed.
|
|
9772
|
+
*/
|
|
9773
|
+
width === 0 &&
|
|
9774
|
+
notchSpacerEl.offsetParent === null &&
|
|
9775
|
+
win$1 !== undefined &&
|
|
9776
|
+
'IntersectionObserver' in win$1) {
|
|
9777
|
+
/**
|
|
9778
|
+
* If there is an IO already attached
|
|
9779
|
+
* then that will update the notch
|
|
9780
|
+
* once the element becomes visible.
|
|
9781
|
+
* As a result, there is no need to create
|
|
9782
|
+
* another one.
|
|
9783
|
+
*/
|
|
9784
|
+
if (notchVisibilityIO !== undefined) {
|
|
9785
|
+
return;
|
|
9786
|
+
}
|
|
9787
|
+
const io = (notchVisibilityIO = new IntersectionObserver((ev) => {
|
|
9788
|
+
/**
|
|
9789
|
+
* If the element is visible then we
|
|
9790
|
+
* can try setting the notch width again.
|
|
9791
|
+
*/
|
|
9792
|
+
if (ev[0].intersectionRatio === 1) {
|
|
9793
|
+
setNotchWidth();
|
|
9794
|
+
io.disconnect();
|
|
9795
|
+
notchVisibilityIO = undefined;
|
|
9796
|
+
}
|
|
9797
|
+
},
|
|
9798
|
+
/**
|
|
9799
|
+
* Set the root to be the host element
|
|
9800
|
+
* This causes the IO callback
|
|
9801
|
+
* to be fired in WebKit as soon as the element
|
|
9802
|
+
* is visible. If we used the default root value
|
|
9803
|
+
* then WebKit would only fire the IO callback
|
|
9804
|
+
* after any animations (such as a modal transition)
|
|
9805
|
+
* finished, and there would potentially be a flicker.
|
|
9806
|
+
*/
|
|
9807
|
+
{ threshold: 0.01, root: el }));
|
|
9808
|
+
io.observe(notchSpacerEl);
|
|
9809
|
+
return;
|
|
9810
|
+
}
|
|
9811
|
+
/**
|
|
9812
|
+
* If the element is visible then we can set the notch width.
|
|
9813
|
+
* The notch is only visible when the label is scaled,
|
|
9814
|
+
* which is why we multiply the width by 0.75 as this is
|
|
9815
|
+
* the same amount the label element is scaled by in the host CSS.
|
|
9816
|
+
* (See $form-control-label-stacked-scale in ionic.globals.scss).
|
|
9817
|
+
*/
|
|
9818
|
+
notchSpacerEl.style.setProperty('width', `${width * 0.75}px`);
|
|
9819
|
+
};
|
|
9820
|
+
const destroy = () => {
|
|
9821
|
+
if (notchVisibilityIO) {
|
|
9822
|
+
notchVisibilityIO.disconnect();
|
|
9823
|
+
notchVisibilityIO = undefined;
|
|
9824
|
+
}
|
|
9825
|
+
};
|
|
9826
|
+
return {
|
|
9827
|
+
calculateNotchWidth,
|
|
9828
|
+
destroy,
|
|
9829
|
+
};
|
|
9830
|
+
};
|
|
9831
|
+
|
|
9832
|
+
/**
|
|
9833
|
+
* Uses the compareWith param to compare two values to determine if they are equal.
|
|
9834
|
+
*
|
|
9835
|
+
* @param currentValue The current value of the control.
|
|
9836
|
+
* @param compareValue The value to compare against.
|
|
9837
|
+
* @param compareWith The function or property name to use to compare values.
|
|
9838
|
+
*/
|
|
9839
|
+
const compareOptions = (currentValue, compareValue, compareWith) => {
|
|
9840
|
+
if (typeof compareWith === 'function') {
|
|
9841
|
+
return compareWith(currentValue, compareValue);
|
|
9842
|
+
}
|
|
9843
|
+
else if (typeof compareWith === 'string') {
|
|
9844
|
+
return currentValue[compareWith] === compareValue[compareWith];
|
|
9845
|
+
}
|
|
9846
|
+
else {
|
|
9847
|
+
return Array.isArray(compareValue) ? compareValue.includes(currentValue) : currentValue === compareValue;
|
|
9848
|
+
}
|
|
9849
|
+
};
|
|
9850
|
+
/**
|
|
9851
|
+
* Compares a value against the current value(s) to determine if it is selected.
|
|
9852
|
+
*
|
|
9853
|
+
* @param currentValue The current value of the control.
|
|
9854
|
+
* @param compareValue The value to compare against.
|
|
9855
|
+
* @param compareWith The function or property name to use to compare values.
|
|
9856
|
+
*/
|
|
9857
|
+
const isOptionSelected = (currentValue, compareValue, compareWith) => {
|
|
9858
|
+
if (currentValue === undefined) {
|
|
9859
|
+
return false;
|
|
9860
|
+
}
|
|
9861
|
+
if (Array.isArray(currentValue)) {
|
|
9862
|
+
return currentValue.some((val) => compareOptions(val, compareValue, compareWith));
|
|
9863
|
+
}
|
|
9864
|
+
else {
|
|
9865
|
+
return compareOptions(currentValue, compareValue, compareWith);
|
|
9866
|
+
}
|
|
9867
|
+
};
|
|
9868
|
+
|
|
9869
|
+
/**
|
|
9870
|
+
* Checks if the form element is in an invalid state based on
|
|
9871
|
+
* Ionic validation classes.
|
|
9872
|
+
*
|
|
9873
|
+
* @param el The form element to check.
|
|
9874
|
+
* @returns `true` if the element is invalid, `false` otherwise.
|
|
9875
|
+
*/
|
|
9876
|
+
const checkInvalidState = (el) => {
|
|
9877
|
+
const hasIonTouched = el.classList.contains('ion-touched');
|
|
9878
|
+
const hasIonInvalid = el.classList.contains('ion-invalid');
|
|
9879
|
+
return hasIonTouched && hasIonInvalid;
|
|
9880
|
+
};
|
|
9881
|
+
|
|
9723
9882
|
const checkboxIosCss = ":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}.checkbox-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.checkbox-label-placement-stacked) .checkbox-bottom{font-size:1rem}.checkbox-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.checkbox-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text{display:none}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:0.125rem;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--size:min(1.375rem, 55.836px);--checkmark-width:1.5px}:host(.checkbox-disabled){opacity:0.3}";
|
|
9724
9883
|
|
|
9725
9884
|
const checkboxMdCss = ":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}.checkbox-bottom{padding-top:4px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:0.75rem;white-space:normal}:host(.checkbox-label-placement-stacked) .checkbox-bottom{font-size:1rem}.checkbox-bottom .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.checkbox-bottom .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}:host(.ion-touched.ion-invalid) .checkbox-bottom .error-text{display:block}:host(.ion-touched.ion-invalid) .checkbox-bottom .helper-text{display:none}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:start;justify-content:start}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column;text-align:center}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--checkmark-width:3;--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;-webkit-transition:stroke-dashoffset 90ms linear 90ms;transition:stroke-dashoffset 90ms linear 90ms}:host(.checkbox-disabled) .label-text-wrapper{opacity:0.38}:host(.checkbox-disabled) .native-wrapper{opacity:0.63}";
|
|
@@ -9785,6 +9944,10 @@ class Checkbox {
|
|
|
9785
9944
|
* submitting if the value is invalid.
|
|
9786
9945
|
*/
|
|
9787
9946
|
this.required = false;
|
|
9947
|
+
/**
|
|
9948
|
+
* Track validation state for proper aria-live announcements.
|
|
9949
|
+
*/
|
|
9950
|
+
this.isInvalid = false;
|
|
9788
9951
|
/**
|
|
9789
9952
|
* Sets the checked property and emits
|
|
9790
9953
|
* the ionChange event. Use this to update the
|
|
@@ -9831,16 +9994,29 @@ class Checkbox {
|
|
|
9831
9994
|
ev.stopPropagation();
|
|
9832
9995
|
};
|
|
9833
9996
|
}
|
|
9997
|
+
connectedCallback() {
|
|
9998
|
+
const { el } = this;
|
|
9999
|
+
// Always set initial state
|
|
10000
|
+
this.isInvalid = checkInvalidState(el);
|
|
10001
|
+
}
|
|
9834
10002
|
componentWillLoad() {
|
|
9835
10003
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
10004
|
+
this.hintTextId = this.getHintTextId();
|
|
10005
|
+
}
|
|
10006
|
+
disconnectedCallback() {
|
|
10007
|
+
// Clean up validation observer to prevent memory leaks.
|
|
10008
|
+
if (this.validationObserver) {
|
|
10009
|
+
this.validationObserver.disconnect();
|
|
10010
|
+
this.validationObserver = undefined;
|
|
10011
|
+
}
|
|
9836
10012
|
}
|
|
9837
10013
|
/** @internal */
|
|
9838
10014
|
async setFocus() {
|
|
9839
10015
|
this.el.focus();
|
|
9840
10016
|
}
|
|
9841
|
-
|
|
9842
|
-
const {
|
|
9843
|
-
if (
|
|
10017
|
+
getHintTextId() {
|
|
10018
|
+
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
10019
|
+
if (isInvalid && errorText) {
|
|
9844
10020
|
return errorTextId;
|
|
9845
10021
|
}
|
|
9846
10022
|
if (helperText) {
|
|
@@ -9853,7 +10029,7 @@ class Checkbox {
|
|
|
9853
10029
|
* This element should only be rendered if hint text is set.
|
|
9854
10030
|
*/
|
|
9855
10031
|
renderHintText() {
|
|
9856
|
-
const { helperText, errorText, helperTextId, errorTextId } = this;
|
|
10032
|
+
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
9857
10033
|
/**
|
|
9858
10034
|
* undefined and empty string values should
|
|
9859
10035
|
* be treated as not having helper/error text.
|
|
@@ -9862,7 +10038,7 @@ class Checkbox {
|
|
|
9862
10038
|
if (!hasHintText) {
|
|
9863
10039
|
return;
|
|
9864
10040
|
}
|
|
9865
|
-
return (hAsync("div", { class: "checkbox-bottom" }, hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText), hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText)));
|
|
10041
|
+
return (hAsync("div", { class: "checkbox-bottom" }, hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null), hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null)));
|
|
9866
10042
|
}
|
|
9867
10043
|
render() {
|
|
9868
10044
|
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, required, } = this;
|
|
@@ -9872,7 +10048,7 @@ class Checkbox {
|
|
|
9872
10048
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
9873
10049
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
9874
10050
|
// support in Safari for accessibility.
|
|
9875
|
-
return (hAsync(Host, { key: '
|
|
10051
|
+
return (hAsync(Host, { key: 'ae0fbd4b21accbac132e6b85c513512ad9179394', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-labelledby": hasLabelContent ? this.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, onClick: this.onClick, class: createColorClasses$1(color, {
|
|
9876
10052
|
[mode]: true,
|
|
9877
10053
|
'in-item': hostContext('ion-item', el),
|
|
9878
10054
|
'checkbox-checked': checked,
|
|
@@ -9882,10 +10058,10 @@ class Checkbox {
|
|
|
9882
10058
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
9883
10059
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
9884
10060
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
9885
|
-
}) }, hAsync("label", { key: '
|
|
10061
|
+
}) }, hAsync("label", { key: '7a3d7f3c27dde514f2dbf2e34f4629fad33ec3bf', class: "checkbox-wrapper", htmlFor: inputId }, hAsync("input", Object.assign({ key: '4130d77ddf034271fecccda14e101a5a809921b6', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, required: required }, inheritedAttributes)), hAsync("div", { key: '5daa74f4e62b0947e37764762524001ee42609d9', class: {
|
|
9886
10062
|
'label-text-wrapper': true,
|
|
9887
10063
|
'label-text-wrapper-hidden': !hasLabelContent,
|
|
9888
|
-
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '
|
|
10064
|
+
}, part: "label", id: this.inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '23ff66138f8c3a2f56f39113fc842d54b2f7952a' }), this.renderHintText()), hAsync("div", { key: 'ab914d9623c19fc46821d5e62db92f1192ebbe7e', class: "native-wrapper" }, hAsync("svg", { key: '66e3f4f5dcaa9756fb0e9452299954f9ed3dcb7b', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container", "aria-hidden": "true" }, path)))));
|
|
9889
10065
|
}
|
|
9890
10066
|
getSVGPath(mode, indeterminate) {
|
|
9891
10067
|
let path = indeterminate ? (hAsync("path", { d: "M6 12L18 12", part: "mark" })) : (hAsync("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -9915,6 +10091,8 @@ class Checkbox {
|
|
|
9915
10091
|
"justify": [1],
|
|
9916
10092
|
"alignment": [1],
|
|
9917
10093
|
"required": [4],
|
|
10094
|
+
"isInvalid": [32],
|
|
10095
|
+
"hintTextId": [32],
|
|
9918
10096
|
"setFocus": [64]
|
|
9919
10097
|
},
|
|
9920
10098
|
"$listeners$": undefined,
|
|
@@ -16349,202 +16527,6 @@ class InfiniteScrollContent {
|
|
|
16349
16527
|
}; }
|
|
16350
16528
|
}
|
|
16351
16529
|
|
|
16352
|
-
/**
|
|
16353
|
-
* A utility to calculate the size of an outline notch
|
|
16354
|
-
* width relative to the content passed. This is used in
|
|
16355
|
-
* components such as `ion-select` with `fill="outline"`
|
|
16356
|
-
* where we need to pass slotted HTML content. This is not
|
|
16357
|
-
* needed when rendering plaintext content because we can
|
|
16358
|
-
* render the plaintext again hidden with `opacity: 0` inside
|
|
16359
|
-
* of the notch. As a result we can rely on the intrinsic size
|
|
16360
|
-
* of the element to correctly compute the notch width. We
|
|
16361
|
-
* cannot do this with slotted content because we cannot project
|
|
16362
|
-
* it into 2 places at once.
|
|
16363
|
-
*
|
|
16364
|
-
* @internal
|
|
16365
|
-
* @param el: The host element
|
|
16366
|
-
* @param getNotchSpacerEl: A function that returns a reference to the notch spacer element inside of the component template.
|
|
16367
|
-
* @param getLabelSlot: A function that returns a reference to the slotted content.
|
|
16368
|
-
*/
|
|
16369
|
-
const createNotchController = (el, getNotchSpacerEl, getLabelSlot) => {
|
|
16370
|
-
let notchVisibilityIO;
|
|
16371
|
-
const needsExplicitNotchWidth = () => {
|
|
16372
|
-
const notchSpacerEl = getNotchSpacerEl();
|
|
16373
|
-
if (
|
|
16374
|
-
/**
|
|
16375
|
-
* If the notch is not being used
|
|
16376
|
-
* then we do not need to set the notch width.
|
|
16377
|
-
*/
|
|
16378
|
-
notchSpacerEl === undefined ||
|
|
16379
|
-
/**
|
|
16380
|
-
* If either the label property is being
|
|
16381
|
-
* used or the label slot is not defined,
|
|
16382
|
-
* then we do not need to estimate the notch width.
|
|
16383
|
-
*/
|
|
16384
|
-
el.label !== undefined ||
|
|
16385
|
-
getLabelSlot() === null) {
|
|
16386
|
-
return false;
|
|
16387
|
-
}
|
|
16388
|
-
return true;
|
|
16389
|
-
};
|
|
16390
|
-
const calculateNotchWidth = () => {
|
|
16391
|
-
if (needsExplicitNotchWidth()) {
|
|
16392
|
-
/**
|
|
16393
|
-
* Run this the frame after
|
|
16394
|
-
* the browser has re-painted the host element.
|
|
16395
|
-
* Otherwise, the label element may have a width
|
|
16396
|
-
* of 0 and the IntersectionObserver will be used.
|
|
16397
|
-
*/
|
|
16398
|
-
raf(() => {
|
|
16399
|
-
setNotchWidth();
|
|
16400
|
-
});
|
|
16401
|
-
}
|
|
16402
|
-
};
|
|
16403
|
-
/**
|
|
16404
|
-
* When using a label prop we can render
|
|
16405
|
-
* the label value inside of the notch and
|
|
16406
|
-
* let the browser calculate the size of the notch.
|
|
16407
|
-
* However, we cannot render the label slot in multiple
|
|
16408
|
-
* places so we need to manually calculate the notch dimension
|
|
16409
|
-
* based on the size of the slotted content.
|
|
16410
|
-
*
|
|
16411
|
-
* This function should only be used to set the notch width
|
|
16412
|
-
* on slotted label content. The notch width for label prop
|
|
16413
|
-
* content is automatically calculated based on the
|
|
16414
|
-
* intrinsic size of the label text.
|
|
16415
|
-
*/
|
|
16416
|
-
const setNotchWidth = () => {
|
|
16417
|
-
const notchSpacerEl = getNotchSpacerEl();
|
|
16418
|
-
if (notchSpacerEl === undefined) {
|
|
16419
|
-
return;
|
|
16420
|
-
}
|
|
16421
|
-
if (!needsExplicitNotchWidth()) {
|
|
16422
|
-
notchSpacerEl.style.removeProperty('width');
|
|
16423
|
-
return;
|
|
16424
|
-
}
|
|
16425
|
-
const width = getLabelSlot().scrollWidth;
|
|
16426
|
-
if (
|
|
16427
|
-
/**
|
|
16428
|
-
* If the computed width of the label is 0
|
|
16429
|
-
* and notchSpacerEl's offsetParent is null
|
|
16430
|
-
* then that means the element is hidden.
|
|
16431
|
-
* As a result, we need to wait for the element
|
|
16432
|
-
* to become visible before setting the notch width.
|
|
16433
|
-
*
|
|
16434
|
-
* We do not check el.offsetParent because
|
|
16435
|
-
* that can be null if the host element has
|
|
16436
|
-
* position: fixed applied to it.
|
|
16437
|
-
* notchSpacerEl does not have position: fixed.
|
|
16438
|
-
*/
|
|
16439
|
-
width === 0 &&
|
|
16440
|
-
notchSpacerEl.offsetParent === null &&
|
|
16441
|
-
win$1 !== undefined &&
|
|
16442
|
-
'IntersectionObserver' in win$1) {
|
|
16443
|
-
/**
|
|
16444
|
-
* If there is an IO already attached
|
|
16445
|
-
* then that will update the notch
|
|
16446
|
-
* once the element becomes visible.
|
|
16447
|
-
* As a result, there is no need to create
|
|
16448
|
-
* another one.
|
|
16449
|
-
*/
|
|
16450
|
-
if (notchVisibilityIO !== undefined) {
|
|
16451
|
-
return;
|
|
16452
|
-
}
|
|
16453
|
-
const io = (notchVisibilityIO = new IntersectionObserver((ev) => {
|
|
16454
|
-
/**
|
|
16455
|
-
* If the element is visible then we
|
|
16456
|
-
* can try setting the notch width again.
|
|
16457
|
-
*/
|
|
16458
|
-
if (ev[0].intersectionRatio === 1) {
|
|
16459
|
-
setNotchWidth();
|
|
16460
|
-
io.disconnect();
|
|
16461
|
-
notchVisibilityIO = undefined;
|
|
16462
|
-
}
|
|
16463
|
-
},
|
|
16464
|
-
/**
|
|
16465
|
-
* Set the root to be the host element
|
|
16466
|
-
* This causes the IO callback
|
|
16467
|
-
* to be fired in WebKit as soon as the element
|
|
16468
|
-
* is visible. If we used the default root value
|
|
16469
|
-
* then WebKit would only fire the IO callback
|
|
16470
|
-
* after any animations (such as a modal transition)
|
|
16471
|
-
* finished, and there would potentially be a flicker.
|
|
16472
|
-
*/
|
|
16473
|
-
{ threshold: 0.01, root: el }));
|
|
16474
|
-
io.observe(notchSpacerEl);
|
|
16475
|
-
return;
|
|
16476
|
-
}
|
|
16477
|
-
/**
|
|
16478
|
-
* If the element is visible then we can set the notch width.
|
|
16479
|
-
* The notch is only visible when the label is scaled,
|
|
16480
|
-
* which is why we multiply the width by 0.75 as this is
|
|
16481
|
-
* the same amount the label element is scaled by in the host CSS.
|
|
16482
|
-
* (See $form-control-label-stacked-scale in ionic.globals.scss).
|
|
16483
|
-
*/
|
|
16484
|
-
notchSpacerEl.style.setProperty('width', `${width * 0.75}px`);
|
|
16485
|
-
};
|
|
16486
|
-
const destroy = () => {
|
|
16487
|
-
if (notchVisibilityIO) {
|
|
16488
|
-
notchVisibilityIO.disconnect();
|
|
16489
|
-
notchVisibilityIO = undefined;
|
|
16490
|
-
}
|
|
16491
|
-
};
|
|
16492
|
-
return {
|
|
16493
|
-
calculateNotchWidth,
|
|
16494
|
-
destroy,
|
|
16495
|
-
};
|
|
16496
|
-
};
|
|
16497
|
-
|
|
16498
|
-
/**
|
|
16499
|
-
* Uses the compareWith param to compare two values to determine if they are equal.
|
|
16500
|
-
*
|
|
16501
|
-
* @param currentValue The current value of the control.
|
|
16502
|
-
* @param compareValue The value to compare against.
|
|
16503
|
-
* @param compareWith The function or property name to use to compare values.
|
|
16504
|
-
*/
|
|
16505
|
-
const compareOptions = (currentValue, compareValue, compareWith) => {
|
|
16506
|
-
if (typeof compareWith === 'function') {
|
|
16507
|
-
return compareWith(currentValue, compareValue);
|
|
16508
|
-
}
|
|
16509
|
-
else if (typeof compareWith === 'string') {
|
|
16510
|
-
return currentValue[compareWith] === compareValue[compareWith];
|
|
16511
|
-
}
|
|
16512
|
-
else {
|
|
16513
|
-
return Array.isArray(compareValue) ? compareValue.includes(currentValue) : currentValue === compareValue;
|
|
16514
|
-
}
|
|
16515
|
-
};
|
|
16516
|
-
/**
|
|
16517
|
-
* Compares a value against the current value(s) to determine if it is selected.
|
|
16518
|
-
*
|
|
16519
|
-
* @param currentValue The current value of the control.
|
|
16520
|
-
* @param compareValue The value to compare against.
|
|
16521
|
-
* @param compareWith The function or property name to use to compare values.
|
|
16522
|
-
*/
|
|
16523
|
-
const isOptionSelected = (currentValue, compareValue, compareWith) => {
|
|
16524
|
-
if (currentValue === undefined) {
|
|
16525
|
-
return false;
|
|
16526
|
-
}
|
|
16527
|
-
if (Array.isArray(currentValue)) {
|
|
16528
|
-
return currentValue.some((val) => compareOptions(val, compareValue, compareWith));
|
|
16529
|
-
}
|
|
16530
|
-
else {
|
|
16531
|
-
return compareOptions(currentValue, compareValue, compareWith);
|
|
16532
|
-
}
|
|
16533
|
-
};
|
|
16534
|
-
|
|
16535
|
-
/**
|
|
16536
|
-
* Checks if the form element is in an invalid state based on
|
|
16537
|
-
* Ionic validation classes.
|
|
16538
|
-
*
|
|
16539
|
-
* @param el The form element to check.
|
|
16540
|
-
* @returns `true` if the element is invalid, `false` otherwise.
|
|
16541
|
-
*/
|
|
16542
|
-
const checkInvalidState = (el) => {
|
|
16543
|
-
const hasIonTouched = el.classList.contains('ion-touched');
|
|
16544
|
-
const hasIonInvalid = el.classList.contains('ion-invalid');
|
|
16545
|
-
return hasIonTouched && hasIonInvalid;
|
|
16546
|
-
};
|
|
16547
|
-
|
|
16548
16530
|
/**
|
|
16549
16531
|
* Used to update a scoped component that uses emulated slots. This fires when
|
|
16550
16532
|
* content is passed into the slot or when the content inside of a slot changes.
|
|
@@ -16739,7 +16721,7 @@ class Input {
|
|
|
16739
16721
|
/**
|
|
16740
16722
|
* Whether auto correction should be enabled when the user is entering/editing the text value.
|
|
16741
16723
|
*/
|
|
16742
|
-
this.autocorrect =
|
|
16724
|
+
this.autocorrect = 'off';
|
|
16743
16725
|
/**
|
|
16744
16726
|
* Sets the [`autofocus` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) on the native input element.
|
|
16745
16727
|
*
|
|
@@ -17169,7 +17151,7 @@ class Input {
|
|
|
17169
17151
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
17170
17152
|
*/
|
|
17171
17153
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
17172
|
-
return (hAsync(Host, { key: '
|
|
17154
|
+
return (hAsync(Host, { key: '97b5308021064d9e7434ef2d3d96f27045c1b0c4', class: createColorClasses$1(this.color, {
|
|
17173
17155
|
[mode]: true,
|
|
17174
17156
|
'has-value': hasValue,
|
|
17175
17157
|
'has-focus': hasFocus,
|
|
@@ -17180,14 +17162,14 @@ class Input {
|
|
|
17180
17162
|
'in-item': inItem,
|
|
17181
17163
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
17182
17164
|
'input-disabled': disabled,
|
|
17183
|
-
}) }, hAsync("label", { key: '
|
|
17165
|
+
}) }, hAsync("label", { key: '353f68726ce180299bd9adc81e5ff7d26a48f54f', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), hAsync("div", { key: '2034b4bad04fc157f3298a1805819216b6f439d0', class: "native-wrapper", onClick: this.onLabelClick }, hAsync("slot", { key: '96bb5e30176b2bd76dfb75bfbf6c1c3d4403f4bb', name: "start" }), hAsync("input", Object.assign({ key: '1a1d75b0e414a95c89d5a760757c33548d234aca', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (hAsync("button", { key: '95f3df17b7691d9a2e7dcd4a51f16a94aa3ca36f', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
17184
17166
|
/**
|
|
17185
17167
|
* This prevents mobile browsers from
|
|
17186
17168
|
* blurring the input when the clear
|
|
17187
17169
|
* button is activated.
|
|
17188
17170
|
*/
|
|
17189
17171
|
ev.preventDefault();
|
|
17190
|
-
}, onClick: this.clearTextInput }, hAsync("ion-icon", { key: '
|
|
17172
|
+
}, onClick: this.clearTextInput }, hAsync("ion-icon", { key: '16b0af75eed50c8115fb5597f73b5fbf71c2530e', "aria-hidden": "true", icon: clearIconData }))), hAsync("slot", { key: 'c48da0f8ddb3764ac43efa705bb4a6bb2d9cc2fd', name: "end" })), shouldRenderHighlight && hAsync("div", { key: 'f15238481fc20de56ca7ecb6e350b3c024cc755e', class: "input-highlight" })), this.renderBottomContent()));
|
|
17191
17173
|
}
|
|
17192
17174
|
get el() { return getElement(this); }
|
|
17193
17175
|
static get watchers() { return {
|
|
@@ -17207,7 +17189,7 @@ class Input {
|
|
|
17207
17189
|
"color": [513],
|
|
17208
17190
|
"autocapitalize": [1],
|
|
17209
17191
|
"autocomplete": [1],
|
|
17210
|
-
"autocorrect": [
|
|
17192
|
+
"autocorrect": [1],
|
|
17211
17193
|
"autofocus": [4],
|
|
17212
17194
|
"clearInput": [4, "clear-input"],
|
|
17213
17195
|
"clearInputIcon": [1, "clear-input-icon"],
|
|
@@ -28086,6 +28068,10 @@ class RadioGroup {
|
|
|
28086
28068
|
this.helperTextId = `${this.inputId}-helper-text`;
|
|
28087
28069
|
this.errorTextId = `${this.inputId}-error-text`;
|
|
28088
28070
|
this.labelId = `${this.inputId}-lbl`;
|
|
28071
|
+
/**
|
|
28072
|
+
* Track validation state for proper aria-live announcements.
|
|
28073
|
+
*/
|
|
28074
|
+
this.isInvalid = false;
|
|
28089
28075
|
/**
|
|
28090
28076
|
* If `true`, the radios can be deselected.
|
|
28091
28077
|
*/
|
|
@@ -28167,6 +28153,18 @@ class RadioGroup {
|
|
|
28167
28153
|
this.labelId = label.id = this.name + '-lbl';
|
|
28168
28154
|
}
|
|
28169
28155
|
}
|
|
28156
|
+
// Always set initial state
|
|
28157
|
+
this.isInvalid = checkInvalidState(this.el);
|
|
28158
|
+
}
|
|
28159
|
+
componentWillLoad() {
|
|
28160
|
+
this.hintTextId = this.getHintTextId();
|
|
28161
|
+
}
|
|
28162
|
+
disconnectedCallback() {
|
|
28163
|
+
// Clean up validation observer to prevent memory leaks.
|
|
28164
|
+
if (this.validationObserver) {
|
|
28165
|
+
this.validationObserver.disconnect();
|
|
28166
|
+
this.validationObserver = undefined;
|
|
28167
|
+
}
|
|
28170
28168
|
}
|
|
28171
28169
|
getRadios() {
|
|
28172
28170
|
return Array.from(this.el.querySelectorAll('ion-radio'));
|
|
@@ -28242,16 +28240,16 @@ class RadioGroup {
|
|
|
28242
28240
|
* Renders the helper text or error text values
|
|
28243
28241
|
*/
|
|
28244
28242
|
renderHintText() {
|
|
28245
|
-
const { helperText, errorText, helperTextId, errorTextId } = this;
|
|
28243
|
+
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
28246
28244
|
const hasHintText = !!helperText || !!errorText;
|
|
28247
28245
|
if (!hasHintText) {
|
|
28248
28246
|
return;
|
|
28249
28247
|
}
|
|
28250
|
-
return (hAsync("div", { class: "radio-group-top" }, hAsync("div", { id: helperTextId, class: "helper-text" }, helperText), hAsync("div", { id: errorTextId, class: "error-text" }, errorText)));
|
|
28248
|
+
return (hAsync("div", { class: "radio-group-top" }, hAsync("div", { id: helperTextId, class: "helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null), hAsync("div", { id: errorTextId, class: "error-text", role: "alert" }, isInvalid ? errorText : null)));
|
|
28251
28249
|
}
|
|
28252
|
-
|
|
28253
|
-
const {
|
|
28254
|
-
if (
|
|
28250
|
+
getHintTextId() {
|
|
28251
|
+
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
28252
|
+
if (isInvalid && errorText) {
|
|
28255
28253
|
return errorTextId;
|
|
28256
28254
|
}
|
|
28257
28255
|
if (helperText) {
|
|
@@ -28263,7 +28261,7 @@ class RadioGroup {
|
|
|
28263
28261
|
const { label, labelId, el, name, value } = this;
|
|
28264
28262
|
const mode = getIonMode$1(this);
|
|
28265
28263
|
renderHiddenInput(true, el, name, value, false);
|
|
28266
|
-
return (hAsync(Host, { key: '
|
|
28264
|
+
return (hAsync(Host, { key: 'db593b3ed511e9395e3c7bfd91b787328692cd6d', role: "radiogroup", "aria-labelledby": label ? labelId : null, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, class: mode }, this.renderHintText(), hAsync("div", { key: '85045b45a0100a45f3b9a35d1c5a25ec63d525c4', class: "radio-group-wrapper" }, hAsync("slot", { key: '53dacb87ce62398e78771fb2efaf839ab922d946' }))));
|
|
28267
28265
|
}
|
|
28268
28266
|
get el() { return getElement(this); }
|
|
28269
28267
|
static get watchers() { return {
|
|
@@ -28283,6 +28281,8 @@ class RadioGroup {
|
|
|
28283
28281
|
"value": [1032],
|
|
28284
28282
|
"helperText": [1, "helper-text"],
|
|
28285
28283
|
"errorText": [1, "error-text"],
|
|
28284
|
+
"isInvalid": [32],
|
|
28285
|
+
"hintTextId": [32],
|
|
28286
28286
|
"setFocus": [64]
|
|
28287
28287
|
},
|
|
28288
28288
|
"$listeners$": [[4, "keydown", "onKeydown"]],
|
|
@@ -31896,7 +31896,7 @@ class Searchbar {
|
|
|
31896
31896
|
/**
|
|
31897
31897
|
* Set the input's autocorrect property.
|
|
31898
31898
|
*/
|
|
31899
|
-
this.autocorrect =
|
|
31899
|
+
this.autocorrect = 'off';
|
|
31900
31900
|
/**
|
|
31901
31901
|
* Set the cancel button icon. Only applies to `md` mode.
|
|
31902
31902
|
* Defaults to `arrow-back-sharp`.
|
|
@@ -32285,8 +32285,8 @@ class Searchbar {
|
|
|
32285
32285
|
const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
|
|
32286
32286
|
const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
|
|
32287
32287
|
const shouldShowCancelButton = this.shouldShowCancelButton();
|
|
32288
|
-
const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '
|
|
32289
|
-
return (hAsync(Host, { key: '
|
|
32288
|
+
const cancelButton = this.showCancelButton !== 'never' && (hAsync("button", { key: '19e18775856db87daeb4b9e3d7bca0461915a0df', "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: 'b3bbdcc033f3bd3441d619e4a252cef0dad4d07e', "aria-hidden": "true" }, mode === 'md' ? (hAsync("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
|
|
32289
|
+
return (hAsync(Host, { key: '074aa60e051bfb3225e87d44bbb6346c59c73574', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses$1(this.color, {
|
|
32290
32290
|
[mode]: true,
|
|
32291
32291
|
'searchbar-animated': animated,
|
|
32292
32292
|
'searchbar-disabled': this.disabled,
|
|
@@ -32296,14 +32296,14 @@ class Searchbar {
|
|
|
32296
32296
|
'searchbar-has-focus': this.focused,
|
|
32297
32297
|
'searchbar-should-show-clear': this.shouldShowClearButton(),
|
|
32298
32298
|
'searchbar-should-show-cancel': this.shouldShowCancelButton(),
|
|
32299
|
-
}) }, hAsync("div", { key: '
|
|
32299
|
+
}) }, hAsync("div", { key: '54f58a79fe36e85d9295157303f1be89c98bbdaf', class: "searchbar-input-container" }, hAsync("input", Object.assign({ key: 'f991a37fcf54d26b7ad10d89084764e03d97b9de', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: autocapitalize === 'default' ? undefined : autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, hAsync("ion-icon", { key: '8b44dd90a3292c5cf872ef16a8520675f5673494', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), hAsync("button", { key: '79d9cfed8f01268044f82811a35d323a12dca749', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
|
|
32300
32300
|
/**
|
|
32301
32301
|
* This prevents mobile browsers from
|
|
32302
32302
|
* blurring the input when the clear
|
|
32303
32303
|
* button is activated.
|
|
32304
32304
|
*/
|
|
32305
32305
|
ev.preventDefault();
|
|
32306
|
-
}, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: '
|
|
32306
|
+
}, onClick: () => this.onClearInput(true) }, hAsync("ion-icon", { key: 'aa3b9fa8a61f853236783ac7bcd0b113ea65ece2', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
|
|
32307
32307
|
}
|
|
32308
32308
|
get el() { return getElement(this); }
|
|
32309
32309
|
static get watchers() { return {
|
|
@@ -32325,7 +32325,7 @@ class Searchbar {
|
|
|
32325
32325
|
"animated": [4],
|
|
32326
32326
|
"autocapitalize": [1],
|
|
32327
32327
|
"autocomplete": [1],
|
|
32328
|
-
"autocorrect": [
|
|
32328
|
+
"autocorrect": [1],
|
|
32329
32329
|
"cancelButtonIcon": [1, "cancel-button-icon"],
|
|
32330
32330
|
"cancelButtonText": [1, "cancel-button-text"],
|
|
32331
32331
|
"clearIcon": [1, "clear-icon"],
|
|
@@ -33410,7 +33410,7 @@ class Select {
|
|
|
33410
33410
|
}
|
|
33411
33411
|
componentWillLoad() {
|
|
33412
33412
|
this.inheritedAttributes = inheritAttributes$1(this.el, ['aria-label']);
|
|
33413
|
-
this.
|
|
33413
|
+
this.hintTextId = this.getHintTextId();
|
|
33414
33414
|
}
|
|
33415
33415
|
componentDidLoad() {
|
|
33416
33416
|
/**
|
|
@@ -33909,9 +33909,9 @@ class Select {
|
|
|
33909
33909
|
}
|
|
33910
33910
|
renderListbox() {
|
|
33911
33911
|
const { disabled, inputId, isExpanded, required } = this;
|
|
33912
|
-
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-describedby": this.
|
|
33912
|
+
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
33913
33913
|
}
|
|
33914
|
-
|
|
33914
|
+
getHintTextId() {
|
|
33915
33915
|
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
33916
33916
|
if (isInvalid && errorText) {
|
|
33917
33917
|
return errorTextId;
|
|
@@ -34036,7 +34036,7 @@ class Select {
|
|
|
34036
34036
|
"isExpanded": [32],
|
|
34037
34037
|
"hasFocus": [32],
|
|
34038
34038
|
"isInvalid": [32],
|
|
34039
|
-
"
|
|
34039
|
+
"hintTextId": [32],
|
|
34040
34040
|
"open": [64]
|
|
34041
34041
|
},
|
|
34042
34042
|
"$listeners$": undefined,
|
|
@@ -36507,6 +36507,10 @@ class Toggle {
|
|
|
36507
36507
|
this.inheritedAttributes = {};
|
|
36508
36508
|
this.didLoad = false;
|
|
36509
36509
|
this.activated = false;
|
|
36510
|
+
/**
|
|
36511
|
+
* Track validation state for proper aria-live announcements.
|
|
36512
|
+
*/
|
|
36513
|
+
this.isInvalid = false;
|
|
36510
36514
|
/**
|
|
36511
36515
|
* The name of the control, which is submitted with the form data.
|
|
36512
36516
|
*/
|
|
@@ -36620,15 +36624,18 @@ class Toggle {
|
|
|
36620
36624
|
});
|
|
36621
36625
|
}
|
|
36622
36626
|
async connectedCallback() {
|
|
36627
|
+
const { didLoad, el } = this;
|
|
36623
36628
|
/**
|
|
36624
36629
|
* If we have not yet rendered
|
|
36625
36630
|
* ion-toggle, then toggleTrack is not defined.
|
|
36626
36631
|
* But if we are moving ion-toggle via appendChild,
|
|
36627
36632
|
* then toggleTrack will be defined.
|
|
36628
36633
|
*/
|
|
36629
|
-
if (
|
|
36634
|
+
if (didLoad) {
|
|
36630
36635
|
this.setupGesture();
|
|
36631
36636
|
}
|
|
36637
|
+
// Always set initial state
|
|
36638
|
+
this.isInvalid = checkInvalidState(el);
|
|
36632
36639
|
}
|
|
36633
36640
|
componentDidLoad() {
|
|
36634
36641
|
this.setupGesture();
|
|
@@ -36639,9 +36646,15 @@ class Toggle {
|
|
|
36639
36646
|
this.gesture.destroy();
|
|
36640
36647
|
this.gesture = undefined;
|
|
36641
36648
|
}
|
|
36649
|
+
// Clean up validation observer to prevent memory leaks.
|
|
36650
|
+
if (this.validationObserver) {
|
|
36651
|
+
this.validationObserver.disconnect();
|
|
36652
|
+
this.validationObserver = undefined;
|
|
36653
|
+
}
|
|
36642
36654
|
}
|
|
36643
36655
|
componentWillLoad() {
|
|
36644
36656
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
36657
|
+
this.hintTextId = this.getHintTextId();
|
|
36645
36658
|
}
|
|
36646
36659
|
onStart() {
|
|
36647
36660
|
this.activated = true;
|
|
@@ -36682,9 +36695,9 @@ class Toggle {
|
|
|
36682
36695
|
get hasLabel() {
|
|
36683
36696
|
return this.el.textContent !== '';
|
|
36684
36697
|
}
|
|
36685
|
-
|
|
36686
|
-
const {
|
|
36687
|
-
if (
|
|
36698
|
+
getHintTextId() {
|
|
36699
|
+
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
36700
|
+
if (isInvalid && errorText) {
|
|
36688
36701
|
return errorTextId;
|
|
36689
36702
|
}
|
|
36690
36703
|
if (helperText) {
|
|
@@ -36697,7 +36710,7 @@ class Toggle {
|
|
|
36697
36710
|
* This element should only be rendered if hint text is set.
|
|
36698
36711
|
*/
|
|
36699
36712
|
renderHintText() {
|
|
36700
|
-
const { helperText, errorText, helperTextId, errorTextId } = this;
|
|
36713
|
+
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
36701
36714
|
/**
|
|
36702
36715
|
* undefined and empty string values should
|
|
36703
36716
|
* be treated as not having helper/error text.
|
|
@@ -36706,15 +36719,15 @@ class Toggle {
|
|
|
36706
36719
|
if (!hasHintText) {
|
|
36707
36720
|
return;
|
|
36708
36721
|
}
|
|
36709
|
-
return (hAsync("div", { class: "toggle-bottom" }, hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text" }, helperText), hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text" }, errorText)));
|
|
36722
|
+
return (hAsync("div", { class: "toggle-bottom" }, hAsync("div", { id: helperTextId, class: "helper-text", part: "supporting-text helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null), hAsync("div", { id: errorTextId, class: "error-text", part: "supporting-text error-text", role: "alert" }, isInvalid ? errorText : null)));
|
|
36710
36723
|
}
|
|
36711
36724
|
render() {
|
|
36712
|
-
const { activated, alignment, checked, color, disabled, el,
|
|
36725
|
+
const { activated, alignment, checked, color, disabled, el, hasLabel, inheritedAttributes, inputId, inputLabelId, justify, labelPlacement, name, required, } = this;
|
|
36713
36726
|
const mode = getIonMode$1(this);
|
|
36714
36727
|
const value = this.getValue();
|
|
36715
36728
|
const rtl = isRTL$1(el) ? 'rtl' : 'ltr';
|
|
36716
36729
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
36717
|
-
return (hAsync(Host, { key: '
|
|
36730
|
+
return (hAsync(Host, { key: 'f569148edd89ee041a4719ffc4733c16b05229bd', 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, {
|
|
36718
36731
|
[mode]: true,
|
|
36719
36732
|
'in-item': hostContext('ion-item', el),
|
|
36720
36733
|
'toggle-activated': activated,
|
|
@@ -36724,10 +36737,10 @@ class Toggle {
|
|
|
36724
36737
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
36725
36738
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
36726
36739
|
[`toggle-${rtl}`]: true,
|
|
36727
|
-
}) }, hAsync("label", { key: '
|
|
36740
|
+
}) }, hAsync("label", { key: '3027f2ac4be6de422a14486d847fbee77f615db1', class: "toggle-wrapper", htmlFor: inputId }, hAsync("input", Object.assign({ key: '4b0304c9e879e432b80184b4e5de37d55c11b436', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), hAsync("div", { key: '8ef265ec942e7f01ff31cbb202ed146c6bf94e02', class: {
|
|
36728
36741
|
'label-text-wrapper': true,
|
|
36729
36742
|
'label-text-wrapper-hidden': !hasLabel,
|
|
36730
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '
|
|
36743
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, hAsync("slot", { key: '7b162b7dd27199cca2a4c995276a18b9f8e44aaf' }), this.renderHintText()), hAsync("div", { key: 'd13c34bd42fca01cc73ddb4ea7e471b33a282a3e', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
36731
36744
|
}
|
|
36732
36745
|
get el() { return getElement(this); }
|
|
36733
36746
|
static get watchers() { return {
|
|
@@ -36753,7 +36766,9 @@ class Toggle {
|
|
|
36753
36766
|
"justify": [1],
|
|
36754
36767
|
"alignment": [1],
|
|
36755
36768
|
"required": [4],
|
|
36756
|
-
"activated": [32]
|
|
36769
|
+
"activated": [32],
|
|
36770
|
+
"isInvalid": [32],
|
|
36771
|
+
"hintTextId": [32]
|
|
36757
36772
|
},
|
|
36758
36773
|
"$listeners$": undefined,
|
|
36759
36774
|
"$lazyBundleId$": "-",
|
|
@@ -37910,7 +37925,7 @@ var NAMESPACE = (
|
|
|
37910
37925
|
);
|
|
37911
37926
|
|
|
37912
37927
|
/*
|
|
37913
|
-
Stencil Hydrate Runner v4.38.
|
|
37928
|
+
Stencil Hydrate Runner v4.38.0 | MIT Licensed | https://stenciljs.com
|
|
37914
37929
|
*/
|
|
37915
37930
|
var __defProp = Object.defineProperty;
|
|
37916
37931
|
var __export = (target, all) => {
|
|
@@ -38071,6 +38086,82 @@ var MockAttr = class {
|
|
|
38071
38086
|
}
|
|
38072
38087
|
};
|
|
38073
38088
|
|
|
38089
|
+
// src/mock-doc/class-list.ts
|
|
38090
|
+
var MockClassList = class {
|
|
38091
|
+
constructor(elm) {
|
|
38092
|
+
this.elm = elm;
|
|
38093
|
+
}
|
|
38094
|
+
add(...classNames) {
|
|
38095
|
+
const clsNames = getItems(this.elm);
|
|
38096
|
+
let updated = false;
|
|
38097
|
+
classNames.forEach((className) => {
|
|
38098
|
+
className = String(className);
|
|
38099
|
+
validateClass(className);
|
|
38100
|
+
if (clsNames.includes(className) === false) {
|
|
38101
|
+
clsNames.push(className);
|
|
38102
|
+
updated = true;
|
|
38103
|
+
}
|
|
38104
|
+
});
|
|
38105
|
+
if (updated) {
|
|
38106
|
+
this.elm.setAttributeNS(null, "class", clsNames.join(" "));
|
|
38107
|
+
}
|
|
38108
|
+
}
|
|
38109
|
+
remove(...classNames) {
|
|
38110
|
+
const clsNames = getItems(this.elm);
|
|
38111
|
+
let updated = false;
|
|
38112
|
+
classNames.forEach((className) => {
|
|
38113
|
+
className = String(className);
|
|
38114
|
+
validateClass(className);
|
|
38115
|
+
const index = clsNames.indexOf(className);
|
|
38116
|
+
if (index > -1) {
|
|
38117
|
+
clsNames.splice(index, 1);
|
|
38118
|
+
updated = true;
|
|
38119
|
+
}
|
|
38120
|
+
});
|
|
38121
|
+
if (updated) {
|
|
38122
|
+
this.elm.setAttributeNS(null, "class", clsNames.filter((c) => c.length > 0).join(" "));
|
|
38123
|
+
}
|
|
38124
|
+
}
|
|
38125
|
+
contains(className) {
|
|
38126
|
+
className = String(className);
|
|
38127
|
+
return getItems(this.elm).includes(className);
|
|
38128
|
+
}
|
|
38129
|
+
toggle(className) {
|
|
38130
|
+
className = String(className);
|
|
38131
|
+
if (this.contains(className) === true) {
|
|
38132
|
+
this.remove(className);
|
|
38133
|
+
} else {
|
|
38134
|
+
this.add(className);
|
|
38135
|
+
}
|
|
38136
|
+
}
|
|
38137
|
+
get length() {
|
|
38138
|
+
return getItems(this.elm).length;
|
|
38139
|
+
}
|
|
38140
|
+
item(index) {
|
|
38141
|
+
return getItems(this.elm)[index];
|
|
38142
|
+
}
|
|
38143
|
+
toString() {
|
|
38144
|
+
return getItems(this.elm).join(" ");
|
|
38145
|
+
}
|
|
38146
|
+
};
|
|
38147
|
+
function validateClass(className) {
|
|
38148
|
+
if (className === "") {
|
|
38149
|
+
throw new Error("The token provided must not be empty.");
|
|
38150
|
+
}
|
|
38151
|
+
if (/\s/.test(className)) {
|
|
38152
|
+
throw new Error(
|
|
38153
|
+
`The token provided ('${className}') contains HTML space characters, which are not valid in tokens.`
|
|
38154
|
+
);
|
|
38155
|
+
}
|
|
38156
|
+
}
|
|
38157
|
+
function getItems(elm) {
|
|
38158
|
+
const className = elm.getAttribute("class");
|
|
38159
|
+
if (typeof className === "string" && className.length > 0) {
|
|
38160
|
+
return className.trim().split(" ").filter((c) => c.length > 0);
|
|
38161
|
+
}
|
|
38162
|
+
return [];
|
|
38163
|
+
}
|
|
38164
|
+
|
|
38074
38165
|
// src/mock-doc/css-style-declaration.ts
|
|
38075
38166
|
var MockCSSStyleDeclaration = class {
|
|
38076
38167
|
constructor() {
|
|
@@ -48586,81 +48677,6 @@ var STRUCTURE_ELEMENTS = /* @__PURE__ */ new Set([
|
|
|
48586
48677
|
"style"
|
|
48587
48678
|
]);
|
|
48588
48679
|
|
|
48589
|
-
// src/mock-doc/token-list.ts
|
|
48590
|
-
var MockTokenList = class {
|
|
48591
|
-
constructor(elm, attr) {
|
|
48592
|
-
this.elm = elm;
|
|
48593
|
-
this.attr = attr;
|
|
48594
|
-
}
|
|
48595
|
-
add(...tokens) {
|
|
48596
|
-
const items = getItems(this.elm, this.attr);
|
|
48597
|
-
let updated = false;
|
|
48598
|
-
tokens.forEach((token) => {
|
|
48599
|
-
token = String(token);
|
|
48600
|
-
validateToken(token);
|
|
48601
|
-
if (items.includes(token) === false) {
|
|
48602
|
-
items.push(token);
|
|
48603
|
-
updated = true;
|
|
48604
|
-
}
|
|
48605
|
-
});
|
|
48606
|
-
if (updated) {
|
|
48607
|
-
this.elm.setAttributeNS(null, this.attr, items.join(" "));
|
|
48608
|
-
}
|
|
48609
|
-
}
|
|
48610
|
-
remove(...tokens) {
|
|
48611
|
-
const items = getItems(this.elm, this.attr);
|
|
48612
|
-
let updated = false;
|
|
48613
|
-
tokens.forEach((token) => {
|
|
48614
|
-
token = String(token);
|
|
48615
|
-
validateToken(token);
|
|
48616
|
-
const index = items.indexOf(token);
|
|
48617
|
-
if (index > -1) {
|
|
48618
|
-
items.splice(index, 1);
|
|
48619
|
-
updated = true;
|
|
48620
|
-
}
|
|
48621
|
-
});
|
|
48622
|
-
if (updated) {
|
|
48623
|
-
this.elm.setAttributeNS(null, this.attr, items.filter((c) => c.length > 0).join(" "));
|
|
48624
|
-
}
|
|
48625
|
-
}
|
|
48626
|
-
contains(token) {
|
|
48627
|
-
token = String(token);
|
|
48628
|
-
return getItems(this.elm, this.attr).includes(token);
|
|
48629
|
-
}
|
|
48630
|
-
toggle(token) {
|
|
48631
|
-
token = String(token);
|
|
48632
|
-
if (this.contains(token) === true) {
|
|
48633
|
-
this.remove(token);
|
|
48634
|
-
} else {
|
|
48635
|
-
this.add(token);
|
|
48636
|
-
}
|
|
48637
|
-
}
|
|
48638
|
-
get length() {
|
|
48639
|
-
return getItems(this.elm, this.attr).length;
|
|
48640
|
-
}
|
|
48641
|
-
item(index) {
|
|
48642
|
-
return getItems(this.elm, this.attr)[index];
|
|
48643
|
-
}
|
|
48644
|
-
toString() {
|
|
48645
|
-
return getItems(this.elm, this.attr).join(" ");
|
|
48646
|
-
}
|
|
48647
|
-
};
|
|
48648
|
-
function validateToken(token) {
|
|
48649
|
-
if (token === "") {
|
|
48650
|
-
throw new Error("The token provided must not be empty.");
|
|
48651
|
-
}
|
|
48652
|
-
if (/\s/.test(token)) {
|
|
48653
|
-
throw new Error(`The token provided ('${token}') contains HTML space characters, which are not valid in tokens.`);
|
|
48654
|
-
}
|
|
48655
|
-
}
|
|
48656
|
-
function getItems(elm, attr) {
|
|
48657
|
-
const value = elm.getAttribute(attr);
|
|
48658
|
-
if (typeof value === "string" && value.length > 0) {
|
|
48659
|
-
return value.trim().split(" ").filter((c) => c.length > 0);
|
|
48660
|
-
}
|
|
48661
|
-
return [];
|
|
48662
|
-
}
|
|
48663
|
-
|
|
48664
48680
|
// src/mock-doc/node.ts
|
|
48665
48681
|
var MockNode2 = class {
|
|
48666
48682
|
constructor(ownerDocument, nodeType, nodeName, nodeValue) {
|
|
@@ -48928,10 +48944,7 @@ var MockElement = class extends MockNode2 {
|
|
|
48928
48944
|
this.setAttributeNS(null, "class", value);
|
|
48929
48945
|
}
|
|
48930
48946
|
get classList() {
|
|
48931
|
-
return new
|
|
48932
|
-
}
|
|
48933
|
-
get part() {
|
|
48934
|
-
return new MockTokenList(this, "part");
|
|
48947
|
+
return new MockClassList(this);
|
|
48935
48948
|
}
|
|
48936
48949
|
click() {
|
|
48937
48950
|
dispatchEvent(this, new MockEvent("click", { bubbles: true, cancelable: true, composed: true }));
|
|
@@ -51814,7 +51827,7 @@ var MockDocument = class _MockDocument extends MockHTMLElement {
|
|
|
51814
51827
|
}
|
|
51815
51828
|
set location(val) {
|
|
51816
51829
|
if (this.defaultView != null) {
|
|
51817
|
-
this.defaultView.location
|
|
51830
|
+
this.defaultView.location = val;
|
|
51818
51831
|
}
|
|
51819
51832
|
}
|
|
51820
51833
|
get baseURI() {
|