@rolster/react-components 18.24.11 → 18.25.1
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-A_JkPXhq.css → index-ItWqNiAF.css} +7 -0
- package/dist/cjs/index.js +21 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-A_JkPXhq.css → index-ItWqNiAF.css} +7 -0
- package/dist/es/index.js +22 -16
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/InputSearch/InputSearch.css +7 -0
- package/dist/esm/components/atoms/InputSearch/InputSearch.css.map +1 -1
- package/dist/esm/components/atoms/InputSearch/InputSearch.d.ts +2 -1
- package/dist/esm/components/atoms/InputSearch/InputSearch.js +7 -3
- package/dist/esm/components/atoms/InputSearch/InputSearch.js.map +1 -1
- package/dist/esm/components/molecules/PickerMonth/PickerMonth.js +4 -4
- package/dist/esm/components/molecules/PickerMonth/PickerMonth.js.map +1 -1
- package/dist/esm/components/molecules/PickerSelectorTitle/PickerSelectorTitle.js +7 -5
- package/dist/esm/components/molecules/PickerSelectorTitle/PickerSelectorTitle.js.map +1 -1
- package/dist/esm/components/molecules/PickerYear/PickerYear.js +2 -2
- package/dist/esm/components/molecules/PickerYear/PickerYear.js.map +1 -1
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.d.ts +1 -0
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.js +2 -1
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.js.map +1 -1
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.d.ts +1 -0
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.js +2 -2
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.js.map +1 -1
- package/dist/esm/components/organisms/PickerDateRange/PickerDateRange.js +3 -3
- package/dist/esm/components/organisms/PickerDateRange/PickerDateRange.js.map +1 -1
- package/package.json +7 -7
|
@@ -739,6 +739,13 @@
|
|
|
739
739
|
box-sizing: border-box;
|
|
740
740
|
background: var(--rlc-input-search-background, var(--rls-app-color-100));
|
|
741
741
|
border-radius: var(--rls-sizing-x4);
|
|
742
|
+
}
|
|
743
|
+
.rls-input-search--disabled {
|
|
744
|
+
opacity: 0.5;
|
|
745
|
+
}
|
|
746
|
+
.rls-input-search .rls-input__component:disabled,
|
|
747
|
+
.rls-input-search .rls-button-action:disabled {
|
|
748
|
+
opacity: 1 !important;
|
|
742
749
|
} /*# sourceMappingURL=InputSearch.css.map */
|
|
743
750
|
|
|
744
751
|
.rls-input-text {
|
package/dist/cjs/index.js
CHANGED
|
@@ -1578,12 +1578,15 @@ function RlsInputPercentage(props) {
|
|
|
1578
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
1579
|
}
|
|
1580
1580
|
|
|
1581
|
-
function RlsInputSearch({ formControl, identifier, onEnter, onSearch, placeholder }) {
|
|
1581
|
+
function RlsInputSearch({ formControl, disabled, identifier, onEnter, onSearch, placeholder }) {
|
|
1582
1582
|
const [value, setValue] = require$$0.useState('');
|
|
1583
|
+
const className = require$$0.useMemo(() => {
|
|
1584
|
+
return renderClassStatus('rls-input-search', { disabled });
|
|
1585
|
+
}, [disabled]);
|
|
1583
1586
|
const onValue = require$$0.useCallback((value) => {
|
|
1584
1587
|
!formControl && setValue(() => value);
|
|
1585
1588
|
}, [formControl]);
|
|
1586
|
-
return (jsxRuntimeExports.jsxs("div", { id: identifier, className:
|
|
1589
|
+
return (jsxRuntimeExports.jsxs("div", { id: identifier, className: className, children: [jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, placeholder: placeholder, onEnter: onEnter, onValue: onValue, disabled: disabled, children: formControl?.value ?? value }), onSearch && (jsxRuntimeExports.jsx(RlsButtonAction, { icon: "search", onClick: onSearch, disabled: disabled }))] }));
|
|
1587
1590
|
}
|
|
1588
1591
|
|
|
1589
1592
|
function RlsInputText(props) {
|
|
@@ -2181,7 +2184,7 @@ function RlsPickerMonthElement({ month, onSelect, disabled }) {
|
|
|
2181
2184
|
});
|
|
2182
2185
|
}, [month.disabled, month.focused, month.selected, disabled]);
|
|
2183
2186
|
const onClick = require$$0.useCallback(() => {
|
|
2184
|
-
commons.
|
|
2187
|
+
commons.valueIsDefined(month.value) &&
|
|
2185
2188
|
!month.disabled &&
|
|
2186
2189
|
!disabled &&
|
|
2187
2190
|
onSelect(month.value);
|
|
@@ -2212,7 +2215,7 @@ function RlsPickerMonth({ date: _date, disabled, formControl, maxDate, minDate,
|
|
|
2212
2215
|
maxDate
|
|
2213
2216
|
};
|
|
2214
2217
|
const month = components.verifyMonthPicker(options);
|
|
2215
|
-
commons.
|
|
2218
|
+
commons.valueIsDefined(month)
|
|
2216
2219
|
? setMonthValue(month)
|
|
2217
2220
|
: setMonths(components.createMonthPicker(options));
|
|
2218
2221
|
}, [date, year, value, minDate, maxDate]);
|
|
@@ -2224,7 +2227,7 @@ function RlsPickerMonth({ date: _date, disabled, formControl, maxDate, minDate,
|
|
|
2224
2227
|
minDate,
|
|
2225
2228
|
maxDate
|
|
2226
2229
|
});
|
|
2227
|
-
commons.
|
|
2230
|
+
commons.valueIsDefined(month)
|
|
2228
2231
|
? formControl?.setValue(month)
|
|
2229
2232
|
: setValue(formControl?.value ?? date.getMonth());
|
|
2230
2233
|
}, [formControl?.value]);
|
|
@@ -2250,7 +2253,8 @@ function RlsPickerSelectorTitle({ monthControl, type, yearControl, date, disable
|
|
|
2250
2253
|
setLabel(dates.MONTH_NAMES(monthControl.value ?? dates.Month.January));
|
|
2251
2254
|
}, [monthControl.value]);
|
|
2252
2255
|
const onPreviousMonth = require$$0.useCallback(() => {
|
|
2253
|
-
if (commons.
|
|
2256
|
+
if (commons.valueIsDefined(monthControl.value) &&
|
|
2257
|
+
commons.valueIsDefined(yearControl.value)) {
|
|
2254
2258
|
if (monthControl.value > dates.Month.January) {
|
|
2255
2259
|
monthControl.setValue(monthControl.value - 1);
|
|
2256
2260
|
}
|
|
@@ -2261,14 +2265,15 @@ function RlsPickerSelectorTitle({ monthControl, type, yearControl, date, disable
|
|
|
2261
2265
|
}
|
|
2262
2266
|
}, [monthControl.value, yearControl.value]);
|
|
2263
2267
|
const onPreviousYear = require$$0.useCallback(() => {
|
|
2264
|
-
commons.
|
|
2268
|
+
commons.valueIsDefined(yearControl.value) &&
|
|
2265
2269
|
yearControl.setValue(yearControl.value - 1);
|
|
2266
2270
|
}, [yearControl.value]);
|
|
2267
2271
|
const onPrevious = require$$0.useCallback(() => {
|
|
2268
2272
|
type === 'month' ? onPreviousMonth() : onPreviousYear();
|
|
2269
2273
|
}, [type, onPreviousMonth, onPreviousYear]);
|
|
2270
2274
|
const onNextMonth = require$$0.useCallback(() => {
|
|
2271
|
-
if (commons.
|
|
2275
|
+
if (commons.valueIsDefined(monthControl.value) &&
|
|
2276
|
+
commons.valueIsDefined(yearControl.value)) {
|
|
2272
2277
|
if (monthControl.value < dates.Month.December) {
|
|
2273
2278
|
monthControl.setValue(monthControl.value + 1);
|
|
2274
2279
|
}
|
|
@@ -2279,7 +2284,7 @@ function RlsPickerSelectorTitle({ monthControl, type, yearControl, date, disable
|
|
|
2279
2284
|
}
|
|
2280
2285
|
}, [monthControl.value, yearControl.value]);
|
|
2281
2286
|
const onNextYear = require$$0.useCallback(() => {
|
|
2282
|
-
commons.
|
|
2287
|
+
commons.valueIsDefined(yearControl.value) &&
|
|
2283
2288
|
yearControl.setValue(yearControl.value + 1);
|
|
2284
2289
|
}, [yearControl.value]);
|
|
2285
2290
|
const onNext = require$$0.useCallback(() => {
|
|
@@ -2333,7 +2338,7 @@ function RlsPickerYear({ date: _date, disabled, formControl, maxDate, minDate, o
|
|
|
2333
2338
|
}, [template.years, onSelect, disabled]);
|
|
2334
2339
|
require$$0.useEffect(() => {
|
|
2335
2340
|
const year = components.verifyYearPicker(createPickerOptions());
|
|
2336
|
-
commons.
|
|
2341
|
+
commons.valueIsDefined(year)
|
|
2337
2342
|
? formControl?.setValue(year)
|
|
2338
2343
|
: setValue(formControl?.value ?? date.getFullYear());
|
|
2339
2344
|
}, [formControl?.value]);
|
|
@@ -2830,11 +2835,12 @@ function RlsFieldAutocompleteTemplate(props) {
|
|
|
2830
2835
|
disabled,
|
|
2831
2836
|
readonly: readOnly,
|
|
2832
2837
|
selected: !!autocomplete.value
|
|
2833
|
-
},
|
|
2838
|
+
}, `rls-field-list rls-field-autocomplete ${props.className ?? ''}`);
|
|
2834
2839
|
}, [
|
|
2835
2840
|
formControl?.wrong,
|
|
2836
2841
|
autocomplete.value,
|
|
2837
2842
|
autocomplete.focused,
|
|
2843
|
+
props.className,
|
|
2838
2844
|
disabled,
|
|
2839
2845
|
readOnly
|
|
2840
2846
|
]);
|
|
@@ -3040,14 +3046,14 @@ function RlsPickerDateRange({ automatic, date: _picker, disabled, formControl, m
|
|
|
3040
3046
|
}, []);
|
|
3041
3047
|
require$$0.useEffect(() => {
|
|
3042
3048
|
setDate((date) => {
|
|
3043
|
-
return commons.
|
|
3049
|
+
return commons.valueIsDefined(yearControl.value)
|
|
3044
3050
|
? dates.assignYearInDate(date, yearControl.value)
|
|
3045
3051
|
: date;
|
|
3046
3052
|
});
|
|
3047
3053
|
}, [yearControl.value]);
|
|
3048
3054
|
require$$0.useEffect(() => {
|
|
3049
3055
|
setDate((date) => {
|
|
3050
|
-
return commons.
|
|
3056
|
+
return commons.valueIsDefined(monthControl.value)
|
|
3051
3057
|
? dates.assignMonthInDate(date, monthControl.value)
|
|
3052
3058
|
: date;
|
|
3053
3059
|
});
|
|
@@ -3245,8 +3251,8 @@ function RlsFieldSelectTemplate(props) {
|
|
|
3245
3251
|
error: formControl?.wrong,
|
|
3246
3252
|
disabled: disabled,
|
|
3247
3253
|
readonly: readOnly
|
|
3248
|
-
},
|
|
3249
|
-
}, [formControl?.wrong, select.focused, disabled, readOnly]);
|
|
3254
|
+
}, `rls-field-list rls-field-select ${props.className ?? ''}`);
|
|
3255
|
+
}, [formControl?.wrong, select.focused, props.className, disabled, readOnly]);
|
|
3250
3256
|
const classNameList = require$$0.useMemo(() => {
|
|
3251
3257
|
return renderClassStatus('rls-field-list__suggestions', {
|
|
3252
3258
|
higher: select.higher,
|