@superdispatch/ui-lab 0.11.0 → 0.15.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 +77 -20
- package/dist-node/index.js.map +1 -1
- package/dist-src/banner/Banner.js +61 -0
- package/dist-src/button/Button.js +2 -3
- package/dist-src/button-area/ButtonArea.js +1 -1
- 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 -2
- package/dist-web/index.js +80 -24
- package/dist-web/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -73,7 +73,7 @@ function getPrimaryVariables(size) {
|
|
|
73
73
|
|
|
74
74
|
function getNeutralVariables(size) {
|
|
75
75
|
return createButtonVariables(size, {
|
|
76
|
-
textColor: Color.
|
|
76
|
+
textColor: Color.Dark500,
|
|
77
77
|
borderColor: Color.Silver500,
|
|
78
78
|
outlineColor: Color.Blue100,
|
|
79
79
|
backgroundColor: Color.White,
|
|
@@ -217,8 +217,7 @@ export var AnchorButton = /*#__PURE__*/forwardRef((_ref5, ref) => {
|
|
|
217
217
|
var buttonProps = useButtonProps(props);
|
|
218
218
|
var rel = target === '_blank' ? 'noopener noreferrer' : undefined;
|
|
219
219
|
return /*#__PURE__*/_jsx(ButtonRoot, _objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
220
|
-
as: "a"
|
|
221
|
-
,
|
|
220
|
+
as: "a",
|
|
222
221
|
ref: ref,
|
|
223
222
|
rel: rel,
|
|
224
223
|
href: href,
|
|
@@ -10,7 +10,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
var ButtonRoot = /*#__PURE__*/styled(ButtonBase).withConfig({
|
|
11
11
|
displayName: "ButtonArea__ButtonRoot",
|
|
12
12
|
componentId: "SD__sc-1czum63-0"
|
|
13
|
-
})(["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.Silver500, Color.
|
|
13
|
+
})(["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.Silver500, Color.Dark100, Color.White, Color.Silver500, Color.Silver400, Color.Green300, Color.Green100, Color.Green300, Color.Green300, Color.Green300, Color.Green50, Color.Red300, Color.Red100, Color.Red300, Color.Red300, Color.Red300, Color.Red50);
|
|
14
14
|
export var ButtonArea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
15
15
|
var {
|
|
16
16
|
icon,
|
|
@@ -16,7 +16,7 @@ var DescriptionItemIcon = /*#__PURE__*/styled.div.withConfig({
|
|
|
16
16
|
var {
|
|
17
17
|
theme
|
|
18
18
|
} = _ref;
|
|
19
|
-
return css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], Color.
|
|
19
|
+
return css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], Color.Dark100, descriptionItemIconMixin(20), theme.breakpoints.up('sm'), descriptionItemIconMixin(16));
|
|
20
20
|
});
|
|
21
21
|
export var DescriptionItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
22
22
|
var {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import { CircularProgress, IconButton, Link, SvgIcon, Tooltip } from '@material-ui/core';
|
|
3
3
|
import { CheckCircle, Delete, Error, Image, Refresh } from '@material-ui/icons';
|
|
4
|
-
import {
|
|
4
|
+
import { mdiFilePdfBox, mdiTextBox } from '@mdi/js';
|
|
5
5
|
import { Color, Column, Columns, useResponsiveValue, useUID } from '@superdispatch/ui';
|
|
6
6
|
import { forwardRef, memo, useState } from 'react';
|
|
7
7
|
import styled from 'styled-components';
|
|
@@ -22,7 +22,7 @@ var FileListItemProgress = /*#__PURE__*/styled(CircularProgress).withConfig({
|
|
|
22
22
|
});
|
|
23
23
|
var PdfIcon = /*#__PURE__*/memo(props => /*#__PURE__*/_jsx(SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
24
24
|
children: /*#__PURE__*/_jsx("path", {
|
|
25
|
-
d:
|
|
25
|
+
d: mdiFilePdfBox
|
|
26
26
|
})
|
|
27
27
|
})));
|
|
28
28
|
var TextBoxIcon = /*#__PURE__*/memo(props => /*#__PURE__*/_jsx(SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
|
package/dist-src/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var SidebarMenuItemRoot = /*#__PURE__*/styled.div.withConfig({
|
|
|
20
20
|
var SidebarMenuItemBadge = /*#__PURE__*/styled.div.withConfig({
|
|
21
21
|
displayName: "SidebarMenuItem__SidebarMenuItemBadge",
|
|
22
22
|
componentId: "SD__sc-1sb5zqa-1"
|
|
23
|
-
})(["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.
|
|
23
|
+
})(["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.Dark500, Color.Silver300, Color.White, Color.Dark450);
|
|
24
24
|
var SidebarMenuItemSecondaryAction = /*#__PURE__*/styled.div.withConfig({
|
|
25
25
|
displayName: "SidebarMenuItem__SidebarMenuItemSecondaryAction",
|
|
26
26
|
componentId: "SD__sc-1sb5zqa-2"
|
|
@@ -7,7 +7,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
var SidebarSubheaderRoot = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "SidebarSubheader__SidebarSubheaderRoot",
|
|
9
9
|
componentId: "SD__sc-1r0xx76-0"
|
|
10
|
-
})(["height:40px;max-height:40px;padding-left:24px;padding-right:24px;"]);
|
|
10
|
+
})(["display:flex;align-items:center;height:40px;max-height:40px;padding-left:24px;padding-right:24px;"]);
|
|
11
11
|
export var SidebarSubheader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
12
|
var {
|
|
13
13
|
id,
|
|
@@ -18,6 +18,7 @@ export var SidebarSubheader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
18
18
|
ref: ref,
|
|
19
19
|
children: /*#__PURE__*/_jsxs(Columns, {
|
|
20
20
|
space: "xsmall",
|
|
21
|
+
align: "center",
|
|
21
22
|
children: [/*#__PURE__*/_jsx(Column, {
|
|
22
23
|
children: /*#__PURE__*/_jsx(TextBox, {
|
|
23
24
|
id: id,
|
|
@@ -8,8 +8,9 @@ import { mergeStyles } from "../utils/mergeStyles.js";
|
|
|
8
8
|
import { createRuleNormalizer } from "../utils/RuleNormalizer.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
inherit: 'inherit',
|
|
12
|
+
primary: Color.Dark500,
|
|
13
|
+
secondary: Color.Dark200,
|
|
13
14
|
white: Color.White,
|
|
14
15
|
blue: Color.Blue300,
|
|
15
16
|
green: Color.Green300,
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ReactNode, ForwardRefExoticComponent, RefAttributes, Ref, AriaAttributes, MouseEventHandler, FocusEventHandler, ReactChild, MouseEvent, ReactElement } from 'react';
|
|
3
|
+
import { CSSTransition } from 'react-transition-group';
|
|
4
|
+
import { CSSTransitionProps } from 'react-transition-group/CSSTransition';
|
|
3
5
|
import { SpaceProp, NegativeSpaceProp, ResponsiveProp, ColorProp } from '@superdispatch/ui';
|
|
4
6
|
import { Property } from 'csstype';
|
|
5
7
|
import { ButtonBaseProps, TooltipProps } from '@material-ui/core';
|
|
@@ -13,6 +15,14 @@ interface AlertProps {
|
|
|
13
15
|
}
|
|
14
16
|
declare const Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>>;
|
|
15
17
|
|
|
18
|
+
declare type BorderPlacement = 'top' | 'bottom';
|
|
19
|
+
declare type CustomerTransitionProps = CSSTransitionProps<HTMLDivElement> & {
|
|
20
|
+
className?: string;
|
|
21
|
+
border?: BorderPlacement;
|
|
22
|
+
};
|
|
23
|
+
declare type BannerProps = Omit<CustomerTransitionProps, 'timeout' | 'className' | 'classNames'>;
|
|
24
|
+
declare const Banner: ForwardRefExoticComponent<Pick<BannerProps, string | number> & RefAttributes<CSSTransition<HTMLDivElement>>>;
|
|
25
|
+
|
|
16
26
|
declare type MarginProp = 'auto' | SpaceProp | NegativeSpaceProp;
|
|
17
27
|
declare type BorderRadiusProp = 'none' | 'small';
|
|
18
28
|
declare type BorderWidthProp = 'none' | 'small' | 'medium' | 'large';
|
|
@@ -197,7 +207,7 @@ interface SidebarSubheaderProps {
|
|
|
197
207
|
declare const SidebarSubheader: ForwardRefExoticComponent<SidebarSubheaderProps & RefAttributes<HTMLDivElement>>;
|
|
198
208
|
|
|
199
209
|
declare type TextAlignProp = 'left' | 'right' | 'center';
|
|
200
|
-
declare type TextColorProp = 'primary' | 'secondary' | 'white' | 'blue' | 'green' | 'purple' | 'red' | 'teal' | 'yellow';
|
|
210
|
+
declare type TextColorProp = 'inherit' | 'primary' | 'secondary' | 'white' | 'blue' | 'green' | 'purple' | 'red' | 'teal' | 'yellow';
|
|
201
211
|
declare type TextDisplayProp = 'none' | 'block' | 'inline' | 'initial' | 'inherit';
|
|
202
212
|
declare type TextVariantProp = 'heading-1' | 'heading-2' | 'heading-3' | 'heading-4' | 'heading-5' | 'heading-6' | 'body' | 'body-block' | 'body-semibold' | 'caption';
|
|
203
213
|
interface TextBoxProps {
|
|
@@ -216,4 +226,4 @@ interface TextBoxProps {
|
|
|
216
226
|
}
|
|
217
227
|
declare const TextBox: ForwardRefExoticComponent<TextBoxProps & RefAttributes<HTMLElement>>;
|
|
218
228
|
|
|
219
|
-
export { Alert, AlertProps, AlertSeverityProp, AnchorButton, AnchorButtonProps, BorderRadiusProp, BorderWidthProp, Box, BoxProps, Button, ButtonArea, ButtonAreaProps, ButtonProps, ButtonSizeProp, ButtonVariantProp, DescriptionItem, DescriptionItemProps, FileDropZone, FileDropZoneProps, FileListItem, FileListItemProps, MarginProp, Sidebar, SidebarContainer, SidebarContainerProps, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemActionProps, SidebarMenuItemAvatar, SidebarMenuItemAvatarProps, SidebarMenuItemProps, SidebarProps, SidebarSubheader, SidebarSubheaderProps, TextAlignProp, TextBox, TextBoxProps, TextColorProp, TextDisplayProp, TextVariantProp, formatBytes, toBytes };
|
|
229
|
+
export { Alert, AlertProps, AlertSeverityProp, AnchorButton, AnchorButtonProps, Banner, BorderRadiusProp, BorderWidthProp, Box, BoxProps, Button, ButtonArea, ButtonAreaProps, ButtonProps, ButtonSizeProp, ButtonVariantProp, DescriptionItem, DescriptionItemProps, FileDropZone, FileDropZoneProps, FileListItem, FileListItemProps, MarginProp, Sidebar, SidebarContainer, SidebarContainerProps, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemActionProps, SidebarMenuItemAvatar, SidebarMenuItemAvatarProps, SidebarMenuItemProps, SidebarProps, SidebarSubheader, SidebarSubheaderProps, TextAlignProp, TextBox, TextBoxProps, TextColorProp, TextDisplayProp, TextVariantProp, formatBytes, toBytes };
|
package/dist-web/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { CheckCircle, Info, Error, Image, Refresh, Delete, OpenInNew } from '@material-ui/icons';
|
|
2
2
|
import { Alert as Alert$1 } from '@material-ui/lab';
|
|
3
3
|
import { Color, parseResponsiveProp, isColorProp, parseSpaceProp, Stack, useUID, isEmptyReactNode, Columns, Column, Inline, CardButton, useResponsiveValue } from '@superdispatch/ui';
|
|
4
|
-
import { forwardRef,
|
|
5
|
-
import styled, { css } from 'styled-components';
|
|
4
|
+
import { forwardRef, useState, useEffect, Suspense, memo, useContext, createContext, useMemo, useRef, useLayoutEffect } from 'react';
|
|
5
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
8
8
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
9
|
+
import { CSSTransition } from 'react-transition-group';
|
|
9
10
|
import { ButtonBase, Typography, CircularProgress, SvgIcon, Link, Tooltip, IconButton, Divider, Checkbox, Avatar } from '@material-ui/core';
|
|
10
|
-
import { mdiUpload,
|
|
11
|
+
import { mdiUpload, mdiFilePdfBox, mdiTextBox } from '@mdi/js';
|
|
11
12
|
import Dropzone from 'react-dropzone';
|
|
12
13
|
|
|
13
14
|
function colorMixin(textColor, backgroundColor, buttonHoverColor) {
|
|
@@ -47,6 +48,60 @@ var Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
47
48
|
});
|
|
48
49
|
if (process.env.NODE_ENV !== "production") Alert.displayName = "Alert";
|
|
49
50
|
|
|
51
|
+
var _excluded = ["children"],
|
|
52
|
+
_excluded2 = ["in"];
|
|
53
|
+
|
|
54
|
+
function enterMixin(border) {
|
|
55
|
+
return css(["min-height:56px;color:", ";background-color:", ";border-", ":1px #dfe3e8 solid;"], Color.Dark500, Color.White, border);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function enterAnimation(border) {
|
|
59
|
+
return keyframes(["0%{min-height:0;color:", ";background-color:", ";}50%{min-height:56px;color:", ";background-color:", ";}70%{min-height:56px;color:", ";background-color:", ";}100%{", "}"], Color.White, Color.Dark500, Color.White, Color.Dark500, Color.White, Color.Dark500, enterMixin(border));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
var CustomTransition = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
63
|
+
var {
|
|
64
|
+
children
|
|
65
|
+
} = _ref,
|
|
66
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
67
|
+
|
|
68
|
+
return /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, props), {}, {
|
|
69
|
+
ref: ref,
|
|
70
|
+
timeout: 3000,
|
|
71
|
+
classNames: props.className,
|
|
72
|
+
children: /*#__PURE__*/jsx("div", {
|
|
73
|
+
children: children
|
|
74
|
+
})
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
if (process.env.NODE_ENV !== "production") CustomTransition.displayName = "CustomTransition";
|
|
78
|
+
var BannerContent = /*#__PURE__*/styled(CustomTransition).withConfig({
|
|
79
|
+
displayName: "Banner__BannerContent",
|
|
80
|
+
componentId: "SD__sc-9kw31n-0"
|
|
81
|
+
})(_ref2 => {
|
|
82
|
+
var {
|
|
83
|
+
border = 'bottom'
|
|
84
|
+
} = _ref2;
|
|
85
|
+
return 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;}"], Color.White, Color.White, enterAnimation(border), enterMixin(border), enterMixin(border));
|
|
86
|
+
});
|
|
87
|
+
var Banner = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
88
|
+
var {
|
|
89
|
+
in: inProp
|
|
90
|
+
} = _ref3,
|
|
91
|
+
props = _objectWithoutProperties(_ref3, _excluded2);
|
|
92
|
+
|
|
93
|
+
var [isIn, setIn] = useState(false); // transition is not triggered on initial render with `in: true`
|
|
94
|
+
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
setIn(!!inProp);
|
|
97
|
+
}, [inProp]);
|
|
98
|
+
return /*#__PURE__*/jsx(BannerContent, _objectSpread({
|
|
99
|
+
ref: ref,
|
|
100
|
+
in: isIn
|
|
101
|
+
}, props));
|
|
102
|
+
});
|
|
103
|
+
if (process.env.NODE_ENV !== "production") Banner.displayName = "Banner";
|
|
104
|
+
|
|
50
105
|
function createRuleNormalizer(rules) {
|
|
51
106
|
return input => {
|
|
52
107
|
if (typeof input == 'string') {
|
|
@@ -209,11 +264,11 @@ var Box = /*#__PURE__*/styled.div.withConfig({
|
|
|
209
264
|
return styles;
|
|
210
265
|
});
|
|
211
266
|
|
|
212
|
-
var _excluded = ["icon", "children", "variant", "active", "disabled", "fullWidth"];
|
|
267
|
+
var _excluded$1 = ["icon", "children", "variant", "active", "disabled", "fullWidth"];
|
|
213
268
|
var ButtonRoot = /*#__PURE__*/styled(ButtonBase).withConfig({
|
|
214
269
|
displayName: "ButtonArea__ButtonRoot",
|
|
215
270
|
componentId: "SD__sc-1czum63-0"
|
|
216
|
-
})(["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.Silver500, Color.
|
|
271
|
+
})(["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.Silver500, Color.Dark100, Color.White, Color.Silver500, Color.Silver400, Color.Green300, Color.Green100, Color.Green300, Color.Green300, Color.Green300, Color.Green50, Color.Red300, Color.Red100, Color.Red300, Color.Red300, Color.Red300, Color.Red50);
|
|
217
272
|
var ButtonArea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
218
273
|
var {
|
|
219
274
|
icon,
|
|
@@ -223,7 +278,7 @@ var ButtonArea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
223
278
|
disabled,
|
|
224
279
|
fullWidth
|
|
225
280
|
} = _ref,
|
|
226
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
281
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
227
282
|
|
|
228
283
|
return /*#__PURE__*/jsx(ButtonRoot, _objectSpread(_objectSpread({
|
|
229
284
|
ref: ref,
|
|
@@ -246,8 +301,8 @@ var ButtonArea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
246
301
|
});
|
|
247
302
|
if (process.env.NODE_ENV !== "production") ButtonArea.displayName = "ButtonArea";
|
|
248
303
|
|
|
249
|
-
var _excluded$
|
|
250
|
-
_excluded2 = ["type"],
|
|
304
|
+
var _excluded$2 = ["children", "endIcon", "startIcon", "tabIndex", "active", "pending", "disabled", "size", "fullWidth", "variant"],
|
|
305
|
+
_excluded2$1 = ["type"],
|
|
251
306
|
_excluded3 = ["href", "target"];
|
|
252
307
|
|
|
253
308
|
function createButtonVariables(size, _ref) {
|
|
@@ -313,7 +368,7 @@ function getPrimaryVariables(size) {
|
|
|
313
368
|
|
|
314
369
|
function getNeutralVariables(size) {
|
|
315
370
|
return createButtonVariables(size, {
|
|
316
|
-
textColor: Color.
|
|
371
|
+
textColor: Color.Dark500,
|
|
317
372
|
borderColor: Color.Silver500,
|
|
318
373
|
outlineColor: Color.Blue100,
|
|
319
374
|
backgroundColor: Color.White,
|
|
@@ -406,7 +461,7 @@ function useButtonProps(_ref3) {
|
|
|
406
461
|
fullWidth = false,
|
|
407
462
|
variant = 'default'
|
|
408
463
|
} = _ref3,
|
|
409
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
464
|
+
props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
410
465
|
|
|
411
466
|
var disabled = pending || disabledProp;
|
|
412
467
|
var tabIndex = disabled ? -1 : tabIndexProp;
|
|
@@ -438,7 +493,7 @@ var Button = /*#__PURE__*/forwardRef((_ref4, ref) => {
|
|
|
438
493
|
var {
|
|
439
494
|
type = 'button'
|
|
440
495
|
} = _ref4,
|
|
441
|
-
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
496
|
+
props = _objectWithoutProperties(_ref4, _excluded2$1);
|
|
442
497
|
|
|
443
498
|
var buttonProps = useButtonProps(props);
|
|
444
499
|
return /*#__PURE__*/jsx(ButtonRoot$1, _objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
@@ -457,8 +512,7 @@ var AnchorButton = /*#__PURE__*/forwardRef((_ref5, ref) => {
|
|
|
457
512
|
var buttonProps = useButtonProps(props);
|
|
458
513
|
var rel = target === '_blank' ? 'noopener noreferrer' : undefined;
|
|
459
514
|
return /*#__PURE__*/jsx(ButtonRoot$1, _objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
460
|
-
as: "a"
|
|
461
|
-
,
|
|
515
|
+
as: "a",
|
|
462
516
|
ref: ref,
|
|
463
517
|
rel: rel,
|
|
464
518
|
href: href,
|
|
@@ -492,10 +546,11 @@ function mergeStyles(styles) {
|
|
|
492
546
|
return styles;
|
|
493
547
|
}
|
|
494
548
|
|
|
495
|
-
var _excluded$
|
|
549
|
+
var _excluded$3 = ["variant", "as", "align", "color", "display", "noWrap", "wrapOverflow"];
|
|
496
550
|
var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
|
|
497
|
-
|
|
498
|
-
|
|
551
|
+
inherit: 'inherit',
|
|
552
|
+
primary: Color.Dark500,
|
|
553
|
+
secondary: Color.Dark200,
|
|
499
554
|
white: Color.White,
|
|
500
555
|
blue: Color.Blue300,
|
|
501
556
|
green: Color.Green300,
|
|
@@ -593,7 +648,7 @@ var TextBox = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
593
648
|
noWrap = false,
|
|
594
649
|
wrapOverflow = false
|
|
595
650
|
} = _ref3,
|
|
596
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
651
|
+
props = _objectWithoutProperties(_ref3, _excluded$3);
|
|
597
652
|
|
|
598
653
|
var $align = parseResponsiveProp(align);
|
|
599
654
|
var $color = parseResponsiveProp(color);
|
|
@@ -624,7 +679,7 @@ var DescriptionItemIcon = /*#__PURE__*/styled.div.withConfig({
|
|
|
624
679
|
var {
|
|
625
680
|
theme
|
|
626
681
|
} = _ref;
|
|
627
|
-
return css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], Color.
|
|
682
|
+
return css(["display:flex;align-items:center;& > .MuiSvgIcon-root{color:", ";}", ";", "{", ";}"], Color.Dark100, descriptionItemIconMixin(20), theme.breakpoints.up('sm'), descriptionItemIconMixin(16));
|
|
628
683
|
});
|
|
629
684
|
var DescriptionItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
630
685
|
var {
|
|
@@ -674,7 +729,7 @@ var DescriptionItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
674
729
|
});
|
|
675
730
|
if (process.env.NODE_ENV !== "production") DescriptionItem.displayName = "DescriptionItem";
|
|
676
731
|
|
|
677
|
-
var _excluded$
|
|
732
|
+
var _excluded$4 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
|
|
678
733
|
function toBytes(input, unit) {
|
|
679
734
|
if (unit === 'gb') return input * (1 << 30);
|
|
680
735
|
if (unit === 'mb') return input * (1 << 20);
|
|
@@ -745,7 +800,7 @@ var FileDropZone = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
745
800
|
onDropRejected: _onDropRejected,
|
|
746
801
|
onDropAccepted: _onDropAccepted
|
|
747
802
|
} = props,
|
|
748
|
-
dropzoneProps = _objectWithoutProperties(props, _excluded$
|
|
803
|
+
dropzoneProps = _objectWithoutProperties(props, _excluded$4);
|
|
749
804
|
|
|
750
805
|
return /*#__PURE__*/jsx(Suspense, {
|
|
751
806
|
fallback: fallback,
|
|
@@ -804,7 +859,7 @@ var FileListItemProgress = /*#__PURE__*/styled(CircularProgress).withConfig({
|
|
|
804
859
|
});
|
|
805
860
|
var PdfIcon = /*#__PURE__*/memo(props => /*#__PURE__*/jsx(SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
806
861
|
children: /*#__PURE__*/jsx("path", {
|
|
807
|
-
d:
|
|
862
|
+
d: mdiFilePdfBox
|
|
808
863
|
})
|
|
809
864
|
})));
|
|
810
865
|
var TextBoxIcon = /*#__PURE__*/memo(props => /*#__PURE__*/jsx(SvgIcon, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -1032,7 +1087,7 @@ var SidebarMenuItemRoot = /*#__PURE__*/styled.div.withConfig({
|
|
|
1032
1087
|
var SidebarMenuItemBadge = /*#__PURE__*/styled.div.withConfig({
|
|
1033
1088
|
displayName: "SidebarMenuItem__SidebarMenuItemBadge",
|
|
1034
1089
|
componentId: "SD__sc-1sb5zqa-1"
|
|
1035
|
-
})(["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.
|
|
1090
|
+
})(["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.Dark500, Color.Silver300, Color.White, Color.Dark450);
|
|
1036
1091
|
var SidebarMenuItemSecondaryAction = /*#__PURE__*/styled.div.withConfig({
|
|
1037
1092
|
displayName: "SidebarMenuItem__SidebarMenuItemSecondaryAction",
|
|
1038
1093
|
componentId: "SD__sc-1sb5zqa-2"
|
|
@@ -1203,7 +1258,7 @@ if (process.env.NODE_ENV !== "production") SidebarMenuItemAvatar.displayName = "
|
|
|
1203
1258
|
var SidebarSubheaderRoot = /*#__PURE__*/styled.div.withConfig({
|
|
1204
1259
|
displayName: "SidebarSubheader__SidebarSubheaderRoot",
|
|
1205
1260
|
componentId: "SD__sc-1r0xx76-0"
|
|
1206
|
-
})(["height:40px;max-height:40px;padding-left:24px;padding-right:24px;"]);
|
|
1261
|
+
})(["display:flex;align-items:center;height:40px;max-height:40px;padding-left:24px;padding-right:24px;"]);
|
|
1207
1262
|
var SidebarSubheader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1208
1263
|
var {
|
|
1209
1264
|
id,
|
|
@@ -1214,6 +1269,7 @@ var SidebarSubheader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1214
1269
|
ref: ref,
|
|
1215
1270
|
children: /*#__PURE__*/jsxs(Columns, {
|
|
1216
1271
|
space: "xsmall",
|
|
1272
|
+
align: "center",
|
|
1217
1273
|
children: [/*#__PURE__*/jsx(Column, {
|
|
1218
1274
|
children: /*#__PURE__*/jsx(TextBox, {
|
|
1219
1275
|
id: id,
|
|
@@ -1231,5 +1287,5 @@ var SidebarSubheader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1231
1287
|
});
|
|
1232
1288
|
if (process.env.NODE_ENV !== "production") SidebarSubheader.displayName = "SidebarSubheader";
|
|
1233
1289
|
|
|
1234
|
-
export { Alert, AnchorButton, Box, Button, ButtonArea, DescriptionItem, FileDropZone, FileListItem, Sidebar, SidebarContainer, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemAvatar, SidebarSubheader, TextBox, formatBytes, toBytes };
|
|
1290
|
+
export { Alert, AnchorButton, Banner, Box, Button, ButtonArea, DescriptionItem, FileDropZone, FileListItem, Sidebar, SidebarContainer, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemAvatar, SidebarSubheader, TextBox, formatBytes, toBytes };
|
|
1235
1291
|
//# sourceMappingURL=index.js.map
|