@superdispatch/dates 0.21.5-alpha.2 → 0.21.6

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.
@@ -6,16 +6,17 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var _objectSpread = _interopDefault(require('@babel/runtime/helpers/objectSpread2'));
8
8
  var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties'));
9
- var material = require('@mui/material');
10
- var styles = require('@mui/styles');
9
+ var core = require('@material-ui/core');
10
+ var styles = require('@material-ui/styles');
11
11
  var ui = require('@superdispatch/ui');
12
12
  var luxon = require('luxon');
13
13
  var react = require('react');
14
14
  var DayPicker = _interopDefault(require('react-day-picker'));
15
15
  var jsxRuntime = require('react/jsx-runtime');
16
- var iconsMaterial = require('@mui/icons-material');
16
+ var icons = require('@material-ui/icons');
17
17
  var js = require('@mdi/js');
18
18
  var hooks = require('@superdispatch/hooks');
19
+ var lab = require('@material-ui/lab');
19
20
 
20
21
  function setDefaultTimeZone(offset) {
21
22
  if (offset === 'local') {
@@ -323,7 +324,7 @@ function CalendarCaption(_ref) {
323
324
  classNames,
324
325
  onClick
325
326
  } = _ref;
326
- return /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
327
+ return /*#__PURE__*/jsxRuntime.jsx(core.Typography, {
327
328
  variant: "h4",
328
329
  onClick: onClick,
329
330
  className: classNames.caption,
@@ -340,7 +341,7 @@ function CalendarNavbar(_ref2) {
340
341
  showPreviousButton
341
342
  } = _ref2;
342
343
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
343
- children: [/*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
344
+ children: [/*#__PURE__*/jsxRuntime.jsx(core.IconButton, {
344
345
  size: "small",
345
346
  color: "primary",
346
347
  disabled: !showPreviousButton,
@@ -349,10 +350,10 @@ function CalendarNavbar(_ref2) {
349
350
  },
350
351
  "aria-label": labels.previousMonth,
351
352
  className: classNames.navButtonPrev,
352
- children: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.ChevronLeft, {
353
+ children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronLeft, {
353
354
  color: "action"
354
355
  })
355
- }), /*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
356
+ }), /*#__PURE__*/jsxRuntime.jsx(core.IconButton, {
356
357
  size: "small",
357
358
  color: "primary",
358
359
  disabled: !showNextButton,
@@ -361,7 +362,7 @@ function CalendarNavbar(_ref2) {
361
362
  },
362
363
  "aria-label": labels.nextMonth,
363
364
  className: classNames.navButtonNext,
364
- children: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.ChevronRight, {
365
+ children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRight, {
365
366
  color: "action"
366
367
  })
367
368
  })]
@@ -374,7 +375,7 @@ function CalendarWeekDay(_ref3) {
374
375
  className,
375
376
  localeUtils
376
377
  } = _ref3;
377
- return /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
378
+ return /*#__PURE__*/jsxRuntime.jsx(core.Typography, {
378
379
  variant: "h5",
379
380
  component: "abbr",
380
381
  className: className,
@@ -400,12 +401,12 @@ var useStyles = /*#__PURE__*/styles.makeStyles(theme => ({
400
401
  interactionDisabled: {},
401
402
  navBar: {},
402
403
  navButtonPrev: {
403
- position: 'absolute !important',
404
+ position: 'absolute',
404
405
  top: theme.spacing(1.5),
405
406
  left: theme.spacing(1.5)
406
407
  },
407
408
  navButtonNext: {
408
- position: 'absolute !important',
409
+ position: 'absolute',
409
410
  top: theme.spacing(1.5),
410
411
  right: theme.spacing(1.5)
411
412
  },
@@ -710,36 +711,36 @@ var Calendar = /*#__PURE__*/react.forwardRef((_ref, ref) => {
710
711
  }
711
712
  }
712
713
 
713
- return /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
714
+ return /*#__PURE__*/jsxRuntime.jsxs(core.Grid, {
714
715
  ref: ref,
715
716
  container: true,
716
717
  direction: direction,
717
718
  children: [!!quickSelection && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
718
- children: [/*#__PURE__*/jsxRuntime.jsx(material.Grid, {
719
+ children: [/*#__PURE__*/jsxRuntime.jsx(core.Grid, {
719
720
  item: true,
720
721
  xs: 12,
721
722
  sm: "auto",
722
723
  children: quickSelection
723
- }), /*#__PURE__*/jsxRuntime.jsx(material.Hidden, {
724
+ }), /*#__PURE__*/jsxRuntime.jsx(core.Hidden, {
724
725
  xsDown: true,
725
- children: /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
726
+ children: /*#__PURE__*/jsxRuntime.jsx(core.Grid, {
726
727
  item: true,
727
728
  sm: "auto",
728
- children: /*#__PURE__*/jsxRuntime.jsx(material.Divider, {
729
+ children: /*#__PURE__*/jsxRuntime.jsx(core.Divider, {
729
730
  orientation: "vertical"
730
731
  })
731
732
  })
732
- }), /*#__PURE__*/jsxRuntime.jsx(material.Hidden, {
733
+ }), /*#__PURE__*/jsxRuntime.jsx(core.Hidden, {
733
734
  smUp: true,
734
- children: /*#__PURE__*/jsxRuntime.jsx(material.Grid, {
735
+ children: /*#__PURE__*/jsxRuntime.jsx(core.Grid, {
735
736
  item: true,
736
737
  xs: 12,
737
- children: /*#__PURE__*/jsxRuntime.jsx(material.Divider, {
738
+ children: /*#__PURE__*/jsxRuntime.jsx(core.Divider, {
738
739
  orientation: "horizontal"
739
740
  })
740
741
  })
741
742
  })]
742
- }), /*#__PURE__*/jsxRuntime.jsxs(material.Grid, {
743
+ }), /*#__PURE__*/jsxRuntime.jsxs(core.Grid, {
743
744
  item: true,
744
745
  xs: 12,
745
746
  sm: "auto",
@@ -775,7 +776,7 @@ var CalendarQuickSelectionItem = /*#__PURE__*/react.forwardRef((_ref, ref) => {
775
776
  selected,
776
777
  children
777
778
  } = _ref;
778
- return /*#__PURE__*/jsxRuntime.jsx(material.ListItem, {
779
+ return /*#__PURE__*/jsxRuntime.jsx(core.ListItem, {
779
780
  ref: ref,
780
781
  button: true,
781
782
  selected: selected,
@@ -788,10 +789,10 @@ var CalendarQuickSelection = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
788
789
  var {
789
790
  children
790
791
  } = _ref2;
791
- return /*#__PURE__*/jsxRuntime.jsxs(material.List, {
792
+ return /*#__PURE__*/jsxRuntime.jsxs(core.List, {
792
793
  ref: ref,
793
- children: [/*#__PURE__*/jsxRuntime.jsx(material.ListItem, {
794
- children: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
794
+ children: [/*#__PURE__*/jsxRuntime.jsx(core.ListItem, {
795
+ children: /*#__PURE__*/jsxRuntime.jsx(core.Typography, {
795
796
  variant: "h4",
796
797
  children: "Quick Selection"
797
798
  })
@@ -844,7 +845,7 @@ var BaseDatePicker = /*#__PURE__*/react.forwardRef((_ref, ref) => {
844
845
  }
845
846
  });
846
847
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
847
- children: [/*#__PURE__*/jsxRuntime.jsx(material.Popover, {
848
+ children: [/*#__PURE__*/jsxRuntime.jsx(core.Popover, {
848
849
  open: !!popoverAnchor,
849
850
  onClose: handleClose,
850
851
  anchorEl: popoverAnchor,
@@ -857,7 +858,7 @@ var BaseDatePicker = /*#__PURE__*/react.forwardRef((_ref, ref) => {
857
858
  horizontal: 'left'
858
859
  },
859
860
  children: children
860
- }), /*#__PURE__*/jsxRuntime.jsx(material.TextField, _objectSpread(_objectSpread({}, textFieldProps), {}, {
861
+ }), /*#__PURE__*/jsxRuntime.jsx(core.TextField, _objectSpread(_objectSpread({}, textFieldProps), {}, {
861
862
  id: uid,
862
863
  ref: ui.mergeRefs(ref, textFieldRef),
863
864
  disabled: disabled,
@@ -880,9 +881,9 @@ var BaseDatePicker = /*#__PURE__*/react.forwardRef((_ref, ref) => {
880
881
  readOnly: true
881
882
  },
882
883
  InputProps: _objectSpread(_objectSpread({}, inputProps), {}, {
883
- endAdornment: /*#__PURE__*/jsxRuntime.jsx(material.InputAdornment, {
884
+ endAdornment: /*#__PURE__*/jsxRuntime.jsx(core.InputAdornment, {
884
885
  position: "end",
885
- children: enableClearable ? /*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
886
+ children: enableClearable ? /*#__PURE__*/jsxRuntime.jsx(core.IconButton, {
886
887
  disabled: disabled,
887
888
  "aria-labelledby": "".concat(clearIconID, " ").concat(labelID),
888
889
  onClick: event => {
@@ -890,13 +891,13 @@ var BaseDatePicker = /*#__PURE__*/react.forwardRef((_ref, ref) => {
890
891
  event.stopPropagation();
891
892
  onClear === null || onClear === void 0 ? void 0 : onClear();
892
893
  },
893
- children: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.Clear, {
894
+ children: /*#__PURE__*/jsxRuntime.jsx(icons.Clear, {
894
895
  id: clearIconID,
895
896
  "aria-label": "clear"
896
897
  })
897
- }) : /*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
898
+ }) : /*#__PURE__*/jsxRuntime.jsx(core.IconButton, {
898
899
  disabled: disabled,
899
- children: /*#__PURE__*/jsxRuntime.jsx(material.SvgIcon, {
900
+ children: /*#__PURE__*/jsxRuntime.jsx(core.SvgIcon, {
900
901
  children: /*#__PURE__*/jsxRuntime.jsx("path", {
901
902
  d: js.mdiCalendarMonth
902
903
  })
@@ -1647,7 +1648,7 @@ var TimeField = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1647
1648
  }, config));
1648
1649
  }
1649
1650
  }, [date, config]);
1650
- return /*#__PURE__*/jsxRuntime.jsx(material.Autocomplete, {
1651
+ return /*#__PURE__*/jsxRuntime.jsx(lab.Autocomplete, {
1651
1652
  ref: ref,
1652
1653
  disabled: disabled,
1653
1654
  freeSolo: true,
@@ -1671,7 +1672,7 @@ var TimeField = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1671
1672
  onInputChange: (_, nextInputValue) => {
1672
1673
  setInputValue(nextInputValue);
1673
1674
  },
1674
- renderInput: params => /*#__PURE__*/jsxRuntime.jsx(material.TextField, _objectSpread(_objectSpread(_objectSpread({
1675
+ renderInput: params => /*#__PURE__*/jsxRuntime.jsx(core.TextField, _objectSpread(_objectSpread(_objectSpread({
1675
1676
  variant: "outlined"
1676
1677
  }, props), params), {}, {
1677
1678
  InputProps: params.InputProps