@alveole/components 1.6.3 → 1.6.5
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/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/ui/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/ui/BottomSheet/BottomSheet.js +1 -1
- package/dist/ui/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/ui/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBar.stories.d.ts +4 -0
- package/dist/ui/ProgressBar/ProgressBar.stories.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBar.stories.js +1 -0
- package/dist/ui/ProgressBar/ProgressBar.stories.sources.d.ts +2 -0
- package/dist/ui/ProgressBar/ProgressBar.stories.sources.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBar.stories.sources.js +2 -0
- package/dist/ui/ProgressBar/ProgressBar.styles.d.ts +3 -0
- package/dist/ui/ProgressBar/ProgressBar.styles.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBar.styles.js +3 -0
- package/dist/ui/ProgressBar/ProgressBarDeterminate.d.ts +1 -0
- package/dist/ui/ProgressBar/ProgressBarDeterminate.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBarDeterminate.js +3 -2
- package/dist/ui/ProgressBar/ProgressBarIndeterminate.d.ts +3 -1
- package/dist/ui/ProgressBar/ProgressBarIndeterminate.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBarIndeterminate.js +4 -2
- package/dist/ui/ProgressBar/ProgressBarLoop.d.ts +3 -1
- package/dist/ui/ProgressBar/ProgressBarLoop.d.ts.map +1 -1
- package/dist/ui/ProgressBar/ProgressBarLoop.js +3 -2
- package/dist/ui/Toast/Toast.stories.d.ts +34 -0
- package/dist/ui/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/ui/Toast/Toast.styles.d.ts +34 -0
- package/dist/ui/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/ui/Toast/Toast.styles.js +5 -2
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ALVEOLE_COMPONENTS_VERSION: "1.6.
|
|
1
|
+
export declare const ALVEOLE_COMPONENTS_VERSION: "1.6.5";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ALVEOLE_COMPONENTS_VERSION = "1.6.
|
|
1
|
+
export const ALVEOLE_COMPONENTS_VERSION = "1.6.5";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/ui/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAyB,UAAU,IAAI,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAOjF,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CACpD;IACE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,GAAG,CAAC,wBAAwB,GAAG,qBAAqB,CAAC,CACvD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/ui/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAyB,UAAU,IAAI,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAOjF,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CACpD;IACE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACrC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,GAAG,CAAC,wBAAwB,GAAG,qBAAqB,CAAC,CACvD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,sBAwDlD,CAAC"}
|
|
@@ -13,5 +13,5 @@ export const BottomSheet = (props) => {
|
|
|
13
13
|
const styles = useStyles();
|
|
14
14
|
const { bottom } = useSafeAreaInsets();
|
|
15
15
|
const snapPointsMode = fitContent ? 'fit' : 'percent';
|
|
16
|
-
return (_jsx(Box, { tag: "sheet", style: styles.container, children: _jsxs(TamaguiSheet, { modal: true, forceRemoveScrollEnabled: open, open: open, onOpenChange: setOpen, snapPoints: fitContent ? undefined : points, snapPointsMode: snapPointsMode, 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: "md", 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(
|
|
16
|
+
return (_jsx(Box, { tag: "sheet", style: styles.container, children: _jsxs(TamaguiSheet, { modal: true, forceRemoveScrollEnabled: open, open: open, onOpenChange: setOpen, snapPoints: fitContent ? undefined : points, snapPointsMode: snapPointsMode, 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: "md", 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(Box, { pl: '2W', pr: '2W', children: _jsx(Divider, {}) }), _jsx(Box, { tag: "sheet-content", style: [styles.content, !fitContent && styles.contentFull], pb: bottom, children: children })] })] }) }));
|
|
17
17
|
};
|
|
@@ -6,6 +6,7 @@ export type ProgressBarProps = BoxProps & {
|
|
|
6
6
|
indicator?: boolean;
|
|
7
7
|
indicatorPrecision?: 0 | 1 | 2 | 3;
|
|
8
8
|
mode?: ProgressBarMode;
|
|
9
|
+
noRadius?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const ProgressBar: (props: ProgressBarProps) => import("react").JSX.Element | null;
|
|
11
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,KAAK,eAAe,GAAG,aAAa,GAAG,eAAe,GAAG,MAAM,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,KAAK,eAAe,GAAG,aAAa,GAAG,eAAe,GAAG,MAAM,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,uCAclD,CAAC"}
|
|
@@ -56,6 +56,9 @@ declare const _default: {
|
|
|
56
56
|
borderRadius: import("@alveole/theme").Radius;
|
|
57
57
|
backgroundColor: string;
|
|
58
58
|
};
|
|
59
|
+
noRadius: {
|
|
60
|
+
borderRadius: number;
|
|
61
|
+
};
|
|
59
62
|
indicator: {
|
|
60
63
|
color: string;
|
|
61
64
|
marginTop: string | number;
|
|
@@ -74,6 +77,7 @@ export declare const Determinate: () => React.JSX.Element;
|
|
|
74
77
|
export declare const Loop: () => React.JSX.Element;
|
|
75
78
|
export declare const Indeterminate: () => React.JSX.Element;
|
|
76
79
|
export declare const WithIndicator: () => React.JSX.Element;
|
|
80
|
+
export declare const NoRadius: () => React.JSX.Element;
|
|
77
81
|
export declare const Usage: () => React.JSX.Element;
|
|
78
82
|
export * as Sources from './ProgressBar.stories.sources';
|
|
79
83
|
//# sourceMappingURL=ProgressBar.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"ProgressBar.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK1B,wBAOkB;AAElB,eAAO,MAAM,WAAW,yBAAwD,CAAC;AAEjF,eAAO,MAAM,IAAI,yBAAoC,CAAC;AAEtD,eAAO,MAAM,aAAa,yBAA6C,CAAC;AAExE,eAAO,MAAM,aAAa,yBAAkE,CAAC;AAE7F,eAAO,MAAM,QAAQ,yBAAiE,CAAC;AAEvF,eAAO,MAAM,KAAK,yBAmBjB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC"}
|
|
@@ -15,6 +15,7 @@ export const Determinate = () => _jsx(ProgressBar, { mode: "determinate", value:
|
|
|
15
15
|
export const Loop = () => _jsx(ProgressBar, { mode: "loop" });
|
|
16
16
|
export const Indeterminate = () => _jsx(ProgressBar, { mode: "indeterminate" });
|
|
17
17
|
export const WithIndicator = () => _jsx(ProgressBar, { mode: "determinate", indicator: true, value: 0.25 });
|
|
18
|
+
export const NoRadius = () => _jsx(ProgressBar, { mode: "determinate", noRadius: true, value: 0.25 });
|
|
18
19
|
export const Usage = () => {
|
|
19
20
|
const [value, setValue] = React.useState(0.25);
|
|
20
21
|
return (_jsxs(Box, { children: [_jsx(ProgressBar, { value: value }), _jsx(Box, { mt: '2W', width: 150, children: _jsx(Button, { title: value < 1 ? 'Augmenter' : 'Réduire', variant: "secondary", onPress: () => {
|
|
@@ -2,12 +2,14 @@ export declare const Determinate: () => string;
|
|
|
2
2
|
export declare const Loop: () => string;
|
|
3
3
|
export declare const Indeterminate: () => string;
|
|
4
4
|
export declare const WithIndicator: () => string;
|
|
5
|
+
export declare const NoRadius: () => string;
|
|
5
6
|
export declare const Usage: () => string;
|
|
6
7
|
export declare const storySources: {
|
|
7
8
|
readonly Determinate: () => string;
|
|
8
9
|
readonly Loop: () => string;
|
|
9
10
|
readonly Indeterminate: () => string;
|
|
10
11
|
readonly WithIndicator: () => string;
|
|
12
|
+
readonly NoRadius: () => string;
|
|
11
13
|
readonly Usage: () => string;
|
|
12
14
|
};
|
|
13
15
|
export type StorySourceName = keyof typeof storySources;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,cAA8F,CAAC;AAEvH,eAAO,MAAM,IAAI,cAAmE,CAAC;AAErF,eAAO,MAAM,aAAa,cAAqF,CAAC;AAEhH,eAAO,MAAM,aAAa,cAA0G,CAAC;AAErI,eAAO,MAAM,KAAK,cAAge,CAAC;AAEnf,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"ProgressBar.stories.sources.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.stories.sources.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,cAA8F,CAAC;AAEvH,eAAO,MAAM,IAAI,cAAmE,CAAC;AAErF,eAAO,MAAM,aAAa,cAAqF,CAAC;AAEhH,eAAO,MAAM,aAAa,cAA0G,CAAC;AAErI,eAAO,MAAM,QAAQ,cAAoG,CAAC;AAE1H,eAAO,MAAM,KAAK,cAAge,CAAC;AAEnf,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,YAAY,CAAC"}
|
|
@@ -4,11 +4,13 @@ export const Determinate = () => "export const Determinate = () => <ProgressBar
|
|
|
4
4
|
export const Loop = () => "export const Loop = () => <ProgressBar mode=\"loop\" />;";
|
|
5
5
|
export const Indeterminate = () => "export const Indeterminate = () => <ProgressBar mode=\"indeterminate\" />;";
|
|
6
6
|
export const WithIndicator = () => "export const WithIndicator = () => <ProgressBar mode=\"determinate\" indicator value={0.25} />;";
|
|
7
|
+
export const NoRadius = () => "export const NoRadius = () => <ProgressBar mode=\"determinate\" noRadius value={0.25} />;";
|
|
7
8
|
export const Usage = () => "export const Usage = () => {\n const [value, setValue] = React.useState(0.25);\n\n return (\n <Box>\n <ProgressBar value={value} />\n\n <Box mt={'2W'} width={150}>\n <Button\n title={value < 1 ? 'Augmenter' : 'Réduire'}\n variant=\"secondary\"\n onPress={() => {\n if (value < 1) setValue(v => v + 0.25);\n else setValue(v => v - 0.25);\n }}\n />\n </Box>\n </Box>\n );\n};";
|
|
8
9
|
export const storySources = {
|
|
9
10
|
Determinate,
|
|
10
11
|
Loop,
|
|
11
12
|
Indeterminate,
|
|
12
13
|
WithIndicator,
|
|
14
|
+
NoRadius,
|
|
13
15
|
Usage,
|
|
14
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"ProgressBar.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DnB,CAAC"}
|
|
@@ -50,6 +50,9 @@ export const useStyles = makeStyles(({ text, color, spacing, radius }) => ({
|
|
|
50
50
|
borderRadius: radius('sm'),
|
|
51
51
|
backgroundColor: color.light.border['default-grey'],
|
|
52
52
|
},
|
|
53
|
+
noRadius: {
|
|
54
|
+
borderRadius: 0,
|
|
55
|
+
},
|
|
53
56
|
indicator: {
|
|
54
57
|
...text['Corps de texte'].XS.Regular,
|
|
55
58
|
color: color.light.artwork['major-primary'],
|
|
@@ -4,6 +4,7 @@ export type ProgressBarDeterminateProps = BoxProps & {
|
|
|
4
4
|
indicator?: boolean;
|
|
5
5
|
indicatorPrecision?: 0 | 1 | 2 | 3;
|
|
6
6
|
clamped: number;
|
|
7
|
+
noRadius?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare const ProgressBarDeterminate: (props: ProgressBarDeterminateProps) => React.JSX.Element;
|
|
9
10
|
//# sourceMappingURL=ProgressBarDeterminate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBarDeterminate.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBarDeterminate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAK3C,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressBarDeterminate.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBarDeterminate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAK3C,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,2BAA2B,sBA4CxE,CAAC"}
|
|
@@ -6,8 +6,9 @@ import { Typography } from '../../core/Typography';
|
|
|
6
6
|
import { PROGRESS_BAR_GAP, PROGRESS_BAR_HEIGHT, PROGRESS_DETERMINATE_DURATION } from './ProgressBar.constants';
|
|
7
7
|
import { useStyles } from './ProgressBar.styles';
|
|
8
8
|
export const ProgressBarDeterminate = (props) => {
|
|
9
|
-
const { clamped, indicator, indicatorPrecision = 3, style, onLayout, ...boxProps } = props;
|
|
9
|
+
const { clamped, indicator, indicatorPrecision = 3, noRadius, style, onLayout, ...boxProps } = props;
|
|
10
10
|
const styles = useStyles();
|
|
11
|
+
const radiusStyle = noRadius ? styles.noRadius : undefined;
|
|
11
12
|
const [animatedProgress] = React.useState(() => new Animated.Value(clamped));
|
|
12
13
|
const remaining = React.useMemo(() => Animated.subtract(1, animatedProgress), [animatedProgress]);
|
|
13
14
|
const animatedGap = React.useMemo(() => animatedProgress.interpolate({
|
|
@@ -25,5 +26,5 @@ export const ProgressBarDeterminate = (props) => {
|
|
|
25
26
|
anim.start();
|
|
26
27
|
return () => anim.stop();
|
|
27
28
|
}, [animatedProgress, clamped]);
|
|
28
|
-
return (_jsxs(Box, { children: [_jsxs(Box, { style: [styles.determinate, { height: PROGRESS_BAR_HEIGHT }, style], ...boxProps, children: [_jsx(Animated.View, { style: [styles.progressed, { flex: animatedProgress }] }), _jsx(Animated.View, { style: { width: animatedGap } }), _jsx(Animated.View, { style: [styles.remaining, { flex: remaining }] })] }), indicator && (_jsx(Box, { children: _jsxs(Typography, { style: styles.indicator, children: [(clamped * 100).toFixed(indicatorPrecision), "%"] }) }))] }));
|
|
29
|
+
return (_jsxs(Box, { children: [_jsxs(Box, { style: [styles.determinate, { height: PROGRESS_BAR_HEIGHT }, style], ...boxProps, children: [_jsx(Animated.View, { style: [styles.progressed, radiusStyle, { flex: animatedProgress }] }), _jsx(Animated.View, { style: { width: animatedGap } }), _jsx(Animated.View, { style: [styles.remaining, radiusStyle, { flex: remaining }] })] }), indicator && (_jsx(Box, { children: _jsxs(Typography, { style: styles.indicator, children: [(clamped * 100).toFixed(indicatorPrecision), "%"] }) }))] }));
|
|
29
30
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps } from '../../core';
|
|
3
|
-
export type ProgressBarIndeterminateProps = BoxProps
|
|
3
|
+
export type ProgressBarIndeterminateProps = BoxProps & {
|
|
4
|
+
noRadius?: boolean;
|
|
5
|
+
};
|
|
4
6
|
export declare const ProgressBarIndeterminate: (props: ProgressBarIndeterminateProps) => React.JSX.Element;
|
|
5
7
|
//# sourceMappingURL=ProgressBarIndeterminate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBarIndeterminate.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBarIndeterminate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressBarIndeterminate.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBarIndeterminate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,MAAM,MAAM,6BAA6B,GAAG,QAAQ,GAAG;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,OAAO,6BAA6B,sBA+D5E,CAAC"}
|
|
@@ -5,9 +5,10 @@ import { Box } from '../../core';
|
|
|
5
5
|
import { PROGRESS_BAR_HEIGHT, PROGRESS_DURATION } from './ProgressBar.constants';
|
|
6
6
|
import { useStyles } from './ProgressBar.styles';
|
|
7
7
|
export const ProgressBarIndeterminate = (props) => {
|
|
8
|
-
const { style, ...boxProps } = props;
|
|
8
|
+
const { noRadius, style, ...boxProps } = props;
|
|
9
9
|
const [progress] = React.useState(() => new Animated.Value(0));
|
|
10
10
|
const styles = useStyles();
|
|
11
|
+
const radiusStyle = noRadius ? styles.noRadius : undefined;
|
|
11
12
|
const translateRange = React.useMemo(() => progress.interpolate({
|
|
12
13
|
inputRange: [0, 1],
|
|
13
14
|
outputRange: ['-50%', '150%'],
|
|
@@ -34,10 +35,11 @@ export const ProgressBarIndeterminate = (props) => {
|
|
|
34
35
|
run();
|
|
35
36
|
return () => anim?.stop();
|
|
36
37
|
}, [progress]);
|
|
37
|
-
return (_jsx(Box, { style: [styles.progress, { height: PROGRESS_BAR_HEIGHT, marginTop: -PROGRESS_BAR_HEIGHT }, style], ...boxProps, children: _jsx(Animated.View, { style: [
|
|
38
|
+
return (_jsx(Box, { style: [styles.progress, radiusStyle, { height: PROGRESS_BAR_HEIGHT, marginTop: -PROGRESS_BAR_HEIGHT }, style], ...boxProps, children: _jsx(Animated.View, { style: [
|
|
38
39
|
{
|
|
39
40
|
transform: [{ translateX: translateRange }, { scaleX: scaleRange }],
|
|
40
41
|
},
|
|
41
42
|
styles.bar,
|
|
43
|
+
radiusStyle,
|
|
42
44
|
] }) }));
|
|
43
45
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps } from '../../core';
|
|
3
|
-
export type ProgressBarLoopProps = BoxProps
|
|
3
|
+
export type ProgressBarLoopProps = BoxProps & {
|
|
4
|
+
noRadius?: boolean;
|
|
5
|
+
};
|
|
4
6
|
export declare const ProgressBarLoop: (props: ProgressBarLoopProps) => React.JSX.Element;
|
|
5
7
|
//# sourceMappingURL=ProgressBarLoop.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBarLoop.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBarLoop.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressBarLoop.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBarLoop.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,sBA4D1D,CAAC"}
|
|
@@ -5,9 +5,10 @@ import { Box } from '../../core';
|
|
|
5
5
|
import { PROGRESS_BAR_GAP, PROGRESS_BAR_HEIGHT, PROGRESS_DURATION } from './ProgressBar.constants';
|
|
6
6
|
import { useStyles } from './ProgressBar.styles';
|
|
7
7
|
export const ProgressBarLoop = (props) => {
|
|
8
|
-
const { style, onLayout, ...boxProps } = props;
|
|
8
|
+
const { noRadius, style, onLayout, ...boxProps } = props;
|
|
9
9
|
const [progress] = React.useState(() => new Animated.Value(0));
|
|
10
10
|
const styles = useStyles();
|
|
11
|
+
const radiusStyle = noRadius ? styles.noRadius : undefined;
|
|
11
12
|
const [width, setWidth] = React.useState(0);
|
|
12
13
|
const loopProgressWidth = React.useMemo(() => Math.max(width - PROGRESS_BAR_GAP, 0), [width]);
|
|
13
14
|
const loopFillWidth = React.useMemo(() => progress.interpolate({
|
|
@@ -33,5 +34,5 @@ export const ProgressBarLoop = (props) => {
|
|
|
33
34
|
setWidth(event.nativeEvent.layout.width);
|
|
34
35
|
onLayout?.(event);
|
|
35
36
|
}, [onLayout]);
|
|
36
|
-
return (_jsxs(Box, { style: [styles.progressTrack, { height: PROGRESS_BAR_HEIGHT }, style], onLayout: handleLayout, ...boxProps, children: [_jsx(Animated.View, { style: [styles.progressedAbsolute, { width: loopFillWidth }] }), _jsx(Animated.View, { style: [styles.remainingAbsolute, { left: loopRemainingLeft }] })] }));
|
|
37
|
+
return (_jsxs(Box, { style: [styles.progressTrack, { height: PROGRESS_BAR_HEIGHT }, style], onLayout: handleLayout, ...boxProps, children: [_jsx(Animated.View, { style: [styles.progressedAbsolute, radiusStyle, { width: loopFillWidth }] }), _jsx(Animated.View, { style: [styles.remainingAbsolute, radiusStyle, { left: loopRemainingLeft }] })] }));
|
|
37
38
|
};
|
|
@@ -9,6 +9,30 @@ declare const _default: {
|
|
|
9
9
|
component: typeof Toast;
|
|
10
10
|
styleFn: () => {
|
|
11
11
|
tamaguiToastContainer: {
|
|
12
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
13
|
+
padding: number;
|
|
14
|
+
width: number;
|
|
15
|
+
backgroundColor: "transparent";
|
|
16
|
+
} | {
|
|
17
|
+
shadowColor: import("@alveole/theme").Color;
|
|
18
|
+
shadowOffset: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
shadowOpacity: number;
|
|
23
|
+
shadowRadius: number;
|
|
24
|
+
elevation: number;
|
|
25
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
26
|
+
padding: number;
|
|
27
|
+
width: number;
|
|
28
|
+
backgroundColor: "transparent";
|
|
29
|
+
} | {
|
|
30
|
+
boxShadow: string;
|
|
31
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
32
|
+
padding: number;
|
|
33
|
+
width: number;
|
|
34
|
+
backgroundColor: "transparent";
|
|
35
|
+
} | {
|
|
12
36
|
padding: number;
|
|
13
37
|
width: number;
|
|
14
38
|
backgroundColor: "transparent";
|
|
@@ -53,6 +77,16 @@ declare const _default: {
|
|
|
53
77
|
width: "100%";
|
|
54
78
|
maxWidth: number;
|
|
55
79
|
padding: number;
|
|
80
|
+
} | {
|
|
81
|
+
backgroundColor: string;
|
|
82
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
83
|
+
display: "flex";
|
|
84
|
+
flexDirection: "row";
|
|
85
|
+
gap: string | number;
|
|
86
|
+
overflow: "hidden";
|
|
87
|
+
width: "100%";
|
|
88
|
+
maxWidth: number;
|
|
89
|
+
padding: number;
|
|
56
90
|
};
|
|
57
91
|
contenu: {
|
|
58
92
|
display: "flex";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"Toast.stories.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM3C,wBASkB;AAElB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,GAAG,mCA+Bf,CAAC;AAEF,eAAO,MAAM,WAAW,mCAEvB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAE1B,CAAC;AAEF,eAAO,MAAM,YAAY,mCAExB,CAAC;AAEF,eAAO,MAAM,cAAc,mCAE1B,CAAC;AAEF,eAAO,MAAM,cAAc,mCAE1B,CAAC;AAEF,eAAO,MAAM,0BAA0B,mCAA2E,CAAC;AAEnH,eAAO,MAAM,6BAA6B,mCAEzC,CAAC;AAEF,eAAO,MAAM,WAAW,mCAOvB,CAAC;AAEF,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
export declare const useStyles: () => {
|
|
2
2
|
tamaguiToastContainer: {
|
|
3
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
4
|
+
padding: number;
|
|
5
|
+
width: number;
|
|
6
|
+
backgroundColor: "transparent";
|
|
7
|
+
} | {
|
|
8
|
+
shadowColor: import("@alveole/theme").Color;
|
|
9
|
+
shadowOffset: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
shadowOpacity: number;
|
|
14
|
+
shadowRadius: number;
|
|
15
|
+
elevation: number;
|
|
16
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
17
|
+
padding: number;
|
|
18
|
+
width: number;
|
|
19
|
+
backgroundColor: "transparent";
|
|
20
|
+
} | {
|
|
21
|
+
boxShadow: string;
|
|
22
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
23
|
+
padding: number;
|
|
24
|
+
width: number;
|
|
25
|
+
backgroundColor: "transparent";
|
|
26
|
+
} | {
|
|
3
27
|
padding: number;
|
|
4
28
|
width: number;
|
|
5
29
|
backgroundColor: "transparent";
|
|
@@ -44,6 +68,16 @@ export declare const useStyles: () => {
|
|
|
44
68
|
width: "100%";
|
|
45
69
|
maxWidth: number;
|
|
46
70
|
padding: number;
|
|
71
|
+
} | {
|
|
72
|
+
backgroundColor: string;
|
|
73
|
+
borderRadius: import("@alveole/theme").Radius;
|
|
74
|
+
display: "flex";
|
|
75
|
+
flexDirection: "row";
|
|
76
|
+
gap: string | number;
|
|
77
|
+
overflow: "hidden";
|
|
78
|
+
width: "100%";
|
|
79
|
+
maxWidth: number;
|
|
80
|
+
padding: number;
|
|
47
81
|
};
|
|
48
82
|
contenu: {
|
|
49
83
|
display: "flex";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Toast.styles.d.ts","sourceRoot":"","sources":["../../../src/ui/Toast/Toast.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EnB,CAAC"}
|
|
@@ -4,9 +4,11 @@ export const useStyles = makeStyles(({ text, color, radius, spacing, shadows })
|
|
|
4
4
|
// Container
|
|
5
5
|
tamaguiToastContainer: {
|
|
6
6
|
padding: 0,
|
|
7
|
-
width: Platform.OS === 'web' ? 384 : Dimensions.get('window').width
|
|
7
|
+
width: Platform.OS === 'web' ? 384 : Dimensions.get('window').width,
|
|
8
8
|
backgroundColor: 'transparent',
|
|
9
9
|
borderRadius: 0,
|
|
10
|
+
// Sur mobile, overflow:hidden sur container clippe le shadow iOS — on le pose ici
|
|
11
|
+
...(Platform.OS !== 'web' ? { borderRadius: radius('sm'), ...shadows(3) } : {}),
|
|
10
12
|
},
|
|
11
13
|
container: {
|
|
12
14
|
backgroundColor: color.light.background['default-grey'],
|
|
@@ -18,7 +20,8 @@ export const useStyles = makeStyles(({ text, color, radius, spacing, shadows })
|
|
|
18
20
|
width: '100%',
|
|
19
21
|
maxWidth: 384,
|
|
20
22
|
padding: 0,
|
|
21
|
-
|
|
23
|
+
// Sur web, overflow:hidden ne clippe pas le shadow — on le pose ici pour avoir le bon borderRadius
|
|
24
|
+
...(Platform.OS === 'web' ? shadows(3) : {}),
|
|
22
25
|
},
|
|
23
26
|
contenu: {
|
|
24
27
|
display: 'flex',
|