@impulse-ui-native/progress 9.1.2 → 10.0.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.
@@ -1,8 +1,7 @@
1
1
  import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { CircularIndeterminateIndicatorProps } from '../types/progress-internal.types.mjs';
4
3
  import 'react-native';
5
4
 
6
- declare const CircularIndeterminateIndicator: react.MemoExoticComponent<({ animationDuration, color, strokeWidth, trackColor, width, }: CircularIndeterminateIndicatorProps) => react_jsx_runtime.JSX.Element>;
5
+ declare const CircularIndeterminateIndicator: react.MemoExoticComponent<({ animationDuration, color, strokeWidth, trackColor, width, }: CircularIndeterminateIndicatorProps) => react.JSX.Element>;
7
6
 
8
7
  export { CircularIndeterminateIndicator };
@@ -1,8 +1,7 @@
1
1
  import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { CircularProgressProps } from '../types/progress-internal.types.mjs';
4
3
  import 'react-native';
5
4
 
6
- declare const CircularProgress: react.MemoExoticComponent<({ animationDuration, fraction, indicatorColor, indeterminate, strokeWidth, style, trackColor, width, ...props }: CircularProgressProps) => react_jsx_runtime.JSX.Element>;
5
+ declare const CircularProgress: react.MemoExoticComponent<({ animationDuration, fraction, indicatorColor, indeterminate, strokeWidth, style, trackColor, width, ...props }: CircularProgressProps) => react.JSX.Element>;
7
6
 
8
7
  export { CircularProgress };
@@ -1,6 +1,5 @@
1
1
  export { Progress } from './progress.mjs';
2
2
  import 'react';
3
- import 'react/jsx-runtime';
4
3
  import '../types/progress.types.mjs';
5
4
  import 'react-native';
6
5
  import '@impulse-ui-native/theme';
@@ -1,8 +1,7 @@
1
1
  import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { LinearIndeterminateIndicatorProps } from '../types/progress-internal.types.mjs';
4
3
  import 'react-native';
5
4
 
6
- declare const LinearIndeterminateIndicator: react.MemoExoticComponent<({ animationDuration, borderRadius, color, ratio, trackHeight, trackWidth, }: LinearIndeterminateIndicatorProps) => react_jsx_runtime.JSX.Element>;
5
+ declare const LinearIndeterminateIndicator: react.MemoExoticComponent<({ animationDuration, borderRadius, color, ratio, trackHeight, trackWidth, }: LinearIndeterminateIndicatorProps) => react.JSX.Element>;
7
6
 
8
7
  export { LinearIndeterminateIndicator };
@@ -1,8 +1,7 @@
1
1
  import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { LinearProgressProps } from '../types/progress-internal.types.mjs';
4
3
  import 'react-native';
5
4
 
6
- declare const LinearProgress: react.MemoExoticComponent<({ animationDuration, borderRadius, fraction, indicatorColor, indeterminate, indeterminateWidth, onLayout, style, trackColor, trackHeight, ...props }: LinearProgressProps) => react_jsx_runtime.JSX.Element>;
5
+ declare const LinearProgress: react.MemoExoticComponent<({ animationDuration, borderRadius, fraction, indicatorColor, indeterminate, indeterminateWidth, onLayout, style, trackColor, trackHeight, ...props }: LinearProgressProps) => react.JSX.Element>;
7
6
 
8
7
  export { LinearProgress };
@@ -1,8 +1,7 @@
1
1
  import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { ProgressCircleProps } from '../types/progress-internal.types.mjs';
4
3
  import 'react-native';
5
4
 
6
- declare const ProgressCircle: react.MemoExoticComponent<({ color, fraction, strokeWidth, trackColor, width, }: ProgressCircleProps) => react_jsx_runtime.JSX.Element>;
5
+ declare const ProgressCircle: react.MemoExoticComponent<({ color, fraction, strokeWidth, trackColor, width, }: ProgressCircleProps) => react.JSX.Element>;
7
6
 
8
7
  export { ProgressCircle };
@@ -1,9 +1,8 @@
1
1
  import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
2
  import { ProgressProps } from '../types/progress.types.mjs';
4
3
  import 'react-native';
5
4
  import '@impulse-ui-native/theme';
6
5
 
7
- declare const Progress: react.MemoExoticComponent<({ color, max, min, size, tone, trackColor, value, variant, ...props }: ProgressProps) => react_jsx_runtime.JSX.Element>;
6
+ declare const Progress: react.MemoExoticComponent<({ color, max, min, size, tone, trackColor, value, variant, ...props }: ProgressProps) => react.JSX.Element>;
8
7
 
9
8
  export { Progress };
@@ -23,26 +23,14 @@ const Progress = memo(function Progress2({
23
23
  [max, min, value]
24
24
  );
25
25
  const indeterminate = normalized.value === void 0;
26
- const commonProps = useMemo(
27
- () => ({
28
- ...props,
29
- animationDuration: tokens.animationDuration,
30
- fraction: normalized.fraction,
31
- indicatorColor: color ?? colorTokens.indicatorColor,
32
- indeterminate,
33
- trackColor: trackColor ?? colorTokens.trackColor
34
- }),
35
- [
36
- color,
37
- colorTokens.indicatorColor,
38
- colorTokens.trackColor,
39
- indeterminate,
40
- normalized.fraction,
41
- props,
42
- tokens.animationDuration,
43
- trackColor
44
- ]
45
- );
26
+ const commonProps = {
27
+ ...props,
28
+ animationDuration: tokens.animationDuration,
29
+ fraction: normalized.fraction,
30
+ indicatorColor: color ?? colorTokens.indicatorColor,
31
+ indeterminate,
32
+ trackColor: trackColor ?? colorTokens.trackColor
33
+ };
46
34
  return /* @__PURE__ */ jsxs(Fragment, { children: [
47
35
  variant === "circular" ? /* @__PURE__ */ jsx(
48
36
  CircularProgress,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/progress.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\n\nimport { useComponentsTokens } from \"@impulse-ui-native/theme\";\n\nimport type { ProgressProps } from \"../types\";\nimport { normalizeProgressValue } from \"../utils/progress.utils\";\nimport { CircularProgress } from \"./circular-progress\";\nimport { LinearProgress } from \"./linear-progress\";\n\nexport const Progress = memo(function Progress({\n color,\n max = 100,\n min = 0,\n size = \"medium\",\n tone = \"primary\",\n trackColor,\n value,\n variant = \"linear\",\n ...props\n}: ProgressProps) {\n const tokens = useComponentsTokens().progress;\n const sizeTokens = tokens.sizes[size];\n const colorTokens = tokens.colors[tone];\n\n const normalized = useMemo(\n () => normalizeProgressValue(value, min, max),\n [max, min, value],\n );\n\n const indeterminate = normalized.value === undefined;\n\n const commonProps = useMemo(\n () => ({\n ...props,\n animationDuration: tokens.animationDuration,\n fraction: normalized.fraction,\n indicatorColor: color ?? colorTokens.indicatorColor,\n indeterminate,\n trackColor: trackColor ?? colorTokens.trackColor,\n }),\n [\n color,\n colorTokens.indicatorColor,\n colorTokens.trackColor,\n indeterminate,\n normalized.fraction,\n props,\n tokens.animationDuration,\n trackColor,\n ],\n );\n\n return (\n <>\n {variant === \"circular\" ? (\n <CircularProgress\n {...commonProps}\n strokeWidth={sizeTokens.circularStrokeWidth}\n width={sizeTokens.circularSize}\n />\n ) : null}\n {variant === \"linear\" ? (\n <LinearProgress\n {...commonProps}\n borderRadius={tokens.borderRadius}\n indeterminateWidth={tokens.indeterminateLinearWidth}\n trackHeight={sizeTokens.linearHeight}\n />\n ) : null}\n </>\n );\n});\n"],"mappings":"AAqDI,mBAEI,KAFJ;AArDJ,SAAS,MAAM,eAAe;AAE9B,SAAS,2BAA2B;AAGpC,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAExB,MAAM,WAAW,KAAK,SAASA,UAAS;AAAA,EAC7C;AAAA,EACA,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACL,GAAkB;AAChB,QAAM,SAAS,oBAAoB,EAAE;AACrC,QAAM,aAAa,OAAO,MAAM,IAAI;AACpC,QAAM,cAAc,OAAO,OAAO,IAAI;AAEtC,QAAM,aAAa;AAAA,IACjB,MAAM,uBAAuB,OAAO,KAAK,GAAG;AAAA,IAC5C,CAAC,KAAK,KAAK,KAAK;AAAA,EAClB;AAEA,QAAM,gBAAgB,WAAW,UAAU;AAE3C,QAAM,cAAc;AAAA,IAClB,OAAO;AAAA,MACL,GAAG;AAAA,MACH,mBAAmB,OAAO;AAAA,MAC1B,UAAU,WAAW;AAAA,MACrB,gBAAgB,SAAS,YAAY;AAAA,MACrC;AAAA,MACA,YAAY,cAAc,YAAY;AAAA,IACxC;AAAA,IACA;AAAA,MACE;AAAA,MACA,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA,OAAO;AAAA,MACP;AAAA,IACF;AAAA,EACF;AAEA,SACE,iCACG;AAAA,gBAAY,aACX;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,aAAa,WAAW;AAAA,QACxB,OAAO,WAAW;AAAA;AAAA,IACpB,IACE;AAAA,IACH,YAAY,WACX;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,cAAc,OAAO;AAAA,QACrB,oBAAoB,OAAO;AAAA,QAC3B,aAAa,WAAW;AAAA;AAAA,IAC1B,IACE;AAAA,KACN;AAEJ,CAAC;","names":["Progress"]}
1
+ {"version":3,"sources":["../../src/components/progress.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\n\nimport { useComponentsTokens } from \"@impulse-ui-native/theme\";\n\nimport type { ProgressProps } from \"../types\";\nimport { normalizeProgressValue } from \"../utils/progress.utils\";\nimport { CircularProgress } from \"./circular-progress\";\nimport { LinearProgress } from \"./linear-progress\";\n\nexport const Progress = memo(function Progress({\n color,\n max = 100,\n min = 0,\n size = \"medium\",\n tone = \"primary\",\n trackColor,\n value,\n variant = \"linear\",\n ...props\n}: ProgressProps) {\n const tokens = useComponentsTokens().progress;\n const sizeTokens = tokens.sizes[size];\n const colorTokens = tokens.colors[tone];\n\n const normalized = useMemo(\n () => normalizeProgressValue(value, min, max),\n [max, min, value],\n );\n\n const indeterminate = normalized.value === undefined;\n\n const commonProps = {\n ...props,\n animationDuration: tokens.animationDuration,\n fraction: normalized.fraction,\n indicatorColor: color ?? colorTokens.indicatorColor,\n indeterminate,\n trackColor: trackColor ?? colorTokens.trackColor,\n };\n\n return (\n <>\n {variant === \"circular\" ? (\n <CircularProgress\n {...commonProps}\n strokeWidth={sizeTokens.circularStrokeWidth}\n width={sizeTokens.circularSize}\n />\n ) : null}\n {variant === \"linear\" ? (\n <LinearProgress\n {...commonProps}\n borderRadius={tokens.borderRadius}\n indeterminateWidth={tokens.indeterminateLinearWidth}\n trackHeight={sizeTokens.linearHeight}\n />\n ) : null}\n </>\n );\n});\n"],"mappings":"AAyCI,mBAEI,KAFJ;AAzCJ,SAAS,MAAM,eAAe;AAE9B,SAAS,2BAA2B;AAGpC,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAExB,MAAM,WAAW,KAAK,SAASA,UAAS;AAAA,EAC7C;AAAA,EACA,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACL,GAAkB;AAChB,QAAM,SAAS,oBAAoB,EAAE;AACrC,QAAM,aAAa,OAAO,MAAM,IAAI;AACpC,QAAM,cAAc,OAAO,OAAO,IAAI;AAEtC,QAAM,aAAa;AAAA,IACjB,MAAM,uBAAuB,OAAO,KAAK,GAAG;AAAA,IAC5C,CAAC,KAAK,KAAK,KAAK;AAAA,EAClB;AAEA,QAAM,gBAAgB,WAAW,UAAU;AAE3C,QAAM,cAAc;AAAA,IAClB,GAAG;AAAA,IACH,mBAAmB,OAAO;AAAA,IAC1B,UAAU,WAAW;AAAA,IACrB,gBAAgB,SAAS,YAAY;AAAA,IACrC;AAAA,IACA,YAAY,cAAc,YAAY;AAAA,EACxC;AAEA,SACE,iCACG;AAAA,gBAAY,aACX;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,aAAa,WAAW;AAAA,QACxB,OAAO,WAAW;AAAA;AAAA,IACpB,IACE;AAAA,IACH,YAAY,WACX;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,cAAc,OAAO;AAAA,QACrB,oBAAoB,OAAO;AAAA,QAC3B,aAAa,WAAW;AAAA;AAAA,IAC1B,IACE;AAAA,KACN;AAEJ,CAAC;","names":["Progress"]}
@@ -1,14 +1,14 @@
1
- declare const ProgressTrackStyles: {
1
+ declare const ProgressTrackStyles: Readonly<{
2
2
  track: {
3
3
  overflow: "hidden";
4
- width: "100%";
4
+ width: string;
5
5
  };
6
- };
7
- declare const ProgressRootStyles: {
6
+ }>;
7
+ declare const ProgressRootStyles: Readonly<{
8
8
  root: {
9
9
  alignItems: "center";
10
10
  justifyContent: "center";
11
11
  };
12
- };
12
+ }>;
13
13
 
14
14
  export { ProgressRootStyles, ProgressTrackStyles };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  export { Progress } from './components/progress.mjs';
2
2
  export { ProgressProps } from './types/progress.types.mjs';
3
3
  import 'react';
4
- import 'react/jsx-runtime';
5
4
  import 'react-native';
6
5
  import '@impulse-ui-native/theme';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impulse-ui-native/progress",
3
- "version": "9.1.2",
3
+ "version": "10.0.0",
4
4
  "description": "Progress components for ImpulseUI Native.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -26,18 +26,18 @@
26
26
  ],
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@impulse-ui-native/theme": "9.1.2"
29
+ "@impulse-ui-native/theme": "10.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/react": "~19.2.14",
32
+ "@types/react": "~19.3.0",
33
33
  "eslint": "^9.38.0",
34
34
  "prettier": "^3.6.2",
35
- "react": "19.2.3",
36
- "react-native": "0.86.2",
35
+ "react": "19.3.0",
36
+ "react-native": "0.88.0",
37
37
  "typescript": "~6.0.3",
38
- "react-native-svg": "15.15.4",
39
- "react-native-reanimated": "4.5.1",
40
- "react-native-worklets": "0.10.1",
38
+ "react-native-svg": "15.16.0",
39
+ "react-native-reanimated": "4.7.1",
40
+ "react-native-worklets": "0.13.0",
41
41
  "@impulse-ui-native/prettier-config": "1.0.0",
42
42
  "@impulse-ui-native/eslint-config": "1.0.0",
43
43
  "@impulse-ui-native/tsconfig": "1.0.0"