@alveole/components 0.19.3 → 0.21.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/dist/core/A/A.d.ts +16 -0
- package/dist/core/A/A.d.ts.map +1 -0
- package/dist/core/A/A.js +16 -0
- package/dist/core/A/A.stories.d.ts +20 -0
- package/dist/core/A/A.stories.d.ts.map +1 -0
- package/dist/core/A/A.stories.js +13 -0
- package/dist/core/A/A.styles.d.ts +11 -0
- package/dist/core/A/A.styles.d.ts.map +1 -0
- package/dist/core/A/A.styles.js +11 -0
- package/dist/core/A/index.d.ts +2 -0
- package/dist/core/A/index.d.ts.map +1 -0
- package/dist/core/A/index.js +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/stories/index.d.ts +4 -0
- package/dist/stories/index.d.ts.map +1 -1
- package/dist/stories/index.js +4 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.d.ts +28 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.js +42 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.stories.d.ts +45 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.stories.js +34 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.styles.d.ts +33 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -0
- package/dist/ui/Breadcrumbs/Breadcrumbs.styles.js +27 -0
- package/dist/ui/Breadcrumbs/index.d.ts +3 -0
- package/dist/ui/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/ui/Breadcrumbs/index.js +1 -0
- package/dist/ui/Button/Button.stories.d.ts +0 -13
- package/dist/ui/Button/Button.stories.d.ts.map +1 -1
- package/dist/ui/Button/Button.styles.d.ts +0 -13
- package/dist/ui/Button/Button.styles.d.ts.map +1 -1
- package/dist/ui/Button/Button.styles.js +1 -2
- package/dist/ui/Card/Card.d.ts +14 -0
- package/dist/ui/Card/Card.d.ts.map +1 -0
- package/dist/ui/Card/Card.js +16 -0
- package/dist/ui/Card/Card.stories.d.ts +66 -0
- package/dist/ui/Card/Card.stories.d.ts.map +1 -0
- package/dist/ui/Card/Card.stories.js +37 -0
- package/dist/ui/Card/Card.styles.d.ts +15 -0
- package/dist/ui/Card/Card.styles.d.ts.map +1 -0
- package/dist/ui/Card/Card.styles.js +15 -0
- package/dist/ui/Card/CardActions.d.ts +4 -0
- package/dist/ui/Card/CardActions.d.ts.map +1 -0
- package/dist/ui/Card/CardActions.js +8 -0
- package/dist/ui/Card/CardActions.styles.d.ts +11 -0
- package/dist/ui/Card/CardActions.styles.d.ts.map +1 -0
- package/dist/ui/Card/CardActions.styles.js +11 -0
- package/dist/ui/Card/CardHeader.d.ts +12 -0
- package/dist/ui/Card/CardHeader.d.ts.map +1 -0
- package/dist/ui/Card/CardHeader.js +9 -0
- package/dist/ui/Card/CardHeader.styles.d.ts +31 -0
- package/dist/ui/Card/CardHeader.styles.d.ts.map +1 -0
- package/dist/ui/Card/CardHeader.styles.js +25 -0
- package/dist/ui/Card/CardSection.d.ts +12 -0
- package/dist/ui/Card/CardSection.d.ts.map +1 -0
- package/dist/ui/Card/CardSection.js +14 -0
- package/dist/ui/Card/CardSection.styles.d.ts +46 -0
- package/dist/ui/Card/CardSection.styles.d.ts.map +1 -0
- package/dist/ui/Card/CardSection.styles.js +40 -0
- package/dist/ui/Card/index.d.ts +2 -0
- package/dist/ui/Card/index.d.ts.map +1 -0
- package/dist/ui/Card/index.js +1 -0
- package/dist/ui/LucideIcon/LucideIcon.props.d.ts +2 -2
- package/dist/ui/LucideIcon/LucideIcon.stories.d.ts +1 -1
- package/dist/ui/PageHeader/PageHeader.d.ts +15 -0
- package/dist/ui/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/ui/PageHeader/PageHeader.js +12 -0
- package/dist/ui/PageHeader/PageHeader.stories.d.ts +39 -0
- package/dist/ui/PageHeader/PageHeader.stories.d.ts.map +1 -0
- package/dist/ui/PageHeader/PageHeader.stories.js +15 -0
- package/dist/ui/PageHeader/PageHeader.styles.d.ts +29 -0
- package/dist/ui/PageHeader/PageHeader.styles.d.ts.map +1 -0
- package/dist/ui/PageHeader/PageHeader.styles.js +26 -0
- package/dist/ui/PageHeader/index.d.ts +3 -0
- package/dist/ui/PageHeader/index.d.ts.map +1 -0
- package/dist/ui/PageHeader/index.js +1 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Typography } from '../../core';
|
|
3
|
+
import { Avatar } from '../Avatar';
|
|
4
|
+
import { Button } from '../Button';
|
|
5
|
+
import { LucideIcon } from '../LucideIcon';
|
|
6
|
+
import { Card } from './Card';
|
|
7
|
+
import { useStyles } from './CardSection.styles';
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Card',
|
|
10
|
+
tags: ['Kit'],
|
|
11
|
+
experimental: false,
|
|
12
|
+
figmaURL: 'https://www.figma.com/design/xJz8Z6vfrnZPKTtRbuT2W8/Alveole---Composants?node-id=2196-918&m=dev',
|
|
13
|
+
description: 'Carte avec header, section et actions. Composant de type Box.',
|
|
14
|
+
component: Card,
|
|
15
|
+
styleFn: useStyles,
|
|
16
|
+
};
|
|
17
|
+
export const card = () => {
|
|
18
|
+
return (_jsxs(Card, { children: [_jsx(Card.Header, { titre: "Titre de la carte", sousTitre: "Sous-titre de la carte", image: _jsx(Avatar, { size: "md", fallbackText: "M" }) }), _jsx(Card.Section, { titre: "Titre de la carte", titreIcone: "Calendar", description: "Description de la carte" }), _jsx(Card.Section, { titre: "Titre de la carte", titreIcone: "Calendar", description: "Description de la carte" }), _jsxs(Card.Actions, { children: [_jsx(Button, { variant: "secondary", title: "Action", size: "sm" }), _jsx(Button, { variant: "primary", title: "Action", size: "sm" })] })] }));
|
|
19
|
+
};
|
|
20
|
+
export const cardDisabled = () => {
|
|
21
|
+
return (_jsxs(Card, { children: [_jsx(Card.Header, { variant: "disabled", titre: "Titre de la carte", sousTitre: "Sous-titre de la carte", image: _jsx(LucideIcon, { name: "Settings", size: "md" }) }), _jsx(Card.Section, { variant: "disabled", titre: "Titre de la carte", titreIcone: "Calendar", description: "Description de la carte" }), _jsx(Card.Section, { variant: "disabled", titre: "Titre de la carte", titreIcone: "Calendar", description: "Description de la carte" }), _jsxs(Card.Actions, { children: [_jsx(Button, { variant: "secondary", title: "Action", size: "sm", disabled: true }), _jsx(Button, { variant: "primary", title: "Action", size: "sm", disabled: true })] })] }));
|
|
22
|
+
};
|
|
23
|
+
export const cardSection = () => {
|
|
24
|
+
return (_jsx(Card.Section, { titre: "Titre de la carte", description: "Description de la carte", titreIcone: "Image", descriptionIcone: "Image" }));
|
|
25
|
+
};
|
|
26
|
+
export const cardSectionDisabled = () => {
|
|
27
|
+
return (_jsx(Card.Section, { variant: "disabled", titre: "Titre de la carte", description: "Description de la carte", titreIcone: "Image", descriptionIcone: "Image" }));
|
|
28
|
+
};
|
|
29
|
+
export const cardHeader = () => {
|
|
30
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "100", children: [_jsx(Card.Header, { titre: "Titre de la carte", sousTitre: "Sous-titre de la carte", image: _jsx(Avatar, { size: "md", fallbackText: "M" }) }), _jsx(Card.Header, { titre: "Titre de la carte", sousTitre: "Sous-titre de la carte", image: _jsx(LucideIcon, { name: "Image", size: "md" }) })] }));
|
|
31
|
+
};
|
|
32
|
+
export const cardHeaderDisabled = () => {
|
|
33
|
+
return (_jsx(Card.Header, { variant: "disabled", titre: "Titre de la carte", sousTitre: "Sous-titre de la carte", image: _jsx(Avatar, { size: "md", fallbackText: "M" }) }));
|
|
34
|
+
};
|
|
35
|
+
export const cardActions = () => {
|
|
36
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "100", children: [_jsx(Typography, { children: "Privil\u00E9gier l'utilisation de bouton en taille SM, avec le bouton primary toujours \u00E0 droite." }), _jsxs(Card.Actions, { children: [_jsx(Button, { variant: "secondary", title: "Action", size: "sm" }), _jsx(Button, { variant: "primary", title: "Action", size: "sm" })] })] }));
|
|
37
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
card: {
|
|
3
|
+
display: "flex";
|
|
4
|
+
width: "100%";
|
|
5
|
+
gap: import("@alveole/theme").Spacing;
|
|
6
|
+
padding: import("@alveole/theme").Spacing;
|
|
7
|
+
backgroundColor: "#FFFFFF";
|
|
8
|
+
borderWidth: number;
|
|
9
|
+
borderColor: "#DEE3EC";
|
|
10
|
+
borderStyle: "solid";
|
|
11
|
+
boxSizing: "border-box";
|
|
12
|
+
borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Card.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAanB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ spacing, color, radius }) => ({
|
|
3
|
+
card: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
width: '100%',
|
|
6
|
+
gap: spacing('3V'),
|
|
7
|
+
padding: spacing('3V'),
|
|
8
|
+
backgroundColor: color.light.background['default-grey'],
|
|
9
|
+
borderWidth: 1,
|
|
10
|
+
borderColor: color.light.border['default-grey'],
|
|
11
|
+
borderStyle: 'solid',
|
|
12
|
+
boxSizing: 'border-box',
|
|
13
|
+
borderRadius: radius('md'),
|
|
14
|
+
},
|
|
15
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardActions.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAExC,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CAUlD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../../core';
|
|
3
|
+
import { useStyles } from './CardActions.styles';
|
|
4
|
+
export const CardActions = (props) => {
|
|
5
|
+
const { style, children, ...boxProps } = props;
|
|
6
|
+
const styles = useStyles();
|
|
7
|
+
return (_jsx(Box, { tag: "card-actions", style: [styles.cardActions, style], ...boxProps, children: children }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
cardActions: {
|
|
3
|
+
display: "flex";
|
|
4
|
+
flexDirection: "row";
|
|
5
|
+
gap: import("@alveole/theme").Spacing;
|
|
6
|
+
width: "100%";
|
|
7
|
+
justifyContent: "flex-end";
|
|
8
|
+
alignItems: "center";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=CardActions.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardActions.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardActions.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;CASnB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ spacing }) => ({
|
|
3
|
+
cardActions: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexDirection: 'row',
|
|
6
|
+
gap: spacing('1W'),
|
|
7
|
+
width: '100%',
|
|
8
|
+
justifyContent: 'flex-end',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
},
|
|
11
|
+
}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BoxProps } from '../../core';
|
|
3
|
+
export type CardHeaderVariant = 'default' | 'disabled';
|
|
4
|
+
export type CardHeaderProps = BoxProps & {
|
|
5
|
+
variant?: CardHeaderVariant;
|
|
6
|
+
titre?: string;
|
|
7
|
+
sousTitre?: string;
|
|
8
|
+
image?: React.ReactNode;
|
|
9
|
+
badge?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const CardHeader: (props: CardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=CardHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardHeader.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAO,QAAQ,EAAc,MAAM,YAAY,CAAC;AAGvD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG;IACvC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAiBhD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Typography } from '../../core';
|
|
3
|
+
import { useStyles } from './CardHeader.styles';
|
|
4
|
+
export const CardHeader = (props) => {
|
|
5
|
+
const { variant = 'default', titre, sousTitre, image, badge, style, children, ...boxProps } = props;
|
|
6
|
+
const styles = useStyles();
|
|
7
|
+
const disabledTextStyle = variant === 'disabled' ? styles.disabledText : {};
|
|
8
|
+
return (_jsxs(Box, { tag: "card-header", style: [styles.cardHeader, disabledTextStyle, style], ...boxProps, children: [image, _jsxs(Box, { tag: "card-header-texte", style: styles.texte, children: [_jsx(Typography, { style: [styles.titre, disabledTextStyle], children: titre }), _jsx(Typography, { style: [styles.sousTitre, disabledTextStyle], children: sousTitre })] }), badge] }));
|
|
9
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
cardHeader: {
|
|
3
|
+
display: "flex";
|
|
4
|
+
flexDirection: "row";
|
|
5
|
+
gap: import("@alveole/theme").Spacing;
|
|
6
|
+
width: "100%";
|
|
7
|
+
};
|
|
8
|
+
texte: {
|
|
9
|
+
display: "flex";
|
|
10
|
+
flexDirection: "column";
|
|
11
|
+
flex: number;
|
|
12
|
+
};
|
|
13
|
+
titre: {
|
|
14
|
+
color: "#151617";
|
|
15
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
16
|
+
fontSize: 16;
|
|
17
|
+
lineHeight: 24;
|
|
18
|
+
letterSpacing: 0;
|
|
19
|
+
};
|
|
20
|
+
sousTitre: {
|
|
21
|
+
color: "#373A3F";
|
|
22
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
23
|
+
fontSize: 14;
|
|
24
|
+
lineHeight: 20;
|
|
25
|
+
letterSpacing: 0;
|
|
26
|
+
};
|
|
27
|
+
disabledText: {
|
|
28
|
+
color: "#8D97AC";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=CardHeader.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardHeader.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBnB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ spacing, color, text }) => ({
|
|
3
|
+
cardHeader: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexDirection: 'row',
|
|
6
|
+
gap: spacing('1W'),
|
|
7
|
+
width: '100%',
|
|
8
|
+
},
|
|
9
|
+
texte: {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
flex: 1,
|
|
13
|
+
},
|
|
14
|
+
titre: {
|
|
15
|
+
...text['Corps de texte'].MD.Medium,
|
|
16
|
+
color: color.light.text['title-grey'],
|
|
17
|
+
},
|
|
18
|
+
sousTitre: {
|
|
19
|
+
...text['Corps de texte'].SM.Regular,
|
|
20
|
+
color: color.light.text['default-grey'],
|
|
21
|
+
},
|
|
22
|
+
disabledText: {
|
|
23
|
+
color: color.light.text['disabled-grey'],
|
|
24
|
+
},
|
|
25
|
+
}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BoxProps } from '../../core';
|
|
2
|
+
import { LucideIconProps } from '../LucideIcon';
|
|
3
|
+
export type CardSectionVariant = 'default' | 'disabled';
|
|
4
|
+
export type CardSectionProps = BoxProps & {
|
|
5
|
+
variant?: CardSectionVariant;
|
|
6
|
+
titre?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
titreIcone?: LucideIconProps['name'];
|
|
9
|
+
descriptionIcone?: LucideIconProps['name'];
|
|
10
|
+
};
|
|
11
|
+
export declare const CardSection: (props: CardSectionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
//# sourceMappingURL=CardSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardSection.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAc,MAAM,YAAY,CAAC;AACvD,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG;IACxC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACrC,gBAAgB,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,mDAuDlD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Typography } from '../../core';
|
|
3
|
+
import { LucideIcon } from '../LucideIcon';
|
|
4
|
+
import { useStyles } from './CardSection.styles';
|
|
5
|
+
export const CardSection = (props) => {
|
|
6
|
+
const { variant = 'default', titre, description, titreIcone, descriptionIcone, style, children, ...boxProps } = props;
|
|
7
|
+
const styles = useStyles();
|
|
8
|
+
const hasTitleRow = !!(titre || titreIcone);
|
|
9
|
+
const hasDescriptionRow = !!(description || descriptionIcone || children);
|
|
10
|
+
if (!hasTitleRow && !hasDescriptionRow) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return (_jsxs(Box, { tag: "card-section", style: [styles.cardSection, style], ...boxProps, children: [hasTitleRow && (_jsxs(Box, { tag: "card-section-title", style: styles.title, children: [titreIcone && (_jsx(Box, { tag: "card-section-title-icon", style: styles.titleIcon, children: _jsx(LucideIcon, { name: titreIcone, size: "sm", color: variant === 'disabled' ? styles.disabledText.color : styles.titleText.color }) })), titre && (_jsx(Typography, { style: [styles.titleText, variant === 'disabled' ? styles.disabledText : {}], children: titre }))] })), hasDescriptionRow && (_jsxs(Box, { tag: "card-section-description", style: styles.description, children: [descriptionIcone && (_jsx(Box, { tag: "card-section-description-icon", style: styles.descriptionIcon, children: _jsx(LucideIcon, { name: descriptionIcone, size: "sm", color: variant === 'disabled' ? styles.disabledText.color : styles.descriptionText.color }) })), description && (_jsx(Typography, { style: [styles.descriptionText, variant === 'disabled' ? styles.disabledText : {}], children: description }))] }))] }));
|
|
14
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
cardSection: {
|
|
3
|
+
display: "flex";
|
|
4
|
+
flexDirection: "column";
|
|
5
|
+
gap: import("@alveole/theme").Spacing;
|
|
6
|
+
width: "100%";
|
|
7
|
+
};
|
|
8
|
+
title: {
|
|
9
|
+
display: "flex";
|
|
10
|
+
flexDirection: "row";
|
|
11
|
+
alignItems: "center";
|
|
12
|
+
gap: import("@alveole/theme").Spacing;
|
|
13
|
+
};
|
|
14
|
+
titleIcon: {
|
|
15
|
+
display: "flex";
|
|
16
|
+
alignItems: "center";
|
|
17
|
+
};
|
|
18
|
+
titleText: {
|
|
19
|
+
color: "#151617";
|
|
20
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
21
|
+
fontSize: 14;
|
|
22
|
+
lineHeight: 20;
|
|
23
|
+
letterSpacing: 0;
|
|
24
|
+
};
|
|
25
|
+
description: {
|
|
26
|
+
display: "flex";
|
|
27
|
+
flexDirection: "row";
|
|
28
|
+
alignItems: "center";
|
|
29
|
+
gap: import("@alveole/theme").Spacing;
|
|
30
|
+
};
|
|
31
|
+
descriptionIcon: {
|
|
32
|
+
display: "flex";
|
|
33
|
+
alignItems: "center";
|
|
34
|
+
};
|
|
35
|
+
descriptionText: {
|
|
36
|
+
color: "#373A3F";
|
|
37
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
38
|
+
fontSize: 14;
|
|
39
|
+
lineHeight: 20;
|
|
40
|
+
letterSpacing: 0;
|
|
41
|
+
};
|
|
42
|
+
disabledText: {
|
|
43
|
+
color: "#8D97AC";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=CardSection.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardSection.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardSection.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCnB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ spacing, color, text }) => ({
|
|
3
|
+
cardSection: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexDirection: 'column',
|
|
6
|
+
gap: spacing('1W'),
|
|
7
|
+
width: '100%',
|
|
8
|
+
},
|
|
9
|
+
title: {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'row',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
gap: spacing('1V'),
|
|
14
|
+
},
|
|
15
|
+
titleIcon: {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
},
|
|
19
|
+
titleText: {
|
|
20
|
+
...text['Corps de texte'].SM.Medium,
|
|
21
|
+
color: color.light.text['title-grey'],
|
|
22
|
+
},
|
|
23
|
+
description: {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
gap: spacing('1V'),
|
|
28
|
+
},
|
|
29
|
+
descriptionIcon: {
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
},
|
|
33
|
+
descriptionText: {
|
|
34
|
+
...text['Corps de texte'].SM.Regular,
|
|
35
|
+
color: color.light.text['default-grey'],
|
|
36
|
+
},
|
|
37
|
+
disabledText: {
|
|
38
|
+
color: color.light.text['disabled-grey'],
|
|
39
|
+
},
|
|
40
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Card';
|
|
@@ -19,8 +19,8 @@ declare const PublicPropsSchema: z.ZodObject<{
|
|
|
19
19
|
tab: "tab";
|
|
20
20
|
olive: "olive";
|
|
21
21
|
Menu: "Menu";
|
|
22
|
-
Image: "Image";
|
|
23
22
|
toolbox: "toolbox";
|
|
23
|
+
Image: "Image";
|
|
24
24
|
AArrowDown: "AArrowDown";
|
|
25
25
|
AArrowUp: "AArrowUp";
|
|
26
26
|
ALargeSmall: "ALargeSmall";
|
|
@@ -2126,8 +2126,8 @@ export declare const LucideIconPropsJSON: z.core.ZodStandardJSONSchemaPayload<z.
|
|
|
2126
2126
|
tab: "tab";
|
|
2127
2127
|
olive: "olive";
|
|
2128
2128
|
Menu: "Menu";
|
|
2129
|
-
Image: "Image";
|
|
2130
2129
|
toolbox: "toolbox";
|
|
2130
|
+
Image: "Image";
|
|
2131
2131
|
AArrowDown: "AArrowDown";
|
|
2132
2132
|
AArrowUp: "AArrowUp";
|
|
2133
2133
|
ALargeSmall: "ALargeSmall";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Breadcrumbs } from '../Breadcrumbs';
|
|
3
|
+
export type PageHeaderProps = React.PropsWithChildren<{
|
|
4
|
+
/** Titre de la page (à gauche). Peut être une chaîne ou un contenu personnalisé. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Contenu affiché à droite (boutons, liens, etc.). */
|
|
7
|
+
actions?: React.ReactNode;
|
|
8
|
+
/** Props passées au Breadcrumbs (rootLabel, getLabel). */
|
|
9
|
+
breadcrumbsProps?: React.ComponentProps<typeof Breadcrumbs>;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* En-tête de page : fil d'Ariane, puis une ligne avec le titre à gauche et des actions à droite.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PageHeader: (props: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=PageHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/ui/PageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACpD,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;CAC7D,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CAahD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Typography } from '../../core';
|
|
3
|
+
import { Breadcrumbs } from '../Breadcrumbs';
|
|
4
|
+
import { useStyles } from './PageHeader.styles';
|
|
5
|
+
/**
|
|
6
|
+
* En-tête de page : fil d'Ariane, puis une ligne avec le titre à gauche et des actions à droite.
|
|
7
|
+
*/
|
|
8
|
+
export const PageHeader = (props) => {
|
|
9
|
+
const { title, actions, breadcrumbsProps } = props;
|
|
10
|
+
const styles = useStyles();
|
|
11
|
+
return (_jsxs(Box, { style: styles.container, children: [_jsx(Breadcrumbs, { ...breadcrumbsProps }), _jsxs(Box, { style: styles.row, children: [_jsx(Typography, { style: styles.title, children: title }), actions && _jsx(Box, { style: styles.actions, children: actions })] })] }));
|
|
12
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: ["Kit"];
|
|
4
|
+
experimental: false;
|
|
5
|
+
description: string;
|
|
6
|
+
component: (props: import("./PageHeader").PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
styleFn: () => {
|
|
8
|
+
container: {
|
|
9
|
+
display: "flex";
|
|
10
|
+
flexDirection: "column";
|
|
11
|
+
gap: import("@alveole/theme").Spacing;
|
|
12
|
+
};
|
|
13
|
+
row: {
|
|
14
|
+
display: "flex";
|
|
15
|
+
flexDirection: "row";
|
|
16
|
+
justifyContent: "space-between";
|
|
17
|
+
alignItems: "center";
|
|
18
|
+
gap: import("@alveole/theme").Spacing;
|
|
19
|
+
};
|
|
20
|
+
title: {
|
|
21
|
+
color: "#151617";
|
|
22
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
23
|
+
fontSize: 28 | 32;
|
|
24
|
+
lineHeight: 36 | 32;
|
|
25
|
+
letterSpacing: 0;
|
|
26
|
+
};
|
|
27
|
+
actions: {
|
|
28
|
+
display: "flex";
|
|
29
|
+
flexDirection: "row";
|
|
30
|
+
alignItems: "center";
|
|
31
|
+
gap: import("@alveole/theme").Spacing;
|
|
32
|
+
flexShrink: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
37
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const WithActions: () => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
//# sourceMappingURL=PageHeader.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/PageHeader/PageHeader.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAOkB;AAElB,eAAO,MAAM,OAAO,+CAInB,CAAC;AAEF,eAAO,MAAM,WAAW,+CAWvB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../../core';
|
|
3
|
+
import { Button } from '../Button';
|
|
4
|
+
import { PageHeader } from './PageHeader';
|
|
5
|
+
import { useStyles } from './PageHeader.styles';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'PageHeader',
|
|
8
|
+
tags: ['Kit'],
|
|
9
|
+
experimental: false,
|
|
10
|
+
description: 'En-tête de page : fil d’Ariane, puis titre à gauche et actions à droite.',
|
|
11
|
+
component: PageHeader,
|
|
12
|
+
styleFn: useStyles,
|
|
13
|
+
};
|
|
14
|
+
export const Default = () => (_jsx(Box, { p: 4, children: _jsx(PageHeader, { title: "Titre de la page" }) }));
|
|
15
|
+
export const WithActions = () => (_jsx(Box, { p: 4, children: _jsx(PageHeader, { title: "D\u00E9tail de la mission", actions: _jsx(_Fragment, { children: _jsx(Button, { variant: "primary", title: "Enregistrer", size: "sm", onPress: () => { } }) }) }) }));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
container: {
|
|
3
|
+
display: "flex";
|
|
4
|
+
flexDirection: "column";
|
|
5
|
+
gap: import("@alveole/theme").Spacing;
|
|
6
|
+
};
|
|
7
|
+
row: {
|
|
8
|
+
display: "flex";
|
|
9
|
+
flexDirection: "row";
|
|
10
|
+
justifyContent: "space-between";
|
|
11
|
+
alignItems: "center";
|
|
12
|
+
gap: import("@alveole/theme").Spacing;
|
|
13
|
+
};
|
|
14
|
+
title: {
|
|
15
|
+
color: "#151617";
|
|
16
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
17
|
+
fontSize: 28 | 32;
|
|
18
|
+
lineHeight: 36 | 32;
|
|
19
|
+
letterSpacing: 0;
|
|
20
|
+
};
|
|
21
|
+
actions: {
|
|
22
|
+
display: "flex";
|
|
23
|
+
flexDirection: "row";
|
|
24
|
+
alignItems: "center";
|
|
25
|
+
gap: import("@alveole/theme").Spacing;
|
|
26
|
+
flexShrink: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=PageHeader.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/PageHeader/PageHeader.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBnB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ color, text, spacing }) => ({
|
|
3
|
+
container: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexDirection: 'column',
|
|
6
|
+
gap: spacing('1W'),
|
|
7
|
+
},
|
|
8
|
+
row: {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'row',
|
|
11
|
+
justifyContent: 'space-between',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
gap: spacing('1V'),
|
|
14
|
+
},
|
|
15
|
+
title: {
|
|
16
|
+
...text.Titres['H2 - LG'],
|
|
17
|
+
color: color.light.text['title-grey'],
|
|
18
|
+
},
|
|
19
|
+
actions: {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'row',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
gap: spacing('050'),
|
|
24
|
+
flexShrink: 0,
|
|
25
|
+
},
|
|
26
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/PageHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PageHeader } from './PageHeader';
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from './Avatar';
|
|
2
|
+
export * from './Breadcrumbs';
|
|
2
3
|
export * from './Button';
|
|
4
|
+
export * from './Card';
|
|
3
5
|
export * from './Divider';
|
|
4
6
|
export * from './EmptyState';
|
|
5
7
|
export * from './ListItem';
|
|
6
8
|
export * from './LucideIcon';
|
|
9
|
+
export * from './PageHeader';
|
|
7
10
|
export * from './ResourceList';
|
|
8
11
|
export * from './ToolbarBottomNav';
|
|
9
12
|
export * from './ToolbarTop';
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
package/dist/ui/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from './Avatar';
|
|
2
|
+
export * from './Breadcrumbs';
|
|
2
3
|
export * from './Button';
|
|
4
|
+
export * from './Card';
|
|
3
5
|
export * from './Divider';
|
|
4
6
|
export * from './EmptyState';
|
|
5
7
|
export * from './ListItem';
|
|
6
8
|
export * from './LucideIcon';
|
|
9
|
+
export * from './PageHeader';
|
|
7
10
|
export * from './ResourceList';
|
|
8
11
|
export * from './ToolbarBottomNav';
|
|
9
12
|
export * from './ToolbarTop';
|