@alveole/components 0.18.6 → 0.19.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 +24 -0
- package/dist/core/Page/Page.d.ts.map +1 -0
- package/dist/core/Page/Page.js +7 -0
- package/dist/core/Page/Page.stories.d.ts +12 -0
- package/dist/core/Page/Page.stories.d.ts.map +1 -0
- package/dist/core/Page/Page.stories.js +31 -0
- package/dist/core/Page/Page.styles.d.ts +13 -0
- package/dist/core/Page/Page.styles.d.ts.map +1 -0
- package/dist/core/Page/Page.styles.js +13 -0
- package/dist/core/Page/PageBackground.d.ts +6 -0
- package/dist/core/Page/PageBackground.d.ts.map +1 -0
- package/dist/core/Page/PageBackground.js +7 -0
- package/dist/core/Page/PageContent.d.ts +4 -0
- package/dist/core/Page/PageContent.d.ts.map +1 -0
- package/dist/core/Page/PageContent.js +29 -0
- package/dist/core/Page/PageContentDefault.d.ts +4 -0
- package/dist/core/Page/PageContentDefault.d.ts.map +1 -0
- package/dist/core/Page/PageContentDefault.js +6 -0
- package/dist/core/Page/PageContentScrollable.d.ts +38 -0
- package/dist/core/Page/PageContentScrollable.d.ts.map +1 -0
- package/dist/core/Page/PageContentScrollable.js +20 -0
- package/dist/core/Page/PageHead.d.ts +7 -0
- package/dist/core/Page/PageHead.d.ts.map +1 -0
- package/dist/core/Page/PageHead.js +4 -0
- package/dist/core/Page/PageHead.web.d.ts +4 -0
- package/dist/core/Page/PageHead.web.d.ts.map +1 -0
- package/dist/core/Page/PageHead.web.js +9 -0
- package/dist/core/Page/index.d.ts +2 -0
- package/dist/core/Page/index.d.ts.map +1 -0
- package/dist/core/Page/index.js +1 -0
- 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/Sidebar/index.d.ts +2 -0
- package/dist/ui/Sidebar/index.d.ts.map +1 -0
- package/dist/ui/Sidebar/index.js +1 -0
- package/dist/ui/Sidebar/useSidebar.d.ts +6 -0
- package/dist/ui/Sidebar/useSidebar.d.ts.map +1 -0
- package/dist/ui/Sidebar/useSidebar.js +5 -0
- package/package.json +3 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BoxProps } from '@alveole/components';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SidebarController } from '../../ui/Sidebar';
|
|
4
|
+
export type PageProps = BoxProps & {
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
defaultBackgroundColor?: string;
|
|
8
|
+
og?: {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
};
|
|
12
|
+
scrollable?: boolean | 'mobile-only' | 'desktop-only';
|
|
13
|
+
sidebar?: React.ReactNode;
|
|
14
|
+
beforeContent?: React.ReactNode;
|
|
15
|
+
sideBarController?: SidebarController;
|
|
16
|
+
renderToolbar?: (options?: {
|
|
17
|
+
isScrolled: boolean;
|
|
18
|
+
}) => React.ReactNode;
|
|
19
|
+
onScrollToBottom?: () => void;
|
|
20
|
+
onEndReachedThreshold?: number;
|
|
21
|
+
onScrollChange?: (scrollY: number) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const Page: (props: PageProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=Page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/core/Page/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIrD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,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,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC,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,4CAOpC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PageContent } from './PageContent';
|
|
4
|
+
import { PageHead } from './PageHead';
|
|
5
|
+
export const Page = (props) => {
|
|
6
|
+
return (_jsxs(React.Fragment, { children: [_jsx(PageHead, { ...props }), _jsx(PageContent, { ...props })] }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: ["Kit"];
|
|
4
|
+
experimental: false;
|
|
5
|
+
description: string;
|
|
6
|
+
component: (props: import("./Page").PageProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
styleFn: () => string;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const ExampleUsage: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const ExampleUsageSidebar: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=Page.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Page/Page.stories.tsx"],"names":[],"mappings":";;;;;;;;AAIA,wBAQkB;AAWlB,eAAO,MAAM,YAAY,+CAAiC,CAAC;AAa3D,eAAO,MAAM,mBAAmB,+CAAwC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../Box';
|
|
3
|
+
import { Page } from './Page';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Pages',
|
|
6
|
+
tags: ['Kit'],
|
|
7
|
+
experimental: false,
|
|
8
|
+
description: 'Permet de définir les valeurs de la balise <head> via Expo router. Doit englober toutes les pages. Permet aussi de la rendre scrollable la page via l’attribut `scrollable`. Principalement pour le web.',
|
|
9
|
+
component: Page,
|
|
10
|
+
styleFn: () => 'Aucun style appliqué',
|
|
11
|
+
};
|
|
12
|
+
const codeExample = `<Page
|
|
13
|
+
scrollable
|
|
14
|
+
title="Mon titre"
|
|
15
|
+
description="Description"
|
|
16
|
+
og={{ title: "OG titre", description: "OG description" }}
|
|
17
|
+
>
|
|
18
|
+
{/* ... */}
|
|
19
|
+
</Page>`;
|
|
20
|
+
export const ExampleUsage = () => _jsx(Box, { children: codeExample });
|
|
21
|
+
const codeExampleSidebar = `const sidebarController = useSidebar();
|
|
22
|
+
return (
|
|
23
|
+
<Page
|
|
24
|
+
sideBarController={sidebarController}
|
|
25
|
+
sidebar={<AdminNavigation sidebarController={sidebarController} />}
|
|
26
|
+
title="Mon titre"
|
|
27
|
+
>
|
|
28
|
+
{/* ... */}
|
|
29
|
+
</Page>
|
|
30
|
+
);`;
|
|
31
|
+
export const ExampleUsageSidebar = () => _jsx(Box, { children: codeExampleSidebar });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
gradientBackground: {
|
|
3
|
+
flex: number;
|
|
4
|
+
width: "100%";
|
|
5
|
+
};
|
|
6
|
+
sidebarContainer: {
|
|
7
|
+
display: "flex";
|
|
8
|
+
flexDirection: "row";
|
|
9
|
+
flex: number;
|
|
10
|
+
backgroundColor: "transparent";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=Page.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.styles.d.ts","sourceRoot":"","sources":["../../../src/core/Page/Page.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;CAWnB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(() => ({
|
|
3
|
+
gradientBackground: {
|
|
4
|
+
flex: 1,
|
|
5
|
+
width: '100%',
|
|
6
|
+
},
|
|
7
|
+
sidebarContainer: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
flex: 1,
|
|
11
|
+
backgroundColor: 'transparent',
|
|
12
|
+
},
|
|
13
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageBackground.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageBackground.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,cAAc,mBAAmB,4CAa/D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
3
|
+
import { useStyles } from './Page.styles';
|
|
4
|
+
export const PageBackground = ({ children }) => {
|
|
5
|
+
const styles = useStyles();
|
|
6
|
+
return (_jsx(LinearGradient, { colors: ['#FFFFFF', '#F5F6F8'], start: { x: 0.5, y: 0 }, end: { x: 0.5, y: 1 }, style: styles.gradientBackground, children: children }));
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageContent.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageContent.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAMnC,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEzC,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CA4DlD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@alveole/components';
|
|
3
|
+
import { useTheme } from '@alveole/theme';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Platform } from 'react-native';
|
|
6
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
|
+
import { useStyles } from './Page.styles';
|
|
8
|
+
import { PageBackground } from './PageBackground';
|
|
9
|
+
import { PageContentDefault } from './PageContentDefault';
|
|
10
|
+
import { PageContentScrollable } from './PageContentScrollable';
|
|
11
|
+
export const PageContent = (props) => {
|
|
12
|
+
const { scrollable = false, renderToolbar, sidebar, sideBarController, onScrollChange } = props;
|
|
13
|
+
const { isVariant } = useTheme();
|
|
14
|
+
const styles = useStyles();
|
|
15
|
+
const { top } = useSafeAreaInsets();
|
|
16
|
+
const mobileOrTablet = isVariant('mobile') || isVariant('tablet');
|
|
17
|
+
const [isScrolled, setIsScrolled] = React.useState(false);
|
|
18
|
+
const handleInternalScrollChange = React.useCallback((scrollY) => {
|
|
19
|
+
const scrolled = scrollY > 0;
|
|
20
|
+
setIsScrolled(scrolled);
|
|
21
|
+
onScrollChange?.(scrollY);
|
|
22
|
+
}, [onScrollChange]);
|
|
23
|
+
const renderPageWithSidebar = (children) => (_jsxs(Box, { style: styles.sidebarContainer, overflow: mobileOrTablet && sideBarController?.open ? 'hidden' : undefined, children: [sidebar, _jsxs(Box, { flex: 1, children: [mobileOrTablet && (_jsx(Box, { tag: "mobile-menu", children: _jsx(Box, { pt: Platform.OS === 'android' ? top : 0, children: renderToolbar?.({ isScrolled }) }) })), _jsx(Box, { flex: 1, children: children })] })] }));
|
|
24
|
+
const isScrollable = React.useMemo(() => scrollable === true ||
|
|
25
|
+
(scrollable === 'desktop-only' && isVariant('desktop')) ||
|
|
26
|
+
(scrollable === 'mobile-only' && mobileOrTablet), [isVariant, mobileOrTablet, scrollable]);
|
|
27
|
+
const renderContent = () => isScrollable ? (_jsx(PageContentScrollable, { ...props, style: { backgroundColor: 'transparent' }, onScrollChange: handleInternalScrollChange })) : (_jsx(PageContentDefault, { ...props, style: { backgroundColor: 'transparent' } }));
|
|
28
|
+
return (_jsx(PageBackground, { children: sidebar || renderToolbar ? renderPageWithSidebar(renderContent()) : renderContent() }));
|
|
29
|
+
};
|
|
@@ -0,0 +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,4CAmBhE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@alveole/components';
|
|
3
|
+
export const PageContentDefault = (props) => {
|
|
4
|
+
const { children, title, description, og, scrollable: _scrollable, sidebar: _sidebar, sideBarController: _sideBarController, onScrollToBottom: _onScrollToBottom, onEndReachedThreshold: _onEndReachedThreshold, ...pageProps } = props;
|
|
5
|
+
return (_jsx(Box, { tag: "page", ...pageProps, height: "100%", children: children }));
|
|
6
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PageProps } from './Page';
|
|
3
|
+
export type PageContentScrollableHandle = {
|
|
4
|
+
scrollToTop: () => void;
|
|
5
|
+
};
|
|
6
|
+
export type PageContentScrollableProps = PageProps & {
|
|
7
|
+
onScrollToBottom?: () => void;
|
|
8
|
+
onEndReachedThreshold?: number;
|
|
9
|
+
onScrollChange?: (scrollY: number) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const PageContentScrollable: React.ForwardRefExoticComponent<Pick<import("tamagui").StackProps, "pressStyle" | "focusStyle" | "disabledStyle" | "exitStyle"> & import("@tamagui/core").RNTamaguiViewNonStyleProps & Pick<import("tamagui").StackProps, "display" | "flex" | "flexWrap" | "flexDirection" | "opacity" | "overflow"> & {
|
|
12
|
+
justify?: import("tamagui").ViewProps["justifyContent"];
|
|
13
|
+
} & import("@alveole/components").BoxAdvancedStyle & {
|
|
14
|
+
hoverStyle?: React.CSSProperties;
|
|
15
|
+
} & {
|
|
16
|
+
title: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
defaultBackgroundColor?: string;
|
|
19
|
+
og?: {
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
};
|
|
23
|
+
scrollable?: boolean | "mobile-only" | "desktop-only";
|
|
24
|
+
sidebar?: React.ReactNode;
|
|
25
|
+
beforeContent?: React.ReactNode;
|
|
26
|
+
sideBarController?: import("../../ui/Sidebar").SidebarController;
|
|
27
|
+
renderToolbar?: (options?: {
|
|
28
|
+
isScrolled: boolean;
|
|
29
|
+
}) => React.ReactNode;
|
|
30
|
+
onScrollToBottom?: () => void;
|
|
31
|
+
onEndReachedThreshold?: number;
|
|
32
|
+
onScrollChange?: (scrollY: number) => void;
|
|
33
|
+
} & {
|
|
34
|
+
onScrollToBottom?: () => void;
|
|
35
|
+
onEndReachedThreshold?: number;
|
|
36
|
+
onScrollChange?: (scrollY: number) => void;
|
|
37
|
+
} & React.RefAttributes<PageContentScrollableHandle>>;
|
|
38
|
+
//# sourceMappingURL=PageContentScrollable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageContentScrollable.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageContentScrollable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,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;;;;;;;;;aANG,CAAC;mBAClC,CAAC;;;;;;4BAKoF,CAAC;;;;;;;uBALrE,MAAM,IAAI;4BACL,MAAM;qBACb,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;qDAoD3C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@alveole/components';
|
|
3
|
+
import React, { useImperativeHandle, useRef } from 'react';
|
|
4
|
+
import { ScrollView } from 'react-native';
|
|
5
|
+
export const PageContentScrollable = React.forwardRef(function PageContentScrollable(props, ref) {
|
|
6
|
+
const { children, title, description, og, defaultBackgroundColor, onScrollToBottom, onEndReachedThreshold = 100, onScrollChange, ...pageProps } = props;
|
|
7
|
+
const { scrollable: _scrollable, sidebar: _sidebar, sideBarController: _sideBarController, ...boxProps } = pageProps;
|
|
8
|
+
const scrollRef = useRef(null);
|
|
9
|
+
useImperativeHandle(ref, () => ({
|
|
10
|
+
scrollToTop: () => scrollRef.current?.scrollTo({ y: 0, animated: true }),
|
|
11
|
+
}));
|
|
12
|
+
const handleScroll = (e) => {
|
|
13
|
+
const { layoutMeasurement, contentOffset, contentSize } = e.nativeEvent;
|
|
14
|
+
const atBottom = layoutMeasurement.height + contentOffset.y >= contentSize.height - onEndReachedThreshold;
|
|
15
|
+
if (atBottom)
|
|
16
|
+
onScrollToBottom?.();
|
|
17
|
+
onScrollChange?.(contentOffset.y);
|
|
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: _jsx(Box, { tag: "page", ...boxProps, height: "100%", children: children }) }));
|
|
20
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHead.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageHead.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AACtC;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,GAAG,aAAa,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHead.web.d.ts","sourceRoot":"","sources":["../../../src/core/Page/PageHead.web.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAIxC,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,4CAc5C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Asset } from 'expo-asset';
|
|
3
|
+
import Head from 'expo-router/head';
|
|
4
|
+
const favicon = Asset.fromModule(require('@/assets/images/icon.png')).uri;
|
|
5
|
+
export const PageHead = (props) => {
|
|
6
|
+
const { title, description, og } = props;
|
|
7
|
+
const descriptionValue = description ?? title;
|
|
8
|
+
return (_jsxs(Head, { children: [_jsx("title", { children: title }), _jsx("meta", { name: "description", content: descriptionValue }), _jsx("meta", { property: "og:title", content: og?.title ?? title }), _jsx("meta", { property: "og:description", content: og?.description ?? descriptionValue }), _jsx("link", { rel: "icon", type: "image/png", href: favicon })] }));
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/Page/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Page';
|
package/dist/stories/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * as MetabaseStory from '../core/Metabase/Metabase.stories';
|
|
|
4
4
|
export * as SectionStory from '../core/Section/Section.stories';
|
|
5
5
|
export * as TypographyStory from '../core/Typography/Typography.stories';
|
|
6
6
|
export * as VersionStory from '../core/Version/Version.stories';
|
|
7
|
+
export * as PageStory from '../core/Page/Page.stories';
|
|
7
8
|
export * as AvatarStory from '../ui/Avatar/Avatar.stories';
|
|
8
9
|
export * as ButtonStory from '../ui/Button/Button.stories';
|
|
9
10
|
export * as DividerStory from '../ui/Divider/Divider.stories';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stories/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,eAAe,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stories/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,eAAe,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AAGvD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AACvE,OAAO,KAAK,iBAAiB,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,qBAAqB,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC"}
|
package/dist/stories/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export * as MetabaseStory from '../core/Metabase/Metabase.stories';
|
|
|
5
5
|
export * as SectionStory from '../core/Section/Section.stories';
|
|
6
6
|
export * as TypographyStory from '../core/Typography/Typography.stories';
|
|
7
7
|
export * as VersionStory from '../core/Version/Version.stories';
|
|
8
|
+
export * as PageStory from '../core/Page/Page.stories';
|
|
8
9
|
// UI
|
|
9
10
|
export * as AvatarStory from '../ui/Avatar/Avatar.stories';
|
|
10
11
|
export * as ButtonStory from '../ui/Button/Button.stories';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useSidebar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../../src/ui/Sidebar/useSidebar.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,IAAI,iBAAiB,CAG9C;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alveole/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "Shared UI components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -57,7 +57,8 @@
|
|
|
57
57
|
"react-native-webview": ">=13",
|
|
58
58
|
"expo-application": "*",
|
|
59
59
|
"expo-image": "*",
|
|
60
|
-
"expo-router": "*"
|
|
60
|
+
"expo-router": "*",
|
|
61
|
+
"expo-linear-gradient": "*"
|
|
61
62
|
},
|
|
62
63
|
"publishConfig": {
|
|
63
64
|
"access": "public"
|