@superdispatch/ui 0.22.2 → 0.23.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 +23 -16
- package/dist-node/index.js.map +1 -1
- package/dist-src/avatar/AvatarOverrides.js +1 -1
- package/dist-src/avatar-button/AvatarButton.js +1 -1
- package/dist-src/button/ButtonOverrides.js +1 -1
- package/dist-src/card-button/CardButton.js +1 -1
- package/dist-src/checkbox/CheckboxOverrides.js +1 -1
- package/dist-src/chip/ChipOverrides.js +1 -1
- package/dist-src/description-list/DescriptionList.js +1 -1
- package/dist-src/drawer/DrawerActions.js +1 -1
- package/dist-src/drawer/DrawerTitle.js +1 -1
- package/dist-src/icon-button/IconButtonOverrides.js +1 -1
- package/dist-src/index.js +1 -1
- package/dist-src/link/LinkOverrides.js +1 -1
- package/dist-src/list/ListOverrides.js +1 -1
- package/dist-src/overflow-text/OverflowText.js +1 -1
- package/dist-src/pagination/PaginationOverrides.js +1 -1
- package/dist-src/paper/PaperOverrides.js +1 -1
- package/dist-src/radio/RadioFieldCard.js +25 -17
- package/dist-src/radio/RadioOverrides.js +1 -1
- package/dist-src/snackbar/SnackbarContent.js +1 -1
- package/dist-src/svg-icon/SvgIconOverrides.js +1 -1
- package/dist-src/switch/SwitchOverrides.js +1 -1
- package/dist-src/tabs/TabsOverrides.js +1 -1
- package/dist-src/tag/Tag.js +1 -1
- package/dist-src/text-field/TextFieldOverrides.js +1 -1
- package/dist-src/theme/ThemeProvider.js +1 -1
- package/dist-src/tooltip/TooltipOverrides.js +1 -1
- package/dist-types/index.d.ts +109 -109
- package/dist-web/index.js +23 -16
- package/dist-web/index.js.map +1 -1
- package/package.json +2 -2
- /package/dist-src/{color → theme}/Color.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import { Color } from "../
|
|
2
|
+
import { Color } from "../theme/Color.js";
|
|
3
3
|
export function overrideAvatar(theme) {
|
|
4
4
|
theme.overrides.MuiAvatar = {
|
|
5
5
|
root: _objectSpread(_objectSpread({}, theme.typography.h5), {}, {
|
|
@@ -6,7 +6,7 @@ import { Avatar, ButtonBase, CircularProgress } from '@material-ui/core';
|
|
|
6
6
|
import { makeStyles } from '@material-ui/styles';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { forwardRef } from 'react';
|
|
9
|
-
import { Color } from "../
|
|
9
|
+
import { Color } from "../theme/Color.js";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
var useStyles = /*#__PURE__*/makeStyles(theme => {
|
|
@@ -5,7 +5,7 @@ import { ButtonBase, Typography } from '@material-ui/core';
|
|
|
5
5
|
import { makeStyles } from '@material-ui/styles';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
|
-
import { Color } from "../
|
|
8
|
+
import { Color } from "../theme/Color.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvgIcon } from '@material-ui/core';
|
|
2
|
-
import { Color } from "../
|
|
2
|
+
import { Color } from "../theme/Color.js";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
export function overrideCheckbox(theme) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import { SvgIcon } from '@material-ui/core';
|
|
3
|
-
import { Color } from "../
|
|
3
|
+
import { Color } from "../theme/Color.js";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export function overrideChip(theme) {
|
|
6
6
|
var sm = theme.breakpoints.up('sm');
|
|
@@ -5,8 +5,8 @@ import { SvgIcon, Typography } from '@material-ui/core';
|
|
|
5
5
|
import { makeStyles } from '@material-ui/styles';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
|
-
import { Color } from "../color/Color.js";
|
|
9
8
|
import { OverflowText } from "../overflow-text/OverflowText.js";
|
|
9
|
+
import { Color } from "../theme/Color.js";
|
|
10
10
|
import { isEmptyReactNode } from "../utils/isEmptyReactNode.js";
|
|
11
11
|
import { useUID } from "../utils/useUID.js";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import { AppBar, Toolbar } from '@material-ui/core';
|
|
|
5
5
|
import { makeStyles } from '@material-ui/styles';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
|
-
import { Color } from "../
|
|
8
|
+
import { Color } from "../theme/Color.js";
|
|
9
9
|
import { VisibilityObserver } from "../utils/VisibilityObserver.js";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import { AppBar, Grid, Toolbar, Typography } from '@material-ui/core';
|
|
|
5
5
|
import { makeStyles } from '@material-ui/styles';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
|
-
import { Color } from "../
|
|
8
|
+
import { Color } from "../theme/Color.js";
|
|
9
9
|
import { VisibilityObserver } from "../utils/VisibilityObserver.js";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
package/dist-src/index.js
CHANGED
|
@@ -5,7 +5,6 @@ export * from "./button/Button.js";
|
|
|
5
5
|
export * from "./card-button/CardButton.js";
|
|
6
6
|
export * from "./checkbox/CheckboxField.js";
|
|
7
7
|
export * from "./checkbox/CheckboxGroudField.js";
|
|
8
|
-
export * from "./color/Color.js";
|
|
9
8
|
export * from "./columns/Column.js";
|
|
10
9
|
export * from "./columns/Columns.js";
|
|
11
10
|
export * from "./description-list/DescriptionList.js";
|
|
@@ -36,6 +35,7 @@ export * from "./snackbar/SnackbarContent.js";
|
|
|
36
35
|
export * from "./snackbar/SnackbarStack.js";
|
|
37
36
|
export * from "./stack/Stack.js";
|
|
38
37
|
export * from "./tag/Tag.js";
|
|
38
|
+
export * from "./theme/Color.js";
|
|
39
39
|
export * from "./theme/SuperDispatchTheme.js";
|
|
40
40
|
export * from "./theme/ThemeProvider.js";
|
|
41
41
|
export * from "./tiles/Tiles.js";
|
|
@@ -6,7 +6,7 @@ import { Tooltip, Typography } from '@material-ui/core';
|
|
|
6
6
|
import { makeStyles } from '@material-ui/styles';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { forwardRef, useState } from 'react';
|
|
9
|
-
import { Color } from "../
|
|
9
|
+
import { Color } from "../theme/Color.js";
|
|
10
10
|
import { VisibilityObserver } from "../utils/VisibilityObserver.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["name", "value", "label", "caption", "disabled", "icon", "checked", "onChange"];
|
|
4
|
-
import { ButtonBase, Card as MuiCard, FormControlLabel as MuiFormControlLabel, Radio } from '@material-ui/core';
|
|
5
|
-
import { Box, TextBox } from '@superdispatch/ui-lab';
|
|
4
|
+
import { ButtonBase, Card as MuiCard, FormControlLabel as MuiFormControlLabel, Radio, Typography } from '@material-ui/core';
|
|
6
5
|
import { forwardRef } from 'react';
|
|
7
6
|
import styled from 'styled-components';
|
|
8
7
|
import { Column } from "../columns/Column.js";
|
|
9
8
|
import { Columns } from "../columns/Columns.js";
|
|
9
|
+
import { Color } from "../theme/Color.js";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
var ClickableCard = /*#__PURE__*/styled(ButtonBase).withConfig({
|
|
@@ -21,7 +21,20 @@ var FormControlLabel = /*#__PURE__*/styled(MuiFormControlLabel).withConfig({
|
|
|
21
21
|
displayName: "RadioFieldCard__FormControlLabel",
|
|
22
22
|
componentId: "SD__sc-5etge2-2"
|
|
23
23
|
})(["width:100%;"]);
|
|
24
|
-
|
|
24
|
+
var Content = /*#__PURE__*/styled.div.withConfig({
|
|
25
|
+
displayName: "RadioFieldCard__Content",
|
|
26
|
+
componentId: "SD__sc-5etge2-3"
|
|
27
|
+
})(["padding:16px;width:100%;border-radius:4px;border:1px solid ", ";"], _ref => {
|
|
28
|
+
var {
|
|
29
|
+
active
|
|
30
|
+
} = _ref;
|
|
31
|
+
return active ? Color.Blue300 : Color.Silver500;
|
|
32
|
+
});
|
|
33
|
+
var Caption = /*#__PURE__*/styled.div.withConfig({
|
|
34
|
+
displayName: "RadioFieldCard__Caption",
|
|
35
|
+
componentId: "SD__sc-5etge2-4"
|
|
36
|
+
})(["padding-left:32px;"]);
|
|
37
|
+
export var RadioFieldCard = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
25
38
|
var {
|
|
26
39
|
name,
|
|
27
40
|
value,
|
|
@@ -31,8 +44,8 @@ export var RadioFieldCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
31
44
|
icon,
|
|
32
45
|
checked,
|
|
33
46
|
onChange
|
|
34
|
-
} =
|
|
35
|
-
props = _objectWithoutProperties(
|
|
47
|
+
} = _ref2,
|
|
48
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
36
49
|
|
|
37
50
|
return /*#__PURE__*/_jsx(Card, {
|
|
38
51
|
disabled: disabled,
|
|
@@ -40,12 +53,8 @@ export var RadioFieldCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
40
53
|
name: name,
|
|
41
54
|
disabled: disabled
|
|
42
55
|
}, props), {}, {
|
|
43
|
-
children: /*#__PURE__*/_jsx(
|
|
44
|
-
|
|
45
|
-
borderWidth: "small",
|
|
46
|
-
padding: ['small'],
|
|
47
|
-
width: "100%",
|
|
48
|
-
borderColor: checked ? 'Blue300' : 'Silver500',
|
|
56
|
+
children: /*#__PURE__*/_jsx(Content, {
|
|
57
|
+
active: checked,
|
|
49
58
|
children: /*#__PURE__*/_jsxs(Columns, {
|
|
50
59
|
space: "small",
|
|
51
60
|
children: [/*#__PURE__*/_jsxs(Column, {
|
|
@@ -56,14 +65,13 @@ export var RadioFieldCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
56
65
|
ref: ref,
|
|
57
66
|
checked: checked
|
|
58
67
|
}),
|
|
59
|
-
label: /*#__PURE__*/_jsx(
|
|
60
|
-
variant: "
|
|
68
|
+
label: /*#__PURE__*/_jsx(Typography, {
|
|
69
|
+
variant: "h4",
|
|
61
70
|
children: label
|
|
62
71
|
})
|
|
63
|
-
}), /*#__PURE__*/_jsx(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
color: "secondary",
|
|
72
|
+
}), /*#__PURE__*/_jsx(Caption, {
|
|
73
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
74
|
+
color: "textSecondary",
|
|
67
75
|
variant: "caption",
|
|
68
76
|
children: caption
|
|
69
77
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvgIcon } from '@material-ui/core';
|
|
2
|
-
import { Color } from "../
|
|
2
|
+
import { Color } from "../theme/Color.js";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
export function overrideRadio(theme) {
|
|
@@ -7,7 +7,7 @@ import { CheckCircle, Close, Warning } from '@material-ui/icons';
|
|
|
7
7
|
import { makeStyles } from '@material-ui/styles';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import { forwardRef } from 'react';
|
|
10
|
-
import { Color } from "../
|
|
10
|
+
import { Color } from "../theme/Color.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
package/dist-src/tag/Tag.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Typography } from '@material-ui/core';
|
|
|
5
5
|
import { makeStyles } from '@material-ui/styles';
|
|
6
6
|
import cx from 'clsx';
|
|
7
7
|
import { forwardRef } from 'react';
|
|
8
|
-
import { Color } from "../
|
|
8
|
+
import { Color } from "../theme/Color.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
var useStyles = /*#__PURE__*/makeStyles(theme => ({
|
|
11
11
|
root: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import { SvgIcon } from '@material-ui/core';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import { Color } from "../
|
|
4
|
+
import { Color } from "../theme/Color.js";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
var SelectIcon = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(SvgIcon, _objectSpread(_objectSpread({
|
|
7
7
|
ref: ref
|
|
@@ -10,7 +10,6 @@ import { overrideButton } from "../button/ButtonOverrides.js";
|
|
|
10
10
|
import { overrideCard } from "../card/CardOverrides.js";
|
|
11
11
|
import { overrideCheckbox } from "../checkbox/CheckboxOverrides.js";
|
|
12
12
|
import { overrideChip } from "../chip/ChipOverrides.js";
|
|
13
|
-
import { Color } from "../color/Color.js";
|
|
14
13
|
import { overrideDialog } from "../dialog/DialogOverrides.js";
|
|
15
14
|
import { overrideDrawer } from "../drawer/DrawerOverrides.js";
|
|
16
15
|
import { overrideIconButton } from "../icon-button/IconButtonOverrides.js";
|
|
@@ -30,6 +29,7 @@ import { overrideTextField } from "../text-field/TextFieldOverrides.js";
|
|
|
30
29
|
import { overrideToolbar } from "../toolbar/ToolbarOverrides.js";
|
|
31
30
|
import { overrideTooltip } from "../tooltip/TooltipOverrides.js";
|
|
32
31
|
import { createTypographyOptions, overrideTypography } from "../typography/TypographyOverrides.js";
|
|
32
|
+
import { Color } from "./Color.js";
|
|
33
33
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
34
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
35
|
|
package/dist-types/index.d.ts
CHANGED
|
@@ -96,115 +96,6 @@ interface CheckboxGroupFieldProps extends Omit<FormControlProps, 'hiddenLabel' |
|
|
|
96
96
|
}
|
|
97
97
|
declare const CheckboxGroupField: ForwardRefExoticComponent<CheckboxGroupFieldProps>;
|
|
98
98
|
|
|
99
|
-
declare type ColorVariant = 'grey' | 'silver' | 'blue' | 'green' | 'purple' | 'red' | 'teal' | 'yellow';
|
|
100
|
-
declare enum Color {
|
|
101
|
-
White = "#fff",
|
|
102
|
-
White50 = "rgba(255, 255, 255, 0.5)",
|
|
103
|
-
White40 = "rgba(255, 255, 255, 0.4)",
|
|
104
|
-
White20 = "rgba(255, 255, 255, 0.2)",
|
|
105
|
-
White10 = "rgba(255, 255, 255, 0.1)",
|
|
106
|
-
White08 = "rgba(255, 255, 255, 0.08)",
|
|
107
|
-
Transparent = "rgba(0, 0, 0, 0)",
|
|
108
|
-
Black = "#000",
|
|
109
|
-
Black50 = "rgba(0, 0, 0, 0.5)",
|
|
110
|
-
Black20 = "rgba(0, 0, 0, 0.2)",
|
|
111
|
-
/**@deprecated Use Dark100 */
|
|
112
|
-
Grey100 = "#8F949E",
|
|
113
|
-
/**@deprecated Use Dark200 */
|
|
114
|
-
Grey200 = "#6A707C",
|
|
115
|
-
/**@deprecated Use Dark300 */
|
|
116
|
-
Grey300 = "#5B6371",
|
|
117
|
-
/**@deprecated Use Dark400 */
|
|
118
|
-
Grey400 = "#323C4E",
|
|
119
|
-
/**@deprecated Use Dark450 */
|
|
120
|
-
Grey450 = "#222F44",
|
|
121
|
-
/**@deprecated Use Dark500 */
|
|
122
|
-
Grey500 = "#192334",
|
|
123
|
-
Dark100 = "#8F949E",
|
|
124
|
-
Dark200 = "#6A707C",
|
|
125
|
-
Dark300 = "#5B6371",
|
|
126
|
-
/**@deprecated */
|
|
127
|
-
Dark400 = "#323C4E",
|
|
128
|
-
/**@deprecated */
|
|
129
|
-
Dark450 = "#222F44",
|
|
130
|
-
Dark500 = "#192334",
|
|
131
|
-
/**@deprecated */
|
|
132
|
-
Silver100 = "#F6F7F8",
|
|
133
|
-
Silver200 = "#F3F5F8",
|
|
134
|
-
/**@deprecated */
|
|
135
|
-
Silver300 = "#E8ECF0",
|
|
136
|
-
Silver400 = "#E1E5EA",
|
|
137
|
-
Silver500 = "#C4CDD5",
|
|
138
|
-
Blue50 = "#EBF4FF",
|
|
139
|
-
/** @deprecated */
|
|
140
|
-
Blue75 = "#CCE5FF",
|
|
141
|
-
/** @deprecated */
|
|
142
|
-
Blue100 = "#A8D1FF",
|
|
143
|
-
/** @deprecated */
|
|
144
|
-
Blue200 = "#66ADFF",
|
|
145
|
-
Blue300 = "#0070F5",
|
|
146
|
-
/** @deprecated */
|
|
147
|
-
Blue400 = "#0063DB",
|
|
148
|
-
Blue500 = "#0063DB",
|
|
149
|
-
Green50 = "#ECF9EF",
|
|
150
|
-
/** @deprecated */
|
|
151
|
-
Green75 = "#C8F4D1",
|
|
152
|
-
/** @deprecated */
|
|
153
|
-
Green100 = "#90EAAE",
|
|
154
|
-
/** @deprecated */
|
|
155
|
-
Green200 = "#5DDA87",
|
|
156
|
-
Green300 = "#03872F",
|
|
157
|
-
/** @deprecated */
|
|
158
|
-
Green400 = "#1E8F46",
|
|
159
|
-
Green500 = "#007A29",
|
|
160
|
-
Purple50 = "#EFEEFC",
|
|
161
|
-
/** @deprecated */
|
|
162
|
-
Purple75 = "#DCDBF5",
|
|
163
|
-
/** @deprecated */
|
|
164
|
-
Purple100 = "#CBC8EE",
|
|
165
|
-
/** @deprecated */
|
|
166
|
-
Purple200 = "#A7A1E8",
|
|
167
|
-
Purple300 = "#6559CF",
|
|
168
|
-
/** @deprecated */
|
|
169
|
-
Purple400 = "#473ABB",
|
|
170
|
-
Purple500 = "#473ABB",
|
|
171
|
-
Red50 = "#FFEDEB",
|
|
172
|
-
/** @deprecated */
|
|
173
|
-
Red75 = "#FDD9D3",
|
|
174
|
-
/** @deprecated */
|
|
175
|
-
Red100 = "#FDC2BA",
|
|
176
|
-
/** @deprecated */
|
|
177
|
-
Red200 = "#FE988B",
|
|
178
|
-
Red300 = "#E5230D",
|
|
179
|
-
/** @deprecated */
|
|
180
|
-
Red400 = "#D9210D",
|
|
181
|
-
Red500 = "#C31909",
|
|
182
|
-
Teal50 = "#E3F6FC",
|
|
183
|
-
/** @deprecated */
|
|
184
|
-
Teal75 = "#BEEDF9",
|
|
185
|
-
/** @deprecated */
|
|
186
|
-
Teal100 = "#91E3F8",
|
|
187
|
-
/** @deprecated */
|
|
188
|
-
Teal200 = "#61D3EF",
|
|
189
|
-
Teal300 = "#007EAB",
|
|
190
|
-
/** @deprecated */
|
|
191
|
-
Teal400 = "#008DB8",
|
|
192
|
-
Teal500 = "#00678A",
|
|
193
|
-
Yellow50 = "#FFF7DC",
|
|
194
|
-
/** @deprecated */
|
|
195
|
-
Yellow75 = "#FFF1C2",
|
|
196
|
-
/** @deprecated */
|
|
197
|
-
Yellow100 = "#FFE494",
|
|
198
|
-
/** @deprecated */
|
|
199
|
-
Yellow200 = "#FFDC6B",
|
|
200
|
-
Yellow300 = "#E8671C",
|
|
201
|
-
/** @deprecated */
|
|
202
|
-
Yellow400 = "#FFA91F",
|
|
203
|
-
Yellow500 = "#B84807"
|
|
204
|
-
}
|
|
205
|
-
declare type ColorProp = keyof typeof Color;
|
|
206
|
-
declare function isColorProp(name: unknown): name is ColorProp;
|
|
207
|
-
|
|
208
99
|
declare type ResponsivePropPrimitive = boolean | number | string;
|
|
209
100
|
declare type ResponsivePropTupleInit<T extends ResponsivePropPrimitive> = readonly [mobile: T, tablet?: T, desktop?: T];
|
|
210
101
|
declare type ResponsiveProp<T extends ResponsivePropPrimitive> = T | ResponsivePropTupleInit<T>;
|
|
@@ -462,6 +353,115 @@ interface TagProps extends RefAttributes<unknown>, Omit<TypographyProps, 'ref' |
|
|
|
462
353
|
}
|
|
463
354
|
declare const Tag: ForwardRefExoticComponent<TagProps>;
|
|
464
355
|
|
|
356
|
+
declare type ColorVariant = 'grey' | 'silver' | 'blue' | 'green' | 'purple' | 'red' | 'teal' | 'yellow';
|
|
357
|
+
declare enum Color {
|
|
358
|
+
White = "#fff",
|
|
359
|
+
White50 = "rgba(255, 255, 255, 0.5)",
|
|
360
|
+
White40 = "rgba(255, 255, 255, 0.4)",
|
|
361
|
+
White20 = "rgba(255, 255, 255, 0.2)",
|
|
362
|
+
White10 = "rgba(255, 255, 255, 0.1)",
|
|
363
|
+
White08 = "rgba(255, 255, 255, 0.08)",
|
|
364
|
+
Transparent = "rgba(0, 0, 0, 0)",
|
|
365
|
+
Black = "#000",
|
|
366
|
+
Black50 = "rgba(0, 0, 0, 0.5)",
|
|
367
|
+
Black20 = "rgba(0, 0, 0, 0.2)",
|
|
368
|
+
/**@deprecated Use Dark100 */
|
|
369
|
+
Grey100 = "#8F949E",
|
|
370
|
+
/**@deprecated Use Dark200 */
|
|
371
|
+
Grey200 = "#6A707C",
|
|
372
|
+
/**@deprecated Use Dark300 */
|
|
373
|
+
Grey300 = "#5B6371",
|
|
374
|
+
/**@deprecated Use Dark400 */
|
|
375
|
+
Grey400 = "#323C4E",
|
|
376
|
+
/**@deprecated Use Dark450 */
|
|
377
|
+
Grey450 = "#222F44",
|
|
378
|
+
/**@deprecated Use Dark500 */
|
|
379
|
+
Grey500 = "#192334",
|
|
380
|
+
Dark100 = "#8F949E",
|
|
381
|
+
Dark200 = "#6A707C",
|
|
382
|
+
Dark300 = "#5B6371",
|
|
383
|
+
/**@deprecated */
|
|
384
|
+
Dark400 = "#323C4E",
|
|
385
|
+
/**@deprecated */
|
|
386
|
+
Dark450 = "#222F44",
|
|
387
|
+
Dark500 = "#192334",
|
|
388
|
+
/**@deprecated */
|
|
389
|
+
Silver100 = "#F6F7F8",
|
|
390
|
+
Silver200 = "#F3F5F8",
|
|
391
|
+
/**@deprecated */
|
|
392
|
+
Silver300 = "#E8ECF0",
|
|
393
|
+
Silver400 = "#E1E5EA",
|
|
394
|
+
Silver500 = "#C4CDD5",
|
|
395
|
+
Blue50 = "#EBF4FF",
|
|
396
|
+
/** @deprecated */
|
|
397
|
+
Blue75 = "#CCE5FF",
|
|
398
|
+
/** @deprecated */
|
|
399
|
+
Blue100 = "#A8D1FF",
|
|
400
|
+
/** @deprecated */
|
|
401
|
+
Blue200 = "#66ADFF",
|
|
402
|
+
Blue300 = "#0070F5",
|
|
403
|
+
/** @deprecated */
|
|
404
|
+
Blue400 = "#0063DB",
|
|
405
|
+
Blue500 = "#0063DB",
|
|
406
|
+
Green50 = "#ECF9EF",
|
|
407
|
+
/** @deprecated */
|
|
408
|
+
Green75 = "#C8F4D1",
|
|
409
|
+
/** @deprecated */
|
|
410
|
+
Green100 = "#90EAAE",
|
|
411
|
+
/** @deprecated */
|
|
412
|
+
Green200 = "#5DDA87",
|
|
413
|
+
Green300 = "#03872F",
|
|
414
|
+
/** @deprecated */
|
|
415
|
+
Green400 = "#1E8F46",
|
|
416
|
+
Green500 = "#007A29",
|
|
417
|
+
Purple50 = "#EFEEFC",
|
|
418
|
+
/** @deprecated */
|
|
419
|
+
Purple75 = "#DCDBF5",
|
|
420
|
+
/** @deprecated */
|
|
421
|
+
Purple100 = "#CBC8EE",
|
|
422
|
+
/** @deprecated */
|
|
423
|
+
Purple200 = "#A7A1E8",
|
|
424
|
+
Purple300 = "#6559CF",
|
|
425
|
+
/** @deprecated */
|
|
426
|
+
Purple400 = "#473ABB",
|
|
427
|
+
Purple500 = "#473ABB",
|
|
428
|
+
Red50 = "#FFEDEB",
|
|
429
|
+
/** @deprecated */
|
|
430
|
+
Red75 = "#FDD9D3",
|
|
431
|
+
/** @deprecated */
|
|
432
|
+
Red100 = "#FDC2BA",
|
|
433
|
+
/** @deprecated */
|
|
434
|
+
Red200 = "#FE988B",
|
|
435
|
+
Red300 = "#E5230D",
|
|
436
|
+
/** @deprecated */
|
|
437
|
+
Red400 = "#D9210D",
|
|
438
|
+
Red500 = "#C31909",
|
|
439
|
+
Teal50 = "#E3F6FC",
|
|
440
|
+
/** @deprecated */
|
|
441
|
+
Teal75 = "#BEEDF9",
|
|
442
|
+
/** @deprecated */
|
|
443
|
+
Teal100 = "#91E3F8",
|
|
444
|
+
/** @deprecated */
|
|
445
|
+
Teal200 = "#61D3EF",
|
|
446
|
+
Teal300 = "#007EAB",
|
|
447
|
+
/** @deprecated */
|
|
448
|
+
Teal400 = "#008DB8",
|
|
449
|
+
Teal500 = "#00678A",
|
|
450
|
+
Yellow50 = "#FFF7DC",
|
|
451
|
+
/** @deprecated */
|
|
452
|
+
Yellow75 = "#FFF1C2",
|
|
453
|
+
/** @deprecated */
|
|
454
|
+
Yellow100 = "#FFE494",
|
|
455
|
+
/** @deprecated */
|
|
456
|
+
Yellow200 = "#FFDC6B",
|
|
457
|
+
Yellow300 = "#E8671C",
|
|
458
|
+
/** @deprecated */
|
|
459
|
+
Yellow400 = "#FFA91F",
|
|
460
|
+
Yellow500 = "#B84807"
|
|
461
|
+
}
|
|
462
|
+
declare type ColorProp = keyof typeof Color;
|
|
463
|
+
declare function isColorProp(name: unknown): name is ColorProp;
|
|
464
|
+
|
|
465
465
|
declare type SuperDispatchTheme = Readonly<Required<Theme>>;
|
|
466
466
|
|
|
467
467
|
interface ThemeProviderProps {
|
package/dist-web/index.js
CHANGED
|
@@ -11,7 +11,6 @@ import { useEventHandler, useDeepEqualValue, useValueObserver, useDeepEqualMemo,
|
|
|
11
11
|
import clsx from 'clsx';
|
|
12
12
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
13
13
|
import NumberFormat from 'react-number-format';
|
|
14
|
-
import { Box, TextBox } from '@superdispatch/ui-lab';
|
|
15
14
|
import createBreakpoints from '@material-ui/core/styles/createBreakpoints';
|
|
16
15
|
|
|
17
16
|
var _excluded = ["size", "children", "disabled", "isActive", "isLoading", "color"];
|
|
@@ -1848,7 +1847,20 @@ var FormControlLabel = /*#__PURE__*/styled(FormControlLabel$1).withConfig({
|
|
|
1848
1847
|
displayName: "RadioFieldCard__FormControlLabel",
|
|
1849
1848
|
componentId: "SD__sc-5etge2-2"
|
|
1850
1849
|
})(["width:100%;"]);
|
|
1851
|
-
var
|
|
1850
|
+
var Content = /*#__PURE__*/styled.div.withConfig({
|
|
1851
|
+
displayName: "RadioFieldCard__Content",
|
|
1852
|
+
componentId: "SD__sc-5etge2-3"
|
|
1853
|
+
})(["padding:16px;width:100%;border-radius:4px;border:1px solid ", ";"], _ref => {
|
|
1854
|
+
var {
|
|
1855
|
+
active
|
|
1856
|
+
} = _ref;
|
|
1857
|
+
return active ? Color.Blue300 : Color.Silver500;
|
|
1858
|
+
});
|
|
1859
|
+
var Caption = /*#__PURE__*/styled.div.withConfig({
|
|
1860
|
+
displayName: "RadioFieldCard__Caption",
|
|
1861
|
+
componentId: "SD__sc-5etge2-4"
|
|
1862
|
+
})(["padding-left:32px;"]);
|
|
1863
|
+
var RadioFieldCard = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
1852
1864
|
var {
|
|
1853
1865
|
name,
|
|
1854
1866
|
value,
|
|
@@ -1858,8 +1870,8 @@ var RadioFieldCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1858
1870
|
icon,
|
|
1859
1871
|
checked,
|
|
1860
1872
|
onChange
|
|
1861
|
-
} =
|
|
1862
|
-
props = _objectWithoutProperties(
|
|
1873
|
+
} = _ref2,
|
|
1874
|
+
props = _objectWithoutProperties(_ref2, _excluded$k);
|
|
1863
1875
|
|
|
1864
1876
|
return /*#__PURE__*/jsx(Card, {
|
|
1865
1877
|
disabled: disabled,
|
|
@@ -1867,12 +1879,8 @@ var RadioFieldCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1867
1879
|
name: name,
|
|
1868
1880
|
disabled: disabled
|
|
1869
1881
|
}, props), {}, {
|
|
1870
|
-
children: /*#__PURE__*/jsx(
|
|
1871
|
-
|
|
1872
|
-
borderWidth: "small",
|
|
1873
|
-
padding: ['small'],
|
|
1874
|
-
width: "100%",
|
|
1875
|
-
borderColor: checked ? 'Blue300' : 'Silver500',
|
|
1882
|
+
children: /*#__PURE__*/jsx(Content, {
|
|
1883
|
+
active: checked,
|
|
1876
1884
|
children: /*#__PURE__*/jsxs(Columns, {
|
|
1877
1885
|
space: "small",
|
|
1878
1886
|
children: [/*#__PURE__*/jsxs(Column, {
|
|
@@ -1883,14 +1891,13 @@ var RadioFieldCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1883
1891
|
ref: ref,
|
|
1884
1892
|
checked: checked
|
|
1885
1893
|
}),
|
|
1886
|
-
label: /*#__PURE__*/jsx(
|
|
1887
|
-
variant: "
|
|
1894
|
+
label: /*#__PURE__*/jsx(Typography, {
|
|
1895
|
+
variant: "h4",
|
|
1888
1896
|
children: label
|
|
1889
1897
|
})
|
|
1890
|
-
}), /*#__PURE__*/jsx(
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
color: "secondary",
|
|
1898
|
+
}), /*#__PURE__*/jsx(Caption, {
|
|
1899
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
1900
|
+
color: "textSecondary",
|
|
1894
1901
|
variant: "caption",
|
|
1895
1902
|
children: caption
|
|
1896
1903
|
})
|