@kirbydesign/designsystem 11.11.4 → 12.0.0-dev-286cdc0
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/README.md +7 -0
- package/fesm2022/kirbydesign-designsystem-accordion.mjs +246 -135
- package/fesm2022/kirbydesign-designsystem-accordion.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-action-group.mjs +229 -134
- package/fesm2022/kirbydesign-designsystem-action-group.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-avatar.mjs +102 -55
- package/fesm2022/kirbydesign-designsystem-avatar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-badge.mjs +85 -42
- package/fesm2022/kirbydesign-designsystem-badge.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-button.mjs +203 -170
- package/fesm2022/kirbydesign-designsystem-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-calendar.mjs +524 -516
- package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-card.mjs +439 -205
- package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-chart.mjs +1388 -1469
- package/fesm2022/kirbydesign-designsystem-chart.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs +223 -176
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-config.mjs +50 -96
- package/fesm2022/kirbydesign-designsystem-config.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-data-table.mjs +180 -83
- package/fesm2022/kirbydesign-designsystem-data-table.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-divider.mjs +46 -19
- package/fesm2022/kirbydesign-designsystem-divider.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs +878 -752
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs +175 -91
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +213 -85
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-flag.mjs +67 -33
- package/fesm2022/kirbydesign-designsystem-flag.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-form-field.mjs +1260 -891
- package/fesm2022/kirbydesign-designsystem-form-field.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-gesture.mjs +38 -23
- package/fesm2022/kirbydesign-designsystem-gesture.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-header.mjs +422 -182
- package/fesm2022/kirbydesign-designsystem-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-helpers-scss.mjs +16 -14
- package/fesm2022/kirbydesign-designsystem-helpers-scss.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-helpers.mjs +251 -361
- package/fesm2022/kirbydesign-designsystem-helpers.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-icon.mjs +881 -296
- package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-group.mjs +52 -23
- package/fesm2022/kirbydesign-designsystem-item-group.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +147 -43
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item.mjs +395 -151
- package/fesm2022/kirbydesign-designsystem-item.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +136 -54
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-list.mjs +1188 -697
- package/fesm2022/kirbydesign-designsystem-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +166 -76
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-menu.mjs +420 -311
- package/fesm2022/kirbydesign-designsystem-menu.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-modal.mjs +2476 -1912
- package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-page.mjs +1526 -905
- package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-popover.mjs +204 -169
- package/fesm2022/kirbydesign-designsystem-popover.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +209 -158
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-radio.mjs +537 -365
- package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-range.mjs +207 -150
- package/fesm2022/kirbydesign-designsystem-range.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +217 -104
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +113 -38
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-section-header.mjs +56 -18
- package/fesm2022/kirbydesign-designsystem-section-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-segmented-control.mjs +276 -232
- package/fesm2022/kirbydesign-designsystem-segmented-control.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +328 -382
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +73 -84
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared.mjs +665 -531
- package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs +140 -91
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide.mjs +360 -158
- package/fesm2022/kirbydesign-designsystem-slide.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-spinner.mjs +90 -32
- package/fesm2022/kirbydesign-designsystem-spinner.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +348 -181
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tabs.mjs +286 -121
- package/fesm2022/kirbydesign-designsystem-tabs.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs +6234 -3164
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +118 -95
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +128 -101
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing.mjs +236 -243
- package/fesm2022/kirbydesign-designsystem-testing.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toast.mjs +98 -62
- package/fesm2022/kirbydesign-designsystem-toast.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +155 -127
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle.mjs +180 -150
- package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-types.mjs +39 -24
- package/fesm2022/kirbydesign-designsystem-types.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem.mjs +516 -407
- package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
- package/icons/svg/megaphone.svg +3 -0
- package/icons/svg/person-blocked.svg +3 -0
- package/icons/svg/person-check.svg +3 -0
- package/icons/svg/person-close.svg +3 -0
- package/icons/svg/person-cloud.svg +3 -0
- package/icons/svg/person-power.svg +3 -0
- package/icons/svg/person-warning.svg +3 -0
- package/icons/svg/phone-device-pin.svg +3 -0
- package/icons/svg/phone-device.svg +3 -2
- package/package.json +10 -10
- package/readme.md +37 -0
- package/types/kirbydesign-designsystem-accordion.d.ts +72 -39
- package/types/kirbydesign-designsystem-accordion.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-action-group.d.ts +46 -39
- package/types/kirbydesign-designsystem-action-group.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-avatar.d.ts +62 -26
- package/types/kirbydesign-designsystem-avatar.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-badge.d.ts +30 -19
- package/types/kirbydesign-designsystem-badge.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-button.d.ts +70 -45
- package/types/kirbydesign-designsystem-button.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-calendar.d.ts +193 -132
- package/types/kirbydesign-designsystem-calendar.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-card.d.ts +130 -66
- package/types/kirbydesign-designsystem-card.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-chart.d.ts +198 -172
- package/types/kirbydesign-designsystem-chart.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-checkbox.d.ts +102 -68
- package/types/kirbydesign-designsystem-checkbox.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-config.d.ts +17 -21
- package/types/kirbydesign-designsystem-config.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-data-table.d.ts +46 -26
- package/types/kirbydesign-designsystem-data-table.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-divider.d.ts +11 -9
- package/types/kirbydesign-designsystem-divider.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-dropdown.d.ts +219 -166
- package/types/kirbydesign-designsystem-dropdown.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-empty-state.d.ts +58 -35
- package/types/kirbydesign-designsystem-empty-state.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-fab-sheet.d.ts +34 -28
- package/types/kirbydesign-designsystem-fab-sheet.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-flag.d.ts +18 -13
- package/types/kirbydesign-designsystem-flag.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-form-field.d.ts +409 -242
- package/types/kirbydesign-designsystem-form-field.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-gesture.d.ts +41 -46
- package/types/kirbydesign-designsystem-gesture.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-header.d.ts +102 -64
- package/types/kirbydesign-designsystem-header.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-helpers-scss.d.ts +6 -8
- package/types/kirbydesign-designsystem-helpers-scss.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-helpers.d.ts +83 -97
- package/types/kirbydesign-designsystem-helpers.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-icon.d.ts +63 -59
- package/types/kirbydesign-designsystem-icon.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-item-group.d.ts +6 -9
- package/types/kirbydesign-designsystem-item-group.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-item-sliding.d.ts +30 -26
- package/types/kirbydesign-designsystem-item-sliding.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-item.d.ts +93 -54
- package/types/kirbydesign-designsystem-item.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-kirby-app.d.ts +18 -19
- package/types/kirbydesign-designsystem-kirby-app.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-list.d.ts +392 -263
- package/types/kirbydesign-designsystem-list.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-loading-overlay.d.ts +35 -24
- package/types/kirbydesign-designsystem-loading-overlay.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-menu.d.ts +119 -69
- package/types/kirbydesign-designsystem-menu.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-modal.d.ts +578 -455
- package/types/kirbydesign-designsystem-modal.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-page.d.ts +308 -226
- package/types/kirbydesign-designsystem-page.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-popover.d.ts +48 -40
- package/types/kirbydesign-designsystem-popover.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-progress-circle.d.ts +59 -61
- package/types/kirbydesign-designsystem-progress-circle.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-radio.d.ts +147 -98
- package/types/kirbydesign-designsystem-radio.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-range.d.ts +90 -45
- package/types/kirbydesign-designsystem-range.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-reorder-list.d.ts +44 -32
- package/types/kirbydesign-designsystem-reorder-list.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-router-outlet.d.ts +23 -18
- package/types/kirbydesign-designsystem-router-outlet.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-section-header.d.ts +5 -8
- package/types/kirbydesign-designsystem-section-header.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-segmented-control.d.ts +123 -100
- package/types/kirbydesign-designsystem-segmented-control.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-shared-floating.d.ts +183 -128
- package/types/kirbydesign-designsystem-shared-floating.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-shared-portal.d.ts +29 -28
- package/types/kirbydesign-designsystem-shared-portal.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-shared.d.ts +143 -139
- package/types/kirbydesign-designsystem-shared.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-slide-button.d.ts +43 -34
- package/types/kirbydesign-designsystem-slide-button.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-slide.d.ts +80 -59
- package/types/kirbydesign-designsystem-slide.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-spinner.d.ts +13 -14
- package/types/kirbydesign-designsystem-spinner.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-tab-navigation.d.ts +78 -55
- package/types/kirbydesign-designsystem-tab-navigation.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-tabs.d.ts +50 -45
- package/types/kirbydesign-designsystem-tabs.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-testing-base.d.ts +2435 -815
- package/types/kirbydesign-designsystem-testing-base.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-testing-jasmine.d.ts +9 -10
- package/types/kirbydesign-designsystem-testing-jasmine.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-testing-jest.d.ts +9 -10
- package/types/kirbydesign-designsystem-testing-jest.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-testing.d.ts +52 -58
- package/types/kirbydesign-designsystem-testing.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-toast.d.ts +25 -31
- package/types/kirbydesign-designsystem-toast.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-toggle-button.d.ts +62 -56
- package/types/kirbydesign-designsystem-toggle-button.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-toggle.d.ts +71 -63
- package/types/kirbydesign-designsystem-toggle.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-types.d.ts +15 -22
- package/types/kirbydesign-designsystem-types.d.ts.map +1 -1
- package/types/kirbydesign-designsystem.d.ts +135 -123
- package/types/kirbydesign-designsystem.d.ts.map +1 -1
- package/accordion/package.json +0 -4
- package/action-group/package.json +0 -4
- package/avatar/package.json +0 -4
- package/badge/package.json +0 -4
- package/button/package.json +0 -4
- package/calendar/package.json +0 -4
- package/card/package.json +0 -4
- package/chart/package.json +0 -4
- package/checkbox/package.json +0 -4
- package/config/package.json +0 -4
- package/data-table/package.json +0 -4
- package/divider/package.json +0 -4
- package/dropdown/package.json +0 -4
- package/empty-state/package.json +0 -4
- package/fab-sheet/package.json +0 -4
- package/flag/package.json +0 -4
- package/form-field/package.json +0 -4
- package/gesture/package.json +0 -4
- package/header/package.json +0 -4
- package/helpers/package.json +0 -4
- package/helpers/scss/package.json +0 -4
- package/icon/package.json +0 -4
- package/item/package.json +0 -4
- package/item-group/package.json +0 -4
- package/item-sliding/package.json +0 -4
- package/kirby-app/package.json +0 -4
- package/list/package.json +0 -4
- package/loading-overlay/package.json +0 -4
- package/menu/package.json +0 -4
- package/modal/package.json +0 -4
- package/page/package.json +0 -4
- package/popover/package.json +0 -4
- package/progress-circle/package.json +0 -4
- package/radio/package.json +0 -4
- package/range/package.json +0 -4
- package/reorder-list/package.json +0 -4
- package/router-outlet/package.json +0 -4
- package/section-header/package.json +0 -4
- package/segmented-control/package.json +0 -4
- package/shared/floating/package.json +0 -4
- package/shared/package.json +0 -4
- package/shared/portal/package.json +0 -4
- package/slide/package.json +0 -4
- package/slide-button/package.json +0 -4
- package/spinner/package.json +0 -4
- package/tab-navigation/package.json +0 -4
- package/tabs/package.json +0 -4
- package/testing/package.json +0 -4
- package/testing-base/package.json +0 -4
- package/testing-jasmine/package.json +0 -4
- package/testing-jest/package.json +0 -4
- package/toast/package.json +0 -4
- package/toggle/package.json +0 -4
- package/toggle-button/package.json +0 -4
- package/types/package.json +0 -4
|
@@ -1,367 +1,539 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { IonRadio, IonRadioGroup } from
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import { IonicElementPartHelper } from
|
|
6
|
-
import { inheritAriaLabelText, setAccessibleLabel
|
|
7
|
-
import { NG_VALUE_ACCESSOR } from
|
|
8
|
-
import { ListItemTemplateDirective } from
|
|
9
|
-
import { FORM_FIELD_CONTROL } from
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, ElementRef, EventEmitter, HostBinding, HostListener, Input, NgModule, Output, TemplateRef, ViewChild, ViewChildren } from "@angular/core";
|
|
3
|
+
import { IonRadio, IonRadioGroup } from "@ionic/angular";
|
|
4
|
+
import * as i1 from "@kirbydesign/designsystem/helpers";
|
|
5
|
+
import { IonicElementPartHelper } from "@kirbydesign/designsystem/helpers";
|
|
6
|
+
import { forwardAttributes, inheritAriaLabelText, setAccessibleLabel } from "@kirbydesign/designsystem/shared";
|
|
7
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
8
|
+
import { ListItemTemplateDirective } from "@kirbydesign/designsystem/list";
|
|
9
|
+
import { FORM_FIELD_CONTROL } from "@kirbydesign/designsystem/types";
|
|
10
|
+
import { CommonModule, NgTemplateOutlet } from "@angular/common";
|
|
11
|
+
var RadioComponent = class RadioComponent {
|
|
12
|
+
get _isDisabled() {
|
|
13
|
+
return this.disabled ? "disabled" : null;
|
|
14
|
+
}
|
|
15
|
+
get buttonTabIndex() {
|
|
16
|
+
return this.ionRadioElement ? this.ionRadioElement.nativeElement.tabIndex : -1;
|
|
17
|
+
}
|
|
18
|
+
constructor(element, ionicElementPartHelper) {
|
|
19
|
+
this.element = element;
|
|
20
|
+
this.ionicElementPartHelper = ionicElementPartHelper;
|
|
21
|
+
this.size = "md";
|
|
22
|
+
this._justify = "start";
|
|
23
|
+
this._labelPlacement = "end";
|
|
24
|
+
}
|
|
25
|
+
ngOnInit() {
|
|
26
|
+
this._hasSlottedContent = this.element.nativeElement.querySelector(".default-content").hasChildNodes();
|
|
27
|
+
if (this.element.nativeElement.getAttribute("slot") === "end" && this._hasSlottedContent) {
|
|
28
|
+
this._justify = "space-between";
|
|
29
|
+
this._labelPlacement = "start";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
ngAfterViewInit() {
|
|
33
|
+
this.ionicElementPartHelper.setPart("label", this.ionRadioElement, ".radio-wrapper");
|
|
34
|
+
this.ionicElementPartHelper.setPart("label-text-wrapper", this.ionRadioElement, ".label-text-wrapper");
|
|
35
|
+
this.ionicElementPartHelper.setPart("native-wrapper", this.ionRadioElement, ".native-wrapper");
|
|
36
|
+
}
|
|
37
|
+
ngAfterContentInit() {
|
|
38
|
+
this._labelText = inheritAriaLabelText(this.element.nativeElement);
|
|
39
|
+
if (!this.text && !this._labelText && !this._hasSlottedContent) this._labelText = setAccessibleLabel(this.element.nativeElement);
|
|
40
|
+
}
|
|
41
|
+
focus() {
|
|
42
|
+
this.ionRadioElement?.nativeElement.focus();
|
|
43
|
+
}
|
|
44
|
+
static {
|
|
45
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
46
|
+
minVersion: "12.0.0",
|
|
47
|
+
version: "22.2.3",
|
|
48
|
+
ngImport: i0,
|
|
49
|
+
type: RadioComponent,
|
|
50
|
+
deps: [{ token: i0.ElementRef }, { token: i1.IonicElementPartHelper }],
|
|
51
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
static {
|
|
55
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
56
|
+
minVersion: "17.0.0",
|
|
57
|
+
version: "22.2.3",
|
|
58
|
+
type: RadioComponent,
|
|
59
|
+
isStandalone: true,
|
|
60
|
+
selector: "kirby-radio",
|
|
61
|
+
inputs: {
|
|
62
|
+
value: "value",
|
|
63
|
+
text: "text",
|
|
64
|
+
size: "size",
|
|
65
|
+
disabled: "disabled"
|
|
66
|
+
},
|
|
67
|
+
host: { properties: {
|
|
68
|
+
"class": "this.size",
|
|
69
|
+
"attr.disabled": "this._isDisabled",
|
|
70
|
+
"class.has-hidden-label": "this._labelText"
|
|
71
|
+
} },
|
|
72
|
+
providers: [IonicElementPartHelper],
|
|
73
|
+
viewQueries: [{
|
|
74
|
+
propertyName: "ionRadioElement",
|
|
75
|
+
first: true,
|
|
76
|
+
predicate: IonRadio,
|
|
77
|
+
descendants: true,
|
|
78
|
+
read: ElementRef,
|
|
79
|
+
static: true
|
|
80
|
+
}],
|
|
81
|
+
ngImport: i0,
|
|
82
|
+
template: "<ion-radio\n [value]=\"value\"\n [disabled]=\"disabled\"\n mode=\"md\"\n [labelPlacement]=\"_labelPlacement\"\n [justify]=\"_justify\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n @if (text) {\n <span [attr.aria-hidden]=\"_labelText ? true : undefined\">{{ text }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-radio>\n",
|
|
83
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:flex}:host[disabled] ion-radio::part(label-text-wrapper),:host[disabled] ion-radio::part(native-wrapper){opacity:var(--kirby-opacity-40)}:host:has(ion-radio.in-item.radio-justify-space-between){width:100%}:host.has-hidden-label:has(ion-radio.in-item){position:initial}:host.has-hidden-label:has(ion-radio.in-item) ion-radio{position:initial}:host.has-hidden-label:has(ion-radio.in-item) ion-radio::part(label){position:initial}:host.has-hidden-label:has(ion-radio.in-item) ion-radio.radio-label-placement-start::part(label-text-wrapper),:host.has-hidden-label:has(ion-radio.in-item) ion-radio.radio-label-placement-end::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-radio{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host.xs ion-radio:not(.in-item)::part(label){padding-block:calc((32px - var(--kirby-spacing-m)) * .5)}:host.sm ion-radio:not(.in-item)::part(label){padding-block:calc((44px - var(--kirby-spacing-m)) * .5)}:host.md ion-radio:not(.in-item)::part(label){padding-block:calc((56px - var(--kirby-spacing-m)) * .5)}ion-radio{box-sizing:border-box;--border-width: var(--kirby-stroke-xs);--color: var(--kirby-color-border-raised);--color-checked: var(--kirby-color-border-raised)}@media(hover:hover){ion-radio:hover{--color: var(--kirby-color-border-raised-hover);--color-checked: var(--kirby-color-border-raised-hover)}ion-radio:hover::part(container){background-color:var(--kirby-color-fill-raised-hover)}ion-radio:hover::part(mark){--color-checked: var(--kirby-color-fill-engaged-hover)}}ion-radio:active{--color: var(--kirby-color-border-raised-active);--color-checked: var(--kirby-color-border-raised-active)}ion-radio:active::part(container){background-color:var(--kirby-color-fill-raised-active)}ion-radio:active::part(mark){--color-checked: var(--kirby-color-fill-engaged-active)}ion-radio:focus-visible{--color: var(--kirby-color-border-focus);--color-checked: var(--kirby-color-border-focus)}ion-radio:focus-visible::part(container){transition:box-shadow 80ms linear;box-shadow:var(--kirby-focus-ring-sm-combined-inset)}ion-radio::part(container){transition:all 80ms linear 0ms;transition-property:background-color,box-shadow;background-color:var(--kirby-color-fill-raised);margin:var(--kirby-spacing-xxxxs);width:20px;height:20px}ion-radio::part(mark){--color-checked: var(--kirby-color-fill-engaged);width:var(--kirby-spacing-xs);height:var(--kirby-spacing-xs)}ion-radio::part(label){align-items:start;padding-inline:16px;line-height:var(--kirby-line-height-n)}ion-radio::part(label-text-wrapper){margin-inline:12px 0;white-space:pre-line}ion-radio::part(native-wrapper){height:var(--kirby-relative-size-m)}ion-radio.in-item::part(label){align-items:center;padding-inline:0}ion-radio.in-item::part(label-text-wrapper){margin-block:0}ion-radio.in-item.radio-label-placement-start::part(label-text-wrapper){margin-inline:0 var(--kirby-spacing-xxs)}ion-radio.in-item.radio-label-placement-end::part(label-text-wrapper){margin-inline:var(--kirby-spacing-xxs) 0}ion-radio :host-context(kirby-radio-group.error) ion-radio,ion-radio :host-context(kirby-radio-group.ng-touched.ng-invalid) ion-radio{--color: var(--kirby-color-border-raised-danger);--color-checked: var(--kirby-color-border-raised-danger)}ion-radio :host-context(kirby-radio-group.error) ion-radio::part(container),ion-radio :host-context(kirby-radio-group.ng-touched.ng-invalid) ion-radio::part(container){box-shadow:var(--kirby-error-ring-combined-inset)}ion-radio :host-context(kirby-radio-group.error) ion-radio:focus-visible,ion-radio :host-context(kirby-radio-group.ng-touched.ng-invalid) ion-radio:focus-visible{--color: var(--kirby-color-border-focus);--color-checked: var(--kirby-color-border-focus)}ion-radio :host-context(kirby-radio-group.error) ion-radio:focus-visible::part(container),ion-radio :host-context(kirby-radio-group.ng-touched.ng-invalid) ion-radio:focus-visible::part(container){box-shadow:var(--kirby-focus-ring-sm-combined-inset)}:host-context(kirby-item){z-index:var(--kirby-z-index-default)}:host-context(kirby-item) ion-radio{margin:0}:host-context(kirby-item)[slot=start]{margin-block:0;margin-inline-end:12px}\n"],
|
|
84
|
+
dependencies: [{
|
|
85
|
+
kind: "component",
|
|
86
|
+
type: IonRadio,
|
|
87
|
+
selector: "ion-radio",
|
|
88
|
+
inputs: [
|
|
89
|
+
"alignment",
|
|
90
|
+
"color",
|
|
91
|
+
"disabled",
|
|
92
|
+
"justify",
|
|
93
|
+
"labelPlacement",
|
|
94
|
+
"mode",
|
|
95
|
+
"name",
|
|
96
|
+
"value"
|
|
97
|
+
],
|
|
98
|
+
outputs: ["ionFocus", "ionBlur"]
|
|
99
|
+
}],
|
|
100
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
105
|
+
minVersion: "12.0.0",
|
|
106
|
+
version: "22.2.3",
|
|
107
|
+
ngImport: i0,
|
|
108
|
+
type: RadioComponent,
|
|
109
|
+
decorators: [{
|
|
110
|
+
type: Component,
|
|
111
|
+
args: [{
|
|
112
|
+
selector: "kirby-radio",
|
|
113
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
114
|
+
providers: [IonicElementPartHelper],
|
|
115
|
+
imports: [IonRadio],
|
|
116
|
+
template: "<ion-radio\n [value]=\"value\"\n [disabled]=\"disabled\"\n mode=\"md\"\n [labelPlacement]=\"_labelPlacement\"\n [justify]=\"_justify\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n @if (text) {\n <span [attr.aria-hidden]=\"_labelText ? true : undefined\">{{ text }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-radio>\n",
|
|
117
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:flex}:host[disabled] ion-radio::part(label-text-wrapper),:host[disabled] ion-radio::part(native-wrapper){opacity:var(--kirby-opacity-40)}:host:has(ion-radio.in-item.radio-justify-space-between){width:100%}:host.has-hidden-label:has(ion-radio.in-item){position:initial}:host.has-hidden-label:has(ion-radio.in-item) ion-radio{position:initial}:host.has-hidden-label:has(ion-radio.in-item) ion-radio::part(label){position:initial}:host.has-hidden-label:has(ion-radio.in-item) ion-radio.radio-label-placement-start::part(label-text-wrapper),:host.has-hidden-label:has(ion-radio.in-item) ion-radio.radio-label-placement-end::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-radio{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host.xs ion-radio:not(.in-item)::part(label){padding-block:calc((32px - var(--kirby-spacing-m)) * .5)}:host.sm ion-radio:not(.in-item)::part(label){padding-block:calc((44px - var(--kirby-spacing-m)) * .5)}:host.md ion-radio:not(.in-item)::part(label){padding-block:calc((56px - var(--kirby-spacing-m)) * .5)}ion-radio{box-sizing:border-box;--border-width: var(--kirby-stroke-xs);--color: var(--kirby-color-border-raised);--color-checked: var(--kirby-color-border-raised)}@media(hover:hover){ion-radio:hover{--color: var(--kirby-color-border-raised-hover);--color-checked: var(--kirby-color-border-raised-hover)}ion-radio:hover::part(container){background-color:var(--kirby-color-fill-raised-hover)}ion-radio:hover::part(mark){--color-checked: var(--kirby-color-fill-engaged-hover)}}ion-radio:active{--color: var(--kirby-color-border-raised-active);--color-checked: var(--kirby-color-border-raised-active)}ion-radio:active::part(container){background-color:var(--kirby-color-fill-raised-active)}ion-radio:active::part(mark){--color-checked: var(--kirby-color-fill-engaged-active)}ion-radio:focus-visible{--color: var(--kirby-color-border-focus);--color-checked: var(--kirby-color-border-focus)}ion-radio:focus-visible::part(container){transition:box-shadow 80ms linear;box-shadow:var(--kirby-focus-ring-sm-combined-inset)}ion-radio::part(container){transition:all 80ms linear 0ms;transition-property:background-color,box-shadow;background-color:var(--kirby-color-fill-raised);margin:var(--kirby-spacing-xxxxs);width:20px;height:20px}ion-radio::part(mark){--color-checked: var(--kirby-color-fill-engaged);width:var(--kirby-spacing-xs);height:var(--kirby-spacing-xs)}ion-radio::part(label){align-items:start;padding-inline:16px;line-height:var(--kirby-line-height-n)}ion-radio::part(label-text-wrapper){margin-inline:12px 0;white-space:pre-line}ion-radio::part(native-wrapper){height:var(--kirby-relative-size-m)}ion-radio.in-item::part(label){align-items:center;padding-inline:0}ion-radio.in-item::part(label-text-wrapper){margin-block:0}ion-radio.in-item.radio-label-placement-start::part(label-text-wrapper){margin-inline:0 var(--kirby-spacing-xxs)}ion-radio.in-item.radio-label-placement-end::part(label-text-wrapper){margin-inline:var(--kirby-spacing-xxs) 0}ion-radio :host-context(kirby-radio-group.error) ion-radio,ion-radio :host-context(kirby-radio-group.ng-touched.ng-invalid) ion-radio{--color: var(--kirby-color-border-raised-danger);--color-checked: var(--kirby-color-border-raised-danger)}ion-radio :host-context(kirby-radio-group.error) ion-radio::part(container),ion-radio :host-context(kirby-radio-group.ng-touched.ng-invalid) ion-radio::part(container){box-shadow:var(--kirby-error-ring-combined-inset)}ion-radio :host-context(kirby-radio-group.error) ion-radio:focus-visible,ion-radio :host-context(kirby-radio-group.ng-touched.ng-invalid) ion-radio:focus-visible{--color: var(--kirby-color-border-focus);--color-checked: var(--kirby-color-border-focus)}ion-radio :host-context(kirby-radio-group.error) ion-radio:focus-visible::part(container),ion-radio :host-context(kirby-radio-group.ng-touched.ng-invalid) ion-radio:focus-visible::part(container){box-shadow:var(--kirby-focus-ring-sm-combined-inset)}:host-context(kirby-item){z-index:var(--kirby-z-index-default)}:host-context(kirby-item) ion-radio{margin:0}:host-context(kirby-item)[slot=start]{margin-block:0;margin-inline-end:12px}\n"]
|
|
118
|
+
}]
|
|
119
|
+
}],
|
|
120
|
+
ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.IonicElementPartHelper }],
|
|
121
|
+
propDecorators: {
|
|
122
|
+
ionRadioElement: [{
|
|
123
|
+
type: ViewChild,
|
|
124
|
+
args: [IonRadio, {
|
|
125
|
+
read: ElementRef,
|
|
126
|
+
static: true
|
|
127
|
+
}]
|
|
128
|
+
}],
|
|
129
|
+
value: [{ type: Input }],
|
|
130
|
+
text: [{ type: Input }],
|
|
131
|
+
size: [{
|
|
132
|
+
type: HostBinding,
|
|
133
|
+
args: ["class"]
|
|
134
|
+
}, { type: Input }],
|
|
135
|
+
disabled: [{ type: Input }],
|
|
136
|
+
_isDisabled: [{
|
|
137
|
+
type: HostBinding,
|
|
138
|
+
args: ["attr.disabled"]
|
|
139
|
+
}],
|
|
140
|
+
_labelText: [{
|
|
141
|
+
type: HostBinding,
|
|
142
|
+
args: ["class.has-hidden-label"]
|
|
143
|
+
}]
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
var RadioGroupComponent = class RadioGroupComponent {
|
|
147
|
+
constructor(cdr, element, renderer) {
|
|
148
|
+
this.cdr = cdr;
|
|
149
|
+
this.element = element;
|
|
150
|
+
this.renderer = renderer;
|
|
151
|
+
this._hasError = false;
|
|
152
|
+
this.hasErrorChange = new EventEmitter();
|
|
153
|
+
this.itemTextProperty = "text";
|
|
154
|
+
this.itemDisabledProperty = "disabled";
|
|
155
|
+
this.valueChange = new EventEmitter();
|
|
156
|
+
this._disabled = false;
|
|
157
|
+
this._items = [];
|
|
158
|
+
this._onChangeCallback = () => {};
|
|
159
|
+
this._onTouched = () => {};
|
|
160
|
+
this._selectedIndex = -1;
|
|
161
|
+
this._value = null;
|
|
162
|
+
this._attributesToForward = ["aria-label", "aria-labelledby"];
|
|
163
|
+
}
|
|
164
|
+
get disabled() {
|
|
165
|
+
return this._disabled;
|
|
166
|
+
}
|
|
167
|
+
set disabled(value) {
|
|
168
|
+
this._disabled = value;
|
|
169
|
+
this.setProjectedRadiosDisabledState(value);
|
|
170
|
+
}
|
|
171
|
+
get hasError() {
|
|
172
|
+
return this._hasError;
|
|
173
|
+
}
|
|
174
|
+
set hasError(value) {
|
|
175
|
+
if (this._hasError !== value) {
|
|
176
|
+
this._hasError = value;
|
|
177
|
+
this.hasErrorChange.emit(this._hasError);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
get interactiveElement() {
|
|
181
|
+
return this.element?.nativeElement?.querySelector("ion-radio-group");
|
|
182
|
+
}
|
|
183
|
+
get items() {
|
|
184
|
+
return this._items || [];
|
|
185
|
+
}
|
|
186
|
+
set items(value) {
|
|
187
|
+
if ((!value || !value.length) && !this.items.length) return;
|
|
188
|
+
this._items = value;
|
|
189
|
+
this.refreshSelectionState();
|
|
190
|
+
}
|
|
191
|
+
get selectedIndex() {
|
|
192
|
+
return this._selectedIndex;
|
|
193
|
+
}
|
|
194
|
+
set selectedIndex(value) {
|
|
195
|
+
if (typeof value === "string") value = parseInt(value);
|
|
196
|
+
if (value === void 0 || value === null || Number.isNaN(value)) value = -1;
|
|
197
|
+
if (value === this.selectedIndex) return;
|
|
198
|
+
this._selectedIndex = value;
|
|
199
|
+
this._value = this.getValueFromSelectedIndex() || null;
|
|
200
|
+
}
|
|
201
|
+
get value() {
|
|
202
|
+
return this._value;
|
|
203
|
+
}
|
|
204
|
+
set value(value) {
|
|
205
|
+
this.setSelectedItem(value);
|
|
206
|
+
}
|
|
207
|
+
get hasValue() {
|
|
208
|
+
return this.value !== void 0 && this.value !== null;
|
|
209
|
+
}
|
|
210
|
+
get hasItemsFromContentProjection() {
|
|
211
|
+
return !this.items.length && !this._customItemTemplate && this.projectedRadioButtons && this.projectedRadioButtons.length > 0;
|
|
212
|
+
}
|
|
213
|
+
focus() {
|
|
214
|
+
const findFocusable = (radios) => radios && radios.find((radio) => !isNaN(radio.buttonTabIndex) && radio.buttonTabIndex !== -1);
|
|
215
|
+
(findFocusable(this.radioButtons) || findFocusable(this.projectedRadioButtons))?.focus();
|
|
216
|
+
}
|
|
217
|
+
ngAfterContentInit() {
|
|
218
|
+
this.initSelectionStateFromProjectedContent();
|
|
219
|
+
this.listenForProjectedRadiosChange();
|
|
220
|
+
}
|
|
221
|
+
ngAfterViewInit() {
|
|
222
|
+
forwardAttributes(this.element.nativeElement, this._attributesToForward, this.renderer, this.element.nativeElement.querySelector("ion-radio-group"));
|
|
223
|
+
}
|
|
224
|
+
registerOnChange(fn) {
|
|
225
|
+
this._onChangeCallback = fn;
|
|
226
|
+
}
|
|
227
|
+
registerOnTouched(fn) {
|
|
228
|
+
this._onTouched = fn;
|
|
229
|
+
}
|
|
230
|
+
setDisabledState(isDisabled) {
|
|
231
|
+
this.disabled = isDisabled;
|
|
232
|
+
this.cdr.markForCheck();
|
|
233
|
+
}
|
|
234
|
+
writeValue(value) {
|
|
235
|
+
this.value = value;
|
|
236
|
+
this.cdr.markForCheck();
|
|
237
|
+
}
|
|
238
|
+
_getTextFromItem(item) {
|
|
239
|
+
if (!item) return null;
|
|
240
|
+
return typeof item === "string" ? item : item[this.itemTextProperty];
|
|
241
|
+
}
|
|
242
|
+
_getDisabledStateFromItem(item) {
|
|
243
|
+
if (!item) return void 0;
|
|
244
|
+
return typeof item === "string" ? void 0 : item[this.itemDisabledProperty];
|
|
245
|
+
}
|
|
246
|
+
_onChange(value) {
|
|
247
|
+
if (value === this._value) return;
|
|
248
|
+
this.setSelectedItem(value);
|
|
249
|
+
this.valueChange.emit(value);
|
|
250
|
+
this._onChangeCallback(value);
|
|
251
|
+
}
|
|
252
|
+
_onRadioBlur() {
|
|
253
|
+
this._onTouched();
|
|
254
|
+
}
|
|
255
|
+
getIndexOfSelectedValue() {
|
|
256
|
+
if (!this.hasValue) return -1;
|
|
257
|
+
return this.hasItemsFromContentProjection ? this.getIndexOfProjectedRadio(this.value) : this.items.indexOf(this.value);
|
|
258
|
+
}
|
|
259
|
+
getIndexOfProjectedRadio(value) {
|
|
260
|
+
let selectedIndex = -1;
|
|
261
|
+
this.projectedRadioButtons?.find((radio, i) => {
|
|
262
|
+
const found = radio.value === value;
|
|
263
|
+
if (found) selectedIndex = i;
|
|
264
|
+
return found;
|
|
265
|
+
});
|
|
266
|
+
return selectedIndex;
|
|
267
|
+
}
|
|
268
|
+
getValueFromSelectedIndex() {
|
|
269
|
+
if (this.selectedIndex === -1) return;
|
|
270
|
+
return this.hasItemsFromContentProjection ? this.getValueFromProjectedRadios(this.selectedIndex) : this.items[this.selectedIndex];
|
|
271
|
+
}
|
|
272
|
+
getValueFromProjectedRadios(index) {
|
|
273
|
+
const radio = this.projectedRadioButtons && this.projectedRadioButtons.find((_, i) => {
|
|
274
|
+
return i === index;
|
|
275
|
+
});
|
|
276
|
+
return radio && radio.value;
|
|
277
|
+
}
|
|
278
|
+
initSelectionStateFromProjectedContent() {
|
|
279
|
+
if (this.hasItemsFromContentProjection) this.refreshSelectionState();
|
|
280
|
+
}
|
|
281
|
+
listenForProjectedRadiosChange() {
|
|
282
|
+
this.projectedRadioButtons.changes.subscribe(() => {
|
|
283
|
+
this.refreshStateFromProjectedContent();
|
|
284
|
+
if (this.disabled) setTimeout(() => this.setProjectedRadiosDisabledState(this.disabled));
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
refreshSelectionState() {
|
|
288
|
+
if (this.hasValue) this._selectedIndex = this.getIndexOfSelectedValue();
|
|
289
|
+
const valueFromSelectedIndex = this.getValueFromSelectedIndex();
|
|
290
|
+
this._value = valueFromSelectedIndex !== void 0 ? valueFromSelectedIndex : null;
|
|
291
|
+
}
|
|
292
|
+
refreshStateFromProjectedContent() {
|
|
293
|
+
if (this._customItemTemplate) return;
|
|
294
|
+
this.cdr.markForCheck();
|
|
295
|
+
this.refreshSelectionState();
|
|
296
|
+
}
|
|
297
|
+
setSelectedItem(value) {
|
|
298
|
+
if (value === this._value) return;
|
|
299
|
+
this._value = value;
|
|
300
|
+
this._selectedIndex = this.getIndexOfSelectedValue();
|
|
301
|
+
}
|
|
302
|
+
setProjectedRadiosDisabledState(isDisabled) {
|
|
303
|
+
if (!this.projectedRadioButtons || !this.projectedRadioButtons.length) return;
|
|
304
|
+
this.projectedRadioButtons.forEach((radio, index) => {
|
|
305
|
+
radio.disabled = isDisabled || this._getDisabledStateFromItem(this.items[index]);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
static {
|
|
309
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
310
|
+
minVersion: "12.0.0",
|
|
311
|
+
version: "22.2.3",
|
|
312
|
+
ngImport: i0,
|
|
313
|
+
type: RadioGroupComponent,
|
|
314
|
+
deps: [
|
|
315
|
+
{ token: i0.ChangeDetectorRef },
|
|
316
|
+
{ token: i0.ElementRef },
|
|
317
|
+
{ token: i0.Renderer2 }
|
|
318
|
+
],
|
|
319
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
static {
|
|
323
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
324
|
+
minVersion: "17.0.0",
|
|
325
|
+
version: "22.2.3",
|
|
326
|
+
type: RadioGroupComponent,
|
|
327
|
+
isStandalone: true,
|
|
328
|
+
selector: "kirby-radio-group",
|
|
329
|
+
inputs: {
|
|
330
|
+
disabled: "disabled",
|
|
331
|
+
hasError: "hasError",
|
|
332
|
+
items: "items",
|
|
333
|
+
itemTextProperty: "itemTextProperty",
|
|
334
|
+
itemDisabledProperty: "itemDisabledProperty",
|
|
335
|
+
selectedIndex: "selectedIndex",
|
|
336
|
+
value: "value"
|
|
337
|
+
},
|
|
338
|
+
outputs: {
|
|
339
|
+
hasErrorChange: "hasErrorChange",
|
|
340
|
+
valueChange: "valueChange"
|
|
341
|
+
},
|
|
342
|
+
host: {
|
|
343
|
+
listeners: { "ionBlur": "_onRadioBlur()" },
|
|
344
|
+
properties: { "class.error": "this.hasError" }
|
|
345
|
+
},
|
|
346
|
+
providers: [{
|
|
347
|
+
provide: NG_VALUE_ACCESSOR,
|
|
348
|
+
useExisting: RadioGroupComponent,
|
|
349
|
+
multi: true
|
|
350
|
+
}, {
|
|
351
|
+
provide: FORM_FIELD_CONTROL,
|
|
352
|
+
useExisting: RadioGroupComponent
|
|
353
|
+
}],
|
|
354
|
+
queries: [{
|
|
355
|
+
propertyName: "_customItemTemplate",
|
|
356
|
+
first: true,
|
|
357
|
+
predicate: ListItemTemplateDirective,
|
|
358
|
+
descendants: true,
|
|
359
|
+
read: TemplateRef
|
|
360
|
+
}, {
|
|
361
|
+
propertyName: "projectedRadioButtons",
|
|
362
|
+
predicate: RadioComponent,
|
|
363
|
+
descendants: true
|
|
364
|
+
}],
|
|
365
|
+
viewQueries: [{
|
|
366
|
+
propertyName: "radioButtons",
|
|
367
|
+
predicate: RadioComponent,
|
|
368
|
+
descendants: true
|
|
369
|
+
}],
|
|
370
|
+
ngImport: i0,
|
|
371
|
+
template: "<ion-radio-group\n [value]=\"value\"\n (ionChange)=\"_onChange($event.detail.value)\"\n [attr.aria-invalid]=\"hasError\"\n>\n @if (!items || !items.length) {\n <ng-content></ng-content>\n } @else {\n @for (item of items; track _getTextFromItem(item)) {\n <ng-container\n *ngTemplateOutlet=\"\n _customItemTemplate || defaultItemTemplate;\n context: { $implicit: item, selected: $index === selectedIndex, index: $index }\n \"\n ></ng-container>\n }\n }\n</ion-radio-group>\n\n<ng-template #defaultItemTemplate let-item>\n <kirby-radio\n [value]=\"item\"\n [disabled]=\"disabled || _getDisabledStateFromItem(item)\"\n [text]=\"_getTextFromItem(item)\"\n ></kirby-radio>\n</ng-template>\n",
|
|
372
|
+
styles: ["ion-radio-group{display:inherit;flex-wrap:inherit}\n"],
|
|
373
|
+
dependencies: [
|
|
374
|
+
{
|
|
375
|
+
kind: "component",
|
|
376
|
+
type: IonRadioGroup,
|
|
377
|
+
selector: "ion-radio-group",
|
|
378
|
+
inputs: [
|
|
379
|
+
"allowEmptySelection",
|
|
380
|
+
"compareWith",
|
|
381
|
+
"errorText",
|
|
382
|
+
"helperText",
|
|
383
|
+
"name",
|
|
384
|
+
"value"
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
kind: "directive",
|
|
389
|
+
type: NgTemplateOutlet,
|
|
390
|
+
selector: "[ngTemplateOutlet]",
|
|
391
|
+
inputs: [
|
|
392
|
+
"ngTemplateOutletContext",
|
|
393
|
+
"ngTemplateOutlet",
|
|
394
|
+
"ngTemplateOutletInjector"
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
kind: "component",
|
|
399
|
+
type: RadioComponent,
|
|
400
|
+
selector: "kirby-radio",
|
|
401
|
+
inputs: [
|
|
402
|
+
"value",
|
|
403
|
+
"text",
|
|
404
|
+
"size",
|
|
405
|
+
"disabled"
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
],
|
|
409
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
414
|
+
minVersion: "12.0.0",
|
|
415
|
+
version: "22.2.3",
|
|
416
|
+
ngImport: i0,
|
|
417
|
+
type: RadioGroupComponent,
|
|
418
|
+
decorators: [{
|
|
419
|
+
type: Component,
|
|
420
|
+
args: [{
|
|
421
|
+
selector: "kirby-radio-group",
|
|
422
|
+
providers: [{
|
|
423
|
+
provide: NG_VALUE_ACCESSOR,
|
|
424
|
+
useExisting: RadioGroupComponent,
|
|
425
|
+
multi: true
|
|
426
|
+
}, {
|
|
427
|
+
provide: FORM_FIELD_CONTROL,
|
|
428
|
+
useExisting: RadioGroupComponent
|
|
429
|
+
}],
|
|
430
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
431
|
+
imports: [
|
|
432
|
+
IonRadioGroup,
|
|
433
|
+
NgTemplateOutlet,
|
|
434
|
+
RadioComponent
|
|
435
|
+
],
|
|
436
|
+
template: "<ion-radio-group\n [value]=\"value\"\n (ionChange)=\"_onChange($event.detail.value)\"\n [attr.aria-invalid]=\"hasError\"\n>\n @if (!items || !items.length) {\n <ng-content></ng-content>\n } @else {\n @for (item of items; track _getTextFromItem(item)) {\n <ng-container\n *ngTemplateOutlet=\"\n _customItemTemplate || defaultItemTemplate;\n context: { $implicit: item, selected: $index === selectedIndex, index: $index }\n \"\n ></ng-container>\n }\n }\n</ion-radio-group>\n\n<ng-template #defaultItemTemplate let-item>\n <kirby-radio\n [value]=\"item\"\n [disabled]=\"disabled || _getDisabledStateFromItem(item)\"\n [text]=\"_getTextFromItem(item)\"\n ></kirby-radio>\n</ng-template>\n",
|
|
437
|
+
styles: ["ion-radio-group{display:inherit;flex-wrap:inherit}\n"]
|
|
438
|
+
}]
|
|
439
|
+
}],
|
|
440
|
+
ctorParameters: () => [
|
|
441
|
+
{ type: i0.ChangeDetectorRef },
|
|
442
|
+
{ type: i0.ElementRef },
|
|
443
|
+
{ type: i0.Renderer2 }
|
|
444
|
+
],
|
|
445
|
+
propDecorators: {
|
|
446
|
+
disabled: [{ type: Input }],
|
|
447
|
+
hasError: [{
|
|
448
|
+
type: HostBinding,
|
|
449
|
+
args: ["class.error"]
|
|
450
|
+
}, { type: Input }],
|
|
451
|
+
hasErrorChange: [{ type: Output }],
|
|
452
|
+
items: [{ type: Input }],
|
|
453
|
+
itemTextProperty: [{ type: Input }],
|
|
454
|
+
itemDisabledProperty: [{ type: Input }],
|
|
455
|
+
selectedIndex: [{ type: Input }],
|
|
456
|
+
value: [{ type: Input }],
|
|
457
|
+
valueChange: [{ type: Output }],
|
|
458
|
+
_customItemTemplate: [{
|
|
459
|
+
type: ContentChild,
|
|
460
|
+
args: [ListItemTemplateDirective, { read: TemplateRef }]
|
|
461
|
+
}],
|
|
462
|
+
radioButtons: [{
|
|
463
|
+
type: ViewChildren,
|
|
464
|
+
args: [RadioComponent]
|
|
465
|
+
}],
|
|
466
|
+
projectedRadioButtons: [{
|
|
467
|
+
type: ContentChildren,
|
|
468
|
+
args: [RadioComponent, { descendants: true }]
|
|
469
|
+
}],
|
|
470
|
+
_onRadioBlur: [{
|
|
471
|
+
type: HostListener,
|
|
472
|
+
args: ["ionBlur"]
|
|
473
|
+
}]
|
|
474
|
+
}
|
|
475
|
+
});
|
|
348
476
|
const declarations = [RadioComponent, RadioGroupComponent];
|
|
349
|
-
class RadioModule {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
477
|
+
var RadioModule = class RadioModule {
|
|
478
|
+
static {
|
|
479
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
480
|
+
minVersion: "12.0.0",
|
|
481
|
+
version: "22.2.3",
|
|
482
|
+
ngImport: i0,
|
|
483
|
+
type: RadioModule,
|
|
484
|
+
deps: [],
|
|
485
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
static {
|
|
489
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
490
|
+
minVersion: "14.0.0",
|
|
491
|
+
version: "22.2.3",
|
|
492
|
+
ngImport: i0,
|
|
493
|
+
type: RadioModule,
|
|
494
|
+
imports: [
|
|
495
|
+
CommonModule,
|
|
496
|
+
IonRadio,
|
|
497
|
+
IonRadioGroup,
|
|
498
|
+
RadioComponent,
|
|
499
|
+
RadioGroupComponent
|
|
500
|
+
],
|
|
501
|
+
exports: [RadioComponent, RadioGroupComponent]
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
static {
|
|
505
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
506
|
+
minVersion: "12.0.0",
|
|
507
|
+
version: "22.2.3",
|
|
508
|
+
ngImport: i0,
|
|
509
|
+
type: RadioModule,
|
|
510
|
+
imports: [
|
|
511
|
+
CommonModule,
|
|
512
|
+
IonRadio,
|
|
513
|
+
IonRadioGroup,
|
|
514
|
+
declarations
|
|
515
|
+
]
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
520
|
+
minVersion: "12.0.0",
|
|
521
|
+
version: "22.2.3",
|
|
522
|
+
ngImport: i0,
|
|
523
|
+
type: RadioModule,
|
|
524
|
+
decorators: [{
|
|
525
|
+
type: NgModule,
|
|
526
|
+
args: [{
|
|
527
|
+
imports: [
|
|
528
|
+
CommonModule,
|
|
529
|
+
IonRadio,
|
|
530
|
+
IonRadioGroup,
|
|
531
|
+
...declarations
|
|
532
|
+
],
|
|
533
|
+
exports: [...declarations]
|
|
534
|
+
}]
|
|
535
|
+
}]
|
|
536
|
+
});
|
|
366
537
|
export { RadioComponent, RadioGroupComponent, RadioModule };
|
|
367
|
-
|
|
538
|
+
|
|
539
|
+
//# sourceMappingURL=kirbydesign-designsystem-radio.mjs.map
|