@riverty/web-components 6.1.0 → 6.2.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 +29 -0
- package/custom-elements.json +160 -1
- package/dist/cjs/{index-DJ4H_bFj.js → index-BnETQtSf.js} +9 -382
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion.cjs.entry.js +1 -1
- package/dist/cjs/r-alert.cjs.entry.js +9 -6
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-button.cjs.entry.js +6 -2
- package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/r-design-system-devtools.cjs.entry.js +1 -1
- package/dist/cjs/r-dialog.cjs.entry.js +1 -1
- package/dist/cjs/r-hint_2.cjs.entry.js +3 -3
- package/dist/cjs/r-icon-button_2.cjs.entry.js +24 -4
- package/dist/cjs/r-icon.cjs.entry.js +2 -2
- package/dist/cjs/r-illustration.cjs.entry.js +396 -0
- package/dist/cjs/r-input-code.cjs.entry.js +34 -12
- package/dist/cjs/r-input-date.cjs.entry.js +7 -7
- package/dist/cjs/r-input-password.cjs.entry.js +3 -3
- package/dist/cjs/r-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/r-input.cjs.entry.js +5 -4
- package/dist/cjs/r-list-item.cjs.entry.js +1 -1
- package/dist/cjs/r-pagination.cjs.entry.js +56 -50
- package/dist/cjs/r-panel.cjs.entry.js +3 -3
- package/dist/cjs/r-popover-action.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-content.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-headline.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-trigger.cjs.entry.js +2 -2
- package/dist/cjs/r-popover.cjs.entry.js +46 -5
- package/dist/cjs/r-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-description.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-title.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button.cjs.entry.js +8 -7
- package/dist/cjs/r-radio-group.cjs.entry.js +83 -10
- package/dist/cjs/r-select-option.cjs.entry.js +2 -2
- package/dist/cjs/r-select.cjs.entry.js +6 -4
- package/dist/cjs/r-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/r-stepper-item.cjs.entry.js +19 -4
- package/dist/cjs/r-stepper.cjs.entry.js +76 -3
- package/dist/cjs/r-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-tab.cjs.entry.js +3 -3
- package/dist/cjs/r-tabs-list.cjs.entry.js +4 -4
- package/dist/cjs/r-tabs.cjs.entry.js +2 -2
- package/dist/cjs/r-textarea.cjs.entry.js +1 -1
- package/dist/cjs/r-toast-group.cjs.entry.js +13 -4
- package/dist/cjs/r-toast.cjs.entry.js +87 -18
- package/dist/cjs/web-components.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/alert/alert.css +4 -3
- package/dist/collection/components/alert/alert.js +7 -4
- package/dist/collection/components/button/button.js +30 -1
- package/dist/collection/components/button/exports.js +1 -0
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/icon/exports.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/riverty-kit.js +1 -1
- package/dist/collection/components/illustration/data.js +112 -0
- package/dist/collection/components/illustration/exports.js +3 -0
- package/dist/collection/components/illustration/illustration.css +52 -0
- package/dist/collection/components/illustration/illustration.js +540 -0
- package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
- package/dist/collection/components/input/exports.js +1 -0
- package/dist/collection/components/input/input.css +3 -0
- package/dist/collection/components/input/input.js +47 -2
- package/dist/collection/components/input-code/input-code.css +6 -0
- package/dist/collection/components/input-code/input-code.js +48 -10
- package/dist/collection/components/input-date/input-date.js +6 -6
- package/dist/collection/components/input-password/input-password.js +2 -2
- package/dist/collection/components/input-phone-number/input-phone-number.js +3 -3
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/pagination/pagination.css +33 -72
- package/dist/collection/components/pagination/pagination.js +194 -48
- package/dist/collection/components/panel/panel.js +2 -2
- package/dist/collection/components/popover/popover.css +0 -1
- package/dist/collection/components/popover/popover.js +44 -3
- package/dist/collection/components/popover-action/popover-action.js +1 -1
- package/dist/collection/components/popover-content/popover-content.js +1 -1
- package/dist/collection/components/popover-headline/popover-headline.js +1 -1
- package/dist/collection/components/popover-trigger/popover-trigger.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +7 -6
- package/dist/collection/components/radio-button-description/radio-button-description.js +1 -1
- package/dist/collection/components/radio-button-leading/radio-button-leading.js +1 -1
- package/dist/collection/components/radio-button-title/radio-button-title.js +1 -1
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +1 -1
- package/dist/collection/components/radio-group/radio-group.css +4 -1
- package/dist/collection/components/radio-group/radio-group.js +100 -8
- package/dist/collection/components/select/select.js +5 -3
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/skip-link/skip-link.js +1 -1
- package/dist/collection/components/stepper/stepper.css +4 -1
- package/dist/collection/components/stepper/stepper.js +125 -1
- package/dist/collection/components/stepper-item/stepper-item.css +22 -9
- package/dist/collection/components/stepper-item/stepper-item.js +36 -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.css +9 -9
- package/dist/collection/components/toast/toast.js +109 -21
- package/dist/collection/components/toast-group/toast-group.css +5 -11
- package/dist/collection/components/toast-group/toast-group.js +12 -3
- package/dist/collection/components/tooltip/tooltip.js +23 -3
- package/dist/esm/{index-Da7qOBFr.js → index-CTxpqopm.js} +9 -382
- package/dist/esm/loader.js +3 -3
- package/dist/esm/r-accordion-panel.entry.js +1 -1
- package/dist/esm/r-accordion-section.entry.js +1 -1
- package/dist/esm/r-accordion-trigger.entry.js +1 -1
- package/dist/esm/r-accordion.entry.js +1 -1
- package/dist/esm/r-alert.entry.js +9 -6
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-button.entry.js +6 -2
- package/dist/esm/r-checkbox-group.entry.js +1 -1
- package/dist/esm/r-checkbox.entry.js +4 -4
- package/dist/esm/r-design-system-devtools.entry.js +1 -1
- package/dist/esm/r-dialog.entry.js +1 -1
- package/dist/esm/r-hint_2.entry.js +3 -3
- package/dist/esm/r-icon-button_2.entry.js +24 -4
- package/dist/esm/r-icon.entry.js +2 -2
- package/dist/esm/r-illustration.entry.js +394 -0
- package/dist/esm/r-input-code.entry.js +34 -12
- package/dist/esm/r-input-date.entry.js +7 -7
- package/dist/esm/r-input-password.entry.js +3 -3
- package/dist/esm/r-input-phone-number.entry.js +4 -4
- package/dist/esm/r-input.entry.js +5 -4
- package/dist/esm/r-list-item.entry.js +1 -1
- package/dist/esm/r-pagination.entry.js +56 -50
- package/dist/esm/r-panel.entry.js +3 -3
- package/dist/esm/r-popover-action.entry.js +2 -2
- package/dist/esm/r-popover-content.entry.js +2 -2
- package/dist/esm/r-popover-headline.entry.js +2 -2
- package/dist/esm/r-popover-trigger.entry.js +2 -2
- package/dist/esm/r-popover.entry.js +46 -5
- package/dist/esm/r-progress-bar.entry.js +2 -2
- package/dist/esm/r-radio-button-description.entry.js +2 -2
- package/dist/esm/r-radio-button-leading.entry.js +2 -2
- package/dist/esm/r-radio-button-title.entry.js +2 -2
- package/dist/esm/r-radio-button-trailing.entry.js +2 -2
- package/dist/esm/r-radio-button.entry.js +8 -7
- package/dist/esm/r-radio-group.entry.js +83 -10
- package/dist/esm/r-select-option.entry.js +2 -2
- package/dist/esm/r-select.entry.js +6 -4
- package/dist/esm/r-skip-link.entry.js +2 -2
- package/dist/esm/r-stepper-item.entry.js +19 -4
- package/dist/esm/r-stepper.entry.js +76 -3
- package/dist/esm/r-tab-panel.entry.js +2 -2
- package/dist/esm/r-tab.entry.js +3 -3
- package/dist/esm/r-tabs-list.entry.js +4 -4
- package/dist/esm/r-tabs.entry.js +2 -2
- package/dist/esm/r-textarea.entry.js +1 -1
- package/dist/esm/r-toast-group.entry.js +13 -4
- package/dist/esm/r-toast.entry.js +87 -18
- package/dist/esm/web-components.js +3 -3
- package/dist/types/components/alert/alert.d.ts +1 -0
- package/dist/types/components/button/button.d.ts +8 -1
- package/dist/types/components/button/exports.d.ts +2 -0
- package/dist/types/components/icon/exports.d.ts +1 -1
- package/dist/types/components/icon/riverty-kit.d.ts +1 -1
- package/dist/types/components/illustration/data.d.ts +52 -0
- package/dist/types/components/illustration/exports.d.ts +23 -0
- package/dist/types/components/illustration/illustration.d.ts +51 -0
- package/dist/types/components/illustration/illustrations-ui-kit.d.ts +21 -0
- package/dist/types/components/input/exports.d.ts +2 -0
- package/dist/types/components/input/input.d.ts +15 -1
- package/dist/types/components/input-code/input-code.d.ts +15 -1
- package/dist/types/components/pagination/pagination.d.ts +19 -0
- package/dist/types/components/popover/popover.d.ts +9 -0
- package/dist/types/components/radio-group/radio-group.d.ts +16 -0
- package/dist/types/components/stepper/stepper.d.ts +11 -0
- package/dist/types/components/stepper-item/stepper-item.d.ts +7 -0
- package/dist/types/components/toast/toast.d.ts +10 -4
- package/dist/types/components/tooltip/tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +273 -7
- package/dist/web-components/p-02b22f8e.entry.js +1 -0
- package/dist/web-components/{p-d054eb4d.entry.js → p-075a8dc8.entry.js} +1 -1
- package/dist/web-components/{p-8a66d20c.entry.js → p-0a34d33b.entry.js} +1 -1
- package/dist/web-components/{p-8c31cbd5.entry.js → p-10cc9983.entry.js} +1 -1
- package/dist/web-components/{p-d7726e46.entry.js → p-253068b9.entry.js} +1 -1
- package/dist/web-components/{p-3884c6e7.entry.js → p-3b8c8951.entry.js} +1 -1
- package/dist/web-components/{p-550e2237.entry.js → p-3beacdab.entry.js} +1 -1
- package/dist/web-components/p-4214867d.entry.js +1 -0
- package/dist/web-components/{p-3f60c6c0.entry.js → p-42c857e9.entry.js} +1 -1
- package/dist/web-components/{p-7fed6f4d.entry.js → p-44f87e16.entry.js} +1 -1
- package/dist/web-components/p-477614c5.entry.js +1 -0
- package/dist/web-components/{p-1da75540.entry.js → p-495ba3d2.entry.js} +1 -1
- package/dist/web-components/{p-19407a14.entry.js → p-4de76291.entry.js} +1 -1
- package/dist/web-components/{p-cd5daad2.entry.js → p-55600d47.entry.js} +1 -1
- package/dist/web-components/{p-c95b6470.entry.js → p-562051aa.entry.js} +1 -1
- package/dist/web-components/p-5b850e0f.entry.js +1 -0
- package/dist/web-components/p-6013dfc8.entry.js +1 -0
- package/dist/web-components/{p-6cc2ea2c.entry.js → p-62e7ae04.entry.js} +1 -1
- package/dist/web-components/p-71519d37.entry.js +1 -0
- package/dist/web-components/p-88f7b47f.entry.js +1 -0
- package/dist/web-components/p-8975a6a3.entry.js +1 -0
- package/dist/web-components/{p-6bb44ec6.entry.js → p-8e125826.entry.js} +1 -1
- package/dist/web-components/p-91cc0bde.entry.js +1 -0
- package/dist/web-components/{p-0347feff.entry.js → p-93435fcd.entry.js} +1 -1
- package/dist/web-components/p-947969d7.entry.js +1 -0
- package/dist/web-components/{p-cdd88c5a.entry.js → p-95396b5c.entry.js} +1 -1
- package/dist/web-components/p-9de3a1a5.entry.js +1 -0
- package/dist/web-components/p-9f583ed1.entry.js +1 -0
- package/dist/web-components/p-CTxpqopm.js +2 -0
- package/dist/web-components/{p-5eeb7002.entry.js → p-a1086abe.entry.js} +1 -1
- package/dist/web-components/{p-f9d5004c.entry.js → p-bbba6d79.entry.js} +1 -1
- package/dist/web-components/{p-c478712b.entry.js → p-bde44ec4.entry.js} +1 -1
- package/dist/web-components/p-bfc7e6c0.entry.js +1 -0
- package/dist/web-components/p-c1030394.entry.js +1 -0
- package/dist/web-components/{p-26ef77d6.entry.js → p-c80a5541.entry.js} +1 -1
- package/dist/web-components/{p-9ef1bbee.entry.js → p-c96ee61a.entry.js} +1 -1
- package/dist/web-components/{p-8dac326b.entry.js → p-caf8f067.entry.js} +1 -1
- package/dist/web-components/p-cc363c3d.entry.js +1 -0
- package/dist/web-components/p-cf4ff357.entry.js +1 -0
- package/dist/web-components/p-d0310ed4.entry.js +1 -0
- package/dist/web-components/p-d1412932.entry.js +1 -0
- package/dist/web-components/{p-62b788bf.entry.js → p-d2447e30.entry.js} +1 -1
- package/dist/web-components/p-dc9cca06.entry.js +1 -0
- package/dist/web-components/p-e5b943a2.entry.js +1 -0
- package/dist/web-components/{p-4cc58c6a.entry.js → p-e67b13df.entry.js} +1 -1
- package/dist/web-components/p-efec231a.entry.js +1 -0
- package/dist/web-components/{p-4595fa8e.entry.js → p-f867e4c3.entry.js} +1 -1
- package/dist/web-components/p-ff6b1b8f.entry.js +1 -0
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +5 -2
- package/dist/collection/components/icon/bundled-icons/all-kit.json +0 -1
- package/dist/collection/components/icon/bundled-icons/riverty-kit.json +0 -1
- package/dist/web-components/bundled-icons/all-kit.json +0 -1
- package/dist/web-components/bundled-icons/riverty-kit.json +0 -1
- package/dist/web-components/p-159822fe.entry.js +0 -1
- package/dist/web-components/p-4f261b63.entry.js +0 -1
- package/dist/web-components/p-50893211.entry.js +0 -1
- package/dist/web-components/p-589baaf9.entry.js +0 -1
- package/dist/web-components/p-60341de2.entry.js +0 -1
- package/dist/web-components/p-63fd817d.entry.js +0 -1
- package/dist/web-components/p-67fa3f84.entry.js +0 -1
- package/dist/web-components/p-70784685.entry.js +0 -1
- package/dist/web-components/p-7ce57332.entry.js +0 -1
- package/dist/web-components/p-92c7cf33.entry.js +0 -1
- package/dist/web-components/p-Da7qOBFr.js +0 -2
- package/dist/web-components/p-a7d22c76.entry.js +0 -1
- package/dist/web-components/p-b96d59ca.entry.js +0 -1
- package/dist/web-components/p-b98ab649.entry.js +0 -1
- package/dist/web-components/p-ba801820.entry.js +0 -1
- package/dist/web-components/p-bfc8c077.entry.js +0 -1
- package/dist/web-components/p-c05b05da.entry.js +0 -1
- package/dist/web-components/p-c1e748f2.entry.js +0 -1
- package/dist/web-components/p-d433a828.entry.js +0 -1
- package/dist/web-components/p-d819c8e5.entry.js +0 -1
- package/dist/web-components/p-e4dc60f0.entry.js +0 -1
- package/dist/web-components/p-f7adb875.entry.js +0 -1
- package/dist/collection/components/icon/{icon-data.js → data.js} +0 -0
- package/dist/types/components/icon/{icon-data.d.ts → data.d.ts} +1 -1
|
@@ -282,7 +282,6 @@ export class RInput {
|
|
|
282
282
|
const regex = new RegExp(this.pattern, 'u');
|
|
283
283
|
return regex.test(this.value);
|
|
284
284
|
}
|
|
285
|
-
;
|
|
286
285
|
componentWillLoad() {
|
|
287
286
|
this.initial['value'] = this.value;
|
|
288
287
|
this.initial['invalid'] = this.invalid;
|
|
@@ -315,7 +314,7 @@ export class RInput {
|
|
|
315
314
|
this.setValue(this.nativeElement.value);
|
|
316
315
|
}
|
|
317
316
|
render() {
|
|
318
|
-
const { name, placeholder, required, fieldIndicator, maxlength, minlength, min, max, value, disabled, form, pattern, invalid, valid, hint, label, internal, uniqueId, autocomplete, readonly, autofocus, passwordrules, enterkeyhint, validityMarker } = this;
|
|
317
|
+
const { name, placeholder, required, fieldIndicator, maxlength, minlength, min, max, value, disabled, form, pattern, invalid, valid, hint, label, internal, uniqueId, autocomplete, readonly, autofocus, passwordrules, enterkeyhint, spellcheck, autocapitalize, validityMarker } = this;
|
|
319
318
|
const inputAttrs = {
|
|
320
319
|
disabled,
|
|
321
320
|
readonly,
|
|
@@ -333,6 +332,8 @@ export class RInput {
|
|
|
333
332
|
autofocus: autofocus || null,
|
|
334
333
|
passwordrules,
|
|
335
334
|
enterkeyhint,
|
|
335
|
+
autocapitalize,
|
|
336
|
+
spellcheck,
|
|
336
337
|
inputmode: this.inputmode || null,
|
|
337
338
|
id: uniqueId,
|
|
338
339
|
'data-value': value,
|
|
@@ -1058,6 +1059,50 @@ export class RInput {
|
|
|
1058
1059
|
"setter": false,
|
|
1059
1060
|
"reflect": false
|
|
1060
1061
|
},
|
|
1062
|
+
"spellcheck": {
|
|
1063
|
+
"type": "boolean",
|
|
1064
|
+
"attribute": "spellcheck",
|
|
1065
|
+
"mutable": true,
|
|
1066
|
+
"complexType": {
|
|
1067
|
+
"original": "boolean",
|
|
1068
|
+
"resolved": "boolean",
|
|
1069
|
+
"references": {}
|
|
1070
|
+
},
|
|
1071
|
+
"required": false,
|
|
1072
|
+
"optional": true,
|
|
1073
|
+
"docs": {
|
|
1074
|
+
"tags": [],
|
|
1075
|
+
"text": "Controls browser spell-checking for text input.\nWhen true, enables spell-checking; when false, disables it.\nBrowser default behavior applies when not specified."
|
|
1076
|
+
},
|
|
1077
|
+
"getter": false,
|
|
1078
|
+
"setter": false,
|
|
1079
|
+
"reflect": true
|
|
1080
|
+
},
|
|
1081
|
+
"autocapitalize": {
|
|
1082
|
+
"type": "string",
|
|
1083
|
+
"attribute": "autocapitalize",
|
|
1084
|
+
"mutable": false,
|
|
1085
|
+
"complexType": {
|
|
1086
|
+
"original": "AutocapitalizeType",
|
|
1087
|
+
"resolved": "\"characters\" | \"none\" | \"off\" | \"on\" | \"sentences\" | \"words\"",
|
|
1088
|
+
"references": {
|
|
1089
|
+
"AutocapitalizeType": {
|
|
1090
|
+
"location": "import",
|
|
1091
|
+
"path": "./exports",
|
|
1092
|
+
"id": "src/components/input/exports.ts::AutocapitalizeType"
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
},
|
|
1096
|
+
"required": false,
|
|
1097
|
+
"optional": true,
|
|
1098
|
+
"docs": {
|
|
1099
|
+
"tags": [],
|
|
1100
|
+
"text": "Controls automatic capitalization of text input on mobile devices.\n- `off` or `none`: No automatic capitalization\n- `on` or `sentences`: Capitalize first letter of each sentence (default for most text inputs)\n- `words`: Capitalize first letter of each word\n- `characters`: Capitalize all characters"
|
|
1101
|
+
},
|
|
1102
|
+
"getter": false,
|
|
1103
|
+
"setter": false,
|
|
1104
|
+
"reflect": false
|
|
1105
|
+
},
|
|
1061
1106
|
"passwordrules": {
|
|
1062
1107
|
"type": "string",
|
|
1063
1108
|
"attribute": "passwordrules",
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
display: flex;
|
|
12
12
|
margin-left: auto;
|
|
13
13
|
}
|
|
14
|
+
:host .r-form-field {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: start;
|
|
18
|
+
gap: 1rem;
|
|
19
|
+
}
|
|
14
20
|
|
|
15
21
|
:host([readonly]:not([readonly=false])) {
|
|
16
22
|
--r-input-code--container--background-color: var(--r-background-soft, #f3f1f0);
|
|
@@ -28,11 +28,35 @@ export class InputCode {
|
|
|
28
28
|
this.autocomplete = 'one-time-code';
|
|
29
29
|
/** Holds the current values of each input box */
|
|
30
30
|
this.values = [];
|
|
31
|
+
/** Tracks whether the component was previously in a complete state */
|
|
32
|
+
this.wasComplete = false;
|
|
33
|
+
/** Tracks the last completed value to detect changes */
|
|
34
|
+
this.lastCompletedValue = '';
|
|
31
35
|
/** Validity state passed from validateFormElement function after validation */
|
|
32
36
|
this.validityState = '';
|
|
33
37
|
/** Validity message passed from validateFormElement function after validation */
|
|
34
38
|
this.validityMessage = '';
|
|
35
39
|
this.inputs = [];
|
|
40
|
+
/**
|
|
41
|
+
* Checks if all segments are filled and emits rComplete event when:
|
|
42
|
+
* 1. Transitioning from incomplete to complete
|
|
43
|
+
* 2. Complete and value has changed from previous completed value
|
|
44
|
+
*/
|
|
45
|
+
this.checkAndEmitCompletion = () => {
|
|
46
|
+
const isFullLength = this.value.length === this.length;
|
|
47
|
+
const isNoEmptySegments = this.values.every(val => val !== '');
|
|
48
|
+
const isComplete = isFullLength && isNoEmptySegments;
|
|
49
|
+
// Emit when transitioning to complete OR when complete with a different value
|
|
50
|
+
if (isComplete && (!this.wasComplete || this.value !== this.lastCompletedValue)) {
|
|
51
|
+
this.wasComplete = true;
|
|
52
|
+
this.lastCompletedValue = this.value;
|
|
53
|
+
this.rComplete.emit({ value: this.value, isComplete: true });
|
|
54
|
+
}
|
|
55
|
+
else if (!isComplete && this.wasComplete) {
|
|
56
|
+
// Reset the flag when becoming incomplete
|
|
57
|
+
this.wasComplete = false;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
36
60
|
this.handleInput = (index, event) => {
|
|
37
61
|
var _a;
|
|
38
62
|
if (this.readonly)
|
|
@@ -277,6 +301,7 @@ export class InputCode {
|
|
|
277
301
|
}
|
|
278
302
|
handleValuesChange() {
|
|
279
303
|
this.value = this.values.join('');
|
|
304
|
+
this.checkAndEmitCompletion();
|
|
280
305
|
}
|
|
281
306
|
handleLengthChange(newLength) {
|
|
282
307
|
// Adjust values array when length changes
|
|
@@ -356,9 +381,6 @@ export class InputCode {
|
|
|
356
381
|
return `${uniqueId}-hint`;
|
|
357
382
|
return null;
|
|
358
383
|
}
|
|
359
|
-
get hasTrailingSlot() {
|
|
360
|
-
return !!this.host.querySelector('[slot="trailing"]');
|
|
361
|
-
}
|
|
362
384
|
componentWillLoad() {
|
|
363
385
|
this.setValue(this.value);
|
|
364
386
|
}
|
|
@@ -380,15 +402,14 @@ export class InputCode {
|
|
|
380
402
|
id: `${uniqueId}-label`,
|
|
381
403
|
fieldIndicator
|
|
382
404
|
} : {};
|
|
383
|
-
return (h(Host, { key: '
|
|
405
|
+
return (h(Host, { key: 'c7e8e45bf54b060eaeec903857ec842f5f5909ff', value: this.value, onClick: this.onHostClick }, h("div", { key: '965e94721f83a4e0c2a21d6ead371085b5faefef', class: "r-input-code--label-container" }, h("label", { key: '4a24884c394cbdf28f98f71dd166c7f02fd6b240', htmlFor: uniqueId }, label ?
|
|
384
406
|
h("r-label", Object.assign({}, labelAttr), label)
|
|
385
407
|
:
|
|
386
|
-
h("slot", { name: "label" })), h("slot", { key: '
|
|
387
|
-
h("r-hint", { key: '
|
|
388
|
-
h("r-icon", { key: '
|
|
389
|
-
h("slot", { key: '
|
|
390
|
-
|
|
391
|
-
h("r-hint", { key: 'fa142415d2b84dea239b1bc99a98a06ffe37005c', "aria-live": "polite", id: `${uniqueId}-message`, variant: "error" }, this.message))));
|
|
408
|
+
h("slot", { name: "label" })), h("slot", { key: '471642b0c4c01243fb26eacec958418ef09af962', name: "popover" })), hint &&
|
|
409
|
+
h("r-hint", { key: 'efdb3d68d72666260bce9d6e9e6ba9853225a473', id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { key: '2dc16569529ac0ec9e95cfef8f353efbf2f0e929', class: "r-form-field" }, h("slot", { key: '7e3d7abc1931537ce66f6bd1c716f4046f2ca06e', name: "prefix" }), h("div", { key: '0e29ba435fe9de7b87cad793be8dc11301bf552e', class: "r-input-code--container", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-describedby": this.groupDescribedby }, h("slot", { key: 'eef6bda22af5d2e21f442bb010d79a60a05b4d69', name: "leading" }), Array.from({ length: this.length }).map((_, i) => (h("input", { class: "r-input-code--input", key: i, id: `${uniqueId}-input-section-${i}`, "aria-label": `${this.ariaCharacterLabel || 'Character'}: ${i + 1}`, "aria-invalid": `${this.invalid || false}`, value: this.values[i], ref: el => this.inputs[i] = el, maxlength: 1, disabled: this.disabled, required: this.required, readonly: readonly, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, autocomplete: this.autocomplete, onInput: this.createInputHandler(i), onKeyDown: this.createKeyDownHandler(i), onPaste: this.handlePaste }))), h("input", Object.assign({ key: 'a2185f3e1b5f83e55fa5997662b55002bb251b4c', type: "hidden" }, inputAttrs, { value: this.values.join(''), ref: el => this.nativeElement = el })), h("div", { key: '7586c976c27a2c42e9d76c1cf6724ad93beac0ae', class: "r-input-code--trailing" }, this.readonly &&
|
|
410
|
+
h("r-icon", { key: 'b2829cc59cd037f62e33f980fa65887e80059984', class: "r-input-code--readonly-icon", name: "pen-disabled", size: "s" }), h("slot", { key: 'e7b996a710b4f2f5f867295518b96952d6d60444', name: "trailing" }, valid &&
|
|
411
|
+
h("r-icon", { key: '3064219d8e6846df86dc934027a561f265fcc82f', name: "circled-check", size: "s", color: "var(--r-status-success-regular)" })))), h("slot", { key: 'de7164a83a2d8c6b8bf97583d4407cc7be7e0db4', name: "suffix" })), h("slot", { key: 'e12c343b123421fec18546f60ccdb2e4d6ceab5b', name: "message" }, this.hasMessage &&
|
|
412
|
+
h("r-hint", { key: '7fcfab6c47d841a0b695805b61f4a12a164fca3c', "aria-live": "polite", id: `${uniqueId}-message`, variant: "error" }, this.message))));
|
|
392
413
|
}
|
|
393
414
|
static get is() { return "r-input-code"; }
|
|
394
415
|
static get encapsulation() { return "shadow"; }
|
|
@@ -861,6 +882,8 @@ export class InputCode {
|
|
|
861
882
|
static get states() {
|
|
862
883
|
return {
|
|
863
884
|
"values": {},
|
|
885
|
+
"wasComplete": {},
|
|
886
|
+
"lastCompletedValue": {},
|
|
864
887
|
"validityState": {},
|
|
865
888
|
"validityMessage": {}
|
|
866
889
|
};
|
|
@@ -916,6 +939,21 @@ export class InputCode {
|
|
|
916
939
|
}
|
|
917
940
|
}
|
|
918
941
|
}
|
|
942
|
+
}, {
|
|
943
|
+
"method": "rComplete",
|
|
944
|
+
"name": "rComplete",
|
|
945
|
+
"bubbles": true,
|
|
946
|
+
"cancelable": true,
|
|
947
|
+
"composed": true,
|
|
948
|
+
"docs": {
|
|
949
|
+
"tags": [],
|
|
950
|
+
"text": "Emits when all segments are filled with values"
|
|
951
|
+
},
|
|
952
|
+
"complexType": {
|
|
953
|
+
"original": "{ value: string, isComplete: boolean }",
|
|
954
|
+
"resolved": "{ value: string; isComplete: boolean; }",
|
|
955
|
+
"references": {}
|
|
956
|
+
}
|
|
919
957
|
}];
|
|
920
958
|
}
|
|
921
959
|
static get methods() {
|
|
@@ -451,14 +451,14 @@ export class InputDate {
|
|
|
451
451
|
id: `${uniqueId}-label`,
|
|
452
452
|
fieldIndicator
|
|
453
453
|
} : {};
|
|
454
|
-
return (h(Host, { key: '
|
|
454
|
+
return (h(Host, { key: '1fe0cc5598857ca719ef334807da6e2540c4a399', onClick: this.onHostClick, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("fieldset", Object.assign({ key: 'a7ad4075376fc3d08cc59be2f4340c9327e05f82', class: "r-input-date" }, groupAttrs), h("div", { key: 'ec18205fad6069d54715807529a145d03f8bdebb', class: "r-input-date--legend-container" }, h("legend", { key: '59c4384b37a3a845eb5cb0c2955b8a12777b2320', class: "r-input-date--legend" }, h("label", { key: '8b5502aeb26daa26d3f32d3669406b87e2eb29ca', htmlFor: uniqueId }, label ?
|
|
455
455
|
h("r-label", Object.assign({}, labelAttr), label)
|
|
456
456
|
:
|
|
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: '
|
|
457
|
+
h("slot", { name: "label" }))), h("slot", { key: '7a5b5ad6401bb8199d94c36383e4219fd3556db5', name: "popover" })), hint &&
|
|
458
|
+
h("r-hint", { key: '1226c6002eb581811e419db7518e02d5fbc18b5b', id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { key: '5581e3cbb731a4a23a243118f2840563352e6df1', class: "r-input-date--container" }, h("r-icon", { key: 'e8b52fc6fcb1d4f22fd24e7e26e55218a1b6ee80', name: "calendar", size: "s", class: "r-input-date--calendar-icon" }), h("div", { key: '4b97bab9a65f4a9d1958287f23940b7ee4d7143e', 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 &&
|
|
459
|
+
h("span", { "aria-hidden": "true", class: "r-input-date--delimiter" }, this.delimiter)))), h("input", Object.assign({ key: 'fdebeb8a48fd0fc10233166db94e928fc4b424de', type: "hidden" }, dateInputAttrs, { value: this.value, ref: (el) => this.nativeElement = el }))), h("div", { key: '4324ae4593512d0bd16f843e60c2058859cc1ba1', class: "r-input-date--trailing" }, this.readonly &&
|
|
460
|
+
h("r-icon", { key: '673fb144899c62d9b5d9267b35ce1f197b1f6549', class: "r-input-date--readonly-icon", name: "pen-disabled", size: "s" }), valid &&
|
|
461
|
+
h("r-icon", { key: '26828285dad4ccae6ebc8d29a2f4e1e6a5d92a6d', name: "circled-check", size: "s", color: "var(--r-status-success-regular)" }), this.hasTrailingSlot && h("slot", { key: 'bda392fa837a8fba6917fed22ff356c4e6f15b85', name: "trailing" }))), h("div", { key: 'a6d891a2f2bf3456d5cbb3ec27c6cef0bce7d434', id: `${uniqueId}-message`, "aria-live": "polite", class: "r-input-date--message" }, this.hasMessage && h("r-hint", { key: '8a3316ce851bfa02b9ca1a1fad8fde6f48a7fab6', variant: "error" }, this.message)))));
|
|
462
462
|
}
|
|
463
463
|
static get is() { return "r-input-date"; }
|
|
464
464
|
static get encapsulation() { return "shadow"; }
|
|
@@ -244,8 +244,8 @@ export class InputPassword {
|
|
|
244
244
|
tooShortMessage,
|
|
245
245
|
patternMismatchMessage
|
|
246
246
|
};
|
|
247
|
-
return (h(Host, { key: '
|
|
248
|
-
h("r-hint", { key: '
|
|
247
|
+
return (h(Host, { key: 'c4f877854375e558677df5f33682e37e048382be' }, h("r-input", Object.assign({ key: '97941b514a5f4f48b7c043ea0641cc5f26ab2ced' }, 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: '6c59c76305a41bcd4c0bfc109f7e207a871118e5', name: "padlock-closed", size: "s", slot: "leading" }), h("slot", { key: '921c7c3309a362a0e1d273e382bc43fe9a627257', name: "popover", slot: "popover" }), h("r-icon-button", { key: 'cd258b86fec5b52818fe711b078514feee825866', slot: "trailing", name: showed ? 'eye-crossed-out' : 'eye', size: "s", disabled: disabled, label: showed ? hidePasswordAriaLabel : showPasswordAriaLabel, onClick: this.onShowClick }), this.hasMessage &&
|
|
248
|
+
h("r-hint", { key: '667984f03375ec43be01732309020c45c81d9306', slot: "message", variant: "error" }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage))), h("div", { key: '6d950d7eb59905342e328047f45f9b5ae3f6f8cb', class: "visually-hidden", ref: el => this.passwordVisibilityChangeAlertContainer = el, "aria-live": "polite" })));
|
|
249
249
|
}
|
|
250
250
|
static get is() { return "r-input-password"; }
|
|
251
251
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '609e5cd2c326c30866617a238f7c92bb8b2d5e8d' }, h("div", { key: '44eaa8f48fddbdc9dfe43700b4b68650345e1352', class: "r-input-phone-number--label-container" }, h("label", { key: 'fd55a14c4491ed6cad0885aaa5add8d827ae4215', id: `${uniqueId}-label` }, label &&
|
|
288
|
+
h("r-label", Object.assign({ key: 'bdeb1325cefaf4ac82628e497133c3eabfa685d3' }, labelAttr), label)), h("slot", { key: '38a4fd3c1f5ed0748ef9df0e2f6cd93ff8d1d39f', name: "popover" })), hint &&
|
|
289
|
+
h("r-hint", { key: '9fddd5b8053220e2339fe073cf1d897d0c34c23e', id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { key: 'c493d4fe2f75cfa25fc404e985800175dfc75603', class: "r-input-phone-number", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-describedby": this.ariaDescribedBy }, h("slot", { key: 'ee98939143432df877ac2b7c2bbb7d87fd01f0a7' }), h("r-input", { key: '552c038f9225dd60b3b1957aaa1ceb3587c5f64d', 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: '11edb8cd2f8d6459ffbdef96263016ee25818fc0', type: "hidden" }, inputAttrs, { readonly: this.readonly, value: fullPhoneNumber, ref: el => this.nativeElement = el })), h("r-hint", { key: '809dbf93afc32271fd6d4930c0f547d8464b4db0', "aria-live": "polite", "aria-atomic": "true", id: `${uniqueId}-message`, class: !this.hasMessage && 'visually-hidden', variant: "error" }, this.hasMessage ? (this.hasError ? this.error : this.validityMessage) : '')));
|
|
290
290
|
}
|
|
291
291
|
static get is() { return "r-input-phone-number"; }
|
|
292
292
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '4a8c827bf39bac03424a1caefeb8795871b08276' }, h("div", { key: '212ea6fc9e2476361083610c6b8801ea3a4d79e9', class: "r-label" }, h("span", { key: '0bf0a1fc635553165fe02937626cba8a44854f3d', class: "r-label--slot" }, h("slot", { key: '16165450aeffd754cbcac5640297ab4efe94bf4c' }), fieldIndicator &&
|
|
10
|
+
h("span", { key: '34e19397cff4fa69839475ece1077c4271d9ceb4', class: "r-label--marker" }, fieldIndicator)))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "r-label"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,26 +9,17 @@
|
|
|
9
9
|
--r-pagination--width: 100%;
|
|
10
10
|
--r-pagination--max-width: 664px;
|
|
11
11
|
--r-pagination--margin: 0 auto;
|
|
12
|
-
--r-pagination--
|
|
13
|
-
--r-
|
|
14
|
-
--r-
|
|
15
|
-
--r-
|
|
16
|
-
--r-
|
|
17
|
-
--r-
|
|
18
|
-
--r-pagination--item--width:
|
|
19
|
-
--r-pagination--item--height:
|
|
20
|
-
--r-pagination--item--border-
|
|
21
|
-
--r-pagination--item--border-style: solid;
|
|
22
|
-
--r-pagination--item--border-color: var(--r-border-softer);
|
|
23
|
-
--r-pagination--item--z-index: 0;
|
|
24
|
-
--r-pagination--item--font-family: inherit;
|
|
25
|
-
--r-pagination--button--width: 100%;
|
|
26
|
-
--r-pagination--button--height: 100%;
|
|
27
|
-
--r-pagination--button--color: var(--r-text-regular);
|
|
28
|
-
--r-pagination--button--background-color: transparent;
|
|
12
|
+
--r-pagination--items-list--display: flex;
|
|
13
|
+
--r-paginaition--items-list--justify-content: center;
|
|
14
|
+
--r-paginaition--items-list--align-items: center;
|
|
15
|
+
--r-paginaition--items-list--list-style-type: none;
|
|
16
|
+
--r-paginaition--items-list--padding: 0;
|
|
17
|
+
--r-paginaition--items-list--margin: 0;
|
|
18
|
+
--r-pagination--item--width: var(--r-spacing-300, 3rem);
|
|
19
|
+
--r-pagination--item--height: var(--r-spacing-300, 3rem);
|
|
20
|
+
--r-pagination--item--border-radius: 0;
|
|
29
21
|
--r-pagination--button--border-width: 0;
|
|
30
22
|
--r-pagination--button--padding: 0;
|
|
31
|
-
--r-pagination--button--font-size: var(--r-font-size-300);
|
|
32
23
|
--r-pagination--header--display: flex;
|
|
33
24
|
--r-pagination--header--align-items: center;
|
|
34
25
|
--r-pagination--header--justify-content: space-between;
|
|
@@ -90,68 +81,38 @@
|
|
|
90
81
|
.r-pagination--header label {
|
|
91
82
|
font-size: var(--r-pagination--font-size);
|
|
92
83
|
}
|
|
93
|
-
.r-pagination--
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
--r-
|
|
100
|
-
}
|
|
101
|
-
.r-pagination--item:active {
|
|
102
|
-
--r-pagination--item--background-color: var(--r-background-interactive-pressed);
|
|
103
|
-
}
|
|
104
|
-
.r-pagination--item.stepper {
|
|
105
|
-
--r-pagination--item--background-color: transparent;
|
|
84
|
+
.r-pagination--items-list {
|
|
85
|
+
display: var(--r-pagination--items-list--display);
|
|
86
|
+
justify-content: var(--r-paginaition--items-list--justify-content);
|
|
87
|
+
align-items: var(--r-paginaition--items-list--align-items);
|
|
88
|
+
list-style-type: var(--r-paginaition--items-list--list-style-type);
|
|
89
|
+
padding: var(--r-paginaition--items-list--padding);
|
|
90
|
+
margin: var(--r-paginaition--items-list--margin);
|
|
106
91
|
}
|
|
107
92
|
.r-pagination--item.active {
|
|
108
|
-
--r-
|
|
109
|
-
--r-
|
|
93
|
+
--r-button--color: var(--r-text-regular);
|
|
94
|
+
--r-button--background-color: var(--r-background-interactive-activated);
|
|
110
95
|
font-weight: var(--r-font-weight-semibold);
|
|
111
96
|
}
|
|
112
|
-
.r-pagination--item.arrow.previous {
|
|
113
|
-
--r-pagination--item--margin-left: 0;
|
|
114
|
-
--r-pagination--item--margin-right: 16px;
|
|
115
|
-
}
|
|
116
|
-
.r-pagination--item.arrow.next {
|
|
117
|
-
--r-pagination--item--margin-left: 16px;
|
|
118
|
-
--r-pagination--item--margin-right: 0;
|
|
119
|
-
}
|
|
120
|
-
.r-pagination--item.arrow.first {
|
|
121
|
-
--r-pagination--item--margin-left: 0;
|
|
122
|
-
--r-pagination--item--margin-right: 8px;
|
|
123
|
-
}
|
|
124
|
-
.r-pagination--item.arrow.last {
|
|
125
|
-
--r-pagination--item--margin-left: 8px;
|
|
126
|
-
--r-pagination--item--margin-right: 0;
|
|
127
|
-
}
|
|
128
|
-
.r-pagination--item.disabled, .r-pagination--item.disabled:hover {
|
|
129
|
-
--r-pagination--item--opacity: 0.4;
|
|
130
|
-
--r-pagination--item--background-color: transparent;
|
|
131
|
-
}
|
|
132
97
|
.r-pagination--item.number {
|
|
133
98
|
--r-button--font-size: 0.813rem;
|
|
134
99
|
}
|
|
135
100
|
.r-pagination--item {
|
|
136
|
-
--r-button--
|
|
137
|
-
--r-button--width: var(--r-pagination--
|
|
138
|
-
--r-button--
|
|
139
|
-
--r-button--
|
|
140
|
-
--r-button--
|
|
101
|
+
--r-icon-button--height: var(--r-pagination--item--height);
|
|
102
|
+
--r-icon-button--width: var(--r-pagination--item--width);
|
|
103
|
+
--r-icon-button--border-radius: var(--r-pagination--item--border-radius);
|
|
104
|
+
--r-button--width: var(--r-pagination--item--width);
|
|
105
|
+
--r-button--height: var(--r-pagination--item--height);
|
|
141
106
|
--r-button--border-width: var(--r-pagination--button--border-width);
|
|
142
107
|
--r-button--padding: var(--r-pagination--button--padding);
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
margin-right: var(--r-pagination--item--margin-right);
|
|
154
|
-
opacity: var(--r-pagination--item--opacity);
|
|
155
|
-
width: var(--r-pagination--item--width);
|
|
156
|
-
z-index: var(--r-pagination--item--z-index);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.visually-hidden {
|
|
111
|
+
position: absolute;
|
|
112
|
+
width: 1px;
|
|
113
|
+
height: 1px;
|
|
114
|
+
clip: rect(0 0 0 0);
|
|
115
|
+
clip-path: inset(50%);
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
white-space: nowrap;
|
|
157
118
|
}
|