@nanahoshi/mona-ui 0.27.1 → 0.28.0
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/docs/api/auto-complete.md +67 -0
- package/docs/api/avatar.md +31 -0
- package/docs/api/breadcrumb.md +74 -0
- package/docs/api/button-group.md +71 -0
- package/docs/api/button.md +84 -0
- package/docs/api/calendar.md +123 -0
- package/docs/api/card.md +97 -0
- package/docs/api/chart.md +4380 -0
- package/docs/api/check-box.md +70 -0
- package/docs/api/chip.md +55 -0
- package/docs/api/circular-progress-bar.md +71 -0
- package/docs/api/collapsible.md +71 -0
- package/docs/api/color-gradient.md +54 -0
- package/docs/api/color-palette.md +52 -0
- package/docs/api/color-picker.md +89 -0
- package/docs/api/combo-box.md +69 -0
- package/docs/api/command.md +282 -0
- package/docs/api/common.md +599 -0
- package/docs/api/contextmenu.md +239 -0
- package/docs/api/date-input.md +119 -0
- package/docs/api/date-picker.md +67 -0
- package/docs/api/datetime-picker.md +72 -0
- package/docs/api/dialog.md +291 -0
- package/docs/api/dropdown-button.md +248 -0
- package/docs/api/dropdown-list.md +72 -0
- package/docs/api/dropdowns.md +172 -0
- package/docs/api/editor.md +117 -0
- package/docs/api/expansion-panel.md +85 -0
- package/docs/api/fieldset.md +33 -0
- package/docs/api/filter.md +116 -0
- package/docs/api/grid.md +1445 -0
- package/docs/api/i18n.md +1699 -0
- package/docs/api/label.md +58 -0
- package/docs/api/list-box.md +301 -0
- package/docs/api/list-view.md +294 -0
- package/docs/api/list.md +119 -0
- package/docs/api/locales.md +134 -0
- package/docs/api/menubar.md +275 -0
- package/docs/api/multi-select.md +92 -0
- package/docs/api/notification.md +164 -0
- package/docs/api/numeric-text-box.md +130 -0
- package/docs/api/otp-input.md +100 -0
- package/docs/api/pager.md +371 -0
- package/docs/api/placeholder.md +18 -0
- package/docs/api/popover.md +170 -0
- package/docs/api/popup-menu.md +328 -0
- package/docs/api/popup.md +299 -0
- package/docs/api/progress-bar.md +79 -0
- package/docs/api/query.md +367 -0
- package/docs/api/radio-button.md +113 -0
- package/docs/api/rating.md +187 -0
- package/docs/api/scroll-view.md +93 -0
- package/docs/api/segmented.md +114 -0
- package/docs/api/sheet.md +65 -0
- package/docs/api/sidebar.md +583 -0
- package/docs/api/skeleton.md +26 -0
- package/docs/api/slider.md +173 -0
- package/docs/api/spinner.md +132 -0
- package/docs/api/split-button.md +261 -0
- package/docs/api/splitter.md +57 -0
- package/docs/api/stepper.md +148 -0
- package/docs/api/switch.md +78 -0
- package/docs/api/tabs.md +139 -0
- package/docs/api/text-area.md +20 -0
- package/docs/api/text-box.md +106 -0
- package/docs/api/theme.md +627 -0
- package/docs/api/time-picker.md +69 -0
- package/docs/api/time-selector.md +54 -0
- package/docs/api/tooltip.md +112 -0
- package/docs/api/tree-view.md +631 -0
- package/docs/api/window.md +245 -0
- package/docs/auto-complete.md +28 -329
- package/docs/avatar.md +4 -24
- package/docs/breadcrumb.md +10 -65
- package/docs/button-group.md +7 -60
- package/docs/button.md +8 -67
- package/docs/calendar.md +16 -121
- package/docs/card.md +16 -79
- package/docs/chart-bar.md +16 -234
- package/docs/chart-financial.md +10 -121
- package/docs/chart-funnel.md +13 -176
- package/docs/chart-heatmap.md +15 -131
- package/docs/chart-line-area.md +12 -137
- package/docs/chart-pie.md +17 -221
- package/docs/chart-radar.md +13 -129
- package/docs/chart-radial.md +13 -211
- package/docs/chart-scatter.md +6 -74
- package/docs/chart-treemap.md +14 -196
- package/docs/chart.md +168 -1892
- package/docs/checkbox.md +5 -61
- package/docs/chip.md +7 -42
- package/docs/circular-progress-bar.md +9 -61
- package/docs/collapsible.md +5 -87
- package/docs/color-gradient.md +8 -81
- package/docs/color-palette.md +7 -69
- package/docs/color-picker.md +9 -105
- package/docs/combo-box.md +28 -331
- package/docs/command.md +25 -236
- package/docs/contextmenu.md +15 -140
- package/docs/date-picker.md +7 -110
- package/docs/datetime-picker.md +7 -129
- package/docs/decimal-textbox.md +6 -69
- package/docs/dialog.md +23 -263
- package/docs/dropdown-button.md +15 -146
- package/docs/dropdown-list.md +29 -332
- package/docs/editor.md +10 -164
- package/docs/expansion-panel.md +7 -69
- package/docs/fieldset.md +5 -24
- package/docs/grid-columns.md +12 -92
- package/docs/grid-editing.md +29 -291
- package/docs/grid-grouping.md +11 -50
- package/docs/grid-rows.md +10 -74
- package/docs/grid-selection.md +7 -36
- package/docs/grid-server.md +8 -293
- package/docs/grid-sorting-filtering.md +10 -333
- package/docs/grid-state-export.md +17 -228
- package/docs/grid.md +23 -216
- package/docs/input.md +7 -19
- package/docs/installation.md +147 -15
- package/docs/introduction.md +37 -15
- package/docs/label.md +8 -39
- package/docs/list-box.md +21 -253
- package/docs/list-view.md +25 -232
- package/docs/menubar.md +21 -167
- package/docs/multi-select.md +31 -350
- package/docs/notification.md +17 -116
- package/docs/numeric-textbox.md +9 -78
- package/docs/otp-input.md +9 -95
- package/docs/pager.md +19 -239
- package/docs/placeholder.md +5 -18
- package/docs/popover.md +13 -123
- package/docs/popup-menu.md +22 -243
- package/docs/popup.md +24 -248
- package/docs/progress-bar.md +10 -75
- package/docs/radio-button.md +8 -96
- package/docs/range-slider.md +9 -82
- package/docs/rating.md +15 -163
- package/docs/scroll-view.md +9 -86
- package/docs/segmented.md +8 -90
- package/docs/sheet.md +10 -74
- package/docs/sidebar-menus.md +20 -155
- package/docs/sidebar-state.md +16 -134
- package/docs/sidebar.md +18 -218
- package/docs/skeleton.md +5 -26
- package/docs/slider.md +9 -97
- package/docs/spinner.md +15 -95
- package/docs/split-button.md +21 -166
- package/docs/splitter.md +9 -56
- package/docs/stepper.md +13 -127
- package/docs/switch.md +8 -58
- package/docs/tabs.md +13 -111
- package/docs/textarea.md +4 -13
- package/docs/textbox.md +10 -77
- package/docs/theming-built-in-themes.md +67 -0
- package/docs/theming-custom-colors.md +274 -0
- package/docs/theming-custom-themes.md +168 -0
- package/docs/theming.md +164 -248
- package/docs/time-picker.md +7 -112
- package/docs/tooltip-directive.md +12 -96
- package/docs/tooltip.md +12 -96
- package/docs/tree-view.md +42 -495
- package/docs/window.md +19 -230
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
- package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
- package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -389
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
- package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
- package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -740
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -254
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -729
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
- package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5068
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
- package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
- package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
- package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
- package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
- package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
- package/llms.txt +80 -2
- package/package.json +62 -23
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
- package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
- package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
- package/types/nanahoshi-mona-ui-button.d.ts +227 -166
- package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
- package/types/nanahoshi-mona-ui-card.d.ts +125 -111
- package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
- package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
- package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
- package/types/nanahoshi-mona-ui-collapsible.d.ts +105 -87
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
- package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
- package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
- package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
- package/types/nanahoshi-mona-ui-command.d.ts +279 -191
- package/types/nanahoshi-mona-ui-common.d.ts +360 -385
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
- package/types/nanahoshi-mona-ui-date-input.d.ts +97 -97
- package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
- package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +255 -235
- package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
- package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
- package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
- package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
- package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
- package/types/nanahoshi-mona-ui-i18n.d.ts +999 -1052
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
- package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
- package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
- package/types/nanahoshi-mona-ui-label.d.ts +108 -78
- package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
- package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
- package/types/nanahoshi-mona-ui-list.d.ts +2 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
- package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
- package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
- package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
- package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
- package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
- package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
- package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
- package/types/nanahoshi-mona-ui-query.d.ts +82 -88
- package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
- package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
- package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
- package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
- package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
- package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
- package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
- package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
- package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
- package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
- package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
- package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
- package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
- package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
- package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
- package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
- package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
- package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
- package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
- package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
- package/types/nanahoshi-mona-ui-window.d.ts +494 -399
- package/types/nanahoshi-mona-ui.d.ts +1 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { FormsModule } from
|
|
5
|
-
import { twMerge } from
|
|
6
|
-
import { cva } from
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Component, Directive, ElementRef, InjectionToken, afterNextRender, afterRenderEffect, booleanAttribute, computed, inject, input, isDevMode, model, output, signal, viewChild } from "@angular/core";
|
|
4
|
+
import { FormsModule } from "@angular/forms";
|
|
5
|
+
import { twMerge } from "tailwind-merge";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
import { createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
9
8
|
const radioGroupThemeVariants = cva("flex", {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
orientation: "vertical"
|
|
18
|
-
}
|
|
9
|
+
variants: { orientation: {
|
|
10
|
+
horizontal: "flex-row flex-wrap gap-4",
|
|
11
|
+
vertical: "flex-col gap-2"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { orientation: "vertical" }
|
|
19
14
|
});
|
|
20
15
|
const radioButtonThemeVariants = cva(`
|
|
21
16
|
peer sr-only appearance-none outline-none focus-visible:outline-hidden
|
|
@@ -38,33 +33,25 @@ const radioButtonCircleThemeVariants = cva(`
|
|
|
38
33
|
data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
|
|
39
34
|
data-[invalid='true']:peer-focus-visible:border-error
|
|
40
35
|
data-[invalid='true']:peer-focus-visible:ring-error/35
|
|
41
|
-
`, {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
small: "rounded-sm"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
36
|
+
`, { variants: { rounded: {
|
|
37
|
+
full: "rounded-full",
|
|
38
|
+
large: "rounded-lg",
|
|
39
|
+
medium: "rounded-md",
|
|
40
|
+
none: "rounded-none",
|
|
41
|
+
small: "rounded-sm"
|
|
42
|
+
} } });
|
|
52
43
|
const radioButtonIndicatorThemeVariants = cva(`
|
|
53
44
|
flex h-3 w-3
|
|
54
45
|
bg-[var(--mona-indicator-color,var(--color-primary))]
|
|
55
46
|
forced-color-adjust-none forced-colors:bg-[Highlight]
|
|
56
47
|
transition-all duration-(--mona-motion-fast)
|
|
57
|
-
`, {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
small: "rounded-sm"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
});
|
|
48
|
+
`, { variants: { rounded: {
|
|
49
|
+
full: "rounded-full",
|
|
50
|
+
large: "rounded-lg",
|
|
51
|
+
medium: "rounded-md",
|
|
52
|
+
none: "rounded-none",
|
|
53
|
+
small: "rounded-sm"
|
|
54
|
+
} } });
|
|
68
55
|
const radioButtonContainerLabelThemeVariants = cva(`
|
|
69
56
|
relative flex h-full w-full items-center justify-center gap-1
|
|
70
57
|
cursor-pointer
|
|
@@ -75,16 +62,12 @@ const radioButtonContainerLabelThemeVariants = cva(`
|
|
|
75
62
|
data-[readonly='true']:cursor-default
|
|
76
63
|
[&[data-readonly='true']>*]:cursor-default
|
|
77
64
|
`, {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
defaultVariants: {
|
|
86
|
-
labelSize: "medium"
|
|
87
|
-
}
|
|
65
|
+
variants: { labelSize: {
|
|
66
|
+
small: "text-sm",
|
|
67
|
+
medium: "text-base",
|
|
68
|
+
large: "text-lg"
|
|
69
|
+
} },
|
|
70
|
+
defaultVariants: { labelSize: "medium" }
|
|
88
71
|
});
|
|
89
72
|
const radioButtonDirectiveThemeVariants = cva(`
|
|
90
73
|
relative flex h-4.5 w-4.5 items-center justify-center place-content-center
|
|
@@ -112,505 +95,991 @@ const radioButtonDirectiveThemeVariants = cva(`
|
|
|
112
95
|
data-[invalid='true']:focus-visible:border-error
|
|
113
96
|
data-[invalid='true']:focus-visible:ring-error/35
|
|
114
97
|
`, {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
]
|
|
98
|
+
variants: { rounded: {
|
|
99
|
+
full: "rounded-full",
|
|
100
|
+
large: "rounded-lg",
|
|
101
|
+
medium: "rounded-md",
|
|
102
|
+
none: "rounded-none",
|
|
103
|
+
small: "rounded-sm"
|
|
104
|
+
} },
|
|
105
|
+
compoundVariants: [
|
|
106
|
+
{
|
|
107
|
+
rounded: "full",
|
|
108
|
+
class: "checked:after:rounded-full"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
rounded: "large",
|
|
112
|
+
class: "checked:after:rounded-lg"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
rounded: "medium",
|
|
116
|
+
class: "checked:after:rounded-md"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
rounded: "none",
|
|
120
|
+
class: "checked:after:rounded-none"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
rounded: "small",
|
|
124
|
+
class: "checked:after:rounded-sm"
|
|
125
|
+
}
|
|
126
|
+
]
|
|
146
127
|
});
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Provided by `mona-radio-group` to the radio buttons inside it.
|
|
150
|
-
*/
|
|
151
128
|
const MONA_RADIO_GROUP = new InjectionToken("MONA_RADIO_GROUP");
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
129
|
+
var RadioButtonComponent = class RadioButtonComponent {
|
|
130
|
+
#group;
|
|
131
|
+
#label;
|
|
132
|
+
constructor() {
|
|
133
|
+
this.#group = inject(MONA_RADIO_GROUP, { optional: true });
|
|
134
|
+
this.#label = injectLabelAssociation({
|
|
135
|
+
ariaLabel: () => this.ariaLabel(),
|
|
136
|
+
ariaLabelledBy: () => this.ariaLabelledBy(),
|
|
137
|
+
wrapped: false
|
|
138
|
+
});
|
|
139
|
+
this.containerLabelClasses = computed(() => {
|
|
140
|
+
const labelSize = this.labelSize();
|
|
141
|
+
const userClasses = this.userClass();
|
|
142
|
+
const variantClasses = radioButtonContainerLabelThemeVariants({ labelSize });
|
|
143
|
+
return twMerge(variantClasses, userClasses);
|
|
144
|
+
}, ...ngDevMode ? [{ debugName: "containerLabelClasses" }] : /* istanbul ignore next */ []);
|
|
145
|
+
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled() || (this.#group?.disabled() ?? false));
|
|
146
|
+
this.effectiveName = computed(() => this.#group?.name() ?? this.name(), ...ngDevMode ? [{ debugName: "effectiveName" }] : /* istanbul ignore next */ []);
|
|
147
|
+
this.effectiveReadonly = computed(() => this.readonly() || (this.#group?.readonly() ?? false), ...ngDevMode ? [{ debugName: "effectiveReadonly" }] : /* istanbul ignore next */ []);
|
|
148
|
+
this.effectiveRequired = computed(() => this.required() || (this.#group?.required() ?? false), ...ngDevMode ? [{ debugName: "effectiveRequired" }] : /* istanbul ignore next */ []);
|
|
149
|
+
this.inputInvalid = computed(() => !this.#group && this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "inputInvalid" }] : /* istanbul ignore next */ []);
|
|
150
|
+
this.inputRef = viewChild.required("input", ...ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []);
|
|
151
|
+
this.invalidState = computed(() => this.#group?.invalid() ?? (this.touched() && this.invalid()), ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
|
|
152
|
+
this.labelledBy = this.#label.labelledBy;
|
|
153
|
+
this.nativeValue = computed(() => {
|
|
154
|
+
const radioValue = this.radioValue();
|
|
155
|
+
return typeof radioValue === "object" ? null : radioValue;
|
|
156
|
+
}, ...ngDevMode ? [{ debugName: "nativeValue" }] : /* istanbul ignore next */ []);
|
|
157
|
+
this.radioButtonCircleClasses = computed(() => {
|
|
158
|
+
const rounded = this.rounded();
|
|
159
|
+
return radioButtonCircleThemeVariants({ rounded });
|
|
160
|
+
}, ...ngDevMode ? [{ debugName: "radioButtonCircleClasses" }] : /* istanbul ignore next */ []);
|
|
161
|
+
this.radioButtonClasses = computed(() => radioButtonThemeVariants(), ...ngDevMode ? [{ debugName: "radioButtonClasses" }] : /* istanbul ignore next */ []);
|
|
162
|
+
this.radioButtonIndicatorClasses = computed(() => {
|
|
163
|
+
const rounded = this.rounded();
|
|
164
|
+
return radioButtonIndicatorThemeVariants({ rounded });
|
|
165
|
+
}, ...ngDevMode ? [{ debugName: "radioButtonIndicatorClasses" }] : /* istanbul ignore next */ []);
|
|
166
|
+
this.selected = computed(() => {
|
|
167
|
+
const radioValue = this.radioValue();
|
|
168
|
+
return radioValue !== void 0 && radioValue === (this.#group ? this.#group.value() : this.value());
|
|
169
|
+
}, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
170
|
+
this.ariaDescribedBy = input("", {
|
|
171
|
+
...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
|
|
172
|
+
alias: "aria-describedby"
|
|
173
|
+
});
|
|
174
|
+
this.ariaLabel = input("", {
|
|
175
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
176
|
+
alias: "aria-label"
|
|
177
|
+
});
|
|
178
|
+
this.ariaLabelledBy = input("", {
|
|
179
|
+
...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
|
|
180
|
+
alias: "aria-labelledby"
|
|
181
|
+
});
|
|
182
|
+
this.disabled = input(false, {
|
|
183
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
184
|
+
transform: booleanAttribute
|
|
185
|
+
});
|
|
186
|
+
this.inputBlur = output();
|
|
187
|
+
this.inputClick = output();
|
|
188
|
+
this.inputFocus = output();
|
|
189
|
+
this.inputId = input(createElementControlId(), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
190
|
+
this.invalid = input(false, {
|
|
191
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
192
|
+
transform: booleanAttribute
|
|
193
|
+
});
|
|
194
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
195
|
+
this.labelPosition = input("after", ...ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []);
|
|
196
|
+
this.labelSize = input("medium", ...ngDevMode ? [{ debugName: "labelSize" }] : /* istanbul ignore next */ []);
|
|
197
|
+
this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
198
|
+
this.radioValue = input(void 0, ...ngDevMode ? [{ debugName: "radioValue" }] : /* istanbul ignore next */ []);
|
|
199
|
+
this.readonly = input(false, {
|
|
200
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
201
|
+
transform: booleanAttribute
|
|
202
|
+
});
|
|
203
|
+
this.required = input(false, {
|
|
204
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
205
|
+
transform: booleanAttribute
|
|
206
|
+
});
|
|
207
|
+
this.rounded = input("full", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
|
|
208
|
+
this.touch = output();
|
|
209
|
+
this.touched = input(false, {
|
|
210
|
+
...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
|
|
211
|
+
transform: booleanAttribute
|
|
212
|
+
});
|
|
213
|
+
this.userClass = input("", {
|
|
214
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
215
|
+
alias: "class"
|
|
216
|
+
});
|
|
217
|
+
this.value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
218
|
+
const group = this.#group;
|
|
219
|
+
if (group) afterRenderEffect({ write: () => {
|
|
220
|
+
group.selectionVersion();
|
|
221
|
+
this.inputRef().nativeElement.checked = this.selected();
|
|
222
|
+
} });
|
|
223
|
+
}
|
|
224
|
+
activateFromLabel() {
|
|
225
|
+
const input = this.inputRef().nativeElement;
|
|
226
|
+
input.focus();
|
|
227
|
+
input.click();
|
|
228
|
+
}
|
|
229
|
+
focus(options) {
|
|
230
|
+
this.inputRef().nativeElement.focus(options);
|
|
231
|
+
}
|
|
232
|
+
setLabelledBy(id) {
|
|
233
|
+
this.#label.setLabelledBy(id);
|
|
234
|
+
}
|
|
235
|
+
onBlur(event) {
|
|
236
|
+
this.inputBlur.emit(event);
|
|
237
|
+
this.touch.emit();
|
|
238
|
+
}
|
|
239
|
+
onInputClick(event) {
|
|
240
|
+
if (this.effectiveReadonly()) event.preventDefault();
|
|
241
|
+
this.inputClick.emit(event);
|
|
242
|
+
}
|
|
243
|
+
onSelectionChange() {
|
|
244
|
+
if (this.#group) {
|
|
245
|
+
this.#group.select(this.radioValue());
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
this.value.set(this.radioValue());
|
|
249
|
+
this.touch.emit();
|
|
250
|
+
}
|
|
251
|
+
static {
|
|
252
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
253
|
+
minVersion: "12.0.0",
|
|
254
|
+
version: "22.2.6",
|
|
255
|
+
ngImport: i0,
|
|
256
|
+
type: RadioButtonComponent,
|
|
257
|
+
deps: [],
|
|
258
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
static {
|
|
262
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
263
|
+
minVersion: "17.0.0",
|
|
264
|
+
version: "22.2.6",
|
|
265
|
+
type: RadioButtonComponent,
|
|
266
|
+
isStandalone: true,
|
|
267
|
+
selector: "mona-radio-button",
|
|
268
|
+
inputs: {
|
|
269
|
+
ariaDescribedBy: {
|
|
270
|
+
classPropertyName: "ariaDescribedBy",
|
|
271
|
+
publicName: "aria-describedby",
|
|
272
|
+
isSignal: true,
|
|
273
|
+
isRequired: false,
|
|
274
|
+
transformFunction: null
|
|
275
|
+
},
|
|
276
|
+
ariaLabel: {
|
|
277
|
+
classPropertyName: "ariaLabel",
|
|
278
|
+
publicName: "aria-label",
|
|
279
|
+
isSignal: true,
|
|
280
|
+
isRequired: false,
|
|
281
|
+
transformFunction: null
|
|
282
|
+
},
|
|
283
|
+
ariaLabelledBy: {
|
|
284
|
+
classPropertyName: "ariaLabelledBy",
|
|
285
|
+
publicName: "aria-labelledby",
|
|
286
|
+
isSignal: true,
|
|
287
|
+
isRequired: false,
|
|
288
|
+
transformFunction: null
|
|
289
|
+
},
|
|
290
|
+
disabled: {
|
|
291
|
+
classPropertyName: "disabled",
|
|
292
|
+
publicName: "disabled",
|
|
293
|
+
isSignal: true,
|
|
294
|
+
isRequired: false,
|
|
295
|
+
transformFunction: null
|
|
296
|
+
},
|
|
297
|
+
inputId: {
|
|
298
|
+
classPropertyName: "inputId",
|
|
299
|
+
publicName: "inputId",
|
|
300
|
+
isSignal: true,
|
|
301
|
+
isRequired: false,
|
|
302
|
+
transformFunction: null
|
|
303
|
+
},
|
|
304
|
+
invalid: {
|
|
305
|
+
classPropertyName: "invalid",
|
|
306
|
+
publicName: "invalid",
|
|
307
|
+
isSignal: true,
|
|
308
|
+
isRequired: false,
|
|
309
|
+
transformFunction: null
|
|
310
|
+
},
|
|
311
|
+
label: {
|
|
312
|
+
classPropertyName: "label",
|
|
313
|
+
publicName: "label",
|
|
314
|
+
isSignal: true,
|
|
315
|
+
isRequired: false,
|
|
316
|
+
transformFunction: null
|
|
317
|
+
},
|
|
318
|
+
labelPosition: {
|
|
319
|
+
classPropertyName: "labelPosition",
|
|
320
|
+
publicName: "labelPosition",
|
|
321
|
+
isSignal: true,
|
|
322
|
+
isRequired: false,
|
|
323
|
+
transformFunction: null
|
|
324
|
+
},
|
|
325
|
+
labelSize: {
|
|
326
|
+
classPropertyName: "labelSize",
|
|
327
|
+
publicName: "labelSize",
|
|
328
|
+
isSignal: true,
|
|
329
|
+
isRequired: false,
|
|
330
|
+
transformFunction: null
|
|
331
|
+
},
|
|
332
|
+
name: {
|
|
333
|
+
classPropertyName: "name",
|
|
334
|
+
publicName: "name",
|
|
335
|
+
isSignal: true,
|
|
336
|
+
isRequired: false,
|
|
337
|
+
transformFunction: null
|
|
338
|
+
},
|
|
339
|
+
radioValue: {
|
|
340
|
+
classPropertyName: "radioValue",
|
|
341
|
+
publicName: "radioValue",
|
|
342
|
+
isSignal: true,
|
|
343
|
+
isRequired: false,
|
|
344
|
+
transformFunction: null
|
|
345
|
+
},
|
|
346
|
+
readonly: {
|
|
347
|
+
classPropertyName: "readonly",
|
|
348
|
+
publicName: "readonly",
|
|
349
|
+
isSignal: true,
|
|
350
|
+
isRequired: false,
|
|
351
|
+
transformFunction: null
|
|
352
|
+
},
|
|
353
|
+
required: {
|
|
354
|
+
classPropertyName: "required",
|
|
355
|
+
publicName: "required",
|
|
356
|
+
isSignal: true,
|
|
357
|
+
isRequired: false,
|
|
358
|
+
transformFunction: null
|
|
359
|
+
},
|
|
360
|
+
rounded: {
|
|
361
|
+
classPropertyName: "rounded",
|
|
362
|
+
publicName: "rounded",
|
|
363
|
+
isSignal: true,
|
|
364
|
+
isRequired: false,
|
|
365
|
+
transformFunction: null
|
|
366
|
+
},
|
|
367
|
+
touched: {
|
|
368
|
+
classPropertyName: "touched",
|
|
369
|
+
publicName: "touched",
|
|
370
|
+
isSignal: true,
|
|
371
|
+
isRequired: false,
|
|
372
|
+
transformFunction: null
|
|
373
|
+
},
|
|
374
|
+
userClass: {
|
|
375
|
+
classPropertyName: "userClass",
|
|
376
|
+
publicName: "class",
|
|
377
|
+
isSignal: true,
|
|
378
|
+
isRequired: false,
|
|
379
|
+
transformFunction: null
|
|
380
|
+
},
|
|
381
|
+
value: {
|
|
382
|
+
classPropertyName: "value",
|
|
383
|
+
publicName: "value",
|
|
384
|
+
isSignal: true,
|
|
385
|
+
isRequired: false,
|
|
386
|
+
transformFunction: null
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
outputs: {
|
|
390
|
+
inputBlur: "inputBlur",
|
|
391
|
+
inputClick: "inputClick",
|
|
392
|
+
inputFocus: "inputFocus",
|
|
393
|
+
touch: "touch",
|
|
394
|
+
value: "valueChange"
|
|
395
|
+
},
|
|
396
|
+
host: { properties: {
|
|
397
|
+
"attr.aria-describedby": "null",
|
|
398
|
+
"attr.aria-label": "null",
|
|
399
|
+
"attr.aria-labelledby": "null",
|
|
400
|
+
"attr.data-readonly": "effectiveReadonly() || null",
|
|
401
|
+
"attr.data-selected": "selected()",
|
|
402
|
+
"attr.data-disabled": "effectiveDisabled()"
|
|
403
|
+
} },
|
|
404
|
+
viewQueries: [{
|
|
405
|
+
propertyName: "inputRef",
|
|
406
|
+
first: true,
|
|
407
|
+
predicate: ["input"],
|
|
408
|
+
descendants: true,
|
|
409
|
+
isSignal: true
|
|
410
|
+
}],
|
|
411
|
+
ngImport: i0,
|
|
412
|
+
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n (blur)=\"onBlur($event)\"\n (click)=\"onInputClick($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (change)=\"onSelectionChange()\" />\n <span [class]=\"radioButtonCircleClasses()\" [attr.data-invalid]=\"invalidState() || null\">\n @if (selected()) {\n <span [class]=\"radioButtonIndicatorClasses()\"></span>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n",
|
|
413
|
+
dependencies: [{
|
|
414
|
+
kind: "ngmodule",
|
|
415
|
+
type: FormsModule
|
|
416
|
+
}, {
|
|
417
|
+
kind: "directive",
|
|
418
|
+
type: NgTemplateOutlet,
|
|
419
|
+
selector: "[ngTemplateOutlet]",
|
|
420
|
+
inputs: [
|
|
421
|
+
"ngTemplateOutletContext",
|
|
422
|
+
"ngTemplateOutlet",
|
|
423
|
+
"ngTemplateOutletInjector"
|
|
424
|
+
]
|
|
425
|
+
}]
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
430
|
+
minVersion: "12.0.0",
|
|
431
|
+
version: "22.2.6",
|
|
432
|
+
ngImport: i0,
|
|
433
|
+
type: RadioButtonComponent,
|
|
434
|
+
decorators: [{
|
|
435
|
+
type: Component,
|
|
436
|
+
args: [{
|
|
437
|
+
selector: "mona-radio-button",
|
|
438
|
+
imports: [FormsModule, NgTemplateOutlet],
|
|
439
|
+
host: {
|
|
440
|
+
"[attr.aria-describedby]": "null",
|
|
441
|
+
"[attr.aria-label]": "null",
|
|
442
|
+
"[attr.aria-labelledby]": "null",
|
|
443
|
+
"[attr.data-readonly]": "effectiveReadonly() || null",
|
|
444
|
+
"[attr.data-selected]": "selected()",
|
|
445
|
+
"[attr.data-disabled]": "effectiveDisabled()"
|
|
446
|
+
},
|
|
447
|
+
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"effectiveReadonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n <input\n #input\n type=\"radio\"\n [id]=\"inputId()\"\n [required]=\"effectiveRequired()\"\n [disabled]=\"effectiveDisabled()\"\n [name]=\"effectiveName()\"\n [attr.value]=\"nativeValue()\"\n [class]=\"radioButtonClasses()\"\n [checked]=\"selected()\"\n [attr.aria-invalid]=\"inputInvalid() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n (blur)=\"onBlur($event)\"\n (click)=\"onInputClick($event)\"\n (focus)=\"inputFocus.emit($event)\"\n (change)=\"onSelectionChange()\" />\n <span [class]=\"radioButtonCircleClasses()\" [attr.data-invalid]=\"invalidState() || null\">\n @if (selected()) {\n <span [class]=\"radioButtonIndicatorClasses()\"></span>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n"
|
|
448
|
+
}]
|
|
449
|
+
}],
|
|
450
|
+
ctorParameters: () => [],
|
|
451
|
+
propDecorators: {
|
|
452
|
+
inputRef: [{
|
|
453
|
+
type: i0.ViewChild,
|
|
454
|
+
args: ["input", { isSignal: true }]
|
|
455
|
+
}],
|
|
456
|
+
ariaDescribedBy: [{
|
|
457
|
+
type: i0.Input,
|
|
458
|
+
args: [{
|
|
459
|
+
isSignal: true,
|
|
460
|
+
alias: "aria-describedby",
|
|
461
|
+
required: false
|
|
462
|
+
}]
|
|
463
|
+
}],
|
|
464
|
+
ariaLabel: [{
|
|
465
|
+
type: i0.Input,
|
|
466
|
+
args: [{
|
|
467
|
+
isSignal: true,
|
|
468
|
+
alias: "aria-label",
|
|
469
|
+
required: false
|
|
470
|
+
}]
|
|
471
|
+
}],
|
|
472
|
+
ariaLabelledBy: [{
|
|
473
|
+
type: i0.Input,
|
|
474
|
+
args: [{
|
|
475
|
+
isSignal: true,
|
|
476
|
+
alias: "aria-labelledby",
|
|
477
|
+
required: false
|
|
478
|
+
}]
|
|
479
|
+
}],
|
|
480
|
+
disabled: [{
|
|
481
|
+
type: i0.Input,
|
|
482
|
+
args: [{
|
|
483
|
+
isSignal: true,
|
|
484
|
+
alias: "disabled",
|
|
485
|
+
required: false
|
|
486
|
+
}]
|
|
487
|
+
}],
|
|
488
|
+
inputBlur: [{
|
|
489
|
+
type: i0.Output,
|
|
490
|
+
args: ["inputBlur"]
|
|
491
|
+
}],
|
|
492
|
+
inputClick: [{
|
|
493
|
+
type: i0.Output,
|
|
494
|
+
args: ["inputClick"]
|
|
495
|
+
}],
|
|
496
|
+
inputFocus: [{
|
|
497
|
+
type: i0.Output,
|
|
498
|
+
args: ["inputFocus"]
|
|
499
|
+
}],
|
|
500
|
+
inputId: [{
|
|
501
|
+
type: i0.Input,
|
|
502
|
+
args: [{
|
|
503
|
+
isSignal: true,
|
|
504
|
+
alias: "inputId",
|
|
505
|
+
required: false
|
|
506
|
+
}]
|
|
507
|
+
}],
|
|
508
|
+
invalid: [{
|
|
509
|
+
type: i0.Input,
|
|
510
|
+
args: [{
|
|
511
|
+
isSignal: true,
|
|
512
|
+
alias: "invalid",
|
|
513
|
+
required: false
|
|
514
|
+
}]
|
|
515
|
+
}],
|
|
516
|
+
label: [{
|
|
517
|
+
type: i0.Input,
|
|
518
|
+
args: [{
|
|
519
|
+
isSignal: true,
|
|
520
|
+
alias: "label",
|
|
521
|
+
required: false
|
|
522
|
+
}]
|
|
523
|
+
}],
|
|
524
|
+
labelPosition: [{
|
|
525
|
+
type: i0.Input,
|
|
526
|
+
args: [{
|
|
527
|
+
isSignal: true,
|
|
528
|
+
alias: "labelPosition",
|
|
529
|
+
required: false
|
|
530
|
+
}]
|
|
531
|
+
}],
|
|
532
|
+
labelSize: [{
|
|
533
|
+
type: i0.Input,
|
|
534
|
+
args: [{
|
|
535
|
+
isSignal: true,
|
|
536
|
+
alias: "labelSize",
|
|
537
|
+
required: false
|
|
538
|
+
}]
|
|
539
|
+
}],
|
|
540
|
+
name: [{
|
|
541
|
+
type: i0.Input,
|
|
542
|
+
args: [{
|
|
543
|
+
isSignal: true,
|
|
544
|
+
alias: "name",
|
|
545
|
+
required: false
|
|
546
|
+
}]
|
|
547
|
+
}],
|
|
548
|
+
radioValue: [{
|
|
549
|
+
type: i0.Input,
|
|
550
|
+
args: [{
|
|
551
|
+
isSignal: true,
|
|
552
|
+
alias: "radioValue",
|
|
553
|
+
required: false
|
|
554
|
+
}]
|
|
555
|
+
}],
|
|
556
|
+
readonly: [{
|
|
557
|
+
type: i0.Input,
|
|
558
|
+
args: [{
|
|
559
|
+
isSignal: true,
|
|
560
|
+
alias: "readonly",
|
|
561
|
+
required: false
|
|
562
|
+
}]
|
|
563
|
+
}],
|
|
564
|
+
required: [{
|
|
565
|
+
type: i0.Input,
|
|
566
|
+
args: [{
|
|
567
|
+
isSignal: true,
|
|
568
|
+
alias: "required",
|
|
569
|
+
required: false
|
|
570
|
+
}]
|
|
571
|
+
}],
|
|
572
|
+
rounded: [{
|
|
573
|
+
type: i0.Input,
|
|
574
|
+
args: [{
|
|
575
|
+
isSignal: true,
|
|
576
|
+
alias: "rounded",
|
|
577
|
+
required: false
|
|
578
|
+
}]
|
|
579
|
+
}],
|
|
580
|
+
touch: [{
|
|
581
|
+
type: i0.Output,
|
|
582
|
+
args: ["touch"]
|
|
583
|
+
}],
|
|
584
|
+
touched: [{
|
|
585
|
+
type: i0.Input,
|
|
586
|
+
args: [{
|
|
587
|
+
isSignal: true,
|
|
588
|
+
alias: "touched",
|
|
589
|
+
required: false
|
|
590
|
+
}]
|
|
591
|
+
}],
|
|
592
|
+
userClass: [{
|
|
593
|
+
type: i0.Input,
|
|
594
|
+
args: [{
|
|
595
|
+
isSignal: true,
|
|
596
|
+
alias: "class",
|
|
597
|
+
required: false
|
|
598
|
+
}]
|
|
599
|
+
}],
|
|
600
|
+
value: [{
|
|
601
|
+
type: i0.Input,
|
|
602
|
+
args: [{
|
|
603
|
+
isSignal: true,
|
|
604
|
+
alias: "value",
|
|
605
|
+
required: false
|
|
606
|
+
}]
|
|
607
|
+
}, {
|
|
608
|
+
type: i0.Output,
|
|
609
|
+
args: ["valueChange"]
|
|
610
|
+
}]
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
var RadioGroupComponent = class RadioGroupComponent {
|
|
614
|
+
#generatedName;
|
|
615
|
+
#hostElementRef;
|
|
616
|
+
#label;
|
|
617
|
+
#selectionVersion;
|
|
618
|
+
constructor() {
|
|
619
|
+
this.#generatedName = createElementControlId();
|
|
620
|
+
this.#hostElementRef = inject(ElementRef);
|
|
621
|
+
this.#label = injectLabelAssociation({
|
|
622
|
+
activate: () => this.focus(),
|
|
623
|
+
ariaLabel: () => this.ariaLabel(),
|
|
624
|
+
ariaLabelledBy: () => this.ariaLabelledBy()
|
|
625
|
+
});
|
|
626
|
+
this.#selectionVersion = signal(0, ...ngDevMode ? [{ debugName: "#selectionVersion" }] : /* istanbul ignore next */ []);
|
|
627
|
+
this.classes = computed(() => twMerge(radioGroupThemeVariants({ orientation: this.orientation() }), this.userClass()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
628
|
+
this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
|
|
629
|
+
this.invalidState = computed(() => this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
|
|
630
|
+
this.labelledBy = this.#label.labelledBy;
|
|
631
|
+
this.ariaDescribedBy = input("", {
|
|
632
|
+
...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
|
|
633
|
+
alias: "aria-describedby"
|
|
634
|
+
});
|
|
635
|
+
this.ariaLabel = input("", {
|
|
636
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
637
|
+
alias: "aria-label"
|
|
638
|
+
});
|
|
639
|
+
this.ariaLabelledBy = input("", {
|
|
640
|
+
...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
|
|
641
|
+
alias: "aria-labelledby"
|
|
642
|
+
});
|
|
643
|
+
this.context = {
|
|
644
|
+
disabled: this.effectiveDisabled,
|
|
645
|
+
invalid: this.invalidState,
|
|
646
|
+
name: computed(() => this.name() || this.#generatedName),
|
|
647
|
+
readonly: computed(() => this.readonly()),
|
|
648
|
+
required: computed(() => this.required()),
|
|
649
|
+
select: (value) => this.#select(value),
|
|
650
|
+
selectionVersion: this.#selectionVersion,
|
|
651
|
+
value: computed(() => this.value())
|
|
652
|
+
};
|
|
653
|
+
this.disabled = input(false, {
|
|
654
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
655
|
+
transform: booleanAttribute
|
|
656
|
+
});
|
|
657
|
+
this.invalid = input(false, {
|
|
658
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
659
|
+
transform: booleanAttribute
|
|
660
|
+
});
|
|
661
|
+
this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
662
|
+
this.orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
663
|
+
this.readonly = input(false, {
|
|
664
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
665
|
+
transform: booleanAttribute
|
|
666
|
+
});
|
|
667
|
+
this.required = input(false, {
|
|
668
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
669
|
+
transform: booleanAttribute
|
|
670
|
+
});
|
|
671
|
+
this.touch = output();
|
|
672
|
+
this.touched = input(false, {
|
|
673
|
+
...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
|
|
674
|
+
transform: booleanAttribute
|
|
675
|
+
});
|
|
676
|
+
this.userClass = input("", {
|
|
677
|
+
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
678
|
+
alias: "class"
|
|
679
|
+
});
|
|
680
|
+
this.value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
681
|
+
afterNextRender(() => {
|
|
682
|
+
if (isDevMode() && !this.labelledBy() && !this.ariaLabel()) console.warn("[Mona Radio Group] A radio group needs an accessible name. Set aria-label, aria-labelledby or use a mona-label.", this.#hostElementRef.nativeElement);
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
focus(options) {
|
|
686
|
+
const host = this.#hostElementRef.nativeElement;
|
|
687
|
+
(host.querySelector("input[type='radio']:checked:not(:disabled)") ?? host.querySelector("input[type='radio']:not(:disabled)"))?.focus(options);
|
|
688
|
+
}
|
|
689
|
+
setLabelledBy(id) {
|
|
690
|
+
this.#label.setLabelledBy(id);
|
|
691
|
+
}
|
|
692
|
+
#select(value) {
|
|
693
|
+
this.value.set(value);
|
|
694
|
+
this.#selectionVersion.update((version) => version + 1);
|
|
695
|
+
this.touch.emit();
|
|
696
|
+
}
|
|
697
|
+
onFocusOut(event) {
|
|
698
|
+
const nextTarget = event.relatedTarget;
|
|
699
|
+
if (nextTarget instanceof Node && this.#hostElementRef.nativeElement.contains(nextTarget)) return;
|
|
700
|
+
this.touch.emit();
|
|
701
|
+
}
|
|
702
|
+
static {
|
|
703
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
704
|
+
minVersion: "12.0.0",
|
|
705
|
+
version: "22.2.6",
|
|
706
|
+
ngImport: i0,
|
|
707
|
+
type: RadioGroupComponent,
|
|
708
|
+
deps: [],
|
|
709
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
static {
|
|
713
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
714
|
+
minVersion: "17.1.0",
|
|
715
|
+
version: "22.2.6",
|
|
716
|
+
type: RadioGroupComponent,
|
|
717
|
+
isStandalone: true,
|
|
718
|
+
selector: "mona-radio-group",
|
|
719
|
+
inputs: {
|
|
720
|
+
ariaDescribedBy: {
|
|
721
|
+
classPropertyName: "ariaDescribedBy",
|
|
722
|
+
publicName: "aria-describedby",
|
|
723
|
+
isSignal: true,
|
|
724
|
+
isRequired: false,
|
|
725
|
+
transformFunction: null
|
|
726
|
+
},
|
|
727
|
+
ariaLabel: {
|
|
728
|
+
classPropertyName: "ariaLabel",
|
|
729
|
+
publicName: "aria-label",
|
|
730
|
+
isSignal: true,
|
|
731
|
+
isRequired: false,
|
|
732
|
+
transformFunction: null
|
|
733
|
+
},
|
|
734
|
+
ariaLabelledBy: {
|
|
735
|
+
classPropertyName: "ariaLabelledBy",
|
|
736
|
+
publicName: "aria-labelledby",
|
|
737
|
+
isSignal: true,
|
|
738
|
+
isRequired: false,
|
|
739
|
+
transformFunction: null
|
|
740
|
+
},
|
|
741
|
+
disabled: {
|
|
742
|
+
classPropertyName: "disabled",
|
|
743
|
+
publicName: "disabled",
|
|
744
|
+
isSignal: true,
|
|
745
|
+
isRequired: false,
|
|
746
|
+
transformFunction: null
|
|
747
|
+
},
|
|
748
|
+
invalid: {
|
|
749
|
+
classPropertyName: "invalid",
|
|
750
|
+
publicName: "invalid",
|
|
751
|
+
isSignal: true,
|
|
752
|
+
isRequired: false,
|
|
753
|
+
transformFunction: null
|
|
754
|
+
},
|
|
755
|
+
name: {
|
|
756
|
+
classPropertyName: "name",
|
|
757
|
+
publicName: "name",
|
|
758
|
+
isSignal: true,
|
|
759
|
+
isRequired: false,
|
|
760
|
+
transformFunction: null
|
|
761
|
+
},
|
|
762
|
+
orientation: {
|
|
763
|
+
classPropertyName: "orientation",
|
|
764
|
+
publicName: "orientation",
|
|
765
|
+
isSignal: true,
|
|
766
|
+
isRequired: false,
|
|
767
|
+
transformFunction: null
|
|
768
|
+
},
|
|
769
|
+
readonly: {
|
|
770
|
+
classPropertyName: "readonly",
|
|
771
|
+
publicName: "readonly",
|
|
772
|
+
isSignal: true,
|
|
773
|
+
isRequired: false,
|
|
774
|
+
transformFunction: null
|
|
775
|
+
},
|
|
776
|
+
required: {
|
|
777
|
+
classPropertyName: "required",
|
|
778
|
+
publicName: "required",
|
|
779
|
+
isSignal: true,
|
|
780
|
+
isRequired: false,
|
|
781
|
+
transformFunction: null
|
|
782
|
+
},
|
|
783
|
+
touched: {
|
|
784
|
+
classPropertyName: "touched",
|
|
785
|
+
publicName: "touched",
|
|
786
|
+
isSignal: true,
|
|
787
|
+
isRequired: false,
|
|
788
|
+
transformFunction: null
|
|
789
|
+
},
|
|
790
|
+
userClass: {
|
|
791
|
+
classPropertyName: "userClass",
|
|
792
|
+
publicName: "class",
|
|
793
|
+
isSignal: true,
|
|
794
|
+
isRequired: false,
|
|
795
|
+
transformFunction: null
|
|
796
|
+
},
|
|
797
|
+
value: {
|
|
798
|
+
classPropertyName: "value",
|
|
799
|
+
publicName: "value",
|
|
800
|
+
isSignal: true,
|
|
801
|
+
isRequired: false,
|
|
802
|
+
transformFunction: null
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
outputs: {
|
|
806
|
+
touch: "touch",
|
|
807
|
+
value: "valueChange"
|
|
808
|
+
},
|
|
809
|
+
host: {
|
|
810
|
+
attributes: { "role": "radiogroup" },
|
|
811
|
+
listeners: { "focusout": "onFocusOut($event)" },
|
|
812
|
+
properties: {
|
|
813
|
+
"attr.aria-describedby": "ariaDescribedBy() || null",
|
|
814
|
+
"attr.aria-disabled": "effectiveDisabled() || null",
|
|
815
|
+
"attr.aria-invalid": "invalidState() ? 'true' : null",
|
|
816
|
+
"attr.aria-label": "ariaLabel() || null",
|
|
817
|
+
"attr.aria-labelledby": "labelledBy()",
|
|
818
|
+
"attr.aria-orientation": "orientation()",
|
|
819
|
+
"attr.aria-readonly": "readonly() || null",
|
|
820
|
+
"attr.aria-required": "required() || null",
|
|
821
|
+
"attr.data-disabled": "effectiveDisabled() || null",
|
|
822
|
+
"attr.data-readonly": "readonly() || null",
|
|
823
|
+
"class": "classes()"
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
providers: [{
|
|
827
|
+
provide: MONA_RADIO_GROUP,
|
|
828
|
+
useFactory: () => inject(RadioGroupComponent).context
|
|
829
|
+
}],
|
|
830
|
+
ngImport: i0,
|
|
831
|
+
template: `<ng-content />`,
|
|
832
|
+
isInline: true
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
};
|
|
836
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
837
|
+
minVersion: "12.0.0",
|
|
838
|
+
version: "22.2.6",
|
|
839
|
+
ngImport: i0,
|
|
840
|
+
type: RadioGroupComponent,
|
|
841
|
+
decorators: [{
|
|
842
|
+
type: Component,
|
|
843
|
+
args: [{
|
|
844
|
+
selector: "mona-radio-group",
|
|
845
|
+
template: `<ng-content />`,
|
|
846
|
+
providers: [{
|
|
847
|
+
provide: MONA_RADIO_GROUP,
|
|
848
|
+
useFactory: () => inject(RadioGroupComponent).context
|
|
849
|
+
}],
|
|
850
|
+
host: {
|
|
851
|
+
role: "radiogroup",
|
|
852
|
+
"[attr.aria-describedby]": "ariaDescribedBy() || null",
|
|
853
|
+
"[attr.aria-disabled]": "effectiveDisabled() || null",
|
|
854
|
+
"[attr.aria-invalid]": "invalidState() ? 'true' : null",
|
|
855
|
+
"[attr.aria-label]": "ariaLabel() || null",
|
|
856
|
+
"[attr.aria-labelledby]": "labelledBy()",
|
|
857
|
+
"[attr.aria-orientation]": "orientation()",
|
|
858
|
+
"[attr.aria-readonly]": "readonly() || null",
|
|
859
|
+
"[attr.aria-required]": "required() || null",
|
|
860
|
+
"[attr.data-disabled]": "effectiveDisabled() || null",
|
|
861
|
+
"[attr.data-readonly]": "readonly() || null",
|
|
862
|
+
"[class]": "classes()",
|
|
863
|
+
"(focusout)": "onFocusOut($event)"
|
|
864
|
+
}
|
|
865
|
+
}]
|
|
866
|
+
}],
|
|
867
|
+
ctorParameters: () => [],
|
|
868
|
+
propDecorators: {
|
|
869
|
+
ariaDescribedBy: [{
|
|
870
|
+
type: i0.Input,
|
|
871
|
+
args: [{
|
|
872
|
+
isSignal: true,
|
|
873
|
+
alias: "aria-describedby",
|
|
874
|
+
required: false
|
|
875
|
+
}]
|
|
876
|
+
}],
|
|
877
|
+
ariaLabel: [{
|
|
878
|
+
type: i0.Input,
|
|
879
|
+
args: [{
|
|
880
|
+
isSignal: true,
|
|
881
|
+
alias: "aria-label",
|
|
882
|
+
required: false
|
|
883
|
+
}]
|
|
884
|
+
}],
|
|
885
|
+
ariaLabelledBy: [{
|
|
886
|
+
type: i0.Input,
|
|
887
|
+
args: [{
|
|
888
|
+
isSignal: true,
|
|
889
|
+
alias: "aria-labelledby",
|
|
890
|
+
required: false
|
|
891
|
+
}]
|
|
892
|
+
}],
|
|
893
|
+
disabled: [{
|
|
894
|
+
type: i0.Input,
|
|
895
|
+
args: [{
|
|
896
|
+
isSignal: true,
|
|
897
|
+
alias: "disabled",
|
|
898
|
+
required: false
|
|
899
|
+
}]
|
|
900
|
+
}],
|
|
901
|
+
invalid: [{
|
|
902
|
+
type: i0.Input,
|
|
903
|
+
args: [{
|
|
904
|
+
isSignal: true,
|
|
905
|
+
alias: "invalid",
|
|
906
|
+
required: false
|
|
907
|
+
}]
|
|
908
|
+
}],
|
|
909
|
+
name: [{
|
|
910
|
+
type: i0.Input,
|
|
911
|
+
args: [{
|
|
912
|
+
isSignal: true,
|
|
913
|
+
alias: "name",
|
|
914
|
+
required: false
|
|
915
|
+
}]
|
|
916
|
+
}],
|
|
917
|
+
orientation: [{
|
|
918
|
+
type: i0.Input,
|
|
919
|
+
args: [{
|
|
920
|
+
isSignal: true,
|
|
921
|
+
alias: "orientation",
|
|
922
|
+
required: false
|
|
923
|
+
}]
|
|
924
|
+
}],
|
|
925
|
+
readonly: [{
|
|
926
|
+
type: i0.Input,
|
|
927
|
+
args: [{
|
|
928
|
+
isSignal: true,
|
|
929
|
+
alias: "readonly",
|
|
930
|
+
required: false
|
|
931
|
+
}]
|
|
932
|
+
}],
|
|
933
|
+
required: [{
|
|
934
|
+
type: i0.Input,
|
|
935
|
+
args: [{
|
|
936
|
+
isSignal: true,
|
|
937
|
+
alias: "required",
|
|
938
|
+
required: false
|
|
939
|
+
}]
|
|
940
|
+
}],
|
|
941
|
+
touch: [{
|
|
942
|
+
type: i0.Output,
|
|
943
|
+
args: ["touch"]
|
|
944
|
+
}],
|
|
945
|
+
touched: [{
|
|
946
|
+
type: i0.Input,
|
|
947
|
+
args: [{
|
|
948
|
+
isSignal: true,
|
|
949
|
+
alias: "touched",
|
|
950
|
+
required: false
|
|
951
|
+
}]
|
|
952
|
+
}],
|
|
953
|
+
userClass: [{
|
|
954
|
+
type: i0.Input,
|
|
955
|
+
args: [{
|
|
956
|
+
isSignal: true,
|
|
957
|
+
alias: "class",
|
|
958
|
+
required: false
|
|
959
|
+
}]
|
|
960
|
+
}],
|
|
961
|
+
value: [{
|
|
962
|
+
type: i0.Input,
|
|
963
|
+
args: [{
|
|
964
|
+
isSignal: true,
|
|
965
|
+
alias: "value",
|
|
966
|
+
required: false
|
|
967
|
+
}]
|
|
968
|
+
}, {
|
|
969
|
+
type: i0.Output,
|
|
970
|
+
args: ["valueChange"]
|
|
971
|
+
}]
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
var RadioButtonDirective = class RadioButtonDirective {
|
|
975
|
+
constructor() {
|
|
976
|
+
this.classes = computed(() => {
|
|
977
|
+
const rounded = this.rounded();
|
|
978
|
+
return radioButtonDirectiveThemeVariants({ rounded });
|
|
979
|
+
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
980
|
+
this.inputInvalid = computed(() => this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "inputInvalid" }] : /* istanbul ignore next */ []);
|
|
981
|
+
this.invalid = input(false, {
|
|
982
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
983
|
+
transform: booleanAttribute
|
|
984
|
+
});
|
|
985
|
+
this.rounded = input("full", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
|
|
986
|
+
this.touched = input(false, {
|
|
987
|
+
...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
|
|
988
|
+
transform: booleanAttribute
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
static {
|
|
992
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
993
|
+
minVersion: "12.0.0",
|
|
994
|
+
version: "22.2.6",
|
|
995
|
+
ngImport: i0,
|
|
996
|
+
type: RadioButtonDirective,
|
|
997
|
+
deps: [],
|
|
998
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
static {
|
|
1002
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1003
|
+
minVersion: "17.1.0",
|
|
1004
|
+
version: "22.2.6",
|
|
1005
|
+
type: RadioButtonDirective,
|
|
1006
|
+
isStandalone: true,
|
|
1007
|
+
selector: "input[type='radio'][monaRadioButton]",
|
|
1008
|
+
inputs: {
|
|
1009
|
+
invalid: {
|
|
1010
|
+
classPropertyName: "invalid",
|
|
1011
|
+
publicName: "invalid",
|
|
1012
|
+
isSignal: true,
|
|
1013
|
+
isRequired: false,
|
|
1014
|
+
transformFunction: null
|
|
1015
|
+
},
|
|
1016
|
+
rounded: {
|
|
1017
|
+
classPropertyName: "rounded",
|
|
1018
|
+
publicName: "rounded",
|
|
1019
|
+
isSignal: true,
|
|
1020
|
+
isRequired: false,
|
|
1021
|
+
transformFunction: null
|
|
1022
|
+
},
|
|
1023
|
+
touched: {
|
|
1024
|
+
classPropertyName: "touched",
|
|
1025
|
+
publicName: "touched",
|
|
1026
|
+
isSignal: true,
|
|
1027
|
+
isRequired: false,
|
|
1028
|
+
transformFunction: null
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
host: { properties: {
|
|
1032
|
+
"attr.aria-invalid": "inputInvalid() || null",
|
|
1033
|
+
"attr.data-invalid": "inputInvalid() || null",
|
|
1034
|
+
"class": "classes()"
|
|
1035
|
+
} },
|
|
1036
|
+
ngImport: i0
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1040
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1041
|
+
minVersion: "12.0.0",
|
|
1042
|
+
version: "22.2.6",
|
|
1043
|
+
ngImport: i0,
|
|
1044
|
+
type: RadioButtonDirective,
|
|
1045
|
+
decorators: [{
|
|
1046
|
+
type: Directive,
|
|
1047
|
+
args: [{
|
|
1048
|
+
selector: "input[type='radio'][monaRadioButton]",
|
|
1049
|
+
host: {
|
|
1050
|
+
"[attr.aria-invalid]": "inputInvalid() || null",
|
|
1051
|
+
"[attr.data-invalid]": "inputInvalid() || null",
|
|
1052
|
+
"[class]": "classes()"
|
|
1053
|
+
}
|
|
1054
|
+
}]
|
|
1055
|
+
}],
|
|
1056
|
+
propDecorators: {
|
|
1057
|
+
invalid: [{
|
|
1058
|
+
type: i0.Input,
|
|
1059
|
+
args: [{
|
|
1060
|
+
isSignal: true,
|
|
1061
|
+
alias: "invalid",
|
|
1062
|
+
required: false
|
|
1063
|
+
}]
|
|
1064
|
+
}],
|
|
1065
|
+
rounded: [{
|
|
1066
|
+
type: i0.Input,
|
|
1067
|
+
args: [{
|
|
1068
|
+
isSignal: true,
|
|
1069
|
+
alias: "rounded",
|
|
1070
|
+
required: false
|
|
1071
|
+
}]
|
|
1072
|
+
}],
|
|
1073
|
+
touched: [{
|
|
1074
|
+
type: i0.Input,
|
|
1075
|
+
args: [{
|
|
1076
|
+
isSignal: true,
|
|
1077
|
+
alias: "touched",
|
|
1078
|
+
required: false
|
|
1079
|
+
}]
|
|
1080
|
+
}]
|
|
1081
|
+
}
|
|
1082
|
+
});
|
|
615
1083
|
export { RadioButtonComponent, RadioButtonDirective, RadioGroupComponent };
|
|
616
|
-
|
|
1084
|
+
|
|
1085
|
+
//# sourceMappingURL=nanahoshi-mona-ui-radio-button.mjs.map
|