@alveole/components 0.19.3 → 0.20.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.
Files changed (42) hide show
  1. package/dist/stories/index.d.ts +1 -0
  2. package/dist/stories/index.d.ts.map +1 -1
  3. package/dist/stories/index.js +1 -0
  4. package/dist/ui/Button/Button.stories.d.ts +0 -13
  5. package/dist/ui/Button/Button.stories.d.ts.map +1 -1
  6. package/dist/ui/Button/Button.styles.d.ts +0 -13
  7. package/dist/ui/Button/Button.styles.d.ts.map +1 -1
  8. package/dist/ui/Button/Button.styles.js +1 -2
  9. package/dist/ui/Card/Card.d.ts +14 -0
  10. package/dist/ui/Card/Card.d.ts.map +1 -0
  11. package/dist/ui/Card/Card.js +16 -0
  12. package/dist/ui/Card/Card.stories.d.ts +66 -0
  13. package/dist/ui/Card/Card.stories.d.ts.map +1 -0
  14. package/dist/ui/Card/Card.stories.js +37 -0
  15. package/dist/ui/Card/Card.styles.d.ts +15 -0
  16. package/dist/ui/Card/Card.styles.d.ts.map +1 -0
  17. package/dist/ui/Card/Card.styles.js +15 -0
  18. package/dist/ui/Card/CardActions.d.ts +4 -0
  19. package/dist/ui/Card/CardActions.d.ts.map +1 -0
  20. package/dist/ui/Card/CardActions.js +8 -0
  21. package/dist/ui/Card/CardActions.styles.d.ts +11 -0
  22. package/dist/ui/Card/CardActions.styles.d.ts.map +1 -0
  23. package/dist/ui/Card/CardActions.styles.js +11 -0
  24. package/dist/ui/Card/CardHeader.d.ts +12 -0
  25. package/dist/ui/Card/CardHeader.d.ts.map +1 -0
  26. package/dist/ui/Card/CardHeader.js +9 -0
  27. package/dist/ui/Card/CardHeader.styles.d.ts +31 -0
  28. package/dist/ui/Card/CardHeader.styles.d.ts.map +1 -0
  29. package/dist/ui/Card/CardHeader.styles.js +25 -0
  30. package/dist/ui/Card/CardSection.d.ts +12 -0
  31. package/dist/ui/Card/CardSection.d.ts.map +1 -0
  32. package/dist/ui/Card/CardSection.js +14 -0
  33. package/dist/ui/Card/CardSection.styles.d.ts +46 -0
  34. package/dist/ui/Card/CardSection.styles.d.ts.map +1 -0
  35. package/dist/ui/Card/CardSection.styles.js +40 -0
  36. package/dist/ui/Card/index.d.ts +2 -0
  37. package/dist/ui/Card/index.d.ts.map +1 -0
  38. package/dist/ui/Card/index.js +1 -0
  39. package/dist/ui/index.d.ts +1 -0
  40. package/dist/ui/index.d.ts.map +1 -1
  41. package/dist/ui/index.js +1 -0
  42. package/package.json +1 -1
@@ -7,6 +7,7 @@ export * as TypographyStory from '../core/Typography/Typography.stories';
7
7
  export * as VersionStory from '../core/Version/Version.stories';
8
8
  export * as AvatarStory from '../ui/Avatar/Avatar.stories';
9
9
  export * as ButtonStory from '../ui/Button/Button.stories';
10
+ export * as CardStory from '../ui/Card/Card.stories';
10
11
  export * as DividerStory from '../ui/Divider/Divider.stories';
11
12
  export * as EmptyStateStory from '../ui/EmptyState/EmptyState.stories';
12
13
  export * as ListItemStory from '../ui/ListItem/ListItem.stories';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stories/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,eAAe,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAGhE,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,iBAAiB,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,qBAAqB,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stories/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,eAAe,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAGhE,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,iBAAiB,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,qBAAqB,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC"}
@@ -9,6 +9,7 @@ export * as VersionStory from '../core/Version/Version.stories';
9
9
  // UI
10
10
  export * as AvatarStory from '../ui/Avatar/Avatar.stories';
11
11
  export * as ButtonStory from '../ui/Button/Button.stories';
12
+ export * as CardStory from '../ui/Card/Card.stories';
12
13
  export * as DividerStory from '../ui/Divider/Divider.stories';
13
14
  export * as EmptyStateStory from '../ui/EmptyState/EmptyState.stories';
14
15
  export * as ListItemStory from '../ui/ListItem/ListItem.stories';
@@ -46,19 +46,6 @@ declare const _default: {
46
46
  };
47
47
  primaryContainer: {
48
48
  backgroundColor: "#002764";
49
- } | {
50
- shadowColor: import("@alveole/theme").Color;
51
- shadowOffset: {
52
- width: number;
53
- height: number;
54
- };
55
- shadowOpacity: number;
56
- shadowRadius: number;
57
- elevation: number;
58
- backgroundColor: "#002764";
59
- } | {
60
- boxShadow: string;
61
- backgroundColor: "#002764";
62
49
  };
63
50
  primaryTitleHover: {
64
51
  color: "#F2F9FF";
@@ -1 +1 @@
1
- {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAQkB;AAElB,eAAO,MAAM,KAAK,+CAMjB,CAAC;AAEF,eAAO,MAAM,OAAO,+CAKnB,CAAC;AAEF,eAAO,MAAM,SAAS,+CAKrB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAKpB,CAAC;AAEF,eAAO,MAAM,IAAI,+CAKhB,CAAC;AAEF,eAAO,MAAM,KAAK,+CAQjB,CAAC;AAEF,eAAO,MAAM,SAAS,+CAIrB,CAAC"}
1
+ {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBAQkB;AAElB,eAAO,MAAM,KAAK,+CAMjB,CAAC;AAEF,eAAO,MAAM,OAAO,+CAKnB,CAAC;AAEF,eAAO,MAAM,SAAS,+CAKrB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAKpB,CAAC;AAEF,eAAO,MAAM,IAAI,+CAKhB,CAAC;AAEF,eAAO,MAAM,KAAK,+CAQjB,CAAC;AAEF,eAAO,MAAM,SAAS,+CAIrB,CAAC"}
@@ -26,19 +26,6 @@ export declare const useStyles: () => {
26
26
  };
27
27
  primaryContainer: {
28
28
  backgroundColor: "#002764";
29
- } | {
30
- shadowColor: import("@alveole/theme").Color;
31
- shadowOffset: {
32
- width: number;
33
- height: number;
34
- };
35
- shadowOpacity: number;
36
- shadowRadius: number;
37
- elevation: number;
38
- backgroundColor: "#002764";
39
- } | {
40
- boxShadow: string;
41
- backgroundColor: "#002764";
42
29
  };
43
30
  primaryTitleHover: {
44
31
  color: "#F2F9FF";
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4MnB,CAAC"}
1
+ {"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2MnB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { makeStyles } from '@alveole/theme';
2
- export const useStyles = makeStyles(({ text, color, spacing, shadows, radius }) => ({
2
+ export const useStyles = makeStyles(({ text, color, spacing, radius }) => ({
3
3
  container: {
4
4
  borderTopLeftRadius: radius('md'),
5
5
  borderBottomLeftRadius: radius('md'),
@@ -28,7 +28,6 @@ export const useStyles = makeStyles(({ text, color, spacing, shadows, radius })
28
28
  },
29
29
  primaryContainer: {
30
30
  backgroundColor: color.light.background['action-high-primary'],
31
- ...shadows(2),
32
31
  },
33
32
  primaryTitleHover: {
34
33
  color: color.light.text['inverted-primary'],
@@ -0,0 +1,14 @@
1
+ import { BoxProps } from '../../core';
2
+ import { CardActions } from './CardActions';
3
+ import { CardHeader } from './CardHeader';
4
+ import { CardSection } from './CardSection';
5
+ export type CardProps = BoxProps;
6
+ declare const CardBase: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
7
+ type CardCompoundComponent = typeof CardBase & {
8
+ Header: typeof CardHeader;
9
+ Section: typeof CardSection;
10
+ Actions: typeof CardActions;
11
+ };
12
+ export declare const Card: CardCompoundComponent;
13
+ export {};
14
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;AAEjC,QAAA,MAAM,QAAQ,GAAI,OAAO,SAAS,4CAUjC,CAAC;AAEF,KAAK,qBAAqB,GAAG,OAAO,QAAQ,GAAG;IAC7C,MAAM,EAAE,OAAO,UAAU,CAAC;IAC1B,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,OAAO,EAAE,OAAO,WAAW,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,qBAIjB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '../../core';
3
+ import { useStyles } from './Card.styles';
4
+ import { CardActions } from './CardActions';
5
+ import { CardHeader } from './CardHeader';
6
+ import { CardSection } from './CardSection';
7
+ const CardBase = (props) => {
8
+ const { style, children, ...boxProps } = props;
9
+ const styles = useStyles();
10
+ return (_jsx(Box, { tag: "card", style: [styles.card, style], ...boxProps, children: children }));
11
+ };
12
+ export const Card = Object.assign(CardBase, {
13
+ Header: CardHeader,
14
+ Section: CardSection,
15
+ Actions: CardActions,
16
+ });
@@ -0,0 +1,66 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Kit"];
4
+ experimental: false;
5
+ figmaURL: string;
6
+ description: string;
7
+ component: ((props: import("./Card").CardProps) => import("react/jsx-runtime").JSX.Element) & {
8
+ Header: typeof import("./CardHeader").CardHeader;
9
+ Section: typeof import("./CardSection").CardSection;
10
+ Actions: typeof import("./CardActions").CardActions;
11
+ };
12
+ styleFn: () => {
13
+ cardSection: {
14
+ display: "flex";
15
+ flexDirection: "column";
16
+ gap: import("@alveole/theme").Spacing;
17
+ width: "100%";
18
+ };
19
+ title: {
20
+ display: "flex";
21
+ flexDirection: "row";
22
+ alignItems: "center";
23
+ gap: import("@alveole/theme").Spacing;
24
+ };
25
+ titleIcon: {
26
+ display: "flex";
27
+ alignItems: "center";
28
+ };
29
+ titleText: {
30
+ color: "#151617";
31
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
32
+ fontSize: 14;
33
+ lineHeight: 20;
34
+ letterSpacing: 0;
35
+ };
36
+ description: {
37
+ display: "flex";
38
+ flexDirection: "row";
39
+ alignItems: "center";
40
+ gap: import("@alveole/theme").Spacing;
41
+ };
42
+ descriptionIcon: {
43
+ display: "flex";
44
+ alignItems: "center";
45
+ };
46
+ descriptionText: {
47
+ color: "#373A3F";
48
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
49
+ fontSize: 14;
50
+ lineHeight: 20;
51
+ letterSpacing: 0;
52
+ };
53
+ disabledText: {
54
+ color: "#8D97AC";
55
+ };
56
+ };
57
+ };
58
+ export default _default;
59
+ export declare const card: () => import("react/jsx-runtime").JSX.Element;
60
+ export declare const cardDisabled: () => import("react/jsx-runtime").JSX.Element;
61
+ export declare const cardSection: () => import("react/jsx-runtime").JSX.Element;
62
+ export declare const cardSectionDisabled: () => import("react/jsx-runtime").JSX.Element;
63
+ export declare const cardHeader: () => import("react/jsx-runtime").JSX.Element;
64
+ export declare const cardHeaderDisabled: () => import("react/jsx-runtime").JSX.Element;
65
+ export declare const cardActions: () => import("react/jsx-runtime").JSX.Element;
66
+ //# sourceMappingURL=Card.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAQkB;AAElB,eAAO,MAAM,IAAI,+CAgBhB,CAAC;AAEF,eAAO,MAAM,YAAY,+CA2BxB,CAAC;AAEF,eAAO,MAAM,WAAW,+CASvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAU/B,CAAC;AAEF,eAAO,MAAM,UAAU,+CAgBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,+CAS9B,CAAC;AAEF,eAAO,MAAM,WAAW,+CAYvB,CAAC"}
@@ -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,4 @@
1
+ import { BoxProps } from '../../core';
2
+ export type CardActionsProps = BoxProps;
3
+ export declare const CardActions: (props: CardActionsProps) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=CardActions.d.ts.map
@@ -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,2 @@
1
+ export * from './Card';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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';
@@ -1,5 +1,6 @@
1
1
  export * from './Avatar';
2
2
  export * from './Button';
3
+ export * from './Card';
3
4
  export * from './Divider';
4
5
  export * from './EmptyState';
5
6
  export * from './ListItem';
@@ -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,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,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"}
package/dist/ui/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './Avatar';
2
2
  export * from './Button';
3
+ export * from './Card';
3
4
  export * from './Divider';
4
5
  export * from './EmptyState';
5
6
  export * from './ListItem';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alveole/components",
3
- "version": "0.19.3",
3
+ "version": "0.20.0",
4
4
  "description": "Shared UI components.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",