@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/es/index.js
CHANGED
|
@@ -1393,8 +1393,11 @@ function RlsAvatar({ children, rounded, skeleton, rlsTheme }) {
|
|
|
1393
1393
|
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
1394
1394
|
}
|
|
1395
1395
|
|
|
1396
|
-
function RlsBadge({ children, rlsTheme }) {
|
|
1397
|
-
|
|
1396
|
+
function RlsBadge({ children, contrast, rlsTheme }) {
|
|
1397
|
+
const className = useMemo(() => {
|
|
1398
|
+
return renderClassStatus('rls-badge', { contrast });
|
|
1399
|
+
}, [contrast]);
|
|
1400
|
+
return (jsxRuntimeExports.jsx("div", { className: className, "rls-theme": rlsTheme, children: children }));
|
|
1398
1401
|
}
|
|
1399
1402
|
|
|
1400
1403
|
function RlsBreadcrumbLabel({ label }) {
|
|
@@ -1563,6 +1566,16 @@ function RlsInputPassword({ disabled, formControl, identifier, onEnter, onKeyDow
|
|
|
1563
1566
|
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 }) }));
|
|
1564
1567
|
}
|
|
1565
1568
|
|
|
1569
|
+
function RlsInputPercentage(props) {
|
|
1570
|
+
const { formControl, identifier, onValue, value } = props;
|
|
1571
|
+
const [valueInput, setValueInput] = useState(formControl?.value ?? value ?? 0);
|
|
1572
|
+
const onValueInput = useCallback((value) => {
|
|
1573
|
+
!formControl && setValueInput(value);
|
|
1574
|
+
onValue && onValue(value);
|
|
1575
|
+
}, [formControl, onValue]);
|
|
1576
|
+
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, "%"] }) }));
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1566
1579
|
function RlsInputSearch({ formControl, identifier, onEnter, onSearch, placeholder }) {
|
|
1567
1580
|
const [value, setValue] = useState('');
|
|
1568
1581
|
const onValue = useCallback((value) => {
|
|
@@ -1860,6 +1873,24 @@ function RlsFieldPassword(props) {
|
|
|
1860
1873
|
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 }))] }));
|
|
1861
1874
|
}
|
|
1862
1875
|
|
|
1876
|
+
function RlsFieldPercentage(props) {
|
|
1877
|
+
const { children, disabled, formControl, identifier, msgErrorDisabled, rlsTheme } = props;
|
|
1878
|
+
const className = useMemo(() => {
|
|
1879
|
+
const _disabled = formControl?.disabled || disabled;
|
|
1880
|
+
return renderClassStatus('rls-field-box', {
|
|
1881
|
+
focused: formControl?.focused && !_disabled,
|
|
1882
|
+
error: formControl?.wrong,
|
|
1883
|
+
disabled: _disabled
|
|
1884
|
+
}, 'rls-field-percentage');
|
|
1885
|
+
}, [
|
|
1886
|
+
formControl?.focused,
|
|
1887
|
+
formControl?.wrong,
|
|
1888
|
+
formControl?.disabled,
|
|
1889
|
+
disabled
|
|
1890
|
+
]);
|
|
1891
|
+
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 }))] }));
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1863
1894
|
function RlsFieldReadonly({ children, identifier, rlsTheme, value }) {
|
|
1864
1895
|
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 }) }) })] }));
|
|
1865
1896
|
}
|
|
@@ -2692,7 +2723,7 @@ function useFieldAutocomplete(props) {
|
|
|
2692
2723
|
else {
|
|
2693
2724
|
controller.setFormValue(element);
|
|
2694
2725
|
}
|
|
2695
|
-
if (props.
|
|
2726
|
+
if (props.keepOpen) {
|
|
2696
2727
|
setPattern('');
|
|
2697
2728
|
controller.refInput?.current?.focus();
|
|
2698
2729
|
}
|
|
@@ -2704,7 +2735,7 @@ function useFieldAutocomplete(props) {
|
|
|
2704
2735
|
controller.setState,
|
|
2705
2736
|
controller.setFormValue,
|
|
2706
2737
|
setPattern,
|
|
2707
|
-
props.
|
|
2738
|
+
props.keepOpen,
|
|
2708
2739
|
props.onSelect,
|
|
2709
2740
|
props.onValue
|
|
2710
2741
|
]);
|
|
@@ -3724,5 +3755,5 @@ function useDatatable() {
|
|
|
3724
3755
|
return { scrolleable, tableRef };
|
|
3725
3756
|
}
|
|
3726
3757
|
|
|
3727
|
-
export { ConfirmationResult, RlsAlert, RlsAmount, RlsApplication, RlsAvatar, RlsBadge, RlsBallot, RlsBreadcrumb, RlsButton, RlsButtonAction, RlsButtonProgress, RlsButtonToggle, RlsCard, RlsCheckBox, RlsCheckBoxControl, RlsConfirmation, RlsContext, RlsDatatable, RlsDatatableCell, RlsDatatableData, RlsDatatableFloating, RlsDatatableHeader, RlsDatatableRecord, RlsDatatableSubheader, RlsDatatableTitle, RlsDatatableTotals, RlsFieldAutocomplete, RlsFieldAutocompleteTemplate, RlsFieldDate, RlsFieldDateRange, RlsFieldMoney, RlsFieldNumber, RlsFieldPassword, RlsFieldReadonly, RlsFieldSelect, RlsFieldSelectTemplate, RlsFieldText, RlsFormNavigation, RlsIcon, RlsImage, RlsImageChooser, RlsImageEditor, RlsInput, RlsInputMoney, RlsInputNumber, RlsInputPassword, RlsInputSearch, RlsInputText, RlsLabel, RlsLabelCheckBox, RlsLabelRadioButton, RlsLabelSwitch, RlsMessageFormError, RlsMessageIcon, RlsModal, RlsPagination, RlsPickerDate, RlsPickerDateRange, RlsPickerDay, RlsPickerDayRange, RlsPickerMonth, RlsPickerSelectorTitle, RlsPickerYear, RlsPoster, RlsProgressBar, RlsProgressCircular, RlsRadioButton, RlsSkeleton, RlsSkeletonText, RlsSlider, RlsSnackbar, RlsSwitch, RlsSwitchControl, RlsTabularText, RlsToolbar, calculateImgDimension, rangeFormatTemplate, renderClassStatus, setErrorsI18n, useConfirmation, useDatatable, useFieldAutocomplete, useFieldSelect, useImageEditorController, useListController, useRelocationOnComponent, useResize, useSnackbar };
|
|
3758
|
+
export { ConfirmationResult, RlsAlert, RlsAmount, RlsApplication, RlsAvatar, RlsBadge, RlsBallot, RlsBreadcrumb, RlsButton, RlsButtonAction, RlsButtonProgress, RlsButtonToggle, RlsCard, RlsCheckBox, RlsCheckBoxControl, RlsConfirmation, RlsContext, RlsDatatable, RlsDatatableCell, RlsDatatableData, RlsDatatableFloating, RlsDatatableHeader, RlsDatatableRecord, RlsDatatableSubheader, RlsDatatableTitle, RlsDatatableTotals, RlsFieldAutocomplete, RlsFieldAutocompleteTemplate, RlsFieldDate, RlsFieldDateRange, RlsFieldMoney, RlsFieldNumber, RlsFieldPassword, RlsFieldPercentage, RlsFieldReadonly, RlsFieldSelect, RlsFieldSelectTemplate, RlsFieldText, RlsFormNavigation, RlsIcon, RlsImage, RlsImageChooser, RlsImageEditor, RlsInput, RlsInputMoney, RlsInputNumber, RlsInputPassword, RlsInputPercentage, RlsInputSearch, RlsInputText, RlsLabel, RlsLabelCheckBox, RlsLabelRadioButton, RlsLabelSwitch, RlsMessageFormError, RlsMessageIcon, RlsModal, RlsPagination, RlsPickerDate, RlsPickerDateRange, RlsPickerDay, RlsPickerDayRange, RlsPickerMonth, RlsPickerSelectorTitle, RlsPickerYear, RlsPoster, RlsProgressBar, RlsProgressCircular, RlsRadioButton, RlsSkeleton, RlsSkeletonText, RlsSlider, RlsSnackbar, RlsSwitch, RlsSwitchControl, RlsTabularText, RlsToolbar, calculateImgDimension, rangeFormatTemplate, renderClassStatus, setErrorsI18n, useConfirmation, useDatatable, useFieldAutocomplete, useFieldSelect, useImageEditorController, useListController, useRelocationOnComponent, useResize, useSnackbar };
|
|
3728
3759
|
//# sourceMappingURL=index.js.map
|