@superdispatch/ui-lab 0.16.0-alpha.0 → 0.16.0-alpha.1

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.
Files changed (36) hide show
  1. package/dist-node/index.js +107 -1464
  2. package/dist-node/index.js.map +1 -1
  3. package/dist-src/alert/Alert.js +2 -2
  4. package/dist-src/button/Button.js +1 -1
  5. package/dist-src/button-area/ButtonArea.js +1 -1
  6. package/dist-src/file-drop-zone/FileDropZone.js +2 -2
  7. package/dist-src/file-list-item/FileListItem.js +2 -2
  8. package/dist-src/index.js +1 -3
  9. package/dist-src/sidebar/SidebarDivider.js +1 -1
  10. package/dist-src/sidebar/SidebarMenuItem.js +2 -2
  11. package/dist-src/sidebar/SidebarMenuItemAction.js +1 -1
  12. package/dist-src/sidebar/SidebarMenuItemAvatar.js +1 -1
  13. package/dist-types/index.d.ts +7 -327
  14. package/dist-web/index.js +128 -1485
  15. package/dist-web/index.js.map +1 -1
  16. package/package.json +2 -2
  17. package/dist-src/v5/alert/Alert.js +0 -43
  18. package/dist-src/v5/banner/Banner.js +0 -61
  19. package/dist-src/v5/box/Box.js +0 -153
  20. package/dist-src/v5/button/Button.js +0 -227
  21. package/dist-src/v5/button-area/ButtonArea.js +0 -48
  22. package/dist-src/v5/description-item/DescriptionItem.js +0 -75
  23. package/dist-src/v5/file-drop-zone/FileDropZone.js +0 -132
  24. package/dist-src/v5/file-list-item/FileListItem.js +0 -136
  25. package/dist-src/v5/index.js +0 -16
  26. package/dist-src/v5/sidebar/Sidebar.js +0 -66
  27. package/dist-src/v5/sidebar/SidebarContainer.js +0 -25
  28. package/dist-src/v5/sidebar/SidebarDivider.js +0 -15
  29. package/dist-src/v5/sidebar/SidebarMenuItem.js +0 -124
  30. package/dist-src/v5/sidebar/SidebarMenuItemAction.js +0 -26
  31. package/dist-src/v5/sidebar/SidebarMenuItemAvatar.js +0 -53
  32. package/dist-src/v5/sidebar/SidebarMenuItemContext.js +0 -21
  33. package/dist-src/v5/sidebar/SidebarSubheader.js +0 -41
  34. package/dist-src/v5/text-box/TextBox.js +0 -133
  35. package/dist-src/v5/utils/RuleNormalizer.js +0 -17
  36. package/dist-src/v5/utils/mergeStyles.js +0 -24
@@ -17,9 +17,6 @@ var reactTransitionGroup = require('react-transition-group');
17
17
  var material = require('@mui/material');
18
18
  var js = require('@mdi/js');
19
19
  var Dropzone = _interopDefault(require('react-dropzone'));
20
- var icons = require('@material-ui/icons');
21
- var lab$1 = require('@material-ui/lab');
22
- var core = require('@material-ui/core');
23
20
 
24
21
  function colorMixin(textColor, backgroundColor, buttonHoverColor) {
25
22
  return styled.css(["color:", ";background-color:", ";& .MuiAlert-icon{color:", ";}& .MuiAlert-action{& .MuiIconButton-root{&:hover,&:active{color:", ";}}}"], textColor, backgroundColor, textColor, buttonHoverColor);
@@ -27,7 +24,7 @@ function colorMixin(textColor, backgroundColor, buttonHoverColor) {
27
24
 
28
25
  var StyledAlert = /*#__PURE__*/styled__default(lab.Alert).withConfig({
29
26
  displayName: "Alert__StyledAlert",
30
- componentId: "SD__sc-ahws81-0"
27
+ componentId: "SD__sc-1j6qebb-0"
31
28
  })(["&.MuiAlert-outlinedSuccess{", ";}&.MuiAlert-outlinedInfo{", ";}&.MuiAlert-outlinedWarning{", ";}&.MuiAlert-outlinedError{", ";}& .MuiAlert-icon{opacity:1;padding:8px 0;font-size:24px;}& .MuiAlert-action{display:block;padding-top:5px;margin-right:-3px;& .MuiIconButton-root{& .MuiSvgIcon-root{font-size:24px;}}}"], /*#__PURE__*/colorMixin(ui.Color.Green500, ui.Color.Green50, ui.Color.Green400), /*#__PURE__*/colorMixin(ui.Color.Blue500, ui.Color.Blue50, ui.Color.Blue400), /*#__PURE__*/colorMixin(ui.Color.Yellow500, ui.Color.Yellow50, ui.Color.Yellow400), /*#__PURE__*/colorMixin(ui.Color.Red500, ui.Color.Red50, ui.Color.Red400));
32
29
 
33
30
  function toMaterialSeverity(severity) {
@@ -87,7 +84,7 @@ var CustomTransition = /*#__PURE__*/react.forwardRef((_ref, ref) => {
87
84
  if (process.env.NODE_ENV !== "production") CustomTransition.displayName = "CustomTransition";
88
85
  var BannerContent = /*#__PURE__*/styled__default(CustomTransition).withConfig({
89
86
  displayName: "Banner__BannerContent",
90
- componentId: "SD__sc-1y16295-0"
87
+ componentId: "SD__sc-9kw31n-0"
91
88
  })(_ref2 => {
92
89
  var {
93
90
  border = 'bottom'
@@ -130,24 +127,18 @@ function createRuleNormalizer(rules) {
130
127
  };
131
128
  }
132
129
 
133
- var {
134
- Color,
135
- isColorProp,
136
- parseResponsiveProp,
137
- parseSpaceProp
138
- } = ui.v5; //
139
130
  // Colors
140
131
  //
141
132
 
142
133
  function normalizeColor(input) {
143
- return isColorProp(input) ? Color[input] : undefined;
134
+ return ui.isColorProp(input) ? ui.Color[input] : undefined;
144
135
  } //
145
136
  // Space
146
137
  //
147
138
 
148
139
 
149
140
  function parseSpace(space) {
150
- return "".concat(parseSpaceProp(space), "px");
141
+ return "".concat(ui.parseSpaceProp(space), "px");
151
142
  } //
152
143
  // Margins
153
144
  //
@@ -247,7 +238,7 @@ function injectRule(styles, key, breakpoint, value, normalizer) {
247
238
 
248
239
  var Box = /*#__PURE__*/styled__default.div.withConfig({
249
240
  displayName: "Box",
250
- componentId: "SD__sc-1cy411s-0"
241
+ componentId: "SD__sc-1bc600y-0"
251
242
  })(props => {
252
243
  var {
253
244
  breakpoints
@@ -268,7 +259,7 @@ var Box = /*#__PURE__*/styled__default.div.withConfig({
268
259
  var prop = props[key];
269
260
 
270
261
  if (prop != null) {
271
- var [mobile, tablet, desktop] = parseResponsiveProp(prop);
262
+ var [mobile, tablet, desktop] = ui.parseResponsiveProp(prop);
272
263
  var normalizer = normalizers[key];
273
264
  injectRule(styles, key, xs, mobile, normalizer);
274
265
  injectRule(styles, key, sm, tablet, normalizer);
@@ -281,14 +272,10 @@ var Box = /*#__PURE__*/styled__default.div.withConfig({
281
272
  });
282
273
 
283
274
  var _excluded$1 = ["icon", "children", "variant", "active", "disabled", "fullWidth"];
284
- var {
285
- Color: Color$1,
286
- Stack
287
- } = ui.v5;
288
275
  var ButtonRoot = /*#__PURE__*/styled__default(material.ButtonBase).withConfig({
289
276
  displayName: "ButtonArea__ButtonRoot",
290
- componentId: "SD__sc-5sq1bg-0"
291
- })(["padding:12px 32px;border-width:1px;border-radius:4px;border-style:solid;border-color:", ";color:", ";background-color:", ";& svg{color:inherit;font-size:24px;}&[data-full-width='true']{width:100%;}&[data-disabled='true']{color:", ";border-color:", ";}&[data-variant='success']{&:hover{color:", ";box-shadow:0 0 0 2px ", ";border-color:", ";}&[data-active='true']{color:", ";border-color:", ";background-color:", ";}}&[data-variant='danger']{&:hover{color:", ";box-shadow:0 0 0 2px ", ";border-color:", ";}&[data-active='true']{color:", ";border-color:", ";background-color:", ";}}"], Color$1.Silver500, Color$1.Dark100, Color$1.White, Color$1.Silver500, Color$1.Silver400, Color$1.Green300, Color$1.Green100, Color$1.Green300, Color$1.Green300, Color$1.Green300, Color$1.Green50, Color$1.Red300, Color$1.Red100, Color$1.Red300, Color$1.Red300, Color$1.Red300, Color$1.Red50);
277
+ componentId: "SD__sc-1czum63-0"
278
+ })(["padding:12px 32px;border-width:1px;border-radius:4px;border-style:solid;border-color:", ";color:", ";background-color:", ";& svg{color:inherit;font-size:24px;}&[data-full-width='true']{width:100%;}&[data-disabled='true']{color:", ";border-color:", ";}&[data-variant='success']{&:hover{color:", ";box-shadow:0 0 0 2px ", ";border-color:", ";}&[data-active='true']{color:", ";border-color:", ";background-color:", ";}}&[data-variant='danger']{&:hover{color:", ";box-shadow:0 0 0 2px ", ";border-color:", ";}&[data-active='true']{color:", ";border-color:", ";background-color:", ";}}"], ui.Color.Silver500, ui.Color.Dark100, ui.Color.White, ui.Color.Silver500, ui.Color.Silver400, ui.Color.Green300, ui.Color.Green100, ui.Color.Green300, ui.Color.Green300, ui.Color.Green300, ui.Color.Green50, ui.Color.Red300, ui.Color.Red100, ui.Color.Red300, ui.Color.Red300, ui.Color.Red300, ui.Color.Red50);
292
279
  var ButtonArea = /*#__PURE__*/react.forwardRef((_ref, ref) => {
293
280
  var {
294
281
  icon,
@@ -308,7 +295,7 @@ var ButtonArea = /*#__PURE__*/react.forwardRef((_ref, ref) => {
308
295
  "data-variant": variant,
309
296
  "data-full-width": fullWidth
310
297
  }, props), {}, {
311
- children: /*#__PURE__*/jsxRuntime.jsxs(Stack, {
298
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Stack, {
312
299
  align: "center",
313
300
  space: "xxsmall",
314
301
  children: [icon, /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
@@ -440,7 +427,7 @@ function getInvertedVariables(size) {
440
427
 
441
428
  var ButtonRoot$1 = /*#__PURE__*/styled__default.button.withConfig({
442
429
  displayName: "Button__ButtonRoot",
443
- componentId: "SD__sc-1yjd62w-0"
430
+ componentId: "SD__sc-1pwdpe3-0"
444
431
  })(_ref2 => {
445
432
  var {
446
433
  size,
@@ -453,19 +440,19 @@ var ButtonRoot$1 = /*#__PURE__*/styled__default.button.withConfig({
453
440
  });
454
441
  var ButtonLabel = /*#__PURE__*/styled__default.span.withConfig({
455
442
  displayName: "Button__ButtonLabel",
456
- componentId: "SD__sc-1yjd62w-1"
443
+ componentId: "SD__sc-1pwdpe3-1"
457
444
  })(["display:inherit;align-items:inherit;justify-content:inherit;visibility:var(--button-visibility);--mui-svg-icon-size:var(--button-line-height);"]);
458
445
  var ButtonStartIcon = /*#__PURE__*/styled__default.span.withConfig({
459
446
  displayName: "Button__ButtonStartIcon",
460
- componentId: "SD__sc-1yjd62w-2"
447
+ componentId: "SD__sc-1pwdpe3-2"
461
448
  })(["margin-right:4px;"]);
462
449
  var ButtonEndIcon = /*#__PURE__*/styled__default.span.withConfig({
463
450
  displayName: "Button__ButtonEndIcon",
464
- componentId: "SD__sc-1yjd62w-3"
451
+ componentId: "SD__sc-1pwdpe3-3"
465
452
  })(["margin-left:4px;"]);
466
453
  var ButtonPendingIndicator = /*#__PURE__*/styled__default.span.withConfig({
467
454
  displayName: "Button__ButtonPendingIndicator",
468
- componentId: "SD__sc-1yjd62w-4"
455
+ componentId: "SD__sc-1pwdpe3-4"
469
456
  })(["left:50%;display:flex;position:absolute;visibility:visible;transform:translate(-50%);"]);
470
457
 
471
458
  function useButtonProps(_ref3) {
@@ -567,21 +554,17 @@ function mergeStyles(styles) {
567
554
  }
568
555
 
569
556
  var _excluded$3 = ["variant", "as", "align", "color", "display", "noWrap", "wrapOverflow"];
570
- var {
571
- Color: Color$2,
572
- parseResponsiveProp: parseResponsiveProp$1
573
- } = ui.v5;
574
557
  var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
575
558
  inherit: 'inherit',
576
- primary: Color$2.Dark500,
577
- secondary: Color$2.Dark200,
578
- white: Color$2.White,
579
- blue: Color$2.Blue300,
580
- green: Color$2.Green300,
581
- purple: Color$2.Purple500,
582
- red: Color$2.Red300,
583
- teal: Color$2.Teal300,
584
- yellow: Color$2.Yellow300
559
+ primary: ui.Color.Dark500,
560
+ secondary: ui.Color.Dark200,
561
+ white: ui.Color.White,
562
+ blue: ui.Color.Blue300,
563
+ green: ui.Color.Green300,
564
+ purple: ui.Color.Purple500,
565
+ red: ui.Color.Red300,
566
+ teal: ui.Color.Teal300,
567
+ yellow: ui.Color.Yellow300
585
568
  });
586
569
  var VARIANT_TYPE_MAPPING = {
587
570
  'heading-1': 'h1',
@@ -649,7 +632,7 @@ function textBoxMixin(noWrap, align, color, display, wrapOverflow) {
649
632
 
650
633
  var TextBoxRoot = /*#__PURE__*/styled__default.span.withConfig({
651
634
  displayName: "TextBox__TextBoxRoot",
652
- componentId: "SD__sc-1geakdj-0"
635
+ componentId: "SD__sc-9mywck-0"
653
636
  })(_ref2 => {
654
637
  var {
655
638
  theme,
@@ -674,11 +657,11 @@ var TextBox = /*#__PURE__*/react.forwardRef((_ref3, ref) => {
674
657
  } = _ref3,
675
658
  props = _objectWithoutProperties(_ref3, _excluded$3);
676
659
 
677
- var $align = parseResponsiveProp$1(align);
678
- var $color = parseResponsiveProp$1(color);
679
- var $noWrap = parseResponsiveProp$1(noWrap);
680
- var $display = parseResponsiveProp$1(display);
681
- var $wrapOverflow = parseResponsiveProp$1(wrapOverflow);
660
+ var $align = ui.parseResponsiveProp(align);
661
+ var $color = ui.parseResponsiveProp(color);
662
+ var $noWrap = ui.parseResponsiveProp(noWrap);
663
+ var $display = ui.parseResponsiveProp(display);
664
+ var $wrapOverflow = ui.parseResponsiveProp(wrapOverflow);
682
665
  return /*#__PURE__*/jsxRuntime.jsx(TextBoxRoot, _objectSpread(_objectSpread({}, props), {}, {
683
666
  as: as,
684
667
  ref: ref,
@@ -692,27 +675,18 @@ var TextBox = /*#__PURE__*/react.forwardRef((_ref3, ref) => {
692
675
  });
693
676
  if (process.env.NODE_ENV !== "production") TextBox.displayName = "TextBox";
694
677
 
695
- var {
696
- Color: Color$3,
697
- Column,
698
- Columns,
699
- Inline,
700
- isEmptyReactNode,
701
- useUID
702
- } = ui.v5;
703
-
704
678
  function descriptionItemIconMixin(size) {
705
679
  return styled.css(["width:", "px;height:", "px;& > .MuiSvgIcon-root{font-size:", "px;}"], size, size + 4, size);
706
680
  }
707
681
 
708
682
  var DescriptionItemIcon = /*#__PURE__*/styled__default.div.withConfig({
709
683
  displayName: "DescriptionItem__DescriptionItemIcon",
710
- componentId: "SD__sc-l1c918-0"
684
+ componentId: "SD__sc-1906hic-0"
711
685
  })(_ref => {
712
686
  var {
713
687
  theme
714
688
  } = _ref;
715
- return styled.css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], Color$3.Dark100, descriptionItemIconMixin(20), theme.breakpoints.up('sm'), descriptionItemIconMixin(16));
689
+ return styled.css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], ui.Color.Dark100, descriptionItemIconMixin(20), theme.breakpoints.up('sm'), descriptionItemIconMixin(16));
716
690
  });
717
691
  var DescriptionItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
718
692
  var {
@@ -725,22 +699,22 @@ var DescriptionItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
725
699
  id: idProp,
726
700
  'aria-label': ariaLabel
727
701
  } = _ref2;
728
- var id = useUID(idProp);
702
+ var id = ui.useUID(idProp);
729
703
  var labelID = "".concat(id, "-label");
730
- var isEmptyChildren = isEmptyReactNode(children);
731
- return /*#__PURE__*/jsxRuntime.jsxs(Columns, {
704
+ var isEmptyChildren = ui.isEmptyReactNode(children);
705
+ return /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
732
706
  id: id,
733
707
  ref: ref,
734
708
  space: "xsmall",
735
709
  "aria-label": ariaLabel,
736
- children: [!!(icon || inset) && /*#__PURE__*/jsxRuntime.jsx(Column, {
710
+ children: [!!(icon || inset) && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
737
711
  width: "content",
738
712
  children: /*#__PURE__*/jsxRuntime.jsx(DescriptionItemIcon, {
739
713
  children: icon
740
714
  })
741
- }), /*#__PURE__*/jsxRuntime.jsx(Column, {
715
+ }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
742
716
  width: "adaptive",
743
- children: /*#__PURE__*/jsxRuntime.jsxs(Inline, {
717
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Inline, {
744
718
  space: "xxsmall",
745
719
  noWrap: !wrap,
746
720
  children: [!!label && /*#__PURE__*/jsxRuntime.jsx(TextBox, {
@@ -763,12 +737,6 @@ var DescriptionItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
763
737
  if (process.env.NODE_ENV !== "production") DescriptionItem.displayName = "DescriptionItem";
764
738
 
765
739
  var _excluded$4 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
766
- var {
767
- CardButton,
768
- Color: Color$4,
769
- Column: Column$1,
770
- Columns: Columns$1
771
- } = ui.v5;
772
740
  function toBytes(input, unit) {
773
741
  if (unit === 'gb') return input * (1 << 30);
774
742
  if (unit === 'mb') return input * (1 << 20);
@@ -782,15 +750,15 @@ function formatBytes(bytes) {
782
750
  var unit = BYTE_UNITS[unitIndex];
783
751
  return "".concat((bytes / Math.pow(KILOBYTE, unitIndex)).toFixed(2), " ").concat(unit);
784
752
  }
785
- var StyledCardButton = /*#__PURE__*/styled__default(CardButton).withConfig({
753
+ var StyledCardButton = /*#__PURE__*/styled__default(ui.CardButton).withConfig({
786
754
  displayName: "FileDropZone__StyledCardButton",
787
- componentId: "SD__sc-neqvyq-0"
755
+ componentId: "SD__sc-5p1fk0-0"
788
756
  })(_ref => {
789
757
  var {
790
758
  status
791
759
  } = _ref;
792
760
  return {
793
- backgroundColor: status === 'active' ? Color$4.Blue50 : undefined
761
+ backgroundColor: status === 'active' ? ui.Color.Blue50 : undefined
794
762
  };
795
763
  });
796
764
 
@@ -801,12 +769,12 @@ function UploadRejection(_ref2) {
801
769
  } = _ref2;
802
770
  var [error] = rejection.errors;
803
771
  if (!error) return null;
804
- return /*#__PURE__*/jsxRuntime.jsxs(Columns$1, {
772
+ return /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
805
773
  align: "center",
806
- children: [/*#__PURE__*/jsxRuntime.jsx(Column$1, {
774
+ children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
807
775
  width: "content",
808
776
  children: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.Error, {})
809
- }), /*#__PURE__*/jsxRuntime.jsx(Column$1, {
777
+ }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
810
778
  children: error.code === 'file-too-large' ? maxSize == null ? 'Attachment size is too large' : "Attachment size should be less than ".concat(formatBytes(maxSize)) : error.message
811
779
  })]
812
780
  });
@@ -823,7 +791,7 @@ var FileDropZone = /*#__PURE__*/react.forwardRef((props, ref) => {
823
791
  d: js.mdiUpload
824
792
  })
825
793
  }),
826
- fallback = /*#__PURE__*/jsxRuntime.jsx(CardButton, {
794
+ fallback = /*#__PURE__*/jsxRuntime.jsx(ui.CardButton, {
827
795
  ref: ref,
828
796
  disabled: true,
829
797
  startIcon: /*#__PURE__*/jsxRuntime.jsx(material.CircularProgress, {
@@ -883,20 +851,13 @@ var FileDropZone = /*#__PURE__*/react.forwardRef((props, ref) => {
883
851
  });
884
852
  if (process.env.NODE_ENV !== "production") FileDropZone.displayName = "FileDropZone";
885
853
 
886
- var {
887
- Color: Color$5,
888
- Column: Column$2,
889
- Columns: Columns$2,
890
- useResponsiveValue,
891
- useUID: useUID$1
892
- } = ui.v5;
893
854
  var FileListItemName = /*#__PURE__*/styled__default.div.withConfig({
894
855
  displayName: "FileListItem__FileListItemName",
895
- componentId: "SD__sc-1pro30e-0"
856
+ componentId: "SD__sc-hxbsiy-0"
896
857
  })(["overflow:hidden;line-height:22px;white-space:nowrap;text-overflow:ellipsis;"]);
897
858
  var FileListItemProgress = /*#__PURE__*/styled__default(material.CircularProgress).withConfig({
898
859
  displayName: "FileListItem__FileListItemProgress",
899
- componentId: "SD__sc-1pro30e-1"
860
+ componentId: "SD__sc-hxbsiy-1"
900
861
  })(["font-size:24px;", "{font-size:14px;}"], _ref => {
901
862
  var {
902
863
  theme
@@ -930,10 +891,10 @@ var FileListItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
930
891
  onRetry,
931
892
  onDelete
932
893
  } = _ref2;
933
- var uid = useUID$1();
894
+ var uid = ui.useUID();
934
895
  var fileType = getFileType(name);
935
896
  var [isHoveredState, setIsHovered] = react.useState(false);
936
- var isHovered = useResponsiveValue(true, isHoveredState);
897
+ var isHovered = ui.useResponsiveValue(true, isHoveredState);
937
898
  return /*#__PURE__*/jsxRuntime.jsx("div", {
938
899
  ref: ref,
939
900
  onMouseOver: () => {
@@ -942,10 +903,10 @@ var FileListItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
942
903
  onMouseLeave: () => {
943
904
  setIsHovered(false);
944
905
  },
945
- children: /*#__PURE__*/jsxRuntime.jsxs(Columns$2, {
906
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
946
907
  align: "center",
947
908
  space: "xsmall",
948
- children: [/*#__PURE__*/jsxRuntime.jsx(Column$2, {
909
+ children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
949
910
  width: "content",
950
911
  children: status === 'error' ? /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.Error, {
951
912
  color: "error",
@@ -960,7 +921,7 @@ var FileListItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
960
921
  color: "action",
961
922
  fontSize: "small"
962
923
  })
963
- }), /*#__PURE__*/jsxRuntime.jsx(Column$2, {
924
+ }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
964
925
  width: "fluid",
965
926
  children: /*#__PURE__*/jsxRuntime.jsx(FileListItemName, {
966
927
  id: uid,
@@ -972,7 +933,7 @@ var FileListItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
972
933
  children: name
973
934
  })
974
935
  })
975
- }), status === 'error' && /*#__PURE__*/jsxRuntime.jsx(Column$2, {
936
+ }), status === 'error' && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
976
937
  width: "content",
977
938
  children: /*#__PURE__*/jsxRuntime.jsx(material.Tooltip, {
978
939
  title: "Retry",
@@ -984,7 +945,7 @@ var FileListItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
984
945
  })
985
946
  })
986
947
  })
987
- }), /*#__PURE__*/jsxRuntime.jsx(Column$2, {
948
+ }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
988
949
  width: "content",
989
950
  children: status === 'loading' ? /*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
990
951
  size: "small",
@@ -999,7 +960,7 @@ var FileListItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
999
960
  onClick: onDelete,
1000
961
  children: !isHovered && status === 'success' ? /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.CheckCircle, {
1001
962
  fontSize: "small",
1002
- htmlColor: Color$5.Green300
963
+ htmlColor: ui.Color.Green300
1003
964
  }) : /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.Delete, {
1004
965
  fontSize: "small"
1005
966
  })
@@ -1011,23 +972,17 @@ var FileListItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1011
972
  });
1012
973
  if (process.env.NODE_ENV !== "production") FileListItem.displayName = "FileListItem";
1013
974
 
1014
- var {
1015
- Color: Color$6,
1016
- Column: Column$3,
1017
- Columns: Columns$3,
1018
- useUID: useUID$2
1019
- } = ui.v5;
1020
975
  var SidebarRoot = /*#__PURE__*/styled__default.aside.withConfig({
1021
976
  displayName: "Sidebar__SidebarRoot",
1022
- componentId: "SD__sc-14hfb05-0"
1023
- })(["top:0;position:sticky;overflow-y:auto;overflow-x:hidden;width:240px;height:100vh;background-color:", ";border-right:1px solid ", ";"], Color$6.White, Color$6.Silver400);
977
+ componentId: "SD__sc-b77o22-0"
978
+ })(["top:0;position:sticky;overflow-y:auto;overflow-x:hidden;width:240px;height:100vh;background-color:", ";border-right:1px solid ", ";"], ui.Color.White, ui.Color.Silver400);
1024
979
  var SidebarHeader = /*#__PURE__*/styled__default.div.withConfig({
1025
980
  displayName: "Sidebar__SidebarHeader",
1026
- componentId: "SD__sc-14hfb05-1"
1027
- })(["top:0;z-index:1;position:sticky;padding-left:24px;padding-right:24px;padding-bottom:8px;background-color:", ";"], Color$6.White);
981
+ componentId: "SD__sc-b77o22-1"
982
+ })(["top:0;z-index:1;position:sticky;padding-left:24px;padding-right:24px;padding-bottom:8px;background-color:", ";"], ui.Color.White);
1028
983
  var SidebarTitle = /*#__PURE__*/styled__default.div.withConfig({
1029
984
  displayName: "Sidebar__SidebarTitle",
1030
- componentId: "SD__sc-14hfb05-2"
985
+ componentId: "SD__sc-b77o22-2"
1031
986
  })(["height:64px;max-height:64px;display:flex;align-items:center;"]);
1032
987
  var Sidebar = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1033
988
  var {
@@ -1037,17 +992,17 @@ var Sidebar = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1037
992
  children,
1038
993
  id: idProp
1039
994
  } = _ref;
1040
- var id = useUID$2(idProp);
995
+ var id = ui.useUID(idProp);
1041
996
  var titleID = "".concat(id, "-title");
1042
997
  return /*#__PURE__*/jsxRuntime.jsxs(SidebarRoot, {
1043
998
  id: id,
1044
999
  ref: ref,
1045
1000
  children: [/*#__PURE__*/jsxRuntime.jsxs(SidebarHeader, {
1046
1001
  children: [/*#__PURE__*/jsxRuntime.jsx(SidebarTitle, {
1047
- children: /*#__PURE__*/jsxRuntime.jsxs(Columns$3, {
1002
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
1048
1003
  space: "xsmall",
1049
1004
  align: "center",
1050
- children: [/*#__PURE__*/jsxRuntime.jsx(Column$3, {
1005
+ children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1051
1006
  width: "fluid",
1052
1007
  children: /*#__PURE__*/jsxRuntime.jsx(TextBox, {
1053
1008
  variant: "heading-2",
@@ -1055,7 +1010,7 @@ var Sidebar = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1055
1010
  id: titleID,
1056
1011
  children: title
1057
1012
  })
1058
- }), !!count && /*#__PURE__*/jsxRuntime.jsx(Column$3, {
1013
+ }), !!count && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1059
1014
  width: "content",
1060
1015
  children: /*#__PURE__*/jsxRuntime.jsx(TextBox, {
1061
1016
  color: "secondary",
@@ -1074,11 +1029,11 @@ if (process.env.NODE_ENV !== "production") Sidebar.displayName = "Sidebar";
1074
1029
 
1075
1030
  var SidebarContainerRoot = /*#__PURE__*/styled__default.div.withConfig({
1076
1031
  displayName: "SidebarContainer__SidebarContainerRoot",
1077
- componentId: "SD__sc-6u6mqe-0"
1032
+ componentId: "SD__sc-uibj1m-0"
1078
1033
  })(["display:flex;height:inherit;max-height:inherit;min-height:inherit;"]);
1079
1034
  var SidebarContainerContent = /*#__PURE__*/styled__default.div.withConfig({
1080
1035
  displayName: "SidebarContainer__SidebarContainerContent",
1081
- componentId: "SD__sc-6u6mqe-1"
1036
+ componentId: "SD__sc-uibj1m-1"
1082
1037
  })(["height:inherit;max-height:inherit;min-height:inherit;width:calc(100% - 240px);min-width:calc(100% - 240px);max-width:calc(100% - 240px);"]);
1083
1038
  var SidebarContainer = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1084
1039
  var {
@@ -1096,7 +1051,7 @@ if (process.env.NODE_ENV !== "production") SidebarContainer.displayName = "Sideb
1096
1051
 
1097
1052
  var SidebarDividerRoot = /*#__PURE__*/styled__default.div.withConfig({
1098
1053
  displayName: "SidebarDivider__SidebarDividerRoot",
1099
- componentId: "SD__sc-182lunj-0"
1054
+ componentId: "SD__sc-5lwi2i-0"
1100
1055
  })(["padding:20px 24px;"]);
1101
1056
  var SidebarDivider = /*#__PURE__*/react.forwardRef((_, ref) => {
1102
1057
  return /*#__PURE__*/jsxRuntime.jsx(SidebarDividerRoot, {
@@ -1126,29 +1081,23 @@ function SidebarMenuItemContextProvider(_ref) {
1126
1081
  });
1127
1082
  }
1128
1083
 
1129
- var {
1130
- Color: Color$7,
1131
- Column: Column$4,
1132
- Columns: Columns$4,
1133
- Inline: Inline$1
1134
- } = ui.v5;
1135
1084
  var SidebarMenuItemRoot = /*#__PURE__*/styled__default.div.withConfig({
1136
1085
  displayName: "SidebarMenuItem__SidebarMenuItemRoot",
1137
- componentId: "SD__sc-1srwx2n-0"
1086
+ componentId: "SD__sc-1sb5zqa-0"
1138
1087
  })(_ref => {
1139
1088
  var {
1140
1089
  hasAvatar
1141
1090
  } = _ref;
1142
1091
  var height = hasAvatar ? 48 : 40;
1143
- return styled.css(["position:relative;& > .MuiButtonBase-root{width:100%;display:flex;justify-content:flex-start;padding-left:24px;padding-right:24px;height:", "px;max-height:", "px;&[aria-current='true']{background-color:", ";box-shadow:inset 4px 0 0 ", ";}}"], height, height, Color$7.Silver200, Color$7.Blue300);
1092
+ return styled.css(["position:relative;& > .MuiButtonBase-root{width:100%;display:flex;justify-content:flex-start;padding-left:24px;padding-right:24px;height:", "px;max-height:", "px;&[aria-current='true']{background-color:", ";box-shadow:inset 4px 0 0 ", ";}}"], height, height, ui.Color.Silver200, ui.Color.Blue300);
1144
1093
  });
1145
1094
  var SidebarMenuItemBadge = /*#__PURE__*/styled__default.div.withConfig({
1146
1095
  displayName: "SidebarMenuItem__SidebarMenuItemBadge",
1147
- componentId: "SD__sc-1srwx2n-1"
1148
- })(["font-size:12px;line-height:16px;padding-left:4px;padding-right:4px;border-radius:100px;color:", ";background-color:", ";.MuiButtonBase-root[aria-current='true'] &{color:", ";background-color:", ";}"], Color$7.Dark500, Color$7.Silver300, Color$7.White, Color$7.Dark450);
1096
+ componentId: "SD__sc-1sb5zqa-1"
1097
+ })(["font-size:12px;line-height:16px;padding-left:4px;padding-right:4px;border-radius:100px;color:", ";background-color:", ";.MuiButtonBase-root[aria-current='true'] &{color:", ";background-color:", ";}"], ui.Color.Dark500, ui.Color.Silver300, ui.Color.White, ui.Color.Dark450);
1149
1098
  var SidebarMenuItemSecondaryAction = /*#__PURE__*/styled__default.div.withConfig({
1150
1099
  displayName: "SidebarMenuItem__SidebarMenuItemSecondaryAction",
1151
- componentId: "SD__sc-1srwx2n-2"
1100
+ componentId: "SD__sc-1sb5zqa-2"
1152
1101
  })(["top:50%;right:24px;position:absolute;transform:translate3d(0,-50%,0);"]);
1153
1102
  var SidebarMenuItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1154
1103
  var {
@@ -1184,33 +1133,33 @@ var SidebarMenuItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1184
1133
  onClick: onClick,
1185
1134
  disabled: disabled,
1186
1135
  "aria-current": selected,
1187
- children: /*#__PURE__*/jsxRuntime.jsxs(Columns$4, {
1136
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
1188
1137
  align: "center",
1189
1138
  space: "xsmall",
1190
- children: [/*#__PURE__*/jsxRuntime.jsx(Column$4, {
1191
- children: /*#__PURE__*/jsxRuntime.jsx(Columns$4, {
1139
+ children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1140
+ children: /*#__PURE__*/jsxRuntime.jsx(ui.Columns, {
1192
1141
  align: "center",
1193
1142
  space: "xsmall",
1194
- children: /*#__PURE__*/jsxRuntime.jsx(Column$4, {
1143
+ children: /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1195
1144
  width: "fluid",
1196
- children: /*#__PURE__*/jsxRuntime.jsxs(Columns$4, {
1145
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
1197
1146
  align: "center",
1198
1147
  space: "xsmall",
1199
1148
  children: [!!avatar && /*#__PURE__*/jsxRuntime.jsx(SidebarMenuItemContextProvider, {
1200
1149
  hovered: hovered,
1201
1150
  disabled: disabled,
1202
- children: /*#__PURE__*/jsxRuntime.jsx(Column$4, {
1151
+ children: /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1203
1152
  width: "content",
1204
1153
  children: avatar
1205
1154
  })
1206
- }), /*#__PURE__*/jsxRuntime.jsx(Column$4, {
1155
+ }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1207
1156
  width: "adaptive",
1208
1157
  children: /*#__PURE__*/jsxRuntime.jsx(TextBox, {
1209
1158
  variant: selected ? 'body-semibold' : 'body',
1210
1159
  noWrap: true,
1211
1160
  children: children
1212
1161
  })
1213
- }), external && /*#__PURE__*/jsxRuntime.jsx(Column$4, {
1162
+ }), external && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1214
1163
  width: "content",
1215
1164
  children: /*#__PURE__*/jsxRuntime.jsx(iconsMaterial.OpenInNew, {
1216
1165
  color: "action",
@@ -1220,12 +1169,12 @@ var SidebarMenuItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1220
1169
  })
1221
1170
  })
1222
1171
  })
1223
- }), !!badge && /*#__PURE__*/jsxRuntime.jsx(Column$4, {
1172
+ }), !!badge && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1224
1173
  width: "content",
1225
1174
  children: /*#__PURE__*/jsxRuntime.jsx(SidebarMenuItemBadge, {
1226
1175
  children: badge
1227
1176
  })
1228
- }), (!!action || !!secondaryActions) && /*#__PURE__*/jsxRuntime.jsx(Column$4, {
1177
+ }), (!!action || !!secondaryActions) && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1229
1178
  width: "content",
1230
1179
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
1231
1180
  ref: actionsPlaceholderRef
@@ -1234,7 +1183,7 @@ var SidebarMenuItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1234
1183
  })
1235
1184
  }), (!!action || !!secondaryActions) && /*#__PURE__*/jsxRuntime.jsx(SidebarMenuItemSecondaryAction, {
1236
1185
  ref: actionsRef,
1237
- children: /*#__PURE__*/jsxRuntime.jsxs(Inline$1, {
1186
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Inline, {
1238
1187
  children: [hovered && secondaryActions, action]
1239
1188
  })
1240
1189
  })]
@@ -1244,7 +1193,7 @@ if (process.env.NODE_ENV !== "production") SidebarMenuItem.displayName = "Sideba
1244
1193
 
1245
1194
  var SidebarMenuItemActionRoot = /*#__PURE__*/styled__default(material.IconButton).withConfig({
1246
1195
  displayName: "SidebarMenuItemAction__SidebarMenuItemActionRoot",
1247
- componentId: "SD__sc-4la7tu-0"
1196
+ componentId: "SD__sc-1n50gmv-0"
1248
1197
  })(["& .MuiSvgIcon-root{font-size:16px;}"]);
1249
1198
  var SidebarMenuItemAction = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1250
1199
  var {
@@ -1271,7 +1220,7 @@ function stopPropagation(event) {
1271
1220
 
1272
1221
  var SidebarMenuItemAvatarCheckbox = /*#__PURE__*/styled__default.div.withConfig({
1273
1222
  displayName: "SidebarMenuItemAvatar__SidebarMenuItemAvatarCheckbox",
1274
- componentId: "SD__sc-bfi0pv-0"
1223
+ componentId: "SD__sc-17mkvc7-0"
1275
1224
  })(["margin:-5px;"]);
1276
1225
  var SidebarMenuItemAvatar = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1277
1226
  var {
@@ -1313,13 +1262,9 @@ var SidebarMenuItemAvatar = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1313
1262
  });
1314
1263
  if (process.env.NODE_ENV !== "production") SidebarMenuItemAvatar.displayName = "SidebarMenuItemAvatar";
1315
1264
 
1316
- var {
1317
- Column: Column$5,
1318
- Columns: Columns$5
1319
- } = ui.v5;
1320
1265
  var SidebarSubheaderRoot = /*#__PURE__*/styled__default.div.withConfig({
1321
1266
  displayName: "SidebarSubheader__SidebarSubheaderRoot",
1322
- componentId: "SD__sc-7njpmq-0"
1267
+ componentId: "SD__sc-1r0xx76-0"
1323
1268
  })(["display:flex;align-items:center;height:40px;max-height:40px;padding-left:24px;padding-right:24px;"]);
1324
1269
  var SidebarSubheader = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1325
1270
  var {
@@ -1329,10 +1274,10 @@ var SidebarSubheader = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1329
1274
  } = _ref;
1330
1275
  return /*#__PURE__*/jsxRuntime.jsx(SidebarSubheaderRoot, {
1331
1276
  ref: ref,
1332
- children: /*#__PURE__*/jsxRuntime.jsxs(Columns$5, {
1277
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
1333
1278
  space: "xsmall",
1334
1279
  align: "center",
1335
- children: [/*#__PURE__*/jsxRuntime.jsx(Column$5, {
1280
+ children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1336
1281
  children: /*#__PURE__*/jsxRuntime.jsx(TextBox, {
1337
1282
  id: id,
1338
1283
  variant: "heading-6",
@@ -1340,7 +1285,7 @@ var SidebarSubheader = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1340
1285
  noWrap: true,
1341
1286
  children: children
1342
1287
  })
1343
- }), !!action && /*#__PURE__*/jsxRuntime.jsx(Column$5, {
1288
+ }), !!action && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
1344
1289
  width: "content",
1345
1290
  children: action
1346
1291
  })]
@@ -1349,1325 +1294,23 @@ var SidebarSubheader = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1349
1294
  });
1350
1295
  if (process.env.NODE_ENV !== "production") SidebarSubheader.displayName = "SidebarSubheader";
1351
1296
 
1352
-
1353
-
1354
- var index = /*#__PURE__*/Object.freeze({
1355
- __proto__: null,
1356
- Alert: Alert,
1357
- Banner: Banner,
1358
- Box: Box,
1359
- ButtonArea: ButtonArea,
1360
- Button: Button,
1361
- AnchorButton: AnchorButton,
1362
- DescriptionItem: DescriptionItem,
1363
- toBytes: toBytes,
1364
- formatBytes: formatBytes,
1365
- FileDropZone: FileDropZone,
1366
- FileListItem: FileListItem,
1367
- Sidebar: Sidebar,
1368
- SidebarContainer: SidebarContainer,
1369
- SidebarDivider: SidebarDivider,
1370
- SidebarMenuItem: SidebarMenuItem,
1371
- SidebarMenuItemAction: SidebarMenuItemAction,
1372
- SidebarMenuItemAvatar: SidebarMenuItemAvatar,
1373
- SidebarSubheader: SidebarSubheader,
1374
- TextBox: TextBox
1375
- });
1376
-
1377
- function colorMixin$1(textColor, backgroundColor, buttonHoverColor) {
1378
- return styled.css(["color:", ";background-color:", ";& .MuiAlert-icon{color:", ";}& .MuiAlert-action{& .MuiIconButton-root{&:hover,&:active{color:", ";}}}"], textColor, backgroundColor, textColor, buttonHoverColor);
1379
- }
1380
-
1381
- var StyledAlert$1 = /*#__PURE__*/styled__default(lab$1.Alert).withConfig({
1382
- displayName: "Alert__StyledAlert",
1383
- componentId: "SD__sc-1j6qebb-0"
1384
- })(["&.MuiAlert-outlinedSuccess{", ";}&.MuiAlert-outlinedInfo{", ";}&.MuiAlert-outlinedWarning{", ";}&.MuiAlert-outlinedError{", ";}& .MuiAlert-icon{opacity:1;padding:8px 0;font-size:24px;}& .MuiAlert-action{display:block;padding-top:5px;margin-right:-3px;& .MuiIconButton-root{& .MuiSvgIcon-root{font-size:24px;}}}"], /*#__PURE__*/colorMixin$1(ui.Color.Green500, ui.Color.Green50, ui.Color.Green400), /*#__PURE__*/colorMixin$1(ui.Color.Blue500, ui.Color.Blue50, ui.Color.Blue400), /*#__PURE__*/colorMixin$1(ui.Color.Yellow500, ui.Color.Yellow50, ui.Color.Yellow400), /*#__PURE__*/colorMixin$1(ui.Color.Red500, ui.Color.Red50, ui.Color.Red400));
1385
-
1386
- function toMaterialSeverity$1(severity) {
1387
- return severity === 'info' ? 'info' : severity === 'caution' ? 'warning' : severity === 'critical' ? 'error' : 'success';
1388
- }
1389
-
1390
- var iconMapping$1 = {
1391
- success: /*#__PURE__*/jsxRuntime.jsx(icons.CheckCircle, {}),
1392
- info: /*#__PURE__*/jsxRuntime.jsx(icons.Info, {}),
1393
- error: /*#__PURE__*/jsxRuntime.jsx(icons.Error, {})
1394
- };
1395
- var Alert$1 = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1396
- var {
1397
- children,
1398
- onClose: _onClose,
1399
- severity = 'positive'
1400
- } = _ref;
1401
- return /*#__PURE__*/jsxRuntime.jsx(StyledAlert$1, {
1402
- ref: ref,
1403
- variant: "outlined",
1404
- iconMapping: iconMapping$1,
1405
- severity: toMaterialSeverity$1(severity),
1406
- onClose: () => {
1407
- _onClose === null || _onClose === void 0 ? void 0 : _onClose();
1408
- },
1409
- children: children
1410
- });
1411
- });
1412
- if (process.env.NODE_ENV !== "production") Alert$1.displayName = "Alert";
1413
-
1414
- var _excluded$5 = ["children"],
1415
- _excluded2$2 = ["in"];
1416
-
1417
- function enterMixin$1(border) {
1418
- return styled.css(["min-height:56px;color:", ";background-color:", ";border-", ":1px #dfe3e8 solid;"], ui.Color.Dark500, ui.Color.White, border);
1419
- }
1420
-
1421
- function enterAnimation$1(border) {
1422
- return styled.keyframes(["0%{min-height:0;color:", ";background-color:", ";}50%{min-height:56px;color:", ";background-color:", ";}70%{min-height:56px;color:", ";background-color:", ";}100%{", "}"], ui.Color.White, ui.Color.Dark500, ui.Color.White, ui.Color.Dark500, ui.Color.White, ui.Color.Dark500, enterMixin$1(border));
1423
- }
1424
-
1425
- var CustomTransition$1 = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1426
- var {
1427
- children
1428
- } = _ref,
1429
- props = _objectWithoutProperties(_ref, _excluded$5);
1430
-
1431
- return /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, _objectSpread(_objectSpread({}, props), {}, {
1432
- ref: ref,
1433
- timeout: 3000,
1434
- classNames: props.className,
1435
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
1436
- children: children
1437
- })
1438
- }));
1439
- });
1440
- if (process.env.NODE_ENV !== "production") CustomTransition$1.displayName = "CustomTransition";
1441
- var BannerContent$1 = /*#__PURE__*/styled__default(CustomTransition$1).withConfig({
1442
- displayName: "Banner__BannerContent",
1443
- componentId: "SD__sc-9kw31n-0"
1444
- })(_ref2 => {
1445
- var {
1446
- border = 'bottom'
1447
- } = _ref2;
1448
- return styled.css(["height:0;width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;color:", ";background-color:", ";&-enter-active{animation:", " 2s 1s forwards;}&-enter-done{", ";}&-exit{", ";}&-exit-active{min-height:0;transition:min-height 2s 1s;}"], ui.Color.White, ui.Color.White, enterAnimation$1(border), enterMixin$1(border), enterMixin$1(border));
1449
- });
1450
- var Banner$1 = /*#__PURE__*/react.forwardRef((_ref3, ref) => {
1451
- var {
1452
- in: inProp
1453
- } = _ref3,
1454
- props = _objectWithoutProperties(_ref3, _excluded2$2);
1455
-
1456
- var [isIn, setIn] = react.useState(false); // transition is not triggered on initial render with `in: true`
1457
-
1458
- react.useEffect(() => {
1459
- setIn(!!inProp);
1460
- }, [inProp]);
1461
- return /*#__PURE__*/jsxRuntime.jsx(BannerContent$1, _objectSpread({
1462
- ref: ref,
1463
- in: isIn
1464
- }, props));
1465
- });
1466
- if (process.env.NODE_ENV !== "production") Banner$1.displayName = "Banner";
1467
-
1468
- function createRuleNormalizer$1(rules) {
1469
- return input => {
1470
- if (typeof input == 'string') {
1471
- var value = rules[input];
1472
-
1473
- if (typeof value == 'number') {
1474
- return "".concat(value, "px");
1475
- }
1476
-
1477
- if (typeof value == 'string') {
1478
- return value;
1479
- }
1480
- }
1481
-
1482
- return undefined;
1483
- };
1484
- }
1485
-
1486
- // Colors
1487
- //
1488
-
1489
- function normalizeColor$1(input) {
1490
- return ui.isColorProp(input) ? ui.Color[input] : undefined;
1491
- } //
1492
- // Space
1493
- //
1494
-
1495
-
1496
- function parseSpace$1(space) {
1497
- return "".concat(ui.parseSpaceProp(space), "px");
1498
- } //
1499
- // Margins
1500
- //
1501
-
1502
-
1503
- function parseMargin$1(input) {
1504
- if (input === 'auto') return input;
1505
- var prefix = '';
1506
-
1507
- if (typeof input == 'string' && input.startsWith('-')) {
1508
- prefix = '-';
1509
- input = input.slice(1);
1510
- }
1511
-
1512
- return prefix + parseSpace$1(input);
1513
- } //
1514
- // Borders
1515
- //
1516
-
1517
-
1518
- var normalizeBorderRadius$1 = /*#__PURE__*/createRuleNormalizer$1({
1519
- none: 0,
1520
- small: 4
1521
- });
1522
- var normalizeBorderWidth$1 = /*#__PURE__*/createRuleNormalizer$1({
1523
- none: 0,
1524
- small: 1,
1525
- medium: 2,
1526
- large: 4
1527
- }); //
1528
- // Rules
1529
- //
1530
-
1531
- var normalizers$1 = {
1532
- display: undefined,
1533
- color: normalizeColor$1,
1534
- backgroundColor: normalizeColor$1,
1535
- borderColor: normalizeColor$1,
1536
- borderTopColor: normalizeColor$1,
1537
- borderLeftColor: normalizeColor$1,
1538
- borderRightColor: normalizeColor$1,
1539
- borderBottomColor: normalizeColor$1,
1540
- borderWidth: normalizeBorderWidth$1,
1541
- borderTopWidth: normalizeBorderWidth$1,
1542
- borderLeftWidth: normalizeBorderWidth$1,
1543
- borderRightWidth: normalizeBorderWidth$1,
1544
- borderBottomWidth: normalizeBorderWidth$1,
1545
- margin: parseMargin$1,
1546
- marginTop: parseMargin$1,
1547
- marginLeft: parseMargin$1,
1548
- marginRight: parseMargin$1,
1549
- marginBottom: parseMargin$1,
1550
- padding: parseSpace$1,
1551
- paddingTop: parseSpace$1,
1552
- paddingLeft: parseSpace$1,
1553
- paddingRight: parseSpace$1,
1554
- paddingBottom: parseSpace$1,
1555
- borderRadius: normalizeBorderRadius$1,
1556
- borderTopLeftRadius: normalizeBorderRadius$1,
1557
- borderTopRightRadius: normalizeBorderRadius$1,
1558
- borderBottomLeftRadius: normalizeBorderRadius$1,
1559
- borderBottomRightRadius: normalizeBorderRadius$1,
1560
- fontSize: undefined,
1561
- width: undefined,
1562
- maxWidth: undefined,
1563
- minWidth: undefined,
1564
- height: undefined,
1565
- maxHeight: undefined,
1566
- minHeight: undefined,
1567
- overflow: undefined,
1568
- overflowY: undefined,
1569
- overflowX: undefined,
1570
- top: undefined,
1571
- left: undefined,
1572
- right: undefined,
1573
- bottom: undefined,
1574
- position: undefined
1575
- };
1576
-
1577
- function injectRule$1(styles, key, breakpoint, value, normalizer) {
1578
- if (normalizer != null) value = normalizer(value);
1579
-
1580
- if (value != null) {
1581
- var rules = styles[breakpoint];
1582
-
1583
- if (typeof rules != 'object') {
1584
- rules = {};
1585
- styles[breakpoint] = rules;
1586
- }
1587
-
1588
- rules[key] = String(value);
1589
- }
1590
- } //
1591
- // Box
1592
- //
1593
-
1594
-
1595
- var Box$1 = /*#__PURE__*/styled__default.div.withConfig({
1596
- displayName: "Box",
1597
- componentId: "SD__sc-1bc600y-0"
1598
- })(props => {
1599
- var {
1600
- breakpoints
1601
- } = props.theme;
1602
- var xs = breakpoints.up('xs');
1603
- var sm = breakpoints.up('sm');
1604
- var md = breakpoints.up('md');
1605
- var styles = {
1606
- margin: 0,
1607
- padding: 0,
1608
- borderWidth: 0,
1609
- borderStyle: 'solid'
1610
- };
1611
-
1612
- for (var k in props) {
1613
- if (Object.prototype.hasOwnProperty.call(props, k) && k in normalizers$1) {
1614
- var key = k;
1615
- var prop = props[key];
1616
-
1617
- if (prop != null) {
1618
- var [mobile, tablet, desktop] = ui.parseResponsiveProp(prop);
1619
- var normalizer = normalizers$1[key];
1620
- injectRule$1(styles, key, xs, mobile, normalizer);
1621
- injectRule$1(styles, key, sm, tablet, normalizer);
1622
- injectRule$1(styles, key, md, desktop, normalizer);
1623
- }
1624
- }
1625
- }
1626
-
1627
- return styles;
1628
- });
1629
-
1630
- var _excluded$6 = ["icon", "children", "variant", "active", "disabled", "fullWidth"];
1631
- var ButtonRoot$2 = /*#__PURE__*/styled__default(core.ButtonBase).withConfig({
1632
- displayName: "ButtonArea__ButtonRoot",
1633
- componentId: "SD__sc-1czum63-0"
1634
- })(["padding:12px 32px;border-width:1px;border-radius:4px;border-style:solid;border-color:", ";color:", ";background-color:", ";& svg{color:inherit;font-size:24px;}&[data-full-width='true']{width:100%;}&[data-disabled='true']{color:", ";border-color:", ";}&[data-variant='success']{&:hover{color:", ";box-shadow:0 0 0 2px ", ";border-color:", ";}&[data-active='true']{color:", ";border-color:", ";background-color:", ";}}&[data-variant='danger']{&:hover{color:", ";box-shadow:0 0 0 2px ", ";border-color:", ";}&[data-active='true']{color:", ";border-color:", ";background-color:", ";}}"], ui.Color.Silver500, ui.Color.Dark100, ui.Color.White, ui.Color.Silver500, ui.Color.Silver400, ui.Color.Green300, ui.Color.Green100, ui.Color.Green300, ui.Color.Green300, ui.Color.Green300, ui.Color.Green50, ui.Color.Red300, ui.Color.Red100, ui.Color.Red300, ui.Color.Red300, ui.Color.Red300, ui.Color.Red50);
1635
- var ButtonArea$1 = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1636
- var {
1637
- icon,
1638
- children,
1639
- variant,
1640
- active,
1641
- disabled,
1642
- fullWidth
1643
- } = _ref,
1644
- props = _objectWithoutProperties(_ref, _excluded$6);
1645
-
1646
- return /*#__PURE__*/jsxRuntime.jsx(ButtonRoot$2, _objectSpread(_objectSpread({
1647
- ref: ref,
1648
- disabled: disabled,
1649
- "data-active": active,
1650
- "data-disabled": disabled,
1651
- "data-variant": variant,
1652
- "data-full-width": fullWidth
1653
- }, props), {}, {
1654
- children: /*#__PURE__*/jsxRuntime.jsxs(ui.Stack, {
1655
- align: "center",
1656
- space: "xxsmall",
1657
- children: [icon, /*#__PURE__*/jsxRuntime.jsx(core.Typography, {
1658
- variant: "h4",
1659
- color: disabled ? 'inherit' : 'textPrimary',
1660
- children: children
1661
- })]
1662
- })
1663
- }));
1664
- });
1665
- if (process.env.NODE_ENV !== "production") ButtonArea$1.displayName = "ButtonArea";
1666
-
1667
- var _excluded$7 = ["children", "endIcon", "startIcon", "tabIndex", "active", "pending", "disabled", "size", "fullWidth", "variant"],
1668
- _excluded2$3 = ["type"],
1669
- _excluded3$1 = ["href", "target"];
1670
-
1671
- function createButtonVariables$1(size, _ref) {
1672
- var {
1673
- fontSize = size === 'large' ? 16 : 14,
1674
- lineHeight = size === 'large' ? 24 : 20,
1675
- fontSizeMobile = size === 'large' ? 18 : 16,
1676
- lineHeightMobile = size === 'large' ? 28 : 24,
1677
- paddingX = size === 'large' ? 32 : 16,
1678
- paddingY = size === 'large' ? 8 : size === 'small' ? 2 : 6,
1679
- paddingXMobile = size === 'large' ? 64 : 24,
1680
- paddingYMobile = size === 'large' ? 14 : size === 'small' ? 4 : 10,
1681
- textColor = ui.Color.Transparent,
1682
- textColorHovered = textColor,
1683
- textColorDisabled = textColor,
1684
- outlineColor = ui.Color.Transparent,
1685
- borderColor = ui.Color.Transparent,
1686
- borderColorHovered = borderColor,
1687
- borderColorDisabled = borderColor,
1688
- backgroundColor = ui.Color.Transparent,
1689
- backgroundColorHovered = backgroundColor,
1690
- backgroundColorActive = backgroundColorHovered,
1691
- backgroundColorDisabled = backgroundColor
1692
- } = _ref;
1693
- return {
1694
- paddingX,
1695
- paddingY,
1696
- fontSize,
1697
- lineHeight,
1698
- paddingXMobile,
1699
- paddingYMobile,
1700
- fontSizeMobile,
1701
- lineHeightMobile,
1702
- textColor,
1703
- borderColor,
1704
- outlineColor,
1705
- backgroundColor,
1706
- textColorHovered,
1707
- borderColorHovered,
1708
- backgroundColorHovered,
1709
- backgroundColorActive,
1710
- textColorDisabled,
1711
- borderColorDisabled,
1712
- backgroundColorDisabled
1713
- };
1714
- }
1715
-
1716
- function getDefaultVariables$1(size) {
1717
- return createButtonVariables$1(size, {
1718
- textColor: ui.Color.White,
1719
- outlineColor: ui.Color.Blue100,
1720
- backgroundColor: ui.Color.Blue300,
1721
- textColorHovered: ui.Color.White,
1722
- backgroundColorHovered: ui.Color.Blue500,
1723
- backgroundColorActive: ui.Color.Blue400,
1724
- backgroundColorDisabled: ui.Color.Blue100
1725
- });
1726
- }
1727
-
1728
- function getPrimaryVariables$1(size) {
1729
- return getDefaultVariables$1(size);
1730
- }
1731
-
1732
- function getNeutralVariables$1(size) {
1733
- return createButtonVariables$1(size, {
1734
- textColor: ui.Color.Dark500,
1735
- borderColor: ui.Color.Silver500,
1736
- outlineColor: ui.Color.Blue100,
1737
- backgroundColor: ui.Color.White,
1738
- textColorHovered: ui.Color.Blue300,
1739
- borderColorHovered: ui.Color.Blue300,
1740
- backgroundColorHovered: ui.Color.Blue50,
1741
- backgroundColorActive: ui.Color.Blue75,
1742
- textColorDisabled: ui.Color.Silver500
1743
- });
1744
- }
1745
-
1746
- function getCriticalVariables$1(size) {
1747
- return createButtonVariables$1(size, {
1748
- textColor: ui.Color.Red300,
1749
- borderColor: ui.Color.Red300,
1750
- outlineColor: ui.Color.Red75,
1751
- backgroundColor: ui.Color.Red50,
1752
- backgroundColorHovered: ui.Color.Red75,
1753
- backgroundColorActive: ui.Color.Red100,
1754
- textColorDisabled: ui.Color.Red100,
1755
- borderColorDisabled: ui.Color.Red100,
1756
- backgroundColorDisabled: ui.Color.Red50
1757
- });
1758
- }
1759
-
1760
- function getTextVariables$1(size) {
1761
- return createButtonVariables$1(size, {
1762
- textColor: ui.Color.Blue400,
1763
- outlineColor: ui.Color.Blue100,
1764
- textColorHovered: ui.Color.Blue500,
1765
- backgroundColorHovered: ui.Color.Blue50,
1766
- backgroundColorActive: ui.Color.Blue75,
1767
- textColorDisabled: ui.Color.Blue100
1768
- });
1769
- }
1770
-
1771
- function getInvertedVariables$1(size) {
1772
- return createButtonVariables$1(size, {
1773
- textColor: ui.Color.White,
1774
- outlineColor: ui.Color.White40,
1775
- backgroundColor: ui.Color.White20,
1776
- textColorHovered: ui.Color.White,
1777
- backgroundColorHovered: ui.Color.White40,
1778
- backgroundColorActive: ui.Color.White20,
1779
- textColorDisabled: ui.Color.White50,
1780
- backgroundColorDisabled: ui.Color.White08
1781
- });
1782
- }
1783
-
1784
- var ButtonRoot$3 = /*#__PURE__*/styled__default.button.withConfig({
1785
- displayName: "Button__ButtonRoot",
1786
- componentId: "SD__sc-1pwdpe3-0"
1787
- })(_ref2 => {
1788
- var {
1789
- size,
1790
- theme,
1791
- variant,
1792
- fullWidth
1793
- } = _ref2;
1794
- var variables = variant === 'primary' ? getPrimaryVariables$1(size) : variant === 'neutral' ? getNeutralVariables$1(size) : variant === 'critical' ? getCriticalVariables$1(size) : variant === 'text' ? getTextVariables$1(size) : variant === 'inverted' ? getInvertedVariables$1(size) : getDefaultVariables$1(size);
1795
- return styled.css(JSON.parse('["border:0;margin:0;outline:0;position:relative;vertical-align:middle;cursor:pointer;text-decoration:none;&[aria-disabled=\'true\']{cursor:default;pointer-events:none;}-moz-appearance:none;&::-moz-focus-inner{border-style:none;}-webkit-appearance:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;@media print{-webkit-print-color-adjust:exact;}--button-visibility:visible;--button-text-color:",";--button-border-color:",";--button-outline-color:",";--button-background-color:",";--button-padding-x:","px;--button-padding-y:","px;--button-font-size:","px;--button-line-height:","px;","{--button-padding-x:","px;--button-padding-y:","px;--button-font-size:","px;--button-line-height:","px;}&[aria-disabled=\'true\']{--button-text-color:",";--button-border-color:",";--button-background-color:",";&[aria-busy=\'true\']{--button-visibility:hidden;}}&[aria-disabled=\'false\']{&[aria-expanded=\'true\']{--button-text-color:",";--button-border-color:",";--button-background-color:",";}&,&[aria-expanded=\'true\']{&:focus{--button-outline-color:",";}@media (hover:hover) and (pointer:fine){&:hover{--button-text-color:",";--button-border-color:",";--button-background-color:",";}}&:active{--button-background-color:",";}}}display:inline-flex;align-items:center;justify-content:center;min-width:48px;width:",";border-radius:4px;font-family:",";font-weight:",";color:var(--button-text-color);background-color:var(--button-background-color);font-size:var(--button-font-size);line-height:var(--button-line-height);padding:var(--button-padding-y) var(--button-padding-x);box-shadow:inset 0 0 0 1px var(--button-border-color),0 0 0 2px var(--button-outline-color);transition:",";"]'), variables.textColor, variables.borderColor, ui.Color.Transparent, variables.backgroundColor, variables.paddingXMobile, variables.paddingYMobile, variables.fontSizeMobile, variables.lineHeightMobile, theme.breakpoints.up('sm'), variables.paddingX, variables.paddingY, variables.fontSize, variables.lineHeight, variables.textColorDisabled, variables.borderColorDisabled, variables.backgroundColorDisabled, variables.textColorHovered, variables.borderColorHovered, variables.backgroundColorHovered, variables.outlineColor, variables.textColorHovered, variables.borderColorHovered, variables.backgroundColorHovered, variables.backgroundColorActive, fullWidth ? '100%' : 'auto', theme.typography.fontFamily, theme.typography.fontWeightBold, theme.transitions.create(['color', 'box-shadow', 'background-color']));
1796
- });
1797
- var ButtonLabel$1 = /*#__PURE__*/styled__default.span.withConfig({
1798
- displayName: "Button__ButtonLabel",
1799
- componentId: "SD__sc-1pwdpe3-1"
1800
- })(["display:inherit;align-items:inherit;justify-content:inherit;visibility:var(--button-visibility);--mui-svg-icon-size:var(--button-line-height);"]);
1801
- var ButtonStartIcon$1 = /*#__PURE__*/styled__default.span.withConfig({
1802
- displayName: "Button__ButtonStartIcon",
1803
- componentId: "SD__sc-1pwdpe3-2"
1804
- })(["margin-right:4px;"]);
1805
- var ButtonEndIcon$1 = /*#__PURE__*/styled__default.span.withConfig({
1806
- displayName: "Button__ButtonEndIcon",
1807
- componentId: "SD__sc-1pwdpe3-3"
1808
- })(["margin-left:4px;"]);
1809
- var ButtonPendingIndicator$1 = /*#__PURE__*/styled__default.span.withConfig({
1810
- displayName: "Button__ButtonPendingIndicator",
1811
- componentId: "SD__sc-1pwdpe3-4"
1812
- })(["left:50%;display:flex;position:absolute;visibility:visible;transform:translate(-50%);"]);
1813
-
1814
- function useButtonProps$1(_ref3) {
1815
- var {
1816
- children,
1817
- endIcon,
1818
- startIcon,
1819
- tabIndex: tabIndexProp = 0,
1820
- active = false,
1821
- pending = false,
1822
- disabled: disabledProp = false,
1823
- size = 'medium',
1824
- fullWidth = false,
1825
- variant = 'default'
1826
- } = _ref3,
1827
- props = _objectWithoutProperties(_ref3, _excluded$7);
1828
-
1829
- var disabled = pending || disabledProp;
1830
- var tabIndex = disabled ? -1 : tabIndexProp;
1831
- return _objectSpread(_objectSpread({}, props), {}, {
1832
- size,
1833
- variant,
1834
- fullWidth,
1835
- tabIndex,
1836
- disabled,
1837
- 'aria-busy': pending,
1838
- 'aria-expanded': active,
1839
- 'aria-disabled': disabled,
1840
- children: /*#__PURE__*/jsxRuntime.jsxs(ButtonLabel$1, {
1841
- children: [!!startIcon && /*#__PURE__*/jsxRuntime.jsx(ButtonStartIcon$1, {
1842
- children: startIcon
1843
- }), children, !!endIcon && /*#__PURE__*/jsxRuntime.jsx(ButtonEndIcon$1, {
1844
- children: endIcon
1845
- }), pending && /*#__PURE__*/jsxRuntime.jsx(ButtonPendingIndicator$1, {
1846
- children: /*#__PURE__*/jsxRuntime.jsx(core.CircularProgress, {
1847
- size: "1em",
1848
- color: "inherit"
1849
- })
1850
- })]
1851
- })
1852
- });
1853
- }
1854
-
1855
- var Button$1 = /*#__PURE__*/react.forwardRef((_ref4, ref) => {
1856
- var {
1857
- type = 'button'
1858
- } = _ref4,
1859
- props = _objectWithoutProperties(_ref4, _excluded2$3);
1860
-
1861
- var buttonProps = useButtonProps$1(props);
1862
- return /*#__PURE__*/jsxRuntime.jsx(ButtonRoot$3, _objectSpread(_objectSpread({}, buttonProps), {}, {
1863
- ref: ref,
1864
- type: type
1865
- }));
1866
- });
1867
- if (process.env.NODE_ENV !== "production") Button$1.displayName = "Button";
1868
- var AnchorButton$1 = /*#__PURE__*/react.forwardRef((_ref5, ref) => {
1869
- var {
1870
- href,
1871
- target
1872
- } = _ref5,
1873
- props = _objectWithoutProperties(_ref5, _excluded3$1);
1874
-
1875
- var buttonProps = useButtonProps$1(props);
1876
- var rel = target === '_blank' ? 'noopener noreferrer' : undefined;
1877
- return /*#__PURE__*/jsxRuntime.jsx(ButtonRoot$3, _objectSpread(_objectSpread({}, buttonProps), {}, {
1878
- as: "a",
1879
- ref: ref,
1880
- rel: rel,
1881
- href: href,
1882
- target: target
1883
- }));
1884
- });
1885
- if (process.env.NODE_ENV !== "production") AnchorButton$1.displayName = "AnchorButton";
1886
-
1887
- function mergeStyles$1(styles) {
1888
- for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1889
- sources[_key - 1] = arguments[_key];
1890
- }
1891
-
1892
- for (var source of sources) {
1893
- if (source) {
1894
- for (var key in source) {
1895
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1896
- var stylesValue = styles[key];
1897
- var sourceValue = source[key];
1898
-
1899
- if (typeof stylesValue == 'object' && typeof sourceValue == 'object') {
1900
- mergeStyles$1(stylesValue, sourceValue);
1901
- } else {
1902
- styles[key] = source[key];
1903
- }
1904
- }
1905
- }
1906
- }
1907
- }
1908
-
1909
- return styles;
1910
- }
1911
-
1912
- var _excluded$8 = ["variant", "as", "align", "color", "display", "noWrap", "wrapOverflow"];
1913
- var normalizeTextColor$1 = /*#__PURE__*/createRuleNormalizer$1({
1914
- inherit: 'inherit',
1915
- primary: ui.Color.Dark500,
1916
- secondary: ui.Color.Dark200,
1917
- white: ui.Color.White,
1918
- blue: ui.Color.Blue300,
1919
- green: ui.Color.Green300,
1920
- purple: ui.Color.Purple500,
1921
- red: ui.Color.Red300,
1922
- teal: ui.Color.Teal300,
1923
- yellow: ui.Color.Yellow300
1924
- });
1925
- var VARIANT_TYPE_MAPPING$1 = {
1926
- 'heading-1': 'h1',
1927
- 'heading-2': 'h2',
1928
- 'heading-3': 'h3',
1929
- 'heading-4': 'h4',
1930
- 'heading-5': 'h5',
1931
- 'heading-6': 'h6',
1932
- body: 'span',
1933
- 'body-block': 'p',
1934
- 'body-semibold': 'span',
1935
- caption: 'span'
1936
- };
1937
-
1938
- function variantMixin$1(_ref, variant) {
1939
- var {
1940
- typography,
1941
- breakpoints
1942
- } = _ref;
1943
-
1944
- switch (variant) {
1945
- case 'heading-1':
1946
- return typography.h1;
1947
-
1948
- case 'heading-2':
1949
- return typography.h2;
1950
-
1951
- case 'heading-3':
1952
- return typography.h3;
1953
-
1954
- case 'heading-4':
1955
- return typography.h4;
1956
-
1957
- case 'heading-5':
1958
- return typography.h5;
1959
-
1960
- case 'heading-6':
1961
- return typography.h6;
1962
-
1963
- case 'body':
1964
- default:
1965
- return typography.body2;
1966
-
1967
- case 'body-block':
1968
- {
1969
- return mergeStyles$1({}, typography.body2, {
1970
- lineHeight: '24px',
1971
- [breakpoints.only('xs')]: {
1972
- lineHeight: '28px'
1973
- }
1974
- });
1975
- }
1976
-
1977
- case 'body-semibold':
1978
- return typography.body1;
1979
-
1980
- case 'caption':
1981
- return typography.caption;
1982
- }
1983
- }
1984
-
1985
- function textBoxMixin$1(noWrap, align, color, display, wrapOverflow) {
1986
- return styled.css(["text-align:", ";color:", ";display:", ";overflow:", ";white-space:", ";overflow-wrap:", ";"], align, normalizeTextColor$1(color), display === 'initial' && (noWrap || align !== 'left') ? 'block' : display, noWrap ? 'hidden' : 'visible', noWrap ? 'nowrap' : 'normal', wrapOverflow ? 'break-word' : 'normal');
1987
- }
1988
-
1989
- var TextBoxRoot$1 = /*#__PURE__*/styled__default.span.withConfig({
1990
- displayName: "TextBox__TextBoxRoot",
1991
- componentId: "SD__sc-9mywck-0"
1992
- })(_ref2 => {
1993
- var {
1994
- theme,
1995
- $noWrap,
1996
- $variant,
1997
- $align,
1998
- $color,
1999
- $display,
2000
- $wrapOverflow
2001
- } = _ref2;
2002
- return styled.css(["margin:0;padding:0;text-overflow:ellipsis;", ";", ";", "{", ";}", "{", ";}"], variantMixin$1(theme, $variant), textBoxMixin$1($noWrap[0], $align[0], $color[0], $display[0], $wrapOverflow[0]), theme.breakpoints.up('sm'), textBoxMixin$1($noWrap[1], $align[1], $color[1], $display[1], $wrapOverflow[1]), theme.breakpoints.up('md'), textBoxMixin$1($noWrap[2], $align[2], $color[2], $display[2], $wrapOverflow[2]));
2003
- });
2004
- var TextBox$1 = /*#__PURE__*/react.forwardRef((_ref3, ref) => {
2005
- var {
2006
- variant: $variant = 'body',
2007
- as = VARIANT_TYPE_MAPPING$1[$variant],
2008
- align = 'left',
2009
- color = 'primary',
2010
- display = 'initial',
2011
- noWrap = false,
2012
- wrapOverflow = false
2013
- } = _ref3,
2014
- props = _objectWithoutProperties(_ref3, _excluded$8);
2015
-
2016
- var $align = ui.parseResponsiveProp(align);
2017
- var $color = ui.parseResponsiveProp(color);
2018
- var $noWrap = ui.parseResponsiveProp(noWrap);
2019
- var $display = ui.parseResponsiveProp(display);
2020
- var $wrapOverflow = ui.parseResponsiveProp(wrapOverflow);
2021
- return /*#__PURE__*/jsxRuntime.jsx(TextBoxRoot$1, _objectSpread(_objectSpread({}, props), {}, {
2022
- as: as,
2023
- ref: ref,
2024
- $align: $align,
2025
- $color: $color,
2026
- $noWrap: $noWrap,
2027
- $display: $display,
2028
- $variant: $variant,
2029
- $wrapOverflow: $wrapOverflow
2030
- }));
2031
- });
2032
- if (process.env.NODE_ENV !== "production") TextBox$1.displayName = "TextBox";
2033
-
2034
- function descriptionItemIconMixin$1(size) {
2035
- return styled.css(["width:", "px;height:", "px;& > .MuiSvgIcon-root{font-size:", "px;}"], size, size + 4, size);
2036
- }
2037
-
2038
- var DescriptionItemIcon$1 = /*#__PURE__*/styled__default.div.withConfig({
2039
- displayName: "DescriptionItem__DescriptionItemIcon",
2040
- componentId: "SD__sc-1906hic-0"
2041
- })(_ref => {
2042
- var {
2043
- theme
2044
- } = _ref;
2045
- return styled.css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], ui.Color.Dark100, descriptionItemIconMixin$1(20), theme.breakpoints.up('sm'), descriptionItemIconMixin$1(16));
2046
- });
2047
- var DescriptionItem$1 = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
2048
- var {
2049
- icon,
2050
- wrap,
2051
- inset,
2052
- label,
2053
- children,
2054
- fallback,
2055
- id: idProp,
2056
- 'aria-label': ariaLabel
2057
- } = _ref2;
2058
- var id = ui.useUID(idProp);
2059
- var labelID = "".concat(id, "-label");
2060
- var isEmptyChildren = ui.isEmptyReactNode(children);
2061
- return /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
2062
- id: id,
2063
- ref: ref,
2064
- space: "xsmall",
2065
- "aria-label": ariaLabel,
2066
- children: [!!(icon || inset) && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2067
- width: "content",
2068
- children: /*#__PURE__*/jsxRuntime.jsx(DescriptionItemIcon$1, {
2069
- children: icon
2070
- })
2071
- }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2072
- width: "adaptive",
2073
- children: /*#__PURE__*/jsxRuntime.jsxs(ui.Inline, {
2074
- space: "xxsmall",
2075
- noWrap: !wrap,
2076
- children: [!!label && /*#__PURE__*/jsxRuntime.jsx(TextBox$1, {
2077
- as: "label",
2078
- id: labelID,
2079
- color: "secondary",
2080
- children: label
2081
- }), /*#__PURE__*/jsxRuntime.jsx(TextBox$1, {
2082
- as: "div",
2083
- noWrap: !wrap,
2084
- wrapOverflow: !!wrap,
2085
- "aria-labelledby": label == null ? undefined : labelID,
2086
- color: isEmptyChildren && label == null ? 'secondary' : 'primary',
2087
- children: isEmptyChildren ? fallback : children
2088
- })]
2089
- })
2090
- })]
2091
- });
2092
- });
2093
- if (process.env.NODE_ENV !== "production") DescriptionItem$1.displayName = "DescriptionItem";
2094
-
2095
- var _excluded$9 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
2096
- function toBytes$1(input, unit) {
2097
- if (unit === 'gb') return input * (1 << 30);
2098
- if (unit === 'mb') return input * (1 << 20);
2099
- return input * (1 << 10);
2100
- }
2101
- var KILOBYTE$1 = 1024;
2102
- var BYTE_UNITS$1 = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
2103
- function formatBytes$1(bytes) {
2104
- if (bytes === 0) return '0 Bytes';
2105
- var unitIndex = Math.floor(Math.log(bytes) / Math.log(KILOBYTE$1));
2106
- var unit = BYTE_UNITS$1[unitIndex];
2107
- return "".concat((bytes / Math.pow(KILOBYTE$1, unitIndex)).toFixed(2), " ").concat(unit);
2108
- }
2109
- var StyledCardButton$1 = /*#__PURE__*/styled__default(ui.CardButton).withConfig({
2110
- displayName: "FileDropZone__StyledCardButton",
2111
- componentId: "SD__sc-5p1fk0-0"
2112
- })(_ref => {
2113
- var {
2114
- status
2115
- } = _ref;
2116
- return {
2117
- backgroundColor: status === 'active' ? ui.Color.Blue50 : undefined
2118
- };
2119
- });
2120
-
2121
- function UploadRejection$1(_ref2) {
2122
- var {
2123
- maxSize,
2124
- rejection
2125
- } = _ref2;
2126
- var [error] = rejection.errors;
2127
- if (!error) return null;
2128
- return /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
2129
- align: "center",
2130
- children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2131
- width: "content",
2132
- children: /*#__PURE__*/jsxRuntime.jsx(icons.Error, {})
2133
- }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2134
- children: error.code === 'file-too-large' ? maxSize == null ? 'Attachment size is too large' : "Attachment size should be less than ".concat(formatBytes$1(maxSize)) : error.message
2135
- })]
2136
- });
2137
- }
2138
-
2139
- var FileDropZone$1 = /*#__PURE__*/react.forwardRef((props, ref) => {
2140
- var {
2141
- // CardButton
2142
- disabled = false,
2143
- children: _children = 'Upload Attachments',
2144
- hintText = 'or Drag & Drop files',
2145
- startIcon = /*#__PURE__*/jsxRuntime.jsx(core.SvgIcon, {
2146
- children: /*#__PURE__*/jsxRuntime.jsx("path", {
2147
- d: js.mdiUpload
2148
- })
2149
- }),
2150
- fallback = /*#__PURE__*/jsxRuntime.jsx(ui.CardButton, {
2151
- ref: ref,
2152
- disabled: true,
2153
- startIcon: /*#__PURE__*/jsxRuntime.jsx(core.CircularProgress, {
2154
- size: "1em",
2155
- color: "inherit"
2156
- }),
2157
- children: "Loading dependencies\u2026"
2158
- }),
2159
- // Dropzone
2160
- accept,
2161
- maxSize = Infinity,
2162
- maxFiles = Infinity,
2163
- onDropRejected: _onDropRejected,
2164
- onDropAccepted: _onDropAccepted
2165
- } = props,
2166
- dropzoneProps = _objectWithoutProperties(props, _excluded$9);
2167
-
2168
- return /*#__PURE__*/jsxRuntime.jsx(react.Suspense, {
2169
- fallback: fallback,
2170
- children: /*#__PURE__*/jsxRuntime.jsx(Dropzone, _objectSpread(_objectSpread({}, dropzoneProps), {}, {
2171
- accept: accept,
2172
- maxSize: maxSize,
2173
- maxFiles: maxFiles,
2174
- disabled: disabled,
2175
- onDropAccepted: files => {
2176
- _onDropAccepted === null || _onDropAccepted === void 0 ? void 0 : _onDropAccepted(files);
2177
- },
2178
- onDropRejected: fileRejections => {
2179
- _onDropRejected === null || _onDropRejected === void 0 ? void 0 : _onDropRejected(fileRejections);
2180
- },
2181
- children: _ref3 => {
2182
- var {
2183
- isDragActive,
2184
- isDragReject,
2185
- getRootProps,
2186
- getInputProps,
2187
- fileRejections: [fileRejection]
2188
- } = _ref3;
2189
- return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2190
- children: [/*#__PURE__*/jsxRuntime.jsx("input", _objectSpread({}, getInputProps())), /*#__PURE__*/jsxRuntime.jsx(StyledCardButton$1, _objectSpread(_objectSpread({}, getRootProps()), {}, {
2191
- ref: ref,
2192
- hint: hintText,
2193
- disabled: disabled,
2194
- startIcon: startIcon,
2195
- status: isDragActive ? 'active' : isDragReject ? 'error' : 'idle',
2196
- error: !!fileRejection && /*#__PURE__*/jsxRuntime.jsx(UploadRejection$1, {
2197
- accept: accept,
2198
- maxSize: maxSize,
2199
- rejection: fileRejection
2200
- }),
2201
- children: _children
2202
- }))]
2203
- });
2204
- }
2205
- }))
2206
- });
2207
- });
2208
- if (process.env.NODE_ENV !== "production") FileDropZone$1.displayName = "FileDropZone";
2209
-
2210
- var FileListItemName$1 = /*#__PURE__*/styled__default.div.withConfig({
2211
- displayName: "FileListItem__FileListItemName",
2212
- componentId: "SD__sc-hxbsiy-0"
2213
- })(["overflow:hidden;line-height:22px;white-space:nowrap;text-overflow:ellipsis;"]);
2214
- var FileListItemProgress$1 = /*#__PURE__*/styled__default(core.CircularProgress).withConfig({
2215
- displayName: "FileListItem__FileListItemProgress",
2216
- componentId: "SD__sc-hxbsiy-1"
2217
- })(["font-size:24px;", "{font-size:14px;}"], _ref => {
2218
- var {
2219
- theme
2220
- } = _ref;
2221
- return theme.breakpoints.up('sm');
2222
- });
2223
- var PdfIcon$1 = /*#__PURE__*/react.memo(props => /*#__PURE__*/jsxRuntime.jsx(core.SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
2224
- children: /*#__PURE__*/jsxRuntime.jsx("path", {
2225
- d: js.mdiFilePdfBox
2226
- })
2227
- })));
2228
- var TextBoxIcon$1 = /*#__PURE__*/react.memo(props => /*#__PURE__*/jsxRuntime.jsx(core.SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
2229
- children: /*#__PURE__*/jsxRuntime.jsx("path", {
2230
- d: js.mdiTextBox
2231
- })
2232
- })));
2233
- var PDF_FILE_PATTERN$1 = /\.pdf$/;
2234
- var IMAGE_FILE_PATTERN$1 = /\.(gif|png|jpg|jpeg)$/;
2235
-
2236
- function getFileType$1(name) {
2237
- if (PDF_FILE_PATTERN$1.exec(name)) return 'pdf';
2238
- if (IMAGE_FILE_PATTERN$1.exec(name)) return 'image';
2239
- return 'unknown';
2240
- }
2241
-
2242
- var FileListItem$1 = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
2243
- var {
2244
- url,
2245
- name,
2246
- status,
2247
- onRetry,
2248
- onDelete
2249
- } = _ref2;
2250
- var uid = ui.useUID();
2251
- var fileType = getFileType$1(name);
2252
- var [isHoveredState, setIsHovered] = react.useState(false);
2253
- var isHovered = ui.useResponsiveValue(true, isHoveredState);
2254
- return /*#__PURE__*/jsxRuntime.jsx("div", {
2255
- ref: ref,
2256
- onMouseOver: () => {
2257
- setIsHovered(true);
2258
- },
2259
- onMouseLeave: () => {
2260
- setIsHovered(false);
2261
- },
2262
- children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
2263
- align: "center",
2264
- space: "xsmall",
2265
- children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2266
- width: "content",
2267
- children: status === 'error' ? /*#__PURE__*/jsxRuntime.jsx(icons.Error, {
2268
- color: "error",
2269
- fontSize: "small"
2270
- }) : fileType === 'pdf' ? /*#__PURE__*/jsxRuntime.jsx(PdfIcon$1, {
2271
- color: "action",
2272
- fontSize: "small"
2273
- }) : fileType === 'image' ? /*#__PURE__*/jsxRuntime.jsx(icons.Image, {
2274
- color: "action",
2275
- fontSize: "small"
2276
- }) : /*#__PURE__*/jsxRuntime.jsx(TextBoxIcon$1, {
2277
- color: "action",
2278
- fontSize: "small"
2279
- })
2280
- }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2281
- width: "fluid",
2282
- children: /*#__PURE__*/jsxRuntime.jsx(FileListItemName$1, {
2283
- id: uid,
2284
- children: !url ? name : /*#__PURE__*/jsxRuntime.jsx(core.Link, {
2285
- href: url,
2286
- noWrap: true,
2287
- target: "_blank",
2288
- rel: "noopener noreferrer",
2289
- children: name
2290
- })
2291
- })
2292
- }), status === 'error' && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2293
- width: "content",
2294
- children: /*#__PURE__*/jsxRuntime.jsx(core.Tooltip, {
2295
- title: "Retry",
2296
- children: /*#__PURE__*/jsxRuntime.jsx(core.IconButton, {
2297
- size: "small",
2298
- onClick: onRetry,
2299
- children: /*#__PURE__*/jsxRuntime.jsx(icons.Refresh, {
2300
- fontSize: "small"
2301
- })
2302
- })
2303
- })
2304
- }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2305
- width: "content",
2306
- children: status === 'loading' ? /*#__PURE__*/jsxRuntime.jsx(core.IconButton, {
2307
- size: "small",
2308
- disabled: true,
2309
- children: /*#__PURE__*/jsxRuntime.jsx(FileListItemProgress$1, {
2310
- size: "1em"
2311
- })
2312
- }) : /*#__PURE__*/jsxRuntime.jsx(core.Tooltip, {
2313
- title: "Delete",
2314
- children: /*#__PURE__*/jsxRuntime.jsx(core.IconButton, {
2315
- size: "small",
2316
- onClick: onDelete,
2317
- children: !isHovered && status === 'success' ? /*#__PURE__*/jsxRuntime.jsx(icons.CheckCircle, {
2318
- fontSize: "small",
2319
- htmlColor: ui.Color.Green300
2320
- }) : /*#__PURE__*/jsxRuntime.jsx(icons.Delete, {
2321
- fontSize: "small"
2322
- })
2323
- })
2324
- })
2325
- })]
2326
- })
2327
- });
2328
- });
2329
- if (process.env.NODE_ENV !== "production") FileListItem$1.displayName = "FileListItem";
2330
-
2331
- var SidebarRoot$1 = /*#__PURE__*/styled__default.aside.withConfig({
2332
- displayName: "Sidebar__SidebarRoot",
2333
- componentId: "SD__sc-b77o22-0"
2334
- })(["top:0;position:sticky;overflow-y:auto;overflow-x:hidden;width:240px;height:100vh;background-color:", ";border-right:1px solid ", ";"], ui.Color.White, ui.Color.Silver400);
2335
- var SidebarHeader$1 = /*#__PURE__*/styled__default.div.withConfig({
2336
- displayName: "Sidebar__SidebarHeader",
2337
- componentId: "SD__sc-b77o22-1"
2338
- })(["top:0;z-index:1;position:sticky;padding-left:24px;padding-right:24px;padding-bottom:8px;background-color:", ";"], ui.Color.White);
2339
- var SidebarTitle$1 = /*#__PURE__*/styled__default.div.withConfig({
2340
- displayName: "Sidebar__SidebarTitle",
2341
- componentId: "SD__sc-b77o22-2"
2342
- })(["height:64px;max-height:64px;display:flex;align-items:center;"]);
2343
- var Sidebar$1 = /*#__PURE__*/react.forwardRef((_ref, ref) => {
2344
- var {
2345
- title,
2346
- count,
2347
- header,
2348
- children,
2349
- id: idProp
2350
- } = _ref;
2351
- var id = ui.useUID(idProp);
2352
- var titleID = "".concat(id, "-title");
2353
- return /*#__PURE__*/jsxRuntime.jsxs(SidebarRoot$1, {
2354
- id: id,
2355
- ref: ref,
2356
- children: [/*#__PURE__*/jsxRuntime.jsxs(SidebarHeader$1, {
2357
- children: [/*#__PURE__*/jsxRuntime.jsx(SidebarTitle$1, {
2358
- children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
2359
- space: "xsmall",
2360
- align: "center",
2361
- children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2362
- width: "fluid",
2363
- children: /*#__PURE__*/jsxRuntime.jsx(TextBox$1, {
2364
- variant: "heading-2",
2365
- noWrap: true,
2366
- id: titleID,
2367
- children: title
2368
- })
2369
- }), !!count && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2370
- width: "content",
2371
- children: /*#__PURE__*/jsxRuntime.jsx(TextBox$1, {
2372
- color: "secondary",
2373
- children: count
2374
- })
2375
- })]
2376
- })
2377
- }), header]
2378
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
2379
- "aria-labelledby": titleID,
2380
- children: children
2381
- })]
2382
- });
2383
- });
2384
- if (process.env.NODE_ENV !== "production") Sidebar$1.displayName = "Sidebar";
2385
-
2386
- var SidebarContainerRoot$1 = /*#__PURE__*/styled__default.div.withConfig({
2387
- displayName: "SidebarContainer__SidebarContainerRoot",
2388
- componentId: "SD__sc-uibj1m-0"
2389
- })(["display:flex;height:inherit;max-height:inherit;min-height:inherit;"]);
2390
- var SidebarContainerContent$1 = /*#__PURE__*/styled__default.div.withConfig({
2391
- displayName: "SidebarContainer__SidebarContainerContent",
2392
- componentId: "SD__sc-uibj1m-1"
2393
- })(["height:inherit;max-height:inherit;min-height:inherit;width:calc(100% - 240px);min-width:calc(100% - 240px);max-width:calc(100% - 240px);"]);
2394
- var SidebarContainer$1 = /*#__PURE__*/react.forwardRef((_ref, ref) => {
2395
- var {
2396
- sidebar,
2397
- children
2398
- } = _ref;
2399
- return /*#__PURE__*/jsxRuntime.jsxs(SidebarContainerRoot$1, {
2400
- ref: ref,
2401
- children: [sidebar, /*#__PURE__*/jsxRuntime.jsx(SidebarContainerContent$1, {
2402
- children: children
2403
- })]
2404
- });
2405
- });
2406
- if (process.env.NODE_ENV !== "production") SidebarContainer$1.displayName = "SidebarContainer";
2407
-
2408
- var SidebarDividerRoot$1 = /*#__PURE__*/styled__default.div.withConfig({
2409
- displayName: "SidebarDivider__SidebarDividerRoot",
2410
- componentId: "SD__sc-5lwi2i-0"
2411
- })(["padding:20px 24px;"]);
2412
- var SidebarDivider$1 = /*#__PURE__*/react.forwardRef((_, ref) => {
2413
- return /*#__PURE__*/jsxRuntime.jsx(SidebarDividerRoot$1, {
2414
- ref: ref,
2415
- children: /*#__PURE__*/jsxRuntime.jsx(core.Divider, {})
2416
- });
2417
- });
2418
- if (process.env.NODE_ENV !== "production") SidebarDivider$1.displayName = "SidebarDivider";
2419
-
2420
- var context$1 = /*#__PURE__*/react.createContext({});
2421
- function useSidebarMenuItemContext$1() {
2422
- return react.useContext(context$1);
2423
- }
2424
- function SidebarMenuItemContextProvider$1(_ref) {
2425
- var {
2426
- children,
2427
- hovered = false,
2428
- disabled = false
2429
- } = _ref;
2430
- var ctx = react.useMemo(() => ({
2431
- hovered,
2432
- disabled
2433
- }), [hovered, disabled]);
2434
- return /*#__PURE__*/jsxRuntime.jsx(context$1.Provider, {
2435
- value: ctx,
2436
- children: children
2437
- });
2438
- }
2439
-
2440
- var SidebarMenuItemRoot$1 = /*#__PURE__*/styled__default.div.withConfig({
2441
- displayName: "SidebarMenuItem__SidebarMenuItemRoot",
2442
- componentId: "SD__sc-1sb5zqa-0"
2443
- })(_ref => {
2444
- var {
2445
- hasAvatar
2446
- } = _ref;
2447
- var height = hasAvatar ? 48 : 40;
2448
- return styled.css(["position:relative;& > .MuiButtonBase-root{width:100%;display:flex;justify-content:flex-start;padding-left:24px;padding-right:24px;height:", "px;max-height:", "px;&[aria-current='true']{background-color:", ";box-shadow:inset 4px 0 0 ", ";}}"], height, height, ui.Color.Silver200, ui.Color.Blue300);
2449
- });
2450
- var SidebarMenuItemBadge$1 = /*#__PURE__*/styled__default.div.withConfig({
2451
- displayName: "SidebarMenuItem__SidebarMenuItemBadge",
2452
- componentId: "SD__sc-1sb5zqa-1"
2453
- })(["font-size:12px;line-height:16px;padding-left:4px;padding-right:4px;border-radius:100px;color:", ";background-color:", ";.MuiButtonBase-root[aria-current='true'] &{color:", ";background-color:", ";}"], ui.Color.Dark500, ui.Color.Silver300, ui.Color.White, ui.Color.Dark450);
2454
- var SidebarMenuItemSecondaryAction$1 = /*#__PURE__*/styled__default.div.withConfig({
2455
- displayName: "SidebarMenuItem__SidebarMenuItemSecondaryAction",
2456
- componentId: "SD__sc-1sb5zqa-2"
2457
- })(["top:50%;right:24px;position:absolute;transform:translate3d(0,-50%,0);"]);
2458
- var SidebarMenuItem$1 = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
2459
- var {
2460
- action,
2461
- avatar,
2462
- onClick,
2463
- external,
2464
- children,
2465
- disabled,
2466
- selected,
2467
- secondaryActions,
2468
- badge: badgeProp
2469
- } = _ref2;
2470
- var [hovered, setHovered] = react.useState(false);
2471
- var actionsRef = react.useRef(null);
2472
- var actionsPlaceholderRef = react.useRef(null);
2473
- react.useLayoutEffect(() => {
2474
- if (actionsRef.current && actionsPlaceholderRef.current) {
2475
- actionsPlaceholderRef.current.style.width = "".concat(Math.max(0, actionsRef.current.offsetWidth - 8), "px");
2476
- }
2477
- });
2478
- var badge = !badgeProp || !Number.isFinite(badgeProp) ? null : badgeProp > 999 ? '999+' : badgeProp;
2479
- return /*#__PURE__*/jsxRuntime.jsxs(SidebarMenuItemRoot$1, {
2480
- ref: ref,
2481
- hasAvatar: !!avatar,
2482
- onMouseEnter: () => {
2483
- setHovered(true);
2484
- },
2485
- onMouseLeave: () => {
2486
- setHovered(false);
2487
- },
2488
- children: [/*#__PURE__*/jsxRuntime.jsx(core.ButtonBase, {
2489
- onClick: onClick,
2490
- disabled: disabled,
2491
- "aria-current": selected,
2492
- children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
2493
- align: "center",
2494
- space: "xsmall",
2495
- children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2496
- children: /*#__PURE__*/jsxRuntime.jsx(ui.Columns, {
2497
- align: "center",
2498
- space: "xsmall",
2499
- children: /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2500
- width: "fluid",
2501
- children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
2502
- align: "center",
2503
- space: "xsmall",
2504
- children: [!!avatar && /*#__PURE__*/jsxRuntime.jsx(SidebarMenuItemContextProvider$1, {
2505
- hovered: hovered,
2506
- disabled: disabled,
2507
- children: /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2508
- width: "content",
2509
- children: avatar
2510
- })
2511
- }), /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2512
- width: "adaptive",
2513
- children: /*#__PURE__*/jsxRuntime.jsx(TextBox$1, {
2514
- variant: selected ? 'body-semibold' : 'body',
2515
- noWrap: true,
2516
- children: children
2517
- })
2518
- }), external && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2519
- width: "content",
2520
- children: /*#__PURE__*/jsxRuntime.jsx(icons.OpenInNew, {
2521
- color: "action",
2522
- fontSize: "small"
2523
- })
2524
- })]
2525
- })
2526
- })
2527
- })
2528
- }), !!badge && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2529
- width: "content",
2530
- children: /*#__PURE__*/jsxRuntime.jsx(SidebarMenuItemBadge$1, {
2531
- children: badge
2532
- })
2533
- }), (!!action || !!secondaryActions) && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2534
- width: "content",
2535
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
2536
- ref: actionsPlaceholderRef
2537
- })
2538
- })]
2539
- })
2540
- }), (!!action || !!secondaryActions) && /*#__PURE__*/jsxRuntime.jsx(SidebarMenuItemSecondaryAction$1, {
2541
- ref: actionsRef,
2542
- children: /*#__PURE__*/jsxRuntime.jsxs(ui.Inline, {
2543
- children: [hovered && secondaryActions, action]
2544
- })
2545
- })]
2546
- });
2547
- });
2548
- if (process.env.NODE_ENV !== "production") SidebarMenuItem$1.displayName = "SidebarMenuItem";
2549
-
2550
- var SidebarMenuItemActionRoot$1 = /*#__PURE__*/styled__default(core.IconButton).withConfig({
2551
- displayName: "SidebarMenuItemAction__SidebarMenuItemActionRoot",
2552
- componentId: "SD__sc-1n50gmv-0"
2553
- })(["& .MuiSvgIcon-root{font-size:16px;}"]);
2554
- var SidebarMenuItemAction$1 = /*#__PURE__*/react.forwardRef((_ref, ref) => {
2555
- var {
2556
- title,
2557
- placement,
2558
- children
2559
- } = _ref;
2560
- return /*#__PURE__*/jsxRuntime.jsx(core.Tooltip, {
2561
- title: title,
2562
- placement: placement,
2563
- children: /*#__PURE__*/jsxRuntime.jsx(SidebarMenuItemActionRoot$1, {
2564
- ref: ref,
2565
- size: "small",
2566
- edge: "end",
2567
- children: children
2568
- })
2569
- });
2570
- });
2571
- if (process.env.NODE_ENV !== "production") SidebarMenuItemAction$1.displayName = "SidebarMenuItemAction";
2572
-
2573
- function stopPropagation$1(event) {
2574
- event.stopPropagation();
2575
- }
2576
-
2577
- var SidebarMenuItemAvatarCheckbox$1 = /*#__PURE__*/styled__default.div.withConfig({
2578
- displayName: "SidebarMenuItemAvatar__SidebarMenuItemAvatarCheckbox",
2579
- componentId: "SD__sc-17mkvc7-0"
2580
- })(["margin:-5px;"]);
2581
- var SidebarMenuItemAvatar$1 = /*#__PURE__*/react.forwardRef((_ref, ref) => {
2582
- var {
2583
- children,
2584
- value,
2585
- onChange: _onChange
2586
- } = _ref;
2587
- var {
2588
- hovered,
2589
- disabled
2590
- } = useSidebarMenuItemContext$1();
2591
- var initials = react.useMemo(() => {
2592
- var matches = children.match(/\b\w/g) || [];
2593
- var first = matches.shift() || '';
2594
- var last = matches.pop() || '';
2595
- return (first + last).toUpperCase();
2596
- }, [children]);
2597
-
2598
- if (value === true || hovered && value != null) {
2599
- return /*#__PURE__*/jsxRuntime.jsx(SidebarMenuItemAvatarCheckbox$1, {
2600
- children: /*#__PURE__*/jsxRuntime.jsx(core.Checkbox, {
2601
- color: "primary",
2602
- checked: value,
2603
- disabled: disabled,
2604
- onMouseDown: stopPropagation$1,
2605
- onTouchStart: stopPropagation$1,
2606
- onChange: (_, checked) => {
2607
- _onChange === null || _onChange === void 0 ? void 0 : _onChange(checked);
2608
- }
2609
- })
2610
- });
2611
- }
2612
-
2613
- return /*#__PURE__*/jsxRuntime.jsx(core.Avatar, {
2614
- ref: ref,
2615
- "aria-hidden": true,
2616
- children: initials
2617
- });
2618
- });
2619
- if (process.env.NODE_ENV !== "production") SidebarMenuItemAvatar$1.displayName = "SidebarMenuItemAvatar";
2620
-
2621
- var SidebarSubheaderRoot$1 = /*#__PURE__*/styled__default.div.withConfig({
2622
- displayName: "SidebarSubheader__SidebarSubheaderRoot",
2623
- componentId: "SD__sc-1r0xx76-0"
2624
- })(["display:flex;align-items:center;height:40px;max-height:40px;padding-left:24px;padding-right:24px;"]);
2625
- var SidebarSubheader$1 = /*#__PURE__*/react.forwardRef((_ref, ref) => {
2626
- var {
2627
- id,
2628
- action,
2629
- children
2630
- } = _ref;
2631
- return /*#__PURE__*/jsxRuntime.jsx(SidebarSubheaderRoot$1, {
2632
- ref: ref,
2633
- children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
2634
- space: "xsmall",
2635
- align: "center",
2636
- children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2637
- children: /*#__PURE__*/jsxRuntime.jsx(TextBox$1, {
2638
- id: id,
2639
- variant: "heading-6",
2640
- color: "secondary",
2641
- noWrap: true,
2642
- children: children
2643
- })
2644
- }), !!action && /*#__PURE__*/jsxRuntime.jsx(ui.Column, {
2645
- width: "content",
2646
- children: action
2647
- })]
2648
- })
2649
- });
2650
- });
2651
- if (process.env.NODE_ENV !== "production") SidebarSubheader$1.displayName = "SidebarSubheader";
2652
-
2653
- exports.Alert = Alert$1;
2654
- exports.AnchorButton = AnchorButton$1;
2655
- exports.Banner = Banner$1;
2656
- exports.Box = Box$1;
2657
- exports.Button = Button$1;
2658
- exports.ButtonArea = ButtonArea$1;
2659
- exports.DescriptionItem = DescriptionItem$1;
2660
- exports.FileDropZone = FileDropZone$1;
2661
- exports.FileListItem = FileListItem$1;
2662
- exports.Sidebar = Sidebar$1;
2663
- exports.SidebarContainer = SidebarContainer$1;
2664
- exports.SidebarDivider = SidebarDivider$1;
2665
- exports.SidebarMenuItem = SidebarMenuItem$1;
2666
- exports.SidebarMenuItemAction = SidebarMenuItemAction$1;
2667
- exports.SidebarMenuItemAvatar = SidebarMenuItemAvatar$1;
2668
- exports.SidebarSubheader = SidebarSubheader$1;
2669
- exports.TextBox = TextBox$1;
2670
- exports.formatBytes = formatBytes$1;
2671
- exports.toBytes = toBytes$1;
2672
- exports.v5 = index;
1297
+ exports.Alert = Alert;
1298
+ exports.AnchorButton = AnchorButton;
1299
+ exports.Banner = Banner;
1300
+ exports.Box = Box;
1301
+ exports.Button = Button;
1302
+ exports.ButtonArea = ButtonArea;
1303
+ exports.DescriptionItem = DescriptionItem;
1304
+ exports.FileDropZone = FileDropZone;
1305
+ exports.FileListItem = FileListItem;
1306
+ exports.Sidebar = Sidebar;
1307
+ exports.SidebarContainer = SidebarContainer;
1308
+ exports.SidebarDivider = SidebarDivider;
1309
+ exports.SidebarMenuItem = SidebarMenuItem;
1310
+ exports.SidebarMenuItemAction = SidebarMenuItemAction;
1311
+ exports.SidebarMenuItemAvatar = SidebarMenuItemAvatar;
1312
+ exports.SidebarSubheader = SidebarSubheader;
1313
+ exports.TextBox = TextBox;
1314
+ exports.formatBytes = formatBytes;
1315
+ exports.toBytes = toBytes;
2673
1316
  //# sourceMappingURL=index.js.map