@alveole/components 1.3.5 → 1.3.6

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Badge.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.test.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { render } from '@/__tests__/helpers';
3
+ import { LucideIcon } from '../LucideIcon';
4
+ import { Badge } from './Badge';
5
+ describe('Badge', () => {
6
+ it.each(['default', 'info', 'success', 'error', 'new', 'warning'])('rend le texte du badge %s', variant => {
7
+ const { getByText } = render(_jsxs(Badge, { size: "md", variant: variant, children: ["Badge ", variant] }));
8
+ expect(getByText(`Badge ${variant}`)).toBeTruthy();
9
+ });
10
+ it('rend le texte avec une icone', () => {
11
+ const { getByText, getByProps, getByType } = render(_jsx(Badge, { icon: "Check", size: "sm", variant: "success", children: "Badge icon" }));
12
+ const badge = getByProps({ tag: 'badge' });
13
+ const icon = getByType(LucideIcon);
14
+ expect(badge).toBeTruthy();
15
+ expect(icon.props).toEqual(expect.objectContaining({ name: 'Check', size: 'xs' }));
16
+ expect(getByText('Badge icon')).toBeTruthy();
17
+ });
18
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAa,cAAc,EAA8B,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3F,OAAO,EAAO,QAAQ,EAAc,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,SAAS,EAAc,MAAM,eAAe,CAAC;AAQtD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,G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84
84
  borderStyle: undefined,
85
- borderTopLeftRadius: 0,
86
- borderTopRightRadius: 0,
87
- borderBottomLeftRadius: 0,
88
- borderBottomRightRadius: 0,
85
+ ...(borderNone
86
+ ? {
87
+ borderTopLeftRadius: 0,
88
+ borderTopRightRadius: 0,
89
+ borderBottomLeftRadius: 0,
90
+ borderBottomRightRadius: 0,
91
+ }
92
+ : {}),
89
93
  };
90
94
  };
91
95
  const buttonContainerHoverStyle = () => {
@@ -0,0 +1,95 @@
1
+ import { BoxProps } from '../../core';
2
+ import { ButtonProps } from '../Button';
3
+ import { IconProps } from '../LucideIcon';
4
+ export type ResourceListNoContentProps = Pick<BoxProps, 'style'> & {
5
+ title: string;
6
+ description: string;
7
+ IconProps: Pick<IconProps, 'color' | 'name'>;
8
+ ButtonProps?: Pick<ButtonProps, 'title' | 'onPress'>;
9
+ };
10
+ export declare const ResourceListNoContent: {
11
+ (props: ResourceListNoContentProps): import("react/jsx-runtime").JSX.Element;
12
+ stylesFn: () => {
13
+ list: {
14
+ display: "flex";
15
+ flexDirection: "column";
16
+ gap: import("@alveole/theme").Spacing;
17
+ };
18
+ entete: {
19
+ paddingTop: import("@alveole/theme").Spacing;
20
+ paddingBottom: import("@alveole/theme").Spacing;
21
+ };
22
+ enteteTitle: {
23
+ color: "#151617";
24
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
25
+ fontSize: 14;
26
+ lineHeight: 20;
27
+ letterSpacing: 0;
28
+ };
29
+ items: {
30
+ borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
31
+ };
32
+ itemsWithWhiteBackground: {
33
+ backgroundColor: "#FFFFFF";
34
+ };
35
+ withBorder: {
36
+ borderWidth: number;
37
+ borderColor: "#DEE3EC";
38
+ borderLeftWidth: number;
39
+ borderRightWidth: number;
40
+ };
41
+ noBorder: {
42
+ borderWidth: number;
43
+ borderLeftWidth: number;
44
+ borderRightWidth: number;
45
+ };
46
+ loader: {
47
+ flex: number;
48
+ justifyContent: "center";
49
+ alignItems: "center";
50
+ padding: import("@alveole/theme").Spacing;
51
+ };
52
+ noContent: {
53
+ display: "flex";
54
+ padding: import("@alveole/theme").Spacing;
55
+ flexDirection: "column";
56
+ alignItems: "center";
57
+ gap: import("@alveole/theme").Spacing;
58
+ borderRadius: import("@alveole/theme").Spacing;
59
+ borderWidth: number;
60
+ borderColor: "#DEE3EC";
61
+ backgroundColor: "#FFFFFF";
62
+ borderLeftWidth: number;
63
+ borderRightWidth: number;
64
+ width: "100%";
65
+ };
66
+ noContentIntro: {
67
+ display: "flex";
68
+ flexDirection: "column";
69
+ alignItems: "center";
70
+ gap: import("@alveole/theme").Spacing;
71
+ };
72
+ noContentText: {
73
+ display: "flex";
74
+ flexDirection: "column";
75
+ alignItems: "center";
76
+ gap: import("@alveole/theme").Spacing;
77
+ };
78
+ noContentTextTitle: {
79
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
80
+ fontSize: 18 | 20;
81
+ lineHeight: 24 | 28;
82
+ letterSpacing: 0;
83
+ color: "#151617";
84
+ };
85
+ noContentTextDescription: {
86
+ fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
87
+ fontSize: 14;
88
+ lineHeight: 20;
89
+ letterSpacing: 0;
90
+ color: "#5F6571";
91
+ };
92
+ };
93
+ description: string;
94
+ };
95
+ //# sourceMappingURL=ResourceListNoContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourceListNoContent.d.ts","sourceRoot":"","sources":["../../../src/ui/ResourceList/ResourceListNoContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAc,MAAM,YAAY,CAAC;AACvD,OAAO,EAAU,WAAW,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,SAAS,EAAc,MAAM,eAAe,CAAC;AAGtD,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBtE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Typography } from '../../core';
3
+ import { Button } from '../Button';
4
+ import { LucideIcon } from '../LucideIcon';
5
+ import { useStyles } from './ResourceList.styles';
6
+ export const ResourceListNoContent = (props) => {
7
+ const { title, description, style, IconProps, ButtonProps, ...boxProps } = props;
8
+ const styles = useStyles();
9
+ return (_jsxs(Box, { style: [styles.noContent, style], ...boxProps, children: [_jsxs(Box, { style: styles.noContentIntro, children: [_jsx(LucideIcon, { size: "lg", ...IconProps }), _jsxs(Box, { style: styles.noContentText, children: [_jsx(Typography, { style: styles.noContentTextTitle, children: title }), _jsx(Typography, { style: styles.noContentTextDescription, children: description })] })] }), ButtonProps && _jsx(Button, { size: "lg", variant: "primary", ...ButtonProps })] }));
10
+ };
11
+ // Component configuration
12
+ ResourceListNoContent.stylesFn = useStyles;
13
+ ResourceListNoContent.description = 'Elément affiché dans une liste vide';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alveole/components",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "Shared UI components.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -55,7 +55,7 @@
55
55
  "jest": "29.7.0",
56
56
  "jest-expo": "56.0.5",
57
57
  "lucide-react-native": "1.23.0",
58
- "pdfjs-dist": "6.1.200",
58
+ "pdfjs-dist": "6.2.108",
59
59
  "react": "19.2.3",
60
60
  "react-dom": "19.2.3",
61
61
  "react-native": "0.85.3",