@superdispatch/ui-lab 0.10.5 → 0.14.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.
- package/dist-node/index.js +57 -18
- package/dist-node/index.js.map +1 -1
- package/dist-src/button/Button.js +2 -3
- package/dist-src/button-area/ButtonArea.js +44 -0
- package/dist-src/description-item/DescriptionItem.js +1 -1
- package/dist-src/file-list-item/FileListItem.js +2 -2
- package/dist-src/index.js +1 -0
- package/dist-src/sidebar/SidebarMenuItem.js +1 -1
- package/dist-src/sidebar/SidebarSubheader.js +2 -1
- package/dist-src/text-box/TextBox.js +3 -2
- package/dist-types/index.d.ts +12 -3
- package/dist-web/index.js +60 -22
- package/dist-web/index.js.map +1 -1
- package/package.json +3 -3
package/dist-node/index.js
CHANGED
|
@@ -216,7 +216,44 @@ var Box = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
216
216
|
return styles;
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
-
var _excluded = ["
|
|
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.
|
|
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"
|
|
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,11 @@ function mergeStyles(styles) {
|
|
|
462
498
|
return styles;
|
|
463
499
|
}
|
|
464
500
|
|
|
465
|
-
var _excluded$
|
|
501
|
+
var _excluded$2 = ["variant", "as", "align", "color", "display", "noWrap", "wrapOverflow"];
|
|
466
502
|
var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
|
|
467
|
-
|
|
468
|
-
|
|
503
|
+
inherit: 'inherit',
|
|
504
|
+
primary: ui.Color.Dark500,
|
|
505
|
+
secondary: ui.Color.Dark200,
|
|
469
506
|
white: ui.Color.White,
|
|
470
507
|
blue: ui.Color.Blue300,
|
|
471
508
|
green: ui.Color.Green300,
|
|
@@ -563,7 +600,7 @@ var TextBox = /*#__PURE__*/react.forwardRef((_ref3, ref) => {
|
|
|
563
600
|
noWrap = false,
|
|
564
601
|
wrapOverflow = false
|
|
565
602
|
} = _ref3,
|
|
566
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
603
|
+
props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
567
604
|
|
|
568
605
|
var $align = ui.parseResponsiveProp(align);
|
|
569
606
|
var $color = ui.parseResponsiveProp(color);
|
|
@@ -594,7 +631,7 @@ var DescriptionItemIcon = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
594
631
|
var {
|
|
595
632
|
theme
|
|
596
633
|
} = _ref;
|
|
597
|
-
return styled.css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], ui.Color.
|
|
634
|
+
return styled.css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], ui.Color.Dark100, descriptionItemIconMixin(20), theme.breakpoints.up('sm'), descriptionItemIconMixin(16));
|
|
598
635
|
});
|
|
599
636
|
var DescriptionItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
|
|
600
637
|
var {
|
|
@@ -644,7 +681,7 @@ var DescriptionItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
|
|
|
644
681
|
});
|
|
645
682
|
if (process.env.NODE_ENV !== "production") DescriptionItem.displayName = "DescriptionItem";
|
|
646
683
|
|
|
647
|
-
var _excluded$
|
|
684
|
+
var _excluded$3 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
|
|
648
685
|
function toBytes(input, unit) {
|
|
649
686
|
if (unit === 'gb') return input * (1 << 30);
|
|
650
687
|
if (unit === 'mb') return input * (1 << 20);
|
|
@@ -715,7 +752,7 @@ var FileDropZone = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
|
715
752
|
onDropRejected: _onDropRejected,
|
|
716
753
|
onDropAccepted: _onDropAccepted
|
|
717
754
|
} = props,
|
|
718
|
-
dropzoneProps = _objectWithoutProperties(props, _excluded$
|
|
755
|
+
dropzoneProps = _objectWithoutProperties(props, _excluded$3);
|
|
719
756
|
|
|
720
757
|
return /*#__PURE__*/jsxRuntime.jsx(react.Suspense, {
|
|
721
758
|
fallback: fallback,
|
|
@@ -774,7 +811,7 @@ var FileListItemProgress = /*#__PURE__*/styled__default(core.CircularProgress).w
|
|
|
774
811
|
});
|
|
775
812
|
var PdfIcon = /*#__PURE__*/react.memo(props => /*#__PURE__*/jsxRuntime.jsx(core.SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
776
813
|
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
777
|
-
d: js.
|
|
814
|
+
d: js.mdiFilePdfBox
|
|
778
815
|
})
|
|
779
816
|
})));
|
|
780
817
|
var TextBoxIcon = /*#__PURE__*/react.memo(props => /*#__PURE__*/jsxRuntime.jsx(core.SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -1002,7 +1039,7 @@ var SidebarMenuItemRoot = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
1002
1039
|
var SidebarMenuItemBadge = /*#__PURE__*/styled__default.div.withConfig({
|
|
1003
1040
|
displayName: "SidebarMenuItem__SidebarMenuItemBadge",
|
|
1004
1041
|
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.
|
|
1042
|
+
})(["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
1043
|
var SidebarMenuItemSecondaryAction = /*#__PURE__*/styled__default.div.withConfig({
|
|
1007
1044
|
displayName: "SidebarMenuItem__SidebarMenuItemSecondaryAction",
|
|
1008
1045
|
componentId: "SD__sc-1sb5zqa-2"
|
|
@@ -1173,7 +1210,7 @@ if (process.env.NODE_ENV !== "production") SidebarMenuItemAvatar.displayName = "
|
|
|
1173
1210
|
var SidebarSubheaderRoot = /*#__PURE__*/styled__default.div.withConfig({
|
|
1174
1211
|
displayName: "SidebarSubheader__SidebarSubheaderRoot",
|
|
1175
1212
|
componentId: "SD__sc-1r0xx76-0"
|
|
1176
|
-
})(["height:40px;max-height:40px;padding-left:24px;padding-right:24px;"]);
|
|
1213
|
+
})(["display:flex;align-items:center;height:40px;max-height:40px;padding-left:24px;padding-right:24px;"]);
|
|
1177
1214
|
var SidebarSubheader = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
1178
1215
|
var {
|
|
1179
1216
|
id,
|
|
@@ -1184,6 +1221,7 @@ var SidebarSubheader = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
1184
1221
|
ref: ref,
|
|
1185
1222
|
children: /*#__PURE__*/jsxRuntime.jsxs(ui.Columns, {
|
|
1186
1223
|
space: "xsmall",
|
|
1224
|
+
align: "center",
|
|
1187
1225
|
children: [/*#__PURE__*/jsxRuntime.jsx(ui.Column, {
|
|
1188
1226
|
children: /*#__PURE__*/jsxRuntime.jsx(TextBox, {
|
|
1189
1227
|
id: id,
|
|
@@ -1205,6 +1243,7 @@ exports.Alert = Alert;
|
|
|
1205
1243
|
exports.AnchorButton = AnchorButton;
|
|
1206
1244
|
exports.Box = Box;
|
|
1207
1245
|
exports.Button = Button;
|
|
1246
|
+
exports.ButtonArea = ButtonArea;
|
|
1208
1247
|
exports.DescriptionItem = DescriptionItem;
|
|
1209
1248
|
exports.FileDropZone = FileDropZone;
|
|
1210
1249
|
exports.FileListItem = FileListItem;
|