@veritone-ce/design-system 1.11.2 → 1.12.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/assets/theme.js +15 -55
- package/dist/components/Stepper/Stepper.stories.d.ts +21 -0
- package/dist/components/Stepper/Stepper.stories.js +22 -0
- package/dist/components/Stepper/__tests__/Stepper.test.d.ts +1 -0
- package/dist/components/Stepper/__tests__/Stepper.test.js +10 -0
- package/dist/components/Stepper/index.d.ts +14 -0
- package/dist/components/Stepper/index.js +13 -0
- package/dist/components/Stepper/stepper.theme.d.ts +50 -0
- package/dist/components/Stepper/stepper.theme.js +49 -0
- package/package.json +1 -1
package/dist/assets/theme.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createTheme } from '@mui/material';
|
|
3
|
+
import stepperTheme from '../components/Stepper/stepper.theme';
|
|
3
4
|
import checkboxTheme from '../components/Checkbox/checkbox.theme';
|
|
4
5
|
import radioButtonTheme from '../components/RadioButton/RadioButton.theme';
|
|
5
6
|
import buttonTheme from '../components/Button/button.theme';
|
|
@@ -88,16 +89,7 @@ let theme = createTheme({
|
|
|
88
89
|
spacing: 10
|
|
89
90
|
});
|
|
90
91
|
theme = createTheme(theme, {
|
|
91
|
-
components: {
|
|
92
|
-
MuiButton: buttonTheme(theme),
|
|
93
|
-
MuiSelect: selectTheme(theme),
|
|
94
|
-
MuiTextField: inputTheme(theme),
|
|
95
|
-
MuiDialog: modalTheme(theme),
|
|
96
|
-
MuiCheckbox: checkboxTheme(theme),
|
|
97
|
-
MuiRadio: radioButtonTheme(theme),
|
|
98
|
-
MuiTabs: tabsTheme(theme),
|
|
99
|
-
MuiChip: statusChipTheme(theme),
|
|
100
|
-
MuiInputLabel: {
|
|
92
|
+
components: Object.assign(Object.assign({ MuiButton: buttonTheme(theme) }, stepperTheme(theme)), { MuiSelect: selectTheme(theme), MuiTextField: inputTheme(theme), MuiDialog: modalTheme(theme), MuiCheckbox: checkboxTheme(theme), MuiRadio: radioButtonTheme(theme), MuiTabs: tabsTheme(theme), MuiChip: statusChipTheme(theme), MuiInputLabel: {
|
|
101
93
|
styleOverrides: {
|
|
102
94
|
root: {
|
|
103
95
|
color: theme.palette.text.secondary,
|
|
@@ -106,8 +98,7 @@ theme = createTheme(theme, {
|
|
|
106
98
|
fontWeight: `600`
|
|
107
99
|
}
|
|
108
100
|
}
|
|
109
|
-
},
|
|
110
|
-
MuiFormControlLabel: {
|
|
101
|
+
}, MuiFormControlLabel: {
|
|
111
102
|
styleOverrides: {
|
|
112
103
|
root: {
|
|
113
104
|
'& .MuiFormControlLabel-label': {
|
|
@@ -118,8 +109,7 @@ theme = createTheme(theme, {
|
|
|
118
109
|
}
|
|
119
110
|
}
|
|
120
111
|
}
|
|
121
|
-
},
|
|
122
|
-
MuiFormHelperText: {
|
|
112
|
+
}, MuiFormHelperText: {
|
|
123
113
|
styleOverrides: {
|
|
124
114
|
root: {
|
|
125
115
|
position: 'relative',
|
|
@@ -140,27 +130,7 @@ theme = createTheme(theme, {
|
|
|
140
130
|
}
|
|
141
131
|
}
|
|
142
132
|
}
|
|
143
|
-
},
|
|
144
|
-
MuiStepIcon: {
|
|
145
|
-
styleOverrides: {
|
|
146
|
-
root: {
|
|
147
|
-
borderRadius: `100%`,
|
|
148
|
-
outline: `1px solid ${theme.palette.text.tertiary}`,
|
|
149
|
-
color: `white`,
|
|
150
|
-
text: {
|
|
151
|
-
fill: theme.palette.text.tertiary
|
|
152
|
-
},
|
|
153
|
-
'&.Mui-active': {
|
|
154
|
-
outline: `none`,
|
|
155
|
-
color: theme.palette.button.main,
|
|
156
|
-
text: {
|
|
157
|
-
fill: `white`
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
MuiDialogTitle: {
|
|
133
|
+
}, MuiDialogTitle: {
|
|
164
134
|
styleOverrides: {
|
|
165
135
|
root: {
|
|
166
136
|
fontSize: `24px`,
|
|
@@ -171,8 +141,7 @@ theme = createTheme(theme, {
|
|
|
171
141
|
paddingBottom: theme.spacing(1)
|
|
172
142
|
}
|
|
173
143
|
}
|
|
174
|
-
},
|
|
175
|
-
MuiDialogContent: {
|
|
144
|
+
}, MuiDialogContent: {
|
|
176
145
|
styleOverrides: {
|
|
177
146
|
root: {
|
|
178
147
|
paddingTop: 0,
|
|
@@ -181,21 +150,18 @@ theme = createTheme(theme, {
|
|
|
181
150
|
paddingBottom: theme.spacing(1)
|
|
182
151
|
}
|
|
183
152
|
}
|
|
184
|
-
},
|
|
185
|
-
MuiDialogActions: {
|
|
153
|
+
}, MuiDialogActions: {
|
|
186
154
|
styleOverrides: {
|
|
187
155
|
root: {
|
|
188
156
|
padding: theme.spacing(3)
|
|
189
157
|
}
|
|
190
158
|
}
|
|
191
|
-
},
|
|
192
|
-
MuiLink: {
|
|
159
|
+
}, MuiLink: {
|
|
193
160
|
defaultProps: {
|
|
194
161
|
underline: `none`,
|
|
195
162
|
color: theme.palette.primary.main
|
|
196
163
|
}
|
|
197
|
-
},
|
|
198
|
-
MuiSnackbar: {
|
|
164
|
+
}, MuiSnackbar: {
|
|
199
165
|
defaultProps: {
|
|
200
166
|
autoHideDuration: 6000,
|
|
201
167
|
anchorOrigin: {
|
|
@@ -210,8 +176,7 @@ theme = createTheme(theme, {
|
|
|
210
176
|
position: `absolute`
|
|
211
177
|
}
|
|
212
178
|
}
|
|
213
|
-
},
|
|
214
|
-
MuiAlert: {
|
|
179
|
+
}, MuiAlert: {
|
|
215
180
|
defaultProps: {
|
|
216
181
|
variant: `outlined`,
|
|
217
182
|
iconMapping: {
|
|
@@ -258,23 +223,20 @@ theme = createTheme(theme, {
|
|
|
258
223
|
}
|
|
259
224
|
}
|
|
260
225
|
}
|
|
261
|
-
},
|
|
262
|
-
MuiCircularProgress: {
|
|
226
|
+
}, MuiCircularProgress: {
|
|
263
227
|
styleOverrides: {
|
|
264
228
|
root: {
|
|
265
229
|
color: theme.palette.button.main
|
|
266
230
|
}
|
|
267
231
|
}
|
|
268
|
-
},
|
|
269
|
-
MuiCardContent: {
|
|
232
|
+
}, MuiCardContent: {
|
|
270
233
|
styleOverrides: {
|
|
271
234
|
root: {
|
|
272
235
|
padding: theme.spacing(2),
|
|
273
236
|
paddingTop: theme.spacing(1)
|
|
274
237
|
}
|
|
275
238
|
}
|
|
276
|
-
},
|
|
277
|
-
MuiDataGrid: {
|
|
239
|
+
}, MuiDataGrid: {
|
|
278
240
|
styleOverrides: {
|
|
279
241
|
root: {
|
|
280
242
|
'& .MuiDataGrid-columnHeader:focus': {
|
|
@@ -285,8 +247,7 @@ theme = createTheme(theme, {
|
|
|
285
247
|
}
|
|
286
248
|
}
|
|
287
249
|
}
|
|
288
|
-
},
|
|
289
|
-
MuiPaper: {
|
|
250
|
+
}, MuiPaper: {
|
|
290
251
|
styleOverrides: {
|
|
291
252
|
root: {
|
|
292
253
|
'&.MuiMenu-paper': {
|
|
@@ -295,7 +256,6 @@ theme = createTheme(theme, {
|
|
|
295
256
|
}
|
|
296
257
|
}
|
|
297
258
|
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
259
|
+
} })
|
|
300
260
|
});
|
|
301
261
|
export default theme;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory, Story, ComponentMeta } from '@storybook/react';
|
|
3
|
+
import Stepper from '.';
|
|
4
|
+
declare const _default: ComponentMeta<(props: {
|
|
5
|
+
'data-testid'?: string | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
component?: import("react").ElementType<any> | undefined;
|
|
8
|
+
} & Pick<import("@mui/material").PaperProps<"div", {}>, "variant" | "square" | "elevation"> & {
|
|
9
|
+
activeStep?: number | undefined;
|
|
10
|
+
alternativeLabel?: boolean | undefined;
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
classes?: Partial<import("@mui/material").StepperClasses> | undefined;
|
|
13
|
+
connector?: import("react").ReactElement<any, any> | null | undefined;
|
|
14
|
+
nonLinear?: boolean | undefined;
|
|
15
|
+
orientation?: import("@mui/material").Orientation | undefined;
|
|
16
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
17
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
18
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
19
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "square" | "elevation" | "orientation" | "component" | "activeStep" | "alternativeLabel" | "connector" | "nonLinear">) => JSX.Element>;
|
|
20
|
+
export default _default;
|
|
21
|
+
export declare const Default: ComponentStory<typeof Stepper> | Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Step, StepLabel } from '@mui/material';
|
|
14
|
+
import Stepper from '.';
|
|
15
|
+
export default {
|
|
16
|
+
title: 'Components/Stepper',
|
|
17
|
+
component: Stepper
|
|
18
|
+
};
|
|
19
|
+
export const Default = (_a) => {
|
|
20
|
+
var args = __rest(_a, []);
|
|
21
|
+
return (_jsxs(Stepper, Object.assign({}, args, { children: [_jsx(Step, { children: _jsx(StepLabel, { children: "This is a label" }) }), _jsx(Step, { children: _jsx(StepLabel, { children: "This is another label" }) }), _jsx(Step, { children: _jsx(StepLabel, { children: "This is a third label" }) }), _jsx(Step, { children: _jsx(StepLabel, { children: "This is a fourth label" }) })] })));
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render } from '../../../utils/tests/helpers';
|
|
3
|
+
import { screen } from '@testing-library/react';
|
|
4
|
+
import Stepper from '..';
|
|
5
|
+
describe('<Stepper />', () => {
|
|
6
|
+
it('should render the Stepper component', () => {
|
|
7
|
+
render(_jsx(Stepper, { "data-testid": "stepper" }));
|
|
8
|
+
expect(screen.getByTestId('stepper')).toBeInTheDocument();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StepperProps as MuiStepperProps } from '@mui/material';
|
|
3
|
+
type StepperProps = {
|
|
4
|
+
'data-testid'?: string;
|
|
5
|
+
} & MuiStepperProps;
|
|
6
|
+
/**
|
|
7
|
+
The Stepper is used for highlighting where a user is in a progression of steps.
|
|
8
|
+
For additional information see:
|
|
9
|
+
https://mui.com/material-ui/react-stepper/ ,
|
|
10
|
+
https://mui.com/material-ui/api/step/ ,
|
|
11
|
+
https://mui.com/material-ui/api/step-label/ .
|
|
12
|
+
**/
|
|
13
|
+
declare const Stepper: (props: StepperProps) => JSX.Element;
|
|
14
|
+
export default Stepper;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stepper as MuiStepper } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
The Stepper is used for highlighting where a user is in a progression of steps.
|
|
5
|
+
For additional information see:
|
|
6
|
+
https://mui.com/material-ui/react-stepper/ ,
|
|
7
|
+
https://mui.com/material-ui/api/step/ ,
|
|
8
|
+
https://mui.com/material-ui/api/step-label/ .
|
|
9
|
+
**/
|
|
10
|
+
const Stepper = (props) => {
|
|
11
|
+
return _jsx(MuiStepper, Object.assign({}, props));
|
|
12
|
+
};
|
|
13
|
+
export default Stepper;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Theme } from '../../assets/theme';
|
|
2
|
+
declare const stepperTheme: (theme: Theme) => {
|
|
3
|
+
MuiStepConnector: {
|
|
4
|
+
styleOverrides: {
|
|
5
|
+
line: {
|
|
6
|
+
borderColor: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
MuiStep: {
|
|
11
|
+
defaultProps: {
|
|
12
|
+
completed: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
MuiStepIcon: {
|
|
16
|
+
styleOverrides: {
|
|
17
|
+
root: {
|
|
18
|
+
borderRadius: string;
|
|
19
|
+
height: string;
|
|
20
|
+
width: string;
|
|
21
|
+
outline: string;
|
|
22
|
+
color: string;
|
|
23
|
+
text: {
|
|
24
|
+
fill: string;
|
|
25
|
+
};
|
|
26
|
+
'&.Mui-active': {
|
|
27
|
+
outline: string;
|
|
28
|
+
color: string;
|
|
29
|
+
text: {
|
|
30
|
+
fill: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
MuiStepLabel: {
|
|
37
|
+
styleOverrides: {
|
|
38
|
+
label: {
|
|
39
|
+
fontWeight: string;
|
|
40
|
+
'&.Mui-active': {
|
|
41
|
+
fontWeight: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
iconContainer: {
|
|
45
|
+
padding: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export default stepperTheme;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const stepperTheme = (theme) => ({
|
|
2
|
+
MuiStepConnector: {
|
|
3
|
+
styleOverrides: {
|
|
4
|
+
line: {
|
|
5
|
+
borderColor: `#E0E8F0`
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
MuiStep: {
|
|
10
|
+
defaultProps: {
|
|
11
|
+
completed: false
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
MuiStepIcon: {
|
|
15
|
+
styleOverrides: {
|
|
16
|
+
root: {
|
|
17
|
+
borderRadius: `100%`,
|
|
18
|
+
height: `35px`,
|
|
19
|
+
width: `35px`,
|
|
20
|
+
outline: `1px solid ${theme.palette.text.tertiary}`,
|
|
21
|
+
color: `white`,
|
|
22
|
+
text: {
|
|
23
|
+
fill: theme.palette.text.tertiary
|
|
24
|
+
},
|
|
25
|
+
'&.Mui-active': {
|
|
26
|
+
outline: `none`,
|
|
27
|
+
color: theme.palette.text.tertiary,
|
|
28
|
+
text: {
|
|
29
|
+
fill: `white`
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
MuiStepLabel: {
|
|
36
|
+
styleOverrides: {
|
|
37
|
+
label: {
|
|
38
|
+
fontWeight: `600`,
|
|
39
|
+
'&.Mui-active': {
|
|
40
|
+
fontWeight: `600`
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
iconContainer: {
|
|
44
|
+
padding: `0 10px 0 0`
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export default stepperTheme;
|