@alveole/components 0.15.5 → 0.16.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.
Files changed (37) hide show
  1. package/dist/core/Section/Section.d.ts +7 -0
  2. package/dist/core/Section/Section.d.ts.map +1 -0
  3. package/dist/core/Section/Section.js +19 -0
  4. package/dist/core/Section/Section.stories.d.ts +40 -0
  5. package/dist/core/Section/Section.stories.d.ts.map +1 -0
  6. package/dist/core/Section/Section.stories.js +19 -0
  7. package/dist/core/Section/Section.styles.d.ts +27 -0
  8. package/dist/core/Section/Section.styles.d.ts.map +1 -0
  9. package/dist/core/Section/Section.styles.js +30 -0
  10. package/dist/core/Section/index.d.ts +2 -0
  11. package/dist/core/Section/index.d.ts.map +1 -0
  12. package/dist/core/Section/index.js +1 -0
  13. package/dist/core/index.d.ts +1 -0
  14. package/dist/core/index.d.ts.map +1 -1
  15. package/dist/core/index.js +1 -0
  16. package/dist/stories/index.d.ts +2 -0
  17. package/dist/stories/index.d.ts.map +1 -1
  18. package/dist/stories/index.js +2 -0
  19. package/dist/ui/EmptyState/EmptyState.d.ts +16 -0
  20. package/dist/ui/EmptyState/EmptyState.d.ts.map +1 -0
  21. package/dist/ui/EmptyState/EmptyState.js +12 -0
  22. package/dist/ui/EmptyState/EmptyState.stories.d.ts +73 -0
  23. package/dist/ui/EmptyState/EmptyState.stories.d.ts.map +1 -0
  24. package/dist/ui/EmptyState/EmptyState.stories.js +28 -0
  25. package/dist/ui/EmptyState/EmptyState.styles.d.ts +59 -0
  26. package/dist/ui/EmptyState/EmptyState.styles.d.ts.map +1 -0
  27. package/dist/ui/EmptyState/EmptyState.styles.js +53 -0
  28. package/dist/ui/EmptyState/index.d.ts +2 -0
  29. package/dist/ui/EmptyState/index.d.ts.map +1 -0
  30. package/dist/ui/EmptyState/index.js +1 -0
  31. package/dist/ui/ToolbarTop/ToolbarTop.stories.d.ts +1 -1
  32. package/dist/ui/ToolbarTop/ToolbarTop.styles.d.ts +1 -1
  33. package/dist/ui/ToolbarTop/ToolbarTop.styles.js +1 -1
  34. package/dist/ui/index.d.ts +1 -0
  35. package/dist/ui/index.d.ts.map +1 -1
  36. package/dist/ui/index.js +1 -0
  37. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ import { BoxProps } from '../../core/Box/Box';
2
+ export type SectionProps = BoxProps & {
3
+ size?: 'full' | 'md' | 'sm';
4
+ withPaddingY?: boolean;
5
+ };
6
+ export declare const Section: (props: SectionProps) => import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=Section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../src/core/Section/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,4CAwB1C,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '../../core/Box/Box';
3
+ import { useStyles } from './Section.styles';
4
+ export const Section = (props) => {
5
+ const { style, size, withPaddingY = false, ...boxProps } = props;
6
+ const styles = useStyles();
7
+ let sizeContainer = {};
8
+ sizeContainer = styles.sectionContainerMD;
9
+ if (size === 'full') {
10
+ sizeContainer = styles.sectionContainerFull;
11
+ }
12
+ if (size === 'md') {
13
+ sizeContainer = styles.sectionContainerMD;
14
+ }
15
+ if (size === 'sm') {
16
+ sizeContainer = styles.sectionContainerSM;
17
+ }
18
+ return (_jsx(Box, { tag: "section", style: [styles.section, style, withPaddingY && styles.sectionWithPaddingY], ...boxProps, children: _jsx(Box, { tag: "section-container", style: [style, styles.sectionContainer, sizeContainer], children: props.children }) }));
19
+ };
@@ -0,0 +1,40 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Kit"];
4
+ experimental: true;
5
+ description: string;
6
+ component: (props: import("./Section").SectionProps) => import("react/jsx-runtime").JSX.Element;
7
+ styleFn: () => {
8
+ section: {
9
+ display: "flex";
10
+ flexDirection: "row";
11
+ gap: import("@alveole/theme").Spacing;
12
+ justifyContent: "center";
13
+ paddingLeft: import("@alveole/theme").Spacing;
14
+ paddingRight: import("@alveole/theme").Spacing;
15
+ };
16
+ sectionWithPaddingY: {
17
+ paddingTop: import("@alveole/theme").Spacing;
18
+ paddingBottom: import("@alveole/theme").Spacing;
19
+ };
20
+ sectionContainer: {
21
+ display: "flex";
22
+ flexDirection: "column";
23
+ width: "100%";
24
+ };
25
+ sectionContainerFull: {};
26
+ sectionContainerMD: {
27
+ maxWidth: number;
28
+ };
29
+ sectionContainerSM: {
30
+ maxWidth: number;
31
+ };
32
+ };
33
+ };
34
+ export default _default;
35
+ export declare const Default: () => import("react/jsx-runtime").JSX.Element;
36
+ export declare const WithPaddingY: () => import("react/jsx-runtime").JSX.Element;
37
+ export declare const WidthMdSize: () => import("react/jsx-runtime").JSX.Element;
38
+ export declare const WidthFullSize: () => import("react/jsx-runtime").JSX.Element;
39
+ export declare const WidthSmSize: () => import("react/jsx-runtime").JSX.Element;
40
+ //# sourceMappingURL=Section.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Section/Section.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAQkB;AAKlB,eAAO,MAAM,OAAO,+CAMnB,CAAC;AAEF,eAAO,MAAM,YAAY,+CAMxB,CAAC;AAEF,eAAO,MAAM,WAAW,+CAMvB,CAAC;AAEF,eAAO,MAAM,aAAa,+CAMzB,CAAC;AAEF,eAAO,MAAM,WAAW,+CAMvB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Typography } from '../../core';
3
+ import { Section } from './Section';
4
+ import { useStyles } from './Section.styles';
5
+ export default {
6
+ title: 'Section',
7
+ tags: ['Kit'],
8
+ experimental: true,
9
+ description: 'Section de page. Permet de contenir une section dans un élément adapté aux différentes platformes. Composant de type Box.',
10
+ component: Section,
11
+ styleFn: useStyles,
12
+ };
13
+ const paddingColor = '#b9c47f';
14
+ const innerBoxColor = '#88b2bd';
15
+ export const Default = () => (_jsx(Section, { children: _jsx(Box, { children: _jsx(Typography, { children: "Section avec background" }) }) }));
16
+ export const WithPaddingY = () => (_jsx(Section, { backgroundColor: paddingColor, withPaddingY: true, children: _jsx(Box, { backgroundColor: innerBoxColor, p: '050', children: _jsx(Typography, { children: "Section avec background et padding Y" }) }) }));
17
+ export const WidthMdSize = () => (_jsx(Section, { backgroundColor: paddingColor, size: "md", children: _jsx(Box, { backgroundColor: innerBoxColor, p: '050', children: _jsx(Typography, { children: "Section avec background et size md" }) }) }));
18
+ export const WidthFullSize = () => (_jsx(Section, { backgroundColor: paddingColor, size: "full", children: _jsx(Box, { backgroundColor: innerBoxColor, p: '050', children: _jsx(Typography, { children: "Section avec background et size full (taille par d\u00E9faut)" }) }) }));
19
+ export const WidthSmSize = () => (_jsx(Section, { backgroundColor: paddingColor, size: "sm", children: _jsx(Box, { backgroundColor: innerBoxColor, p: '050', children: _jsx(Typography, { children: "Section avec background et size sm" }) }) }));
@@ -0,0 +1,27 @@
1
+ export declare const useStyles: () => {
2
+ section: {
3
+ display: "flex";
4
+ flexDirection: "row";
5
+ gap: import("@alveole/theme").Spacing;
6
+ justifyContent: "center";
7
+ paddingLeft: import("@alveole/theme").Spacing;
8
+ paddingRight: import("@alveole/theme").Spacing;
9
+ };
10
+ sectionWithPaddingY: {
11
+ paddingTop: import("@alveole/theme").Spacing;
12
+ paddingBottom: import("@alveole/theme").Spacing;
13
+ };
14
+ sectionContainer: {
15
+ display: "flex";
16
+ flexDirection: "column";
17
+ width: "100%";
18
+ };
19
+ sectionContainerFull: {};
20
+ sectionContainerMD: {
21
+ maxWidth: number;
22
+ };
23
+ sectionContainerSM: {
24
+ maxWidth: number;
25
+ };
26
+ };
27
+ //# sourceMappingURL=Section.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Section/Section.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;CA6BpB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { makeStyles } from '@alveole/theme';
2
+ export const useStyles = makeStyles(({ isVariant, spacing }) => {
3
+ const paddingValue = isVariant('mobile') ? spacing('100') : spacing('150');
4
+ return {
5
+ section: {
6
+ display: 'flex',
7
+ flexDirection: 'row',
8
+ gap: spacing('075'),
9
+ justifyContent: 'center',
10
+ paddingLeft: paddingValue,
11
+ paddingRight: paddingValue,
12
+ },
13
+ sectionWithPaddingY: {
14
+ paddingTop: paddingValue,
15
+ paddingBottom: paddingValue,
16
+ },
17
+ sectionContainer: {
18
+ display: 'flex',
19
+ flexDirection: 'column',
20
+ width: '100%',
21
+ },
22
+ sectionContainerFull: {},
23
+ sectionContainerMD: {
24
+ maxWidth: 1200,
25
+ },
26
+ sectionContainerSM: {
27
+ maxWidth: 600,
28
+ },
29
+ };
30
+ });
@@ -0,0 +1,2 @@
1
+ export * from './Section';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/Section/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Section';
@@ -1,6 +1,7 @@
1
1
  export * from './Box';
2
2
  export * from './Image';
3
3
  export * from './Metabase';
4
+ export * from './Section';
4
5
  export * from './Typography';
5
6
  export * from './Version';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './Box';
2
2
  export * from './Image';
3
3
  export * from './Metabase';
4
+ export * from './Section';
4
5
  export * from './Typography';
5
6
  export * from './Version';
@@ -1,11 +1,13 @@
1
1
  export * as BoxStory from '../core/Box/Box.stories';
2
2
  export * as ImageStory from '../core/Image/Image.stories';
3
3
  export * as MetabaseStory from '../core/Metabase/Metabase.stories';
4
+ export * as SectionStory from '../core/Section/Section.stories';
4
5
  export * as TypographyStory from '../core/Typography/Typography.stories';
5
6
  export * as VersionStory from '../core/Version/Version.stories';
6
7
  export * as AvatarStory from '../ui/Avatar/Avatar.stories';
7
8
  export * as ButtonStory from '../ui/Button/Button.stories';
8
9
  export * as DividerStory from '../ui/Divider/Divider.stories';
10
+ export * as EmptyStateStory from '../ui/EmptyState/EmptyState.stories';
9
11
  export * as ListItemStory from '../ui/ListItem/ListItem.stories';
10
12
  export * as LucideIconStory from '../ui/LucideIcon/LucideIcon.stories';
11
13
  export * as ResourceListStory from '../ui/ResourceList/ResourceList.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,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,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,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"}
@@ -2,12 +2,14 @@
2
2
  export * as BoxStory from '../core/Box/Box.stories';
3
3
  export * as ImageStory from '../core/Image/Image.stories';
4
4
  export * as MetabaseStory from '../core/Metabase/Metabase.stories';
5
+ export * as SectionStory from '../core/Section/Section.stories';
5
6
  export * as TypographyStory from '../core/Typography/Typography.stories';
6
7
  export * as VersionStory from '../core/Version/Version.stories';
7
8
  // UI
8
9
  export * as AvatarStory from '../ui/Avatar/Avatar.stories';
9
10
  export * as ButtonStory from '../ui/Button/Button.stories';
10
11
  export * as DividerStory from '../ui/Divider/Divider.stories';
12
+ export * as EmptyStateStory from '../ui/EmptyState/EmptyState.stories';
11
13
  export * as ListItemStory from '../ui/ListItem/ListItem.stories';
12
14
  export * as LucideIconStory from '../ui/LucideIcon/LucideIcon.stories';
13
15
  export * as ResourceListStory from '../ui/ResourceList/ResourceList.stories';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { BoxProps } from '../../core/Box/Box';
3
+ import { LucideIconProps } from '../LucideIcon';
4
+ export type EmptyStateProps = BoxProps & {
5
+ iconName?: LucideIconProps['name'];
6
+ title?: string;
7
+ description?: string;
8
+ /**
9
+ * @deprecated Utilisez `description` à la place.
10
+ */
11
+ text?: string;
12
+ illustration?: React.ReactNode;
13
+ actions?: React.ReactNode;
14
+ };
15
+ export declare const EmptyState: (props: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=EmptyState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/ui/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAgC,eAAe,EAAE,MAAM,eAAe,CAAC;AAG9E,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG;IACvC,QAAQ,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4CA8BhD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Typography } from '../../core';
3
+ import { Box } from '../../core/Box/Box';
4
+ import { isLucideIconName, LucideIcon } from '../LucideIcon';
5
+ import { useStyles } from './EmptyState.styles';
6
+ export const EmptyState = (props) => {
7
+ const { children, style, iconName, title, description, text, illustration, actions, ...boxProps } = props;
8
+ const styles = useStyles();
9
+ const descriptionToRender = description ?? text;
10
+ const footer = actions ?? children;
11
+ return (_jsxs(Box, { tag: "empty-state", style: [styles.container, style], ...boxProps, children: [_jsxs(Box, { tag: "empty-state-contenu", style: styles.contenu, children: [(illustration || iconName) && (_jsx(Box, { style: styles.media, children: illustration ? (illustration) : iconName && isLucideIconName(iconName) ? (_jsx(LucideIcon, { name: iconName, size: "lg" })) : null })), _jsxs(Box, { style: styles.messageEtDescription, children: [title && _jsx(Typography, { style: styles.title, children: title }), descriptionToRender && _jsx(Typography, { style: styles.description, children: descriptionToRender })] })] }), footer && _jsx(Box, { style: styles.footer, children: footer })] }));
12
+ };
@@ -0,0 +1,73 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Kit"];
4
+ experimental: false;
5
+ description: string;
6
+ figmaURL: string;
7
+ component: (props: import("./EmptyState").EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
8
+ styleFn: () => {
9
+ container: {
10
+ display: "flex";
11
+ flexDirection: "column";
12
+ alignItems: "center";
13
+ justifyContent: "center";
14
+ gap: import("@alveole/theme").Spacing;
15
+ paddingTop: number;
16
+ paddingBottom: import("@alveole/theme").Spacing;
17
+ paddingLeft: import("@alveole/theme").Spacing;
18
+ paddingRight: import("@alveole/theme").Spacing;
19
+ textAlign: "center";
20
+ height: "100%";
21
+ };
22
+ contenu: {
23
+ display: "flex";
24
+ gap: import("@alveole/theme").Spacing;
25
+ alignItems: "center";
26
+ textAlign: "center";
27
+ flex: number;
28
+ justifyContent: "center";
29
+ };
30
+ media: {
31
+ display: "flex";
32
+ alignItems: "center";
33
+ justifyContent: "center";
34
+ color: "#002764";
35
+ backgroundColor: "#F2F9FF";
36
+ borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
37
+ padding: import("@alveole/theme").Spacing;
38
+ };
39
+ messageEtDescription: {
40
+ display: "flex";
41
+ flexDirection: "column";
42
+ gap: import("@alveole/theme").Spacing;
43
+ };
44
+ title: {
45
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
46
+ fontSize: 18 | 20;
47
+ lineHeight: 24 | 28;
48
+ letterSpacing: 0;
49
+ color: "#151617";
50
+ };
51
+ description: {
52
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
53
+ fontSize: 14;
54
+ lineHeight: 20;
55
+ letterSpacing: 0;
56
+ color: "#5F6571";
57
+ };
58
+ footer: {
59
+ width: "100%";
60
+ marginTop: import("@alveole/theme").Spacing;
61
+ display: "flex";
62
+ flexDirection: "column";
63
+ gap: import("@alveole/theme").Spacing;
64
+ };
65
+ };
66
+ };
67
+ export default _default;
68
+ export declare const Default: () => import("react/jsx-runtime").JSX.Element;
69
+ export declare const WithIcon: () => import("react/jsx-runtime").JSX.Element;
70
+ export declare const WithActions: () => import("react/jsx-runtime").JSX.Element;
71
+ export declare const WithCustomChildren: () => import("react/jsx-runtime").JSX.Element;
72
+ export declare const WithFixHeight: () => import("react/jsx-runtime").JSX.Element;
73
+ //# sourceMappingURL=EmptyState.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/EmptyState/EmptyState.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBASkB;AAElB,eAAO,MAAM,OAAO,+CAOnB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAQpB,CAAC;AAEF,eAAO,MAAM,WAAW,+CAcvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,+CAO9B,CAAC;AAEF,eAAO,MAAM,aAAa,+CAOzB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from '../Button';
3
+ import { EmptyState } from './EmptyState';
4
+ import { useStyles } from './EmptyState.styles';
5
+ export default {
6
+ title: 'Empty State',
7
+ tags: ['Kit'],
8
+ experimental: false,
9
+ description: "À utiliser quand une liste d'objet est vide",
10
+ figmaURL: 'https://www.figma.com/design/xJz8Z6vfrnZPKTtRbuT2W8/Alveole---Composants?node-id=1399-538&t=baZKFA9BpkeQGeZm-4',
11
+ component: EmptyState,
12
+ styleFn: useStyles,
13
+ };
14
+ export const Default = () => {
15
+ return (_jsx(EmptyState, { title: "Aucun \u00E9l\u00E9ment pour l\u2019instant", description: "Ajoutez un premier \u00E9l\u00E9ment pour commencer \u00E0 travailler sur cette section." }));
16
+ };
17
+ export const WithIcon = () => {
18
+ return (_jsx(EmptyState, { iconName: "ClipboardList", title: "Aucune donn\u00E9e", description: "Ajoutez un \u00E9l\u00E9ment pour remplir ce tableau." }));
19
+ };
20
+ export const WithActions = () => {
21
+ return (_jsx(EmptyState, { iconName: "FilePlus", title: "Vous n\u2019avez aucun document", description: "Cr\u00E9ez un premier document ou importez-en un depuis votre ordinateur.", actions: _jsxs(_Fragment, { children: [_jsx(Button, { title: "Cr\u00E9er un document", variant: "primary" }), _jsx(Button, { title: "Importer un fichier", variant: "secondary" })] }) }));
22
+ };
23
+ export const WithCustomChildren = () => {
24
+ return (_jsxs(EmptyState, { iconName: "File", description: 'Vous n’avez aucun item', children: [_jsx(Button, { title: 'Button', variant: 'primary', fullWidth: true }), _jsx(Button, { title: 'Secondary action link', variant: 'link' })] }));
25
+ };
26
+ export const WithFixHeight = () => {
27
+ return (_jsxs(EmptyState, { iconName: "File", description: 'Vous n’avez aucun item', style: { height: '600px' }, children: [_jsx(Button, { title: 'Button', variant: 'primary' }), _jsx(Button, { title: 'Secondary action link', variant: 'link' })] }));
28
+ };
@@ -0,0 +1,59 @@
1
+ export declare const useStyles: () => {
2
+ container: {
3
+ display: "flex";
4
+ flexDirection: "column";
5
+ alignItems: "center";
6
+ justifyContent: "center";
7
+ gap: import("@alveole/theme").Spacing;
8
+ paddingTop: number;
9
+ paddingBottom: import("@alveole/theme").Spacing;
10
+ paddingLeft: import("@alveole/theme").Spacing;
11
+ paddingRight: import("@alveole/theme").Spacing;
12
+ textAlign: "center";
13
+ height: "100%";
14
+ };
15
+ contenu: {
16
+ display: "flex";
17
+ gap: import("@alveole/theme").Spacing;
18
+ alignItems: "center";
19
+ textAlign: "center";
20
+ flex: number;
21
+ justifyContent: "center";
22
+ };
23
+ media: {
24
+ display: "flex";
25
+ alignItems: "center";
26
+ justifyContent: "center";
27
+ color: "#002764";
28
+ backgroundColor: "#F2F9FF";
29
+ borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
30
+ padding: import("@alveole/theme").Spacing;
31
+ };
32
+ messageEtDescription: {
33
+ display: "flex";
34
+ flexDirection: "column";
35
+ gap: import("@alveole/theme").Spacing;
36
+ };
37
+ title: {
38
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
39
+ fontSize: 18 | 20;
40
+ lineHeight: 24 | 28;
41
+ letterSpacing: 0;
42
+ color: "#151617";
43
+ };
44
+ description: {
45
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
46
+ fontSize: 14;
47
+ lineHeight: 20;
48
+ letterSpacing: 0;
49
+ color: "#5F6571";
50
+ };
51
+ footer: {
52
+ width: "100%";
53
+ marginTop: import("@alveole/theme").Spacing;
54
+ display: "flex";
55
+ flexDirection: "column";
56
+ gap: import("@alveole/theme").Spacing;
57
+ };
58
+ };
59
+ //# sourceMappingURL=EmptyState.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/EmptyState/EmptyState.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDnB,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { makeStyles } from '@alveole/theme';
2
+ export const useStyles = makeStyles(({ text, color, spacing, radius }) => ({
3
+ container: {
4
+ display: 'flex',
5
+ flexDirection: 'column',
6
+ alignItems: 'center',
7
+ justifyContent: 'center',
8
+ gap: spacing('150'),
9
+ paddingTop: 0,
10
+ paddingBottom: spacing('2W'),
11
+ paddingLeft: spacing('2W'),
12
+ paddingRight: spacing('2W'),
13
+ textAlign: 'center',
14
+ height: '100%',
15
+ },
16
+ contenu: {
17
+ display: 'flex',
18
+ gap: spacing('2W'),
19
+ alignItems: 'center',
20
+ textAlign: 'center',
21
+ flex: 1,
22
+ justifyContent: 'center',
23
+ },
24
+ media: {
25
+ display: 'flex',
26
+ alignItems: 'center',
27
+ justifyContent: 'center',
28
+ color: color.light.text['active-primary'],
29
+ backgroundColor: color.light.background['alt-primary'],
30
+ borderRadius: radius('full'),
31
+ padding: spacing('075'),
32
+ },
33
+ messageEtDescription: {
34
+ display: 'flex',
35
+ flexDirection: 'column',
36
+ gap: spacing('2W'),
37
+ },
38
+ title: {
39
+ color: color.light.text['title-grey'],
40
+ ...text.Titres['H6 - XXS'],
41
+ },
42
+ description: {
43
+ color: color.light.text['mention-grey'],
44
+ ...text['Corps de texte'].SM.Regular,
45
+ },
46
+ footer: {
47
+ width: '100%',
48
+ marginTop: spacing('100'),
49
+ display: 'flex',
50
+ flexDirection: 'column',
51
+ gap: spacing('100'),
52
+ },
53
+ }));
@@ -0,0 +1,2 @@
1
+ export * from './EmptyState';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/EmptyState/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './EmptyState';
@@ -29,7 +29,7 @@ declare const _default: {
29
29
  };
30
30
  compactLargeInformations: {
31
31
  paddingBottom: number;
32
- height: number;
32
+ minHeight: number;
33
33
  justifyContent: "center";
34
34
  };
35
35
  titre: {
@@ -22,7 +22,7 @@ export declare const useStyles: () => {
22
22
  };
23
23
  compactLargeInformations: {
24
24
  paddingBottom: number;
25
- height: number;
25
+ minHeight: number;
26
26
  justifyContent: "center";
27
27
  };
28
28
  titre: {
@@ -23,7 +23,7 @@ export const useStyles = makeStyles(({ text, spacing, color }) => ({
23
23
  },
24
24
  compactLargeInformations: {
25
25
  paddingBottom: 0,
26
- height: 60,
26
+ minHeight: 60,
27
27
  justifyContent: 'center',
28
28
  },
29
29
  titre: {
@@ -1,6 +1,7 @@
1
1
  export * from './Avatar';
2
2
  export * from './Button';
3
3
  export * from './Divider';
4
+ export * from './EmptyState';
4
5
  export * from './ListItem';
5
6
  export * from './LucideIcon';
6
7
  export * from './ResourceList';
@@ -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,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,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,6 +1,7 @@
1
1
  export * from './Avatar';
2
2
  export * from './Button';
3
3
  export * from './Divider';
4
+ export * from './EmptyState';
4
5
  export * from './ListItem';
5
6
  export * from './LucideIcon';
6
7
  export * from './ResourceList';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alveole/components",
3
- "version": "0.15.5",
3
+ "version": "0.16.1",
4
4
  "description": "Shared UI components.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",