@alveole/components 1.3.7 → 1.5.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/AppUpdateProvider/AppUpdateProvider.d.ts.map +1 -1
- package/dist/core/AppUpdateProvider/AppUpdateProvider.js +4 -3
- 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/Badge/Badge.d.ts +1 -1
- package/dist/ui/Badge/Badge.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.js +2 -0
- package/dist/ui/Badge/Badge.stories.d.ts +4 -0
- package/dist/ui/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.stories.js +1 -1
- package/dist/ui/Badge/Badge.stories.sources.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.stories.sources.js +1 -1
- package/dist/ui/Badge/Badge.styles.d.ts +4 -0
- package/dist/ui/Badge/Badge.styles.d.ts.map +1 -1
- package/dist/ui/Badge/Badge.styles.js +4 -0
- package/dist/ui/Card/Card.d.ts +4 -1
- package/dist/ui/Card/Card.d.ts.map +1 -1
- package/dist/ui/Card/Card.js +8 -2
- package/dist/ui/Card/Card.stories.d.ts +3 -0
- package/dist/ui/Card/Card.stories.d.ts.map +1 -1
- package/dist/ui/Card/Card.stories.js +11 -4
- package/dist/ui/Card/Card.stories.sources.d.ts +4 -0
- package/dist/ui/Card/Card.stories.sources.d.ts.map +1 -1
- package/dist/ui/Card/Card.stories.sources.js +8 -4
- package/dist/ui/Card/Card.styles.d.ts +8 -2
- package/dist/ui/Card/Card.styles.d.ts.map +1 -1
- package/dist/ui/Card/Card.styles.js +8 -2
- package/dist/ui/Card/CardHeader.d.ts.map +1 -1
- package/dist/ui/Card/CardHeader.js +1 -1
- package/dist/ui/Card/CardHeader.styles.d.ts +4 -0
- package/dist/ui/Card/CardHeader.styles.d.ts.map +1 -1
- package/dist/ui/Card/CardHeader.styles.js +4 -0
- package/dist/ui/Card/CardMedia.d.ts +7 -0
- package/dist/ui/Card/CardMedia.d.ts.map +1 -0
- package/dist/ui/Card/CardMedia.js +8 -0
- package/dist/ui/Card/CardMedia.styles.d.ts +9 -0
- package/dist/ui/Card/CardMedia.styles.d.ts.map +1 -0
- package/dist/ui/Card/CardMedia.styles.js +9 -0
- package/dist/ui/Sheet/Sheet.d.ts +11 -0
- package/dist/ui/Sheet/Sheet.d.ts.map +1 -0
- package/dist/ui/Sheet/Sheet.js +16 -0
- package/dist/ui/Sheet/Sheet.stories.d.ts +49 -0
- package/dist/ui/Sheet/Sheet.stories.d.ts.map +1 -0
- package/dist/ui/Sheet/Sheet.stories.js +22 -0
- package/dist/ui/Sheet/Sheet.stories.sources.d.ts +8 -0
- package/dist/ui/Sheet/Sheet.stories.sources.d.ts.map +1 -0
- package/dist/ui/Sheet/Sheet.stories.sources.js +8 -0
- package/dist/ui/Sheet/Sheet.styles.d.ts +38 -0
- package/dist/ui/Sheet/Sheet.styles.d.ts.map +1 -0
- package/dist/ui/Sheet/Sheet.styles.js +34 -0
- package/dist/ui/Sheet/index.d.ts +2 -0
- package/dist/ui/Sheet/index.d.ts.map +1 -0
- package/dist/ui/Sheet/index.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppUpdateProvider.d.ts","sourceRoot":"","sources":["../../../src/core/AppUpdateProvider/AppUpdateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppUpdateProvider.d.ts","sourceRoot":"","sources":["../../../src/core/AppUpdateProvider/AppUpdateProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,KAAK,cAAc,GAAG;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC;AAI9C,eAAO,MAAM,iBAAiB,QAAO,cAIpC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC,CAAC;AAOH,eAAO,MAAM,WAAW,QAAsB,CAAC;AAE/C,eAAO,MAAM,cAAc,GAAI,eAAe,MAAM,EAAE,KAAK,MAAM,KAAG,OAA6C,CAAC;AAclH,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,sBA+E9D,CAAC"}
|
|
@@ -4,9 +4,10 @@ import Constants from 'expo-constants';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { AppState, Linking, Platform } from 'react-native';
|
|
6
6
|
import { UpdateRequired } from '../UpdateRequired';
|
|
7
|
-
const importExpoInAppUpdates =
|
|
7
|
+
const importExpoInAppUpdates = () => {
|
|
8
8
|
try {
|
|
9
|
-
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
10
|
+
return require('expo-in-app-updates');
|
|
10
11
|
}
|
|
11
12
|
catch {
|
|
12
13
|
return null;
|
|
@@ -56,7 +57,7 @@ export const AppUpdateProvider = (props) => {
|
|
|
56
57
|
return;
|
|
57
58
|
lastCheckedAt.current = now;
|
|
58
59
|
try {
|
|
59
|
-
const ExpoInAppUpdates =
|
|
60
|
+
const ExpoInAppUpdates = importExpoInAppUpdates();
|
|
60
61
|
if (!ExpoInAppUpdates) {
|
|
61
62
|
dispatch({ type: 'CHECK_COMPLETE' });
|
|
62
63
|
return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALVEOLE_COMPONENTS_VERSION: "1.
|
|
1
|
+
export declare const ALVEOLE_COMPONENTS_VERSION: "1.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ALVEOLE_COMPONENTS_VERSION = "1.
|
|
1
|
+
export const ALVEOLE_COMPONENTS_VERSION = "1.5.0";
|
package/dist/stories/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export * as RadioGroupStory from '../ui/RadioGroup/RadioGroup.stories';
|
|
|
56
56
|
export * as ResourceListStory from '../ui/ResourceList/ResourceList.stories';
|
|
57
57
|
export * as SelectStory from '../ui/Select/Select.stories';
|
|
58
58
|
export * as SelectMultipleStory from '../ui/SelectMultiple/SelectMultiple.stories';
|
|
59
|
+
export * as SheetStory from '../ui/Sheet/Sheet.stories';
|
|
59
60
|
export * as SidebarStory from '../ui/Sidebar/Sidebar.stories';
|
|
60
61
|
export * as SignatureStory from '../ui/Signature/Signature.stories';
|
|
61
62
|
export * as SpinnerStory from '../ui/Spinner/Spinner.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,wBAAwB,MAAM,qDAAqD,CAAC;AAChG,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,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,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,wBAAwB,MAAM,yDAAyD,CAAC;AACpG,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC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/stories/index.js
CHANGED
|
@@ -58,6 +58,7 @@ export * as RadioGroupStory from '../ui/RadioGroup/RadioGroup.stories';
|
|
|
58
58
|
export * as ResourceListStory from '../ui/ResourceList/ResourceList.stories';
|
|
59
59
|
export * as SelectStory from '../ui/Select/Select.stories';
|
|
60
60
|
export * as SelectMultipleStory from '../ui/SelectMultiple/SelectMultiple.stories';
|
|
61
|
+
export * as SheetStory from '../ui/Sheet/Sheet.stories';
|
|
61
62
|
export * as SidebarStory from '../ui/Sidebar/Sidebar.stories';
|
|
62
63
|
export * as SignatureStory from '../ui/Signature/Signature.stories';
|
|
63
64
|
export * as SpinnerStory from '../ui/Spinner/Spinner.stories';
|
package/dist/ui/Badge/Badge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TypographyProps } from '../../core/Typography';
|
|
2
2
|
import { LucideIconProps } from '../LucideIcon';
|
|
3
3
|
export type BadgeProps = TypographyProps & {
|
|
4
|
-
variant: 'default' | 'info' | 'success' | 'error' | 'new' | 'warning';
|
|
4
|
+
variant: 'default' | 'info' | 'success' | 'error' | 'new' | 'warning' | 'disabled';
|
|
5
5
|
size: 'sm' | 'md';
|
|
6
6
|
icon?: LucideIconProps['name'];
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,UAAU,GAAG,eAAe,GAAG;IACzC,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,UAAU,GAAG,eAAe,GAAG;IACzC,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;IACnF,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAChC,CAAC;AACF,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,gCAsCtC,CAAC"}
|
package/dist/ui/Badge/Badge.js
CHANGED
|
@@ -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,mCA0BpB,CAAC;AAEF,eAAO,MAAM,KAAK,mCASjB,CAAC;AAEF,eAAO,MAAM,KAAK,mCAMjB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC"}
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
component: Badge,
|
|
12
12
|
styleFn: useStyles,
|
|
13
13
|
};
|
|
14
|
-
export const Variants = () => (_jsx(Box, { children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: 4, children: [_jsx(Badge, { size: "md", variant: "default", children: "Badge default" }), _jsx(Badge, { size: "md", variant: "info", children: "Badge info" }), _jsx(Badge, { size: "md", variant: "error", children: "Badge error" }), _jsx(Badge, { size: "md", variant: "new", children: "Badge new" }), _jsx(Badge, { size: "md", variant: "success", children: "Badge success" }), _jsx(Badge, { size: "md", variant: "warning", children: "Badge warning" })] }) }));
|
|
14
|
+
export const Variants = () => (_jsx(Box, { children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: 4, children: [_jsx(Badge, { size: "md", variant: "default", children: "Badge default" }), _jsx(Badge, { size: "md", variant: "info", children: "Badge info" }), _jsx(Badge, { size: "md", variant: "error", children: "Badge error" }), _jsx(Badge, { size: "md", variant: "new", children: "Badge new" }), _jsx(Badge, { size: "md", variant: "success", children: "Badge success" }), _jsx(Badge, { size: "md", variant: "warning", children: "Badge warning" }), _jsx(Badge, { size: "md", variant: "disabled", children: "Badge disabled" })] }) }));
|
|
15
15
|
export const Sizes = () => (_jsxs(Box, { display: "flex", flexDirection: "row", gap: 4, flexWrap: "wrap", children: [_jsx(Badge, { size: "sm", variant: "info", m: "auto", children: "Badge small" }), _jsx(Badge, { size: "md", variant: "info", children: "Badge medium" })] }));
|
|
16
16
|
export const Icons = () => (_jsx(Box, { display: "flex", flexDirection: "row", gap: 4, flexWrap: "wrap", children: _jsx(Badge, { size: "sm", variant: "info", icon: "Check", children: "Badge small" }) }));
|
|
17
17
|
export * as Sources from './Badge.stories.sources';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Badge.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Badge/Badge.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,cAAotB,CAAC;AAE1uB,eAAO,MAAM,KAAK,cAAiS,CAAC;AAEpT,eAAO,MAAM,KAAK,cAAyN,CAAC;AAE5O,eAAO,MAAM,YAAY;;;;CAIf,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/Badge/Badge.stories.tsx
|
|
3
|
-
export const Variants = () => "export const Variants = () => (\n <Box>\n <Box display=\"flex\" flexDirection=\"column\" gap={4}>\n <Badge size=\"md\" variant=\"default\">\n Badge default\n </Badge>\n <Badge size=\"md\" variant=\"info\">\n Badge info\n </Badge>\n <Badge size=\"md\" variant=\"error\">\n Badge error\n </Badge>\n <Badge size=\"md\" variant=\"new\">\n Badge new\n </Badge>\n <Badge size=\"md\" variant=\"success\">\n Badge success\n </Badge>\n <Badge size=\"md\" variant=\"warning\">\n Badge warning\n </Badge>\n </Box>\n </Box>\n);";
|
|
3
|
+
export const Variants = () => "export const Variants = () => (\n <Box>\n <Box display=\"flex\" flexDirection=\"column\" gap={4}>\n <Badge size=\"md\" variant=\"default\">\n Badge default\n </Badge>\n <Badge size=\"md\" variant=\"info\">\n Badge info\n </Badge>\n <Badge size=\"md\" variant=\"error\">\n Badge error\n </Badge>\n <Badge size=\"md\" variant=\"new\">\n Badge new\n </Badge>\n <Badge size=\"md\" variant=\"success\">\n Badge success\n </Badge>\n <Badge size=\"md\" variant=\"warning\">\n Badge warning\n </Badge>\n <Badge size=\"md\" variant=\"disabled\">\n Badge disabled\n </Badge>\n </Box>\n </Box>\n);";
|
|
4
4
|
export const Sizes = () => "export const Sizes = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={4} flexWrap=\"wrap\">\n <Badge size=\"sm\" variant=\"info\" m=\"auto\">\n Badge small\n </Badge>\n <Badge size=\"md\" variant=\"info\">\n Badge medium\n </Badge>\n </Box>\n);";
|
|
5
5
|
export const Icons = () => "export const Icons = () => (\n <Box display=\"flex\" flexDirection=\"row\" gap={4} flexWrap=\"wrap\">\n <Badge size=\"sm\" variant=\"info\" icon=\"Check\">\n Badge small\n </Badge>\n </Box>\n);";
|
|
6
6
|
export const storySources = {
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDnB,CAAC"}
|
|
@@ -33,6 +33,10 @@ export const useStyles = makeStyles(({ radius, text, color, spacing }) => ({
|
|
|
33
33
|
color: color.light.text['default-grey'],
|
|
34
34
|
backgroundColor: color.light.background['contrast-grey'],
|
|
35
35
|
},
|
|
36
|
+
badgeDisabled: {
|
|
37
|
+
color: color.light.text['disabled-grey'],
|
|
38
|
+
backgroundColor: color.light.background['disabled-grey'],
|
|
39
|
+
},
|
|
36
40
|
// Sizes
|
|
37
41
|
badgeSm: {
|
|
38
42
|
paddingLeft: spacing('1,5V'),
|
package/dist/ui/Card/Card.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { BoxProps } from '../../core';
|
|
2
3
|
import { CardActions } from './CardActions';
|
|
3
4
|
import { CardHeader } from './CardHeader';
|
|
5
|
+
import { CardMedia } from './CardMedia';
|
|
4
6
|
import { CardSection } from './CardSection';
|
|
5
7
|
export type CardProps = BoxProps;
|
|
6
|
-
declare const CardBase: (props: CardProps) =>
|
|
8
|
+
declare const CardBase: (props: CardProps) => React.JSX.Element;
|
|
7
9
|
type CardCompoundComponent = typeof CardBase & {
|
|
8
10
|
Header: typeof CardHeader;
|
|
9
11
|
Section: typeof CardSection;
|
|
10
12
|
Actions: typeof CardActions;
|
|
13
|
+
Media: typeof CardMedia;
|
|
11
14
|
};
|
|
12
15
|
export declare const Card: CardCompoundComponent;
|
|
13
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;AAEjC,QAAA,MAAM,QAAQ,GAAI,OAAO,SAAS,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;AAEjC,QAAA,MAAM,QAAQ,GAAI,OAAO,SAAS,sBAiBjC,CAAC;AAEF,KAAK,qBAAqB,GAAG,OAAO,QAAQ,GAAG;IAC7C,MAAM,EAAE,OAAO,UAAU,CAAC;IAC1B,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,KAAK,EAAE,OAAO,SAAS,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,qBAKjB,CAAC"}
|
package/dist/ui/Card/Card.js
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { Box } from '../../core';
|
|
3
4
|
import { useStyles } from './Card.styles';
|
|
4
5
|
import { CardActions } from './CardActions';
|
|
5
6
|
import { CardHeader } from './CardHeader';
|
|
7
|
+
import { CardMedia } from './CardMedia';
|
|
6
8
|
import { CardSection } from './CardSection';
|
|
7
9
|
const CardBase = (props) => {
|
|
8
10
|
const { style, children, ...boxProps } = props;
|
|
9
11
|
const styles = useStyles();
|
|
10
|
-
|
|
12
|
+
const allChildren = React.Children.toArray(children);
|
|
13
|
+
const mediaChild = allChildren.find(child => React.isValidElement(child) && child.type === CardMedia);
|
|
14
|
+
const contentChildren = allChildren.filter(child => !(React.isValidElement(child) && child.type === CardMedia));
|
|
15
|
+
return (_jsxs(Box, { tag: "card", style: [styles.card, style], ...boxProps, children: [mediaChild, _jsx(Box, { tag: "card-content", style: [styles.content], children: contentChildren })] }));
|
|
11
16
|
};
|
|
12
17
|
export const Card = Object.assign(CardBase, {
|
|
13
18
|
Header: CardHeader,
|
|
14
19
|
Section: CardSection,
|
|
15
20
|
Actions: CardActions,
|
|
21
|
+
Media: CardMedia,
|
|
16
22
|
});
|
|
@@ -8,6 +8,7 @@ declare const _default: {
|
|
|
8
8
|
Header: typeof import("./CardHeader").CardHeader;
|
|
9
9
|
Section: typeof import("./CardSection").CardSection;
|
|
10
10
|
Actions: typeof import("./CardActions").CardActions;
|
|
11
|
+
Media: typeof import("./CardMedia").CardMedia;
|
|
11
12
|
};
|
|
12
13
|
styleFn: () => {
|
|
13
14
|
cardSection: {
|
|
@@ -60,6 +61,8 @@ declare const _default: {
|
|
|
60
61
|
export default _default;
|
|
61
62
|
export declare const card: () => import("react").JSX.Element;
|
|
62
63
|
export declare const cardDisabled: () => import("react").JSX.Element;
|
|
64
|
+
export declare const cardWithMedia: () => import("react").JSX.Element;
|
|
65
|
+
export declare const cardWithMediaDisabled: () => import("react").JSX.Element;
|
|
63
66
|
export declare const cardSection: () => import("react").JSX.Element;
|
|
64
67
|
export declare const cardSectionDisabled: () => import("react").JSX.Element;
|
|
65
68
|
export declare const cardHeader: () => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,wBAQkB;AAElB,eAAO,MAAM,IAAI,mCAuBhB,CAAC;AAEF,eAAO,MAAM,YAAY,mCAwBxB,CAAC;AAEF,eAAO,MAAM,aAAa,mCA0BzB,CAAC;AAEF,eAAO,MAAM,qBAAqB,mCA2BjC,CAAC;AAEF,eAAO,MAAM,WAAW,mCASvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,mCAU/B,CAAC;AAEF,eAAO,MAAM,UAAU,mCAiBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAc9B,CAAC;AAEF,kGAAkG;AAClG,eAAO,MAAM,WAAW,mCAOvB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from '../../core';
|
|
3
3
|
import { Avatar } from '../Avatar';
|
|
4
|
+
import { Badge } from '../Badge';
|
|
4
5
|
import { Button } from '../Button';
|
|
5
6
|
import { LucideIcon } from '../LucideIcon';
|
|
6
7
|
import { Card } from './Card';
|
|
@@ -15,10 +16,16 @@ export default {
|
|
|
15
16
|
styleFn: useStyles,
|
|
16
17
|
};
|
|
17
18
|
export const card = () => {
|
|
18
|
-
return (_jsxs(Card, { children: [_jsx(Card.Header, { titre: "Titre
|
|
19
|
+
return (_jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Card, { children: [_jsx(Card.Header, { titre: "Titre lorem", sousTitre: "Sous-titre", image: _jsx(Avatar, { size: "md", fallbackText: "M" }), badge: _jsx(Badge, { variant: "success", size: "sm", children: "PR\u00C9SENT" }) }), _jsx(Card.Section, { titre: "Titre section", titreIcone: "Calendar", description: "Description" }), _jsx(Card.Section, { titre: "Titre section", titreIcone: "Calendar", description: "Description" }), _jsxs(Card.Actions, { children: [_jsx(Button, { variant: "secondary", title: "Libell\u00E9", size: "sm" }), _jsx(Button, { variant: "primary", title: "Libell\u00E9", size: "sm" })] })] }) }));
|
|
19
20
|
};
|
|
20
21
|
export const cardDisabled = () => {
|
|
21
|
-
return (_jsxs(Card, { children: [_jsx(Card.Header, { variant: "disabled", titre: "Titre
|
|
22
|
+
return (_jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Card, { children: [_jsx(Card.Header, { variant: "disabled", titre: "Titre lorem", sousTitre: "Sous-titre", image: _jsx(Avatar, { size: "md", fallbackText: "M" }), badge: _jsx(Badge, { variant: "disabled", size: "sm", children: "PR\u00C9SENT" }) }), _jsx(Card.Section, { variant: "disabled", titre: "Titre section", titreIcone: "Calendar", description: "Description" }), _jsx(Card.Section, { variant: "disabled", titre: "Titre section", titreIcone: "Calendar", description: "Description" }), _jsxs(Card.Actions, { children: [_jsx(Button, { variant: "secondary", title: "Libell\u00E9", size: "sm", disabled: true }), _jsx(Button, { variant: "primary", title: "Libell\u00E9", size: "sm", disabled: true })] })] }) }));
|
|
23
|
+
};
|
|
24
|
+
export const cardWithMedia = () => {
|
|
25
|
+
return (_jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Card, { children: [_jsx(Card.Media, { children: _jsx("img", { src: "https://picsum.photos/400/200", alt: "", style: { width: '100%', display: 'block' } }) }), _jsx(Card.Header, { titre: "Titre lorem", sousTitre: "Sous-titre", image: _jsx(Avatar, { size: "md", fallbackText: "M" }), badge: _jsx(Badge, { variant: "success", size: "sm", children: "PR\u00C9SENT" }) }), _jsx(Card.Section, { titre: "Titre section", titreIcone: "Calendar", description: "Description" }), _jsx(Card.Section, { titre: "Titre section", titreIcone: "Calendar", description: "Description" }), _jsxs(Card.Actions, { children: [_jsx(Button, { variant: "secondary", title: "Libell\u00E9", size: "sm" }), _jsx(Button, { variant: "primary", title: "Libell\u00E9", size: "sm" })] })] }) }));
|
|
26
|
+
};
|
|
27
|
+
export const cardWithMediaDisabled = () => {
|
|
28
|
+
return (_jsx(Box, { style: { width: '100%', maxWidth: 400 }, children: _jsxs(Card, { children: [_jsx(Card.Media, { variant: "disabled", children: _jsx("img", { src: "https://picsum.photos/400/200", alt: "", style: { width: '100%', display: 'block' } }) }), _jsx(Card.Header, { variant: "disabled", titre: "Titre lorem", sousTitre: "Sous-titre", image: _jsx(Avatar, { size: "md", fallbackText: "M" }), badge: _jsx(Badge, { variant: "disabled", size: "sm", children: "PR\u00C9SENT" }) }), _jsx(Card.Section, { variant: "disabled", titre: "Titre section", titreIcone: "Calendar", description: "Description" }), _jsx(Card.Section, { variant: "disabled", titre: "Titre section", titreIcone: "Calendar", description: "Description" }), _jsxs(Card.Actions, { children: [_jsx(Button, { variant: "secondary", title: "Libell\u00E9", size: "sm", disabled: true }), _jsx(Button, { variant: "primary", title: "Libell\u00E9", size: "sm", disabled: true })] })] }) }));
|
|
22
29
|
};
|
|
23
30
|
export const cardSection = () => {
|
|
24
31
|
return (_jsx(Card.Section, { titre: "Titre de la carte", description: "Description de la carte", titreIcone: "Image", descriptionIcone: "Image" }));
|
|
@@ -27,10 +34,10 @@ export const cardSectionDisabled = () => {
|
|
|
27
34
|
return (_jsx(Card.Section, { variant: "disabled", titre: "Titre de la carte", description: "Description de la carte", titreIcone: "Image", descriptionIcone: "Image" }));
|
|
28
35
|
};
|
|
29
36
|
export const cardHeader = () => {
|
|
30
|
-
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "100", children: [_jsx(Card.Header, { titre: "Titre
|
|
37
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: "100", children: [_jsx(Card.Header, { titre: "Titre lorem", sousTitre: "Sous-titre", image: _jsx(Avatar, { size: "md", fallbackText: "M" }), badge: _jsx(Badge, { variant: "success", size: "sm", children: "PR\u00C9SENT" }) }), _jsx(Card.Header, { titre: "Titre lorem", sousTitre: "Sous-titre", image: _jsx(LucideIcon, { name: "Image", size: "md" }) })] }));
|
|
31
38
|
};
|
|
32
39
|
export const cardHeaderDisabled = () => {
|
|
33
|
-
return (_jsx(Card.Header, { variant: "disabled", titre: "Titre
|
|
40
|
+
return (_jsx(Card.Header, { variant: "disabled", titre: "Titre lorem", sousTitre: "Sous-titre", image: _jsx(Avatar, { size: "md", fallbackText: "M" }), badge: _jsx(Badge, { variant: "disabled", size: "sm", children: "PR\u00C9SENT" }) }));
|
|
34
41
|
};
|
|
35
42
|
/** Privilégier l'utilisation de bouton en taille SM, avec le bouton primary toujours à droite. */
|
|
36
43
|
export const cardActions = () => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const card: () => string;
|
|
2
2
|
export declare const cardDisabled: () => string;
|
|
3
|
+
export declare const cardWithMedia: () => string;
|
|
4
|
+
export declare const cardWithMediaDisabled: () => string;
|
|
3
5
|
export declare const cardSection: () => string;
|
|
4
6
|
export declare const cardSectionDisabled: () => string;
|
|
5
7
|
export declare const cardHeader: () => string;
|
|
@@ -8,6 +10,8 @@ export declare const cardActions: () => string;
|
|
|
8
10
|
export declare const storySources: {
|
|
9
11
|
readonly card: () => string;
|
|
10
12
|
readonly cardDisabled: () => string;
|
|
13
|
+
readonly cardWithMedia: () => string;
|
|
14
|
+
readonly cardWithMediaDisabled: () => string;
|
|
11
15
|
readonly cardSection: () => string;
|
|
12
16
|
readonly cardSectionDisabled: () => string;
|
|
13
17
|
readonly cardHeader: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Card.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,cAA80B,CAAC;AAEh2B,eAAO,MAAM,YAAY,cAAm7B,CAAC;AAE78B,eAAO,MAAM,aAAa,cAAk/B,CAAC;AAE7gC,eAAO,MAAM,qBAAqB,cAA4mC,CAAC;AAE/oC,eAAO,MAAM,WAAW,cAA8O,CAAC;AAEvQ,eAAO,MAAM,mBAAmB,cAAkR,CAAC;AAEnT,eAAO,MAAM,UAAU,cAA2hB,CAAC;AAEnjB,eAAO,MAAM,kBAAkB,cAAqW,CAAC;AAErY,eAAO,MAAM,WAAW,cAAoP,CAAC;AAE7Q,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC;AAExD,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAEtE,CAAC"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
// This file is generated. Do not edit manually.
|
|
2
2
|
// Source: src/ui/Card/Card.stories.tsx
|
|
3
|
-
export const card = () => "export const card = () => {\n return (\n <
|
|
4
|
-
export const cardDisabled = () => "export const cardDisabled = () => {\n return (\n <
|
|
3
|
+
export const card = () => "export const card = () => {\n return (\n <Box style={{ width: '100%', maxWidth: 400 }}>\n <Card>\n <Card.Header\n titre=\"Titre lorem\"\n sousTitre=\"Sous-titre\"\n image={<Avatar size=\"md\" fallbackText=\"M\" />}\n badge={\n <Badge variant=\"success\" size=\"sm\">\n PRÉSENT\n </Badge>\n }\n />\n <Card.Section titre=\"Titre section\" titreIcone=\"Calendar\" description=\"Description\" />\n <Card.Section titre=\"Titre section\" titreIcone=\"Calendar\" description=\"Description\" />\n <Card.Actions>\n <Button variant=\"secondary\" title=\"Libellé\" size=\"sm\" />\n <Button variant=\"primary\" title=\"Libellé\" size=\"sm\" />\n </Card.Actions>\n </Card>\n </Box>\n );\n};";
|
|
4
|
+
export const cardDisabled = () => "export const cardDisabled = () => {\n return (\n <Box style={{ width: '100%', maxWidth: 400 }}>\n <Card>\n <Card.Header\n variant=\"disabled\"\n titre=\"Titre lorem\"\n sousTitre=\"Sous-titre\"\n image={<Avatar size=\"md\" fallbackText=\"M\" />}\n badge={\n <Badge variant=\"disabled\" size=\"sm\">\n PRÉSENT\n </Badge>\n }\n />\n <Card.Section variant=\"disabled\" titre=\"Titre section\" titreIcone=\"Calendar\" description=\"Description\" />\n <Card.Section variant=\"disabled\" titre=\"Titre section\" titreIcone=\"Calendar\" description=\"Description\" />\n <Card.Actions>\n <Button variant=\"secondary\" title=\"Libellé\" size=\"sm\" disabled />\n <Button variant=\"primary\" title=\"Libellé\" size=\"sm\" disabled />\n </Card.Actions>\n </Card>\n </Box>\n );\n};";
|
|
5
|
+
export const cardWithMedia = () => "export const cardWithMedia = () => {\n return (\n <Box style={{ width: '100%', maxWidth: 400 }}>\n <Card>\n <Card.Media>\n <img src=\"https://picsum.photos/400/200\" alt=\"\" style={{ width: '100%', display: 'block' }} />\n </Card.Media>\n <Card.Header\n titre=\"Titre lorem\"\n sousTitre=\"Sous-titre\"\n image={<Avatar size=\"md\" fallbackText=\"M\" />}\n badge={\n <Badge variant=\"success\" size=\"sm\">\n PRÉSENT\n </Badge>\n }\n />\n <Card.Section titre=\"Titre section\" titreIcone=\"Calendar\" description=\"Description\" />\n <Card.Section titre=\"Titre section\" titreIcone=\"Calendar\" description=\"Description\" />\n <Card.Actions>\n <Button variant=\"secondary\" title=\"Libellé\" size=\"sm\" />\n <Button variant=\"primary\" title=\"Libellé\" size=\"sm\" />\n </Card.Actions>\n </Card>\n </Box>\n );\n};";
|
|
6
|
+
export const cardWithMediaDisabled = () => "export const cardWithMediaDisabled = () => {\n return (\n <Box style={{ width: '100%', maxWidth: 400 }}>\n <Card>\n <Card.Media variant=\"disabled\">\n <img src=\"https://picsum.photos/400/200\" alt=\"\" style={{ width: '100%', display: 'block' }} />\n </Card.Media>\n <Card.Header\n variant=\"disabled\"\n titre=\"Titre lorem\"\n sousTitre=\"Sous-titre\"\n image={<Avatar size=\"md\" fallbackText=\"M\" />}\n badge={\n <Badge variant=\"disabled\" size=\"sm\">\n PRÉSENT\n </Badge>\n }\n />\n <Card.Section variant=\"disabled\" titre=\"Titre section\" titreIcone=\"Calendar\" description=\"Description\" />\n <Card.Section variant=\"disabled\" titre=\"Titre section\" titreIcone=\"Calendar\" description=\"Description\" />\n <Card.Actions>\n <Button variant=\"secondary\" title=\"Libellé\" size=\"sm\" disabled />\n <Button variant=\"primary\" title=\"Libellé\" size=\"sm\" disabled />\n </Card.Actions>\n </Card>\n </Box>\n );\n};";
|
|
5
7
|
export const cardSection = () => "export const cardSection = () => {\n return (\n <Card.Section\n titre=\"Titre de la carte\"\n description=\"Description de la carte\"\n titreIcone=\"Image\"\n descriptionIcone=\"Image\"\n />\n );\n};";
|
|
6
8
|
export const cardSectionDisabled = () => "export const cardSectionDisabled = () => {\n return (\n <Card.Section\n variant=\"disabled\"\n titre=\"Titre de la carte\"\n description=\"Description de la carte\"\n titreIcone=\"Image\"\n descriptionIcone=\"Image\"\n />\n );\n};";
|
|
7
|
-
export const cardHeader = () => "export const cardHeader = () => {\n return (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"100\">\n <Card.Header\n titre=\"Titre
|
|
8
|
-
export const cardHeaderDisabled = () => "export const cardHeaderDisabled = () => {\n return (\n <Card.Header\n variant=\"disabled\"\n titre=\"Titre
|
|
9
|
+
export const cardHeader = () => "export const cardHeader = () => {\n return (\n <Box display=\"flex\" flexDirection=\"column\" gap=\"100\">\n <Card.Header\n titre=\"Titre lorem\"\n sousTitre=\"Sous-titre\"\n image={<Avatar size=\"md\" fallbackText=\"M\" />}\n badge={\n <Badge variant=\"success\" size=\"sm\">\n PRÉSENT\n </Badge>\n }\n />\n\n <Card.Header titre=\"Titre lorem\" sousTitre=\"Sous-titre\" image={<LucideIcon name=\"Image\" size=\"md\" />} />\n </Box>\n );\n};";
|
|
10
|
+
export const cardHeaderDisabled = () => "export const cardHeaderDisabled = () => {\n return (\n <Card.Header\n variant=\"disabled\"\n titre=\"Titre lorem\"\n sousTitre=\"Sous-titre\"\n image={<Avatar size=\"md\" fallbackText=\"M\" />}\n badge={\n <Badge variant=\"disabled\" size=\"sm\">\n PRÉSENT\n </Badge>\n }\n />\n );\n};";
|
|
9
11
|
export const cardActions = () => "export const cardActions = () => {\n return (\n <Card.Actions>\n <Button variant=\"secondary\" title=\"Action\" size=\"sm\" />\n <Button variant=\"primary\" title=\"Action\" size=\"sm\" />\n </Card.Actions>\n );\n};";
|
|
10
12
|
export const storySources = {
|
|
11
13
|
card,
|
|
12
14
|
cardDisabled,
|
|
15
|
+
cardWithMedia,
|
|
16
|
+
cardWithMediaDisabled,
|
|
13
17
|
cardSection,
|
|
14
18
|
cardSectionDisabled,
|
|
15
19
|
cardHeader,
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export declare const useStyles: () => {
|
|
2
2
|
card: {
|
|
3
3
|
display: "flex";
|
|
4
|
+
flexDirection: "column";
|
|
4
5
|
width: "100%";
|
|
5
|
-
gap: string | number;
|
|
6
|
-
padding: string | number;
|
|
7
6
|
backgroundColor: string;
|
|
8
7
|
borderWidth: number;
|
|
9
8
|
borderColor: string;
|
|
10
9
|
borderStyle: "solid";
|
|
11
10
|
boxSizing: "border-box";
|
|
12
11
|
borderRadius: import("@alveole/theme").Radius;
|
|
12
|
+
overflow: "hidden";
|
|
13
|
+
};
|
|
14
|
+
content: {
|
|
15
|
+
display: "flex";
|
|
16
|
+
flexDirection: "column";
|
|
17
|
+
gap: string | number;
|
|
18
|
+
padding: string | number;
|
|
13
19
|
};
|
|
14
20
|
};
|
|
15
21
|
//# sourceMappingURL=Card.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Card.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC"}
|
|
@@ -2,14 +2,20 @@ import { makeStyles } from '@alveole/theme';
|
|
|
2
2
|
export const useStyles = makeStyles(({ spacing, color, radius }) => ({
|
|
3
3
|
card: {
|
|
4
4
|
display: 'flex',
|
|
5
|
+
flexDirection: 'column',
|
|
5
6
|
width: '100%',
|
|
6
|
-
gap: spacing('3V'),
|
|
7
|
-
padding: spacing('3V'),
|
|
8
7
|
backgroundColor: color.light.background['default-grey'],
|
|
9
8
|
borderWidth: 1,
|
|
10
9
|
borderColor: color.light.border['default-grey'],
|
|
11
10
|
borderStyle: 'solid',
|
|
12
11
|
boxSizing: 'border-box',
|
|
13
12
|
borderRadius: radius('md'),
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
},
|
|
15
|
+
content: {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
flexDirection: 'column',
|
|
18
|
+
gap: spacing('3V'),
|
|
19
|
+
padding: spacing('3V'),
|
|
14
20
|
},
|
|
15
21
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardHeader.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAO,QAAQ,EAAc,MAAM,YAAY,CAAC;AAGvD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG;IACvC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"CardHeader.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAO,QAAQ,EAAc,MAAM,YAAY,CAAC;AAGvD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG;IACvC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,sBAqBhD,CAAC"}
|
|
@@ -5,5 +5,5 @@ export const CardHeader = (props) => {
|
|
|
5
5
|
const { variant = 'default', titre, sousTitre, image, badge, style, children, ...boxProps } = props;
|
|
6
6
|
const styles = useStyles();
|
|
7
7
|
const disabledTextStyle = variant === 'disabled' ? styles.disabledText : {};
|
|
8
|
-
return (_jsxs(Box, { tag: "card-header", style: [styles.cardHeader, disabledTextStyle, style], ...boxProps, children: [image, _jsxs(Box, { tag: "card-header-texte", style: styles.texte, children: [_jsx(Typography, { style: [styles.titre, disabledTextStyle], children: titre }), sousTitre && _jsx(Typography, { style: [styles.sousTitre, disabledTextStyle], children: sousTitre })] }), badge] }));
|
|
8
|
+
return (_jsxs(Box, { tag: "card-header", style: [styles.cardHeader, disabledTextStyle, style], ...boxProps, children: [image, _jsxs(Box, { tag: "card-header-texte", style: styles.texte, children: [_jsx(Typography, { style: [styles.titre, disabledTextStyle], children: titre }), sousTitre && _jsx(Typography, { style: [styles.sousTitre, disabledTextStyle], children: sousTitre })] }), badge && (_jsx(Box, { tag: "card-trailing", style: styles.trailing, children: badge }))] }));
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardHeader.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"CardHeader.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardHeader.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxProps } from '../../core';
|
|
2
|
+
export type CardMediaVariant = 'default' | 'disabled';
|
|
3
|
+
export type CardMediaProps = BoxProps & {
|
|
4
|
+
variant?: CardMediaVariant;
|
|
5
|
+
};
|
|
6
|
+
export declare const CardMedia: (props: CardMediaProps) => import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=CardMedia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardMedia.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG;IACtC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,gCAc9C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../../core';
|
|
3
|
+
import { useStyles } from './CardMedia.styles';
|
|
4
|
+
export const CardMedia = (props) => {
|
|
5
|
+
const { variant = 'default', style, children, ...boxProps } = props;
|
|
6
|
+
const styles = useStyles();
|
|
7
|
+
return (_jsx(Box, { tag: "card-media", style: [styles.cardMedia, variant === 'disabled' ? styles.disabled : {}, style], ...boxProps, children: children }));
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardMedia.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/CardMedia.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;CAOnB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SheetProps as TamaguiSheetProps } from 'tamagui';
|
|
3
|
+
export type SheetProps = React.PropsWithChildren<{
|
|
4
|
+
open: TamaguiSheetProps['open'];
|
|
5
|
+
title: string;
|
|
6
|
+
points: TamaguiSheetProps['snapPoints'];
|
|
7
|
+
action?: React.ReactNode | undefined;
|
|
8
|
+
setOpen: (value: boolean) => void;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const Sheet: (props: SheetProps) => React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=Sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/ui/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAyB,UAAU,IAAI,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAOjF,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC/C,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACxC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,CAAC,CAAC;AAEH,eAAO,MAAM,KAAK,GAAI,OAAO,UAAU,sBAqDtC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
import { Sheet as TamaguiSheet } from 'tamagui';
|
|
5
|
+
import { ButtonIcon } from '../Button';
|
|
6
|
+
import { Divider } from '../Divider';
|
|
7
|
+
import { useStyles } from './Sheet.styles';
|
|
8
|
+
import { Box } from '../../core/Box';
|
|
9
|
+
import { Typography } from '../../core/Typography';
|
|
10
|
+
export const Sheet = (props) => {
|
|
11
|
+
const { children, open, title, points, action, setOpen } = props;
|
|
12
|
+
const [position, setPosition] = React.useState(0);
|
|
13
|
+
const styles = useStyles();
|
|
14
|
+
const { bottom } = useSafeAreaInsets();
|
|
15
|
+
return (_jsx(Box, { tag: "sheet", style: styles.container, children: _jsxs(TamaguiSheet, { modal: true, forceRemoveScrollEnabled: open, open: open, onOpenChange: setOpen, snapPoints: points, snapPointsMode: 'percent', dismissOnSnapToBottom: true, position: position, onPositionChange: setPosition, zIndex: 100000, animation: "medium", children: [_jsx(TamaguiSheet.Overlay, { style: styles.overlay }), _jsxs(TamaguiSheet.Frame, { style: styles.frame, children: [_jsx(TamaguiSheet.Handle, { style: styles.handle }), _jsxs(Box, { tag: "sheet-header", style: styles.header, children: [_jsx(Box, { children: _jsx(ButtonIcon, { icon: "X", variant: "tertiary", size: "lg", onPress: () => setOpen(false) }) }), _jsx(Box, { flex: 1, children: _jsx(Typography, { style: styles.title, children: title }) }), action && (_jsx(Box, { mt: 'auto', mb: 'auto', children: action }))] }), _jsx(Divider, { ml: '2W', mr: '2W' }), _jsx(Box, { tag: "sheet-content", style: styles.content, pb: bottom, children: children })] })] }) }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: "ui"[];
|
|
4
|
+
experimental: true;
|
|
5
|
+
description: string;
|
|
6
|
+
component: (props: import("./Sheet").SheetProps) => import("react").JSX.Element;
|
|
7
|
+
styleFn: () => {
|
|
8
|
+
container: {};
|
|
9
|
+
content: {
|
|
10
|
+
height: "100%";
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
marginTop: string | number;
|
|
13
|
+
};
|
|
14
|
+
header: {
|
|
15
|
+
paddingLeft: string | number;
|
|
16
|
+
paddingRight: string | number;
|
|
17
|
+
display: "flex";
|
|
18
|
+
flexDirection: "row";
|
|
19
|
+
};
|
|
20
|
+
handle: {
|
|
21
|
+
width: "90%";
|
|
22
|
+
margin: string;
|
|
23
|
+
height: number;
|
|
24
|
+
backgroundColor: "#FFFFFF";
|
|
25
|
+
};
|
|
26
|
+
frame: {
|
|
27
|
+
backgroundColor: "#FFFFFF";
|
|
28
|
+
marginBottom: string | number;
|
|
29
|
+
};
|
|
30
|
+
overlay: {
|
|
31
|
+
backgroundColor: string;
|
|
32
|
+
};
|
|
33
|
+
title: {
|
|
34
|
+
color: string;
|
|
35
|
+
marginTop: string;
|
|
36
|
+
marginBottom: string;
|
|
37
|
+
fontSize: 18;
|
|
38
|
+
lineHeight: 28;
|
|
39
|
+
letterSpacing: 0;
|
|
40
|
+
fontFamily: string;
|
|
41
|
+
fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default _default;
|
|
46
|
+
export declare const Default: () => import("react").JSX.Element;
|
|
47
|
+
export declare const WithAction: () => import("react").JSX.Element;
|
|
48
|
+
export * as Sources from './Sheet.stories.sources';
|
|
49
|
+
//# sourceMappingURL=Sheet.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sheet.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Sheet/Sheet.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,wBAOkB;AAElB,eAAO,MAAM,OAAO,mCAcnB,CAAC;AAEF,eAAO,MAAM,UAAU,mCAoBtB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Button, Typography } from '@alveole/components';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Sheet } from './Sheet';
|
|
5
|
+
import { useStyles } from './Sheet.styles';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Sheet',
|
|
8
|
+
tags: ['ui'],
|
|
9
|
+
experimental: true,
|
|
10
|
+
description: 'Bottom sheet modal',
|
|
11
|
+
component: Sheet,
|
|
12
|
+
styleFn: useStyles,
|
|
13
|
+
};
|
|
14
|
+
export const Default = () => {
|
|
15
|
+
const [open, setOpen] = useState(false);
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, { display: "flex", flexDirection: "row", children: _jsx(Button, { title: "Ouvrir la modal", variant: "primary", onPress: () => setOpen(true) }) }), _jsx(Sheet, { open: open, setOpen: setOpen, points: [80, 25], title: "Titre", children: _jsx(Typography, { children: "Children" }) })] }));
|
|
17
|
+
};
|
|
18
|
+
export const WithAction = () => {
|
|
19
|
+
const [open, setOpen] = useState(false);
|
|
20
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, { display: "flex", flexDirection: "row", children: _jsx(Button, { title: "Ouvrir la modal", variant: "primary", onPress: () => setOpen(true) }) }), _jsx(Sheet, { open: open, setOpen: setOpen, points: [50], title: "Titre", action: _jsx(Button, { title: "Action", variant: "tertiary", size: "sm" }), children: _jsx(Typography, { children: "Children" }) })] }));
|
|
21
|
+
};
|
|
22
|
+
export * as Sources from './Sheet.stories.sources';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const Default: () => string;
|
|
2
|
+
export declare const WithAction: () => string;
|
|
3
|
+
export declare const storySources: {
|
|
4
|
+
readonly Default: () => string;
|
|
5
|
+
readonly WithAction: () => string;
|
|
6
|
+
};
|
|
7
|
+
export type StorySourceName = keyof typeof storySources;
|
|
8
|
+
//# sourceMappingURL=Sheet.stories.sources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sheet.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/Sheet/Sheet.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,cAA4a,CAAC;AAEjc,eAAO,MAAM,UAAU,cAAsiB,CAAC;AAE9jB,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file is generated. Do not edit manually.
|
|
2
|
+
// Source: src/ui/Sheet/Sheet.stories.tsx
|
|
3
|
+
export const Default = () => "export const Default = () => {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <Box display=\"flex\" flexDirection=\"row\">\n <Button title=\"Ouvrir la modal\" variant=\"primary\" onPress={() => setOpen(true)} />\n </Box>\n\n <Sheet open={open} setOpen={setOpen} points={[80, 25]} title=\"Titre\">\n <Typography>Children</Typography>\n </Sheet>\n </>\n );\n};";
|
|
4
|
+
export const WithAction = () => "export const WithAction = () => {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <Box display=\"flex\" flexDirection=\"row\">\n <Button title=\"Ouvrir la modal\" variant=\"primary\" onPress={() => setOpen(true)} />\n </Box>\n\n <Sheet\n open={open}\n setOpen={setOpen}\n points={[50]}\n title=\"Titre\"\n action={<Button title=\"Action\" variant=\"tertiary\" size=\"sm\" />}\n >\n <Typography>Children</Typography>\n </Sheet>\n </>\n );\n};";
|
|
5
|
+
export const storySources = {
|
|
6
|
+
Default,
|
|
7
|
+
WithAction,
|
|
8
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const useStyles: () => {
|
|
2
|
+
container: {};
|
|
3
|
+
content: {
|
|
4
|
+
height: "100%";
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
marginTop: string | number;
|
|
7
|
+
};
|
|
8
|
+
header: {
|
|
9
|
+
paddingLeft: string | number;
|
|
10
|
+
paddingRight: string | number;
|
|
11
|
+
display: "flex";
|
|
12
|
+
flexDirection: "row";
|
|
13
|
+
};
|
|
14
|
+
handle: {
|
|
15
|
+
width: "90%";
|
|
16
|
+
margin: string;
|
|
17
|
+
height: number;
|
|
18
|
+
backgroundColor: "#FFFFFF";
|
|
19
|
+
};
|
|
20
|
+
frame: {
|
|
21
|
+
backgroundColor: "#FFFFFF";
|
|
22
|
+
marginBottom: string | number;
|
|
23
|
+
};
|
|
24
|
+
overlay: {
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
};
|
|
27
|
+
title: {
|
|
28
|
+
color: string;
|
|
29
|
+
marginTop: string;
|
|
30
|
+
marginBottom: string;
|
|
31
|
+
fontSize: 18;
|
|
32
|
+
lineHeight: 28;
|
|
33
|
+
letterSpacing: 0;
|
|
34
|
+
fontFamily: string;
|
|
35
|
+
fontWeight?: import("react-native").TextStyle["fontWeight"];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=Sheet.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sheet.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Sheet/Sheet.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;gBAgBO,MAAM;;;;;;;;;;;;;;;;;;;;CAgBhC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { makeStyles } from '@alveole/theme';
|
|
2
|
+
export const useStyles = makeStyles(({ spacing, text, color }) => ({
|
|
3
|
+
container: {},
|
|
4
|
+
content: {
|
|
5
|
+
height: '100%',
|
|
6
|
+
backgroundColor: color.light.background['alt-grey'],
|
|
7
|
+
marginTop: spacing('2W'),
|
|
8
|
+
},
|
|
9
|
+
header: {
|
|
10
|
+
paddingLeft: spacing('2W'),
|
|
11
|
+
paddingRight: spacing('2W'),
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'row',
|
|
14
|
+
},
|
|
15
|
+
handle: {
|
|
16
|
+
width: '90%',
|
|
17
|
+
margin: 'auto',
|
|
18
|
+
height: spacing('2W'),
|
|
19
|
+
backgroundColor: '#FFFFFF',
|
|
20
|
+
},
|
|
21
|
+
frame: {
|
|
22
|
+
backgroundColor: '#FFFFFF',
|
|
23
|
+
marginBottom: spacing('3W'),
|
|
24
|
+
},
|
|
25
|
+
overlay: {
|
|
26
|
+
backgroundColor: color.alpha(color.background.inverse, 0.5),
|
|
27
|
+
},
|
|
28
|
+
title: {
|
|
29
|
+
...text['Corps de texte'].LG.SemiBold,
|
|
30
|
+
color: color.light.text['title-grey'],
|
|
31
|
+
marginTop: 'auto',
|
|
32
|
+
marginBottom: 'auto',
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Sheet/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Sheet';
|