asma-core-ui 0.0.1
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/Readme.md +54 -0
- package/dist/asma-core-ui.es.js +3403 -0
- package/dist/components/StyledButton.d.ts +34 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/tokenOptimizer.helper.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/style.css +1 -0
- package/dist/styles/fretex-tokens/index.d.ts +4 -0
- package/dist/styles/greenish-tokens/index.d.ts +4 -0
- package/dist/styles/tokens/index.d.ts +4 -0
- package/dist/theme/customMuiColors.d.ts +61 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/theme.d.ts +107 -0
- package/package.json +104 -0
- package/tailwind-configs/tw_animation.cjs +43 -0
- package/tailwind-configs/tw_box_shadow.cjs +3 -0
- package/tailwind-configs/tw_configs.cjs +8 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledButton: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
|
|
5
|
+
color?: "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
disableElevation?: boolean | undefined;
|
|
8
|
+
disableFocusRipple?: boolean | undefined;
|
|
9
|
+
endIcon?: import("react").ReactNode;
|
|
10
|
+
fullWidth?: boolean | undefined;
|
|
11
|
+
href?: string | undefined;
|
|
12
|
+
size?: "small" | "medium" | "large" | undefined;
|
|
13
|
+
startIcon?: import("react").ReactNode;
|
|
14
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
15
|
+
variant?: "text" | "outlined" | "contained" | undefined;
|
|
16
|
+
} & Omit<{
|
|
17
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
18
|
+
centerRipple?: boolean | undefined;
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
21
|
+
disabled?: boolean | undefined;
|
|
22
|
+
disableRipple?: boolean | undefined;
|
|
23
|
+
disableTouchRipple?: boolean | undefined;
|
|
24
|
+
focusRipple?: boolean | undefined;
|
|
25
|
+
focusVisibleClassName?: string | undefined;
|
|
26
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
27
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
28
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
29
|
+
tabIndex?: number | undefined;
|
|
30
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
31
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
32
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
33
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
34
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StyledButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tokenOptimizer.helper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function tokenOptimizer<T>(object: T): T;
|
package/dist/index.d.ts
ADDED
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--colors-teal-50: #e9fcfc;--colors-teal-100: #dffafa;--colors-teal-200: #bef4f4;--colors-teal-300: #78e8e8;--colors-teal-400: #32dcdc;--colors-teal-500: #1ca1a1;--colors-teal-600: #157a7a;--colors-teal-700: #105c5c;--colors-teal-800: #0b4141;--colors-teal-900: #093434;--colors-blue-50: #e6f2f8;--colors-blue-100: #cce6f1;--colors-blue-200: #99cce4;--colors-blue-300: #66b3d6;--colors-blue-400: #3399c9;--colors-blue-500: #0080bb;--colors-blue-600: #0073a8;--colors-blue-700: #005a83;--colors-blue-800: #00405e;--colors-blue-900: #002638;--colors-xanadu-50: #eff4f2;--colors-xanadu-100: #dee8e4;--colors-xanadu-200: #ceddd7;--colors-xanadu-300: #bdd1c9;--colors-xanadu-400: #adc6bc;--colors-xanadu-500: #9cb2a9;--colors-xanadu-600: #8a9e96;--colors-xanadu-700: #798b84;--colors-xanadu-800: #4e5955;--colors-xanadu-900: #2f3533;--colors-primary-50: #e6f2f8;--colors-primary-100: #cce6f1;--colors-primary-200: #99cce4;--colors-primary-300: #66b3d6;--colors-primary-400: #3399c9;--colors-primary-500: #0080bb;--colors-primary-600: #0073a8;--colors-primary-700: #005a83;--colors-primary-800: #00405e;--colors-primary-900: #002638}[data-theme=fretex]{--colors-primary-50: #eff4f2;--colors-primary-100: #dee8e4;--colors-primary-200: #ceddd7;--colors-primary-300: #bdd1c9;--colors-primary-400: #adc6bc;--colors-primary-500: #9cb2a9;--colors-primary-600: #8a9e96;--colors-primary-700: #798b84;--colors-primary-800: #4e5955;--colors-primary-900: #2f3533}[data-theme=greenish]{--colors-primary-50: #e9fcfc;--colors-primary-100: #dffafa;--colors-primary-200: #bef4f4;--colors-primary-300: #78e8e8;--colors-primary-400: #32dcdc;--colors-primary-500: #1ca1a1;--colors-primary-600: #157a7a;--colors-primary-700: #105c5c;--colors-primary-800: #0b4141;--colors-primary-900: #093434}.border-primary-main{border-color:var(--colors-primary-600)!important}.bg-primary-main{background-color:var(--colors-primary-600)!important}.bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity))!important}.bg-primary-700{background-color:var(--colors-primary-700)!important}.bg-primary-100{background-color:var(--colors-primary-100)!important}.normal-case{text-transform:none!important}.text-gray-400{--tw-text-opacity: 1 !important;color:rgb(156 163 175 / var(--tw-text-opacity))!important}.text-primary-dark{color:var(--colors-primary-900)!important}.overline{text-decoration-line:overline!important}.shadow-\[0_0_0_3px\]{--tw-shadow: 0 0 0 3px !important;--tw-shadow-colored: 0 0 0 3px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow-primary-400{--tw-shadow-color: var(--colors-primary-400) !important;--tw-shadow: var(--tw-shadow-colored) !important}.hover\:border-primary-500:hover{border-color:var(--colors-primary-500)!important}.hover\:bg-primary-700:hover{background-color:var(--colors-primary-700)!important}.hover\:bg-primary-500:hover{background-color:var(--colors-primary-500)!important}.hover\:text-gray-50:hover{--tw-text-opacity: 1 !important;color:rgb(249 250 251 / var(--tw-text-opacity))!important}.active\:bg-primary-dark:active{background-color:var(--colors-primary-900)!important}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare const customPalettes: {
|
|
2
|
+
greenish: {
|
|
3
|
+
primary: {
|
|
4
|
+
"50": string;
|
|
5
|
+
"100": string;
|
|
6
|
+
"200": string;
|
|
7
|
+
"300": string;
|
|
8
|
+
"400": string;
|
|
9
|
+
"500": string;
|
|
10
|
+
"600": string;
|
|
11
|
+
"700": string;
|
|
12
|
+
"800": string;
|
|
13
|
+
"900": string;
|
|
14
|
+
light: string;
|
|
15
|
+
main: string;
|
|
16
|
+
dark: string;
|
|
17
|
+
contrastText: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
fretex: {
|
|
21
|
+
primary: {
|
|
22
|
+
"50": string;
|
|
23
|
+
"100": string;
|
|
24
|
+
"200": string;
|
|
25
|
+
"300": string;
|
|
26
|
+
"400": string;
|
|
27
|
+
"500": string;
|
|
28
|
+
"600": string;
|
|
29
|
+
"700": string;
|
|
30
|
+
"800": string;
|
|
31
|
+
"900": string;
|
|
32
|
+
light: string;
|
|
33
|
+
main: string;
|
|
34
|
+
dark: string;
|
|
35
|
+
contrastText: string;
|
|
36
|
+
};
|
|
37
|
+
secondary: {
|
|
38
|
+
100: string;
|
|
39
|
+
200: string;
|
|
40
|
+
300: string;
|
|
41
|
+
400: string;
|
|
42
|
+
500: string;
|
|
43
|
+
600: string;
|
|
44
|
+
700: string;
|
|
45
|
+
800: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
role: {
|
|
49
|
+
patient: {
|
|
50
|
+
light: string;
|
|
51
|
+
main: string;
|
|
52
|
+
dark: string;
|
|
53
|
+
};
|
|
54
|
+
network: {
|
|
55
|
+
light: string;
|
|
56
|
+
main: string;
|
|
57
|
+
dark: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export default customPalettes;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { SimplePaletteColorOptions } from '@mui/material';
|
|
2
|
+
declare const theme: {
|
|
3
|
+
palette: {
|
|
4
|
+
primary: {
|
|
5
|
+
"50": string;
|
|
6
|
+
"100": string;
|
|
7
|
+
"200": string;
|
|
8
|
+
"300": string;
|
|
9
|
+
"400": string;
|
|
10
|
+
"500": string;
|
|
11
|
+
"600": string;
|
|
12
|
+
"700": string;
|
|
13
|
+
"800": string;
|
|
14
|
+
"900": string;
|
|
15
|
+
light: string;
|
|
16
|
+
main: string;
|
|
17
|
+
dark: string;
|
|
18
|
+
contrastText: string;
|
|
19
|
+
};
|
|
20
|
+
error: {
|
|
21
|
+
main: string;
|
|
22
|
+
light: string;
|
|
23
|
+
};
|
|
24
|
+
success: {
|
|
25
|
+
light: string;
|
|
26
|
+
main: string;
|
|
27
|
+
dark: string;
|
|
28
|
+
};
|
|
29
|
+
warning: {
|
|
30
|
+
light: string;
|
|
31
|
+
main: string;
|
|
32
|
+
dark: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
typography: {
|
|
36
|
+
fontFamily: string;
|
|
37
|
+
fontSize: number;
|
|
38
|
+
h1: {
|
|
39
|
+
fontSize: string;
|
|
40
|
+
fontWeight: string;
|
|
41
|
+
marginBottom: string;
|
|
42
|
+
};
|
|
43
|
+
h2: {
|
|
44
|
+
fontSize: string;
|
|
45
|
+
fontWeight: string;
|
|
46
|
+
marginBottom: string;
|
|
47
|
+
};
|
|
48
|
+
h3: {
|
|
49
|
+
fontSize: string;
|
|
50
|
+
fontWeight: string;
|
|
51
|
+
marginBottom: string;
|
|
52
|
+
};
|
|
53
|
+
subtitle1: {
|
|
54
|
+
fontSize: string;
|
|
55
|
+
fontWeight: string;
|
|
56
|
+
};
|
|
57
|
+
subtitle2: {
|
|
58
|
+
fontSize: string;
|
|
59
|
+
fontWeight: number;
|
|
60
|
+
};
|
|
61
|
+
body1: {
|
|
62
|
+
fontSize: string;
|
|
63
|
+
fontWeight: string;
|
|
64
|
+
};
|
|
65
|
+
body2: {
|
|
66
|
+
fontSize: string;
|
|
67
|
+
fontWeight: string;
|
|
68
|
+
};
|
|
69
|
+
button: {
|
|
70
|
+
fontSize: string;
|
|
71
|
+
fontWeight: number;
|
|
72
|
+
};
|
|
73
|
+
caption: {
|
|
74
|
+
fontSize: string;
|
|
75
|
+
fontWeight: string;
|
|
76
|
+
};
|
|
77
|
+
overline: {
|
|
78
|
+
fontSize: string;
|
|
79
|
+
fontWeight: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export default theme;
|
|
84
|
+
declare module '@mui/material/styles' {
|
|
85
|
+
interface Theme {
|
|
86
|
+
palette: {
|
|
87
|
+
primary: {
|
|
88
|
+
50: string;
|
|
89
|
+
100: string;
|
|
90
|
+
200: string;
|
|
91
|
+
300: string;
|
|
92
|
+
400: string;
|
|
93
|
+
500: string;
|
|
94
|
+
600: string;
|
|
95
|
+
700: string;
|
|
96
|
+
800: string;
|
|
97
|
+
900: string;
|
|
98
|
+
light: string;
|
|
99
|
+
main: string;
|
|
100
|
+
dark: string;
|
|
101
|
+
};
|
|
102
|
+
success: SimplePaletteColorOptions;
|
|
103
|
+
warning: SimplePaletteColorOptions;
|
|
104
|
+
error: SimplePaletteColorOptions;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "asma-core-ui",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/**/*",
|
|
8
|
+
"dist/style.css",
|
|
9
|
+
"tailwind-configs"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"author": "asma-team",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"main": "./dist/asma-core-ui.es.js",
|
|
15
|
+
"module": "./dist/asma-core-ui.es.js",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "vite",
|
|
18
|
+
"build": "tsc && rm -rf ./dist && vite build",
|
|
19
|
+
"preview": "vite preview",
|
|
20
|
+
"lint": "eslint src/**/*.{js,jsx,ts,tsx}",
|
|
21
|
+
"lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
|
|
22
|
+
"prettier": "prettier --write src//**/*.{ts,tsx,scss} --config ./.prettierrc",
|
|
23
|
+
"storybook": "start-storybook -p 6006",
|
|
24
|
+
"storybook:node18": "export NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006",
|
|
25
|
+
"build-storybook": "build-storybook",
|
|
26
|
+
"create-index": "ctix create -p ./tsconfig.json -w -a ./src"
|
|
27
|
+
},
|
|
28
|
+
"license": "UNLICENSED",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@emotion/react": "^11.10.6",
|
|
31
|
+
"@emotion/styled": "^11.10.6",
|
|
32
|
+
"@fontsource/material-icons": "^4.5.4",
|
|
33
|
+
"@fontsource/roboto": "^4.5.8",
|
|
34
|
+
"@mui/material": "^5.11.13",
|
|
35
|
+
"@storybook/addon-styling": "^0.3.1",
|
|
36
|
+
"@storybook/addons": "^6.5.16",
|
|
37
|
+
"ctix": "^1.8.2",
|
|
38
|
+
"lodash-es": "^4.17.21",
|
|
39
|
+
"rollup-plugin-typescript2": "^0.34.1",
|
|
40
|
+
"storybook": "^6.5.16"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@babel/core": "^7.20.12",
|
|
44
|
+
"@rollup/plugin-commonjs": "21",
|
|
45
|
+
"@storybook/addon-actions": "^6.5.15",
|
|
46
|
+
"@storybook/addon-essentials": "^6.5.15",
|
|
47
|
+
"@storybook/addon-interactions": "^6.5.15",
|
|
48
|
+
"@storybook/addon-links": "^6.5.15",
|
|
49
|
+
"@storybook/builder-vite": "^0.2.6",
|
|
50
|
+
"@storybook/react": "^6.5.15",
|
|
51
|
+
"@storybook/testing-library": "^0.0.13",
|
|
52
|
+
"@types/lodash-es": "^4.17.7",
|
|
53
|
+
"@types/react": "^18.0.26",
|
|
54
|
+
"@types/react-dom": "^18.0.9",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
56
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
57
|
+
"@vitejs/plugin-react": "^3.0.0",
|
|
58
|
+
"autoprefixer": "^10.4.12",
|
|
59
|
+
"babel-loader": "^8.3.0",
|
|
60
|
+
"eslint": "^8.0.1",
|
|
61
|
+
"eslint-config-prettier": "^8.5.0",
|
|
62
|
+
"eslint-import-resolver-typescript": "^3.5.1",
|
|
63
|
+
"eslint-plugin-import": "^2.25.2",
|
|
64
|
+
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
65
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
66
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
67
|
+
"eslint-plugin-react": "^7.31.8",
|
|
68
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
69
|
+
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
70
|
+
"eslint-plugin-storybook": "^0.6.8",
|
|
71
|
+
"eslint-plugin-unused-imports": "^2.0.0",
|
|
72
|
+
"less": "^4.1.3",
|
|
73
|
+
"lint-staged": "^13.0.3",
|
|
74
|
+
"node-sass": "^8.0.0",
|
|
75
|
+
"postcss": "^8.4.16",
|
|
76
|
+
"prettier": "^2.7.1",
|
|
77
|
+
"prettier-plugin-tailwindcss": "^0.1.13",
|
|
78
|
+
"react": "^18.*",
|
|
79
|
+
"react-dom": "^18.*",
|
|
80
|
+
"react-hooks": "^1.0.1",
|
|
81
|
+
"sass": "^1.57.1",
|
|
82
|
+
"tailwind": "^4.0.0",
|
|
83
|
+
"tailwindcss": "^3.1.8",
|
|
84
|
+
"typescript": "^4.9.3",
|
|
85
|
+
"typescript-plugin-css-modules": "^3.4.0",
|
|
86
|
+
"vite": "^4.0.0",
|
|
87
|
+
"vite-plugin-dts": "^2.1.0",
|
|
88
|
+
"vite-tsconfig-paths": "^4.0.3"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"@emotion/react": "^11.*",
|
|
92
|
+
"@emotion/styled": "^11.*",
|
|
93
|
+
"@mui/material": "^5.*",
|
|
94
|
+
"react": "^18.*",
|
|
95
|
+
"react-dom": "^18.*"
|
|
96
|
+
},
|
|
97
|
+
"exports": {
|
|
98
|
+
".": {
|
|
99
|
+
"import": "./dist/asma-core-ui.es.js"
|
|
100
|
+
},
|
|
101
|
+
"./dist/style.css": "./dist/style.css",
|
|
102
|
+
"./tailwind-configs/tw_configs.cjs": "./tailwind-configs/tw_configs.cjs"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
animation: {
|
|
3
|
+
'slide-in': 'slide-in 0.3s linear',
|
|
4
|
+
'slide-out': 'slide-out 0.3s linear',
|
|
5
|
+
'opacity-in': 'opacity-in 0.1s linear',
|
|
6
|
+
'opacity-in-5': 'opacity-in 0.5s linear',
|
|
7
|
+
'opacity-appear-3': 'opacity-appear 0.3s linear',
|
|
8
|
+
'opacity-out': 'opacity-out 0.3s linear',
|
|
9
|
+
},
|
|
10
|
+
keyframes: {
|
|
11
|
+
'slide-in': {
|
|
12
|
+
'0%': { margin: '0 0 0 -320px' },
|
|
13
|
+
'100%': { margin: '0' },
|
|
14
|
+
},
|
|
15
|
+
'slide-out': {
|
|
16
|
+
'0%': { margin: '0' },
|
|
17
|
+
'100%': { margin: '0 0 0 -320px' },
|
|
18
|
+
},
|
|
19
|
+
'opacity-in': {
|
|
20
|
+
'0%': {
|
|
21
|
+
opacity: '0',
|
|
22
|
+
height: '100%',
|
|
23
|
+
},
|
|
24
|
+
'100%': {
|
|
25
|
+
opacity: '1',
|
|
26
|
+
height: '100%',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
'opacity-appear': {
|
|
30
|
+
'0%': {
|
|
31
|
+
opacity: '0',
|
|
32
|
+
},
|
|
33
|
+
'100%': {
|
|
34
|
+
opacity: '1',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
'opacity-out': {
|
|
38
|
+
'0%': { opacity: '1', height: '100%' },
|
|
39
|
+
'60%': { opacity: '1', height: '100%' },
|
|
40
|
+
'100%': { opacity: '0', height: '100%' },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
}
|