@alveole/components 0.22.1 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/Map/Map.d.ts +3 -0
- package/dist/core/Map/Map.d.ts.map +1 -0
- package/dist/core/Map/Map.js +5 -0
- package/dist/core/Map/Map.props.d.ts +57 -0
- package/dist/core/Map/Map.props.d.ts.map +1 -0
- package/dist/core/Map/Map.props.js +18 -0
- package/dist/core/Map/Map.stories.d.ts +38 -0
- package/dist/core/Map/Map.stories.d.ts.map +1 -0
- package/dist/core/Map/Map.stories.js +30 -0
- package/dist/core/Map/Map.styles.d.ts +9 -0
- package/dist/core/Map/Map.styles.d.ts.map +1 -0
- package/dist/core/Map/Map.styles.js +9 -0
- package/dist/core/Map/Map.web.d.ts +12 -0
- package/dist/core/Map/Map.web.d.ts.map +1 -0
- package/dist/core/Map/Map.web.js +134 -0
- package/dist/core/Map/index.d.ts +3 -0
- package/dist/core/Map/index.d.ts.map +1 -0
- package/dist/core/Map/index.js +2 -0
- package/dist/core/Metabase/Metabase.d.ts +1 -9
- package/dist/core/Metabase/Metabase.d.ts.map +1 -1
- package/dist/core/Metabase/Metabase.props.d.ts +10 -0
- package/dist/core/Metabase/Metabase.props.d.ts.map +1 -0
- package/dist/core/Metabase/Metabase.props.js +1 -0
- package/dist/core/Metabase/Metabase.stories.d.ts +1 -1
- package/dist/core/Metabase/Metabase.web.d.ts +1 -6
- package/dist/core/Metabase/Metabase.web.d.ts.map +1 -1
- package/dist/core/Page/PageContentScrollable.d.ts +1 -1
- package/dist/core/PdfViewer/PdfViewer.d.ts +3 -0
- package/dist/core/PdfViewer/PdfViewer.d.ts.map +1 -0
- package/dist/core/PdfViewer/PdfViewer.js +8 -0
- package/dist/core/PdfViewer/PdfViewer.props.d.ts +9 -0
- package/dist/core/PdfViewer/PdfViewer.props.d.ts.map +1 -0
- package/dist/core/PdfViewer/PdfViewer.props.js +1 -0
- package/dist/core/PdfViewer/PdfViewer.stories.d.ts +13 -0
- package/dist/core/PdfViewer/PdfViewer.stories.d.ts.map +1 -0
- package/dist/core/PdfViewer/PdfViewer.stories.js +16 -0
- package/dist/core/PdfViewer/PdfViewer.styles.d.ts +2 -0
- package/dist/core/PdfViewer/PdfViewer.styles.d.ts.map +1 -0
- package/dist/core/PdfViewer/PdfViewer.styles.js +2 -0
- package/dist/core/PdfViewer/PdfViewer.web.d.ts +3 -0
- package/dist/core/PdfViewer/PdfViewer.web.d.ts.map +1 -0
- package/dist/core/PdfViewer/PdfViewer.web.js +6 -0
- package/dist/core/PdfViewer/index.d.ts +3 -0
- package/dist/core/PdfViewer/index.d.ts.map +1 -0
- package/dist/core/PdfViewer/index.js +2 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/stories/index.d.ts +5 -0
- package/dist/stories/index.d.ts.map +1 -1
- package/dist/stories/index.js +5 -0
- package/dist/ui/Badge/Badge.d.ts +9 -0
- package/dist/ui/Badge/Badge.d.ts.map +1 -0
- package/dist/ui/Badge/Badge.js +34 -0
- package/dist/ui/Badge/Badge.stories.d.ts +67 -0
- package/dist/ui/Badge/Badge.stories.d.ts.map +1 -0
- package/dist/ui/Badge/Badge.stories.js +16 -0
- package/dist/ui/Badge/Badge.styles.d.ts +55 -0
- package/dist/ui/Badge/Badge.styles.d.ts.map +1 -0
- package/dist/ui/Badge/Badge.styles.js +49 -0
- package/dist/ui/Badge/index.d.ts +2 -0
- package/dist/ui/Badge/index.d.ts.map +1 -0
- package/dist/ui/Badge/index.js +1 -0
- package/dist/ui/Sidebar/Sidebar.d.ts +11 -0
- package/dist/ui/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/ui/Sidebar/Sidebar.js +30 -0
- package/dist/ui/Sidebar/Sidebar.stories.d.ts +182 -0
- package/dist/ui/Sidebar/Sidebar.stories.d.ts.map +1 -0
- package/dist/ui/Sidebar/Sidebar.stories.js +27 -0
- package/dist/ui/Sidebar/Sidebar.styles.d.ts +172 -0
- package/dist/ui/Sidebar/Sidebar.styles.d.ts.map +1 -0
- package/dist/ui/Sidebar/Sidebar.styles.js +148 -0
- package/dist/ui/Sidebar/SidebarFooter.d.ts +4 -0
- package/dist/ui/Sidebar/SidebarFooter.d.ts.map +1 -0
- package/dist/ui/Sidebar/SidebarFooter.js +7 -0
- package/dist/ui/Sidebar/SidebarGroup.d.ts +6 -0
- package/dist/ui/Sidebar/SidebarGroup.d.ts.map +1 -0
- package/dist/ui/Sidebar/SidebarGroup.js +20 -0
- package/dist/ui/Sidebar/SidebarHeader.d.ts +8 -0
- package/dist/ui/Sidebar/SidebarHeader.d.ts.map +1 -0
- package/dist/ui/Sidebar/SidebarHeader.js +26 -0
- package/dist/ui/Sidebar/SidebarItem.d.ts +19 -0
- package/dist/ui/Sidebar/SidebarItem.d.ts.map +1 -0
- package/dist/ui/Sidebar/SidebarItem.js +48 -0
- package/dist/ui/Sidebar/index.d.ts +4 -1
- package/dist/ui/Sidebar/index.d.ts.map +1 -1
- package/dist/ui/Sidebar/index.js +4 -1
- package/dist/ui/Tag/Tag.d.ts +10 -0
- package/dist/ui/Tag/Tag.d.ts.map +1 -0
- package/dist/ui/Tag/Tag.js +17 -0
- package/dist/ui/Tag/Tag.stories.d.ts +48 -0
- package/dist/ui/Tag/Tag.stories.d.ts.map +1 -0
- package/dist/ui/Tag/Tag.stories.js +15 -0
- package/dist/ui/Tag/Tag.styles.d.ts +37 -0
- package/dist/ui/Tag/Tag.styles.d.ts.map +1 -0
- package/dist/ui/Tag/Tag.styles.js +33 -0
- package/dist/ui/Tag/index.d.ts +2 -0
- package/dist/ui/Tag/index.d.ts.map +1 -0
- package/dist/ui/Tag/index.js +1 -0
- package/dist/ui/ToolbarTop/ToolbarTop.stories.d.ts +1 -0
- package/dist/ui/ToolbarTop/ToolbarTop.stories.d.ts.map +1 -1
- package/dist/ui/ToolbarTop/ToolbarTop.stories.js +2 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +3 -0
- package/package.json +3 -2
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
sidebar: {
|
|
3
|
+
backgroundColor: "#FFFFFF";
|
|
4
|
+
borderRightWidth: number;
|
|
5
|
+
borderColor: "#DEE3EC";
|
|
6
|
+
display: "flex";
|
|
7
|
+
flexDirection: "column";
|
|
8
|
+
alignItems: "flex-start";
|
|
9
|
+
alignSelf: "stretch";
|
|
10
|
+
};
|
|
11
|
+
header: {};
|
|
12
|
+
headerContent: {
|
|
13
|
+
display: "flex";
|
|
14
|
+
flexDirection: "row";
|
|
15
|
+
padding: import("@alveole/theme").Spacing;
|
|
16
|
+
};
|
|
17
|
+
logo: {
|
|
18
|
+
marginLeft: import("@alveole/theme").Spacing;
|
|
19
|
+
};
|
|
20
|
+
sidebarContent: {
|
|
21
|
+
flex: number;
|
|
22
|
+
justifyContent: "space-between";
|
|
23
|
+
width: "100%";
|
|
24
|
+
};
|
|
25
|
+
scrollView: {
|
|
26
|
+
flex: number;
|
|
27
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
28
|
+
paddingBottom: import("@alveole/theme").Spacing;
|
|
29
|
+
zIndex: number;
|
|
30
|
+
backgroundColor: "#FFFFFF";
|
|
31
|
+
};
|
|
32
|
+
groupTitleDesktop: {
|
|
33
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
34
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
35
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
36
|
+
fontSize: 12;
|
|
37
|
+
lineHeight: 20;
|
|
38
|
+
letterSpacing: 0;
|
|
39
|
+
};
|
|
40
|
+
groupTitleMobile: {
|
|
41
|
+
color: "#5F6571";
|
|
42
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
43
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
44
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
45
|
+
paddingBottom: import("@alveole/theme").Spacing;
|
|
46
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
47
|
+
fontSize: 16;
|
|
48
|
+
lineHeight: 24;
|
|
49
|
+
letterSpacing: 0;
|
|
50
|
+
};
|
|
51
|
+
sidebarItemDesktop: {
|
|
52
|
+
borderRadius: import("@alveole/theme").Spacing;
|
|
53
|
+
display: "flex";
|
|
54
|
+
flexDirection: "row";
|
|
55
|
+
alignItems: "center";
|
|
56
|
+
gap: import("@alveole/theme").Spacing;
|
|
57
|
+
padding: import("@alveole/theme").Spacing;
|
|
58
|
+
width: "100%";
|
|
59
|
+
color: "#151617";
|
|
60
|
+
stroke: "#151617";
|
|
61
|
+
};
|
|
62
|
+
sidebarItemMobile: {
|
|
63
|
+
display: "flex";
|
|
64
|
+
flexDirection: "row";
|
|
65
|
+
alignItems: "center";
|
|
66
|
+
gap: import("@alveole/theme").Spacing;
|
|
67
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
68
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
69
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
70
|
+
paddingBottom: import("@alveole/theme").Spacing;
|
|
71
|
+
width: "100%";
|
|
72
|
+
color: "#151617";
|
|
73
|
+
stroke: "#151617";
|
|
74
|
+
};
|
|
75
|
+
sidebarItemSelectedDesktop: {
|
|
76
|
+
backgroundColor: "#EFF1F6";
|
|
77
|
+
};
|
|
78
|
+
sidebarItemSelectedMobile: {
|
|
79
|
+
borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
|
|
80
|
+
backgroundColor: "#F2F9FF";
|
|
81
|
+
};
|
|
82
|
+
sidebarItemHover: {
|
|
83
|
+
backgroundColor: "#F4F6FA";
|
|
84
|
+
};
|
|
85
|
+
sidebarItemCurrentHover: {
|
|
86
|
+
backgroundColor: "#EFF1F6";
|
|
87
|
+
};
|
|
88
|
+
sidebarItemContainerDesktop: {
|
|
89
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
90
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
91
|
+
display: "flex";
|
|
92
|
+
flexDirection: "row";
|
|
93
|
+
cursor: "pointer";
|
|
94
|
+
marginLeft: import("@alveole/theme").Spacing;
|
|
95
|
+
marginRight: import("@alveole/theme").Spacing;
|
|
96
|
+
};
|
|
97
|
+
sidebarItemContainerMobile: {
|
|
98
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
99
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
100
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
101
|
+
paddingBottom: import("@alveole/theme").Spacing;
|
|
102
|
+
gap: import("@alveole/theme").Spacing;
|
|
103
|
+
display: "flex";
|
|
104
|
+
flexDirection: "row";
|
|
105
|
+
cursor: "pointer";
|
|
106
|
+
borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
|
|
107
|
+
marginLeft: import("@alveole/theme").Spacing;
|
|
108
|
+
marginRight: import("@alveole/theme").Spacing;
|
|
109
|
+
};
|
|
110
|
+
sidebarItemTitleSelectedDesktop: {
|
|
111
|
+
color: "#373A3F";
|
|
112
|
+
stroke: "#373A3F";
|
|
113
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
114
|
+
fontSize: 16;
|
|
115
|
+
lineHeight: 24;
|
|
116
|
+
letterSpacing: 0;
|
|
117
|
+
};
|
|
118
|
+
sidebarItemTitleSelectedMobile: {
|
|
119
|
+
color: "#D81B38";
|
|
120
|
+
stroke: "#D81B38";
|
|
121
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
122
|
+
fontSize: 16;
|
|
123
|
+
lineHeight: 24;
|
|
124
|
+
letterSpacing: 0;
|
|
125
|
+
};
|
|
126
|
+
sidebarItemIconSelectedMobile: {
|
|
127
|
+
color: "#D81B38";
|
|
128
|
+
};
|
|
129
|
+
sidebarItemTitleDesktop: {
|
|
130
|
+
color: "#151617";
|
|
131
|
+
stroke: "#151617";
|
|
132
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
133
|
+
fontSize: 16;
|
|
134
|
+
lineHeight: 24;
|
|
135
|
+
letterSpacing: 0;
|
|
136
|
+
};
|
|
137
|
+
sidebarItemTitleMobile: {
|
|
138
|
+
color: "#373A3F";
|
|
139
|
+
stroke: "#373A3F";
|
|
140
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
141
|
+
fontSize: 16;
|
|
142
|
+
lineHeight: 24;
|
|
143
|
+
letterSpacing: 0;
|
|
144
|
+
};
|
|
145
|
+
sidebarItemTitleCurrentHoverDesktop: {
|
|
146
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
147
|
+
fontSize: 16;
|
|
148
|
+
lineHeight: 24;
|
|
149
|
+
letterSpacing: 0;
|
|
150
|
+
};
|
|
151
|
+
sidebarItemTitleCurrentHoverMobile: {
|
|
152
|
+
color: "#002764";
|
|
153
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
154
|
+
fontSize: 16;
|
|
155
|
+
lineHeight: 24;
|
|
156
|
+
letterSpacing: 0;
|
|
157
|
+
};
|
|
158
|
+
sidebarItemSelectedIndicator: {
|
|
159
|
+
height: "100%";
|
|
160
|
+
width: import("@alveole/theme").Spacing;
|
|
161
|
+
position: "absolute";
|
|
162
|
+
left: number;
|
|
163
|
+
};
|
|
164
|
+
sidebarItemSelectedIndicatorContent: {
|
|
165
|
+
width: "100%";
|
|
166
|
+
minHeight: import("@alveole/theme").Spacing;
|
|
167
|
+
backgroundColor: "#0264C7";
|
|
168
|
+
margin: string;
|
|
169
|
+
borderRadius: import("@alveole/theme").Spacing;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=Sidebar.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sidebar.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/Sidebar.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJnB,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { Colors, makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ text, color, spacing, isVariant, radius }) => ({
|
|
3
|
+
sidebar: {
|
|
4
|
+
backgroundColor: '#FFFFFF',
|
|
5
|
+
borderRightWidth: 1,
|
|
6
|
+
borderColor: color.light.border['default-grey'],
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flexDirection: 'column',
|
|
9
|
+
alignItems: 'flex-start',
|
|
10
|
+
alignSelf: 'stretch',
|
|
11
|
+
},
|
|
12
|
+
header: {},
|
|
13
|
+
headerContent: {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
padding: spacing('050'),
|
|
17
|
+
},
|
|
18
|
+
logo: {
|
|
19
|
+
marginLeft: isVariant('mobile') || isVariant('tablet') ? spacing('150') : 0,
|
|
20
|
+
},
|
|
21
|
+
sidebarContent: {
|
|
22
|
+
flex: 1,
|
|
23
|
+
justifyContent: 'space-between',
|
|
24
|
+
width: '100%',
|
|
25
|
+
},
|
|
26
|
+
scrollView: {
|
|
27
|
+
flex: 1,
|
|
28
|
+
paddingTop: spacing('100'),
|
|
29
|
+
paddingBottom: spacing('100'),
|
|
30
|
+
zIndex: 1000,
|
|
31
|
+
backgroundColor: '#FFFFFF',
|
|
32
|
+
},
|
|
33
|
+
groupTitleDesktop: {
|
|
34
|
+
...text['Corps de texte'].XS.SemiBold,
|
|
35
|
+
paddingLeft: spacing('050'),
|
|
36
|
+
paddingTop: spacing('100'),
|
|
37
|
+
},
|
|
38
|
+
groupTitleMobile: {
|
|
39
|
+
...text['Corps de texte'].MD.Medium,
|
|
40
|
+
color: color.light.text['mention-grey'],
|
|
41
|
+
paddingLeft: spacing('3V'),
|
|
42
|
+
paddingRight: spacing('3V'),
|
|
43
|
+
paddingTop: spacing('2W'),
|
|
44
|
+
paddingBottom: spacing('2W'),
|
|
45
|
+
},
|
|
46
|
+
sidebarItemDesktop: {
|
|
47
|
+
borderRadius: spacing('050'),
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'row',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
gap: spacing('050'),
|
|
52
|
+
padding: spacing('050'),
|
|
53
|
+
width: '100%',
|
|
54
|
+
color: color.light.text['title-grey'],
|
|
55
|
+
stroke: color.light.text['title-grey'],
|
|
56
|
+
},
|
|
57
|
+
sidebarItemMobile: {
|
|
58
|
+
display: 'flex',
|
|
59
|
+
flexDirection: 'row',
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
gap: spacing('3V'),
|
|
62
|
+
paddingLeft: spacing('2W'),
|
|
63
|
+
paddingRight: spacing('2W'),
|
|
64
|
+
paddingTop: spacing('2W'),
|
|
65
|
+
paddingBottom: spacing('2W'),
|
|
66
|
+
width: '100%',
|
|
67
|
+
color: color.light.text['title-grey'],
|
|
68
|
+
stroke: color.light.text['title-grey'],
|
|
69
|
+
},
|
|
70
|
+
sidebarItemSelectedDesktop: {
|
|
71
|
+
backgroundColor: color.background.badge.default,
|
|
72
|
+
},
|
|
73
|
+
sidebarItemSelectedMobile: {
|
|
74
|
+
borderRadius: radius('lg'),
|
|
75
|
+
backgroundColor: color.light.background['alt-primary'],
|
|
76
|
+
},
|
|
77
|
+
sidebarItemHover: {
|
|
78
|
+
backgroundColor: color.light.background['default-grey-hover'],
|
|
79
|
+
},
|
|
80
|
+
sidebarItemCurrentHover: {
|
|
81
|
+
backgroundColor: Colors.Neutre[950],
|
|
82
|
+
},
|
|
83
|
+
sidebarItemContainerDesktop: {
|
|
84
|
+
paddingLeft: spacing('050'),
|
|
85
|
+
paddingRight: spacing('050'),
|
|
86
|
+
display: 'flex',
|
|
87
|
+
flexDirection: 'row',
|
|
88
|
+
cursor: 'pointer',
|
|
89
|
+
marginLeft: spacing('075'),
|
|
90
|
+
marginRight: spacing('025'),
|
|
91
|
+
},
|
|
92
|
+
sidebarItemContainerMobile: {
|
|
93
|
+
paddingLeft: spacing('2W'),
|
|
94
|
+
paddingRight: spacing('2W'),
|
|
95
|
+
paddingTop: spacing('2W'),
|
|
96
|
+
paddingBottom: spacing('2W'),
|
|
97
|
+
gap: spacing('3V'),
|
|
98
|
+
display: 'flex',
|
|
99
|
+
flexDirection: 'row',
|
|
100
|
+
cursor: 'pointer',
|
|
101
|
+
borderRadius: radius('md'),
|
|
102
|
+
marginLeft: spacing('075'),
|
|
103
|
+
marginRight: spacing('025'),
|
|
104
|
+
},
|
|
105
|
+
sidebarItemTitleSelectedDesktop: {
|
|
106
|
+
...text['Corps de texte'].MD.SemiBold,
|
|
107
|
+
color: color.light.text['default-grey'],
|
|
108
|
+
stroke: color.light.text['default-grey'],
|
|
109
|
+
},
|
|
110
|
+
sidebarItemTitleSelectedMobile: {
|
|
111
|
+
...text['Corps de texte'].MD.Medium,
|
|
112
|
+
color: '#D81B38',
|
|
113
|
+
stroke: '#D81B38',
|
|
114
|
+
},
|
|
115
|
+
sidebarItemIconSelectedMobile: {
|
|
116
|
+
color: '#D81B38',
|
|
117
|
+
},
|
|
118
|
+
sidebarItemTitleDesktop: {
|
|
119
|
+
...text['Corps de texte'].MD.Regular,
|
|
120
|
+
color: color.light.text['title-grey'],
|
|
121
|
+
stroke: color.light.text['title-grey'],
|
|
122
|
+
},
|
|
123
|
+
sidebarItemTitleMobile: {
|
|
124
|
+
...text['Corps de texte'].MD.Medium,
|
|
125
|
+
color: color.light.text['default-grey'],
|
|
126
|
+
stroke: color.light.text['default-grey'],
|
|
127
|
+
},
|
|
128
|
+
sidebarItemTitleCurrentHoverDesktop: {
|
|
129
|
+
...text['Corps de texte'].MD.SemiBold,
|
|
130
|
+
},
|
|
131
|
+
sidebarItemTitleCurrentHoverMobile: {
|
|
132
|
+
...text['Corps de texte'].MD.Medium,
|
|
133
|
+
color: color.light.background['action-high-primary'],
|
|
134
|
+
},
|
|
135
|
+
sidebarItemSelectedIndicator: {
|
|
136
|
+
height: '100%',
|
|
137
|
+
width: spacing('025'),
|
|
138
|
+
position: 'absolute',
|
|
139
|
+
left: 0,
|
|
140
|
+
},
|
|
141
|
+
sidebarItemSelectedIndicatorContent: {
|
|
142
|
+
width: '100%',
|
|
143
|
+
minHeight: spacing('150'),
|
|
144
|
+
backgroundColor: color.light.border['default-primary'],
|
|
145
|
+
margin: 'auto',
|
|
146
|
+
borderRadius: spacing('050'),
|
|
147
|
+
},
|
|
148
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarFooter.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/SidebarFooter.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,iBAAiB,CAAC;AAEzD,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAYtD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Version } from '../../core';
|
|
3
|
+
import { Divider } from '../Divider';
|
|
4
|
+
export const SidebarFooter = (props) => {
|
|
5
|
+
const { children } = props;
|
|
6
|
+
return (_jsxs(Box, { children: [_jsx(Version, {}), _jsx(Divider, {}), children] }));
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarGroup.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/SidebarGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,GAAG;IACxD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA4BF,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAIpD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@alveole/theme';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Box, Typography } from '../../core';
|
|
5
|
+
import { useStyles } from './Sidebar.styles';
|
|
6
|
+
const SidebarGroupDesktop = (props) => {
|
|
7
|
+
const { children, title } = props;
|
|
8
|
+
const styles = useStyles();
|
|
9
|
+
return (_jsxs(Box, { tag: "sidebar-group", children: [_jsx(Typography, { style: styles.groupTitleDesktop, children: title }), children] }));
|
|
10
|
+
};
|
|
11
|
+
const SidebarGroupMobile = (props) => {
|
|
12
|
+
const { children, title } = props;
|
|
13
|
+
const styles = useStyles();
|
|
14
|
+
return (_jsxs(Box, { tag: "sidebar-group", children: [_jsx(Typography, { style: styles.groupTitleMobile, children: title }), children] }));
|
|
15
|
+
};
|
|
16
|
+
export const SidebarGroup = (props) => {
|
|
17
|
+
const { isVariant } = useTheme();
|
|
18
|
+
const mobileOrTablet = React.useMemo(() => isVariant('mobile') || isVariant('tablet'), [isVariant]);
|
|
19
|
+
return mobileOrTablet ? _jsx(SidebarGroupMobile, { ...props }) : _jsx(SidebarGroupDesktop, { ...props });
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SidebarController } from './useSidebar';
|
|
3
|
+
export type SidebarHeaderProps = {
|
|
4
|
+
controller?: SidebarController;
|
|
5
|
+
logo: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare const SidebarHeader: (props: SidebarHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=SidebarHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarHeader.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/SidebarHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;CACvB,CAAC;AAiCF,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAKtD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@alveole/theme';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Platform } from 'react-native';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import { Box } from '../../core';
|
|
7
|
+
import { ButtonIcon } from '../Button';
|
|
8
|
+
import { Divider } from '../Divider';
|
|
9
|
+
import { useStyles } from './Sidebar.styles';
|
|
10
|
+
const SidebarHeaderDesktop = (props) => {
|
|
11
|
+
const { logo } = props;
|
|
12
|
+
const styles = useStyles();
|
|
13
|
+
return (_jsxs(Box, { tag: "sidebar-header", style: styles.header, children: [_jsx(Box, { style: styles.headerContent, children: _jsx(Box, { flex: 1, children: logo }) }), _jsx(Divider, {})] }));
|
|
14
|
+
};
|
|
15
|
+
const SidebarHeaderMobile = (props) => {
|
|
16
|
+
const { controller } = props;
|
|
17
|
+
const styles = useStyles();
|
|
18
|
+
const { top } = useSafeAreaInsets();
|
|
19
|
+
return (_jsxs(Box, { tag: "sidebar-header", style: styles.header, children: [_jsxs(Box, { style: styles.headerContent, pt: (Platform.OS === 'android' ? top : 0) + styles.headerContent.padding, children: [_jsx(Box, { flex: 1 }), _jsx(ButtonIcon, { icon: "X", variant: "tertiary", onPress: () => controller?.setOpen(false) })] }), _jsx(Divider, {})] }));
|
|
20
|
+
};
|
|
21
|
+
export const SidebarHeader = (props) => {
|
|
22
|
+
const { isVariant } = useTheme();
|
|
23
|
+
const { logo } = props;
|
|
24
|
+
const mobileOrTablet = React.useMemo(() => isVariant('mobile') || isVariant('tablet'), [isVariant]);
|
|
25
|
+
return mobileOrTablet ? _jsx(SidebarHeaderMobile, { ...props }) : _jsx(SidebarHeaderDesktop, { logo: logo });
|
|
26
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AProps } from '../../core';
|
|
2
|
+
import { LucideIconProps } from '../LucideIcon';
|
|
3
|
+
export type SidebarItemNavigable = {
|
|
4
|
+
pressable?: undefined;
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: LucideIconProps['name'];
|
|
7
|
+
href: AProps['href'];
|
|
8
|
+
direction?: AProps['direction'];
|
|
9
|
+
routeName: string;
|
|
10
|
+
};
|
|
11
|
+
export type SidebarItemPressable = {
|
|
12
|
+
pressable: true;
|
|
13
|
+
title: string;
|
|
14
|
+
icon?: LucideIconProps['name'];
|
|
15
|
+
onPress: () => void;
|
|
16
|
+
};
|
|
17
|
+
export type SidebarItemProps = SidebarItemNavigable | SidebarItemPressable;
|
|
18
|
+
export declare const SidebarItem: (props: SidebarItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=SidebarItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarItem.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/SidebarItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAK,MAAM,EAAmB,MAAM,YAAY,CAAC;AACxD,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,oBAAoB,CAAC;AA0G3E,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CAIlD,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@alveole/theme';
|
|
3
|
+
import { useRoute } from '@react-navigation/native';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { A, Box, Typography } from '../../core';
|
|
6
|
+
import { LucideIcon } from '../LucideIcon';
|
|
7
|
+
import { useStyles } from './Sidebar.styles';
|
|
8
|
+
const SidebarItemDesktop = (props) => {
|
|
9
|
+
const { title, icon } = props;
|
|
10
|
+
const route = useRoute();
|
|
11
|
+
const styles = useStyles();
|
|
12
|
+
const currentRouteName = route.name;
|
|
13
|
+
const isCurrentPage = !props.pressable && currentRouteName === props.routeName;
|
|
14
|
+
const itemStyleSelected = isCurrentPage ? styles.sidebarItemSelectedDesktop : {};
|
|
15
|
+
const titleStyleSelected = isCurrentPage ? styles.sidebarItemTitleSelectedDesktop : {};
|
|
16
|
+
const sidebarItemHover = isCurrentPage ? styles.sidebarItemCurrentHover : styles.sidebarItemHover;
|
|
17
|
+
const sidebarItemTitleDesktop = isCurrentPage ? styles.sidebarItemTitleCurrentHoverDesktop : {};
|
|
18
|
+
const renderItem = (content) => {
|
|
19
|
+
if (props.pressable)
|
|
20
|
+
return _jsx(Box, { onPress: props.onPress, children: content });
|
|
21
|
+
else
|
|
22
|
+
return (_jsx(A, { href: props.href, direction: props.direction, children: content }));
|
|
23
|
+
};
|
|
24
|
+
return renderItem(_jsxs(Box, { style: styles.sidebarItemContainerDesktop, children: [isCurrentPage && (_jsx(Box, { tag: "sidebar-item-indicator", style: styles.sidebarItemSelectedIndicator, children: _jsx(Box, { style: styles.sidebarItemSelectedIndicatorContent }) })), _jsxs(Box, { tag: "sidebar-item", style: { ...styles.sidebarItemDesktop, ...itemStyleSelected }, hoverStyle: { ...sidebarItemHover }, children: [icon && _jsx(LucideIcon, { size: "md", name: icon }), _jsx(Typography, { style: { ...styles.sidebarItemTitleDesktop, ...titleStyleSelected }, hoverStyle: { ...sidebarItemTitleDesktop }, children: title })] })] }));
|
|
25
|
+
};
|
|
26
|
+
const SidebarItemMobile = (props) => {
|
|
27
|
+
const { title, icon } = props;
|
|
28
|
+
const route = useRoute();
|
|
29
|
+
const styles = useStyles();
|
|
30
|
+
const currentRouteName = route.name;
|
|
31
|
+
const isCurrentPage = !props.pressable && currentRouteName === props.routeName;
|
|
32
|
+
const itemStyleSelected = isCurrentPage ? styles.sidebarItemSelectedMobile : {};
|
|
33
|
+
const titleStyleSelected = isCurrentPage ? styles.sidebarItemTitleSelectedMobile : {};
|
|
34
|
+
const sidebarItemHover = isCurrentPage ? styles.sidebarItemCurrentHover : styles.sidebarItemHover;
|
|
35
|
+
const sidebarItemTitleMobile = isCurrentPage ? styles.sidebarItemTitleCurrentHoverMobile : {};
|
|
36
|
+
const renderItem = (content) => {
|
|
37
|
+
if (props.pressable)
|
|
38
|
+
return _jsx(Box, { onPress: props.onPress, children: content });
|
|
39
|
+
else
|
|
40
|
+
return (_jsx(A, { href: props.href, direction: props.direction, children: content }));
|
|
41
|
+
};
|
|
42
|
+
return renderItem(_jsxs(Box, { children: [isCurrentPage && (_jsx(Box, { tag: "sidebar-item-indicator", style: styles.sidebarItemSelectedIndicator, children: _jsx(Box, { style: styles.sidebarItemSelectedIndicatorContent }) })), _jsxs(Box, { tag: "sidebar-item", style: { ...styles.sidebarItemMobile, ...itemStyleSelected }, hoverStyle: { ...sidebarItemHover }, children: [icon && (_jsx(LucideIcon, { size: "md", name: icon, color: isCurrentPage ? styles.sidebarItemIconSelectedMobile.color : undefined })), _jsx(Typography, { style: { ...styles.sidebarItemTitleMobile, ...titleStyleSelected }, hoverStyle: { ...sidebarItemTitleMobile }, children: title })] })] }));
|
|
43
|
+
};
|
|
44
|
+
export const SidebarItem = (props) => {
|
|
45
|
+
const { isVariant } = useTheme();
|
|
46
|
+
const mobileOrTablet = React.useMemo(() => isVariant('mobile') || isVariant('tablet'), [isVariant]);
|
|
47
|
+
return mobileOrTablet ? _jsx(SidebarItemMobile, { ...props }) : _jsx(SidebarItemDesktop, { ...props });
|
|
48
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
package/dist/ui/Sidebar/index.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export type TagColors = 'default' | 'action';
|
|
3
|
+
export type TagProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
color: TagColors;
|
|
6
|
+
size: 'sm' | 'md';
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
export declare const Tag: (props: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/ui/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK7C,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,OAAO,QAAQ,4CAsBlC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Typography } from '../../core';
|
|
3
|
+
import { useStyles } from './Tag.styles';
|
|
4
|
+
export const Tag = (props) => {
|
|
5
|
+
const { size, color, children, style, ...tagProps } = props;
|
|
6
|
+
const styles = useStyles();
|
|
7
|
+
const tagSize = size === 'sm' ? styles.tagSm : styles.tagMd;
|
|
8
|
+
const tagVariant = () => {
|
|
9
|
+
switch (color) {
|
|
10
|
+
case 'action':
|
|
11
|
+
return styles.tagAction;
|
|
12
|
+
case 'default':
|
|
13
|
+
return styles.tagDefault;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return (_jsx(Box, { tag: "tag", style: { ...styles.tagContainer, ...style }, children: _jsx(Typography, { style: { ...styles.tag, ...tagVariant(), ...tagSize }, ...tagProps, children: children }) }));
|
|
17
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: ["Kit"];
|
|
4
|
+
experimental: false;
|
|
5
|
+
figmaURL: string;
|
|
6
|
+
description: string;
|
|
7
|
+
component: (props: import("./Tag").TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
styleFn: () => {
|
|
9
|
+
tagContainer: {
|
|
10
|
+
display: "block";
|
|
11
|
+
};
|
|
12
|
+
tag: {
|
|
13
|
+
borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
|
|
14
|
+
};
|
|
15
|
+
tagDefault: {
|
|
16
|
+
color: "#151617";
|
|
17
|
+
backgroundColor: "#EFF1F6";
|
|
18
|
+
};
|
|
19
|
+
tagAction: {
|
|
20
|
+
color: "#151617";
|
|
21
|
+
backgroundColor: "#D2E8FE";
|
|
22
|
+
};
|
|
23
|
+
tagSm: {
|
|
24
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
25
|
+
fontSize: 12;
|
|
26
|
+
lineHeight: 20;
|
|
27
|
+
letterSpacing: 0;
|
|
28
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
29
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
30
|
+
paddingTop: number;
|
|
31
|
+
paddingBottom: number;
|
|
32
|
+
};
|
|
33
|
+
tagMd: {
|
|
34
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
35
|
+
fontSize: 14;
|
|
36
|
+
lineHeight: 20;
|
|
37
|
+
letterSpacing: 0;
|
|
38
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
39
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
40
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
41
|
+
paddingBottom: import("@alveole/theme").Spacing;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default _default;
|
|
46
|
+
export declare const Colors: () => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare const Sizes: () => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
//# sourceMappingURL=Tag.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Tag/Tag.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAQkB;AAElB,eAAO,MAAM,MAAM,+CAWlB,CAAC;AAEF,eAAO,MAAM,KAAK,+CASjB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../../core';
|
|
3
|
+
import { Tag } from './Tag';
|
|
4
|
+
import { useStyles } from './Tag.styles';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Tag',
|
|
7
|
+
tags: ['Kit'],
|
|
8
|
+
experimental: false,
|
|
9
|
+
figmaURL: 'https://www.figma.com/design/xJz8Z6vfrnZPKTtRbuT2W8/Alveole---Composants?node-id=1002-8509',
|
|
10
|
+
description: 'Différents tags. Composant de type Typography.',
|
|
11
|
+
component: Tag,
|
|
12
|
+
styleFn: useStyles,
|
|
13
|
+
};
|
|
14
|
+
export const Colors = () => (_jsx(Box, { children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: 4, children: [_jsx(Tag, { size: "md", color: "default", children: "Tag default" }), _jsx(Tag, { size: "md", color: "action", children: "Tag action" })] }) }));
|
|
15
|
+
export const Sizes = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 4, flexWrap: "wrap", children: [_jsx(Tag, { size: "sm", color: "default", children: "Tag sm" }), _jsx(Tag, { size: "md", color: "default", children: "Tag md" })] }));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
tagContainer: {
|
|
3
|
+
display: "block";
|
|
4
|
+
};
|
|
5
|
+
tag: {
|
|
6
|
+
borderRadius: import("@alveole/theme/dist/constants/Radius").Radius;
|
|
7
|
+
};
|
|
8
|
+
tagDefault: {
|
|
9
|
+
color: "#151617";
|
|
10
|
+
backgroundColor: "#EFF1F6";
|
|
11
|
+
};
|
|
12
|
+
tagAction: {
|
|
13
|
+
color: "#151617";
|
|
14
|
+
backgroundColor: "#D2E8FE";
|
|
15
|
+
};
|
|
16
|
+
tagSm: {
|
|
17
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
18
|
+
fontSize: 12;
|
|
19
|
+
lineHeight: 20;
|
|
20
|
+
letterSpacing: 0;
|
|
21
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
22
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
23
|
+
paddingTop: number;
|
|
24
|
+
paddingBottom: number;
|
|
25
|
+
};
|
|
26
|
+
tagMd: {
|
|
27
|
+
fontFamily: "Barlow-Light" | "Barlow-Regular" | "Barlow-Medium" | "Barlow-SemiBold" | "Barlow-Bold" | "Inter-Light" | "Inter-Regular" | "Inter-Medium" | "Inter-SemiBold" | "Inter-Bold";
|
|
28
|
+
fontSize: 14;
|
|
29
|
+
lineHeight: 20;
|
|
30
|
+
letterSpacing: 0;
|
|
31
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
32
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
33
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
34
|
+
paddingBottom: import("@alveole/theme").Spacing;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=Tag.styles.d.ts.map
|