@riverty/web-components 5.3.0 → 5.4.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 +27 -1
- package/custom-elements.json +32 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-dialog.cjs.entry.js +9 -10
- package/dist/cjs/r-hint_3.cjs.entry.js +4 -4
- package/dist/cjs/r-icon-button.cjs.entry.js +3 -3
- package/dist/cjs/r-input-code.cjs.entry.js +23 -7
- package/dist/cjs/r-input-date.cjs.entry.js +28 -7
- package/dist/cjs/r-input-password.cjs.entry.js +15 -4
- package/dist/cjs/r-input-phone-number.cjs.entry.js +57 -19
- package/dist/cjs/r-input.cjs.entry.js +15 -3
- package/dist/cjs/r-list-item.cjs.entry.js +13 -9
- package/dist/cjs/r-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-action.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-content.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-headline.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-popover.cjs.entry.js +2 -2
- package/dist/cjs/r-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-description.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-title.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button.cjs.entry.js +5 -5
- package/dist/cjs/r-radio-group.cjs.entry.js +6 -6
- package/dist/cjs/r-select-option.cjs.entry.js +1 -1
- package/dist/cjs/r-select.cjs.entry.js +5 -4
- package/dist/cjs/r-skip-link.cjs.entry.js +1 -1
- package/dist/cjs/r-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/r-stepper.cjs.entry.js +1 -1
- package/dist/cjs/r-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-tab.cjs.entry.js +1 -1
- package/dist/cjs/r-tabs-list.cjs.entry.js +1 -1
- package/dist/cjs/r-tabs.cjs.entry.js +3 -3
- package/dist/cjs/r-textarea.cjs.entry.js +17 -3
- package/dist/cjs/r-toast-group.cjs.entry.js +1 -1
- package/dist/cjs/r-toast.cjs.entry.js +15 -9
- package/dist/cjs/web-components.cjs.js +1 -1
- package/dist/collection/components/badge/badge.css +7 -7
- package/dist/collection/components/dialog/dialog.css +13 -13
- package/dist/collection/components/dialog/dialog.js +8 -9
- 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 +33 -2
- 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 +21 -22
- package/dist/collection/components/list-item/list-item/list-item.js +36 -10
- 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 +2 -1
- package/dist/collection/components/toast/toast.js +19 -10
- package/dist/collection/components/toast-group/toast-group.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-dialog.entry.js +9 -10
- package/dist/esm/r-hint_3.entry.js +4 -4
- package/dist/esm/r-icon-button.entry.js +3 -3
- package/dist/esm/r-input-code.entry.js +23 -7
- package/dist/esm/r-input-date.entry.js +28 -7
- package/dist/esm/r-input-password.entry.js +15 -4
- package/dist/esm/r-input-phone-number.entry.js +57 -19
- package/dist/esm/r-input.entry.js +15 -3
- package/dist/esm/r-list-item.entry.js +13 -9
- package/dist/esm/r-panel.entry.js +2 -2
- package/dist/esm/r-popover-action.entry.js +1 -1
- package/dist/esm/r-popover-content.entry.js +1 -1
- package/dist/esm/r-popover-headline.entry.js +1 -1
- package/dist/esm/r-popover-trigger.entry.js +1 -1
- package/dist/esm/r-popover.entry.js +2 -2
- package/dist/esm/r-progress-bar.entry.js +1 -1
- package/dist/esm/r-radio-button-description.entry.js +1 -1
- package/dist/esm/r-radio-button-leading.entry.js +1 -1
- package/dist/esm/r-radio-button-title.entry.js +1 -1
- package/dist/esm/r-radio-button-trailing.entry.js +1 -1
- package/dist/esm/r-radio-button.entry.js +5 -5
- package/dist/esm/r-radio-group.entry.js +6 -6
- package/dist/esm/r-select-option.entry.js +1 -1
- package/dist/esm/r-select.entry.js +5 -4
- package/dist/esm/r-skip-link.entry.js +1 -1
- package/dist/esm/r-stepper-item.entry.js +2 -2
- package/dist/esm/r-stepper.entry.js +1 -1
- package/dist/esm/r-tab-panel.entry.js +1 -1
- package/dist/esm/r-tab.entry.js +1 -1
- package/dist/esm/r-tabs-list.entry.js +1 -1
- package/dist/esm/r-tabs.entry.js +3 -3
- package/dist/esm/r-textarea.entry.js +17 -3
- package/dist/esm/r-toast-group.entry.js +1 -1
- package/dist/esm/r-toast.entry.js +15 -9
- package/dist/esm/web-components.js +1 -1
- package/dist/types/components/dialog/dialog.d.ts +1 -0
- package/dist/types/components/input/input.d.ts +6 -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 +11 -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.d.ts +66 -8
- package/dist/web-components/p-05ba30ba.entry.js +1 -0
- package/dist/web-components/p-0a424361.entry.js +1 -0
- package/dist/web-components/p-0ac858b8.entry.js +1 -0
- package/dist/web-components/p-0bb0de18.entry.js +1 -0
- package/dist/web-components/{p-5dd43433.entry.js → p-10724c18.entry.js} +1 -1
- package/dist/web-components/{p-59aa588e.entry.js → p-1157b7f4.entry.js} +1 -1
- package/dist/web-components/{p-5bc9fe5e.entry.js → p-135be1d5.entry.js} +1 -1
- package/dist/web-components/{p-5cd1ad6a.entry.js → p-1ed3efd7.entry.js} +1 -1
- package/dist/web-components/p-20f979ff.entry.js +1 -0
- package/dist/web-components/p-2394508f.entry.js +1 -0
- package/dist/web-components/{p-a45fd808.entry.js → p-2d85c0f3.entry.js} +1 -1
- package/dist/web-components/p-31c8388d.entry.js +1 -0
- package/dist/web-components/p-333707b2.entry.js +1 -0
- package/dist/web-components/p-3ea6a1be.entry.js +1 -0
- package/dist/web-components/p-3fc2b23b.entry.js +1 -0
- package/dist/web-components/{p-77335ae7.entry.js → p-48dfb286.entry.js} +1 -1
- package/dist/web-components/p-61f78bf6.entry.js +1 -0
- package/dist/web-components/{p-806b173d.entry.js → p-66c454ce.entry.js} +1 -1
- package/dist/web-components/{p-26e4816a.entry.js → p-71d6c4d7.entry.js} +1 -1
- package/dist/web-components/{p-4dae8c19.entry.js → p-735da2bb.entry.js} +1 -1
- package/dist/web-components/p-77dc268e.entry.js +1 -0
- package/dist/web-components/{p-512d3a60.entry.js → p-89ff32dc.entry.js} +1 -1
- package/dist/web-components/{p-0930ee1d.entry.js → p-8d6a35e3.entry.js} +1 -1
- package/dist/web-components/{p-90d390f4.entry.js → p-8f719321.entry.js} +1 -1
- package/dist/web-components/{p-d35303a6.entry.js → p-900923ab.entry.js} +1 -1
- package/dist/web-components/{p-651522b6.entry.js → p-988a7731.entry.js} +1 -1
- package/dist/web-components/{p-7545038f.entry.js → p-9c40f9cd.entry.js} +1 -1
- package/dist/web-components/p-aecd025b.entry.js +1 -0
- package/dist/web-components/{p-87bb4b91.entry.js → p-c7a9da98.entry.js} +1 -1
- package/dist/web-components/p-caca2855.entry.js +1 -0
- package/dist/web-components/{p-8968ddf6.entry.js → p-dc93ed55.entry.js} +1 -1
- package/dist/web-components/p-df81177e.entry.js +1 -0
- package/dist/web-components/{p-a81a67da.entry.js → p-e273950c.entry.js} +1 -1
- package/dist/web-components/{p-832dca22.entry.js → p-e50503d0.entry.js} +1 -1
- package/dist/web-components/p-fdf70aed.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-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-98628a15.entry.js +0 -1
- 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
|
@@ -280,8 +280,8 @@ export class Popover {
|
|
|
280
280
|
this.open ? this.show() : this.hide();
|
|
281
281
|
}
|
|
282
282
|
render() {
|
|
283
|
-
return (h(Host, { key: '
|
|
284
|
-
h("r-icon-button", { key: '
|
|
283
|
+
return (h(Host, { key: 'da45eae6a21cc01596344d33afc5def4da57967f', id: this.uniqueId, "data-position": this.positionState, "data-open": `${this.isOpen}`, open: this.isOpen }, h("div", { key: 'ad832de894e0af250cc93bdf3158032bc252740f', class: "r-popover" }, h("button", { key: '28c4938bb02cb7c4eaed074178dda00c2c39a0b7', class: "r-popover--trigger", "aria-label": this.triggerAriaLabel, ref: el => this.triggerElement = el, popoverTarget: `${this.uniqueId}-board`, popoverTargetAction: this.triggerAction }, h("slot", { key: '0a74ac9d6a7ecdba54771e733f8db5af1709e7fb', name: "trigger" })), h("div", { key: 'dbdb43df6a9823f5d8c954146347f40438bbf053', class: "r-popover--board", id: `${this.uniqueId}-board`, popover: this.dismissMode, ref: el => this.boardElement = el, onToggle: this.onToggle, onKeyDown: this.onKeyDown }, this.hasDismiss &&
|
|
284
|
+
h("r-icon-button", { key: '99cb4c1c050cdf197346ef84f7c610f5f6ed0b4c', ref: el => this.dismissElement = el, class: "r-popover--dismiss", name: "cross", onClick: this.onClickDismiss, label: this.dismissAriaLabel }), h("div", { key: 'fe7e18bd38a4f3879aada14169bfa50f84cd2eac', class: "r-popover--board-content" }, h("slot", { key: 'b5674f8f2f72340cf5af712f513a20bda9e04b47', name: "headline" }), h("slot", { key: '024ce9cc17f041df172d853176d09f4ec493df20', name: "content" }), h("slot", { key: '437ca7707856b7c6db59240d7b4378c74dc8fda8', name: "action" })), h("div", { key: '93184bd493520dbea03c7c63bbfe8c4ae788cde3', class: "r-popover--board-pointer", "aria-hidden": "true" }, h("svg", { key: '779d8b7df8f92ea14517ce9ce5099a73a4fdeac8', width: "16", height: "8", viewBox: "0 0 16 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '53b9fee3e6a34cf184d8818ac272122f04193ff6', d: "M8 8L0 0L16 0L8 8Z", fill: "currentColor" })))))));
|
|
285
285
|
}
|
|
286
286
|
static get is() { return "r-popover"; }
|
|
287
287
|
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: '573250bc4f9a1a8725e8808885854ca320b203bc', slot: "action" }, h("slot", { key: 'd753af20723fb9e2ae49f9977cda81fa1c3df8c6', 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: 'ec778d5e0a294bcbe389039abc6f0b620b7bc69c', slot: "content", class: "r-typography" }, h("slot", { key: '40c27d279a1093be8a98731881ad83da147f5bbc' })));
|
|
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: 'f878fb9ca3ffe1df00088bbd2fe1b6321130228a', slot: "headline" }, h("slot", { key: '1a477943ab993f8960f3e77dd90a72a276bf4200' })));
|
|
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: '78536189423d25a1cf3ee3630512ad44b2dbd444', slot: "trigger", onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("slot", { key: 'e634da1b6053eb1c0df7f08f5486f9492c2bd4d0' })));
|
|
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: '81203123d2df8fb029855f39dc359b98991630ee' }, h("progress", Object.assign({ key: 'f766b44c2c4088ab67d69b57de074fee15be166c' }, progressBarAttrs, { class: "r-progress-bar" }))));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "r-progress-bar"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -100,11 +100,11 @@ export class RadioButton {
|
|
|
100
100
|
checked,
|
|
101
101
|
required
|
|
102
102
|
};
|
|
103
|
-
return (h(Host, { key: '
|
|
104
|
-
h("div", { key: '
|
|
105
|
-
h("div", { key: '
|
|
106
|
-
h("r-hint", { key: '
|
|
107
|
-
h("r-hint", { key: '
|
|
103
|
+
return (h(Host, { key: '862574a20e04e55e3e7e0b8cb48131652f029030' }, h("label", { key: 'b916e9d5740605bad9a1f88c6bb07d0564b63f16', class: "r-radio-button", onClick: this.onClick, onKeyDown: this.onKeydown }, h("input", Object.assign({ key: 'd0ca90e85e619d8c5b9a8c71ae1582db65562036' }, inputAttrs, { id: `${uniqueId}-input`, class: "r-radio-button--input", ref: el => this.nativeEl = el, onFocus: this.onFocus, onBlur: this.onBlur })), h("span", { key: 'f77f3e56e88c5e3ad1f3e36e5f96715edb7e91cc', class: "r-radio-button--box" }), this.isLeading &&
|
|
104
|
+
h("div", { key: '60d6a15880fafd8007d20a80137b30f19d4f641e', class: "r-radio-button--leading" }, h("slot", { key: '9329c56d97e5e357ea70d165ee11ac171c605519', name: "leading" }, this.icon && h("r-icon", { key: 'ace86d3b61cd39f05ca3146e54d3ae4820d7b66d', name: this.icon, size: "m" }))), h("div", { key: '7773e0c5b2348245e4b4dafc06a6b10a6dc245c3', class: "r-radio-button--text" }, h("slot", { key: 'f060b0853a7a6ed0108d0182669807fd0236da33', name: "title" }, h("div", { key: '1ca5059e718a0bda9a53e2e0f630a617d0252638', style: { display: 'contents' } }, h("slot", { key: 'cb9128b915d2a71cff7e8960d5bd86973c615232' }))), h("slot", { key: 'f07a62e2caa36ceb27bc547cf86c7dfcdce1c5b4', name: "description" }, this.description)), this.isTrailing &&
|
|
105
|
+
h("div", { key: 'cc5e6dff1c324fdce239f8d4e553e154bdb73eac', class: "r-radio-button--trailing" }, h("slot", { key: '3d5e862c5830adb7a480fbb71ff92fef054bf1f7', name: "trailing" }))), invalid && error &&
|
|
106
|
+
h("r-hint", { key: '997b440b69a23cb432b8376b0351a947ec3b162e', role: "alert", variant: "error", id: `${uniqueId}-hint` }, this.error), hint &&
|
|
107
|
+
h("r-hint", { key: 'd3c41065b4924f42a2971d1cb91154e8e3041238', role: "note", variant: "information", id: `${uniqueId}-hint` }, hint)));
|
|
108
108
|
}
|
|
109
109
|
static get is() { return "r-radio-button"; }
|
|
110
110
|
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: '83668642a70a083a0db012ad4e80aa31eeb08b85', slot: "description" }, h("div", { key: '12530fbda5f2789443e7d78237ba633922d97683', class: "r-radio-button-description", style: { display: 'contents' } }, h("slot", { key: 'a62b23dc0e9ea5f80660e9e97a45a4f1aef50c24' }))));
|
|
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: '802f0d0c98c87abb566dd2ef0388d6d6237dba68', slot: "leading" }, h("div", { key: '4c0296adc5dd6839dd150450f0be62e92a810d7c', class: "r-radio-button-leading", style: { display: 'contents' } }, h("slot", { key: '16b6131307cbaa02e1182b204ded280fa903da0a' }))));
|
|
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: '623feed7834a4702b83257202de4505b6c08145d', slot: "title" }, h("div", { key: 'ca7b90c670583ba4a874df1da73dad9db67d0bf7', class: "r-radio-button-title", style: { display: 'contents' } }, h("slot", { key: 'fd7ac8a7ee5e2cd05dab3d061328eecb5ee14800' }))));
|
|
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: 'a1c1c9d525cd2fb7b6223677f216b8398c3dac9f', slot: "trailing" }, h("div", { key: '554e798bcd117d7a56024097041609dc532ad2c1', class: "r-radio-button-trailing", style: { display: 'contents' } }, h("slot", { key: 'f48cef26f06bedf6e37439dd1f406d5c789b06a0' }))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "r-radio-button-trailing"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -329,12 +329,12 @@ export class RadioGroup {
|
|
|
329
329
|
'tooltip-icon': tooltipIcon,
|
|
330
330
|
'tooltip-icon-color': tooltipIconColor
|
|
331
331
|
};
|
|
332
|
-
return (h(Host, { key: '
|
|
333
|
-
h("div", { key: '
|
|
334
|
-
h("r-hint", { key: '
|
|
335
|
-
h("r-hint", { key: '
|
|
336
|
-
h("r-hint", { key: '
|
|
337
|
-
h("r-hint", { key: '
|
|
332
|
+
return (h(Host, { key: '899b3d8d509fa3d6f37a81279e6fc58b98e1314c' }, h("div", { key: 'dc1c47c966aac6ebaab2b8ec9061342b6c1e81e3', class: "r-radio-group", onClick: this.onLabelClick }, label &&
|
|
333
|
+
h("div", { key: '5b39dcc6952d971f8c03e2dab554b25bb1be3ccf', class: "r-radio-group--label-container" }, h("r-label", Object.assign({ key: '7f13b1571bccb986a0e36903399c8f15536de539', id: `${uniqueId}-label`, class: "r-radio-group--label", "field-indicator": fieldIndicator }, labelAttr), label), h("slot", { key: 'bfd151ce64e670722a6a1f3254763b6f514c99ab', name: "popover" })), hint &&
|
|
334
|
+
h("r-hint", { key: 'edb8bbe44470579a5638e5dbee0b7b843cc998b4', id: `${uniqueId}-hint`, class: "r-radio-group--hint", role: "note" }, hint), h("div", { key: '1727429f1c36de0fd13567af448aed7c84f7c7b1', class: "r-radio-group--content" }, h("slot", { key: 'f7d712be6351c44e5f072f85a407b5e73837b48b' }))), invalid && error &&
|
|
335
|
+
h("r-hint", { key: '71feb492e87164e485bb10a0e856d86ef3c57a7d', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, error), this.validityState !== 'valid' && this.validityMessage &&
|
|
336
|
+
h("r-hint", { key: '0ddc4636948329a97e8140c9efc267a4a054ff3b', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, this.customErrorMessage || this.validityMessage), this.valid && this.validMessage && this.showValid &&
|
|
337
|
+
h("r-hint", { key: 'e7cfa4eccf754e90ad30b22b24dd9f2ce1fcadc8', role: "alert", variant: "success" }, this.validMessage)));
|
|
338
338
|
}
|
|
339
339
|
static get is() { return "r-radio-group"; }
|
|
340
340
|
static get encapsulation() { return "shadow"; }
|
|
@@ -865,8 +865,9 @@ export class Select {
|
|
|
865
865
|
const isTopSpace = ((_b = this.listboxElement) === null || _b === void 0 ? void 0 : _b.offsetHeight) < this.top;
|
|
866
866
|
const isTop = this.listboxPosition === 'top';
|
|
867
867
|
const isBottom = this.listboxPosition === 'bottom';
|
|
868
|
-
|
|
869
|
-
|
|
868
|
+
/** Don't change the position if there is sufficient space for the listbox
|
|
869
|
+
* or insufficient space for another position.
|
|
870
|
+
* */
|
|
870
871
|
if ((isTop && (isTopSpace || !isBottomSpace)) || (isBottom && (isBottomSpace || !isTopSpace))) {
|
|
871
872
|
this.listboxPositionState = this.listboxPosition;
|
|
872
873
|
return;
|
|
@@ -1004,8 +1005,8 @@ export class Select {
|
|
|
1004
1005
|
disabled,
|
|
1005
1006
|
required: isRequired
|
|
1006
1007
|
};
|
|
1007
|
-
return (h(Host, { key: '
|
|
1008
|
-
h("r-hint", { key: '
|
|
1008
|
+
return (h(Host, { key: 'aca9ddac308a41221f08de7fde92f45fcd89162f', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}` }, h("div", { key: '34c00c70c0b73cdd7afdcd65f175a94e82c900d2', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: '5a2b30341687b152eb17c2fc5ca2f65b1fda886f', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: '10021c02cfe8a697ee3a0e452e0052044f2b80a7', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: 'cc7173f5b427c9fca7e08a12552227d3f20ad64c' }, labelAttr), label)), h("slot", { key: '625e1bd9f1fa11950ff75e1875e03510f55022c0', name: "popover" })), hint &&
|
|
1009
|
+
h("r-hint", { key: '6d22db79a4375ddd901f5ea6b25d9c456e8f1ab2', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: 'a243a731bdd150386ea47ad0897831b37eed6621', class: "r-select" }, h("select", Object.assign({ key: 'e1878ed06636fad3768d8b4b1f4a944d30730346', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: 'b47cd423033129e827a99f8fcff39173f4c74ed9', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: '04db58929d97226614d344f7f419c3e8aa7e250d', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: 'b23380c2c75c33e6a8a99737189c43400e29940b', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: '83e215daafbd8909f9788e8918691b08417a5f2d', onSlotchange: this.handleSlotChange })))), h("div", { key: '57acdd7994fa67813e60641493e99f29afafcaf4', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: 'f14bc3026b6bee74b1192f37af64381958c0c87b', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage, this.hasValidationSuccess && this.validMessage))));
|
|
1009
1010
|
}
|
|
1010
1011
|
static get is() { return "r-select"; }
|
|
1011
1012
|
static get encapsulation() { return "shadow"; }
|
|
@@ -128,7 +128,7 @@ export class SelectOption {
|
|
|
128
128
|
size: iconSize,
|
|
129
129
|
color: iconColor
|
|
130
130
|
};
|
|
131
|
-
return (h(Host, { key: '
|
|
131
|
+
return (h(Host, { key: '1f3440961f3c606f5b2b1eef77ae3c53fc1ea4a0', id: uniqueId, role: "option", onClick: this.handleClick, onKeydown: this.handleKeydown, "aria-disabled": `${disabled}`, "aria-selected": `${this.isSelected}`, "data-value": this.definedValue, "data-focused": `${this.isFocused}` }, h("div", { key: '9a29dd16478d39c905f8cb54ca603e6982c3a24e', class: "r-select-option" }, icon && h("span", { key: 'fdcecb70781424749e0527f06eff5140a8a79ccc', class: "r-select-option--icon" }, h("r-icon", Object.assign({ key: '5a1906d39a27bc70729d26e93fd8f0d77e80e972' }, iconAttributes))), !icon && hasIconSlot && h("span", { key: '572b0e90b5695e0233505f28fb7c9b3dbc90a73f', class: "r-select-option--icon" }, h("slot", { key: 'bc04c317491e690281b0f4442aaff3f86a5ddb12', name: "icon" })), h("span", { key: '77bf634b415a36d8463212918cf200fda8647f85', class: "r-select-option--label" }, h("slot", { key: '83dd97fa580d18f4a9e27beca4835adf6c746240' })))));
|
|
132
132
|
}
|
|
133
133
|
static get is() { return "r-select-option"; }
|
|
134
134
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5,7 +5,7 @@ export class SkipLink {
|
|
|
5
5
|
this.position = 'center';
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '7ca2f29a347197be2951841e6b59807360e76f9d' }, h("slot", { key: '6d26f29f7dbec9d60e302de3cbbf0d8d2afd3009' })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "r-skip-link"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,7 +11,7 @@ export class Stepper {
|
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
13
|
const completed = this.completed || this.completeSteps;
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: 'd501495c36f83cfc14c706f46936d5acc925d6d2' }, h("div", { key: 'a2952de15ea74093ea41663438bc8fec866d428b', class: "r-stepper" }, !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: '4834a5947ae40241607131dcbb3dfa56354fdc13' }))));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "r-stepper"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,8 +11,8 @@ export class StepperItem {
|
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
13
|
const number = this.number || this.stepNumber;
|
|
14
|
-
return (h(Host, { key: '
|
|
15
|
-
h("div", { key: '
|
|
14
|
+
return (h(Host, { key: 'a5004ade661b4abfacb920a256f6a12bbd32a6ea' }, h("div", { key: '1358044cc918c2988a2f32198b0a8260cf439ec0', class: "r-stepper-item" }, h("div", { key: 'ec2afea7c0b6d603ebce7dda25e93246fafb248a', class: "r-stepper-item--indicator" }, this.complete ? (h("r-icon", { name: "check", size: "s" })) : this.icon ? (h("r-icon", { name: this.icon, size: "s" })) : number !== undefined ? (h("span", { class: "r-stepper-item--indicator--step-number" }, number)) : null), this.hasText &&
|
|
15
|
+
h("div", { key: '6cf7607d13bdd0bd58885e5cc4c74c0068448dfc', class: "r-stepper-item--text" }, h("slot", { key: '8c47f057e435924f8c004be5f3112743127bf885' })))));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "r-stepper-item"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -41,7 +41,7 @@ export class RTab {
|
|
|
41
41
|
'aria-selected': `${active}`,
|
|
42
42
|
'aria-disabled': `${disabled}`
|
|
43
43
|
};
|
|
44
|
-
return (h(Host, Object.assign({ key: '
|
|
44
|
+
return (h(Host, Object.assign({ key: '2e2b2d84376e097c80a84a1e7224c0f026c16277', onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, hostAttrs), h("span", { key: 'c38098d413b17ba8b8ddd3436687879d1b37114f', class: "r-tab" }, h("span", { key: '3f7bfedd8a933da7ec52f34dd64f3a4e862cb836', class: "r-tab--slot" }, h("slot", { key: 'bc056a0d06188ddd1b47c3c062a4d51367e48393' })))));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "r-tab"; }
|
|
47
47
|
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: '042aba1f5eebeafdff7035d8ad5afc9ec204eb8a', class: "r-typography" }, hostAttrs), h("div", { key: '0e9c72a859b07c1e4c2cb4a5d936fbadc07f23ca', class: "r-tab-panel" }, h("slot", { key: '2d588c5c67cfd26d7762a2be0c8400faa12a96c8' }))));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "r-tab-panel"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -63,8 +63,8 @@ export class RTabs {
|
|
|
63
63
|
var _a, _b;
|
|
64
64
|
const label = this.transliterateToKebabCase(tab.textContent);
|
|
65
65
|
// Unique id per each tab-panel pair
|
|
66
|
-
const tabId =
|
|
67
|
-
const panelId =
|
|
66
|
+
const tabId = `r-tab-${label}`;
|
|
67
|
+
const panelId = `r-tab-panel-${label}`;
|
|
68
68
|
// Assign `id` and `panel-id` to each tab
|
|
69
69
|
tab.setAttribute('id', tabId);
|
|
70
70
|
tab.setAttribute('panel-id', panelId);
|
|
@@ -233,7 +233,7 @@ export class RTabs {
|
|
|
233
233
|
this._changeFocusTab(e.target, e.detail.keycode);
|
|
234
234
|
}
|
|
235
235
|
render() {
|
|
236
|
-
return (h(Host, { key: '
|
|
236
|
+
return (h(Host, { key: 'ddb0847ae3eb4a03c446b2dd193f2fa9603081df', class: "r-tabs" }, h("slot", { key: 'd60346bd45b58534e6ac922ac66c09c1bb04c532' })));
|
|
237
237
|
}
|
|
238
238
|
static get is() { return "r-tabs"; }
|
|
239
239
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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,
|
|
@@ -103,12 +103,13 @@
|
|
|
103
103
|
}
|
|
104
104
|
.r-toast--leading-icon {
|
|
105
105
|
color: var(--r-toast--leading-icon--color, var(--r-status-info-regular, #466882));
|
|
106
|
-
margin-top: var(--r-toast--leading-icon--margin-top, 0
|
|
106
|
+
margin-top: var(--r-toast--leading-icon--margin-top, 0);
|
|
107
107
|
}
|
|
108
108
|
.r-toast--headline {
|
|
109
109
|
color: var(--r-toast--headline--color, var(--r-text-regular, #282828));
|
|
110
110
|
font-size: var(--r-toast--headline--font-size, var(--r-font-size-400, 1rem));
|
|
111
111
|
font-weight: var(--r-toast--headline--font-weight, var(--r-font-weight-semibold, 600));
|
|
112
|
+
line-height: var(--r-toast--headline--line-height, 1);
|
|
112
113
|
margin: var(--r-toast--headline--margin, 0);
|
|
113
114
|
}
|
|
114
115
|
.r-toast--content {
|