@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.
@@ -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` && {
@@ -1,7 +1,6 @@
1
1
  import { ButtonProps as MuiButtonProps } from '@mui/material';
2
2
  export declare type ButtonProps = {
3
3
  'data-testid'?: string;
4
- variant?: 'primary' | 'secondary' | 'terciary';
5
4
  isLoading?: boolean;
6
5
  } & MuiButtonProps;
7
6
  /**
@@ -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
@@ -3,3 +3,4 @@ import '@fontsource/dosis';
3
3
  export { default as Button } from './components/Button';
4
4
  export { default as ThemeProvider } from './components/ThemeProvider';
5
5
  export { default as theme } from './assets/theme';
6
+ export { useTheme } from '@mui/material';
package/dist/index.js CHANGED
@@ -3,3 +3,4 @@ import '@fontsource/dosis';
3
3
  export { default as Button } from './components/Button';
4
4
  export { default as ThemeProvider } from './components/ThemeProvider';
5
5
  export { default as theme } from './assets/theme';
6
+ export { useTheme } from '@mui/material';
@@ -0,0 +1,3 @@
1
+ import { ReportHandler } from 'web-vitals';
2
+ declare const reportWebVitals: (onPerfEntry?: ReportHandler) => void;
3
+ export default reportWebVitals;
@@ -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,5 @@
1
+ // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
+ // allows you to do things like:
3
+ // expect(element).toHaveTextContent(/react/i)
4
+ // learn more: https://github.com/testing-library/jest-dom
5
+ 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.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": {