@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,400 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
|
-
import { a as appendControlToFormData } from './formData-DvLT8-y3.js';
|
|
3
|
-
|
|
4
|
-
const inputCss = ":host{display:inline-flex;flex-direction:column;vertical-align:top;--r-label--margin-bottom:0}:host slot{display:contents}:host([readonly]:not([readonly=false])){--r-input--container--background-color:var(--r-background-soft, #f3f1f0);--r-input--container--border-color:transparent transparent var(--r-border-soft, #686868) transparent;--r-input--container--cursor:text}:host(:hover:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input--container--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(.focused){--r-input--container--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-input--container--outline:2px solid var(--r-border-focused);--r-input--container--outline-offset:2px}:host(:active:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input--container--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([expanded]:not([expanded=false])),:host([full-width]:not([full-width=false])){display:block}:host([disabled]:not([disabled=false])){--r-input--container--opacity:0.4;--r-input--container--cursor:not-allowed;--r-input--container--pointer-events:none;--r-input--container--background-color:transparent}:host([invalid]:not([invalid=false])){--r-input--container--border-color:var(--r-status-error-regular, #b00c15);--r-input--container--background-color:var(--r-status-error-soft, #fef6f6)}.r-input{display:var(--r-input--display, flex);flex:var(--r-input--flex, 1);flex-direction:var(--r-input--flex-direction, column);width:var(--r-input--width, auto);font-family:var(--r-input--font-family, system-ui);position:var(--r-input--position, relative);border-radius:var(--r-input--border-radius, 0);cursor:var(--r-input--cursor, inherit)}.r-input--label-container{display:var(--r-input--label-container--display, flex);gap:var(--r-input--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input--label-container--align-items, center);justify-content:var(--r-input--label-container--align-items, space-between)}.r-input--label-container ::slotted([slot=popover]){display:var(--r-input--popover--display, inline-flex);height:var(--r-input--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input--popover--align-items, center);justify-content:var(--r-input--popover--justify-content, center);margin-right:var(--r-input--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input--label{cursor:var(--r-input--label--cursor, inherit)}.r-input--input{font-family:var(--r-input--input--font-family, system-ui);font-size:var(--r-input--input--font-size, 1em);width:var(--r-input--input--width, 100%);max-width:var(--r-input--input--max-width, 100%);height:var(--r-input--input--height, var(--r-spacing-275, 2.75rem));border-radius:var(--r-input--input--border-radius, 0);border:var(--r-input--input--border, none);color:var(--r-input--input--color, var(--r-text-regular, #282828));background-color:var(--r-input--input--background-color, none);appearance:var(--r-input--input--appearance, none);box-sizing:var(--r-input--input--box-sizing, border-box);outline:var(--r-input--input--outline, none);cursor:var(--r-input--input--cursor, inherit);pointer-events:var(--r-input--input--pointer-events, auto)}.r-input--input:autofill,.r-input--input:-webkit-autofill{-webkit-background-clip:text !important}.r-input--input::-ms-reveal{display:var(--r-input--input--ms-reveal--display, none)}.r-input--input::placeholder{color:var(--r-input--input--placeholder--color, var(--r-text-soft, #686868))}.r-input--input[type=search]::-webkit-search-cancel-button{cursor:var(--r-input--input-clear--cursor, pointer);display:var(--r-input--input-clear--display, block);height:var(--r-input--input-clear--height, 0.875rem);width:var(--r-input--input-clear--width, 0.875rem);appearance:var(--r-input--input-clear--appearance, none);background-repeat:var(--r-input--input-clear--background-repeat, no-repeat);background-image:var(--r-input--input-clear--background-image, url(\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20stroke-width%3D%221.5%22%20viewBox%3D%220.75%200.75%2022.5%2022.5%22%3E%3Cpath%20id%3D%22Vector%202269%22%20stroke%3D%22currentColor%22%20d%3D%22M1.5%201.5L22.5%2022.5%22%2F%3E%3Cpath%20id%3D%22Vector%202270%22%20stroke%3D%22currentColor%22%20d%3D%22M22.5%201.5L1.5%2022.5%22%2F%3E%3C%2Fsvg%3E\"));background-size:var(--r-input--input-clear--background-size, contain);margin-inline:var(--r-input--input-clear--margin-inline, 0);color:currentColor}.r-input--button{position:var(--r-input--icon-button--position, absolute);width:var(--r-input--icon-button--width, calc(1.125em + var(--r-input--icon--width)));height:var(--r-input--icon-button--height, 100%);top:var(--r-input--icon-button--top, 0);right:var(--r-input--icon-button--right, auto);bottom:var(--r-input--icon-button--bottom, auto);left:var(--r-input--icon-button--left, 0);cursor:var(--r-input--icon-button--cursor, inherit)}.r-input--container{position:var(--r-input--container--position, relative);display:var(--r-input--container--display, flex);align-items:var(--r-input--container--align-items, center);gap:var(--r-input--container--gap, 0.625rem);height:var(--r-input--container--height, var(--r-spacing-275, 2.75rem));background-color:var(--r-input--container--background-color, var(--r-background-softest, #fff));border-width:var(--r-input--container--border-width, 1px);border-style:var(--r-input--container--border-style, solid);border-color:var(--r-input--container--border-color, var(--r-border-soft, #686868));box-sizing:var(--r-input--container--box-sizing, border-box);box-shadow:var(--r-input--container--box-shadow, none);outline:var(--r-input--container--outline, none);outline-offset:var(--r-input--container--outline-offset, 0);padding-top:var(--r-input--container--padding-top, 0.6875rem);padding-right:var(--r-input--container--padding-right, var(--r-spacing-075, 0.75rem));padding-bottom:var(--r-input--container--padding-bottom, 0.6875rem);padding-left:var(--r-input--container--padding-left, var(--r-spacing-0275, 0.75rem));opacity:var(--r-input--container--opacity, 1);pointer-events:var(--r-input--container--pointer-events, auto);line-height:var(--r-input--container--line-height, 1);cursor:var(--r-input--container--cursor, inherit);margin-top:var(--r-input--container--margin-top, var(--r-spacing-025, 0.25rem))}.r-input--container slot[name=leading]{color:var(--r-input--container-leading--color, var(--r-icon-soft, #686868))}.r-input--message:has(r-hint),.r-input--message ::slotted([slot=message]){margin-top:var(--r-input--message--margin-top, var(--r-spacing-025, 0.25rem))}.r-input--trailing{display:var(--r-input--trailing--display, flex);margin-left:var(--r-input--trailing--margin-left, auto);align-items:var(--r-input--trailing--align-items, center);gap:var(--r-input--trailing--gap, 0.625rem)}.r-input--trailing:empty{--r-input--trailing--display:none}.r-input--validation-icon{display:var(--r-input--validation-icon--display, inline-block)}.r-input--readonly-icon{color:var(--r-input--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}";
|
|
5
|
-
|
|
6
|
-
const RInput = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.rValidate = createEvent(this, "rValidate");
|
|
10
|
-
this.rInput = createEvent(this, "rInput");
|
|
11
|
-
this.rBlur = createEvent(this, "rBlur");
|
|
12
|
-
this.rFocus = createEvent(this, "rFocus");
|
|
13
|
-
this.rChange = createEvent(this, "rChange");
|
|
14
|
-
this.rReset = createEvent(this, "rReset");
|
|
15
|
-
/**
|
|
16
|
-
* Input type (e.g. `text`, `email`, `number`, `password`).
|
|
17
|
-
* See HTMLInputElement `type` for supported values.
|
|
18
|
-
*/
|
|
19
|
-
this.type = 'text';
|
|
20
|
-
/**
|
|
21
|
-
* Current value. Mutable: can be changed programmatically or through user input.
|
|
22
|
-
*/
|
|
23
|
-
this.value = '';
|
|
24
|
-
/**
|
|
25
|
-
* When `true` field renders valid/invalid marker within.
|
|
26
|
-
*/
|
|
27
|
-
this.validityMarker = true;
|
|
28
|
-
/** Validity state passed from validateFormElement function after validation */
|
|
29
|
-
this.validityState = '';
|
|
30
|
-
/** Validity message passed from validateFormElement function after validation */
|
|
31
|
-
this.validityMessage = '';
|
|
32
|
-
/** Defines if the component has been touched by user */
|
|
33
|
-
this.touched = false;
|
|
34
|
-
/** Defines if the value has been changed by user interaction */
|
|
35
|
-
this.dirty = false;
|
|
36
|
-
/** Private flag to prevent validation during reset */
|
|
37
|
-
this.isResetting = false;
|
|
38
|
-
this.nativeElement = null;
|
|
39
|
-
this.uniqueId = `r-input-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
40
|
-
/**
|
|
41
|
-
* Initial attributes state
|
|
42
|
-
* */
|
|
43
|
-
this.initial = {};
|
|
44
|
-
this.getValidityStateData = (element) => {
|
|
45
|
-
let validityState = '';
|
|
46
|
-
let validityMessage = '';
|
|
47
|
-
if (this.type === 'email' && this.pattern) {
|
|
48
|
-
element.setCustomValidity('');
|
|
49
|
-
validityState = this.validEmailPattern ? 'valid' : 'patternMismatch';
|
|
50
|
-
validityMessage = this.validEmailPattern ? '' : this.patternMismatchMessage;
|
|
51
|
-
return { validityState, validityMessage };
|
|
52
|
-
}
|
|
53
|
-
for (const state in element.validity) {
|
|
54
|
-
if (element.validity[state]) {
|
|
55
|
-
validityState = state;
|
|
56
|
-
const customMessage = this[state + 'Message'];
|
|
57
|
-
if (customMessage) {
|
|
58
|
-
validityMessage = customMessage;
|
|
59
|
-
return { validityState, validityMessage };
|
|
60
|
-
}
|
|
61
|
-
validityMessage = element.validationMessage;
|
|
62
|
-
// Found an error, use it even if no custom message
|
|
63
|
-
return { validityState, validityMessage };
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// No errors found, field is valid
|
|
67
|
-
return { validityState: 'valid', validityMessage: '' };
|
|
68
|
-
};
|
|
69
|
-
this.validateFormElement = (element) => {
|
|
70
|
-
if (element === null)
|
|
71
|
-
return;
|
|
72
|
-
if (this.isNoValidate)
|
|
73
|
-
return;
|
|
74
|
-
if (this.error)
|
|
75
|
-
return;
|
|
76
|
-
// Trigger browser validation to populate validity states
|
|
77
|
-
if (element.checkValidity) {
|
|
78
|
-
element.checkValidity();
|
|
79
|
-
}
|
|
80
|
-
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
81
|
-
this.validityState = validityState;
|
|
82
|
-
this.validityMessage = validityMessage;
|
|
83
|
-
const isValid = this.validityState === 'valid';
|
|
84
|
-
this.valid = isValid;
|
|
85
|
-
this.invalid = !isValid;
|
|
86
|
-
this.rValidate.emit({
|
|
87
|
-
state: this.validityState,
|
|
88
|
-
message: this.validityMessage
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
this.onInput = (event) => {
|
|
92
|
-
if (this.readonly)
|
|
93
|
-
return;
|
|
94
|
-
this.value = event.target.value;
|
|
95
|
-
this.touched = true;
|
|
96
|
-
this.dirty = true;
|
|
97
|
-
const { host, value } = this;
|
|
98
|
-
this.rInput.emit({ element: host, value });
|
|
99
|
-
};
|
|
100
|
-
this.onChange = event => {
|
|
101
|
-
if (this.readonly)
|
|
102
|
-
return;
|
|
103
|
-
this.value = event.target.value;
|
|
104
|
-
this.touched = true;
|
|
105
|
-
this.dirty = true;
|
|
106
|
-
const { host, value } = this;
|
|
107
|
-
this.rChange.emit({ element: host, value });
|
|
108
|
-
};
|
|
109
|
-
this.onBlur = () => {
|
|
110
|
-
this.host.classList.remove('focused');
|
|
111
|
-
this.touched = true;
|
|
112
|
-
this.validateFormElement(this.nativeElement);
|
|
113
|
-
this.rBlur.emit();
|
|
114
|
-
};
|
|
115
|
-
this.onFocus = () => {
|
|
116
|
-
this.host.classList.add('focused');
|
|
117
|
-
this.rFocus.emit();
|
|
118
|
-
};
|
|
119
|
-
this.contributeToFormData = (event) => {
|
|
120
|
-
appendControlToFormData(this.nativeElement || this.host, event.formData);
|
|
121
|
-
};
|
|
122
|
-
this.onResetForm = () => {
|
|
123
|
-
if (this.readonly)
|
|
124
|
-
return;
|
|
125
|
-
this.isResetting = true;
|
|
126
|
-
this.markAsPristine();
|
|
127
|
-
this.validityState = null;
|
|
128
|
-
this.validityMessage = null;
|
|
129
|
-
// Restore initial value without triggering validation
|
|
130
|
-
if (this.nativeElement) {
|
|
131
|
-
this.nativeElement.value = this.initial['value'] || '';
|
|
132
|
-
}
|
|
133
|
-
this.value = this.initial['value'];
|
|
134
|
-
this.invalid = this.initial['invalid'];
|
|
135
|
-
this.valid = !this.invalid;
|
|
136
|
-
this.isResetting = false;
|
|
137
|
-
const { host, value } = this;
|
|
138
|
-
this.rReset.emit({ element: host, value });
|
|
139
|
-
};
|
|
140
|
-
this.onSubmitForm = (event) => {
|
|
141
|
-
if (this.isNoValidate)
|
|
142
|
-
return;
|
|
143
|
-
this.touched = true;
|
|
144
|
-
this.validateFormElement(this.nativeElement);
|
|
145
|
-
if (this.invalid) {
|
|
146
|
-
event.preventDefault();
|
|
147
|
-
event.stopPropagation();
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
this.handleKeyup = (event) => {
|
|
151
|
-
var _a, _b;
|
|
152
|
-
this.validateFormElement(this.nativeElement);
|
|
153
|
-
if (this.invalid && !this.isNoValidate)
|
|
154
|
-
return;
|
|
155
|
-
if (event.code === 'Enter') {
|
|
156
|
-
const submitEl = this.host.querySelector('[type="submit"]') ||
|
|
157
|
-
((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.querySelector('[type="submit"]'));
|
|
158
|
-
if (submitEl && 'triggerClick' in submitEl) {
|
|
159
|
-
submitEl === null || submitEl === void 0 ? void 0 : submitEl.triggerClick();
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.requestSubmit();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
this.handleClick = () => {
|
|
167
|
-
this.host.shadowRoot.querySelector('input').focus();
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Programmatically focus the native input element.
|
|
172
|
-
*/
|
|
173
|
-
async setFocus() {
|
|
174
|
-
var _a;
|
|
175
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Programmatically remove focus from the native input.
|
|
179
|
-
*/
|
|
180
|
-
async setBlur() {
|
|
181
|
-
var _a;
|
|
182
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Select (highlight) the entire current input value.
|
|
186
|
-
*/
|
|
187
|
-
async select() {
|
|
188
|
-
var _a;
|
|
189
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.select();
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Get the start index of the current text selection (or null if unavailable).
|
|
193
|
-
*/
|
|
194
|
-
async getSelectionStart() {
|
|
195
|
-
var _a, _b;
|
|
196
|
-
return (_b = (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.selectionStart) !== null && _b !== void 0 ? _b : null;
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Get the end index of the current text selection (or null if unavailable).
|
|
200
|
-
*/
|
|
201
|
-
async getSelectionEnd() {
|
|
202
|
-
var _a, _b;
|
|
203
|
-
return (_b = (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.selectionEnd) !== null && _b !== void 0 ? _b : null;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Set a selection (or caret) range within the value.
|
|
207
|
-
* @param start Start index (inclusive)
|
|
208
|
-
* @param end End index (exclusive)
|
|
209
|
-
* @param direction Selection direction (browser hint)
|
|
210
|
-
*/
|
|
211
|
-
async setSelectionRange(start, end, direction = 'none') {
|
|
212
|
-
if (this.nativeElement) {
|
|
213
|
-
this.nativeElement.setSelectionRange(start, end, direction);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Retrieve the current value (returns empty string if unset).
|
|
218
|
-
*/
|
|
219
|
-
async getValue() {
|
|
220
|
-
var _a;
|
|
221
|
-
return ((_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Set the current value programmatically (does not fire native input/change automatically).
|
|
225
|
-
*/
|
|
226
|
-
async setValue(value) {
|
|
227
|
-
if (this.nativeElement) {
|
|
228
|
-
this.nativeElement.value = value;
|
|
229
|
-
}
|
|
230
|
-
this.value = value;
|
|
231
|
-
this.validateFormElement(this.nativeElement);
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Validates the input without triggering UI and returns a boolean indicating its validity.
|
|
235
|
-
* @returns A boolean indicating whether the input is valid.
|
|
236
|
-
*/
|
|
237
|
-
async checkValidity() {
|
|
238
|
-
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
239
|
-
return validityState === 'valid';
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Gets the touched state (whether user has interacted with the input)
|
|
243
|
-
*/
|
|
244
|
-
async isTouched() {
|
|
245
|
-
return this.touched;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Gets the dirty state (whether value has been changed by user)
|
|
249
|
-
*/
|
|
250
|
-
async isDirty() {
|
|
251
|
-
return this.dirty;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Resets touched and dirty states to pristine (untouched/clean)
|
|
255
|
-
*/
|
|
256
|
-
async markAsPristine() {
|
|
257
|
-
this.touched = false;
|
|
258
|
-
this.dirty = false;
|
|
259
|
-
}
|
|
260
|
-
/** Identify wrapping form element */
|
|
261
|
-
get parentFormEl() {
|
|
262
|
-
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
263
|
-
}
|
|
264
|
-
get ariaDescribedBy() {
|
|
265
|
-
const describedBy = `${this.uniqueId}-message`;
|
|
266
|
-
return this.hint ? `${this.uniqueId}-hint ${describedBy}` : describedBy;
|
|
267
|
-
}
|
|
268
|
-
get hasError() {
|
|
269
|
-
var _a;
|
|
270
|
-
return this.invalid && !!((_a = this.error) === null || _a === void 0 ? void 0 : _a.length);
|
|
271
|
-
}
|
|
272
|
-
get hasValidationError() {
|
|
273
|
-
return (this.validityState !== 'valid' || this.invalid) && !!(this.validityMessage || this.customErrorMessage);
|
|
274
|
-
}
|
|
275
|
-
get hasMessage() {
|
|
276
|
-
return this.hasError || this.hasValidationError;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Determine whether this element should be ignored
|
|
280
|
-
* during Constraint Validation API validation.
|
|
281
|
-
* */
|
|
282
|
-
get isNoValidate() {
|
|
283
|
-
var _a;
|
|
284
|
-
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
285
|
-
this.novalidate ||
|
|
286
|
-
false);
|
|
287
|
-
}
|
|
288
|
-
get hasTrailingSlot() {
|
|
289
|
-
return !!this.host.querySelector('[slot="trailing"]');
|
|
290
|
-
}
|
|
291
|
-
get validEmailPattern() {
|
|
292
|
-
const regex = new RegExp(this.pattern, 'u');
|
|
293
|
-
return regex.test(this.value);
|
|
294
|
-
}
|
|
295
|
-
componentWillLoad() {
|
|
296
|
-
this.initial['value'] = this.value;
|
|
297
|
-
this.initial['invalid'] = this.invalid;
|
|
298
|
-
}
|
|
299
|
-
connectFormEventListeners() {
|
|
300
|
-
var _a, _b, _c;
|
|
301
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
302
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
303
|
-
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('reset', this.onResetForm);
|
|
304
|
-
}
|
|
305
|
-
disconnectFormEventListeners() {
|
|
306
|
-
var _a, _b, _c;
|
|
307
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.contributeToFormData);
|
|
308
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('submit', this.onSubmitForm);
|
|
309
|
-
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('reset', this.onResetForm);
|
|
310
|
-
}
|
|
311
|
-
connectedCallback() {
|
|
312
|
-
this.connectFormEventListeners();
|
|
313
|
-
!!this.autofocus && queueMicrotask(() => { var _a; return (_a = this.host.querySelector('input[autofocus]')) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); });
|
|
314
|
-
}
|
|
315
|
-
disconnectedCallback() {
|
|
316
|
-
this.disconnectFormEventListeners();
|
|
317
|
-
}
|
|
318
|
-
handleValueChange() {
|
|
319
|
-
if (!this.isResetting) {
|
|
320
|
-
this.validateFormElement(this.nativeElement);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
handleTypeChange() {
|
|
324
|
-
this.setValue(this.nativeElement.value);
|
|
325
|
-
}
|
|
326
|
-
render() {
|
|
327
|
-
const { name, placeholder, required, fieldIndicator, maxlength, minlength, min, max, value, disabled, form, pattern, invalid, valid, hint, label, internal, uniqueId, autocomplete, readonly, autofocus, passwordrules, enterkeyhint, spellcheck, autocapitalize, validityMarker } = this;
|
|
328
|
-
const inputAttrs = {
|
|
329
|
-
disabled,
|
|
330
|
-
readonly,
|
|
331
|
-
required,
|
|
332
|
-
label,
|
|
333
|
-
name,
|
|
334
|
-
placeholder,
|
|
335
|
-
maxlength,
|
|
336
|
-
minlength,
|
|
337
|
-
min,
|
|
338
|
-
max,
|
|
339
|
-
form,
|
|
340
|
-
pattern,
|
|
341
|
-
autocomplete,
|
|
342
|
-
autofocus: autofocus || null,
|
|
343
|
-
passwordrules,
|
|
344
|
-
enterkeyhint,
|
|
345
|
-
autocapitalize,
|
|
346
|
-
spellcheck,
|
|
347
|
-
inputmode: this.inputmode || null,
|
|
348
|
-
id: uniqueId,
|
|
349
|
-
'data-value': value,
|
|
350
|
-
'aria-placeholder': placeholder,
|
|
351
|
-
'aria-invalid': `${invalid || false}`,
|
|
352
|
-
'aria-required': `${required || false}`,
|
|
353
|
-
'aria-describedby': this.ariaDescribedBy
|
|
354
|
-
};
|
|
355
|
-
const labelAttr = label ? {
|
|
356
|
-
id: `${uniqueId}-label`,
|
|
357
|
-
fieldIndicator
|
|
358
|
-
} : {};
|
|
359
|
-
const renderValidationMarker = () => {
|
|
360
|
-
const icons = {
|
|
361
|
-
valid: 'circled-check',
|
|
362
|
-
invalid: 'circled-exclamation-mark'
|
|
363
|
-
};
|
|
364
|
-
const colors = {
|
|
365
|
-
valid: '--r-status-success-regular',
|
|
366
|
-
invalid: '--r-status-error-regular'
|
|
367
|
-
};
|
|
368
|
-
const shouldShowValidMarker = !!validityMarker && !!valid && !!value;
|
|
369
|
-
const shouldShowInvalidMarker = !!validityMarker && !!invalid;
|
|
370
|
-
if (!shouldShowValidMarker && !shouldShowInvalidMarker)
|
|
371
|
-
return null;
|
|
372
|
-
const iconName = shouldShowInvalidMarker ? icons.invalid : icons.valid;
|
|
373
|
-
const iconColor = shouldShowInvalidMarker ? colors.invalid : colors.valid;
|
|
374
|
-
return h("r-icon", { class: "r-input--validation-icon", "aria-hidden": "true", size: "s", name: iconName, color: iconColor });
|
|
375
|
-
};
|
|
376
|
-
// Filter out event listener properties based on naming convention.
|
|
377
|
-
// Pass them to native element.
|
|
378
|
-
const eventListeners = Object.entries(this).reduce((acc, [key, value]) => {
|
|
379
|
-
if (typeof value === 'function' && key.startsWith('on')) {
|
|
380
|
-
acc[key] = value;
|
|
381
|
-
}
|
|
382
|
-
return acc;
|
|
383
|
-
}, {});
|
|
384
|
-
return (h(Host, { onClick: this.handleClick, onKeyup: this.handleKeyup, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { class: internal ? 'visually-hidden' : 'r-input--label-container' }, h("label", { htmlFor: uniqueId }, label ?
|
|
385
|
-
h("r-label", Object.assign({ class: "r-input--label" }, labelAttr), label)
|
|
386
|
-
:
|
|
387
|
-
h("slot", { name: "label" })), h("slot", { name: "popover" })), hint &&
|
|
388
|
-
h("r-hint", { id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { class: "r-input--container" }, h("slot", { name: "leading" }), h("input", Object.assign({ class: "r-input--input", type: this.type }, inputAttrs, eventListeners, { ref: el => this.nativeElement = el, value: this.value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus })), h("div", { class: "r-input--trailing" }, this.readonly &&
|
|
389
|
-
h("r-icon", { class: "r-input--readonly-icon", name: "pen-disabled", size: "s" }), renderValidationMarker(), this.hasTrailingSlot &&
|
|
390
|
-
h("slot", { name: "trailing" }))), h("div", { id: `${uniqueId}-message`, "aria-live": !internal ? 'polite' : null, class: !internal ? 'r-input--message' : 'visually-hidden' }, h("slot", { name: "message" }, this.hasMessage && h("r-hint", { variant: valid ? 'success' : 'error' }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage))))));
|
|
391
|
-
}
|
|
392
|
-
get host() { return getElement(this); }
|
|
393
|
-
static get watchers() { return {
|
|
394
|
-
"value": ["handleValueChange"],
|
|
395
|
-
"type": ["handleTypeChange"]
|
|
396
|
-
}; }
|
|
397
|
-
};
|
|
398
|
-
RInput.style = inputCss;
|
|
399
|
-
|
|
400
|
-
export { RInput as r_input };
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, F as Fragment, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
|
-
|
|
3
|
-
const listItemCss = ":host([alignment=top]){--r-list-item--trailing-text--font-weight:bold;--r-list-item--trailing--align-self:start}:host([alignment=bottom]) .r-list-item{--r-list-item--trailing--align-self:end}:host([divider]:not([divider=false])){--r-list-item--border-color:var(--r-border-soft, #686868);--r-list-item--border-width:0 0 1px 0}:host([active]) .r-list-item{--r-list-item--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([variant=navitem]:not([active]):hover:not([disabled]:not([disabled=false])))>.r-list-item,:host([href]:not([active]):hover:not([disabled]:not([disabled=false])))>.r-list-item{--r-list-item--cursor:pointer;--r-list-item--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([variant=navitem][has-sub-items]:hover:not([disabled]:not([disabled=false])))>.r-list-item-wrapper>.r-list-item{--r-list-item--cursor:pointer;--r-list-item--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([variant=navitem][has-sub-items]:has([active]):hover:not([disabled]:not([disabled=false])))>.r-list-item-wrapper>.r-list-item{--r-list-item--cursor:pointer;--r-list-item--background-color:transparent}:host([variant=navitem][expanded])>.r-list-item-wrapper>.r-list-item{--r-list-item--headline--font-weight:600;--r-list-item--trailing-icon--transform:rotate(180deg);--r-list-item--trailing-icon--color:var(--r-icon-regular, #282828)}:host([variant=navitem][active-parent]:not([expanded])),:host([variant=navitem][active]:not([expanded])){--r-list-item--background-color:var(--r-background-interactive-activated, rgba(40, 40, 40, 0.08))}:host([variant=subitem]) .r-list-item{--r-list-item--margin-left:27px;--r-list-item--border-width:0 0 0 1px;--r-list-item--border-color:var(--r-border-soft, #686868)}:host([variant=subitem][active]) .r-list-item{--r-list-item--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host(:focus-within) .r-list-item[href]{--r-list-item--box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);--r-list-item--outline:2px solid var(--r-border-focused, #0071e3);--r-list-item--outline-offset:2px}:host([disabled]:not([disabled=false])){cursor:not-allowed;--r-list-item--background-color:transparent}:host([disabled]:not([disabled=false])[divider]:not([divider=false])){--r-list-item--border-color:rgba(104,104,104, 0.4);--r-list-item--leading-icon--color:rgba(104,104,104, 0.4)}:host([truncate-description]:not([truncate-description=false])){--r-list-item--description--white-space:nowrap}:host{display:var(--display, block);pointer-events:var(--pointer-events, auto);outline:var(--outline, none);font-family:var(--font-family, var(--r-font-family-text, system-ui));line-height:var(--line-height, var(--r-line-height-m, 1.5));color:var(--color, var(--r-text-regular, #282828))}.r-list-item{display:var(--r-list-item--display, flex);align-items:var(--r-list-item--align-items, center);justify-content:var(--r-list-item--justify-content, center);gap:var(--r-list-item--gap, var(--r-spacing-100, 1rem));width:var(--r-list-item--width, inherit);padding:var(--r-list-item--padding, var(--r-spacing-100, 1rem));margin-left:var(--r-list-item--margin-left, 0);opacity:var(--r-list-item--opacity, 1);color:var(--r-list-item--color, inherit);box-shadow:var(--r-list-item--box-shadow, none);outline:var(--r-list-item--outline, none);outline-offset:var(--r-list-item--outline-offset, 0);text-decoration:var(--r-list-item--text-decoration, none);text-align:var(--r-list-item--text-align, left);background-color:var(--r-list-item--background-color, transparent);border-style:var(--r-list-item--border-style, solid);border-width:var(--r-list-item--border-width, 0);border-color:var(--r-list-item--border-color, transparent);cursor:var(--r-list-item--cursor, inherit);font-weight:var(--r-list-item--font-weight, var(--r-font-weight-regular, 400));font-family:var(--r-list-item--font-family, var(--r-font-family-text, system-ui))}.r-list-item:focus-visible{--r-list-item--box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);--r-list-item--outline:2px solid var(--r-border-focused, #0071e3);--r-list-item--outline-offset:2px}.r-list-item--leading{display:var(--r-list-item--leading--display, flex);align-items:var(--r-list-item--leading--align-items, center);color:var(--r-list-item--leading--color, var(--r-icon-soft, #686868))}.r-list-item--leading-icon{color:var(--r-list-item--leading-icon--color, var(--r-icon-soft, #686868))}.r-list-item--trailing{display:var(--r-list-item--trailing--display, flex);align-self:var(--r-list-item--trailing--align-self, center);gap:var(--r-list-item--trailing--gap, var(--r-spacing-050, 0.5rem));color:var(--r-list-item--trailing--color, inherit)}.r-list-item--trailing-icon{transition:var(--r-list-item--trailing-icon--transition, transform 250ms ease-in-out);transform:var(--r-list-item--trailing-icon--transform, rotate(0deg));color:var(--r-list-item--trailing-icon--color, inherit)}.r-list-item--trailing-text{font-weight:var(--r-list-item--trailing-text--font-weight, 400);white-space:var(--r-list-item--trailing-text--white-space, nowrap)}.r-list-item--trailing ::slotted(*){display:var(--r-list-item--trailing-slotted--display, flex);gap:var(--r-list-item--trailing-slotted--display, var(--r-spacing-050, 0.5rem))}.r-list-item--text{display:var(--r-list-item--text--display, flex);flex-grow:var(--r-list-item--text--flex-grow, 1);flex-direction:var(--r-list-item--text--flex-direction, column);gap:var(--r-list-item--text--gap, 0.125rem);white-space:var(--r-list-item--text--white-space, normal);overflow:var(--r-list-item--text--overflow, hidden);text-overflow:var(--r-list-item--text--text-overflow, ellipsis);font-weight:var(--r-list-item--trailing-text--font-weight, inherit)}.r-list-item--sr-text{display:var(--r-list-item--sr-text--display, none)}.r-list-item--headline{font-size:var(--r-list-item--headline--font-size, 1rem);font-weight:var(--r-list-item--headline--font-weight, 600);line-height:var(--r-list-item--headline--line-height, 1.5);color:var(--r-list-item--headline--color, inherit)}.r-list-item--description{font-size:var(--r-list-item--description--font-size, 1rem);font-weight:var(--r-list-item--description--font-weight, 400);line-height:var(--r-list-item--description--line-height, 1.5);color:var(--r-list-item--description--color, var(--r-text-regular, #282828));white-space:var(--r-list-item--description--white-space, normal);overflow:var(--r-list-item--description--overflow, hidden);text-overflow:var(--r-list-item--description--text-overflow, ellipsis)}.r-list-item--description ::slotted(a){color:var(--r-list-item--description--color, inherit)}.r-list-item-wrapper{width:var(--r-list-item-wrapper--width, 100%)}.sub-items{margin:var(--r-sub-items--margin, 0);padding:var(--r-sub-items--padding, 0);list-style-type:var(--r-sub-items--list-style-type, \"\")}.sub-items[aria-hidden=true]{display:none}.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}@media (prefers-reduced-motion){.r-list-item--trailing-icon{transition:none}}";
|
|
4
|
-
|
|
5
|
-
const RListItem = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
/** Controls the style variation of the list item, such as regular or subitem. */
|
|
9
|
-
this.variant = 'list-item';
|
|
10
|
-
/** Determines whether the list item is expanded to show its subitems. It can be toggled programmatically or through user interaction. */
|
|
11
|
-
this.expanded = false;
|
|
12
|
-
/** Unique id for each subItem list */
|
|
13
|
-
this.uniqueSubmitemsId = `r-list-item-subitems-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
14
|
-
this.isEl = (selector) => {
|
|
15
|
-
return this.host.querySelector(selector) !== null;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
/** Method to toggle sub-items of the list-item */
|
|
19
|
-
async toggleSubitems() {
|
|
20
|
-
if (this.disabled)
|
|
21
|
-
return;
|
|
22
|
-
if (this.variant === 'subitem')
|
|
23
|
-
return;
|
|
24
|
-
this.expanded = !this.expanded;
|
|
25
|
-
}
|
|
26
|
-
get isLeadingIcon() {
|
|
27
|
-
return !!this.leadingIcon || !!this.leadingIconSrc;
|
|
28
|
-
}
|
|
29
|
-
get isLeadingSlot() {
|
|
30
|
-
return this.isEl('[slot="leading"]');
|
|
31
|
-
}
|
|
32
|
-
get isLeading() {
|
|
33
|
-
return (this.isLeadingIcon && !this.hideLeadingIcon) || this.isLeadingSlot;
|
|
34
|
-
}
|
|
35
|
-
get isTrailingIcon() {
|
|
36
|
-
var _a, _b;
|
|
37
|
-
return ((_a = this.trailingIcon) === null || _a === void 0 ? void 0 : _a.length) > 0 || ((_b = this.trailingIconSrc) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
38
|
-
}
|
|
39
|
-
get isTrailingSlot() {
|
|
40
|
-
return this.isEl('[slot="trailing"]');
|
|
41
|
-
}
|
|
42
|
-
get isTrailing() {
|
|
43
|
-
var _a;
|
|
44
|
-
return this.isTrailingIcon || ((_a = this.trailingText) === null || _a === void 0 ? void 0 : _a.length) > 0 || this.isTrailingSlot;
|
|
45
|
-
}
|
|
46
|
-
get isTextSlot() {
|
|
47
|
-
return this.isEl('[slot="text"]');
|
|
48
|
-
}
|
|
49
|
-
get isHeadlineSlot() {
|
|
50
|
-
return this.isEl('[slot="headline"]');
|
|
51
|
-
}
|
|
52
|
-
get isDescriptionSlot() {
|
|
53
|
-
return this.isEl('[slot="description"]');
|
|
54
|
-
}
|
|
55
|
-
get headlineContent() {
|
|
56
|
-
var _a;
|
|
57
|
-
return ((_a = this.host.querySelector('[slot="headline"]')) === null || _a === void 0 ? void 0 : _a.textContent) || this.headline;
|
|
58
|
-
}
|
|
59
|
-
get hasSubitems() {
|
|
60
|
-
return this.isEl('[variant="subitem"]');
|
|
61
|
-
}
|
|
62
|
-
get subItems() {
|
|
63
|
-
var _a;
|
|
64
|
-
return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[variant="subitem"]');
|
|
65
|
-
}
|
|
66
|
-
/** Function to set tabindex for sub-items */
|
|
67
|
-
setTabIndexOnSubItems() {
|
|
68
|
-
if (this.hasSubitems) {
|
|
69
|
-
this.subItems.forEach((element) => {
|
|
70
|
-
var _a;
|
|
71
|
-
(_a = element.shadowRoot.querySelector('a.r-list-item')) === null || _a === void 0 ? void 0 : _a.setAttribute('tabindex', this.disabled ? '-1' : null);
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
componentDidLoad() {
|
|
76
|
-
this.setTabIndexOnSubItems();
|
|
77
|
-
}
|
|
78
|
-
get tagName() {
|
|
79
|
-
if (this.hasSubitems) {
|
|
80
|
-
return 'button';
|
|
81
|
-
}
|
|
82
|
-
return this.href && !this.disabled ? 'a' : 'div';
|
|
83
|
-
}
|
|
84
|
-
render() {
|
|
85
|
-
const { leadingIcon, leadingIconSrc, trailingIcon, trailingIconSrc, headline, trailingText, description } = this;
|
|
86
|
-
const TagName = this.tagName;
|
|
87
|
-
const itemAttrs = Object.assign(Object.assign(Object.assign({ href: TagName === 'a' ? this.href : null, 'aria-current': this.active && TagName === 'a' ? 'page' : null }, (this.disabled ? { role: 'link', 'aria-disabled': 'true' } : null)), (this.hasSubitems ? { 'aria-expanded': `${this.expanded}` } : null)), (this.hasSubitems ? { 'aria-controls': `${this.uniqueSubmitemsId}` } : null));
|
|
88
|
-
const ListItemContent = (h(TagName, Object.assign({ class: "r-list-item" }, itemAttrs, { onClick: () => this.hasSubitems && this.toggleSubitems() }), this.isLeading &&
|
|
89
|
-
h("span", { class: "r-list-item--leading" }, h("slot", { name: "leading" }, this.isLeadingIcon && !this.hideLeadingIcon &&
|
|
90
|
-
h("r-icon", { class: "r-list-item--leading-icon", name: leadingIcon, src: leadingIconSrc }))), h("span", { class: "r-list-item--text" }, !this.isTextSlot ?
|
|
91
|
-
h(Fragment, null, (this.isHeadlineSlot || headline) &&
|
|
92
|
-
h("span", { class: "r-list-item--headline" }, h("slot", { name: "headline" }, headline)), (description || this.isDescriptionSlot) &&
|
|
93
|
-
h("span", { class: "r-list-item--description" }, h("slot", { name: "description" }, description)))
|
|
94
|
-
:
|
|
95
|
-
h("slot", { name: "text" })), h("span", { class: "r-list-item--sr-text visually-hidden" }, this.headlineContent), this.isTrailing &&
|
|
96
|
-
h("span", { class: "r-list-item--trailing" }, h("slot", { name: "trailing" }, this.isTrailingIcon && !trailingText &&
|
|
97
|
-
h("r-icon", { class: "r-list-item--trailing-icon", name: trailingIcon, src: trailingIconSrc }), trailingText && !this.isTrailingIcon &&
|
|
98
|
-
h("span", { class: "r-list-item--trailing-text" }, trailingText)))));
|
|
99
|
-
if (!this.hasSubitems)
|
|
100
|
-
return h(Host, null, ListItemContent);
|
|
101
|
-
return (h(Host, null, h("div", { class: "r-list-item-wrapper" }, ListItemContent, h("ul", { "aria-hidden": `${!this.expanded}`, id: this.uniqueSubmitemsId, class: "sub-items" }, h("slot", null)))));
|
|
102
|
-
}
|
|
103
|
-
get host() { return getElement(this); }
|
|
104
|
-
};
|
|
105
|
-
RListItem.style = listItemCss;
|
|
106
|
-
|
|
107
|
-
export { RListItem as r_list_item };
|