@riverty/web-components 5.7.0 → 6.0.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 +128 -0
- package/custom-elements.json +152 -372
- package/dist/cjs/index-DJ4H_bFj.js +6 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +5 -35
- package/dist/cjs/r-accordion.cjs.entry.js +3 -7
- package/dist/cjs/r-alert.cjs.entry.js +45 -14
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-button.cjs.entry.js +2 -2
- package/dist/cjs/r-checkbox-group.cjs.entry.js +28 -24
- package/dist/cjs/r-checkbox.cjs.entry.js +97 -81
- package/dist/cjs/r-dialog.cjs.entry.js +3 -11
- package/dist/cjs/r-hint_2.cjs.entry.js +50 -0
- package/dist/cjs/{r-hint_3.cjs.entry.js → r-icon-button_2.cjs.entry.js} +64 -51
- package/dist/cjs/r-icon.cjs.entry.js +1 -1
- package/dist/cjs/r-input-code.cjs.entry.js +133 -25
- package/dist/cjs/r-input-date.cjs.entry.js +87 -23
- package/dist/cjs/r-input-password.cjs.entry.js +34 -13
- package/dist/cjs/r-input-phone-number.cjs.entry.js +30 -22
- package/dist/cjs/r-input.cjs.entry.js +108 -49
- package/dist/cjs/r-list-item.cjs.entry.js +5 -5
- package/dist/cjs/r-pagination.cjs.entry.js +1 -1
- package/dist/cjs/r-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-action.cjs.entry.js +2 -2
- 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 +3 -3
- 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 +29 -12
- package/dist/cjs/r-radio-group.cjs.entry.js +32 -32
- package/dist/cjs/r-select-option.cjs.entry.js +1 -1
- package/dist/cjs/r-select.cjs.entry.js +116 -40
- 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 +1 -1
- package/dist/cjs/r-textarea.cjs.entry.js +24 -23
- package/dist/cjs/r-toast-group.cjs.entry.js +1 -1
- package/dist/cjs/r-toast.cjs.entry.js +51 -20
- package/dist/cjs/web-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/accordion/accordion.css +0 -2
- package/dist/collection/components/accordion/accordion.js +4 -8
- package/dist/collection/components/accordion/exports.js +1 -1
- package/dist/collection/components/accordion-panel/accordion-panel.js +1 -1
- package/dist/collection/components/accordion-section/accordion-section.js +1 -1
- package/dist/collection/components/accordion-trigger/accordion-trigger.css +0 -4
- package/dist/collection/components/accordion-trigger/accordion-trigger.js +4 -215
- package/dist/collection/components/alert/alert.css +58 -12
- package/dist/collection/components/alert/alert.js +92 -17
- package/dist/collection/components/alert/exports.js +1 -1
- package/dist/collection/components/badge/badge.js +1 -1
- package/dist/collection/components/button/button.css +6 -7
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +121 -104
- package/dist/collection/components/checkbox-group/checkbox-group.js +48 -63
- package/dist/collection/components/dialog/dialog.css +1 -3
- package/dist/collection/components/dialog/dialog.js +2 -10
- package/dist/collection/components/hint/hint.js +2 -2
- package/dist/collection/components/icon/bundled-icons/riverty-kit.json +1 -1
- package/dist/collection/components/icon/riverty-kit.js +1 -1
- package/dist/collection/components/icon-button/icon-button.css +0 -7
- package/dist/collection/components/icon-button/icon-button.js +3 -3
- package/dist/collection/components/input/input.css +3 -0
- package/dist/collection/components/input/input.js +221 -378
- package/dist/collection/components/input-code/exports.js +2 -0
- package/dist/collection/components/input-code/input-code.js +335 -34
- package/dist/collection/components/input-date/input-date.js +237 -87
- package/dist/collection/components/input-password/exports.js +1 -0
- package/dist/collection/components/input-password/input-password.css +1 -0
- package/dist/collection/components/input-password/input-password.js +233 -75
- package/dist/collection/components/input-phone-number/input-phone-number.js +50 -85
- package/dist/collection/components/label/label.js +3 -113
- package/dist/collection/components/list-item/list-item/list-item.css +7 -7
- package/dist/collection/components/list-item/list-item/list-item.js +4 -26
- package/dist/collection/components/pagination/pagination.css +23 -23
- package/dist/collection/components/panel/panel.js +2 -2
- package/dist/collection/components/popover/exports.js +0 -1
- package/dist/collection/components/popover/popover.css +13 -13
- package/dist/collection/components/popover/popover.js +2 -55
- package/dist/collection/components/popover-action/popover-action.css +3 -5
- 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 +49 -12
- 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 +53 -135
- package/dist/collection/components/select/select.js +197 -349
- 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 +1 -1
- package/dist/collection/components/tabs-list/tabs-list.js +1 -1
- package/dist/collection/components/textarea/textarea.js +44 -163
- package/dist/collection/components/toast/toast.css +22 -14
- package/dist/collection/components/toast/toast.js +95 -43
- package/dist/collection/components/toast-group/toast-group.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/esm/index-Da7qOBFr.js +6 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/r-accordion-panel.entry.js +1 -1
- package/dist/esm/r-accordion-section.entry.js +1 -1
- package/dist/esm/r-accordion-trigger.entry.js +5 -35
- package/dist/esm/r-accordion.entry.js +3 -7
- package/dist/esm/r-alert.entry.js +45 -14
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-button.entry.js +2 -2
- package/dist/esm/r-checkbox-group.entry.js +28 -24
- package/dist/esm/r-checkbox.entry.js +97 -81
- package/dist/esm/r-dialog.entry.js +3 -11
- package/dist/esm/r-hint_2.entry.js +47 -0
- package/dist/esm/{r-hint_3.entry.js → r-icon-button_2.entry.js} +65 -51
- package/dist/esm/r-icon.entry.js +1 -1
- package/dist/esm/r-input-code.entry.js +133 -25
- package/dist/esm/r-input-date.entry.js +87 -23
- package/dist/esm/r-input-password.entry.js +34 -13
- package/dist/esm/r-input-phone-number.entry.js +30 -22
- package/dist/esm/r-input.entry.js +108 -49
- package/dist/esm/r-list-item.entry.js +5 -5
- package/dist/esm/r-pagination.entry.js +1 -1
- package/dist/esm/r-panel.entry.js +2 -2
- package/dist/esm/r-popover-action.entry.js +2 -2
- 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 +3 -3
- 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 +29 -12
- package/dist/esm/r-radio-group.entry.js +32 -32
- package/dist/esm/r-select-option.entry.js +1 -1
- package/dist/esm/r-select.entry.js +116 -40
- 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 +1 -1
- package/dist/esm/r-textarea.entry.js +24 -23
- package/dist/esm/r-toast-group.entry.js +1 -1
- package/dist/esm/r-toast.entry.js +51 -20
- package/dist/esm/web-components.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +1 -5
- package/dist/types/components/accordion/exports.d.ts +1 -1
- package/dist/types/components/accordion-trigger/accordion-trigger.d.ts +0 -36
- package/dist/types/components/alert/alert.d.ts +9 -1
- package/dist/types/components/alert/exports.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +29 -34
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +6 -11
- package/dist/types/components/dialog/dialog.d.ts +0 -2
- package/dist/types/components/input/input.d.ts +35 -72
- package/dist/types/components/input-code/exports.d.ts +4 -0
- package/dist/types/components/input-code/input-code.d.ts +54 -7
- package/dist/types/components/input-date/input-date.d.ts +30 -16
- package/dist/types/components/input-password/exports.d.ts +1 -0
- package/dist/types/components/input-password/input-password.d.ts +53 -16
- package/dist/types/components/input-phone-number/input-phone-number.d.ts +5 -16
- package/dist/types/components/label/label.d.ts +0 -18
- package/dist/types/components/list-item/list-item/list-item.d.ts +0 -6
- package/dist/types/components/popover/exports.d.ts +0 -2
- package/dist/types/components/popover/popover.d.ts +1 -14
- package/dist/types/components/radio-button/radio-button.d.ts +5 -0
- package/dist/types/components/radio-group/radio-group.d.ts +6 -28
- package/dist/types/components/select/select.d.ts +34 -52
- package/dist/types/components/textarea/textarea.d.ts +5 -32
- package/dist/types/components/toast/toast.d.ts +10 -7
- package/dist/types/components.d.ts +347 -647
- package/dist/web-components/bundled-icons/riverty-kit.json +1 -1
- package/dist/web-components/p-0347feff.entry.js +1 -0
- package/dist/web-components/p-05738503.entry.js +1 -0
- package/dist/web-components/p-0e4c8bf1.entry.js +1 -0
- package/dist/web-components/p-1da75540.entry.js +1 -0
- package/dist/web-components/p-26ef77d6.entry.js +1 -0
- package/dist/web-components/p-3884c6e7.entry.js +1 -0
- package/dist/web-components/p-3a5a67e7.entry.js +1 -0
- package/dist/web-components/p-3f60c6c0.entry.js +1 -0
- package/dist/web-components/p-4254a383.entry.js +1 -0
- package/dist/web-components/{p-87f39749.entry.js → p-4595fa8e.entry.js} +1 -1
- package/dist/web-components/{p-4e3df002.entry.js → p-4cc58c6a.entry.js} +1 -1
- package/dist/web-components/p-5441b746.entry.js +1 -0
- package/dist/web-components/{p-72fa1fd1.entry.js → p-550e2237.entry.js} +1 -1
- package/dist/web-components/p-589baaf9.entry.js +1 -0
- package/dist/web-components/p-60341de2.entry.js +1 -0
- package/dist/web-components/{p-4bd3e077.entry.js → p-60ca994e.entry.js} +1 -1
- package/dist/web-components/{p-44ae9f33.entry.js → p-62b788bf.entry.js} +1 -1
- package/dist/web-components/{p-2b2f581a.entry.js → p-6303b9fe.entry.js} +1 -1
- package/dist/web-components/p-63fd817d.entry.js +1 -0
- package/dist/web-components/{p-e0e2f2b2.entry.js → p-673dbfd0.entry.js} +1 -1
- package/dist/web-components/p-67fa3f84.entry.js +1 -0
- package/dist/web-components/p-6a4f3836.entry.js +1 -0
- package/dist/web-components/p-6cc2ea2c.entry.js +1 -0
- package/dist/web-components/p-70784685.entry.js +1 -0
- package/dist/web-components/{p-429213ea.entry.js → p-7fed6f4d.entry.js} +1 -1
- package/dist/web-components/p-8a66d20c.entry.js +1 -0
- package/dist/web-components/{p-0bb04d79.entry.js → p-8b4d2448.entry.js} +1 -1
- package/dist/web-components/{p-c7f8e59b.entry.js → p-8c31cbd5.entry.js} +1 -1
- package/dist/web-components/p-8dac326b.entry.js +1 -0
- package/dist/web-components/{p-1c2497de.entry.js → p-9ef1bbee.entry.js} +1 -1
- package/dist/web-components/p-a0dbde7c.entry.js +1 -0
- package/dist/web-components/{p-755cc697.entry.js → p-a71485d8.entry.js} +1 -1
- package/dist/web-components/p-a7d22c76.entry.js +1 -0
- package/dist/web-components/{p-85a9af42.entry.js → p-ae251d2f.entry.js} +1 -1
- package/dist/web-components/{p-77155630.entry.js → p-b98ab649.entry.js} +1 -1
- package/dist/web-components/p-b9e3b3d6.entry.js +1 -0
- package/dist/web-components/p-c1e748f2.entry.js +1 -0
- package/dist/web-components/p-c478712b.entry.js +1 -0
- package/dist/web-components/{p-72c0c0d8.entry.js → p-d054eb4d.entry.js} +1 -1
- package/dist/web-components/p-d433a828.entry.js +1 -0
- package/dist/web-components/p-d7726e46.entry.js +1 -0
- package/dist/web-components/p-d819c8e5.entry.js +1 -0
- package/dist/web-components/p-e2188953.entry.js +1 -0
- package/dist/web-components/{p-3b4e3faf.entry.js → p-e5945c01.entry.js} +1 -1
- package/dist/web-components/{p-d1379ac6.entry.js → p-f9d5004c.entry.js} +1 -1
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/r-accordion-item.cjs.entry.js +0 -78
- package/dist/cjs/r-icon-button.cjs.entry.js +0 -81
- package/dist/collection/components/accordion-item/accordion-item.css +0 -121
- package/dist/collection/components/accordion-item/accordion-item.js +0 -138
- package/dist/esm/r-accordion-item.entry.js +0 -76
- package/dist/esm/r-icon-button.entry.js +0 -79
- package/dist/types/components/accordion-item/accordion-item.d.ts +0 -26
- package/dist/web-components/p-00ca474f.entry.js +0 -1
- package/dist/web-components/p-289eb4b0.entry.js +0 -1
- package/dist/web-components/p-2b8e12ae.entry.js +0 -1
- package/dist/web-components/p-2e2c8a5b.entry.js +0 -1
- package/dist/web-components/p-3a39932b.entry.js +0 -1
- package/dist/web-components/p-3bc93d65.entry.js +0 -1
- package/dist/web-components/p-44be9992.entry.js +0 -1
- package/dist/web-components/p-4652635a.entry.js +0 -1
- package/dist/web-components/p-51a5804b.entry.js +0 -1
- package/dist/web-components/p-63474b32.entry.js +0 -1
- package/dist/web-components/p-74d2a563.entry.js +0 -1
- package/dist/web-components/p-7ad8e78b.entry.js +0 -1
- package/dist/web-components/p-8028c2a9.entry.js +0 -1
- package/dist/web-components/p-96ddeb7f.entry.js +0 -1
- package/dist/web-components/p-9d898089.entry.js +0 -1
- package/dist/web-components/p-9e50120b.entry.js +0 -1
- package/dist/web-components/p-9eb1f262.entry.js +0 -1
- package/dist/web-components/p-a022f356.entry.js +0 -1
- package/dist/web-components/p-a7e7f8fa.entry.js +0 -1
- package/dist/web-components/p-b2f03016.entry.js +0 -1
- package/dist/web-components/p-c300c22f.entry.js +0 -1
- package/dist/web-components/p-c937bd92.entry.js +0 -1
- package/dist/web-components/p-cbcd7699.entry.js +0 -1
- package/dist/web-components/p-d93c240d.entry.js +0 -1
- package/dist/web-components/p-e4b66277.entry.js +0 -1
- package/dist/web-components/p-e6a31881.entry.js +0 -1
- package/dist/web-components/p-f6a92287.entry.js +0 -1
- package/dist/web-components/p-f770e22b.entry.js +0 -1
- package/dist/web-components/p-f952161b.entry.js +0 -1
|
@@ -8,25 +8,29 @@ import { appendControlToFormData } from "../../utils/formData";
|
|
|
8
8
|
*/
|
|
9
9
|
export class Checkbox {
|
|
10
10
|
constructor() {
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
* Controls the visibility of validation indicators for the field.
|
|
14
|
-
* */
|
|
15
|
-
this.showValid = false;
|
|
11
|
+
/** Automatically focus the checkbox when the component is mounted. Note: Only one element per page should have autofocus set to true, following browser standard behavior. */
|
|
12
|
+
this.autofocus = false;
|
|
16
13
|
this.validityState = '';
|
|
17
14
|
this.validityMessage = '';
|
|
15
|
+
this.touched = false;
|
|
16
|
+
// Private properties
|
|
18
17
|
this.initial = {};
|
|
18
|
+
this.uniqueId = `r-checkbox-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
19
|
+
// Private methods
|
|
19
20
|
this.getValidityStateData = (element) => {
|
|
21
|
+
let validityState = '';
|
|
22
|
+
let validityMessage = '';
|
|
20
23
|
for (const state in element.validity) {
|
|
21
24
|
if (element.validity[state]) {
|
|
22
|
-
|
|
25
|
+
validityState = state;
|
|
23
26
|
if (this[state + 'Message']) {
|
|
24
|
-
|
|
25
|
-
return;
|
|
27
|
+
validityMessage = this[state + 'Message'];
|
|
28
|
+
return { validityState, validityMessage };
|
|
26
29
|
}
|
|
27
|
-
|
|
30
|
+
validityMessage = element.validationMessage;
|
|
28
31
|
}
|
|
29
32
|
}
|
|
33
|
+
return { validityState, validityMessage };
|
|
30
34
|
};
|
|
31
35
|
this.validateFormElement = (element = null) => {
|
|
32
36
|
if (element === null)
|
|
@@ -35,7 +39,9 @@ export class Checkbox {
|
|
|
35
39
|
return;
|
|
36
40
|
if (this.error)
|
|
37
41
|
return;
|
|
38
|
-
this.getValidityStateData(element);
|
|
42
|
+
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
43
|
+
this.validityState = validityState;
|
|
44
|
+
this.validityMessage = validityMessage;
|
|
39
45
|
const isValid = this.validityState === 'valid';
|
|
40
46
|
this.valid = isValid;
|
|
41
47
|
this.invalid = !isValid;
|
|
@@ -44,9 +50,6 @@ export class Checkbox {
|
|
|
44
50
|
message: this.validityMessage
|
|
45
51
|
});
|
|
46
52
|
};
|
|
47
|
-
/** Unique id */
|
|
48
|
-
this.uniqueId = `r-checkbox-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
49
|
-
this.touched = false;
|
|
50
53
|
this.handleClick = (event) => {
|
|
51
54
|
if (this.disabled)
|
|
52
55
|
return;
|
|
@@ -78,18 +81,13 @@ export class Checkbox {
|
|
|
78
81
|
this.contributeToFormData = (event) => {
|
|
79
82
|
appendControlToFormData(this.nativeElement || this.host, event.formData);
|
|
80
83
|
};
|
|
84
|
+
this.applyAutofocus = () => {
|
|
85
|
+
queueMicrotask(() => {
|
|
86
|
+
this.setFocus();
|
|
87
|
+
});
|
|
88
|
+
};
|
|
81
89
|
}
|
|
82
|
-
|
|
83
|
-
get parentFormEl() {
|
|
84
|
-
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
85
|
-
}
|
|
86
|
-
/** Determine whether this element should be ignored during Constraint Validation API validation. */
|
|
87
|
-
get isNoValidate() {
|
|
88
|
-
var _a;
|
|
89
|
-
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
90
|
-
this.novalidate ||
|
|
91
|
-
false);
|
|
92
|
-
}
|
|
90
|
+
// Public Methods
|
|
93
91
|
/**
|
|
94
92
|
* Asynchronously retrieves the validity state of the checkbox.
|
|
95
93
|
*
|
|
@@ -102,56 +100,14 @@ export class Checkbox {
|
|
|
102
100
|
* - `message`: A string containing the validity message.
|
|
103
101
|
*/
|
|
104
102
|
async getValidityState() {
|
|
105
|
-
this.getValidityStateData(this.nativeElement);
|
|
103
|
+
const { validityState, validityMessage } = this.getValidityStateData(this.nativeElement);
|
|
104
|
+
this.validityState = validityState;
|
|
105
|
+
this.validityMessage = validityMessage;
|
|
106
106
|
return {
|
|
107
107
|
state: this.validityState,
|
|
108
108
|
message: this.validityMessage
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
async handleCheckedChange() {
|
|
112
|
-
// Only proceed if checkbox has been interacted with
|
|
113
|
-
if (!this.touched)
|
|
114
|
-
return;
|
|
115
|
-
if (this.disabled)
|
|
116
|
-
return;
|
|
117
|
-
const { host, value, checked } = this;
|
|
118
|
-
this.rChange.emit({ element: host, value, checked });
|
|
119
|
-
// Update native element checked state
|
|
120
|
-
if (this.nativeElement) {
|
|
121
|
-
this.nativeElement.checked = checked;
|
|
122
|
-
}
|
|
123
|
-
// Validate if required
|
|
124
|
-
if (this.required && !this.isNoValidate) {
|
|
125
|
-
this.validateFormElement(this.nativeElement);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
connectFormEventListeners() {
|
|
129
|
-
var _a, _b, _c;
|
|
130
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
131
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
132
|
-
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('reset', this.onResetForm);
|
|
133
|
-
}
|
|
134
|
-
disconnectFormEventListeners() {
|
|
135
|
-
var _a, _b, _c;
|
|
136
|
-
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.contributeToFormData);
|
|
137
|
-
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('submit', this.onSubmitForm);
|
|
138
|
-
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('reset', this.onResetForm);
|
|
139
|
-
}
|
|
140
|
-
componentWillLoad() {
|
|
141
|
-
this.initial['checked'] = this.checked;
|
|
142
|
-
this.initial['invalid'] = this.invalid;
|
|
143
|
-
}
|
|
144
|
-
componentDidLoad() {
|
|
145
|
-
if (this.nativeElement) {
|
|
146
|
-
this.nativeElement.indeterminate = this.indeterminate;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
connectedCallback() {
|
|
150
|
-
this.connectFormEventListeners();
|
|
151
|
-
}
|
|
152
|
-
disconnectedCallback() {
|
|
153
|
-
this.disconnectFormEventListeners();
|
|
154
|
-
}
|
|
155
111
|
/**
|
|
156
112
|
* Sets focus on the checkbox element.
|
|
157
113
|
*/
|
|
@@ -197,6 +153,44 @@ export class Checkbox {
|
|
|
197
153
|
async clearIndeterminate() {
|
|
198
154
|
this.indeterminate = false;
|
|
199
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Validates the checkbox without triggering UI and returns a boolean indicating its validity.
|
|
158
|
+
* @returns A boolean indicating whether the checkbox is valid.
|
|
159
|
+
*/
|
|
160
|
+
async checkValidity() {
|
|
161
|
+
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
162
|
+
return validityState === 'valid';
|
|
163
|
+
}
|
|
164
|
+
// Watchers
|
|
165
|
+
async handleCheckedChange() {
|
|
166
|
+
// Only proceed if checkbox has been interacted with
|
|
167
|
+
if (!this.touched)
|
|
168
|
+
return;
|
|
169
|
+
if (this.disabled)
|
|
170
|
+
return;
|
|
171
|
+
const { host, value, checked } = this;
|
|
172
|
+
this.rChange.emit({ element: host, value, checked });
|
|
173
|
+
// Update native element checked state
|
|
174
|
+
if (this.nativeElement) {
|
|
175
|
+
this.nativeElement.checked = checked;
|
|
176
|
+
}
|
|
177
|
+
// Validate if required
|
|
178
|
+
if (this.required && !this.isNoValidate) {
|
|
179
|
+
this.validateFormElement(this.nativeElement);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// Getters
|
|
183
|
+
/** Identify wrapping form element */
|
|
184
|
+
get parentFormEl() {
|
|
185
|
+
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
186
|
+
}
|
|
187
|
+
/** Determine whether this element should be ignored during Constraint Validation API validation. */
|
|
188
|
+
get isNoValidate() {
|
|
189
|
+
var _a;
|
|
190
|
+
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
191
|
+
this.novalidate ||
|
|
192
|
+
false);
|
|
193
|
+
}
|
|
200
194
|
get hasErrorMessage() {
|
|
201
195
|
var _a;
|
|
202
196
|
return typeof this.error === 'string' && ((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
@@ -214,31 +208,53 @@ export class Checkbox {
|
|
|
214
208
|
return false;
|
|
215
209
|
return this.hasErrorMessage || this.hasCustomErrorMessage || this.hasValidationError;
|
|
216
210
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
211
|
+
connectFormEventListeners() {
|
|
212
|
+
var _a, _b, _c;
|
|
213
|
+
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
214
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
215
|
+
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('reset', this.onResetForm);
|
|
216
|
+
}
|
|
217
|
+
disconnectFormEventListeners() {
|
|
218
|
+
var _a, _b, _c;
|
|
219
|
+
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.contributeToFormData);
|
|
220
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('submit', this.onSubmitForm);
|
|
221
|
+
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('reset', this.onResetForm);
|
|
222
|
+
}
|
|
223
|
+
// Lifecycle methods
|
|
224
|
+
componentWillLoad() {
|
|
225
|
+
this.initial['checked'] = this.checked;
|
|
226
|
+
this.initial['invalid'] = this.invalid;
|
|
227
|
+
}
|
|
228
|
+
componentDidLoad() {
|
|
229
|
+
if (this.nativeElement) {
|
|
230
|
+
this.nativeElement.indeterminate = this.indeterminate;
|
|
231
|
+
}
|
|
232
|
+
if (this.autofocus)
|
|
233
|
+
this.applyAutofocus();
|
|
234
|
+
}
|
|
235
|
+
connectedCallback() {
|
|
236
|
+
this.connectFormEventListeners();
|
|
221
237
|
}
|
|
222
|
-
|
|
223
|
-
|
|
238
|
+
disconnectedCallback() {
|
|
239
|
+
this.disconnectFormEventListeners();
|
|
224
240
|
}
|
|
225
241
|
render() {
|
|
226
|
-
const { error, name, value, disabled, required, uniqueId, checked, indeterminate } = this;
|
|
242
|
+
const { error, name, value, disabled, required, uniqueId, checked, indeterminate, autofocus } = this;
|
|
227
243
|
const inputAttrs = {
|
|
228
244
|
name,
|
|
229
245
|
value,
|
|
230
246
|
disabled,
|
|
231
247
|
required,
|
|
232
248
|
checked,
|
|
233
|
-
indeterminate
|
|
249
|
+
indeterminate,
|
|
250
|
+
autofocus
|
|
234
251
|
};
|
|
235
|
-
return (h(Host, { key: '
|
|
252
|
+
return (h(Host, { key: '54a5b4a38fd2e9c2a94a95d9ad7d47cd91123d0f', onClick: this.handleClick }, h("div", { key: '089747b6032bfc4e0de581eed060558dc73a1118', class: "r-checkbox" }, h("input", Object.assign({ key: 'fa2b9640c25d4f0d1e1781f885a27f1b24c906b4', class: "r-checkbox--input", type: "checkbox" }, inputAttrs, { id: `${uniqueId}-input`, ref: el => this.nativeElement = el, "aria-describedby": this.hasInvalidMessage ? `${uniqueId}-message` : null, "aria-required": `${this.required || false}`, "aria-invalid": `${this.invalid || false}` })), h("div", { key: '49e514969fa11eccba18658d275462c8c705f8e2', class: "r-checkbox--box", "aria-hidden": "true" }, this.checked ?
|
|
236
253
|
h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.80019 15.8988L4.6002 11.6988L3.2002 13.0988L8.80019 18.6988L20.8002 6.69883L19.4002 5.29883L8.80019 15.8988Z", fill: "currentColor" }))
|
|
237
254
|
: this.indeterminate ?
|
|
238
255
|
h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { x: "4", y: "11", width: "16", height: "2", fill: "currentColor" }))
|
|
239
|
-
: null), h("div", { key: '
|
|
240
|
-
h("r-hint", { key: '
|
|
241
|
-
h("r-hint", { key: '74ff89cd4066b93a3d0f28271ca3f9fcfcdbd976', variant: "success" }, this.validMessage))))));
|
|
256
|
+
: null), h("div", { key: '96090e0dc6dcf564a73e061a7e75ad0a4ec0b1cb', class: "r-checkbox--description" }, h("label", { key: '524a1cba2f9ef69863c48ca536921411be743ec5', class: "r-checkbox--label", id: `${uniqueId}-label`, htmlFor: `${uniqueId}-input` }, h("slot", { key: 'cda4f61e27a86b988746465d14567f49f09eabd0' })), h("div", { key: 'be4d6ba741c2580fd1d5a6dc3e2f71716df55d71', id: `${uniqueId}-message`, class: !this.hasInvalidMessage ? 'visually-hidden' : 'r-checkbox--message', "aria-live": "polite", "aria-atomic": "true" }, this.hasInvalidMessage &&
|
|
257
|
+
h("r-hint", { key: '05b0c0d5ee3c603d19faa11006e9e3501dc8be82', variant: "error" }, error || this.customErrorMessage || this.validityMessage))))));
|
|
242
258
|
}
|
|
243
259
|
static get is() { return "r-checkbox"; }
|
|
244
260
|
static get encapsulation() { return "shadow"; }
|
|
@@ -387,9 +403,9 @@ export class Checkbox {
|
|
|
387
403
|
"setter": false,
|
|
388
404
|
"reflect": true
|
|
389
405
|
},
|
|
390
|
-
"
|
|
406
|
+
"autofocus": {
|
|
391
407
|
"type": "boolean",
|
|
392
|
-
"attribute": "
|
|
408
|
+
"attribute": "autofocus",
|
|
393
409
|
"mutable": false,
|
|
394
410
|
"complexType": {
|
|
395
411
|
"original": "boolean",
|
|
@@ -397,10 +413,10 @@ export class Checkbox {
|
|
|
397
413
|
"references": {}
|
|
398
414
|
},
|
|
399
415
|
"required": false,
|
|
400
|
-
"optional":
|
|
416
|
+
"optional": true,
|
|
401
417
|
"docs": {
|
|
402
418
|
"tags": [],
|
|
403
|
-
"text": "
|
|
419
|
+
"text": "Automatically focus the checkbox when the component is mounted. Note: Only one element per page should have autofocus set to true, following browser standard behavior."
|
|
404
420
|
},
|
|
405
421
|
"getter": false,
|
|
406
422
|
"setter": false,
|
|
@@ -426,25 +442,6 @@ export class Checkbox {
|
|
|
426
442
|
"setter": false,
|
|
427
443
|
"reflect": true
|
|
428
444
|
},
|
|
429
|
-
"validMessage": {
|
|
430
|
-
"type": "string",
|
|
431
|
-
"attribute": "valid-message",
|
|
432
|
-
"mutable": false,
|
|
433
|
-
"complexType": {
|
|
434
|
-
"original": "string",
|
|
435
|
-
"resolved": "string",
|
|
436
|
-
"references": {}
|
|
437
|
-
},
|
|
438
|
-
"required": false,
|
|
439
|
-
"optional": true,
|
|
440
|
-
"docs": {
|
|
441
|
-
"tags": [],
|
|
442
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release.)\nSet custom message if the element meets all its validation constraints."
|
|
443
|
-
},
|
|
444
|
-
"getter": false,
|
|
445
|
-
"setter": false,
|
|
446
|
-
"reflect": false
|
|
447
|
-
},
|
|
448
445
|
"invalid": {
|
|
449
446
|
"type": "boolean",
|
|
450
447
|
"attribute": "invalid",
|
|
@@ -747,6 +744,26 @@ export class Checkbox {
|
|
|
747
744
|
"text": "Sets the indeterminate state of the checkbox element.",
|
|
748
745
|
"tags": []
|
|
749
746
|
}
|
|
747
|
+
},
|
|
748
|
+
"checkValidity": {
|
|
749
|
+
"complexType": {
|
|
750
|
+
"signature": "() => Promise<boolean>",
|
|
751
|
+
"parameters": [],
|
|
752
|
+
"references": {
|
|
753
|
+
"Promise": {
|
|
754
|
+
"location": "global",
|
|
755
|
+
"id": "global::Promise"
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
"return": "Promise<boolean>"
|
|
759
|
+
},
|
|
760
|
+
"docs": {
|
|
761
|
+
"text": "Validates the checkbox without triggering UI and returns a boolean indicating its validity.",
|
|
762
|
+
"tags": [{
|
|
763
|
+
"name": "returns",
|
|
764
|
+
"text": "A boolean indicating whether the checkbox is valid."
|
|
765
|
+
}]
|
|
766
|
+
}
|
|
750
767
|
}
|
|
751
768
|
};
|
|
752
769
|
}
|
|
@@ -9,13 +9,6 @@ export class CheckboxGroup {
|
|
|
9
9
|
* Specifies whether the `value` is required.
|
|
10
10
|
*/
|
|
11
11
|
this.required = false;
|
|
12
|
-
/**
|
|
13
|
-
* _DEPRECATED_ (This property will be removed in November 2025 release.)
|
|
14
|
-
* Indicates whether to show the validation state.
|
|
15
|
-
* When set to `true`, the component will display validation feedback.
|
|
16
|
-
* Defaults to `false`.
|
|
17
|
-
* */
|
|
18
|
-
this.showValid = false;
|
|
19
12
|
this.indeterminate = false;
|
|
20
13
|
this.allChecked = false;
|
|
21
14
|
this.noChecked = false;
|
|
@@ -27,24 +20,30 @@ export class CheckboxGroup {
|
|
|
27
20
|
const variant = this.valid ? 'success' : 'error';
|
|
28
21
|
return (h("r-hint", { variant: variant, role: "alert", "aria-live": "polite", id: `${this.uniqueId}-message`, class: this.message ? null : 'visually-hidden' }, this.message));
|
|
29
22
|
};
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
this.getValidityStateData = () => {
|
|
24
|
+
let validityState = '';
|
|
25
|
+
let validityMessage = '';
|
|
33
26
|
const isValid = this.checkboxes.some(checkbox => checkbox.checked);
|
|
34
27
|
if (this.required && !isValid) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.invalid = true;
|
|
38
|
-
this.valid = false;
|
|
39
|
-
this.noChecked = true;
|
|
28
|
+
validityState = 'valueMissing';
|
|
29
|
+
validityMessage = this.valueMissingMessage || 'Please select at least one option.';
|
|
40
30
|
}
|
|
41
31
|
else {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.invalid = false;
|
|
45
|
-
this.valid = true;
|
|
46
|
-
this.noChecked = false;
|
|
32
|
+
validityState = 'valid';
|
|
33
|
+
validityMessage = null;
|
|
47
34
|
}
|
|
35
|
+
return { validityState, validityMessage };
|
|
36
|
+
};
|
|
37
|
+
this.validateGroup = () => {
|
|
38
|
+
if (this.isNoValidate || !this.required)
|
|
39
|
+
return;
|
|
40
|
+
const { validityState, validityMessage } = this.getValidityStateData();
|
|
41
|
+
this.validityState = validityState;
|
|
42
|
+
this.validityMessage = validityMessage;
|
|
43
|
+
const isValid = this.validityState === 'valid';
|
|
44
|
+
this.valid = isValid;
|
|
45
|
+
this.invalid = !isValid;
|
|
46
|
+
this.noChecked = !isValid;
|
|
48
47
|
this.rValidate.emit({
|
|
49
48
|
state: this.validityState,
|
|
50
49
|
message: this.validityMessage
|
|
@@ -64,6 +63,14 @@ export class CheckboxGroup {
|
|
|
64
63
|
this.resetToInitial();
|
|
65
64
|
};
|
|
66
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Validates the checkbox group without triggering UI and returns a boolean indicating its validity.
|
|
68
|
+
* @returns A boolean indicating whether the checkbox is valid.
|
|
69
|
+
*/
|
|
70
|
+
async checkValidity() {
|
|
71
|
+
const { validityState } = this.getValidityStateData();
|
|
72
|
+
return validityState === 'valid';
|
|
73
|
+
}
|
|
67
74
|
/**
|
|
68
75
|
* Resets the validity state and message of the radio group.
|
|
69
76
|
* This method clears the validity message and state, and sets the invalid
|
|
@@ -140,11 +147,8 @@ export class CheckboxGroup {
|
|
|
140
147
|
this.noChecked = checkedCheckboxes.length === 0;
|
|
141
148
|
}
|
|
142
149
|
get message() {
|
|
143
|
-
const {
|
|
150
|
+
const { validityMessage, invalid, error, customErrorMessage } = this;
|
|
144
151
|
let message = null;
|
|
145
|
-
if (valid) {
|
|
146
|
-
message = validMessage || null;
|
|
147
|
-
}
|
|
148
152
|
if (invalid) {
|
|
149
153
|
message = error || customErrorMessage || validityMessage || null;
|
|
150
154
|
}
|
|
@@ -325,26 +329,6 @@ export class CheckboxGroup {
|
|
|
325
329
|
"setter": false,
|
|
326
330
|
"reflect": false
|
|
327
331
|
},
|
|
328
|
-
"showValid": {
|
|
329
|
-
"type": "boolean",
|
|
330
|
-
"attribute": "show-valid",
|
|
331
|
-
"mutable": false,
|
|
332
|
-
"complexType": {
|
|
333
|
-
"original": "boolean",
|
|
334
|
-
"resolved": "boolean",
|
|
335
|
-
"references": {}
|
|
336
|
-
},
|
|
337
|
-
"required": false,
|
|
338
|
-
"optional": false,
|
|
339
|
-
"docs": {
|
|
340
|
-
"tags": [],
|
|
341
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release.)\nIndicates whether to show the validation state.\nWhen set to `true`, the component will display validation feedback.\nDefaults to `false`."
|
|
342
|
-
},
|
|
343
|
-
"getter": false,
|
|
344
|
-
"setter": false,
|
|
345
|
-
"reflect": false,
|
|
346
|
-
"defaultValue": "false"
|
|
347
|
-
},
|
|
348
332
|
"valid": {
|
|
349
333
|
"type": "boolean",
|
|
350
334
|
"attribute": "valid",
|
|
@@ -364,25 +348,6 @@ export class CheckboxGroup {
|
|
|
364
348
|
"setter": false,
|
|
365
349
|
"reflect": true
|
|
366
350
|
},
|
|
367
|
-
"validMessage": {
|
|
368
|
-
"type": "string",
|
|
369
|
-
"attribute": "valid-message",
|
|
370
|
-
"mutable": false,
|
|
371
|
-
"complexType": {
|
|
372
|
-
"original": "string",
|
|
373
|
-
"resolved": "string",
|
|
374
|
-
"references": {}
|
|
375
|
-
},
|
|
376
|
-
"required": false,
|
|
377
|
-
"optional": true,
|
|
378
|
-
"docs": {
|
|
379
|
-
"tags": [],
|
|
380
|
-
"text": "_DEPRECATED_ (This property will be removed in November 2025 release.)\nSet custom message if the element meets all its validation constraints."
|
|
381
|
-
},
|
|
382
|
-
"getter": false,
|
|
383
|
-
"setter": false,
|
|
384
|
-
"reflect": false
|
|
385
|
-
},
|
|
386
351
|
"invalid": {
|
|
387
352
|
"type": "boolean",
|
|
388
353
|
"attribute": "invalid",
|
|
@@ -667,6 +632,26 @@ export class CheckboxGroup {
|
|
|
667
632
|
}
|
|
668
633
|
static get methods() {
|
|
669
634
|
return {
|
|
635
|
+
"checkValidity": {
|
|
636
|
+
"complexType": {
|
|
637
|
+
"signature": "() => Promise<boolean>",
|
|
638
|
+
"parameters": [],
|
|
639
|
+
"references": {
|
|
640
|
+
"Promise": {
|
|
641
|
+
"location": "global",
|
|
642
|
+
"id": "global::Promise"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"return": "Promise<boolean>"
|
|
646
|
+
},
|
|
647
|
+
"docs": {
|
|
648
|
+
"text": "Validates the checkbox group without triggering UI and returns a boolean indicating its validity.",
|
|
649
|
+
"tags": [{
|
|
650
|
+
"name": "returns",
|
|
651
|
+
"text": "A boolean indicating whether the checkbox is valid."
|
|
652
|
+
}]
|
|
653
|
+
}
|
|
654
|
+
},
|
|
670
655
|
"resetValidity": {
|
|
671
656
|
"complexType": {
|
|
672
657
|
"signature": "() => Promise<void>",
|
|
@@ -110,10 +110,8 @@
|
|
|
110
110
|
border-radius: 10px;
|
|
111
111
|
border: 3px solid #ffffff;
|
|
112
112
|
}
|
|
113
|
-
.r-dialog
|
|
113
|
+
.r-dialog ::slotted([slot=footer]) {
|
|
114
114
|
margin-top: var(--r-dialog--footer--margin-top, auto);
|
|
115
|
-
}
|
|
116
|
-
.r-dialog--footer ::slotted(*) {
|
|
117
115
|
display: var(--r-dialog--footer--display, flex);
|
|
118
116
|
flex-direction: var(--r-dialog--footer--flex-direction, row);
|
|
119
117
|
flex-wrap: var(--r-dialog--footer--flex-wrap, nowrap);
|
|
@@ -18,10 +18,6 @@ export class Dialog {
|
|
|
18
18
|
* */
|
|
19
19
|
this.isOpen = this.open;
|
|
20
20
|
this.uniqueId = `r-dialog-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
21
|
-
this.isElContent = (selector) => {
|
|
22
|
-
const el = this.host.querySelector(selector);
|
|
23
|
-
return el !== null && (el === null || el === void 0 ? void 0 : el.textContent.trim().length) > 0;
|
|
24
|
-
};
|
|
25
21
|
this.onTriggerClick = () => {
|
|
26
22
|
this.close();
|
|
27
23
|
};
|
|
@@ -36,9 +32,6 @@ export class Dialog {
|
|
|
36
32
|
if (this.open && !this.isOpen)
|
|
37
33
|
this.showModal();
|
|
38
34
|
}
|
|
39
|
-
get isFooterSlot() {
|
|
40
|
-
return this.isElContent('[slot="footer"]');
|
|
41
|
-
}
|
|
42
35
|
get dialogLabel() {
|
|
43
36
|
var _a, _b;
|
|
44
37
|
return this.headline || ((_b = (_a = this.host.querySelector('[slot="header"]')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim());
|
|
@@ -94,9 +87,8 @@ export class Dialog {
|
|
|
94
87
|
}
|
|
95
88
|
}
|
|
96
89
|
render() {
|
|
97
|
-
return (h(Host, { key: '
|
|
98
|
-
h("h2", { key: '
|
|
99
|
-
h("div", { key: '02c6c9ee41bb7893955b492f4fd171e498041777', class: "r-dialog--footer" }, h("slot", { key: 'bcf48fd3ecc2378fa82ffb48aa3739ea65477dcd', name: "footer" }))))));
|
|
90
|
+
return (h(Host, { key: '6f042592347577f063f6a80d2152b1149eadcb21', open: this.isOpen }, h("dialog", { key: 'fd3f19cf69a9077585bceccebaf0d0c9bccbaa86', class: "r-dialog", "aria-label": this.dialogLabel, ref: el => this.dialogElement = el, style: { '--r-dialog--body--height': this.bodyHeight } }, h("div", { key: '974e33afe5e96d3a67501d10a4ecd0486900ed64', class: "r-dialog--content" }, h("div", { key: '57bccc4346d7234564dc22c179a7e10051bd3af7', class: "r-dialog--header", id: `${this.uniqueId}-header` }, h("slot", { key: '0a59d6a775f11378f17be41665b2c71aecb17ff9', name: "header" }, (this.headline) &&
|
|
91
|
+
h("h2", { key: '6dd6970be5bde3f92d87bef1cbbd7152ba72f88f', class: "r-dialog--headline" }, this.headline)), h("r-icon-button", { key: '37ad4f5b3366ae057240e5bcf2c7443aac3faa9b', class: "r-dialog--close", name: "cross", size: "s", onRClick: this.onTriggerClick, label: this.closeAriaLabel })), h("div", { key: '951dec5b1da5b13196916ed6b64fee89cad83a0e', class: "r-dialog--body" }, this.bodyText, h("slot", { key: '1797cb38116d9818aec51e2dc6982dad1a01cf02' }), h("slot", { key: '0f091bf0e6f6fdd16b79c69aca9814a0d76d7ee6', name: "form" })), h("slot", { key: '2b5a1cadfa9e7a13d8fc4ddca4cf69a1e4a1cb5e', name: "footer" })))));
|
|
100
92
|
}
|
|
101
93
|
static get is() { return "r-dialog"; }
|
|
102
94
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,8 +22,8 @@ export class Hint {
|
|
|
22
22
|
return this.hasIconSlot || this.iconName !== null;
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
26
|
-
h("div", { key: '
|
|
25
|
+
return (h(Host, { key: '1cbe08b7b3b01fc7d870416a1b14e3b1b8525797' }, h("div", { key: '17494f3ae8bdf394858e2f9337e54bd844a467d0', class: "r-hint" }, this.hasIcon &&
|
|
26
|
+
h("div", { key: 'ed406c6ae45ea4c25e6735752ced3a988c2f2274', class: "r-hint--icon" }, h("slot", { key: '9e93b83d3f9e71f722ffdb813d46b667eec556a5', name: "icon" }, this.iconName && h("r-icon", { key: '841c3e53381a21e1341191eb7a0b32fdd696c47f', name: this.iconName, size: "s" }))), h("div", { key: '946d0813297923053452519b9871cd9a0d04679f', class: "r-hint--text" }, h("slot", { key: 'f7343fcc6a4cbe9f5584f8d94feff33cfd8f2560' })))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "r-hint"; }
|
|
29
29
|
static get encapsulation() { return "shadow"; }
|