@riverty/web-components 6.0.0 → 6.2.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 +44 -0
- package/custom-elements.json +259 -2
- package/dist/cjs/{index-DJ4H_bFj.js → index-BnETQtSf.js} +9 -382
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion.cjs.entry.js +1 -1
- package/dist/cjs/r-alert.cjs.entry.js +9 -6
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-button.cjs.entry.js +6 -2
- package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/r-design-system-devtools.cjs.entry.js +1 -1
- package/dist/cjs/r-dialog.cjs.entry.js +1 -1
- package/dist/cjs/r-hint_2.cjs.entry.js +3 -3
- package/dist/cjs/r-icon-button_2.cjs.entry.js +27 -7
- package/dist/cjs/r-icon.cjs.entry.js +2 -2
- package/dist/cjs/r-illustration.cjs.entry.js +396 -0
- package/dist/cjs/r-input-code.cjs.entry.js +34 -12
- package/dist/cjs/r-input-date.cjs.entry.js +7 -7
- package/dist/cjs/r-input-password.cjs.entry.js +3 -3
- package/dist/cjs/r-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/r-input.cjs.entry.js +8 -5
- package/dist/cjs/r-list-item.cjs.entry.js +17 -16
- package/dist/cjs/r-pagination.cjs.entry.js +56 -50
- package/dist/cjs/r-panel.cjs.entry.js +6 -6
- package/dist/cjs/r-popover-action.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-content.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-headline.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-trigger.cjs.entry.js +2 -2
- package/dist/cjs/r-popover.cjs.entry.js +46 -5
- package/dist/cjs/r-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-description.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-title.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button.cjs.entry.js +8 -7
- package/dist/cjs/r-radio-group.cjs.entry.js +83 -10
- package/dist/cjs/r-select-option.cjs.entry.js +2 -2
- package/dist/cjs/r-select.cjs.entry.js +6 -4
- package/dist/cjs/r-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/r-stepper-item.cjs.entry.js +19 -4
- package/dist/cjs/r-stepper.cjs.entry.js +76 -3
- package/dist/cjs/r-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-tab.cjs.entry.js +7 -3
- package/dist/cjs/r-tabs-list.cjs.entry.js +161 -3
- package/dist/cjs/r-tabs.cjs.entry.js +35 -7
- package/dist/cjs/r-textarea.cjs.entry.js +2 -2
- package/dist/cjs/r-toast-group.cjs.entry.js +13 -4
- package/dist/cjs/r-toast.cjs.entry.js +104 -15
- package/dist/cjs/web-components.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/alert/alert.css +6 -6
- package/dist/collection/components/alert/alert.js +7 -4
- package/dist/collection/components/button/button.js +30 -1
- package/dist/collection/components/button/exports.js +1 -0
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/icon/exports.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/riverty-kit.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +22 -3
- package/dist/collection/components/illustration/data.js +112 -0
- package/dist/collection/components/illustration/exports.js +3 -0
- package/dist/collection/components/illustration/illustration.js +540 -0
- package/dist/collection/components/illustration/illustration.scss +56 -0
- package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
- package/dist/collection/components/input/exports.js +3 -0
- package/dist/collection/components/input/input.css +3 -0
- package/dist/collection/components/input/input.js +100 -3
- package/dist/collection/components/input-code/exports.js +2 -2
- package/dist/collection/components/input-code/input-code.css +6 -0
- package/dist/collection/components/input-code/input-code.js +54 -16
- package/dist/collection/components/input-date/input-date.js +6 -6
- package/dist/collection/components/input-password/input-password.js +2 -2
- package/dist/collection/components/input-phone-number/input-phone-number.js +3 -3
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/list-item/list-item/list-item.css +46 -12
- package/dist/collection/components/list-item/list-item/list-item.js +34 -14
- package/dist/collection/components/pagination/pagination.css +33 -72
- package/dist/collection/components/pagination/pagination.js +194 -48
- package/dist/collection/components/panel/panel.css +40 -17
- package/dist/collection/components/panel/panel.js +6 -6
- package/dist/collection/components/popover/popover.css +0 -1
- package/dist/collection/components/popover/popover.js +44 -3
- package/dist/collection/components/popover-action/popover-action.js +1 -1
- package/dist/collection/components/popover-content/popover-content.js +1 -1
- package/dist/collection/components/popover-headline/popover-headline.js +1 -1
- package/dist/collection/components/popover-trigger/popover-trigger.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +7 -6
- package/dist/collection/components/radio-button-description/radio-button-description.js +1 -1
- package/dist/collection/components/radio-button-leading/radio-button-leading.js +1 -1
- package/dist/collection/components/radio-button-title/radio-button-title.js +1 -1
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +1 -1
- package/dist/collection/components/radio-group/radio-group.css +4 -1
- package/dist/collection/components/radio-group/radio-group.js +100 -8
- package/dist/collection/components/select/select.js +5 -3
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/skip-link/skip-link.js +1 -1
- package/dist/collection/components/stepper/stepper.css +5 -2
- package/dist/collection/components/stepper/stepper.js +125 -1
- package/dist/collection/components/stepper-item/stepper-item.css +25 -12
- package/dist/collection/components/stepper-item/stepper-item.js +36 -2
- package/dist/collection/components/tab/tab.css +29 -29
- package/dist/collection/components/tab/tab.js +5 -1
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tabs/tabs.js +34 -6
- package/dist/collection/components/tabs-list/exports.js +2 -0
- package/dist/collection/components/tabs-list/tabs-list.css +43 -2
- package/dist/collection/components/tabs-list/tabs-list.js +277 -1
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/toast/toast.css +37 -11
- package/dist/collection/components/toast/toast.js +140 -18
- package/dist/collection/components/toast-group/toast-group.css +5 -11
- package/dist/collection/components/toast-group/toast-group.js +12 -3
- package/dist/collection/components/tooltip/tooltip.js +24 -4
- package/dist/esm/{index-Da7qOBFr.js → index-CTxpqopm.js} +9 -382
- package/dist/esm/loader.js +3 -3
- package/dist/esm/r-accordion-panel.entry.js +1 -1
- package/dist/esm/r-accordion-section.entry.js +1 -1
- package/dist/esm/r-accordion-trigger.entry.js +1 -1
- package/dist/esm/r-accordion.entry.js +1 -1
- package/dist/esm/r-alert.entry.js +9 -6
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-button.entry.js +6 -2
- package/dist/esm/r-checkbox-group.entry.js +1 -1
- package/dist/esm/r-checkbox.entry.js +4 -4
- package/dist/esm/r-design-system-devtools.entry.js +1 -1
- package/dist/esm/r-dialog.entry.js +1 -1
- package/dist/esm/r-hint_2.entry.js +3 -3
- package/dist/esm/r-icon-button_2.entry.js +27 -7
- package/dist/esm/r-icon.entry.js +2 -2
- package/dist/esm/r-illustration.entry.js +394 -0
- package/dist/esm/r-input-code.entry.js +34 -12
- package/dist/esm/r-input-date.entry.js +7 -7
- package/dist/esm/r-input-password.entry.js +3 -3
- package/dist/esm/r-input-phone-number.entry.js +4 -4
- package/dist/esm/r-input.entry.js +8 -5
- package/dist/esm/r-list-item.entry.js +17 -16
- package/dist/esm/r-pagination.entry.js +56 -50
- package/dist/esm/r-panel.entry.js +6 -6
- package/dist/esm/r-popover-action.entry.js +2 -2
- package/dist/esm/r-popover-content.entry.js +2 -2
- package/dist/esm/r-popover-headline.entry.js +2 -2
- package/dist/esm/r-popover-trigger.entry.js +2 -2
- package/dist/esm/r-popover.entry.js +46 -5
- package/dist/esm/r-progress-bar.entry.js +2 -2
- package/dist/esm/r-radio-button-description.entry.js +2 -2
- package/dist/esm/r-radio-button-leading.entry.js +2 -2
- package/dist/esm/r-radio-button-title.entry.js +2 -2
- package/dist/esm/r-radio-button-trailing.entry.js +2 -2
- package/dist/esm/r-radio-button.entry.js +8 -7
- package/dist/esm/r-radio-group.entry.js +83 -10
- package/dist/esm/r-select-option.entry.js +2 -2
- package/dist/esm/r-select.entry.js +6 -4
- package/dist/esm/r-skip-link.entry.js +2 -2
- package/dist/esm/r-stepper-item.entry.js +19 -4
- package/dist/esm/r-stepper.entry.js +76 -3
- package/dist/esm/r-tab-panel.entry.js +2 -2
- package/dist/esm/r-tab.entry.js +7 -3
- package/dist/esm/r-tabs-list.entry.js +161 -3
- package/dist/esm/r-tabs.entry.js +35 -7
- package/dist/esm/r-textarea.entry.js +2 -2
- package/dist/esm/r-toast-group.entry.js +13 -4
- package/dist/esm/r-toast.entry.js +104 -15
- package/dist/esm/web-components.js +3 -3
- package/dist/types/components/alert/alert.d.ts +1 -0
- package/dist/types/components/button/button.d.ts +8 -1
- package/dist/types/components/button/exports.d.ts +2 -0
- package/dist/types/components/icon/{icon-data.d.ts → data.d.ts} +2 -1
- package/dist/types/components/icon/exports.d.ts +2 -1
- package/dist/types/components/icon/riverty-kit.d.ts +2 -1
- package/dist/types/components/icon-button/icon-button.d.ts +4 -0
- package/dist/types/components/illustration/data.d.ts +52 -0
- package/dist/types/components/illustration/exports.d.ts +23 -0
- package/dist/types/components/illustration/illustration.d.ts +51 -0
- package/dist/types/components/illustration/illustrations-ui-kit.d.ts +21 -0
- package/dist/types/components/input/exports.d.ts +6 -0
- package/dist/types/components/input/input.d.ts +31 -1
- package/dist/types/components/input-code/exports.d.ts +4 -4
- package/dist/types/components/input-code/input-code.d.ts +18 -4
- package/dist/types/components/list-item/list-item/list-item.d.ts +5 -3
- package/dist/types/components/pagination/pagination.d.ts +19 -0
- package/dist/types/components/popover/popover.d.ts +9 -0
- package/dist/types/components/radio-group/radio-group.d.ts +16 -0
- package/dist/types/components/stepper/stepper.d.ts +11 -0
- package/dist/types/components/stepper-item/stepper-item.d.ts +7 -0
- package/dist/types/components/tabs/tabs.d.ts +1 -0
- package/dist/types/components/tabs-list/exports.d.ts +4 -0
- package/dist/types/components/tabs-list/tabs-list.d.ts +38 -0
- package/dist/types/components/toast/toast.d.ts +20 -3
- package/dist/types/components/tooltip/tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +360 -17
- package/dist/web-components/p-02b22f8e.entry.js +1 -0
- package/dist/web-components/{p-d054eb4d.entry.js → p-075a8dc8.entry.js} +1 -1
- package/dist/web-components/{p-8a66d20c.entry.js → p-0a34d33b.entry.js} +1 -1
- package/dist/web-components/{p-8c31cbd5.entry.js → p-10cc9983.entry.js} +1 -1
- package/dist/web-components/{p-d7726e46.entry.js → p-253068b9.entry.js} +1 -1
- package/dist/web-components/{p-3884c6e7.entry.js → p-3b8c8951.entry.js} +1 -1
- package/dist/web-components/{p-550e2237.entry.js → p-3beacdab.entry.js} +1 -1
- package/dist/web-components/{p-e2188953.entry.js → p-4214867d.entry.js} +1 -1
- package/dist/web-components/{p-3f60c6c0.entry.js → p-42c857e9.entry.js} +1 -1
- package/dist/web-components/{p-7fed6f4d.entry.js → p-44f87e16.entry.js} +1 -1
- package/dist/web-components/p-477614c5.entry.js +1 -0
- package/dist/web-components/{p-1da75540.entry.js → p-495ba3d2.entry.js} +1 -1
- package/dist/web-components/p-4de76291.entry.js +1 -0
- package/dist/web-components/{p-05738503.entry.js → p-55600d47.entry.js} +1 -1
- package/dist/web-components/p-562051aa.entry.js +1 -0
- package/dist/web-components/p-5b850e0f.entry.js +1 -0
- package/dist/web-components/p-6013dfc8.entry.js +1 -0
- package/dist/web-components/{p-6cc2ea2c.entry.js → p-62e7ae04.entry.js} +1 -1
- package/dist/web-components/p-71519d37.entry.js +1 -0
- package/dist/web-components/p-88f7b47f.entry.js +1 -0
- package/dist/web-components/p-8975a6a3.entry.js +1 -0
- package/dist/web-components/p-8e125826.entry.js +1 -0
- package/dist/web-components/p-91cc0bde.entry.js +1 -0
- package/dist/web-components/{p-0347feff.entry.js → p-93435fcd.entry.js} +1 -1
- package/dist/web-components/p-947969d7.entry.js +1 -0
- package/dist/web-components/p-95396b5c.entry.js +1 -0
- package/dist/web-components/p-9de3a1a5.entry.js +1 -0
- package/dist/web-components/p-9f583ed1.entry.js +1 -0
- package/dist/web-components/p-CTxpqopm.js +2 -0
- package/dist/web-components/{p-e5945c01.entry.js → p-a1086abe.entry.js} +1 -1
- package/dist/web-components/{p-f9d5004c.entry.js → p-bbba6d79.entry.js} +1 -1
- package/dist/web-components/{p-c478712b.entry.js → p-bde44ec4.entry.js} +1 -1
- package/dist/web-components/p-bfc7e6c0.entry.js +1 -0
- package/dist/web-components/p-c1030394.entry.js +1 -0
- package/dist/web-components/p-c1f59ed1.entry.js +1 -0
- package/dist/web-components/{p-26ef77d6.entry.js → p-c80a5541.entry.js} +1 -1
- package/dist/web-components/{p-9ef1bbee.entry.js → p-c96ee61a.entry.js} +1 -1
- package/dist/web-components/{p-8dac326b.entry.js → p-caf8f067.entry.js} +1 -1
- package/dist/web-components/p-cc363c3d.entry.js +1 -0
- package/dist/web-components/p-cf4ff357.entry.js +1 -0
- package/dist/web-components/p-d0310ed4.entry.js +1 -0
- package/dist/web-components/p-d1412932.entry.js +1 -0
- package/dist/web-components/{p-62b788bf.entry.js → p-d2447e30.entry.js} +1 -1
- package/dist/web-components/p-dc9cca06.entry.js +1 -0
- package/dist/web-components/p-e5b943a2.entry.js +1 -0
- package/dist/web-components/{p-4cc58c6a.entry.js → p-e67b13df.entry.js} +1 -1
- package/dist/web-components/p-efec231a.entry.js +1 -0
- package/dist/web-components/{p-4595fa8e.entry.js → p-f867e4c3.entry.js} +1 -1
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +5 -2
- package/dist/collection/components/icon/bundled-icons/all-kit.json +0 -1
- package/dist/collection/components/icon/bundled-icons/riverty-kit.json +0 -1
- package/dist/web-components/bundled-icons/all-kit.json +0 -1
- package/dist/web-components/bundled-icons/riverty-kit.json +0 -1
- package/dist/web-components/p-0e4c8bf1.entry.js +0 -1
- package/dist/web-components/p-3a5a67e7.entry.js +0 -1
- package/dist/web-components/p-4254a383.entry.js +0 -1
- package/dist/web-components/p-5441b746.entry.js +0 -1
- package/dist/web-components/p-589baaf9.entry.js +0 -1
- package/dist/web-components/p-60341de2.entry.js +0 -1
- package/dist/web-components/p-60ca994e.entry.js +0 -1
- package/dist/web-components/p-6303b9fe.entry.js +0 -1
- package/dist/web-components/p-63fd817d.entry.js +0 -1
- package/dist/web-components/p-673dbfd0.entry.js +0 -1
- package/dist/web-components/p-67fa3f84.entry.js +0 -1
- package/dist/web-components/p-6a4f3836.entry.js +0 -1
- package/dist/web-components/p-70784685.entry.js +0 -1
- package/dist/web-components/p-8b4d2448.entry.js +0 -1
- package/dist/web-components/p-Da7qOBFr.js +0 -2
- package/dist/web-components/p-a0dbde7c.entry.js +0 -1
- package/dist/web-components/p-a71485d8.entry.js +0 -1
- package/dist/web-components/p-a7d22c76.entry.js +0 -1
- package/dist/web-components/p-ae251d2f.entry.js +0 -1
- package/dist/web-components/p-b98ab649.entry.js +0 -1
- package/dist/web-components/p-b9e3b3d6.entry.js +0 -1
- package/dist/web-components/p-c1e748f2.entry.js +0 -1
- package/dist/web-components/p-d433a828.entry.js +0 -1
- package/dist/web-components/p-d819c8e5.entry.js +0 -1
- package/dist/web-components/p-f7adb875.entry.js +0 -1
- /package/dist/collection/components/icon/{icon-data.js → data.js} +0 -0
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
@media (max-width: 48rem) {
|
|
2
|
-
:host {
|
|
3
|
-
--width: auto;
|
|
4
|
-
--right: 24px;
|
|
5
|
-
--bottom: auto;
|
|
6
|
-
--left: 24px;
|
|
7
|
-
--padding-right: 0;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
1
|
:host([data-visually-hidden=true]) {
|
|
11
2
|
position: absolute;
|
|
12
3
|
width: 1px;
|
|
@@ -21,7 +12,7 @@
|
|
|
21
12
|
:host {
|
|
22
13
|
display: var(--display, block);
|
|
23
14
|
position: var(--position, fixed);
|
|
24
|
-
top: var(--top,
|
|
15
|
+
top: var(--top, 0);
|
|
25
16
|
right: var(--right, 0);
|
|
26
17
|
bottom: var(--bottom, auto);
|
|
27
18
|
left: var(--left, auto);
|
|
@@ -30,14 +21,17 @@
|
|
|
30
21
|
width: var(--width, 352px);
|
|
31
22
|
max-height: var(--max-height, calc(100vh - 64px));
|
|
32
23
|
padding-right: var(--padding-right, 32px);
|
|
24
|
+
padding-top: var(--padding-top, 16px);
|
|
33
25
|
padding-bottom: var(--padding-bottom, 32px);
|
|
34
26
|
z-index: var(--z-index, 1);
|
|
35
27
|
}
|
|
28
|
+
:host ::slotted(r-toast) {
|
|
29
|
+
margin-top: var(--r-spacing-100, 1rem);
|
|
30
|
+
}
|
|
36
31
|
|
|
37
32
|
.r-toast-group {
|
|
38
33
|
position: relative;
|
|
39
34
|
display: var(--r-toast-group--display, flex);
|
|
40
35
|
flex-direction: var(--r-toast-group--flex-direction, column);
|
|
41
36
|
justify-content: var(--r-toast-group--justify-content, flex-start);
|
|
42
|
-
gap: var(--r-toast-group--gap, var(--r-spacing-100, 1rem));
|
|
43
37
|
}
|
|
@@ -5,8 +5,17 @@ export class ToastGroup {
|
|
|
5
5
|
this.host.setAttribute('data-visually-hidden', `${!this.hasChildren}`);
|
|
6
6
|
};
|
|
7
7
|
this.observeSlotContentChange = () => {
|
|
8
|
-
this.observer = new MutationObserver(() => {
|
|
8
|
+
this.observer = new MutationObserver(async (mutations) => {
|
|
9
|
+
var _a, _b;
|
|
9
10
|
this.updateHiddenState();
|
|
11
|
+
const addedToast = mutations
|
|
12
|
+
.flatMap(mutation => Array.from(mutation.addedNodes))
|
|
13
|
+
.find(node => node.nodeName === 'R-TOAST');
|
|
14
|
+
if (addedToast) {
|
|
15
|
+
// Measure height then reveal for smooth animation
|
|
16
|
+
await ((_a = addedToast.measureAndPrepareHeight) === null || _a === void 0 ? void 0 : _a.call(addedToast));
|
|
17
|
+
await ((_b = addedToast.reveal) === null || _b === void 0 ? void 0 : _b.call(addedToast));
|
|
18
|
+
}
|
|
10
19
|
});
|
|
11
20
|
this.observer.observe(this.host, {
|
|
12
21
|
childList: true,
|
|
@@ -22,10 +31,10 @@ export class ToastGroup {
|
|
|
22
31
|
this.observeSlotContentChange();
|
|
23
32
|
}
|
|
24
33
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '85ab80be1fca1d1a9c3dc2e17de616747748a4dd' }, h("div", { key: 'a88670978563caeb8f500f4b5f9af2bcd0ade386', class: "r-toast-group" }, h("slot", { key: 'ab1480a47cfae0cacc45de708d51e8a77b6dfb85' }))));
|
|
26
35
|
}
|
|
27
36
|
static get is() { return "r-toast-group"; }
|
|
28
|
-
static get encapsulation() { return "
|
|
37
|
+
static get encapsulation() { return "shadow"; }
|
|
29
38
|
static get originalStyleUrls() {
|
|
30
39
|
return {
|
|
31
40
|
"$": ["toast-group.css"]
|
|
@@ -94,13 +94,18 @@ export class Tooltip {
|
|
|
94
94
|
this.rTooltipFocus.emit({ element: this.element });
|
|
95
95
|
};
|
|
96
96
|
this.showTooltip = () => {
|
|
97
|
+
var _a;
|
|
97
98
|
this.isShown = true;
|
|
98
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);
|
|
99
102
|
};
|
|
100
103
|
this.removeTooltip = () => {
|
|
101
104
|
this.isShown = false;
|
|
102
105
|
this.tooltip.style.width = 'max-content';
|
|
103
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');
|
|
104
109
|
};
|
|
105
110
|
this.handleScroll = () => {
|
|
106
111
|
if (!this.isShown) {
|
|
@@ -226,6 +231,21 @@ export class Tooltip {
|
|
|
226
231
|
get activeElement() {
|
|
227
232
|
return this.element.querySelector('r-button, r-icon-button, a, button, [tabindex]:not([tabindex="-1"])');
|
|
228
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
|
+
}
|
|
229
249
|
/**
|
|
230
250
|
* Define position state
|
|
231
251
|
*/
|
|
@@ -314,7 +334,7 @@ export class Tooltip {
|
|
|
314
334
|
this.adjustArrowPosition();
|
|
315
335
|
this.alignTooltipPosition();
|
|
316
336
|
this.alignArrowPosition();
|
|
317
|
-
//
|
|
337
|
+
// Allow tooltip content wrap and recalculate position
|
|
318
338
|
if (this.tooltip.style.width === 'fit-content') {
|
|
319
339
|
return;
|
|
320
340
|
}
|
|
@@ -348,14 +368,14 @@ export class Tooltip {
|
|
|
348
368
|
const triggerAttrs = {
|
|
349
369
|
tabindex: !this.activeElement ? 0 : null,
|
|
350
370
|
role: !this.activeElement ? 'button' : null,
|
|
351
|
-
'aria-describedby':
|
|
371
|
+
'aria-describedby': !this.activeElement && isShown ? uniqueId : null
|
|
352
372
|
};
|
|
353
373
|
const contentAttrs = {
|
|
354
374
|
id: uniqueId,
|
|
355
375
|
role: 'tooltip',
|
|
356
376
|
'aria-hidden': `${!isShown}`
|
|
357
377
|
};
|
|
358
|
-
return (h(Host, Object.assign({ key: '
|
|
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" }))));
|
|
359
379
|
}
|
|
360
380
|
static get is() { return "r-tooltip"; }
|
|
361
381
|
static get encapsulation() { return "shadow"; }
|
|
@@ -388,7 +408,7 @@ export class Tooltip {
|
|
|
388
408
|
},
|
|
389
409
|
"getter": false,
|
|
390
410
|
"setter": false,
|
|
391
|
-
"reflect":
|
|
411
|
+
"reflect": true,
|
|
392
412
|
"defaultValue": "''"
|
|
393
413
|
},
|
|
394
414
|
"position": {
|