@alveole/components 0.14.6 → 0.15.3

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 (75) hide show
  1. package/dist/core/Box/Box.d.ts +1 -1
  2. package/dist/core/Box/Box.stories.d.ts +3 -3
  3. package/dist/core/Typography/Typography.stories.d.ts +2 -2
  4. package/dist/ui/Avatar/Avatar.d.ts +10 -0
  5. package/dist/ui/Avatar/Avatar.d.ts.map +1 -0
  6. package/dist/ui/Avatar/Avatar.js +27 -0
  7. package/dist/ui/Avatar/Avatar.stories.d.ts +27 -0
  8. package/dist/ui/Avatar/Avatar.stories.d.ts.map +1 -0
  9. package/dist/ui/Avatar/Avatar.stories.js +15 -0
  10. package/dist/ui/Avatar/Avatar.styles.d.ts +16 -0
  11. package/dist/ui/Avatar/Avatar.styles.d.ts.map +1 -0
  12. package/dist/ui/Avatar/Avatar.styles.js +13 -0
  13. package/dist/ui/Avatar/index.d.ts +2 -0
  14. package/dist/ui/Avatar/index.d.ts.map +1 -0
  15. package/dist/ui/Avatar/index.js +1 -0
  16. package/dist/ui/ListItem/ListItem.d.ts +16 -0
  17. package/dist/ui/ListItem/ListItem.d.ts.map +1 -0
  18. package/dist/ui/ListItem/ListItem.js +11 -0
  19. package/dist/ui/ListItem/ListItem.stories.d.ts +104 -0
  20. package/dist/ui/ListItem/ListItem.stories.d.ts.map +1 -0
  21. package/dist/ui/ListItem/ListItem.stories.js +23 -0
  22. package/dist/ui/ListItem/ListItem.styles.d.ts +88 -0
  23. package/dist/ui/ListItem/ListItem.styles.d.ts.map +1 -0
  24. package/dist/ui/ListItem/ListItem.styles.js +82 -0
  25. package/dist/ui/ListItem/index.d.ts +2 -0
  26. package/dist/ui/ListItem/index.d.ts.map +1 -0
  27. package/dist/ui/ListItem/index.js +1 -0
  28. package/dist/ui/LucideIcon/LucideIcon.props.d.ts +6 -6
  29. package/dist/ui/LucideIcon/LucideIcon.stories.d.ts +3 -3
  30. package/dist/ui/ResourceList/ResourceList.d.ts +14 -0
  31. package/dist/ui/ResourceList/ResourceList.d.ts.map +1 -0
  32. package/dist/ui/ResourceList/ResourceList.js +28 -0
  33. package/dist/ui/ResourceList/ResourceList.stories.d.ts +96 -0
  34. package/dist/ui/ResourceList/ResourceList.stories.d.ts.map +1 -0
  35. package/dist/ui/ResourceList/ResourceList.stories.js +45 -0
  36. package/dist/ui/ResourceList/ResourceList.styles.d.ts +82 -0
  37. package/dist/ui/ResourceList/ResourceList.styles.d.ts.map +1 -0
  38. package/dist/ui/ResourceList/ResourceList.styles.js +73 -0
  39. package/dist/ui/ResourceList/ResourceListNoContent.d.ts +95 -0
  40. package/dist/ui/ResourceList/ResourceListNoContent.d.ts.map +1 -0
  41. package/dist/ui/ResourceList/ResourceListNoContent.js +13 -0
  42. package/dist/ui/ResourceList/index.d.ts +3 -0
  43. package/dist/ui/ResourceList/index.d.ts.map +1 -0
  44. package/dist/ui/ResourceList/index.js +2 -0
  45. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.d.ts +6 -0
  46. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.d.ts.map +1 -0
  47. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.js +16 -0
  48. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.stories.d.ts +33 -0
  49. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.stories.d.ts.map +1 -0
  50. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.stories.js +18 -0
  51. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.styles.d.ts +23 -0
  52. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.styles.d.ts.map +1 -0
  53. package/dist/ui/ToolbarBottomNav/ToolbarBottomNav.styles.js +18 -0
  54. package/dist/ui/ToolbarBottomNav/ToolbarBottomNavIcon.d.ts +9 -0
  55. package/dist/ui/ToolbarBottomNav/ToolbarBottomNavIcon.d.ts.map +1 -0
  56. package/dist/ui/ToolbarBottomNav/ToolbarBottomNavIcon.js +5 -0
  57. package/dist/ui/ToolbarBottomNav/index.d.ts +3 -0
  58. package/dist/ui/ToolbarBottomNav/index.d.ts.map +1 -0
  59. package/dist/ui/ToolbarBottomNav/index.js +9 -0
  60. package/dist/ui/ToolbarTop/ToolbarTop.d.ts +14 -0
  61. package/dist/ui/ToolbarTop/ToolbarTop.d.ts.map +1 -0
  62. package/dist/ui/ToolbarTop/ToolbarTop.js +19 -0
  63. package/dist/ui/ToolbarTop/ToolbarTop.stories.d.ts +59 -0
  64. package/dist/ui/ToolbarTop/ToolbarTop.stories.d.ts.map +1 -0
  65. package/dist/ui/ToolbarTop/ToolbarTop.stories.js +20 -0
  66. package/dist/ui/ToolbarTop/ToolbarTop.styles.d.ts +43 -0
  67. package/dist/ui/ToolbarTop/ToolbarTop.styles.d.ts.map +1 -0
  68. package/dist/ui/ToolbarTop/ToolbarTop.styles.js +37 -0
  69. package/dist/ui/ToolbarTop/index.d.ts +2 -0
  70. package/dist/ui/ToolbarTop/index.d.ts.map +1 -0
  71. package/dist/ui/ToolbarTop/index.js +1 -0
  72. package/dist/ui/index.d.ts +5 -0
  73. package/dist/ui/index.d.ts.map +1 -1
  74. package/dist/ui/index.js +5 -0
  75. package/package.json +18 -3
@@ -5,7 +5,7 @@ export type BoxProps = Pick<TamaguiViewProps, 'exitStyle' | 'focusStyle' | 'pres
5
5
  hoverStyle?: CSSProperties;
6
6
  };
7
7
  export type BoxElement = TamaguiElement;
8
- export declare const Box: React.ForwardRefExoticComponent<Pick<import("@tamagui/web").StackProps, "pressStyle" | "focusStyle" | "disabledStyle" | "exitStyle"> & RNTamaguiViewNonStyleProps & Pick<import("@tamagui/web").StackProps, "display" | "flex" | "flexWrap" | "flexDirection" | "opacity" | "overflow"> & {
8
+ export declare const Box: React.ForwardRefExoticComponent<Pick<import("tamagui").StackProps, "pressStyle" | "focusStyle" | "disabledStyle" | "exitStyle"> & RNTamaguiViewNonStyleProps & Pick<import("tamagui").StackProps, "display" | "flex" | "flexWrap" | "flexDirection" | "opacity" | "overflow"> & {
9
9
  justify?: TamaguiViewProps["justifyContent"];
10
10
  } & import("./Box.types").BoxAdvancedStyle & {
11
11
  hoverStyle?: CSSProperties;
@@ -3,11 +3,11 @@ declare const _default: {
3
3
  tags: ["Kit"];
4
4
  experimental: false;
5
5
  description: string;
6
- component: import("react").ForwardRefExoticComponent<Pick<import("@tamagui/web").StackProps, "pressStyle" | "focusStyle" | "disabledStyle" | "exitStyle"> & import("@tamagui/core").RNTamaguiViewNonStyleProps & Pick<import("@tamagui/web").StackProps, "display" | "flex" | "flexWrap" | "flexDirection" | "opacity" | "overflow"> & {
7
- justify?: import("@tamagui/web").ViewProps["justifyContent"];
6
+ component: import("react").ForwardRefExoticComponent<Pick<import("tamagui").StackProps, "pressStyle" | "focusStyle" | "disabledStyle" | "exitStyle"> & import("@tamagui/core").RNTamaguiViewNonStyleProps & Pick<import("tamagui").StackProps, "display" | "flex" | "flexWrap" | "flexDirection" | "opacity" | "overflow"> & {
7
+ justify?: import("tamagui").ViewProps["justifyContent"];
8
8
  } & import("./Box.types").BoxAdvancedStyle & {
9
9
  hoverStyle?: import("react").CSSProperties;
10
- } & import("react").RefAttributes<import("@tamagui/web").TamaguiElement>>;
10
+ } & import("react").RefAttributes<import("tamagui").TamaguiElement>>;
11
11
  styleFn: () => string;
12
12
  };
13
13
  export default _default;
@@ -3,10 +3,10 @@ declare const _default: {
3
3
  tags: ["Kit"];
4
4
  experimental: false;
5
5
  description: string;
6
- component: import("react").ForwardRefExoticComponent<Pick<import("@tamagui/web").TextProps, "pressStyle" | "focusStyle" | "disabledStyle" | "exitStyle"> & Omit<import("@tamagui/core").RNTamaguiTextNonStyleProps, "children"> & import("./Typography.types").TypographyBaseStyle & import("./Typography.types").TypographyAdvancedStyle & {
6
+ component: import("react").ForwardRefExoticComponent<Pick<import("tamagui").TextProps, "pressStyle" | "focusStyle" | "disabledStyle" | "exitStyle"> & Omit<import("@tamagui/core").RNTamaguiTextNonStyleProps, "children"> & import("./Typography.types").TypographyBaseStyle & import("./Typography.types").TypographyAdvancedStyle & {
7
7
  children: React.ReactNode;
8
8
  hoverStyle?: import("react").CSSProperties;
9
- } & import("react").RefAttributes<import("@tamagui/web").TamaguiTextElement>>;
9
+ } & import("react").RefAttributes<import("tamagui").TamaguiTextElement>>;
10
10
  styleFn: () => string;
11
11
  };
12
12
  export default _default;
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+ import { AvatarImageProps } from 'tamagui';
3
+ export type AvatarProps = {
4
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
+ fallbackText?: string;
6
+ style?: CSSProperties;
7
+ src?: AvatarImageProps['src'];
8
+ };
9
+ export declare const Avatar: (props: AvatarProps) => import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=Avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/ui/Avatar/Avatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAA2B,MAAM,SAAS,CAAC;AAIpE,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,GAAG,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;CAC/B,CAAC;AASF,eAAO,MAAM,MAAM,GAAI,OAAO,WAAW,4CAsBxC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useTheme } from '@alveole/theme';
3
+ import { Avatar as TamaguiAvatar } from 'tamagui';
4
+ import { Typography } from '../../core';
5
+ import { useStyles } from '././Avatar.styles';
6
+ const getInitials = (name) => {
7
+ const words = name.trim().split(/\s+/);
8
+ if (words.length === 0)
9
+ return '';
10
+ if (words.length === 1)
11
+ return words[0][0]?.toUpperCase() ?? '';
12
+ return (words[0][0] + words[1][0]).toUpperCase();
13
+ };
14
+ export const Avatar = (props) => {
15
+ const { style, fallbackText, src, size, ...avatarProps } = props;
16
+ const initials = getInitials(fallbackText ?? '');
17
+ const { spacing } = useTheme();
18
+ const styles = useStyles();
19
+ const avatarSize = {
20
+ xs: 20,
21
+ sm: spacing('3W'),
22
+ md: spacing('4W'),
23
+ lg: spacing('5W'),
24
+ xl: spacing('8W'),
25
+ };
26
+ return (_jsxs(TamaguiAvatar, { style: { ...styles.avatar, ...style }, circular: true, size: avatarSize[size], ...avatarProps, children: [_jsx(TamaguiAvatar.Image, { src: src }), _jsx(Typography, { style: styles.fallbackText, children: initials })] }));
27
+ };
@@ -0,0 +1,27 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Kit"];
4
+ experimental: false;
5
+ figmaURL: string;
6
+ description: string;
7
+ component: (props: import("./Avatar").AvatarProps) => import("react/jsx-runtime").JSX.Element;
8
+ styleFn: () => {
9
+ avatar: {
10
+ backgroundColor: "#D2E8FE";
11
+ };
12
+ fallbackText: {
13
+ display: "flex";
14
+ justifyContent: "center";
15
+ textAlign: "center";
16
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
17
+ fontSize: 16;
18
+ lineHeight: 24;
19
+ letterSpacing: 0;
20
+ };
21
+ image: {};
22
+ };
23
+ };
24
+ export default _default;
25
+ export declare const Sizes: () => import("react/jsx-runtime").JSX.Element;
26
+ export declare const Variants: () => import("react/jsx-runtime").JSX.Element;
27
+ //# sourceMappingURL=Avatar.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Avatar/Avatar.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAQkB;AAElB,eAAO,MAAM,KAAK,+CAQjB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAMpB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from '../../core';
3
+ import { Avatar } from './Avatar';
4
+ import { useStyles } from './Avatar.styles';
5
+ export default {
6
+ title: 'Avatar',
7
+ tags: ['Kit'],
8
+ experimental: false,
9
+ figmaURL: 'https://www.figma.com/design/xJz8Z6vfrnZPKTtRbuT2W8/Composants?node-id=1002-546',
10
+ description: 'Avatar avec image ou texte, de différentes tailles. Composant de type Avatar (tamagui).',
11
+ component: Avatar,
12
+ styleFn: useStyles,
13
+ };
14
+ export const Sizes = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 8, flexWrap: "wrap", children: [_jsx(Avatar, { size: "xs", src: "https://picsum.photos/100/200" }), _jsx(Avatar, { size: "sm", src: "https://picsum.photos/100/200" }), _jsx(Avatar, { size: "md", src: "https://picsum.photos/100/200" }), _jsx(Avatar, { size: "lg", src: "https://picsum.photos/100/200" }), _jsx(Avatar, { size: "xl", src: "https://picsum.photos/100/200" })] }));
15
+ export const Variants = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 8, flexWrap: "wrap", children: [_jsx(Avatar, { size: "sm", src: "https://picsum.photos/100/200" }), _jsx(Avatar, { size: "sm", fallbackText: "Jean Pierre" }), _jsx(Avatar, { size: "sm", fallbackText: "Jean-Pierre" })] }));
@@ -0,0 +1,16 @@
1
+ export declare const useStyles: () => {
2
+ avatar: {
3
+ backgroundColor: "#D2E8FE";
4
+ };
5
+ fallbackText: {
6
+ display: "flex";
7
+ justifyContent: "center";
8
+ textAlign: "center";
9
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
10
+ fontSize: 16;
11
+ lineHeight: 24;
12
+ letterSpacing: 0;
13
+ };
14
+ image: {};
15
+ };
16
+ //# sourceMappingURL=Avatar.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Avatar/Avatar.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAWnB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { makeStyles } from '@alveole/theme';
2
+ export const useStyles = makeStyles(({ color, text }) => ({
3
+ avatar: {
4
+ backgroundColor: color.background['open-bleu-captive'],
5
+ },
6
+ fallbackText: {
7
+ ...text['Corps de texte'].MD.Regular,
8
+ display: 'flex',
9
+ justifyContent: 'center',
10
+ textAlign: 'center',
11
+ },
12
+ image: {},
13
+ }));
@@ -0,0 +1,2 @@
1
+ export * from './Avatar';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Avatar';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { BoxProps } from '../../core';
3
+ import { AvatarProps } from '../Avatar';
4
+ import { IconProps } from '../LucideIcon';
5
+ export type ListItemProps = BoxProps & {
6
+ title: string;
7
+ description?: string;
8
+ IconProps?: Pick<IconProps, 'color' | 'name'>;
9
+ AvatarProps?: Pick<AvatarProps, 'fallbackText' | 'src'>;
10
+ preview_url?: string;
11
+ trailing?: () => React.ReactNode;
12
+ loading?: boolean;
13
+ showSeparateur?: boolean;
14
+ };
15
+ export declare const ListItem: (props: ListItemProps) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=ListItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/ui/ListItem/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,QAAQ,EAAqB,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAU,WAAW,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,SAAS,EAAc,MAAM,eAAe,CAAC;AAGtD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;IAC9C,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,KAAK,CAAC,CAAC;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,QAAQ,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,4CAoD5C,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ActivityIndicator } from 'react-native';
3
+ import { Box, Image, Typography } from '../../core';
4
+ import { Avatar } from '../Avatar';
5
+ import { LucideIcon } from '../LucideIcon';
6
+ import { useStyles } from './ListItem.styles';
7
+ export const ListItem = (props) => {
8
+ const { children, title, description, style, AvatarProps, IconProps, preview_url, trailing, loading = false, showSeparateur = true, ...itemProps } = props;
9
+ const styles = useStyles();
10
+ return (_jsxs(Box, { tag: "resource-item", style: [styles.item, style], hoverStyle: styles.itemHover, ...itemProps, children: [preview_url ? (_jsx(Box, { style: styles.previewContainer, children: _jsx(Image, { source: { uri: preview_url }, width: styles.preview.width, height: styles.preview.height, contentFit: "contain" }) })) : (_jsxs(_Fragment, { children: [IconProps && _jsx(LucideIcon, { size: "sm", color: styles.defaultIcon.color, ...IconProps }), AvatarProps && _jsx(Avatar, { size: "xs", ...AvatarProps })] })), _jsxs(Box, { style: styles.detail, children: [showSeparateur && _jsx(Box, { style: styles.separateur }), _jsxs(Box, { style: styles.principal, children: [_jsx(Typography, { style: styles.title, children: title }), description && _jsx(Typography, { style: styles.description, children: description })] }), trailing && trailing()] }), loading && (_jsx(Box, { style: styles.loading, children: _jsx(ActivityIndicator, { size: "small", color: styles.loading.color }) }))] }));
11
+ };
@@ -0,0 +1,104 @@
1
+ declare const _default: {
2
+ title: string;
3
+ tags: ["Composant"];
4
+ experimental: false;
5
+ figmaURL: string;
6
+ description: string;
7
+ component: (props: import("./ListItem").ListItemProps) => import("react/jsx-runtime").JSX.Element;
8
+ styleFn: () => {
9
+ item: {
10
+ display: "flex";
11
+ flexDirection: "row";
12
+ paddingLeft: import("@alveole/theme").Spacing;
13
+ paddingRight: import("@alveole/theme").Spacing;
14
+ alignItems: "center";
15
+ gap: import("@alveole/theme").Spacing;
16
+ alignSelf: "stretch";
17
+ };
18
+ itemHover: {
19
+ backgroundColor: `rgba${string}`;
20
+ borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
21
+ };
22
+ container: {
23
+ display: "flex";
24
+ flexDirection: "row";
25
+ gap: import("@alveole/theme").Spacing;
26
+ };
27
+ detail: {
28
+ paddingTop: import("@alveole/theme").Spacing;
29
+ paddingBottom: import("@alveole/theme").Spacing;
30
+ flex: number;
31
+ display: "flex";
32
+ flexDirection: "row";
33
+ alignItems: "center";
34
+ alignSelf: "stretch";
35
+ gap: import("@alveole/theme").Spacing;
36
+ position: "relative";
37
+ };
38
+ separateur: {
39
+ left: number;
40
+ top: number;
41
+ position: "absolute";
42
+ width: "100%";
43
+ height: number;
44
+ backgroundColor: "#DEE3EC";
45
+ };
46
+ principal: {
47
+ display: "flex";
48
+ flexDirection: "column";
49
+ justifyContent: "center";
50
+ alignItems: "flex-start";
51
+ flex: number;
52
+ };
53
+ title: {
54
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
55
+ fontSize: 14;
56
+ lineHeight: 20;
57
+ letterSpacing: 0;
58
+ color: "#373A3F";
59
+ };
60
+ description: {
61
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
62
+ fontSize: 12;
63
+ lineHeight: 20;
64
+ letterSpacing: 0;
65
+ color: "#5F6571";
66
+ };
67
+ additional: {};
68
+ trailing: {
69
+ display: "flex";
70
+ justifyContent: "center";
71
+ alignSelf: "stretch";
72
+ color: "#5F6571";
73
+ };
74
+ loading: {
75
+ display: "flex";
76
+ alignItems: "center";
77
+ justifyContent: "center";
78
+ color: "#D9127C";
79
+ };
80
+ defaultIcon: {
81
+ color: "#5F6571";
82
+ };
83
+ previewContainer: {
84
+ display: "flex";
85
+ alignItems: "center";
86
+ justifyContent: "center";
87
+ overflow: "hidden";
88
+ borderRadius: import("@alveole/theme").Spacing;
89
+ };
90
+ preview: {
91
+ width: number;
92
+ height: number;
93
+ };
94
+ };
95
+ };
96
+ export default _default;
97
+ export declare const Default: () => import("react/jsx-runtime").JSX.Element;
98
+ export declare const WithTrailing: () => import("react/jsx-runtime").JSX.Element;
99
+ export declare const WithLoading: () => import("react/jsx-runtime").JSX.Element;
100
+ export declare const WithoutSeparator: () => import("react/jsx-runtime").JSX.Element;
101
+ export declare const WithIcon: () => import("react/jsx-runtime").JSX.Element;
102
+ export declare const WithAvatar: () => import("react/jsx-runtime").JSX.Element;
103
+ export declare const WithPreviewImage: () => import("react/jsx-runtime").JSX.Element;
104
+ //# sourceMappingURL=ListItem.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/ListItem/ListItem.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAQkB;AAElB,eAAO,MAAM,OAAO,+CAA6D,CAAC;AAElF,eAAO,MAAM,YAAY,+CAMxB,CAAC;AAEF,eAAO,MAAM,WAAW,+CAA4E,CAAC;AAErG,eAAO,MAAM,gBAAgB,+CAAoF,CAAC;AAElH,eAAO,MAAM,QAAQ,+CAEpB,CAAC;AAEF,eAAO,MAAM,UAAU,+CAStB,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAM5B,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ButtonIcon } from '../Button';
3
+ import { ListItem } from './ListItem';
4
+ import { useStyles } from './ListItem.styles';
5
+ export default {
6
+ title: 'ListItem',
7
+ tags: ['Composant'],
8
+ experimental: false,
9
+ figmaURL: 'https://www.figma.com/design/xJz8Z6vfrnZPKTtRbuT2W8/Composants?node-id=1002-558',
10
+ description: 'Permet d’afficher les données d‘une ressource.',
11
+ component: ListItem,
12
+ styleFn: useStyles,
13
+ };
14
+ export const Default = () => _jsx(ListItem, { title: "Titre", description: "Description" });
15
+ export const WithTrailing = () => (_jsx(ListItem, { title: "Titre", description: "Description", trailing: () => _jsx(ButtonIcon, { variant: "tertiary", icon: "CircleX", onPress: () => console.log('remove') }) }));
16
+ export const WithLoading = () => _jsx(ListItem, { title: "Titre", description: "Description", loading: true });
17
+ export const WithoutSeparator = () => _jsx(ListItem, { title: "Titre", description: "Description", showSeparateur: false });
18
+ export const WithIcon = () => (_jsx(ListItem, { title: "Titre", description: "Description", IconProps: { name: 'Settings', color: 'primary' } }));
19
+ export const WithAvatar = () => (_jsx(ListItem, { title: "Titre", description: "Description", AvatarProps: {
20
+ fallbackText: 'Jean Pierre',
21
+ src: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400',
22
+ } }));
23
+ export const WithPreviewImage = () => (_jsx(ListItem, { title: "Titre", description: "Description", preview_url: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400" }));
@@ -0,0 +1,88 @@
1
+ export declare const useStyles: () => {
2
+ item: {
3
+ display: "flex";
4
+ flexDirection: "row";
5
+ paddingLeft: import("@alveole/theme").Spacing;
6
+ paddingRight: import("@alveole/theme").Spacing;
7
+ alignItems: "center";
8
+ gap: import("@alveole/theme").Spacing;
9
+ alignSelf: "stretch";
10
+ };
11
+ itemHover: {
12
+ backgroundColor: `rgba${string}`;
13
+ borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
14
+ };
15
+ container: {
16
+ display: "flex";
17
+ flexDirection: "row";
18
+ gap: import("@alveole/theme").Spacing;
19
+ };
20
+ detail: {
21
+ paddingTop: import("@alveole/theme").Spacing;
22
+ paddingBottom: import("@alveole/theme").Spacing;
23
+ flex: number;
24
+ display: "flex";
25
+ flexDirection: "row";
26
+ alignItems: "center";
27
+ alignSelf: "stretch";
28
+ gap: import("@alveole/theme").Spacing;
29
+ position: "relative";
30
+ };
31
+ separateur: {
32
+ left: number;
33
+ top: number;
34
+ position: "absolute";
35
+ width: "100%";
36
+ height: number;
37
+ backgroundColor: "#DEE3EC";
38
+ };
39
+ principal: {
40
+ display: "flex";
41
+ flexDirection: "column";
42
+ justifyContent: "center";
43
+ alignItems: "flex-start";
44
+ flex: number;
45
+ };
46
+ title: {
47
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
48
+ fontSize: 14;
49
+ lineHeight: 20;
50
+ letterSpacing: 0;
51
+ color: "#373A3F";
52
+ };
53
+ description: {
54
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
55
+ fontSize: 12;
56
+ lineHeight: 20;
57
+ letterSpacing: 0;
58
+ color: "#5F6571";
59
+ };
60
+ additional: {};
61
+ trailing: {
62
+ display: "flex";
63
+ justifyContent: "center";
64
+ alignSelf: "stretch";
65
+ color: "#5F6571";
66
+ };
67
+ loading: {
68
+ display: "flex";
69
+ alignItems: "center";
70
+ justifyContent: "center";
71
+ color: "#D9127C";
72
+ };
73
+ defaultIcon: {
74
+ color: "#5F6571";
75
+ };
76
+ previewContainer: {
77
+ display: "flex";
78
+ alignItems: "center";
79
+ justifyContent: "center";
80
+ overflow: "hidden";
81
+ borderRadius: import("@alveole/theme").Spacing;
82
+ };
83
+ preview: {
84
+ width: number;
85
+ height: number;
86
+ };
87
+ };
88
+ //# sourceMappingURL=ListItem.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/ListItem/ListItem.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FnB,CAAC"}
@@ -0,0 +1,82 @@
1
+ import { makeStyles } from '@alveole/theme';
2
+ export const useStyles = makeStyles(({ color, text, radius, spacing }) => ({
3
+ item: {
4
+ display: 'flex',
5
+ flexDirection: 'row',
6
+ paddingLeft: spacing('2W'),
7
+ paddingRight: spacing('2W'),
8
+ alignItems: 'center',
9
+ gap: spacing('3V'),
10
+ alignSelf: 'stretch',
11
+ },
12
+ itemHover: {
13
+ backgroundColor: color.alpha(color.light.background['alt-grey'], 0.75),
14
+ borderRadius: radius('md'),
15
+ },
16
+ container: {
17
+ display: 'flex',
18
+ flexDirection: 'row',
19
+ gap: spacing('3V'),
20
+ },
21
+ detail: {
22
+ paddingTop: spacing('1W'),
23
+ paddingBottom: spacing('1W'),
24
+ flex: 1,
25
+ display: 'flex',
26
+ flexDirection: 'row',
27
+ alignItems: 'center',
28
+ alignSelf: 'stretch',
29
+ gap: spacing('1W'),
30
+ position: 'relative',
31
+ },
32
+ separateur: {
33
+ left: 0,
34
+ top: 0,
35
+ position: 'absolute',
36
+ width: '100%',
37
+ height: 1,
38
+ backgroundColor: color.light.border['default-grey'],
39
+ },
40
+ principal: {
41
+ display: 'flex',
42
+ flexDirection: 'column',
43
+ justifyContent: 'center',
44
+ alignItems: 'flex-start',
45
+ flex: 1,
46
+ },
47
+ title: {
48
+ color: color.light.text['default-grey'],
49
+ ...text['Corps de texte'].SM.Regular,
50
+ },
51
+ description: {
52
+ color: color.light.text['mention-grey'],
53
+ ...text['Corps de texte'].XS.Regular,
54
+ },
55
+ additional: {},
56
+ trailing: {
57
+ display: 'flex',
58
+ justifyContent: 'center',
59
+ alignSelf: 'stretch',
60
+ color: color.light.text['mention-grey'],
61
+ },
62
+ loading: {
63
+ display: 'flex',
64
+ alignItems: 'center',
65
+ justifyContent: 'center',
66
+ color: color.primary,
67
+ },
68
+ defaultIcon: {
69
+ color: color.light.text['mention-grey'],
70
+ },
71
+ previewContainer: {
72
+ display: 'flex',
73
+ alignItems: 'center',
74
+ justifyContent: 'center',
75
+ overflow: 'hidden',
76
+ borderRadius: spacing('0,5V'),
77
+ },
78
+ preview: {
79
+ width: 40,
80
+ height: 40,
81
+ },
82
+ }));
@@ -0,0 +1,2 @@
1
+ export * from './ListItem';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ListItem/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './ListItem';
@@ -18,6 +18,9 @@ declare const PublicPropsSchema: z.ZodObject<{
18
18
  Box: "Box";
19
19
  tab: "tab";
20
20
  olive: "olive";
21
+ Menu: "Menu";
22
+ Image: "Image";
23
+ toolbox: "toolbox";
21
24
  AArrowDown: "AArrowDown";
22
25
  AArrowUp: "AArrowUp";
23
26
  ALargeSmall: "ALargeSmall";
@@ -832,7 +835,6 @@ declare const PublicPropsSchema: z.ZodObject<{
832
835
  IceCreamCone: "IceCreamCone";
833
836
  IdCard: "IdCard";
834
837
  IdCardLanyard: "IdCardLanyard";
835
- Image: "Image";
836
838
  ImageDown: "ImageDown";
837
839
  ImageMinus: "ImageMinus";
838
840
  ImageOff: "ImageOff";
@@ -973,7 +975,6 @@ declare const PublicPropsSchema: z.ZodObject<{
973
975
  MegaphoneOff: "MegaphoneOff";
974
976
  Meh: "Meh";
975
977
  MemoryStick: "MemoryStick";
976
- Menu: "Menu";
977
978
  Merge: "Merge";
978
979
  MessageCircle: "MessageCircle";
979
980
  MessageCircleCode: "MessageCircleCode";
@@ -2019,7 +2020,6 @@ declare const PublicPropsSchema: z.ZodObject<{
2019
2020
  toast: "toast";
2020
2021
  toaster: "toaster";
2021
2022
  toiletRoll: "toiletRoll";
2022
- toolbox: "toolbox";
2023
2023
  toolbox2: "toolbox2";
2024
2024
  topCrop: "topCrop";
2025
2025
  towelFolded: "towelFolded";
@@ -2083,6 +2083,9 @@ export declare const LucideIconPropsJSON: z.core.ZodStandardJSONSchemaPayload<z.
2083
2083
  Box: "Box";
2084
2084
  tab: "tab";
2085
2085
  olive: "olive";
2086
+ Menu: "Menu";
2087
+ Image: "Image";
2088
+ toolbox: "toolbox";
2086
2089
  AArrowDown: "AArrowDown";
2087
2090
  AArrowUp: "AArrowUp";
2088
2091
  ALargeSmall: "ALargeSmall";
@@ -2897,7 +2900,6 @@ export declare const LucideIconPropsJSON: z.core.ZodStandardJSONSchemaPayload<z.
2897
2900
  IceCreamCone: "IceCreamCone";
2898
2901
  IdCard: "IdCard";
2899
2902
  IdCardLanyard: "IdCardLanyard";
2900
- Image: "Image";
2901
2903
  ImageDown: "ImageDown";
2902
2904
  ImageMinus: "ImageMinus";
2903
2905
  ImageOff: "ImageOff";
@@ -3038,7 +3040,6 @@ export declare const LucideIconPropsJSON: z.core.ZodStandardJSONSchemaPayload<z.
3038
3040
  MegaphoneOff: "MegaphoneOff";
3039
3041
  Meh: "Meh";
3040
3042
  MemoryStick: "MemoryStick";
3041
- Menu: "Menu";
3042
3043
  Merge: "Merge";
3043
3044
  MessageCircle: "MessageCircle";
3044
3045
  MessageCircleCode: "MessageCircleCode";
@@ -4084,7 +4085,6 @@ export declare const LucideIconPropsJSON: z.core.ZodStandardJSONSchemaPayload<z.
4084
4085
  toast: "toast";
4085
4086
  toaster: "toaster";
4086
4087
  toiletRoll: "toiletRoll";
4087
- toolbox: "toolbox";
4088
4088
  toolbox2: "toolbox2";
4089
4089
  topCrop: "topCrop";
4090
4090
  towelFolded: "towelFolded";
@@ -16,6 +16,9 @@ declare const _default: {
16
16
  Box: "Box";
17
17
  tab: "tab";
18
18
  olive: "olive";
19
+ Menu: "Menu";
20
+ Image: "Image";
21
+ toolbox: "toolbox";
19
22
  AArrowDown: "AArrowDown";
20
23
  AArrowUp: "AArrowUp";
21
24
  ALargeSmall: "ALargeSmall";
@@ -830,7 +833,6 @@ declare const _default: {
830
833
  IceCreamCone: "IceCreamCone";
831
834
  IdCard: "IdCard";
832
835
  IdCardLanyard: "IdCardLanyard";
833
- Image: "Image";
834
836
  ImageDown: "ImageDown";
835
837
  ImageMinus: "ImageMinus";
836
838
  ImageOff: "ImageOff";
@@ -971,7 +973,6 @@ declare const _default: {
971
973
  MegaphoneOff: "MegaphoneOff";
972
974
  Meh: "Meh";
973
975
  MemoryStick: "MemoryStick";
974
- Menu: "Menu";
975
976
  Merge: "Merge";
976
977
  MessageCircle: "MessageCircle";
977
978
  MessageCircleCode: "MessageCircleCode";
@@ -2017,7 +2018,6 @@ declare const _default: {
2017
2018
  toast: "toast";
2018
2019
  toaster: "toaster";
2019
2020
  toiletRoll: "toiletRoll";
2020
- toolbox: "toolbox";
2021
2021
  toolbox2: "toolbox2";
2022
2022
  topCrop: "topCrop";
2023
2023
  towelFolded: "towelFolded";