@riverty/web-components 6.1.0 → 6.2.1
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 +29 -0
- package/custom-elements.json +160 -1
- 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 +24 -4
- 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 +5 -4
- package/dist/cjs/r-list-item.cjs.entry.js +1 -1
- package/dist/cjs/r-pagination.cjs.entry.js +56 -50
- package/dist/cjs/r-panel.cjs.entry.js +3 -3
- 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 +3 -3
- package/dist/cjs/r-tabs-list.cjs.entry.js +4 -4
- package/dist/cjs/r-tabs.cjs.entry.js +2 -2
- package/dist/cjs/r-textarea.cjs.entry.js +1 -1
- package/dist/cjs/r-toast-group.cjs.entry.js +13 -4
- package/dist/cjs/r-toast.cjs.entry.js +87 -18
- package/dist/cjs/web-components.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/alert/alert.css +4 -3
- 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/illustration/data.js +112 -0
- package/dist/collection/components/illustration/exports.js +3 -0
- package/dist/collection/components/illustration/illustration.css +52 -0
- package/dist/collection/components/illustration/illustration.js +540 -0
- package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
- package/dist/collection/components/input/exports.js +1 -0
- package/dist/collection/components/input/input.css +3 -0
- package/dist/collection/components/input/input.js +47 -2
- package/dist/collection/components/input-code/input-code.css +6 -0
- package/dist/collection/components/input-code/input-code.js +48 -10
- 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/pagination/pagination.css +33 -72
- package/dist/collection/components/pagination/pagination.js +194 -48
- package/dist/collection/components/panel/panel.js +2 -2
- 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 +4 -1
- package/dist/collection/components/stepper/stepper.js +125 -1
- package/dist/collection/components/stepper-item/stepper-item.css +22 -9
- package/dist/collection/components/stepper-item/stepper-item.js +36 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tabs-list/tabs-list.js +3 -3
- package/dist/collection/components/toast/toast.css +9 -9
- package/dist/collection/components/toast/toast.js +109 -21
- 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 +23 -3
- 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 +24 -4
- 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 +5 -4
- package/dist/esm/r-list-item.entry.js +1 -1
- package/dist/esm/r-pagination.entry.js +56 -50
- package/dist/esm/r-panel.entry.js +3 -3
- 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 +3 -3
- package/dist/esm/r-tabs-list.entry.js +4 -4
- package/dist/esm/r-tabs.entry.js +2 -2
- package/dist/esm/r-textarea.entry.js +1 -1
- package/dist/esm/r-toast-group.entry.js +13 -4
- package/dist/esm/r-toast.entry.js +87 -18
- 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/exports.d.ts +1 -1
- package/dist/types/components/icon/riverty-kit.d.ts +1 -1
- 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 +2 -0
- package/dist/types/components/input/input.d.ts +15 -1
- package/dist/types/components/input-code/input-code.d.ts +15 -1
- 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/toast/toast.d.ts +10 -4
- package/dist/types/components/tooltip/tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +273 -7
- 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-4214867d.entry.js +1 -0
- 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-19407a14.entry.js → p-4de76291.entry.js} +1 -1
- package/dist/web-components/{p-cd5daad2.entry.js → p-55600d47.entry.js} +1 -1
- package/dist/web-components/{p-c95b6470.entry.js → p-562051aa.entry.js} +1 -1
- 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-6bb44ec6.entry.js → p-8e125826.entry.js} +1 -1
- 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-cdd88c5a.entry.js → p-95396b5c.entry.js} +1 -1
- 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-5eeb7002.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-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/p-ff6b1b8f.entry.js +1 -0
- 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-159822fe.entry.js +0 -1
- package/dist/web-components/p-4f261b63.entry.js +0 -1
- package/dist/web-components/p-50893211.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-63fd817d.entry.js +0 -1
- package/dist/web-components/p-67fa3f84.entry.js +0 -1
- package/dist/web-components/p-70784685.entry.js +0 -1
- package/dist/web-components/p-7ce57332.entry.js +0 -1
- package/dist/web-components/p-92c7cf33.entry.js +0 -1
- package/dist/web-components/p-Da7qOBFr.js +0 -2
- package/dist/web-components/p-a7d22c76.entry.js +0 -1
- package/dist/web-components/p-b96d59ca.entry.js +0 -1
- package/dist/web-components/p-b98ab649.entry.js +0 -1
- package/dist/web-components/p-ba801820.entry.js +0 -1
- package/dist/web-components/p-bfc8c077.entry.js +0 -1
- package/dist/web-components/p-c05b05da.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-e4dc60f0.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
- package/dist/types/components/icon/{icon-data.d.ts → data.d.ts} +1 -1
|
@@ -26,6 +26,20 @@ export class RPagination {
|
|
|
26
26
|
this.selectText = 'page';
|
|
27
27
|
/** Position of the list box */
|
|
28
28
|
this.listBoxPosition = 'top';
|
|
29
|
+
/** Label for Previous Page button. Important to ensure accessibility for screen reader users. */
|
|
30
|
+
this.previousPageButtonLabel = 'Go to the previous page';
|
|
31
|
+
/** Label for Next Page button. Important to ensure accessibility for screen reader users.*/
|
|
32
|
+
this.nextPageButtonLabel = 'Go to the next page';
|
|
33
|
+
/** Label for First Page button. Important to ensure accessibility for screen reader users.*/
|
|
34
|
+
this.firstPageButtonLabel = 'Go to the first page';
|
|
35
|
+
/** Label for Last Page button. Important to ensure accessibility for screen reader users.*/
|
|
36
|
+
this.lastPageButtonLabel = 'Go to the last page';
|
|
37
|
+
/** Label for Page number buttons. Important to ensure accessibility for screen reader users.*/
|
|
38
|
+
this.pageLabel = 'Page';
|
|
39
|
+
/** Label for Ellipsis stepper. Important to ensure accessibility for screen reader users.*/
|
|
40
|
+
this.ellipsisLabel = 'Ellipsis indicating skipped pages';
|
|
41
|
+
/** Label for Items per page select. */
|
|
42
|
+
this.itemsPerPageLabel = 'Items per page';
|
|
29
43
|
this.resizeObserver = null;
|
|
30
44
|
this.handleItemsPerPageChange = (event) => {
|
|
31
45
|
const newItemsPerPage = parseInt(event.detail.value, 10);
|
|
@@ -50,28 +64,17 @@ export class RPagination {
|
|
|
50
64
|
});
|
|
51
65
|
};
|
|
52
66
|
this.handleItemChange = e => {
|
|
53
|
-
const
|
|
54
|
-
const isEnter = e.code === 'Enter';
|
|
55
|
-
const isSpace = e.code === 'Space';
|
|
56
|
-
if (isKeyup && !isEnter && !isSpace)
|
|
57
|
-
return;
|
|
58
|
-
const buttonElement = e.target.closest('r-button');
|
|
59
|
-
if (buttonElement === null)
|
|
60
|
-
return;
|
|
67
|
+
const buttonElement = e.target.closest('r-icon-button') || e.target.closest('r-button');
|
|
61
68
|
const index = Number(buttonElement.getAttribute('data-index'));
|
|
62
69
|
if (index === null)
|
|
63
70
|
return;
|
|
64
71
|
this._activateStep(index);
|
|
65
72
|
requestAnimationFrame(() => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (newActiveButton) {
|
|
69
|
-
newActiveButton.focus(); // Ensure focus is set correctly
|
|
70
|
-
}
|
|
73
|
+
const focusTarget = this.getFocusTargetAfterNavigation(buttonElement);
|
|
74
|
+
focusTarget === null || focusTarget === void 0 ? void 0 : focusTarget.setFocus();
|
|
71
75
|
});
|
|
72
76
|
if (buttonElement.classList.contains('number')) {
|
|
73
77
|
this.rNumberClick.emit(this.paginationState);
|
|
74
|
-
buttonElement.blur();
|
|
75
78
|
}
|
|
76
79
|
if (buttonElement.classList.contains('arrow')) {
|
|
77
80
|
const direction = buttonElement.classList.contains('next') ? 'next' : 'previous';
|
|
@@ -150,6 +153,35 @@ export class RPagination {
|
|
|
150
153
|
// Emit updated pagination state
|
|
151
154
|
this.rChange.emit(this.paginationState);
|
|
152
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Determines the appropriate focus target after navigation based on button states.
|
|
158
|
+
* Handles edge cases where navigation buttons become disabled.
|
|
159
|
+
*/
|
|
160
|
+
getFocusTargetAfterNavigation(buttonElement) {
|
|
161
|
+
var _a, _b, _c, _d, _e;
|
|
162
|
+
const isArrowButton = buttonElement.classList.contains('arrow');
|
|
163
|
+
const isNextButton = buttonElement.classList.contains('next');
|
|
164
|
+
const isPrevButton = buttonElement.classList.contains('previous');
|
|
165
|
+
const isFirstButton = buttonElement.classList.contains('first');
|
|
166
|
+
const isLastButton = buttonElement.classList.contains('last');
|
|
167
|
+
const willNextBeDisabled = this.next === null;
|
|
168
|
+
const willPrevBeDisabled = this.previous === null;
|
|
169
|
+
const willLastBeDisabled = this.active === this.total;
|
|
170
|
+
const willFirstBeDisabled = this.first === null;
|
|
171
|
+
if (isNextButton && willNextBeDisabled) {
|
|
172
|
+
return (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`.r-pagination--item.number[data-index="${this.total}"]`);
|
|
173
|
+
}
|
|
174
|
+
if (isPrevButton && willPrevBeDisabled) {
|
|
175
|
+
return (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(`.r-pagination--item.number[data-index="1"]`);
|
|
176
|
+
}
|
|
177
|
+
if (isLastButton && willLastBeDisabled) {
|
|
178
|
+
return (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector(`.r-pagination--item.number[data-index="${this.total}"]`);
|
|
179
|
+
}
|
|
180
|
+
if (isFirstButton && willFirstBeDisabled) {
|
|
181
|
+
return (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('.r-pagination--item.number[data-index="1"]');
|
|
182
|
+
}
|
|
183
|
+
return isArrowButton ? buttonElement : (_e = this.el.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector(`.r-pagination--item[data-index="${this.pageActive}"]`);
|
|
184
|
+
}
|
|
153
185
|
componentWillLoad() {
|
|
154
186
|
this.setPaginationState();
|
|
155
187
|
}
|
|
@@ -168,13 +200,13 @@ export class RPagination {
|
|
|
168
200
|
const { active, previous, next, first, itemsPerPage, itemsPerPageOptions, startText, middleText, endText, selectText, listBoxPosition } = this;
|
|
169
201
|
const itemTemplate = (type, index) => {
|
|
170
202
|
if (type === 'number') {
|
|
171
|
-
return (h("r-button", { class: "r-pagination--item number", "data-index": index,
|
|
203
|
+
return (h("li", null, h("r-button", { class: "r-pagination--item number", "data-index": index, variant: "secondary", onRClick: this.handleItemChange }, h("span", { class: "visually-hidden" }, this.pageLabel), " ", index)));
|
|
172
204
|
}
|
|
173
205
|
if (type === 'active') {
|
|
174
|
-
return (h("
|
|
206
|
+
return (h("li", null, h("r-button", { "data-index": index, class: "r-pagination--item number active", rAriaCurrent: "page" }, h("span", { class: "visually-hidden" }, this.pageLabel), " ", index)));
|
|
175
207
|
}
|
|
176
208
|
if (type === 'stepper') {
|
|
177
|
-
return (h("
|
|
209
|
+
return (h("li", { "aria-label": this.ellipsisLabel, class: "r-pagination--item stepper" }, "..."));
|
|
178
210
|
}
|
|
179
211
|
};
|
|
180
212
|
const renderNumbers = () => {
|
|
@@ -190,7 +222,7 @@ export class RPagination {
|
|
|
190
222
|
};
|
|
191
223
|
// Case: total pages are less than or equal to maxVisiblePages
|
|
192
224
|
if (totalPages <= maxVisiblePages) {
|
|
193
|
-
return h(
|
|
225
|
+
return h("ul", { class: "r-pagination--items-list" }, [...Array(totalPages).keys()].map(_createItem));
|
|
194
226
|
}
|
|
195
227
|
// Always add startEdge
|
|
196
228
|
items.push(itemTemplate(active === startEdge ? 'active' : 'number', startEdge));
|
|
@@ -249,47 +281,21 @@ export class RPagination {
|
|
|
249
281
|
}
|
|
250
282
|
}
|
|
251
283
|
}
|
|
252
|
-
return h(
|
|
284
|
+
return h("ul", { class: "r-pagination--items-list" }, items);
|
|
253
285
|
};
|
|
254
286
|
const renderHeader = () => {
|
|
255
287
|
const startItem = Math.min((active - 1) * itemsPerPage + 1, this.totalResults);
|
|
256
288
|
const endItem = Math.min(active * itemsPerPage, this.totalResults);
|
|
257
|
-
return (h(Fragment, null, h("div", { ref: el => (this.headerRef = el), class: "r-pagination--header" }, h("div", { class: "results-info", "aria-live": "polite" }, startText ? startText : 'Showing', " ", startItem, "\u2013", endItem, " ", middleText ? middleText : 'of', " ", this.totalResults, " ", endText ? endText : 'results'), h("div", null, h("r-select", { class: "r-pagination--header--select", value: this.itemsPerPage.toString(), id: "items-per-page", onRChange: this.handleItemsPerPageChange, label:
|
|
258
|
-
};
|
|
259
|
-
const getTagName = isNoPage => isNoPage ? 'div' : 'r-button';
|
|
260
|
-
const PrevTagName = getTagName(this.isNoPreviousPage);
|
|
261
|
-
const NextTagName = getTagName(this.isNoNextPage);
|
|
262
|
-
const FirstTagName = getTagName(this.isNotFirstPage);
|
|
263
|
-
const LastTagName = getTagName(this.isNotLastPage);
|
|
264
|
-
const prevArrowAttrs = {
|
|
265
|
-
class: `r-pagination--item arrow previous ${this.isNoPreviousPage ? 'disabled' : ''}`,
|
|
266
|
-
'data-index': previous,
|
|
267
|
-
'aria-label': `${PrevTagName === 'r-button' ? 'Previous Page' : ''}`
|
|
268
|
-
};
|
|
269
|
-
const nextArrowAttrs = {
|
|
270
|
-
class: `r-pagination--item arrow next ${this.isNoNextPage ? 'disabled' : ''}`,
|
|
271
|
-
'data-index': next,
|
|
272
|
-
'aria-label': `${NextTagName === 'r-button' ? 'Next Page' : ''}`
|
|
273
|
-
};
|
|
274
|
-
const firstArrowAttrs = {
|
|
275
|
-
class: `r-pagination--item arrow first ${first === null ? 'disabled' : ''}`,
|
|
276
|
-
'data-index': first,
|
|
277
|
-
'aria-label': `${first === null ? '' : 'First Page'}`
|
|
289
|
+
return (h(Fragment, null, h("div", { ref: el => (this.headerRef = el), class: "r-pagination--header" }, h("div", { class: "results-info", "aria-live": "polite" }, startText ? startText : 'Showing', " ", startItem, "\u2013", endItem, " ", middleText ? middleText : 'of', " ", this.totalResults, " ", endText ? endText : 'results'), h("div", null, h("r-select", { class: "r-pagination--header--select", value: this.itemsPerPage.toString(), id: "items-per-page", onRChange: this.handleItemsPerPageChange, label: this.itemsPerPageLabel, "listbox-position": listBoxPosition }, itemsPerPageOptions.map(option => (h("r-select-option", { value: option.toString() }, option, "/", selectText ? selectText : 'page'))))))));
|
|
278
290
|
};
|
|
279
291
|
const isLastPage = active === this.total;
|
|
280
|
-
const lastArrowAttrs = {
|
|
281
|
-
class: `r-pagination--item arrow last ${isLastPage ? 'disabled' : ''}`,
|
|
282
|
-
'data-index': isLastPage ? null : this.total,
|
|
283
|
-
'aria-label': isLastPage ? '' : 'Last Page',
|
|
284
|
-
tabindex: isLastPage ? '-1' : '0' // Make unfocusable when disabled
|
|
285
|
-
};
|
|
286
292
|
const renderList = () => {
|
|
287
293
|
if (this.variant === 'minimized') {
|
|
288
294
|
return (h(Fragment, null, h("div", { ref: el => (this.footerRef = el), class: "r-pagination--footer" }, renderNumbers())));
|
|
289
295
|
}
|
|
290
|
-
return (h(Fragment, null, h("div", { ref: el => (this.footerRef = el), class: "r-pagination--footer" }, this.variant === 'maximized' && (h(
|
|
296
|
+
return (h(Fragment, null, h("div", { ref: el => (this.footerRef = el), class: "r-pagination--footer" }, this.variant === 'maximized' && (h("r-icon-button", { "data-index": first, name: "angle-left-with-vertical-line", size: "s", disabled: this.isNotFirstPage, label: this.firstPageButtonLabel, class: "r-pagination--item arrow first", onRClick: this.handleItemChange })), h("r-icon-button", { "data-index": previous, name: "angle-left", size: "s", disabled: this.isNoPreviousPage, label: this.previousPageButtonLabel, class: "r-pagination--item arrow previous", onRClick: this.handleItemChange }), renderNumbers(), h("r-icon-button", { "data-index": next, name: "angle-right", size: "s", disabled: this.isNoNextPage, label: this.nextPageButtonLabel, class: "r-pagination--item arrow next", onRClick: this.handleItemChange }), this.variant === 'maximized' && (h("r-icon-button", { "data-index": this.total, name: "angle-right-with-vertical-line", size: "s", disabled: isLastPage, label: this.lastPageButtonLabel, class: "r-pagination--item arrow last", onRClick: this.handleItemChange })))));
|
|
291
297
|
};
|
|
292
|
-
return (h(Host,
|
|
298
|
+
return (h(Host, { role: "navigation" }, h("div", { class: "r-pagination" }, this.resultsLine && renderHeader(), renderList())));
|
|
293
299
|
}
|
|
294
300
|
static get is() { return "r-pagination"; }
|
|
295
301
|
static get encapsulation() { return "shadow"; }
|
|
@@ -561,6 +567,146 @@ export class RPagination {
|
|
|
561
567
|
"setter": false,
|
|
562
568
|
"reflect": false,
|
|
563
569
|
"defaultValue": "'top'"
|
|
570
|
+
},
|
|
571
|
+
"previousPageButtonLabel": {
|
|
572
|
+
"type": "string",
|
|
573
|
+
"attribute": "previous-page-button-label",
|
|
574
|
+
"mutable": false,
|
|
575
|
+
"complexType": {
|
|
576
|
+
"original": "string",
|
|
577
|
+
"resolved": "string",
|
|
578
|
+
"references": {}
|
|
579
|
+
},
|
|
580
|
+
"required": false,
|
|
581
|
+
"optional": false,
|
|
582
|
+
"docs": {
|
|
583
|
+
"tags": [],
|
|
584
|
+
"text": "Label for Previous Page button. Important to ensure accessibility for screen reader users."
|
|
585
|
+
},
|
|
586
|
+
"getter": false,
|
|
587
|
+
"setter": false,
|
|
588
|
+
"reflect": false,
|
|
589
|
+
"defaultValue": "'Go to the previous page'"
|
|
590
|
+
},
|
|
591
|
+
"nextPageButtonLabel": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"attribute": "next-page-button-label",
|
|
594
|
+
"mutable": false,
|
|
595
|
+
"complexType": {
|
|
596
|
+
"original": "string",
|
|
597
|
+
"resolved": "string",
|
|
598
|
+
"references": {}
|
|
599
|
+
},
|
|
600
|
+
"required": false,
|
|
601
|
+
"optional": false,
|
|
602
|
+
"docs": {
|
|
603
|
+
"tags": [],
|
|
604
|
+
"text": "Label for Next Page button. Important to ensure accessibility for screen reader users."
|
|
605
|
+
},
|
|
606
|
+
"getter": false,
|
|
607
|
+
"setter": false,
|
|
608
|
+
"reflect": false,
|
|
609
|
+
"defaultValue": "'Go to the next page'"
|
|
610
|
+
},
|
|
611
|
+
"firstPageButtonLabel": {
|
|
612
|
+
"type": "string",
|
|
613
|
+
"attribute": "first-page-button-label",
|
|
614
|
+
"mutable": false,
|
|
615
|
+
"complexType": {
|
|
616
|
+
"original": "string",
|
|
617
|
+
"resolved": "string",
|
|
618
|
+
"references": {}
|
|
619
|
+
},
|
|
620
|
+
"required": false,
|
|
621
|
+
"optional": false,
|
|
622
|
+
"docs": {
|
|
623
|
+
"tags": [],
|
|
624
|
+
"text": "Label for First Page button. Important to ensure accessibility for screen reader users."
|
|
625
|
+
},
|
|
626
|
+
"getter": false,
|
|
627
|
+
"setter": false,
|
|
628
|
+
"reflect": false,
|
|
629
|
+
"defaultValue": "'Go to the first page'"
|
|
630
|
+
},
|
|
631
|
+
"lastPageButtonLabel": {
|
|
632
|
+
"type": "string",
|
|
633
|
+
"attribute": "last-page-button-label",
|
|
634
|
+
"mutable": false,
|
|
635
|
+
"complexType": {
|
|
636
|
+
"original": "string",
|
|
637
|
+
"resolved": "string",
|
|
638
|
+
"references": {}
|
|
639
|
+
},
|
|
640
|
+
"required": false,
|
|
641
|
+
"optional": false,
|
|
642
|
+
"docs": {
|
|
643
|
+
"tags": [],
|
|
644
|
+
"text": "Label for Last Page button. Important to ensure accessibility for screen reader users."
|
|
645
|
+
},
|
|
646
|
+
"getter": false,
|
|
647
|
+
"setter": false,
|
|
648
|
+
"reflect": false,
|
|
649
|
+
"defaultValue": "'Go to the last page'"
|
|
650
|
+
},
|
|
651
|
+
"pageLabel": {
|
|
652
|
+
"type": "string",
|
|
653
|
+
"attribute": "page-label",
|
|
654
|
+
"mutable": false,
|
|
655
|
+
"complexType": {
|
|
656
|
+
"original": "string",
|
|
657
|
+
"resolved": "string",
|
|
658
|
+
"references": {}
|
|
659
|
+
},
|
|
660
|
+
"required": false,
|
|
661
|
+
"optional": false,
|
|
662
|
+
"docs": {
|
|
663
|
+
"tags": [],
|
|
664
|
+
"text": "Label for Page number buttons. Important to ensure accessibility for screen reader users."
|
|
665
|
+
},
|
|
666
|
+
"getter": false,
|
|
667
|
+
"setter": false,
|
|
668
|
+
"reflect": false,
|
|
669
|
+
"defaultValue": "'Page'"
|
|
670
|
+
},
|
|
671
|
+
"ellipsisLabel": {
|
|
672
|
+
"type": "string",
|
|
673
|
+
"attribute": "ellipsis-label",
|
|
674
|
+
"mutable": false,
|
|
675
|
+
"complexType": {
|
|
676
|
+
"original": "string",
|
|
677
|
+
"resolved": "string",
|
|
678
|
+
"references": {}
|
|
679
|
+
},
|
|
680
|
+
"required": false,
|
|
681
|
+
"optional": false,
|
|
682
|
+
"docs": {
|
|
683
|
+
"tags": [],
|
|
684
|
+
"text": "Label for Ellipsis stepper. Important to ensure accessibility for screen reader users."
|
|
685
|
+
},
|
|
686
|
+
"getter": false,
|
|
687
|
+
"setter": false,
|
|
688
|
+
"reflect": false,
|
|
689
|
+
"defaultValue": "'Ellipsis indicating skipped pages'"
|
|
690
|
+
},
|
|
691
|
+
"itemsPerPageLabel": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"attribute": "items-per-page-label",
|
|
694
|
+
"mutable": false,
|
|
695
|
+
"complexType": {
|
|
696
|
+
"original": "string",
|
|
697
|
+
"resolved": "string",
|
|
698
|
+
"references": {}
|
|
699
|
+
},
|
|
700
|
+
"required": false,
|
|
701
|
+
"optional": false,
|
|
702
|
+
"docs": {
|
|
703
|
+
"tags": [],
|
|
704
|
+
"text": "Label for Items per page select."
|
|
705
|
+
},
|
|
706
|
+
"getter": false,
|
|
707
|
+
"setter": false,
|
|
708
|
+
"reflect": false,
|
|
709
|
+
"defaultValue": "'Items per page'"
|
|
564
710
|
}
|
|
565
711
|
};
|
|
566
712
|
}
|
|
@@ -161,10 +161,10 @@ export class Panel {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
render() {
|
|
164
|
-
return (h(Host, { key: '
|
|
164
|
+
return (h(Host, { key: '0404a2c3acbba8414d7baffc8c0f861e512fe7cb', role: "navigation", collapsed: this.isCollapsed }, h("div", { key: 'b93d1555f060793b7137fd6aac0de2a1a1f35436', class: "r-panel" }, h("div", { key: 'b7dd2dee4c145a21a5a963750e8b26ab2d8b9bbe', class: "r-panel--header" }, this.hasHeader && (h("a", { key: 'dbb02cd6271fba2a5d4a783a20d5e6d9e34ee734', class: "logo-wrapper", href: this.logoLink }, this.isCollapsed ?
|
|
165
165
|
h("slot", { name: "logo-collapsed" })
|
|
166
166
|
:
|
|
167
|
-
h("slot", { name: "logo-expanded" }))), this.variant === 'modal' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "cross", rAriaLabel: `${this.labelCollapse}`, onClick: this.handleFullyCollapsedButtonClick })) : this.variant === 'drawer' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "angle-left", rAriaLabel: this.isCollapsed ? `${this.labelExpand}` : `${this.labelCollapse}`, onClick: this.handleSemiCollapsedButtonClick })) : this.variant === 'visible' ? (null) : null), h("div", { key: '
|
|
167
|
+
h("slot", { name: "logo-expanded" }))), this.variant === 'modal' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "cross", rAriaLabel: `${this.labelCollapse}`, onClick: this.handleFullyCollapsedButtonClick })) : this.variant === 'drawer' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "angle-left", rAriaLabel: this.isCollapsed ? `${this.labelExpand}` : `${this.labelCollapse}`, onClick: this.handleSemiCollapsedButtonClick })) : this.variant === 'visible' ? (null) : null), h("div", { key: 'bb3d86b7a4b0890709d4a4637eca033ddaec24a6', class: "r-panel--body" }, h("slot", { key: '201aa3f616d3d239fc7b0edc23565a6618304ce5' })), this.hasFooter && !this.isCollapsed && (h("div", { key: 'a15f34fbb86ad8b16c6d036b885c7c8b13655fc6', class: "r-panel--footer" }, h("slot", { key: '41de73edf832d3a5ca93e4f9a79a62780fdcd68b', name: "footer" }))))));
|
|
168
168
|
}
|
|
169
169
|
static get is() { return "r-panel"; }
|
|
170
170
|
static get encapsulation() { return "shadow"; }
|
|
@@ -60,12 +60,17 @@ export class Popover {
|
|
|
60
60
|
this.isOpen = false;
|
|
61
61
|
requestAnimationFrame(() => {
|
|
62
62
|
this.setBlur();
|
|
63
|
-
this.triggerElement
|
|
63
|
+
const interactiveElement = this.getInteractiveElement(this.activeElement || this.triggerElement);
|
|
64
|
+
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.focus();
|
|
64
65
|
});
|
|
65
66
|
};
|
|
66
67
|
this.onClickDismiss = () => {
|
|
67
68
|
this.hide();
|
|
68
69
|
};
|
|
70
|
+
this.updateTriggerAttributes = () => {
|
|
71
|
+
const interactiveElement = this.getInteractiveElement(this.activeElement);
|
|
72
|
+
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.setAttribute('aria-expanded', `${this.isOpen}`);
|
|
73
|
+
};
|
|
69
74
|
this.onKeyDown = async (event) => {
|
|
70
75
|
if (event.key === 'Tab') {
|
|
71
76
|
event.preventDefault();
|
|
@@ -165,6 +170,7 @@ export class Popover {
|
|
|
165
170
|
(_h = (_g = this.hidePopover) === null || _g === void 0 ? void 0 : _g.emit) === null || _h === void 0 ? void 0 : _h.call(_g);
|
|
166
171
|
}
|
|
167
172
|
(_k = (_j = this.popoverOpenChange) === null || _j === void 0 ? void 0 : _j.emit) === null || _k === void 0 ? void 0 : _k.call(_j);
|
|
173
|
+
this.updateTriggerAttributes();
|
|
168
174
|
}
|
|
169
175
|
handlePreferredPositionChange() {
|
|
170
176
|
this.renderPosition();
|
|
@@ -194,6 +200,30 @@ export class Popover {
|
|
|
194
200
|
var _a;
|
|
195
201
|
return (_a = this.boardElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
196
202
|
}
|
|
203
|
+
get activeElement() {
|
|
204
|
+
var _a;
|
|
205
|
+
return (_a = this.host.querySelector('r-popover-trigger')) === null || _a === void 0 ? void 0 : _a.querySelector('r-button, r-icon-button, a, button, [tabindex]:not([tabindex="-1"])');
|
|
206
|
+
}
|
|
207
|
+
get headlineSlotContent() {
|
|
208
|
+
var _a;
|
|
209
|
+
const el = this.host.querySelector('[slot="headline"]');
|
|
210
|
+
return (_a = el === null || el === void 0 ? void 0 : el.textContent) === null || _a === void 0 ? void 0 : _a.trim();
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Gets the actual interactive element (button/link) from within r-button or r-icon-button shadow DOM,
|
|
214
|
+
* or returns the element itself if it's already interactive
|
|
215
|
+
*/
|
|
216
|
+
getInteractiveElement(element) {
|
|
217
|
+
if (!element)
|
|
218
|
+
return null;
|
|
219
|
+
if (element.tagName === 'R-BUTTON' || element.tagName === 'R-ICON-BUTTON') {
|
|
220
|
+
const shadowRoot = element.shadowRoot;
|
|
221
|
+
if (shadowRoot) {
|
|
222
|
+
return shadowRoot.querySelector('button, a');
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return element;
|
|
226
|
+
}
|
|
197
227
|
/** Position logic */
|
|
198
228
|
renderPosition() {
|
|
199
229
|
if (!this.triggerRect)
|
|
@@ -276,12 +306,23 @@ export class Popover {
|
|
|
276
306
|
this.host.setAttribute('data-horizontal', horizontalPosition);
|
|
277
307
|
return this;
|
|
278
308
|
}
|
|
309
|
+
setTriggerInitialAttributes() {
|
|
310
|
+
const interactiveElement = this.getInteractiveElement(this.activeElement);
|
|
311
|
+
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.setAttribute('aria-haspopup', 'dialog');
|
|
312
|
+
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.setAttribute('aria-expanded', `${this.isOpen}`);
|
|
313
|
+
}
|
|
279
314
|
componentDidLoad() {
|
|
315
|
+
var _a;
|
|
280
316
|
this.open ? this.show() : this.hide();
|
|
317
|
+
this.setTriggerInitialAttributes();
|
|
318
|
+
(_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
|
319
|
+
this.toggle();
|
|
320
|
+
});
|
|
281
321
|
}
|
|
282
322
|
render() {
|
|
283
|
-
|
|
284
|
-
|
|
323
|
+
const TAG = !this.activeElement ? 'button' : 'div';
|
|
324
|
+
return (h(Host, { key: 'f836d35a44519d273dc399d0ae6142f17e78888e', id: this.uniqueId, "data-position": this.positionState, "data-open": `${this.isOpen}`, open: this.isOpen }, h("div", { key: '88146350c8695487a18028a20bf1313052b35870', class: "r-popover" }, h(TAG, { key: 'de1a53f1f921acc223ebd0276b46e43832e5a82f', class: "r-popover--trigger", "aria-label": !this.activeElement ? this.triggerAriaLabel : null, ref: el => this.triggerElement = el, "aria-haspopup": "dialog", popoverTarget: !this.activeElement ? `${this.uniqueId}-board` : null, popoverTargetAction: !this.activeElement ? this.triggerAction : null }, h("slot", { key: '2946f68024273f6b7bbb250faca7794eb712cc58', name: "trigger" })), h("div", { key: 'cf44066fb1ec34178d73b812f5bcca3b1977575d', class: "r-popover--board", id: `${this.uniqueId}-board`, role: "dialog", "aria-label": this.headlineSlotContent, popover: this.dismissMode, ref: el => this.boardElement = el, onToggle: this.onToggle, onKeyDown: this.onKeyDown }, this.hasDismiss &&
|
|
325
|
+
h("r-icon-button", { key: '41e3e2bef98b88328984233271e7378a767eaf76', ref: el => this.dismissElement = el, class: "r-popover--dismiss", name: "cross", onClick: this.onClickDismiss, label: this.dismissAriaLabel }), h("div", { key: '9d47e8f5e2cb4d27118b64cfcf3eb83dd7d84ff0', class: "r-popover--board-content" }, h("slot", { key: '68f384a418a32a14b01adb7e3d407e4e46f8ca95', name: "headline" }), h("slot", { key: '3536f9f3aa738919115c1ad017cd0f66438fb044', name: "content" }), h("slot", { key: '4ecbf5d23cb23f9adaade04f3694a6d17f773365', name: "action" })), h("div", { key: '1c3acee058d689e106b9fca008d77229d52b2aea', class: "r-popover--board-pointer", "aria-hidden": "true" }, h("svg", { key: 'bb211b28714acc84753bbaaafee1ab1624d51b6c', width: "16", height: "8", viewBox: "0 0 16 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '0ad29cb4ef8d2d7f62738af3b1749c5b5e007d87', d: "M8 8L0 0L16 0L8 8Z", fill: "currentColor" })))))));
|
|
285
326
|
}
|
|
286
327
|
static get is() { return "r-popover"; }
|
|
287
328
|
static get encapsulation() { return "shadow"; }
|
|
@@ -64,7 +64,7 @@ export class PopoverAction {
|
|
|
64
64
|
return focusableElements(this.host);
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: '8e0de158033b48c66aa49930911e1f383c2010ae', slot: "action" }, h("slot", { key: 'b9c762d2c1774600a29306559253125abc21cbcd', onSlotchange: this.handleSlotChange })));
|
|
68
68
|
}
|
|
69
69
|
static get is() { return "r-popover-action"; }
|
|
70
70
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,7 +44,7 @@ export class PopoverContent {
|
|
|
44
44
|
return focusableElements(this.host);
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: 'f05a31b3948094f5f7ca657f4bd81474af2fcb6e', slot: "content", class: "r-typography" }, h("slot", { key: '0ecbe8de6c0ec200499aead61fc883804c4c4dd7' })));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "r-popover-content"; }
|
|
50
50
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class PopoverHeadline {
|
|
|
10
10
|
stopInverseThemeAwareness(this.host, themeContextElement);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '21f1656241f40201d5eb98cfb454d9c509f6cfe1', slot: "headline" }, h("slot", { key: 'fa9861bd13bcb23b420c5b5aa085ba6ceecb3df4' })));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "r-popover-headline"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -53,7 +53,7 @@ export class PopoverTrigger {
|
|
|
53
53
|
(_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
54
54
|
}
|
|
55
55
|
render() {
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '313cccef6d7f463a6088581b2efc3057a97d61b2', slot: "trigger", onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("slot", { key: '65ff3ba6c677c693445c0c82feae795a94768cf8' })));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "r-popover-trigger"; }
|
|
59
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,7 +11,7 @@ export class ProgressBar {
|
|
|
11
11
|
max: '100',
|
|
12
12
|
'aria-label': rAriaLabel
|
|
13
13
|
};
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '8d8307ebac0b8a231569bd86c35175d9f11e14ac' }, h("progress", Object.assign({ key: '631b8ecaaca4fde5c14ddabb74ff076610557832' }, progressBarAttrs, { class: "r-progress-bar" }))));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "r-progress-bar"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -64,7 +64,8 @@ export class RadioButton {
|
|
|
64
64
|
/** Reference to the radio button elements */
|
|
65
65
|
get radioElements() {
|
|
66
66
|
if (this.groupEl) {
|
|
67
|
-
|
|
67
|
+
// Use :scope > to only select direct children, excluding nested radio-group buttons
|
|
68
|
+
return this.groupEl.querySelectorAll(`:scope > r-radio-button`);
|
|
68
69
|
}
|
|
69
70
|
if (this.parentFormEl) {
|
|
70
71
|
return this.parentFormEl.querySelectorAll(`r-radio-button[name=${this.name}]`);
|
|
@@ -117,11 +118,11 @@ export class RadioButton {
|
|
|
117
118
|
required,
|
|
118
119
|
autofocus
|
|
119
120
|
};
|
|
120
|
-
return (h(Host, { key: '
|
|
121
|
-
h("div", { key: '
|
|
122
|
-
h("div", { key: '
|
|
123
|
-
h("r-hint", { key: '
|
|
124
|
-
h("r-hint", { key: '
|
|
121
|
+
return (h(Host, { key: 'cf6b1b5db202773a2c6eea4df6a9303275054a73' }, h("label", { key: '4e203583a2b779e239c2893eadccc3514f84b0c4', class: "r-radio-button", onClick: this.onClick, onKeyDown: this.onKeydown }, h("input", Object.assign({ key: '14e89b050928abd51b66e8637c39bbd8da8e9856' }, inputAttrs, { id: `${uniqueId}-input`, class: "r-radio-button--input", ref: el => this.nativeEl = el, onFocus: this.onFocus, onBlur: this.onBlur })), h("span", { key: 'ee55afd60c5dbb947e9c12fffc401f7acfcefada', class: "r-radio-button--box" }), this.isLeading &&
|
|
122
|
+
h("div", { key: 'eabd27b399dee0bc2cef0fb7a92adad55095708b', class: "r-radio-button--leading" }, h("slot", { key: '5ec99653141268456cf9c8b2398f70c7b1afd36d', name: "leading" }, this.icon && h("r-icon", { key: '47662e84ad1aac02e867ddd040b5b7e1890ba986', name: this.icon, size: "m" }))), h("div", { key: 'bcaaf67c6cdf95a0bfa0dd5784d69c237e551a0e', class: "r-radio-button--text" }, h("slot", { key: 'a54f1823afe368d85f9bd4743ac0aa1df7298049', name: "title" }, h("div", { key: 'b531b659b920d7f064f10e622b83099d14270935', style: { display: 'contents' } }, h("slot", { key: 'b51f3e83234681804c49cb1043d90de70e4929db' }))), h("slot", { key: 'd217abfd3675898afd5b41a543200f7104019aed', name: "description" }, this.description)), this.isTrailing &&
|
|
123
|
+
h("div", { key: '664ddcc19dba3029343532caa13b05a6e3834977', class: "r-radio-button--trailing" }, h("slot", { key: 'b4ec626236a01c9c74b20ae09194ea414bc7699c', name: "trailing" }))), invalid && error &&
|
|
124
|
+
h("r-hint", { key: 'bd60d4337984662f410613b470b6e3be695343f5', role: "alert", variant: "error", id: `${uniqueId}-hint` }, this.error), hint &&
|
|
125
|
+
h("r-hint", { key: '31c5712fe6f2164219e28484a40ce5452a836743', role: "note", variant: "information", id: `${uniqueId}-hint` }, hint)));
|
|
125
126
|
}
|
|
126
127
|
static get is() { return "r-radio-button"; }
|
|
127
128
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ import { Host, h } from "@stencil/core";
|
|
|
4
4
|
*/
|
|
5
5
|
export class RadioButtonDescription {
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '0cc8dafb54d3b65f6c3af977bde4019ac413042d', slot: "description" }, h("div", { key: '7347ec0238fbf3c8471cdcf6fb3cf303a0f9c4e7', class: "r-radio-button-description", style: { display: 'contents' } }, h("slot", { key: '940714dd9b350c10b47486454139506d38fa0366' }))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "r-radio-button-description"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ import { Host, h } from "@stencil/core";
|
|
|
4
4
|
*/
|
|
5
5
|
export class RadioButtonLeading {
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '2f4f3dae827959cebf6a5b5797d8942b6fbbeded', slot: "leading" }, h("div", { key: '6dfda6f9bf0c88056d3d46f095b1f30e615ac5d7', class: "r-radio-button-leading", style: { display: 'contents' } }, h("slot", { key: 'd909c93595d5f43ad3d8b93262134b52fbfde23c' }))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "r-radio-button-leading"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ import { Host, h } from "@stencil/core";
|
|
|
4
4
|
*/
|
|
5
5
|
export class RadioButtonTitle {
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '2d2ae73f63409f55e0d5920c351cfed20d3b69d9', slot: "title" }, h("div", { key: '8f0ed8680798a41ddf827e74b245e43464f51eb0', class: "r-radio-button-title", style: { display: 'contents' } }, h("slot", { key: '336df52466bdad5baa93b1ed6abb192bee958e30' }))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "r-radio-button-title"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ import { Host, h } from "@stencil/core";
|
|
|
4
4
|
*/
|
|
5
5
|
export class RadioButtonTrailing {
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '628b87d2952aad3e25f8fd6b0b61c6db06a15959', slot: "trailing" }, h("div", { key: '93d2888f3e10e6346fda143ba8d0757d2913a503', class: "r-radio-button-trailing", style: { display: 'contents' } }, h("slot", { key: '5929143a1c1b54e9e3f082dd54c2e1376a80dece' }))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "r-radio-button-trailing"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
:host .r-radio-group {
|
|
33
33
|
display: var(--r-radio-group--display, flex);
|
|
34
34
|
flex-direction: var(--r-radio-group--flex-direction, column);
|
|
35
|
+
padding: var(--r-radio-group--padding, 0);
|
|
36
|
+
margin: var(--r-radio-group--margin, 0);
|
|
37
|
+
border: var(--r-radio-group--border, none);
|
|
35
38
|
}
|
|
36
39
|
:host .r-radio-group--label-container {
|
|
37
40
|
display: var(--r-radio-group--label-container--display, flex);
|
|
@@ -57,6 +60,6 @@
|
|
|
57
60
|
flex-wrap: var(--r-radio-group--content--flex-wrap, nowrap);
|
|
58
61
|
gap: var(--r-radio-group--content--gap, var(--r-spacing-050, 0.5rem));
|
|
59
62
|
}
|
|
60
|
-
:host .r-radio-group + r-hint {
|
|
63
|
+
:host .r-radio-group + .r-radio-group--message r-hint {
|
|
61
64
|
margin-top: var(--r-radio-group--hint--margin-top, var(--r-spacing-050, 0.5rem));
|
|
62
65
|
}
|