grep-components 1.17.0-grepf-1794.3 → 1.17.0

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 } from '@mui/material';
3
3
  export interface SelectItem {
4
4
  value: string | number;
5
5
  label?: string;
@@ -13,7 +13,6 @@ export interface GrepSelectProps extends SelectProps {
13
13
  selectItems: SelectItem[];
14
14
  unselectOption?: boolean;
15
15
  useCheckedSelect?: boolean;
16
- inputProps?: InputBaseComponentProps | undefined;
17
16
  }
18
17
  declare const _default: React.ComponentType<GrepSelectProps>;
19
18
  export default _default;
@@ -9,8 +9,6 @@ export interface SearchBarProps {
9
9
  onClear: () => void;
10
10
  onSearchAll?: () => void;
11
11
  onInputChange: (value: string) => void;
12
- id?: string;
13
- title?: string;
14
12
  }
15
13
  declare const _default: React.ComponentType<SearchBarProps>;
16
14
  export default _default;
package/dist/index.js CHANGED
@@ -4688,9 +4688,6 @@ var PaginationActions = function (_a) {
4688
4688
  var GrepTablePagination = function (props) {
4689
4689
  var classes = usePaginationStyles().classes;
4690
4690
  return (React__default.createElement(TablePagination, __assign({ classes: classes, rowsPerPageOptions: props.rowsPerPageOptions || [5, 10, 25, 50], SelectProps: {
4691
- inputProps: {
4692
- title: 'Velg antall elementer',
4693
- },
4694
4691
  style: {
4695
4692
  gridArea: 'left',
4696
4693
  justifySelf: 'start',
@@ -4881,7 +4878,7 @@ var GrepTable = function (_a) {
4881
4878
  ? data.slice(currentPage * rowsPerPage, currentPage * rowsPerPage + rowsPerPage)
4882
4879
  : data;
4883
4880
  var classes = useStyles$d({ outlined: outlined, showHeader: header }).classes;
4884
- return (React__default.createElement(TableContainer, { style: props.style },
4881
+ return (React__default.createElement(TableContainer, { sx: props.style },
4885
4882
  React__default.createElement(Table, { className: classes.table, size: size, stickyHeader: stickyHeader, padding: padding },
4886
4883
  caption && React__default.createElement("caption", null, caption),
4887
4884
  React__default.createElement(TableHeader, { className: classes.header, columns: columns, sortBy: sortBy, sortDirection: sortDirection, onSortBy: onSortBy, dropdownItems: dropdownItems }),
@@ -5022,13 +5019,7 @@ var SearchBar = function (props) {
5022
5019
  } },
5023
5020
  React.createElement(Box, { className: classes.icon },
5024
5021
  React.createElement(Search, null)),
5025
- React.createElement(TextField, { id: props.id, className: classes.input, value: value, variant: "standard", inputRef: inputRef, onChange: _handleChange, autoFocus: props.autoFocus, placeholder: props.placeholder, InputProps: {
5026
- disableUnderline: true,
5027
- fullWidth: true,
5028
- inputProps: {
5029
- title: props.title,
5030
- },
5031
- } }),
5022
+ React.createElement(TextField, { className: classes.input, value: value, variant: "standard", inputRef: inputRef, onChange: _handleChange, autoFocus: props.autoFocus, placeholder: props.placeholder, InputProps: { disableUnderline: true, fullWidth: true } }),
5032
5023
  React.createElement(Box, { className: classes.icon, style: { cursor: 'pointer' } }, !!value.length && (React.createElement(Close, { "data-testid": "searchBarClearBtn", tabIndex: 0, onClick: _handleClear, onKeyPress: keyboard.onActivation(_handleClear) })))),
5033
5024
  React.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
5034
5025
  props.helpText && (React.createElement(Typography, { className: classes.helptext }, props.helpText)),
@@ -5151,12 +5142,12 @@ var GrepSelect = function (props) {
5151
5142
  React.useEffect(function () {
5152
5143
  setLabelWidth(inputLabel.current.offsetWidth);
5153
5144
  }, []);
5154
- var _b = props.unselectOption, unselectOption = _b === void 0 ? true : _b, errorMessage = props.errorMessage, selectItems = props.selectItems, helperText = props.helperText, fullWidth = props.fullWidth, outlined = props.outlined, disabled = props.disabled, required = props.required, label = props.label, inputProps = props.inputProps, value = props.value, size = props.size, id = props.id, useCheckedSelect = props.useCheckedSelect, rest = __rest$1(props, ["unselectOption", "errorMessage", "selectItems", "helperText", "fullWidth", "outlined", "disabled", "required", "label", "inputProps", "value", "size", "id", "useCheckedSelect"]);
5145
+ var _b = props.unselectOption, unselectOption = _b === void 0 ? true : _b, errorMessage = props.errorMessage, selectItems = props.selectItems, helperText = props.helperText, fullWidth = props.fullWidth, outlined = props.outlined, disabled = props.disabled, required = props.required, label = props.label, value = props.value, size = props.size, id = props.id, useCheckedSelect = props.useCheckedSelect, rest = __rest$1(props, ["unselectOption", "errorMessage", "selectItems", "helperText", "fullWidth", "outlined", "disabled", "required", "label", "value", "size", "id", "useCheckedSelect"]);
5155
5146
  var error = errorMessage ? errorMessage.length > 0 : false;
5156
5147
  var selected = value;
5157
5148
  return (React.createElement(FormControl, { variant: outlined ? 'outlined' : 'standard', className: props.className, fullWidth: fullWidth, required: required, style: props.style, error: error, size: size, disabled: disabled },
5158
5149
  React.createElement(InputLabel, { htmlFor: id, ref: inputLabel, style: { minWidth: 'max-content', overflow: 'visible' } }, label),
5159
- React.createElement(Select, __assign({}, rest, { inputProps: __assign({ id: id }, inputProps), disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
5150
+ React.createElement(Select, __assign({}, rest, { inputProps: { id: id }, disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
5160
5151
  // @todo: make input respect label length
5161
5152
  input: outlined ? React.createElement(OutlinedInput, { label: label }) : React.createElement(Input, null), MenuProps: {
5162
5153
  anchorOrigin: {