@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,500 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
const OFFSET = 20;
|
|
3
|
-
export class Tooltip {
|
|
4
|
-
constructor() {
|
|
5
|
-
/** Tooltip display text */
|
|
6
|
-
this.text = '';
|
|
7
|
-
/** Specifies tooltip position */
|
|
8
|
-
this.position = 'top';
|
|
9
|
-
this.arrowPositionState = 'left';
|
|
10
|
-
this.isShown = false;
|
|
11
|
-
this.uniqueId = `r-tooltip-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
12
|
-
this.getOffsetLeft = (arrowPosition) => {
|
|
13
|
-
var _a, _b, _c;
|
|
14
|
-
const offsetLeft = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) - ((_c = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width));
|
|
15
|
-
switch (arrowPosition) {
|
|
16
|
-
case 'center':
|
|
17
|
-
return offsetLeft / 2;
|
|
18
|
-
case 'right':
|
|
19
|
-
return offsetLeft;
|
|
20
|
-
default:
|
|
21
|
-
return 0;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
this.alignTooltipPosition = () => {
|
|
25
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
26
|
-
const offsetHeight = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) - ((_c = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.height)) / 2;
|
|
27
|
-
const offsetLeft = this.getOffsetLeft(this.arrowPositionState);
|
|
28
|
-
const hostHeight = ((_e = (_d = this.element) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect()) === null || _e === void 0 ? void 0 : _e.height) + this.arrowHeight || 0;
|
|
29
|
-
const hostWidth = ((_g = (_f = this.element) === null || _f === void 0 ? void 0 : _f.getBoundingClientRect()) === null || _g === void 0 ? void 0 : _g.width) + this.arrowWidth || 0;
|
|
30
|
-
switch (this.positionState) {
|
|
31
|
-
case 'top':
|
|
32
|
-
this.alignPosition(this.tooltip, -offsetLeft, -this.tooltipContainerHeight);
|
|
33
|
-
break;
|
|
34
|
-
case 'bottom':
|
|
35
|
-
this.alignPosition(this.tooltip, -offsetLeft, hostHeight);
|
|
36
|
-
break;
|
|
37
|
-
case 'left':
|
|
38
|
-
this.alignPosition(this.tooltip, -this.tooltipContainerWidth, -offsetHeight);
|
|
39
|
-
break;
|
|
40
|
-
case 'right':
|
|
41
|
-
this.alignPosition(this.tooltip, hostWidth, -offsetHeight);
|
|
42
|
-
break;
|
|
43
|
-
default:
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
this.alignArrowPosition = () => {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
49
|
-
const offsetHeight = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) - ((_c = (_b = this.arrow) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.height)) / 2;
|
|
50
|
-
const offsetLeft = Math.abs(((_d = this.element) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect().width) - ((_f = (_e = this.arrow) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect()) === null || _f === void 0 ? void 0 : _f.width)) / 2;
|
|
51
|
-
const hostHeight = ((_h = (_g = this.element) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect()) === null || _h === void 0 ? void 0 : _h.height) || 0;
|
|
52
|
-
const hostWidth = ((_k = (_j = this.element) === null || _j === void 0 ? void 0 : _j.getBoundingClientRect()) === null || _k === void 0 ? void 0 : _k.width) || 0;
|
|
53
|
-
switch (this.positionState) {
|
|
54
|
-
case 'top':
|
|
55
|
-
this.alignPosition(this.arrow, offsetLeft, -this.arrowHeight);
|
|
56
|
-
break;
|
|
57
|
-
case 'bottom':
|
|
58
|
-
this.alignPosition(this.arrow, offsetLeft, hostHeight);
|
|
59
|
-
break;
|
|
60
|
-
case 'left':
|
|
61
|
-
this.alignPosition(this.arrow, -this.arrowWidth, offsetHeight);
|
|
62
|
-
break;
|
|
63
|
-
case 'right':
|
|
64
|
-
this.alignPosition(this.arrow, hostWidth, offsetHeight);
|
|
65
|
-
break;
|
|
66
|
-
default:
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
this.alignPosition = (element, offsetLeft, offsetTop) => {
|
|
71
|
-
var _a;
|
|
72
|
-
if (!element) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
let elementOffset = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
76
|
-
let left = elementOffset.left + offsetLeft;
|
|
77
|
-
let top = elementOffset.top + offsetTop;
|
|
78
|
-
element.style.left = `${left > 0 ? left : 0}px`;
|
|
79
|
-
element.style.top = `${top}px`;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Listen on hovering tooltip element and update tooltip position if needed
|
|
83
|
-
*/
|
|
84
|
-
this.handleHover = () => {
|
|
85
|
-
this.showTooltip();
|
|
86
|
-
this.setCorrectPosition();
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Listen on focusing tooltip element and update tooltip position if needed
|
|
90
|
-
*/
|
|
91
|
-
this.handleFocus = () => {
|
|
92
|
-
this.showTooltip();
|
|
93
|
-
this.setCorrectPosition();
|
|
94
|
-
this.rTooltipFocus.emit({ element: this.element });
|
|
95
|
-
};
|
|
96
|
-
this.showTooltip = () => {
|
|
97
|
-
var _a;
|
|
98
|
-
this.isShown = true;
|
|
99
|
-
this.tooltip.classList.add('r-tooltip--content--visible');
|
|
100
|
-
const interactiveElement = this.getInteractiveElement(this.activeElement);
|
|
101
|
-
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.setAttribute('aria-description', (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.innerText);
|
|
102
|
-
};
|
|
103
|
-
this.removeTooltip = () => {
|
|
104
|
-
this.isShown = false;
|
|
105
|
-
this.tooltip.style.width = 'max-content';
|
|
106
|
-
this.tooltip.classList.remove('r-tooltip--content--visible');
|
|
107
|
-
const interactiveElement = this.getInteractiveElement(this.activeElement);
|
|
108
|
-
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.removeAttribute('aria-description');
|
|
109
|
-
};
|
|
110
|
-
this.handleScroll = () => {
|
|
111
|
-
if (!this.isShown) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
if (!this.isOnScreen) {
|
|
115
|
-
this.removeTooltip();
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
this.setCorrectPosition();
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Watch on position value change and update tooltip position if needed
|
|
123
|
-
*/
|
|
124
|
-
handleVerticalPosition() {
|
|
125
|
-
this.setCorrectPosition();
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Listen on window scroll and update tooltip position if needed
|
|
129
|
-
*/
|
|
130
|
-
handleScrolling() {
|
|
131
|
-
this.setCorrectPosition();
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Listen on window resizing and update tooltip position if needed
|
|
135
|
-
*/
|
|
136
|
-
handleResizing() {
|
|
137
|
-
this.setCorrectPosition();
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Listen on window keydown and hide tooltip if needed
|
|
141
|
-
*/
|
|
142
|
-
handleKeydown(event) {
|
|
143
|
-
if (this.isShown && event.key === 'Escape') {
|
|
144
|
-
this.removeTooltip();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Parent with non visible overflow
|
|
149
|
-
*/
|
|
150
|
-
get overflowedParent() {
|
|
151
|
-
return this.findOverflowParent(this.element.parentElement);
|
|
152
|
-
}
|
|
153
|
-
get arrowWidth() {
|
|
154
|
-
var _a;
|
|
155
|
-
return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
156
|
-
}
|
|
157
|
-
get arrowHeight() {
|
|
158
|
-
var _a;
|
|
159
|
-
return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) || 0;
|
|
160
|
-
}
|
|
161
|
-
get tooltipContainerWidth() {
|
|
162
|
-
var _a, _b;
|
|
163
|
-
return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) + this.arrowWidth || 0;
|
|
164
|
-
}
|
|
165
|
-
get tooltipContainerHeight() {
|
|
166
|
-
var _a, _b;
|
|
167
|
-
return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height) + this.arrowHeight || 0;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Available space at the top
|
|
171
|
-
*/
|
|
172
|
-
get top() {
|
|
173
|
-
return this.element.getBoundingClientRect().top;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Available space on the left
|
|
177
|
-
*/
|
|
178
|
-
get left() {
|
|
179
|
-
return this.element.getBoundingClientRect().left;
|
|
180
|
-
}
|
|
181
|
-
get isOnScreen() {
|
|
182
|
-
const parent = this.overflowedParent || document.documentElement;
|
|
183
|
-
const parentRect = parent.getBoundingClientRect();
|
|
184
|
-
const elementRect = this.element.getBoundingClientRect();
|
|
185
|
-
const isVerticallyVisible = elementRect.top >= parentRect.top && elementRect.bottom <= parentRect.bottom;
|
|
186
|
-
const isHorizontallyVisible = elementRect.left >= parentRect.left && elementRect.right <= parentRect.right;
|
|
187
|
-
return isVerticallyVisible && isHorizontallyVisible;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Available space at the bottom
|
|
191
|
-
*/
|
|
192
|
-
get bottom() {
|
|
193
|
-
function calculateBottomSpace(element) {
|
|
194
|
-
return window.innerHeight - element.getBoundingClientRect().top - element.getBoundingClientRect().height;
|
|
195
|
-
}
|
|
196
|
-
return calculateBottomSpace(this.element);
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Available space on the right
|
|
200
|
-
*/
|
|
201
|
-
get right() {
|
|
202
|
-
function calculateRightSpace(element) {
|
|
203
|
-
return window.innerWidth - element.getBoundingClientRect().left - element.getBoundingClientRect().width;
|
|
204
|
-
}
|
|
205
|
-
return calculateRightSpace(this.element);
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Defines which horizontal placement is available
|
|
209
|
-
*/
|
|
210
|
-
get horizontalPlacement() {
|
|
211
|
-
return this.tooltipContainerWidth + OFFSET < this.left ? 'left' : 'right';
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Defines which vertical placement is available
|
|
215
|
-
*/
|
|
216
|
-
get verticalPlacement() {
|
|
217
|
-
return this.tooltipContainerHeight + OFFSET < this.top ? 'top' : 'bottom';
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Checks if there is enough space for placing tooltip vertically
|
|
221
|
-
*/
|
|
222
|
-
get isEnoughSpaceVertically() {
|
|
223
|
-
return this.tooltipContainerHeight + OFFSET < this.top || this.tooltipContainerHeight + OFFSET < this.bottom;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Checks if there is enough space for placing tooltip horizontally
|
|
227
|
-
*/
|
|
228
|
-
get isEnoughSpaceHorizontally() {
|
|
229
|
-
return this.tooltipContainerWidth + OFFSET < this.left || this.tooltipContainerWidth + OFFSET < this.right;
|
|
230
|
-
}
|
|
231
|
-
get activeElement() {
|
|
232
|
-
return this.element.querySelector('r-button, r-icon-button, a, button, [tabindex]:not([tabindex="-1"])');
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Gets the actual interactive element (button/link) from within r-button or r-icon-button shadow DOM,
|
|
236
|
-
* or returns the element itself if it's already interactive
|
|
237
|
-
*/
|
|
238
|
-
getInteractiveElement(element) {
|
|
239
|
-
if (!element)
|
|
240
|
-
return null;
|
|
241
|
-
if (element.tagName === 'R-BUTTON' || element.tagName === 'R-ICON-BUTTON') {
|
|
242
|
-
const shadowRoot = element.shadowRoot;
|
|
243
|
-
if (shadowRoot) {
|
|
244
|
-
return shadowRoot.querySelector('button, a');
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
return element;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Define position state
|
|
251
|
-
*/
|
|
252
|
-
componentWillLoad() {
|
|
253
|
-
this.positionState = this.position;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Listen to active child element
|
|
257
|
-
*/
|
|
258
|
-
componentDidLoad() {
|
|
259
|
-
var _a, _b, _c;
|
|
260
|
-
(_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
|
|
261
|
-
this.handleFocus();
|
|
262
|
-
});
|
|
263
|
-
(_b = this.activeElement) === null || _b === void 0 ? void 0 : _b.addEventListener('blur', () => {
|
|
264
|
-
this.removeTooltip();
|
|
265
|
-
});
|
|
266
|
-
(_c = this.overflowedParent) === null || _c === void 0 ? void 0 : _c.addEventListener('scroll', () => {
|
|
267
|
-
this.handleScroll();
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Finds first element's parent with not visible overflow.
|
|
272
|
-
* @param element -- parent element
|
|
273
|
-
* @param initEl -- initial(child) element
|
|
274
|
-
*/
|
|
275
|
-
findOverflowParent(element) {
|
|
276
|
-
var _a, _b;
|
|
277
|
-
function notVisible(element) {
|
|
278
|
-
return getComputedStyle(element).overflow !== "visible";
|
|
279
|
-
}
|
|
280
|
-
if (!element) {
|
|
281
|
-
return null;
|
|
282
|
-
}
|
|
283
|
-
if (((_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
284
|
-
return this.findOverflowParent((_b = element.parentNode) === null || _b === void 0 ? void 0 : _b.host);
|
|
285
|
-
}
|
|
286
|
-
if (notVisible(element)) {
|
|
287
|
-
return element;
|
|
288
|
-
}
|
|
289
|
-
if (element.parentElement) {
|
|
290
|
-
return this.findOverflowParent(element.parentElement);
|
|
291
|
-
}
|
|
292
|
-
return null;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Checks the alternative tooltip position.
|
|
296
|
-
* For example: If defined position is "top" and there is no free space for this position at the top of the component,
|
|
297
|
-
* first it checks available vertical space to place tooltip at the bottom.
|
|
298
|
-
* If there is no available space at the bottom, it checks the available space horizontally and sets it horizontally.
|
|
299
|
-
*/
|
|
300
|
-
getAlternativePosition() {
|
|
301
|
-
switch (this.position) {
|
|
302
|
-
case 'top':
|
|
303
|
-
return this.isEnoughSpaceVertically ? 'bottom' : this.horizontalPlacement;
|
|
304
|
-
case 'bottom':
|
|
305
|
-
return this.isEnoughSpaceVertically ? 'top' : this.horizontalPlacement;
|
|
306
|
-
case 'left':
|
|
307
|
-
return this.isEnoughSpaceHorizontally ? 'right' : this.verticalPlacement;
|
|
308
|
-
case 'right':
|
|
309
|
-
return this.isEnoughSpaceHorizontally ? 'left' : this.verticalPlacement;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Set correct tooltip position.
|
|
314
|
-
* First it checks the available space for a defined position and then sets the new one based on the available space.
|
|
315
|
-
*/
|
|
316
|
-
setCorrectPosition() {
|
|
317
|
-
if (!this.tooltip || !this.isShown) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
switch (this.position) {
|
|
321
|
-
case 'top':
|
|
322
|
-
this.positionState = this.tooltipContainerHeight + OFFSET < this.top ? this.position : this.getAlternativePosition();
|
|
323
|
-
break;
|
|
324
|
-
case 'bottom':
|
|
325
|
-
this.positionState = this.tooltipContainerHeight + OFFSET < this.bottom ? this.position : this.getAlternativePosition();
|
|
326
|
-
break;
|
|
327
|
-
case 'left':
|
|
328
|
-
this.positionState = this.tooltipContainerWidth + OFFSET < this.left ? this.position : this.getAlternativePosition();
|
|
329
|
-
break;
|
|
330
|
-
case 'right':
|
|
331
|
-
this.positionState = this.tooltipContainerWidth + OFFSET < this.right ? this.position : this.getAlternativePosition();
|
|
332
|
-
break;
|
|
333
|
-
}
|
|
334
|
-
this.adjustArrowPosition();
|
|
335
|
-
this.alignTooltipPosition();
|
|
336
|
-
this.alignArrowPosition();
|
|
337
|
-
// Allow tooltip content wrap and recalculate position
|
|
338
|
-
if (this.tooltip.style.width === 'fit-content') {
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
this.tooltip.style.width = 'fit-content';
|
|
342
|
-
this.alignTooltipPosition();
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Adjusts arrow correct position.
|
|
346
|
-
* For bottom & top tooltip positions there are 3 possible arrow.
|
|
347
|
-
* For right & left tooltip positions there is only one position = "center".
|
|
348
|
-
*/
|
|
349
|
-
adjustArrowPosition() {
|
|
350
|
-
const isEnoughTooltipSpaceLeft = this.tooltipContainerWidth / 2 + OFFSET < this.left;
|
|
351
|
-
const isEnoughTooltipSpaceRight = this.tooltipContainerWidth / 2 + OFFSET < this.right;
|
|
352
|
-
if (isEnoughTooltipSpaceLeft && isEnoughTooltipSpaceRight || !isEnoughTooltipSpaceLeft && !isEnoughTooltipSpaceRight || this.positionState === 'left' || this.positionState === 'right') {
|
|
353
|
-
this.arrowPositionState = 'center';
|
|
354
|
-
}
|
|
355
|
-
else if (!isEnoughTooltipSpaceLeft) {
|
|
356
|
-
this.arrowPositionState = 'left';
|
|
357
|
-
}
|
|
358
|
-
else if (!isEnoughTooltipSpaceRight) {
|
|
359
|
-
this.arrowPositionState = 'right';
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
render() {
|
|
363
|
-
const { text, arrowPositionState, positionState, isShown, uniqueId } = this;
|
|
364
|
-
const hostAttrs = {
|
|
365
|
-
'data-arrow-position': arrowPositionState,
|
|
366
|
-
'data-position': positionState
|
|
367
|
-
};
|
|
368
|
-
const triggerAttrs = {
|
|
369
|
-
tabindex: !this.activeElement ? 0 : null,
|
|
370
|
-
role: !this.activeElement ? 'button' : null,
|
|
371
|
-
'aria-describedby': !this.activeElement && isShown ? uniqueId : null
|
|
372
|
-
};
|
|
373
|
-
const contentAttrs = {
|
|
374
|
-
id: uniqueId,
|
|
375
|
-
role: 'tooltip',
|
|
376
|
-
'aria-hidden': `${!isShown}`
|
|
377
|
-
};
|
|
378
|
-
return (h(Host, Object.assign({ key: '5d8a002a227895d5e633e8b1df95ba449a9e253a' }, hostAttrs, { onMouseenter: this.handleHover, onMouseleave: this.removeTooltip }), h("div", { key: '4e6340639dc27fc7d0e981ca7cf8a4046737527f', class: "r-tooltip" }, h("div", Object.assign({ key: 'bcf2d5c73b427b2941be8de56b9ce2f296ae07eb', class: "r-tooltip--trigger", onFocus: this.handleFocus, onBlur: this.removeTooltip }, triggerAttrs), h("slot", { key: 'be7037ba07bf11b4957910c52f4a3f329b514007' })), h("div", Object.assign({ key: '300a3ef08b7c73b6b07161c58860df518ae9a862', class: "r-tooltip--content", ref: (el) => this.tooltip = el }, contentAttrs), text), h("div", { key: '73912349289b0dc365552331197d94bd0896ff3c', ref: (el) => this.arrow = el, class: "r-tooltip--arrow" }))));
|
|
379
|
-
}
|
|
380
|
-
static get is() { return "r-tooltip"; }
|
|
381
|
-
static get encapsulation() { return "shadow"; }
|
|
382
|
-
static get originalStyleUrls() {
|
|
383
|
-
return {
|
|
384
|
-
"$": ["tooltip.css"]
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
static get styleUrls() {
|
|
388
|
-
return {
|
|
389
|
-
"$": ["tooltip.css"]
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
static get properties() {
|
|
393
|
-
return {
|
|
394
|
-
"text": {
|
|
395
|
-
"type": "string",
|
|
396
|
-
"attribute": "text",
|
|
397
|
-
"mutable": false,
|
|
398
|
-
"complexType": {
|
|
399
|
-
"original": "string",
|
|
400
|
-
"resolved": "string",
|
|
401
|
-
"references": {}
|
|
402
|
-
},
|
|
403
|
-
"required": false,
|
|
404
|
-
"optional": false,
|
|
405
|
-
"docs": {
|
|
406
|
-
"tags": [],
|
|
407
|
-
"text": "Tooltip display text"
|
|
408
|
-
},
|
|
409
|
-
"getter": false,
|
|
410
|
-
"setter": false,
|
|
411
|
-
"reflect": true,
|
|
412
|
-
"defaultValue": "''"
|
|
413
|
-
},
|
|
414
|
-
"position": {
|
|
415
|
-
"type": "string",
|
|
416
|
-
"attribute": "position",
|
|
417
|
-
"mutable": false,
|
|
418
|
-
"complexType": {
|
|
419
|
-
"original": "TooltipPosition",
|
|
420
|
-
"resolved": "\"bottom\" | \"left\" | \"right\" | \"top\"",
|
|
421
|
-
"references": {
|
|
422
|
-
"TooltipPosition": {
|
|
423
|
-
"location": "import",
|
|
424
|
-
"path": "./exports",
|
|
425
|
-
"id": "src/components/tooltip/exports.ts::TooltipPosition"
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
},
|
|
429
|
-
"required": false,
|
|
430
|
-
"optional": false,
|
|
431
|
-
"docs": {
|
|
432
|
-
"tags": [],
|
|
433
|
-
"text": "Specifies tooltip position"
|
|
434
|
-
},
|
|
435
|
-
"getter": false,
|
|
436
|
-
"setter": false,
|
|
437
|
-
"reflect": true,
|
|
438
|
-
"defaultValue": "'top'"
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
static get states() {
|
|
443
|
-
return {
|
|
444
|
-
"positionState": {},
|
|
445
|
-
"arrowPositionState": {},
|
|
446
|
-
"isShown": {}
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
static get events() {
|
|
450
|
-
return [{
|
|
451
|
-
"method": "rTooltipFocus",
|
|
452
|
-
"name": "rTooltipFocus",
|
|
453
|
-
"bubbles": true,
|
|
454
|
-
"cancelable": true,
|
|
455
|
-
"composed": true,
|
|
456
|
-
"docs": {
|
|
457
|
-
"tags": [],
|
|
458
|
-
"text": "Tooltip focus event"
|
|
459
|
-
},
|
|
460
|
-
"complexType": {
|
|
461
|
-
"original": "{\n element: HTMLRTooltipElement\n }",
|
|
462
|
-
"resolved": "{ element: HTMLRTooltipElement; }",
|
|
463
|
-
"references": {
|
|
464
|
-
"HTMLRTooltipElement": {
|
|
465
|
-
"location": "global",
|
|
466
|
-
"id": "global::HTMLRTooltipElement"
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
}];
|
|
471
|
-
}
|
|
472
|
-
static get elementRef() { return "element"; }
|
|
473
|
-
static get watchers() {
|
|
474
|
-
return [{
|
|
475
|
-
"propName": "position",
|
|
476
|
-
"methodName": "handleVerticalPosition"
|
|
477
|
-
}];
|
|
478
|
-
}
|
|
479
|
-
static get listeners() {
|
|
480
|
-
return [{
|
|
481
|
-
"name": "scroll",
|
|
482
|
-
"method": "handleScrolling",
|
|
483
|
-
"target": "window",
|
|
484
|
-
"capture": false,
|
|
485
|
-
"passive": true
|
|
486
|
-
}, {
|
|
487
|
-
"name": "resize",
|
|
488
|
-
"method": "handleResizing",
|
|
489
|
-
"target": "window",
|
|
490
|
-
"capture": false,
|
|
491
|
-
"passive": true
|
|
492
|
-
}, {
|
|
493
|
-
"name": "keydown",
|
|
494
|
-
"method": "handleKeydown",
|
|
495
|
-
"target": "window",
|
|
496
|
-
"capture": false,
|
|
497
|
-
"passive": false
|
|
498
|
-
}];
|
|
499
|
-
}
|
|
500
|
-
}
|
package/dist/collection/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export function focusableElements(root) {
|
|
2
|
-
const selectors = [
|
|
3
|
-
'a[href]',
|
|
4
|
-
'button:not([disabled])',
|
|
5
|
-
'textarea:not([disabled])',
|
|
6
|
-
'input:not([disabled])',
|
|
7
|
-
'select:not([disabled])',
|
|
8
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
9
|
-
'r-button',
|
|
10
|
-
'r-checkbox',
|
|
11
|
-
'r-radio-button',
|
|
12
|
-
'r-input',
|
|
13
|
-
'r-textarea',
|
|
14
|
-
'r-select',
|
|
15
|
-
'r-input-code',
|
|
16
|
-
'r-input-date',
|
|
17
|
-
'r-input-password',
|
|
18
|
-
'r-input-phone-number'
|
|
19
|
-
];
|
|
20
|
-
return Array.from(root.querySelectorAll(selectors.join(',')))
|
|
21
|
-
.filter((el) => el instanceof HTMLElement &&
|
|
22
|
-
!el.hasAttribute('disabled') &&
|
|
23
|
-
!el.getAttribute('aria-hidden')) || null;
|
|
24
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export function appendControlToFormData(controlOrControls, formData) {
|
|
2
|
-
var _a, _b, _c;
|
|
3
|
-
const controls = Array.isArray(controlOrControls)
|
|
4
|
-
? controlOrControls
|
|
5
|
-
: [controlOrControls];
|
|
6
|
-
for (const control of controls) {
|
|
7
|
-
const name = control.name;
|
|
8
|
-
if (!name)
|
|
9
|
-
continue;
|
|
10
|
-
if (control.disabled)
|
|
11
|
-
continue;
|
|
12
|
-
const tag = (_b = (_a = control.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
13
|
-
if (tag === 'BUTTON' || tag === 'FIELDSET')
|
|
14
|
-
continue;
|
|
15
|
-
let valueToAppend = '';
|
|
16
|
-
switch (control.type) {
|
|
17
|
-
case 'checkbox':
|
|
18
|
-
case 'radio':
|
|
19
|
-
if (!control.checked)
|
|
20
|
-
continue;
|
|
21
|
-
valueToAppend = control.value || 'on';
|
|
22
|
-
break;
|
|
23
|
-
case 'file':
|
|
24
|
-
if (control.files && control.files.length > 0) {
|
|
25
|
-
for (const file of control.files) {
|
|
26
|
-
formData.append(name, file);
|
|
27
|
-
}
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
formData.append(name, new File([], ''));
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
default:
|
|
35
|
-
valueToAppend = (_c = control.value) !== null && _c !== void 0 ? _c : '';
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
formData.append(name, valueToAppend);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import StyleObserver from "style-observer";
|
|
2
|
-
// Track observers per theme context element
|
|
3
|
-
const contextObservers = new Map();
|
|
4
|
-
// Track which elements already have inverse theme setup to avoid duplicates
|
|
5
|
-
const inverseThemeTargets = new WeakMap();
|
|
6
|
-
// Special design token defined for this purpose. Defined as either 'light' or 'dark'.
|
|
7
|
-
const THEME_STATE_PROPERTY = '--r-internal-theme-state';
|
|
8
|
-
/**
|
|
9
|
-
* Sets up an inverse theme relationship between a target element and its theme context element.
|
|
10
|
-
* The target will automatically update its theme to be the inverse of its parent context.
|
|
11
|
-
* @param targetElement Element that should have inverse theme
|
|
12
|
-
* @param themeContextElement Element that contains the theme context
|
|
13
|
-
*/
|
|
14
|
-
export const setupInverseThemeAwareness = (targetElement, themeContextElement) => {
|
|
15
|
-
if (!themeContextElement || !targetElement)
|
|
16
|
-
return;
|
|
17
|
-
// Check if this target is already set up with this context
|
|
18
|
-
const existingTargets = inverseThemeTargets.get(themeContextElement);
|
|
19
|
-
if (existingTargets === null || existingTargets === void 0 ? void 0 : existingTargets.has(targetElement))
|
|
20
|
-
return;
|
|
21
|
-
// Store this target as set up
|
|
22
|
-
if (!existingTargets) {
|
|
23
|
-
inverseThemeTargets.set(themeContextElement, new Set([targetElement]));
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
existingTargets.add(targetElement);
|
|
27
|
-
}
|
|
28
|
-
// Find or create observer for this context
|
|
29
|
-
let observer = contextObservers.get(themeContextElement);
|
|
30
|
-
if (!observer) {
|
|
31
|
-
const observerCallback = (records) => {
|
|
32
|
-
const record = records[0];
|
|
33
|
-
if (!record)
|
|
34
|
-
return;
|
|
35
|
-
const theme = resolveTheme(record.value);
|
|
36
|
-
const inverseTheme = theme === 'dark' ? 'light' : 'dark';
|
|
37
|
-
// Update all targets for this context
|
|
38
|
-
const targets = inverseThemeTargets.get(themeContextElement);
|
|
39
|
-
targets === null || targets === void 0 ? void 0 : targets.forEach(target => {
|
|
40
|
-
target.setAttribute('data-theme', inverseTheme);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
observer = new StyleObserver(observerCallback, {
|
|
44
|
-
target: themeContextElement,
|
|
45
|
-
properties: THEME_STATE_PROPERTY
|
|
46
|
-
});
|
|
47
|
-
contextObservers.set(themeContextElement, observer);
|
|
48
|
-
// Immediate check for initial value
|
|
49
|
-
const computedStyle = window.getComputedStyle(themeContextElement);
|
|
50
|
-
const initialValue = computedStyle.getPropertyValue(THEME_STATE_PROPERTY);
|
|
51
|
-
observerCallback([{
|
|
52
|
-
target: themeContextElement,
|
|
53
|
-
property: THEME_STATE_PROPERTY,
|
|
54
|
-
value: initialValue,
|
|
55
|
-
oldValue: null
|
|
56
|
-
}]);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
// Observer exists already, just need to set initial theme on the new target
|
|
60
|
-
const computedStyle = window.getComputedStyle(themeContextElement);
|
|
61
|
-
const initialValue = computedStyle.getPropertyValue(THEME_STATE_PROPERTY);
|
|
62
|
-
const theme = resolveTheme(initialValue);
|
|
63
|
-
const inverseTheme = theme === 'dark' ? 'light' : 'dark';
|
|
64
|
-
targetElement.setAttribute('data-theme', inverseTheme);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Removes the inverse theme relationship between a target element and its theme context element.
|
|
69
|
-
* This function cleans up any observers and references created by setupInverseThemeAwareness.
|
|
70
|
-
* @param targetElement Element that has inverse theme
|
|
71
|
-
* @param themeContextElement Element that contains the theme context
|
|
72
|
-
*/
|
|
73
|
-
export const stopInverseThemeAwareness = (targetElement, themeContextElement) => {
|
|
74
|
-
if (!themeContextElement || !targetElement)
|
|
75
|
-
return;
|
|
76
|
-
// Get the set of targets for this context
|
|
77
|
-
const targets = inverseThemeTargets.get(themeContextElement);
|
|
78
|
-
if (!targets || !targets.has(targetElement))
|
|
79
|
-
return;
|
|
80
|
-
// Remove the target from the set
|
|
81
|
-
targets.delete(targetElement);
|
|
82
|
-
// If no more targets for this context, clean up the observer
|
|
83
|
-
if (targets.size === 0) {
|
|
84
|
-
inverseThemeTargets.delete(themeContextElement);
|
|
85
|
-
const observer = contextObservers.get(themeContextElement);
|
|
86
|
-
if (observer) {
|
|
87
|
-
// Remove the observer (StyleObserver has no disconnect method, it auto-cleans)
|
|
88
|
-
contextObservers.delete(themeContextElement);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Resolves theme based on CSS property value
|
|
94
|
-
* @param value - The value of the CSS property (should be 'light' or 'dark')
|
|
95
|
-
* @returns The resolved theme
|
|
96
|
-
*/
|
|
97
|
-
const resolveTheme = (value) => {
|
|
98
|
-
const trimmedValue = value === null || value === void 0 ? void 0 : value.trim();
|
|
99
|
-
if (trimmedValue === 'dark') {
|
|
100
|
-
return 'dark';
|
|
101
|
-
}
|
|
102
|
-
return 'light';
|
|
103
|
-
};
|