@rolster/react-components 18.21.11 → 18.21.12
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-B4R0Qgg4.css → index-D8hnIXk1.css} +0 -1
- package/dist/cjs/index.js +18 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-B4R0Qgg4.css → index-D8hnIXk1.css} +0 -1
- package/dist/es/index.js +18 -18
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/Breadcrumb/Breadcrumb.css +0 -1
- package/dist/esm/components/atoms/Input/Input.d.ts +2 -1
- package/dist/esm/components/atoms/Input/Input.js +2 -2
- package/dist/esm/components/atoms/Input/Input.js.map +1 -1
- package/dist/esm/components/atoms/InputMoney/InputMoney.d.ts +1 -1
- package/dist/esm/components/atoms/InputMoney/InputMoney.js +2 -2
- package/dist/esm/components/atoms/InputMoney/InputMoney.js.map +1 -1
- package/dist/esm/components/atoms/InputNumber/InputNumber.d.ts +1 -1
- package/dist/esm/components/atoms/InputNumber/InputNumber.js +2 -2
- package/dist/esm/components/atoms/InputNumber/InputNumber.js.map +1 -1
- package/dist/esm/components/atoms/InputPassword/InputPassword.d.ts +2 -1
- package/dist/esm/components/atoms/InputPassword/InputPassword.js +2 -2
- package/dist/esm/components/atoms/InputPassword/InputPassword.js.map +1 -1
- package/dist/esm/components/atoms/InputText/InputText.d.ts +1 -1
- package/dist/esm/components/atoms/InputText/InputText.js +2 -2
- package/dist/esm/components/atoms/InputText/InputText.js.map +1 -1
- package/dist/esm/components/molecules/FieldMoney/FieldMoney.d.ts +1 -1
- package/dist/esm/components/molecules/FieldMoney/FieldMoney.js +2 -2
- package/dist/esm/components/molecules/FieldMoney/FieldMoney.js.map +1 -1
- package/dist/esm/components/molecules/FieldNumber/FieldNumber.d.ts +1 -1
- package/dist/esm/components/molecules/FieldNumber/FieldNumber.js +2 -2
- package/dist/esm/components/molecules/FieldNumber/FieldNumber.js.map +1 -1
- package/dist/esm/components/molecules/FieldPassword/FieldPassword.d.ts +2 -1
- package/dist/esm/components/molecules/FieldPassword/FieldPassword.js +2 -2
- package/dist/esm/components/molecules/FieldPassword/FieldPassword.js.map +1 -1
- package/dist/esm/components/molecules/FieldText/FieldText.d.ts +1 -1
- package/dist/esm/components/molecules/FieldText/FieldText.js +2 -2
- package/dist/esm/components/molecules/FieldText/FieldText.js.map +1 -1
- package/dist/esm/components/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -1537,7 +1537,7 @@ function RlsCheckBoxControl({ formControl, disabled, identifier, rlsTheme }) {
|
|
|
1537
1537
|
return (jsxRuntimeExports.jsx(RlsCheckBox, { identifier: identifier, checked: !!formControl.value, disabled: disabled, onClick: onClick, rlsTheme: rlsTheme }));
|
|
1538
1538
|
}
|
|
1539
1539
|
|
|
1540
|
-
function RlsInput({ children, disabled, formControl, identifier, onValue, placeholder, type, value }) {
|
|
1540
|
+
function RlsInput({ children, disabled, formControl, identifier, onValue, placeholder, readOnly, type, value }) {
|
|
1541
1541
|
const valueInitial = formControl?.value ?? value ? String(value) : '';
|
|
1542
1542
|
const [valueInput, setValueInput] = useState(valueInitial);
|
|
1543
1543
|
const [focused, setFocused] = useState(false);
|
|
@@ -1566,28 +1566,28 @@ function RlsInput({ children, disabled, formControl, identifier, onValue, placeh
|
|
|
1566
1566
|
focused: formControl?.focused ?? focused
|
|
1567
1567
|
});
|
|
1568
1568
|
}, [formControl?.focused, formControl?.disabled, focused, disabled]);
|
|
1569
|
-
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, onFocus: onFocus, onBlur: onBlur, onChange: onChange, value: valueInput }), jsxRuntimeExports.jsx("span", { className: "rls-input__value", children: children })] }));
|
|
1569
|
+
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, value: valueInput }), jsxRuntimeExports.jsx("span", { className: "rls-input__value", children: children })] }));
|
|
1570
1570
|
}
|
|
1571
1571
|
|
|
1572
|
-
function RlsInputMoney({ decimals, disabled, formControl, identifier, onValue, placeholder, symbol, value }) {
|
|
1572
|
+
function RlsInputMoney({ decimals, disabled, formControl, identifier, onValue, placeholder, readOnly, symbol, value }) {
|
|
1573
1573
|
const [valueInput, setValueInput] = useState(formControl?.value ?? value ?? 0);
|
|
1574
1574
|
const onValueInput = useCallback((value) => {
|
|
1575
1575
|
!formControl && setValueInput(value);
|
|
1576
1576
|
onValue && onValue(value);
|
|
1577
1577
|
}, [formControl, onValue]);
|
|
1578
|
-
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-money", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "number", value: valueInput, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: jsxRuntimeExports.jsx(RlsAmount, { value: formControl?.value ?? valueInput, symbol: symbol, decimals: decimals }) }) }));
|
|
1578
|
+
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-money", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "number", value: valueInput, disabled: disabled, readOnly: readOnly, placeholder: placeholder, onValue: onValueInput, children: jsxRuntimeExports.jsx(RlsAmount, { value: formControl?.value ?? valueInput, symbol: symbol, decimals: decimals }) }) }));
|
|
1579
1579
|
}
|
|
1580
1580
|
|
|
1581
|
-
function RlsInputNumber({ disabled, formControl, identifier, onValue, placeholder, value }) {
|
|
1581
|
+
function RlsInputNumber({ disabled, formControl, identifier, onValue, placeholder, readOnly, value }) {
|
|
1582
1582
|
const [valueInput, setValueInput] = useState(formControl?.value ?? value ?? 0);
|
|
1583
1583
|
const onValueInput = useCallback((value) => {
|
|
1584
1584
|
!formControl && setValueInput(value);
|
|
1585
1585
|
onValue && onValue(value);
|
|
1586
1586
|
}, [formControl, onValue]);
|
|
1587
|
-
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-number", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "number", value: valueInput, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: formControl?.value ?? valueInput }) }));
|
|
1587
|
+
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-number", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "number", value: valueInput, disabled: disabled, readOnly: readOnly, placeholder: placeholder, onValue: onValueInput, children: formControl?.value ?? valueInput }) }));
|
|
1588
1588
|
}
|
|
1589
1589
|
|
|
1590
|
-
function RlsInputPassword({ disabled, formControl, identifier, onValue, placeholder, type }) {
|
|
1590
|
+
function RlsInputPassword({ disabled, formControl, identifier, onValue, placeholder, readOnly, type }) {
|
|
1591
1591
|
const [focused, setFocused] = useState(false);
|
|
1592
1592
|
const onChange = useCallback((event) => {
|
|
1593
1593
|
formControl?.setValue(event.target.value);
|
|
@@ -1607,7 +1607,7 @@ function RlsInputPassword({ disabled, formControl, identifier, onValue, placehol
|
|
|
1607
1607
|
focused: formControl?.focused ?? focused
|
|
1608
1608
|
});
|
|
1609
1609
|
}, [formControl?.focused, formControl?.disabled, focused, disabled]);
|
|
1610
|
-
return (jsxRuntimeExports.jsx("div", { id: identifier, className: className, children: jsxRuntimeExports.jsx("input", { className: "rls-input-password__component", autoComplete: "off", type: type ?? 'password', placeholder: placeholder, disabled: disabled, onFocus: onFocus, onBlur: onBlur, onChange: onChange }) }));
|
|
1610
|
+
return (jsxRuntimeExports.jsx("div", { id: identifier, className: className, children: jsxRuntimeExports.jsx("input", { className: "rls-input-password__component", autoComplete: "off", type: type ?? 'password', placeholder: placeholder, disabled: disabled, readOnly: readOnly, onFocus: onFocus, onBlur: onBlur, onChange: onChange }) }));
|
|
1611
1611
|
}
|
|
1612
1612
|
|
|
1613
1613
|
function RlsInputSearch({ formControl, identifier, onSearch, placeholder }) {
|
|
@@ -1618,13 +1618,13 @@ function RlsInputSearch({ formControl, identifier, onSearch, placeholder }) {
|
|
|
1618
1618
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-input-search", children: [jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, placeholder: placeholder, onValue: onValue, children: formControl?.value ?? value }), onSearch && jsxRuntimeExports.jsx(RlsButtonAction, { icon: "search", onClick: onSearch })] }));
|
|
1619
1619
|
}
|
|
1620
1620
|
|
|
1621
|
-
function RlsInputText({ disabled, formControl, identifier, onValue, placeholder, value }) {
|
|
1621
|
+
function RlsInputText({ disabled, formControl, identifier, onValue, placeholder, readOnly, value }) {
|
|
1622
1622
|
const [valueInput, setValueInput] = useState(formControl?.value ?? value ?? '');
|
|
1623
1623
|
const onValueInput = useCallback((value) => {
|
|
1624
1624
|
!formControl && setValueInput(value);
|
|
1625
1625
|
onValue && onValue(value);
|
|
1626
1626
|
}, [formControl, onValue]);
|
|
1627
|
-
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-text", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "text", value: valueInput, disabled: disabled, placeholder: placeholder, onValue: onValueInput, children: formControl?.value ?? valueInput }) }));
|
|
1627
|
+
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-text", children: jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, type: "text", value: valueInput, disabled: disabled, readOnly: readOnly, placeholder: placeholder, onValue: onValueInput, children: formControl?.value ?? valueInput }) }));
|
|
1628
1628
|
}
|
|
1629
1629
|
|
|
1630
1630
|
function RlsLabel({ children, rlsTheme }) {
|
|
@@ -1751,7 +1751,7 @@ function RlsMessageFormError({ className, formControl }) {
|
|
|
1751
1751
|
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: formControl?.wrong && (jsxRuntimeExports.jsx("div", { className: className, children: jsxRuntimeExports.jsx(RlsMessageIcon, { icon: "alert-triangle", rlsTheme: "danger", children: msgError }) })) }));
|
|
1752
1752
|
}
|
|
1753
1753
|
|
|
1754
|
-
function RlsFieldMoney({ children, decimals, disabled, formControl, identifier, msgErrorDisabled, onValue, placeholder,
|
|
1754
|
+
function RlsFieldMoney({ children, decimals, disabled, formControl, identifier, msgErrorDisabled, onValue, placeholder, readOnly, rlsTheme, symbol, value }) {
|
|
1755
1755
|
const className = useMemo(() => {
|
|
1756
1756
|
const _disabled = formControl?.disabled || disabled;
|
|
1757
1757
|
return renderClassStatus('rls-field-box', {
|
|
@@ -1765,10 +1765,10 @@ function RlsFieldMoney({ children, decimals, disabled, formControl, identifier,
|
|
|
1765
1765
|
formControl?.disabled,
|
|
1766
1766
|
disabled
|
|
1767
1767
|
]);
|
|
1768
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("label", { 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(RlsInputMoney, { formControl: formControl, value: value, disabled: disabled, placeholder: placeholder, symbol: symbol, decimals: decimals, onValue: onValue }) }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1768
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("label", { 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(RlsInputMoney, { formControl: formControl, value: value, disabled: disabled, readOnly: readOnly, placeholder: placeholder, symbol: symbol, decimals: decimals, onValue: onValue }) }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1769
1769
|
}
|
|
1770
1770
|
|
|
1771
|
-
function RlsFieldNumber({ children, disabled, formControl, identifier, msgErrorDisabled, onValue, placeholder, rlsTheme, value }) {
|
|
1771
|
+
function RlsFieldNumber({ children, disabled, formControl, identifier, msgErrorDisabled, onValue, placeholder, readOnly, rlsTheme, value }) {
|
|
1772
1772
|
const className = useMemo(() => {
|
|
1773
1773
|
const _disabled = formControl?.disabled || disabled;
|
|
1774
1774
|
return renderClassStatus('rls-field-box', {
|
|
@@ -1782,10 +1782,10 @@ function RlsFieldNumber({ children, disabled, formControl, identifier, msgErrorD
|
|
|
1782
1782
|
formControl?.disabled,
|
|
1783
1783
|
disabled
|
|
1784
1784
|
]);
|
|
1785
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("label", { 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(RlsInputNumber, { formControl: formControl, value: value, disabled: disabled, placeholder: placeholder, onValue: onValue }) }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1785
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("label", { 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(RlsInputNumber, { formControl: formControl, value: value, disabled: disabled, readOnly: readOnly, placeholder: placeholder, onValue: onValue }) }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1786
1786
|
}
|
|
1787
1787
|
|
|
1788
|
-
function RlsFieldPassword({ children, disabled, formControl, identifier, msgErrorDisabled, placeholder, rlsTheme }) {
|
|
1788
|
+
function RlsFieldPassword({ children, disabled, formControl, identifier, msgErrorDisabled, placeholder, readOnly, rlsTheme }) {
|
|
1789
1789
|
const [password, setPassword] = useState(true);
|
|
1790
1790
|
const onToggleInput = useCallback(() => {
|
|
1791
1791
|
setPassword((password) => !password);
|
|
@@ -1803,10 +1803,10 @@ function RlsFieldPassword({ children, disabled, formControl, identifier, msgErro
|
|
|
1803
1803
|
formControl?.disabled,
|
|
1804
1804
|
disabled
|
|
1805
1805
|
]);
|
|
1806
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("label", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx(RlsInputPassword, { formControl: formControl, disabled: disabled, placeholder: placeholder, type: password ? 'password' : 'text' }), jsxRuntimeExports.jsx(RlsButtonAction, { icon: password ? 'eye' : 'eye-off', onClick: onToggleInput })] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1806
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("label", { className: "rls-field-box__label", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-field-box__component", children: jsxRuntimeExports.jsxs("div", { className: "rls-field-box__body", children: [jsxRuntimeExports.jsx(RlsInputPassword, { formControl: formControl, disabled: disabled, readOnly: readOnly, placeholder: placeholder, type: password ? 'password' : 'text' }), jsxRuntimeExports.jsx(RlsButtonAction, { icon: password ? 'eye' : 'eye-off', onClick: onToggleInput })] }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1807
1807
|
}
|
|
1808
1808
|
|
|
1809
|
-
function RlsFieldText({ children, disabled, formControl, identifier, msgErrorDisabled, onValue, placeholder, rlsTheme, value }) {
|
|
1809
|
+
function RlsFieldText({ children, disabled, formControl, identifier, msgErrorDisabled, onValue, placeholder, readOnly, rlsTheme, value }) {
|
|
1810
1810
|
const className = useMemo(() => {
|
|
1811
1811
|
const _disabled = formControl?.disabled || disabled;
|
|
1812
1812
|
return renderClassStatus('rls-field-box', {
|
|
@@ -1820,7 +1820,7 @@ function RlsFieldText({ children, disabled, formControl, identifier, msgErrorDis
|
|
|
1820
1820
|
formControl?.disabled,
|
|
1821
1821
|
disabled
|
|
1822
1822
|
]);
|
|
1823
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("label", { 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(RlsInputText, { formControl: formControl, value: value, disabled: disabled, placeholder: placeholder, onValue: onValue }) }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1823
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, "rls-theme": rlsTheme, children: [children && jsxRuntimeExports.jsx("label", { 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(RlsInputText, { formControl: formControl, value: value, disabled: disabled, readOnly: readOnly, placeholder: placeholder, onValue: onValue }) }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1824
1824
|
}
|
|
1825
1825
|
|
|
1826
1826
|
function RlsLabelCheckBox({ children, disabled, extended, identifier, formControl, rlsTheme }) {
|