@ionic/core 8.7.17-dev.11772118942.181221d4 → 8.7.17-dev.11772568074.1d7a4aea
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/action-sheet.js +1 -561
- package/components/alert.js +1 -610
- package/components/animation.js +1 -817
- package/components/backdrop.js +1 -72
- package/components/button-active.js +1 -64
- package/components/button.js +1 -303
- package/components/buttons.js +1 -56
- package/components/capacitor.js +1 -10
- package/components/checkbox.js +1 -261
- package/components/config.js +1 -192
- package/components/content.js +1 -475
- package/components/cubic-bezier.js +1 -87
- package/components/data.js +1 -1635
- package/components/dir.js +1 -15
- package/components/focus-visible.js +1 -72
- package/components/framework-delegate.js +1 -137
- package/components/gesture-controller.js +1 -192
- package/components/haptic.js +1 -155
- package/components/hardware-back-button.js +1 -112
- package/components/header.js +1 -417
- package/components/helpers.js +1 -336
- package/components/icon.js +1 -456
- package/components/index.d.ts +2 -0
- package/components/index.js +1 -115
- package/components/index2.js +1 -416
- package/components/index3.js +1 -452
- package/components/index4.js +1 -118
- package/components/index5.js +1 -303
- package/components/index6.js +1 -29
- package/components/index7.js +1 -164
- package/components/index8.js +1 -125
- package/components/index9.js +1 -4
- package/components/input-shims.js +1 -624
- package/components/input.utils.js +1 -144
- package/components/ion-accordion-group.js +1 -269
- package/components/ion-accordion.js +1 -457
- package/components/ion-action-sheet.js +1 -6
- package/components/ion-alert.js +1 -6
- package/components/ion-app.js +1 -128
- package/components/ion-avatar.js +1 -41
- package/components/ion-back-button.js +1 -131
- package/components/ion-backdrop.js +1 -6
- package/components/ion-badge.js +1 -47
- package/components/ion-breadcrumb.js +1 -137
- package/components/ion-breadcrumbs.js +1 -164
- package/components/ion-button.js +1 -6
- package/components/ion-buttons.js +1 -6
- package/components/ion-card-content.js +1 -45
- package/components/ion-card-header.js +1 -56
- package/components/ion-card-subtitle.js +1 -48
- package/components/ion-card-title.js +1 -48
- package/components/ion-card.js +1 -107
- package/components/ion-checkbox.js +1 -6
- package/components/ion-chip.js +1 -66
- package/components/ion-col.js +1 -163
- package/components/ion-content.js +1 -6
- package/components/ion-datetime-button.js +1 -384
- package/components/ion-datetime.js +1 -2046
- package/components/ion-fab-button.js +1 -151
- package/components/ion-fab-list.js +1 -66
- package/components/ion-fab.js +1 -101
- package/components/ion-footer.js +1 -159
- package/components/ion-grid.js +1 -46
- package/components/ion-header.js +1 -6
- package/components/ion-icon.js +1 -6
- package/components/ion-img.js +1 -124
- package/components/ion-infinite-scroll-content.js +1 -70
- package/components/ion-infinite-scroll.js +1 -236
- package/components/ion-input-otp.js +1 -683
- package/components/ion-input-password-toggle.js +1 -129
- package/components/ion-input.js +1 -617
- package/components/ion-item-divider.js +1 -59
- package/components/ion-item-group.js +1 -46
- package/components/ion-item-option.js +1 -91
- package/components/ion-item-options.js +1 -73
- package/components/ion-item-sliding.js +1 -458
- package/components/ion-item.js +1 -6
- package/components/ion-label.js +1 -6
- package/components/ion-list-header.js +1 -6
- package/components/ion-list.js +1 -6
- package/components/ion-loading.js +1 -344
- package/components/ion-menu-button.js +1 -110
- package/components/ion-menu-toggle.js +1 -64
- package/components/ion-menu.js +1 -745
- package/components/ion-modal.js +1 -6
- package/components/ion-nav-link.js +1 -64
- package/components/ion-nav.js +1 -956
- package/components/ion-note.js +1 -47
- package/components/ion-picker-column-option.js +1 -6
- package/components/ion-picker-column.js +1 -6
- package/components/ion-picker-legacy-column.js +1 -6
- package/components/ion-picker-legacy.js +1 -343
- package/components/ion-picker.js +1 -6
- package/components/ion-popover.js +1 -6
- package/components/ion-progress-bar.js +1 -101
- package/components/ion-radio-group.js +1 -6
- package/components/ion-radio.js +1 -6
- package/components/ion-range.js +1 -853
- package/components/ion-refresher-content.js +1 -89
- package/components/ion-refresher.js +1 -751
- package/components/ion-reorder-group.js +1 -322
- package/components/ion-reorder.js +1 -60
- package/components/ion-ripple-effect.js +1 -6
- package/components/ion-route-redirect.js +1 -45
- package/components/ion-route.js +1 -74
- package/components/ion-router-link.js +1 -61
- package/components/ion-router-outlet.js +1 -227
- package/components/ion-router.js +1 -841
- package/components/ion-row.js +1 -36
- package/components/ion-searchbar.js +1 -530
- package/components/ion-segment-button.js +1 -174
- package/components/ion-segment-content.js +1 -35
- package/components/ion-segment-view.js +1 -148
- package/components/ion-segment.js +1 -602
- package/components/ion-select-modal.js +1 -6
- package/components/ion-select-option.js +1 -46
- package/components/ion-select-popover.js +1 -6
- package/components/ion-select.js +1 -1037
- package/components/ion-skeleton-text.js +1 -65
- package/components/ion-spinner.js +1 -6
- package/components/ion-split-pane.js +1 -197
- package/components/ion-tab-bar.js +1 -115
- package/components/ion-tab-button.js +1 -128
- package/components/ion-tab.js +1 -91
- package/components/ion-tabs.js +1 -205
- package/components/ion-text.js +1 -42
- package/components/ion-textarea.js +1 -554
- package/components/ion-thumbnail.js +1 -36
- package/components/ion-title.js +1 -6
- package/components/ion-toast.js +1 -941
- package/components/ion-toggle.js +1 -361
- package/components/ion-toolbar.js +1 -6
- package/components/ionic-global.js +1 -144
- package/components/ios.transition.js +1 -672
- package/components/item.js +1 -302
- package/components/keyboard-controller.js +1 -162
- package/components/keyboard.js +1 -141
- package/components/keyboard2.js +1 -76
- package/components/label.js +1 -100
- package/components/list-header.js +1 -47
- package/components/list.js +1 -68
- package/components/lock-controller.js +1 -35
- package/components/md.transition.js +1 -51
- package/components/menu-toggle-util.js +1 -9
- package/components/modal.js +1 -2674
- package/components/notch-controller.js +1 -150
- package/components/overlays.js +1 -912
- package/components/picker-column-option.js +1 -136
- package/components/picker-column.js +1 -595
- package/components/picker-column2.js +1 -377
- package/components/picker.js +1 -498
- package/components/popover.js +1 -1502
- package/components/radio-group.js +1 -287
- package/components/radio.js +1 -229
- package/components/refresher.utils.js +1 -193
- package/components/ripple-effect.js +1 -109
- package/components/select-modal.js +1 -196
- package/components/select-popover.js +1 -189
- package/components/spinner.js +1 -224
- package/components/status-tap.js +1 -36
- package/components/swipe-back.js +1 -75
- package/components/theme.js +1 -40
- package/components/title.js +1 -70
- package/components/toolbar.js +1 -89
- package/components/validity.js +1 -14
- package/components/watch-options.js +1 -44
- package/dist/cjs/{animation-Bt3H9L1C.js → animation-Dg4yiuR2.js} +1 -1
- package/dist/cjs/app-globals-CLI8xCmk.js +11 -0
- package/dist/cjs/{button-active-CMc8cD90.js → button-active-FscMI17-.js} +1 -1
- package/dist/cjs/{config-C5fsO43a.js → config-BukYi_pW.js} +1 -1
- package/dist/cjs/{data-JwZKaIQB.js → data-BYlBjkMU.js} +1 -1
- package/dist/cjs/{framework-delegate-DMJRBuDi.js → framework-delegate-CRgp8o_p.js} +1 -1
- package/dist/cjs/{hardware-back-button-VCK4V3mG.js → hardware-back-button-C4rMJ5uI.js} +1 -1
- package/dist/cjs/{helpers-DrTqNghc.js → helpers-CxTYJdbT.js} +1 -1
- package/dist/cjs/{index-094mMFB-.js → index-C845Ti6K.js} +4 -4
- package/dist/cjs/{index-DrMUZJj6.js → index-CFUwM5x_.js} +5 -5
- package/dist/cjs/{index-D6Wc6v08.js → index-CqT-2gKy.js} +503 -382
- package/dist/cjs/{index-CO6eryBo.js → index-MbaBbWXk.js} +2 -2
- package/dist/cjs/{index-C534ULug.js → index-YcSftOMz.js} +2 -2
- package/dist/cjs/index.cjs.js +12 -12
- package/dist/cjs/{input-shims-CW0KUFTQ.js → input-shims-DlFhYYTs.js} +3 -3
- package/dist/cjs/{input.utils-B_QROI2g.js → input.utils-DmeJ8dmo.js} +2 -2
- package/dist/cjs/ion-accordion_2.cjs.entry.js +23 -15
- package/dist/cjs/ion-action-sheet.cjs.entry.js +21 -15
- package/dist/cjs/ion-alert.cjs.entry.js +25 -17
- package/dist/cjs/ion-app_8.cjs.entry.js +44 -40
- package/dist/cjs/ion-avatar_3.cjs.entry.js +12 -12
- package/dist/cjs/ion-back-button.cjs.entry.js +7 -7
- package/dist/cjs/ion-backdrop.cjs.entry.js +6 -6
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +20 -14
- package/dist/cjs/ion-button_2.cjs.entry.js +36 -18
- package/dist/cjs/ion-card_5.cjs.entry.js +23 -23
- package/dist/cjs/ion-checkbox.cjs.entry.js +7 -7
- package/dist/cjs/ion-chip.cjs.entry.js +6 -6
- package/dist/cjs/ion-col_3.cjs.entry.js +8 -8
- package/dist/cjs/ion-datetime-button.cjs.entry.js +8 -8
- package/dist/cjs/ion-datetime_3.cjs.entry.js +67 -39
- package/dist/cjs/ion-fab_3.cjs.entry.js +17 -13
- package/dist/cjs/ion-img.cjs.entry.js +8 -6
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +17 -13
- package/dist/cjs/ion-input-otp.cjs.entry.js +16 -10
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +9 -7
- package/dist/cjs/ion-input.cjs.entry.js +21 -13
- package/dist/cjs/ion-item-option_3.cjs.entry.js +17 -15
- package/dist/cjs/ion-item_8.cjs.entry.js +42 -36
- package/dist/cjs/ion-loading.cjs.entry.js +18 -14
- package/dist/cjs/ion-menu_3.cjs.entry.js +30 -22
- package/dist/cjs/ion-modal.cjs.entry.js +55 -40
- package/dist/cjs/ion-nav_2.cjs.entry.js +14 -10
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +10 -8
- package/dist/cjs/ion-picker-column.cjs.entry.js +11 -7
- package/dist/cjs/ion-picker.cjs.entry.js +6 -6
- package/dist/cjs/ion-popover.cjs.entry.js +21 -15
- package/dist/cjs/ion-progress-bar.cjs.entry.js +7 -7
- package/dist/cjs/ion-radio_2.cjs.entry.js +17 -13
- package/dist/cjs/ion-range.cjs.entry.js +29 -15
- package/dist/cjs/ion-refresher_2.cjs.entry.js +45 -14
- package/dist/cjs/ion-reorder_2.cjs.entry.js +13 -11
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +4 -4
- package/dist/cjs/ion-route_4.cjs.entry.js +20 -10
- package/dist/cjs/ion-searchbar.cjs.entry.js +22 -12
- package/dist/cjs/ion-segment-content.cjs.entry.js +3 -3
- package/dist/cjs/ion-segment-view.cjs.entry.js +5 -5
- package/dist/cjs/ion-segment_2.cjs.entry.js +26 -16
- package/dist/cjs/ion-select-modal.cjs.entry.js +12 -12
- package/dist/cjs/ion-select_3.cjs.entry.js +29 -21
- package/dist/cjs/ion-spinner.cjs.entry.js +4 -4
- package/dist/cjs/ion-split-pane.cjs.entry.js +15 -9
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +14 -12
- package/dist/cjs/ion-tab_2.cjs.entry.js +10 -8
- package/dist/cjs/ion-text.cjs.entry.js +4 -4
- package/dist/cjs/ion-textarea.cjs.entry.js +18 -12
- package/dist/cjs/ion-toast.cjs.entry.js +21 -15
- package/dist/cjs/ion-toggle.cjs.entry.js +10 -8
- package/dist/cjs/{ionic-global-HMVqOFGO.js → ionic-global-Bc3kJi1Z.js} +1 -1
- package/dist/cjs/ionic.cjs.js +5 -5
- package/dist/cjs/{ios.transition-BOt_uW73.js → ios.transition-trBiC95R.js} +4 -4
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-Dt968VXB.js → md.transition-CUQECuvD.js} +4 -4
- package/dist/cjs/{notch-controller-Bzqhjm4f.js → notch-controller-sD-lTpdc.js} +1 -1
- package/dist/cjs/{overlays-B2b-TTbl.js → overlays-C2jiBSNQ.js} +5 -5
- package/dist/cjs/{status-tap-g0sWWkXk.js → status-tap-CCJk5VgT.js} +3 -3
- package/dist/cjs/{swipe-back-BIayeNOD.js → swipe-back-BGhTQ1CU.js} +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion-group/accordion-group.js +4 -2
- package/dist/collection/components/action-sheet/action-sheet.js +20 -10
- package/dist/collection/components/alert/alert.js +24 -12
- package/dist/collection/components/back-button/back-button.js +4 -2
- package/dist/collection/components/badge/badge.js +2 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +8 -4
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +4 -2
- package/dist/collection/components/button/button.js +6 -3
- package/dist/collection/components/card/card.js +6 -3
- package/dist/collection/components/card-header/card-header.js +2 -1
- package/dist/collection/components/card-subtitle/card-subtitle.js +2 -1
- package/dist/collection/components/card-title/card-title.js +2 -1
- package/dist/collection/components/checkbox/checkbox.js +4 -2
- package/dist/collection/components/chip/chip.js +2 -1
- package/dist/collection/components/content/content.js +8 -4
- package/dist/collection/components/datetime/datetime.js +34 -15
- package/dist/collection/components/datetime-button/datetime-button.js +2 -1
- package/dist/collection/components/fab-button/fab-button.js +6 -3
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +4 -2
- package/dist/collection/components/input/input.js +11 -6
- package/dist/collection/components/input-otp/input-otp.js +8 -4
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +4 -2
- package/dist/collection/components/item/item.js +6 -3
- package/dist/collection/components/item-divider/item-divider.js +2 -1
- package/dist/collection/components/item-option/item-option.js +2 -1
- package/dist/collection/components/item-options/item-options.js +2 -1
- package/dist/collection/components/item-sliding/item-sliding.js +2 -1
- package/dist/collection/components/label/label.js +6 -3
- package/dist/collection/components/list-header/list-header.js +2 -1
- package/dist/collection/components/loading/loading.js +22 -11
- package/dist/collection/components/menu/menu.js +10 -5
- package/dist/collection/components/menu-button/menu-button.js +2 -1
- package/dist/collection/components/modal/gestures/sheet.js +32 -21
- package/dist/collection/components/modal/modal.js +35 -20
- package/dist/collection/components/nav/nav.js +89 -45
- package/dist/collection/components/nav-link/nav-link.js +9 -5
- package/dist/collection/components/note/note.js +2 -1
- package/dist/collection/components/picker/picker.js +2 -1
- package/dist/collection/components/picker-column/picker-column.js +6 -3
- package/dist/collection/components/picker-column-option/picker-column-option.js +2 -1
- package/dist/collection/components/picker-legacy/picker.js +24 -12
- package/dist/collection/components/picker-legacy-column/picker-column.js +4 -2
- package/dist/collection/components/popover/popover.js +33 -17
- package/dist/collection/components/progress-bar/progress-bar.js +2 -1
- package/dist/collection/components/radio/radio.js +2 -1
- package/dist/collection/components/radio-group/radio-group.js +6 -3
- package/dist/collection/components/range/range.js +14 -7
- package/dist/collection/components/refresher/refresher.js +73 -5
- package/dist/collection/components/refresher-content/refresher-content.js +8 -4
- package/dist/collection/components/reorder-group/reorder-group.js +6 -3
- package/dist/collection/components/route/route.js +4 -2
- package/dist/collection/components/router/router.js +10 -5
- package/dist/collection/components/router-link/router-link.js +6 -3
- package/dist/collection/components/router-outlet/router-outlet.js +18 -9
- package/dist/collection/components/searchbar/searchbar.js +11 -6
- package/dist/collection/components/segment/segment.js +10 -5
- package/dist/collection/components/segment-button/segment-button.js +4 -2
- package/dist/collection/components/segment-view/segment-view.js +2 -1
- package/dist/collection/components/select/select.js +10 -5
- package/dist/collection/components/select-modal/select-modal.js +2 -1
- package/dist/collection/components/select-popover/select-popover.js +2 -1
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -1
- package/dist/collection/components/spinner/spinner.js +4 -2
- package/dist/collection/components/tab/tab.js +4 -2
- package/dist/collection/components/tab-bar/tab-bar.js +4 -2
- package/dist/collection/components/tab-button/tab-button.js +4 -2
- package/dist/collection/components/tabs/tabs.js +4 -2
- package/dist/collection/components/text/text.js +2 -1
- package/dist/collection/components/textarea/textarea.js +6 -3
- package/dist/collection/components/title/title.js +4 -2
- package/dist/collection/components/toast/toast.js +34 -17
- package/dist/collection/components/toggle/toggle.js +4 -2
- package/dist/collection/components/toolbar/toolbar.js +2 -1
- package/dist/docs.d.ts +37 -0
- package/dist/docs.json +835 -381
- package/dist/esm/{animation-Dt8bGnA-.js → animation-CnGMT4ji.js} +1 -1
- package/dist/esm/app-globals-DhZjtldk.js +9 -0
- package/dist/esm/{button-active-L570Swow.js → button-active-BBx21brx.js} +1 -1
- package/dist/esm/{config-mCdtaoPe.js → config-TO1rZH52.js} +1 -1
- package/dist/esm/{data-DCORV9FH.js → data-B9iGR5YO.js} +1 -1
- package/dist/esm/{framework-delegate-BYawdMXj.js → framework-delegate-CyxE1S_P.js} +1 -1
- package/dist/esm/{hardware-back-button-CPLxO-Ev.js → hardware-back-button-CTe4XmL7.js} +1 -1
- package/dist/esm/{helpers-DEn3pfjm.js → helpers-Tl8jw6S2.js} +1 -1
- package/dist/esm/{index-r2D9DEro.js → index-B-hkiOUh.js} +4 -4
- package/dist/esm/{index-CvDIirVx.js → index-B2KwgBLx.js} +5 -5
- package/dist/esm/{index-ceb5RaMT.js → index-BtUdxPjv.js} +2 -2
- package/dist/esm/{index-C8IsBmNU.js → index-IGIE5vDm.js} +503 -382
- package/dist/esm/{index-Bs3kT4bc.js → index-hW6eNZ3o.js} +2 -2
- package/dist/esm/index.js +12 -12
- package/dist/esm/{input-shims-DyOpfTg6.js → input-shims-C1hAaHcP.js} +3 -3
- package/dist/esm/{input.utils-DrvTa8gz.js → input.utils-Bxa_DQ7-.js} +2 -2
- package/dist/esm/ion-accordion_2.entry.js +23 -15
- package/dist/esm/ion-action-sheet.entry.js +21 -15
- package/dist/esm/ion-alert.entry.js +25 -17
- package/dist/esm/ion-app_8.entry.js +44 -40
- package/dist/esm/ion-avatar_3.entry.js +12 -12
- package/dist/esm/ion-back-button.entry.js +7 -7
- package/dist/esm/ion-backdrop.entry.js +6 -6
- package/dist/esm/ion-breadcrumb_2.entry.js +20 -14
- package/dist/esm/ion-button_2.entry.js +36 -18
- package/dist/esm/ion-card_5.entry.js +23 -23
- package/dist/esm/ion-checkbox.entry.js +7 -7
- package/dist/esm/ion-chip.entry.js +6 -6
- package/dist/esm/ion-col_3.entry.js +8 -8
- package/dist/esm/ion-datetime-button.entry.js +8 -8
- package/dist/esm/ion-datetime_3.entry.js +67 -39
- package/dist/esm/ion-fab_3.entry.js +17 -13
- package/dist/esm/ion-img.entry.js +8 -6
- package/dist/esm/ion-infinite-scroll_2.entry.js +17 -13
- package/dist/esm/ion-input-otp.entry.js +16 -10
- package/dist/esm/ion-input-password-toggle.entry.js +9 -7
- package/dist/esm/ion-input.entry.js +21 -13
- package/dist/esm/ion-item-option_3.entry.js +17 -15
- package/dist/esm/ion-item_8.entry.js +42 -36
- package/dist/esm/ion-loading.entry.js +18 -14
- package/dist/esm/ion-menu_3.entry.js +30 -22
- package/dist/esm/ion-modal.entry.js +55 -40
- package/dist/esm/ion-nav_2.entry.js +14 -10
- package/dist/esm/ion-picker-column-option.entry.js +10 -8
- package/dist/esm/ion-picker-column.entry.js +11 -7
- package/dist/esm/ion-picker.entry.js +6 -6
- package/dist/esm/ion-popover.entry.js +21 -15
- package/dist/esm/ion-progress-bar.entry.js +7 -7
- package/dist/esm/ion-radio_2.entry.js +17 -13
- package/dist/esm/ion-range.entry.js +29 -15
- package/dist/esm/ion-refresher_2.entry.js +45 -14
- package/dist/esm/ion-reorder_2.entry.js +13 -11
- package/dist/esm/ion-ripple-effect.entry.js +4 -4
- package/dist/esm/ion-route_4.entry.js +20 -10
- package/dist/esm/ion-searchbar.entry.js +22 -12
- package/dist/esm/ion-segment-content.entry.js +3 -3
- package/dist/esm/ion-segment-view.entry.js +5 -5
- package/dist/esm/ion-segment_2.entry.js +26 -16
- package/dist/esm/ion-select-modal.entry.js +12 -12
- package/dist/esm/ion-select_3.entry.js +29 -21
- package/dist/esm/ion-spinner.entry.js +4 -4
- package/dist/esm/ion-split-pane.entry.js +15 -9
- package/dist/esm/ion-tab-bar_2.entry.js +14 -12
- package/dist/esm/ion-tab_2.entry.js +10 -8
- package/dist/esm/ion-text.entry.js +4 -4
- package/dist/esm/ion-textarea.entry.js +18 -12
- package/dist/esm/ion-toast.entry.js +21 -15
- package/dist/esm/ion-toggle.entry.js +10 -8
- package/dist/esm/{ionic-global-CDrldh-5.js → ionic-global-DfbeLwcV.js} +1 -1
- package/dist/esm/ionic.js +6 -6
- package/dist/esm/{ios.transition-BDzw0_Hm.js → ios.transition--aMF-pDH.js} +4 -4
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-BzDYi3qq.js → md.transition-BEVbfm8j.js} +4 -4
- package/dist/esm/{notch-controller-BwelN_JM.js → notch-controller-DAcvKU57.js} +1 -1
- package/dist/esm/{overlays-D5YkFThA.js → overlays-F8GHPo-e.js} +5 -5
- package/dist/esm/{status-tap-5DQ7Fc4V.js → status-tap-BfJqFSLF.js} +3 -3
- package/dist/esm/{swipe-back-BKw2CAHc.js → swipe-back-BZBFwTQV.js} +2 -2
- package/dist/html.html-data.json +109 -109
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-316c0420.entry.js → p-025d2d32.entry.js} +1 -1
- package/dist/ionic/p-02acdef4.entry.js +4 -0
- package/dist/ionic/p-04e2c388.entry.js +4 -0
- package/dist/ionic/{p-370e4237.entry.js → p-074344b8.entry.js} +1 -1
- package/dist/ionic/p-0761b4d3.entry.js +4 -0
- package/dist/ionic/p-13ade5c8.entry.js +4 -0
- package/dist/ionic/p-1b02923f.entry.js +4 -0
- package/dist/ionic/p-1bd477a9.entry.js +4 -0
- package/dist/ionic/{p-d2489bf2.entry.js → p-1fa1406c.entry.js} +1 -1
- package/dist/ionic/{p-46d74291.entry.js → p-1fd588a7.entry.js} +1 -1
- package/dist/ionic/p-239a27a4.entry.js +4 -0
- package/dist/ionic/{p-94de5cfa.entry.js → p-277abec1.entry.js} +1 -1
- package/dist/ionic/{p-dd1aef77.entry.js → p-28d7852f.entry.js} +1 -1
- package/dist/ionic/{p-49d06882.entry.js → p-301c43f8.entry.js} +1 -1
- package/dist/ionic/{p-79bd78f9.entry.js → p-370a60ee.entry.js} +1 -1
- package/dist/ionic/p-3e143d1d.entry.js +4 -0
- package/dist/ionic/p-4431ef7e.entry.js +4 -0
- package/dist/ionic/p-463767ce.entry.js +4 -0
- package/dist/ionic/p-4f888343.entry.js +4 -0
- package/dist/ionic/p-51c11c47.entry.js +4 -0
- package/dist/ionic/p-56050077.entry.js +4 -0
- package/dist/ionic/p-6a3a5aae.entry.js +4 -0
- package/dist/ionic/p-6b97f2a3.entry.js +4 -0
- package/dist/ionic/{p-51a60e0f.entry.js → p-7c72d482.entry.js} +1 -1
- package/dist/ionic/p-7d20f4f8.entry.js +4 -0
- package/dist/ionic/{p-11aa58d6.entry.js → p-80cac7a2.entry.js} +1 -1
- package/dist/ionic/p-91fc7352.entry.js +4 -0
- package/dist/ionic/p-93845421.entry.js +4 -0
- package/dist/ionic/{p-3a6caca9.entry.js → p-964090ef.entry.js} +1 -1
- package/dist/ionic/p-96a2e768.entry.js +4 -0
- package/dist/ionic/{p-d126e8d3.entry.js → p-9745651b.entry.js} +1 -1
- package/dist/ionic/{p-f9061316.entry.js → p-9802c88e.entry.js} +1 -1
- package/dist/ionic/{p-582824c5.entry.js → p-9833cf63.entry.js} +1 -1
- package/dist/ionic/{p-675b1a31.entry.js → p-9fae83d8.entry.js} +1 -1
- package/dist/ionic/{p-CwgG81ZD.js → p-B8xlpH8p.js} +1 -1
- package/dist/ionic/{p-C7hRNDhM.js → p-BAt5H1ac.js} +1 -1
- package/dist/ionic/p-BW_TRJm8.js +4 -0
- package/dist/ionic/{p-DDb5r57F.js → p-Bum7H1fw.js} +1 -1
- package/dist/ionic/{p-D0dMcSkw.js → p-BvFYtOdE.js} +1 -1
- package/dist/ionic/{p-Dc45iWE4.js → p-BxIcPWoV.js} +1 -1
- package/dist/ionic/{p-BYEqWnSg.js → p-C0JvVFMv.js} +1 -1
- package/dist/ionic/{p-CTfR9YZG.js → p-CGmVTdWh.js} +1 -1
- package/dist/ionic/{p-BOVrCkpJ.js → p-CYbRmDdy.js} +1 -1
- package/dist/ionic/{p-D-eFFUkA.js → p-CmFz1Mjc.js} +1 -1
- package/dist/ionic/p-CtA-yJYy.js +4 -0
- package/dist/ionic/p-D8HJQ1qq.js +4 -0
- package/dist/ionic/{p-B0q1YL7N.js → p-DB_iPQC-.js} +1 -1
- package/dist/ionic/{p-DNcfiJwE.js → p-DLbbmF9h.js} +1 -1
- package/dist/ionic/{p-DdR6rpbR.js → p-DTPR1Wpn.js} +1 -1
- package/dist/ionic/{p-DCv9sLH2.js → p-DjriolRs.js} +1 -1
- package/dist/ionic/p-DtVZDHlS.js +4 -0
- package/dist/ionic/{p-QHYY4sjU.js → p-GWUGgWx6.js} +1 -1
- package/dist/ionic/p-IGIE5vDm.js +5 -0
- package/dist/ionic/{p-BFvmZNyx.js → p-NFFyoJ4Q.js} +1 -1
- package/dist/ionic/{p-86f53961.entry.js → p-a287e18e.entry.js} +1 -1
- package/dist/ionic/p-a805674e.entry.js +4 -0
- package/dist/ionic/p-a81ae2cd.entry.js +4 -0
- package/dist/ionic/{p-da7d04cc.entry.js → p-a84f2d21.entry.js} +1 -1
- package/dist/ionic/{p-dbbe606a.entry.js → p-b2d5238b.entry.js} +1 -1
- package/dist/ionic/{p-d1f54e28.entry.js → p-b440381f.entry.js} +1 -1
- package/dist/ionic/{p-72c38b88.entry.js → p-b4d52b58.entry.js} +1 -1
- package/dist/ionic/{p-2a939845.entry.js → p-b67a2114.entry.js} +1 -1
- package/dist/ionic/{p-c73627c8.entry.js → p-bced1f3e.entry.js} +1 -1
- package/dist/ionic/{p-9a2d390d.entry.js → p-c1c9b2bb.entry.js} +1 -1
- package/dist/ionic/{p-f8f22cc0.entry.js → p-c3e65e45.entry.js} +1 -1
- package/dist/ionic/p-c76cc21d.entry.js +4 -0
- package/dist/ionic/{p-b0a7585c.entry.js → p-ca31010f.entry.js} +1 -1
- package/dist/ionic/p-cbf245b5.entry.js +4 -0
- package/dist/ionic/p-d68b665a.entry.js +4 -0
- package/dist/ionic/{p-9575b654.entry.js → p-e663bc5a.entry.js} +1 -1
- package/dist/ionic/p-efe86ed9.entry.js +4 -0
- package/dist/ionic/{p-ac4eb91d.entry.js → p-f5dfb9a3.entry.js} +1 -1
- package/dist/ionic/{p-DbQ5QkTP.js → p-gbVXD275.js} +1 -1
- package/dist/ionic/p-hNN3VvaC.js +4 -0
- package/dist/types/components/datetime/datetime.d.ts +9 -0
- package/dist/types/components/header/header.utils.d.ts +2 -1
- package/dist/types/components/modal/modal-interface.d.ts +5 -1
- package/dist/types/components/modal/modal.d.ts +5 -0
- package/dist/types/components/refresher/refresher-interface.d.ts +7 -0
- package/dist/types/components/refresher/refresher.d.ts +16 -3
- package/dist/types/components.d.ts +927 -189
- package/dist/types/interface.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +126 -14
- package/dist/types/utils/gesture/listener.d.ts +2 -1
- package/hydrate/index.d.ts +12 -0
- package/hydrate/index.js +5202 -1327
- package/hydrate/index.mjs +5201 -1328
- package/package.json +2 -2
- package/dist/cjs/app-globals-Ciccnk9_.js +0 -10
- package/dist/esm/app-globals-BDSf8fOA.js +0 -8
- package/dist/ionic/p-012212e4.entry.js +0 -4
- package/dist/ionic/p-074839fc.entry.js +0 -4
- package/dist/ionic/p-0dfa5a37.entry.js +0 -4
- package/dist/ionic/p-0f418a37.entry.js +0 -4
- package/dist/ionic/p-11518b31.entry.js +0 -4
- package/dist/ionic/p-1838bed5.entry.js +0 -4
- package/dist/ionic/p-29721c43.entry.js +0 -4
- package/dist/ionic/p-31f7095f.entry.js +0 -4
- package/dist/ionic/p-34642fa1.entry.js +0 -4
- package/dist/ionic/p-35696017.entry.js +0 -4
- package/dist/ionic/p-40c261a3.entry.js +0 -4
- package/dist/ionic/p-4e41ea20.entry.js +0 -4
- package/dist/ionic/p-6241ce47.entry.js +0 -4
- package/dist/ionic/p-639dd543.entry.js +0 -4
- package/dist/ionic/p-6444c606.entry.js +0 -4
- package/dist/ionic/p-6d070558.entry.js +0 -4
- package/dist/ionic/p-7268efa5.entry.js +0 -4
- package/dist/ionic/p-7babec72.entry.js +0 -4
- package/dist/ionic/p-BKc55Xev.js +0 -4
- package/dist/ionic/p-Bmgaetn_.js +0 -4
- package/dist/ionic/p-C8IsBmNU.js +0 -5
- package/dist/ionic/p-CJxh_yLS.js +0 -4
- package/dist/ionic/p-DUt5fQmA.js +0 -4
- package/dist/ionic/p-DZRJwG4S.js +0 -4
- package/dist/ionic/p-a127bee2.entry.js +0 -4
- package/dist/ionic/p-b3d44509.entry.js +0 -4
- package/dist/ionic/p-cc45bcbc.entry.js +0 -4
- package/dist/ionic/p-d0a2a1ab.entry.js +0 -4
- package/dist/ionic/p-d3014190.entry.js +0 -4
- package/dist/ionic/p-db82892c.entry.js +0 -4
- package/dist/ionic/p-e1d1f3cc.entry.js +0 -4
|
@@ -1,290 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
5
|
-
import { e as renderHiddenInput } from './helpers.js';
|
|
6
|
-
import { c as checkInvalidState } from './validity.js';
|
|
7
|
-
import { b as getIonMode } from './ionic-global.js';
|
|
8
|
-
|
|
9
|
-
const radioGroupIosCss = "ion-radio-group{vertical-align:top}.radio-group-wrapper{display:inline}.radio-group-top{line-height:1.5}.radio-group-top .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.radio-group-top .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}.ion-touched.ion-invalid .radio-group-top .error-text{display:block}.ion-touched.ion-invalid .radio-group-top .helper-text{display:none}ion-list .radio-group-top{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}";
|
|
10
|
-
|
|
11
|
-
const radioGroupMdCss = "ion-radio-group{vertical-align:top}.radio-group-wrapper{display:inline}.radio-group-top{line-height:1.5}.radio-group-top .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.radio-group-top .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}.ion-touched.ion-invalid .radio-group-top .error-text{display:block}.ion-touched.ion-invalid .radio-group-top .helper-text{display:none}ion-list .radio-group-top{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}";
|
|
12
|
-
|
|
13
|
-
const RadioGroup = /*@__PURE__*/ proxyCustomElement(class RadioGroup extends HTMLElement {
|
|
14
|
-
constructor(registerHost) {
|
|
15
|
-
super();
|
|
16
|
-
if (registerHost !== false) {
|
|
17
|
-
this.__registerHost();
|
|
18
|
-
}
|
|
19
|
-
this.ionChange = createEvent(this, "ionChange", 7);
|
|
20
|
-
this.ionValueChange = createEvent(this, "ionValueChange", 7);
|
|
21
|
-
this.inputId = `ion-rg-${radioGroupIds++}`;
|
|
22
|
-
this.helperTextId = `${this.inputId}-helper-text`;
|
|
23
|
-
this.errorTextId = `${this.inputId}-error-text`;
|
|
24
|
-
this.labelId = `${this.inputId}-lbl`;
|
|
25
|
-
/**
|
|
26
|
-
* Track validation state for proper aria-live announcements.
|
|
27
|
-
*/
|
|
28
|
-
this.isInvalid = false;
|
|
29
|
-
/**
|
|
30
|
-
* If `true`, the radios can be deselected.
|
|
31
|
-
*/
|
|
32
|
-
this.allowEmptySelection = false;
|
|
33
|
-
/**
|
|
34
|
-
* The name of the control, which is submitted with the form data.
|
|
35
|
-
*/
|
|
36
|
-
this.name = this.inputId;
|
|
37
|
-
this.setRadioTabindex = (value) => {
|
|
38
|
-
const radios = this.getRadios();
|
|
39
|
-
// Get the first radio that is not disabled and the checked one
|
|
40
|
-
const first = radios.find((radio) => !radio.disabled);
|
|
41
|
-
const checked = radios.find((radio) => radio.value === value && !radio.disabled);
|
|
42
|
-
if (!first && !checked) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
// If an enabled checked radio exists, set it to be the focusable radio
|
|
46
|
-
// otherwise we default to focus the first radio
|
|
47
|
-
const focusable = checked || first;
|
|
48
|
-
for (const radio of radios) {
|
|
49
|
-
const tabindex = radio === focusable ? 0 : -1;
|
|
50
|
-
radio.setButtonTabindex(tabindex);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
this.onClick = (ev) => {
|
|
54
|
-
ev.preventDefault();
|
|
55
|
-
/**
|
|
56
|
-
* The Radio Group component mandates that only one radio button
|
|
57
|
-
* within the group can be selected at any given time. Since `ion-radio`
|
|
58
|
-
* is a shadow DOM component, it cannot natively perform this behavior
|
|
59
|
-
* using the `name` attribute.
|
|
60
|
-
*/
|
|
61
|
-
const selectedRadio = ev.target && ev.target.closest('ion-radio');
|
|
62
|
-
/**
|
|
63
|
-
* Our current disabled prop definition causes Stencil to mark it
|
|
64
|
-
* as optional. While this is not desired, fixing this behavior
|
|
65
|
-
* in Stencil is a significant breaking change, so this effort is
|
|
66
|
-
* being de-risked in STENCIL-917. Until then, we compromise
|
|
67
|
-
* here by checking for falsy `disabled` values instead of strictly
|
|
68
|
-
* checking `disabled === false`.
|
|
69
|
-
*/
|
|
70
|
-
if (selectedRadio && !selectedRadio.disabled) {
|
|
71
|
-
const currentValue = this.value;
|
|
72
|
-
const newValue = selectedRadio.value;
|
|
73
|
-
if (newValue !== currentValue) {
|
|
74
|
-
this.value = newValue;
|
|
75
|
-
this.emitValueChange(ev);
|
|
76
|
-
}
|
|
77
|
-
else if (this.allowEmptySelection) {
|
|
78
|
-
this.value = undefined;
|
|
79
|
-
this.emitValueChange(ev);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
valueChanged(value) {
|
|
85
|
-
this.setRadioTabindex(value);
|
|
86
|
-
this.ionValueChange.emit({ value });
|
|
87
|
-
}
|
|
88
|
-
componentDidLoad() {
|
|
89
|
-
/**
|
|
90
|
-
* There's an issue when assigning a value to the radio group
|
|
91
|
-
* within the Angular primary content (rendering within the
|
|
92
|
-
* app component template). When the template is isolated to a route,
|
|
93
|
-
* the value is assigned correctly.
|
|
94
|
-
* To address this issue, we need to ensure that the watcher is
|
|
95
|
-
* called after the component has finished loading,
|
|
96
|
-
* allowing the emit to be dispatched correctly.
|
|
97
|
-
*/
|
|
98
|
-
this.valueChanged(this.value);
|
|
99
|
-
}
|
|
100
|
-
async connectedCallback() {
|
|
101
|
-
// Get the list header if it exists and set the id
|
|
102
|
-
// this is used to set aria-labelledby
|
|
103
|
-
const header = this.el.querySelector('ion-list-header') || this.el.querySelector('ion-item-divider');
|
|
104
|
-
if (header) {
|
|
105
|
-
const label = (this.label = header.querySelector('ion-label'));
|
|
106
|
-
if (label) {
|
|
107
|
-
this.labelId = label.id = this.name + '-lbl';
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
// Watch for class changes to update validation state.
|
|
111
|
-
if (Build.isBrowser && typeof MutationObserver !== 'undefined') {
|
|
112
|
-
this.validationObserver = new MutationObserver(() => {
|
|
113
|
-
const newIsInvalid = checkInvalidState(this.el);
|
|
114
|
-
if (this.isInvalid !== newIsInvalid) {
|
|
115
|
-
this.isInvalid = newIsInvalid;
|
|
116
|
-
/**
|
|
117
|
-
* Screen readers tend to announce changes
|
|
118
|
-
* to `aria-describedby` when the attribute
|
|
119
|
-
* is changed during a blur event for a
|
|
120
|
-
* native form control.
|
|
121
|
-
* However, the announcement can be spotty
|
|
122
|
-
* when using a non-native form control
|
|
123
|
-
* and `forceUpdate()`.
|
|
124
|
-
* This is due to `forceUpdate()` internally
|
|
125
|
-
* rescheduling the DOM update to a lower
|
|
126
|
-
* priority queue regardless if it's called
|
|
127
|
-
* inside a Promise or not, thus causing
|
|
128
|
-
* the screen reader to potentially miss the
|
|
129
|
-
* change.
|
|
130
|
-
* By using a State variable inside a Promise,
|
|
131
|
-
* it guarantees a re-render immediately at
|
|
132
|
-
* a higher priority.
|
|
133
|
-
*/
|
|
134
|
-
Promise.resolve().then(() => {
|
|
135
|
-
this.hintTextId = this.getHintTextId();
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
this.validationObserver.observe(this.el, {
|
|
140
|
-
attributes: true,
|
|
141
|
-
attributeFilter: ['class'],
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
// Always set initial state
|
|
145
|
-
this.isInvalid = checkInvalidState(this.el);
|
|
146
|
-
}
|
|
147
|
-
componentWillLoad() {
|
|
148
|
-
this.hintTextId = this.getHintTextId();
|
|
149
|
-
}
|
|
150
|
-
disconnectedCallback() {
|
|
151
|
-
// Clean up validation observer to prevent memory leaks.
|
|
152
|
-
if (this.validationObserver) {
|
|
153
|
-
this.validationObserver.disconnect();
|
|
154
|
-
this.validationObserver = undefined;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
getRadios() {
|
|
158
|
-
return Array.from(this.el.querySelectorAll('ion-radio'));
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Emits an `ionChange` event.
|
|
162
|
-
*
|
|
163
|
-
* This API should be called for user committed changes.
|
|
164
|
-
* This API should not be used for external value changes.
|
|
165
|
-
*/
|
|
166
|
-
emitValueChange(event) {
|
|
167
|
-
const { value } = this;
|
|
168
|
-
this.ionChange.emit({ value, event });
|
|
169
|
-
}
|
|
170
|
-
onKeydown(ev) {
|
|
171
|
-
// We don't want the value to automatically change/emit when the radio group is part of a select interface
|
|
172
|
-
// as this will cause the interface to close when navigating through the radio group options
|
|
173
|
-
const inSelectInterface = !!this.el.closest('ion-select-popover') || !!this.el.closest('ion-select-modal');
|
|
174
|
-
if (ev.target && !this.el.contains(ev.target)) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
// Get all radios inside of the radio group and then
|
|
178
|
-
// filter out disabled radios since we need to skip those
|
|
179
|
-
const radios = this.getRadios().filter((radio) => !radio.disabled);
|
|
180
|
-
// Only move the radio if the current focus is in the radio group
|
|
181
|
-
if (ev.target && radios.includes(ev.target)) {
|
|
182
|
-
const index = radios.findIndex((radio) => radio === ev.target);
|
|
183
|
-
const current = radios[index];
|
|
184
|
-
let next;
|
|
185
|
-
// If hitting arrow down or arrow right, move to the next radio
|
|
186
|
-
// If we're on the last radio, move to the first radio
|
|
187
|
-
if (['ArrowDown', 'ArrowRight'].includes(ev.key)) {
|
|
188
|
-
next = index === radios.length - 1 ? radios[0] : radios[index + 1];
|
|
189
|
-
}
|
|
190
|
-
// If hitting arrow up or arrow left, move to the previous radio
|
|
191
|
-
// If we're on the first radio, move to the last radio
|
|
192
|
-
if (['ArrowUp', 'ArrowLeft'].includes(ev.key)) {
|
|
193
|
-
next = index === 0 ? radios[radios.length - 1] : radios[index - 1];
|
|
194
|
-
}
|
|
195
|
-
if (next && radios.includes(next)) {
|
|
196
|
-
next.setFocus(ev);
|
|
197
|
-
if (!inSelectInterface) {
|
|
198
|
-
this.value = next.value;
|
|
199
|
-
this.emitValueChange(ev);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
// Update the radio group value when a user presses the
|
|
203
|
-
// space bar on top of a selected radio
|
|
204
|
-
if ([' '].includes(ev.key)) {
|
|
205
|
-
const previousValue = this.value;
|
|
206
|
-
this.value = this.allowEmptySelection && this.value !== undefined ? undefined : current.value;
|
|
207
|
-
if (previousValue !== this.value || this.allowEmptySelection) {
|
|
208
|
-
/**
|
|
209
|
-
* Value change should only be emitted if the value is different,
|
|
210
|
-
* such as selecting a new radio with the space bar or if
|
|
211
|
-
* the radio group allows for empty selection and the user
|
|
212
|
-
* is deselecting a checked radio.
|
|
213
|
-
*/
|
|
214
|
-
this.emitValueChange(ev);
|
|
215
|
-
}
|
|
216
|
-
// Prevent browsers from jumping
|
|
217
|
-
// to the bottom of the screen
|
|
218
|
-
ev.preventDefault();
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
/** @internal */
|
|
223
|
-
async setFocus() {
|
|
224
|
-
const radioToFocus = this.getRadios().find((r) => r.tabIndex !== -1);
|
|
225
|
-
radioToFocus === null || radioToFocus === void 0 ? void 0 : radioToFocus.setFocus();
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Renders the helper text or error text values
|
|
229
|
-
*/
|
|
230
|
-
renderHintText() {
|
|
231
|
-
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
232
|
-
const hasHintText = !!helperText || !!errorText;
|
|
233
|
-
if (!hasHintText) {
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
return (h("div", { class: "radio-group-top" }, h("div", { id: helperTextId, class: "helper-text", "aria-live": "polite" }, !isInvalid ? helperText : null), h("div", { id: errorTextId, class: "error-text", role: "alert" }, isInvalid ? errorText : null)));
|
|
237
|
-
}
|
|
238
|
-
getHintTextId() {
|
|
239
|
-
const { helperText, errorText, helperTextId, errorTextId, isInvalid } = this;
|
|
240
|
-
if (isInvalid && errorText) {
|
|
241
|
-
return errorTextId;
|
|
242
|
-
}
|
|
243
|
-
if (helperText) {
|
|
244
|
-
return helperTextId;
|
|
245
|
-
}
|
|
246
|
-
return undefined;
|
|
247
|
-
}
|
|
248
|
-
render() {
|
|
249
|
-
const { label, labelId, el, name, value } = this;
|
|
250
|
-
const mode = getIonMode(this);
|
|
251
|
-
renderHiddenInput(true, el, name, value, false);
|
|
252
|
-
return (h(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(), h("div", { key: '85045b45a0100a45f3b9a35d1c5a25ec63d525c4', class: "radio-group-wrapper" }, h("slot", { key: '53dacb87ce62398e78771fb2efaf839ab922d946' }))));
|
|
253
|
-
}
|
|
254
|
-
get el() { return this; }
|
|
255
|
-
static get watchers() { return {
|
|
256
|
-
"value": ["valueChanged"]
|
|
257
|
-
}; }
|
|
258
|
-
static get style() { return {
|
|
259
|
-
ios: radioGroupIosCss,
|
|
260
|
-
md: radioGroupMdCss
|
|
261
|
-
}; }
|
|
262
|
-
}, [292, "ion-radio-group", {
|
|
263
|
-
"allowEmptySelection": [4, "allow-empty-selection"],
|
|
264
|
-
"compareWith": [1, "compare-with"],
|
|
265
|
-
"name": [1],
|
|
266
|
-
"value": [1032],
|
|
267
|
-
"helperText": [1, "helper-text"],
|
|
268
|
-
"errorText": [1, "error-text"],
|
|
269
|
-
"isInvalid": [32],
|
|
270
|
-
"hintTextId": [32],
|
|
271
|
-
"setFocus": [64]
|
|
272
|
-
}, [[4, "keydown", "onKeydown"]], {
|
|
273
|
-
"value": ["valueChanged"]
|
|
274
|
-
}]);
|
|
275
|
-
let radioGroupIds = 0;
|
|
276
|
-
function defineCustomElement() {
|
|
277
|
-
if (typeof customElements === "undefined") {
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
const components = ["ion-radio-group"];
|
|
281
|
-
components.forEach(tagName => { switch (tagName) {
|
|
282
|
-
case "ion-radio-group":
|
|
283
|
-
if (!customElements.get(tagName)) {
|
|
284
|
-
customElements.define(tagName, RadioGroup);
|
|
285
|
-
}
|
|
286
|
-
break;
|
|
287
|
-
} });
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export { RadioGroup as R, defineCustomElement as d };
|
|
4
|
+
import{proxyCustomElement as t,HTMLElement as i,createEvent as e,Build as o,h as r,Host as s,transformTag as n}from"@stencil/core/internal/client";import{e as a}from"./helpers.js";import{c as l}from"./validity.js";import{b as d}from"./ionic-global.js";const h=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.ionChange=e(this,"ionChange",7),this.ionValueChange=e(this,"ionValueChange",7),this.inputId="ion-rg-"+p++,this.helperTextId=`${this.inputId}-helper-text`,this.errorTextId=`${this.inputId}-error-text`,this.labelId=`${this.inputId}-lbl`,this.isInvalid=!1,this.allowEmptySelection=!1,this.name=this.inputId,this.setRadioTabindex=t=>{const i=this.getRadios(),e=i.find((t=>!t.disabled)),o=i.find((i=>i.value===t&&!i.disabled));if(!e&&!o)return;const r=o||e;for(const t of i)t.setButtonTabindex(t===r?0:-1)},this.onClick=t=>{t.preventDefault();const i=t.target&&t.target.closest("ion-radio");if(i&&!i.disabled){const e=i.value;e!==this.value?(this.value=e,this.emitValueChange(t)):this.allowEmptySelection&&(this.value=void 0,this.emitValueChange(t))}}}valueChanged(t){this.setRadioTabindex(t),this.ionValueChange.emit({value:t})}componentDidLoad(){this.valueChanged(this.value)}async connectedCallback(){const t=this.el.querySelector("ion-list-header")||this.el.querySelector("ion-item-divider");if(t){const i=this.label=t.querySelector("ion-label");i&&(this.labelId=i.id=this.name+"-lbl")}o.isBrowser&&"undefined"!=typeof MutationObserver&&(this.validationObserver=new MutationObserver((()=>{const t=l(this.el);this.isInvalid!==t&&(this.isInvalid=t,Promise.resolve().then((()=>{this.hintTextId=this.getHintTextId()})))})),this.validationObserver.observe(this.el,{attributes:!0,attributeFilter:["class"]})),this.isInvalid=l(this.el)}componentWillLoad(){this.hintTextId=this.getHintTextId()}disconnectedCallback(){this.validationObserver&&(this.validationObserver.disconnect(),this.validationObserver=void 0)}getRadios(){return Array.from(this.el.querySelectorAll("ion-radio"))}emitValueChange(t){const{value:i}=this;this.ionChange.emit({value:i,event:t})}onKeydown(t){const i=!!this.el.closest("ion-select-popover")||!!this.el.closest("ion-select-modal");if(t.target&&!this.el.contains(t.target))return;const e=this.getRadios().filter((t=>!t.disabled));if(t.target&&e.includes(t.target)){const o=e.findIndex((i=>i===t.target)),r=e[o];let s;if(["ArrowDown","ArrowRight"].includes(t.key)&&(s=o===e.length-1?e[0]:e[o+1]),["ArrowUp","ArrowLeft"].includes(t.key)&&(s=0===o?e[e.length-1]:e[o-1]),s&&e.includes(s)&&(s.setFocus(t),i||(this.value=s.value,this.emitValueChange(t))),[" "].includes(t.key)){const i=this.value;this.value=this.allowEmptySelection&&void 0!==this.value?void 0:r.value,(i!==this.value||this.allowEmptySelection)&&this.emitValueChange(t),t.preventDefault()}}}async setFocus(){const t=this.getRadios().find((t=>-1!==t.tabIndex));null==t||t.setFocus()}renderHintText(){const{helperText:t,errorText:i,helperTextId:e,errorTextId:o,isInvalid:s}=this;if(t||i)return r("div",{class:"radio-group-top"},r("div",{id:e,class:"helper-text","aria-live":"polite"},s?null:t),r("div",{id:o,class:"error-text",role:"alert"},s?i:null))}getHintTextId(){const{helperText:t,errorText:i,helperTextId:e,errorTextId:o,isInvalid:r}=this;return r&&i?o:t?e:void 0}render(){const{label:t,labelId:i,el:e,name:o,value:n}=this,l=d(this);return a(!0,e,o,n,!1),r(s,{key:"db593b3ed511e9395e3c7bfd91b787328692cd6d",role:"radiogroup","aria-labelledby":t?i:null,"aria-describedby":this.hintTextId,"aria-invalid":this.isInvalid?"true":void 0,onClick:this.onClick,class:l},this.renderHintText(),r("div",{key:"85045b45a0100a45f3b9a35d1c5a25ec63d525c4",class:"radio-group-wrapper"},r("slot",{key:"53dacb87ce62398e78771fb2efaf839ab922d946"})))}get el(){return this}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return{ios:"ion-radio-group{vertical-align:top}.radio-group-wrapper{display:inline}.radio-group-top{line-height:1.5}.radio-group-top .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.radio-group-top .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}.ion-touched.ion-invalid .radio-group-top .error-text{display:block}.ion-touched.ion-invalid .radio-group-top .helper-text{display:none}ion-list .radio-group-top{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}",md:"ion-radio-group{vertical-align:top}.radio-group-wrapper{display:inline}.radio-group-top{line-height:1.5}.radio-group-top .error-text{display:none;color:var(--ion-color-danger, #c5000f)}.radio-group-top .helper-text{display:block;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d))}.ion-touched.ion-invalid .radio-group-top .error-text{display:block}.ion-touched.ion-invalid .radio-group-top .helper-text{display:none}ion-list .radio-group-top{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}"}}},[292,"ion-radio-group",{allowEmptySelection:[4,"allow-empty-selection"],compareWith:[1,"compare-with"],name:[1],value:[1032],helperText:[1,"helper-text"],errorText:[1,"error-text"],isInvalid:[32],hintTextId:[32],setFocus:[64]},[[4,"keydown","onKeydown"]],{value:[{valueChanged:0}]}]);let p=0;function c(){"undefined"!=typeof customElements&&["ion-radio-group"].forEach((t=>{"ion-radio-group"===t&&(customElements.get(n(t))||customElements.define(n(t),h))}))}export{h as R,c as d}
|
package/components/radio.js
CHANGED
|
@@ -1,232 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
|
-
import { a as addEventListener, b as removeEventListener } from './helpers.js';
|
|
6
|
-
import { h as hostContext, c as createColorClasses } from './theme.js';
|
|
7
|
-
import { b as getIonMode } from './ionic-global.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Uses the compareWith param to compare two values to determine if they are equal.
|
|
11
|
-
*
|
|
12
|
-
* @param currentValue The current value of the control.
|
|
13
|
-
* @param compareValue The value to compare against.
|
|
14
|
-
* @param compareWith The function or property name to use to compare values.
|
|
15
|
-
*/
|
|
16
|
-
const compareOptions = (currentValue, compareValue, compareWith) => {
|
|
17
|
-
if (typeof compareWith === 'function') {
|
|
18
|
-
return compareWith(currentValue, compareValue);
|
|
19
|
-
}
|
|
20
|
-
else if (typeof compareWith === 'string') {
|
|
21
|
-
return currentValue[compareWith] === compareValue[compareWith];
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
return Array.isArray(compareValue) ? compareValue.includes(currentValue) : currentValue === compareValue;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Compares a value against the current value(s) to determine if it is selected.
|
|
29
|
-
*
|
|
30
|
-
* @param currentValue The current value of the control.
|
|
31
|
-
* @param compareValue The value to compare against.
|
|
32
|
-
* @param compareWith The function or property name to use to compare values.
|
|
33
|
-
*/
|
|
34
|
-
const isOptionSelected = (currentValue, compareValue, compareWith) => {
|
|
35
|
-
if (currentValue === undefined) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
if (Array.isArray(currentValue)) {
|
|
39
|
-
return currentValue.some((val) => compareOptions(val, compareValue, compareWith));
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
return compareOptions(currentValue, compareValue, compareWith);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const radioIosCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;max-width:100%;min-height:inherit;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2;-webkit-box-sizing:border-box;box-sizing:border-box}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}: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}.radio-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.radio-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.radio-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between) .radio-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.radio-justify-start) .radio-wrapper{-ms-flex-pack:start;justify-content:start}:host(.radio-justify-end) .radio-wrapper{-ms-flex-pack:end;justify-content:end}:host(.radio-alignment-start) .radio-wrapper{-ms-flex-align:start;align-items:start}:host(.radio-alignment-center) .radio-wrapper{-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between),:host(.radio-justify-start),:host(.radio-justify-end),:host(.radio-alignment-start),:host(.radio-alignment-center){display:block}:host(.radio-label-placement-start) .radio-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.radio-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-end) .radio-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.radio-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.radio-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px}:host(.radio-label-placement-stacked) .radio-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.radio-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(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.radio-label-placement-stacked.radio-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.radio-label-placement-stacked.radio-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host{--color-checked:var(--ion-color-primary, #0054e9)}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{-webkit-margin-start:0;margin-inline-start:0}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:0.125rem;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #1a65eb);content:\"\";opacity:0.2}:host(.ion-focused) .radio-icon::after{inset-inline-start:-9px}.native-wrapper .radio-icon{width:0.9375rem;height:1.5rem}";
|
|
47
|
-
|
|
48
|
-
const radioMdCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;max-width:100%;min-height:inherit;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2;-webkit-box-sizing:border-box;box-sizing:border-box}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}: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}.radio-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.radio-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.radio-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between) .radio-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.radio-justify-start) .radio-wrapper{-ms-flex-pack:start;justify-content:start}:host(.radio-justify-end) .radio-wrapper{-ms-flex-pack:end;justify-content:end}:host(.radio-alignment-start) .radio-wrapper{-ms-flex-align:start;align-items:start}:host(.radio-alignment-center) .radio-wrapper{-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between),:host(.radio-justify-start),:host(.radio-justify-end),:host(.radio-alignment-start),:host(.radio-alignment-center){display:block}:host(.radio-label-placement-start) .radio-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.radio-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-end) .radio-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.radio-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.radio-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px}:host(.radio-label-placement-stacked) .radio-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.radio-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(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.radio-label-placement-stacked.radio-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.radio-label-placement-stacked.radio-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host{--color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #0054e9);--border-width:0.125rem;--border-style:solid;--border-radius:50%}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.radio-disabled) .label-text-wrapper{opacity:0.38}:host(.radio-disabled) .native-wrapper{opacity:0.63}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #1a65eb);content:\"\";opacity:0.2}.native-wrapper .radio-icon{width:1.25rem;height:1.25rem}";
|
|
49
|
-
|
|
50
|
-
const Radio = /*@__PURE__*/ proxyCustomElement(class Radio extends HTMLElement {
|
|
51
|
-
constructor(registerHost) {
|
|
52
|
-
super();
|
|
53
|
-
if (registerHost !== false) {
|
|
54
|
-
this.__registerHost();
|
|
55
|
-
}
|
|
56
|
-
this.__attachShadow();
|
|
57
|
-
this.ionFocus = createEvent(this, "ionFocus", 7);
|
|
58
|
-
this.ionBlur = createEvent(this, "ionBlur", 7);
|
|
59
|
-
this.inputId = `ion-rb-${radioButtonIds++}`;
|
|
60
|
-
this.radioGroup = null;
|
|
61
|
-
/**
|
|
62
|
-
* If `true`, the radio is selected.
|
|
63
|
-
*/
|
|
64
|
-
this.checked = false;
|
|
65
|
-
/**
|
|
66
|
-
* The tabindex of the radio button.
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
this.buttonTabindex = -1;
|
|
70
|
-
/**
|
|
71
|
-
* The name of the control, which is submitted with the form data.
|
|
72
|
-
*/
|
|
73
|
-
this.name = this.inputId;
|
|
74
|
-
/**
|
|
75
|
-
* If `true`, the user cannot interact with the radio.
|
|
76
|
-
*/
|
|
77
|
-
this.disabled = false;
|
|
78
|
-
/**
|
|
79
|
-
* Where to place the label relative to the radio.
|
|
80
|
-
* `"start"`: The label will appear to the left of the radio in LTR and to the right in RTL.
|
|
81
|
-
* `"end"`: The label will appear to the right of the radio in LTR and to the left in RTL.
|
|
82
|
-
* `"fixed"`: The label has the same behavior as `"start"` except it also has a fixed width. Long text will be truncated with ellipses ("...").
|
|
83
|
-
* `"stacked"`: The label will appear above the radio regardless of the direction. The alignment of the label can be controlled with the `alignment` property.
|
|
84
|
-
*/
|
|
85
|
-
this.labelPlacement = 'start';
|
|
86
|
-
this.updateState = () => {
|
|
87
|
-
if (this.radioGroup) {
|
|
88
|
-
const { compareWith, value: radioGroupValue } = this.radioGroup;
|
|
89
|
-
this.checked = isOptionSelected(radioGroupValue, this.value, compareWith);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
this.onClick = () => {
|
|
93
|
-
const { radioGroup, checked, disabled } = this;
|
|
94
|
-
if (disabled) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* The modern control does not use a native input
|
|
99
|
-
* inside of the radio host, so we cannot rely on the
|
|
100
|
-
* ev.preventDefault() behavior above. If the radio
|
|
101
|
-
* is checked and the parent radio group allows for empty
|
|
102
|
-
* selection, then we can set the checked state to false.
|
|
103
|
-
* Otherwise, the checked state should always be set
|
|
104
|
-
* to true because the checked state cannot be toggled.
|
|
105
|
-
*/
|
|
106
|
-
if (checked && (radioGroup === null || radioGroup === void 0 ? void 0 : radioGroup.allowEmptySelection)) {
|
|
107
|
-
this.checked = false;
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
this.checked = true;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
this.onFocus = () => {
|
|
114
|
-
this.ionFocus.emit();
|
|
115
|
-
};
|
|
116
|
-
this.onBlur = () => {
|
|
117
|
-
this.ionBlur.emit();
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
valueChanged() {
|
|
121
|
-
/**
|
|
122
|
-
* The new value of the radio may
|
|
123
|
-
* match the radio group's value,
|
|
124
|
-
* so we see if it should be checked.
|
|
125
|
-
*/
|
|
126
|
-
this.updateState();
|
|
127
|
-
}
|
|
128
|
-
componentDidLoad() {
|
|
129
|
-
/**
|
|
130
|
-
* The value may be `undefined` if it
|
|
131
|
-
* gets set before the radio is
|
|
132
|
-
* rendered. This ensures that the radio
|
|
133
|
-
* is checked if the value matches. This
|
|
134
|
-
* happens most often when Angular is
|
|
135
|
-
* rendering the radio.
|
|
136
|
-
*/
|
|
137
|
-
this.updateState();
|
|
138
|
-
}
|
|
139
|
-
/** @internal */
|
|
140
|
-
async setFocus(ev) {
|
|
141
|
-
if (ev !== undefined) {
|
|
142
|
-
ev.stopPropagation();
|
|
143
|
-
ev.preventDefault();
|
|
144
|
-
}
|
|
145
|
-
this.el.focus();
|
|
146
|
-
}
|
|
147
|
-
/** @internal */
|
|
148
|
-
async setButtonTabindex(value) {
|
|
149
|
-
this.buttonTabindex = value;
|
|
150
|
-
}
|
|
151
|
-
connectedCallback() {
|
|
152
|
-
if (this.value === undefined) {
|
|
153
|
-
this.value = this.inputId;
|
|
154
|
-
}
|
|
155
|
-
const radioGroup = (this.radioGroup = this.el.closest('ion-radio-group'));
|
|
156
|
-
if (radioGroup) {
|
|
157
|
-
this.updateState();
|
|
158
|
-
addEventListener(radioGroup, 'ionValueChange', this.updateState);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
disconnectedCallback() {
|
|
162
|
-
const radioGroup = this.radioGroup;
|
|
163
|
-
if (radioGroup) {
|
|
164
|
-
removeEventListener(radioGroup, 'ionValueChange', this.updateState);
|
|
165
|
-
this.radioGroup = null;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
get hasLabel() {
|
|
169
|
-
return this.el.textContent !== '';
|
|
170
|
-
}
|
|
171
|
-
renderRadioControl() {
|
|
172
|
-
return (h("div", { class: "radio-icon", part: "container" }, h("div", { class: "radio-inner", part: "mark" }), h("div", { class: "radio-ripple" })));
|
|
173
|
-
}
|
|
174
|
-
render() {
|
|
175
|
-
const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex, alignment } = this;
|
|
176
|
-
const mode = getIonMode(this);
|
|
177
|
-
const inItem = hostContext('ion-item', el);
|
|
178
|
-
return (h(Host, { key: '3353b28172b7f837d4b38964169b5b5f4ba02788', onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
179
|
-
[mode]: true,
|
|
180
|
-
'in-item': inItem,
|
|
181
|
-
'radio-checked': checked,
|
|
182
|
-
'radio-disabled': disabled,
|
|
183
|
-
[`radio-justify-${justify}`]: justify !== undefined,
|
|
184
|
-
[`radio-alignment-${alignment}`]: alignment !== undefined,
|
|
185
|
-
[`radio-label-placement-${labelPlacement}`]: true,
|
|
186
|
-
// Focus and active styling should not apply when the radio is in an item
|
|
187
|
-
'ion-activatable': !inItem,
|
|
188
|
-
'ion-focusable': !inItem,
|
|
189
|
-
}), role: "radio", "aria-checked": checked ? 'true' : 'false', "aria-disabled": disabled ? 'true' : null, tabindex: buttonTabindex }, h("label", { key: '418a0a48366ff900e97da123abf665bbbda87fb7', class: "radio-wrapper" }, h("div", { key: '6e5acdd8c8f5d0ad26632a65396afef8094153d1', class: {
|
|
190
|
-
'label-text-wrapper': true,
|
|
191
|
-
'label-text-wrapper-hidden': !hasLabel,
|
|
192
|
-
}, part: "label" }, h("slot", { key: '10b157162cd283d624153c747679609cf0bbf11e' })), h("div", { key: '4c45cca95cb105cd6df1025a26e3c045272184a0', class: "native-wrapper" }, this.renderRadioControl()))));
|
|
193
|
-
}
|
|
194
|
-
get el() { return this; }
|
|
195
|
-
static get watchers() { return {
|
|
196
|
-
"value": ["valueChanged"]
|
|
197
|
-
}; }
|
|
198
|
-
static get style() { return {
|
|
199
|
-
ios: radioIosCss,
|
|
200
|
-
md: radioMdCss
|
|
201
|
-
}; }
|
|
202
|
-
}, [289, "ion-radio", {
|
|
203
|
-
"color": [513],
|
|
204
|
-
"name": [1],
|
|
205
|
-
"disabled": [4],
|
|
206
|
-
"value": [8],
|
|
207
|
-
"labelPlacement": [1, "label-placement"],
|
|
208
|
-
"justify": [1],
|
|
209
|
-
"alignment": [1],
|
|
210
|
-
"checked": [32],
|
|
211
|
-
"buttonTabindex": [32],
|
|
212
|
-
"setFocus": [64],
|
|
213
|
-
"setButtonTabindex": [64]
|
|
214
|
-
}, undefined, {
|
|
215
|
-
"value": ["valueChanged"]
|
|
216
|
-
}]);
|
|
217
|
-
let radioButtonIds = 0;
|
|
218
|
-
function defineCustomElement() {
|
|
219
|
-
if (typeof customElements === "undefined") {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
const components = ["ion-radio"];
|
|
223
|
-
components.forEach(tagName => { switch (tagName) {
|
|
224
|
-
case "ion-radio":
|
|
225
|
-
if (!customElements.get(tagName)) {
|
|
226
|
-
customElements.define(tagName, Radio);
|
|
227
|
-
}
|
|
228
|
-
break;
|
|
229
|
-
} });
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export { Radio as R, compareOptions as c, defineCustomElement as d, isOptionSelected as i };
|
|
4
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as r,h as i,Host as a,transformTag as o}from"@stencil/core/internal/client";import{a as n,b as s}from"./helpers.js";import{h as l,c as d}from"./theme.js";import{b as c}from"./ionic-global.js";const p=(e,t,r)=>"function"==typeof r?r(e,t):"string"==typeof r?e[r]===t[r]:Array.isArray(t)?t.includes(e):e===t,m=(e,t,r)=>void 0!==e&&(Array.isArray(e)?e.some((e=>p(e,t,r))):p(e,t,r)),b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.ionFocus=r(this,"ionFocus",7),this.ionBlur=r(this,"ionBlur",7),this.inputId="ion-rb-"+h++,this.radioGroup=null,this.checked=!1,this.buttonTabindex=-1,this.name=this.inputId,this.disabled=!1,this.labelPlacement="start",this.updateState=()=>{if(this.radioGroup){const{compareWith:e,value:t}=this.radioGroup;this.checked=m(t,this.value,e)}},this.onClick=()=>{const{radioGroup:e,checked:t,disabled:r}=this;r||(this.checked=!t||!(null==e?void 0:e.allowEmptySelection))},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()}}valueChanged(){this.updateState()}componentDidLoad(){this.updateState()}async setFocus(e){void 0!==e&&(e.stopPropagation(),e.preventDefault()),this.el.focus()}async setButtonTabindex(e){this.buttonTabindex=e}connectedCallback(){void 0===this.value&&(this.value=this.inputId);const e=this.radioGroup=this.el.closest("ion-radio-group");e&&(this.updateState(),n(e,"ionValueChange",this.updateState))}disconnectedCallback(){const e=this.radioGroup;e&&(s(e,"ionValueChange",this.updateState),this.radioGroup=null)}get hasLabel(){return""!==this.el.textContent}renderRadioControl(){return i("div",{class:"radio-icon",part:"container"},i("div",{class:"radio-inner",part:"mark"}),i("div",{class:"radio-ripple"}))}render(){const{checked:e,disabled:t,color:r,el:o,justify:n,labelPlacement:s,hasLabel:p,buttonTabindex:m,alignment:b}=this,h=c(this),x=l("ion-item",o);return i(a,{key:"3353b28172b7f837d4b38964169b5b5f4ba02788",onFocus:this.onFocus,onBlur:this.onBlur,onClick:this.onClick,class:d(r,{[h]:!0,"in-item":x,"radio-checked":e,"radio-disabled":t,[`radio-justify-${n}`]:void 0!==n,[`radio-alignment-${b}`]:void 0!==b,[`radio-label-placement-${s}`]:!0,"ion-activatable":!x,"ion-focusable":!x}),role:"radio","aria-checked":e?"true":"false","aria-disabled":t?"true":null,tabindex:m},i("label",{key:"418a0a48366ff900e97da123abf665bbbda87fb7",class:"radio-wrapper"},i("div",{key:"6e5acdd8c8f5d0ad26632a65396afef8094153d1",class:{"label-text-wrapper":!0,"label-text-wrapper-hidden":!p},part:"label"},i("slot",{key:"10b157162cd283d624153c747679609cf0bbf11e"})),i("div",{key:"4c45cca95cb105cd6df1025a26e3c045272184a0",class:"native-wrapper"},this.renderRadioControl())))}get el(){return this}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return{ios:':host{--inner-border-radius:50%;display:inline-block;position:relative;max-width:100%;min-height:inherit;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2;-webkit-box-sizing:border-box;box-sizing:border-box}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}: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}.radio-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.radio-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.radio-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between) .radio-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.radio-justify-start) .radio-wrapper{-ms-flex-pack:start;justify-content:start}:host(.radio-justify-end) .radio-wrapper{-ms-flex-pack:end;justify-content:end}:host(.radio-alignment-start) .radio-wrapper{-ms-flex-align:start;align-items:start}:host(.radio-alignment-center) .radio-wrapper{-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between),:host(.radio-justify-start),:host(.radio-justify-end),:host(.radio-alignment-start),:host(.radio-alignment-center){display:block}:host(.radio-label-placement-start) .radio-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.radio-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-end) .radio-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.radio-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.radio-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px}:host(.radio-label-placement-stacked) .radio-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.radio-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(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.radio-label-placement-stacked.radio-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.radio-label-placement-stacked.radio-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host{--color-checked:var(--ion-color-primary, #0054e9)}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{-webkit-margin-start:0;margin-inline-start:0}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:0.125rem;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #1a65eb);content:"";opacity:0.2}:host(.ion-focused) .radio-icon::after{inset-inline-start:-9px}.native-wrapper .radio-icon{width:0.9375rem;height:1.5rem}',md:':host{--inner-border-radius:50%;display:inline-block;position:relative;max-width:100%;min-height:inherit;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2;-webkit-box-sizing:border-box;box-sizing:border-box}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}: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}.radio-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.radio-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.radio-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between) .radio-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.radio-justify-start) .radio-wrapper{-ms-flex-pack:start;justify-content:start}:host(.radio-justify-end) .radio-wrapper{-ms-flex-pack:end;justify-content:end}:host(.radio-alignment-start) .radio-wrapper{-ms-flex-align:start;align-items:start}:host(.radio-alignment-center) .radio-wrapper{-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between),:host(.radio-justify-start),:host(.radio-justify-end),:host(.radio-alignment-start),:host(.radio-alignment-center){display:block}:host(.radio-label-placement-start) .radio-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.radio-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-end) .radio-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.radio-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.radio-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px}:host(.radio-label-placement-stacked) .radio-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.radio-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(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.radio-label-placement-stacked.radio-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).radio-label-placement-stacked.radio-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.radio-label-placement-stacked.radio-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host{--color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #0054e9);--border-width:0.125rem;--border-style:solid;--border-radius:50%}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.radio-disabled) .label-text-wrapper{opacity:0.38}:host(.radio-disabled) .native-wrapper{opacity:0.63}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #1a65eb);content:"";opacity:0.2}.native-wrapper .radio-icon{width:1.25rem;height:1.25rem}'}}},[289,"ion-radio",{color:[513],name:[1],disabled:[4],value:[8],labelPlacement:[1,"label-placement"],justify:[1],alignment:[1],checked:[32],buttonTabindex:[32],setFocus:[64],setButtonTabindex:[64]},void 0,{value:[{valueChanged:0}]}]);let h=0;function x(){"undefined"!=typeof customElements&&["ion-radio"].forEach((e=>{"ion-radio"===e&&(customElements.get(o(e))||customElements.define(o(e),b))}))}export{b as R,p as c,x as d,m as i}
|