@tracktor/design-system 2.7.16 → 3.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.
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const TextFieldAppBar: import('react').ForwardRefExoticComponent<(Omit<import('@mui/material').FilledTextFieldProps, "ref"> | Omit<import('@mui/material').OutlinedTextFieldProps, "ref"> | Omit<import('@mui/material').StandardTextFieldProps, "ref">) & import('react').RefAttributes<HTMLDivElement>>;
3
2
  export default TextFieldAppBar;
@@ -1,6 +1,7 @@
1
1
  import { ThemeOptions } from '@mui/material';
2
2
  import { Localization } from '@mui/material/locale';
3
3
  import { ReactNode } from 'react';
4
+ type Language = "en" | "fr";
4
5
  export interface ThemeProviderProps {
5
6
  /**
6
7
  * Children to render
@@ -44,6 +45,8 @@ export interface ThemeProviderProps {
44
45
  fontWeight?: number[];
45
46
  };
46
47
  }
47
- export declare const ThemeContext: import('react').Context<Pick<ThemeProviderProps, "language">>;
48
- declare const ThemeProvider: ({ children, enableColorScheme, includeCssBaseline, includeScrollBarStyle, fullHeight, language, theme, font, }: ThemeProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
48
+ export declare const ThemeContext: import('react').Context<{
49
+ language: Language;
50
+ }>;
51
+ declare const ThemeProvider: ({ children, enableColorScheme, includeCssBaseline, includeScrollBarStyle, fullHeight, theme, language, font, }: ThemeProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
49
52
  export default ThemeProvider;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Hook to check permission
4
3
  */
@@ -0,0 +1,2 @@
1
+ import { default as useTranslation } from './useTranslation';
2
+ export default useTranslation;
@@ -0,0 +1,8 @@
1
+ import { default as locales } from '../../locales';
2
+ /**
3
+ * Hook to get the translations internally
4
+ */
5
+ declare const useTranslation: () => {
6
+ t: (key: keyof typeof locales.en | keyof typeof locales.fr) => string;
7
+ };
8
+ export default useTranslation;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ clickToUpload: string;
3
+ files: string;
4
+ reset: string;
5
+ selectAll: string;
6
+ };
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ clickToUpload: string;
3
+ files: string;
4
+ reset: string;
5
+ selectAll: string;
6
+ };
7
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { default as en } from './en';
2
+ import { default as fr } from './fr';
3
+ declare const locales: Record<"en" | "fr", typeof en | typeof fr>;
4
+ export default locales;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tracktor/design-system",
3
3
  "description": "Tracktor Design System",
4
4
  "sideEffects": false,
5
- "version": "2.7.16",
5
+ "version": "3.0.1",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",
@@ -66,36 +66,36 @@
66
66
  "@testing-library/react": "^14.0.0",
67
67
  "@testing-library/react-hooks": "^8.0.1",
68
68
  "@testing-library/user-event": "^14.4.3",
69
- "@types/node": "^18.19.55",
70
- "@types/react": "^18.3.11",
71
- "@types/react-dom": "^18.2.7",
72
- "@vitejs/plugin-react": "^4.3.2",
69
+ "@types/node": "^18.19.61",
70
+ "@types/react": "^18.3.12",
71
+ "@types/react-dom": "^18.3.1",
72
+ "@vitejs/plugin-react": "^4.3.3",
73
73
  "@vitest/ui": "^0.34.4",
74
74
  "babel-loader": "^9.1.3",
75
- "chromatic": "^11.0.0",
76
- "eslint-config-react-tracktor": "^1.7.0",
75
+ "chromatic": "^11.16.3",
76
+ "eslint-config-react-tracktor": "^1.8.1",
77
77
  "husky": "^8.0.3",
78
78
  "jsdom": "^22.1.0",
79
79
  "react": "^18.3.1",
80
80
  "react-dom": "^18.3.1",
81
- "react-test-renderer": "^18.2.0",
82
- "sass": "^1.67.0",
81
+ "react-test-renderer": "^18.3.1",
82
+ "sass": "^1.80.5",
83
83
  "storybook": "^8.3.6",
84
84
  "storybook-dark-mode": "^4.0.1",
85
85
  "typescript": "^5.2.2",
86
- "vite": "5.4.9",
87
- "vite-plugin-dts": "^4.2.4",
88
- "vitest": "^0.34.6"
86
+ "vite": "5.4.10",
87
+ "vite-plugin-dts": "^4.3.0",
88
+ "vitest": "^1.6.0"
89
89
  },
90
90
  "dependencies": {
91
91
  "@emotion/react": "^11.13.3",
92
92
  "@emotion/styled": "^11.13.0",
93
- "@mui/material": "^5.16.7"
93
+ "@mui/material": "^6.1.5"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "@emotion/react": ">=11.0.0",
97
97
  "@emotion/styled": ">=11.0.0",
98
- "@mui/material": ">=5.0.0",
98
+ "@mui/material": ">=6.0.0",
99
99
  "react": ">=18.0.0",
100
100
  "react-dom": ">=18.0.0"
101
101
  },