@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,432 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BnETQtSf.js');
|
|
4
|
-
var formData = require('./formData-B2DZyLxP.js');
|
|
5
|
-
|
|
6
|
-
const inputCodeCss = ":host{display:inline-flex;flex-direction:column;vertical-align:top;--r-label--margin-bottom:0}:host slot{display:contents}:host slot[name=trailing]{display:flex;margin-left:auto}:host .r-form-field{display:flex;align-items:center;justify-content:start;gap:1rem}:host([readonly]:not([readonly=false])){--r-input-code--container--background-color:var(--r-background-soft, #f3f1f0);--r-input-code--container--border-color:transparent transparent var(--r-border-soft, #686868) transparent;--r-input-code--container--cursor:text}:host(:hover:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input-code--container--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:focus-within:not([disabled]:not([disabled=false]))){--r-input-code--container--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-input-code--container--outline:2px solid var(--r-border-focused);--r-input-code--container--outline-offset:2px}:host(:active:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input-code--container--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([full-width]:not([full-width=false])){display:flex}:host([disabled]:not([disabled=false])){cursor:not-allowed;--r-input-code--container--opacity:0.4;--r-input-code--container--cursor:not-allowed;--r-input-code--container--pointer-events:none;--r-input-code--container--background-color:transparent}:host([invalid]:not([invalid=false])){--r-input-code--container--border-color:var(--r-status-error-regular, #b00c15);--r-input-code--container--background-color:var(--r-status-error-soft, #fef6f6)}.r-input-code--label-container{display:var(--r-input-code--label-container--display, flex);gap:var(--r-input-code--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input-code--label-container--align-items, center);justify-content:var(--r-input-code--label-container--align-items, space-between)}.r-input-code--label-container ::slotted([slot=popover]){display:var(--r-input-code--popover--display, inline-flex);height:var(--r-input-code--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input-code--popover--align-items, center);justify-content:var(--r-input-code--popover--justify-content, center);margin-right:var(--r-input-code--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input-code--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input-code--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input-code--container{position:var(--r-input-code--container--position, relative);display:var(--r-input-code--container--display, flex);align-items:var(--r-input-code--container--align-items, center);gap:var(--r-input-code--container--gap, 0.625em);height:var(--r-input-code--container--height, var(--r-spacing-275, 2.75rem));background-color:var(--r-input-code--container--background-color, var(--r-background-softest, #fff));border-width:var(--r-input-code--container--border-width, 1px);border-style:var(--r-input-code--container--border-style, solid);border-color:var(--r-input-code--container--border-color, var(--r-border-soft, #686868));box-sizing:var(--r-input-code--container--box-sizing, border-box);box-shadow:var(--r-input-code--container--box-shadow, none);outline:var(--r-input-code--container--outline, none);outline-offset:var(--r-input-code--container--outline-offset, 0);padding-top:var(--r-input-code--container--padding-top, 0.8em);padding-right:var(--r-input-code--container--padding-right, 0.7em);padding-bottom:var(--r-input-code--container--padding-bottom, 0.8em);padding-left:var(--r-input-code--container--padding-left, 0.7em);opacity:var(--r-input-code--container--opacity, 1);pointer-events:var(--r-input-code--container--pointer-events, auto);line-height:var(--r-input-code--container--line-height, 1);cursor:var(--r-input-code--container--cursor, inherit);margin-top:var(--r-input-code--container--margin-top, var(--r-spacing-025, 0.25rem));margin-bottom:var(--r-input-code--container--margin-bottom, var(--r-spacing-025, 0.25rem))}.r-input-code--input{width:var(--r-input-code--input--width, 0.725rem);outline:var(--r-input-code--input--outline, none);font-size:var(--r-input-code--input--font-size, 1rem);text-align:var(--r-input-code--input--text-align, center);background-color:var(--r-input-code--input--background-color, transparent);border-width:var(--r-input-code--input--border-width, 0 0 1px 0);border-style:var(--r-input-code--input--border-style, solid);border-color:var(--r-input-code--input--border-color, var(--r-text-soft))}.r-input-code--trailing{display:var(--r-input-code--trailing--display, flex);margin-left:var(--r-input-code--trailing--margin-left, auto);align-items:var(--r-input-code--trailing--align-items, center);gap:var(--r-input-code--trailing--gap, 0.625rem)}.r-input-code--readonly-icon{color:var(--r-input-code--readonly-icon--color, var(--r-icon-soft, #686868))}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
|
|
7
|
-
|
|
8
|
-
const InputCode = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
index.registerInstance(this, hostRef);
|
|
11
|
-
this.rChange = index.createEvent(this, "rChange");
|
|
12
|
-
this.rValidate = index.createEvent(this, "rValidate");
|
|
13
|
-
this.rReset = index.createEvent(this, "rReset");
|
|
14
|
-
this.rComplete = index.createEvent(this, "rComplete");
|
|
15
|
-
/** Specifies a name for an input for submission within formData object. */
|
|
16
|
-
this.name = 'input-code';
|
|
17
|
-
/** Number of digits (typically 4–6).
|
|
18
|
-
* @default: 4
|
|
19
|
-
*/
|
|
20
|
-
this.length = 4;
|
|
21
|
-
/** Label for accessibility.
|
|
22
|
-
* @default: 'Verification code'
|
|
23
|
-
*/
|
|
24
|
-
this.label = 'Verification code';
|
|
25
|
-
/** Defines initial value */
|
|
26
|
-
this.value = '';
|
|
27
|
-
/** Specifies the input mode for the virtual keyboard on mobile devices. Default is 'numeric' for OTP codes.
|
|
28
|
-
* @default: 'numeric'
|
|
29
|
-
*/
|
|
30
|
-
this.inputmode = 'numeric';
|
|
31
|
-
/** Specifies the enter key hint for the virtual keyboard. Default is 'done' for OTP completion.
|
|
32
|
-
* @default: 'done'
|
|
33
|
-
*/
|
|
34
|
-
this.enterkeyhint = 'done';
|
|
35
|
-
/** Specifies the autocomplete behavior. Default is 'one-time-code' for SMS OTP autofill.
|
|
36
|
-
* @default: 'one-time-code'
|
|
37
|
-
*/
|
|
38
|
-
this.autocomplete = 'one-time-code';
|
|
39
|
-
/** Holds the current values of each input box */
|
|
40
|
-
this.values = [];
|
|
41
|
-
/** Tracks whether the component was previously in a complete state */
|
|
42
|
-
this.wasComplete = false;
|
|
43
|
-
/** Tracks the last completed value to detect changes */
|
|
44
|
-
this.lastCompletedValue = '';
|
|
45
|
-
/** Validity state passed from validateFormElement function after validation */
|
|
46
|
-
this.validityState = '';
|
|
47
|
-
/** Validity message passed from validateFormElement function after validation */
|
|
48
|
-
this.validityMessage = '';
|
|
49
|
-
this.inputs = [];
|
|
50
|
-
/**
|
|
51
|
-
* Checks if all segments are filled and emits rComplete event when:
|
|
52
|
-
* 1. Transitioning from incomplete to complete
|
|
53
|
-
* 2. Complete and value has changed from previous completed value
|
|
54
|
-
*/
|
|
55
|
-
this.checkAndEmitCompletion = () => {
|
|
56
|
-
const isFullLength = this.value.length === this.length;
|
|
57
|
-
const isNoEmptySegments = this.values.every(val => val !== '');
|
|
58
|
-
const isComplete = isFullLength && isNoEmptySegments;
|
|
59
|
-
// Emit when transitioning to complete OR when complete with a different value
|
|
60
|
-
if (isComplete && (!this.wasComplete || this.value !== this.lastCompletedValue)) {
|
|
61
|
-
this.wasComplete = true;
|
|
62
|
-
this.lastCompletedValue = this.value;
|
|
63
|
-
this.rComplete.emit({ value: this.value, isComplete: true });
|
|
64
|
-
}
|
|
65
|
-
else if (!isComplete && this.wasComplete) {
|
|
66
|
-
// Reset the flag when becoming incomplete
|
|
67
|
-
this.wasComplete = false;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
this.handleInput = (index, event) => {
|
|
71
|
-
var _a;
|
|
72
|
-
if (this.readonly)
|
|
73
|
-
return;
|
|
74
|
-
const input = event.target;
|
|
75
|
-
const value = input.value.slice(-1);
|
|
76
|
-
this.values[index] = value;
|
|
77
|
-
this.values = [...this.values];
|
|
78
|
-
if (value && index < this.length - 1) {
|
|
79
|
-
(_a = this.inputs[index + 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
80
|
-
}
|
|
81
|
-
this.rChange.emit({ value: this.values.join('') });
|
|
82
|
-
};
|
|
83
|
-
this.handleKeyDown = (index, event) => {
|
|
84
|
-
var _a, _b, _c;
|
|
85
|
-
if (this.readonly)
|
|
86
|
-
return;
|
|
87
|
-
const key = event.key;
|
|
88
|
-
if (key === 'Backspace') {
|
|
89
|
-
if (!this.values[index] && index > 0) {
|
|
90
|
-
this.values[index - 1] = '';
|
|
91
|
-
this.values = [...this.values];
|
|
92
|
-
(_a = this.inputs[index - 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
if (key === 'ArrowLeft') {
|
|
96
|
-
if (index > 0) {
|
|
97
|
-
(_b = this.inputs[index - 1]) === null || _b === void 0 ? void 0 : _b.focus();
|
|
98
|
-
if (this.values[index - 1]) {
|
|
99
|
-
setTimeout(() => {
|
|
100
|
-
var _a;
|
|
101
|
-
(_a = this.inputs[index - 1]) === null || _a === void 0 ? void 0 : _a.setSelectionRange(0, 1);
|
|
102
|
-
}, 0);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (key === 'ArrowRight') {
|
|
107
|
-
if (index < this.length - 1) {
|
|
108
|
-
(_c = this.inputs[index + 1]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
109
|
-
if (this.values[index + 1]) {
|
|
110
|
-
setTimeout(() => {
|
|
111
|
-
var _a;
|
|
112
|
-
(_a = this.inputs[index + 1]) === null || _a === void 0 ? void 0 : _a.setSelectionRange(0, 1);
|
|
113
|
-
}, 0);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
this.createInputHandler = (index) => {
|
|
119
|
-
return (e) => this.handleInput(index, e);
|
|
120
|
-
};
|
|
121
|
-
this.createKeyDownHandler = (index) => {
|
|
122
|
-
return (e) => this.handleKeyDown(index, e);
|
|
123
|
-
};
|
|
124
|
-
this.handlePaste = async (event) => {
|
|
125
|
-
var _a;
|
|
126
|
-
if (this.readonly)
|
|
127
|
-
return;
|
|
128
|
-
event.preventDefault();
|
|
129
|
-
const pasted = event.clipboardData.getData('text').slice(0, this.length);
|
|
130
|
-
this.values = pasted.split('').concat(new Array(this.length).fill('')).slice(0, this.length);
|
|
131
|
-
this.values = [...this.values];
|
|
132
|
-
this.rChange.emit({ value: this.values.join('') });
|
|
133
|
-
const nextEmpty = this.values.findIndex(v => !v);
|
|
134
|
-
const nextIndex = nextEmpty === -1 ? this.length - 1 : nextEmpty;
|
|
135
|
-
(_a = this.inputs[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
136
|
-
};
|
|
137
|
-
this.onHostClick = () => {
|
|
138
|
-
const input = this.firstEmptyInput || this.inputs[this.inputs.length - 1];
|
|
139
|
-
input === null || input === void 0 ? void 0 : input.focus();
|
|
140
|
-
if (this.firstEmptyInput === null) {
|
|
141
|
-
setTimeout(() => {
|
|
142
|
-
input === null || input === void 0 ? void 0 : input.setSelectionRange(0, 1);
|
|
143
|
-
}, 0);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
this.uniqueId = `r-input-code-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
147
|
-
this.nativeElement = null;
|
|
148
|
-
this.getValidityStateData = (element) => {
|
|
149
|
-
let validityState = '';
|
|
150
|
-
let validityMessage = '';
|
|
151
|
-
if (!element) {
|
|
152
|
-
validityState = 'valid';
|
|
153
|
-
return { validityState, validityMessage };
|
|
154
|
-
}
|
|
155
|
-
if (this.required && element.value.length === 0) {
|
|
156
|
-
validityState = 'valueMissing';
|
|
157
|
-
validityMessage = this.valueMissingMessage;
|
|
158
|
-
return { validityState, validityMessage };
|
|
159
|
-
}
|
|
160
|
-
if (element.value.length > 0 && element.value.length < this.length) {
|
|
161
|
-
validityState = 'tooShort';
|
|
162
|
-
validityMessage = this.tooShortMessage || `All ${this.length} characters must be filled.`;
|
|
163
|
-
return { validityState, validityMessage };
|
|
164
|
-
}
|
|
165
|
-
validityState = 'valid';
|
|
166
|
-
return { validityState, validityMessage };
|
|
167
|
-
};
|
|
168
|
-
this.validateFormElement = (element) => {
|
|
169
|
-
if (element === null)
|
|
170
|
-
return;
|
|
171
|
-
if (this.isNoValidate)
|
|
172
|
-
return;
|
|
173
|
-
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
174
|
-
this.validityState = validityState;
|
|
175
|
-
this.validityMessage = validityMessage;
|
|
176
|
-
const isValid = this.validityState === 'valid';
|
|
177
|
-
this.valid = isValid;
|
|
178
|
-
this.invalid = !isValid;
|
|
179
|
-
this.rValidate.emit({
|
|
180
|
-
state: this.validityState,
|
|
181
|
-
message: this.validityMessage
|
|
182
|
-
});
|
|
183
|
-
};
|
|
184
|
-
this.onResetForm = async () => {
|
|
185
|
-
if (this.readonly)
|
|
186
|
-
return;
|
|
187
|
-
await this.reset();
|
|
188
|
-
this.validityState = null;
|
|
189
|
-
this.validityMessage = null;
|
|
190
|
-
this.invalid = null;
|
|
191
|
-
this.valid = null;
|
|
192
|
-
const { host } = this;
|
|
193
|
-
this.rReset.emit({ element: host, value: this.values.join('') });
|
|
194
|
-
};
|
|
195
|
-
this.onSubmitForm = (event) => {
|
|
196
|
-
if (this.isNoValidate)
|
|
197
|
-
return;
|
|
198
|
-
if (this.disabled)
|
|
199
|
-
return;
|
|
200
|
-
this.validateFormElement(this.nativeElement);
|
|
201
|
-
if (this.invalid) {
|
|
202
|
-
event.preventDefault();
|
|
203
|
-
event.stopPropagation();
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
this.contributeToFormData = (event) => {
|
|
207
|
-
formData.appendControlToFormData(this.nativeElement || this.host, event.formData);
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Validates segment index and throws descriptive errors if invalid.
|
|
212
|
-
* @param index - The index to validate
|
|
213
|
-
* @throws Error if index is not an integer or out of bounds
|
|
214
|
-
*/
|
|
215
|
-
validateSegmentIndex(index) {
|
|
216
|
-
if (typeof index !== 'number' || !Number.isInteger(index)) {
|
|
217
|
-
throw new Error('Index must be an integer');
|
|
218
|
-
}
|
|
219
|
-
if (index < 0 || index >= this.length) {
|
|
220
|
-
throw new Error(`Index out of bounds: must be between 0 and ${this.length - 1}`);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Gets the current complete code value by joining all individual digit values.
|
|
225
|
-
* @returns Promise that resolves to the complete code string
|
|
226
|
-
*/
|
|
227
|
-
async getValue() {
|
|
228
|
-
return this.values.join('');
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Resets the component by clearing all input values and focusing the first input.
|
|
232
|
-
* @returns Promise that resolves when reset is complete
|
|
233
|
-
*/
|
|
234
|
-
async reset() {
|
|
235
|
-
var _a;
|
|
236
|
-
if (this.readonly)
|
|
237
|
-
return;
|
|
238
|
-
this.values = new Array(this.length).fill('');
|
|
239
|
-
(_a = this.inputs[0]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Sets provided value.
|
|
243
|
-
* */
|
|
244
|
-
async setValue(value) {
|
|
245
|
-
if (!value) {
|
|
246
|
-
this.values = new Array(this.length).fill('');
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
const valueArray = Array.from(value).slice(0, this.length).map(char => String(char));
|
|
250
|
-
// Pad with empty strings if value is shorter than length
|
|
251
|
-
while (valueArray.length < this.length) {
|
|
252
|
-
valueArray.push('');
|
|
253
|
-
}
|
|
254
|
-
this.values = valueArray;
|
|
255
|
-
this.rChange.emit({ value: this.values.join('') });
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Validates the input code without triggering UI and returns a boolean indicating its validity.
|
|
259
|
-
* @returns A boolean indicating whether the input code is valid.
|
|
260
|
-
*/
|
|
261
|
-
async checkValidity() {
|
|
262
|
-
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
263
|
-
return validityState === 'valid';
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Focuses a specific segment (input) by index.
|
|
267
|
-
* @param index - The zero-based index of the segment to focus (0 to length-1)
|
|
268
|
-
* @returns Promise that resolves when focus is set, or rejects if index is invalid
|
|
269
|
-
*/
|
|
270
|
-
async focusSegment(index) {
|
|
271
|
-
this.validateSegmentIndex(index);
|
|
272
|
-
const input = this.inputs[index];
|
|
273
|
-
if (input) {
|
|
274
|
-
input.focus();
|
|
275
|
-
// Select the content if it exists
|
|
276
|
-
if (this.values[index]) {
|
|
277
|
-
setTimeout(() => {
|
|
278
|
-
// Check if setSelectionRange exists (not available in some test environments)
|
|
279
|
-
if (typeof input.setSelectionRange === 'function') {
|
|
280
|
-
input.setSelectionRange(0, 1);
|
|
281
|
-
}
|
|
282
|
-
}, 0);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Gets the value of a specific segment by index.
|
|
288
|
-
* @param index - The zero-based index of the segment (0 to length-1)
|
|
289
|
-
* @returns Promise that resolves to the segment value (single character string or empty string)
|
|
290
|
-
*/
|
|
291
|
-
async getSegmentValue(index) {
|
|
292
|
-
this.validateSegmentIndex(index);
|
|
293
|
-
return this.values[index] || '';
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* Sets the value of a specific segment by index.
|
|
297
|
-
* @param index - The zero-based index of the segment (0 to length-1)
|
|
298
|
-
* @param value - The value to set (will be truncated to first character if longer)
|
|
299
|
-
*/
|
|
300
|
-
async setSegmentValue(index, value) {
|
|
301
|
-
this.validateSegmentIndex(index);
|
|
302
|
-
// Take only the first character, or empty string if value is empty
|
|
303
|
-
const newValue = value ? value.charAt(0) : '';
|
|
304
|
-
this.values[index] = newValue;
|
|
305
|
-
this.values = [...this.values];
|
|
306
|
-
// Update the input element's value to reflect the change
|
|
307
|
-
const input = this.inputs[index];
|
|
308
|
-
if (input) {
|
|
309
|
-
input.value = newValue;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
handleValuesChange() {
|
|
313
|
-
this.value = this.values.join('');
|
|
314
|
-
this.checkAndEmitCompletion();
|
|
315
|
-
}
|
|
316
|
-
handleLengthChange(newLength) {
|
|
317
|
-
// Adjust values array when length changes
|
|
318
|
-
if (this.values.length !== newLength) {
|
|
319
|
-
const newValues = new Array(newLength).fill('');
|
|
320
|
-
// Copy existing values up to the new length
|
|
321
|
-
for (let i = 0; i < Math.min(this.values.length, newLength); i++) {
|
|
322
|
-
newValues[i] = this.values[i];
|
|
323
|
-
}
|
|
324
|
-
this.values = newValues;
|
|
325
|
-
this.inputs = [];
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
get firstEmptyInput() {
|
|
329
|
-
return this.inputs.find(input => !input.value) || null;
|
|
330
|
-
}
|
|
331
|
-
get message() {
|
|
332
|
-
if (this.invalid && this.error) {
|
|
333
|
-
return this.error;
|
|
334
|
-
}
|
|
335
|
-
const isValid = this.valid || this.validityState === 'valid';
|
|
336
|
-
if (isValid) {
|
|
337
|
-
return null;
|
|
338
|
-
}
|
|
339
|
-
return (this.validityState && this.validityState !== 'valid' ?
|
|
340
|
-
(this.customErrorMessage || this.validityMessage || `All ${this.length} characters must be filled.`)
|
|
341
|
-
: null);
|
|
342
|
-
}
|
|
343
|
-
get ariaDescribedBy() {
|
|
344
|
-
const messageId = this.message ? `${this.uniqueId}-message` : null;
|
|
345
|
-
return this.hint ? `${this.uniqueId}-hint ${messageId}` : messageId;
|
|
346
|
-
}
|
|
347
|
-
/** Identify wrapping form element */
|
|
348
|
-
get parentFormEl() {
|
|
349
|
-
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* Determine whether this element should be ignored
|
|
353
|
-
* during Constraint Validation API validation.
|
|
354
|
-
* */
|
|
355
|
-
get isNoValidate() {
|
|
356
|
-
var _a, _b;
|
|
357
|
-
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
358
|
-
this.novalidate ||
|
|
359
|
-
this.disabled ||
|
|
360
|
-
((_b = this.error) === null || _b === void 0 ? void 0 : _b.length) > 0 ||
|
|
361
|
-
false);
|
|
362
|
-
}
|
|
363
|
-
connectFormEventListeners() {
|
|
364
|
-
var _a, _b, _c;
|
|
365
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
366
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
367
|
-
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('reset', this.onResetForm);
|
|
368
|
-
}
|
|
369
|
-
disconnectFormEventListeners() {
|
|
370
|
-
var _a, _b, _c;
|
|
371
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.contributeToFormData);
|
|
372
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('submit', this.onSubmitForm);
|
|
373
|
-
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('reset', this.onResetForm);
|
|
374
|
-
}
|
|
375
|
-
connectedCallback() {
|
|
376
|
-
this.connectFormEventListeners();
|
|
377
|
-
}
|
|
378
|
-
disconnectedCallback() {
|
|
379
|
-
this.disconnectFormEventListeners();
|
|
380
|
-
}
|
|
381
|
-
get hasMessage() {
|
|
382
|
-
return !!this.message;
|
|
383
|
-
}
|
|
384
|
-
get groupDescribedby() {
|
|
385
|
-
const { uniqueId, hint, hasMessage } = this;
|
|
386
|
-
if (hasMessage && hint)
|
|
387
|
-
return `${uniqueId}-message ${uniqueId}-hint`;
|
|
388
|
-
if (hasMessage)
|
|
389
|
-
return `${uniqueId}-message`;
|
|
390
|
-
if (hint)
|
|
391
|
-
return `${uniqueId}-hint`;
|
|
392
|
-
return null;
|
|
393
|
-
}
|
|
394
|
-
componentWillLoad() {
|
|
395
|
-
this.setValue(this.value);
|
|
396
|
-
}
|
|
397
|
-
render() {
|
|
398
|
-
const { form, name, novalidate, required, disabled, label, fieldIndicator, hint, uniqueId, valid, readonly } = this;
|
|
399
|
-
const inputAttrs = {
|
|
400
|
-
id: uniqueId,
|
|
401
|
-
readonly,
|
|
402
|
-
form,
|
|
403
|
-
name,
|
|
404
|
-
novalidate,
|
|
405
|
-
required,
|
|
406
|
-
disabled,
|
|
407
|
-
'aria-describedby': this.ariaDescribedBy,
|
|
408
|
-
minlength: this.length,
|
|
409
|
-
maxlength: this.length
|
|
410
|
-
};
|
|
411
|
-
const labelAttr = label ? {
|
|
412
|
-
id: `${uniqueId}-label`,
|
|
413
|
-
fieldIndicator
|
|
414
|
-
} : {};
|
|
415
|
-
return (index.h(index.Host, { key: 'c7e8e45bf54b060eaeec903857ec842f5f5909ff', value: this.value, onClick: this.onHostClick }, index.h("div", { key: '965e94721f83a4e0c2a21d6ead371085b5faefef', class: "r-input-code--label-container" }, index.h("label", { key: '4a24884c394cbdf28f98f71dd166c7f02fd6b240', htmlFor: uniqueId }, label ?
|
|
416
|
-
index.h("r-label", Object.assign({}, labelAttr), label)
|
|
417
|
-
:
|
|
418
|
-
index.h("slot", { name: "label" })), index.h("slot", { key: '471642b0c4c01243fb26eacec958418ef09af962', name: "popover" })), hint &&
|
|
419
|
-
index.h("r-hint", { key: 'efdb3d68d72666260bce9d6e9e6ba9853225a473', id: `${uniqueId}-hint`, role: "note" }, hint), index.h("div", { key: '2dc16569529ac0ec9e95cfef8f353efbf2f0e929', class: "r-form-field" }, index.h("slot", { key: '7e3d7abc1931537ce66f6bd1c716f4046f2ca06e', name: "prefix" }), index.h("div", { key: '0e29ba435fe9de7b87cad793be8dc11301bf552e', class: "r-input-code--container", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-describedby": this.groupDescribedby }, index.h("slot", { key: 'eef6bda22af5d2e21f442bb010d79a60a05b4d69', name: "leading" }), Array.from({ length: this.length }).map((_, i) => (index.h("input", { class: "r-input-code--input", key: i, id: `${uniqueId}-input-section-${i}`, "aria-label": `${this.ariaCharacterLabel || 'Character'}: ${i + 1}`, "aria-invalid": `${this.invalid || false}`, value: this.values[i], ref: el => this.inputs[i] = el, maxlength: 1, disabled: this.disabled, required: this.required, readonly: readonly, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, autocomplete: this.autocomplete, onInput: this.createInputHandler(i), onKeyDown: this.createKeyDownHandler(i), onPaste: this.handlePaste }))), index.h("input", Object.assign({ key: 'a2185f3e1b5f83e55fa5997662b55002bb251b4c', type: "hidden" }, inputAttrs, { value: this.values.join(''), ref: el => this.nativeElement = el })), index.h("div", { key: '7586c976c27a2c42e9d76c1cf6724ad93beac0ae', class: "r-input-code--trailing" }, this.readonly &&
|
|
420
|
-
index.h("r-icon", { key: 'b2829cc59cd037f62e33f980fa65887e80059984', class: "r-input-code--readonly-icon", name: "pen-disabled", size: "s" }), index.h("slot", { key: 'e7b996a710b4f2f5f867295518b96952d6d60444', name: "trailing" }, valid &&
|
|
421
|
-
index.h("r-icon", { key: '3064219d8e6846df86dc934027a561f265fcc82f', name: "circled-check", size: "s", color: "var(--r-status-success-regular)" })))), index.h("slot", { key: 'de7164a83a2d8c6b8bf97583d4407cc7be7e0db4', name: "suffix" })), index.h("slot", { key: 'e12c343b123421fec18546f60ccdb2e4d6ceab5b', name: "message" }, this.hasMessage &&
|
|
422
|
-
index.h("r-hint", { key: '7fcfab6c47d841a0b695805b61f4a12a164fca3c', "aria-live": "polite", id: `${uniqueId}-message`, variant: "error" }, this.message))));
|
|
423
|
-
}
|
|
424
|
-
get host() { return index.getElement(this); }
|
|
425
|
-
static get watchers() { return {
|
|
426
|
-
"values": ["handleValuesChange"],
|
|
427
|
-
"length": ["handleLengthChange"]
|
|
428
|
-
}; }
|
|
429
|
-
};
|
|
430
|
-
InputCode.style = inputCodeCss;
|
|
431
|
-
|
|
432
|
-
exports.r_input_code = InputCode;
|