@superdispatch/ui-lab 0.10.4 → 0.13.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.
@@ -216,7 +216,44 @@ var Box = /*#__PURE__*/styled__default.div.withConfig({
216
216
  return styles;
217
217
  });
218
218
 
219
- var _excluded = ["children", "endIcon", "startIcon", "tabIndex", "active", "pending", "disabled", "size", "fullWidth", "variant"],
219
+ var _excluded = ["icon", "children", "variant", "active", "disabled", "fullWidth"];
220
+ var ButtonRoot = /*#__PURE__*/styled__default(core.ButtonBase).withConfig({
221
+ displayName: "ButtonArea__ButtonRoot",
222
+ componentId: "SD__sc-1czum63-0"
223
+ })(["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);
224
+ var ButtonArea = /*#__PURE__*/react.forwardRef((_ref, ref) => {
225
+ var {
226
+ icon,
227
+ children,
228
+ variant,
229
+ active,
230
+ disabled,
231
+ fullWidth
232
+ } = _ref,
233
+ props = _objectWithoutProperties(_ref, _excluded);
234
+
235
+ return /*#__PURE__*/jsxRuntime.jsx(ButtonRoot, _objectSpread(_objectSpread({
236
+ ref: ref,
237
+ disabled: disabled,
238
+ "data-active": active,
239
+ "data-disabled": disabled,
240
+ "data-variant": variant,
241
+ "data-full-width": fullWidth
242
+ }, props), {}, {
243
+ children: /*#__PURE__*/jsxRuntime.jsxs(ui.Stack, {
244
+ align: "center",
245
+ space: "xxsmall",
246
+ children: [icon, /*#__PURE__*/jsxRuntime.jsx(core.Typography, {
247
+ variant: "h4",
248
+ color: disabled ? 'inherit' : 'textPrimary',
249
+ children: children
250
+ })]
251
+ })
252
+ }));
253
+ });
254
+ if (process.env.NODE_ENV !== "production") ButtonArea.displayName = "ButtonArea";
255
+
256
+ var _excluded$1 = ["children", "endIcon", "startIcon", "tabIndex", "active", "pending", "disabled", "size", "fullWidth", "variant"],
220
257
  _excluded2 = ["type"],
221
258
  _excluded3 = ["href", "target"];
222
259
 
@@ -283,7 +320,7 @@ function getPrimaryVariables(size) {
283
320
 
284
321
  function getNeutralVariables(size) {
285
322
  return createButtonVariables(size, {
286
- textColor: ui.Color.Grey500,
323
+ textColor: ui.Color.Dark500,
287
324
  borderColor: ui.Color.Silver500,
288
325
  outlineColor: ui.Color.Blue100,
289
326
  backgroundColor: ui.Color.White,
@@ -333,7 +370,7 @@ function getInvertedVariables(size) {
333
370
  });
334
371
  }
335
372
 
336
- var ButtonRoot = /*#__PURE__*/styled__default.button.withConfig({
373
+ var ButtonRoot$1 = /*#__PURE__*/styled__default.button.withConfig({
337
374
  displayName: "Button__ButtonRoot",
338
375
  componentId: "SD__sc-1pwdpe3-0"
339
376
  })(_ref2 => {
@@ -376,7 +413,7 @@ function useButtonProps(_ref3) {
376
413
  fullWidth = false,
377
414
  variant = 'default'
378
415
  } = _ref3,
379
- props = _objectWithoutProperties(_ref3, _excluded);
416
+ props = _objectWithoutProperties(_ref3, _excluded$1);
380
417
 
381
418
  var disabled = pending || disabledProp;
382
419
  var tabIndex = disabled ? -1 : tabIndexProp;
@@ -411,7 +448,7 @@ var Button = /*#__PURE__*/react.forwardRef((_ref4, ref) => {
411
448
  props = _objectWithoutProperties(_ref4, _excluded2);
412
449
 
413
450
  var buttonProps = useButtonProps(props);
414
- return /*#__PURE__*/jsxRuntime.jsx(ButtonRoot, _objectSpread(_objectSpread({}, buttonProps), {}, {
451
+ return /*#__PURE__*/jsxRuntime.jsx(ButtonRoot$1, _objectSpread(_objectSpread({}, buttonProps), {}, {
415
452
  ref: ref,
416
453
  type: type
417
454
  }));
@@ -426,9 +463,8 @@ var AnchorButton = /*#__PURE__*/react.forwardRef((_ref5, ref) => {
426
463
 
427
464
  var buttonProps = useButtonProps(props);
428
465
  var rel = target === '_blank' ? 'noopener noreferrer' : undefined;
429
- return /*#__PURE__*/jsxRuntime.jsx(ButtonRoot, _objectSpread(_objectSpread({}, buttonProps), {}, {
430
- as: "a" // @ts-expect-error Issue somewhere in `react` or `styled-components` types.
431
- ,
466
+ return /*#__PURE__*/jsxRuntime.jsx(ButtonRoot$1, _objectSpread(_objectSpread({}, buttonProps), {}, {
467
+ as: "a",
432
468
  ref: ref,
433
469
  rel: rel,
434
470
  href: href,
@@ -462,10 +498,10 @@ function mergeStyles(styles) {
462
498
  return styles;
463
499
  }
464
500
 
465
- var _excluded$1 = ["variant", "as", "align", "color", "display", "noWrap", "wrapOverflow"];
501
+ var _excluded$2 = ["variant", "as", "align", "color", "display", "noWrap", "wrapOverflow"];
466
502
  var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
467
- primary: ui.Color.Grey500,
468
- secondary: ui.Color.Grey200,
503
+ primary: ui.Color.Dark500,
504
+ secondary: ui.Color.Dark200,
469
505
  white: ui.Color.White,
470
506
  blue: ui.Color.Blue300,
471
507
  green: ui.Color.Green300,
@@ -563,7 +599,7 @@ var TextBox = /*#__PURE__*/react.forwardRef((_ref3, ref) => {
563
599
  noWrap = false,
564
600
  wrapOverflow = false
565
601
  } = _ref3,
566
- props = _objectWithoutProperties(_ref3, _excluded$1);
602
+ props = _objectWithoutProperties(_ref3, _excluded$2);
567
603
 
568
604
  var $align = ui.parseResponsiveProp(align);
569
605
  var $color = ui.parseResponsiveProp(color);
@@ -594,7 +630,7 @@ var DescriptionItemIcon = /*#__PURE__*/styled__default.div.withConfig({
594
630
  var {
595
631
  theme
596
632
  } = _ref;
597
- return styled.css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], ui.Color.Grey100, descriptionItemIconMixin(20), theme.breakpoints.up('sm'), descriptionItemIconMixin(16));
633
+ return styled.css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], ui.Color.Dark100, descriptionItemIconMixin(20), theme.breakpoints.up('sm'), descriptionItemIconMixin(16));
598
634
  });
599
635
  var DescriptionItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
600
636
  var {
@@ -644,7 +680,7 @@ var DescriptionItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
644
680
  });
645
681
  if (process.env.NODE_ENV !== "production") DescriptionItem.displayName = "DescriptionItem";
646
682
 
647
- var _excluded$2 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
683
+ var _excluded$3 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
648
684
  function toBytes(input, unit) {
649
685
  if (unit === 'gb') return input * (1 << 30);
650
686
  if (unit === 'mb') return input * (1 << 20);
@@ -715,7 +751,7 @@ var FileDropZone = /*#__PURE__*/react.forwardRef((props, ref) => {
715
751
  onDropRejected: _onDropRejected,
716
752
  onDropAccepted: _onDropAccepted
717
753
  } = props,
718
- dropzoneProps = _objectWithoutProperties(props, _excluded$2);
754
+ dropzoneProps = _objectWithoutProperties(props, _excluded$3);
719
755
 
720
756
  return /*#__PURE__*/jsxRuntime.jsx(react.Suspense, {
721
757
  fallback: fallback,
@@ -774,7 +810,7 @@ var FileListItemProgress = /*#__PURE__*/styled__default(core.CircularProgress).w
774
810
  });
775
811
  var PdfIcon = /*#__PURE__*/react.memo(props => /*#__PURE__*/jsxRuntime.jsx(core.SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
776
812
  children: /*#__PURE__*/jsxRuntime.jsx("path", {
777
- d: js.mdiPdfBox
813
+ d: js.mdiFilePdfBox
778
814
  })
779
815
  })));
780
816
  var TextBoxIcon = /*#__PURE__*/react.memo(props => /*#__PURE__*/jsxRuntime.jsx(core.SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
@@ -1002,7 +1038,7 @@ var SidebarMenuItemRoot = /*#__PURE__*/styled__default.div.withConfig({
1002
1038
  var SidebarMenuItemBadge = /*#__PURE__*/styled__default.div.withConfig({
1003
1039
  displayName: "SidebarMenuItem__SidebarMenuItemBadge",
1004
1040
  componentId: "SD__sc-1sb5zqa-1"
1005
- })(["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.Grey500, ui.Color.Silver300, ui.Color.White, ui.Color.Grey450);
1041
+ })(["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);
1006
1042
  var SidebarMenuItemSecondaryAction = /*#__PURE__*/styled__default.div.withConfig({
1007
1043
  displayName: "SidebarMenuItem__SidebarMenuItemSecondaryAction",
1008
1044
  componentId: "SD__sc-1sb5zqa-2"
@@ -1205,6 +1241,7 @@ exports.Alert = Alert;
1205
1241
  exports.AnchorButton = AnchorButton;
1206
1242
  exports.Box = Box;
1207
1243
  exports.Button = Button;
1244
+ exports.ButtonArea = ButtonArea;
1208
1245
  exports.DescriptionItem = DescriptionItem;
1209
1246
  exports.FileDropZone = FileDropZone;
1210
1247
  exports.FileListItem = FileListItem;