grep-components 1.16.0-grepf-1693.3 → 1.16.0-grepf-1829.5
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.
|
@@ -4,7 +4,7 @@ import { DatePickerProps } from '@mui/x-date-pickers';
|
|
|
4
4
|
import { TextFieldProps } from '@mui/material';
|
|
5
5
|
import '../../utils/dateHelper';
|
|
6
6
|
import { ParseableDate } from '../../utils/dateHelper';
|
|
7
|
-
declare type InputProps = Pick<TextFieldProps, 'id' | 'variant' | 'label' | 'fullWidth' | 'placeholder' | 'helperText' | 'required' | 'onFocus'
|
|
7
|
+
declare type InputProps = Pick<TextFieldProps, 'id' | 'variant' | 'label' | 'fullWidth' | 'placeholder' | 'helperText' | 'required' | 'onFocus'>;
|
|
8
8
|
export interface GrepDatePickerProps extends Omit<DatePickerProps<Dayjs, Dayjs>, 'value' | 'renderInput'>, InputProps {
|
|
9
9
|
value?: ParseableDate | null;
|
|
10
10
|
errorMessage?: string;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { GridSpacing } from '@mui/material';
|
|
3
3
|
import { DateRangeValue } from '../../utils/dateHelper';
|
|
4
4
|
import { GrepDatePickerProps } from '../GrepDatePicker';
|
|
5
|
-
declare type CommonProperties = Pick<GrepDatePickerProps, 'variant'
|
|
5
|
+
declare type CommonProperties = Pick<GrepDatePickerProps, 'variant'>;
|
|
6
6
|
interface Props extends CommonProperties {
|
|
7
7
|
from: Omit<GrepDatePickerProps, 'onChange'>;
|
|
8
8
|
to: Omit<GrepDatePickerProps, 'onChange'>;
|
package/dist/index.js
CHANGED
|
@@ -4912,13 +4912,14 @@ var useStyles$b = makeStyles()({
|
|
|
4912
4912
|
fontSize: 16,
|
|
4913
4913
|
},
|
|
4914
4914
|
current: {
|
|
4915
|
-
overflow: 'hidden',
|
|
4916
4915
|
textOverflow: 'ellipsis',
|
|
4917
4916
|
whiteSpace: 'nowrap',
|
|
4918
4917
|
fontWeight: 'bold',
|
|
4918
|
+
lineHeight: '16px',
|
|
4919
4919
|
},
|
|
4920
4920
|
link: {
|
|
4921
4921
|
fontSize: 16,
|
|
4922
|
+
margin: 'auto 0',
|
|
4922
4923
|
textDecoration: 'none',
|
|
4923
4924
|
'&:hover': {
|
|
4924
4925
|
textDecoration: 'underline',
|
|
@@ -4948,7 +4949,7 @@ var GrepCrumbs = function (_a) {
|
|
|
4948
4949
|
return (React__default.createElement("div", { className: classes.container, style: style }, breadcrumbs.map(function (crumb, index) {
|
|
4949
4950
|
return crumb.path ? (React__default.createElement(Box, { key: index, display: "flex" },
|
|
4950
4951
|
React__default.createElement(Link, { className: classes.link, tabIndex: 0, component: "button", onClick: function () { return handleClick(crumb); } }, crumb.label),
|
|
4951
|
-
index !== breadcrumbs.length - 1 && React__default.createElement(Box, { margin: "
|
|
4952
|
+
index !== breadcrumbs.length - 1 && (React__default.createElement(Box, { margin: "auto 8px", height: "fit-content" /*lineHeight="20px"*/ }, ">")))) : (React__default.createElement(Tooltip, { key: index, title: showTooltip ? crumb.label : '' },
|
|
4952
4953
|
React__default.createElement("div", { className: classes.current, ref: ref }, crumb.label)));
|
|
4953
4954
|
})));
|
|
4954
4955
|
};
|
|
@@ -5125,10 +5126,7 @@ var GrepSelect = function (props) {
|
|
|
5125
5126
|
var error = errorMessage ? errorMessage.length > 0 : false;
|
|
5126
5127
|
var selected = value;
|
|
5127
5128
|
return (React.createElement(FormControl, { variant: outlined ? 'outlined' : 'standard', className: props.className, fullWidth: fullWidth, required: required, style: props.style, error: error, size: size, disabled: disabled },
|
|
5128
|
-
React.createElement(InputLabel, { htmlFor: id, ref: inputLabel, style: {
|
|
5129
|
-
minWidth: 'max-content',
|
|
5130
|
-
overflow: 'visible',
|
|
5131
|
-
} }, label),
|
|
5129
|
+
React.createElement(InputLabel, { htmlFor: id, ref: inputLabel, style: { minWidth: 'max-content', overflow: 'visible' } }, label),
|
|
5132
5130
|
React.createElement(Select, __assign({}, rest, { inputProps: { id: id }, disabled: !selectItems || disabled, value: value === null ? '' : value, style: { minWidth: labelWidth + (outlined ? 35 : 25) },
|
|
5133
5131
|
// @todo: make input respect label length
|
|
5134
5132
|
input: outlined ? React.createElement(OutlinedInput, { label: label }) : React.createElement(Input, null), MenuProps: {
|
|
@@ -5147,7 +5145,7 @@ var GrepSelect = function (props) {
|
|
|
5147
5145
|
var label = _a.label, value = _a.value, disabled = _a.disabled;
|
|
5148
5146
|
return (React.createElement(MenuItem, { key: i, value: value, disabled: disabled },
|
|
5149
5147
|
useCheckedSelect && (React.createElement(Checkbox, { checked: (selected === null || selected === void 0 ? void 0 : selected.indexOf(value)) > -1 })),
|
|
5150
|
-
React.createElement(ListItemText, {
|
|
5148
|
+
React.createElement(ListItemText, { primary: label ? label : value })));
|
|
5151
5149
|
})),
|
|
5152
5150
|
React.createElement(FormHelperText, null, errorMessage || helperText)));
|
|
5153
5151
|
};
|
|
@@ -5627,7 +5625,7 @@ var useContentElements = function (container, selector, options) {
|
|
|
5627
5625
|
};
|
|
5628
5626
|
|
|
5629
5627
|
var DatePicker = function (_a) {
|
|
5630
|
-
var id = _a.id, label = _a.label, value = _a.value, variant = _a.variant, onChange = _a.onChange, errorMessage = _a.errorMessage, placeholder = _a.placeholder, fullWidth = _a.fullWidth, required = _a.required, onFocus = _a.onFocus,
|
|
5628
|
+
var id = _a.id, label = _a.label, value = _a.value, variant = _a.variant, onChange = _a.onChange, errorMessage = _a.errorMessage, placeholder = _a.placeholder, fullWidth = _a.fullWidth, required = _a.required, onFocus = _a.onFocus, props = __rest$1(_a, ["id", "label", "value", "variant", "onChange", "errorMessage", "placeholder", "fullWidth", "required", "onFocus"]);
|
|
5631
5629
|
var _b = __read(useDate(value), 2), date = _b[0], setDate = _b[1];
|
|
5632
5630
|
var _c = __read(useState(), 2), error = _c[0], setError = _c[1];
|
|
5633
5631
|
var helperText = errorMessage || error || props.helperText;
|
|
@@ -5655,7 +5653,7 @@ var DatePicker = function (_a) {
|
|
|
5655
5653
|
default:
|
|
5656
5654
|
setError(undefined);
|
|
5657
5655
|
}
|
|
5658
|
-
}, value: date, onChange: setDate, renderInput: function (params) { return (React__default.createElement(TextField, __assign({ id: id }, params, { label: label, variant: variant, onFocus: onFocus, required: required, fullWidth: fullWidth, placeholder: placeholder,
|
|
5656
|
+
}, value: date, onChange: setDate, renderInput: function (params) { return (React__default.createElement(TextField, __assign({ id: id }, params, { label: label, variant: variant, onFocus: onFocus, required: required, fullWidth: fullWidth, placeholder: placeholder, error: !!error || !!errorMessage }, (helperText && { helperText: helperText })))); } }, props))));
|
|
5659
5657
|
};
|
|
5660
5658
|
|
|
5661
5659
|
var GrepDateRange = function (_a) {
|