@impulse-ui-native/primitives 5.0.0 → 6.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.
Files changed (98) hide show
  1. package/README.md +5 -42
  2. package/dist/components/atoms/avatar.js +5 -2
  3. package/dist/components/atoms/avatar.js.map +1 -1
  4. package/dist/components/atoms/badge/addon.js +6 -2
  5. package/dist/components/atoms/badge/addon.js.map +1 -1
  6. package/dist/components/atoms/badge/root.js.map +1 -1
  7. package/dist/components/atoms/divider.js.map +1 -1
  8. package/dist/components/atoms/index.d.mts +0 -2
  9. package/dist/components/atoms/index.js +0 -2
  10. package/dist/components/atoms/index.js.map +1 -1
  11. package/dist/components/atoms/pressable.js.map +1 -1
  12. package/dist/components/atoms/safe-area-view.js.map +1 -1
  13. package/dist/components/atoms/tag.js.map +1 -1
  14. package/dist/components/atoms/view.js.map +1 -1
  15. package/dist/components/index.d.mts +0 -6
  16. package/dist/components/index.js +0 -2
  17. package/dist/components/index.js.map +1 -1
  18. package/dist/hocs/create-preset.hoc.js.map +1 -1
  19. package/dist/index.d.mts +0 -6
  20. package/dist/types/index.d.mts +0 -3
  21. package/dist/types/index.js +0 -3
  22. package/dist/types/index.js.map +1 -1
  23. package/package.json +5 -5
  24. package/dist/components/atoms/circular-progress.d.mts +0 -16
  25. package/dist/components/atoms/circular-progress.js +0 -144
  26. package/dist/components/atoms/circular-progress.js.map +0 -1
  27. package/dist/components/atoms/linear-progress.d.mts +0 -17
  28. package/dist/components/atoms/linear-progress.js +0 -97
  29. package/dist/components/atoms/linear-progress.js.map +0 -1
  30. package/dist/components/atoms/progress.d.mts +0 -9
  31. package/dist/components/atoms/progress.js +0 -66
  32. package/dist/components/atoms/progress.js.map +0 -1
  33. package/dist/components/card/card.d.mts +0 -17
  34. package/dist/components/card/card.js +0 -18
  35. package/dist/components/card/card.js.map +0 -1
  36. package/dist/components/card/content.d.mts +0 -10
  37. package/dist/components/card/content.js +0 -30
  38. package/dist/components/card/content.js.map +0 -1
  39. package/dist/components/card/footer.d.mts +0 -10
  40. package/dist/components/card/footer.js +0 -30
  41. package/dist/components/card/footer.js.map +0 -1
  42. package/dist/components/card/header.d.mts +0 -10
  43. package/dist/components/card/header.js +0 -30
  44. package/dist/components/card/header.js.map +0 -1
  45. package/dist/components/card/index.d.mts +0 -7
  46. package/dist/components/card/index.js +0 -5
  47. package/dist/components/card/index.js.map +0 -1
  48. package/dist/components/card/media.d.mts +0 -10
  49. package/dist/components/card/media.js +0 -30
  50. package/dist/components/card/media.js.map +0 -1
  51. package/dist/components/card/pressable.d.mts +0 -10
  52. package/dist/components/card/pressable.js +0 -27
  53. package/dist/components/card/pressable.js.map +0 -1
  54. package/dist/components/card/root.d.mts +0 -10
  55. package/dist/components/card/root.js +0 -21
  56. package/dist/components/card/root.js.map +0 -1
  57. package/dist/components/card/root.styles.d.mts +0 -13
  58. package/dist/components/card/root.styles.js +0 -17
  59. package/dist/components/card/root.styles.js.map +0 -1
  60. package/dist/components/list/content.d.mts +0 -11
  61. package/dist/components/list/content.js +0 -27
  62. package/dist/components/list/content.js.map +0 -1
  63. package/dist/components/list/index.d.mts +0 -8
  64. package/dist/components/list/index.js +0 -5
  65. package/dist/components/list/index.js.map +0 -1
  66. package/dist/components/list/item.d.mts +0 -11
  67. package/dist/components/list/item.js +0 -32
  68. package/dist/components/list/item.js.map +0 -1
  69. package/dist/components/list/leading.d.mts +0 -11
  70. package/dist/components/list/leading.js +0 -32
  71. package/dist/components/list/leading.js.map +0 -1
  72. package/dist/components/list/list.d.mts +0 -18
  73. package/dist/components/list/list.js +0 -18
  74. package/dist/components/list/list.js.map +0 -1
  75. package/dist/components/list/pressable.d.mts +0 -11
  76. package/dist/components/list/pressable.js +0 -37
  77. package/dist/components/list/pressable.js.map +0 -1
  78. package/dist/components/list/root.d.mts +0 -11
  79. package/dist/components/list/root.js +0 -33
  80. package/dist/components/list/root.js.map +0 -1
  81. package/dist/components/list/trailing.d.mts +0 -11
  82. package/dist/components/list/trailing.js +0 -32
  83. package/dist/components/list/trailing.js.map +0 -1
  84. package/dist/hooks/use-indeterminate-progress-animation.hook.d.mts +0 -5
  85. package/dist/hooks/use-indeterminate-progress-animation.hook.js +0 -26
  86. package/dist/hooks/use-indeterminate-progress-animation.hook.js.map +0 -1
  87. package/dist/types/card.types.d.mts +0 -21
  88. package/dist/types/card.types.js +0 -1
  89. package/dist/types/card.types.js.map +0 -1
  90. package/dist/types/list.types.d.mts +0 -21
  91. package/dist/types/list.types.js +0 -1
  92. package/dist/types/list.types.js.map +0 -1
  93. package/dist/types/progress.types.d.mts +0 -15
  94. package/dist/types/progress.types.js +0 -1
  95. package/dist/types/progress.types.js.map +0 -1
  96. package/dist/utils/progress.utils.d.mts +0 -9
  97. package/dist/utils/progress.utils.js +0 -27
  98. package/dist/utils/progress.utils.js.map +0 -1
@@ -1,144 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { Animated, StyleSheet, View } from "react-native";
4
- import Svg, { Circle, G } from "react-native-svg";
5
- import { useIndeterminateProgressAnimation } from "../../hooks/use-indeterminate-progress-animation.hook";
6
- const CircularProgress = memo(function CircularProgress2({
7
- animationDuration,
8
- fraction,
9
- indicatorColor,
10
- indeterminate,
11
- strokeWidth,
12
- style,
13
- trackColor,
14
- width,
15
- ...props
16
- }) {
17
- const rootStyle = useMemo(
18
- () => [styles.root, { height: width, width }, style],
19
- [style, width]
20
- );
21
- return /* @__PURE__ */ jsx(View, { ...props, style: rootStyle, children: indeterminate ? /* @__PURE__ */ jsx(
22
- CircularIndeterminateIndicator,
23
- {
24
- animationDuration,
25
- color: indicatorColor,
26
- strokeWidth,
27
- trackColor,
28
- width
29
- }
30
- ) : /* @__PURE__ */ jsx(
31
- ProgressCircle,
32
- {
33
- color: indicatorColor,
34
- fraction,
35
- strokeWidth,
36
- trackColor,
37
- width
38
- }
39
- ) });
40
- });
41
- const ProgressCircle = memo(function ProgressCircle2({
42
- color,
43
- fraction,
44
- strokeWidth,
45
- trackColor,
46
- width
47
- }) {
48
- const center = width / 2;
49
- const radius = (width - strokeWidth) / 2;
50
- const circumference = 2 * Math.PI * radius;
51
- const strokeDasharray = useMemo(
52
- () => [circumference, circumference],
53
- [circumference]
54
- );
55
- return /* @__PURE__ */ jsxs(Svg, { height: width, width, children: [
56
- /* @__PURE__ */ jsx(
57
- Circle,
58
- {
59
- cx: center,
60
- cy: center,
61
- fill: "none",
62
- r: radius,
63
- stroke: trackColor,
64
- strokeWidth
65
- }
66
- ),
67
- /* @__PURE__ */ jsx(G, { origin: `${center}, ${center}`, rotation: -90, children: /* @__PURE__ */ jsx(
68
- Circle,
69
- {
70
- cx: center,
71
- cy: center,
72
- fill: "none",
73
- r: radius,
74
- stroke: color,
75
- strokeDasharray,
76
- strokeDashoffset: circumference * (1 - fraction),
77
- strokeLinecap: fraction === 0 ? "butt" : "round",
78
- strokeWidth
79
- }
80
- ) })
81
- ] });
82
- });
83
- const CircularIndeterminateIndicator = memo(
84
- function CircularIndeterminateIndicator2({
85
- animationDuration,
86
- color,
87
- strokeWidth,
88
- trackColor,
89
- width
90
- }) {
91
- const progress = useIndeterminateProgressAnimation(animationDuration);
92
- const rotation = progress.interpolate({
93
- inputRange: [0, 1],
94
- outputRange: ["0deg", "360deg"]
95
- });
96
- const center = width / 2;
97
- const radius = (width - strokeWidth) / 2;
98
- const circumference = 2 * Math.PI * radius;
99
- const animatedStyle = useMemo(
100
- () => ({ transform: [{ rotate: rotation }] }),
101
- [rotation]
102
- );
103
- const strokeDasharray = useMemo(
104
- () => [circumference * 0.25, circumference * 0.75],
105
- [circumference]
106
- );
107
- return /* @__PURE__ */ jsx(Animated.View, { style: animatedStyle, children: /* @__PURE__ */ jsxs(Svg, { height: width, width, children: [
108
- /* @__PURE__ */ jsx(
109
- Circle,
110
- {
111
- cx: center,
112
- cy: center,
113
- fill: "none",
114
- r: radius,
115
- stroke: trackColor,
116
- strokeWidth
117
- }
118
- ),
119
- /* @__PURE__ */ jsx(
120
- Circle,
121
- {
122
- cx: center,
123
- cy: center,
124
- fill: "none",
125
- r: radius,
126
- stroke: color,
127
- strokeDasharray,
128
- strokeLinecap: "round",
129
- strokeWidth
130
- }
131
- )
132
- ] }) });
133
- }
134
- );
135
- const styles = StyleSheet.create({
136
- root: {
137
- alignItems: "center",
138
- justifyContent: "center"
139
- }
140
- });
141
- export {
142
- CircularProgress
143
- };
144
- //# sourceMappingURL=circular-progress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/atoms/circular-progress.tsx"],"sourcesContent":["import type { ColorValue, ViewProps } from \"react-native\";\nimport { memo, useMemo } from \"react\";\nimport { Animated, StyleSheet, View } from \"react-native\";\nimport Svg, { Circle, G } from \"react-native-svg\";\n\nimport { useIndeterminateProgressAnimation } from \"../../hooks/use-indeterminate-progress-animation.hook\";\n\ninterface CircularProgressProps extends ViewProps {\n animationDuration: number;\n fraction: number;\n indicatorColor: ColorValue;\n indeterminate: boolean;\n strokeWidth: number;\n trackColor: ColorValue;\n width: number;\n}\n\nexport const CircularProgress = memo(function CircularProgress({\n animationDuration,\n fraction,\n indicatorColor,\n indeterminate,\n strokeWidth,\n style,\n trackColor,\n width,\n ...props\n}: CircularProgressProps) {\n const rootStyle = useMemo(\n () => [styles.root, { height: width, width }, style],\n [style, width],\n );\n\n return (\n <View {...props} style={rootStyle}>\n {indeterminate ? (\n <CircularIndeterminateIndicator\n animationDuration={animationDuration}\n color={indicatorColor}\n strokeWidth={strokeWidth}\n trackColor={trackColor}\n width={width}\n />\n ) : (\n <ProgressCircle\n color={indicatorColor}\n fraction={fraction}\n strokeWidth={strokeWidth}\n trackColor={trackColor}\n width={width}\n />\n )}\n </View>\n );\n});\n\ninterface ProgressCircleProps {\n color: ColorValue;\n fraction: number;\n strokeWidth: number;\n trackColor: ColorValue;\n width: number;\n}\n\nconst ProgressCircle = memo(function ProgressCircle({\n color,\n fraction,\n strokeWidth,\n trackColor,\n width,\n}: ProgressCircleProps) {\n const center = width / 2;\n const radius = (width - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const strokeDasharray = useMemo(\n () => [circumference, circumference],\n [circumference],\n );\n\n return (\n <Svg height={width} width={width}>\n <Circle\n cx={center}\n cy={center}\n fill=\"none\"\n r={radius}\n stroke={trackColor}\n strokeWidth={strokeWidth}\n />\n <G origin={`${center}, ${center}`} rotation={-90}>\n <Circle\n cx={center}\n cy={center}\n fill=\"none\"\n r={radius}\n stroke={color}\n strokeDasharray={strokeDasharray}\n strokeDashoffset={circumference * (1 - fraction)}\n strokeLinecap={fraction === 0 ? \"butt\" : \"round\"}\n strokeWidth={strokeWidth}\n />\n </G>\n </Svg>\n );\n});\n\ninterface CircularIndeterminateIndicatorProps {\n animationDuration: number;\n color: ColorValue;\n strokeWidth: number;\n trackColor: ColorValue;\n width: number;\n}\n\nconst CircularIndeterminateIndicator = memo(\n function CircularIndeterminateIndicator({\n animationDuration,\n color,\n strokeWidth,\n trackColor,\n width,\n }: CircularIndeterminateIndicatorProps) {\n const progress = useIndeterminateProgressAnimation(animationDuration);\n const rotation = progress.interpolate({\n inputRange: [0, 1],\n outputRange: [\"0deg\", \"360deg\"],\n });\n const center = width / 2;\n const radius = (width - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const animatedStyle = useMemo(\n () => ({ transform: [{ rotate: rotation }] }),\n [rotation],\n );\n const strokeDasharray = useMemo(\n () => [circumference * 0.25, circumference * 0.75],\n [circumference],\n );\n\n return (\n <Animated.View style={animatedStyle}>\n <Svg height={width} width={width}>\n <Circle\n cx={center}\n cy={center}\n fill=\"none\"\n r={radius}\n stroke={trackColor}\n strokeWidth={strokeWidth}\n />\n <Circle\n cx={center}\n cy={center}\n fill=\"none\"\n r={radius}\n stroke={color}\n strokeDasharray={strokeDasharray}\n strokeLinecap=\"round\"\n strokeWidth={strokeWidth}\n />\n </Svg>\n </Animated.View>\n );\n },\n);\n\nconst styles = StyleSheet.create({\n root: {\n align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AAA,UACH,QAAQ;AAAA,UACR;AAAA,UACA,eAAc;AAAA,UACd;AAAA;AAAA,MACF;AAAA,OACF,GACF;AAAA,EAEJ;AACF;AAEA,MAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,MAAM;AAAA,IACJ,YAAY;AAAA,IACZ,gBAAgB;AAAA,EAClB;AACF,CAAC;","names":["CircularProgress","ProgressCircle","CircularIndeterminateIndicator"]}
@@ -1,17 +0,0 @@
1
- import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { ViewProps, ColorValue } from 'react-native';
4
-
5
- interface LinearProgressProps extends ViewProps {
6
- animationDuration: number;
7
- borderRadius: number;
8
- fraction: number;
9
- indicatorColor: ColorValue;
10
- indeterminate: boolean;
11
- indeterminateWidth: number;
12
- trackColor: ColorValue;
13
- trackHeight: number;
14
- }
15
- declare const LinearProgress: react.MemoExoticComponent<({ animationDuration, borderRadius, fraction, indicatorColor, indeterminate, indeterminateWidth, onLayout, style, trackColor, trackHeight, ...props }: LinearProgressProps) => react_jsx_runtime.JSX.Element>;
16
-
17
- export { LinearProgress };
@@ -1,97 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { memo, useCallback, useMemo, useState } from "react";
3
- import { Animated, I18nManager, StyleSheet, View } from "react-native";
4
- import { useIndeterminateProgressAnimation } from "../../hooks/use-indeterminate-progress-animation.hook";
5
- const LinearProgress = memo(function LinearProgress2({
6
- animationDuration,
7
- borderRadius,
8
- fraction,
9
- indicatorColor,
10
- indeterminate,
11
- indeterminateWidth,
12
- onLayout,
13
- style,
14
- trackColor,
15
- trackHeight,
16
- ...props
17
- }) {
18
- const [trackWidth, setTrackWidth] = useState(0);
19
- const handleLayout = useCallback(
20
- (event) => {
21
- setTrackWidth(event.nativeEvent.layout.width);
22
- onLayout?.(event);
23
- },
24
- [onLayout]
25
- );
26
- const trackStyle = useMemo(
27
- () => [
28
- styles.track,
29
- {
30
- backgroundColor: trackColor,
31
- borderRadius,
32
- height: trackHeight
33
- },
34
- style
35
- ],
36
- [borderRadius, style, trackColor, trackHeight]
37
- );
38
- const determinateIndicatorStyle = useMemo(
39
- () => ({
40
- alignSelf: I18nManager.isRTL ? "flex-end" : "flex-start",
41
- backgroundColor: indicatorColor,
42
- borderRadius,
43
- height: trackHeight,
44
- width: `${fraction * 100}%`
45
- }),
46
- [borderRadius, fraction, indicatorColor, trackHeight]
47
- );
48
- return /* @__PURE__ */ jsx(View, { ...props, onLayout: handleLayout, style: trackStyle, children: indeterminate ? /* @__PURE__ */ jsx(
49
- LinearIndeterminateIndicator,
50
- {
51
- animationDuration,
52
- borderRadius,
53
- color: indicatorColor,
54
- ratio: indeterminateWidth,
55
- trackHeight,
56
- trackWidth
57
- }
58
- ) : /* @__PURE__ */ jsx(View, { style: determinateIndicatorStyle }) });
59
- });
60
- const LinearIndeterminateIndicator = memo(
61
- function LinearIndeterminateIndicator2({
62
- animationDuration,
63
- borderRadius,
64
- color,
65
- ratio,
66
- trackHeight,
67
- trackWidth
68
- }) {
69
- const progress = useIndeterminateProgressAnimation(animationDuration);
70
- const indicatorWidth = trackWidth * ratio;
71
- const translateX = progress.interpolate({
72
- inputRange: [0, 1],
73
- outputRange: I18nManager.isRTL ? [trackWidth, -indicatorWidth] : [-indicatorWidth, trackWidth]
74
- });
75
- const indicatorStyle = useMemo(
76
- () => ({
77
- backgroundColor: color,
78
- borderRadius,
79
- height: trackHeight,
80
- transform: [{ translateX }],
81
- width: `${ratio * 100}%`
82
- }),
83
- [borderRadius, color, ratio, trackHeight, translateX]
84
- );
85
- return /* @__PURE__ */ jsx(Animated.View, { style: indicatorStyle });
86
- }
87
- );
88
- const styles = StyleSheet.create({
89
- track: {
90
- overflow: "hidden",
91
- width: "100%"
92
- }
93
- });
94
- export {
95
- LinearProgress
96
- };
97
- //# sourceMappingURL=linear-progress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/atoms/linear-progress.tsx"],"sourcesContent":["import type { ColorValue, LayoutChangeEvent, ViewProps } from \"react-native\";\nimport { memo, useCallback, useMemo, useState } from \"react\";\nimport { Animated, I18nManager, StyleSheet, View } from \"react-native\";\n\nimport { useIndeterminateProgressAnimation } from \"../../hooks/use-indeterminate-progress-animation.hook\";\n\ninterface LinearProgressProps extends ViewProps {\n animationDuration: number;\n borderRadius: number;\n fraction: number;\n indicatorColor: ColorValue;\n indeterminate: boolean;\n indeterminateWidth: number;\n trackColor: ColorValue;\n trackHeight: number;\n}\n\nexport const LinearProgress = memo(function LinearProgress({\n animationDuration,\n borderRadius,\n fraction,\n indicatorColor,\n indeterminate,\n indeterminateWidth,\n onLayout,\n style,\n trackColor,\n trackHeight,\n ...props\n}: LinearProgressProps) {\n const [trackWidth, setTrackWidth] = useState(0);\n\n const handleLayout = useCallback(\n (event: LayoutChangeEvent) => {\n setTrackWidth(event.nativeEvent.layout.width);\n onLayout?.(event);\n },\n [onLayout],\n );\n\n const trackStyle = useMemo(\n () => [\n styles.track,\n {\n backgroundColor: trackColor,\n borderRadius,\n height: trackHeight,\n },\n style,\n ],\n [borderRadius, style, trackColor, trackHeight],\n );\n\n const determinateIndicatorStyle = useMemo(\n () => ({\n alignSelf: I18nManager.isRTL\n ? (\"flex-end\" as const)\n : (\"flex-start\" as const),\n backgroundColor: indicatorColor,\n borderRadius,\n height: trackHeight,\n width: `${fraction * 100}%` as const,\n }),\n [borderRadius, fraction, indicatorColor, trackHeight],\n );\n\n return (\n <View {...props} onLayout={handleLayout} style={trackStyle}>\n {indeterminate ? (\n <LinearIndeterminateIndicator\n animationDuration={animationDuration}\n borderRadius={borderRadius}\n color={indicatorColor}\n ratio={indeterminateWidth}\n trackHeight={trackHeight}\n trackWidth={trackWidth}\n />\n ) : (\n <View style={determinateIndicatorStyle} />\n )}\n </View>\n );\n});\n\ninterface LinearIndeterminateIndicatorProps {\n animationDuration: number;\n borderRadius: number;\n color: ColorValue;\n ratio: number;\n trackHeight: number;\n trackWidth: number;\n}\n\nconst LinearIndeterminateIndicator = memo(\n function LinearIndeterminateIndicator({\n animationDuration,\n borderRadius,\n color,\n ratio,\n trackHeight,\n trackWidth,\n }: LinearIndeterminateIndicatorProps) {\n const progress = useIndeterminateProgressAnimation(animationDuration);\n const indicatorWidth = trackWidth * ratio;\n const translateX = progress.interpolate({\n inputRange: [0, 1],\n outputRange: I18nManager.isRTL\n ? [trackWidth, -indicatorWidth]\n : [-indicatorWidth, trackWidth],\n });\n\n const indicatorStyle = useMemo(\n () => ({\n backgroundColor: color,\n borderRadius,\n height: trackHeight,\n transform: [{ translateX }],\n width: `${ratio * 100}%` as const,\n }),\n [borderRadius, color, ratio, trackHeight, translateX],\n );\n\n return <Animated.View style={indicatorStyle} />;\n },\n);\n\nconst styles = StyleSheet.create({\n track: {\n overflow: \"hidden\",\n width: \"100%\",\n },\n});\n"],"mappings":"AAqEQ;AApER,SAAS,MAAM,aAAa,SAAS,gBAAgB;AACrD,SAAS,UAAU,aAAa,YAAY,YAAY;AAExD,SAAS,yCAAyC;AAa3C,MAAM,iBAAiB,KAAK,SAASA,gBAAe;AAAA,EACzD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,CAAC;AAE9C,QAAM,eAAe;AAAA,IACnB,CAAC,UAA6B;AAC5B,oBAAc,MAAM,YAAY,OAAO,KAAK;AAC5C,iBAAW,KAAK;AAAA,IAClB;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,aAAa;AAAA,IACjB,MAAM;AAAA,MACJ,OAAO;AAAA,MACP;AAAA,QACE,iBAAiB;AAAA,QACjB;AAAA,QACA,QAAQ;AAAA,MACV;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,cAAc,OAAO,YAAY,WAAW;AAAA,EAC/C;AAEA,QAAM,4BAA4B;AAAA,IAChC,OAAO;A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-1,9 +0,0 @@
1
- import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { ProgressProps } from '../../types/progress.types.mjs';
4
- import 'react-native';
5
- import '@impulse-ui-native/theme';
6
-
7
- declare const Progress: react.MemoExoticComponent<({ color, max, min, size, tone, trackColor, value, variant, ...props }: ProgressProps) => react_jsx_runtime.JSX.Element>;
8
-
9
- export { Progress };
@@ -1,66 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { useComponentsTokens } from "@impulse-ui-native/theme";
4
- import { normalizeProgressValue } from "../../utils/progress.utils";
5
- import { CircularProgress } from "./circular-progress";
6
- import { LinearProgress } from "./linear-progress";
7
- const Progress = memo(function Progress2({
8
- color,
9
- max = 100,
10
- min = 0,
11
- size = "medium",
12
- tone = "primary",
13
- trackColor,
14
- value,
15
- variant = "linear",
16
- ...props
17
- }) {
18
- const tokens = useComponentsTokens().progress;
19
- const sizeTokens = tokens.sizes[size];
20
- const colorTokens = tokens.colors[tone];
21
- const normalized = useMemo(
22
- () => normalizeProgressValue(value, min, max),
23
- [max, min, value]
24
- );
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
- );
46
- return variant === "circular" ? /* @__PURE__ */ jsx(
47
- CircularProgress,
48
- {
49
- ...commonProps,
50
- strokeWidth: sizeTokens.circularStrokeWidth,
51
- width: sizeTokens.circularSize
52
- }
53
- ) : /* @__PURE__ */ jsx(
54
- LinearProgress,
55
- {
56
- ...commonProps,
57
- borderRadius: tokens.borderRadius,
58
- indeterminateWidth: tokens.indeterminateLinearWidth,
59
- trackHeight: sizeTokens.linearHeight
60
- }
61
- );
62
- });
63
- export {
64
- Progress
65
- };
66
- //# sourceMappingURL=progress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/atoms/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 const normalized = useMemo(\n () => normalizeProgressValue(value, min, max),\n [max, min, value],\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 variant === \"circular\" ? (\n <CircularProgress\n {...commonProps}\n strokeWidth={sizeTokens.circularStrokeWidth}\n width={sizeTokens.circularSize}\n />\n ) : (\n <LinearProgress\n {...commonProps}\n borderRadius={tokens.borderRadius}\n indeterminateWidth={tokens.indeterminateLinearWidth}\n trackHeight={sizeTokens.linearHeight}\n />\n );\n});\n"],"mappings":"AAmDI;AAnDJ,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;AACtC,QAAM,aAAa;AAAA,IACjB,MAAM,uBAAuB,OAAO,KAAK,GAAG;AAAA,IAC5C,CAAC,KAAK,KAAK,KAAK;AAAA,EAClB;AACA,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,SAAO,YAAY,aACjB;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,aAAa,WAAW;AAAA,MACxB,OAAO,WAAW;AAAA;AAAA,EACpB,IAEA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,cAAc,OAAO;AAAA,MACrB,oBAAoB,OAAO;AAAA,MAC3B,aAAa,WAAW;AAAA;AAAA,EAC1B;AAEJ,CAAC;","names":["Progress"]}
@@ -1,17 +0,0 @@
1
- import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { CardRootProps, CardPressableProps, CardHeaderProps, CardContentProps, CardFooterProps, CardMediaProps } from '../../types/card.types.mjs';
4
- import 'react-native';
5
- import '@impulse-ui-native/theme';
6
- import '../../types/view.types.mjs';
7
-
8
- declare const Card: {
9
- Root: react.MemoExoticComponent<({ style, ...props }: CardRootProps) => react_jsx_runtime.JSX.Element>;
10
- Pressable: react.MemoExoticComponent<({ disabled, style, ...props }: CardPressableProps) => react_jsx_runtime.JSX.Element>;
11
- Header: react.MemoExoticComponent<({ style, ...props }: CardHeaderProps) => react_jsx_runtime.JSX.Element>;
12
- Content: react.MemoExoticComponent<({ style, ...props }: CardContentProps) => react_jsx_runtime.JSX.Element>;
13
- Footer: react.MemoExoticComponent<({ style, ...props }: CardFooterProps) => react_jsx_runtime.JSX.Element>;
14
- Media: react.MemoExoticComponent<({ style, ...props }: CardMediaProps) => react_jsx_runtime.JSX.Element>;
15
- };
16
-
17
- export { Card };
@@ -1,18 +0,0 @@
1
- import { CardContent } from "./content";
2
- import { CardFooter } from "./footer";
3
- import { CardHeader } from "./header";
4
- import { CardMedia } from "./media";
5
- import { CardPressable } from "./pressable";
6
- import { CardRoot } from "./root";
7
- const Card = {
8
- Root: CardRoot,
9
- Pressable: CardPressable,
10
- Header: CardHeader,
11
- Content: CardContent,
12
- Footer: CardFooter,
13
- Media: CardMedia
14
- };
15
- export {
16
- Card
17
- };
18
- //# sourceMappingURL=card.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { CardContent } from \"./content\";\nimport { CardFooter } from \"./footer\";\nimport { CardHeader } from \"./header\";\nimport { CardMedia } from \"./media\";\nimport { CardPressable } from \"./pressable\";\nimport { CardRoot } from \"./root\";\n\nexport const Card = {\n Root: CardRoot,\n Pressable: CardPressable,\n Header: CardHeader,\n Content: CardContent,\n Footer: CardFooter,\n Media: CardMedia,\n};\n"],"mappings":"AAAA,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AAElB,MAAM,OAAO;AAAA,EAClB,MAAM;AAAA,EACN,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AACT;","names":[]}
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { CardContentProps } from '../../types/card.types.mjs';
4
- import 'react-native';
5
- import '@impulse-ui-native/theme';
6
- import '../../types/view.types.mjs';
7
-
8
- declare const CardContent: react.MemoExoticComponent<({ style, ...props }: CardContentProps) => react_jsx_runtime.JSX.Element>;
9
-
10
- export { CardContent };
@@ -1,30 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { StyleSheet } from "react-native";
4
- import { useStyleProps, useThemedStyles } from "@impulse-ui-native/theme";
5
- import { View } from "../atoms/view";
6
- const CardContent = memo(function CardContent2({
7
- style,
8
- ...props
9
- }) {
10
- const extractedStyleProps = useStyleProps(props);
11
- const styles = useThemedStyles(themedStyles);
12
- const contentStyle = useMemo(
13
- () => [styles.content, extractedStyleProps, style],
14
- [extractedStyleProps, style, styles.content]
15
- );
16
- return /* @__PURE__ */ jsx(View, { ...props, style: contentStyle });
17
- });
18
- function themedStyles(theme) {
19
- const contentTokens = theme.components.card.content;
20
- return StyleSheet.create({
21
- content: {
22
- gap: contentTokens.gap,
23
- padding: contentTokens.padding
24
- }
25
- });
26
- }
27
- export {
28
- CardContent
29
- };
30
- //# sourceMappingURL=content.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/card/content.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\nimport { StyleSheet } from \"react-native\";\n\nimport type { AppTheme } from \"@impulse-ui-native/theme\";\nimport { useStyleProps, useThemedStyles } from \"@impulse-ui-native/theme\";\n\nimport type { CardContentProps } from \"../../types\";\nimport { View } from \"../atoms/view\";\n\nexport const CardContent = memo(function CardContent({\n style,\n ...props\n}: CardContentProps) {\n const extractedStyleProps = useStyleProps(props);\n const styles = useThemedStyles(themedStyles);\n const contentStyle = useMemo(\n () => [styles.content, extractedStyleProps, style],\n [extractedStyleProps, style, styles.content],\n );\n\n return <View {...props} style={contentStyle} />;\n});\n\nfunction themedStyles(theme: AppTheme) {\n const contentTokens = theme.components.card.content;\n\n return StyleSheet.create({\n content: {\n gap: contentTokens.gap,\n padding: contentTokens.padding,\n },\n });\n}\n"],"mappings":"AAoBS;AApBT,SAAS,MAAM,eAAe;AAC9B,SAAS,kBAAkB;AAG3B,SAAS,eAAe,uBAAuB;AAG/C,SAAS,YAAY;AAEd,MAAM,cAAc,KAAK,SAASA,aAAY;AAAA,EACnD;AAAA,EACA,GAAG;AACL,GAAqB;AACnB,QAAM,sBAAsB,cAAc,KAAK;AAC/C,QAAM,SAAS,gBAAgB,YAAY;AAC3C,QAAM,eAAe;AAAA,IACnB,MAAM,CAAC,OAAO,SAAS,qBAAqB,KAAK;AAAA,IACjD,CAAC,qBAAqB,OAAO,OAAO,OAAO;AAAA,EAC7C;AAEA,SAAO,oBAAC,QAAM,GAAG,OAAO,OAAO,cAAc;AAC/C,CAAC;AAED,SAAS,aAAa,OAAiB;AACrC,QAAM,gBAAgB,MAAM,WAAW,KAAK;AAE5C,SAAO,WAAW,OAAO;AAAA,IACvB,SAAS;AAAA,MACP,KAAK,cAAc;AAAA,MACnB,SAAS,cAAc;AAAA,IACzB;AAAA,EACF,CAAC;AACH;","names":["CardContent"]}
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { CardFooterProps } from '../../types/card.types.mjs';
4
- import 'react-native';
5
- import '@impulse-ui-native/theme';
6
- import '../../types/view.types.mjs';
7
-
8
- declare const CardFooter: react.MemoExoticComponent<({ style, ...props }: CardFooterProps) => react_jsx_runtime.JSX.Element>;
9
-
10
- export { CardFooter };
@@ -1,30 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { StyleSheet } from "react-native";
4
- import { useStyleProps, useThemedStyles } from "@impulse-ui-native/theme";
5
- import { View } from "../atoms/view";
6
- const CardFooter = memo(function CardFooter2({
7
- style,
8
- ...props
9
- }) {
10
- const extractedStyleProps = useStyleProps(props);
11
- const styles = useThemedStyles(themedStyles);
12
- const footerStyle = useMemo(
13
- () => [styles.footer, extractedStyleProps, style],
14
- [extractedStyleProps, style, styles.footer]
15
- );
16
- return /* @__PURE__ */ jsx(View, { ...props, style: footerStyle });
17
- });
18
- function themedStyles(theme) {
19
- const footerTokens = theme.components.card.footer;
20
- return StyleSheet.create({
21
- footer: {
22
- gap: footerTokens.gap,
23
- padding: footerTokens.padding
24
- }
25
- });
26
- }
27
- export {
28
- CardFooter
29
- };
30
- //# sourceMappingURL=footer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/card/footer.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\nimport { StyleSheet } from \"react-native\";\n\nimport type { AppTheme } from \"@impulse-ui-native/theme\";\nimport { useStyleProps, useThemedStyles } from \"@impulse-ui-native/theme\";\n\nimport type { CardFooterProps } from \"../../types\";\nimport { View } from \"../atoms/view\";\n\nexport const CardFooter = memo(function CardFooter({\n style,\n ...props\n}: CardFooterProps) {\n const extractedStyleProps = useStyleProps(props);\n const styles = useThemedStyles(themedStyles);\n const footerStyle = useMemo(\n () => [styles.footer, extractedStyleProps, style],\n [extractedStyleProps, style, styles.footer],\n );\n\n return <View {...props} style={footerStyle} />;\n});\n\nfunction themedStyles(theme: AppTheme) {\n const footerTokens = theme.components.card.footer;\n\n return StyleSheet.create({\n footer: {\n gap: footerTokens.gap,\n padding: footerTokens.padding,\n },\n });\n}\n"],"mappings":"AAoBS;AApBT,SAAS,MAAM,eAAe;AAC9B,SAAS,kBAAkB;AAG3B,SAAS,eAAe,uBAAuB;AAG/C,SAAS,YAAY;AAEd,MAAM,aAAa,KAAK,SAASA,YAAW;AAAA,EACjD;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,QAAM,sBAAsB,cAAc,KAAK;AAC/C,QAAM,SAAS,gBAAgB,YAAY;AAC3C,QAAM,cAAc;AAAA,IAClB,MAAM,CAAC,OAAO,QAAQ,qBAAqB,KAAK;AAAA,IAChD,CAAC,qBAAqB,OAAO,OAAO,MAAM;AAAA,EAC5C;AAEA,SAAO,oBAAC,QAAM,GAAG,OAAO,OAAO,aAAa;AAC9C,CAAC;AAED,SAAS,aAAa,OAAiB;AACrC,QAAM,eAAe,MAAM,WAAW,KAAK;AAE3C,SAAO,WAAW,OAAO;AAAA,IACvB,QAAQ;AAAA,MACN,KAAK,aAAa;AAAA,MAClB,SAAS,aAAa;AAAA,IACxB;AAAA,EACF,CAAC;AACH;","names":["CardFooter"]}
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { CardHeaderProps } from '../../types/card.types.mjs';
4
- import 'react-native';
5
- import '@impulse-ui-native/theme';
6
- import '../../types/view.types.mjs';
7
-
8
- declare const CardHeader: react.MemoExoticComponent<({ style, ...props }: CardHeaderProps) => react_jsx_runtime.JSX.Element>;
9
-
10
- export { CardHeader };
@@ -1,30 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { StyleSheet } from "react-native";
4
- import { useStyleProps, useThemedStyles } from "@impulse-ui-native/theme";
5
- import { View } from "../atoms/view";
6
- const CardHeader = memo(function CardHeader2({
7
- style,
8
- ...props
9
- }) {
10
- const extractedStyleProps = useStyleProps(props);
11
- const styles = useThemedStyles(themedStyles);
12
- const headerStyle = useMemo(
13
- () => [styles.header, extractedStyleProps, style],
14
- [extractedStyleProps, style, styles.header]
15
- );
16
- return /* @__PURE__ */ jsx(View, { ...props, style: headerStyle });
17
- });
18
- function themedStyles(theme) {
19
- const headerTokens = theme.components.card.header;
20
- return StyleSheet.create({
21
- header: {
22
- gap: headerTokens.gap,
23
- padding: headerTokens.padding
24
- }
25
- });
26
- }
27
- export {
28
- CardHeader
29
- };
30
- //# sourceMappingURL=header.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/card/header.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\nimport { StyleSheet } from \"react-native\";\n\nimport type { AppTheme } from \"@impulse-ui-native/theme\";\nimport { useStyleProps, useThemedStyles } from \"@impulse-ui-native/theme\";\n\nimport type { CardHeaderProps } from \"../../types\";\nimport { View } from \"../atoms/view\";\n\nexport const CardHeader = memo(function CardHeader({\n style,\n ...props\n}: CardHeaderProps) {\n const extractedStyleProps = useStyleProps(props);\n const styles = useThemedStyles(themedStyles);\n const headerStyle = useMemo(\n () => [styles.header, extractedStyleProps, style],\n [extractedStyleProps, style, styles.header],\n );\n\n return <View {...props} style={headerStyle} />;\n});\n\nfunction themedStyles(theme: AppTheme) {\n const headerTokens = theme.components.card.header;\n\n return StyleSheet.create({\n header: {\n gap: headerTokens.gap,\n padding: headerTokens.padding,\n },\n });\n}\n"],"mappings":"AAoBS;AApBT,SAAS,MAAM,eAAe;AAC9B,SAAS,kBAAkB;AAG3B,SAAS,eAAe,uBAAuB;AAG/C,SAAS,YAAY;AAEd,MAAM,aAAa,KAAK,SAASA,YAAW;AAAA,EACjD;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,QAAM,sBAAsB,cAAc,KAAK;AAC/C,QAAM,SAAS,gBAAgB,YAAY;AAC3C,QAAM,cAAc;AAAA,IAClB,MAAM,CAAC,OAAO,QAAQ,qBAAqB,KAAK;AAAA,IAChD,CAAC,qBAAqB,OAAO,OAAO,MAAM;AAAA,EAC5C;AAEA,SAAO,oBAAC,QAAM,GAAG,OAAO,OAAO,aAAa;AAC9C,CAAC;AAED,SAAS,aAAa,OAAiB;AACrC,QAAM,eAAe,MAAM,WAAW,KAAK;AAE3C,SAAO,WAAW,OAAO;AAAA,IACvB,QAAQ;AAAA,MACN,KAAK,aAAa;AAAA,MAClB,SAAS,aAAa;AAAA,IACxB;AAAA,EACF,CAAC;AACH;","names":["CardHeader"]}
@@ -1,7 +0,0 @@
1
- export { Card } from './card.mjs';
2
- import 'react';
3
- import 'react/jsx-runtime';
4
- import '../../types/card.types.mjs';
5
- import 'react-native';
6
- import '@impulse-ui-native/theme';
7
- import '../../types/view.types.mjs';
@@ -1,5 +0,0 @@
1
- import { Card } from "./card";
2
- export {
3
- Card
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/card/index.ts"],"sourcesContent":["export { Card } from \"./card\";\n"],"mappings":"AAAA,SAAS,YAAY;","names":[]}
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { CardMediaProps } from '../../types/card.types.mjs';
4
- import 'react-native';
5
- import '@impulse-ui-native/theme';
6
- import '../../types/view.types.mjs';
7
-
8
- declare const CardMedia: react.MemoExoticComponent<({ style, ...props }: CardMediaProps) => react_jsx_runtime.JSX.Element>;
9
-
10
- export { CardMedia };
@@ -1,30 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { StyleSheet } from "react-native";
4
- import { useStyleProps, useThemedStyles } from "@impulse-ui-native/theme";
5
- import { View } from "../atoms/view";
6
- const CardMedia = memo(function CardMedia2({
7
- style,
8
- ...props
9
- }) {
10
- const extractedStyleProps = useStyleProps(props);
11
- const styles = useThemedStyles(themedStyles);
12
- const mediaStyle = useMemo(
13
- () => [styles.media, extractedStyleProps, style],
14
- [extractedStyleProps, style, styles.media]
15
- );
16
- return /* @__PURE__ */ jsx(View, { ...props, style: mediaStyle });
17
- });
18
- function themedStyles(theme) {
19
- return StyleSheet.create({
20
- media: {
21
- backgroundColor: theme.components.card.mediaBackgroundColor,
22
- overflow: "hidden",
23
- width: "100%"
24
- }
25
- });
26
- }
27
- export {
28
- CardMedia
29
- };
30
- //# sourceMappingURL=media.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/card/media.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\nimport { StyleSheet } from \"react-native\";\n\nimport type { AppTheme } from \"@impulse-ui-native/theme\";\nimport { useStyleProps, useThemedStyles } from \"@impulse-ui-native/theme\";\n\nimport type { CardMediaProps } from \"../../types\";\nimport { View } from \"../atoms/view\";\n\nexport const CardMedia = memo(function CardMedia({\n style,\n ...props\n}: CardMediaProps) {\n const extractedStyleProps = useStyleProps(props);\n const styles = useThemedStyles(themedStyles);\n const mediaStyle = useMemo(\n () => [styles.media, extractedStyleProps, style],\n [extractedStyleProps, style, styles.media],\n );\n\n return <View {...props} style={mediaStyle} />;\n});\n\nfunction themedStyles(theme: AppTheme) {\n return StyleSheet.create({\n media: {\n backgroundColor: theme.components.card.mediaBackgroundColor,\n overflow: \"hidden\",\n width: \"100%\",\n },\n });\n}\n"],"mappings":"AAoBS;AApBT,SAAS,MAAM,eAAe;AAC9B,SAAS,kBAAkB;AAG3B,SAAS,eAAe,uBAAuB;AAG/C,SAAS,YAAY;AAEd,MAAM,YAAY,KAAK,SAASA,WAAU;AAAA,EAC/C;AAAA,EACA,GAAG;AACL,GAAmB;AACjB,QAAM,sBAAsB,cAAc,KAAK;AAC/C,QAAM,SAAS,gBAAgB,YAAY;AAC3C,QAAM,aAAa;AAAA,IACjB,MAAM,CAAC,OAAO,OAAO,qBAAqB,KAAK;AAAA,IAC/C,CAAC,qBAAqB,OAAO,OAAO,KAAK;AAAA,EAC3C;AAEA,SAAO,oBAAC,QAAM,GAAG,OAAO,OAAO,YAAY;AAC7C,CAAC;AAED,SAAS,aAAa,OAAiB;AACrC,SAAO,WAAW,OAAO;AAAA,IACvB,OAAO;AAAA,MACL,iBAAiB,MAAM,WAAW,KAAK;AAAA,MACvC,UAAU;AAAA,MACV,OAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;","names":["CardMedia"]}
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { CardPressableProps } from '../../types/card.types.mjs';
4
- import 'react-native';
5
- import '@impulse-ui-native/theme';
6
- import '../../types/view.types.mjs';
7
-
8
- declare const CardPressable: react.MemoExoticComponent<({ disabled, style, ...props }: CardPressableProps) => react_jsx_runtime.JSX.Element>;
9
-
10
- export { CardPressable };