@superdispatch/ui-lab 0.23.3 → 0.24.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 +35 -5
- package/dist-node/index.js.map +1 -1
- package/dist-src/alert/Alert.js +6 -5
- package/dist-src/description-line-item/DescriptionLineItem.js +31 -0
- package/dist-src/index.js +1 -0
- package/dist-src/text-box/TextBox.js +1 -1
- package/dist-types/index.d.ts +9 -2
- package/dist-web/index.js +35 -7
- package/dist-web/index.js.map +1 -1
- package/package.json +3 -3
package/dist-src/alert/Alert.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { CheckCircle, Error, Info } from '@material-ui/icons';
|
|
1
|
+
import { CheckCircle, Error, Info, Warning } from '@material-ui/icons';
|
|
2
2
|
import { Alert as MaterialAlert } from '@material-ui/lab';
|
|
3
3
|
import { Color } from '@superdispatch/ui';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
|
-
function colorMixin(textColor, backgroundColor, buttonHoverColor) {
|
|
9
|
-
return css(["color:", ";background-color:", ";& .MuiAlert-icon{color:", ";}& .MuiAlert-action{
|
|
8
|
+
function colorMixin(textColor, iconColor, backgroundColor, buttonHoverColor) {
|
|
9
|
+
return css(["color:", ";border-color:", ";background-color:", ";& .MuiAlert-icon{color:", ";}& .MuiAlert-action{color:", ";& .MuiIconButton-root{&:hover,&:active{color:", ";}}}"], textColor, textColor, backgroundColor, iconColor, iconColor, buttonHoverColor);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
var StyledAlert = /*#__PURE__*/styled(MaterialAlert).withConfig({
|
|
13
13
|
displayName: "Alert__StyledAlert",
|
|
14
14
|
componentId: "SD__sc-1j6qebb-0"
|
|
15
|
-
})(["&.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(Color.Green500, Color.Green50, Color.Green400), /*#__PURE__*/colorMixin(Color.Blue500, Color.Blue50, Color.Blue400), /*#__PURE__*/colorMixin(Color.Yellow500, Color.Yellow50, Color.Yellow400), /*#__PURE__*/colorMixin(Color.Red500, Color.Red50, Color.Red400));
|
|
15
|
+
})(["&.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(Color.Green500, Color.Green300, Color.Green50, Color.Green400), /*#__PURE__*/colorMixin(Color.Blue500, Color.Blue300, Color.Blue50, Color.Blue400), /*#__PURE__*/colorMixin(Color.Yellow500, Color.Yellow300, Color.Yellow50, Color.Yellow400), /*#__PURE__*/colorMixin(Color.Red500, Color.Red300, Color.Red50, Color.Red400));
|
|
16
16
|
|
|
17
17
|
function toMaterialSeverity(severity) {
|
|
18
18
|
return severity === 'info' ? 'info' : severity === 'caution' ? 'warning' : severity === 'critical' ? 'error' : 'success';
|
|
@@ -21,7 +21,8 @@ function toMaterialSeverity(severity) {
|
|
|
21
21
|
var iconMapping = {
|
|
22
22
|
success: /*#__PURE__*/_jsx(CheckCircle, {}),
|
|
23
23
|
info: /*#__PURE__*/_jsx(Info, {}),
|
|
24
|
-
error: /*#__PURE__*/_jsx(Error, {})
|
|
24
|
+
error: /*#__PURE__*/_jsx(Error, {}),
|
|
25
|
+
warning: /*#__PURE__*/_jsx(Warning, {})
|
|
25
26
|
};
|
|
26
27
|
export var Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
27
28
|
var {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Color, Column, Columns } from '@superdispatch/ui';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
export var DottedLine = /*#__PURE__*/styled.div.withConfig({
|
|
7
|
+
displayName: "DescriptionLineItem__DottedLine",
|
|
8
|
+
componentId: "SD__sc-1ixx5h8-0"
|
|
9
|
+
})(["border-bottom:1px dotted ", ";margin:0px 8px;height:7px;"], Color.Silver400);
|
|
10
|
+
export var DescriptionLineItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
11
|
+
var {
|
|
12
|
+
title,
|
|
13
|
+
children
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/_jsxs(Columns, {
|
|
16
|
+
ref: ref,
|
|
17
|
+
align: "center",
|
|
18
|
+
children: [/*#__PURE__*/_jsx(Column, {
|
|
19
|
+
width: "content",
|
|
20
|
+
children: title
|
|
21
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
22
|
+
width: "fluid",
|
|
23
|
+
children: /*#__PURE__*/_jsx(DottedLine, {})
|
|
24
|
+
}), /*#__PURE__*/_jsx(Column, {
|
|
25
|
+
width: "content",
|
|
26
|
+
children: children
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
if (process.env.NODE_ENV !== "production") DescriptionLineItem.displayName = "DescriptionLineItem";
|
|
31
|
+
DescriptionLineItem.displayName = 'DescriptionLineItem';
|
package/dist-src/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./chat/Chat.js";
|
|
|
7
7
|
export * from "./chat/ChatMessage.js";
|
|
8
8
|
export * from "./container/Container.js";
|
|
9
9
|
export * from "./description-item/DescriptionItem.js";
|
|
10
|
+
export * from "./description-line-item/DescriptionLineItem.js";
|
|
10
11
|
export * from "./file-drop-zone/FileDropZone.js";
|
|
11
12
|
export * from "./file-list-item/FileListItem.js";
|
|
12
13
|
export * from "./linked-text/LinkedText.js";
|
|
@@ -10,7 +10,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
10
|
var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
|
|
11
11
|
inherit: 'inherit',
|
|
12
12
|
primary: Color.Dark500,
|
|
13
|
-
secondary: Color.
|
|
13
|
+
secondary: Color.Dark300,
|
|
14
14
|
white: Color.White,
|
|
15
15
|
blue: Color.Blue300,
|
|
16
16
|
green: Color.Green300,
|
package/dist-types/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { Property } from 'csstype';
|
|
|
7
7
|
import { ButtonBaseProps, AvatarProps, IconButtonProps, TooltipProps } from '@material-ui/core';
|
|
8
8
|
import { PrimitiveDateInput } from '@superdispatch/dates';
|
|
9
9
|
import { DateTime } from 'luxon';
|
|
10
|
-
import { FileRejection } from 'react-dropzone';
|
|
11
10
|
import { StyledComponent, DefaultTheme } from 'styled-components';
|
|
11
|
+
import { FileRejection } from 'react-dropzone';
|
|
12
12
|
|
|
13
13
|
declare type AlertSeverityProp = 'positive' | 'info' | 'caution' | 'critical';
|
|
14
14
|
interface AlertProps {
|
|
@@ -157,6 +157,13 @@ interface DescriptionItemProps {
|
|
|
157
157
|
}
|
|
158
158
|
declare const DescriptionItem: ForwardRefExoticComponent<DescriptionItemProps & RefAttributes<HTMLDivElement>>;
|
|
159
159
|
|
|
160
|
+
declare const DottedLine: StyledComponent<"div", DefaultTheme, {}, never>;
|
|
161
|
+
interface DescriptionLineItemProps {
|
|
162
|
+
title: ReactNode;
|
|
163
|
+
children: ReactNode;
|
|
164
|
+
}
|
|
165
|
+
declare const DescriptionLineItem: ForwardRefExoticComponent<DescriptionLineItemProps & RefAttributes<HTMLDivElement>>;
|
|
166
|
+
|
|
160
167
|
declare function toBytes(input: number, unit: 'kb' | 'mb' | 'gb'): number;
|
|
161
168
|
declare function formatBytes(bytes: number): string;
|
|
162
169
|
interface FileDropZoneProps {
|
|
@@ -392,4 +399,4 @@ interface TextBoxProps {
|
|
|
392
399
|
}
|
|
393
400
|
declare const TextBox: ForwardRefExoticComponent<TextBoxProps & RefAttributes<HTMLElement>>;
|
|
394
401
|
|
|
395
|
-
export { Alert, AlertProps, AlertSeverityProp, AnchorButton, AnchorButtonProps, Banner, BorderRadiusProp, BorderWidthProp, Box, BoxProps, Button, ButtonArea, ButtonAreaProps, ButtonProps, ButtonSizeProp, ButtonVariantProp, Chat, ChatMessage, Container, ContainerProps, DescriptionItem, DescriptionItemProps, FileDropZone, FileDropZoneProps, FileListItem, FileListItemProps, LinkComponentProps, LinkedText, LinkedTextProps, MarginProp, MultilineText, MultilineTextProps, Navbar, NavbarAccordionOptions, NavbarAvatar, NavbarBadge, NavbarBottomBar, NavbarBottomBarItem, NavbarItem, NavbarItemOptions, NavbarItemProps, NavbarLabel, NavbarList, NavbarMenu, NavbarMenuItem, NavbarMenuItemOption, Sidebar, SidebarBackButton, SidebarContainer, SidebarContainerProps, SidebarContent, SidebarContentProps, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemActionProps, SidebarMenuItemAvatar, SidebarMenuItemAvatarProps, SidebarMenuItemProps, SidebarProps, SidebarSubheader, SidebarSubheaderProps, TextAlignProp, TextBox, TextBoxProps, TextColorProp, TextDisplayProp, TextVariantProp, formatBytes, toBytes, useNavbarContext, useSidebarContext };
|
|
402
|
+
export { Alert, AlertProps, AlertSeverityProp, AnchorButton, AnchorButtonProps, Banner, BorderRadiusProp, BorderWidthProp, Box, BoxProps, Button, ButtonArea, ButtonAreaProps, ButtonProps, ButtonSizeProp, ButtonVariantProp, Chat, ChatMessage, Container, ContainerProps, DescriptionItem, DescriptionItemProps, DescriptionLineItem, DottedLine, FileDropZone, FileDropZoneProps, FileListItem, FileListItemProps, LinkComponentProps, LinkedText, LinkedTextProps, MarginProp, MultilineText, MultilineTextProps, Navbar, NavbarAccordionOptions, NavbarAvatar, NavbarBadge, NavbarBottomBar, NavbarBottomBarItem, NavbarItem, NavbarItemOptions, NavbarItemProps, NavbarLabel, NavbarList, NavbarMenu, NavbarMenuItem, NavbarMenuItemOption, Sidebar, SidebarBackButton, SidebarContainer, SidebarContainerProps, SidebarContent, SidebarContentProps, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemActionProps, SidebarMenuItemAvatar, SidebarMenuItemAvatarProps, SidebarMenuItemProps, SidebarProps, SidebarSubheader, SidebarSubheaderProps, TextAlignProp, TextBox, TextBoxProps, TextColorProp, TextDisplayProp, TextVariantProp, formatBytes, toBytes, useNavbarContext, useSidebarContext };
|
package/dist-web/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckCircle, Info, Error as Error$1, Image, Refresh, Delete, Menu, ExpandMore, MenuOpen, ArrowBack, OpenInNew } from '@material-ui/icons';
|
|
1
|
+
import { CheckCircle, Info, Error as Error$1, Warning, Image, Refresh, Delete, Menu, ExpandMore, MenuOpen, ArrowBack, OpenInNew } from '@material-ui/icons';
|
|
2
2
|
import { Alert as Alert$1 } from '@material-ui/lab';
|
|
3
3
|
import { Color, parseResponsiveProp, isColorProp, parseSpaceProp, Stack, Inline, mergeRefs, useUID, isEmptyReactNode, Columns, Column, CardButton, useResponsiveValue, useCollapseBreakpoint } from '@superdispatch/ui';
|
|
4
4
|
import { forwardRef, useState, useEffect, Children, useRef, useLayoutEffect, Suspense, memo, useContext, createContext, useMemo, createElement } from 'react';
|
|
@@ -15,14 +15,14 @@ import Dropzone from 'react-dropzone';
|
|
|
15
15
|
import { Anchorme } from 'react-anchorme';
|
|
16
16
|
import { noop } from 'lodash';
|
|
17
17
|
|
|
18
|
-
function colorMixin(textColor, backgroundColor, buttonHoverColor) {
|
|
19
|
-
return css(["color:", ";background-color:", ";& .MuiAlert-icon{color:", ";}& .MuiAlert-action{
|
|
18
|
+
function colorMixin(textColor, iconColor, backgroundColor, buttonHoverColor) {
|
|
19
|
+
return css(["color:", ";border-color:", ";background-color:", ";& .MuiAlert-icon{color:", ";}& .MuiAlert-action{color:", ";& .MuiIconButton-root{&:hover,&:active{color:", ";}}}"], textColor, textColor, backgroundColor, iconColor, iconColor, buttonHoverColor);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
var StyledAlert = /*#__PURE__*/styled(Alert$1).withConfig({
|
|
23
23
|
displayName: "Alert__StyledAlert",
|
|
24
24
|
componentId: "SD__sc-1j6qebb-0"
|
|
25
|
-
})(["&.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(Color.Green500, Color.Green50, Color.Green400), /*#__PURE__*/colorMixin(Color.Blue500, Color.Blue50, Color.Blue400), /*#__PURE__*/colorMixin(Color.Yellow500, Color.Yellow50, Color.Yellow400), /*#__PURE__*/colorMixin(Color.Red500, Color.Red50, Color.Red400));
|
|
25
|
+
})(["&.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(Color.Green500, Color.Green300, Color.Green50, Color.Green400), /*#__PURE__*/colorMixin(Color.Blue500, Color.Blue300, Color.Blue50, Color.Blue400), /*#__PURE__*/colorMixin(Color.Yellow500, Color.Yellow300, Color.Yellow50, Color.Yellow400), /*#__PURE__*/colorMixin(Color.Red500, Color.Red300, Color.Red50, Color.Red400));
|
|
26
26
|
|
|
27
27
|
function toMaterialSeverity(severity) {
|
|
28
28
|
return severity === 'info' ? 'info' : severity === 'caution' ? 'warning' : severity === 'critical' ? 'error' : 'success';
|
|
@@ -31,7 +31,8 @@ function toMaterialSeverity(severity) {
|
|
|
31
31
|
var iconMapping = {
|
|
32
32
|
success: /*#__PURE__*/jsx(CheckCircle, {}),
|
|
33
33
|
info: /*#__PURE__*/jsx(Info, {}),
|
|
34
|
-
error: /*#__PURE__*/jsx(Error$1, {})
|
|
34
|
+
error: /*#__PURE__*/jsx(Error$1, {}),
|
|
35
|
+
warning: /*#__PURE__*/jsx(Warning, {})
|
|
35
36
|
};
|
|
36
37
|
var Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
37
38
|
var {
|
|
@@ -677,7 +678,7 @@ var _excluded$4 = ["variant", "as", "align", "color", "display", "noWrap", "wrap
|
|
|
677
678
|
var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
|
|
678
679
|
inherit: 'inherit',
|
|
679
680
|
primary: Color.Dark500,
|
|
680
|
-
secondary: Color.
|
|
681
|
+
secondary: Color.Dark300,
|
|
681
682
|
white: Color.White,
|
|
682
683
|
blue: Color.Blue300,
|
|
683
684
|
green: Color.Green300,
|
|
@@ -856,6 +857,33 @@ var DescriptionItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
856
857
|
});
|
|
857
858
|
if (process.env.NODE_ENV !== "production") DescriptionItem.displayName = "DescriptionItem";
|
|
858
859
|
|
|
860
|
+
var DottedLine = /*#__PURE__*/styled.div.withConfig({
|
|
861
|
+
displayName: "DescriptionLineItem__DottedLine",
|
|
862
|
+
componentId: "SD__sc-1ixx5h8-0"
|
|
863
|
+
})(["border-bottom:1px dotted ", ";margin:0px 8px;height:7px;"], Color.Silver400);
|
|
864
|
+
var DescriptionLineItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
865
|
+
var {
|
|
866
|
+
title,
|
|
867
|
+
children
|
|
868
|
+
} = _ref;
|
|
869
|
+
return /*#__PURE__*/jsxs(Columns, {
|
|
870
|
+
ref: ref,
|
|
871
|
+
align: "center",
|
|
872
|
+
children: [/*#__PURE__*/jsx(Column, {
|
|
873
|
+
width: "content",
|
|
874
|
+
children: title
|
|
875
|
+
}), /*#__PURE__*/jsx(Column, {
|
|
876
|
+
width: "fluid",
|
|
877
|
+
children: /*#__PURE__*/jsx(DottedLine, {})
|
|
878
|
+
}), /*#__PURE__*/jsx(Column, {
|
|
879
|
+
width: "content",
|
|
880
|
+
children: children
|
|
881
|
+
})]
|
|
882
|
+
});
|
|
883
|
+
});
|
|
884
|
+
if (process.env.NODE_ENV !== "production") DescriptionLineItem.displayName = "DescriptionLineItem";
|
|
885
|
+
DescriptionLineItem.displayName = 'DescriptionLineItem';
|
|
886
|
+
|
|
859
887
|
var _excluded$5 = ["disabled", "children", "hintText", "startIcon", "fallback", "accept", "maxSize", "maxFiles", "onDropRejected", "onDropAccepted"];
|
|
860
888
|
function toBytes(input, unit) {
|
|
861
889
|
if (unit === 'gb') return input * (1 << 30);
|
|
@@ -2180,5 +2208,5 @@ var SidebarSubheader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
2180
2208
|
});
|
|
2181
2209
|
if (process.env.NODE_ENV !== "production") SidebarSubheader.displayName = "SidebarSubheader";
|
|
2182
2210
|
|
|
2183
|
-
export { Alert, AnchorButton, Banner, Box, Button, ButtonArea, Chat, ChatMessage, Container, DescriptionItem, FileDropZone, FileListItem, LinkedText, MultilineText, Navbar, NavbarAvatar, NavbarBadge, NavbarBottomBar, NavbarItem, NavbarLabel, NavbarList, NavbarMenu, NavbarMenuItem, Sidebar, SidebarBackButton, SidebarContainer, SidebarContent, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemAvatar, SidebarSubheader, TextBox, formatBytes, toBytes, useNavbarContext, useSidebarContext };
|
|
2211
|
+
export { Alert, AnchorButton, Banner, Box, Button, ButtonArea, Chat, ChatMessage, Container, DescriptionItem, DescriptionLineItem, DottedLine, FileDropZone, FileListItem, LinkedText, MultilineText, Navbar, NavbarAvatar, NavbarBadge, NavbarBottomBar, NavbarItem, NavbarLabel, NavbarList, NavbarMenu, NavbarMenuItem, Sidebar, SidebarBackButton, SidebarContainer, SidebarContent, SidebarDivider, SidebarMenuItem, SidebarMenuItemAction, SidebarMenuItemAvatar, SidebarSubheader, TextBox, formatBytes, toBytes, useNavbarContext, useSidebarContext };
|
|
2184
2212
|
//# sourceMappingURL=index.js.map
|