@joza/joza-ui-kit 0.1.0
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 +44 -0
- package/dist/index.d.ts +61 -0
- package/dist/joza-ui-kit.es.js +1696 -0
- package/dist/joza-ui-kit.es.js.map +1 -0
- package/dist/joza-ui-kit.umd.js +1705 -0
- package/dist/joza-ui-kit.umd.js.map +1 -0
- package/package.json +80 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# UI-Kit
|
|
2
|
+
|
|
3
|
+
UI-Kit est une bibliothèque de composants React développée avec TypeScript et Vite. Elle fournit des composants réutilisables et personnalisables pour accélérer le développement d'interfaces utilisateur.
|
|
4
|
+
|
|
5
|
+
## Fonctionnalités
|
|
6
|
+
|
|
7
|
+
- **Composants réutilisables** : Une collection de composants prêts à l'emploi comme des boutons, des pop-ins, des en-têtes, etc.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Clonez le dépôt et installez les dépendances :
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone <url-du-repo>
|
|
15
|
+
cd ui-kit
|
|
16
|
+
npm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Scripts disponibles
|
|
20
|
+
|
|
21
|
+
- **`npm run dev`** : Lance le projet en mode développement avec Vite.
|
|
22
|
+
- **`npm run storybook`** : Lance Storybook pour visualiser et tester les composants.
|
|
23
|
+
|
|
24
|
+
## Utilisation
|
|
25
|
+
|
|
26
|
+
1. Importez les composants dans votre projet React :
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import { Button } from 'ui-kit';
|
|
30
|
+
|
|
31
|
+
function App() {
|
|
32
|
+
return <Button label="Cliquez-moi" />;
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
2. Consultez la documentation Storybook pour des exemples et des guides d'utilisation :
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run storybook
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Licence
|
|
43
|
+
|
|
44
|
+
Ce projet est sous licence MIT.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type SxProps = CSSObject;
|
|
5
|
+
|
|
6
|
+
interface ButtonProps {
|
|
7
|
+
size?: 's' | 'm' | 'l';
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
9
|
+
fontFamily?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
sx?: SxProps;
|
|
14
|
+
}
|
|
15
|
+
declare const Button: React.FC<ButtonProps>;
|
|
16
|
+
|
|
17
|
+
type AlertPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
18
|
+
interface AlertProps {
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
type?: 'info' | 'success' | 'warning' | 'error';
|
|
21
|
+
size?: 's' | 'm' | 'l';
|
|
22
|
+
timeout?: number;
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
position?: AlertPosition;
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
sx?: SxProps;
|
|
28
|
+
}
|
|
29
|
+
declare const Alert: React.FC<AlertProps>;
|
|
30
|
+
|
|
31
|
+
interface CardProps {
|
|
32
|
+
size?: 's' | 'm' | 'l';
|
|
33
|
+
hover?: boolean;
|
|
34
|
+
onClick?: () => void;
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
sx?: SxProps;
|
|
38
|
+
}
|
|
39
|
+
declare const Card: React.FC<CardProps>;
|
|
40
|
+
|
|
41
|
+
interface HamburgerMenuProps {
|
|
42
|
+
children?: ReactNode;
|
|
43
|
+
position?: 'left' | 'right';
|
|
44
|
+
width?: string;
|
|
45
|
+
height?: string;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
sx?: SxProps;
|
|
48
|
+
}
|
|
49
|
+
declare const HamburgerMenu: React.FC<HamburgerMenuProps>;
|
|
50
|
+
|
|
51
|
+
interface PopinProps {
|
|
52
|
+
isOpen: boolean;
|
|
53
|
+
onClose: () => void;
|
|
54
|
+
children?: ReactNode;
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
sx?: SxProps;
|
|
57
|
+
}
|
|
58
|
+
declare const Popin: React.FC<PopinProps>;
|
|
59
|
+
|
|
60
|
+
export { Alert, Button, Card, HamburgerMenu, Popin };
|
|
61
|
+
export type { AlertProps, ButtonProps, CardProps, HamburgerMenuProps, PopinProps };
|