@rolster/react-components 18.23.9 → 18.23.11
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-SyKruNt7.css → index-9GIW7Ggg.css} +23 -3
- package/dist/cjs/index.js +37 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-SyKruNt7.css → index-9GIW7Ggg.css} +23 -3
- package/dist/es/index.js +36 -5
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/Badge/Badge.css +10 -3
- package/dist/esm/components/atoms/Badge/Badge.css.map +1 -1
- package/dist/esm/components/atoms/Badge/Badge.d.ts +5 -1
- package/dist/esm/components/atoms/Badge/Badge.js +7 -2
- package/dist/esm/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/esm/components/atoms/InputPercentage/InputPercentage.css +5 -0
- package/dist/esm/components/atoms/InputPercentage/InputPercentage.css.map +1 -0
- package/dist/esm/components/atoms/InputPercentage/InputPercentage.d.ts +7 -0
- package/dist/esm/components/atoms/InputPercentage/InputPercentage.js +14 -0
- package/dist/esm/components/atoms/InputPercentage/InputPercentage.js.map +1 -0
- package/dist/esm/components/molecules/FieldPercentage/FieldPercentage.css +6 -0
- package/dist/esm/components/molecules/FieldPercentage/FieldPercentage.css.map +1 -0
- package/dist/esm/components/molecules/FieldPercentage/FieldPercentage.d.ts +7 -0
- package/dist/esm/components/molecules/FieldPercentage/FieldPercentage.js +24 -0
- package/dist/esm/components/molecules/FieldPercentage/FieldPercentage.js.map +1 -0
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.d.ts +1 -1
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocompleteController.d.ts +1 -1
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocompleteController.js +2 -2
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocompleteController.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -94,13 +94,20 @@
|
|
|
94
94
|
width: auto;
|
|
95
95
|
padding: var(--rlc-badge-padding, var(--rls-sizing-x2));
|
|
96
96
|
box-sizing: border-box;
|
|
97
|
-
font-size: var(--rls-caption-font-size);
|
|
98
|
-
letter-spacing: var(
|
|
99
|
-
|
|
97
|
+
font-size: var(--rlc-badge-font-size, var(--rls-caption-font-size));
|
|
98
|
+
letter-spacing: var(
|
|
99
|
+
--rlc-badge-letter-spacing,
|
|
100
|
+
var(--rls-caption-letter-spacing)
|
|
101
|
+
);
|
|
102
|
+
line-height: var(--rlc-badge-line-height, var(--rls-caption-line-height));
|
|
100
103
|
color: var(--rls-theme-color-100);
|
|
101
104
|
background: var(--rls-theme-color-500);
|
|
102
105
|
border-radius: var(--rls-sizing-x2);
|
|
103
106
|
}
|
|
107
|
+
.rls-badge--contrast {
|
|
108
|
+
background: var(--rls-theme-color-100);
|
|
109
|
+
color: var(--rls-theme-color-700);
|
|
110
|
+
}
|
|
104
111
|
.rls-badge > span {
|
|
105
112
|
font-size: inherit;
|
|
106
113
|
letter-spacing: inherit;
|
|
@@ -705,6 +712,12 @@
|
|
|
705
712
|
opacity: 0.5;
|
|
706
713
|
} /*# sourceMappingURL=InputPassword.css.map */
|
|
707
714
|
|
|
715
|
+
.rls-input-percentage {
|
|
716
|
+
position: relative;
|
|
717
|
+
width: 100%;
|
|
718
|
+
box-sizing: border-box;
|
|
719
|
+
} /*# sourceMappingURL=InputPercentage.css.map */
|
|
720
|
+
|
|
708
721
|
.rls-input-search {
|
|
709
722
|
--rlc-input-height: var(--rls-sizing-x14);
|
|
710
723
|
position: relative;
|
|
@@ -1251,6 +1264,13 @@
|
|
|
1251
1264
|
z-index: 2;
|
|
1252
1265
|
} /*# sourceMappingURL=FieldPassword.css.map */
|
|
1253
1266
|
|
|
1267
|
+
.rls-field-percentage {
|
|
1268
|
+
--rlc-fieldbox-body-padding: var(--rls-sizing-x4);
|
|
1269
|
+
position: relative;
|
|
1270
|
+
width: 100%;
|
|
1271
|
+
box-sizing: border-box;
|
|
1272
|
+
} /*# sourceMappingURL=FieldPercentage.css.map */
|
|
1273
|
+
|
|
1254
1274
|
.rls-field-readonly {
|
|
1255
1275
|
--rlc-fieldbox-body-padding: var(--rls-sizing-x4);
|
|
1256
1276
|
--pvt-font-color: var(--rlc-input-font-color, var(--rls-app-color-900));
|
package/dist/cjs/index.js
CHANGED
|
@@ -1395,8 +1395,11 @@ function RlsAvatar({ children, rounded, skeleton, rlsTheme }) {
|
|
|
1395
1395
|
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
1396
1396
|
}
|
|
1397
1397
|
|
|
1398
|
-
function RlsBadge({ children, rlsTheme }) {
|
|
1399
|
-
|
|
1398
|
+
function RlsBadge({ children, contrast, rlsTheme }) {
|
|
1399
|
+
const className = require$$0.useMemo(() => {
|
|
1400
|
+
return renderClassStatus('rls-badge', { contrast });
|
|
1401
|
+
}, [contrast]);
|
|
1402
|
+
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
1400
1403
|
}
|
|
1401
1404
|
|
|
1402
1405
|
function RlsBreadcrumbLabel({ label }) {
|
|
@@ -1565,6 +1568,16 @@ function RlsInputPassword({ disabled, formControl, identifier, onEnter, onKeyDow
|
|
|
1565
1568
|
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, onKeyDown: _onKeyDown, onKeyUp: _onKeyUp }) }));
|
|
1566
1569
|
}
|
|
1567
1570
|
|
|
1571
|
+
function RlsInputPercentage(props) {
|
|
1572
|
+
const { formControl, identifier, onValue, value } = props;
|
|
1573
|
+
const [valueInput, setValueInput] = require$$0.useState(formControl?.value ?? value ?? 0);
|
|
1574
|
+
const onValueInput = require$$0.useCallback((value) => {
|
|
1575
|
+
!formControl && setValueInput(value);
|
|
1576
|
+
onValue && onValue(value);
|
|
1577
|
+
}, [formControl, onValue]);
|
|
1578
|
+
return (jsxRuntimeExports.jsx("div", { id: identifier, className: "rls-input-percentage", children: jsxRuntimeExports.jsxs(RlsInput, { ...props, type: "number", value: valueInput, onValue: onValueInput, children: [formControl?.value ?? valueInput, "%"] }) }));
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1568
1581
|
function RlsInputSearch({ formControl, identifier, onEnter, onSearch, placeholder }) {
|
|
1569
1582
|
const [value, setValue] = require$$0.useState('');
|
|
1570
1583
|
const onValue = require$$0.useCallback((value) => {
|
|
@@ -1862,6 +1875,24 @@ function RlsFieldPassword(props) {
|
|
|
1862
1875
|
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, { ...props, 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 }))] }));
|
|
1863
1876
|
}
|
|
1864
1877
|
|
|
1878
|
+
function RlsFieldPercentage(props) {
|
|
1879
|
+
const { children, disabled, formControl, identifier, msgErrorDisabled, rlsTheme } = props;
|
|
1880
|
+
const className = require$$0.useMemo(() => {
|
|
1881
|
+
const _disabled = formControl?.disabled || disabled;
|
|
1882
|
+
return renderClassStatus('rls-field-box', {
|
|
1883
|
+
focused: formControl?.focused && !_disabled,
|
|
1884
|
+
error: formControl?.wrong,
|
|
1885
|
+
disabled: _disabled
|
|
1886
|
+
}, 'rls-field-percentage');
|
|
1887
|
+
}, [
|
|
1888
|
+
formControl?.focused,
|
|
1889
|
+
formControl?.wrong,
|
|
1890
|
+
formControl?.disabled,
|
|
1891
|
+
disabled
|
|
1892
|
+
]);
|
|
1893
|
+
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(RlsInputPercentage, { ...props }) }) }), !msgErrorDisabled && (jsxRuntimeExports.jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl }))] }));
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1865
1896
|
function RlsFieldReadonly({ children, identifier, rlsTheme, value }) {
|
|
1866
1897
|
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-field-readonly rls-field-box", "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("input", { className: "rls-input__component", autoComplete: "off", type: 'text', readOnly: true, value: value }) }) })] }));
|
|
1867
1898
|
}
|
|
@@ -2694,7 +2725,7 @@ function useFieldAutocomplete(props) {
|
|
|
2694
2725
|
else {
|
|
2695
2726
|
controller.setFormValue(element);
|
|
2696
2727
|
}
|
|
2697
|
-
if (props.
|
|
2728
|
+
if (props.keepOpen) {
|
|
2698
2729
|
setPattern('');
|
|
2699
2730
|
controller.refInput?.current?.focus();
|
|
2700
2731
|
}
|
|
@@ -2706,7 +2737,7 @@ function useFieldAutocomplete(props) {
|
|
|
2706
2737
|
controller.setState,
|
|
2707
2738
|
controller.setFormValue,
|
|
2708
2739
|
setPattern,
|
|
2709
|
-
props.
|
|
2740
|
+
props.keepOpen,
|
|
2710
2741
|
props.onSelect,
|
|
2711
2742
|
props.onValue
|
|
2712
2743
|
]);
|
|
@@ -3759,6 +3790,7 @@ exports.RlsFieldDateRange = RlsFieldDateRange;
|
|
|
3759
3790
|
exports.RlsFieldMoney = RlsFieldMoney;
|
|
3760
3791
|
exports.RlsFieldNumber = RlsFieldNumber;
|
|
3761
3792
|
exports.RlsFieldPassword = RlsFieldPassword;
|
|
3793
|
+
exports.RlsFieldPercentage = RlsFieldPercentage;
|
|
3762
3794
|
exports.RlsFieldReadonly = RlsFieldReadonly;
|
|
3763
3795
|
exports.RlsFieldSelect = RlsFieldSelect;
|
|
3764
3796
|
exports.RlsFieldSelectTemplate = RlsFieldSelectTemplate;
|
|
@@ -3772,6 +3804,7 @@ exports.RlsInput = RlsInput;
|
|
|
3772
3804
|
exports.RlsInputMoney = RlsInputMoney;
|
|
3773
3805
|
exports.RlsInputNumber = RlsInputNumber;
|
|
3774
3806
|
exports.RlsInputPassword = RlsInputPassword;
|
|
3807
|
+
exports.RlsInputPercentage = RlsInputPercentage;
|
|
3775
3808
|
exports.RlsInputSearch = RlsInputSearch;
|
|
3776
3809
|
exports.RlsInputText = RlsInputText;
|
|
3777
3810
|
exports.RlsLabel = RlsLabel;
|