@rolster/react-components 18.26.3 → 18.26.6
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/dist/cjs/assets/{index-D9onGyQ8.css → index-BWk6HbJL.css} +41 -38
- package/dist/cjs/index.js +24 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-D9onGyQ8.css → index-BWk6HbJL.css} +41 -38
- package/dist/es/index.js +24 -16
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/Amount/Amount.css +1 -0
- package/dist/esm/components/atoms/Amount/Amount.css.map +1 -1
- package/dist/esm/components/atoms/Breadcrumb/Breadcrumb.css +2 -2
- package/dist/esm/components/atoms/Breadcrumb/Breadcrumb.css.map +1 -1
- package/dist/esm/components/atoms/RadioButton/RadioButton.css +2 -2
- package/dist/esm/components/atoms/RadioButton/RadioButton.css.map +1 -1
- package/dist/esm/components/molecules/Ballot/Ballot.css +14 -17
- package/dist/esm/components/molecules/Ballot/Ballot.css.map +1 -1
- package/dist/esm/components/molecules/ButtonToggle/ButtonToggle.css +4 -2
- package/dist/esm/components/molecules/ButtonToggle/ButtonToggle.css.map +1 -1
- package/dist/esm/components/molecules/MessageFormError/MessageFormError.js +1 -1
- package/dist/esm/components/molecules/PickerDay/PickerDay.css +4 -4
- package/dist/esm/components/molecules/PickerDay/PickerDay.css.map +1 -1
- package/dist/esm/components/molecules/PickerDayRange/PickerDayRange.css +4 -4
- package/dist/esm/components/molecules/PickerDayRange/PickerDayRange.css.map +1 -1
- package/dist/esm/components/molecules/Slider/Slider.css +1 -1
- package/dist/esm/components/molecules/Slider/Slider.css.map +1 -1
- package/dist/esm/components/molecules/Toolbar/Toolbar.css +1 -1
- package/dist/esm/components/molecules/Toolbar/Toolbar.css.map +1 -1
- package/dist/esm/components/organisms/Confirmation/Confirmation.css +4 -4
- package/dist/esm/components/organisms/Confirmation/Confirmation.css.map +1 -1
- package/dist/esm/components/organisms/ModalSheet/ModalSheet.css +4 -1
- package/dist/esm/components/organisms/ModalSheet/ModalSheet.css.map +1 -1
- package/dist/esm/helpers/language.js +23 -15
- package/dist/esm/helpers/language.js.map +1 -1
- package/package.json +4 -4
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
--pvt-decimal-size: var(--rlc-amount-decimal-size, 0.6);
|
|
34
34
|
--rlc-tabular-text-font-size: var(--pvt-font-size);
|
|
35
35
|
--rlc-tabular-text-font-weight: var(--pvt-font-weight);
|
|
36
|
+
--rlc-tabular-text-char-width: calc(var(--pvt-font-size) / 1.25);
|
|
36
37
|
display: flex;
|
|
37
38
|
width: var(--rlc-amount-width, auto);
|
|
38
39
|
justify-content: var(--rlc-amount-text-align, flex-start);
|
|
@@ -154,8 +155,8 @@
|
|
|
154
155
|
color: inherit;
|
|
155
156
|
line-height: inherit;
|
|
156
157
|
font-weight: var(--pvt-label-font-weight);
|
|
157
|
-
font-size: var(--pvt-label
|
|
158
|
-
letter-spacing: var(--pvt-label
|
|
158
|
+
font-size: var(--pvt-label-font-size);
|
|
159
|
+
letter-spacing: var(--pvt-label-letter-spacing);
|
|
159
160
|
}
|
|
160
161
|
.rls-breadcrumb__label:first-child::before {
|
|
161
162
|
display: none;
|
|
@@ -965,8 +966,8 @@
|
|
|
965
966
|
cursor: var(--rlc-radiobutton-cursor, initial);
|
|
966
967
|
}
|
|
967
968
|
.rls-radiobutton--checked {
|
|
968
|
-
--pvt-component-background: var(--rls-app-
|
|
969
|
-
background: var(--rls-theme-
|
|
969
|
+
--pvt-component-background: var(--rls-app-color-050);
|
|
970
|
+
background: var(--rls-theme-gradient-500);
|
|
970
971
|
border: var(--rls-theme-border-1-500);
|
|
971
972
|
}
|
|
972
973
|
.rls-radiobutton--disabled {
|
|
@@ -1112,18 +1113,22 @@
|
|
|
1112
1113
|
.rls-ballot {
|
|
1113
1114
|
--rlc-avatar-width: var(--rls-sizing-x20);
|
|
1114
1115
|
--rlc-avatar-height: var(--rls-sizing-x20);
|
|
1115
|
-
--pvt-title-letter-spacing: var(
|
|
1116
|
-
--rlc-ballot-title-letter-spacing,
|
|
1117
|
-
var(--rls-label-letter-spacing)
|
|
1118
|
-
);
|
|
1119
1116
|
--pvt-title-font-size: var(
|
|
1120
1117
|
--rlc-ballot-title-font-size,
|
|
1121
1118
|
var(--rls-label-font-size)
|
|
1122
1119
|
);
|
|
1120
|
+
--pvt-title-letter-spacing: var(
|
|
1121
|
+
--rlc-ballot-title-letter-spacing,
|
|
1122
|
+
var(--rls-label-letter-spacing)
|
|
1123
|
+
);
|
|
1123
1124
|
--pvt-title-height: var(
|
|
1124
1125
|
--rlc-ballot-title-height,
|
|
1125
1126
|
var(--rls-label-line-height)
|
|
1126
1127
|
);
|
|
1128
|
+
--pvt-subtitle-font-size: var(
|
|
1129
|
+
--rlc-ballot-subtitle-font-size,
|
|
1130
|
+
var(--rls-smalltext-font-size)
|
|
1131
|
+
);
|
|
1127
1132
|
--pvt-subtitle-letter-spacing: var(
|
|
1128
1133
|
--rlc-ballot-subtitle-letter-spacing,
|
|
1129
1134
|
var(--rls-smalltext-letter-spacing)
|
|
@@ -1134,7 +1139,7 @@
|
|
|
1134
1139
|
);
|
|
1135
1140
|
position: relative;
|
|
1136
1141
|
display: flex;
|
|
1137
|
-
width: 100
|
|
1142
|
+
width: var(--rlc-ballot-width, 100%);
|
|
1138
1143
|
align-items: center;
|
|
1139
1144
|
column-gap: var(--rls-sizing-x4);
|
|
1140
1145
|
padding: var(--rlc-ballot-padding, var(--rls-sizing-x4));
|
|
@@ -1158,9 +1163,9 @@
|
|
|
1158
1163
|
width: calc(100% - var(--rlc-avatar-width) - var(--rls-sizing-x4));
|
|
1159
1164
|
}
|
|
1160
1165
|
.rls-ballot__title {
|
|
1161
|
-
--rlc-skeleton-text-height: var(--pvt-title-height);
|
|
1162
|
-
--rlc-skeleton-text-letter-spacing: var(--pvt-title-letter-spacing);
|
|
1163
1166
|
--rlc-skeleton-text-font-size: var(--pvt-title-font-size);
|
|
1167
|
+
--rlc-skeleton-text-height: auto;
|
|
1168
|
+
--rlc-skeleton-text-letter-spacing: var(--pvt-title-letter-spacing);
|
|
1164
1169
|
position: relative;
|
|
1165
1170
|
width: 100%;
|
|
1166
1171
|
color: var(--rls-app-color-900);
|
|
@@ -1173,16 +1178,11 @@
|
|
|
1173
1178
|
);
|
|
1174
1179
|
font-size: var(--pvt-title-font-size);
|
|
1175
1180
|
letter-spacing: var(--pvt-title-letter-spacing);
|
|
1176
|
-
min-height: var(--pvt-title-height);
|
|
1177
|
-
line-height: var(--pvt-title-height);
|
|
1178
1181
|
}
|
|
1179
1182
|
.rls-ballot__subtitle {
|
|
1180
|
-
--rlc-skeleton-text-
|
|
1183
|
+
--rlc-skeleton-text-font-size: var(--pvt-subtitle-font-size);
|
|
1184
|
+
--rlc-skeleton-text-height: auto;
|
|
1181
1185
|
--rlc-skeleton-text-letter-spacing: var(--pvt-subtitle-letter-spacing);
|
|
1182
|
-
--rlc-skeleton-text-font-size: var(
|
|
1183
|
-
--rlc-ballot-subtitle-font-size,
|
|
1184
|
-
var(--rls-smalltext-font-size)
|
|
1185
|
-
);
|
|
1186
1186
|
position: relative;
|
|
1187
1187
|
width: var(--rlc-ballot-subtitle-width, 100%);
|
|
1188
1188
|
color: var(--rls-app-color-500);
|
|
@@ -1190,10 +1190,8 @@
|
|
|
1190
1190
|
--rlc-ballot-subtitle-font-weight,
|
|
1191
1191
|
var(--rls-font-weight-medium)
|
|
1192
1192
|
);
|
|
1193
|
-
font-size: var(--
|
|
1193
|
+
font-size: var(--pvt-subtitle-font-size);
|
|
1194
1194
|
letter-spacing: var(--pvt-subtitle-letter-spacing);
|
|
1195
|
-
min-height: var(--pvt-subtitle-height);
|
|
1196
|
-
line-height: var(--pvt-subtitle-height);
|
|
1197
1195
|
overflow: var(--rlc-ballot-subtitle-overflow, initial);
|
|
1198
1196
|
text-overflow: var(--rlc-ballot-subtitle-text-overflow, initial);
|
|
1199
1197
|
white-space: var(--rlc-ballot-subtitle-white-space, initial);
|
|
@@ -1268,6 +1266,8 @@
|
|
|
1268
1266
|
transform: var(--rlc-button-toggle-ul-transform);
|
|
1269
1267
|
transform-origin: 0% 0%;
|
|
1270
1268
|
box-shadow: 0px 0px 0px 3px var(--rls-theme-shadow-500);
|
|
1269
|
+
transition: transform 240ms 0ms var(--rls-standard-curve),
|
|
1270
|
+
opacity 240ms 0ms var(--rls-standard-curve);
|
|
1271
1271
|
}
|
|
1272
1272
|
.rls-button-toggle__list ul li {
|
|
1273
1273
|
padding: 0rem var(--rls-sizing-x6);
|
|
@@ -1276,8 +1276,8 @@
|
|
|
1276
1276
|
line-height: var(--rls-sizing-x20);
|
|
1277
1277
|
cursor: default;
|
|
1278
1278
|
font-weight: var(--rls-font-weight-semibold);
|
|
1279
|
-
font-size:
|
|
1280
|
-
letter-spacing:
|
|
1279
|
+
font-size: var(--rls-smalltext-font-size);
|
|
1280
|
+
letter-spacing: var(--rls-smalltext-letter-spacing);
|
|
1281
1281
|
text-transform: uppercase;
|
|
1282
1282
|
color: var(--rls-app-color-600);
|
|
1283
1283
|
}
|
|
@@ -1599,10 +1599,10 @@
|
|
|
1599
1599
|
height: var(--rls-sizing-x20);
|
|
1600
1600
|
line-height: var(--rls-sizing-x20);
|
|
1601
1601
|
text-align: center;
|
|
1602
|
-
font-size:
|
|
1602
|
+
font-size: var(--rls-caption-font-size);
|
|
1603
1603
|
color: var(--rls-app-color-600);
|
|
1604
1604
|
font-weight: var(--rls-font-weight-regular);
|
|
1605
|
-
letter-spacing:
|
|
1605
|
+
letter-spacing: var(--rls-caption-letter-spacing);
|
|
1606
1606
|
}
|
|
1607
1607
|
.rls-picker-day__component {
|
|
1608
1608
|
display: flex;
|
|
@@ -1652,13 +1652,13 @@
|
|
|
1652
1652
|
.rls-picker-day__element__span {
|
|
1653
1653
|
position: relative;
|
|
1654
1654
|
display: block;
|
|
1655
|
-
font-size:
|
|
1655
|
+
font-size: var(--rls-paragraph-font-size);
|
|
1656
1656
|
font-weight: var(--rls-font-weight-semibold);
|
|
1657
1657
|
border-radius: var(--rls-sizing-x4);
|
|
1658
1658
|
height: var(--rls-sizing-x18);
|
|
1659
1659
|
line-height: var(--rls-sizing-x18);
|
|
1660
1660
|
box-sizing: border-box;
|
|
1661
|
-
letter-spacing:
|
|
1661
|
+
letter-spacing: var(--rls-paragraph-letter-spacing);
|
|
1662
1662
|
box-shadow: var(--pvt-span-box-shadow);
|
|
1663
1663
|
}
|
|
1664
1664
|
.rls-picker-day__element__span:not(:hover) {
|
|
@@ -1701,10 +1701,10 @@
|
|
|
1701
1701
|
height: var(--rls-sizing-x20);
|
|
1702
1702
|
line-height: var(--rls-sizing-x20);
|
|
1703
1703
|
text-align: center;
|
|
1704
|
-
font-size:
|
|
1704
|
+
font-size: var(--rls-caption-font-size);
|
|
1705
1705
|
color: var(--rls-app-color-600);
|
|
1706
1706
|
font-weight: var(--rls-font-weight-regular);
|
|
1707
|
-
letter-spacing:
|
|
1707
|
+
letter-spacing: var(--rls-caption-letter-spacing);
|
|
1708
1708
|
}
|
|
1709
1709
|
.rls-picker-day-range__component {
|
|
1710
1710
|
display: flex;
|
|
@@ -1742,13 +1742,13 @@
|
|
|
1742
1742
|
.rls-picker-day-range__element__span {
|
|
1743
1743
|
position: relative;
|
|
1744
1744
|
display: block;
|
|
1745
|
-
font-size:
|
|
1745
|
+
font-size: var(--rls-paragraph-font-size);
|
|
1746
1746
|
font-weight: var(--rls-font-weight-semibold);
|
|
1747
1747
|
border-radius: var(--rls-sizing-x4);
|
|
1748
1748
|
height: var(--rls-sizing-x18);
|
|
1749
1749
|
line-height: var(--rls-sizing-x18);
|
|
1750
1750
|
box-sizing: border-box;
|
|
1751
|
-
letter-spacing:
|
|
1751
|
+
letter-spacing: var(--rls-paragraph-letter-spacing);
|
|
1752
1752
|
}
|
|
1753
1753
|
.rls-picker-day-range__element__span:not(:hover) {
|
|
1754
1754
|
background: var(--pvt-span-nothover-background);
|
|
@@ -1994,7 +1994,7 @@
|
|
|
1994
1994
|
height: var(--rls-sizing-x10);
|
|
1995
1995
|
line-height: var(--rls-sizing-x10);
|
|
1996
1996
|
text-align: center;
|
|
1997
|
-
font-size:
|
|
1997
|
+
font-size: var(--rls-micro-font-size);
|
|
1998
1998
|
font-weight: var(--rls-font-weight-medium);
|
|
1999
1999
|
color: var(--pvt-thumb-color);
|
|
2000
2000
|
z-index: var(--rls-z-index-4);
|
|
@@ -2071,7 +2071,7 @@
|
|
|
2071
2071
|
color: var(--rls-app-color-900);
|
|
2072
2072
|
height: var(--rls-sizing-x12);
|
|
2073
2073
|
line-height: var(--rls-sizing-x12);
|
|
2074
|
-
font-size:
|
|
2074
|
+
font-size: var(--rls-body-font-size);
|
|
2075
2075
|
letter-spacing: var(--rls-label-letter-spacing);
|
|
2076
2076
|
font-weight: var(--rls-font-weight-bold);
|
|
2077
2077
|
}
|
|
@@ -2211,9 +2211,9 @@
|
|
|
2211
2211
|
--pvt-subtitle-letter-spacing: var(--rls-body-letter-spacing);
|
|
2212
2212
|
--pvt-subtitle-line-height: var(--rls-body-line-height);
|
|
2213
2213
|
--pvt-subtitle-text-transform: initial;
|
|
2214
|
-
--pvt-content-font-size:
|
|
2215
|
-
--pvt-content-letter-spacing:
|
|
2216
|
-
--pvt-content-line-height:
|
|
2214
|
+
--pvt-content-font-size: var(--rls-input-font-size);
|
|
2215
|
+
--pvt-content-letter-spacing: var(--rls-input-letter-spacing);
|
|
2216
|
+
--pvt-content-line-height: var(--rls-input-line-height);
|
|
2217
2217
|
--pvt-backdrop-opacity: 0;
|
|
2218
2218
|
--pvt-backdrop-bottom: initial;
|
|
2219
2219
|
position: fixed;
|
|
@@ -2340,7 +2340,7 @@
|
|
|
2340
2340
|
--pvt-subtitle-font-size: var(--rls-smalltext-font-size);
|
|
2341
2341
|
--pvt-subtitle-letter-spacing: var(--rls-smalltext-letter-spacing);
|
|
2342
2342
|
--pvt-subtitle-line-height: var(--rls-smalltext-line-height);
|
|
2343
|
-
--pvt-content-font-size:
|
|
2343
|
+
--pvt-content-font-size: var(--rls-paragraph-font-size);
|
|
2344
2344
|
}
|
|
2345
2345
|
.rls-confirmation__header {
|
|
2346
2346
|
row-gap: var(--rls-sizing-x2);
|
|
@@ -2943,7 +2943,10 @@
|
|
|
2943
2943
|
);
|
|
2944
2944
|
--pvt-component-height: 0rem;
|
|
2945
2945
|
--pvt-component-max-height: calc(100% - var(--rls-sizing-x12));
|
|
2946
|
-
--pvt-component-border-radius: var(
|
|
2946
|
+
--pvt-component-border-radius: var(
|
|
2947
|
+
--rlc-modal-sheet-border-radius,
|
|
2948
|
+
var(--rls-sizing-x4)
|
|
2949
|
+
);
|
|
2947
2950
|
--pvt-component-opacity: 0;
|
|
2948
2951
|
--pvt-component-visibility: hidden;
|
|
2949
2952
|
--pvt-component-transition: 160ms;
|
package/dist/es/index.js
CHANGED
|
@@ -1721,10 +1721,11 @@ function RlsContent({ children, identifier, rlsTheme }) {
|
|
|
1721
1721
|
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-app__page__content", "rls-theme": rlsTheme, children: children }));
|
|
1722
1722
|
}
|
|
1723
1723
|
|
|
1724
|
-
const
|
|
1724
|
+
const errors = {
|
|
1725
1725
|
es: {
|
|
1726
1726
|
alphabetic: 'Campo solo permite caracteres',
|
|
1727
1727
|
alphanumber: 'Campo solo permite caracteres y número',
|
|
1728
|
+
checked: 'Campo debe ser seleccionado',
|
|
1728
1729
|
decimal: 'Campo debe ser número decimal',
|
|
1729
1730
|
defined: 'Campo debe estar definido',
|
|
1730
1731
|
email: 'Campo debe ser correo electrónico',
|
|
@@ -1735,18 +1736,19 @@ const errorsDictionary = {
|
|
|
1735
1736
|
maxValue: 'Campo debe tener un valor máximo de {thanValue}',
|
|
1736
1737
|
minValue: 'Campo debe tener un valor mínimo de {thanValue}',
|
|
1737
1738
|
nickname: 'Campo inválido para nombre de usuario',
|
|
1738
|
-
|
|
1739
|
+
onlyNumber: 'Campo debe ser númerico',
|
|
1739
1740
|
password: 'Campo no permitido para password',
|
|
1740
|
-
reqlength: 'Campo debe tener {length} caracter(es)',
|
|
1741
1741
|
required: 'Campo es requerido',
|
|
1742
1742
|
strMinlength: 'Campo debe tener mínimo {length} caracter(es)',
|
|
1743
1743
|
strMaxlength: 'Campo debe tener máximo {length} caracter(es)',
|
|
1744
|
+
strReqLength: 'Campo debe tener {length} caracter(es)',
|
|
1744
1745
|
textonly: 'Campo solo permite caracteres (sin espacio)',
|
|
1745
1746
|
_unknown: 'Campo inválido {error}'
|
|
1746
1747
|
},
|
|
1747
1748
|
en: {
|
|
1748
1749
|
alphabetic: 'Field only allows characters',
|
|
1749
1750
|
alphanumber: 'Field only allows characters and number',
|
|
1751
|
+
checked: 'Field must be selected',
|
|
1750
1752
|
decimal: 'Field must be decimal number',
|
|
1751
1753
|
defined: 'Field must be defined',
|
|
1752
1754
|
email: 'Field must be email',
|
|
@@ -1757,9 +1759,9 @@ const errorsDictionary = {
|
|
|
1757
1759
|
minValue: 'Field must have a minimum value of {thanValue}',
|
|
1758
1760
|
maxValue: 'Field must have a maximum value of {thanValue}',
|
|
1759
1761
|
nickname: 'Invalid field for username',
|
|
1760
|
-
|
|
1762
|
+
onlyNumber: 'Field must be numeric',
|
|
1761
1763
|
password: 'Field not allowed for password',
|
|
1762
|
-
|
|
1764
|
+
strReqLength: 'Field must be {length} characters',
|
|
1763
1765
|
required: 'Field is required',
|
|
1764
1766
|
strMinlength: 'Field must have minimum {length} characters',
|
|
1765
1767
|
strMaxlength: 'Field must have maximum {length} characters',
|
|
@@ -1769,6 +1771,7 @@ const errorsDictionary = {
|
|
|
1769
1771
|
fr: {
|
|
1770
1772
|
alphabetic: 'Field only allows characters',
|
|
1771
1773
|
alphanumber: 'Field only allows characters and number',
|
|
1774
|
+
checked: 'Field must be selected',
|
|
1772
1775
|
decimal: 'Field must be decimal number',
|
|
1773
1776
|
defined: 'Field must be defined',
|
|
1774
1777
|
email: 'Field must be email',
|
|
@@ -1779,9 +1782,9 @@ const errorsDictionary = {
|
|
|
1779
1782
|
minValue: 'Field must have a minimum value of {thanValue}',
|
|
1780
1783
|
maxValue: 'Field must have a maximum value of {thanValue}',
|
|
1781
1784
|
nickname: 'Invalid field for username',
|
|
1782
|
-
|
|
1785
|
+
onlyNumber: 'Field must be numeric',
|
|
1783
1786
|
password: 'Field not allowed for password',
|
|
1784
|
-
|
|
1787
|
+
strReqLength: 'Field must be {length} characters',
|
|
1785
1788
|
required: 'Field is required',
|
|
1786
1789
|
strMinlength: 'Field must have minimum {length} characters',
|
|
1787
1790
|
strMaxlength: 'Field must have maximum {length} characters',
|
|
@@ -1791,6 +1794,7 @@ const errorsDictionary = {
|
|
|
1791
1794
|
pt: {
|
|
1792
1795
|
alphabetic: 'Field only allows characters',
|
|
1793
1796
|
alphanumber: 'Field only allows characters and number',
|
|
1797
|
+
checked: 'Field must be selected',
|
|
1794
1798
|
decimal: 'Field must be decimal number',
|
|
1795
1799
|
defined: 'Field must be defined',
|
|
1796
1800
|
email: 'Field must be email',
|
|
@@ -1801,21 +1805,25 @@ const errorsDictionary = {
|
|
|
1801
1805
|
minValue: 'Field must have a minimum value of {thanValue}',
|
|
1802
1806
|
maxValue: 'Field must have a maximum value of {thanValue}',
|
|
1803
1807
|
nickname: 'Invalid field for username',
|
|
1804
|
-
|
|
1808
|
+
onlyNumber: 'Field must be numeric',
|
|
1805
1809
|
password: 'Field not allowed for password',
|
|
1806
|
-
|
|
1810
|
+
strReqLength: 'Field must be {length} characters',
|
|
1807
1811
|
required: 'Field is required',
|
|
1808
|
-
strMinlength: 'Field must have minimum {
|
|
1809
|
-
strMaxlength: 'Field must have maximum {
|
|
1812
|
+
strMinlength: 'Field must have minimum {length} characters',
|
|
1813
|
+
strMaxlength: 'Field must have maximum {length} characters',
|
|
1810
1814
|
textonly: 'Field only allows characters (no space)',
|
|
1811
1815
|
_unknown: 'Invalid field {error}'
|
|
1812
1816
|
}
|
|
1813
1817
|
};
|
|
1814
|
-
let _msgErrorsI18n = i18n(
|
|
1818
|
+
let _msgErrorsI18n = i18n(errors);
|
|
1815
1819
|
function setErrorsI18n(dictionary) {
|
|
1816
|
-
_msgErrorsI18n = i18n(Object.entries(
|
|
1817
|
-
|
|
1818
|
-
|
|
1820
|
+
_msgErrorsI18n = i18n(Object.entries(errors).reduce((errors, [key, value]) => {
|
|
1821
|
+
// Merge keys from dictionary in errors i18n
|
|
1822
|
+
errors[key] = {
|
|
1823
|
+
...value,
|
|
1824
|
+
...dictionary[key]
|
|
1825
|
+
};
|
|
1826
|
+
return errors;
|
|
1819
1827
|
}, {}));
|
|
1820
1828
|
}
|
|
1821
1829
|
function msgErrorsI18n(key, language, interpolators) {
|
|
@@ -1831,7 +1839,7 @@ function RlsMessageFormError({ className, formControl }) {
|
|
|
1831
1839
|
}, []);
|
|
1832
1840
|
const msgError = useMemo(() => {
|
|
1833
1841
|
return (formControl?.error &&
|
|
1834
|
-
(msgErrorsI18n(formControl.error.id, language, formControl.error.data)
|
|
1842
|
+
(msgErrorsI18n(formControl.error.id, language, formControl.error.data) ||
|
|
1835
1843
|
msgErrorsI18n('_unknown', language, { error: formControl.error.id })));
|
|
1836
1844
|
}, [formControl?.error, language]);
|
|
1837
1845
|
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: formControl?.wrong && (jsxRuntimeExports.jsx("div", { className: className, children: jsxRuntimeExports.jsx(RlsMessageIcon, { icon: "alert-triangle", rlsTheme: "danger", children: msgError }) })) }));
|