@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,17 +1,87 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
+
const OFFSET = 20;
|
|
2
3
|
export class Stepper {
|
|
3
4
|
constructor() {
|
|
4
5
|
/** Complete steps. Default value 0 */
|
|
5
6
|
this.completed = 0;
|
|
6
7
|
/** _DEPRECATED_ (use `completed` instead) Completed steps. Default value 0 */
|
|
7
8
|
this.completeSteps = 0;
|
|
9
|
+
/** Label for completed steps for screen reader users. */
|
|
10
|
+
this.completedStepsLabel = 'Completed';
|
|
11
|
+
this.handleSlotChange = () => {
|
|
12
|
+
this.setStepStatus();
|
|
13
|
+
this.updateVisibilityOfStepText();
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
handleCompletedStepsLabelChange() {
|
|
17
|
+
this.setStepStatus();
|
|
18
|
+
}
|
|
19
|
+
onResize() {
|
|
20
|
+
this.updateVisibilityOfStepText();
|
|
8
21
|
}
|
|
9
22
|
get hasSteps() {
|
|
10
23
|
return this.host.querySelectorAll('r-stepper-item').length > 0;
|
|
11
24
|
}
|
|
25
|
+
componentDidLoad() {
|
|
26
|
+
this.setStepStatus();
|
|
27
|
+
this.updateVisibilityOfStepText();
|
|
28
|
+
}
|
|
29
|
+
setStepStatus() {
|
|
30
|
+
var _a;
|
|
31
|
+
const innerSteps = ((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('r-stepper-item')) || [];
|
|
32
|
+
const slotSteps = this.host.querySelectorAll('r-stepper-item') || [];
|
|
33
|
+
const allSteps = [...Array.from(innerSteps), ...Array.from(slotSteps)];
|
|
34
|
+
allSteps === null || allSteps === void 0 ? void 0 : allSteps.forEach((step) => {
|
|
35
|
+
const existingSpan = step.querySelector('.visually-hidden');
|
|
36
|
+
if (existingSpan) {
|
|
37
|
+
existingSpan.remove();
|
|
38
|
+
}
|
|
39
|
+
const span = document.createElement('span');
|
|
40
|
+
span.className = 'visually-hidden';
|
|
41
|
+
span.textContent = `${step.complete ? `${this.completedStepsLabel}.` : ''}`;
|
|
42
|
+
step.prepend(span);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
getTextElementWidth(stepElement) {
|
|
46
|
+
var _a;
|
|
47
|
+
const textElement = (_a = stepElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.r-stepper-item--text');
|
|
48
|
+
if (!textElement)
|
|
49
|
+
return 0;
|
|
50
|
+
// Temporarily remove visually-hidden to get the natural width
|
|
51
|
+
const wasHidden = textElement.classList.contains('visually-hidden');
|
|
52
|
+
if (wasHidden) {
|
|
53
|
+
textElement.classList.remove('visually-hidden');
|
|
54
|
+
}
|
|
55
|
+
const width = textElement.offsetWidth;
|
|
56
|
+
// Restore the previous state
|
|
57
|
+
if (wasHidden) {
|
|
58
|
+
textElement.classList.add('visually-hidden');
|
|
59
|
+
}
|
|
60
|
+
return width;
|
|
61
|
+
}
|
|
62
|
+
updateVisibilityOfStepText() {
|
|
63
|
+
const slotSteps = this.host.querySelectorAll('r-stepper-item') || [];
|
|
64
|
+
let totalWidth = 0;
|
|
65
|
+
slotSteps.forEach((step) => {
|
|
66
|
+
totalWidth += this.getTextElementWidth(step) + OFFSET;
|
|
67
|
+
});
|
|
68
|
+
const isOverflowing = totalWidth >= this.host.offsetWidth;
|
|
69
|
+
if (isOverflowing) {
|
|
70
|
+
slotSteps.forEach((step) => {
|
|
71
|
+
var _a;
|
|
72
|
+
(_a = step.shadowRoot.querySelector('.r-stepper-item--text')) === null || _a === void 0 ? void 0 : _a.classList.add('visually-hidden');
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
slotSteps.forEach((step) => {
|
|
77
|
+
var _a;
|
|
78
|
+
(_a = step.shadowRoot.querySelector('.r-stepper-item--text')) === null || _a === void 0 ? void 0 : _a.classList.remove('visually-hidden');
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
12
82
|
render() {
|
|
13
83
|
const completed = this.completed || this.completeSteps;
|
|
14
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '9a8684fe78d610b90c824a8bd06371efc222b94a' }, h("ol", { key: '89c37db27cab79946f29e5302784f3a17c853cef', class: "r-stepper", "aria-label": this.label || null }, !this.hasSteps && Array.from({ length: this.total }, (_, index) => (h("r-stepper-item", { number: index + 1, complete: completed > index, active: completed === index, key: index }))), h("slot", { key: '92d043648fb9c12ca5222a569ec40a917798af5a', onSlotchange: this.handleSlotChange }))));
|
|
15
85
|
}
|
|
16
86
|
static get is() { return "r-stepper"; }
|
|
17
87
|
static get encapsulation() { return "shadow"; }
|
|
@@ -85,8 +155,62 @@ export class Stepper {
|
|
|
85
155
|
"getter": false,
|
|
86
156
|
"setter": false,
|
|
87
157
|
"reflect": false
|
|
158
|
+
},
|
|
159
|
+
"label": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"attribute": "label",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "string",
|
|
165
|
+
"resolved": "string",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": true,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": "Label for the stepper for screen reader users."
|
|
173
|
+
},
|
|
174
|
+
"getter": false,
|
|
175
|
+
"setter": false,
|
|
176
|
+
"reflect": true
|
|
177
|
+
},
|
|
178
|
+
"completedStepsLabel": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"attribute": "completed-steps-label",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "string",
|
|
184
|
+
"resolved": "string",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": true,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [],
|
|
191
|
+
"text": "Label for completed steps for screen reader users."
|
|
192
|
+
},
|
|
193
|
+
"getter": false,
|
|
194
|
+
"setter": false,
|
|
195
|
+
"reflect": true,
|
|
196
|
+
"defaultValue": "'Completed'"
|
|
88
197
|
}
|
|
89
198
|
};
|
|
90
199
|
}
|
|
91
200
|
static get elementRef() { return "host"; }
|
|
201
|
+
static get watchers() {
|
|
202
|
+
return [{
|
|
203
|
+
"propName": "completedStepsLabel",
|
|
204
|
+
"methodName": "handleCompletedStepsLabelChange"
|
|
205
|
+
}];
|
|
206
|
+
}
|
|
207
|
+
static get listeners() {
|
|
208
|
+
return [{
|
|
209
|
+
"name": "resize",
|
|
210
|
+
"method": "onResize",
|
|
211
|
+
"target": "window",
|
|
212
|
+
"capture": false,
|
|
213
|
+
"passive": true
|
|
214
|
+
}];
|
|
215
|
+
}
|
|
92
216
|
}
|
|
@@ -12,22 +12,35 @@
|
|
|
12
12
|
--r-stepper-item--indicator--border-color: transparent;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
::slotted(.visually-hidden),
|
|
16
|
+
[data-visually-hidden-only=true],
|
|
17
|
+
.visually-hidden {
|
|
18
|
+
position: absolute;
|
|
19
|
+
width: 1px;
|
|
20
|
+
height: 1px;
|
|
21
|
+
padding: 0;
|
|
22
|
+
margin: -1px;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
clip: rect(0, 0, 0, 0);
|
|
25
|
+
border: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
15
28
|
.r-stepper-item {
|
|
16
29
|
display: var(--r-stepper-item--display, flex);
|
|
17
30
|
flex-direction: var(--r-stepper-item--flex-direction, column);
|
|
18
31
|
align-items: var(--r-stepper-item--align-items, center);
|
|
19
32
|
justify-content: var(--r-stepper-item--justify-content, center);
|
|
20
|
-
font-size: var(--r-stepper-item--font-size, var(--r-font-size-200,
|
|
21
|
-
color: var(--r-stepper-item--color, var(--r-text-
|
|
33
|
+
font-size: var(--r-stepper-item--font-size, var(--r-font-size-200, 0.8125rem));
|
|
34
|
+
color: var(--r-stepper-item--color, var(--r-text-regular, #282828));
|
|
22
35
|
font-family: var(--r-stepper-item--font-family, var(--r-font-family-text, system-ui));
|
|
23
|
-
width: var(--r-stepper-item--width,
|
|
36
|
+
width: var(--r-stepper-item--width, var(--r-spacing-225, 2.25rem));
|
|
24
37
|
white-space: var(--r-stepper-item--white-space, nowrap);
|
|
25
|
-
gap: var(--r-stepper-item--gap,
|
|
38
|
+
gap: var(--r-stepper-item--gap, var(--r-spacing-100, 0.5rem));
|
|
26
39
|
}
|
|
27
40
|
.r-stepper-item--indicator {
|
|
28
|
-
width: var(--r-stepper-item--indicator--width,
|
|
29
|
-
height: var(--r-stepper-item--indicator--height,
|
|
30
|
-
line-height: var(--r-stepper-item--indicator--line-height,
|
|
41
|
+
width: var(--r-stepper-item--indicator--width, var(--r-spacing-125, 1.25rem));
|
|
42
|
+
height: var(--r-stepper-item--indicator--height, var(--r-spacing-125, 1.25rem));
|
|
43
|
+
line-height: var(--r-stepper-item--indicator--line-height, var(--r-spacing-125, 1.25rem));
|
|
31
44
|
border-radius: var(--r-stepper-item--indicator--border-radius, 50%);
|
|
32
45
|
background-color: var(--r-stepper-item--indicator--background-color, transparent);
|
|
33
46
|
display: var(--r-stepper-item--indicator--display, flex);
|
|
@@ -35,15 +48,15 @@
|
|
|
35
48
|
align-items: var(--r-stepper-item--indicator--align-items, center);
|
|
36
49
|
border-width: var(--r-stepper-item--indicator--border-width, 1px);
|
|
37
50
|
border-style: var(--r-stepper-item--indicator--border-style, solid);
|
|
38
|
-
border-color: var(--r-stepper-item--indicator--border-color, var(--r-
|
|
39
|
-
margin-left: var(--r-stepper-item--indicator--margin-left,
|
|
40
|
-
margin-right: var(--r-stepper-item--indicator--margin-right,
|
|
51
|
+
border-color: var(--r-stepper-item--indicator--border-color, var(--r-text-regular, #282828));
|
|
52
|
+
margin-left: var(--r-stepper-item--indicator--margin-left, var(--r-spacing-100, 0.5rem));
|
|
53
|
+
margin-right: var(--r-stepper-item--indicator--margin-right, var(--r-spacing-100, 0.5rem));
|
|
41
54
|
}
|
|
42
55
|
.r-stepper-item--indicator--step-number {
|
|
43
56
|
vertical-align: var(--r-stepper-item--step-number--vertical-align, middle);
|
|
44
57
|
}
|
|
45
58
|
.r-stepper-item--text {
|
|
46
|
-
font-size: var(--r-stepper-item--text--font-size, var(--r-font-size-200,
|
|
47
|
-
color: var(--r-stepper-item--text--color, var(--r-text-
|
|
59
|
+
font-size: var(--r-stepper-item--text--font-size, var(--r-font-size-200, 0.8125rem));
|
|
60
|
+
color: var(--r-stepper-item--text--color, var(--r-text-regular, #282828));
|
|
48
61
|
text-align: var(--r-stepper-item--text--text-align, center);
|
|
49
62
|
}
|
|
@@ -6,13 +6,28 @@ export class StepperItem {
|
|
|
6
6
|
/** Defines a property active that determines whether the step is active */
|
|
7
7
|
this.active = false;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Checks if the slot contains only visually-hidden elements (no visible text).
|
|
11
|
+
* Returns true if only visually-hidden elements are present.
|
|
12
|
+
*/
|
|
13
|
+
get hasOnlyVisuallyHiddenContent() {
|
|
14
|
+
var _a;
|
|
15
|
+
const textContent = ((_a = this.host.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
16
|
+
const visuallyHiddenElement = this.host.querySelector('.visually-hidden');
|
|
17
|
+
if (!visuallyHiddenElement) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
const visuallyHiddenText = visuallyHiddenElement.textContent || '';
|
|
21
|
+
const remainingText = textContent.replace(visuallyHiddenText.trim(), '').trim();
|
|
22
|
+
return !remainingText.length;
|
|
23
|
+
}
|
|
9
24
|
get hasText() {
|
|
10
25
|
return this.host.textContent.trim().length > 0;
|
|
11
26
|
}
|
|
12
27
|
render() {
|
|
13
28
|
const number = this.number || this.stepNumber;
|
|
14
|
-
return (h(Host, { key: '
|
|
15
|
-
h("div", { key: '
|
|
29
|
+
return (h(Host, { key: '4f55b5491ec5eee7cad6313fa85e7d6cc89b2178', role: "listitem", "aria-current": this.active ? 'step' : null }, h("div", { key: '2864f0e19f2f11af0f8674b9a701cd948024c085', class: "r-stepper-item" }, h("div", { key: 'de896ec98a13a4b20965a3ca58c5517a30de1f74', class: "r-stepper-item--indicator" }, this.complete ? (h("r-icon", { name: "check", size: "s" })) : this.icon ? (h("r-icon", { name: this.icon, iconAriaLabel: this.label, size: "s" })) : number !== undefined ? (h("span", { "aria-hidden": `${!this.hasOnlyVisuallyHiddenContent}`, class: "r-stepper-item--indicator--step-number" }, number)) : null), this.hasText &&
|
|
30
|
+
h("div", { key: 'cf3b6b5e3f4454830ecce06a6b6c16225aadd93e', "data-visually-hidden-only": `${this.hasOnlyVisuallyHiddenContent}`, class: "r-stepper-item--text" }, h("slot", { key: '65bd1f231c445f9681750c71ef156297edbf05fb' })))));
|
|
16
31
|
}
|
|
17
32
|
static get is() { return "r-stepper-item"; }
|
|
18
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -130,6 +145,25 @@ export class StepperItem {
|
|
|
130
145
|
"getter": false,
|
|
131
146
|
"setter": false,
|
|
132
147
|
"reflect": true
|
|
148
|
+
},
|
|
149
|
+
"label": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"attribute": "label",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "string",
|
|
155
|
+
"resolved": "string",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": true,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "Label for the step icon for screen reader users."
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"reflect": true
|
|
133
167
|
}
|
|
134
168
|
};
|
|
135
169
|
}
|
|
@@ -6,42 +6,30 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
:host(:hover:not([disabled]:not([disabled=false]))) {
|
|
9
|
-
--r-tab--
|
|
10
|
-
--r-tab--marker--height: 5px;
|
|
11
|
-
--r-tab--marker--background-color: var(--r-border-softer, #c9c9c9);
|
|
12
|
-
--r-tab--marker--visibility: visible;
|
|
9
|
+
--r-tab--background: var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04));
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
:host(:active:not([disabled]:not([disabled=false]))) {
|
|
16
|
-
--r-tab--background
|
|
13
|
+
--r-tab--background: var(--r-background-interactive-pressed, rgba(40,40,40,0.12));
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
:host(:focus-visible) {
|
|
20
|
-
--r-tab--
|
|
21
|
-
--r-tab--
|
|
22
|
-
--r-tab--
|
|
23
|
-
--r-tab--slot--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
|
|
24
|
-
--r-tab--slot--outline: 2px solid var(--r-border-focused, #0071e3);
|
|
25
|
-
--r-tab--slot--outline-offset: 2px;
|
|
17
|
+
--r-tab--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
|
|
18
|
+
--r-tab--outline: 2px solid var(--r-border-focused, #0071e3);
|
|
19
|
+
--r-tab--outline-offset: 2px;
|
|
26
20
|
}
|
|
27
21
|
|
|
28
22
|
:host([active]:not([active=false])) {
|
|
29
23
|
cursor: default;
|
|
30
24
|
--r-tab--font-weight: var(--r-font-weight-semibold, 600);
|
|
31
|
-
--r-tab--color: var(--r-text-strong, #000);
|
|
32
|
-
--r-tab--padding-left: 0.5625rem;
|
|
33
|
-
--r-tab--padding-right: 0.5625rem;
|
|
34
|
-
--r-tab--marker--background-color: var(--r-border-regular, #282828);
|
|
35
25
|
--r-tab--marker--visibility: visible;
|
|
36
|
-
--r-tab--marker--height: 3px;
|
|
37
26
|
}
|
|
38
27
|
|
|
39
28
|
:host([disabled]:not([disabled=false])) {
|
|
40
|
-
opacity: 0.4;
|
|
41
29
|
cursor: not-allowed;
|
|
42
30
|
--r-tab--pointer-events: none;
|
|
43
|
-
--r-tab--
|
|
44
|
-
--r-tab--
|
|
31
|
+
--r-tab--color: var(--r-text-soft, #686868);
|
|
32
|
+
--r-tab--marker--background-color: var(--r-border-soft, #686868) ;
|
|
45
33
|
}
|
|
46
34
|
|
|
47
35
|
.r-tab {
|
|
@@ -49,19 +37,26 @@
|
|
|
49
37
|
font-family: var(--r-tab--font-family, var(--r-font-family-text, system-ui));
|
|
50
38
|
font-weight: var(--r-tab--font-weight, var(--r-font-weight-regular, 400));
|
|
51
39
|
font-size: var(--r-tab--font-size, var(--r-font-size-400, 1rem));
|
|
52
|
-
line-height: var(--r-tab--line-height, 1);
|
|
40
|
+
line-height: var(--r-tab--line-height, var(--r-line-height-m, 1.5));
|
|
53
41
|
cursor: var(--r-tab--cursor, inherit);
|
|
54
42
|
pointer-events: var(--r-tab--pointer-events, initial);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
display: var(--r-tab--display, flex);
|
|
44
|
+
align-items: var(--r-tab--align-items, center);
|
|
45
|
+
justify-content: var(--r-tab--justify-content, center);
|
|
46
|
+
gap: var(--r-tab--gap, var(--r-spacing-050, 0.5rem));
|
|
47
|
+
width: var(--r-tab--width, auto);
|
|
48
|
+
padding-top: var(--r-tab--padding-top, var(--r-spacing-025, 0.25rem));
|
|
49
|
+
padding-right: var(--r-tab--padding-right, var(--r-spacing-050, 0.5rem));
|
|
50
|
+
padding-bottom: var(--r-tab--padding-bottom, var(--r-spacing-100, 1rem));
|
|
51
|
+
padding-left: var(--r-tab--padding-left, var(--r-spacing-050, 0.5rem));
|
|
52
|
+
margin-bottom: var(--r-tab--margin-bottom, -1px);
|
|
59
53
|
opacity: var(--r-tab--opacity, 1);
|
|
60
54
|
background: var(--r-tab--background, none);
|
|
61
55
|
color: var(--r-tab--color, var(--r-text-regular, #282828));
|
|
62
56
|
border: var(--r-tab--border, none);
|
|
63
57
|
box-shadow: var(--r-tab--box-shadow, none);
|
|
64
58
|
outline: var(--r-tab--outline, none);
|
|
59
|
+
outline-offset: var(--r-tab--outline-offset, 0);
|
|
65
60
|
}
|
|
66
61
|
.r-tab::after {
|
|
67
62
|
content: var(--r-tab--marker--content, "");
|
|
@@ -71,11 +66,16 @@
|
|
|
71
66
|
bottom: var(--r-tab--marker--bottom, 0);
|
|
72
67
|
left: var(--r-tab--marker--left, 0);
|
|
73
68
|
visibility: var(--r-tab--marker--visibility, hidden);
|
|
74
|
-
background-color: var(--r-tab--marker--background-color,
|
|
69
|
+
background-color: var(--r-tab--marker--background-color, var(--r-border-regular, #282828));
|
|
75
70
|
transition: var(--r-tab--marker--transition, all 0.1s ease-in);
|
|
76
71
|
}
|
|
77
|
-
.r-tab--
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
.r-tab--disabled-icon,
|
|
73
|
+
.r-tab ::slotted([slot=icon]) {
|
|
74
|
+
color: var(--r-tab--icon--color, var(--r-icon-soft, #686868));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (prefers-reduced-motion) {
|
|
78
|
+
.r-tab::after {
|
|
79
|
+
transition: none;
|
|
80
|
+
}
|
|
81
81
|
}
|
|
@@ -22,6 +22,8 @@ export class RTab {
|
|
|
22
22
|
if (this.disabled)
|
|
23
23
|
return;
|
|
24
24
|
switch (event.code) {
|
|
25
|
+
case 'ArrowLeft':
|
|
26
|
+
case 'ArrowRight':
|
|
25
27
|
case 'Space':
|
|
26
28
|
case 'Home':
|
|
27
29
|
case 'End':
|
|
@@ -41,7 +43,9 @@ export class RTab {
|
|
|
41
43
|
'aria-selected': `${active}`,
|
|
42
44
|
'aria-disabled': `${disabled}`
|
|
43
45
|
};
|
|
44
|
-
return (h(Host, Object.assign({ key: '
|
|
46
|
+
return (h(Host, Object.assign({ key: '270a02c942f223ef5ac0f9f83d33c51bfd88c1c7', onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, hostAttrs), h("span", { key: '60bbf17ad69478028579b61d03ca316a55ce52ea', class: "r-tab" }, disabled ?
|
|
47
|
+
h("r-icon", { class: "r-tab--disabled-icon", size: "s", name: "circle-slash" })
|
|
48
|
+
: h("slot", { name: "icon" }), h("slot", { key: '5b0582bebdf14a0de908d23d2a08d80cf1850b50' }))));
|
|
45
49
|
}
|
|
46
50
|
static get is() { return "r-tab"; }
|
|
47
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,7 +12,7 @@ export class RTabPanel {
|
|
|
12
12
|
active,
|
|
13
13
|
'aria-labelledby': tabId
|
|
14
14
|
};
|
|
15
|
-
return (h(Host, Object.assign({ key: '
|
|
15
|
+
return (h(Host, Object.assign({ key: 'f58718704b5625e82bfa531bcbf2b6c94c2e1ae3', class: "r-typography" }, hostAttrs), h("div", { key: '75dc2720b47da749a4d1e168e20338b94724a369', class: "r-tab-panel" }, h("slot", { key: '9710a7fc07751091c4ec0c97ae1d205ae540fdfd' }))));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "r-tab-panel"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -180,23 +180,51 @@ export class RTabs {
|
|
|
180
180
|
history.pushState({ tabId, tabsGroup }, '', url.toString());
|
|
181
181
|
}
|
|
182
182
|
_changeFocusTab(tab, keycode) {
|
|
183
|
-
var _a, _b, _c, _d;
|
|
184
183
|
const tabs = Array.from(this.tabElements).filter(element => !element.disabled);
|
|
185
184
|
const index = tabs.indexOf(tab);
|
|
185
|
+
let nextTab;
|
|
186
186
|
switch (keycode) {
|
|
187
187
|
case 'ArrowLeft':
|
|
188
|
-
index === 0 ?
|
|
188
|
+
nextTab = index === 0 ? tabs[tabs.length - 1] : tabs[index - 1];
|
|
189
189
|
break;
|
|
190
190
|
case 'ArrowRight':
|
|
191
|
-
index === tabs.length - 1 ?
|
|
191
|
+
nextTab = index === tabs.length - 1 ? tabs[0] : tabs[index + 1];
|
|
192
192
|
break;
|
|
193
193
|
case 'Home':
|
|
194
|
-
|
|
194
|
+
nextTab = tabs[0];
|
|
195
195
|
break;
|
|
196
196
|
case 'End':
|
|
197
|
-
|
|
197
|
+
nextTab = tabs[tabs.length - 1];
|
|
198
198
|
break;
|
|
199
199
|
}
|
|
200
|
+
if (nextTab) {
|
|
201
|
+
nextTab.focus();
|
|
202
|
+
this.scrollTabIntoView(nextTab);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
scrollTabIntoView(tab) {
|
|
206
|
+
var _a;
|
|
207
|
+
const tabsList = this.host.querySelector('r-tabs-list');
|
|
208
|
+
if (!tabsList)
|
|
209
|
+
return;
|
|
210
|
+
const container = (_a = tabsList.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.r-tabs-list--tabs-container');
|
|
211
|
+
if (!container)
|
|
212
|
+
return;
|
|
213
|
+
const containerRect = container.getBoundingClientRect();
|
|
214
|
+
const tabRect = tab.getBoundingClientRect();
|
|
215
|
+
// Check if tab is fully visible
|
|
216
|
+
const isFullyVisible = tabRect.left >= containerRect.left - 1 &&
|
|
217
|
+
tabRect.right <= containerRect.right + 1;
|
|
218
|
+
if (isFullyVisible)
|
|
219
|
+
return;
|
|
220
|
+
// Calculate scroll offset to center the tab
|
|
221
|
+
const centerOffset = (tabRect.left - containerRect.left) -
|
|
222
|
+
(containerRect.width / 2) +
|
|
223
|
+
(tabRect.width / 2);
|
|
224
|
+
container.scrollBy({
|
|
225
|
+
left: centerOffset,
|
|
226
|
+
behavior: 'smooth'
|
|
227
|
+
});
|
|
200
228
|
}
|
|
201
229
|
/** Listen for "click" event on `<r-tab>` */
|
|
202
230
|
tabChangeAction(event) {
|
|
@@ -233,7 +261,7 @@ export class RTabs {
|
|
|
233
261
|
this._changeFocusTab(e.target, e.detail.keycode);
|
|
234
262
|
}
|
|
235
263
|
render() {
|
|
236
|
-
return (h(Host, { key: '
|
|
264
|
+
return (h(Host, { key: '0737bf78e596f8fb9d4a2ec10f1503d1072f2683', class: "r-tabs" }, h("slot", { key: '5bc87b17930c9ea159ef29335c6b11f0f4c7d43e' })));
|
|
237
265
|
}
|
|
238
266
|
static get is() { return "r-tabs"; }
|
|
239
267
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,15 +2,56 @@
|
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
:host([variant=compact]) {
|
|
6
|
+
--r-tabs-list--r-tab--margin-right: 0;
|
|
7
|
+
--r-tabs-list--r-tab--flex: 1;
|
|
8
|
+
--r-tab--width: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host([scrollable=true]) {
|
|
12
|
+
--r-tabs-list--tabs-container--margin: -6px 4px ;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([border=branded]) {
|
|
16
|
+
--r-tab--marker--background-color: var(--r-border-brand-vanguard, #527a42);
|
|
17
|
+
}
|
|
18
|
+
|
|
5
19
|
.r-tabs-list {
|
|
6
20
|
display: var(--r-tabs-list--display, flex);
|
|
7
|
-
margin-bottom: var(--r-tabs-list--margin-bottom,
|
|
21
|
+
margin-bottom: var(--r-tabs-list--margin-bottom, var(--r-spacing-250, 2.5rem));
|
|
8
22
|
border-bottom-width: var(--r-tabs-list--border-bottom-width, 1px);
|
|
9
23
|
border-bottom-style: var(--r-tabs-list--border-bottom-style, solid);
|
|
10
24
|
border-bottom-color: var(--r-tabs-list--border-bottom-color, var(--r-border-softer, #c9c9c9));
|
|
11
25
|
}
|
|
26
|
+
.r-tabs-list--scroll-button {
|
|
27
|
+
--r-icon-button--border-radius: var(--r-tabs-list--border-radius, 0);
|
|
28
|
+
--r-icon-button--width: var(--r-tabs-list--scroll-button--width, var(--r-spacing-200, 2rem));
|
|
29
|
+
--r-icon-button--height: var(--r-tabs-list--scroll-button--height, var(--r-spacing-200, 2rem));
|
|
30
|
+
}
|
|
31
|
+
.r-tabs-list--tabs-container {
|
|
32
|
+
display: var(--r-tabs-list--tabs-container--display, flex);
|
|
33
|
+
flex: var(--r-tabs-list--tabs-container--flex, 1);
|
|
34
|
+
overflow: var(--r-tabs-list--tabs-container--overflow, scroll hidden);
|
|
35
|
+
scroll-snap-type: var(--r-tabs-list--tabs-container--scroll-snap-type, x proximity);
|
|
36
|
+
scrollbar-width: var(--r-tabs-list--tabs-container--scrollbar-width, none);
|
|
37
|
+
margin: var(--r-tabs-list--tabs-container--margin, -6px);
|
|
38
|
+
padding: var(--r-tabs-list--tabs-container--padding, 6px);
|
|
39
|
+
}
|
|
40
|
+
.r-tabs-list--scroll-button-container {
|
|
41
|
+
display: var(--r-tabs-list--scroll-button-container--display, flex);
|
|
42
|
+
align-items: var(--r-tabs-list--scroll-button-container--align-items, start);
|
|
43
|
+
gap: var(--r-tabs-list--scroll-button-container--gap, var(--r-spacing-025, 0.25rem));
|
|
44
|
+
}
|
|
45
|
+
.r-tabs-list--scroll-indicator {
|
|
46
|
+
margin-top: var(--r-tabs-list--scroll-indicator--margin, 2px);
|
|
47
|
+
width: var(--r-tabs-list--scroll-button--after--width, 1px);
|
|
48
|
+
height: var(--r-tabs-list--scroll-button--after--height, var(--r-spacing-175, 1.75rem));
|
|
49
|
+
background-color: var(--r-tabs-list----scroll-indicator--background-color, var(--r-border-softer, #c9c9c9));
|
|
50
|
+
z-index: var(--r-tabs-list----scroll-indicator--z-index, 1);
|
|
51
|
+
}
|
|
12
52
|
.r-tabs-list ::slotted(r-tab) {
|
|
13
|
-
margin-right: var(--r-tabs-list--r-tab--margin-right,
|
|
53
|
+
margin-right: var(--r-tabs-list--r-tab--margin-right, var(--r-spacing-250, 2.5rem));
|
|
54
|
+
flex: var(--r-tabs-list--r-tab--flex, none);
|
|
14
55
|
}
|
|
15
56
|
.r-tabs-list ::slotted(r-tab:last-of-type) {
|
|
16
57
|
margin-right: var(--r-tabs-list--r-tab--last-of-type--margin-right, 0);
|