@alveole/components 0.41.0 → 0.42.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/Page/Page.d.ts +1 -0
- package/dist/core/Page/Page.d.ts.map +1 -1
- package/dist/core/Page/PageContentDefault.d.ts.map +1 -1
- package/dist/core/Page/PageContentDefault.js +2 -2
- package/dist/core/Page/PageContentScrollable.d.ts +1 -0
- package/dist/core/Page/PageContentScrollable.d.ts.map +1 -1
- package/dist/core/Page/PageContentScrollable.js +2 -2
- package/dist/core/PdfViewer/PdfViewer.js +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/stories/index.d.ts +1 -0
- package/dist/stories/index.d.ts.map +1 -1
- package/dist/stories/index.js +1 -0
- package/dist/ui/ActionMenu/ActionMenu.stories.d.ts +1 -0
- package/dist/ui/ActionMenu/ActionMenu.stories.d.ts.map +1 -1
- package/dist/ui/ActionMenu/ActionMenu.stories.js +12 -2
- package/dist/ui/ActionMenu/ActionMenu.stories.sources.d.ts +2 -0
- package/dist/ui/ActionMenu/ActionMenu.stories.sources.d.ts.map +1 -1
- package/dist/ui/ActionMenu/ActionMenu.stories.sources.js +3 -1
- package/dist/ui/Badge/Badge.stories.d.ts +0 -2
- package/dist/ui/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.styles.d.ts +0 -2
- package/dist/ui/Badge/Badge.styles.d.ts.map +1 -1
- package/dist/ui/Header/Header.d.ts +11 -0
- package/dist/ui/Header/Header.d.ts.map +1 -0
- package/dist/ui/Header/Header.js +7 -0
- package/dist/ui/Header/Header.stories.d.ts +80 -0
- package/dist/ui/Header/Header.stories.d.ts.map +1 -0
- package/dist/ui/Header/Header.stories.js +32 -0
- package/dist/ui/Header/Header.stories.sources.d.ts +10 -0
- package/dist/ui/Header/Header.stories.sources.d.ts.map +1 -0
- package/dist/ui/Header/Header.stories.sources.js +10 -0
- package/dist/ui/Header/Header.styles.d.ts +66 -0
- package/dist/ui/Header/Header.styles.d.ts.map +1 -0
- package/dist/ui/Header/Header.styles.js +39 -0
- package/dist/ui/Header/index.d.ts +3 -0
- package/dist/ui/Header/index.d.ts.map +1 -0
- package/dist/ui/Header/index.js +1 -0
- package/dist/ui/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/ui/Popover/Popover.stories.js +4 -1
- package/dist/ui/Popover/Popover.stories.sources.d.ts.map +1 -1
- package/dist/ui/Popover/Popover.stories.sources.js +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/package.json +1 -1
package/dist/core/Page/Page.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type PageProps = BoxProps & {
|
|
|
17
17
|
scrollable?: boolean | 'mobile-only' | 'desktop-only';
|
|
18
18
|
sidebar?: React.ReactNode;
|
|
19
19
|
beforeContent?: React.ReactNode;
|
|
20
|
+
footerContent?: React.ReactNode;
|
|
20
21
|
sideBarController?: SidebarController;
|
|
21
22
|
statusBar?: PageStatusBarProps;
|
|
22
23
|
renderToolbar?: (options?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/core/Page/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,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M,CAAC;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,EAAE,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,GAAG,aAAa,GAAG,cAAc,CAAC;IACtD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B,aAAa,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAEvE,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,sBAOpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContentDefault.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageContentDefault.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC;AAEhD,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,
|
|
1
|
+
{"version":3,"file":"PageContentDefault.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageContentDefault.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC;AAEhD,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,gCAuBhE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from '../../core/Box';
|
|
3
3
|
export const PageContentDefault = (props) => {
|
|
4
|
-
const { beforeContent, children, title, description, og, scrollable: _scrollable, sidebar: _sidebar, sideBarController: _sideBarController, onScrollToBottom: _onScrollToBottom, onEndReachedThreshold: _onEndReachedThreshold, ...pageProps } = props;
|
|
5
|
-
return (_jsxs(Box, { tag: "page", ...pageProps, height: "100%", children: [beforeContent, children] }));
|
|
4
|
+
const { beforeContent, footerContent, children, title, description, og, scrollable: _scrollable, sidebar: _sidebar, sideBarController: _sideBarController, onScrollToBottom: _onScrollToBottom, onEndReachedThreshold: _onEndReachedThreshold, ...pageProps } = props;
|
|
5
|
+
return (_jsxs(Box, { tag: "page", ...pageProps, height: "100%", children: [beforeContent, children, footerContent] }));
|
|
6
6
|
};
|
|
@@ -23,6 +23,7 @@ export declare const PageContentScrollable: React.ForwardRefExoticComponent<Pick
|
|
|
23
23
|
scrollable?: boolean | "mobile-only" | "desktop-only";
|
|
24
24
|
sidebar?: React.ReactNode;
|
|
25
25
|
beforeContent?: React.ReactNode;
|
|
26
|
+
footerContent?: React.ReactNode;
|
|
26
27
|
sideBarController?: import("../..").SidebarController;
|
|
27
28
|
statusBar?: import("./Page").PageStatusBarProps;
|
|
28
29
|
renderToolbar?: (options?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContentScrollable.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageContentScrollable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG;IACnD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;aAAzB,CAAC;mBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"PageContentScrollable.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageContentScrollable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG;IACnD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;aAAzB,CAAC;mBAAqB,CAAC;;;;;;;;4BAU1B,CAAJ;;;;;;;uBAfmB,MAAM,IAAI;4BACL,MAAM;qBACb,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;qDAwD3C,CAAC"}
|
|
@@ -3,7 +3,7 @@ import React, { useImperativeHandle, useRef } from 'react';
|
|
|
3
3
|
import { ScrollView } from 'react-native';
|
|
4
4
|
import { Box } from '../../core/Box';
|
|
5
5
|
export const PageContentScrollable = React.forwardRef(function PageContentScrollable(props, ref) {
|
|
6
|
-
const { beforeContent, children, title, description, og, defaultBackgroundColor, onScrollToBottom, onEndReachedThreshold = 100, onScrollChange, ...pageProps } = props;
|
|
6
|
+
const { beforeContent, footerContent, children, title, description, og, defaultBackgroundColor, onScrollToBottom, onEndReachedThreshold = 100, onScrollChange, ...pageProps } = props;
|
|
7
7
|
const { scrollable: _scrollable, sidebar: _sidebar, sideBarController: _sideBarController, ...boxProps } = pageProps;
|
|
8
8
|
const scrollRef = useRef(null);
|
|
9
9
|
useImperativeHandle(ref, () => ({
|
|
@@ -16,5 +16,5 @@ export const PageContentScrollable = React.forwardRef(function PageContentScroll
|
|
|
16
16
|
onScrollToBottom?.();
|
|
17
17
|
onScrollChange?.(contentOffset.y);
|
|
18
18
|
};
|
|
19
|
-
return (_jsx(ScrollView, { ref: scrollRef, contentContainerStyle: { minHeight: '100%', width: '100%', flexGrow: 1 }, style: { backgroundColor: defaultBackgroundColor ?? 'transparent' }, onScroll: handleScroll, scrollEventThrottle: 16, alwaysBounceVertical: onScrollToBottom != null, bounces: onScrollToBottom != null, overScrollMode: onScrollToBottom != null ? 'always' : 'never', children: _jsxs(Box, { tag: "page", ...boxProps, height: "100%", children: [beforeContent, children] }) }));
|
|
19
|
+
return (_jsx(ScrollView, { ref: scrollRef, contentContainerStyle: { minHeight: '100%', width: '100%', flexGrow: 1 }, style: { backgroundColor: defaultBackgroundColor ?? 'transparent' }, onScroll: handleScroll, scrollEventThrottle: 16, alwaysBounceVertical: onScrollToBottom != null, bounces: onScrollToBottom != null, overScrollMode: onScrollToBottom != null ? 'always' : 'never', children: _jsxs(Box, { tag: "page", ...boxProps, height: "100%", children: [beforeContent, children, footerContent] }) }));
|
|
20
20
|
});
|
|
@@ -4,5 +4,5 @@ import WebView from 'react-native-webview';
|
|
|
4
4
|
import { Box } from '../Box';
|
|
5
5
|
export const PdfViewer = (props) => {
|
|
6
6
|
const { source, headers } = props;
|
|
7
|
-
return (_jsx(Box, { flex: 1, children: _jsx(WebView, { source: { uri: source, headers }, startInLoadingState: true, renderLoading: () => (_jsx(Box, { flex: 1,
|
|
7
|
+
return (_jsx(Box, { flex: 1, children: _jsx(WebView, { source: { uri: source, headers }, startInLoadingState: true, renderLoading: () => (_jsx(Box, { flex: 1, style: { alignItems: 'center', justifyContent: 'center' }, children: _jsx(ActivityIndicator, { size: "large" }) })), style: { flex: 1 } }) }));
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALVEOLE_COMPONENTS_VERSION: "0.
|
|
1
|
+
export declare const ALVEOLE_COMPONENTS_VERSION: "0.42.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ALVEOLE_COMPONENTS_VERSION = "0.
|
|
1
|
+
export const ALVEOLE_COMPONENTS_VERSION = "0.42.1";
|
package/dist/stories/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * as CardStory from '../ui/Card/Card.stories';
|
|
|
20
20
|
export * as DividerStory from '../ui/Divider/Divider.stories';
|
|
21
21
|
export * as DocumentViewerStory from '../ui/DocumentViewer/DocumentViewer.stories';
|
|
22
22
|
export * as EmptyStateStory from '../ui/EmptyState/EmptyState.stories';
|
|
23
|
+
export * as HeaderStory from '../ui/Header/Header.stories';
|
|
23
24
|
export * as ListItemStory from '../ui/ListItem/ListItem.stories';
|
|
24
25
|
export * as LucideIconStory from '../ui/LucideIcon/LucideIcon.stories';
|
|
25
26
|
export * as PageHeaderStory from '../ui/PageHeader/PageHeader.stories';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stories/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,kBAAkB,MAAM,6CAA6C,CAAC;AAClF,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,QAAQ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,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,gBAAgB,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,iBAAiB,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,cAAc,MAAM,mCAAmC,CAAC;AACpE,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,qBAAqB,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC"}
|
package/dist/stories/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * as CardStory from '../ui/Card/Card.stories';
|
|
|
22
22
|
export * as DividerStory from '../ui/Divider/Divider.stories';
|
|
23
23
|
export * as DocumentViewerStory from '../ui/DocumentViewer/DocumentViewer.stories';
|
|
24
24
|
export * as EmptyStateStory from '../ui/EmptyState/EmptyState.stories';
|
|
25
|
+
export * as HeaderStory from '../ui/Header/Header.stories';
|
|
25
26
|
export * as ListItemStory from '../ui/ListItem/ListItem.stories';
|
|
26
27
|
export * as LucideIconStory from '../ui/LucideIcon/LucideIcon.stories';
|
|
27
28
|
export * as PageHeaderStory from '../ui/PageHeader/PageHeader.stories';
|
|
@@ -13,5 +13,6 @@ declare const _default: {
|
|
|
13
13
|
export default _default;
|
|
14
14
|
export declare const Default: () => React.JSX.Element;
|
|
15
15
|
export declare const Filters: () => React.JSX.Element;
|
|
16
|
+
export declare const AvatarMenu: () => React.JSX.Element;
|
|
16
17
|
export * as Sources from './ActionMenu.stories.sources';
|
|
17
18
|
//# sourceMappingURL=ActionMenu.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/ActionMenu/ActionMenu.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/ActionMenu/ActionMenu.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;AAQ1B,wBAQkB;AAElB,eAAO,MAAM,OAAO,yBAsCnB,CAAC;AAIF,eAAO,MAAM,OAAO,yBAqFnB,CAAC;AAEF,eAAO,MAAM,UAAU,yBA4BtB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@alveole/theme';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { Platform, ScrollView } from 'react-native';
|
|
4
|
+
import { Platform, Pressable, ScrollView } from 'react-native';
|
|
4
5
|
import { Box } from '../../core';
|
|
6
|
+
import { Avatar } from '../Avatar';
|
|
5
7
|
import { Button } from '../Button';
|
|
6
8
|
import { ActionMenu } from './ActionMenu';
|
|
7
9
|
export default {
|
|
@@ -28,7 +30,7 @@ export const Default = () => {
|
|
|
28
30
|
'left-start',
|
|
29
31
|
'left-end',
|
|
30
32
|
];
|
|
31
|
-
return (_jsx(Box, { display: "flex", flexWrap: "wrap", gap: "1W", flexDirection: "row",
|
|
33
|
+
return (_jsx(Box, { display: "flex", flexWrap: "wrap", gap: "1W", flexDirection: "row", width: "100%", style: { justifyContent: 'center', alignItems: 'center' }, children: alignments.map(alignment => (_jsxs(ActionMenu, { placement: alignment, renderTrigger: () => _jsx(Button, { variant: "secondary", title: alignment }), children: [_jsx(ActionMenu.Item, { title: "Contenu de l'action menu", icon: "Settings", selected: true }), _jsx(ActionMenu.Item, { title: "Contenu de l'action menu", icon: "Copy" }), _jsx(ActionMenu.Item, { title: "Contenu de l'action menu", icon: "Trash" })] }, alignment))) }));
|
|
32
34
|
};
|
|
33
35
|
export const Filters = () => {
|
|
34
36
|
const filters = [
|
|
@@ -76,4 +78,12 @@ export const Filters = () => {
|
|
|
76
78
|
}) }, filter.id));
|
|
77
79
|
}) }));
|
|
78
80
|
};
|
|
81
|
+
export const AvatarMenu = () => {
|
|
82
|
+
const { color, radius } = useTheme();
|
|
83
|
+
return (_jsx(Box, { style: { display: 'flex', alignItems: 'center', height: 200 }, children: _jsxs(ActionMenu, { placement: "bottom-end", renderTrigger: ({ open }) => (_jsx(Pressable, { style: {
|
|
84
|
+
borderRadius: radius('sm'),
|
|
85
|
+
outline: open ? `1px solid ${color.light.system.focus}` : 'none',
|
|
86
|
+
backgroundColor: open ? `${color.light.system.focus}1A` : 'transparent',
|
|
87
|
+
}, children: _jsx(Avatar, { size: "md", src: "https://www.loremfaces.net/96/id/1.jpg", fallbackText: "Cl\u00E9ment Prod'homme" }) })), children: [_jsx(ActionMenu.Item, { title: "Mon profil", icon: "User" }), _jsx(ActionMenu.Item, { title: "Param\u00E8tres", icon: "Settings" }), _jsx(ActionMenu.Item, { title: "Aide", icon: "Info" }), _jsx(ActionMenu.Item, { title: "D\u00E9connexion", icon: "LogOut" })] }) }));
|
|
88
|
+
};
|
|
79
89
|
export * as Sources from './ActionMenu.stories.sources';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare const Default: () => string;
|
|
2
2
|
export declare const Filters: () => string;
|
|
3
|
+
export declare const AvatarMenu: () => string;
|
|
3
4
|
export declare const storySources: {
|
|
4
5
|
readonly Default: () => string;
|
|
5
6
|
readonly Filters: () => string;
|
|
7
|
+
readonly AvatarMenu: () => string;
|
|
6
8
|
};
|
|
7
9
|
export type StorySourceName = keyof typeof storySources;
|
|
8
10
|
//# sourceMappingURL=ActionMenu.stories.sources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenu.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/ActionMenu/ActionMenu.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"ActionMenu.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/ActionMenu/ActionMenu.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAA6/B,CAAC;AAElhC,eAAO,MAAM,OAAO,cAA0jG,CAAC;AAE/kG,eAAO,MAAM,UAAU,cAAoiC,CAAC;AAE5jC,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// This file is generated. Do not edit manually.
|
|
2
2
|
// Source: src/ui/ActionMenu/ActionMenu.stories.tsx
|
|
3
|
-
export const Default = () => "export const Default = () => {\n const alignments = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'bottom-start',\n 'bottom-end',\n 'left-start',\n 'left-end',\n ] as const;\n\n return (\n <Box\n display=\"flex\"\n flexWrap=\"wrap\"\n gap=\"1W\"\n flexDirection=\"row\"\n
|
|
3
|
+
export const Default = () => "export const Default = () => {\n const alignments = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'bottom-start',\n 'bottom-end',\n 'left-start',\n 'left-end',\n ] as const;\n\n return (\n <Box\n display=\"flex\"\n flexWrap=\"wrap\"\n gap=\"1W\"\n flexDirection=\"row\"\n width=\"100%\"\n style={{ justifyContent: 'center', alignItems: 'center' }}\n >\n {alignments.map(alignment => (\n <ActionMenu\n key={alignment}\n placement={alignment}\n renderTrigger={() => <Button variant=\"secondary\" title={alignment} />}\n >\n <ActionMenu.Item title=\"Contenu de l'action menu\" icon=\"Settings\" selected />\n <ActionMenu.Item title=\"Contenu de l'action menu\" icon=\"Copy\" />\n <ActionMenu.Item title=\"Contenu de l'action menu\" icon=\"Trash\" />\n </ActionMenu>\n ))}\n </Box>\n );\n};";
|
|
4
4
|
export const Filters = () => "export const Filters = () => {\n const filters: { id: FilterId; title: string; options: string[]; multi?: boolean }[] = [\n { id: 'epic', title: 'Epic', options: ['Refonte design', 'Onboarding', 'Facturation'] },\n { id: 'type', title: 'Type', options: ['Bug', 'Story', 'Tâche'] },\n {\n id: 'filtresRapides',\n title: 'Filtres rapides',\n options: ['Assigné à moi', 'En cours', 'En retard'],\n multi: true,\n },\n ];\n\n const [openId, setOpenId] = React.useState<FilterId | null>(null);\n const [singleSelected, setSingleSelected] = React.useState<Partial<Record<FilterId, string>>>({});\n const [multiSelected, setMultiSelected] = React.useState<Partial<Record<FilterId, string[]>>>({});\n\n return (\n <ScrollView\n horizontal\n nestedScrollEnabled\n directionalLockEnabled={Platform.OS === 'ios'}\n showsHorizontalScrollIndicator={false}\n contentContainerStyle={{ flexDirection: 'row', gap: 8, paddingHorizontal: 16 }}\n >\n {filters.map(filter => {\n const isOpen = openId === filter.id;\n const hasSelection = filter.multi\n ? (multiSelected[filter.id]?.length ?? 0) > 0\n : singleSelected[filter.id] != null;\n\n return (\n <ActionMenu\n key={filter.id}\n placement=\"bottom-start\"\n scrollable={false}\n open={isOpen}\n setOpen={open => setOpenId(open ? filter.id : null)}\n renderTrigger={() => (\n <Button\n variant=\"secondary\"\n title={filter.title}\n endIcon=\"ChevronDown\"\n size=\"sm\"\n selected={hasSelection}\n active={isOpen}\n />\n )}\n >\n {filter.options.map(option => {\n const isSelected = filter.multi\n ? (multiSelected[filter.id] ?? []).includes(option)\n : singleSelected[filter.id] === option;\n\n return (\n <ActionMenu.Item\n key={option}\n title={option}\n selected={isSelected}\n onPress={() => {\n if (filter.multi) {\n setMultiSelected(prev => {\n const current = prev[filter.id] ?? [];\n return {\n ...prev,\n [filter.id]: current.includes(option)\n ? current.filter(o => o !== option)\n : [...current, option],\n };\n });\n } else {\n setSingleSelected(prev => ({\n ...prev,\n [filter.id]: prev[filter.id] === option ? undefined : option,\n }));\n setOpenId(null);\n }\n }}\n />\n );\n })}\n </ActionMenu>\n );\n })}\n </ScrollView>\n );\n};";
|
|
5
|
+
export const AvatarMenu = () => "export const AvatarMenu = () => {\n const { color, radius } = useTheme();\n\n return (\n <Box style={{ display: 'flex', alignItems: 'center', height: 200 }}>\n <ActionMenu\n placement=\"bottom-end\"\n renderTrigger={({ open }) => (\n <Pressable\n style={\n {\n borderRadius: radius('sm'),\n outline: open ? `1px solid ${color.light.system.focus}` : 'none',\n backgroundColor: open ? `${color.light.system.focus}1A` : 'transparent',\n } as any\n }\n >\n <Avatar size=\"md\" src=\"https://www.loremfaces.net/96/id/1.jpg\" fallbackText=\"Clément Prod'homme\" />\n </Pressable>\n )}\n >\n <ActionMenu.Item title=\"Mon profil\" icon=\"User\" />\n <ActionMenu.Item title=\"Paramètres\" icon=\"Settings\" />\n <ActionMenu.Item title=\"Aide\" icon=\"Info\" />\n <ActionMenu.Item title=\"Déconnexion\" icon=\"LogOut\" />\n </ActionMenu>\n </Box>\n );\n};";
|
|
5
6
|
export const storySources = {
|
|
6
7
|
Default,
|
|
7
8
|
Filters,
|
|
9
|
+
AvatarMenu,
|
|
8
10
|
};
|
|
@@ -43,8 +43,6 @@ declare const _default: {
|
|
|
43
43
|
lineHeight: 20;
|
|
44
44
|
letterSpacing: 0;
|
|
45
45
|
textTransform: "uppercase";
|
|
46
|
-
fontFamily: string;
|
|
47
|
-
fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
48
46
|
paddingLeft: import("@alveole/theme").Spacing;
|
|
49
47
|
paddingRight: import("@alveole/theme").Spacing;
|
|
50
48
|
gap: import("@alveole/theme").Spacing;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Badge.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAQkB;AAElB,eAAO,MAAM,QAAQ,mCAuBpB,CAAC;AAEF,eAAO,MAAM,KAAK,mCASjB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAMjB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC"}
|
|
@@ -36,8 +36,6 @@ export declare const useStyles: () => {
|
|
|
36
36
|
lineHeight: 20;
|
|
37
37
|
letterSpacing: 0;
|
|
38
38
|
textTransform: "uppercase";
|
|
39
|
-
fontFamily: string;
|
|
40
|
-
fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
41
39
|
paddingLeft: import("@alveole/theme").Spacing;
|
|
42
40
|
paddingRight: import("@alveole/theme").Spacing;
|
|
43
41
|
gap: import("@alveole/theme").Spacing;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Badge.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDnB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type HeaderProps = {
|
|
3
|
+
/** Logo carré affiché à gauche. */
|
|
4
|
+
logo: React.ReactNode;
|
|
5
|
+
/** Titre de l'application affiché à côté du logo (masqué en version mobile). */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Contenu libre affiché à droite (navigation, boutons, etc.). */
|
|
8
|
+
right?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare const Header: ({ logo, title, right }: HeaderProps) => React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/ui/Header/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,WAAW,GAAG;IACxB,mCAAmC;IACnC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,wBAAwB,WAAW,sBAczD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Typography } from '../../core';
|
|
3
|
+
import { useStyles } from './Header.styles';
|
|
4
|
+
export const Header = ({ logo, title, right }) => {
|
|
5
|
+
const styles = useStyles();
|
|
6
|
+
return (_jsx(Box, { tag: "header", style: styles.container, children: _jsxs(Box, { style: styles.inner, children: [_jsxs(Box, { style: styles.identity, children: [logo, _jsx(Typography, { style: styles.titleText, children: title })] }), right != null && _jsx(Box, { style: styles.right, children: right })] }) }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: "ui"[];
|
|
4
|
+
experimental: false;
|
|
5
|
+
figmaURL: string;
|
|
6
|
+
description: string;
|
|
7
|
+
webOnly: true;
|
|
8
|
+
component: ({ logo, title, right }: import("./Header").HeaderProps) => import("react").JSX.Element;
|
|
9
|
+
styleFn: () => {
|
|
10
|
+
container: {
|
|
11
|
+
position: "sticky";
|
|
12
|
+
top: number;
|
|
13
|
+
zIndex: number;
|
|
14
|
+
backgroundColor: "#FFFFFF" | "#F6F7F8";
|
|
15
|
+
} | {
|
|
16
|
+
position: "sticky";
|
|
17
|
+
top: number;
|
|
18
|
+
zIndex: number;
|
|
19
|
+
shadowColor: import("@alveole/theme").Color;
|
|
20
|
+
shadowOffset: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
shadowOpacity: number;
|
|
25
|
+
shadowRadius: number;
|
|
26
|
+
elevation: number;
|
|
27
|
+
backgroundColor: "#FFFFFF" | "#F6F7F8";
|
|
28
|
+
} | {
|
|
29
|
+
position: "sticky";
|
|
30
|
+
top: number;
|
|
31
|
+
zIndex: number;
|
|
32
|
+
boxShadow: string;
|
|
33
|
+
backgroundColor: "#FFFFFF" | "#F6F7F8";
|
|
34
|
+
} | {
|
|
35
|
+
position: "sticky";
|
|
36
|
+
top: number;
|
|
37
|
+
zIndex: number;
|
|
38
|
+
borderBottomWidth: number;
|
|
39
|
+
borderBottomColor: "#DEE3EC";
|
|
40
|
+
backgroundColor: "#FFFFFF" | "#F6F7F8";
|
|
41
|
+
};
|
|
42
|
+
inner: {
|
|
43
|
+
display: "flex";
|
|
44
|
+
flexDirection: "row";
|
|
45
|
+
alignItems: "center";
|
|
46
|
+
justifyContent: "space-between";
|
|
47
|
+
gap: import("@alveole/theme").Spacing;
|
|
48
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
49
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
50
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
51
|
+
paddingBottom: import("@alveole/theme").Spacing;
|
|
52
|
+
};
|
|
53
|
+
identity: {
|
|
54
|
+
display: "flex";
|
|
55
|
+
flexDirection: "row";
|
|
56
|
+
alignItems: "center";
|
|
57
|
+
gap: import("@alveole/theme").Spacing;
|
|
58
|
+
};
|
|
59
|
+
titleText: {
|
|
60
|
+
color: "#151617";
|
|
61
|
+
display: "flex" | "none";
|
|
62
|
+
fontSize: 14;
|
|
63
|
+
lineHeight: 20;
|
|
64
|
+
letterSpacing: 0;
|
|
65
|
+
fontFamily: string;
|
|
66
|
+
fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
67
|
+
};
|
|
68
|
+
right: {
|
|
69
|
+
display: "flex";
|
|
70
|
+
flexDirection: "row";
|
|
71
|
+
alignItems: "center";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export default _default;
|
|
76
|
+
export declare const Default: () => import("react").JSX.Element;
|
|
77
|
+
export declare const SansContenuDroite: () => import("react").JSX.Element;
|
|
78
|
+
export declare const MobileSimple: () => import("react").JSX.Element;
|
|
79
|
+
export * as Sources from './Header.stories.sources';
|
|
80
|
+
//# sourceMappingURL=Header.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Header/Header.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAUkB;AAqBlB,eAAO,MAAM,OAAO,mCAYnB,CAAC;AAEF,eAAO,MAAM,iBAAiB,mCAAmE,CAAC;AAElG,eAAO,MAAM,YAAY,mCAExB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@alveole/theme';
|
|
3
|
+
import { Box, Typography } from '../../core';
|
|
4
|
+
import { Button } from '../Button';
|
|
5
|
+
import { Header } from './Header';
|
|
6
|
+
import { useStyles } from './Header.styles';
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Header',
|
|
9
|
+
tags: ['ui'],
|
|
10
|
+
experimental: false,
|
|
11
|
+
figmaURL: 'https://www.figma.com/design/xJz8Z6vfrnZPKTtRbuT2W8/Alveole---Composants?node-id=1736-931',
|
|
12
|
+
description: "En-tête statique avec un logo carré et le titre de l'application à gauche, et un contenu libre à droite.",
|
|
13
|
+
webOnly: true,
|
|
14
|
+
component: Header,
|
|
15
|
+
styleFn: useStyles,
|
|
16
|
+
};
|
|
17
|
+
const LogoPlaceholder = () => {
|
|
18
|
+
const { color, radius, text } = useTheme();
|
|
19
|
+
return (_jsx(Box, { style: {
|
|
20
|
+
width: 32,
|
|
21
|
+
height: 32,
|
|
22
|
+
borderRadius: radius('md'),
|
|
23
|
+
backgroundColor: color.light.background['action-high-primary'],
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
}, children: _jsx(Typography, { style: { ...text['Corps de texte'].XS.Bold, color: '#fff' }, children: "A" }) }));
|
|
28
|
+
};
|
|
29
|
+
export const Default = () => (_jsx(Header, { logo: _jsx(LogoPlaceholder, {}), title: "Nom de l'app", right: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "tertiary", title: "Composants", size: "sm", onPress: () => { } }), _jsx(Button, { variant: "tertiary", title: "Th\u00E8me", size: "sm", onPress: () => { } }), _jsx(Button, { variant: "primary", title: "Documentation", size: "sm", onPress: () => { } })] }) }));
|
|
30
|
+
export const SansContenuDroite = () => _jsx(Header, { logo: _jsx(LogoPlaceholder, {}), title: "Nom de l'app" });
|
|
31
|
+
export const MobileSimple = () => (_jsx(Header, { logo: _jsx(LogoPlaceholder, {}), right: _jsx(Button, { variant: "tertiary", title: "\u2261", size: "sm", onPress: () => { } }) }));
|
|
32
|
+
export * as Sources from './Header.stories.sources';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const Default: () => string;
|
|
2
|
+
export declare const SansContenuDroite: () => string;
|
|
3
|
+
export declare const MobileSimple: () => string;
|
|
4
|
+
export declare const storySources: {
|
|
5
|
+
readonly Default: () => string;
|
|
6
|
+
readonly SansContenuDroite: () => string;
|
|
7
|
+
readonly MobileSimple: () => string;
|
|
8
|
+
};
|
|
9
|
+
export type StorySourceName = keyof typeof storySources;
|
|
10
|
+
//# sourceMappingURL=Header.stories.sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Header/Header.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAAub,CAAC;AAE5c,eAAO,MAAM,iBAAiB,cAA+G,CAAC;AAE9I,eAAO,MAAM,YAAY,cAA8K,CAAC;AAExM,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file is generated. Do not edit manually.
|
|
2
|
+
// Source: src/ui/Header/Header.stories.tsx
|
|
3
|
+
export const Default = () => "export const Default = () => (\n <Header\n logo={<LogoPlaceholder />}\n title=\"Nom de l'app\"\n right={\n <>\n <Button variant=\"tertiary\" title=\"Composants\" size=\"sm\" onPress={() => {}} />\n <Button variant=\"tertiary\" title=\"Thème\" size=\"sm\" onPress={() => {}} />\n <Button variant=\"primary\" title=\"Documentation\" size=\"sm\" onPress={() => {}} />\n </>\n }\n />\n);";
|
|
4
|
+
export const SansContenuDroite = () => "export const SansContenuDroite = () => <Header logo={<LogoPlaceholder />} title=\"Nom de l'app\" />;";
|
|
5
|
+
export const MobileSimple = () => "export const MobileSimple = () => (\n <Header logo={<LogoPlaceholder />} right={<Button variant=\"tertiary\" title=\"≡\" size=\"sm\" onPress={() => {}} />} />\n);";
|
|
6
|
+
export const storySources = {
|
|
7
|
+
Default,
|
|
8
|
+
SansContenuDroite,
|
|
9
|
+
MobileSimple,
|
|
10
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
container: {
|
|
3
|
+
position: "sticky";
|
|
4
|
+
top: number;
|
|
5
|
+
zIndex: number;
|
|
6
|
+
backgroundColor: "#FFFFFF" | "#F6F7F8";
|
|
7
|
+
} | {
|
|
8
|
+
position: "sticky";
|
|
9
|
+
top: number;
|
|
10
|
+
zIndex: number;
|
|
11
|
+
shadowColor: import("@alveole/theme").Color;
|
|
12
|
+
shadowOffset: {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
16
|
+
shadowOpacity: number;
|
|
17
|
+
shadowRadius: number;
|
|
18
|
+
elevation: number;
|
|
19
|
+
backgroundColor: "#FFFFFF" | "#F6F7F8";
|
|
20
|
+
} | {
|
|
21
|
+
position: "sticky";
|
|
22
|
+
top: number;
|
|
23
|
+
zIndex: number;
|
|
24
|
+
boxShadow: string;
|
|
25
|
+
backgroundColor: "#FFFFFF" | "#F6F7F8";
|
|
26
|
+
} | {
|
|
27
|
+
position: "sticky";
|
|
28
|
+
top: number;
|
|
29
|
+
zIndex: number;
|
|
30
|
+
borderBottomWidth: number;
|
|
31
|
+
borderBottomColor: "#DEE3EC";
|
|
32
|
+
backgroundColor: "#FFFFFF" | "#F6F7F8";
|
|
33
|
+
};
|
|
34
|
+
inner: {
|
|
35
|
+
display: "flex";
|
|
36
|
+
flexDirection: "row";
|
|
37
|
+
alignItems: "center";
|
|
38
|
+
justifyContent: "space-between";
|
|
39
|
+
gap: import("@alveole/theme").Spacing;
|
|
40
|
+
paddingLeft: import("@alveole/theme").Spacing;
|
|
41
|
+
paddingRight: import("@alveole/theme").Spacing;
|
|
42
|
+
paddingTop: import("@alveole/theme").Spacing;
|
|
43
|
+
paddingBottom: import("@alveole/theme").Spacing;
|
|
44
|
+
};
|
|
45
|
+
identity: {
|
|
46
|
+
display: "flex";
|
|
47
|
+
flexDirection: "row";
|
|
48
|
+
alignItems: "center";
|
|
49
|
+
gap: import("@alveole/theme").Spacing;
|
|
50
|
+
};
|
|
51
|
+
titleText: {
|
|
52
|
+
color: "#151617";
|
|
53
|
+
display: "flex" | "none";
|
|
54
|
+
fontSize: 14;
|
|
55
|
+
lineHeight: 20;
|
|
56
|
+
letterSpacing: 0;
|
|
57
|
+
fontFamily: string;
|
|
58
|
+
fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
59
|
+
};
|
|
60
|
+
right: {
|
|
61
|
+
display: "flex";
|
|
62
|
+
flexDirection: "row";
|
|
63
|
+
alignItems: "center";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=Header.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Header/Header.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCnB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ color, text, spacing, isVariant, shadows }) => ({
|
|
3
|
+
container: {
|
|
4
|
+
backgroundColor: isVariant('mobile') ? color.light.background['default-grey'] : color.light.background['alt-grey'],
|
|
5
|
+
...(isVariant('mobile')
|
|
6
|
+
? shadows('raised')
|
|
7
|
+
: { borderBottomWidth: 1, borderBottomColor: color.light.border['default-grey'] }),
|
|
8
|
+
position: 'sticky',
|
|
9
|
+
top: 0,
|
|
10
|
+
zIndex: 100,
|
|
11
|
+
},
|
|
12
|
+
inner: {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
justifyContent: 'space-between',
|
|
17
|
+
gap: spacing('3W'),
|
|
18
|
+
paddingLeft: spacing('2W'),
|
|
19
|
+
paddingRight: spacing('2W'),
|
|
20
|
+
paddingTop: spacing('2W'),
|
|
21
|
+
paddingBottom: spacing('2W'),
|
|
22
|
+
},
|
|
23
|
+
identity: {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
gap: spacing('1W'),
|
|
28
|
+
},
|
|
29
|
+
titleText: {
|
|
30
|
+
...text['Corps de texte'].SM.Bold,
|
|
31
|
+
color: color.light.text['title-grey'],
|
|
32
|
+
display: isVariant('mobile') ? 'none' : 'flex',
|
|
33
|
+
},
|
|
34
|
+
right: {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
},
|
|
39
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Header } from './Header';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Popover/Popover.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBASkB;AAElB,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Popover.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Popover/Popover.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBASkB;AAElB,eAAO,MAAM,OAAO,mCAuCnB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC"}
|
|
@@ -26,6 +26,9 @@ export const Default = () => {
|
|
|
26
26
|
'left-start',
|
|
27
27
|
'left-end',
|
|
28
28
|
];
|
|
29
|
-
return (_jsx(Box, { display: "flex", flexWrap: "wrap", gap: "1W", flexDirection: "row",
|
|
29
|
+
return (_jsx(Box, { display: "flex", flexWrap: "wrap", gap: "1W", flexDirection: "row", width: "100%", style: {
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
}, children: alignments.map(alignment => (_jsx(Popover, { placement: alignment, renderTrigger: () => _jsx(Button, { variant: "secondary", title: alignment }), children: _jsx(Typography, { children: "Contenu du popover" }) }, alignment))) }));
|
|
30
33
|
};
|
|
31
34
|
export * as Sources from './Popover.stories.sources';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Popover/Popover.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Popover.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Popover/Popover.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAA00B,CAAC;AAE/1B,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is generated. Do not edit manually.
|
|
2
2
|
// Source: src/ui/Popover/Popover.stories.tsx
|
|
3
|
-
export const Default = () => "export const Default = () => {\n const alignments = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'bottom-start',\n 'bottom-end',\n 'left-start',\n 'left-end',\n ] as const;\n\n return (\n <Box\n display=\"flex\"\n flexWrap=\"wrap\"\n gap=\"1W\"\n flexDirection=\"row\"\n
|
|
3
|
+
export const Default = () => "export const Default = () => {\n const alignments = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'bottom-start',\n 'bottom-end',\n 'left-start',\n 'left-end',\n ] as const;\n\n return (\n <Box\n display=\"flex\"\n flexWrap=\"wrap\"\n gap=\"1W\"\n flexDirection=\"row\"\n width=\"100%\"\n style={{\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n {alignments.map(alignment => (\n <Popover\n key={alignment}\n placement={alignment}\n renderTrigger={() => <Button variant=\"secondary\" title={alignment} />}\n >\n <Typography>Contenu du popover</Typography>\n </Popover>\n ))}\n </Box>\n );\n};";
|
|
4
4
|
export const storySources = {
|
|
5
5
|
Default,
|
|
6
6
|
};
|
package/dist/ui/index.d.ts
CHANGED
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,cAAc,CAAC;AAC7B,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,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CA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