@riverty/web-components 6.2.1 → 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 +24 -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.css +0 -52
- package/dist/collection/components/illustration/illustration.js +0 -540
- 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-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-ff6b1b8f.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,467 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-BnETQtSf.js');
|
|
4
|
-
|
|
5
|
-
const iconButtonCss = ":host{display:inline-flex;vertical-align:top;--r-icon-button--color:inherit}:host(:hover:not([disabled]:not([disabled=false])):not(:active)){--r-icon-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:active:not([disabled]:not([disabled=false]))){--r-icon-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host(:focus-within:not(:active):not([disabled]:not([disabled=false]))){box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}:host([disabled]:not([disabled=false])){opacity:0.4;--r-icon-button--cursor:not-allowed;--r-icon-button--box-shadow:none;--r-icon-button--background-color:transparent}:host([variant=contained]){--r-icon-button--color:var(--r-icon-inverse, #fff);--r-icon-button--background-color:var(--r-background-interactive-regular, #282828);--r-icon-button--box-shadow:none}:host([variant=contained]:hover:not([disabled]:not([disabled=false]))){--r-icon-button--color:var(--r-icon-regular, #282828);--r-icon-button--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host([variant=contained]:active:not([disabled]:not([disabled=false]))){--r-icon-button--color:var(--r-icon-regular, #282828);--r-icon-button--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([variant=contained][disabled]:not([disabled=false])){--r-icon-button--color:var(--r-icon-inverse, #fff);--r-icon-button--background-color:var(--r-background-interactive-regular, #282828)}:host([size=s]){--r-icon-button--height:1.5rem;--r-icon-button--width:1.5rem}:host([size=m]){--r-icon-button--height:2.25rem;--r-icon-button--width:2.25rem}:host([size=l]){--r-icon-button--height:2.75rem;--r-icon-button--width:2.75rem}.r-icon-button{display:var(--r-icon-button--display, inline-flex);align-items:var(--r-icon-button--align-items, center);justify-content:var(--r-icon-button--justify-content, center);outline:var(--r-icon-button--outline, none);cursor:var(--r-icon-button--cursor, pointer);pointer-events:var(--r-icon-button--pointer-events, initial);padding:var(--r-icon-button--padding, 0);border:var(--r-icon-button--border, none);color:var(--r-icon-button--color, inherit);background-color:var(--r-icon-button--background-color, transparent);box-sizing:var(--r-icon-button--box-sizing, border-box);border-width:var(--r-icon-button--border-width, 1px);border-style:var(--r-icon-button--border-style, solid);border-color:var(--r-icon-button--border-color, transparent);border-radius:var(--r-icon-button--border-radius, 50%);z-index:var(--r-icon-button--z-index, initial);width:var(--r-icon-button--width, 2.25rem);height:var(--r-icon-button--height, 2.25rem)}.r-icon-button--target-area{position:var(--r-icon-button--target-area--position, absolute);background:var(--r-icon-button--target-area--background, rgba(0, 0, 0, 0));width:var(--r-icon-button--target-area--width, 2.75rem);height:var(--r-icon-button--target-area--height, 2.75rem);z-index:var(--r-icon-button--target-area--z-index, 1)}.r-icon-button--icon{display:flex;align-items:center;justify-content:center}.visually-hidden{position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}";
|
|
6
|
-
|
|
7
|
-
const IconButton = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.rClick = index.createEvent(this, "rClick");
|
|
11
|
-
/**
|
|
12
|
-
* Defines the size of the icon used within the button.
|
|
13
|
-
*/
|
|
14
|
-
this.size = 'm';
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Use the `<r-tooltip>` component as a wrapper instead.
|
|
17
|
-
* Sets position for the tooltip.
|
|
18
|
-
* - `top`: Tooltip appears above the button.
|
|
19
|
-
* - `bottom`: Tooltip appears below the button.
|
|
20
|
-
* - `left`: Tooltip appears to the left of the button.
|
|
21
|
-
* - `right`: Tooltip appears to the right of the button.
|
|
22
|
-
*/
|
|
23
|
-
this.tooltipPosition = 'top';
|
|
24
|
-
/**
|
|
25
|
-
* Defines the visual style of the button.
|
|
26
|
-
* - `standard`: Default button style.
|
|
27
|
-
* - `contained`: Button with a contained background.
|
|
28
|
-
*/
|
|
29
|
-
this.variant = 'standard';
|
|
30
|
-
this._handleClick = (event) => {
|
|
31
|
-
if (this.disabled) {
|
|
32
|
-
event.preventDefault();
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
this.rClick.emit();
|
|
36
|
-
};
|
|
37
|
-
this.onFocus = () => {
|
|
38
|
-
this.setFocus();
|
|
39
|
-
};
|
|
40
|
-
this.onBlur = () => {
|
|
41
|
-
this.setBlur();
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/** Simulate a button click */
|
|
45
|
-
async triggerClick() {
|
|
46
|
-
var _a;
|
|
47
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.click();
|
|
48
|
-
}
|
|
49
|
-
/** Set focus on the button */
|
|
50
|
-
async setFocus() {
|
|
51
|
-
var _a;
|
|
52
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
53
|
-
}
|
|
54
|
-
/** Remove focus from the button */
|
|
55
|
-
async setBlur() {
|
|
56
|
-
var _a;
|
|
57
|
-
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
58
|
-
}
|
|
59
|
-
render() {
|
|
60
|
-
const { name, size, disabled, tooltipText, tooltipPosition } = this;
|
|
61
|
-
const buttonAttrs = {
|
|
62
|
-
disabled,
|
|
63
|
-
};
|
|
64
|
-
const iconAttrs = {
|
|
65
|
-
name,
|
|
66
|
-
size
|
|
67
|
-
};
|
|
68
|
-
const buttonTemplate = () => (index.h("button", Object.assign({ key: '05fbf705a760c71c292bfd0e61b56a362c8b8a36', type: "button", tabindex: !this.disabled && this.rTabindex || null, class: "r-icon-button", "aria-label": this.host.getAttribute('aria-label') || null }, buttonAttrs, { onClick: this._handleClick, onFocus: this.onFocus, onBlur: this.onBlur, ref: (el) => (this.nativeElement = el) }), name ?
|
|
69
|
-
index.h("r-icon", Object.assign({}, iconAttrs))
|
|
70
|
-
:
|
|
71
|
-
index.h("r-icon", { size: size, class: "r-icon-button--icon" }, index.h("slot", null)), index.h("span", { key: '9c6d1c80c1e8cc88345a5e45b0060cb0eb285904', class: "r-icon-button--label visually-hidden" }, this.label), index.h("span", { key: '4ea91afe81b472b5ce5c6a993574518ab1a40d2f', class: "r-icon-button--target-area" })));
|
|
72
|
-
return (index.h(index.Host, { key: '54574ad857a36fdb0f263a3abf224c3d24955f07' }, !disabled && tooltipText ?
|
|
73
|
-
index.h("r-tooltip", { text: tooltipText, position: tooltipPosition }, buttonTemplate())
|
|
74
|
-
:
|
|
75
|
-
buttonTemplate()));
|
|
76
|
-
}
|
|
77
|
-
get host() { return index.getElement(this); }
|
|
78
|
-
};
|
|
79
|
-
IconButton.style = iconButtonCss;
|
|
80
|
-
|
|
81
|
-
const tooltipCss = ":host{display:inline-block;--r-tooltip--position:relative;--r-tooltip--content--position:fixed;--r-tooltip--content--display:none;--r-tooltip--content--color:var(--r-text-inverse);--r-tooltip--content--background-color:var(--r-background-inverse);--r-tooltip--content--font-family:var(--r-font-family-text);--r-tooltip--content--font-weight:var(--r-font-weight-regular);--r-tooltip--content--font-size:var(--r-font-size-200);--r-tooltip--content--line-height:var(--r-line-height-s);--r-tooltip--content--min-width:32px;--r-tooltip--content--max-width:300px;--r-tooltip--content--min-height:32px;--r-tooltip--content--padding:var(--r-spacing-050) var(--r-spacing-100);--r-tooltip--content--width:max-width;--r-tooltip--content--word-break:break-word;--r-tooltip--content--box-sizing:border-box;--r-tooltip--content--justify-content:center;--r-tooltip--content--align-items:center;--r-tooltip--content--z-index:0;--r-tooltip--arrow--display:none;--r-tooltip--arrow--position:fixed;--r-tooltip--arrow--width:12px;--r-tooltip--arrow--height:12px;--r-tooltip--arrow--transform:rotate(180deg);--r-tooltip--arrow--inner-content:\"\";--r-tooltip--arrow--inner--width:12px;--r-tooltip--arrow--inner--height:6px;--r-tooltip--arrow--inner--background-color:var(--r-tooltip--content--background-color);--r-tooltip--arrow--inner--clip-path:polygon(50% 0%, 0% 100%, 100% 100%);--r-tooltip--arrow--inner--border-radius:0;--r-tooltip--arrow--inner--align-self:flex-end}:host slot{display:contents}:host([data-position=bottom]){--r-tooltip--arrow--transform:rotate(0)}:host([data-position=right]){--r-tooltip--arrow--transform:rotate(270deg)}:host([data-position=left]){--r-tooltip--arrow--transform:rotate(90deg)}.r-tooltip{position:var(--r-tooltip--position)}.r-tooltip:has(.r-tooltip--content--visible){--r-tooltip--content--width:max-content;--r-tooltip--content--display:flex;--r-tooltip--content--z-index:1060;--r-tooltip--arrow--display:flex;--r-tooltip--arrow--inner--display:block}.r-tooltip--trigger{color:var(--r-tooltip--trigger--color, inherit);box-shadow:var(--r-tooltip--trigger--box-shadow, none);outline:var(--r-tooltip--trigger--outline, none);outline-offset:var(--r-tooltip--trigger--outline-offset, 0)}.r-tooltip--trigger:focus{--r-tooltip--trigger--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-tooltip--trigger--outline:2px solid var(--r-border-focused);--r-tooltip--trigger--outline-offset:2px}.r-tooltip--content{position:var(--r-tooltip--content--position);display:var(--r-tooltip--content--display);color:var(--r-tooltip--content--color);background-color:var(--r-tooltip--content--background-color);font-family:var(--r-tooltip--content--font-family);font-weight:var(--r-tooltip--content--font-weight);font-size:var(--r-tooltip--content--font-size);line-height:var(--r-tooltip--content--line-height);min-width:var(--r-tooltip--content--min-width);max-width:var(--r-tooltip--content--max-width);min-height:var(--r-tooltip--content--min-height);padding:var(--r-tooltip--content--padding);width:var(--r-tooltip--content--width);word-break:var(--r-tooltip--content--word-break);box-sizing:var(--r-tooltip--content--box-sizing);z-index:var(--r-tooltip--content--z-index)}.r-tooltip--arrow{display:var(--r-tooltip--arrow--display);position:var(--r-tooltip--arrow--position);width:var(--r-tooltip--arrow--width);height:var(--r-tooltip--arrow--height);transform:var(--r-tooltip--arrow--transform)}.r-tooltip--arrow:after{content:var(--r-tooltip--arrow--inner-content);display:var(--r-tooltip--arrow--inner--display);width:var(--r-tooltip--arrow--inner--width);height:var(--r-tooltip--arrow--inner--height);background-color:var(--r-tooltip--arrow--inner--background-color);clip-path:var(--r-tooltip--arrow--inner--clip-path);border-radius:var(--r-tooltip--arrow--inner--border-radius);align-self:var(--r-tooltip--arrow--inner--align-self)}";
|
|
82
|
-
|
|
83
|
-
const OFFSET = 20;
|
|
84
|
-
const Tooltip = class {
|
|
85
|
-
constructor(hostRef) {
|
|
86
|
-
index.registerInstance(this, hostRef);
|
|
87
|
-
this.rTooltipFocus = index.createEvent(this, "rTooltipFocus");
|
|
88
|
-
/** Tooltip display text */
|
|
89
|
-
this.text = '';
|
|
90
|
-
/** Specifies tooltip position */
|
|
91
|
-
this.position = 'top';
|
|
92
|
-
this.arrowPositionState = 'left';
|
|
93
|
-
this.isShown = false;
|
|
94
|
-
this.uniqueId = `r-tooltip-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
95
|
-
this.getOffsetLeft = (arrowPosition) => {
|
|
96
|
-
var _a, _b, _c;
|
|
97
|
-
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));
|
|
98
|
-
switch (arrowPosition) {
|
|
99
|
-
case 'center':
|
|
100
|
-
return offsetLeft / 2;
|
|
101
|
-
case 'right':
|
|
102
|
-
return offsetLeft;
|
|
103
|
-
default:
|
|
104
|
-
return 0;
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
this.alignTooltipPosition = () => {
|
|
108
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
109
|
-
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;
|
|
110
|
-
const offsetLeft = this.getOffsetLeft(this.arrowPositionState);
|
|
111
|
-
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;
|
|
112
|
-
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;
|
|
113
|
-
switch (this.positionState) {
|
|
114
|
-
case 'top':
|
|
115
|
-
this.alignPosition(this.tooltip, -offsetLeft, -this.tooltipContainerHeight);
|
|
116
|
-
break;
|
|
117
|
-
case 'bottom':
|
|
118
|
-
this.alignPosition(this.tooltip, -offsetLeft, hostHeight);
|
|
119
|
-
break;
|
|
120
|
-
case 'left':
|
|
121
|
-
this.alignPosition(this.tooltip, -this.tooltipContainerWidth, -offsetHeight);
|
|
122
|
-
break;
|
|
123
|
-
case 'right':
|
|
124
|
-
this.alignPosition(this.tooltip, hostWidth, -offsetHeight);
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
this.alignArrowPosition = () => {
|
|
129
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
130
|
-
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;
|
|
131
|
-
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;
|
|
132
|
-
const hostHeight = ((_h = (_g = this.element) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect()) === null || _h === void 0 ? void 0 : _h.height) || 0;
|
|
133
|
-
const hostWidth = ((_k = (_j = this.element) === null || _j === void 0 ? void 0 : _j.getBoundingClientRect()) === null || _k === void 0 ? void 0 : _k.width) || 0;
|
|
134
|
-
switch (this.positionState) {
|
|
135
|
-
case 'top':
|
|
136
|
-
this.alignPosition(this.arrow, offsetLeft, -this.arrowHeight);
|
|
137
|
-
break;
|
|
138
|
-
case 'bottom':
|
|
139
|
-
this.alignPosition(this.arrow, offsetLeft, hostHeight);
|
|
140
|
-
break;
|
|
141
|
-
case 'left':
|
|
142
|
-
this.alignPosition(this.arrow, -this.arrowWidth, offsetHeight);
|
|
143
|
-
break;
|
|
144
|
-
case 'right':
|
|
145
|
-
this.alignPosition(this.arrow, hostWidth, offsetHeight);
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
this.alignPosition = (element, offsetLeft, offsetTop) => {
|
|
150
|
-
var _a;
|
|
151
|
-
if (!element) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
let elementOffset = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
155
|
-
let left = elementOffset.left + offsetLeft;
|
|
156
|
-
let top = elementOffset.top + offsetTop;
|
|
157
|
-
element.style.left = `${left > 0 ? left : 0}px`;
|
|
158
|
-
element.style.top = `${top}px`;
|
|
159
|
-
};
|
|
160
|
-
/**
|
|
161
|
-
* Listen on hovering tooltip element and update tooltip position if needed
|
|
162
|
-
*/
|
|
163
|
-
this.handleHover = () => {
|
|
164
|
-
this.showTooltip();
|
|
165
|
-
this.setCorrectPosition();
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Listen on focusing tooltip element and update tooltip position if needed
|
|
169
|
-
*/
|
|
170
|
-
this.handleFocus = () => {
|
|
171
|
-
this.showTooltip();
|
|
172
|
-
this.setCorrectPosition();
|
|
173
|
-
this.rTooltipFocus.emit({ element: this.element });
|
|
174
|
-
};
|
|
175
|
-
this.showTooltip = () => {
|
|
176
|
-
var _a;
|
|
177
|
-
this.isShown = true;
|
|
178
|
-
this.tooltip.classList.add('r-tooltip--content--visible');
|
|
179
|
-
const interactiveElement = this.getInteractiveElement(this.activeElement);
|
|
180
|
-
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.setAttribute('aria-description', (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.innerText);
|
|
181
|
-
};
|
|
182
|
-
this.removeTooltip = () => {
|
|
183
|
-
this.isShown = false;
|
|
184
|
-
this.tooltip.style.width = 'max-content';
|
|
185
|
-
this.tooltip.classList.remove('r-tooltip--content--visible');
|
|
186
|
-
const interactiveElement = this.getInteractiveElement(this.activeElement);
|
|
187
|
-
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.removeAttribute('aria-description');
|
|
188
|
-
};
|
|
189
|
-
this.handleScroll = () => {
|
|
190
|
-
if (!this.isShown) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
if (!this.isOnScreen) {
|
|
194
|
-
this.removeTooltip();
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
this.setCorrectPosition();
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Watch on position value change and update tooltip position if needed
|
|
202
|
-
*/
|
|
203
|
-
handleVerticalPosition() {
|
|
204
|
-
this.setCorrectPosition();
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Listen on window scroll and update tooltip position if needed
|
|
208
|
-
*/
|
|
209
|
-
handleScrolling() {
|
|
210
|
-
this.setCorrectPosition();
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Listen on window resizing and update tooltip position if needed
|
|
214
|
-
*/
|
|
215
|
-
handleResizing() {
|
|
216
|
-
this.setCorrectPosition();
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Listen on window keydown and hide tooltip if needed
|
|
220
|
-
*/
|
|
221
|
-
handleKeydown(event) {
|
|
222
|
-
if (this.isShown && event.key === 'Escape') {
|
|
223
|
-
this.removeTooltip();
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Parent with non visible overflow
|
|
228
|
-
*/
|
|
229
|
-
get overflowedParent() {
|
|
230
|
-
return this.findOverflowParent(this.element.parentElement);
|
|
231
|
-
}
|
|
232
|
-
get arrowWidth() {
|
|
233
|
-
var _a;
|
|
234
|
-
return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) || 0;
|
|
235
|
-
}
|
|
236
|
-
get arrowHeight() {
|
|
237
|
-
var _a;
|
|
238
|
-
return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) || 0;
|
|
239
|
-
}
|
|
240
|
-
get tooltipContainerWidth() {
|
|
241
|
-
var _a, _b;
|
|
242
|
-
return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) + this.arrowWidth || 0;
|
|
243
|
-
}
|
|
244
|
-
get tooltipContainerHeight() {
|
|
245
|
-
var _a, _b;
|
|
246
|
-
return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height) + this.arrowHeight || 0;
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Available space at the top
|
|
250
|
-
*/
|
|
251
|
-
get top() {
|
|
252
|
-
return this.element.getBoundingClientRect().top;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Available space on the left
|
|
256
|
-
*/
|
|
257
|
-
get left() {
|
|
258
|
-
return this.element.getBoundingClientRect().left;
|
|
259
|
-
}
|
|
260
|
-
get isOnScreen() {
|
|
261
|
-
const parent = this.overflowedParent || document.documentElement;
|
|
262
|
-
const parentRect = parent.getBoundingClientRect();
|
|
263
|
-
const elementRect = this.element.getBoundingClientRect();
|
|
264
|
-
const isVerticallyVisible = elementRect.top >= parentRect.top && elementRect.bottom <= parentRect.bottom;
|
|
265
|
-
const isHorizontallyVisible = elementRect.left >= parentRect.left && elementRect.right <= parentRect.right;
|
|
266
|
-
return isVerticallyVisible && isHorizontallyVisible;
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Available space at the bottom
|
|
270
|
-
*/
|
|
271
|
-
get bottom() {
|
|
272
|
-
function calculateBottomSpace(element) {
|
|
273
|
-
return window.innerHeight - element.getBoundingClientRect().top - element.getBoundingClientRect().height;
|
|
274
|
-
}
|
|
275
|
-
return calculateBottomSpace(this.element);
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Available space on the right
|
|
279
|
-
*/
|
|
280
|
-
get right() {
|
|
281
|
-
function calculateRightSpace(element) {
|
|
282
|
-
return window.innerWidth - element.getBoundingClientRect().left - element.getBoundingClientRect().width;
|
|
283
|
-
}
|
|
284
|
-
return calculateRightSpace(this.element);
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Defines which horizontal placement is available
|
|
288
|
-
*/
|
|
289
|
-
get horizontalPlacement() {
|
|
290
|
-
return this.tooltipContainerWidth + OFFSET < this.left ? 'left' : 'right';
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Defines which vertical placement is available
|
|
294
|
-
*/
|
|
295
|
-
get verticalPlacement() {
|
|
296
|
-
return this.tooltipContainerHeight + OFFSET < this.top ? 'top' : 'bottom';
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Checks if there is enough space for placing tooltip vertically
|
|
300
|
-
*/
|
|
301
|
-
get isEnoughSpaceVertically() {
|
|
302
|
-
return this.tooltipContainerHeight + OFFSET < this.top || this.tooltipContainerHeight + OFFSET < this.bottom;
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Checks if there is enough space for placing tooltip horizontally
|
|
306
|
-
*/
|
|
307
|
-
get isEnoughSpaceHorizontally() {
|
|
308
|
-
return this.tooltipContainerWidth + OFFSET < this.left || this.tooltipContainerWidth + OFFSET < this.right;
|
|
309
|
-
}
|
|
310
|
-
get activeElement() {
|
|
311
|
-
return this.element.querySelector('r-button, r-icon-button, a, button, [tabindex]:not([tabindex="-1"])');
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Gets the actual interactive element (button/link) from within r-button or r-icon-button shadow DOM,
|
|
315
|
-
* or returns the element itself if it's already interactive
|
|
316
|
-
*/
|
|
317
|
-
getInteractiveElement(element) {
|
|
318
|
-
if (!element)
|
|
319
|
-
return null;
|
|
320
|
-
if (element.tagName === 'R-BUTTON' || element.tagName === 'R-ICON-BUTTON') {
|
|
321
|
-
const shadowRoot = element.shadowRoot;
|
|
322
|
-
if (shadowRoot) {
|
|
323
|
-
return shadowRoot.querySelector('button, a');
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
return element;
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Define position state
|
|
330
|
-
*/
|
|
331
|
-
componentWillLoad() {
|
|
332
|
-
this.positionState = this.position;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Listen to active child element
|
|
336
|
-
*/
|
|
337
|
-
componentDidLoad() {
|
|
338
|
-
var _a, _b, _c;
|
|
339
|
-
(_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
|
|
340
|
-
this.handleFocus();
|
|
341
|
-
});
|
|
342
|
-
(_b = this.activeElement) === null || _b === void 0 ? void 0 : _b.addEventListener('blur', () => {
|
|
343
|
-
this.removeTooltip();
|
|
344
|
-
});
|
|
345
|
-
(_c = this.overflowedParent) === null || _c === void 0 ? void 0 : _c.addEventListener('scroll', () => {
|
|
346
|
-
this.handleScroll();
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Finds first element's parent with not visible overflow.
|
|
351
|
-
* @param element -- parent element
|
|
352
|
-
* @param initEl -- initial(child) element
|
|
353
|
-
*/
|
|
354
|
-
findOverflowParent(element) {
|
|
355
|
-
var _a, _b;
|
|
356
|
-
function notVisible(element) {
|
|
357
|
-
return getComputedStyle(element).overflow !== "visible";
|
|
358
|
-
}
|
|
359
|
-
if (!element) {
|
|
360
|
-
return null;
|
|
361
|
-
}
|
|
362
|
-
if (((_a = element.parentNode) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
363
|
-
return this.findOverflowParent((_b = element.parentNode) === null || _b === void 0 ? void 0 : _b.host);
|
|
364
|
-
}
|
|
365
|
-
if (notVisible(element)) {
|
|
366
|
-
return element;
|
|
367
|
-
}
|
|
368
|
-
if (element.parentElement) {
|
|
369
|
-
return this.findOverflowParent(element.parentElement);
|
|
370
|
-
}
|
|
371
|
-
return null;
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Checks the alternative tooltip position.
|
|
375
|
-
* For example: If defined position is "top" and there is no free space for this position at the top of the component,
|
|
376
|
-
* first it checks available vertical space to place tooltip at the bottom.
|
|
377
|
-
* If there is no available space at the bottom, it checks the available space horizontally and sets it horizontally.
|
|
378
|
-
*/
|
|
379
|
-
getAlternativePosition() {
|
|
380
|
-
switch (this.position) {
|
|
381
|
-
case 'top':
|
|
382
|
-
return this.isEnoughSpaceVertically ? 'bottom' : this.horizontalPlacement;
|
|
383
|
-
case 'bottom':
|
|
384
|
-
return this.isEnoughSpaceVertically ? 'top' : this.horizontalPlacement;
|
|
385
|
-
case 'left':
|
|
386
|
-
return this.isEnoughSpaceHorizontally ? 'right' : this.verticalPlacement;
|
|
387
|
-
case 'right':
|
|
388
|
-
return this.isEnoughSpaceHorizontally ? 'left' : this.verticalPlacement;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* Set correct tooltip position.
|
|
393
|
-
* First it checks the available space for a defined position and then sets the new one based on the available space.
|
|
394
|
-
*/
|
|
395
|
-
setCorrectPosition() {
|
|
396
|
-
if (!this.tooltip || !this.isShown) {
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
switch (this.position) {
|
|
400
|
-
case 'top':
|
|
401
|
-
this.positionState = this.tooltipContainerHeight + OFFSET < this.top ? this.position : this.getAlternativePosition();
|
|
402
|
-
break;
|
|
403
|
-
case 'bottom':
|
|
404
|
-
this.positionState = this.tooltipContainerHeight + OFFSET < this.bottom ? this.position : this.getAlternativePosition();
|
|
405
|
-
break;
|
|
406
|
-
case 'left':
|
|
407
|
-
this.positionState = this.tooltipContainerWidth + OFFSET < this.left ? this.position : this.getAlternativePosition();
|
|
408
|
-
break;
|
|
409
|
-
case 'right':
|
|
410
|
-
this.positionState = this.tooltipContainerWidth + OFFSET < this.right ? this.position : this.getAlternativePosition();
|
|
411
|
-
break;
|
|
412
|
-
}
|
|
413
|
-
this.adjustArrowPosition();
|
|
414
|
-
this.alignTooltipPosition();
|
|
415
|
-
this.alignArrowPosition();
|
|
416
|
-
// Allow tooltip content wrap and recalculate position
|
|
417
|
-
if (this.tooltip.style.width === 'fit-content') {
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
this.tooltip.style.width = 'fit-content';
|
|
421
|
-
this.alignTooltipPosition();
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Adjusts arrow correct position.
|
|
425
|
-
* For bottom & top tooltip positions there are 3 possible arrow.
|
|
426
|
-
* For right & left tooltip positions there is only one position = "center".
|
|
427
|
-
*/
|
|
428
|
-
adjustArrowPosition() {
|
|
429
|
-
const isEnoughTooltipSpaceLeft = this.tooltipContainerWidth / 2 + OFFSET < this.left;
|
|
430
|
-
const isEnoughTooltipSpaceRight = this.tooltipContainerWidth / 2 + OFFSET < this.right;
|
|
431
|
-
if (isEnoughTooltipSpaceLeft && isEnoughTooltipSpaceRight || !isEnoughTooltipSpaceLeft && !isEnoughTooltipSpaceRight || this.positionState === 'left' || this.positionState === 'right') {
|
|
432
|
-
this.arrowPositionState = 'center';
|
|
433
|
-
}
|
|
434
|
-
else if (!isEnoughTooltipSpaceLeft) {
|
|
435
|
-
this.arrowPositionState = 'left';
|
|
436
|
-
}
|
|
437
|
-
else if (!isEnoughTooltipSpaceRight) {
|
|
438
|
-
this.arrowPositionState = 'right';
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
render() {
|
|
442
|
-
const { text, arrowPositionState, positionState, isShown, uniqueId } = this;
|
|
443
|
-
const hostAttrs = {
|
|
444
|
-
'data-arrow-position': arrowPositionState,
|
|
445
|
-
'data-position': positionState
|
|
446
|
-
};
|
|
447
|
-
const triggerAttrs = {
|
|
448
|
-
tabindex: !this.activeElement ? 0 : null,
|
|
449
|
-
role: !this.activeElement ? 'button' : null,
|
|
450
|
-
'aria-describedby': !this.activeElement && isShown ? uniqueId : null
|
|
451
|
-
};
|
|
452
|
-
const contentAttrs = {
|
|
453
|
-
id: uniqueId,
|
|
454
|
-
role: 'tooltip',
|
|
455
|
-
'aria-hidden': `${!isShown}`
|
|
456
|
-
};
|
|
457
|
-
return (index.h(index.Host, Object.assign({ key: '5d8a002a227895d5e633e8b1df95ba449a9e253a' }, hostAttrs, { onMouseenter: this.handleHover, onMouseleave: this.removeTooltip }), index.h("div", { key: '4e6340639dc27fc7d0e981ca7cf8a4046737527f', class: "r-tooltip" }, index.h("div", Object.assign({ key: 'bcf2d5c73b427b2941be8de56b9ce2f296ae07eb', class: "r-tooltip--trigger", onFocus: this.handleFocus, onBlur: this.removeTooltip }, triggerAttrs), index.h("slot", { key: 'be7037ba07bf11b4957910c52f4a3f329b514007' })), index.h("div", Object.assign({ key: '300a3ef08b7c73b6b07161c58860df518ae9a862', class: "r-tooltip--content", ref: (el) => this.tooltip = el }, contentAttrs), text), index.h("div", { key: '73912349289b0dc365552331197d94bd0896ff3c', ref: (el) => this.arrow = el, class: "r-tooltip--arrow" }))));
|
|
458
|
-
}
|
|
459
|
-
get element() { return index.getElement(this); }
|
|
460
|
-
static get watchers() { return {
|
|
461
|
-
"position": ["handleVerticalPosition"]
|
|
462
|
-
}; }
|
|
463
|
-
};
|
|
464
|
-
Tooltip.style = tooltipCss;
|
|
465
|
-
|
|
466
|
-
exports.r_icon_button = IconButton;
|
|
467
|
-
exports.r_tooltip = Tooltip;
|