@riverty/web-components 6.2.1 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +78 -0
- package/custom-elements.json +4 -0
- package/dist/cjs/index-BnETQtSf.js +16 -16
- package/dist/cjs/index.cjs.js +35 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/r-alert.cjs.entry.js +1 -1
- package/dist/cjs/r-badge.cjs.entry.js +3 -2
- package/dist/cjs/r-button.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox-group.cjs.entry.js +5 -0
- package/dist/cjs/r-checkbox.cjs.entry.js +9 -4
- package/dist/cjs/r-dialog.cjs.entry.js +2 -2
- package/dist/cjs/r-hint_2.cjs.entry.js +4 -4
- package/dist/cjs/r-icon-button_2.cjs.entry.js +43 -18
- package/dist/cjs/r-input-code.cjs.entry.js +11 -6
- package/dist/cjs/r-input-date.cjs.entry.js +11 -6
- package/dist/cjs/r-input-password.cjs.entry.js +8 -3
- package/dist/cjs/r-input-phone-number.cjs.entry.js +6 -6
- package/dist/cjs/r-input.cjs.entry.js +249 -33
- package/dist/cjs/r-pagination.cjs.entry.js +9 -3
- 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 +8 -5
- package/dist/cjs/r-select-option.cjs.entry.js +1 -1
- package/dist/cjs/r-select.cjs.entry.js +10 -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 +2 -2
- package/dist/cjs/r-tabs-list.cjs.entry.js +3 -3
- package/dist/cjs/r-tabs.cjs.entry.js +1 -1
- package/dist/cjs/r-toast-group.cjs.entry.js +1 -1
- package/dist/cjs/r-toast.cjs.entry.js +17 -9
- package/dist/cjs/web-components.cjs.js +1 -1
- package/dist/collection/components/alert/alert.css +1 -0
- package/dist/collection/components/badge/badge.css +10 -0
- package/dist/collection/components/badge/badge.js +5 -1
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +30 -4
- package/dist/collection/components/checkbox-group/checkbox-group.js +26 -0
- package/dist/collection/components/dialog/dialog.js +2 -2
- package/dist/collection/components/hint/hint.js +2 -2
- package/dist/collection/components/icon-button/icon-button.js +3 -3
- package/dist/collection/components/input/exports.js +46 -0
- package/dist/collection/components/input/input.css +6 -0
- package/dist/collection/components/input/input.js +321 -32
- package/dist/collection/components/input-code/input-code.js +32 -6
- package/dist/collection/components/input-date/input-date.js +32 -6
- package/dist/collection/components/input-password/input-password.js +29 -3
- package/dist/collection/components/input-phone-number/input-phone-number.js +25 -6
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/pagination/pagination.js +18 -3
- 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 +8 -5
- package/dist/collection/components/select/select.js +31 -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 +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tabs-list/tabs-list.js +3 -3
- package/dist/collection/components/toast/toast.js +17 -9
- package/dist/collection/components/toast-group/toast-group.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +34 -63
- package/dist/collection/components/tooltip/tooltip.js +39 -14
- package/dist/collection/index.js +2 -1
- package/dist/collection/utils/version-checker.js +33 -0
- package/dist/esm/index-CTxpqopm.js +16 -16
- package/dist/esm/index.js +34 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/r-alert.entry.js +1 -1
- package/dist/esm/r-badge.entry.js +3 -2
- package/dist/esm/r-button.entry.js +1 -1
- package/dist/esm/r-checkbox-group.entry.js +5 -0
- package/dist/esm/r-checkbox.entry.js +9 -4
- package/dist/esm/r-dialog.entry.js +2 -2
- package/dist/esm/r-hint_2.entry.js +4 -4
- package/dist/esm/r-icon-button_2.entry.js +43 -18
- package/dist/esm/r-input-code.entry.js +11 -6
- package/dist/esm/r-input-date.entry.js +11 -6
- package/dist/esm/r-input-password.entry.js +8 -3
- package/dist/esm/r-input-phone-number.entry.js +6 -6
- package/dist/esm/r-input.entry.js +249 -33
- package/dist/esm/r-pagination.entry.js +9 -3
- 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 +8 -5
- package/dist/esm/r-select-option.entry.js +1 -1
- package/dist/esm/r-select.entry.js +10 -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 +2 -2
- package/dist/esm/r-tabs-list.entry.js +3 -3
- package/dist/esm/r-tabs.entry.js +1 -1
- package/dist/esm/r-toast-group.entry.js +1 -1
- package/dist/esm/r-toast.entry.js +17 -9
- package/dist/esm/web-components.js +1 -1
- package/dist/types/components/badge/badge.d.ts +3 -0
- package/dist/types/components/checkbox/checkbox.d.ts +2 -0
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +2 -0
- package/dist/types/components/input/exports.d.ts +45 -0
- package/dist/types/components/input/input.d.ts +66 -1
- package/dist/types/components/input-code/input-code.d.ts +2 -0
- package/dist/types/components/input-date/input-date.d.ts +2 -0
- package/dist/types/components/input-password/input-password.d.ts +2 -0
- package/dist/types/components/input-phone-number/input-phone-number.d.ts +2 -0
- package/dist/types/components/pagination/pagination.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +63 -2
- package/dist/types/utils/version-checker.d.ts +1 -0
- package/dist/web-components/index.esm.js +1 -0
- package/dist/web-components/{p-253068b9.entry.js → p-01aefcf0.entry.js} +1 -1
- package/dist/web-components/p-05cb55db.entry.js +1 -0
- package/dist/web-components/{p-477614c5.entry.js → p-11b22309.entry.js} +1 -1
- package/dist/web-components/{p-562051aa.entry.js → p-2d878934.entry.js} +1 -1
- package/dist/web-components/p-325dbedf.entry.js +1 -0
- package/dist/web-components/{p-10cc9983.entry.js → p-34b9457b.entry.js} +1 -1
- package/dist/web-components/{p-e5b943a2.entry.js → p-36abd05a.entry.js} +1 -1
- package/dist/web-components/{p-d2447e30.entry.js → p-386d1ef9.entry.js} +1 -1
- package/dist/web-components/{p-4de76291.entry.js → p-3d67b77b.entry.js} +1 -1
- package/dist/web-components/{p-93435fcd.entry.js → p-4b12fbc0.entry.js} +1 -1
- package/dist/web-components/p-52f7b505.entry.js +1 -0
- package/dist/web-components/{p-bfc7e6c0.entry.js → p-57ebc474.entry.js} +1 -1
- package/dist/web-components/{p-a1086abe.entry.js → p-57edf7f4.entry.js} +1 -1
- package/dist/web-components/{p-cc363c3d.entry.js → p-69a24fe2.entry.js} +1 -1
- package/dist/web-components/{p-e67b13df.entry.js → p-6d92648c.entry.js} +1 -1
- package/dist/web-components/p-75052597.entry.js +1 -0
- package/dist/web-components/{p-9de3a1a5.entry.js → p-7b2c5b63.entry.js} +1 -1
- package/dist/web-components/p-7bf463ff.entry.js +1 -0
- package/dist/web-components/{p-8e125826.entry.js → p-838e43d4.entry.js} +1 -1
- package/dist/web-components/p-8c16d038.entry.js +1 -0
- package/dist/web-components/{p-075a8dc8.entry.js → p-8f8313de.entry.js} +1 -1
- package/dist/web-components/{p-3beacdab.entry.js → p-9026d5a2.entry.js} +1 -1
- package/dist/web-components/p-9c31c7c4.entry.js +1 -0
- package/dist/web-components/p-9c415b9c.entry.js +1 -0
- package/dist/web-components/p-b303b2cc.entry.js +1 -0
- package/dist/web-components/p-b8df041d.entry.js +1 -0
- package/dist/web-components/p-bc30844f.entry.js +1 -0
- package/dist/web-components/{p-bde44ec4.entry.js → p-c4a77a65.entry.js} +1 -1
- package/dist/web-components/{p-d0310ed4.entry.js → p-c549addf.entry.js} +1 -1
- package/dist/web-components/p-c65df19f.entry.js +1 -0
- package/dist/web-components/p-cf3f044d.entry.js +1 -0
- package/dist/web-components/p-d9778cfa.entry.js +1 -0
- package/dist/web-components/{p-44f87e16.entry.js → p-dbe4ccb8.entry.js} +1 -1
- package/dist/web-components/p-ded50850.entry.js +1 -0
- package/dist/web-components/{p-02b22f8e.entry.js → p-e5be895b.entry.js} +1 -1
- package/dist/web-components/{p-495ba3d2.entry.js → p-e6b34c1e.entry.js} +1 -1
- package/dist/web-components/p-ec3c4800.entry.js +1 -0
- package/dist/web-components/p-f670fd87.entry.js +1 -0
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +3 -2
- package/dist/web-components/p-3b8c8951.entry.js +0 -1
- package/dist/web-components/p-4214867d.entry.js +0 -1
- package/dist/web-components/p-42c857e9.entry.js +0 -1
- package/dist/web-components/p-5b850e0f.entry.js +0 -1
- package/dist/web-components/p-6013dfc8.entry.js +0 -1
- package/dist/web-components/p-62e7ae04.entry.js +0 -1
- package/dist/web-components/p-71519d37.entry.js +0 -1
- package/dist/web-components/p-88f7b47f.entry.js +0 -1
- package/dist/web-components/p-8975a6a3.entry.js +0 -1
- package/dist/web-components/p-91cc0bde.entry.js +0 -1
- package/dist/web-components/p-947969d7.entry.js +0 -1
- package/dist/web-components/p-bbba6d79.entry.js +0 -1
- package/dist/web-components/p-c1030394.entry.js +0 -1
- package/dist/web-components/p-caf8f067.entry.js +0 -1
- package/dist/web-components/p-cf4ff357.entry.js +0 -1
- package/dist/web-components/p-dc9cca06.entry.js +0 -1
- package/dist/web-components/p-efec231a.entry.js +0 -1
|
@@ -356,6 +356,11 @@ export class InputDate {
|
|
|
356
356
|
this.format = this.initial['format'];
|
|
357
357
|
this.valid = !this.invalid;
|
|
358
358
|
}
|
|
359
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
360
|
+
async setCustomValidity(message) {
|
|
361
|
+
this.customErrorMessage = message;
|
|
362
|
+
this.validateFormElement(this.nativeElement);
|
|
363
|
+
}
|
|
359
364
|
/**
|
|
360
365
|
* Validates the input date without triggering UI and returns a boolean indicating its validity.
|
|
361
366
|
* @returns A boolean indicating whether the input date is valid.
|
|
@@ -451,14 +456,14 @@ export class InputDate {
|
|
|
451
456
|
id: `${uniqueId}-label`,
|
|
452
457
|
fieldIndicator
|
|
453
458
|
} : {};
|
|
454
|
-
return (h(Host, { key: '
|
|
459
|
+
return (h(Host, { key: 'e8d5144a4cefeca243ea6e80840e4ff12b9344f0', onClick: this.onHostClick, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("fieldset", Object.assign({ key: '417cac30b7b535e7367eef280732869cdd984ed1', class: "r-input-date" }, groupAttrs), h("div", { key: 'd7ef5eb79c96c0d8845399e536c356272ab7c03c', class: "r-input-date--legend-container" }, h("legend", { key: '14c195899fb789333bbd07a40ec1db746d004839', class: "r-input-date--legend" }, h("label", { key: 'f6ac0e10142bceefe404a385ac44534d81ae3f98', htmlFor: uniqueId }, label ?
|
|
455
460
|
h("r-label", Object.assign({}, labelAttr), label)
|
|
456
461
|
:
|
|
457
|
-
h("slot", { name: "label" }))), h("slot", { key: '
|
|
458
|
-
h("r-hint", { key: '
|
|
459
|
-
h("span", { "aria-hidden": "true", class: "r-input-date--delimiter" }, this.delimiter)))), h("input", Object.assign({ key: '
|
|
460
|
-
h("r-icon", { key: '
|
|
461
|
-
h("r-icon", { key: '
|
|
462
|
+
h("slot", { name: "label" }))), h("slot", { key: 'b3bb261cb82002f7c41470bb9ca09110c6f7a345', name: "popover" })), hint &&
|
|
463
|
+
h("r-hint", { key: '606d8d0f83416914627b23f901838c55f65b6adc', id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { key: '46ca5170c4eafd18464dd7575ab41263907e2116', class: "r-input-date--container" }, h("r-icon", { key: '488dc02a12c354dc9fdd5d814b2c63dbd080175f', name: "calendar", size: "s", class: "r-input-date--calendar-icon" }), h("div", { key: '69ef56323ea2c1d90121dc280cb2072701558064', class: "r-input-date--inputs" }, this.inputOrder.map((input, i) => (h(Fragment, null, h("input", Object.assign({ class: "r-input-date--input" }, this.getInputAttrs(input), { key: input, value: this.getDateComponent(input), onInput: this.createInputHandler(input, i), onChange: this.createChangeHandler(input), onClick: this.onInputClick, onBlur: this.handleBlur, onKeyDown: this.createKeyDownHandler(i), onPaste: this.handlePaste })), i < this.inputOrder.length - 1 &&
|
|
464
|
+
h("span", { "aria-hidden": "true", class: "r-input-date--delimiter" }, this.delimiter)))), h("input", Object.assign({ key: '918cf85992a45287c77df5f937f82d0f6f316bf1', type: "hidden" }, dateInputAttrs, { value: this.value, ref: (el) => this.nativeElement = el }))), h("div", { key: '57dbce64441410f59571417fce01213af7ee146f', class: "r-input-date--trailing" }, this.readonly &&
|
|
465
|
+
h("r-icon", { key: 'e60109ba459f42e391a972cd7fdbd9fba134244f', class: "r-input-date--readonly-icon", name: "pen-disabled", size: "s" }), valid &&
|
|
466
|
+
h("r-icon", { key: '0c5af571965830bffdb226d94e4d2a2f4a158553', name: "circled-check", size: "s", color: "var(--r-status-success-regular)" }), this.hasTrailingSlot && h("slot", { key: '2b3836138862a6b6538aa75ddc2929b63f85667e', name: "trailing" }))), h("div", { key: 'd07f45f25bd1c6ad19f7feacf24cab515c40aa01', id: `${uniqueId}-message`, "aria-live": "polite", class: "r-input-date--message" }, this.hasMessage && h("r-hint", { key: '7974223f426574a5b6a54bbf773007475dfb6450', variant: "error" }, this.message)))));
|
|
462
467
|
}
|
|
463
468
|
static get is() { return "r-input-date"; }
|
|
464
469
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1193,6 +1198,27 @@ export class InputDate {
|
|
|
1193
1198
|
}]
|
|
1194
1199
|
}
|
|
1195
1200
|
},
|
|
1201
|
+
"setCustomValidity": {
|
|
1202
|
+
"complexType": {
|
|
1203
|
+
"signature": "(message: string) => Promise<void>",
|
|
1204
|
+
"parameters": [{
|
|
1205
|
+
"name": "message",
|
|
1206
|
+
"type": "string",
|
|
1207
|
+
"docs": ""
|
|
1208
|
+
}],
|
|
1209
|
+
"references": {
|
|
1210
|
+
"Promise": {
|
|
1211
|
+
"location": "global",
|
|
1212
|
+
"id": "global::Promise"
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
"return": "Promise<void>"
|
|
1216
|
+
},
|
|
1217
|
+
"docs": {
|
|
1218
|
+
"text": "Validates an element, displays provided message in case value is invalid.",
|
|
1219
|
+
"tags": []
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1196
1222
|
"checkValidity": {
|
|
1197
1223
|
"complexType": {
|
|
1198
1224
|
"signature": "() => Promise<boolean>",
|
|
@@ -163,6 +163,11 @@ export class InputPassword {
|
|
|
163
163
|
this.value = value;
|
|
164
164
|
this.validateFormElement(this.nativeElement);
|
|
165
165
|
}
|
|
166
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
167
|
+
async setCustomValidity(message) {
|
|
168
|
+
this.customErrorMessage = message;
|
|
169
|
+
this.validateFormElement(this.nativeElement);
|
|
170
|
+
}
|
|
166
171
|
/**
|
|
167
172
|
* Validates the input password without triggering UI and returns a boolean indicating its validity.
|
|
168
173
|
* @returns A boolean indicating whether the input password is valid.
|
|
@@ -191,7 +196,7 @@ export class InputPassword {
|
|
|
191
196
|
}
|
|
192
197
|
get hasValidationError() {
|
|
193
198
|
var _a, _b;
|
|
194
|
-
return this.validityState !== 'valid' && (!!((_a = this.customErrorMessage) === null || _a === void 0 ? void 0 : _a.length) || !!((_b = this.validityMessage) === null || _b === void 0 ? void 0 : _b.length));
|
|
199
|
+
return this.validityState && this.validityState !== 'valid' && (!!((_a = this.customErrorMessage) === null || _a === void 0 ? void 0 : _a.length) || !!((_b = this.validityMessage) === null || _b === void 0 ? void 0 : _b.length));
|
|
195
200
|
}
|
|
196
201
|
get hasMessage() {
|
|
197
202
|
return this.hasError || this.hasValidationError;
|
|
@@ -244,8 +249,8 @@ export class InputPassword {
|
|
|
244
249
|
tooShortMessage,
|
|
245
250
|
patternMismatchMessage
|
|
246
251
|
};
|
|
247
|
-
return (h(Host, { key: '
|
|
248
|
-
h("r-hint", { key: '
|
|
252
|
+
return (h(Host, { key: '197cfacad4b600eb5c348d496b7a406daf664202' }, h("r-input", Object.assign({ key: 'f9f1fae507ed66bfb309e1765ae266d7c4e91962' }, inputAttrs, { ref: (el) => this.nativeElement = el, type: showed ? 'text' : 'password', onRInput: this.onInput, onRChange: this.onChange, onKeyUp: this.handleKeyup, onRBlur: this.handleBlur }), h("r-icon", { key: 'e8ddd11585c68f22b951cf2a7fce1c7e8b5da0d2', name: "padlock-closed", size: "s", slot: "leading" }), h("slot", { key: '39ecae0c2028d64e1afcf1e84b1dd27931e17227', name: "popover", slot: "popover" }), h("r-icon-button", { key: 'de56d2a8366b2687ea3d2be99f1c1ab49275e0e3', slot: "trailing", name: showed ? 'eye-crossed-out' : 'eye', size: "s", disabled: disabled, label: showed ? hidePasswordAriaLabel : showPasswordAriaLabel, onClick: this.onShowClick }), this.hasMessage &&
|
|
253
|
+
h("r-hint", { key: '91c2c93dd827ac3c0b233217dc0aa26fc3a55f18', slot: "message", variant: "error" }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage))), h("div", { key: 'faa2b8b1ff5af58e6524a9ea3c5fe08a446e6ff4', class: "visually-hidden", ref: el => this.passwordVisibilityChangeAlertContainer = el, "aria-live": "polite" })));
|
|
249
254
|
}
|
|
250
255
|
static get is() { return "r-input-password"; }
|
|
251
256
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1025,6 +1030,27 @@ export class InputPassword {
|
|
|
1025
1030
|
"tags": []
|
|
1026
1031
|
}
|
|
1027
1032
|
},
|
|
1033
|
+
"setCustomValidity": {
|
|
1034
|
+
"complexType": {
|
|
1035
|
+
"signature": "(message: string) => Promise<void>",
|
|
1036
|
+
"parameters": [{
|
|
1037
|
+
"name": "message",
|
|
1038
|
+
"type": "string",
|
|
1039
|
+
"docs": ""
|
|
1040
|
+
}],
|
|
1041
|
+
"references": {
|
|
1042
|
+
"Promise": {
|
|
1043
|
+
"location": "global",
|
|
1044
|
+
"id": "global::Promise"
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
"return": "Promise<void>"
|
|
1048
|
+
},
|
|
1049
|
+
"docs": {
|
|
1050
|
+
"text": "Validates an element, displays provided message in case value is invalid.",
|
|
1051
|
+
"tags": []
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1028
1054
|
"checkValidity": {
|
|
1029
1055
|
"complexType": {
|
|
1030
1056
|
"signature": "() => Promise<boolean>",
|
|
@@ -77,7 +77,7 @@ export class InputPhoneNumber {
|
|
|
77
77
|
const isPhoneNumberValid = this.countryCode ? this.getPhoneValidationResult(this.phoneNumber, this.countryCode).isValid : false;
|
|
78
78
|
if (!isPhoneNumberValid) {
|
|
79
79
|
validityState = 'invalid';
|
|
80
|
-
validityMessage = this.
|
|
80
|
+
validityMessage = this.invalidPhoneNumberMessage;
|
|
81
81
|
return { validityState, validityMessage };
|
|
82
82
|
}
|
|
83
83
|
validityState = 'valid';
|
|
@@ -183,8 +183,8 @@ export class InputPhoneNumber {
|
|
|
183
183
|
return this.invalid && !!((_a = this.error) === null || _a === void 0 ? void 0 : _a.length);
|
|
184
184
|
}
|
|
185
185
|
get hasValidationError() {
|
|
186
|
-
var _a;
|
|
187
|
-
return this.validityState !== 'valid' && !!((_a = this.
|
|
186
|
+
var _a, _b;
|
|
187
|
+
return this.validityState && this.validityState !== 'valid' && (!!((_a = this.customErrorMessage) === null || _a === void 0 ? void 0 : _a.length) || !!((_b = this.validityMessage) === null || _b === void 0 ? void 0 : _b.length));
|
|
188
188
|
}
|
|
189
189
|
get hasMessage() {
|
|
190
190
|
return this.hasError || this.hasValidationError;
|
|
@@ -284,9 +284,9 @@ export class InputPhoneNumber {
|
|
|
284
284
|
disabled,
|
|
285
285
|
'aria-describedby': this.ariaDescribedBy
|
|
286
286
|
};
|
|
287
|
-
return (h(Host, { key: '
|
|
288
|
-
h("r-label", Object.assign({ key: '
|
|
289
|
-
h("r-hint", { key: '
|
|
287
|
+
return (h(Host, { key: 'e5170613c08f3927d2a65cb7649cd29d27954b99' }, h("div", { key: '42e8954e2140be50ea42290779af01522e0e39e7', class: "r-input-phone-number--label-container" }, h("label", { key: '0dbd4ad0d762f97d4a2242f1dc95ba8cd9039ce0', id: `${uniqueId}-label` }, label &&
|
|
288
|
+
h("r-label", Object.assign({ key: 'ec76421b8dad5b1ed58cb0302d7c8d32fed66735' }, labelAttr), label)), h("slot", { key: 'c9e8a6fb83822826f5a1f62cedb06169715dac52', name: "popover" })), hint &&
|
|
289
|
+
h("r-hint", { key: 'c0755d106d3d01f6f6c0ab1d939337d98e014652', id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { key: 'e32fe35fed92c7a729231164705ef6437060775e', class: "r-input-phone-number", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-describedby": this.ariaDescribedBy }, h("slot", { key: 'cc2d797e9f9c5b5a21d6e8a7a7d6c7edb2d2b88a' }), h("r-input", { key: 'c3402afa0f6f30afb61b81c947272368dfabbbcf', label: inputLabel, value: phoneNumber, internal: true, valid: valid, invalid: invalid, required: required, readonly: this.readonly, novalidate: true, fullWidth: fullWidth, type: "tel", error: this.errorMessage || '', onRInput: this.handleOnInput, onRChange: this.handleInputOnChange, disabled: disabled })), h("input", Object.assign({ key: 'cd814c1b35708f56a911b4d93e907f9a2fac0f1c', type: "hidden" }, inputAttrs, { readonly: this.readonly, value: fullPhoneNumber, ref: el => this.nativeElement = el })), h("r-hint", { key: '211661682d51d22ffe93a6e993e03a3c89cc76e2', "aria-live": "polite", "aria-atomic": "true", id: `${uniqueId}-message`, class: !this.hasMessage && 'visually-hidden', variant: "error" }, this.hasMessage ? (this.hasError ? this.error : (this.customErrorMessage || this.validityMessage)) : '')));
|
|
290
290
|
}
|
|
291
291
|
static get is() { return "r-input-phone-number"; }
|
|
292
292
|
static get encapsulation() { return "shadow"; }
|
|
@@ -628,6 +628,25 @@ export class InputPhoneNumber {
|
|
|
628
628
|
"setter": false,
|
|
629
629
|
"reflect": false
|
|
630
630
|
},
|
|
631
|
+
"invalidPhoneNumberMessage": {
|
|
632
|
+
"type": "string",
|
|
633
|
+
"attribute": "invalid-phone-number-message",
|
|
634
|
+
"mutable": false,
|
|
635
|
+
"complexType": {
|
|
636
|
+
"original": "string",
|
|
637
|
+
"resolved": "string",
|
|
638
|
+
"references": {}
|
|
639
|
+
},
|
|
640
|
+
"required": false,
|
|
641
|
+
"optional": true,
|
|
642
|
+
"docs": {
|
|
643
|
+
"tags": [],
|
|
644
|
+
"text": "Custom error message displayed when phone number is not valid."
|
|
645
|
+
},
|
|
646
|
+
"getter": false,
|
|
647
|
+
"setter": false,
|
|
648
|
+
"reflect": false
|
|
649
|
+
},
|
|
631
650
|
"fullWidth": {
|
|
632
651
|
"type": "boolean",
|
|
633
652
|
"attribute": "full-width",
|
|
@@ -6,8 +6,8 @@ import { Host, h } from "@stencil/core";
|
|
|
6
6
|
export class RLabel {
|
|
7
7
|
render() {
|
|
8
8
|
const { fieldIndicator } = this;
|
|
9
|
-
return (h(Host, { key: '
|
|
10
|
-
h("span", { key: '
|
|
9
|
+
return (h(Host, { key: '41d52212a7098aa6ade47a1c102aff67548d2e63' }, h("div", { key: 'af64253a7cbdc37ea5e96fbc8d360a32944c001c', class: "r-label" }, h("span", { key: 'fa82843b9c0546f2cfd48ef53cd335a48fef4082', class: "r-label--slot" }, h("slot", { key: 'f430fb90c898f4d8695b9e9acba637de74faf49f' }), fieldIndicator &&
|
|
10
|
+
h("span", { key: '1e68a5cb6bb792553370048b96371a1af8a0a3ad', class: "r-label--marker" }, fieldIndicator)))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "r-label"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -182,6 +182,9 @@ export class RPagination {
|
|
|
182
182
|
}
|
|
183
183
|
return isArrowButton ? buttonElement : (_e = this.el.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector(`.r-pagination--item[data-index="${this.pageActive}"]`);
|
|
184
184
|
}
|
|
185
|
+
handlePropsChange() {
|
|
186
|
+
this.setPaginationState();
|
|
187
|
+
}
|
|
185
188
|
componentWillLoad() {
|
|
186
189
|
this.setPaginationState();
|
|
187
190
|
}
|
|
@@ -193,9 +196,6 @@ export class RPagination {
|
|
|
193
196
|
componentDidRender() {
|
|
194
197
|
this.syncHeaderWidth();
|
|
195
198
|
}
|
|
196
|
-
componentDidUpdate() {
|
|
197
|
-
this.setPaginationState(); // Recalculate when props change
|
|
198
|
-
}
|
|
199
199
|
render() {
|
|
200
200
|
const { active, previous, next, first, itemsPerPage, itemsPerPageOptions, startText, middleText, endText, selectText, listBoxPosition } = this;
|
|
201
201
|
const itemTemplate = (type, index) => {
|
|
@@ -796,4 +796,19 @@ export class RPagination {
|
|
|
796
796
|
}];
|
|
797
797
|
}
|
|
798
798
|
static get elementRef() { return "el"; }
|
|
799
|
+
static get watchers() {
|
|
800
|
+
return [{
|
|
801
|
+
"propName": "totalResults",
|
|
802
|
+
"methodName": "handlePropsChange"
|
|
803
|
+
}, {
|
|
804
|
+
"propName": "itemsPerPage",
|
|
805
|
+
"methodName": "handlePropsChange"
|
|
806
|
+
}, {
|
|
807
|
+
"propName": "variant",
|
|
808
|
+
"methodName": "handlePropsChange"
|
|
809
|
+
}, {
|
|
810
|
+
"propName": "pageActive",
|
|
811
|
+
"methodName": "handlePropsChange"
|
|
812
|
+
}];
|
|
813
|
+
}
|
|
799
814
|
}
|
|
@@ -161,10 +161,10 @@ export class Panel {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
render() {
|
|
164
|
-
return (h(Host, { key: '
|
|
164
|
+
return (h(Host, { key: '44996078c23da8ce9b5b48044d24d45778e688b4', role: "navigation", collapsed: this.isCollapsed }, h("div", { key: 'a217b08d3fda5e4f8761d971074e3de797363f32', class: "r-panel" }, h("div", { key: '8ff71b762feffd1cc9478014e011fc60875a5e3d', class: "r-panel--header" }, this.hasHeader && (h("a", { key: '9ad8475299e9f04341cc1c4b5b9e65551f2f6ca2', class: "logo-wrapper", href: this.logoLink }, this.isCollapsed ?
|
|
165
165
|
h("slot", { name: "logo-collapsed" })
|
|
166
166
|
:
|
|
167
|
-
h("slot", { name: "logo-expanded" }))), this.variant === 'modal' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "cross", rAriaLabel: `${this.labelCollapse}`, onClick: this.handleFullyCollapsedButtonClick })) : this.variant === 'drawer' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "angle-left", rAriaLabel: this.isCollapsed ? `${this.labelExpand}` : `${this.labelCollapse}`, onClick: this.handleSemiCollapsedButtonClick })) : this.variant === 'visible' ? (null) : null), h("div", { key: '
|
|
167
|
+
h("slot", { name: "logo-expanded" }))), this.variant === 'modal' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "cross", rAriaLabel: `${this.labelCollapse}`, onClick: this.handleFullyCollapsedButtonClick })) : this.variant === 'drawer' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "angle-left", rAriaLabel: this.isCollapsed ? `${this.labelExpand}` : `${this.labelCollapse}`, onClick: this.handleSemiCollapsedButtonClick })) : this.variant === 'visible' ? (null) : null), h("div", { key: '14b5a3ee0e11eda6585a84e0f05aa682950fbce2', class: "r-panel--body" }, h("slot", { key: 'e008d4f4796415779cd8e3dbda696b966b4ac184' })), this.hasFooter && !this.isCollapsed && (h("div", { key: '702c5859f2a7aa60903ec1df29f8977cf46dd0b8', class: "r-panel--footer" }, h("slot", { key: '347796d3e0bbffed77ae9368270f6e27eb93e156', name: "footer" }))))));
|
|
168
168
|
}
|
|
169
169
|
static get is() { return "r-panel"; }
|
|
170
170
|
static get encapsulation() { return "shadow"; }
|
|
@@ -321,8 +321,8 @@ export class Popover {
|
|
|
321
321
|
}
|
|
322
322
|
render() {
|
|
323
323
|
const TAG = !this.activeElement ? 'button' : 'div';
|
|
324
|
-
return (h(Host, { key: '
|
|
325
|
-
h("r-icon-button", { key: '
|
|
324
|
+
return (h(Host, { key: '655880fb3d3f069e13bc7025f932abc192df8918', id: this.uniqueId, "data-position": this.positionState, "data-open": `${this.isOpen}`, open: this.isOpen }, h("div", { key: '6617392de14d78a1a53172fc689245749f01909a', class: "r-popover" }, h(TAG, { key: '87dc99d5ab380b7f288fa9fba0e861feacff6e20', class: "r-popover--trigger", "aria-label": !this.activeElement ? this.triggerAriaLabel : null, ref: el => this.triggerElement = el, "aria-haspopup": "dialog", popoverTarget: !this.activeElement ? `${this.uniqueId}-board` : null, popoverTargetAction: !this.activeElement ? this.triggerAction : null }, h("slot", { key: '51c875b84c1311e40292cf7fe80f7753fcd15abf', name: "trigger" })), h("div", { key: '24a2d6a90d0fe9167a08328e80ed6164c94170f0', class: "r-popover--board", id: `${this.uniqueId}-board`, role: "dialog", "aria-label": this.headlineSlotContent, popover: this.dismissMode, ref: el => this.boardElement = el, onToggle: this.onToggle, onKeyDown: this.onKeyDown }, this.hasDismiss &&
|
|
325
|
+
h("r-icon-button", { key: '51e2563b582c5300eff1a032829bfdfb4947bdb6', ref: el => this.dismissElement = el, class: "r-popover--dismiss", name: "cross", onClick: this.onClickDismiss, label: this.dismissAriaLabel }), h("div", { key: '6abf0772e1b45c1c6be7eeeb5a0b37469e17c4de', class: "r-popover--board-content" }, h("slot", { key: 'd4af6923192d72fb77e0591dbc9f163965fdb9b7', name: "headline" }), h("slot", { key: '469fb95a09ce36ad41b7a76e3f09c8834c4e7e14', name: "content" }), h("slot", { key: '17145240e43b06ae7186ad8d46a3d10b7996d3f2', name: "action" })), h("div", { key: '68e7ce9cdbe5c5b765d5866d9ea6c80d6b830630', class: "r-popover--board-pointer", "aria-hidden": "true" }, h("svg", { key: '55d0e368d2af54a082fc8323b9b1e40457a5a62b', width: "16", height: "8", viewBox: "0 0 16 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '86db95e48bed58187dea614c81527f6bd7ef9f3e', d: "M8 8L0 0L16 0L8 8Z", fill: "currentColor" })))))));
|
|
326
326
|
}
|
|
327
327
|
static get is() { return "r-popover"; }
|
|
328
328
|
static get encapsulation() { return "shadow"; }
|
|
@@ -64,7 +64,7 @@ export class PopoverAction {
|
|
|
64
64
|
return focusableElements(this.host);
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: 'a2e9f0482b6de85e54d5fb6c748113efbb76b887', slot: "action" }, h("slot", { key: '656f07644cd0d2e9a15263f644676a3e698d005d', 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: '2384c04a8610e5d26bcd3e3fb4e70c99fca7d76a', slot: "content", class: "r-typography" }, h("slot", { key: '52ce40873c2e32725ee8ef8fc385d498ff8b973c' })));
|
|
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: 'bdbaecb36f49d54a1b33ef27d1c954834df68198', slot: "headline" }, h("slot", { key: '82eb6ae289211e5a23149e12125c1c30cf6b3ffd' })));
|
|
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: '6c97f11b7263d0cf574fdafcef3d7a9733fe7925', slot: "trigger", onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("slot", { key: '7d434e3505eda793e8d1d50f9fb1aa608061fa50' })));
|
|
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: '832812688a18bea634c8ff2c5ea69599cdefdcff' }, h("progress", Object.assign({ key: 'd3384feada9ee1594e3ee331377d30ae1e8725f1' }, progressBarAttrs, { class: "r-progress-bar" }))));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "r-progress-bar"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -118,11 +118,11 @@ export class RadioButton {
|
|
|
118
118
|
required,
|
|
119
119
|
autofocus
|
|
120
120
|
};
|
|
121
|
-
return (h(Host, { key: '
|
|
122
|
-
h("div", { key: '
|
|
123
|
-
h("div", { key: '
|
|
124
|
-
h("r-hint", { key: '
|
|
125
|
-
h("r-hint", { key: '
|
|
121
|
+
return (h(Host, { key: 'ce9e98b6480c18675ac0dac4b118e574872f9af7' }, h("label", { key: 'adb23e0f9092e7c5bc2c0c70df71fa255f8a441b', class: "r-radio-button", onClick: this.onClick, onKeyDown: this.onKeydown }, h("input", Object.assign({ key: 'cdd35d3caebb8e7eb8162dcc97c73f85067a55bb' }, inputAttrs, { id: `${uniqueId}-input`, class: "r-radio-button--input", ref: el => this.nativeEl = el, onFocus: this.onFocus, onBlur: this.onBlur })), h("span", { key: '89e258e8d5b41a51ff48ad26f1e83bcdb447089a', class: "r-radio-button--box" }), this.isLeading &&
|
|
122
|
+
h("div", { key: '14e5cbd3fb54b86761f68f53f64081be3021bf9d', class: "r-radio-button--leading" }, h("slot", { key: '8350ee29002de443338179d8e926356fa080cb97', name: "leading" }, this.icon && h("r-icon", { key: 'ba1ad94e6eabd2aa113e46ddc4f5f7cdc8e39635', name: this.icon, size: "m" }))), h("div", { key: '75c735e748dc36c3c785cb048f920060f31c7c9a', class: "r-radio-button--text" }, h("slot", { key: 'b2f39d35860d6ed36bf1913836af065ed093a9b4', name: "title" }, h("div", { key: '4f6fdd992b61a01c13810fbee76f66d514f8e8e2', style: { display: 'contents' } }, h("slot", { key: 'b0d6d3eb4b9687751822fd6e026cc5eec2fe3d6b' }))), h("slot", { key: '66f2d4a0262d494b4c5c700e48abb7210e5fc8df', name: "description" }, this.description)), this.isTrailing &&
|
|
123
|
+
h("div", { key: '64bb5efd43a7e52461dff3e3416c968bbe44d1a4', class: "r-radio-button--trailing" }, h("slot", { key: '20798c2198cc1360f6b04fa0a94984bb697eda6c', name: "trailing" }))), invalid && error &&
|
|
124
|
+
h("r-hint", { key: '06bd4aa937a926612c428e9f9cfcde98e60c6ca7', role: "alert", variant: "error", id: `${uniqueId}-hint` }, this.error), hint &&
|
|
125
|
+
h("r-hint", { key: '5031e00344241c184fb8ef2aa8275274415b8a3e', role: "note", variant: "information", id: `${uniqueId}-hint` }, hint)));
|
|
126
126
|
}
|
|
127
127
|
static get is() { return "r-radio-button"; }
|
|
128
128
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ import { Host, h } from "@stencil/core";
|
|
|
4
4
|
*/
|
|
5
5
|
export class RadioButtonDescription {
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '30f29f811a727ba758a1e5b89fb86baf78076694', slot: "description" }, h("div", { key: '233da5297c2b1e47def8e92f0d8e9a5fba846dc8', class: "r-radio-button-description", style: { display: 'contents' } }, h("slot", { key: 'f00f06ec8f07b3995fb2249977cad70df930a4c9' }))));
|
|
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: 'fcfa2b1df999df8a168bd0255ad7855dce28485c', slot: "leading" }, h("div", { key: '2d0e091a66adb24576f5e4a2f0959b8c83dc2017', class: "r-radio-button-leading", style: { display: 'contents' } }, h("slot", { key: 'cebdf0262db3ce092efbe2e8e830aa54903aa59e' }))));
|
|
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: '12da195c66d902eba41e84b1ccaf3efbabbac144', slot: "title" }, h("div", { key: '84fc3a3e1d0b9b641a7fb859d03e904b5009cb44', class: "r-radio-button-title", style: { display: 'contents' } }, h("slot", { key: '6562965e5dfa79f4b9f80f22b4293e8ea600e4b2' }))));
|
|
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: 'b9fc1731ecc2b522e341cfaceb5b703c8d74253f', slot: "trailing" }, h("div", { key: 'f1319664b1543a4a784cb2cd665567a4d561bdc3', class: "r-radio-button-trailing", style: { display: 'contents' } }, h("slot", { key: 'dbed8559c3b0a5ba2580fe9e8c297e7eb947e5a5' }))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "r-radio-button-trailing"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -318,6 +318,9 @@ export class RadioGroup {
|
|
|
318
318
|
var _a, _b;
|
|
319
319
|
return ((_b = (_a = this.radioButtonElements[0]) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.r-radio-button--input')) || null;
|
|
320
320
|
}
|
|
321
|
+
get hasValidationError() {
|
|
322
|
+
return this.validityState && this.validityState !== 'valid' && !!(this.validityMessage || this.customErrorMessage);
|
|
323
|
+
}
|
|
321
324
|
passPropsToGroupItems(props = {}) {
|
|
322
325
|
Object.entries(props).forEach(([key, value]) => {
|
|
323
326
|
this.radioButtonElements.forEach(el => {
|
|
@@ -403,11 +406,11 @@ export class RadioGroup {
|
|
|
403
406
|
'aria-invalid': `${invalid || false}`,
|
|
404
407
|
'aria-describedby': this.ariaDescribedBy
|
|
405
408
|
};
|
|
406
|
-
return (h(Host, { key: '
|
|
407
|
-
h("legend", { key: '
|
|
408
|
-
h("r-hint", { key: '
|
|
409
|
-
h("r-hint", { key: '
|
|
410
|
-
h("r-hint", { key: '
|
|
409
|
+
return (h(Host, { key: 'a542762b5523cd568341316eb9e1d3ba328662f3' }, h("fieldset", Object.assign({ key: 'cd6877a67816eff8a423a60ef1e9079cab4ea21a', class: "r-radio-group" }, fieldsetAttrs, { onClick: this.onLabelClick }), label &&
|
|
410
|
+
h("legend", { key: '00adcfa6fa8296f295b48f90d19b11928fb580d6', class: "r-radio-group--label-container" }, h("r-label", { key: 'f353298317ffe0043dd0dae0905499ef17fa90ba', id: `${uniqueId}-label`, class: "r-radio-group--label", "field-indicator": fieldIndicator }, label), h("slot", { key: '5e9ecf61a1a65f20ed3e48006f2a913723bdfb38', name: "popover" })), hint &&
|
|
411
|
+
h("r-hint", { key: '0e266db62c6bb2f8a770502ab64ca7f2edc54d39', id: `${uniqueId}-hint`, class: "r-radio-group--hint", role: "note" }, hint), h("div", { key: '2d951da223a892721db7e5d858e52b27eebfcf98', class: "r-radio-group--content" }, h("slot", { key: '341225a7be93a07fa9c3e4c96241f84c8008b182' })), h("div", { key: '255d3bbd8fd5b192e4dd2cca03bb7b0e2bdefd0e', id: `${uniqueId}-message`, "aria-live": "polite", role: "alert", class: "r-radio-group--message" }, invalid && error &&
|
|
412
|
+
h("r-hint", { key: '7c91e92235c2d4bd36baf327ce0bf7ed18982886', variant: "error" }, error), this.hasValidationError &&
|
|
413
|
+
h("r-hint", { key: '522a8a74f88356d42929f9e1fe4ab2a4326d25d7', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, this.customErrorMessage || this.validityMessage)))));
|
|
411
414
|
}
|
|
412
415
|
static get is() { return "r-radio-group"; }
|
|
413
416
|
static get encapsulation() { return "shadow"; }
|
|
@@ -555,6 +555,11 @@ export class Select {
|
|
|
555
555
|
this.touched = false;
|
|
556
556
|
this.dirty = false;
|
|
557
557
|
}
|
|
558
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
559
|
+
async setCustomValidity(message) {
|
|
560
|
+
this.customErrorMessage = message;
|
|
561
|
+
this.validateFormElement(this.nativeElement);
|
|
562
|
+
}
|
|
558
563
|
/**
|
|
559
564
|
* Validates the textarea without triggering UI and returns a boolean indicating its validity.
|
|
560
565
|
* @returns A boolean indicating whether the textarea is valid.
|
|
@@ -1013,8 +1018,9 @@ export class Select {
|
|
|
1013
1018
|
return this.invalid && ((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1014
1019
|
}
|
|
1015
1020
|
get hasValidationError() {
|
|
1016
|
-
|
|
1017
|
-
|
|
1021
|
+
if (!this.validityState)
|
|
1022
|
+
return false;
|
|
1023
|
+
return this.validityState !== 'valid' && !!(this.validityMessage || this.customErrorMessage);
|
|
1018
1024
|
}
|
|
1019
1025
|
get hasMessage() {
|
|
1020
1026
|
return this.hasError || this.hasValidationError;
|
|
@@ -1082,8 +1088,8 @@ export class Select {
|
|
|
1082
1088
|
disabled,
|
|
1083
1089
|
required: isRequired
|
|
1084
1090
|
};
|
|
1085
|
-
return (h(Host, { key: '
|
|
1086
|
-
h("r-hint", { key: '
|
|
1091
|
+
return (h(Host, { key: '760b35180f5c0e716387bf92b886aef11d33a433', "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}`, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { key: 'ba9308fb7a9d91d0464a723ac00916832ceaef9d', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: '6de28553dd9a44fd3f0d8b73fffdbaabc2d724d1', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: 'f4eb1fbe89376b3f3d886d0acfb33616a0df9e61', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: 'fa2829ffca13fe5640e75650646aa0dafe44d31c' }, labelAttr), label)), h("slot", { key: '27dca50b5e65eedd73c40992734134f1e52b15d3', name: "popover" })), hint &&
|
|
1092
|
+
h("r-hint", { key: '32ebd3a250e9917f51788347f8683095b701e694', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: '2e195fab570c59cd8e5c038ad2c395c08bc10592', class: "r-select" }, h("select", Object.assign({ key: '3ef7ca05510c50c2453f6c30e1faf3558c602a9c', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: 'bf431b52523f3a810c60db6c20bae82f0bd12dc4', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: 'e716d8ea4f124373a1f56f80e4c7f6b2399c6b09', 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: '61e5bbcdff156c61f4f46c8fc2f8dddc30fe345a', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: '8b0949058681d8274aaac39d184a0e59ae91fec8', onSlotchange: this.handleSlotChange })))), h("div", { key: 'd007a8402ecea45df2d24b0169a30856a12c45a0', 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: '83ebfc3c344452d15213087284035853b54b1b3d', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage)))));
|
|
1087
1093
|
}
|
|
1088
1094
|
static get is() { return "r-select"; }
|
|
1089
1095
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1795,6 +1801,27 @@ export class Select {
|
|
|
1795
1801
|
"tags": []
|
|
1796
1802
|
}
|
|
1797
1803
|
},
|
|
1804
|
+
"setCustomValidity": {
|
|
1805
|
+
"complexType": {
|
|
1806
|
+
"signature": "(message: string) => Promise<void>",
|
|
1807
|
+
"parameters": [{
|
|
1808
|
+
"name": "message",
|
|
1809
|
+
"type": "string",
|
|
1810
|
+
"docs": ""
|
|
1811
|
+
}],
|
|
1812
|
+
"references": {
|
|
1813
|
+
"Promise": {
|
|
1814
|
+
"location": "global",
|
|
1815
|
+
"id": "global::Promise"
|
|
1816
|
+
}
|
|
1817
|
+
},
|
|
1818
|
+
"return": "Promise<void>"
|
|
1819
|
+
},
|
|
1820
|
+
"docs": {
|
|
1821
|
+
"text": "Validates an element, displays provided message in case value is invalid.",
|
|
1822
|
+
"tags": []
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1798
1825
|
"checkValidity": {
|
|
1799
1826
|
"complexType": {
|
|
1800
1827
|
"signature": "() => Promise<boolean>",
|
|
@@ -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: 'f55e1ac28062ff9c02ab76c3e1b9aede186743a2', 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: '89a1ac5a1cf7e842eb2083469c802b41de0d24a2', class: "r-select-option" }, icon && h("span", { key: '97dfa1b0384b43175e42aab83d27afbca3ba954d', class: "r-select-option--icon" }, h("r-icon", Object.assign({ key: 'd22429de6f0f5e44e265a71626eb839129ab0792' }, iconAttributes))), !icon && hasIconSlot && h("span", { key: 'b660efa16353c5f0ad5953e576eb1dab6779da02', class: "r-select-option--icon" }, h("slot", { key: '99495694c323df2122e039414c1fdb1588b3e59f', name: "icon" })), h("span", { key: '0630026934eab56f02a309ae668667fbaf9ec1c9', class: "r-select-option--label" }, h("slot", { key: '2d4fb9319fc58ac4a838f1799046e4822f2bccf3' })))));
|
|
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: '0a243668431f65138c3bf66e40013eb4be72a2be' }, h("slot", { key: '65749c9f436173b7497d11a8f71e5237317e4d3e' })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "r-skip-link"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -81,7 +81,7 @@ export class Stepper {
|
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
83
|
const completed = this.completed || this.completeSteps;
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: 'd4e3e3aca9a2c52e3549c686679ca6d110b715c0' }, h("ol", { key: '7cad36ede8507e3583f877ce3856df903f5ddd80', 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: '4942b4293e607acc74afa59a49dd4b4ce0348f5e', onSlotchange: this.handleSlotChange }))));
|
|
85
85
|
}
|
|
86
86
|
static get is() { return "r-stepper"; }
|
|
87
87
|
static get encapsulation() { return "shadow"; }
|
|
@@ -26,8 +26,8 @@ export class StepperItem {
|
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
28
|
const number = this.number || this.stepNumber;
|
|
29
|
-
return (h(Host, { key: '
|
|
30
|
-
h("div", { key: '
|
|
29
|
+
return (h(Host, { key: '2a3f15db4e1214ddb2b9b9ca61f7be4f7cc93cdf', role: "listitem", "aria-current": this.active ? 'step' : null }, h("div", { key: '98026269db0de698e020ac591d99cb4ac8ff296b', class: "r-stepper-item" }, h("div", { key: '87227beabbe2200e0ac4e99fa4246a72eaaebf55', 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: '447f86dfda0e76666e5d313f088e45e7a0a86787', "data-visually-hidden-only": `${this.hasOnlyVisuallyHiddenContent}`, class: "r-stepper-item--text" }, h("slot", { key: '039013569ab20d64f2e067325f341b2d720acc19' })))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "r-stepper-item"; }
|
|
33
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,9 +43,9 @@ export class RTab {
|
|
|
43
43
|
'aria-selected': `${active}`,
|
|
44
44
|
'aria-disabled': `${disabled}`
|
|
45
45
|
};
|
|
46
|
-
return (h(Host, Object.assign({ key: '
|
|
46
|
+
return (h(Host, Object.assign({ key: 'b68ad2b51c624ef92886f791e2093951ec235042', onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, hostAttrs), h("span", { key: '59898569007666db12270834489378d695b7b651', class: "r-tab" }, disabled ?
|
|
47
47
|
h("r-icon", { class: "r-tab--disabled-icon", size: "s", name: "circle-slash" })
|
|
48
|
-
: h("slot", { name: "icon" }), h("slot", { key: '
|
|
48
|
+
: h("slot", { name: "icon" }), h("slot", { key: '5e3b5ace265b9884bd659311d23955c084da995b' }))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "r-tab"; }
|
|
51
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: '22e44ca7e5addc5d912e8005374cf0b01149eabe', class: "r-typography" }, hostAttrs), h("div", { key: '4b9498ba0f513636a5cfa0c29eb8158ab9ebca70', class: "r-tab-panel" }, h("slot", { key: 'e6d9d6538663c6a3b6c6772242bb8b7a107f26c0' }))));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "r-tab-panel"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|