@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/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: "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 })] }));
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) {
@@ -2832,11 +2835,12 @@ function RlsFieldAutocompleteTemplate(props) {
2832
2835
  disabled,
2833
2836
  readonly: readOnly,
2834
2837
  selected: !!autocomplete.value
2835
- }, 'rls-field-list rls-field-autocomplete');
2838
+ }, `rls-field-list rls-field-autocomplete ${props.className ?? ''}`);
2836
2839
  }, [
2837
2840
  formControl?.wrong,
2838
2841
  autocomplete.value,
2839
2842
  autocomplete.focused,
2843
+ props.className,
2840
2844
  disabled,
2841
2845
  readOnly
2842
2846
  ]);
@@ -3247,8 +3251,8 @@ function RlsFieldSelectTemplate(props) {
3247
3251
  error: formControl?.wrong,
3248
3252
  disabled: disabled,
3249
3253
  readonly: readOnly
3250
- }, 'rls-field-list rls-field-select');
3251
- }, [formControl?.wrong, select.focused, disabled, readOnly]);
3254
+ }, `rls-field-list rls-field-select ${props.className ?? ''}`);
3255
+ }, [formControl?.wrong, select.focused, props.className, disabled, readOnly]);
3252
3256
  const classNameList = require$$0.useMemo(() => {
3253
3257
  return renderClassStatus('rls-field-list__suggestions', {
3254
3258
  higher: select.higher,