grep-components 1.17.0-grepf-1780.2 → 1.17.0-grepf-1794.2

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,11 @@ 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, variant: "standard", inputRef: inputRef, onChange: _handleChange, autoFocus: props.autoFocus, placeholder: props.placeholder, InputProps: {
5026
+ disableUnderline: true,
5027
+ fullWidth: true,
5028
+ title: props.title,
5029
+ } }),
5023
5030
  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
5031
  React.createElement("div", { style: { display: 'flex', alignItems: 'center' } },
5025
5032
  props.helpText && (React.createElement(Typography, { className: classes.helptext }, props.helpText)),
@@ -5142,12 +5149,12 @@ var GrepSelect = function (props) {
5142
5149
  React.useEffect(function () {
5143
5150
  setLabelWidth(inputLabel.current.offsetWidth);
5144
5151
  }, []);
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"]);
5152
+ 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
5153
  var error = errorMessage ? errorMessage.length > 0 : false;
5147
5154
  var selected = value;
5148
5155
  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
5156
  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) },
5157
+ React.createElement(Select, __assign({}, rest, { inputProps: __assign({ id: id }, inputProps), disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
5151
5158
  // @todo: make input respect label length
5152
5159
  input: outlined ? React.createElement(OutlinedInput, { label: label }) : React.createElement(Input, null), MenuProps: {
5153
5160
  anchorOrigin: {
@@ -21774,12 +21781,6 @@ var ToolbarTitle = styled(NavLink)(function () { return ({
21774
21781
  ':hover': {
21775
21782
  textDecoration: 'none',
21776
21783
  },
21777
- h1: {
21778
- fontSize: '24px',
21779
- fontFamily: 'Montserrat',
21780
- fontWeight: 500,
21781
- margin: '0 !important',
21782
- },
21783
21784
  }); });
21784
21785
  var EnvironmentTitle = styled('div')(function () { return ({
21785
21786
  color: 'rgba(0, 0, 0, 0.33)',
@@ -22077,7 +22078,7 @@ var AppBar = function (_a) {
22077
22078
  React.createElement(ToolbarInner, { colors: colors },
22078
22079
  React.createElement(ToolbarLeft, null,
22079
22080
  React.createElement(ToolbarTitle, { to: '/' },
22080
- React.createElement("h1", null, appTitle),
22081
+ appTitle,
22081
22082
  !isProd && (React.createElement(EnvironmentTitle, null, process.env.REACT_APP_HOST)))),
22082
22083
  React.createElement(ToolbarRight, null,
22083
22084
  React.createElement(Button$1, { onClick: _handleIconButtonClick },