@superdispatch/ui-lab 0.23.2 → 0.23.4

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.
@@ -15,6 +15,7 @@ var _objectSpread = _interopDefault(require('@babel/runtime/helpers/objectSpread
15
15
  var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties'));
16
16
  var reactTransitionGroup = require('react-transition-group');
17
17
  var core = require('@material-ui/core');
18
+ var dates = require('@superdispatch/dates');
18
19
  var uiLab = require('@superdispatch/ui-lab');
19
20
  var js = require('@mdi/js');
20
21
  var Dropzone = _interopDefault(require('react-dropzone'));
@@ -537,13 +538,9 @@ var ChatContainer = /*#__PURE__*/styled__default('div').withConfig({
537
538
  componentId: "SD__sc-qksih8-0"
538
539
  })(_ref => {
539
540
  var {
540
- isEmpty,
541
- minWidth,
542
- maxWidth,
543
- minHeight,
544
- maxHeight
541
+ isEmpty
545
542
  } = _ref;
546
- return "\n display: flex;\n flex-direction: column-reverse;\n overflow: auto;\n justify-content: ".concat(isEmpty ? 'center' : 'end', ";\n width: 100%;\n height: 100%;\n min-width: ").concat(minWidth || 432, "px;\n max-width: ").concat(maxWidth || 560, "px;\n min-height: ").concat(minHeight || 368, "px;\n max-height: ").concat(maxHeight || 696, "px;\n padding: 16px;\n box-sizing: border-box;\n");
543
+ return "\n display: flex;\n flex-direction: column-reverse;\n overflow: auto;\n justify-content: ".concat(isEmpty ? 'center' : 'end', ";\n width: 100%;\n height: 100%;\n min-width: 300px;\n max-width: 560px;\n min-height: 368px;\n max-height: 696px;\n padding: 16px;\n box-sizing: border-box;\n");
547
544
  });
548
545
 
549
546
  function emptyPlaceholder(text) {
@@ -557,6 +554,7 @@ function emptyPlaceholder(text) {
557
554
  var Chat = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
558
555
  var {
559
556
  children,
557
+ className,
560
558
  emptyText = 'No new messages'
561
559
  } = _ref2;
562
560
  var isEmpty = react.Children.toArray(children).length === 0;
@@ -564,6 +562,7 @@ var Chat = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
564
562
  "data-testid": "chat-container",
565
563
  isEmpty: isEmpty,
566
564
  ref: ref,
565
+ className: className,
567
566
  children: /*#__PURE__*/jsxRuntime.jsx(ui.Stack, {
568
567
  space: "small",
569
568
  children: isEmpty ? emptyPlaceholder(emptyText) : children
@@ -581,6 +580,9 @@ var ChatMessage = /*#__PURE__*/react.forwardRef((_ref, ref) => {
581
580
  text,
582
581
  variant
583
582
  } = _ref;
583
+ var time = dates.formatDate(dateTime, {
584
+ variant: 'Time'
585
+ });
584
586
  return /*#__PURE__*/jsxRuntime.jsxs(ui.Stack, {
585
587
  space: "xxsmall",
586
588
  align: variant === 'outgoing' ? 'right' : 'left',
@@ -596,7 +598,7 @@ var ChatMessage = /*#__PURE__*/react.forwardRef((_ref, ref) => {
596
598
  children: role
597
599
  }), /*#__PURE__*/jsxRuntime.jsx(core.Typography, {
598
600
  color: "textSecondary",
599
- children: dateTime
601
+ children: time
600
602
  })]
601
603
  }), /*#__PURE__*/jsxRuntime.jsx(uiLab.Box, {
602
604
  display: "inline-block",