@alveole/components 0.35.0 → 0.35.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/ui/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAMF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACrE,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CA6ClD,CAAC"}
1
+ {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/ui/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAMF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACrE,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CA+ClD,CAAC"}
@@ -36,5 +36,5 @@ export const Breadcrumbs = (props) => {
36
36
  isCurrent: index === segments.length - 1,
37
37
  })),
38
38
  ];
39
- return (_jsx(Box, { style: styles.container, children: items.map((item, index) => (_jsxs(Box, { style: { flexDirection: 'row', alignItems: 'center' }, children: [index > 0 && _jsx(Typography, { style: styles.separator, children: " > " }), item.isCurrent ? (_jsx(Typography, { style: styles.current, children: item.label })) : (_jsx(A, { href: item.href, style: styles.link, hoverStyle: styles.linkHover, children: item.label }))] }, `${item.href}-${index}`))) }));
39
+ return (_jsx(Box, { style: styles.container, children: items.map((item, index) => (_jsxs(Box, { style: { flexDirection: 'row', alignItems: 'center' }, children: [index > 0 && _jsx(Typography, { style: styles.separator, children: " > " }), item.isCurrent ? (_jsx(Typography, { style: styles.current, children: item.label })) : (_jsx(A, { href: item.href, style: styles.link, hoverStyle: styles.linkHover, children: _jsx(Typography, { style: styles.link, hoverStyle: styles.linkHover, children: item.label }) }))] }, `${item.href}-${index}`))) }));
40
40
  };
@@ -4,6 +4,7 @@ export type ProgressBarProps = BoxProps & {
4
4
  value?: number;
5
5
  visible?: boolean;
6
6
  indicator?: boolean;
7
+ indicatorPrecision?: 0 | 1 | 2 | 3;
7
8
  mode?: ProgressBarMode;
8
9
  };
9
10
  export declare const ProgressBar: (props: ProgressBarProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -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,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,mDAclD,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;CACxB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,mDAclD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { BoxProps } from '../../core';
2
2
  export type ProgressBarDeterminateProps = BoxProps & {
3
3
  indicator?: boolean;
4
+ indicatorPrecision?: 0 | 1 | 2 | 3;
4
5
  clamped: number;
5
6
  };
6
7
  export declare const ProgressBarDeterminate: (props: ProgressBarDeterminateProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBarDeterminate.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBarDeterminate.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,QAAQ,EAAE,MAAM,YAAY,CAAC;AAK3C,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,2BAA2B,4CA2CxE,CAAC"}
1
+ {"version":3,"file":"ProgressBarDeterminate.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBarDeterminate.tsx"],"names":[],"mappings":"AAEA,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;CACjB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,2BAA2B,4CA2CxE,CAAC"}
@@ -6,7 +6,7 @@ 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, style, onLayout, ...boxProps } = props;
9
+ const { clamped, indicator, indicatorPrecision = 3, style, onLayout, ...boxProps } = props;
10
10
  const styles = useStyles();
11
11
  const animatedProgress = React.useRef(new Animated.Value(clamped)).current;
12
12
  const remaining = React.useMemo(() => Animated.subtract(1, animatedProgress), [animatedProgress]);
@@ -25,5 +25,5 @@ export const ProgressBarDeterminate = (props) => {
25
25
  anim.start();
26
26
  return () => anim.stop();
27
27
  }, [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, "%"] }) }))] }));
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
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alveole/components",
3
- "version": "0.35.0",
3
+ "version": "0.35.2",
4
4
  "description": "Shared UI components.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",