@ionic/core 8.8.7-dev.11779467048.1641d05e → 8.8.7-dev.11779921691.1777274a
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-grid.js +1 -1
- package/components/ion-header.js +1 -1
- package/components/ion-icon.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-link.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-legacy-column.js +1 -1
- package/components/ion-picker-legacy.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-route-redirect.js +1 -1
- package/components/ion-route.js +1 -1
- package/components/ion-router-link.js +1 -1
- package/components/ion-router-outlet.js +1 -1
- package/components/ion-router.js +1 -1
- package/components/ion-row.js +1 -1
- package/components/ion-searchbar.js +1 -1
- package/components/ion-segment-button.js +1 -1
- package/components/ion-segment-content.js +1 -1
- package/components/ion-segment-view.js +1 -1
- package/components/ion-segment.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-option.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-skeleton-text.js +1 -1
- package/components/ion-spinner.js +1 -1
- package/components/ion-split-pane.js +1 -1
- package/components/ion-tab-bar.js +1 -1
- package/components/ion-tab-button.js +1 -1
- package/components/ion-tab.js +1 -1
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/ion-toolbar.js +1 -1
- package/components/p-0sJvNkUu.js +4 -0
- package/components/{p-BcbmT6b3.js → p-7nmSk-Eb.js} +1 -1
- package/components/p-B1O3xdmF.js +4 -0
- package/components/p-BBB8g5Ql.js +4 -0
- package/components/p-BF7rwwG7.js +4 -0
- package/components/p-BHffbls9.js +4 -0
- package/components/p-BKBdJW0R.js +4 -0
- package/components/p-BKGLpdvY.js +4 -0
- package/components/p-BRrh2GWk.js +4 -0
- package/components/{p-BFCM_1oE.js → p-BTWFHAhB.js} +1 -1
- package/components/p-BVOTx9Tr.js +4 -0
- package/components/p-BVbPiSCE.js +4 -0
- package/components/p-BVgmZpV7.js +4 -0
- package/components/{p-CIoAIKEr.js → p-B_4LVR66.js} +1 -1
- package/components/p-BbwW7nXw.js +4 -0
- package/components/p-BePFSJjb.js +4 -0
- package/components/{p-zWP0sUV_.js → p-BilWM2xi.js} +1 -1
- package/components/p-Bnkcvm0_.js +4 -0
- package/components/p-Bp4m7lZT.js +4 -0
- package/components/p-BuQDh8MN.js +4 -0
- package/components/p-C4Uuc-Js.js +4 -0
- package/components/p-CF0UKsA-.js +4 -0
- package/components/p-CMETcSJz.js +4 -0
- package/components/p-CTDfzuym.js +4 -0
- package/components/p-CZwQlWO7.js +4 -0
- package/components/p-CkS5LcG3.js +4 -0
- package/components/p-CrC3J6IY.js +4 -0
- package/components/p-D9SzdDbV.js +4 -0
- package/components/p-DCoLfY48.js +4 -0
- package/components/p-DGHsHldT.js +4 -0
- package/components/p-DK2cppki.js +4 -0
- package/components/p-DMwGijtW.js +4 -0
- package/components/p-DPLIhs_Y.js +4 -0
- package/components/p-DRj_omR8.js +4 -0
- package/components/p-DWBdx_rf.js +4 -0
- package/{dist/ionic/p-CbkICFBN.js → components/p-DXBx6hf_.js} +1 -1
- package/components/p-DZwp0os_.js +4 -0
- package/components/{p-BErKjY03.js → p-DbQt4Kex.js} +1 -1
- package/components/p-DbrEqORq.js +4 -0
- package/{dist/ionic/p-C8IHbcuP.js → components/p-Dh41Mgrr.js} +1 -1
- package/components/p-Dh8YROlw.js +4 -0
- package/components/{p-lIOqnNXn.js → p-Dmd-3R4x.js} +1 -1
- package/components/p-DqL8Jl6C.js +4 -0
- package/components/p-DuOk1CH-.js +4 -0
- package/components/p-Op_wuLsj.js +4 -0
- package/components/p-SikZM1Bp.js +4 -0
- package/components/p-f1voQRQ1.js +4 -0
- package/components/p-fkeHL2Sd.js +4 -0
- package/components/p-gKV0T98m.js +4 -0
- package/components/{p-C8ktKu9j.js → p-jgONJj5a.js} +1 -1
- package/components/p-k6-su0sW.js +4 -0
- package/components/p-l7FroJh2.js +4 -0
- package/components/p-nFFDLHOE.js +4 -0
- package/components/p-pdE-O9G9.js +4 -0
- package/{dist/ionic/p-CWJdc8f_.js → components/p-u-SCu4et.js} +1 -1
- package/css/core.css +1 -1
- package/css/core.css.map +1 -1
- package/css/display.css.map +1 -1
- package/css/flex-utils.css.map +1 -1
- package/css/float-elements.css.map +1 -1
- package/css/global.bundle.css +1 -1
- package/css/global.bundle.css.map +1 -1
- 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/link.ionic.css.map +1 -1
- package/css/ionic/structure.ionic.css.map +1 -1
- package/css/ionic/typography.ionic.css +1 -1
- package/css/ionic/typography.ionic.css.map +1 -1
- package/css/ionic/utils.bundle.ionic.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/padding.css.map +1 -1
- package/css/palettes/dark.always.css +1 -1
- package/css/palettes/dark.always.css.map +1 -1
- package/css/palettes/dark.class.css +1 -1
- package/css/palettes/dark.class.css.map +1 -1
- package/css/palettes/dark.system.css +1 -1
- package/css/palettes/dark.system.css.map +1 -1
- package/css/palettes/high-contrast-dark.always.css +1 -1
- package/css/palettes/high-contrast-dark.always.css.map +1 -1
- package/css/palettes/high-contrast-dark.class.css +1 -1
- package/css/palettes/high-contrast-dark.class.css.map +1 -1
- package/css/palettes/high-contrast-dark.system.css +1 -1
- package/css/palettes/high-contrast-dark.system.css.map +1 -1
- package/css/palettes/high-contrast.always.css +1 -1
- package/css/palettes/high-contrast.always.css.map +1 -1
- package/css/palettes/high-contrast.class.css +1 -1
- package/css/palettes/high-contrast.class.css.map +1 -1
- package/css/palettes/high-contrast.system.css +1 -1
- package/css/palettes/high-contrast.system.css.map +1 -1
- package/css/structure.css.map +1 -1
- package/css/text-alignment.css.map +1 -1
- package/css/text-transformation.css.map +1 -1
- package/css/typography.css +1 -1
- package/css/typography.css.map +1 -1
- package/css/utils.bundle.css.map +1 -1
- package/dist/cjs/{animation-DknMeJ3x.js → animation-CoqRs93a.js} +3 -3
- package/dist/cjs/{app-globals-DtAeky3x.js → app-globals-CzPyigGz.js} +1 -1
- package/dist/cjs/badge-position-DFPHXWP9.js +176 -0
- package/dist/cjs/{button-active-JoIWyYri.js → button-active-lwEZiey1.js} +4 -4
- package/dist/cjs/{capacitor-BnRBm_ys.js → capacitor-F7SUc7Ly.js} +1 -1
- package/dist/cjs/{data-DuOuKG7I.js → data-BsQBKyvn.js} +3 -3
- package/dist/cjs/{framework-delegate-Dx9FrqAC.js → framework-delegate-C1LqXDzY.js} +4 -5
- package/dist/cjs/{haptic-D3Ay9mmg.js → haptic-CBZc4WH_.js} +1 -1
- package/dist/cjs/{index-CzcLEdQ5.js → index-BDthk8R7.js} +1885 -0
- package/dist/cjs/{index-BJlwOs11.js → index-BbhXd9Zs.js} +2 -2
- package/dist/cjs/{index-DMJjUhXH.js → index-Cbme57mm.js} +3 -5
- package/dist/cjs/{index-BJrpF9T3.js → index-DhXmkpe3.js} +3 -4
- package/dist/cjs/{index-Cer2Qy4I.js → index-HkS255C9.js} +6 -7
- package/dist/cjs/{index-D_mPAIqF.js → index-cV9SaEZV.js} +11 -12
- package/dist/cjs/index.cjs.js +15 -18
- package/dist/cjs/{input-shims-Dn33gFln.js → input-shims-eCRI_jn9.js} +15 -17
- package/dist/cjs/{input.utils-DnVnhWEF.js → input.utils-CvLAucXh.js} +4 -5
- package/dist/cjs/ion-accordion_2.cjs.entry.js +31 -34
- package/dist/cjs/ion-action-sheet.cjs.entry.js +34 -37
- package/dist/cjs/ion-alert.cjs.entry.js +44 -47
- package/dist/cjs/ion-app_8.cjs.entry.js +115 -116
- package/dist/cjs/ion-avatar_3.cjs.entry.js +66 -86
- package/dist/cjs/ion-back-button.cjs.entry.js +19 -22
- package/dist/cjs/ion-backdrop.cjs.entry.js +5 -5
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +36 -39
- package/dist/cjs/ion-button_2.cjs.entry.js +54 -34
- package/dist/cjs/ion-card_5.cjs.entry.js +36 -39
- package/dist/cjs/ion-checkbox.cjs.entry.js +23 -26
- package/dist/cjs/ion-chip.cjs.entry.js +51 -51
- package/dist/cjs/ion-col_3.cjs.entry.js +14 -16
- package/dist/cjs/ion-datetime-button.cjs.entry.js +19 -22
- package/dist/cjs/ion-datetime_3.cjs.entry.js +123 -126
- package/dist/cjs/ion-divider.cjs.entry.js +5 -5
- package/dist/cjs/ion-fab_3.cjs.entry.js +27 -30
- package/dist/cjs/ion-img.cjs.entry.js +10 -12
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +25 -27
- package/dist/cjs/ion-input-otp.cjs.entry.js +19 -22
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +16 -17
- package/dist/cjs/ion-input.cjs.entry.js +42 -45
- package/dist/cjs/ion-item-option_3.cjs.entry.js +66 -319
- package/dist/cjs/ion-item_8.cjs.entry.js +71 -83
- package/dist/cjs/ion-loading.cjs.entry.js +27 -30
- package/dist/cjs/ion-menu_3.cjs.entry.js +55 -58
- package/dist/cjs/ion-modal.cjs.entry.js +71 -74
- package/dist/cjs/ion-nav_2.cjs.entry.js +41 -43
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +9 -12
- package/dist/cjs/ion-picker-column.cjs.entry.js +14 -17
- package/dist/cjs/ion-picker.cjs.entry.js +9 -11
- package/dist/cjs/ion-popover.cjs.entry.js +36 -39
- package/dist/cjs/ion-progress-bar.cjs.entry.js +28 -41
- package/dist/cjs/ion-radio_2.cjs.entry.js +31 -34
- package/dist/cjs/ion-range.cjs.entry.js +50 -53
- package/dist/cjs/ion-refresher_2.cjs.entry.js +65 -67
- package/dist/cjs/ion-reorder_2.cjs.entry.js +23 -25
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +7 -7
- package/dist/cjs/ion-route_4.cjs.entry.js +36 -39
- package/dist/cjs/ion-searchbar.cjs.entry.js +38 -41
- package/dist/cjs/ion-segment-content.cjs.entry.js +3 -3
- package/dist/cjs/ion-segment-view.cjs.entry.js +6 -6
- package/dist/cjs/ion-segment_2.cjs.entry.js +35 -38
- package/dist/cjs/ion-select-modal.cjs.entry.js +26 -29
- package/dist/cjs/ion-select_3.cjs.entry.js +74 -77
- package/dist/cjs/ion-spinner.cjs.entry.js +26 -41
- package/dist/cjs/ion-split-pane.cjs.entry.js +12 -13
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +90 -34
- package/dist/cjs/ion-tab_2.cjs.entry.js +27 -27
- package/dist/cjs/ion-text.cjs.entry.js +7 -8
- package/dist/cjs/ion-textarea.cjs.entry.js +35 -38
- package/dist/cjs/ion-toast.cjs.entry.js +41 -44
- package/dist/cjs/ion-toggle.cjs.entry.js +33 -36
- package/dist/cjs/{ionic-global-CSEbHD_F.js → ionic-global-DMWqcBn0.js} +240 -108
- package/dist/cjs/ionic.cjs.js +7 -7
- package/dist/cjs/{ios.transition-UCjoxA3D.js → ios.transition-DcJ6Bw2k.js} +4 -6
- package/dist/cjs/{keyboard-Bhav6x-R.js → keyboard-BCj7bSvQ.js} +4 -4
- package/dist/cjs/{keyboard-Dsczf-iT.js → keyboard-Jy7okGc5.js} +1 -1
- package/dist/cjs/{keyboard-controller-tqGDP9SU.js → keyboard-controller-CPJ4vSr0.js} +4 -4
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{md.transition-CNwlchQn.js → md.transition-DAjf1hlJ.js} +4 -6
- package/dist/cjs/{notch-controller-CgtkBzy0.js → notch-controller-gGuWI1C7.js} +3 -3
- package/dist/cjs/{overlays-C54DhaTC.js → overlays-H4z8xPi9.js} +28 -206
- package/dist/cjs/{select-option-render-C7klBX2H.js → select-option-render-CZtiyFs7.js} +8 -8
- package/dist/cjs/{status-tap-CTY2dMsZ.js → status-tap-CPZvSRKr.js} +7 -9
- package/dist/cjs/{swipe-back-jJFi5KCB.js → swipe-back-CMubrxt-.js} +2 -4
- package/dist/collection/collection-manifest.json +0 -6
- package/dist/collection/components/action-sheet/action-sheet.ionic.css +2 -4
- package/dist/collection/components/action-sheet/action-sheet.ios.css +9 -10
- package/dist/collection/components/action-sheet/action-sheet.md.css +2 -3
- package/dist/collection/components/alert/alert.ionic.css +20 -22
- package/dist/collection/components/alert/alert.ios.css +13 -15
- package/dist/collection/components/alert/alert.md.css +19 -20
- package/dist/collection/components/avatar/avatar.ionic.css +0 -94
- package/dist/collection/components/avatar/avatar.js +22 -7
- package/dist/collection/components/avatar/avatar.md.css +0 -16
- package/dist/collection/components/back-button/back-button.ios.css +1 -1
- package/dist/collection/components/back-button/back-button.js +2 -2
- package/dist/collection/components/badge/badge.css +256 -0
- package/dist/collection/components/badge/badge.interfaces.js +7 -0
- package/dist/collection/components/badge/badge.js +72 -76
- package/dist/collection/components/breadcrumb/breadcrumb.ios.css +9 -9
- package/dist/collection/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/collection/components/breadcrumb/breadcrumb.md.css +9 -9
- package/dist/collection/components/button/button.ionic.css +18 -68
- package/dist/collection/components/button/button.ios.css +17 -32
- package/dist/collection/components/button/button.js +27 -5
- package/dist/collection/components/button/button.md.css +16 -31
- package/dist/collection/components/card/card.ios.css +1 -1
- package/dist/collection/components/card/card.js +2 -2
- package/dist/collection/components/card/card.md.css +1 -1
- package/dist/collection/components/card-subtitle/card-subtitle.ios.css +1 -1
- package/dist/collection/components/card-subtitle/card-subtitle.md.css +1 -1
- package/dist/collection/components/card-title/card-title.md.css +1 -1
- package/dist/collection/components/checkbox/checkbox.ios.css +5 -5
- package/dist/collection/components/checkbox/checkbox.md.css +5 -5
- package/dist/collection/components/chip/chip.css +406 -0
- package/dist/collection/components/chip/chip.js +111 -57
- package/dist/collection/components/col/col.js +2 -3
- package/dist/collection/components/content/content.css +66 -126
- package/dist/collection/components/content/content.js +25 -24
- package/dist/collection/components/datetime/datetime.ios.css +8 -8
- package/dist/collection/components/datetime/datetime.md.css +7 -7
- package/dist/collection/components/datetime-button/datetime-button.ios.css +2 -2
- package/dist/collection/components/datetime-button/datetime-button.md.css +1 -1
- package/dist/collection/components/fab-button/fab-button.ios.css +17 -17
- package/dist/collection/components/fab-button/fab-button.js +2 -2
- package/dist/collection/components/fab-button/fab-button.md.css +6 -6
- package/dist/collection/components/grid/grid.js +2 -2
- package/dist/collection/components/header/header.js +2 -2
- package/dist/collection/components/img/img.js +2 -2
- package/dist/collection/components/infinite-scroll/infinite-scroll.js +1 -1
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +3 -3
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +2 -2
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +3 -3
- package/dist/collection/components/input/input.ios.css +7 -7
- package/dist/collection/components/input/input.js +6 -6
- package/dist/collection/components/input/input.md.css +15 -15
- package/dist/collection/components/input-otp/input-otp.ionic.css +2 -2
- package/dist/collection/components/input-otp/input-otp.ios.css +16 -16
- package/dist/collection/components/input-otp/input-otp.js +3 -3
- package/dist/collection/components/input-otp/input-otp.md.css +16 -16
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +3 -3
- package/dist/collection/components/item/item.ios.css +1 -1
- package/dist/collection/components/item/item.js +2 -2
- package/dist/collection/components/item/item.md.css +2 -2
- package/dist/collection/components/item-divider/item-divider.css +351 -0
- package/dist/collection/components/item-divider/item-divider.js +6 -13
- package/dist/collection/components/item-group/item-group.js +1 -1
- package/dist/collection/components/item-option/item-option.ionic.css +8 -8
- package/dist/collection/components/item-option/item-option.ios.css +3 -3
- package/dist/collection/components/item-option/item-option.js +2 -2
- package/dist/collection/components/item-option/item-option.md.css +2 -2
- package/dist/collection/components/item-options/item-options.ios.css +1 -1
- package/dist/collection/components/item-options/item-options.js +1 -1
- package/dist/collection/components/item-options/item-options.md.css +1 -1
- package/dist/collection/components/item-sliding/{item-sliding.native.css → item-sliding.css} +9 -78
- package/dist/collection/components/item-sliding/item-sliding.js +38 -284
- package/dist/collection/components/label/label.ios.css +1 -1
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/label/label.md.css +2 -2
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list-header/list-header.ios.css +2 -2
- package/dist/collection/components/list-header/list-header.js +2 -2
- package/dist/collection/components/list-header/list-header.md.css +1 -1
- package/dist/collection/components/loading/loading.ios.css +2 -2
- package/dist/collection/components/loading/loading.js +2 -2
- package/dist/collection/components/loading/loading.md.css +3 -3
- package/dist/collection/components/menu/menu.js +2 -2
- package/dist/collection/components/menu-button/menu-button.ios.css +1 -1
- package/dist/collection/components/menu-button/menu-button.js +2 -2
- package/dist/collection/components/menu-toggle/menu-toggle.js +2 -2
- package/dist/collection/components/modal/modal.ios.css +1 -1
- package/dist/collection/components/modal/modal.js +4 -4
- package/dist/collection/components/modal/modal.md.css +1 -1
- package/dist/collection/components/nav/nav.js +3 -3
- package/dist/collection/components/nav-link/nav-link.js +1 -1
- package/dist/collection/components/note/note.ios.css +1 -1
- package/dist/collection/components/note/note.js +2 -2
- package/dist/collection/components/note/note.md.css +1 -1
- package/dist/collection/components/picker/picker.ios.css +1 -1
- package/dist/collection/components/picker-column-option/picker-column-option.js +2 -2
- package/dist/collection/components/picker-legacy/picker.ios.css +2 -2
- package/dist/collection/components/picker-legacy/picker.js +2 -2
- package/dist/collection/components/picker-legacy/picker.md.css +4 -4
- package/dist/collection/components/picker-legacy-column/picker-column.js +2 -2
- package/dist/collection/components/picker-legacy-column/picker-column.md.css +1 -1
- package/dist/collection/components/popover/popover.ios.css +1 -1
- package/dist/collection/components/popover/popover.js +2 -2
- package/dist/collection/components/progress-bar/progress-bar.css +281 -0
- package/dist/collection/components/progress-bar/progress-bar.interfaces.js +4 -0
- package/dist/collection/components/progress-bar/progress-bar.js +30 -30
- package/dist/collection/components/radio/radio.ios.css +2 -2
- package/dist/collection/components/radio/radio.js +3 -3
- package/dist/collection/components/radio/radio.md.css +2 -2
- package/dist/collection/components/radio-group/radio-group.ios.css +2 -2
- package/dist/collection/components/radio-group/radio-group.js +2 -2
- package/dist/collection/components/radio-group/radio-group.md.css +2 -2
- package/dist/collection/components/range/range.ionic.css +1 -1
- package/dist/collection/components/range/range.ios.css +3 -3
- package/dist/collection/components/range/range.js +3 -3
- package/dist/collection/components/range/range.md.css +6 -6
- package/dist/collection/components/refresher/refresher.ios.css +1 -1
- package/dist/collection/components/refresher/refresher.js +3 -3
- package/dist/collection/components/refresher/refresher.md.css +4 -4
- package/dist/collection/components/refresher/refresher.utils.js +2 -2
- package/dist/collection/components/refresher-content/refresher-content.js +2 -2
- package/dist/collection/components/reorder/reorder.js +2 -2
- package/dist/collection/components/reorder-group/reorder-group.js +1 -1
- package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
- package/dist/collection/components/router/router.js +2 -2
- package/dist/collection/components/router/utils/dom.js +2 -2
- package/dist/collection/components/router-link/router-link.css +1 -1
- package/dist/collection/components/router-link/router-link.js +4 -3
- package/dist/collection/components/router-outlet/router-outlet.js +2 -2
- package/dist/collection/components/row/row.js +2 -2
- package/dist/collection/components/searchbar/searchbar.ios.css +3 -3
- package/dist/collection/components/searchbar/searchbar.js +6 -6
- package/dist/collection/components/searchbar/searchbar.md.css +3 -3
- package/dist/collection/components/segment/segment.js +2 -2
- package/dist/collection/components/segment-button/segment-button.ios.css +3 -3
- package/dist/collection/components/segment-button/segment-button.js +2 -2
- package/dist/collection/components/segment-button/segment-button.md.css +2 -2
- package/dist/collection/components/segment-content/segment-content.js +1 -1
- package/dist/collection/components/segment-view/segment-view.js +2 -2
- package/dist/collection/components/select/select.ios.css +6 -6
- package/dist/collection/components/select/select.js +3 -3
- package/dist/collection/components/select/select.md.css +14 -14
- package/dist/collection/components/select-modal/select-modal.ionic.css +3 -3
- package/dist/collection/components/select-modal/select-modal.ios.css +2 -2
- package/dist/collection/components/select-modal/select-modal.js +1 -1
- package/dist/collection/components/select-modal/select-modal.md.css +5 -5
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/select-popover/select-popover.ionic.css +5 -5
- package/dist/collection/components/select-popover/select-popover.ios.css +1 -1
- package/dist/collection/components/select-popover/select-popover.js +2 -2
- package/dist/collection/components/select-popover/select-popover.md.css +5 -5
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.css +248 -0
- package/dist/collection/components/spinner/spinner.js +27 -31
- package/dist/collection/components/split-pane/split-pane.ios.css +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -3
- package/dist/collection/components/split-pane/split-pane.md.css +1 -1
- package/dist/collection/components/tab/tab.js +3 -3
- package/dist/collection/components/tab-bar/tab-bar.ios.css +4 -4
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.md.css +3 -3
- package/dist/collection/components/tab-button/tab-button.ionic.css +0 -61
- package/dist/collection/components/tab-button/tab-button.ios.css +0 -105
- package/dist/collection/components/tab-button/tab-button.js +62 -3
- package/dist/collection/components/tab-button/tab-button.md.css +0 -88
- package/dist/collection/components/tabs/tabs.css +0 -39
- package/dist/collection/components/tabs/tabs.interfaces.js +1 -0
- package/dist/collection/components/tabs/tabs.js +14 -14
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/textarea/textarea.ionic.css +1 -1
- package/dist/collection/components/textarea/textarea.ios.css +6 -6
- package/dist/collection/components/textarea/textarea.js +5 -5
- package/dist/collection/components/textarea/textarea.md.css +14 -14
- package/dist/collection/components/thumbnail/thumbnail.css +2 -2
- package/dist/collection/components/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/toast.ios.css +3 -3
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toast/toast.md.css +5 -5
- package/dist/collection/components/toggle/toggle.ionic.css +1 -1
- package/dist/collection/components/toggle/toggle.ios.css +4 -4
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toggle/toggle.md.css +4 -4
- package/dist/collection/components/toolbar/toolbar.ios.css +2 -2
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/components/toolbar/toolbar.md.css +1 -1
- package/dist/collection/global/config.js +27 -0
- package/dist/collection/global/ionic-global.js +59 -76
- package/dist/collection/index.js +1 -2
- package/dist/collection/themes/base/dark.tokens.js +218 -0
- package/dist/collection/themes/base/default.tokens.js +157 -0
- package/dist/collection/themes/base/high-contrast-dark.tokens.js +210 -0
- package/dist/collection/themes/base/high-contrast.tokens.js +169 -0
- package/dist/collection/themes/base/light.tokens.js +163 -0
- package/dist/collection/themes/base/shared.tokens.js +15 -0
- package/dist/collection/themes/ionic/dark.tokens.js +5 -0
- package/dist/collection/themes/ionic/default.tokens.js +700 -0
- package/dist/collection/themes/ionic/light.tokens.js +25 -0
- package/dist/collection/themes/ionic/shared.tokens.js +122 -0
- package/dist/collection/themes/ios/dark.tokens.js +18 -0
- package/dist/collection/themes/ios/default.tokens.js +711 -0
- package/dist/collection/themes/ios/high-contrast-dark.tokens.js +6 -0
- package/dist/collection/themes/ios/high-contrast.tokens.js +5 -0
- package/dist/collection/themes/ios/light.tokens.js +4 -0
- package/dist/collection/themes/ios/shared.tokens.js +63 -0
- package/dist/collection/themes/md/dark.tokens.js +23 -0
- package/dist/collection/themes/md/default.tokens.js +819 -0
- package/dist/collection/themes/md/high-contrast-dark.tokens.js +10 -0
- package/dist/collection/themes/md/high-contrast.tokens.js +5 -0
- package/dist/collection/themes/md/light.tokens.js +4 -0
- package/dist/collection/themes/md/shared.tokens.js +127 -0
- package/dist/collection/themes/themes.interfaces.js +1 -0
- package/dist/collection/utils/badge-position.js +171 -0
- package/dist/collection/utils/content/index.js +2 -2
- package/dist/collection/utils/framework-delegate.js +3 -3
- package/dist/collection/utils/helpers.js +40 -0
- package/dist/collection/utils/input-shims/hacks/scroll-padding.js +2 -2
- package/dist/collection/utils/input-shims/input-shims.js +2 -2
- package/dist/collection/utils/media.js +0 -1
- package/dist/collection/utils/menu-controller/index.js +2 -2
- package/dist/collection/utils/overlays.js +12 -189
- package/dist/collection/utils/status-tap.js +2 -2
- package/dist/collection/utils/test/playwright/page/utils/set-content.js +36 -2
- package/dist/collection/utils/theme.js +611 -9
- package/dist/docs.json +1501 -858
- package/dist/esm/{animation-Cqe2x-Pt.js → animation-pTY9wqHp.js} +2 -2
- package/dist/esm/{app-globals-Dk1rB3aE.js → app-globals-BDyWBDAh.js} +1 -1
- package/dist/esm/badge-position-C1Q3qPZy.js +174 -0
- package/dist/esm/{button-active-g6ZnZzDZ.js → button-active-Ca3reU6j.js} +2 -2
- package/dist/esm/{capacitor-C4lYa1nV.js → capacitor-isspMXyk.js} +1 -1
- package/dist/esm/{data-BNKYavC3.js → data-CAYLUmgh.js} +1 -1
- package/dist/esm/{framework-delegate-CjVwn_KZ.js → framework-delegate-reUSF3oT.js} +3 -4
- package/dist/esm/{haptic-_88k1V5U.js → haptic-FwCam9_Q.js} +1 -1
- package/dist/esm/{index-BmkLokUL.js → index-6QFmgmEW.js} +2 -3
- package/dist/esm/{index-Omi_TcwW.js → index-BrrkdT9L.js} +1851 -1
- package/dist/esm/{index-hpH08p5s.js → index-CEhdLZKQ.js} +4 -5
- package/dist/esm/{index-C5t9-ciC.js → index-CQnGY3Fp.js} +2 -4
- package/dist/esm/{index-CGthURny.js → index-DUAoXzCH.js} +3 -4
- package/dist/esm/{index-D4ugF_sT.js → index-V2HKYEdd.js} +1 -1
- package/dist/esm/index.js +10 -13
- package/dist/esm/{input-shims-vDjCsx95.js → input-shims-Cuw1QMqP.js} +8 -10
- package/dist/esm/{input.utils-B9Q5xHp6.js → input.utils-BiYknr4n.js} +2 -3
- package/dist/esm/ion-accordion_2.entry.js +2 -5
- package/dist/esm/ion-action-sheet.entry.js +13 -16
- package/dist/esm/ion-alert.entry.js +13 -16
- package/dist/esm/ion-app_8.entry.js +36 -37
- package/dist/esm/ion-avatar_3.entry.js +60 -80
- package/dist/esm/ion-back-button.entry.js +3 -6
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +5 -8
- package/dist/esm/ion-button_2.entry.js +31 -11
- package/dist/esm/ion-card_5.entry.js +8 -11
- package/dist/esm/ion-checkbox.entry.js +4 -7
- package/dist/esm/ion-chip.entry.js +50 -50
- package/dist/esm/ion-col_3.entry.js +8 -10
- package/dist/esm/ion-datetime-button.entry.js +6 -9
- package/dist/esm/ion-datetime_3.entry.js +17 -20
- package/dist/esm/ion-divider.entry.js +2 -2
- package/dist/esm/ion-fab_3.entry.js +5 -8
- package/dist/esm/ion-img.entry.js +4 -6
- package/dist/esm/ion-infinite-scroll_2.entry.js +10 -12
- package/dist/esm/ion-input-otp.entry.js +8 -11
- package/dist/esm/ion-input-password-toggle.entry.js +5 -6
- package/dist/esm/ion-input.entry.js +11 -14
- package/dist/esm/ion-item-option_3.entry.js +49 -302
- package/dist/esm/ion-item_8.entry.js +28 -40
- package/dist/esm/ion-loading.entry.js +11 -14
- package/dist/esm/ion-menu_3.entry.js +13 -16
- package/dist/esm/ion-modal.entry.js +16 -19
- package/dist/esm/ion-nav_2.entry.js +8 -10
- package/dist/esm/ion-picker-column-option.entry.js +4 -7
- package/dist/esm/ion-picker-column.entry.js +4 -7
- package/dist/esm/ion-picker.entry.js +2 -4
- package/dist/esm/ion-popover.entry.js +9 -12
- package/dist/esm/ion-progress-bar.entry.js +21 -34
- package/dist/esm/ion-radio_2.entry.js +11 -14
- package/dist/esm/ion-range.entry.js +9 -12
- package/dist/esm/ion-refresher_2.entry.js +16 -18
- package/dist/esm/ion-reorder_2.entry.js +8 -10
- package/dist/esm/ion-ripple-effect.entry.js +3 -3
- package/dist/esm/ion-route_4.entry.js +6 -9
- package/dist/esm/ion-searchbar.entry.js +9 -12
- package/dist/esm/ion-segment-content.entry.js +2 -2
- package/dist/esm/ion-segment-view.entry.js +3 -3
- package/dist/esm/ion-segment_2.entry.js +8 -11
- package/dist/esm/ion-select-modal.entry.js +10 -13
- package/dist/esm/ion-select_3.entry.js +18 -21
- package/dist/esm/ion-spinner.entry.js +18 -33
- package/dist/esm/ion-split-pane.entry.js +7 -8
- package/dist/esm/ion-tab-bar_2.entry.js +75 -19
- package/dist/esm/ion-tab_2.entry.js +19 -19
- package/dist/esm/ion-text.entry.js +4 -5
- package/dist/esm/ion-textarea.entry.js +11 -14
- package/dist/esm/ion-toast.entry.js +10 -13
- package/dist/esm/ion-toggle.entry.js +10 -13
- package/dist/esm/{ionic-global-CAZb-5i-.js → ionic-global-CYPOXYV9.js} +214 -82
- package/dist/esm/ionic.js +5 -5
- package/dist/esm/{ios.transition-CzSncKQg.js → ios.transition-Udz14cFX.js} +4 -6
- package/dist/esm/{keyboard-Cpw6xVLJ.js → keyboard-BJeLQuaz.js} +1 -1
- package/dist/esm/{keyboard-controller-CAc33ylR.js → keyboard-controller-DtjExoRO.js} +3 -3
- package/dist/esm/{keyboard-DJpS2IGK.js → keyboard-uAtaO52Q.js} +4 -4
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-DIsWqYBZ.js → md.transition-BjHXd0f9.js} +4 -6
- package/dist/esm/{notch-controller-DiBq57w8.js → notch-controller-oUerJ6nV.js} +2 -2
- package/dist/esm/{overlays-ttYCMKRp.js → overlays-CSQv-GZq.js} +14 -192
- package/dist/esm/{select-option-render-B2qc5ZP7.js → select-option-render-DmisODWi.js} +2 -2
- package/dist/esm/{status-tap-fYFdZg6z.js → status-tap-DRMNWPiL.js} +3 -5
- package/dist/esm/{swipe-back-BzGqTrrq.js → swipe-back-D8jSdnGS.js} +1 -3
- package/dist/html.html-data.json +29 -202
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-01aa6153.entry.js +4 -0
- package/dist/ionic/p-07a3d959.entry.js +4 -0
- package/dist/ionic/p-0b68c8a9.entry.js +4 -0
- package/dist/ionic/p-0d50e1d3.entry.js +4 -0
- package/dist/ionic/p-124bb083.entry.js +4 -0
- package/dist/ionic/p-1f8298b3.entry.js +4 -0
- package/dist/ionic/p-1yGxS_yC.js +4 -0
- package/dist/ionic/p-29273c47.entry.js +4 -0
- package/dist/ionic/p-340449bb.entry.js +4 -0
- package/dist/ionic/p-39a55f1c.entry.js +4 -0
- package/dist/ionic/p-3a362e49.entry.js +4 -0
- package/dist/ionic/p-3a85e733.entry.js +4 -0
- package/dist/ionic/p-3b3dee19.entry.js +4 -0
- package/dist/ionic/p-485c13f3.entry.js +4 -0
- package/dist/ionic/p-4a63756e.entry.js +4 -0
- package/dist/ionic/p-4a6c21f5.entry.js +4 -0
- package/dist/ionic/p-4e8b3cd6.entry.js +4 -0
- package/dist/ionic/p-4f332976.entry.js +4 -0
- package/dist/ionic/{p-9d789053.entry.js → p-576b4ff1.entry.js} +1 -1
- package/dist/ionic/p-62a1e227.entry.js +4 -0
- package/dist/ionic/p-64877060.entry.js +4 -0
- package/dist/ionic/p-678f1511.entry.js +4 -0
- package/dist/ionic/p-6a0b6306.entry.js +4 -0
- package/dist/ionic/p-6c9228d4.entry.js +4 -0
- package/dist/ionic/p-70ab2edf.entry.js +4 -0
- package/dist/ionic/p-74d05699.entry.js +4 -0
- package/dist/ionic/p-77aa1e90.entry.js +4 -0
- package/dist/ionic/p-79be145b.entry.js +4 -0
- package/dist/ionic/p-7ba7526a.entry.js +4 -0
- package/dist/ionic/p-7cffb312.entry.js +4 -0
- package/dist/ionic/p-7e44a4c5.entry.js +4 -0
- package/dist/ionic/{p-45825c2c.entry.js → p-88717a4c.entry.js} +1 -1
- package/dist/ionic/p-918cf662.entry.js +4 -0
- package/dist/ionic/p-9476775d.entry.js +4 -0
- package/dist/ionic/p-9b05cd45.entry.js +4 -0
- package/dist/ionic/p-9b75925d.entry.js +4 -0
- package/dist/ionic/p-9c849562.entry.js +4 -0
- package/dist/ionic/p-9e74defe.entry.js +4 -0
- package/{components/p-oF-CwZ0b.js → dist/ionic/p-B7D6IyeU.js} +1 -1
- package/dist/ionic/p-BQZlX_QW.js +4 -0
- package/dist/ionic/p-BiY-3g9k.js +4 -0
- package/dist/ionic/p-BrrkdT9L.js +5 -0
- package/dist/ionic/p-BzLJp2YK.js +4 -0
- package/dist/ionic/{p-ZqkJDyhe.js → p-CAUIo7pE.js} +1 -1
- package/dist/ionic/p-CQA3_fVT.js +4 -0
- package/dist/ionic/{p-SJmaFQ0H.js → p-CTDx2dNQ.js} +1 -1
- package/dist/ionic/p-CWcwW_B7.js +4 -0
- package/dist/ionic/p-CYLLjyEJ.js +4 -0
- package/dist/ionic/p-Cd5dRcMd.js +4 -0
- package/dist/ionic/p-CeizwFUQ.js +4 -0
- package/{components/p-Cmql_g3_.js → dist/ionic/p-Chp7Hiov.js} +1 -1
- package/{components/p-sK-FK9CT.js → dist/ionic/p-Ckv4csSE.js} +1 -1
- package/dist/ionic/p-CnLgxV__.js +4 -0
- package/dist/ionic/p-CrC3J6IY.js +4 -0
- package/dist/ionic/p-D6sRRFCv.js +4 -0
- package/dist/ionic/p-DBv6epu_.js +4 -0
- package/dist/ionic/p-Dl7gXMai.js +4 -0
- package/dist/ionic/p-Dxq4Ulb1.js +4 -0
- package/dist/ionic/p-YuNpC3uG.js +4 -0
- package/{components/p-BLysWQA1.js → dist/ionic/p-ZdzrkYIV.js} +1 -1
- package/dist/ionic/p-a6c90dec.entry.js +4 -0
- package/dist/ionic/{p-8537b2fb.entry.js → p-a71389be.entry.js} +1 -1
- package/dist/ionic/p-a714ca93.entry.js +4 -0
- package/dist/ionic/p-bcaba3e0.entry.js +4 -0
- package/dist/ionic/p-bd44b49f.entry.js +4 -0
- package/dist/ionic/{p-7d267dc6.entry.js → p-c636b0d3.entry.js} +1 -1
- package/dist/ionic/p-cdc18886.entry.js +4 -0
- package/dist/ionic/p-ce6acd14.entry.js +4 -0
- package/dist/ionic/p-d7b2d59f.entry.js +4 -0
- package/dist/ionic/p-dc2812ee.entry.js +4 -0
- package/dist/ionic/p-de74cc27.entry.js +4 -0
- package/dist/ionic/p-ef1330ac.entry.js +4 -0
- package/dist/ionic/p-f57fea97.entry.js +4 -0
- package/dist/ionic/p-f840d58e.entry.js +4 -0
- package/dist/ionic/p-fK-AnPaq.js +4 -0
- package/dist/ionic/p-fce34e31.entry.js +4 -0
- package/dist/ionic/p-fd014d35.entry.js +4 -0
- package/dist/ionic/p-gBNkhCZy.js +4 -0
- package/dist/ionic/p-gYuHMhs-.js +4 -0
- package/dist/ionic/p-nMHpWRBR.js +4 -0
- package/dist/types/components/avatar/avatar.d.ts +6 -0
- package/dist/types/components/badge/badge.d.ts +30 -17
- package/dist/types/components/badge/badge.interfaces.d.ts +73 -0
- package/dist/types/components/button/button.d.ts +7 -1
- package/dist/types/components/chip/chip.d.ts +45 -14
- package/dist/types/components/chip/chip.interfaces.d.ts +97 -0
- package/dist/types/components/content/content.d.ts +1 -2
- package/dist/types/components/content/{content-interface.d.ts → content.interfaces.d.ts} +18 -0
- package/dist/types/components/item-divider/item-divider.d.ts +0 -1
- package/dist/types/components/item-divider/item-divider.interfaces.d.ts +132 -0
- package/dist/types/components/item-sliding/item-sliding.d.ts +2 -17
- package/dist/types/components/progress-bar/progress-bar.d.ts +9 -4
- package/dist/types/components/progress-bar/progress-bar.interfaces.d.ts +90 -0
- package/dist/types/components/spinner/spinner-configs.d.ts +2 -2
- package/dist/types/components/spinner/spinner.d.ts +8 -4
- package/dist/types/components/spinner/spinner.interfaces.d.ts +72 -0
- package/dist/types/components/tab/tab.d.ts +0 -1
- package/dist/types/components/tab-button/tab-button.d.ts +7 -0
- package/dist/types/components/tabs/tabs.d.ts +1 -1
- package/dist/types/components.d.ts +64 -186
- package/dist/types/global/config.d.ts +9 -1
- package/dist/types/global/ionic-global.d.ts +3 -10
- package/dist/types/index.d.ts +1 -2
- package/dist/types/interface.d.ts +2 -2
- package/dist/types/themes/base/dark.tokens.d.ts +2 -0
- package/dist/types/themes/base/default.tokens.d.ts +2 -0
- package/dist/types/themes/base/high-contrast-dark.tokens.d.ts +2 -0
- package/dist/types/themes/base/high-contrast.tokens.d.ts +2 -0
- package/dist/types/themes/base/light.tokens.d.ts +2 -0
- package/dist/types/themes/base/shared.tokens.d.ts +11 -0
- package/dist/types/themes/ionic/dark.tokens.d.ts +2 -0
- package/dist/types/themes/ionic/default.tokens.d.ts +2 -0
- package/dist/types/themes/ionic/light.tokens.d.ts +2 -0
- package/dist/types/themes/ionic/shared.tokens.d.ts +112 -0
- package/dist/types/themes/ios/dark.tokens.d.ts +2 -0
- package/dist/types/themes/ios/default.tokens.d.ts +2 -0
- package/dist/types/themes/ios/high-contrast-dark.tokens.d.ts +2 -0
- package/dist/types/themes/ios/high-contrast.tokens.d.ts +2 -0
- package/dist/types/themes/ios/light.tokens.d.ts +2 -0
- package/dist/types/themes/ios/shared.tokens.d.ts +56 -0
- package/dist/types/themes/md/dark.tokens.d.ts +2 -0
- package/dist/types/themes/md/default.tokens.d.ts +2 -0
- package/dist/types/themes/md/high-contrast-dark.tokens.d.ts +2 -0
- package/dist/types/themes/md/high-contrast.tokens.d.ts +2 -0
- package/dist/types/themes/md/light.tokens.d.ts +2 -0
- package/dist/types/themes/md/shared.tokens.d.ts +117 -0
- package/dist/types/themes/themes.interfaces.d.ts +278 -0
- package/dist/types/utils/badge-position.d.ts +106 -0
- package/dist/types/utils/config.d.ts +6 -0
- package/dist/types/utils/helpers.d.ts +16 -0
- package/dist/types/utils/platform.d.ts +2 -2
- package/dist/types/utils/theme.d.ts +198 -3
- package/hydrate/index.js +7551 -6874
- package/hydrate/index.mjs +7551 -6874
- package/package.json +6 -4
- package/components/ion-gallery.d.ts +0 -11
- package/components/ion-gallery.js +0 -4
- package/components/p-0sa2JgYA.js +0 -4
- package/components/p-3Ni1Z654.js +0 -4
- package/components/p-9gxM3tAr.js +0 -4
- package/components/p-B636tzQ7.js +0 -4
- package/components/p-B8Oa6a_k.js +0 -4
- package/components/p-BCDEEm9n.js +0 -4
- package/components/p-BDndEqui.js +0 -4
- package/components/p-BFbsici0.js +0 -4
- package/components/p-BLCuPAtN.js +0 -4
- package/components/p-BO4aickU.js +0 -4
- package/components/p-BRWWcnBq.js +0 -4
- package/components/p-BXcCGjEc.js +0 -4
- package/components/p-BbQGmZyu.js +0 -4
- package/components/p-BeVlsaLA.js +0 -4
- package/components/p-Bp__mr16.js +0 -4
- package/components/p-BqDiJgC_.js +0 -4
- package/components/p-BqImG3uk.js +0 -4
- package/components/p-C00Y_WJv.js +0 -4
- package/components/p-C0U8YqYW.js +0 -4
- package/components/p-C38HUpU5.js +0 -4
- package/components/p-C4G6C9fP.js +0 -4
- package/components/p-CKfNwyAb.js +0 -4
- package/components/p-CN-WzkJE.js +0 -4
- package/components/p-CVBkx7m1.js +0 -4
- package/components/p-CVRxImH6.js +0 -4
- package/components/p-Cb9imMZh.js +0 -4
- package/components/p-Cf9-xP7P.js +0 -4
- package/components/p-CjSx8W-k.js +0 -4
- package/components/p-CoFDGTFO.js +0 -4
- package/components/p-CoFqDNc5.js +0 -4
- package/components/p-CykCvfXQ.js +0 -4
- package/components/p-DDw-NYxz.js +0 -4
- package/components/p-DHTe6lDL.js +0 -4
- package/components/p-DH_9VCbD.js +0 -4
- package/components/p-DTtRWhIZ.js +0 -4
- package/components/p-DVcs-2q3.js +0 -4
- package/components/p-DXUyXgVL.js +0 -4
- package/components/p-DaJxRxSQ.js +0 -4
- package/components/p-IMXp2Inn.js +0 -4
- package/components/p-TR4ubkPu.js +0 -4
- package/components/p-XegQjlzJ.js +0 -4
- package/components/p-qZr7hBPz.js +0 -4
- package/components/p-t98_NeNv.js +0 -4
- package/components/p-vCpF32Z7.js +0 -4
- package/components/p-vXpMhGrs.js +0 -4
- package/components/p-wCDzv5Q8.js +0 -4
- package/dist/cjs/focus-visible-BIj-I3-C.js +0 -101
- package/dist/cjs/helpers-DJYxKN5U.js +0 -413
- package/dist/cjs/ion-gallery.cjs.entry.js +0 -510
- package/dist/cjs/theme-IlOsGAz7.js +0 -72
- package/dist/collection/components/badge/badge.ionic.css +0 -275
- package/dist/collection/components/badge/badge.ios.css +0 -295
- package/dist/collection/components/badge/badge.md.css +0 -275
- package/dist/collection/components/chip/chip.ionic.css +0 -217
- package/dist/collection/components/chip/chip.ios.css +0 -265
- package/dist/collection/components/chip/chip.md.css +0 -260
- package/dist/collection/components/gallery/gallery-constants.js +0 -12
- package/dist/collection/components/gallery/gallery.css +0 -100
- package/dist/collection/components/gallery/gallery.js +0 -595
- package/dist/collection/components/gallery/test/utils.js +0 -100
- package/dist/collection/components/item-divider/item-divider.ios.css +0 -369
- package/dist/collection/components/item-divider/item-divider.md.css +0 -425
- package/dist/collection/components/item-sliding/item-sliding.ionic.css +0 -211
- package/dist/collection/components/progress-bar/progress-bar.ionic.css +0 -287
- package/dist/collection/components/progress-bar/progress-bar.ios.css +0 -298
- package/dist/collection/components/progress-bar/progress-bar.md.css +0 -290
- package/dist/collection/components/spinner/spinner.ionic.css +0 -300
- package/dist/collection/components/spinner/spinner.native.css +0 -199
- package/dist/collection/utils/css-value-validation.js +0 -25
- package/dist/esm/focus-visible-vXpMhGrs.js +0 -97
- package/dist/esm/helpers-Do7zwvM1.js +0 -392
- package/dist/esm/ion-gallery.entry.js +0 -508
- package/dist/esm/theme-DaJxRxSQ.js +0 -67
- package/dist/ionic/p-00c0bd38.entry.js +0 -4
- package/dist/ionic/p-06bd033b.entry.js +0 -4
- package/dist/ionic/p-07d3388f.entry.js +0 -4
- package/dist/ionic/p-11nqcMM3.js +0 -4
- package/dist/ionic/p-139d02eb.entry.js +0 -4
- package/dist/ionic/p-1709b0aa.entry.js +0 -4
- package/dist/ionic/p-1c2c1869.entry.js +0 -4
- package/dist/ionic/p-1c4de46b.entry.js +0 -4
- package/dist/ionic/p-1e1c8d61.entry.js +0 -4
- package/dist/ionic/p-1f74b8d4.entry.js +0 -4
- package/dist/ionic/p-2311e660.entry.js +0 -4
- package/dist/ionic/p-2aa7567e.entry.js +0 -4
- package/dist/ionic/p-2ad79c23.entry.js +0 -4
- package/dist/ionic/p-2f8aa0ac.entry.js +0 -4
- package/dist/ionic/p-3331cfa9.entry.js +0 -4
- package/dist/ionic/p-33c34361.entry.js +0 -4
- package/dist/ionic/p-37ccbee4.entry.js +0 -4
- package/dist/ionic/p-3aba19e2.entry.js +0 -4
- package/dist/ionic/p-3f79f594.entry.js +0 -4
- package/dist/ionic/p-48026d15.entry.js +0 -4
- package/dist/ionic/p-488992b6.entry.js +0 -4
- package/dist/ionic/p-5061a8d4.entry.js +0 -4
- package/dist/ionic/p-50b61fab.entry.js +0 -4
- package/dist/ionic/p-50cd2d57.entry.js +0 -4
- package/dist/ionic/p-5274f999.entry.js +0 -4
- package/dist/ionic/p-586d4270.entry.js +0 -4
- package/dist/ionic/p-68c21b2a.entry.js +0 -4
- package/dist/ionic/p-6fbead83.entry.js +0 -4
- package/dist/ionic/p-7054a1b9.entry.js +0 -4
- package/dist/ionic/p-7194f6fa.entry.js +0 -4
- package/dist/ionic/p-72491468.entry.js +0 -4
- package/dist/ionic/p-76307d10.entry.js +0 -4
- package/dist/ionic/p-7d5057c4.entry.js +0 -4
- package/dist/ionic/p-83c693c4.entry.js +0 -4
- package/dist/ionic/p-8f04bd89.entry.js +0 -4
- package/dist/ionic/p-8uDL7fql.js +0 -4
- package/dist/ionic/p-90e653e3.entry.js +0 -4
- package/dist/ionic/p-967576f8.entry.js +0 -4
- package/dist/ionic/p-BsfuYVMP.js +0 -4
- package/dist/ionic/p-Bx0bt2Ar.js +0 -4
- package/dist/ionic/p-C2mpVKI1.js +0 -4
- package/dist/ionic/p-C5zxLmJ_.js +0 -4
- package/dist/ionic/p-CBV-BGvD.js +0 -4
- package/dist/ionic/p-CDn0uNJA.js +0 -4
- package/dist/ionic/p-CFjI63GE.js +0 -4
- package/dist/ionic/p-CHE1xWbg.js +0 -4
- package/dist/ionic/p-CIk5QtPm.js +0 -4
- package/dist/ionic/p-CQKe4n56.js +0 -4
- package/dist/ionic/p-CVp2D--1.js +0 -4
- package/dist/ionic/p-CXqdKf1K.js +0 -4
- package/dist/ionic/p-Cb-0O4h8.js +0 -4
- package/dist/ionic/p-DKWXAwlR.js +0 -4
- package/dist/ionic/p-DaJxRxSQ.js +0 -4
- package/dist/ionic/p-DdyNaGpi.js +0 -4
- package/dist/ionic/p-DoyDJ2X5.js +0 -4
- package/dist/ionic/p-FvDKM4Ax.js +0 -4
- package/dist/ionic/p-Omi_TcwW.js +0 -5
- package/dist/ionic/p-SOASChNu.js +0 -4
- package/dist/ionic/p-acdc21a6.entry.js +0 -4
- package/dist/ionic/p-ae667493.entry.js +0 -4
- package/dist/ionic/p-b2fe6c1c.entry.js +0 -4
- package/dist/ionic/p-b3c9f19c.entry.js +0 -4
- package/dist/ionic/p-b653f4c2.entry.js +0 -4
- package/dist/ionic/p-bb898d47.entry.js +0 -4
- package/dist/ionic/p-bd71a4a7.entry.js +0 -4
- package/dist/ionic/p-d4ed5710.entry.js +0 -4
- package/dist/ionic/p-d6299c37.entry.js +0 -4
- package/dist/ionic/p-dea52cb3.entry.js +0 -4
- package/dist/ionic/p-e18d3fdb.entry.js +0 -4
- package/dist/ionic/p-f02ba305.entry.js +0 -4
- package/dist/ionic/p-fad05840.entry.js +0 -4
- package/dist/ionic/p-fc796d48.entry.js +0 -4
- package/dist/ionic/p-qETiT38a.js +0 -4
- package/dist/ionic/p-vXpMhGrs.js +0 -4
- package/dist/types/components/gallery/gallery-constants.d.ts +0 -9
- package/dist/types/components/gallery/gallery-interface.d.ts +0 -10
- package/dist/types/components/gallery/gallery.d.ts +0 -183
- package/dist/types/components/gallery/test/utils.d.ts +0 -2
- package/dist/types/components/spinner/spinner-interface.d.ts +0 -22
- package/dist/types/utils/css-value-validation.d.ts +0 -12
- /package/dist/collection/components/{content/content-interface.js → chip/chip.interfaces.js} +0 -0
- /package/dist/collection/components/{gallery/gallery-interface.js → content/content.interfaces.js} +0 -0
- /package/dist/collection/components/{spinner/spinner-interface.js → item-divider/item-divider.interfaces.js} +0 -0
- /package/dist/collection/components/{tabs/tabs-interface.js → spinner/spinner.interfaces.js} +0 -0
- /package/dist/types/components/tabs/{tabs-interface.d.ts → tabs.interfaces.d.ts} +0 -0
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
5
|
+
var t = {};
|
|
6
|
+
for (var p in s)
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
8
|
+
t[p] = s[p];
|
|
9
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
10
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
11
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
12
|
+
t[p[i]] = s[p[i]];
|
|
13
|
+
}
|
|
14
|
+
return t;
|
|
15
|
+
};
|
|
16
|
+
import { printIonWarning } from "./logging/index";
|
|
17
|
+
import { deepMerge } from "./helpers";
|
|
18
|
+
export const CSS_PROPS_PREFIX = '--ion-';
|
|
19
|
+
export const CSS_ROOT_SELECTOR = ':root';
|
|
4
20
|
/**
|
|
5
21
|
* Checks if an element has a parent matching the specified selector.
|
|
6
22
|
* This handles an element in both light DOM and shadow DOM contexts.
|
|
@@ -50,16 +66,602 @@ export const getClassMap = (classes) => {
|
|
|
50
66
|
getClassList(classes).forEach((c) => (map[c] = true));
|
|
51
67
|
return map;
|
|
52
68
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Gets and merges custom themes based on mode
|
|
71
|
+
* @param customTheme The custom theme
|
|
72
|
+
* @param mode The current mode (ios | md)
|
|
73
|
+
* @returns The merged custom theme
|
|
74
|
+
*/
|
|
75
|
+
export const getCustomTheme = (customTheme, mode) => {
|
|
76
|
+
if (!customTheme)
|
|
77
|
+
return undefined;
|
|
78
|
+
// Check if the custom theme contains mode overrides (ios | md)
|
|
79
|
+
if (customTheme.ios || customTheme.md) {
|
|
80
|
+
const { ios, md } = customTheme, baseCustomTheme = __rest(customTheme, ["ios", "md"]);
|
|
81
|
+
// Flatten the mode-specific overrides based on current mode
|
|
82
|
+
if (mode === 'ios' && ios) {
|
|
83
|
+
return deepMerge(baseCustomTheme, ios);
|
|
84
|
+
}
|
|
85
|
+
else if (mode === 'md' && md) {
|
|
86
|
+
return deepMerge(baseCustomTheme, md);
|
|
87
|
+
}
|
|
88
|
+
return baseCustomTheme;
|
|
89
|
+
}
|
|
90
|
+
return customTheme;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Flattens the theme object into CSS custom properties
|
|
94
|
+
* @param theme The theme object to flatten
|
|
95
|
+
* @param prefix The CSS prefix to use (e.g., '--ion-')
|
|
96
|
+
* @returns CSS string with custom properties
|
|
97
|
+
*/
|
|
98
|
+
export const generateCSSVars = (theme, prefix = CSS_PROPS_PREFIX) => {
|
|
99
|
+
// Logs do not need to be printed because palette objects are optional
|
|
100
|
+
const themeValidity = isValidTheme(theme, 'generateCSSVars', false);
|
|
101
|
+
if (!themeValidity) {
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
const cssProps = Object.entries(theme)
|
|
105
|
+
.flatMap(([key, val]) => {
|
|
106
|
+
var _a, _b, _c, _d, _e, _f;
|
|
107
|
+
// Skip invalid keys or values
|
|
108
|
+
if (!key || typeof key !== 'string' || val === null || val === undefined) {
|
|
109
|
+
return [];
|
|
110
|
+
}
|
|
111
|
+
key = convertToKebabCase(key);
|
|
112
|
+
// Do not generate CSS variables for excluded keys
|
|
113
|
+
const excludedKeys = ['name', 'enabled', 'config'];
|
|
114
|
+
if (excludedKeys.includes(key)) {
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
// Special handling for 'base' property - don't add suffix
|
|
118
|
+
if (key === 'base') {
|
|
119
|
+
return [`${prefix.slice(0, -1)}: ${val};`];
|
|
120
|
+
}
|
|
121
|
+
// Generate rgb variables for base and contrast color variants
|
|
122
|
+
// These are only generated when processing global color objects,
|
|
123
|
+
// not component-level color overrides
|
|
124
|
+
// TODO(): this only works with hex values
|
|
125
|
+
if ((key === 'bold' || key === 'subtle') && prefix.includes('color')) {
|
|
126
|
+
if (typeof val === 'object' && val !== null) {
|
|
127
|
+
return Object.entries(val).flatMap(([property, hexValue]) => {
|
|
128
|
+
if (typeof hexValue === 'string' && hexValue.startsWith('#')) {
|
|
129
|
+
// For 'base' property, don't include the property name in the CSS variable
|
|
130
|
+
const varName = property === 'base' ? `${prefix}${key}` : `${prefix}${key}-${property}`;
|
|
131
|
+
const cssVars = [`${varName}: ${hexValue};`];
|
|
132
|
+
// Only add RGB values for base and contrast
|
|
133
|
+
if (property === 'base' || property === 'contrast') {
|
|
134
|
+
const rgbVarName = property === 'base' ? `${prefix}${key}-rgb` : `${prefix}${key}-${property}-rgb`;
|
|
135
|
+
cssVars.push(`${rgbVarName}: ${hexToRgb(hexValue)};`);
|
|
136
|
+
}
|
|
137
|
+
return cssVars;
|
|
138
|
+
}
|
|
139
|
+
return [];
|
|
140
|
+
});
|
|
60
141
|
}
|
|
61
|
-
return router.push(url, direction, animation);
|
|
62
142
|
}
|
|
143
|
+
// If it's a font-sizes key, create rem version
|
|
144
|
+
// This is necessary to support the dynamic font size feature
|
|
145
|
+
if (key === 'font-sizes' && typeof val === 'object' && val !== null) {
|
|
146
|
+
// Access the root font size from the global theme context
|
|
147
|
+
const fontSizeBase = parseFloat((_f = (_e = (_d = (_c = (_b = (_a = window.Ionic) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.get) === null || _c === void 0 ? void 0 : _c.call(_b, 'theme')) === null || _d === void 0 ? void 0 : _d.fontSizes) === null || _e === void 0 ? void 0 : _e.root) !== null && _f !== void 0 ? _f : '16');
|
|
148
|
+
return Object.entries(val).flatMap(([sizeKey, sizeValue]) => {
|
|
149
|
+
if (!sizeKey || sizeValue == null)
|
|
150
|
+
return [];
|
|
151
|
+
const remValue = `${parseFloat(sizeValue) / fontSizeBase}rem`;
|
|
152
|
+
// Return both px and rem values as separate array items
|
|
153
|
+
return [
|
|
154
|
+
`${prefix}${key}-${sizeKey}: ${sizeValue};`, // original px value
|
|
155
|
+
`${prefix}${key}-${sizeKey}-rem: ${remValue};`, // rem value
|
|
156
|
+
];
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return typeof val === 'object' && val !== null
|
|
160
|
+
? generateCSSVars(val, `${prefix}${key}-`)
|
|
161
|
+
: [`${prefix}${key}: ${val};`];
|
|
162
|
+
})
|
|
163
|
+
.filter(Boolean);
|
|
164
|
+
return cssProps.join('\n');
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Generates a CSS class containing the CSS variables for each color
|
|
168
|
+
* in the theme. Each color has generic bold and subtle variables that are mapped
|
|
169
|
+
* to the specific color's bold and subtle variables. The bold colors will temporarily
|
|
170
|
+
* include a fallback to remove the bold prefix. For example, the primary
|
|
171
|
+
* color will return the following CSS class:
|
|
172
|
+
*
|
|
173
|
+
* ```css
|
|
174
|
+
* :root .ion-color-primary {
|
|
175
|
+
* --ion-color-base: var(--ion-color-primary, var(--ion-color-primary-bold));
|
|
176
|
+
* --ion-color-base-rgb: var(--ion-color-primary-rgb, var(--ion-color-primary-bold-rgb));
|
|
177
|
+
* --ion-color-contrast: var(--ion-color-primary-contrast, var(--ion-color-primary-bold-contrast));
|
|
178
|
+
* --ion-color-contrast-rgb: var(--ion-color-primary-contrast-rgb, var(--ion-color-primary-bold-contrast-rgb));
|
|
179
|
+
* --ion-color-shade: var(--ion-color-primary-shade, var(--ion-color-primary-bold-shade));
|
|
180
|
+
* --ion-color-tint: var(--ion-color-primary-tint, var(--ion-color-primary-bold-tint));
|
|
181
|
+
* --ion-color-foreground: var(--ion-color-primary, var(--ion-color-primary-foreground, var(--ion-color-primary-bold-foreground)));
|
|
182
|
+
*
|
|
183
|
+
* --ion-color-subtle-base: var(--ion-color-primary-subtle);
|
|
184
|
+
* --ion-color-subtle-base-rgb: var(--ion-color-primary-subtle-rgb);
|
|
185
|
+
* --ion-color-subtle-contrast: var(--ion-color-primary-subtle-contrast);
|
|
186
|
+
* --ion-color-subtle-contrast-rgb: var(--ion-color-primary-subtle-contrast-rgb);
|
|
187
|
+
* --ion-color-subtle-shade: var(--ion-color-primary-subtle-shade);
|
|
188
|
+
* --ion-color-subtle-tint: var(--ion-color-primary-subtle-tint);
|
|
189
|
+
* --ion-color-subtle-foreground: var(--ion-color-primary-subtle-foreground);
|
|
190
|
+
* }
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* @param theme The theme object containing color definitions
|
|
194
|
+
* @returns CSS string with .ion-color-{colorName} utility classes
|
|
195
|
+
*/
|
|
196
|
+
export const generateColorClasses = (theme) => {
|
|
197
|
+
var _a, _b;
|
|
198
|
+
// Look for colors in the light palette first, then fallback to the
|
|
199
|
+
// direct color property if there is no light palette
|
|
200
|
+
const colors = ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _a === void 0 ? void 0 : _a.light) === null || _b === void 0 ? void 0 : _b.color) || (theme === null || theme === void 0 ? void 0 : theme.color);
|
|
201
|
+
if (!colors) {
|
|
202
|
+
return '';
|
|
203
|
+
}
|
|
204
|
+
if (typeof colors !== 'object' || Array.isArray(colors)) {
|
|
205
|
+
const colorsType = Array.isArray(colors) ? 'array' : typeof colors;
|
|
206
|
+
printIonWarning(`Invalid color configuration in theme. Expected color to be an object, but found ${colorsType}.`, theme);
|
|
207
|
+
return '';
|
|
208
|
+
}
|
|
209
|
+
const generatedColorClasses = [];
|
|
210
|
+
Object.keys(colors).forEach((colorName) => {
|
|
211
|
+
const colorVariants = colors[colorName];
|
|
212
|
+
if (!colorVariants || typeof colorVariants !== 'object')
|
|
213
|
+
return;
|
|
214
|
+
const cssVariableRules = [];
|
|
215
|
+
// Generate CSS variables for bold variant
|
|
216
|
+
// Includes base color variables without the bold modifier for
|
|
217
|
+
// backwards compatibility.
|
|
218
|
+
// TODO: Remove the fallbacks once the bold variables are the default
|
|
219
|
+
if (colorVariants.bold) {
|
|
220
|
+
cssVariableRules.push(`--ion-color-base: var(--ion-color-${colorName}, var(--ion-color-${colorName}-bold)) !important;`, `--ion-color-base-rgb: var(--ion-color-${colorName}-rgb, var(--ion-color-${colorName}-bold-rgb)) !important;`, `--ion-color-contrast: var(--ion-color-${colorName}-contrast, var(--ion-color-${colorName}-bold-contrast)) !important;`, `--ion-color-contrast-rgb: var(--ion-color-${colorName}-contrast-rgb, var(--ion-color-${colorName}-bold-contrast-rgb)) !important;`, `--ion-color-shade: var(--ion-color-${colorName}-shade, var(--ion-color-${colorName}-bold-shade)) !important;`, `--ion-color-tint: var(--ion-color-${colorName}-tint, var(--ion-color-${colorName}-bold-tint)) !important;`, `--ion-color-foreground: var(--ion-color-${colorName}-foreground, var(--ion-color-${colorName}-bold-foreground)) !important;`);
|
|
221
|
+
}
|
|
222
|
+
// Generate CSS variables for subtle variant
|
|
223
|
+
if (colorVariants.subtle) {
|
|
224
|
+
cssVariableRules.push(`--ion-color-subtle-base: var(--ion-color-${colorName}-subtle) !important;`, `--ion-color-subtle-base-rgb: var(--ion-color-${colorName}-subtle-rgb) !important;`, `--ion-color-subtle-contrast: var(--ion-color-${colorName}-subtle-contrast) !important;`, `--ion-color-subtle-contrast-rgb: var(--ion-color-${colorName}-subtle-contrast-rgb) !important;`, `--ion-color-subtle-shade: var(--ion-color-${colorName}-subtle-shade) !important;`, `--ion-color-subtle-tint: var(--ion-color-${colorName}-subtle-tint) !important;`, `--ion-color-subtle-foreground: var(--ion-color-${colorName}-subtle-foreground) !important;`);
|
|
225
|
+
}
|
|
226
|
+
if (cssVariableRules.length > 0) {
|
|
227
|
+
const colorUtilityClass = `
|
|
228
|
+
:root .ion-color-${colorName} {
|
|
229
|
+
${cssVariableRules.join('\n ')}
|
|
230
|
+
}
|
|
231
|
+
`;
|
|
232
|
+
generatedColorClasses.push(colorUtilityClass);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
return generatedColorClasses.join('\n');
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Creates a style element and injects its CSS into a target element
|
|
239
|
+
* @param css The CSS string to inject
|
|
240
|
+
* @param target The target element to inject into
|
|
241
|
+
*/
|
|
242
|
+
export const injectCSS = (css, target = document.head) => {
|
|
243
|
+
const style = document.createElement('style');
|
|
244
|
+
style.innerHTML = css;
|
|
245
|
+
target.appendChild(style);
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Generates global CSS variables from a theme object
|
|
249
|
+
* @param theme The theme object to generate CSS for
|
|
250
|
+
* @returns The generated CSS string
|
|
251
|
+
*/
|
|
252
|
+
export const generateGlobalThemeCSS = (theme) => {
|
|
253
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
254
|
+
const themeValidity = isValidTheme(theme, 'generateGlobalThemeCSS');
|
|
255
|
+
if (!themeValidity) {
|
|
256
|
+
return '';
|
|
257
|
+
}
|
|
258
|
+
// Exclude palette, components, and config from the default tokens
|
|
259
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
260
|
+
const { palette, components, config } = theme, defaultTokens = __rest(theme, ["palette", "components", "config"]);
|
|
261
|
+
// Generate CSS variables for the default design tokens
|
|
262
|
+
const defaultTokensCSS = generateCSSVars(defaultTokens);
|
|
263
|
+
// Generate CSS variables for the light color palette
|
|
264
|
+
const lightTokensCSS = generateCSSVars(palette.light);
|
|
265
|
+
// Generate CSS variables for the dark color palette
|
|
266
|
+
const darkTokensCSS = generateCSSVars(palette.dark);
|
|
267
|
+
// Generate CSS variable for the high contrast color palette
|
|
268
|
+
const highContrastTokensCSS = generateCSSVars(palette.highContrast);
|
|
269
|
+
// Generate CSS variable for the high contrast dark color palette
|
|
270
|
+
const highContrastDarkTokensCSS = generateCSSVars(palette.highContrastDark);
|
|
271
|
+
let paletteTokensCSS = lightTokensCSS;
|
|
272
|
+
if (((_a = palette.highContrastDark) === null || _a === void 0 ? void 0 : _a.enabled) === 'always') {
|
|
273
|
+
// Include CSS variables for the high contrast dark color palette instead of
|
|
274
|
+
// the light palette if high contrast dark palette enabled is 'always'
|
|
275
|
+
paletteTokensCSS = highContrastDarkTokensCSS;
|
|
276
|
+
}
|
|
277
|
+
else if (((_b = palette.highContrast) === null || _b === void 0 ? void 0 : _b.enabled) === 'always') {
|
|
278
|
+
// Include CSS variables for the dark color palette instead of
|
|
279
|
+
// the light palette if dark palette enabled is 'always'
|
|
280
|
+
paletteTokensCSS = highContrastTokensCSS;
|
|
281
|
+
}
|
|
282
|
+
else if (((_c = palette.dark) === null || _c === void 0 ? void 0 : _c.enabled) === 'always') {
|
|
283
|
+
// Include CSS variables for the dark color palette instead of
|
|
284
|
+
// the light palette if dark palette enabled is 'always'
|
|
285
|
+
paletteTokensCSS = darkTokensCSS;
|
|
286
|
+
}
|
|
287
|
+
let css = `
|
|
288
|
+
${CSS_ROOT_SELECTOR} {
|
|
289
|
+
${defaultTokensCSS}
|
|
290
|
+
${paletteTokensCSS || ''}
|
|
291
|
+
}
|
|
292
|
+
`;
|
|
293
|
+
if (((_d = palette.highContrastDark) === null || _d === void 0 ? void 0 : _d.enabled) === 'class' && highContrastDarkTokensCSS) {
|
|
294
|
+
// Include CSS variables for the high contrast dark color palette inside of a
|
|
295
|
+
// class if high contrast dark palette enabled is 'class'
|
|
296
|
+
css += `
|
|
297
|
+
.ion-palette-high-contrast.ion-palette-dark {
|
|
298
|
+
${highContrastDarkTokensCSS}
|
|
299
|
+
}
|
|
300
|
+
`;
|
|
301
|
+
}
|
|
302
|
+
else if (((_e = palette.highContrast) === null || _e === void 0 ? void 0 : _e.enabled) === 'class' && highContrastTokensCSS) {
|
|
303
|
+
// Include CSS variables for the high contrast color palette inside of a
|
|
304
|
+
// class if high contrast palette enabled is 'class'
|
|
305
|
+
css += `
|
|
306
|
+
.ion-palette-high-contrast {
|
|
307
|
+
${highContrastTokensCSS}
|
|
308
|
+
}
|
|
309
|
+
`;
|
|
310
|
+
}
|
|
311
|
+
else if (((_f = palette.dark) === null || _f === void 0 ? void 0 : _f.enabled) === 'class' && darkTokensCSS) {
|
|
312
|
+
// Include CSS variables for the dark color palette inside of a
|
|
313
|
+
// class if dark palette enabled is 'class'
|
|
314
|
+
css += `
|
|
315
|
+
.ion-palette-dark {
|
|
316
|
+
${darkTokensCSS}
|
|
317
|
+
}
|
|
318
|
+
`;
|
|
319
|
+
}
|
|
320
|
+
if (((_g = palette.highContrastDark) === null || _g === void 0 ? void 0 : _g.enabled) === 'system' && highContrastDarkTokensCSS) {
|
|
321
|
+
// Include CSS variables for the high contrast dark color palette inside of the
|
|
322
|
+
// high contrast dark media query if high contrast dark palette enabled is 'system'
|
|
323
|
+
css += `
|
|
324
|
+
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
|
|
325
|
+
${CSS_ROOT_SELECTOR} {
|
|
326
|
+
${highContrastDarkTokensCSS}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
`;
|
|
330
|
+
}
|
|
331
|
+
else if (((_h = palette.highContrast) === null || _h === void 0 ? void 0 : _h.enabled) === 'system' && highContrastTokensCSS) {
|
|
332
|
+
// Include CSS variables for the high contrast color palette inside of the
|
|
333
|
+
// high contrast media query if high contrast palette enabled is 'system'
|
|
334
|
+
css += `
|
|
335
|
+
@media (prefers-contrast: more) {
|
|
336
|
+
${CSS_ROOT_SELECTOR} {
|
|
337
|
+
${highContrastTokensCSS}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
`;
|
|
341
|
+
}
|
|
342
|
+
else if (((_j = palette.dark) === null || _j === void 0 ? void 0 : _j.enabled) === 'system' && darkTokensCSS) {
|
|
343
|
+
// Include CSS variables for the dark color palette inside of the
|
|
344
|
+
// dark color scheme media query if dark palette enabled is 'system'
|
|
345
|
+
css += `
|
|
346
|
+
@media (prefers-color-scheme: dark) {
|
|
347
|
+
${CSS_ROOT_SELECTOR} {
|
|
348
|
+
${darkTokensCSS}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
`;
|
|
352
|
+
}
|
|
353
|
+
// Add color classes
|
|
354
|
+
const colorClasses = generateColorClasses(theme);
|
|
355
|
+
return css + '\n' + colorClasses;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* Applies the global theme from the provided base theme and user theme
|
|
359
|
+
* @param baseTheme The default theme
|
|
360
|
+
* @param userTheme The user's custom theme (optional)
|
|
361
|
+
* @returns The combined theme object (or base theme if no user theme was provided)
|
|
362
|
+
*/
|
|
363
|
+
export const applyGlobalTheme = (baseTheme, userTheme) => {
|
|
364
|
+
// If no base theme provided, error
|
|
365
|
+
if (typeof baseTheme !== 'object' || Array.isArray(baseTheme)) {
|
|
366
|
+
console.error('applyGlobalTheme: Valid base theme object is required', baseTheme);
|
|
367
|
+
return {};
|
|
368
|
+
}
|
|
369
|
+
// If no user theme provided or it is invalid, apply base theme
|
|
370
|
+
if (!userTheme || typeof userTheme !== 'object' || Array.isArray(userTheme)) {
|
|
371
|
+
if (userTheme) {
|
|
372
|
+
console.error('applyGlobalTheme: Invalid user theme provided', userTheme);
|
|
373
|
+
}
|
|
374
|
+
injectCSS(generateGlobalThemeCSS(baseTheme));
|
|
375
|
+
return baseTheme;
|
|
376
|
+
}
|
|
377
|
+
// Merge themes and apply
|
|
378
|
+
const mergedTheme = deepMerge(baseTheme, userTheme);
|
|
379
|
+
injectCSS(generateGlobalThemeCSS(mergedTheme));
|
|
380
|
+
return mergedTheme;
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Generates component's themed CSS class with CSS variables
|
|
384
|
+
* from its theme object
|
|
385
|
+
* @param componentTheme The component's object to generate CSS for (e.g., IonChip { })
|
|
386
|
+
* @param components An object mapping component names (e.g. `IonChip`) to a nested
|
|
387
|
+
* design-token configuration. Each configuration can contain arbitrary levels of
|
|
388
|
+
* token groups (such as `size`, `state`, `shape`, `variant`, etc.), where leaf values
|
|
389
|
+
* are CSS-compatible values. The structure is recursively flattened into CSS custom
|
|
390
|
+
* properties using kebab-case keys and an `--ion-<component>-` prefix.
|
|
391
|
+
*
|
|
392
|
+
* Example:
|
|
393
|
+
* ```json
|
|
394
|
+
* {
|
|
395
|
+
* IonChip: {
|
|
396
|
+
* size: { small: { height: "24px" } },
|
|
397
|
+
* state: { disabled: { opacity: "0.4" } }
|
|
398
|
+
* }
|
|
399
|
+
* }
|
|
400
|
+
* ```
|
|
401
|
+
*
|
|
402
|
+
* Becomes:
|
|
403
|
+
* ```css
|
|
404
|
+
* ion-chip {
|
|
405
|
+
* --ion-chip-size-small-height: 24px;
|
|
406
|
+
* --ion-chip-state-disabled-opacity: 0.4;
|
|
407
|
+
* }
|
|
408
|
+
* ```
|
|
409
|
+
* @returns string containing the component's themed CSS variables
|
|
410
|
+
*/
|
|
411
|
+
export const generateComponentsThemeCSS = (components) => {
|
|
412
|
+
let css = '';
|
|
413
|
+
for (const [component, componentTokens] of Object.entries(components)) {
|
|
414
|
+
const componentTag = convertToKebabCase(component);
|
|
415
|
+
const vars = generateCSSVars(componentTokens, `--${componentTag}-`);
|
|
416
|
+
const componentBlock = `
|
|
417
|
+
${componentTag} {
|
|
418
|
+
${vars}
|
|
419
|
+
}
|
|
420
|
+
`;
|
|
421
|
+
css += componentBlock;
|
|
422
|
+
}
|
|
423
|
+
return css;
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* Applies a component theme to an element if it exists in the custom theme
|
|
427
|
+
* @param element The element to apply the theme to
|
|
428
|
+
* @returns true if theme was applied, false otherwise
|
|
429
|
+
*/
|
|
430
|
+
export const applyComponentsTheme = (theme) => {
|
|
431
|
+
const themeValidity = isValidTheme(theme, 'applyComponentsTheme');
|
|
432
|
+
if (!themeValidity) {
|
|
433
|
+
return '';
|
|
434
|
+
}
|
|
435
|
+
const { components } = theme;
|
|
436
|
+
if (!components) {
|
|
437
|
+
return '';
|
|
438
|
+
}
|
|
439
|
+
injectCSS(generateComponentsThemeCSS(components));
|
|
440
|
+
return components;
|
|
441
|
+
};
|
|
442
|
+
/**
|
|
443
|
+
* Parses a hex color string and returns RGB values as an array.
|
|
444
|
+
*
|
|
445
|
+
* @param hex Hex color (e.g. `'#ffffff'` or `'#fff'`)
|
|
446
|
+
*
|
|
447
|
+
* @returns RGB values as `[r, g, b]` array
|
|
448
|
+
*/
|
|
449
|
+
const parseHex = (hex) => {
|
|
450
|
+
const cleanHex = hex.replace('#', '');
|
|
451
|
+
// Short hex format like 'fff' → expand to 'ffffff'
|
|
452
|
+
if (cleanHex.length === 3) {
|
|
453
|
+
return [
|
|
454
|
+
parseInt(cleanHex[0] + cleanHex[0], 16),
|
|
455
|
+
parseInt(cleanHex[1] + cleanHex[1], 16),
|
|
456
|
+
parseInt(cleanHex[2] + cleanHex[2], 16),
|
|
457
|
+
];
|
|
458
|
+
// Full hex format like 'ffffff'
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
return [
|
|
462
|
+
parseInt(cleanHex.substring(0, 2), 16),
|
|
463
|
+
parseInt(cleanHex.substring(2, 4), 16),
|
|
464
|
+
parseInt(cleanHex.substring(4, 6), 16),
|
|
465
|
+
];
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* Converts a hex color to a string of RGB comma-separated values.
|
|
470
|
+
*
|
|
471
|
+
* @param hex Hex color (e.g. `'#ffffff'` or `'#fff'`)
|
|
472
|
+
*
|
|
473
|
+
* @returns RGB string (e.g. `'255, 255, 255'`)
|
|
474
|
+
*/
|
|
475
|
+
export const hexToRgb = (hex) => {
|
|
476
|
+
const [r, g, b] = parseHex(hex);
|
|
477
|
+
return `${r}, ${g}, ${b}`;
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* Mixes two hex colors by a given weight percentage and returns
|
|
481
|
+
* it as a hex color.
|
|
482
|
+
*
|
|
483
|
+
* @param baseColor Base color (e.g. `'#0054e9'`)
|
|
484
|
+
* @param mixColor Color to mix in (e.g. `'#000000'` or `'#fff'`)
|
|
485
|
+
* @param weight Weight percentage as string - how much of mixColor to mix into baseColor (e.g. `'12%'`)
|
|
486
|
+
*
|
|
487
|
+
* @returns Mixed hex color (e.g. `'#004acd'`)
|
|
488
|
+
*/
|
|
489
|
+
export const mix = (baseColor, mixColor, weight) => {
|
|
490
|
+
// Parse weight percentage
|
|
491
|
+
const w = parseFloat(weight.replace('%', '')) / 100;
|
|
492
|
+
// Parse both colors
|
|
493
|
+
const [baseR, baseG, baseB] = parseHex(baseColor);
|
|
494
|
+
const [mixR, mixG, mixB] = parseHex(mixColor);
|
|
495
|
+
// Mix mixColor into baseColor by weight
|
|
496
|
+
const r = Math.round(baseR * (1 - w) + mixR * w);
|
|
497
|
+
const g = Math.round(baseG * (1 - w) + mixG * w);
|
|
498
|
+
const b = Math.round(baseB * (1 - w) + mixB * w);
|
|
499
|
+
const toHex = (n) => n.toString(16).padStart(2, '0');
|
|
500
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
501
|
+
};
|
|
502
|
+
/**
|
|
503
|
+
* Converts a string to kebab-case
|
|
504
|
+
*
|
|
505
|
+
* @internal
|
|
506
|
+
* @param str The string to convert (e.g., 'IonChip')
|
|
507
|
+
* @returns The kebab-case string (e.g., 'ion-chip')
|
|
508
|
+
*/
|
|
509
|
+
const convertToKebabCase = (str) => {
|
|
510
|
+
return str
|
|
511
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
512
|
+
.replace(/[\s_]+/g, '-')
|
|
513
|
+
.toLowerCase();
|
|
514
|
+
};
|
|
515
|
+
/**
|
|
516
|
+
* Verifies that a theme object is valid
|
|
517
|
+
*
|
|
518
|
+
* @internal
|
|
519
|
+
* @param theme The theme object to validate
|
|
520
|
+
* @param source The source or context where the theme is being validated
|
|
521
|
+
* @returns A boolean indicating whether the theme is valid
|
|
522
|
+
*/
|
|
523
|
+
const isValidTheme = (theme, source, showLog = true) => {
|
|
524
|
+
if (typeof theme !== 'object' || Array.isArray(theme)) {
|
|
525
|
+
if (showLog) {
|
|
526
|
+
printIonWarning(`${source}: Invalid theme object provided`, theme);
|
|
527
|
+
}
|
|
528
|
+
return false;
|
|
529
|
+
}
|
|
530
|
+
if (Object.keys(theme).length === 0) {
|
|
531
|
+
if (showLog) {
|
|
532
|
+
printIonWarning(`${source}: Empty theme object provided`, theme);
|
|
533
|
+
}
|
|
534
|
+
return false;
|
|
63
535
|
}
|
|
64
|
-
return
|
|
536
|
+
return true;
|
|
537
|
+
};
|
|
538
|
+
/**
|
|
539
|
+
* Mimics the Sass `rgba` function logic to construct CSS rgba() values.
|
|
540
|
+
*
|
|
541
|
+
* @internal
|
|
542
|
+
* @param colorRgb The RGB color components as a string (e.g., '255, 0, 0').
|
|
543
|
+
* @param alpha The opacity value (0 to 1).
|
|
544
|
+
* @returns A string containing the CSS rgba() function call.
|
|
545
|
+
*/
|
|
546
|
+
export function rgba(colorRgb, alpha) {
|
|
547
|
+
// This directly constructs the rgba() function call using the provided values.
|
|
548
|
+
return `rgba(${colorRgb}, ${alpha})`;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Mimics the Ionic Framework `current-color` function logic to construct CSS color values.
|
|
552
|
+
*
|
|
553
|
+
* @internal
|
|
554
|
+
* @param variation The color variation (e.g., 'primary', 'secondary', 'base').
|
|
555
|
+
* @param alpha The opacity value (0 to 1). If null, returns the full color variable.
|
|
556
|
+
* @param subtle If true, uses the '--ion-color-subtle-' prefix.
|
|
557
|
+
* @returns A string containing the CSS value (e.g., 'var(--ion-color-primary)' or 'rgba(var(--ion-color-primary-rgb), 0.16)').
|
|
558
|
+
*/
|
|
559
|
+
export function currentColor(variation, options = {}) {
|
|
560
|
+
const { alpha = null, subtle = false } = options;
|
|
561
|
+
// 1. Determine the base CSS variable name
|
|
562
|
+
const variable = subtle ? `--ion-color-subtle-${variation}` : `--ion-color-${variation}`;
|
|
563
|
+
// 2. Handle the case where no alpha is provided
|
|
564
|
+
if (alpha === null) {
|
|
565
|
+
// Corresponds to: @return var(#{$variable});
|
|
566
|
+
return `var(${variable})`;
|
|
567
|
+
}
|
|
568
|
+
// 3. Handle the case where alpha is provided
|
|
569
|
+
// Corresponds to: @return rgba(var(#{$variable}-rgb), #{$alpha});
|
|
570
|
+
// NOTE: The resulting string uses the CSS variable for the RGB components
|
|
571
|
+
// (e.g., '255, 0, 0') and the provided alpha.
|
|
572
|
+
return `rgba(var(${variable}-rgb), ${alpha})`;
|
|
573
|
+
}
|
|
574
|
+
export function ionColor(name, variation, options = {}) {
|
|
575
|
+
const { alpha = null, subtle = false } = options;
|
|
576
|
+
// Build base variable name
|
|
577
|
+
const base = subtle ? `--ion-color-${name}-subtle` : `--ion-color-${name}`;
|
|
578
|
+
const variationSuffix = variation === 'base' ? '' : `-${variation}`;
|
|
579
|
+
const variable = `${base}${variationSuffix}`;
|
|
580
|
+
// Build the fallback variable name (only for bold colors)
|
|
581
|
+
let fallbackVariable = null;
|
|
582
|
+
if (!subtle) {
|
|
583
|
+
const fallbackBase = `--ion-color-${name}-bold`;
|
|
584
|
+
fallbackVariable = `${fallbackBase}${variationSuffix}`;
|
|
585
|
+
}
|
|
586
|
+
// Handle alpha transparency
|
|
587
|
+
if (alpha !== null) {
|
|
588
|
+
const rgbVar = `${variable}-rgb`;
|
|
589
|
+
const fallbackRgb = fallbackVariable ? `${fallbackVariable}-rgb` : null;
|
|
590
|
+
return fallbackRgb ? `rgba(var(${rgbVar}, var(${fallbackRgb})), ${alpha})` : `rgba(var(${rgbVar}), ${alpha})`;
|
|
591
|
+
}
|
|
592
|
+
return fallbackVariable ? `var(${variable}, var(${fallbackVariable}))` : `var(${variable})`;
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Mimics the CSS `clamp` function logic.
|
|
596
|
+
*
|
|
597
|
+
* @internal
|
|
598
|
+
* @param min The minimum value
|
|
599
|
+
* @param val The preferred value
|
|
600
|
+
* @param max The maximum value
|
|
601
|
+
* @returns A string containing the CSS clamp() function call (e.g., 'clamp(1rem, 2vw, 3rem)').
|
|
602
|
+
*/
|
|
603
|
+
export function clamp(min, val, max) {
|
|
604
|
+
return `clamp(${min}, ${val}, ${max})`;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Generates a series of color steps between a base color and a mix color.
|
|
608
|
+
*
|
|
609
|
+
* @param baseColor Base color (e.g. `'#0054e9'`)
|
|
610
|
+
* @param mixColor Color to mix in (e.g. `'#000000'` or `'#fff'`)
|
|
611
|
+
*
|
|
612
|
+
* @internal
|
|
613
|
+
* @returns An object containing the generated color steps
|
|
614
|
+
*/
|
|
615
|
+
export const generateColorSteps = (baseColor, mixColor) => {
|
|
616
|
+
const colorSteps = {};
|
|
617
|
+
for (let step = 50; step <= 950; step += 50) {
|
|
618
|
+
const weight = `${step / 10}%`;
|
|
619
|
+
colorSteps[`${step}`] = mix(baseColor, mixColor, weight);
|
|
620
|
+
}
|
|
621
|
+
return colorSteps;
|
|
622
|
+
};
|
|
623
|
+
const baselineUnit = 'rem';
|
|
624
|
+
/**
|
|
625
|
+
* Converts a pixel value to a dynamic unit (defaulting to rem).
|
|
626
|
+
*
|
|
627
|
+
* Examples based on a root font size of 16px:
|
|
628
|
+
* - `dynamicFont('16px', 16)` returns `'1rem'`
|
|
629
|
+
* - `dynamicFont('16px', 20, 'em')` returns `'1.25em'`
|
|
630
|
+
*
|
|
631
|
+
* @internal
|
|
632
|
+
* @param configRootFontSize - The root font size from the theme config.
|
|
633
|
+
* @param size - The numeric pixel value.
|
|
634
|
+
* @param unit - The CSS unit string.
|
|
635
|
+
* @returns The calculated CSS value string.
|
|
636
|
+
*/
|
|
637
|
+
export const dynamicFont = (configRootFontSize, size, unit = baselineUnit) => {
|
|
638
|
+
let baselinePixelSize = 16;
|
|
639
|
+
const cleanSize = typeof configRootFontSize === 'string' ? parseFloat(configRootFontSize) : configRootFontSize;
|
|
640
|
+
if (!isNaN(cleanSize)) {
|
|
641
|
+
baselinePixelSize = cleanSize;
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
printIonWarning(`Invalid root font size in theme config: ${configRootFontSize}. Falling back to default of ${baselinePixelSize}px.`);
|
|
645
|
+
}
|
|
646
|
+
return `${size / baselinePixelSize}${unit}`;
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* Converts a pixel value to a dynamic unit (defaulting to rem)
|
|
650
|
+
* but imposes a minimum font size using CSS max().
|
|
651
|
+
*
|
|
652
|
+
* Examples based on a root font size of 16px:
|
|
653
|
+
* - `dynamicFontMin('16px', 0.8, 11)` returns `'max(8.8px, 0.6875rem)'`
|
|
654
|
+
* - A minimum of 80% of 11px = 8.8px, but the rem value scales with root font size
|
|
655
|
+
*
|
|
656
|
+
* @internal
|
|
657
|
+
* @param configRootFontSize - The root font size from the theme config.
|
|
658
|
+
* @param minScale - The minimum scale of the font (e.g. 0.8 for 80%).
|
|
659
|
+
* @param size - The numeric pixel value.
|
|
660
|
+
* @param unit - The CSS unit string.
|
|
661
|
+
* @returns A string containing the CSS max() function with the minimum pixel value and the dynamic font value (e.g., 'max(8.8px, 0.6875rem)').
|
|
662
|
+
*/
|
|
663
|
+
export const dynamicFontMin = (configRootFontSize, minScale, size, unit = baselineUnit) => {
|
|
664
|
+
const baseScale = dynamicFont(configRootFontSize, size, unit);
|
|
665
|
+
const minSize = size * minScale;
|
|
666
|
+
return `max(${minSize}px, ${baseScale})`;
|
|
65
667
|
};
|