@rolster/react-components 18.25.0 → 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.
@@ -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/es/index.js CHANGED
@@ -1576,12 +1576,15 @@ function RlsInputPercentage(props) {
1576
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
1577
  }
1578
1578
 
1579
- function RlsInputSearch({ formControl, identifier, onEnter, onSearch, placeholder }) {
1579
+ function RlsInputSearch({ formControl, disabled, identifier, onEnter, onSearch, placeholder }) {
1580
1580
  const [value, setValue] = useState('');
1581
+ const className = useMemo(() => {
1582
+ return renderClassStatus('rls-input-search', { disabled });
1583
+ }, [disabled]);
1581
1584
  const onValue = useCallback((value) => {
1582
1585
  !formControl && setValue(() => value);
1583
1586
  }, [formControl]);
1584
- return (jsxRuntimeExports.jsxs("div", { id: identifier, className: "rls-input-search", children: [jsxRuntimeExports.jsx(RlsInput, { formControl: formControl, placeholder: placeholder, onEnter: onEnter, onValue: onValue, children: formControl?.value ?? value }), onSearch && jsxRuntimeExports.jsx(RlsButtonAction, { icon: "search", onClick: onSearch })] }));
1587
+ 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 }))] }));
1585
1588
  }
1586
1589
 
1587
1590
  function RlsInputText(props) {
@@ -2830,11 +2833,12 @@ function RlsFieldAutocompleteTemplate(props) {
2830
2833
  disabled,
2831
2834
  readonly: readOnly,
2832
2835
  selected: !!autocomplete.value
2833
- }, 'rls-field-list rls-field-autocomplete');
2836
+ }, `rls-field-list rls-field-autocomplete ${props.className ?? ''}`);
2834
2837
  }, [
2835
2838
  formControl?.wrong,
2836
2839
  autocomplete.value,
2837
2840
  autocomplete.focused,
2841
+ props.className,
2838
2842
  disabled,
2839
2843
  readOnly
2840
2844
  ]);
@@ -3245,8 +3249,8 @@ function RlsFieldSelectTemplate(props) {
3245
3249
  error: formControl?.wrong,
3246
3250
  disabled: disabled,
3247
3251
  readonly: readOnly
3248
- }, 'rls-field-list rls-field-select');
3249
- }, [formControl?.wrong, select.focused, disabled, readOnly]);
3252
+ }, `rls-field-list rls-field-select ${props.className ?? ''}`);
3253
+ }, [formControl?.wrong, select.focused, props.className, disabled, readOnly]);
3250
3254
  const classNameList = useMemo(() => {
3251
3255
  return renderClassStatus('rls-field-list__suggestions', {
3252
3256
  higher: select.higher,