grep-components 2.12.0-GREPF-2736.2 → 2.13.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
@@ -2549,14 +2549,14 @@ const GrepSelect = (props) => {
2549
2549
  React.useEffect(() => {
2550
2550
  setLabelWidth(inputLabel.current.offsetWidth);
2551
2551
  }, []);
2552
- const { unselectOption = true, errorMessage, selectItems, helperText, fullWidth, outlined, disabled, required, label, inputProps, value, size, id, useCheckedSelect, ...rest } = props;
2552
+ const { unselectOption = true, errorMessage, selectItems, helperText, fullWidth, outlined, disabled, required, label, labelProps, inputProps, value, size, id, useCheckedSelect, ...rest } = props;
2553
2553
  const error = errorMessage ? errorMessage.length > 0 : false;
2554
2554
  const selected = value;
2555
2555
  return (React.createElement(FormControl, { variant: outlined ? 'outlined' : 'standard', className: props.className, fullWidth: fullWidth, required: required, style: props.style, error: error, size: size, disabled: disabled },
2556
2556
  React.createElement(InputLabel, { htmlFor: id, ref: inputLabel, style: {
2557
2557
  minWidth: 'max-content',
2558
2558
  overflow: 'visible',
2559
- } }, label),
2559
+ }, ...labelProps }, label),
2560
2560
  React.createElement(Select, { ...rest, inputProps: { id, ...inputProps }, disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
2561
2561
  // @todo: make input respect label length
2562
2562
  input: outlined ? React.createElement(OutlinedInput, { label: label }) : React.createElement(Input, null), MenuProps: {