@riverty/web-components 5.3.0 → 5.5.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 +47 -1
- package/custom-elements.json +40 -4
- package/dist/cjs/{index-BnETQtSf.js → index-DJ4H_bFj.js} +382 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/r-accordion-item.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/r-badge.cjs.entry.js +2 -2
- package/dist/cjs/r-button.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/r-design-system-devtools.cjs.entry.js +1 -1
- package/dist/cjs/r-dialog.cjs.entry.js +12 -15
- package/dist/cjs/r-hint_3.cjs.entry.js +5 -5
- package/dist/cjs/r-icon-button.cjs.entry.js +4 -4
- package/dist/cjs/r-icon.cjs.entry.js +1 -1
- package/dist/cjs/r-input-code.cjs.entry.js +24 -8
- package/dist/cjs/r-input-date.cjs.entry.js +29 -8
- package/dist/cjs/r-input-password.cjs.entry.js +16 -5
- package/dist/cjs/r-input-phone-number.cjs.entry.js +58 -20
- package/dist/cjs/r-input.cjs.entry.js +31 -8
- package/dist/cjs/r-list-item.cjs.entry.js +17 -14
- package/dist/cjs/r-pagination.cjs.entry.js +1 -1
- 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 +3 -3
- 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 +6 -6
- package/dist/cjs/r-radio-group.cjs.entry.js +7 -7
- package/dist/cjs/r-select-option.cjs.entry.js +2 -2
- package/dist/cjs/r-select.cjs.entry.js +6 -5
- package/dist/cjs/r-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/r-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/r-stepper.cjs.entry.js +2 -2
- package/dist/cjs/r-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-tab.cjs.entry.js +2 -2
- package/dist/cjs/r-tabs-list.cjs.entry.js +2 -2
- package/dist/cjs/r-tabs.cjs.entry.js +4 -4
- package/dist/cjs/r-textarea.cjs.entry.js +18 -4
- package/dist/cjs/r-toast-group.cjs.entry.js +15 -5
- package/dist/cjs/r-toast.cjs.entry.js +16 -10
- package/dist/cjs/web-components.cjs.js +2 -2
- package/dist/collection/components/badge/badge.css +7 -7
- package/dist/collection/components/dialog/dialog.css +14 -14
- package/dist/collection/components/dialog/dialog.js +27 -13
- package/dist/collection/components/icon-button/icon-button.js +3 -3
- package/dist/collection/components/input/input.css +17 -2
- package/dist/collection/components/input/input.js +48 -6
- package/dist/collection/components/input-code/input-code.css +17 -2
- package/dist/collection/components/input-code/input-code.js +41 -6
- package/dist/collection/components/input-date/input-date.css +13 -2
- package/dist/collection/components/input-date/input-date.js +46 -6
- package/dist/collection/components/input-password/input-password.js +34 -4
- package/dist/collection/components/input-phone-number/input-phone-number.js +79 -18
- package/dist/collection/components/label/label.js +3 -3
- package/dist/collection/components/list-item/list-item/list-item.css +39 -32
- package/dist/collection/components/list-item/list-item/list-item.js +77 -14
- package/dist/collection/components/panel/panel.js +2 -2
- package/dist/collection/components/popover/popover.js +2 -2
- 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 +5 -5
- 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.js +6 -6
- package/dist/collection/components/select/select.js +5 -4
- 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.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.js +2 -2
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tabs/tabs.js +3 -3
- package/dist/collection/components/tabs-list/tabs-list.js +1 -1
- package/dist/collection/components/textarea/textarea.css +52 -21
- package/dist/collection/components/textarea/textarea.js +36 -3
- package/dist/collection/components/toast/toast.css +10 -3
- package/dist/collection/components/toast/toast.js +19 -10
- package/dist/collection/components/toast-group/toast-group.css +14 -13
- package/dist/collection/components/toast-group/toast-group.js +14 -4
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/esm/{index-CTxpqopm.js → index-Da7qOBFr.js} +382 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/r-accordion-item.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/r-badge.entry.js +2 -2
- package/dist/esm/r-button.entry.js +1 -1
- package/dist/esm/r-checkbox-group.entry.js +1 -1
- package/dist/esm/r-checkbox.entry.js +1 -1
- package/dist/esm/r-design-system-devtools.entry.js +1 -1
- package/dist/esm/r-dialog.entry.js +12 -15
- package/dist/esm/r-hint_3.entry.js +5 -5
- package/dist/esm/r-icon-button.entry.js +4 -4
- package/dist/esm/r-icon.entry.js +1 -1
- package/dist/esm/r-input-code.entry.js +24 -8
- package/dist/esm/r-input-date.entry.js +29 -8
- package/dist/esm/r-input-password.entry.js +16 -5
- package/dist/esm/r-input-phone-number.entry.js +58 -20
- package/dist/esm/r-input.entry.js +31 -8
- package/dist/esm/r-list-item.entry.js +17 -14
- package/dist/esm/r-pagination.entry.js +1 -1
- 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 +3 -3
- 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 +6 -6
- package/dist/esm/r-radio-group.entry.js +7 -7
- package/dist/esm/r-select-option.entry.js +2 -2
- package/dist/esm/r-select.entry.js +6 -5
- package/dist/esm/r-skip-link.entry.js +2 -2
- package/dist/esm/r-stepper-item.entry.js +3 -3
- package/dist/esm/r-stepper.entry.js +2 -2
- package/dist/esm/r-tab-panel.entry.js +2 -2
- package/dist/esm/r-tab.entry.js +2 -2
- package/dist/esm/r-tabs-list.entry.js +2 -2
- package/dist/esm/r-tabs.entry.js +4 -4
- package/dist/esm/r-textarea.entry.js +18 -4
- package/dist/esm/r-toast-group.entry.js +15 -5
- package/dist/esm/r-toast.entry.js +16 -10
- package/dist/esm/web-components.js +3 -3
- package/dist/types/components/dialog/dialog.d.ts +7 -1
- package/dist/types/components/input/input.d.ts +7 -0
- package/dist/types/components/input-code/input-code.d.ts +6 -0
- package/dist/types/components/input-date/input-date.d.ts +6 -0
- package/dist/types/components/input-password/input-password.d.ts +5 -0
- package/dist/types/components/input-phone-number/input-phone-number.d.ts +7 -0
- package/dist/types/components/list-item/list-item/list-item.d.ts +16 -3
- package/dist/types/components/textarea/textarea.d.ts +8 -1
- package/dist/types/components/toast/toast.d.ts +6 -0
- package/dist/types/components/toast-group/toast-group.d.ts +2 -0
- package/dist/types/components.d.ts +101 -8
- package/dist/web-components/p-00ca474f.entry.js +1 -0
- package/dist/web-components/p-00eb6986.entry.js +1 -0
- package/dist/web-components/{p-a45fd808.entry.js → p-0735fd75.entry.js} +1 -1
- package/dist/web-components/{p-7545038f.entry.js → p-0bb04d79.entry.js} +1 -1
- package/dist/web-components/{p-ef0f43e0.entry.js → p-0f4eea22.entry.js} +1 -1
- package/dist/web-components/{p-4cf01f30.entry.js → p-1c2497de.entry.js} +1 -1
- package/dist/web-components/p-2265dae1.entry.js +1 -0
- package/dist/web-components/{p-03ff9abf.entry.js → p-230e44ae.entry.js} +1 -1
- package/dist/web-components/{p-4dae8c19.entry.js → p-24bbf3b6.entry.js} +1 -1
- package/dist/web-components/p-28718c50.entry.js +1 -0
- package/dist/web-components/{p-59aa588e.entry.js → p-2b2f581a.entry.js} +1 -1
- package/dist/web-components/p-3b4e3faf.entry.js +1 -0
- package/dist/web-components/p-3bc93d65.entry.js +1 -0
- package/dist/web-components/{p-8968ddf6.entry.js → p-429213ea.entry.js} +1 -1
- package/dist/web-components/{p-c60294d4.entry.js → p-43eff76a.entry.js} +1 -1
- package/dist/web-components/{p-87bb4b91.entry.js → p-44ae9f33.entry.js} +1 -1
- package/dist/web-components/{p-806b173d.entry.js → p-4652635a.entry.js} +1 -1
- package/dist/web-components/{p-832dca22.entry.js → p-4bd3e077.entry.js} +1 -1
- package/dist/web-components/{p-512d3a60.entry.js → p-4e3df002.entry.js} +1 -1
- package/dist/web-components/p-51a5804b.entry.js +1 -0
- package/dist/web-components/{p-a81a67da.entry.js → p-72fa1fd1.entry.js} +1 -1
- package/dist/web-components/{p-5bc9fe5e.entry.js → p-755cc697.entry.js} +1 -1
- package/dist/web-components/{p-e74c363a.entry.js → p-77155630.entry.js} +1 -1
- package/dist/web-components/{p-77335ae7.entry.js → p-7fccc301.entry.js} +1 -1
- package/dist/web-components/{p-651522b6.entry.js → p-85a9af42.entry.js} +1 -1
- package/dist/web-components/{p-24130cdb.entry.js → p-87f39749.entry.js} +1 -1
- package/dist/web-components/{p-c9b2389b.entry.js → p-89136369.entry.js} +1 -1
- package/dist/web-components/p-8c577cda.entry.js +1 -0
- package/dist/web-components/{p-6b7d5236.entry.js → p-99ba15d9.entry.js} +1 -1
- package/dist/web-components/{p-d35303a6.entry.js → p-9eb1f262.entry.js} +1 -1
- package/dist/web-components/p-Da7qOBFr.js +2 -0
- package/dist/web-components/p-a022f356.entry.js +1 -0
- package/dist/web-components/p-a58124c4.entry.js +1 -0
- package/dist/web-components/{p-8d2f4097.entry.js → p-a683612d.entry.js} +1 -1
- package/dist/web-components/{p-9891afb8.entry.js → p-a7e7f8fa.entry.js} +1 -1
- package/dist/web-components/p-ad4292d8.entry.js +1 -0
- package/dist/web-components/p-c09a863b.entry.js +1 -0
- package/dist/web-components/{p-26e4816a.entry.js → p-c7f8e59b.entry.js} +1 -1
- package/dist/web-components/{p-f625b739.entry.js → p-c937bd92.entry.js} +1 -1
- package/dist/web-components/p-cbcd7699.entry.js +1 -0
- package/dist/web-components/p-e0e2f2b2.entry.js +1 -0
- package/dist/web-components/{p-0930ee1d.entry.js → p-e49b1ec3.entry.js} +1 -1
- package/dist/web-components/p-e4b66277.entry.js +1 -0
- package/dist/web-components/p-e6a31881.entry.js +1 -0
- package/dist/web-components/p-f1e22caa.entry.js +1 -0
- package/dist/web-components/{p-5dd43433.entry.js → p-f22696e0.entry.js} +1 -1
- package/dist/web-components/p-f6a92287.entry.js +1 -0
- package/dist/web-components/p-f7adb875.entry.js +1 -0
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/web-components/p-0bd10e93.entry.js +0 -1
- package/dist/web-components/p-15d10c68.entry.js +0 -1
- package/dist/web-components/p-1cfa9a0e.entry.js +0 -1
- package/dist/web-components/p-23ff25a1.entry.js +0 -1
- package/dist/web-components/p-50f01d6b.entry.js +0 -1
- package/dist/web-components/p-547fc56c.entry.js +0 -1
- package/dist/web-components/p-5cd1ad6a.entry.js +0 -1
- package/dist/web-components/p-73adec9b.entry.js +0 -1
- package/dist/web-components/p-8388221b.entry.js +0 -1
- package/dist/web-components/p-8cc4be0c.entry.js +0 -1
- package/dist/web-components/p-90d390f4.entry.js +0 -1
- package/dist/web-components/p-98628a15.entry.js +0 -1
- package/dist/web-components/p-9f583ed1.entry.js +0 -1
- package/dist/web-components/p-CTxpqopm.js +0 -2
- package/dist/web-components/p-aff51d37.entry.js +0 -1
- package/dist/web-components/p-b07be088.entry.js +0 -1
- package/dist/web-components/p-b5c8e978.entry.js +0 -1
- package/dist/web-components/p-d6ef5fff.entry.js +0 -1
- package/dist/web-components/p-dfd8bed6.entry.js +0 -1
- package/dist/web-components/p-e138c70a.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class RTabsList {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '323b36e7d276c42c72764c34f2564153d80b64d2', role: "tablist" }, h("div", { key: 'bab777186d6d538c6f541e08bda090ab228f38d3', class: "r-tabs-list" }, h("slot", { key: '60a0d80ba3ada9d218ca8058cdcdf720277e19d0' }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "r-tabs-list"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
:host([invalid]:not([invalid=false])) {
|
|
37
|
-
--r-textarea--
|
|
38
|
-
--r-textarea--
|
|
37
|
+
--r-textarea--container--background-color: var(--r-status-error-soft, #fef6f6);
|
|
38
|
+
--r-textarea--container--border-color: var(--r-status-error-regular, #da1e28);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.r-textarea--label-container {
|
|
@@ -52,26 +52,11 @@
|
|
|
52
52
|
margin-right: var(--r-textarea--popover--margin-right, -0.25rem);
|
|
53
53
|
--r-popover--trigger--min-width: var(--r-textarea--popover-trigger--min-width, var(--r-spacing-150, 1.5));
|
|
54
54
|
}
|
|
55
|
-
.r-textarea--input:hover:not([disabled]:not([disabled=false])) {
|
|
56
|
-
--r-textarea--input--background-color: var(--r-background-interactive-hovered);
|
|
57
|
-
}
|
|
58
|
-
.r-textarea--input:active:not([disabled]:not([disabled=false])) {
|
|
59
|
-
--r-textarea--input--background-color: var(--r-background-interactive-pressed);
|
|
60
|
-
}
|
|
61
|
-
.r-textarea--input:focus-visible {
|
|
62
|
-
--r-textarea--input--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
|
|
63
|
-
--r-textarea--input--outline: 2px solid var(--r-border-focused, #0071e3);
|
|
64
|
-
--r-textarea--input--outline-offset: 2px;
|
|
65
|
-
}
|
|
66
55
|
.r-textarea--input::placeholder {
|
|
67
56
|
color: var(--r-textarea--input--placeholder--color, var(--r-text-soft, #686868));
|
|
68
57
|
}
|
|
69
|
-
.r-textarea--input[disabled]:not([disabled=false]), .r-textarea--input[disabled]:not([disabled=false]):hover {
|
|
70
|
-
--r-textarea--input--opacity: 0.4;
|
|
71
|
-
--r-textarea--input--cursor: not-allowed;
|
|
72
|
-
--r-textarea--input--pointer-events: none;
|
|
73
|
-
}
|
|
74
58
|
.r-textarea--input {
|
|
59
|
+
vertical-align: top;
|
|
75
60
|
width: var(--r-textarea--input--width, 100%);
|
|
76
61
|
max-width: var(--r-textarea--input--max-width, 100%);
|
|
77
62
|
min-height: var(--r-textarea--input--min-height, 8.875em);
|
|
@@ -80,16 +65,16 @@
|
|
|
80
65
|
font-size: var(--r-textarea--input--font-size, var(--r-font-size-400, 1rem));
|
|
81
66
|
line-height: var(--r-textarea--input--line-height, var(--r-line-height-m, 1.5));
|
|
82
67
|
color: var(--r-textarea--input--color, var(--r-text-regular, #282828));
|
|
83
|
-
background-color: var(--r-textarea--input--background-color,
|
|
68
|
+
background-color: var(--r-textarea--input--background-color, transparent);
|
|
84
69
|
opacity: var(--r-textarea--input--opacity, 1);
|
|
85
|
-
border-width: var(--r-textarea--input--border-width,
|
|
70
|
+
border-width: var(--r-textarea--input--border-width, 0px);
|
|
86
71
|
border-style: var(--r-textarea--input--border-style, solid);
|
|
87
72
|
border-color: var(--r-textarea--input--border-color, var(--r-border-soft, #686868));
|
|
88
73
|
border-radius: var(--r-textarea--input--border-radius, 0);
|
|
89
74
|
box-sizing: var(--r-textarea--input--box-sizing, border-box);
|
|
90
75
|
box-shadow: var(--r-textarea--input--box-shadow, none);
|
|
91
76
|
padding: var(--r-textarea--input--padding, var(--r-textarea--input--padding-top, 0.688em) var(--r-textarea--input--padding-right, 0.625em) var(--r-textarea--input--padding-bottom, 0.688em) var(--r-textarea--input--padding-left, 0.625em));
|
|
92
|
-
margin-top: var(--r-textarea--input--margin-top,
|
|
77
|
+
margin-top: var(--r-textarea--input--margin-top, 0);
|
|
93
78
|
resize: var(--r-textarea--input--resize, both);
|
|
94
79
|
z-index: var(--r-textarea--input--z-index, 1);
|
|
95
80
|
outline: var(--r-textarea--input--outline, none);
|
|
@@ -97,6 +82,49 @@
|
|
|
97
82
|
pointer-events: var(--r-textarea--input--pointer-events, auto);
|
|
98
83
|
cursor: var(--r-textarea--input--cursor, inherit);
|
|
99
84
|
}
|
|
85
|
+
.r-textarea--container {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: start;
|
|
88
|
+
overflow: visible;
|
|
89
|
+
background-color: var(--r-textarea--container--background-color, var(--r-background-interactive-softest, #f7f7f7));
|
|
90
|
+
border-width: var(--r-textarea--container--border-width, 1px);
|
|
91
|
+
border-style: var(--r-textarea--container--border-style, solid);
|
|
92
|
+
border-color: var(--r-textarea--container--border-color, var(--r-border-soft, #686868));
|
|
93
|
+
padding: var(--r-textarea--container--padding, 0);
|
|
94
|
+
margin-top: var(--r-textarea--container--margin-top, var(--r-spacing-025, 0.25rem));
|
|
95
|
+
box-shadow: var(--r-textarea--container--box-shadow, none);
|
|
96
|
+
outline: var(--r-textarea--container--outline, none);
|
|
97
|
+
outline-offset: var(--r-textarea--container--outline-offset, none);
|
|
98
|
+
}
|
|
99
|
+
.r-textarea--container[data-readonly=true] {
|
|
100
|
+
--r-textarea--container--background-color: var(--r-background-soft, #f3f1f0);
|
|
101
|
+
--r-textarea--container--border-color: transparent transparent var(--r-border-soft, #686868) transparent;
|
|
102
|
+
--r-textarea--container--cursor: text;
|
|
103
|
+
}
|
|
104
|
+
.r-textarea--container:hover:not([data-disabled=true]):not([data-readonly=true]) {
|
|
105
|
+
--r-textarea--container--background-color: var(--r-background-interactive-hovered);
|
|
106
|
+
}
|
|
107
|
+
.r-textarea--container:active:not([data-disabled=true]):not([data-readonly=true]) {
|
|
108
|
+
--r-textarea--container--background-color: var(--r-background-interactive-pressed);
|
|
109
|
+
}
|
|
110
|
+
.r-textarea--container:focus-within {
|
|
111
|
+
--r-textarea--container--box-shadow: 0 0 0 6px var(--r-border-focused-outlined, #fff);
|
|
112
|
+
--r-textarea--container--outline: 2px solid var(--r-border-focused, #0071e3);
|
|
113
|
+
--r-textarea--container--outline-offset: 2px;
|
|
114
|
+
}
|
|
115
|
+
.r-textarea--trailing {
|
|
116
|
+
display: var(--r-textarea--trailing--display, flex);
|
|
117
|
+
margin-top: var(--r-textarea--trailing--margin-top, 0.688em);
|
|
118
|
+
margin-right: var(--r-textarea--trailing--margin-right, 0.625em);
|
|
119
|
+
margin-left: var(--r-textarea--trailing--margin-left, auto);
|
|
120
|
+
gap: var(--r-textarea--trailing--gap, 0.625rem);
|
|
121
|
+
}
|
|
122
|
+
.r-textarea--trailing:empty {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
125
|
+
.r-textarea--readonly-icon {
|
|
126
|
+
color: var(--r-textarea--readonly-icon--color, var(--r-icon-soft, #686868));
|
|
127
|
+
}
|
|
100
128
|
.r-textarea--messages {
|
|
101
129
|
display: flex;
|
|
102
130
|
gap: var(--r-textarea--messages--gap, var(--r-spacing-025, 0.25rem));
|
|
@@ -104,6 +132,9 @@
|
|
|
104
132
|
.r-textarea--messages--counter {
|
|
105
133
|
margin-left: auto;
|
|
106
134
|
}
|
|
135
|
+
.r-textarea--messages:has(r-hint) {
|
|
136
|
+
margin-top: var(--r-spacing-025, 0.25rem);
|
|
137
|
+
}
|
|
107
138
|
|
|
108
139
|
.visually-hidden {
|
|
109
140
|
position: absolute;
|
|
@@ -29,6 +29,8 @@ export class RTextarea {
|
|
|
29
29
|
/** Unique id */
|
|
30
30
|
this.uniqueId = `r-textarea-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
31
31
|
this.onInput = event => {
|
|
32
|
+
if (this.readonly)
|
|
33
|
+
return;
|
|
32
34
|
this.value = event.target.value;
|
|
33
35
|
this.validateFormElement(this.nativeElement);
|
|
34
36
|
const { host, value } = this;
|
|
@@ -41,6 +43,8 @@ export class RTextarea {
|
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
45
|
this.onChange = event => {
|
|
46
|
+
if (this.readonly)
|
|
47
|
+
return;
|
|
44
48
|
this.value = event.target.value;
|
|
45
49
|
this.validateFormElement(this.nativeElement);
|
|
46
50
|
const { host, value } = this;
|
|
@@ -56,6 +60,8 @@ export class RTextarea {
|
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
62
|
this.onResetForm = () => {
|
|
63
|
+
if (this.readonly)
|
|
64
|
+
return;
|
|
59
65
|
// Return to initial state
|
|
60
66
|
this.validityState = null;
|
|
61
67
|
this.validityMessage = null;
|
|
@@ -99,6 +105,8 @@ export class RTextarea {
|
|
|
99
105
|
}
|
|
100
106
|
/** Sets the value of the element. */
|
|
101
107
|
async setValue(value) {
|
|
108
|
+
if (this.readonly)
|
|
109
|
+
return;
|
|
102
110
|
this.value = value;
|
|
103
111
|
}
|
|
104
112
|
/** Gets the value of the element. */
|
|
@@ -107,6 +115,8 @@ export class RTextarea {
|
|
|
107
115
|
}
|
|
108
116
|
/** Resets value and validity state to initial. */
|
|
109
117
|
async reset() {
|
|
118
|
+
if (this.readonly)
|
|
119
|
+
return;
|
|
110
120
|
this.validityState = null;
|
|
111
121
|
this.validityMessage = null;
|
|
112
122
|
this.value = this.initial['value'];
|
|
@@ -173,6 +183,9 @@ export class RTextarea {
|
|
|
173
183
|
this.novalidate ||
|
|
174
184
|
false);
|
|
175
185
|
}
|
|
186
|
+
get hasTrailingSlot() {
|
|
187
|
+
return !!this.host.querySelector('[slot="trailing"]');
|
|
188
|
+
}
|
|
176
189
|
get textareaSlotValue() {
|
|
177
190
|
return this.host.textContent;
|
|
178
191
|
}
|
|
@@ -199,7 +212,7 @@ export class RTextarea {
|
|
|
199
212
|
this.disconnectFormEventListeners();
|
|
200
213
|
}
|
|
201
214
|
render() {
|
|
202
|
-
const { name, rows, cols, placeholder, required, showCounter, maxlength, minlength, form, value, disabled, resize, hint, invalid, label, uniqueId, fieldIndicator, tooltip, tooltipIcon, tooltipIconColor } = this;
|
|
215
|
+
const { name, rows, cols, placeholder, required, showCounter, maxlength, minlength, form, value, disabled, resize, hint, invalid, label, uniqueId, fieldIndicator, tooltip, tooltipIcon, tooltipIconColor, readonly } = this;
|
|
203
216
|
const textareaAttrs = {
|
|
204
217
|
name,
|
|
205
218
|
rows,
|
|
@@ -212,6 +225,7 @@ export class RTextarea {
|
|
|
212
225
|
value,
|
|
213
226
|
disabled,
|
|
214
227
|
resize,
|
|
228
|
+
readonly,
|
|
215
229
|
id: uniqueId,
|
|
216
230
|
'aria-describedby': this.ariaDescribedBy,
|
|
217
231
|
'aria-invalid': `${!!invalid}`,
|
|
@@ -235,7 +249,7 @@ export class RTextarea {
|
|
|
235
249
|
}, {});
|
|
236
250
|
return (h(Host, null, h("div", { class: "r-textarea--label-container" }, h("label", { htmlFor: uniqueId }, label &&
|
|
237
251
|
h("r-label", Object.assign({ id: `${uniqueId}-label` }, labelAttr), label)), h("slot", { name: "popover" })), hint &&
|
|
238
|
-
h("r-hint", { id: `${uniqueId}-hint`, role: "note" }, hint), h("textarea", Object.assign({ class: "r-textarea--input" }, textareaAttrs, eventListeners, { ref: el => this.nativeElement = el, onChange: this.onChange, onInput: this.onInput })), h("div", { class: "r-textarea--messages" }, h("r-hint", { "aria-live": "polite", "aria-atomic": "true", id: `${uniqueId}-message`, class: !this.hasMessage && 'visually-hidden', variant: invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage), this.hasValidationSuccess && this.validMessage), showCounter && h("r-hint", { "aria-hidden": true, class: "r-textarea--messages--counter" }, value.length
|
|
252
|
+
h("r-hint", { id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { class: "r-textarea--container", "data-disabled": `${!!disabled}`, "data-readonly": `${!!readonly}` }, h("textarea", Object.assign({ class: "r-textarea--input" }, textareaAttrs, eventListeners, { ref: el => this.nativeElement = el, onChange: this.onChange, onInput: this.onInput })), h("div", { class: "r-textarea--trailing" }, this.readonly && h("r-icon", { class: "r-textarea--readonly-icon", name: "pen-disabled", size: "s" }), this.hasTrailingSlot && h("slot", { name: "trailing" }))), h("div", { class: "r-textarea--messages" }, h("r-hint", { "aria-live": "polite", "aria-atomic": "true", id: `${uniqueId}-message`, class: !this.hasMessage && 'visually-hidden', variant: invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage), this.hasValidationSuccess && this.validMessage), showCounter && h("r-hint", { "aria-hidden": true, class: "r-textarea--messages--counter" }, `${value.length}${maxlength ? '/' : ''}${maxlength}`), maxlength &&
|
|
239
253
|
h("div", { class: "visually-hidden", ref: el => this.characterLimitReachedAlert = el, "aria-live": "assertive" }))));
|
|
240
254
|
}
|
|
241
255
|
static get is() { return "r-textarea"; }
|
|
@@ -432,6 +446,25 @@ export class RTextarea {
|
|
|
432
446
|
"setter": false,
|
|
433
447
|
"reflect": false
|
|
434
448
|
},
|
|
449
|
+
"readonly": {
|
|
450
|
+
"type": "boolean",
|
|
451
|
+
"attribute": "readonly",
|
|
452
|
+
"mutable": false,
|
|
453
|
+
"complexType": {
|
|
454
|
+
"original": "boolean",
|
|
455
|
+
"resolved": "boolean",
|
|
456
|
+
"references": {}
|
|
457
|
+
},
|
|
458
|
+
"required": false,
|
|
459
|
+
"optional": true,
|
|
460
|
+
"docs": {
|
|
461
|
+
"tags": [],
|
|
462
|
+
"text": "Indicates whether the `<textarea>` is read-only, allowing focus and text selection\nwhile preventing the user from modifying its value."
|
|
463
|
+
},
|
|
464
|
+
"getter": false,
|
|
465
|
+
"setter": false,
|
|
466
|
+
"reflect": true
|
|
467
|
+
},
|
|
435
468
|
"hint": {
|
|
436
469
|
"type": "string",
|
|
437
470
|
"attribute": "hint",
|
|
@@ -521,7 +554,7 @@ export class RTextarea {
|
|
|
521
554
|
"optional": true,
|
|
522
555
|
"docs": {
|
|
523
556
|
"tags": [],
|
|
524
|
-
"text": "Specifies if the character counter should be visible."
|
|
557
|
+
"text": "Specifies if the character counter should be visible.\n\nNote: The counter will only be rendered when a `maxlength` value is provided."
|
|
525
558
|
},
|
|
526
559
|
"getter": false,
|
|
527
560
|
"setter": false,
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
--r-toast--content--margin-top: var(--r-spacing-050, 0.5rem);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
:host([
|
|
33
|
+
:host([data-visually-hidden=true]) {
|
|
34
34
|
--r-toast--host--transition: all 0.15s;
|
|
35
35
|
--r-toast--host--transition-delay: 0.15s;
|
|
36
36
|
--r-toast--host--opacity: 0;
|
|
@@ -82,6 +82,12 @@
|
|
|
82
82
|
:host .r-toast--trailing-button:active {
|
|
83
83
|
--r-button--transform: scale(0.94);
|
|
84
84
|
}
|
|
85
|
+
@media (prefers-reduced-motion) {
|
|
86
|
+
:host {
|
|
87
|
+
--r-toast--transition: none;
|
|
88
|
+
--r-toast--host--animation-name: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
85
91
|
|
|
86
92
|
.r-toast {
|
|
87
93
|
font-family: var(--r-toast--font-family, var(--r-font-family-text, system-ui));
|
|
@@ -90,7 +96,7 @@
|
|
|
90
96
|
flex-direction: var(--r-toast--flex-direction, row);
|
|
91
97
|
align-items: var(--r-toast--align-items, stretch);
|
|
92
98
|
gap: var(--r-toast--gap, var(--r-spacing-075, 0.75rem));
|
|
93
|
-
padding: var(--r-toast--padding,
|
|
99
|
+
padding: var(--r-toast--padding, 16px);
|
|
94
100
|
border-width: var(--r-toast--border-width, 1px);
|
|
95
101
|
border-style: var(--r-toast--border-style, solid);
|
|
96
102
|
border-color: var(--r-toast--border-color, var(--r-status-info-regular, #466882));
|
|
@@ -103,12 +109,13 @@
|
|
|
103
109
|
}
|
|
104
110
|
.r-toast--leading-icon {
|
|
105
111
|
color: var(--r-toast--leading-icon--color, var(--r-status-info-regular, #466882));
|
|
106
|
-
margin-top: var(--r-toast--leading-icon--margin-top, 0
|
|
112
|
+
margin-top: var(--r-toast--leading-icon--margin-top, 0);
|
|
107
113
|
}
|
|
108
114
|
.r-toast--headline {
|
|
109
115
|
color: var(--r-toast--headline--color, var(--r-text-regular, #282828));
|
|
110
116
|
font-size: var(--r-toast--headline--font-size, var(--r-font-size-400, 1rem));
|
|
111
117
|
font-weight: var(--r-toast--headline--font-weight, var(--r-font-weight-semibold, 600));
|
|
118
|
+
line-height: var(--r-toast--headline--line-height, 1);
|
|
112
119
|
margin: var(--r-toast--headline--margin, 0);
|
|
113
120
|
}
|
|
114
121
|
.r-toast--content {
|
|
@@ -22,6 +22,12 @@ export class Toast {
|
|
|
22
22
|
* @default 3000
|
|
23
23
|
*/
|
|
24
24
|
this.delay = 3000;
|
|
25
|
+
/**
|
|
26
|
+
* Defines the behavior of the component's dismissing.
|
|
27
|
+
* - `auto`: The component will be dismissed automatically after number of ms set by `delay` property.
|
|
28
|
+
* - `manual`: The component requires explicit user action to close.
|
|
29
|
+
* @default "auto"
|
|
30
|
+
*/
|
|
25
31
|
this.dismissMode = 'auto';
|
|
26
32
|
/** Provides content for `aria-label` attribute of the dismiss button. */
|
|
27
33
|
this.dismissLabel = 'Dismiss the toast';
|
|
@@ -152,14 +158,14 @@ export class Toast {
|
|
|
152
158
|
name: trailingIcon,
|
|
153
159
|
size: 'm'
|
|
154
160
|
};
|
|
155
|
-
return (h(Host, { key: '
|
|
156
|
-
h("div", { key: '
|
|
157
|
-
h("h2", { key: '
|
|
158
|
-
h("div", { key: '
|
|
159
|
-
h("div", { key: '
|
|
160
|
-
h("a", Object.assign({ key: '
|
|
161
|
-
h("div", { key: '
|
|
162
|
-
h("r-icon-button", Object.assign({ key: '
|
|
161
|
+
return (h(Host, { key: 'd89f4e9245d32cd1f622beed7c053442c1977e7f', id: this.uniqueId, role: "alert", "aria-live": `${this.isError ? 'assertive' : 'polite'}`, "data-visually-hidden": `${this.isOpen ? 'false' : 'true'}` }, h("div", { key: '5292d419fa8122136b8694a47140418a2c3bbf1c', class: "r-toast" }, this.hasLeading &&
|
|
162
|
+
h("div", { key: '39d348a25e1dffb2c0dc6c550d94e0ee5a791089', class: "r-toast--leading" }, this.hasLeadingSlot && h("slot", { key: '92693e79818ea57423bd56364bad96c4e85a8fb7', name: "leading" }), this.hasLeadingIcon && h("r-icon", Object.assign({ key: 'a6c8491b3bf1af387c228ab110775d380dc33afd', class: "r-toast--leading-icon" }, leadingIconAttrs))), h("div", { key: '78e914e294adb359116045937146caaf9f82b4e6', class: "r-toast--main" }, this.hasHeadline &&
|
|
163
|
+
h("h2", { key: 'f33e94e74a2f93dc7bfb28f83120d79f07d3b254', class: "r-toast--headline" }, h("slot", { key: '3e61d7eb3b319dd00205bd010074edd1f2f809ba', name: "headline" }, headline)), this.hasContent &&
|
|
164
|
+
h("div", { key: '6d098697465a8c84c5dca4abcf5b7eab04ff4a23', class: "r-toast--content r-typography" }, h("slot", { key: '8ad7f7ce97edcbd601a7e08b48a2cd766d32e8bf', onSlotchange: this.handleSlotChange })), this.hasAction &&
|
|
165
|
+
h("div", { key: '7b0df2b4f747b7436ddaa34c87b876d5d8023921', class: "r-toast--action" }, h("slot", { key: '9811a95fc1261f7565d31b2a54ca97a9a36ec236', name: "action" }, this.hasActionLink &&
|
|
166
|
+
h("a", Object.assign({ key: 'bbbd7f3f63da45f374d40152269fe68b359e298d', class: "r-toast--action-link" }, actionAttrs), action)))), this.hasTrailing &&
|
|
167
|
+
h("div", { key: '6a000a3e1e6dfbbbfe83b64ad550b39df030bef3', class: "r-toast--trailing" }, this.hasTrailingSlot && h("slot", { key: '90ab154036ef2206394d1c43ad48a4973eec520f', name: "trailing" }), this.isDismissManual &&
|
|
168
|
+
h("r-icon-button", Object.assign({ key: '1433d0151fb3673d98b51f476e8bbe43d8f7ebd6' }, trailingIconAttrs, { class: "r-toast--trailing-button", onClick: this.handleTrailingButtonClick, "aria-label": this.dismissLabel }), h("slot", { key: 'c47c59fbc4097fdaf4f3a4f27beab833dcef4f0e', name: "dismiss" }))))));
|
|
163
169
|
}
|
|
164
170
|
static get is() { return "r-toast"; }
|
|
165
171
|
static get encapsulation() { return "shadow"; }
|
|
@@ -405,8 +411,11 @@ export class Toast {
|
|
|
405
411
|
"required": false,
|
|
406
412
|
"optional": false,
|
|
407
413
|
"docs": {
|
|
408
|
-
"tags": [
|
|
409
|
-
|
|
414
|
+
"tags": [{
|
|
415
|
+
"name": "default",
|
|
416
|
+
"text": "\"auto\""
|
|
417
|
+
}],
|
|
418
|
+
"text": "Defines the behavior of the component's dismissing.\n- `auto`: The component will be dismissed automatically after number of ms set by `delay` property.\n- `manual`: The component requires explicit user action to close."
|
|
410
419
|
},
|
|
411
420
|
"getter": false,
|
|
412
421
|
"setter": false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@media (max-width:
|
|
1
|
+
@media (max-width: 48rem) {
|
|
2
2
|
:host {
|
|
3
3
|
--width: auto;
|
|
4
4
|
--right: 24px;
|
|
@@ -7,12 +7,19 @@
|
|
|
7
7
|
--padding-right: 0;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
:host([
|
|
11
|
-
|
|
10
|
+
:host([data-visually-hidden=true]) {
|
|
11
|
+
position: absolute;
|
|
12
|
+
width: 1px;
|
|
13
|
+
height: 1px;
|
|
14
|
+
padding: 0;
|
|
15
|
+
margin: -1px;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
clip: rect(0, 0, 0, 0);
|
|
18
|
+
border: 0;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
:host {
|
|
15
|
-
display: var(--display,
|
|
22
|
+
display: var(--display, block);
|
|
16
23
|
position: var(--position, fixed);
|
|
17
24
|
top: var(--top, 32px);
|
|
18
25
|
right: var(--right, 0);
|
|
@@ -30,13 +37,7 @@
|
|
|
30
37
|
.r-toast-group {
|
|
31
38
|
position: relative;
|
|
32
39
|
display: var(--r-toast-group--display, flex);
|
|
33
|
-
flex-direction: var(--r-toast-group--flex-direction, column
|
|
34
|
-
justify-content: var(--r-toast-group--justify-content, flex-
|
|
35
|
-
gap: var(--r-toast-group--gap,
|
|
36
|
-
}
|
|
37
|
-
.r-toast-group ::slotted(r-toast[aria-hidden=true]) {
|
|
38
|
-
--animation-name: slideOut;
|
|
39
|
-
}
|
|
40
|
-
.r-toast-group ::slotted(r-toast[aria-hidden=false]) {
|
|
41
|
-
--animation-name: slideIn;
|
|
40
|
+
flex-direction: var(--r-toast-group--flex-direction, column);
|
|
41
|
+
justify-content: var(--r-toast-group--justify-content, flex-start);
|
|
42
|
+
gap: var(--r-toast-group--gap, var(--r-spacing-100, 1rem));
|
|
42
43
|
}
|
|
@@ -2,20 +2,30 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
export class ToastGroup {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.updateHiddenState = () => {
|
|
5
|
-
this.host.setAttribute('
|
|
5
|
+
this.host.setAttribute('data-visually-hidden', `${!this.hasChildren}`);
|
|
6
|
+
};
|
|
7
|
+
this.observeSlotContentChange = () => {
|
|
8
|
+
this.observer = new MutationObserver(() => {
|
|
9
|
+
this.updateHiddenState();
|
|
10
|
+
});
|
|
11
|
+
this.observer.observe(this.host, {
|
|
12
|
+
childList: true,
|
|
13
|
+
subtree: true
|
|
14
|
+
});
|
|
6
15
|
};
|
|
7
16
|
}
|
|
8
17
|
get hasChildren() {
|
|
9
|
-
return this.host.
|
|
18
|
+
return this.host.querySelectorAll('r-toast').length > 0;
|
|
10
19
|
}
|
|
11
20
|
componentWillLoad() {
|
|
12
21
|
this.updateHiddenState();
|
|
22
|
+
this.observeSlotContentChange();
|
|
13
23
|
}
|
|
14
24
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '95e0b29bb1b6a45aabb4e7f5da283997c6b707a8' }, h("div", { key: '4b42e40646381d78f2b812f483ea993992ec7f12', class: "r-toast-group" }, h("slot", { key: 'db3cca9551652a78d9c1579532894fc86ca02b73' }))));
|
|
16
26
|
}
|
|
17
27
|
static get is() { return "r-toast-group"; }
|
|
18
|
-
static get encapsulation() { return "
|
|
28
|
+
static get encapsulation() { return "scoped"; }
|
|
19
29
|
static get originalStyleUrls() {
|
|
20
30
|
return {
|
|
21
31
|
"$": ["toast-group.css"]
|
|
@@ -253,7 +253,7 @@ export class Tooltip {
|
|
|
253
253
|
role: 'tooltip',
|
|
254
254
|
'aria-hidden': `${!isShown}`
|
|
255
255
|
};
|
|
256
|
-
return (h(Host, Object.assign({ key: '
|
|
256
|
+
return (h(Host, Object.assign({ key: 'e168f9f1212433eb17769c11260f546e441ca274' }, hostAttrs, { onMouseenter: this.handleHover, onMouseleave: this.removeTooltip }), h("div", { key: 'b8ea713c2b09b6053af73ac7d26a30f210c90e94', class: "r-tooltip" }, h("div", Object.assign({ key: '19cc679ec640dc98f167077e0bab16423e186258', class: "r-tooltip--trigger", onFocus: this.handleFocus, onBlur: this.removeTooltip }, triggerAttrs), h("slot", { key: '17266fefef386f3b417d8e7d112e0345aa98e878' })), h("div", Object.assign({ key: 'e53283c02be43833362277fc8fe78e99c4a9adba', class: "r-tooltip--content" }, contentAttrs), text), h("div", { key: '98f1caf44ec7bd286cb8126022692d825f4ab617', class: "r-tooltip--arrow" }))));
|
|
257
257
|
}
|
|
258
258
|
static get is() { return "r-tooltip"; }
|
|
259
259
|
static get encapsulation() { return "shadow"; }
|