@riverty/web-components 6.2.0 → 6.3.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/CHANGELOG.md +30 -0
- package/README.md +78 -0
- package/custom-elements.json +4 -0
- package/package.json +3 -2
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
- package/dist/cjs/focusable-Oll_rmtP.js +0 -28
- package/dist/cjs/formData-B2DZyLxP.js +0 -44
- package/dist/cjs/index-BnETQtSf.js +0 -1834
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -13
- package/dist/cjs/r-accordion-panel.cjs.entry.js +0 -24
- package/dist/cjs/r-accordion-section.cjs.entry.js +0 -125
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +0 -93
- package/dist/cjs/r-accordion.cjs.entry.js +0 -20
- package/dist/cjs/r-alert.cjs.entry.js +0 -146
- package/dist/cjs/r-badge.cjs.entry.js +0 -40
- package/dist/cjs/r-button.cjs.entry.js +0 -149
- package/dist/cjs/r-checkbox-group.cjs.entry.js +0 -232
- package/dist/cjs/r-checkbox.cjs.entry.js +0 -269
- package/dist/cjs/r-design-system-devtools.cjs.entry.js +0 -31
- package/dist/cjs/r-dialog.cjs.entry.js +0 -107
- package/dist/cjs/r-hint_2.cjs.entry.js +0 -50
- package/dist/cjs/r-icon-button_2.cjs.entry.js +0 -467
- package/dist/cjs/r-icon.cjs.entry.js +0 -284
- package/dist/cjs/r-illustration.cjs.entry.js +0 -396
- package/dist/cjs/r-input-code.cjs.entry.js +0 -432
- package/dist/cjs/r-input-date.cjs.entry.js +0 -519
- package/dist/cjs/r-input-password.cjs.entry.js +0 -265
- package/dist/cjs/r-input-phone-number.cjs.entry.js +0 -2525
- package/dist/cjs/r-input.cjs.entry.js +0 -402
- package/dist/cjs/r-list-item.cjs.entry.js +0 -109
- package/dist/cjs/r-pagination.cjs.entry.js +0 -314
- package/dist/cjs/r-panel.cjs.entry.js +0 -184
- package/dist/cjs/r-popover-action.cjs.entry.js +0 -80
- package/dist/cjs/r-popover-content.cjs.entry.js +0 -62
- package/dist/cjs/r-popover-headline.cjs.entry.js +0 -28
- package/dist/cjs/r-popover-trigger.cjs.entry.js +0 -70
- package/dist/cjs/r-popover.cjs.entry.js +0 -347
- package/dist/cjs/r-progress-bar.cjs.entry.js +0 -25
- package/dist/cjs/r-radio-button-description.cjs.entry.js +0 -18
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +0 -18
- package/dist/cjs/r-radio-button-title.cjs.entry.js +0 -18
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +0 -18
- package/dist/cjs/r-radio-button.cjs.entry.js +0 -139
- package/dist/cjs/r-radio-group.cjs.entry.js +0 -425
- package/dist/cjs/r-select-option.cjs.entry.js +0 -130
- package/dist/cjs/r-select.cjs.entry.js +0 -1101
- package/dist/cjs/r-skip-link.cjs.entry.js +0 -19
- package/dist/cjs/r-stepper-item.cjs.entry.js +0 -42
- package/dist/cjs/r-stepper.cjs.entry.js +0 -99
- package/dist/cjs/r-tab-panel.cjs.entry.js +0 -26
- package/dist/cjs/r-tab.cjs.entry.js +0 -62
- package/dist/cjs/r-tabs-list.cjs.entry.js +0 -175
- package/dist/cjs/r-tabs.cjs.entry.js +0 -277
- package/dist/cjs/r-textarea.cjs.entry.js +0 -270
- package/dist/cjs/r-toast-group.cjs.entry.js +0 -46
- package/dist/cjs/r-toast.cjs.entry.js +0 -306
- package/dist/cjs/style-observer-D9zSP9wP.js +0 -1118
- package/dist/cjs/theming-NqxjhVJS.js +0 -109
- package/dist/cjs/web-components.cjs.js +0 -25
- package/dist/collection/collection-manifest.json +0 -60
- package/dist/collection/components/accordion/accordion.css +0 -24
- package/dist/collection/components/accordion/accordion.js +0 -90
- package/dist/collection/components/accordion/exports.js +0 -1
- package/dist/collection/components/accordion-panel/accordion-panel.css +0 -50
- package/dist/collection/components/accordion-panel/accordion-panel.js +0 -86
- package/dist/collection/components/accordion-section/accordion-section.css +0 -27
- package/dist/collection/components/accordion-section/accordion-section.js +0 -235
- package/dist/collection/components/accordion-trigger/accordion-trigger.css +0 -93
- package/dist/collection/components/accordion-trigger/accordion-trigger.js +0 -220
- package/dist/collection/components/alert/alert.css +0 -119
- package/dist/collection/components/alert/alert.js +0 -526
- package/dist/collection/components/alert/exports.js +0 -2
- package/dist/collection/components/badge/badge.css +0 -52
- package/dist/collection/components/badge/badge.js +0 -120
- package/dist/collection/components/badge/exports.js +0 -1
- package/dist/collection/components/button/button.css +0 -180
- package/dist/collection/components/button/button.js +0 -510
- package/dist/collection/components/button/exports.js +0 -5
- package/dist/collection/components/checkbox/checkbox.css +0 -116
- package/dist/collection/components/checkbox/checkbox.js +0 -777
- package/dist/collection/components/checkbox-group/checkbox-group.css +0 -48
- package/dist/collection/components/checkbox-group/checkbox-group.js +0 -718
- package/dist/collection/components/design-system-devtools/design-system-devtools.js +0 -59
- package/dist/collection/components/dialog/dialog.css +0 -125
- package/dist/collection/components/dialog/dialog.js +0 -345
- package/dist/collection/components/dialog/exports.js +0 -9
- package/dist/collection/components/hint/exports.js +0 -1
- package/dist/collection/components/hint/hint.css +0 -63
- package/dist/collection/components/hint/hint.js +0 -114
- package/dist/collection/components/icon/all-kit.js +0 -2
- package/dist/collection/components/icon/data.js +0 -90
- package/dist/collection/components/icon/exports.js +0 -7
- package/dist/collection/components/icon/icon.css +0 -105
- package/dist/collection/components/icon/icon.js +0 -379
- package/dist/collection/components/icon/riverty-kit.js +0 -2
- package/dist/collection/components/icon-button/icon-button.css +0 -105
- package/dist/collection/components/icon-button/icon-button.js +0 -343
- package/dist/collection/components/illustration/data.js +0 -112
- package/dist/collection/components/illustration/exports.js +0 -3
- package/dist/collection/components/illustration/illustration.js +0 -540
- package/dist/collection/components/illustration/illustration.scss +0 -56
- package/dist/collection/components/illustration/illustrations-ui-kit.js +0 -2
- package/dist/collection/components/input/exports.js +0 -16
- package/dist/collection/components/input/input.css +0 -180
- package/dist/collection/components/input/input.js +0 -1572
- package/dist/collection/components/input-code/exports.js +0 -2
- package/dist/collection/components/input-code/input-code.css +0 -127
- package/dist/collection/components/input-code/input-code.js +0 -1139
- package/dist/collection/components/input-date/exports.js +0 -1
- package/dist/collection/components/input-date/input-date.css +0 -148
- package/dist/collection/components/input-date/input-date.js +0 -1228
- package/dist/collection/components/input-password/exports.js +0 -1
- package/dist/collection/components/input-password/input-password.css +0 -25
- package/dist/collection/components/input-password/input-password.js +0 -1051
- package/dist/collection/components/input-phone-number/input-phone-number.css +0 -61
- package/dist/collection/components/input-phone-number/input-phone-number.js +0 -874
- package/dist/collection/components/label/label.css +0 -38
- package/dist/collection/components/label/label.js +0 -47
- package/dist/collection/components/list-item/list-item/exports.js +0 -2
- package/dist/collection/components/list-item/list-item/list-item.css +0 -199
- package/dist/collection/components/list-item/list-item/list-item.js +0 -467
- package/dist/collection/components/pagination/exports.js +0 -3
- package/dist/collection/components/pagination/pagination.css +0 -118
- package/dist/collection/components/pagination/pagination.js +0 -799
- package/dist/collection/components/panel/exports.js +0 -1
- package/dist/collection/components/panel/panel.css +0 -192
- package/dist/collection/components/panel/panel.js +0 -473
- package/dist/collection/components/popover/exports.js +0 -3
- package/dist/collection/components/popover/popover.css +0 -251
- package/dist/collection/components/popover/popover.js +0 -741
- package/dist/collection/components/popover-action/popover-action.css +0 -21
- package/dist/collection/components/popover-action/popover-action.js +0 -150
- package/dist/collection/components/popover-content/popover-content.css +0 -9
- package/dist/collection/components/popover-content/popover-content.js +0 -130
- package/dist/collection/components/popover-headline/popover-headline.css +0 -7
- package/dist/collection/components/popover-headline/popover-headline.js +0 -28
- package/dist/collection/components/popover-trigger/exports.js +0 -1
- package/dist/collection/components/popover-trigger/popover-trigger.css +0 -4
- package/dist/collection/components/popover-trigger/popover-trigger.js +0 -163
- package/dist/collection/components/progress-bar/progress-bar.css +0 -41
- package/dist/collection/components/progress-bar/progress-bar.js +0 -71
- package/dist/collection/components/radio-button/radio-button.css +0 -126
- package/dist/collection/components/radio-button/radio-button.js +0 -559
- package/dist/collection/components/radio-button-description/radio-button-description.css +0 -5
- package/dist/collection/components/radio-button-description/radio-button-description.js +0 -22
- package/dist/collection/components/radio-button-leading/radio-button-leading.css +0 -3
- package/dist/collection/components/radio-button-leading/radio-button-leading.js +0 -22
- package/dist/collection/components/radio-button-title/radio-button-title.css +0 -8
- package/dist/collection/components/radio-button-title/radio-button-title.js +0 -22
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.css +0 -6
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +0 -22
- package/dist/collection/components/radio-group/exports.js +0 -1
- package/dist/collection/components/radio-group/radio-group.css +0 -65
- package/dist/collection/components/radio-group/radio-group.js +0 -1020
- package/dist/collection/components/select/exports.js +0 -1
- package/dist/collection/components/select/select.css +0 -247
- package/dist/collection/components/select/select.js +0 -2011
- package/dist/collection/components/select-option/select-option.css +0 -93
- package/dist/collection/components/select-option/select-option.js +0 -459
- package/dist/collection/components/skip-link/exports.js +0 -1
- package/dist/collection/components/skip-link/skip-link.css +0 -37
- package/dist/collection/components/skip-link/skip-link.js +0 -52
- package/dist/collection/components/stepper/stepper.css +0 -25
- package/dist/collection/components/stepper/stepper.js +0 -216
- package/dist/collection/components/stepper-item/stepper-item.css +0 -62
- package/dist/collection/components/stepper-item/stepper-item.js +0 -171
- package/dist/collection/components/tab/tab.css +0 -81
- package/dist/collection/components/tab/tab.js +0 -169
- package/dist/collection/components/tab-panel/tab-panel.css +0 -19
- package/dist/collection/components/tab-panel/tab-panel.js +0 -72
- package/dist/collection/components/tabs/tabs.css +0 -4
- package/dist/collection/components/tabs/tabs.js +0 -345
- package/dist/collection/components/tabs-list/exports.js +0 -2
- package/dist/collection/components/tabs-list/tabs-list.css +0 -58
- package/dist/collection/components/tabs-list/tabs-list.js +0 -294
- package/dist/collection/components/textarea/exports.js +0 -8
- package/dist/collection/components/textarea/textarea.css +0 -148
- package/dist/collection/components/textarea/textarea.js +0 -1055
- package/dist/collection/components/toast/exports.js +0 -3
- package/dist/collection/components/toast/toast.css +0 -179
- package/dist/collection/components/toast/toast.js +0 -812
- package/dist/collection/components/toast-group/exports.js +0 -1
- package/dist/collection/components/toast-group/toast-group.css +0 -37
- package/dist/collection/components/toast-group/toast-group.js +0 -49
- package/dist/collection/components/tooltip/exports.js +0 -3
- package/dist/collection/components/tooltip/tooltip.css +0 -106
- package/dist/collection/components/tooltip/tooltip.js +0 -500
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/focusable.js +0 -24
- package/dist/collection/utils/formData.js +0 -40
- package/dist/collection/utils/theming.js +0 -103
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/focusable-ky1yonnS.js +0 -26
- package/dist/esm/formData-DvLT8-y3.js +0 -42
- package/dist/esm/index-CTxpqopm.js +0 -1806
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -11
- package/dist/esm/r-accordion-panel.entry.js +0 -22
- package/dist/esm/r-accordion-section.entry.js +0 -123
- package/dist/esm/r-accordion-trigger.entry.js +0 -91
- package/dist/esm/r-accordion.entry.js +0 -18
- package/dist/esm/r-alert.entry.js +0 -144
- package/dist/esm/r-badge.entry.js +0 -38
- package/dist/esm/r-button.entry.js +0 -147
- package/dist/esm/r-checkbox-group.entry.js +0 -230
- package/dist/esm/r-checkbox.entry.js +0 -267
- package/dist/esm/r-design-system-devtools.entry.js +0 -29
- package/dist/esm/r-dialog.entry.js +0 -105
- package/dist/esm/r-hint_2.entry.js +0 -47
- package/dist/esm/r-icon-button_2.entry.js +0 -464
- package/dist/esm/r-icon.entry.js +0 -282
- package/dist/esm/r-illustration.entry.js +0 -394
- package/dist/esm/r-input-code.entry.js +0 -430
- package/dist/esm/r-input-date.entry.js +0 -517
- package/dist/esm/r-input-password.entry.js +0 -263
- package/dist/esm/r-input-phone-number.entry.js +0 -2523
- package/dist/esm/r-input.entry.js +0 -400
- package/dist/esm/r-list-item.entry.js +0 -107
- package/dist/esm/r-pagination.entry.js +0 -312
- package/dist/esm/r-panel.entry.js +0 -182
- package/dist/esm/r-popover-action.entry.js +0 -78
- package/dist/esm/r-popover-content.entry.js +0 -60
- package/dist/esm/r-popover-headline.entry.js +0 -26
- package/dist/esm/r-popover-trigger.entry.js +0 -68
- package/dist/esm/r-popover.entry.js +0 -345
- package/dist/esm/r-progress-bar.entry.js +0 -23
- package/dist/esm/r-radio-button-description.entry.js +0 -16
- package/dist/esm/r-radio-button-leading.entry.js +0 -16
- package/dist/esm/r-radio-button-title.entry.js +0 -16
- package/dist/esm/r-radio-button-trailing.entry.js +0 -16
- package/dist/esm/r-radio-button.entry.js +0 -137
- package/dist/esm/r-radio-group.entry.js +0 -423
- package/dist/esm/r-select-option.entry.js +0 -128
- package/dist/esm/r-select.entry.js +0 -1099
- package/dist/esm/r-skip-link.entry.js +0 -17
- package/dist/esm/r-stepper-item.entry.js +0 -40
- package/dist/esm/r-stepper.entry.js +0 -97
- package/dist/esm/r-tab-panel.entry.js +0 -24
- package/dist/esm/r-tab.entry.js +0 -60
- package/dist/esm/r-tabs-list.entry.js +0 -173
- package/dist/esm/r-tabs.entry.js +0 -275
- package/dist/esm/r-textarea.entry.js +0 -268
- package/dist/esm/r-toast-group.entry.js +0 -44
- package/dist/esm/r-toast.entry.js +0 -304
- package/dist/esm/style-observer-4Uv3PpKT.js +0 -1116
- package/dist/esm/theming-DD2IrjpG.js +0 -106
- package/dist/esm/web-components.js +0 -21
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/types/components/accordion/accordion.d.ts +0 -27
- package/dist/types/components/accordion/exports.d.ts +0 -2
- package/dist/types/components/accordion-panel/accordion-panel.d.ts +0 -10
- package/dist/types/components/accordion-section/accordion-section.d.ts +0 -36
- package/dist/types/components/accordion-trigger/accordion-trigger.d.ts +0 -33
- package/dist/types/components/alert/alert.d.ts +0 -67
- package/dist/types/components/alert/exports.d.ts +0 -4
- package/dist/types/components/badge/badge.d.ts +0 -23
- package/dist/types/components/badge/exports.d.ts +0 -2
- package/dist/types/components/button/button.d.ts +0 -89
- package/dist/types/components/button/exports.d.ts +0 -10
- package/dist/types/components/checkbox/checkbox.d.ts +0 -136
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +0 -122
- package/dist/types/components/design-system-devtools/design-system-devtools.d.ts +0 -15
- package/dist/types/components/dialog/dialog.d.ts +0 -69
- package/dist/types/components/dialog/exports.d.ts +0 -10
- package/dist/types/components/hint/exports.d.ts +0 -2
- package/dist/types/components/hint/hint.d.ts +0 -20
- package/dist/types/components/icon/all-kit.d.ts +0 -2890
- package/dist/types/components/icon/data.d.ts +0 -145
- package/dist/types/components/icon/exports.d.ts +0 -152
- package/dist/types/components/icon/icon.d.ts +0 -37
- package/dist/types/components/icon/riverty-kit.d.ts +0 -139
- package/dist/types/components/icon-button/icon-button.d.ts +0 -69
- package/dist/types/components/illustration/data.d.ts +0 -52
- package/dist/types/components/illustration/exports.d.ts +0 -23
- package/dist/types/components/illustration/illustration.d.ts +0 -51
- package/dist/types/components/illustration/illustrations-ui-kit.d.ts +0 -21
- package/dist/types/components/input/exports.d.ts +0 -10
- package/dist/types/components/input/input.d.ts +0 -300
- package/dist/types/components/input-code/exports.d.ts +0 -4
- package/dist/types/components/input-code/input-code.d.ts +0 -175
- package/dist/types/components/input-date/exports.d.ts +0 -5
- package/dist/types/components/input-date/input-date.d.ts +0 -172
- package/dist/types/components/input-password/exports.d.ts +0 -1
- package/dist/types/components/input-password/input-password.d.ts +0 -184
- package/dist/types/components/input-phone-number/input-phone-number.d.ts +0 -128
- package/dist/types/components/label/label.d.ts +0 -9
- package/dist/types/components/list-item/list-item/exports.d.ts +0 -4
- package/dist/types/components/list-item/list-item/list-item.d.ts +0 -61
- package/dist/types/components/pagination/exports.d.ts +0 -6
- package/dist/types/components/pagination/pagination.d.ts +0 -140
- package/dist/types/components/panel/exports.d.ts +0 -2
- package/dist/types/components/panel/panel.d.ts +0 -56
- package/dist/types/components/popover/exports.d.ts +0 -6
- package/dist/types/components/popover/popover.d.ts +0 -131
- package/dist/types/components/popover-action/popover-action.d.ts +0 -24
- package/dist/types/components/popover-content/popover-content.d.ts +0 -22
- package/dist/types/components/popover-headline/popover-headline.d.ts +0 -6
- package/dist/types/components/popover-trigger/exports.d.ts +0 -2
- package/dist/types/components/popover-trigger/popover-trigger.d.ts +0 -31
- package/dist/types/components/progress-bar/progress-bar.d.ts +0 -10
- package/dist/types/components/radio-button/radio-button.d.ts +0 -92
- package/dist/types/components/radio-button-description/radio-button-description.d.ts +0 -8
- package/dist/types/components/radio-button-leading/radio-button-leading.d.ts +0 -8
- package/dist/types/components/radio-button-title/radio-button-title.d.ts +0 -8
- package/dist/types/components/radio-button-trailing/radio-button-trailing.d.ts +0 -8
- package/dist/types/components/radio-group/exports.d.ts +0 -2
- package/dist/types/components/radio-group/radio-group.d.ts +0 -178
- package/dist/types/components/select/exports.d.ts +0 -2
- package/dist/types/components/select/select.d.ts +0 -317
- package/dist/types/components/select-option/select-option.d.ts +0 -113
- package/dist/types/components/skip-link/exports.d.ts +0 -2
- package/dist/types/components/skip-link/skip-link.d.ts +0 -6
- package/dist/types/components/stepper/stepper.d.ts +0 -22
- package/dist/types/components/stepper-item/stepper-item.d.ts +0 -23
- package/dist/types/components/tab/tab.d.ts +0 -23
- package/dist/types/components/tab-panel/tab-panel.d.ts +0 -7
- package/dist/types/components/tabs/tabs.d.ts +0 -49
- package/dist/types/components/tabs-list/exports.d.ts +0 -4
- package/dist/types/components/tabs-list/tabs-list.d.ts +0 -41
- package/dist/types/components/textarea/exports.d.ts +0 -2
- package/dist/types/components/textarea/textarea.d.ts +0 -158
- package/dist/types/components/toast/exports.d.ts +0 -6
- package/dist/types/components/toast/toast.d.ts +0 -146
- package/dist/types/components/toast-group/exports.d.ts +0 -2
- package/dist/types/components/toast-group/toast-group.d.ts +0 -9
- package/dist/types/components/tooltip/exports.d.ts +0 -6
- package/dist/types/components/tooltip/tooltip.d.ts +0 -131
- package/dist/types/components.d.ts +0 -6286
- package/dist/types/index.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +0 -1732
- package/dist/types/types/jsx-shim.d.ts +0 -13
- package/dist/types/types/style-observer.d.ts +0 -20
- package/dist/types/utils/focusable.d.ts +0 -1
- package/dist/types/utils/formData.d.ts +0 -1
- package/dist/types/utils/theming.d.ts +0 -15
- package/dist/web-components/index.esm.js +0 -0
- package/dist/web-components/p-02b22f8e.entry.js +0 -1
- package/dist/web-components/p-075a8dc8.entry.js +0 -1
- package/dist/web-components/p-0a34d33b.entry.js +0 -1
- package/dist/web-components/p-10cc9983.entry.js +0 -1
- package/dist/web-components/p-253068b9.entry.js +0 -1
- package/dist/web-components/p-3b8c8951.entry.js +0 -1
- package/dist/web-components/p-3beacdab.entry.js +0 -1
- package/dist/web-components/p-4214867d.entry.js +0 -1
- package/dist/web-components/p-42c857e9.entry.js +0 -1
- package/dist/web-components/p-44f87e16.entry.js +0 -1
- package/dist/web-components/p-477614c5.entry.js +0 -1
- package/dist/web-components/p-495ba3d2.entry.js +0 -1
- package/dist/web-components/p-4Uv3PpKT.js +0 -1
- package/dist/web-components/p-4de76291.entry.js +0 -1
- package/dist/web-components/p-55600d47.entry.js +0 -1
- package/dist/web-components/p-562051aa.entry.js +0 -1
- package/dist/web-components/p-5b850e0f.entry.js +0 -1
- package/dist/web-components/p-6013dfc8.entry.js +0 -1
- package/dist/web-components/p-62e7ae04.entry.js +0 -1
- package/dist/web-components/p-71519d37.entry.js +0 -1
- package/dist/web-components/p-88f7b47f.entry.js +0 -1
- package/dist/web-components/p-8975a6a3.entry.js +0 -1
- package/dist/web-components/p-8e125826.entry.js +0 -1
- package/dist/web-components/p-91cc0bde.entry.js +0 -1
- package/dist/web-components/p-93435fcd.entry.js +0 -1
- package/dist/web-components/p-947969d7.entry.js +0 -1
- package/dist/web-components/p-95396b5c.entry.js +0 -1
- package/dist/web-components/p-9de3a1a5.entry.js +0 -1
- package/dist/web-components/p-9f583ed1.entry.js +0 -1
- package/dist/web-components/p-B9rsR6cQ.js +0 -1
- package/dist/web-components/p-CTxpqopm.js +0 -2
- package/dist/web-components/p-DQuL1Twl.js +0 -1
- package/dist/web-components/p-DvLT8-y3.js +0 -1
- package/dist/web-components/p-a1086abe.entry.js +0 -1
- package/dist/web-components/p-bbba6d79.entry.js +0 -1
- package/dist/web-components/p-bde44ec4.entry.js +0 -1
- package/dist/web-components/p-bfc7e6c0.entry.js +0 -1
- package/dist/web-components/p-c1030394.entry.js +0 -1
- package/dist/web-components/p-c1f59ed1.entry.js +0 -1
- package/dist/web-components/p-c80a5541.entry.js +0 -1
- package/dist/web-components/p-c96ee61a.entry.js +0 -1
- package/dist/web-components/p-caf8f067.entry.js +0 -1
- package/dist/web-components/p-cc363c3d.entry.js +0 -1
- package/dist/web-components/p-cf4ff357.entry.js +0 -1
- package/dist/web-components/p-d0310ed4.entry.js +0 -1
- package/dist/web-components/p-d1412932.entry.js +0 -1
- package/dist/web-components/p-d2447e30.entry.js +0 -1
- package/dist/web-components/p-dc9cca06.entry.js +0 -1
- package/dist/web-components/p-e5b943a2.entry.js +0 -1
- package/dist/web-components/p-e67b13df.entry.js +0 -1
- package/dist/web-components/p-efec231a.entry.js +0 -1
- package/dist/web-components/p-f867e4c3.entry.js +0 -1
- package/dist/web-components/p-ky1yonnS.js +0 -1
- package/dist/web-components/web-components.esm.js +0 -1
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.d.ts +0 -24
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +0 -2
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BnETQtSf.js');
|
|
4
|
-
|
|
5
|
-
const buttonCss = ":host{display:inline-flex;vertical-align:top;opacity:1;outline:none}:host(:focus-within:not(:active)){--r-button--box-shadow:0 0 0 1px var(--r-border-focused-outlined, #fff),\n 0 0 0 3px var(--r-border-focused),\n 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-button--outline:2px solid var(--r-border-focused);--r-button--outline-offset:2px}:host(:hover:not(:active):not([disabled]:not([disabled=false]))){--r-button--border-color:var(--r-border-soft, #686868);--r-button--color:var(--r-text-regular, #282828);--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([disabled]:not([disabled=false])){--r-button--opacity:0.4;--r-button--cursor:not-allowed;--r-button--box-shadow:none}:host([size=small]){--r-button--font-size:var(--r-font-size-300, 0.875rem);--r-button--padding:0.642em 0.857em;--r-button--height:2.75rem}:host([icon-position=end]){--r-button--slot--flex-direction:row-reverse}:host([data-icon-only=start]){--r-button--padding:0.875em}:host([variant=secondary]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:var(--r-border-regular, #282828);--r-button--background-color:rgba(0,0,0,0)}:host([variant=secondary]:not([disabled]:not([disabled=false])):hover){--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));--r-button--border-color:var(--r-border-soft, #686868)}:host([variant=secondary] .r-button:not([aria-disabled=true]):active){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:var(--r-border-soft, #686868);--r-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([variant=text]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:rgba(0,0,0,0);--r-button--background-color:rgba(0,0,0,0);--r-button--slot--position:relative;--r-button--slot--text-decoration:underline}:host([variant=text]:hover:not([disabled]:not([disabled=false]))){--r-button--border-color:var(--r-border-soft, #686868);--r-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([variant=text] .r-button:not([aria-disabled=true]):active){--r-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12));--r-button--border-color:var(--r-border-soft, #686868)}:host([variant=text][text-position=left]){--r-button--padding:0.875em var(--spacing-175, 1.75rem) 0.875em 0}:host([variant=text][text-position=right]){--r-button--padding:0.875em 0 0.875em var(--spacing-175, 1.75rem)}:host([variant=text-inline]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:transparent;--r-button--background-color:transparent;--r-button--padding:0 0 0.5rem 0;--r-button--height:auto;--r-button--slot--text-decoration:underline}:host([variant=text-inline]:hover:not([disabled]:not([disabled=false]))){--r-button--slot--text-decoration:none;--r-button--border-color:transparent;--r-button--background-color:transparent}:host([variant=text-inline]:active:not([disabled]:not([disabled=false]))){--r-button--border-color:transparent;--r-button--background-color:transparent}:host([variant=blank]){--r-button--color:var(--r-text-regular, #282828);--r-button--border-color:rgba(0,0,0,0);--r-button--background-color:rgba(0,0,0,0);--r-button--border-width:0;--r-button--padding:0}:host([variant=blank]) .r-button:active{--r-button--border-width:0;--r-button--background-color:rgba(0,0,0,0)}:host([variant=blank]:hover:not([disabled]:not([disabled=false]))){--r-button--color:var(--r-text-regular, #282828)}:host([expanded]),:host([full-width]:not([full-width=false])){display:block;--r-button--display:flex;--r-button--width:100%}.r-button{display:var(--r-button--display, inline-flex);align-items:var(--r-button--align-items, center);justify-content:var(--r-button--justify-content, center);width:var(--r-button--width, auto);height:var(--r-button--height, 3rem);position:var(--r-button--position, static);top:var(--r-button--top, auto);left:var(--r-button--left, auto);box-sizing:var(--r-button--box-sizing, border-box);outline:var(--r-button--outline, none);outline-offset:var(--r-button--outline-offset, 0);cursor:var(--r-button--cursor, pointer);font-family:var(--r-button--font-family, var(--r-font-family-text, system-ui));font-weight:var(--r-button--font-weight, 400);text-align:var(--r-button--text-align, center);text-transform:var(--r-button--text-transform, uppercase);text-decoration:var(--r-button--text-decoration, none);background-color:var(--r-button--background-color, var(--r-background-interactive-regular, #282828));border-width:var(--r-button--border-width, 1px);border-style:var(--r-button--border-style, solid);border-color:var(--r-button--border-color, var(--r-border-strong, #000));color:var(--r-button--color, var(--r-text-inverse, #fff));font-size:var(--r-button--font-size, var(--r-font-size-400, 1rem));line-height:var(--r-button--line-height, 1);letter-spacing:var(--r-button--letter-spacing, 0.04em);padding:var(--r-button--padding, 0.875em var(--r-spacing-175, 1.75rem));box-shadow:var(--r-button--box-shadow, none);pointer-events:var(--r-button--pointer-events, auto);z-index:var(--r-button--z-index, initial);vertical-align:var(--r-button--vertical-align, top);opacity:var(--r-button--opacity, 1)}.r-button:not([aria-disabled=true]):active{--r-button--color:var(--r-button--color--active, var(--r-text-regular, #282828));--r-button--background-color:var(--r-button--background-color--active, var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12)));--r-button--border-color:var(--r-button--border-color--active, var(--r-border-soft, #686868))}.r-button--slot{position:var(--r-button--slot--position, relative);display:var(--r-button--slot--display, flex);flex:var(--r-button--slot--flex, 1);flex-direction:var(--r-button--slot--flex-direction, row);align-items:var(--r-button--slot--align-items, center);justify-content:var(--r-button--slot--justify-content, center);gap:var(--r-button--gap, 0.5em);font-weight:var(--r-button--slot--font-weight, var(--r-font-weight-regular, 400));text-decoration:var(--r-button--slot--text-decoration, none);text-decoration-color:var(--r-button--slot--text-decoration-color, var(--r-button-color, inherit));text-underline-offset:var(--r-button--slot--text-underline-offset, 0.5rem)}";
|
|
6
|
-
|
|
7
|
-
const Button = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.rClick = index.createEvent(this, "rClick");
|
|
11
|
-
/**
|
|
12
|
-
* Button behavior, corresponding to
|
|
13
|
-
* [native `type` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type)
|
|
14
|
-
*/
|
|
15
|
-
this.type = 'button';
|
|
16
|
-
/** Visual size */
|
|
17
|
-
this.size = 'large';
|
|
18
|
-
/** Presentational style */
|
|
19
|
-
this.variant = 'primary';
|
|
20
|
-
/** Position of an icon within button.
|
|
21
|
-
* Only use it when 'icon' is specified.
|
|
22
|
-
* */
|
|
23
|
-
this.iconPosition = 'start';
|
|
24
|
-
this._activateTmpButton = (formEl) => {
|
|
25
|
-
if (!formEl) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const { type } = this;
|
|
29
|
-
switch (type) {
|
|
30
|
-
case 'submit':
|
|
31
|
-
case 'reset': {
|
|
32
|
-
/* Create temporary button inside the <form>
|
|
33
|
-
and either submit or reset it based on button type */
|
|
34
|
-
const tmpButton = document.createElement('button');
|
|
35
|
-
tmpButton.type = type;
|
|
36
|
-
tmpButton.style.display = 'none';
|
|
37
|
-
formEl.appendChild(tmpButton);
|
|
38
|
-
tmpButton.click();
|
|
39
|
-
tmpButton.remove();
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Handles button action based on its type attribute
|
|
46
|
-
* @param {Event} event event<Event> from onClick on the component
|
|
47
|
-
*/
|
|
48
|
-
this.handleClick = (event) => {
|
|
49
|
-
if (this.disabled)
|
|
50
|
-
return;
|
|
51
|
-
if (!this.hasShadowDom)
|
|
52
|
-
return;
|
|
53
|
-
if (!this.isLink && this.isResetOrSubmit) {
|
|
54
|
-
event.preventDefault();
|
|
55
|
-
this._activateTmpButton(this.formEl);
|
|
56
|
-
}
|
|
57
|
-
this.rClick.emit();
|
|
58
|
-
};
|
|
59
|
-
this.handleSlotChange = () => {
|
|
60
|
-
this.host.setAttribute('data-icon-only', `${this.isIconOnly}`);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
handleIconChange() {
|
|
64
|
-
this.host.setAttribute('data-icon-only', `${this.isIconOnly}`);
|
|
65
|
-
}
|
|
66
|
-
/** Simulate a button click */
|
|
67
|
-
async triggerClick() {
|
|
68
|
-
var _a;
|
|
69
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.click();
|
|
70
|
-
}
|
|
71
|
-
/** Set focus on the button */
|
|
72
|
-
async setFocus() {
|
|
73
|
-
var _a;
|
|
74
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
75
|
-
}
|
|
76
|
-
/** Remove focus from the button */
|
|
77
|
-
async setBlur() {
|
|
78
|
-
var _a;
|
|
79
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
80
|
-
}
|
|
81
|
-
get hasText() {
|
|
82
|
-
return this.host.textContent.trim().length > 0;
|
|
83
|
-
}
|
|
84
|
-
get hasIcon() {
|
|
85
|
-
const isIconInSlot = this.host.querySelector('r-icon') !== null;
|
|
86
|
-
const isIconInShadow = this.host.shadowRoot.querySelector('r-icon') !== null;
|
|
87
|
-
return isIconInSlot || isIconInShadow;
|
|
88
|
-
}
|
|
89
|
-
get isIconOnly() {
|
|
90
|
-
return this.hasIcon && !this.hasText;
|
|
91
|
-
}
|
|
92
|
-
get isLink() {
|
|
93
|
-
return typeof this.href === 'string';
|
|
94
|
-
}
|
|
95
|
-
get hasShadowDom() {
|
|
96
|
-
const { host } = this;
|
|
97
|
-
return !!host.shadowRoot && !!host.attachShadow;
|
|
98
|
-
}
|
|
99
|
-
get formEl() {
|
|
100
|
-
const { form, host } = this;
|
|
101
|
-
/** If form attr contains form id */
|
|
102
|
-
if (typeof form === 'string') {
|
|
103
|
-
const formEl = document.getElementById(form);
|
|
104
|
-
if (formEl instanceof HTMLFormElement) {
|
|
105
|
-
return formEl;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/** If form attr is not defined checking for form as parent */
|
|
109
|
-
if (typeof form === 'undefined') {
|
|
110
|
-
const formEl = host.closest('form');
|
|
111
|
-
if (formEl instanceof HTMLFormElement) {
|
|
112
|
-
return formEl;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
get isResetOrSubmit() {
|
|
118
|
-
return this.type === 'submit' || this.type === 'reset';
|
|
119
|
-
}
|
|
120
|
-
get hasIconSlot() {
|
|
121
|
-
return !!this.host.querySelector('[slot="icon"]');
|
|
122
|
-
}
|
|
123
|
-
get ariaCurrentValue() {
|
|
124
|
-
const { rAriaCurrent } = this;
|
|
125
|
-
return !rAriaCurrent || rAriaCurrent === "false" ? null : rAriaCurrent;
|
|
126
|
-
}
|
|
127
|
-
componentDidLoad() {
|
|
128
|
-
this.host.dataset.iconOnly = `${this.isIconOnly}`;
|
|
129
|
-
}
|
|
130
|
-
render() {
|
|
131
|
-
const { type, disabled, form, href, target, isLink, icon, iconPosition, rAriaLabel } = this;
|
|
132
|
-
const linkAttr = disabled ? { 'aria-disabled': 'true', role: 'link' } : { href, target };
|
|
133
|
-
const btnAttr = { 'aria-disabled': `${disabled || false}`, disabled, type, form };
|
|
134
|
-
const attrs = isLink ? Object.assign({}, linkAttr) : Object.assign({}, btnAttr);
|
|
135
|
-
const iconAttrs = {
|
|
136
|
-
name: icon,
|
|
137
|
-
position: iconPosition
|
|
138
|
-
};
|
|
139
|
-
const TagName = isLink ? 'a' : 'button';
|
|
140
|
-
return (index.h(index.Host, { key: '031466e55efe7e99791d10758a20f4b37e907b00' }, index.h(TagName, Object.assign({ key: 'a3ae13e71992fd688a97ce7dda45d981cbc5dd6c', class: "r-button" }, attrs, { "aria-label": rAriaLabel || null, "aria-current": this.ariaCurrentValue, ref: (el) => (this.nativeElement = el), onClick: this.handleClick }), index.h("span", { key: 'da45d9ce4699302833b83c49b0767347fc4157e4', class: "r-button--slot" }, icon && index.h("r-icon", Object.assign({ key: 'dc20d6e8d16b4c179f2568467acda503eb0e89e2', name: icon }, iconAttrs, { size: "s" })), this.hasIconSlot && index.h("slot", { key: '43fbd25fd7d938ee2a7d872194ff72bc2d7695f3', name: "icon" }), index.h("div", { key: '26f26cf15e77c7e4b72992dee1a08851848fc0bd', style: { display: 'contents' } }, index.h("slot", { key: 'ce694ed33656d76e6e094a5655dc598ca6df4a5b', onSlotchange: this.handleSlotChange }))))));
|
|
141
|
-
}
|
|
142
|
-
get host() { return index.getElement(this); }
|
|
143
|
-
static get watchers() { return {
|
|
144
|
-
"icon": ["handleIconChange"]
|
|
145
|
-
}; }
|
|
146
|
-
};
|
|
147
|
-
Button.style = buttonCss;
|
|
148
|
-
|
|
149
|
-
exports.r_button = Button;
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BnETQtSf.js');
|
|
4
|
-
|
|
5
|
-
const checkboxGroupCss = ":host([show-select-all]:not([show-select-all=false])){--r-checkbox-group--content--margin-left:calc(1.5rem + 1rem);--r-checkbox-group--content--padding-left:var(--r-spacing-100, 1rem);--r-checkbox-group--label--hint--margin-bottom:0}:host([invalid]:not([invalid=false])) ::slotted(r-checkbox){--r-checkbox--box--border-color:var(--r-status-error-regular, #b00c15);--r-checkbox--box--background-color:var(--r-status-error-soft, #fef6f6);--r-checkbox--marker--color:var(--r-status-error-regular, #b00c15)}.r-checkbox-group{display:var(--r-checkbox-group--display, flex);flex-direction:var(--r-checkbox-group--flex-direction, column);border:var(--r-checkbox-group--border, none);margin:var(--r-checkbox-group--margin, 0);padding:var(--r-checkbox-group--padding, 0);width:var(--r-checkbox-group--width, 100%)}.r-checkbox-group--label{padding:var(--r-checkbox-group--label--padding, 0);display:var(--r-checkbox-group--label--display, block);width:var(--r-checkbox-group--label--width, 100%);margin:var(--r-checkbox-group--label--margin, 0);padding:var(--r-checkbox-group--label--padding, 0)}.r-checkbox-group--label r-hint{--r-hint--margin-bottom:var(--r-checkbox-group--label--hint--margin-bottom, var(--r-spacing-100, 1rem))}.r-checkbox-group--content{margin-left:var(--r-checkbox-group--content--margin-left, 0);display:var(--r-checkbox-group--content--display, flex);flex-direction:var(--r-checkbox-group--content--flex-direction, column);gap:var(--r-checkbox-group--content--gap, var(--r-spacing-050, 0.5rem));padding-left:var(--r-checkbox-group--content--padding-left, 0)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
|
|
6
|
-
|
|
7
|
-
const CheckboxGroup = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.rValidate = index.createEvent(this, "rValidate");
|
|
11
|
-
/**
|
|
12
|
-
* Specifies `value` property of the 'select-all', representing the group as a whole.
|
|
13
|
-
* */
|
|
14
|
-
this.value = '';
|
|
15
|
-
/**
|
|
16
|
-
* Specifies whether the `value` is required.
|
|
17
|
-
*/
|
|
18
|
-
this.required = false;
|
|
19
|
-
this.indeterminate = false;
|
|
20
|
-
this.allChecked = false;
|
|
21
|
-
this.noChecked = false;
|
|
22
|
-
this.validityState = '';
|
|
23
|
-
this.validityMessage = '';
|
|
24
|
-
this.uniqueId = `r-checkbox-group-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
25
|
-
this.initial = {};
|
|
26
|
-
this.renderMessage = () => {
|
|
27
|
-
const variant = this.valid ? 'success' : 'error';
|
|
28
|
-
return (index.h("r-hint", { variant: variant, role: "alert", "aria-live": "polite", id: `${this.uniqueId}-message`, class: this.message ? null : 'visually-hidden' }, this.message));
|
|
29
|
-
};
|
|
30
|
-
this.getValidityStateData = () => {
|
|
31
|
-
let validityState = '';
|
|
32
|
-
let validityMessage = '';
|
|
33
|
-
const isValid = this.checkboxes.some(checkbox => checkbox.checked);
|
|
34
|
-
if (this.required && !isValid) {
|
|
35
|
-
validityState = 'valueMissing';
|
|
36
|
-
validityMessage = this.valueMissingMessage || 'Please select at least one option.';
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
validityState = 'valid';
|
|
40
|
-
validityMessage = null;
|
|
41
|
-
}
|
|
42
|
-
return { validityState, validityMessage };
|
|
43
|
-
};
|
|
44
|
-
this.validateGroup = () => {
|
|
45
|
-
if (this.isNoValidate || !this.required)
|
|
46
|
-
return;
|
|
47
|
-
const { validityState, validityMessage } = this.getValidityStateData();
|
|
48
|
-
this.validityState = validityState;
|
|
49
|
-
this.validityMessage = validityMessage;
|
|
50
|
-
const isValid = this.validityState === 'valid';
|
|
51
|
-
this.valid = isValid;
|
|
52
|
-
this.invalid = !isValid;
|
|
53
|
-
this.noChecked = !isValid;
|
|
54
|
-
this.rValidate.emit({
|
|
55
|
-
state: this.validityState,
|
|
56
|
-
message: this.validityMessage
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
this.onSubmitForm = (event) => {
|
|
60
|
-
if (this.isNoValidate)
|
|
61
|
-
return;
|
|
62
|
-
this.validateGroup();
|
|
63
|
-
if (this.invalid) {
|
|
64
|
-
event.preventDefault();
|
|
65
|
-
event.stopPropagation();
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
this.onResetForm = () => {
|
|
69
|
-
this.resetValidity();
|
|
70
|
-
this.resetToInitial();
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Validates the checkbox group without triggering UI and returns a boolean indicating its validity.
|
|
75
|
-
* @returns A boolean indicating whether the checkbox is valid.
|
|
76
|
-
*/
|
|
77
|
-
async checkValidity() {
|
|
78
|
-
const { validityState } = this.getValidityStateData();
|
|
79
|
-
return validityState === 'valid';
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Resets the validity state and message of the radio group.
|
|
83
|
-
* This method clears the validity message and state, and sets the invalid
|
|
84
|
-
* property to its initial value.
|
|
85
|
-
*/
|
|
86
|
-
async resetValidity() {
|
|
87
|
-
this.validityMessage = null;
|
|
88
|
-
this.validityState = null;
|
|
89
|
-
this.invalid = this.initial['invalid'];
|
|
90
|
-
this.valid = !this.invalid;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @returns {HTMLRCheckboxElement[]} - Returns all checkboxes in the slot.
|
|
94
|
-
*/
|
|
95
|
-
get checkboxes() {
|
|
96
|
-
return Array.from(this.host.querySelectorAll('r-checkbox'));
|
|
97
|
-
}
|
|
98
|
-
get hasMessage() {
|
|
99
|
-
return this.message !== null;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Checks all checkboxes in the slot.
|
|
103
|
-
*/
|
|
104
|
-
async checkAll() {
|
|
105
|
-
this.checkboxes.forEach(checkbox => {
|
|
106
|
-
checkbox.check();
|
|
107
|
-
});
|
|
108
|
-
this.allChecked = true;
|
|
109
|
-
this.noChecked = false;
|
|
110
|
-
this.indeterminate = false;
|
|
111
|
-
return this;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Unchecks all checkboxes in the slot.
|
|
115
|
-
*/
|
|
116
|
-
async uncheckAll() {
|
|
117
|
-
this.checkboxes.forEach(checkbox => {
|
|
118
|
-
var _a;
|
|
119
|
-
(_a = checkbox === null || checkbox === void 0 ? void 0 : checkbox.uncheck) === null || _a === void 0 ? void 0 : _a.call(checkbox);
|
|
120
|
-
});
|
|
121
|
-
this.allChecked = false;
|
|
122
|
-
this.noChecked = true;
|
|
123
|
-
this.indeterminate = false;
|
|
124
|
-
return this;
|
|
125
|
-
}
|
|
126
|
-
handleCheckboxChange(event) {
|
|
127
|
-
if (!event.target)
|
|
128
|
-
return;
|
|
129
|
-
const isSelectAllElement = event.detail.element.id === `${this.uniqueId}-select-all`;
|
|
130
|
-
if (isSelectAllElement) {
|
|
131
|
-
this.updateCheckAllState(event.detail.checked);
|
|
132
|
-
setTimeout(this.validateGroup, 0);
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
this.updateCheckboxesState(event);
|
|
136
|
-
if (this.required) {
|
|
137
|
-
this.validateGroup();
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
updateCheckAllState(checked) {
|
|
141
|
-
checked ? this.checkAll() : this.uncheckAll();
|
|
142
|
-
}
|
|
143
|
-
updateCheckboxesState(event) {
|
|
144
|
-
const { checkboxes } = this;
|
|
145
|
-
const checkedCheckboxes = checkboxes.filter(checkbox => checkbox.checked);
|
|
146
|
-
const isCheckbox = event.target.tagName.toLowerCase() === 'r-checkbox';
|
|
147
|
-
const isInGroup = checkboxes.includes(event.target);
|
|
148
|
-
if (!isCheckbox)
|
|
149
|
-
return;
|
|
150
|
-
if (!isInGroup)
|
|
151
|
-
return;
|
|
152
|
-
this.allChecked = checkedCheckboxes.length === checkboxes.length;
|
|
153
|
-
this.indeterminate = checkedCheckboxes.length > 0 && checkedCheckboxes.length < checkboxes.length;
|
|
154
|
-
this.noChecked = checkedCheckboxes.length === 0;
|
|
155
|
-
}
|
|
156
|
-
get message() {
|
|
157
|
-
const { validityMessage, invalid, error, customErrorMessage } = this;
|
|
158
|
-
let message = null;
|
|
159
|
-
if (invalid) {
|
|
160
|
-
message = error || customErrorMessage || validityMessage || null;
|
|
161
|
-
}
|
|
162
|
-
return message;
|
|
163
|
-
}
|
|
164
|
-
get parentFormEl() {
|
|
165
|
-
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
166
|
-
}
|
|
167
|
-
get isNoValidate() {
|
|
168
|
-
var _a;
|
|
169
|
-
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
170
|
-
this.novalidate ||
|
|
171
|
-
false);
|
|
172
|
-
}
|
|
173
|
-
resetToInitial() {
|
|
174
|
-
this.invalid = this.initial['invalid'];
|
|
175
|
-
this.checked = this.initial['checked'];
|
|
176
|
-
this.indeterminate = this.initial['indeterminate'];
|
|
177
|
-
this.updateCheckAllState(this.initial['checked']);
|
|
178
|
-
}
|
|
179
|
-
connectedCallback() {
|
|
180
|
-
var _a, _b;
|
|
181
|
-
this.initial['invalid'] = this.invalid;
|
|
182
|
-
this.initial['checked'] = this.checked;
|
|
183
|
-
this.initial['indeterminate'] = this.indeterminate;
|
|
184
|
-
this.updateCheckAllState(this.initial['checked']);
|
|
185
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
186
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('reset', this.onResetForm);
|
|
187
|
-
}
|
|
188
|
-
disconnectedCallback() {
|
|
189
|
-
var _a, _b;
|
|
190
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('submit', this.onSubmitForm);
|
|
191
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('reset', this.onResetForm);
|
|
192
|
-
}
|
|
193
|
-
get groupDescribedby() {
|
|
194
|
-
const { uniqueId, hint, hasMessage } = this;
|
|
195
|
-
if (hasMessage && hint)
|
|
196
|
-
return `${uniqueId}-message ${uniqueId}-hint`;
|
|
197
|
-
if (hasMessage)
|
|
198
|
-
return `${uniqueId}-message`;
|
|
199
|
-
if (hint)
|
|
200
|
-
return `${uniqueId}-hint`;
|
|
201
|
-
return null;
|
|
202
|
-
}
|
|
203
|
-
render() {
|
|
204
|
-
const { label, fieldIndicator, help, helpIcon, helpIconColor, hint, uniqueId, form, name, value } = this;
|
|
205
|
-
const renderLabel = () => {
|
|
206
|
-
const labelAttrs = {
|
|
207
|
-
fieldIndicator,
|
|
208
|
-
help,
|
|
209
|
-
helpIcon,
|
|
210
|
-
helpIconColor,
|
|
211
|
-
};
|
|
212
|
-
return (label ?
|
|
213
|
-
index.h("r-label", Object.assign({ id: `${uniqueId}-label`, class: "r-radio-group--label" }, labelAttrs), label)
|
|
214
|
-
:
|
|
215
|
-
null);
|
|
216
|
-
};
|
|
217
|
-
const renderHint = () => hint ? (index.h("r-hint", { id: `${uniqueId}-hint`, class: "r-radio-group--hint", role: "note", "aria-hidden": "true" }, hint)) : null;
|
|
218
|
-
const checkAllAttrs = {
|
|
219
|
-
form,
|
|
220
|
-
name,
|
|
221
|
-
value
|
|
222
|
-
};
|
|
223
|
-
return (index.h(index.Host, null, index.h("div", { class: "r-checkbox-group", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-invalid": `${this.invalid || false}`, "aria-describedby": this.groupDescribedby }, index.h("div", { class: "r-checkbox-group--label", id: `${uniqueId}-group-label` }, this.showSelectAll ?
|
|
224
|
-
index.h("r-checkbox", Object.assign({ id: `${uniqueId}-select-all` }, checkAllAttrs, { checked: this.allChecked, indeterminate: this.indeterminate }), renderLabel(), renderHint())
|
|
225
|
-
:
|
|
226
|
-
index.h(index.Fragment, null, index.h("r-checkbox", Object.assign({}, checkAllAttrs, { checked: this.allChecked, indeterminate: this.indeterminate, class: "visually-hidden" }), this.label), renderLabel(), renderHint())), index.h("div", { class: "r-checkbox-group--content" }, index.h("span", { style: { display: 'contents' } }, index.h("slot", null)), this.renderMessage()))));
|
|
227
|
-
}
|
|
228
|
-
get host() { return index.getElement(this); }
|
|
229
|
-
};
|
|
230
|
-
CheckboxGroup.style = checkboxGroupCss;
|
|
231
|
-
|
|
232
|
-
exports.r_checkbox_group = CheckboxGroup;
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BnETQtSf.js');
|
|
4
|
-
var formData = require('./formData-B2DZyLxP.js');
|
|
5
|
-
|
|
6
|
-
const checkboxCss = ":host{display:block;user-select:none;box-sizing:border-box;font-family:var(--r-font-family-text);font-size:var(--r-font-size-400);text-align:left;color:var(--r-text-regular);cursor:pointer}:host ::slotted(a),:host ::slotted(a:visited),:host ::slotted(a:hover),:host ::slotted(a:focus),:host ::slotted(a:active){color:var(--r-text-regular)}:host slot{display:contents}:host(:hover:not([disabled]:not([disabled=false]))){--r-checkbox--box--background-color:var(--r-background-interactive-hovered)}:host(:focus-within:not(:active)){box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px;--r-checkbox--box--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-checkbox--box--outline:2px solid var(--r-border-focused, #0071e3);--r-checkbox--box--outline-offset:2px}:host(:active:not([disabled]:not([disabled=false]))){--r-checkbox--box--background-color:var(--r-background-interactive-pressed)}:host([invalid]:not([invalid=false])){--r-checkbox--box--border-color:var(--r-status-error-regular);--r-checkbox--box--background-color:var(--r-status-error-soft);--r-checkbox--marker--color:var(--r-status-error-regular)}:host([disabled]:not([disabled=false])){--r-checkbox--box--opacity:0.4;--r-checkbox--cursor:not-allowed;--r-checkbox--label-container--cursor:not-allowed;--r-checkbox--label--cursor:not-allowed;cursor:not-allowed}.r-checkbox{position:var(--r-checkbox--position, relative);display:var(--r-checkbox--display, flex);gap:var(--r-checkbox--gap, var(--r-spacing-100, 1rem));cursor:var(--r-checkbox--cursor, pointer);padding:var(--r-checkbox--padding, var(--r-spacing-100, 1rem));min-height:var(--r-checkbox--min-height, var(--r-spacing-150, 1.5rem))}.r-checkbox--input{position:var(--r-checkbox--input--position, absolute);top:var(--r-checkbox--input--top, var(--r-checkbox--padding));left:var(--r-checkbox--input--left, var(--r-checkbox--padding));opacity:var(--r-checkbox--input--opacity, 0);width:var(--r-checkbox--input--width, 1.5rem);height:var(--r-checkbox--input--height, 1.5rem);box-sizing:var(--r-checkbox--input--box-sizing, border-box);padding:var(--r-checkbox--input--padding, 0);margin:var(--r-checkbox--input--margin, 0)}.r-checkbox--box{position:var(--r-checkbox--box--position, relative);display:var(--r-checkbox--box--display, flex);align-items:var(--r-checkbox--box--align-items, center);justify-content:var(--r-checkbox--box--justify-content, center);left:var(--r-checkbox--box--left, 0);top:var(--r-checkbox--box--top, 0);height:var(--r-checkbox--box--height, 1.5rem);width:var(--r-checkbox--box--width, 1.5rem);min-width:var(--r-checkbox--box--min-width, 1.5rem);background-color:var(--r-checkbox--box--background-color, var(--r-background-interactive-softest, #fff));border-width:var(--r-checkbox--box--border-width, 0.0625rem);border-style:var(--r-checkbox--box--border-style, solid);border-color:var(--r-checkbox--box--border-color, var(--r-border-soft, #686868));outline:var(--r-checkbox--box--outline, none);outline-offset:var(--r-checkbox--box--outline-offset, 0);box-sizing:var(--r-checkbox--box--box-sizing, border-box);box-shadow:var(--r-checkbox--box--box-shadow, none);opacity:var(--r-checkbox--box--opacity, 1)}.r-checkbox--description{cursor:var(--r-checkbox--label-container--cursor, pointer);flex:var(--r-checkbox--label-container--flex, 1);line-height:var(--r-checkbox--label-container--line-height, 1.5);display:var(--r-checkbox--label-container--display, flex);flex-direction:var(--r-checkbox--label-container--flex-direction, column);gap:var(--r-checkbox--label-container--gap, var(--r-spacing-025, 0.25rem))}.r-checkbox--label{cursor:var(--r-checkbox--label--cursor, pointer)}.r-checkbox--message{margin-top:var(--r-checkbox--message--margin-top, var(--r-spacing-025, 0.25rem))}:host(.visually-hidden),.visually-hidden{position:absolute;width:0.0625rem;height:0.0625rem;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}";
|
|
7
|
-
|
|
8
|
-
const Checkbox = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
index.registerInstance(this, hostRef);
|
|
11
|
-
this.rChange = index.createEvent(this, "rChange");
|
|
12
|
-
this.rReset = index.createEvent(this, "rReset");
|
|
13
|
-
this.rValidate = index.createEvent(this, "rValidate");
|
|
14
|
-
/** Automatically focus the checkbox when the component is mounted. Note: Only one element per page should have autofocus set to true, following browser standard behavior. */
|
|
15
|
-
this.autofocus = false;
|
|
16
|
-
this.validityState = '';
|
|
17
|
-
this.validityMessage = '';
|
|
18
|
-
this.touched = false;
|
|
19
|
-
// Private properties
|
|
20
|
-
this.initial = {};
|
|
21
|
-
this.uniqueId = `r-checkbox-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
22
|
-
// Private methods
|
|
23
|
-
this.getValidityStateData = (element) => {
|
|
24
|
-
let validityState = '';
|
|
25
|
-
let validityMessage = '';
|
|
26
|
-
for (const state in element.validity) {
|
|
27
|
-
if (element.validity[state]) {
|
|
28
|
-
validityState = state;
|
|
29
|
-
if (this[state + 'Message']) {
|
|
30
|
-
validityMessage = this[state + 'Message'];
|
|
31
|
-
return { validityState, validityMessage };
|
|
32
|
-
}
|
|
33
|
-
validityMessage = element.validationMessage;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return { validityState, validityMessage };
|
|
37
|
-
};
|
|
38
|
-
this.validateFormElement = (element = null) => {
|
|
39
|
-
if (element === null)
|
|
40
|
-
return;
|
|
41
|
-
if (this.isNoValidate)
|
|
42
|
-
return;
|
|
43
|
-
if (this.error)
|
|
44
|
-
return;
|
|
45
|
-
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
46
|
-
this.validityState = validityState;
|
|
47
|
-
this.validityMessage = validityMessage;
|
|
48
|
-
const isValid = this.validityState === 'valid';
|
|
49
|
-
this.valid = isValid;
|
|
50
|
-
this.invalid = !isValid;
|
|
51
|
-
this.rValidate.emit({
|
|
52
|
-
state: this.validityState,
|
|
53
|
-
message: this.validityMessage
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
this.handleClick = (event) => {
|
|
57
|
-
if (this.disabled)
|
|
58
|
-
return;
|
|
59
|
-
const target = event.target;
|
|
60
|
-
if (target.tagName !== 'A') {
|
|
61
|
-
event.preventDefault();
|
|
62
|
-
this.toggleChecked();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
this.onSubmitForm = (event) => {
|
|
66
|
-
if (this.isNoValidate)
|
|
67
|
-
return;
|
|
68
|
-
this.validateFormElement(this.nativeElement);
|
|
69
|
-
// If data is not valid -> prevent form submittion
|
|
70
|
-
if (this.invalid) {
|
|
71
|
-
event.preventDefault();
|
|
72
|
-
event.stopPropagation();
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
this.onResetForm = () => {
|
|
76
|
-
this.validityState = null;
|
|
77
|
-
this.validityMessage = null;
|
|
78
|
-
this.checked = this.initial['checked'];
|
|
79
|
-
this.invalid = this.initial['invalid'];
|
|
80
|
-
this.valid = !this.invalid;
|
|
81
|
-
const { host, value, checked } = this;
|
|
82
|
-
this.rReset.emit({ element: host, value, checked });
|
|
83
|
-
};
|
|
84
|
-
this.contributeToFormData = (event) => {
|
|
85
|
-
formData.appendControlToFormData(this.nativeElement || this.host, event.formData);
|
|
86
|
-
};
|
|
87
|
-
this.applyAutofocus = () => {
|
|
88
|
-
queueMicrotask(() => {
|
|
89
|
-
this.setFocus();
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
// Public Methods
|
|
94
|
-
/**
|
|
95
|
-
* Asynchronously retrieves the validity state of the checkbox.
|
|
96
|
-
*
|
|
97
|
-
* This method updates the internal validity state and message by calling `getValidityStateData`
|
|
98
|
-
* with the native element, and then returns an object containing the current validity state and message.
|
|
99
|
-
*
|
|
100
|
-
* @returns A promise that resolves to an object containing the validity state and message.
|
|
101
|
-
* The object has two properties:
|
|
102
|
-
* - `state`: A string representing the validity state.
|
|
103
|
-
* - `message`: A string containing the validity message.
|
|
104
|
-
*/
|
|
105
|
-
async getValidityState() {
|
|
106
|
-
const { validityState, validityMessage } = this.getValidityStateData(this.nativeElement);
|
|
107
|
-
this.validityState = validityState;
|
|
108
|
-
this.validityMessage = validityMessage;
|
|
109
|
-
return {
|
|
110
|
-
state: this.validityState,
|
|
111
|
-
message: this.validityMessage
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Sets focus on the checkbox element.
|
|
116
|
-
*/
|
|
117
|
-
async setFocus() {
|
|
118
|
-
var _a;
|
|
119
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Removes focus from the checkbox element.
|
|
123
|
-
*/
|
|
124
|
-
async setBlur() {
|
|
125
|
-
var _a;
|
|
126
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Checks the checkbox element.
|
|
130
|
-
*/
|
|
131
|
-
async check() {
|
|
132
|
-
this.checked = true;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Unchecks the checkbox element.
|
|
136
|
-
*/
|
|
137
|
-
async uncheck() {
|
|
138
|
-
this.checked = false;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Toggles the checked state of the checkbox element.
|
|
142
|
-
*/
|
|
143
|
-
async toggleChecked() {
|
|
144
|
-
this.touched = true;
|
|
145
|
-
this.checked = !this.checked;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Sets the indeterminate state of the checkbox element.
|
|
149
|
-
*/
|
|
150
|
-
async setIndeterminate() {
|
|
151
|
-
this.indeterminate = true;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Sets the indeterminate state of the checkbox element.
|
|
155
|
-
*/
|
|
156
|
-
async clearIndeterminate() {
|
|
157
|
-
this.indeterminate = false;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Validates the checkbox without triggering UI and returns a boolean indicating its validity.
|
|
161
|
-
* @returns A boolean indicating whether the checkbox is valid.
|
|
162
|
-
*/
|
|
163
|
-
async checkValidity() {
|
|
164
|
-
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
165
|
-
return validityState === 'valid';
|
|
166
|
-
}
|
|
167
|
-
// Watchers
|
|
168
|
-
async handleCheckedChange() {
|
|
169
|
-
// Only proceed if checkbox has been interacted with
|
|
170
|
-
if (!this.touched)
|
|
171
|
-
return;
|
|
172
|
-
if (this.disabled)
|
|
173
|
-
return;
|
|
174
|
-
const { host, value, checked } = this;
|
|
175
|
-
this.rChange.emit({ element: host, value, checked });
|
|
176
|
-
// Update native element checked state
|
|
177
|
-
if (this.nativeElement) {
|
|
178
|
-
this.nativeElement.checked = checked;
|
|
179
|
-
}
|
|
180
|
-
// Validate if required
|
|
181
|
-
if (this.required && !this.isNoValidate) {
|
|
182
|
-
this.validateFormElement(this.nativeElement);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
// Getters
|
|
186
|
-
/** Identify wrapping form element */
|
|
187
|
-
get parentFormEl() {
|
|
188
|
-
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
189
|
-
}
|
|
190
|
-
/** Determine whether this element should be ignored during Constraint Validation API validation. */
|
|
191
|
-
get isNoValidate() {
|
|
192
|
-
var _a;
|
|
193
|
-
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
194
|
-
this.novalidate ||
|
|
195
|
-
false);
|
|
196
|
-
}
|
|
197
|
-
get hasErrorMessage() {
|
|
198
|
-
var _a;
|
|
199
|
-
return typeof this.error === 'string' && ((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
200
|
-
}
|
|
201
|
-
get hasCustomErrorMessage() {
|
|
202
|
-
var _a;
|
|
203
|
-
return typeof this.customErrorMessage === 'string' && ((_a = this.customErrorMessage) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
204
|
-
}
|
|
205
|
-
get hasValidationError() {
|
|
206
|
-
var _a;
|
|
207
|
-
return this.validityState !== 'valid' && ((_a = this.validityMessage) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
208
|
-
}
|
|
209
|
-
get hasInvalidMessage() {
|
|
210
|
-
if (!this.invalid)
|
|
211
|
-
return false;
|
|
212
|
-
return this.hasErrorMessage || this.hasCustomErrorMessage || this.hasValidationError;
|
|
213
|
-
}
|
|
214
|
-
connectFormEventListeners() {
|
|
215
|
-
var _a, _b, _c;
|
|
216
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
217
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
218
|
-
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('reset', this.onResetForm);
|
|
219
|
-
}
|
|
220
|
-
disconnectFormEventListeners() {
|
|
221
|
-
var _a, _b, _c;
|
|
222
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.contributeToFormData);
|
|
223
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('submit', this.onSubmitForm);
|
|
224
|
-
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('reset', this.onResetForm);
|
|
225
|
-
}
|
|
226
|
-
// Lifecycle methods
|
|
227
|
-
componentWillLoad() {
|
|
228
|
-
this.initial['checked'] = this.checked;
|
|
229
|
-
this.initial['invalid'] = this.invalid;
|
|
230
|
-
}
|
|
231
|
-
componentDidLoad() {
|
|
232
|
-
if (this.nativeElement) {
|
|
233
|
-
this.nativeElement.indeterminate = this.indeterminate;
|
|
234
|
-
}
|
|
235
|
-
if (this.autofocus)
|
|
236
|
-
this.applyAutofocus();
|
|
237
|
-
}
|
|
238
|
-
connectedCallback() {
|
|
239
|
-
this.connectFormEventListeners();
|
|
240
|
-
}
|
|
241
|
-
disconnectedCallback() {
|
|
242
|
-
this.disconnectFormEventListeners();
|
|
243
|
-
}
|
|
244
|
-
render() {
|
|
245
|
-
const { error, name, value, disabled, required, uniqueId, checked, indeterminate, autofocus } = this;
|
|
246
|
-
const inputAttrs = {
|
|
247
|
-
name,
|
|
248
|
-
value,
|
|
249
|
-
disabled,
|
|
250
|
-
required,
|
|
251
|
-
checked,
|
|
252
|
-
indeterminate,
|
|
253
|
-
autofocus
|
|
254
|
-
};
|
|
255
|
-
return (index.h(index.Host, { key: '06eb235ee3c0da6317a1b23d699e4964d7201111', onClick: this.handleClick }, index.h("div", { key: '8fa412dae7fdde690c5fc5efb11efb12ceb30d4f', class: "r-checkbox" }, index.h("input", Object.assign({ key: '7a192e581b959504c01a33168a58e452434e1f11', class: "r-checkbox--input", type: "checkbox" }, inputAttrs, { id: `${uniqueId}-input`, ref: el => this.nativeElement = el, "aria-describedby": this.hasInvalidMessage ? `${uniqueId}-message` : null, "aria-required": `${this.required || false}`, "aria-invalid": `${this.invalid || false}` })), index.h("div", { key: 'f22d560241a1f7ac083f90677d166087a99d0647', class: "r-checkbox--box", "aria-hidden": "true" }, this.checked ?
|
|
256
|
-
index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M8.80019 15.8988L4.6002 11.6988L3.2002 13.0988L8.80019 18.6988L20.8002 6.69883L19.4002 5.29883L8.80019 15.8988Z", fill: "currentColor" }))
|
|
257
|
-
: this.indeterminate ?
|
|
258
|
-
index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("rect", { x: "4", y: "11", width: "16", height: "2", fill: "currentColor" }))
|
|
259
|
-
: null), index.h("div", { key: '0dd969ea2f03ea289772a3c1d59841b93248d9bd', class: "r-checkbox--description" }, index.h("label", { key: '5ec66dcfbabb9c8a8362e8d246cf59aa411dce78', class: "r-checkbox--label", id: `${uniqueId}-label`, htmlFor: `${uniqueId}-input` }, index.h("slot", { key: 'c7755df4134ed6c2d321b513f0707adb26987000' })), index.h("div", { key: '49dfc099a6fe5e600ea246a4511a1f83d34f2f9e', id: `${uniqueId}-message`, class: !this.hasInvalidMessage ? 'visually-hidden' : 'r-checkbox--message', "aria-live": "polite", "aria-atomic": "true" }, this.hasInvalidMessage &&
|
|
260
|
-
index.h("r-hint", { key: 'ee682a67c574da004bd8208f58fcd9ab6191f3bd', variant: "error" }, error || this.customErrorMessage || this.validityMessage))))));
|
|
261
|
-
}
|
|
262
|
-
get host() { return index.getElement(this); }
|
|
263
|
-
static get watchers() { return {
|
|
264
|
-
"checked": ["handleCheckedChange"]
|
|
265
|
-
}; }
|
|
266
|
-
};
|
|
267
|
-
Checkbox.style = checkboxCss;
|
|
268
|
-
|
|
269
|
-
exports.r_checkbox = Checkbox;
|