@mw-kit/mw-ui 1.8.16 → 1.8.18

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.
Files changed (31) hide show
  1. package/README.md +33 -46
  2. package/bin/mw-ui-copy-fonts.mjs +53 -0
  3. package/dist/assets/fonts/index.d.ts +51 -14
  4. package/dist/assets/fonts/lato-italic-100-latin-ext.woff2 +0 -0
  5. package/dist/assets/fonts/lato-italic-100-latin.woff2 +0 -0
  6. package/dist/assets/fonts/lato-italic-300-latin-ext.woff2 +0 -0
  7. package/dist/assets/fonts/lato-italic-300-latin.woff2 +0 -0
  8. package/dist/assets/fonts/lato-italic-400-latin-ext.woff2 +0 -0
  9. package/dist/assets/fonts/lato-italic-400-latin.woff2 +0 -0
  10. package/dist/assets/fonts/lato-italic-700-latin-ext.woff2 +0 -0
  11. package/dist/assets/fonts/lato-italic-700-latin.woff2 +0 -0
  12. package/dist/assets/fonts/lato-italic-900-latin-ext.woff2 +0 -0
  13. package/dist/assets/fonts/lato-italic-900-latin.woff2 +0 -0
  14. package/dist/assets/fonts/lato-normal-100-latin-ext.woff2 +0 -0
  15. package/dist/assets/fonts/lato-normal-100-latin.woff2 +0 -0
  16. package/dist/assets/fonts/lato-normal-300-latin-ext.woff2 +0 -0
  17. package/dist/assets/fonts/lato-normal-300-latin.woff2 +0 -0
  18. package/dist/assets/fonts/lato-normal-400-latin-ext.woff2 +0 -0
  19. package/dist/assets/fonts/lato-normal-400-latin.woff2 +0 -0
  20. package/dist/assets/fonts/lato-normal-700-latin-ext.woff2 +0 -0
  21. package/dist/assets/fonts/lato-normal-700-latin.woff2 +0 -0
  22. package/dist/assets/fonts/lato-normal-900-latin-ext.woff2 +0 -0
  23. package/dist/assets/fonts/lato-normal-900-latin.woff2 +0 -0
  24. package/dist/assets/helpers.d.ts +1 -1
  25. package/dist/index.d.mts +15 -8
  26. package/dist/index.js +679 -365
  27. package/dist/index.mjs +879 -559
  28. package/dist/theme/constants.d.ts +1 -3
  29. package/dist/theme/index.d.ts +4 -4
  30. package/dist/theme/interfaces.d.ts +3 -1
  31. package/package.json +7 -4
@@ -66,7 +66,5 @@ export declare const spacings: {
66
66
  readonly s5: "28px";
67
67
  readonly s6: "35px";
68
68
  };
69
- export declare const fonts: {
70
- readonly lato: "\"Lato\", sans-serif";
71
- };
69
+ export { default as fonts } from '../assets/fonts';
72
70
  export declare const typographies: Typographies;
@@ -1,6 +1,6 @@
1
1
  import type { ThemeInterface } from './interfaces';
2
- export declare const theme: ThemeInterface;
3
- declare const ThemeProvider: (props: {
4
- children: JSX.Element | string | (JSX.Element | string)[];
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,9 +4,10 @@ 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: string;
10
+ fontFamily: FontOptions;
10
11
  fontWeight: FontWeight;
11
12
  fontSize: string;
12
13
  }
@@ -26,5 +27,6 @@ export interface ThemeInterface {
26
27
  spacings: typeof spacings;
27
28
  typographies: typeof typographies;
28
29
  components: typeof components;
30
+ assetUrl: (asset: string) => string;
29
31
  }
30
32
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mw-kit/mw-ui",
3
- "version": "1.8.16",
3
+ "version": "1.8.18",
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
  "*": {