grep-components 2.11.0 → 2.12.0-GREPF-2676.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.
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SelectProps, InputBaseComponentProps } from '@mui/material';
2
+ import { SelectProps, InputBaseComponentProps, InputLabelProps } from '@mui/material';
3
3
  export interface SelectItem {
4
4
  value: string | number;
5
5
  label?: string;
@@ -14,6 +14,7 @@ export type GrepSelectProps = SelectProps & {
14
14
  selectItems: SelectItem[];
15
15
  unselectOption?: boolean;
16
16
  useCheckedSelect?: boolean;
17
+ labelProps?: InputLabelProps;
17
18
  inputProps?: InputBaseComponentProps | undefined;
18
19
  };
19
20
  declare const _default: React.ComponentType<GrepSelectProps>;
package/dist/index.js CHANGED
@@ -2551,14 +2551,14 @@ const GrepSelect = (props) => {
2551
2551
  React.useEffect(() => {
2552
2552
  setLabelWidth(inputLabel.current.offsetWidth);
2553
2553
  }, []);
2554
- const { unselectOption = true, errorMessage, selectItems, helperText, fullWidth, outlined, disabled, required, label, inputProps, value, size, id, useCheckedSelect, ...rest } = props;
2554
+ const { unselectOption = true, errorMessage, selectItems, helperText, fullWidth, outlined, disabled, required, label, labelProps, inputProps, value, size, id, useCheckedSelect, ...rest } = props;
2555
2555
  const error = errorMessage ? errorMessage.length > 0 : false;
2556
2556
  const selected = value;
2557
2557
  return (React.createElement(FormControl, { variant: outlined ? 'outlined' : 'standard', className: props.className, fullWidth: fullWidth, required: required, style: props.style, error: error, size: size, disabled: disabled },
2558
2558
  React.createElement(InputLabel, { htmlFor: id, ref: inputLabel, style: {
2559
2559
  minWidth: 'max-content',
2560
2560
  overflow: 'visible',
2561
- } }, label),
2561
+ }, ...labelProps }, label),
2562
2562
  React.createElement(Select, { ...rest, inputProps: { id, ...inputProps }, disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
2563
2563
  // @todo: make input respect label length
2564
2564
  input: outlined ? React.createElement(OutlinedInput, { label: label }) : React.createElement(Input, null), MenuProps: {