@superdispatch/ui-lab 0.47.2 → 0.49.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,8 +1,8 @@
1
1
  import { Typography } from '@material-ui/core';
2
2
  import { formatDate } from '@superdispatch/dates';
3
3
  import { Inline, Stack } from '@superdispatch/ui';
4
- import { Box } from '@superdispatch/ui-lab';
5
4
  import { forwardRef } from 'react';
5
+ import { Box } from "../box/Box.js";
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  export var ChatMessage = /*#__PURE__*/forwardRef((_ref, ref) => {
8
8
  var {
@@ -4,9 +4,9 @@ var _excluded = ["value", "onChange", "TextFieldProps"];
4
4
  import { IconButton, TextField } from '@material-ui/core';
5
5
  import { Autocomplete } from '@material-ui/lab';
6
6
  import { Inline, Tag } from '@superdispatch/ui';
7
- import { TextBox } from '@superdispatch/ui-lab';
8
7
  import { forwardRef } from 'react';
9
8
  import styled from 'styled-components';
9
+ import { TextBox } from "../text-box/TextBox.js";
10
10
  import { CloseIcon } from "./CloseIcon.js";
11
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
12
  var MultipleFieldText = /*#__PURE__*/styled(TextField).withConfig({
@@ -64,14 +64,9 @@ export var EmailAutocomplete = /*#__PURE__*/forwardRef((_ref, ref) => {
64
64
  });
65
65
  },
66
66
  renderInput: params => /*#__PURE__*/_jsx(MultipleFieldText, _objectSpread(_objectSpread(_objectSpread({}, params), TextFieldProps), {}, {
67
- multiline: true,
68
- minRows: 2,
69
- variant: "outlined",
70
- fullWidth: true,
71
67
  InputProps: _objectSpread(_objectSpread(_objectSpread({}, TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.InputProps), params.InputProps), {}, {
72
68
  startAdornment: params.InputProps.startAdornment
73
69
  }),
74
- placeholder: "Enter individual emails on each line or separate them with comma (,)",
75
70
  onChange: event => {
76
71
  var text = event.target.value.replace(/,/g, '');
77
72
  var hasCommaOrSpace = /,|\s/.test(event.target.value);
@@ -1,11 +1,10 @@
1
- import { noop } from 'lodash';
2
1
  import { createContext, useContext } from 'react';
3
2
  export var NavbarContext = /*#__PURE__*/createContext({
4
3
  isDrawerOpen: false,
5
4
  isMenuExpanded: false,
6
5
  isNavbarExpanded: false,
7
- setMenuExpanded: noop,
8
- setDrawerOpen: noop
6
+ setMenuExpanded: () => void 0,
7
+ setDrawerOpen: () => void 0
9
8
  });
10
9
  export function useNavbarContext() {
11
10
  return useContext(NavbarContext);
@@ -170,7 +170,7 @@ declare const DescriptionLineItem: ForwardRefExoticComponent<DescriptionLineItem
170
170
 
171
171
  interface EmailAutocompleteProps extends Omit<AutocompleteProps<string, true, true, true>, 'onChange' | 'renderInput' | 'renderTags'> {
172
172
  options: string[];
173
- TextFieldProps?: StandardTextFieldProps;
173
+ TextFieldProps?: Omit<StandardTextFieldProps, 'onChange'>;
174
174
  onAdd?: (value: string) => void;
175
175
  onRemove?: (value: string) => void;
176
176
  onChange?: (value: string[] | undefined, reason: AutocompleteChangeReason) => void;
package/dist-web/index.js CHANGED
@@ -9,11 +9,9 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
9
9
  import { CSSTransition } from 'react-transition-group';
10
10
  import { ButtonBase, Typography, CircularProgress, SvgIcon, IconButton, TextField, Link, Tooltip, BottomNavigation, BottomNavigationAction, alpha, Accordion, AccordionSummary, useTheme, useMediaQuery, Drawer, Avatar, MenuItem, Menu as Menu$1, Toolbar, AppBar, Divider as Divider$1, Checkbox } from '@material-ui/core';
11
11
  import { formatDate } from '@superdispatch/dates';
12
- import { Box as Box$1, TextBox as TextBox$1 } from '@superdispatch/ui-lab';
13
12
  import { mdiUpload, mdiFilePdfBox, mdiTextBox } from '@mdi/js';
14
13
  import Dropzone from 'react-dropzone';
15
14
  import { Anchorme } from 'react-anchorme';
16
- import { noop } from 'lodash';
17
15
 
18
16
  function colorMixin(textColor, iconColor, backgroundColor, buttonHoverColor) {
19
17
  return css(["color:", ";border-color:", ";background-color:", ";& .MuiAlert-icon{color:", ";}& .MuiAlert-action{color:", ";& .MuiIconButton-root{&:hover,&:active{color:", ";}}}"], textColor, textColor, backgroundColor, iconColor, iconColor, buttonHoverColor);
@@ -583,7 +581,7 @@ var ChatMessage = /*#__PURE__*/forwardRef((_ref, ref) => {
583
581
  color: "textSecondary",
584
582
  children: time
585
583
  })]
586
- }), /*#__PURE__*/jsx(Box$1, {
584
+ }), /*#__PURE__*/jsx(Box, {
587
585
  display: "inline-block",
588
586
  padding: "xsmall",
589
587
  marginTop: "none",
@@ -915,7 +913,7 @@ var EmailAutocomplete = /*#__PURE__*/forwardRef((_ref, ref) => {
915
913
  variant: "subtle",
916
914
  children: /*#__PURE__*/jsxs(Inline, {
917
915
  space: "xxsmall",
918
- children: [/*#__PURE__*/jsx(TextBox$1, {
916
+ children: [/*#__PURE__*/jsx(TextBox, {
919
917
  wrapOverflow: true,
920
918
  color: "primary",
921
919
  children: option
@@ -932,14 +930,9 @@ var EmailAutocomplete = /*#__PURE__*/forwardRef((_ref, ref) => {
932
930
  });
933
931
  },
934
932
  renderInput: params => /*#__PURE__*/jsx(MultipleFieldText, _objectSpread(_objectSpread(_objectSpread({}, params), TextFieldProps), {}, {
935
- multiline: true,
936
- minRows: 2,
937
- variant: "outlined",
938
- fullWidth: true,
939
933
  InputProps: _objectSpread(_objectSpread(_objectSpread({}, TextFieldProps === null || TextFieldProps === void 0 ? void 0 : TextFieldProps.InputProps), params.InputProps), {}, {
940
934
  startAdornment: params.InputProps.startAdornment
941
935
  }),
942
- placeholder: "Enter individual emails on each line or separate them with comma (,)",
943
936
  onChange: event => {
944
937
  var text = event.target.value.replace(/,/g, '');
945
938
  var hasCommaOrSpace = /,|\s/.test(event.target.value);
@@ -1343,8 +1336,8 @@ var NavbarContext = /*#__PURE__*/createContext({
1343
1336
  isDrawerOpen: false,
1344
1337
  isMenuExpanded: false,
1345
1338
  isNavbarExpanded: false,
1346
- setMenuExpanded: noop,
1347
- setDrawerOpen: noop
1339
+ setMenuExpanded: () => void 0,
1340
+ setDrawerOpen: () => void 0
1348
1341
  });
1349
1342
  function useNavbarContext() {
1350
1343
  return useContext(NavbarContext);