@tracktor/design-system 3.0.0 → 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,4 +1,4 @@
1
- import { ChangeEvent, DragEvent, ReactNode } from 'react';
1
+ import { ChangeEvent, ReactNode } from 'react';
2
2
  export interface FileUploadProps {
3
3
  size?: "small" | "medium";
4
4
  variant?: "vertical" | "horizontal";
@@ -16,7 +16,7 @@ export interface FileUploadProps {
16
16
  localeText?: {
17
17
  files: string;
18
18
  };
19
- onChange?(e: ChangeEvent<HTMLInputElement> | DragEvent<HTMLLabelElement>): void;
19
+ onChange?(e: ChangeEvent<HTMLInputElement>): void;
20
20
  }
21
21
  declare const File: ({ accept, name, disabled, required, error, localeText, multiple, id, size, helperText, fullWidth, icon, onChange, label, variant, }: FileUploadProps) => import("@emotion/react/jsx-runtime").JSX.Element;
22
22
  export default File;
@@ -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;
@@ -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": "3.0.0",
5
+ "version": "3.0.1",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",