@zesty-io/material 0.0.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
+ }
package/es/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as theme } from './theme';
package/es/index.js ADDED
@@ -0,0 +1 @@
1
+ export { default as theme } from './theme';
@@ -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({});
@@ -0,0 +1,3 @@
1
+ import { Theme } from '@mui/material/styles';
2
+ declare let theme: Theme;
3
+ export default theme;
@@ -0,0 +1,23 @@
1
+ import palette from './palette';
2
+ import typography from './typography';
3
+ import { createTheme } from '@mui/material/styles';
4
+ let theme = createTheme({
5
+ palette,
6
+ typography,
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
+ });
23
+ export default theme;
@@ -0,0 +1,3 @@
1
+ import { PaletteOptions } from '@mui/material/styles';
2
+ declare const palette: PaletteOptions;
3
+ export default palette;
@@ -0,0 +1,36 @@
1
+ const palette = {
2
+ primary: {
3
+ main: '#404759',
4
+ contrastText: '#ffffff',
5
+ },
6
+ secondary: {
7
+ main: '#497edf',
8
+ contrastText: '#ffffff',
9
+ },
10
+ success: {
11
+ main: '#75bf25',
12
+ contrastText: '#ffffff',
13
+ },
14
+ warning: {
15
+ main: '#f17829',
16
+ contrastText: '#ffffff',
17
+ },
18
+ error: {
19
+ main: '#e53c05',
20
+ contrastText: '#ffffff',
21
+ },
22
+ // action: {
23
+ // active: 'rgba(0,0,0,54)',
24
+ // hover: 'rgba(0,0,0,0.04)',
25
+ // hoverOpacity: 0.04,
26
+ // selected: 'rgba(0,0,0,0.08)',
27
+ // selectedOpacity: 0.08,
28
+ // disabled: 'rgba(26, 32, 44, 0.4)',
29
+ // disabledBackground: 'rgba(26, 32, 44, 0.12)',
30
+ // disabledOpacity: 0.4,
31
+ // focus: 'rgba(0,0,0,0.12)',
32
+ // focusOpacity: 0.12,
33
+ // activatedOpacity: 0.12,
34
+ // },
35
+ };
36
+ export default palette;
@@ -0,0 +1,3 @@
1
+ import { TypographyVariantsOptions } from '@mui/material/styles';
2
+ declare const typography: TypographyVariantsOptions;
3
+ export default typography;
@@ -0,0 +1,4 @@
1
+ const typography = {
2
+ fontFamily: "'Mulish'",
3
+ };
4
+ export default typography;
package/package.json CHANGED
@@ -1,21 +1,50 @@
1
1
  {
2
2
  "name": "@zesty-io/material",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
4
  "description": "Contains custom components which are in addition to the @mui design-system",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1",
8
- "release": "npm publish --access public",
9
- "release:alpha": "npm publish --access public --tag alpha"
10
- },
5
+ "author": "Zesty.io",
6
+ "license": "MIT",
11
7
  "repository": {
12
8
  "type": "git",
13
9
  "url": "git+https://github.com/zesty-io/material.git"
14
10
  },
15
- "author": "",
16
- "license": "ISC",
17
11
  "bugs": {
18
12
  "url": "https://github.com/zesty-io/material/issues"
19
13
  },
20
- "homepage": "https://github.com/zesty-io/material#readme"
14
+ "homepage": "https://zesty-io.github.io/material",
15
+ "main": "es/index.js",
16
+ "module": "es/index.js",
17
+ "types": "es/index.d.ts",
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "prerelease": "npm test",
21
+ "release": "npm run build && npm publish --access public",
22
+ "release:alpha": "npm run build && npm publish --access public --tag alpha",
23
+ "postrelease": "rm -rf /es",
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"
28
+ },
29
+ "dependencies": {
30
+ "@emotion/react": "^11.9.0",
31
+ "@emotion/styled": "^11.8.1",
32
+ "@mui/icons-material": "^5.6.2",
33
+ "@mui/material": "^5.6.4"
34
+ },
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",
48
+ "typescript": "^4.6.3"
49
+ }
21
50
  }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as theme } from './theme';
@@ -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({});
@@ -0,0 +1,25 @@
1
+ import palette from './palette';
2
+ import typography from './typography';
3
+ import { createTheme, Theme } from '@mui/material/styles';
4
+
5
+ let theme: Theme = createTheme({
6
+ palette,
7
+ typography,
8
+ });
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
+ })
25
+ export default theme;
@@ -0,0 +1,38 @@
1
+ import { PaletteOptions } from '@mui/material/styles';
2
+ const palette: PaletteOptions = {
3
+ primary: {
4
+ main: '#404759',
5
+ contrastText: '#ffffff',
6
+ },
7
+ secondary: {
8
+ main: '#497edf',
9
+ contrastText: '#ffffff',
10
+ },
11
+ success: {
12
+ main: '#75bf25',
13
+ contrastText: '#ffffff',
14
+ },
15
+ warning: {
16
+ main: '#f17829',
17
+ contrastText: '#ffffff',
18
+ },
19
+ error: {
20
+ main: '#e53c05',
21
+ contrastText: '#ffffff',
22
+ },
23
+ // action: {
24
+ // active: 'rgba(0,0,0,54)',
25
+ // hover: 'rgba(0,0,0,0.04)',
26
+ // hoverOpacity: 0.04,
27
+ // selected: 'rgba(0,0,0,0.08)',
28
+ // selectedOpacity: 0.08,
29
+ // disabled: 'rgba(26, 32, 44, 0.4)',
30
+ // disabledBackground: 'rgba(26, 32, 44, 0.12)',
31
+ // disabledOpacity: 0.4,
32
+ // focus: 'rgba(0,0,0,0.12)',
33
+ // focusOpacity: 0.12,
34
+ // activatedOpacity: 0.12,
35
+ // },
36
+ };
37
+
38
+ export default palette;
@@ -0,0 +1,7 @@
1
+ import { TypographyVariantsOptions } from '@mui/material/styles';
2
+
3
+ const typography: TypographyVariantsOptions = {
4
+ fontFamily: "'Mulish'",
5
+ };
6
+
7
+ export default typography;
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "es",
4
+ "target": "ESNext",
5
+ "useDefineForClassFields": true,
6
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
7
+ "allowJs": false,
8
+ "skipLibCheck": true,
9
+ "esModuleInterop": false,
10
+ "allowSyntheticDefaultImports": true,
11
+ "strict": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "module": "ESNext",
14
+ "moduleResolution": "Node",
15
+ "resolveJsonModule": true,
16
+ "isolatedModules": true,
17
+ "noEmit": false,
18
+ "declaration": true,
19
+ "jsx": "react-jsx",
20
+ },
21
+ "include": ["src"],
22
+ }