@alveole/components 0.22.1 → 0.23.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.
- 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/Button/Button.d.ts.map +1 -1
- package/dist/ui/Button/Button.js +10 -2
- package/dist/ui/Button/Button.stories.d.ts +13 -0
- package/dist/ui/Button/Button.stories.d.ts.map +1 -1
- package/dist/ui/Button/Button.styles.d.ts +13 -0
- package/dist/ui/Button/Button.styles.d.ts.map +1 -1
- package/dist/ui/Button/Button.styles.js +13 -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,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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Tag/Tag.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCnB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ radius, text, color, spacing }) => ({
|
|
3
|
+
tagContainer: {
|
|
4
|
+
display: 'block',
|
|
5
|
+
},
|
|
6
|
+
tag: {
|
|
7
|
+
borderRadius: radius('full'),
|
|
8
|
+
},
|
|
9
|
+
// Colors
|
|
10
|
+
tagDefault: {
|
|
11
|
+
color: color.light.text['label-grey'],
|
|
12
|
+
backgroundColor: color.light.background['contrast-grey'],
|
|
13
|
+
},
|
|
14
|
+
tagAction: {
|
|
15
|
+
color: color.light.text['label-grey'],
|
|
16
|
+
backgroundColor: color.light.background['action-low-primary'],
|
|
17
|
+
},
|
|
18
|
+
// Sizes
|
|
19
|
+
tagSm: {
|
|
20
|
+
paddingLeft: spacing('1W'),
|
|
21
|
+
paddingRight: spacing('1W'),
|
|
22
|
+
paddingTop: 0,
|
|
23
|
+
paddingBottom: 0,
|
|
24
|
+
...text['Corps de texte'].XS.Bold,
|
|
25
|
+
},
|
|
26
|
+
tagMd: {
|
|
27
|
+
paddingLeft: spacing('3V'),
|
|
28
|
+
paddingRight: spacing('3V'),
|
|
29
|
+
paddingTop: spacing('1V'),
|
|
30
|
+
paddingBottom: spacing('1V'),
|
|
31
|
+
...text['Corps de texte'].SM.Bold,
|
|
32
|
+
},
|
|
33
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Tag/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tag';
|
|
@@ -105,6 +105,7 @@ declare const _default: {
|
|
|
105
105
|
};
|
|
106
106
|
export default _default;
|
|
107
107
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
108
|
+
export declare const AvecRetourArriere: () => import("react/jsx-runtime").JSX.Element;
|
|
108
109
|
export declare const SansAvatarEtAvecActions: () => import("react/jsx-runtime").JSX.Element;
|
|
109
110
|
export declare const AvecAvatarSansActions: () => import("react/jsx-runtime").JSX.Element;
|
|
110
111
|
export declare const AvecAvatarEtActions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarTop.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/ToolbarTop/ToolbarTop.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ToolbarTop.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/ToolbarTop/ToolbarTop.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAWkB;AAElB,eAAO,MAAM,OAAO,+CAA4D,CAAC;AAEjF,eAAO,MAAM,iBAAiB,+CAE7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,+CAOnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,+CAEjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,+CAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,+CAahC,CAAC;AAEF,eAAO,MAAM,wBAAwB,+CAYpC,CAAC;AAEF,eAAO,MAAM,UAAU,+CAQtB,CAAC;AAEF,eAAO,MAAM,YAAY,+CAA0E,CAAC;AAEpG,eAAO,MAAM,KAAK,+CAEjB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { router } from 'expo-router';
|
|
2
3
|
import { Typography } from '../../core';
|
|
3
4
|
import { ButtonIcon } from '../Button/ButtonIcon';
|
|
4
5
|
import { ToolbarTop } from './ToolbarTop';
|
|
@@ -14,6 +15,7 @@ export default {
|
|
|
14
15
|
styleFn: useStyles,
|
|
15
16
|
};
|
|
16
17
|
export const Default = () => _jsx(ToolbarTop, { title: "Titre", sousTitre: "Sous-titre" });
|
|
18
|
+
export const AvecRetourArriere = () => (_jsx(ToolbarTop, { title: "Titre", sousTitre: "Sous-titre", onNavigate: () => router.back() }));
|
|
17
19
|
export const SansAvatarEtAvecActions = () => (_jsx(ToolbarTop, { title: "Titre", sousTitre: "Sous-titre", onNavigate: console.log, actions: _jsx(ButtonIcon, { variant: "tertiary", size: "lg", iconSize: "md", icon: 'Plus', onPress: console.log }) }));
|
|
18
20
|
export const AvecAvatarSansActions = () => (_jsx(ToolbarTop, { title: "Titre", sousTitre: "Sous-titre", AvatarProps: { src: 'https://picsum.photos/100/200' } }));
|
|
19
21
|
export const AvecAvatarEtActions = () => (_jsx(ToolbarTop, { title: "Titre", sousTitre: "Sous-titre", onNavigate: console.log, AvatarProps: { src: 'https://picsum.photos/100/200' }, actions: _jsx(ButtonIcon, { variant: "tertiary", size: "lg", iconSize: "md", icon: 'Plus', onPress: console.log }) }));
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './Avatar';
|
|
2
|
+
export * from './Badge';
|
|
2
3
|
export * from './Breadcrumbs';
|
|
3
4
|
export * from './Button';
|
|
4
5
|
export * from './Card';
|
|
@@ -8,6 +9,8 @@ export * from './ListItem';
|
|
|
8
9
|
export * from './LucideIcon';
|
|
9
10
|
export * from './PageHeader';
|
|
10
11
|
export * from './ResourceList';
|
|
12
|
+
export * from './Sidebar';
|
|
13
|
+
export * from './Tag';
|
|
11
14
|
export * from './ToolbarBottomNav';
|
|
12
15
|
export * from './ToolbarTop';
|
|
13
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,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,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
package/dist/ui/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './Avatar';
|
|
2
|
+
export * from './Badge';
|
|
2
3
|
export * from './Breadcrumbs';
|
|
3
4
|
export * from './Button';
|
|
4
5
|
export * from './Card';
|
|
@@ -8,5 +9,7 @@ export * from './ListItem';
|
|
|
8
9
|
export * from './LucideIcon';
|
|
9
10
|
export * from './PageHeader';
|
|
10
11
|
export * from './ResourceList';
|
|
12
|
+
export * from './Sidebar';
|
|
13
|
+
export * from './Tag';
|
|
11
14
|
export * from './ToolbarBottomNav';
|
|
12
15
|
export * from './ToolbarTop';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alveole/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "Shared UI components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
"expo-application": "*",
|
|
59
59
|
"expo-image": "*",
|
|
60
60
|
"expo-router": "*",
|
|
61
|
-
"expo-linear-gradient": "*"
|
|
61
|
+
"expo-linear-gradient": "*",
|
|
62
|
+
"expo-constants": "*"
|
|
62
63
|
},
|
|
63
64
|
"publishConfig": {
|
|
64
65
|
"access": "public"
|