@rolster/react-components 18.25.6 → 18.25.10
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-C4vQ44JP.css → index-DG6-q1c1.css} +14 -11
- package/dist/cjs/index.js +13 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-C4vQ44JP.css → index-DG6-q1c1.css} +14 -11
- package/dist/es/index.js +13 -13
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.css +3 -3
- package/dist/esm/components/atoms/Button/Button.css.map +1 -1
- package/dist/esm/components/atoms/CheckBox/CheckBox.css +1 -1
- package/dist/esm/components/atoms/CheckBox/CheckBox.css.map +1 -1
- package/dist/esm/components/atoms/{InputDouble/InputDouble.css → InputDecimal/InputDecimal.css} +3 -3
- package/dist/esm/components/atoms/InputDecimal/InputDecimal.css.map +1 -0
- package/dist/esm/components/atoms/InputDecimal/InputDecimal.d.ts +9 -0
- package/dist/esm/components/atoms/InputDecimal/InputDecimal.js +21 -0
- package/dist/esm/components/atoms/InputDecimal/InputDecimal.js.map +1 -0
- package/dist/esm/components/atoms/RadioButton/RadioButton.css +1 -1
- package/dist/esm/components/atoms/RadioButton/RadioButton.css.map +1 -1
- package/dist/esm/components/atoms/Switch/Switch.css +1 -1
- package/dist/esm/components/atoms/Switch/Switch.css.map +1 -1
- package/dist/esm/components/molecules/{FieldDouble/FieldDouble.css → FieldDecimal/FieldDecimal.css} +2 -2
- package/dist/esm/components/molecules/FieldDecimal/FieldDecimal.css.map +1 -0
- package/dist/esm/components/molecules/FieldDecimal/FieldDecimal.d.ts +9 -0
- package/dist/esm/components/molecules/{FieldDouble/FieldDouble.js → FieldDecimal/FieldDecimal.js} +6 -6
- package/dist/esm/components/molecules/FieldDecimal/FieldDecimal.js.map +1 -0
- package/dist/esm/components/molecules/LabelCheckBox/LabelCheckBox.css +1 -0
- package/dist/esm/components/molecules/LabelCheckBox/LabelCheckBox.css.map +1 -1
- package/dist/esm/components/molecules/LabelRadioButton/LabelRadioButton.css +1 -0
- package/dist/esm/components/molecules/LabelRadioButton/LabelRadioButton.css.map +1 -1
- package/dist/esm/components/molecules/LabelSwitch/LabelSwitch.css +1 -0
- package/dist/esm/components/molecules/LabelSwitch/LabelSwitch.css.map +1 -1
- package/dist/esm/components/organisms/Confirmation/Confirmation.d.ts +2 -2
- package/dist/esm/components/organisms/Confirmation/Confirmation.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/components/atoms/InputDouble/InputDouble.css.map +0 -1
- package/dist/esm/components/atoms/InputDouble/InputDouble.d.ts +0 -9
- package/dist/esm/components/atoms/InputDouble/InputDouble.js +0 -21
- package/dist/esm/components/atoms/InputDouble/InputDouble.js.map +0 -1
- package/dist/esm/components/molecules/FieldDouble/FieldDouble.css.map +0 -1
- package/dist/esm/components/molecules/FieldDouble/FieldDouble.d.ts +0 -9
- package/dist/esm/components/molecules/FieldDouble/FieldDouble.js.map +0 -1
|
@@ -219,8 +219,8 @@
|
|
|
219
219
|
--pvt-raised-background: var(--rls-theme-color-500);
|
|
220
220
|
--pvt-raised-font-color: var(--rls-theme-color-050);
|
|
221
221
|
--pvt-raised-border: none;
|
|
222
|
-
--pvt-flat-background: var(--rls-theme-color-
|
|
223
|
-
--pvt-flat-font-color: var(--rls-theme-color-
|
|
222
|
+
--pvt-flat-background: var(--rls-theme-color-100);
|
|
223
|
+
--pvt-flat-font-color: var(--rls-theme-color-600);
|
|
224
224
|
--pvt-flat-border: none;
|
|
225
225
|
--pvt-stroked-background: transparent;
|
|
226
226
|
--pvt-stroked-font-color: var(--rls-theme-color-500);
|
|
@@ -372,8 +372,8 @@
|
|
|
372
372
|
line-height: initial;
|
|
373
373
|
width: auto;
|
|
374
374
|
font-size: var(--rls-button-font-size);
|
|
375
|
-
font-weight: var(--rls-font-weight-bold);
|
|
376
375
|
letter-spacing: var(--rls-button-letter-spacing);
|
|
376
|
+
font-weight: var(--rlc-button-font-weight, var(--rls-font-weight-bold));
|
|
377
377
|
text-transform: var(--rlc-button-label-text-transform, uppercase);
|
|
378
378
|
text-overflow: ellipsis;
|
|
379
379
|
overflow: hidden;
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
transition: all 160ms 0ms var(--rls-standard-curve);
|
|
516
516
|
}
|
|
517
517
|
.rls-checkbox:hover {
|
|
518
|
-
cursor:
|
|
518
|
+
cursor: var(--rlc-checkbox-cursor, initial);
|
|
519
519
|
}
|
|
520
520
|
.rls-checkbox--checked {
|
|
521
521
|
--pvt-component-background: var(--rls-theme-color-200);
|
|
@@ -669,17 +669,17 @@
|
|
|
669
669
|
letter-spacing: var(--pvt-letter-spacing);
|
|
670
670
|
} /*# sourceMappingURL=Input.css.map */
|
|
671
671
|
|
|
672
|
-
.rls-input-
|
|
672
|
+
.rls-input-decimal {
|
|
673
673
|
--rlc-tabular-text-font-size: var(--rls-input-font-size);
|
|
674
674
|
--rlc-tabular-text-char-width: 5.25rem;
|
|
675
675
|
position: relative;
|
|
676
676
|
width: 100%;
|
|
677
677
|
box-sizing: border-box;
|
|
678
678
|
}
|
|
679
|
-
.rls-input-
|
|
679
|
+
.rls-input-decimal .rls-amount {
|
|
680
680
|
height: inherit;
|
|
681
681
|
align-items: center;
|
|
682
|
-
} /*# sourceMappingURL=
|
|
682
|
+
} /*# sourceMappingURL=InputDecimal.css.map */
|
|
683
683
|
|
|
684
684
|
.rls-input-money {
|
|
685
685
|
--rlc-tabular-text-font-size: var(--rls-input-font-size);
|
|
@@ -961,7 +961,7 @@
|
|
|
961
961
|
transition: all 160ms 0ms var(--rls-standard-curve);
|
|
962
962
|
}
|
|
963
963
|
.rls-radiobutton:hover {
|
|
964
|
-
cursor:
|
|
964
|
+
cursor: var(--rlc-radiobutton-cursor, initial);
|
|
965
965
|
}
|
|
966
966
|
.rls-radiobutton--checked {
|
|
967
967
|
--pvt-component-background: var(--rls-theme-color-200);
|
|
@@ -1021,7 +1021,7 @@
|
|
|
1021
1021
|
max-width: var(--rlc-switch-max-width, var(--rls-sizing-x20));
|
|
1022
1022
|
}
|
|
1023
1023
|
.rls-switch:hover {
|
|
1024
|
-
cursor:
|
|
1024
|
+
cursor: var(--rlc-switch-cursor, initial);
|
|
1025
1025
|
}
|
|
1026
1026
|
.rls-switch--checked {
|
|
1027
1027
|
--pvt-element-left: calc(100% - var(--pvt-element-size));
|
|
@@ -1266,12 +1266,12 @@
|
|
|
1266
1266
|
color: var(--rls-app-color-900);
|
|
1267
1267
|
} /*# sourceMappingURL=ButtonToggle.css.map */
|
|
1268
1268
|
|
|
1269
|
-
.rls-field-
|
|
1269
|
+
.rls-field-decimal {
|
|
1270
1270
|
--rlc-fieldbox-body-padding: var(--rls-sizing-x4);
|
|
1271
1271
|
position: relative;
|
|
1272
1272
|
width: 100%;
|
|
1273
1273
|
box-sizing: border-box;
|
|
1274
|
-
} /*# sourceMappingURL=
|
|
1274
|
+
} /*# sourceMappingURL=FieldDecimal.css.map */
|
|
1275
1275
|
|
|
1276
1276
|
.rls-field-money {
|
|
1277
1277
|
--rlc-fieldbox-body-padding: var(--rls-sizing-x4);
|
|
@@ -1333,6 +1333,7 @@
|
|
|
1333
1333
|
} /*# sourceMappingURL=FieldText.css.map */
|
|
1334
1334
|
|
|
1335
1335
|
.rls-label-checkbox {
|
|
1336
|
+
--rlc-switch-cursor: pointer;
|
|
1336
1337
|
--pvt-text-opacity: 1;
|
|
1337
1338
|
--pvt-text-height: var(--rls-sizing-x12);
|
|
1338
1339
|
--pvt-text-overflow: hidden;
|
|
@@ -1375,6 +1376,7 @@
|
|
|
1375
1376
|
} /*# sourceMappingURL=LabelCheckBox.css.map */
|
|
1376
1377
|
|
|
1377
1378
|
.rls-label-radiobutton {
|
|
1379
|
+
--rlc-switch-cursor: pointer;
|
|
1378
1380
|
--pvt-text-opacity: 1;
|
|
1379
1381
|
--pvt-text-height: var(--rls-sizing-x12);
|
|
1380
1382
|
--pvt-text-overflow: hidden;
|
|
@@ -1417,6 +1419,7 @@
|
|
|
1417
1419
|
} /*# sourceMappingURL=LabelRadioButton.css.map */
|
|
1418
1420
|
|
|
1419
1421
|
.rls-label-switch {
|
|
1422
|
+
--rlc-switch-cursor: pointer;
|
|
1420
1423
|
--pvt-text-opacity: 1;
|
|
1421
1424
|
--pvt-text-height: var(--rls-sizing-x12);
|
|
1422
1425
|
--pvt-text-overflow: hidden;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1518,19 +1518,19 @@ function RlsInput({ children, decimals, disabled, formControl, identifier, onBlu
|
|
|
1518
1518
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, children: [jsxRuntimeExports.jsx("input", { ref: formControl?.elementRef, className: "rls-input__component", autoComplete: "off", type: type ?? 'text', placeholder: placeholder, disabled: formControl?.disabled || disabled, readOnly: readOnly, onFocus: _onFocus, onBlur: _onBlur, onChange: _onChange, onKeyDown: _onKeyDown, onKeyUp: _onKeyUp, value: valueInput }), jsxRuntimeExports.jsx("span", { className: "rls-input__value", children: children })] }));
|
|
1519
1519
|
}
|
|
1520
1520
|
|
|
1521
|
-
function
|
|
1521
|
+
function RlsInputDecimal(props) {
|
|
1522
1522
|
const { decimals, formControl, identifier, onValue, symbol, value } = props;
|
|
1523
|
-
const [valueInput, setValueInput] = require$$0.useState((formControl?.value ?? value ?? commons.
|
|
1523
|
+
const [valueInput, setValueInput] = require$$0.useState((formControl?.value ?? value ?? commons.BigDecimal.zero()).rounded);
|
|
1524
1524
|
const amount = require$$0.useMemo(() => {
|
|
1525
|
-
return formControl?.value?.
|
|
1525
|
+
return formControl?.value?.rounded ?? valueInput;
|
|
1526
1526
|
}, [formControl?.value, valueInput]);
|
|
1527
1527
|
const onValueInput = require$$0.useCallback((value) => {
|
|
1528
|
-
const
|
|
1529
|
-
formControl ? formControl.setValue(
|
|
1530
|
-
onValue && onValue(
|
|
1528
|
+
const valueDecimal = commons.BigDecimal.create(value);
|
|
1529
|
+
formControl ? formControl.setValue(valueDecimal) : setValueInput(value);
|
|
1530
|
+
onValue && onValue(valueDecimal);
|
|
1531
1531
|
}, [formControl, onValue]);
|
|
1532
1532
|
const doubleProps = { ...props, formControl: undefined };
|
|
1533
|
-
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-
|
|
1533
|
+
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-decimal", children: jsxRuntimeExports.jsx(RlsInput, { ...doubleProps, type: "number", value: valueInput, onValue: onValueInput, children: jsxRuntimeExports.jsx(RlsAmount, { value: amount, symbol: symbol, decimals: decimals }) }) }));
|
|
1534
1534
|
}
|
|
1535
1535
|
|
|
1536
1536
|
function RlsInputMoney(props) {
|
|
@@ -1839,7 +1839,7 @@ function RlsMessageFormError({ className, formControl }) {
|
|
|
1839
1839
|
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: formControl?.wrong && (jsxRuntimeExports.jsx("div", { className: className, children: jsxRuntimeExports.jsx(RlsMessageIcon, { icon: "alert-triangle", rlsTheme: "danger", children: msgError }) })) }));
|
|
1840
1840
|
}
|
|
1841
1841
|
|
|
1842
|
-
function
|
|
1842
|
+
function RlsFieldDecimal(props) {
|
|
1843
1843
|
const { children, formControl, identifier, msgErrorDisabled, rlsTheme } = props;
|
|
1844
1844
|
const disabled = require$$0.useMemo(() => {
|
|
1845
1845
|
return formControl?.disabled || props.disabled;
|
|
@@ -1850,9 +1850,9 @@ function RlsFieldDouble(props) {
|
|
|
1850
1850
|
error: formControl?.wrong,
|
|
1851
1851
|
disabled,
|
|
1852
1852
|
readonly: props.readOnly
|
|
1853
|
-
}, 'rls-field-
|
|
1853
|
+
}, 'rls-field-decimal');
|
|
1854
1854
|
}, [formControl?.focused, formControl?.wrong, props.readOnly, disabled]);
|
|
1855
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsx("div", { className: "rls-field-box__body", children: jsxRuntimeExports.jsx(
|
|
1855
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("span", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsx("div", { className: "rls-field-box__body", children: jsxRuntimeExports.jsx(RlsInputDecimal, { ...props }) }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1856
1856
|
}
|
|
1857
1857
|
|
|
1858
1858
|
function RlsFieldMoney(props) {
|
|
@@ -2475,7 +2475,7 @@ const reactI18n = i18n.i18n({
|
|
|
2475
2475
|
}
|
|
2476
2476
|
});
|
|
2477
2477
|
|
|
2478
|
-
class ConfirmationResult extends commons.
|
|
2478
|
+
class ConfirmationResult extends commons.SealedPartial {
|
|
2479
2479
|
static approved() {
|
|
2480
2480
|
return new ConfirmationResult('approved');
|
|
2481
2481
|
}
|
|
@@ -3889,7 +3889,7 @@ exports.RlsFieldAutocomplete = RlsFieldAutocomplete;
|
|
|
3889
3889
|
exports.RlsFieldAutocompleteTemplate = RlsFieldAutocompleteTemplate;
|
|
3890
3890
|
exports.RlsFieldDate = RlsFieldDate;
|
|
3891
3891
|
exports.RlsFieldDateRange = RlsFieldDateRange;
|
|
3892
|
-
exports.
|
|
3892
|
+
exports.RlsFieldDecimal = RlsFieldDecimal;
|
|
3893
3893
|
exports.RlsFieldMoney = RlsFieldMoney;
|
|
3894
3894
|
exports.RlsFieldNumber = RlsFieldNumber;
|
|
3895
3895
|
exports.RlsFieldPassword = RlsFieldPassword;
|
|
@@ -3904,7 +3904,7 @@ exports.RlsImage = RlsImage;
|
|
|
3904
3904
|
exports.RlsImageChooser = RlsImageChooser;
|
|
3905
3905
|
exports.RlsImageEditor = RlsImageEditor;
|
|
3906
3906
|
exports.RlsInput = RlsInput;
|
|
3907
|
-
exports.
|
|
3907
|
+
exports.RlsInputDecimal = RlsInputDecimal;
|
|
3908
3908
|
exports.RlsInputMoney = RlsInputMoney;
|
|
3909
3909
|
exports.RlsInputNumber = RlsInputNumber;
|
|
3910
3910
|
exports.RlsInputPassword = RlsInputPassword;
|