@mw-kit/mw-ui 1.8.17 → 1.8.19
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 +33 -46
- package/bin/mw-ui-copy-fonts.mjs +53 -0
- package/dist/assets/fonts/index.d.ts +51 -14
- package/dist/assets/fonts/lato-italic-100-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-100-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-300-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-300-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-400-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-400-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-700-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-700-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-900-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-italic-900-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-100-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-100-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-300-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-300-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-400-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-400-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-700-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-700-latin.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-900-latin-ext.woff2 +0 -0
- package/dist/assets/fonts/lato-normal-900-latin.woff2 +0 -0
- package/dist/assets/helpers.d.ts +1 -1
- package/dist/index.d.mts +122 -69
- package/dist/index.js +728 -396
- package/dist/index.mjs +928 -590
- package/dist/theme/constants.d.ts +51 -4
- package/dist/theme/index.d.ts +4 -4
- package/dist/theme/interfaces.d.ts +6 -5
- package/package.json +7 -4
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Typographies } from './interfaces';
|
|
2
1
|
export declare const colors: {
|
|
3
2
|
readonly black: "#000000";
|
|
4
3
|
readonly blue: "#3455AB";
|
|
@@ -66,7 +65,55 @@ export declare const spacings: {
|
|
|
66
65
|
readonly s5: "28px";
|
|
67
66
|
readonly s6: "35px";
|
|
68
67
|
};
|
|
69
|
-
export
|
|
70
|
-
|
|
68
|
+
export { default as fonts } from '../assets/fonts';
|
|
69
|
+
export declare const typographies: {
|
|
70
|
+
readonly h1: {
|
|
71
|
+
readonly fontFamily: "Lato";
|
|
72
|
+
readonly fontWeight: "bold";
|
|
73
|
+
readonly fontSize: "18px";
|
|
74
|
+
readonly lineHeight: "22px";
|
|
75
|
+
readonly letterSpacing: "0px";
|
|
76
|
+
};
|
|
77
|
+
readonly h2: {
|
|
78
|
+
readonly fontFamily: "Lato";
|
|
79
|
+
readonly fontWeight: "bold";
|
|
80
|
+
readonly fontSize: "16px";
|
|
81
|
+
readonly lineHeight: "19px";
|
|
82
|
+
readonly letterSpacing: "0px";
|
|
83
|
+
};
|
|
84
|
+
readonly h3: {
|
|
85
|
+
readonly fontFamily: "Lato";
|
|
86
|
+
readonly fontWeight: "normal";
|
|
87
|
+
readonly fontSize: "16px";
|
|
88
|
+
readonly lineHeight: "19px";
|
|
89
|
+
readonly letterSpacing: "0px";
|
|
90
|
+
};
|
|
91
|
+
readonly h4: {
|
|
92
|
+
readonly fontFamily: "Lato";
|
|
93
|
+
readonly fontWeight: "bold";
|
|
94
|
+
readonly fontSize: "14px";
|
|
95
|
+
readonly lineHeight: "17px";
|
|
96
|
+
readonly letterSpacing: "0px";
|
|
97
|
+
};
|
|
98
|
+
readonly h5: {
|
|
99
|
+
readonly fontFamily: "Lato";
|
|
100
|
+
readonly fontWeight: "normal";
|
|
101
|
+
readonly fontSize: "14px";
|
|
102
|
+
readonly lineHeight: "17px";
|
|
103
|
+
readonly letterSpacing: "0px";
|
|
104
|
+
};
|
|
105
|
+
readonly h6: {
|
|
106
|
+
readonly fontFamily: "Lato";
|
|
107
|
+
readonly fontWeight: "normal";
|
|
108
|
+
readonly fontSize: "13px";
|
|
109
|
+
readonly lineHeight: "16px";
|
|
110
|
+
readonly letterSpacing: "0px";
|
|
111
|
+
};
|
|
112
|
+
readonly p: {
|
|
113
|
+
readonly fontFamily: "Lato";
|
|
114
|
+
readonly fontWeight: "normal";
|
|
115
|
+
readonly fontSize: "14px";
|
|
116
|
+
readonly lineHeight: "17px";
|
|
117
|
+
readonly letterSpacing: "0px";
|
|
118
|
+
};
|
|
71
119
|
};
|
|
72
|
-
export declare const typographies: Typographies;
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ThemeInterface } from './interfaces';
|
|
2
|
-
export declare const theme: ThemeInterface
|
|
3
|
-
declare const ThemeProvider: (props: {
|
|
4
|
-
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const theme: Omit<ThemeInterface, 'assetUrl' | 'useFont'>;
|
|
3
|
+
declare const ThemeProvider: (props: React.PropsWithChildren<{
|
|
4
|
+
assetBaseUrl: string;
|
|
5
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default ThemeProvider;
|
|
@@ -4,27 +4,28 @@ import type { colors, fonts, opacities, spacings, typographies } from './constan
|
|
|
4
4
|
export type ColorOptions = keyof typeof colors;
|
|
5
5
|
export type OpacitiyOptions = keyof typeof opacities;
|
|
6
6
|
export type SpacingOptions = keyof typeof spacings;
|
|
7
|
+
export type FontOptions = keyof typeof fonts;
|
|
7
8
|
type FontWeight = 'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
8
9
|
interface Typography {
|
|
9
|
-
fontFamily:
|
|
10
|
+
fontFamily: FontOptions;
|
|
10
11
|
fontWeight: FontWeight;
|
|
11
12
|
fontSize: string;
|
|
13
|
+
lineHeight: string;
|
|
14
|
+
letterSpacing: string;
|
|
12
15
|
}
|
|
13
16
|
type TypographyOptions = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p';
|
|
14
17
|
export type Typographies = {
|
|
15
18
|
[key in TypographyOptions]: Typography;
|
|
16
19
|
};
|
|
17
|
-
export type useTypographyFunc = (typography: TypographyOptions, options?: {
|
|
18
|
-
fontWeight?: FontWeight;
|
|
19
|
-
}) => RuleSet;
|
|
20
20
|
export interface ThemeInterface {
|
|
21
21
|
colors: typeof colors;
|
|
22
22
|
fonts: typeof fonts;
|
|
23
23
|
getColor: (color: ColorOptions, opacity?: OpacitiyOptions) => string;
|
|
24
|
-
useTypography:
|
|
24
|
+
useTypography: (typography: TypographyOptions, options?: Partial<Pick<Typography, 'fontWeight' | 'lineHeight' | 'letterSpacing'>>) => RuleSet;
|
|
25
25
|
isDarkColor: (color: ColorOptions, ifDark?: ColorOptions, ifLight?: ColorOptions) => ColorOptions;
|
|
26
26
|
spacings: typeof spacings;
|
|
27
27
|
typographies: typeof typographies;
|
|
28
28
|
components: typeof components;
|
|
29
|
+
assetUrl: (asset: string) => string;
|
|
29
30
|
}
|
|
30
31
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mw-kit/mw-ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.19",
|
|
4
4
|
"description": "Made with create-react-library",
|
|
5
5
|
"author": "fmgusmao",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,8 +10,12 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"source": "src/index.ts",
|
|
12
12
|
"files": [
|
|
13
|
-
"dist"
|
|
13
|
+
"dist",
|
|
14
|
+
"bin"
|
|
14
15
|
],
|
|
16
|
+
"bin": {
|
|
17
|
+
"mw-ui-copy-fonts": "./bin/mw-ui-copy-fonts.mjs"
|
|
18
|
+
},
|
|
15
19
|
"exports": {
|
|
16
20
|
".": {
|
|
17
21
|
"import": "./dist/index.mjs",
|
|
@@ -19,8 +23,7 @@
|
|
|
19
23
|
},
|
|
20
24
|
"./types": {
|
|
21
25
|
"types": "./dist/interfaces.d.ts"
|
|
22
|
-
}
|
|
23
|
-
"./assets/fonts/*": "./dist/assets/fonts/*"
|
|
26
|
+
}
|
|
24
27
|
},
|
|
25
28
|
"typesVersions": {
|
|
26
29
|
"*": {
|