@veritone-ce/design-system 1.2.2 → 1.2.3
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.d.ts +39 -24
- package/dist/assets/theme.js +3 -18
- package/dist/components/Button/Button.stories.d.ts +7 -0
- package/dist/components/Button/Button.stories.js +47 -0
- package/dist/components/Button/Indicator.js +1 -1
- package/dist/components/Button/__tests__/Button.test.d.ts +1 -0
- package/dist/components/Button/__tests__/Button.test.js +14 -0
- package/dist/components/Button/button.theme.d.ts +3 -837
- package/dist/components/Button/button.theme.js +0 -1
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/ThemeProvider/__tests__/Button.test.d.ts +1 -0
- package/dist/components/ThemeProvider/__tests__/Button.test.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/reportWebVitals.d.ts +3 -0
- package/dist/reportWebVitals.js +12 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/setupTests.js +5 -0
- package/dist/utils/tests/helpers.d.ts +6 -0
- package/dist/utils/tests/helpers.js +21 -0
- package/package.json +4 -2
|
@@ -5,7 +5,6 @@ const buttonTheme = (theme) => ({
|
|
|
5
5
|
disableRipple: true
|
|
6
6
|
},
|
|
7
7
|
styleOverrides: {
|
|
8
|
-
// @ts-ignore
|
|
9
8
|
root: ({ ownerState }) => (Object.assign(Object.assign(Object.assign({ textTransform: 'none', fontWeight: '600', '&.MuiButton-outlinedError': {
|
|
10
9
|
backgroundColor: theme.palette.common.white
|
|
11
10
|
}, '&.Mui-disabled': Object.assign({}, (ownerState.variant !== `text` && {
|
|
@@ -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 ThemeProvider from '..';
|
|
5
|
+
describe('<ThemeProvider />', () => {
|
|
6
|
+
it('should render the ThemeProvider component', () => {
|
|
7
|
+
render(_jsx(ThemeProvider, { children: "ThemeProvider" }));
|
|
8
|
+
expect(screen.getByText('ThemeProvider')).toBeInTheDocument();
|
|
9
|
+
});
|
|
10
|
+
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const reportWebVitals = (onPerfEntry) => {
|
|
2
|
+
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
3
|
+
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
4
|
+
getCLS(onPerfEntry);
|
|
5
|
+
getFID(onPerfEntry);
|
|
6
|
+
getFCP(onPerfEntry);
|
|
7
|
+
getLCP(onPerfEntry);
|
|
8
|
+
getTTFB(onPerfEntry);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export default reportWebVitals;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RenderOptions } from '@testing-library/react';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
export declare type CustomRenderProps = Omit<RenderOptions, 'queries'>;
|
|
4
|
+
declare const customRender: (ui: ReactElement, { ...renderOptions }?: CustomRenderProps) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
5
|
+
export * from '@testing-library/react';
|
|
6
|
+
export { customRender as render };
|
|
@@ -0,0 +1,21 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import { ThemeProvider } from '@mui/material';
|
|
14
|
+
import { render } from '@testing-library/react';
|
|
15
|
+
import theme from '../../assets/theme';
|
|
16
|
+
const customRender = (ui, _a = {}) => {
|
|
17
|
+
var renderOptions = __rest(_a, []);
|
|
18
|
+
return render(_jsx(ThemeProvider, Object.assign({ theme: theme }, { children: ui })), renderOptions);
|
|
19
|
+
};
|
|
20
|
+
export * from '@testing-library/react';
|
|
21
|
+
export { customRender as render };
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veritone-ce/design-system",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "yarn storybook",
|
|
7
|
-
"build": "yarn tsc",
|
|
7
|
+
"build": "yarn tsc && tsc-alias",
|
|
8
8
|
"lint": "eslint src",
|
|
9
9
|
"build-docs": "yarn build-storybook-docs",
|
|
10
10
|
"test": "jest",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"cz-conventional-changelog": "^3.3.0",
|
|
48
48
|
"husky": "^8.0.2",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
|
+
"react-dom": "^18.2.0",
|
|
50
51
|
"react-scripts": "5.0.1",
|
|
51
52
|
"typescript": "^4.4.2",
|
|
52
53
|
"web-vitals": "^2.1.0"
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
"plop": "^3.1.1",
|
|
88
89
|
"prettier": "^2.8.0",
|
|
89
90
|
"prop-types": "^15.8.1",
|
|
91
|
+
"tsc-alias": "^1.8.2",
|
|
90
92
|
"webpack": "^5.74.0"
|
|
91
93
|
},
|
|
92
94
|
"peerDependencies": {
|