grep-components 1.17.0-grepf-1780.1 → 1.17.0-grepf-1794.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 } from '@mui/material';
2
+ import { SelectProps, InputBaseComponentProps } from '@mui/material';
3
3
  export interface SelectItem {
4
4
  value: string | number;
5
5
  label?: string;
@@ -13,6 +13,7 @@ export interface GrepSelectProps extends SelectProps {
13
13
  selectItems: SelectItem[];
14
14
  unselectOption?: boolean;
15
15
  useCheckedSelect?: boolean;
16
+ inputProps?: InputBaseComponentProps | undefined;
16
17
  }
17
18
  declare const _default: React.ComponentType<GrepSelectProps>;
18
19
  export default _default;
@@ -9,6 +9,8 @@ export interface SearchBarProps {
9
9
  onClear: () => void;
10
10
  onSearchAll?: () => void;
11
11
  onInputChange: (value: string) => void;
12
+ id?: string;
13
+ title?: string;
12
14
  }
13
15
  declare const _default: React.ComponentType<SearchBarProps>;
14
16
  export default _default;
package/dist/index.js CHANGED
@@ -4688,6 +4688,9 @@ 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
+ },
4691
4694
  style: {
4692
4695
  gridArea: 'left',
4693
4696
  justifySelf: 'start',
@@ -5019,7 +5022,7 @@ var SearchBar = function (props) {
5019
5022
  } },
5020
5023
  React.createElement(Box, { className: classes.icon },
5021
5024
  React.createElement(Search, null)),
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 } }),
5025
+ React.createElement(TextField, { id: props.id, className: classes.input, value: value, title: props.title, variant: "standard", inputRef: inputRef, onChange: _handleChange, autoFocus: props.autoFocus, placeholder: props.placeholder, InputProps: { disableUnderline: true, fullWidth: true } }),
5023
5026
  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) })))),
5024
5027
  React.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
5025
5028
  props.helpText && (React.createElement(Typography, { className: classes.helptext }, props.helpText)),
@@ -5142,12 +5145,12 @@ var GrepSelect = function (props) {
5142
5145
  React.useEffect(function () {
5143
5146
  setLabelWidth(inputLabel.current.offsetWidth);
5144
5147
  }, []);
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"]);
5148
+ 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"]);
5146
5149
  var error = errorMessage ? errorMessage.length > 0 : false;
5147
5150
  var selected = value;
5148
5151
  return (React.createElement(FormControl, { variant: outlined ? 'outlined' : 'standard', className: props.className, fullWidth: fullWidth, required: required, style: props.style, error: error, size: size, disabled: disabled },
5149
5152
  React.createElement(InputLabel, { htmlFor: id, ref: inputLabel, style: { minWidth: 'max-content', overflow: 'visible' } }, label),
5150
- React.createElement(Select, __assign({}, rest, { inputProps: { id: id }, disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
5153
+ React.createElement(Select, __assign({}, rest, { inputProps: __assign({ id: id }, inputProps), disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
5151
5154
  // @todo: make input respect label length
5152
5155
  input: outlined ? React.createElement(OutlinedInput, { label: label }) : React.createElement(Input, null), MenuProps: {
5153
5156
  anchorOrigin: {
@@ -21774,11 +21777,6 @@ var ToolbarTitle = styled(NavLink)(function () { return ({
21774
21777
  ':hover': {
21775
21778
  textDecoration: 'none',
21776
21779
  },
21777
- h1: {
21778
- fontSize: '24px',
21779
- fontFamily: 'Montserrat',
21780
- fontWeight: 500,
21781
- },
21782
21780
  }); });
21783
21781
  var EnvironmentTitle = styled('div')(function () { return ({
21784
21782
  color: 'rgba(0, 0, 0, 0.33)',
@@ -22076,7 +22074,7 @@ var AppBar = function (_a) {
22076
22074
  React.createElement(ToolbarInner, { colors: colors },
22077
22075
  React.createElement(ToolbarLeft, null,
22078
22076
  React.createElement(ToolbarTitle, { to: '/' },
22079
- React.createElement("h1", null, appTitle),
22077
+ appTitle,
22080
22078
  !isProd && (React.createElement(EnvironmentTitle, null, process.env.REACT_APP_HOST)))),
22081
22079
  React.createElement(ToolbarRight, null,
22082
22080
  React.createElement(Button$1, { onClick: _handleIconButtonClick },