@zesty-io/material 0.0.2-0 → 0.0.2

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.
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ "stories": [
3
+ "../src/**/*.stories.mdx",
4
+ "../src/**/*.stories.@(js|jsx|ts|tsx)"
5
+ ],
6
+ "addons": [
7
+ "@storybook/addon-links",
8
+ "@storybook/addon-essentials",
9
+ "@storybook/addon-interactions"
10
+ ],
11
+ "framework": "@storybook/react"
12
+ }
@@ -0,0 +1,9 @@
1
+ export const parameters = {
2
+ actions: { argTypesRegex: "^on[A-Z].*" },
3
+ controls: {
4
+ matchers: {
5
+ color: /(background|color)$/i,
6
+ date: /Date$/,
7
+ },
8
+ },
9
+ }
@@ -0,0 +1,4 @@
1
+ import { Story, Meta } from '@storybook/react/types-6-0';
2
+ declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
3
+ export default _default;
4
+ export declare const Default: Story<import("@storybook/react/types-6-0").Args>;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ReactJson from 'react-json-view';
3
+ import theme from '../theme';
4
+ export default {
5
+ title: 'Theme',
6
+ };
7
+ const Template = (args) => {
8
+ return (_jsx(ReactJson, { src: theme }));
9
+ };
10
+ export const Default = Template.bind({});
@@ -1,3 +1,3 @@
1
1
  import { Theme } from '@mui/material/styles';
2
- declare const theme: Theme;
2
+ declare let theme: Theme;
3
3
  export default theme;
package/es/theme/index.js CHANGED
@@ -1,8 +1,23 @@
1
1
  import palette from './palette';
2
2
  import typography from './typography';
3
3
  import { createTheme } from '@mui/material/styles';
4
- const theme = createTheme({
4
+ let theme = createTheme({
5
5
  palette,
6
6
  typography,
7
7
  });
8
+ theme = createTheme(theme, {
9
+ MuiTooltip: {
10
+ styleOverrides: {
11
+ tooltip: {
12
+ color: theme.palette.primary.contrastText,
13
+ backgroundColor: theme.palette.primary.main,
14
+ fontSize: "14px",
15
+ lineHeight: "20px",
16
+ },
17
+ arrow: {
18
+ color: theme.palette.primary.main,
19
+ }
20
+ }
21
+ }
22
+ });
8
23
  export default theme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zesty-io/material",
3
- "version": "0.0.2-0",
3
+ "version": "0.0.2",
4
4
  "description": "Contains custom components which are in addition to the @mui design-system",
5
5
  "author": "Zesty.io",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/zesty-io/material/issues"
13
13
  },
14
- "homepage": "https://github.com/zesty-io/material#readme",
14
+ "homepage": "https://zesty-io.github.io/material",
15
15
  "main": "es/index.js",
16
16
  "module": "es/index.js",
17
17
  "types": "es/index.d.ts",
@@ -21,7 +21,10 @@
21
21
  "release": "npm run build && npm publish --access public",
22
22
  "release:alpha": "npm run build && npm publish --access public --tag alpha",
23
23
  "postrelease": "rm -rf /es",
24
- "test": "echo 'add tests'"
24
+ "deploy": "npm run build-storybook && gh-pages -d storybook-static",
25
+ "test": "echo 'add tests'",
26
+ "storybook": "start-storybook -p 6006",
27
+ "build-storybook": "build-storybook"
25
28
  },
26
29
  "dependencies": {
27
30
  "@emotion/react": "^11.9.0",
@@ -30,6 +33,18 @@
30
33
  "@mui/material": "^5.6.4"
31
34
  },
32
35
  "devDependencies": {
36
+ "@babel/core": "^7.17.10",
37
+ "@storybook/addon-actions": "^6.4.22",
38
+ "@storybook/addon-essentials": "^6.4.22",
39
+ "@storybook/addon-interactions": "^6.4.22",
40
+ "@storybook/addon-links": "^6.4.22",
41
+ "@storybook/react": "^6.4.22",
42
+ "@storybook/testing-library": "0.0.11",
43
+ "babel-loader": "^8.2.5",
44
+ "gh-pages": "^3.2.3",
45
+ "react": "^18.1.0",
46
+ "react-dom": "^18.1.0",
47
+ "react-json-view": "^1.21.3",
33
48
  "typescript": "^4.6.3"
34
49
  }
35
50
  }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import ReactJson from 'react-json-view'
3
+ import { Story, Meta } from '@storybook/react/types-6-0';
4
+ import theme from '../theme';
5
+
6
+ export default {
7
+ title: 'Theme',
8
+ } as Meta;
9
+
10
+ const Template: Story = (args) => {
11
+ return (
12
+ <ReactJson src={theme} />
13
+ );
14
+ };
15
+
16
+ export const Default = Template.bind({});
@@ -2,9 +2,24 @@ import palette from './palette';
2
2
  import typography from './typography';
3
3
  import { createTheme, Theme } from '@mui/material/styles';
4
4
 
5
- const theme: Theme = createTheme({
5
+ let theme: Theme = createTheme({
6
6
  palette,
7
7
  typography,
8
8
  });
9
9
 
10
+ theme = createTheme(theme, {
11
+ MuiTooltip: {
12
+ styleOverrides: {
13
+ tooltip: {
14
+ color: theme.palette.primary.contrastText,
15
+ backgroundColor: theme.palette.primary.main,
16
+ fontSize: "14px",
17
+ lineHeight: "20px",
18
+ },
19
+ arrow: {
20
+ color: theme.palette.primary.main,
21
+ }
22
+ }
23
+ }
24
+ })
10
25
  export default theme;