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