@zesty-io/material 0.2.4 → 0.3.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/cjs/ConfirmDialog/ConfirmDialog.stories.d.ts +6 -0
- package/cjs/ConfirmDialog/ConfirmDialog.stories.js +27 -0
- package/cjs/ConfirmDialog/index.d.ts +18 -0
- package/cjs/ConfirmDialog/index.js +13 -0
- package/cjs/CopyButton/CopyButton.stories.d.ts +5 -0
- package/cjs/CopyButton/CopyButton.stories.js +17 -0
- package/cjs/CopyButton/index.d.ts +10 -0
- package/cjs/CopyButton/index.js +28 -0
- package/cjs/FieldTypeColor/FieldTypeColor.stories.d.ts +5 -0
- package/cjs/FieldTypeColor/FieldTypeColor.stories.js +24 -0
- package/cjs/FieldTypeColor/index.d.ts +6 -0
- package/cjs/FieldTypeColor/index.js +18 -0
- package/cjs/FieldTypeDate/FieldTypeDate.stories.d.ts +5 -0
- package/cjs/FieldTypeDate/FieldTypeDate.stories.js +20 -0
- package/cjs/FieldTypeDate/index.d.ts +9 -0
- package/cjs/FieldTypeDate/index.js +12 -0
- package/cjs/FieldTypeDateTime/FieldTypeDateTime.stories.d.ts +5 -0
- package/cjs/FieldTypeDateTime/FieldTypeDateTime.stories.js +20 -0
- package/cjs/FieldTypeDateTime/index.d.ts +9 -0
- package/cjs/FieldTypeDateTime/index.js +12 -0
- package/cjs/FieldTypeNumber/FieldTypeNumber.stories.d.ts +5 -0
- package/cjs/FieldTypeNumber/FieldTypeNumber.stories.js +24 -0
- package/cjs/FieldTypeNumber/index.d.ts +6 -0
- package/cjs/FieldTypeNumber/index.js +9 -0
- package/cjs/FieldTypeOneToMany/FieldTypeOneToMany.stories.d.ts +5 -0
- package/cjs/FieldTypeOneToMany/FieldTypeOneToMany.stories.js +31 -0
- package/cjs/FieldTypeOneToMany/index.d.ts +32 -0
- package/cjs/FieldTypeOneToMany/index.js +31 -0
- package/cjs/FieldTypeOneToOne/FieldTypeOneToOne.stories.d.ts +5 -0
- package/cjs/FieldTypeOneToOne/FieldTypeOneToOne.stories.js +31 -0
- package/cjs/FieldTypeOneToOne/index.d.ts +34 -0
- package/cjs/FieldTypeOneToOne/index.js +35 -0
- package/cjs/FieldTypeSort/FieldTypeSort.stories.d.ts +5 -0
- package/cjs/FieldTypeSort/FieldTypeSort.stories.js +25 -0
- package/cjs/FieldTypeSort/index.d.ts +7 -0
- package/cjs/FieldTypeSort/index.js +36 -0
- package/cjs/FieldTypeText/FieldTypeText.stories.d.ts +6 -0
- package/cjs/FieldTypeText/FieldTypeText.stories.js +32 -0
- package/cjs/FieldTypeText/index.d.ts +12 -0
- package/cjs/FieldTypeText/index.js +9 -0
- package/cjs/FieldTypeUrl/FieldTypeUrl.stories.d.ts +5 -0
- package/cjs/FieldTypeUrl/FieldTypeUrl.stories.js +24 -0
- package/cjs/FieldTypeUrl/index.d.ts +12 -0
- package/cjs/FieldTypeUrl/index.js +16 -0
- package/cjs/LegacyTheme/index.d.ts +3 -0
- package/cjs/LegacyTheme/index.js +83 -0
- package/cjs/LegacyTheme/palette.d.ts +3 -0
- package/cjs/LegacyTheme/palette.js +25 -0
- package/{src/LegacyTheme/typography.ts → cjs/LegacyTheme/typography.d.ts} +1 -5
- package/cjs/LegacyTheme/typography.js +6 -0
- package/cjs/VitualizedAutocomplete/VirtualizedAutocomplete.stories.d.ts +5 -0
- package/cjs/VitualizedAutocomplete/VirtualizedAutocomplete.stories.js +30 -0
- package/cjs/VitualizedAutocomplete/index.d.ts +28 -0
- package/cjs/VitualizedAutocomplete/index.js +23 -0
- package/{src/index.ts → cjs/index.d.ts} +3 -3
- package/cjs/index.js +31 -0
- package/cjs/theme/Theme.stories.d.ts +4 -0
- package/cjs/theme/Theme.stories.js +13 -0
- package/cjs/theme/index.d.ts +3 -0
- package/cjs/theme/index.js +52 -0
- package/cjs/theme/palette.d.ts +15 -0
- package/cjs/theme/palette.js +138 -0
- package/cjs/theme/typography.d.ts +9 -0
- package/cjs/theme/typography.js +59 -0
- package/cjs/utils/virtualization.d.ts +2 -0
- package/cjs/utils/virtualization.js +66 -0
- package/es/LegacyTheme/index.js +2 -0
- package/es/TextField.stories.d.ts +5 -0
- package/es/TextField.stories.js +18 -0
- package/es/icons/FolderGlobal.d.ts +3 -0
- package/es/icons/FolderGlobal.js +3 -0
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.js +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/theme/index.d.ts +8 -0
- package/es/theme/index.js +95 -2
- package/es/theme/palette.d.ts +1 -0
- package/es/theme/palette.js +3 -1
- package/package.json +11 -7
- package/.storybook/main.js +0 -25
- package/.storybook/preview-head.html +0 -1
- package/.storybook/preview.js +0 -15
- package/src/ConfirmDialog/ConfirmDialog.stories.tsx +0 -35
- package/src/ConfirmDialog/index.tsx +0 -50
- package/src/CopyButton/CopyButton.stories.tsx +0 -20
- package/src/CopyButton/index.tsx +0 -55
- package/src/FieldTypeColor/FieldTypeColor.stories.tsx +0 -35
- package/src/FieldTypeColor/index.tsx +0 -43
- package/src/FieldTypeDate/FieldTypeDate.stories.tsx +0 -23
- package/src/FieldTypeDate/index.tsx +0 -35
- package/src/FieldTypeDateTime/FieldTypeDateTime.stories.tsx +0 -23
- package/src/FieldTypeDateTime/index.tsx +0 -36
- package/src/FieldTypeNumber/FieldTypeNumber.stories.tsx +0 -35
- package/src/FieldTypeNumber/index.tsx +0 -22
- package/src/FieldTypeOneToMany/FieldTypeOneToMany.stories.tsx +0 -47
- package/src/FieldTypeOneToMany/index.tsx +0 -90
- package/src/FieldTypeOneToOne/FieldTypeOneToOne.stories.tsx +0 -46
- package/src/FieldTypeOneToOne/index.tsx +0 -96
- package/src/FieldTypeSort/FieldTypeSort.stories.tsx +0 -36
- package/src/FieldTypeSort/index.tsx +0 -70
- package/src/FieldTypeText/FieldTypeText.stories.tsx +0 -45
- package/src/FieldTypeText/index.tsx +0 -35
- package/src/FieldTypeUrl/FieldTypeUrl.stories.tsx +0 -33
- package/src/FieldTypeUrl/index.tsx +0 -44
- package/src/LegacyTheme/index.ts +0 -88
- package/src/LegacyTheme/palette.ts +0 -25
- package/src/VitualizedAutocomplete/VirtualizedAutocomplete.stories.tsx +0 -45
- package/src/VitualizedAutocomplete/index.tsx +0 -69
- package/src/theme/Theme.stories.tsx +0 -16
- package/src/theme/index.ts +0 -53
- package/src/theme/palette.ts +0 -153
- package/src/theme/typography.ts +0 -69
- package/src/utils/virtualization.tsx +0 -107
- package/tsconfig.json +0 -22
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const palette = {
|
|
4
|
+
primary: {
|
|
5
|
+
main: "#FF5D03",
|
|
6
|
+
dark: "#EC4A0A",
|
|
7
|
+
light: "#FD853A",
|
|
8
|
+
},
|
|
9
|
+
success: {
|
|
10
|
+
main: "#12B76A",
|
|
11
|
+
dark: "#027A48",
|
|
12
|
+
light: "#D1FADF",
|
|
13
|
+
},
|
|
14
|
+
warning: {
|
|
15
|
+
main: "#F79009",
|
|
16
|
+
dark: "B54708",
|
|
17
|
+
light: "#FEF0C7",
|
|
18
|
+
},
|
|
19
|
+
error: {
|
|
20
|
+
main: "#F04438",
|
|
21
|
+
dark: "#B42318",
|
|
22
|
+
light: "#FECDCA",
|
|
23
|
+
},
|
|
24
|
+
info: {
|
|
25
|
+
main: "#0BA5EC",
|
|
26
|
+
dark: "#026AA2",
|
|
27
|
+
light: "#7CD4FD",
|
|
28
|
+
},
|
|
29
|
+
text: {
|
|
30
|
+
primary: "#101828",
|
|
31
|
+
secondary: "#475467",
|
|
32
|
+
},
|
|
33
|
+
grey: {
|
|
34
|
+
50: "#F9FAFB",
|
|
35
|
+
100: "#F2F4F7",
|
|
36
|
+
200: "#E4E7EC",
|
|
37
|
+
300: "#D0D5DD",
|
|
38
|
+
400: "#98A2B3",
|
|
39
|
+
500: "#667085",
|
|
40
|
+
600: "#475467",
|
|
41
|
+
700: "#344054",
|
|
42
|
+
800: "#1D2939",
|
|
43
|
+
900: "#101828",
|
|
44
|
+
},
|
|
45
|
+
deepPurple: {
|
|
46
|
+
50: '#F8F9FC',
|
|
47
|
+
100: '#EAECF5',
|
|
48
|
+
200: '#C8CCE5',
|
|
49
|
+
300: '#9EA5D1',
|
|
50
|
+
400: "#4E5BA6",
|
|
51
|
+
500: '#4E5BA6',
|
|
52
|
+
600: '#3E4784',
|
|
53
|
+
700: '#363F72',
|
|
54
|
+
800: '#293056',
|
|
55
|
+
900: '#101323'
|
|
56
|
+
},
|
|
57
|
+
deepOrange: {
|
|
58
|
+
50: "#FFF6ED",
|
|
59
|
+
100: "#FFEAD5",
|
|
60
|
+
200: "#FDDCAB",
|
|
61
|
+
300: "#FEB273",
|
|
62
|
+
400: "#FD853A",
|
|
63
|
+
500: "#FF5C08",
|
|
64
|
+
600: "#EC4A0A",
|
|
65
|
+
700: "#C4320A",
|
|
66
|
+
800: "#9C2A10",
|
|
67
|
+
900: "#7E2410",
|
|
68
|
+
},
|
|
69
|
+
red: {
|
|
70
|
+
50: '#FEF3F2',
|
|
71
|
+
100: '#FEE4E2',
|
|
72
|
+
200: '#FECDCA',
|
|
73
|
+
300: '#FDA29B',
|
|
74
|
+
400: '#F97066',
|
|
75
|
+
500: '#F04438',
|
|
76
|
+
600: '#D92D20',
|
|
77
|
+
700: '#B42318',
|
|
78
|
+
800: '#912018',
|
|
79
|
+
900: '#7A271A',
|
|
80
|
+
},
|
|
81
|
+
pink: {
|
|
82
|
+
50: '#FDF2FA',
|
|
83
|
+
100: '#FCE7F6',
|
|
84
|
+
200: '#FCCEEE',
|
|
85
|
+
300: '#FAA7E0',
|
|
86
|
+
400: "#F670C7",
|
|
87
|
+
500: '#EE46BC',
|
|
88
|
+
600: '#DD2590',
|
|
89
|
+
700: '#C11574',
|
|
90
|
+
800: '#9E165F',
|
|
91
|
+
900: '#851651',
|
|
92
|
+
},
|
|
93
|
+
blue: {
|
|
94
|
+
50: '#F0F9FF',
|
|
95
|
+
100: "#E0F2FE",
|
|
96
|
+
200: '#B9E6FE',
|
|
97
|
+
300: '#7CD4FD',
|
|
98
|
+
400: "#36BFFA",
|
|
99
|
+
500: '#0BA5EC',
|
|
100
|
+
600: '#0086C9',
|
|
101
|
+
700: '#026AA2',
|
|
102
|
+
800: '#065986',
|
|
103
|
+
900: '#0B4A6F',
|
|
104
|
+
},
|
|
105
|
+
green: {
|
|
106
|
+
50: '#ECFDF3',
|
|
107
|
+
100: "#D1FADF",
|
|
108
|
+
200: '#A6F4C5',
|
|
109
|
+
300: '#6CE9A6',
|
|
110
|
+
400: "#32D583",
|
|
111
|
+
500: '#12B76A',
|
|
112
|
+
600: '#039855',
|
|
113
|
+
700: '#027A48',
|
|
114
|
+
800: '#05603A',
|
|
115
|
+
900: '#054F31',
|
|
116
|
+
},
|
|
117
|
+
purple: {
|
|
118
|
+
50: '#F3E5F5',
|
|
119
|
+
100: '#E1BEE7',
|
|
120
|
+
200: '#CE93D8',
|
|
121
|
+
300: '#BA68C8',
|
|
122
|
+
400: '#AB47BC',
|
|
123
|
+
500: '#9C27B0',
|
|
124
|
+
600: '#8E24AA',
|
|
125
|
+
700: '#7B1FA2',
|
|
126
|
+
800: '#6A1B9A',
|
|
127
|
+
900: '#4A148C',
|
|
128
|
+
},
|
|
129
|
+
action: {
|
|
130
|
+
active: "rgba(16, 24, 40, 0.40)",
|
|
131
|
+
hover: "rgba(16, 24, 40, 0.04)",
|
|
132
|
+
selected: "rgba(16, 24, 40, 0.08)",
|
|
133
|
+
disabled: "rgba(16, 24, 40, 0.26)",
|
|
134
|
+
disabledBackground: "rgba(16, 24, 40, 0.12)",
|
|
135
|
+
focus: "rgba(16, 24, 40, 0.12)",
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
exports.default = palette;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TypographyVariantsOptions } from '@mui/material/styles';
|
|
2
|
+
import { TypographyStyleOptions } from '@mui/material/styles/createTypography';
|
|
3
|
+
declare module '@mui/material/styles' {
|
|
4
|
+
interface TypographyVariantsOptions {
|
|
5
|
+
body3?: TypographyStyleOptions;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
declare const typography: TypographyVariantsOptions;
|
|
9
|
+
export default typography;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const typography = {
|
|
4
|
+
fontFamily: "'Mulish'",
|
|
5
|
+
h1: {
|
|
6
|
+
fontSize: "36px",
|
|
7
|
+
lineHeight: "44px",
|
|
8
|
+
},
|
|
9
|
+
h2: {
|
|
10
|
+
fontSize: "32px",
|
|
11
|
+
lineHeight: "40px",
|
|
12
|
+
},
|
|
13
|
+
h3: {
|
|
14
|
+
fontSize: "28px",
|
|
15
|
+
lineHeight: "36px",
|
|
16
|
+
},
|
|
17
|
+
h4: {
|
|
18
|
+
fontSize: "24px",
|
|
19
|
+
lineHeight: "32px",
|
|
20
|
+
},
|
|
21
|
+
h5: {
|
|
22
|
+
fontSize: "20px",
|
|
23
|
+
lineHeight: "28px",
|
|
24
|
+
},
|
|
25
|
+
h6: {
|
|
26
|
+
fontSize: "16px",
|
|
27
|
+
lineHeight: "22px",
|
|
28
|
+
},
|
|
29
|
+
body1: {
|
|
30
|
+
fontSize: '16px',
|
|
31
|
+
lineHeight: '24px',
|
|
32
|
+
},
|
|
33
|
+
body2: {
|
|
34
|
+
fontSize: '14px',
|
|
35
|
+
lineHeight: '20px',
|
|
36
|
+
},
|
|
37
|
+
body3: {
|
|
38
|
+
fontSize: '12px',
|
|
39
|
+
lineHeight: '18px',
|
|
40
|
+
letterSpacing: '0.15px',
|
|
41
|
+
},
|
|
42
|
+
subtitle1: {
|
|
43
|
+
fontSize: '16px',
|
|
44
|
+
lineHeight: "28px",
|
|
45
|
+
},
|
|
46
|
+
subtitle2: {
|
|
47
|
+
fontSize: '14px',
|
|
48
|
+
lineHeight: "22px",
|
|
49
|
+
},
|
|
50
|
+
caption: {
|
|
51
|
+
fontSize: '12px',
|
|
52
|
+
lineHeight: "20px",
|
|
53
|
+
},
|
|
54
|
+
overline: {
|
|
55
|
+
fontSize: "12px",
|
|
56
|
+
letterSpacing: "1px",
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
exports.default = typography;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListboxComponent = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const useMediaQuery_1 = require("@mui/material/useMediaQuery");
|
|
7
|
+
const ListSubheader_1 = require("@mui/material/ListSubheader");
|
|
8
|
+
const styles_1 = require("@mui/material/styles");
|
|
9
|
+
const react_window_1 = require("react-window");
|
|
10
|
+
const Typography_1 = require("@mui/material/Typography");
|
|
11
|
+
const LISTBOX_PADDING = 8; // px
|
|
12
|
+
function renderRow(props) {
|
|
13
|
+
const { data, index, style } = props;
|
|
14
|
+
const dataSet = data[index];
|
|
15
|
+
const inlineStyle = {
|
|
16
|
+
...style,
|
|
17
|
+
top: style.top + LISTBOX_PADDING,
|
|
18
|
+
};
|
|
19
|
+
if (dataSet.hasOwnProperty('group')) {
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(ListSubheader_1.default, { component: "div", style: inlineStyle, children: dataSet.group }, dataSet.key));
|
|
21
|
+
}
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(Typography_1.default, { component: "li", ...dataSet[0], noWrap: true, style: inlineStyle, children: dataSet[1] }));
|
|
23
|
+
}
|
|
24
|
+
const OuterElementContext = React.createContext({});
|
|
25
|
+
const OuterElementType = React.forwardRef((props, ref) => {
|
|
26
|
+
const outerProps = React.useContext(OuterElementContext);
|
|
27
|
+
return (0, jsx_runtime_1.jsx)("div", { ref: ref, ...props, ...outerProps });
|
|
28
|
+
});
|
|
29
|
+
function useResetCache(data) {
|
|
30
|
+
const ref = React.useRef(null);
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
if (ref.current != null) {
|
|
33
|
+
ref.current.resetAfterIndex(0, true);
|
|
34
|
+
}
|
|
35
|
+
}, [data]);
|
|
36
|
+
return ref;
|
|
37
|
+
}
|
|
38
|
+
// Adapter for react-window
|
|
39
|
+
exports.ListboxComponent = React.forwardRef(function ListboxComponent(props, ref) {
|
|
40
|
+
const { children, ...other } = props;
|
|
41
|
+
const itemData = [];
|
|
42
|
+
children.forEach((item) => {
|
|
43
|
+
itemData.push(item);
|
|
44
|
+
itemData.push(...(item.children || []));
|
|
45
|
+
});
|
|
46
|
+
const theme = (0, styles_1.useTheme)();
|
|
47
|
+
const smUp = (0, useMediaQuery_1.default)(theme.breakpoints.up('sm'), {
|
|
48
|
+
noSsr: true,
|
|
49
|
+
});
|
|
50
|
+
const itemCount = itemData.length;
|
|
51
|
+
const itemSize = smUp ? 36 : 48;
|
|
52
|
+
const getChildSize = (child) => {
|
|
53
|
+
if (child.hasOwnProperty('group')) {
|
|
54
|
+
return 48;
|
|
55
|
+
}
|
|
56
|
+
return itemSize;
|
|
57
|
+
};
|
|
58
|
+
const getHeight = () => {
|
|
59
|
+
if (itemCount > 8) {
|
|
60
|
+
return 8 * itemSize;
|
|
61
|
+
}
|
|
62
|
+
return itemData.map(getChildSize).reduce((a, b) => a + b, 0);
|
|
63
|
+
};
|
|
64
|
+
const gridRef = useResetCache(itemCount);
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, children: (0, jsx_runtime_1.jsx)(OuterElementContext.Provider, { value: other, children: (0, jsx_runtime_1.jsx)(react_window_1.VariableSizeList, { itemData: itemData, height: getHeight() + 2 * LISTBOX_PADDING, width: "100%", ref: gridRef, outerElementType: OuterElementType, innerElementType: "ul", itemSize: (index) => getChildSize(itemData[index]), overscanCount: 5, itemCount: itemCount, children: renderRow }) }) }));
|
|
66
|
+
});
|
package/es/LegacyTheme/index.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InputAdornment, TextField, IconButton } from '@mui/material';
|
|
3
|
+
import { Close, Search } from '@mui/icons-material';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'TextField',
|
|
6
|
+
component: TextField,
|
|
7
|
+
argType: {},
|
|
8
|
+
};
|
|
9
|
+
const Template = (args) => {
|
|
10
|
+
return (_jsx(TextField, { ...args, InputProps: {
|
|
11
|
+
startAdornment: (_jsx(InputAdornment, { position: "start", children: _jsx(IconButton, { size: "small", children: _jsx(Search, { fontSize: "small" }) }) })),
|
|
12
|
+
endAdornment: (_jsx(InputAdornment, { position: "start", children: _jsx(IconButton, { size: "small", children: _jsx(Close, { fontSize: "small" }) }) })),
|
|
13
|
+
} }));
|
|
14
|
+
};
|
|
15
|
+
export const Default = Template.bind({});
|
|
16
|
+
Default.args = {
|
|
17
|
+
placeholder: 'Placeholder Text...',
|
|
18
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SvgIcon } from "@mui/material";
|
|
3
|
+
export const FolderGlobal = (props) => (_jsxs(SvgIcon, { ...props, children: [_jsx("path", { d: "M10.59 4.59C10.21 4.21 9.7 4 9.17 4H4C2.9 4 2.01 4.9 2.01 6L2 18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V8C22 6.9 21.1 6 20 6H12L10.59 4.59Z", fill: "#101828", "fill-opacity": "0.4" }), _jsx("g", { "clip-path": "url(#clip0_8594_1046)", children: _jsx("path", { d: "M15.996 8.83325C13.696 8.83325 11.8335 10.6999 11.8335 12.9999C11.8335 15.2999 13.696 17.1666 15.996 17.1666C18.3002 17.1666 20.1668 15.2999 20.1668 12.9999C20.1668 10.6999 18.3002 8.83325 15.996 8.83325ZM18.8835 11.3333H17.6543C17.521 10.8124 17.3293 10.3124 17.0793 9.84992C17.846 10.1124 18.4835 10.6458 18.8835 11.3333ZM16.0002 9.68325C16.346 10.1833 16.6168 10.7374 16.796 11.3333H15.2043C15.3835 10.7374 15.6543 10.1833 16.0002 9.68325ZM12.7752 13.8333C12.7085 13.5666 12.6668 13.2874 12.6668 12.9999C12.6668 12.7124 12.7085 12.4333 12.7752 12.1666H14.1835C14.1502 12.4416 14.1252 12.7166 14.1252 12.9999C14.1252 13.2833 14.1502 13.5583 14.1835 13.8333H12.7752ZM13.1168 14.6666H14.346C14.4793 15.1874 14.671 15.6874 14.921 16.1499C14.1543 15.8874 13.5168 15.3583 13.1168 14.6666ZM14.346 11.3333H13.1168C13.5168 10.6416 14.1543 10.1124 14.921 9.84992C14.671 10.3124 14.4793 10.8124 14.346 11.3333ZM16.0002 16.3166C15.6543 15.8166 15.3835 15.2624 15.2043 14.6666H16.796C16.6168 15.2624 16.346 15.8166 16.0002 16.3166ZM16.9752 13.8333H15.0252C14.9877 13.5583 14.9585 13.2833 14.9585 12.9999C14.9585 12.7166 14.9877 12.4374 15.0252 12.1666H16.9752C17.0127 12.4374 17.0418 12.7166 17.0418 12.9999C17.0418 13.2833 17.0127 13.5583 16.9752 13.8333ZM17.0793 16.1499C17.3293 15.6874 17.521 15.1874 17.6543 14.6666H18.8835C18.4835 15.3541 17.846 15.8874 17.0793 16.1499ZM17.8168 13.8333C17.8502 13.5583 17.8752 13.2833 17.8752 12.9999C17.8752 12.7166 17.8502 12.4416 17.8168 12.1666H19.2252C19.2918 12.4333 19.3335 12.7124 19.3335 12.9999C19.3335 13.2874 19.2918 13.5666 19.2252 13.8333H17.8168Z", fill: "white" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_8594_1046", children: _jsx("rect", { width: "10", height: "10", fill: "white", transform: "translate(11 8)" }) }) })] }));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FolderGlobal } from "./FolderGlobal";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FolderGlobal } from "./FolderGlobal";
|
package/es/index.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export { default as FieldTypeOneToMany } from './FieldTypeOneToMany';
|
|
|
12
12
|
export { default as CopyButton } from './CopyButton';
|
|
13
13
|
export { default as ConfirmDialog } from './ConfirmDialog';
|
|
14
14
|
export { default as VirtualizedAutocomplete } from './VitualizedAutocomplete';
|
|
15
|
+
export * from './icons';
|
package/es/index.js
CHANGED
|
@@ -12,3 +12,4 @@ export { default as FieldTypeOneToMany } from './FieldTypeOneToMany';
|
|
|
12
12
|
export { default as CopyButton } from './CopyButton';
|
|
13
13
|
export { default as ConfirmDialog } from './ConfirmDialog';
|
|
14
14
|
export { default as VirtualizedAutocomplete } from './VitualizedAutocomplete';
|
|
15
|
+
export * from './icons';
|
package/es/theme/index.d.ts
CHANGED
package/es/theme/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import palette from './palette';
|
|
2
2
|
import typography from './typography';
|
|
3
|
-
import { createTheme } from '@mui/material/styles';
|
|
3
|
+
import { alpha, createTheme, } from '@mui/material/styles';
|
|
4
4
|
let theme = createTheme({
|
|
5
5
|
palette,
|
|
6
6
|
typography,
|
|
@@ -18,7 +18,7 @@ theme = createTheme(theme, {
|
|
|
18
18
|
styleOverrides: {
|
|
19
19
|
root: {
|
|
20
20
|
borderBottom: 2,
|
|
21
|
-
borderColor: theme
|
|
21
|
+
borderColor: theme?.palette?.grey?.[100],
|
|
22
22
|
borderStyle: "solid",
|
|
23
23
|
},
|
|
24
24
|
},
|
|
@@ -41,10 +41,103 @@ theme = createTheme(theme, {
|
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
MuiButton: {
|
|
44
|
+
styleOverrides: { root: { textTransform: 'none' } },
|
|
44
45
|
defaultProps: {
|
|
45
46
|
disableElevation: true,
|
|
46
47
|
},
|
|
47
48
|
},
|
|
49
|
+
MuiOutlinedInput: {
|
|
50
|
+
styleOverrides: {
|
|
51
|
+
root: {
|
|
52
|
+
padding: "0px 8px",
|
|
53
|
+
borderRadius: '8px',
|
|
54
|
+
},
|
|
55
|
+
input: {
|
|
56
|
+
padding: "10px 0px",
|
|
57
|
+
},
|
|
58
|
+
sizeSmall: {
|
|
59
|
+
'input': {
|
|
60
|
+
padding: "8px 0px",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
notchedOutline: {
|
|
64
|
+
// Important to override all pseudo classes
|
|
65
|
+
borderColor: `${theme.palette.border} !important`,
|
|
66
|
+
},
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
MuiInputBase: {
|
|
70
|
+
styleOverrides: {
|
|
71
|
+
input: {
|
|
72
|
+
...theme.typography.body2,
|
|
73
|
+
'::placeholder': {
|
|
74
|
+
color: theme?.palette?.text?.disabled
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
MuiInputAdornment: {
|
|
80
|
+
styleOverrides: {
|
|
81
|
+
root: {
|
|
82
|
+
'& > .MuiSvgIcon-root': {
|
|
83
|
+
margin: '4px',
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
MuiIconButton: {
|
|
89
|
+
styleOverrides: {
|
|
90
|
+
sizeSmall: {
|
|
91
|
+
padding: '4px',
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
MuiDialogTitle: {
|
|
96
|
+
styleOverrides: {
|
|
97
|
+
root: {
|
|
98
|
+
...theme.typography.h5,
|
|
99
|
+
fontWeight: 600,
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
MuiDialogContentText: {
|
|
104
|
+
styleOverrides: {
|
|
105
|
+
root: {
|
|
106
|
+
...theme.typography.body2,
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
MuiTreeItem: {
|
|
111
|
+
styleOverrides: {
|
|
112
|
+
content: {
|
|
113
|
+
paddingTop: '6px',
|
|
114
|
+
paddingBottom: '6px',
|
|
115
|
+
paddingLeft: 0,
|
|
116
|
+
paddingRight: '12px',
|
|
117
|
+
borderRadius: 4,
|
|
118
|
+
width: "unset",
|
|
119
|
+
'&.Mui-selected': {
|
|
120
|
+
background: alpha(theme?.palette?.primary?.main, 0.04),
|
|
121
|
+
' .MuiTreeItem-label .MuiSvgIcon-root': {
|
|
122
|
+
color: theme?.palette?.primary?.main,
|
|
123
|
+
},
|
|
124
|
+
' .MuiTypography-root': {
|
|
125
|
+
color: theme?.palette?.primary?.dark,
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
label: {
|
|
130
|
+
paddingLeft: '0',
|
|
131
|
+
},
|
|
132
|
+
iconContainer: {
|
|
133
|
+
marginRight: '0',
|
|
134
|
+
width: '24px',
|
|
135
|
+
'svg': {
|
|
136
|
+
fontSize: '24px',
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
48
141
|
},
|
|
49
142
|
});
|
|
50
143
|
export default theme;
|
package/es/theme/palette.d.ts
CHANGED
package/es/theme/palette.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const palette = {
|
|
2
2
|
primary: {
|
|
3
|
-
main: "#
|
|
3
|
+
main: "#FF5D0A",
|
|
4
4
|
dark: "#EC4A0A",
|
|
5
5
|
light: "#FD853A",
|
|
6
6
|
},
|
|
@@ -27,6 +27,7 @@ const palette = {
|
|
|
27
27
|
text: {
|
|
28
28
|
primary: "#101828",
|
|
29
29
|
secondary: "#475467",
|
|
30
|
+
disabled: "#101828",
|
|
30
31
|
},
|
|
31
32
|
grey: {
|
|
32
33
|
50: "#F9FAFB",
|
|
@@ -124,6 +125,7 @@ const palette = {
|
|
|
124
125
|
800: '#6A1B9A',
|
|
125
126
|
900: '#4A148C',
|
|
126
127
|
},
|
|
128
|
+
border: "#F2F4F7",
|
|
127
129
|
action: {
|
|
128
130
|
active: "rgba(16, 24, 40, 0.40)",
|
|
129
131
|
hover: "rgba(16, 24, 40, 0.04)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zesty-io/material",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Contains custom components which are in addition to the @mui design-system",
|
|
5
5
|
"author": "Zesty.io",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"url": "https://github.com/zesty-io/material/issues"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://zesty-io.github.io/material",
|
|
15
|
-
"main": "
|
|
16
|
-
"module": "es/index.js",
|
|
17
|
-
"types": "es/index.d.ts",
|
|
15
|
+
"main": "./cjs/index.js",
|
|
16
|
+
"module": "./es/index.js",
|
|
17
|
+
"types": "./es/index.d.ts",
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "npm ci && tsc",
|
|
20
20
|
"prerelease": "npm test",
|
|
@@ -46,10 +46,14 @@
|
|
|
46
46
|
"@types/react-window": "^1.8.5",
|
|
47
47
|
"babel-loader": "^8.2.5",
|
|
48
48
|
"gh-pages": "^3.2.3",
|
|
49
|
-
"react": "^
|
|
49
|
+
"react": "^17.0.2",
|
|
50
50
|
"react-docgen-typescript": "^2.2.2",
|
|
51
|
-
"react-dom": "^
|
|
51
|
+
"react-dom": "^17.0.2",
|
|
52
52
|
"react-json-view": "^1.21.3",
|
|
53
53
|
"typescript": "^4.6.3"
|
|
54
|
-
}
|
|
54
|
+
},
|
|
55
|
+
"files": [
|
|
56
|
+
"cjs",
|
|
57
|
+
"es"
|
|
58
|
+
]
|
|
55
59
|
}
|
package/.storybook/main.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
],
|
|
10
|
-
"framework": "@storybook/react",
|
|
11
|
-
typescript: {
|
|
12
|
-
check: true,
|
|
13
|
-
reactDocgen: 'react-docgen-typescript',
|
|
14
|
-
reactDocgenTypescriptOptions: {
|
|
15
|
-
shouldExtractLiteralValuesFromEnum: true,
|
|
16
|
-
shouldRemoveUndefinedFromOptional: true,
|
|
17
|
-
propFilter: (prop) => {
|
|
18
|
-
return prop.parent
|
|
19
|
-
? /@mui/.test(prop.parent.fileName) ||
|
|
20
|
-
!/node_modules/.test(prop.parent.fileName)
|
|
21
|
-
: true;
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Mulish" />
|
package/.storybook/preview.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ThemeProvider } from 'emotion-theming';
|
|
3
|
-
import { theme } from '../src/index.ts';
|
|
4
|
-
|
|
5
|
-
export const parameters = {
|
|
6
|
-
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const decorators = [
|
|
10
|
-
(Story) => (
|
|
11
|
-
<ThemeProvider theme={theme}>
|
|
12
|
-
<Story />
|
|
13
|
-
</ThemeProvider>
|
|
14
|
-
),
|
|
15
|
-
];
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { Story, Meta } from '@storybook/react/types-6-0';
|
|
3
|
-
import { Button, Stack } from '@mui/material';
|
|
4
|
-
import ConfirmDialog, { ConfirmDialogProps } from '.';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'ConfirmDialog',
|
|
8
|
-
component: ConfirmDialog,
|
|
9
|
-
argType: {},
|
|
10
|
-
} as Meta;
|
|
11
|
-
|
|
12
|
-
const Template: Story<ConfirmDialogProps> = (args) => {
|
|
13
|
-
const [open, setOpen] = useState(false);
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<>
|
|
17
|
-
<Button variant="contained" onClick={() => setOpen(true)}>Click me to open</Button>
|
|
18
|
-
<ConfirmDialog {...args} open={open} callback={(confirmed) => setOpen(false) } />
|
|
19
|
-
</>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const Default = Template.bind({});
|
|
24
|
-
Default.args = {
|
|
25
|
-
title: 'Confirm modal title',
|
|
26
|
-
content: 'Confirm modal content',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const CustomChildren = Template.bind({});
|
|
30
|
-
CustomChildren.args = {
|
|
31
|
-
title: 'Confirm modal title',
|
|
32
|
-
content: 'Confirm modal content',
|
|
33
|
-
children: <><Button color="error" variant="contained">Custom 1</Button><Button color="success" variant="contained">Custom 2</Button></>
|
|
34
|
-
};
|
|
35
|
-
|