@impulse-ui-native/primitives 4.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 (90) hide show
  1. package/README.md +30 -25
  2. package/dist/components/atoms/avatar.d.mts +1 -1
  3. package/dist/components/atoms/avatar.js +18 -31
  4. package/dist/components/atoms/avatar.js.map +1 -1
  5. package/dist/components/atoms/badge/addon.js +6 -2
  6. package/dist/components/atoms/badge/addon.js.map +1 -1
  7. package/dist/components/atoms/badge/root.d.mts +1 -1
  8. package/dist/components/atoms/badge/root.js +25 -38
  9. package/dist/components/atoms/badge/root.js.map +1 -1
  10. package/dist/components/atoms/button.d.mts +1 -1
  11. package/dist/components/atoms/button.js +2 -20
  12. package/dist/components/atoms/button.js.map +1 -1
  13. package/dist/components/atoms/divider.d.mts +1 -1
  14. package/dist/components/atoms/divider.js +18 -14
  15. package/dist/components/atoms/divider.js.map +1 -1
  16. package/dist/components/atoms/icon-button.d.mts +1 -1
  17. package/dist/components/atoms/icon-button.js +1 -11
  18. package/dist/components/atoms/icon-button.js.map +1 -1
  19. package/dist/components/atoms/index.d.mts +0 -2
  20. package/dist/components/atoms/index.js +0 -2
  21. package/dist/components/atoms/index.js.map +1 -1
  22. package/dist/components/atoms/pressable.js.map +1 -1
  23. package/dist/components/atoms/safe-area-view.js.map +1 -1
  24. package/dist/components/atoms/spinner.d.mts +1 -1
  25. package/dist/components/atoms/spinner.js +8 -29
  26. package/dist/components/atoms/spinner.js.map +1 -1
  27. package/dist/components/atoms/tag.js.map +1 -1
  28. package/dist/components/atoms/typography.js +25 -1
  29. package/dist/components/atoms/typography.js.map +1 -1
  30. package/dist/components/atoms/view.js.map +1 -1
  31. package/dist/components/index.d.mts +0 -4
  32. package/dist/components/index.js +0 -1
  33. package/dist/components/index.js.map +1 -1
  34. package/dist/hocs/create-preset.hoc.d.mts +1 -1
  35. package/dist/hocs/create-preset.hoc.js +23 -8
  36. package/dist/hocs/create-preset.hoc.js.map +1 -1
  37. package/dist/index.d.mts +0 -4
  38. package/dist/types/avatar.types.d.mts +1 -1
  39. package/dist/types/index.d.mts +0 -2
  40. package/dist/types/index.js +0 -2
  41. package/dist/types/index.js.map +1 -1
  42. package/package.json +4 -4
  43. package/dist/components/atoms/circular-progress.d.mts +0 -16
  44. package/dist/components/atoms/circular-progress.js +0 -144
  45. package/dist/components/atoms/circular-progress.js.map +0 -1
  46. package/dist/components/atoms/linear-progress.d.mts +0 -17
  47. package/dist/components/atoms/linear-progress.js +0 -97
  48. package/dist/components/atoms/linear-progress.js.map +0 -1
  49. package/dist/components/atoms/progress.d.mts +0 -9
  50. package/dist/components/atoms/progress.js +0 -94
  51. package/dist/components/atoms/progress.js.map +0 -1
  52. package/dist/components/card/card.d.mts +0 -17
  53. package/dist/components/card/card.js +0 -18
  54. package/dist/components/card/card.js.map +0 -1
  55. package/dist/components/card/content.d.mts +0 -10
  56. package/dist/components/card/content.js +0 -30
  57. package/dist/components/card/content.js.map +0 -1
  58. package/dist/components/card/footer.d.mts +0 -10
  59. package/dist/components/card/footer.js +0 -30
  60. package/dist/components/card/footer.js.map +0 -1
  61. package/dist/components/card/header.d.mts +0 -10
  62. package/dist/components/card/header.js +0 -30
  63. package/dist/components/card/header.js.map +0 -1
  64. package/dist/components/card/index.d.mts +0 -7
  65. package/dist/components/card/index.js +0 -5
  66. package/dist/components/card/index.js.map +0 -1
  67. package/dist/components/card/media.d.mts +0 -10
  68. package/dist/components/card/media.js +0 -30
  69. package/dist/components/card/media.js.map +0 -1
  70. package/dist/components/card/pressable.d.mts +0 -10
  71. package/dist/components/card/pressable.js +0 -45
  72. package/dist/components/card/pressable.js.map +0 -1
  73. package/dist/components/card/root.d.mts +0 -10
  74. package/dist/components/card/root.js +0 -21
  75. package/dist/components/card/root.js.map +0 -1
  76. package/dist/components/card/root.styles.d.mts +0 -13
  77. package/dist/components/card/root.styles.js +0 -17
  78. package/dist/components/card/root.styles.js.map +0 -1
  79. package/dist/hooks/use-indeterminate-progress-animation.hook.d.mts +0 -5
  80. package/dist/hooks/use-indeterminate-progress-animation.hook.js +0 -47
  81. package/dist/hooks/use-indeterminate-progress-animation.hook.js.map +0 -1
  82. package/dist/types/card.types.d.mts +0 -21
  83. package/dist/types/card.types.js +0 -1
  84. package/dist/types/card.types.js.map +0 -1
  85. package/dist/types/progress.types.d.mts +0 -15
  86. package/dist/types/progress.types.js +0 -1
  87. package/dist/types/progress.types.js.map +0 -1
  88. package/dist/utils/progress.utils.d.mts +0 -9
  89. package/dist/utils/progress.utils.js +0 -27
  90. package/dist/utils/progress.utils.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impulse-ui-native/primitives",
3
- "version": "4.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Foundational UI primitives for building ImpulseUI Native components.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -28,9 +28,9 @@
28
28
  ],
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
- "@impulse-ui-native/theme": "4.0.0",
32
- "@impulse-ui-native/icon": "4.0.0",
33
- "@impulse-ui-native/core": "4.0.0"
31
+ "@impulse-ui-native/theme": "6.0.0",
32
+ "@impulse-ui-native/icon": "6.0.0",
33
+ "@impulse-ui-native/core": "6.0.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/react": "~19.2.14",
@@ -1,16 +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 CircularProgressProps extends ViewProps {
6
- animationDuration: number;
7
- fraction: number;
8
- indicatorColor: ColorValue;
9
- indeterminate: boolean;
10
- strokeWidth: number;
11
- trackColor: ColorValue;
12
- width: number;
13
- }
14
- declare const CircularProgress: react.MemoExoticComponent<({ animationDuration, fraction, indicatorColor, indeterminate, strokeWidth, style, trackColor, width, ...props }: CircularProgressProps) => react_jsx_runtime.JSX.Element>;
15
-
16
- export { CircularProgress };
@@ -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, { accessible: false, 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, { accessible: false, 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 accessible={false} 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 accessible={false} 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 alignItems: \"center\",\n justifyContent: \"center\",\n },\n});\n"],"mappings":"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","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;AAAA,MACL,WAAW,YAAY,QAClB,aACA;AAAA,MACL,iBAAiB;AAAA,MACjB;AAAA,MACA,QAAQ;AAAA,MACR,OAAO,GAAG,WAAW,GAAG;AAAA,IAC1B;AAAA,IACA,CAAC,cAAc,UAAU,gBAAgB,WAAW;AAAA,EACtD;AAEA,SACE,oBAAC,QAAM,GAAG,OAAO,UAAU,cAAc,OAAO,YAC7C,0BACC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MACP,OAAO;AAAA,MACP;AAAA,MACA;AAAA;AAAA,EACF,IAEA,oBAAC,QAAK,OAAO,2BAA2B,GAE5C;AAEJ,CAAC;AAWD,MAAM,+BAA+B;AAAA,EACnC,SAASC,8BAA6B;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAAsC;AACpC,UAAM,WAAW,kCAAkC,iBAAiB;AACpE,UAAM,iBAAiB,aAAa;AACpC,UAAM,aAAa,SAAS,YAAY;AAAA,MACtC,YAAY,CAAC,GAAG,CAAC;AAAA,MACjB,aAAa,YAAY,QACrB,CAAC,YAAY,CAAC,cAAc,IAC5B,CAAC,CAAC,gBAAgB,UAAU;AAAA,IAClC,CAAC;AAED,UAAM,iBAAiB;AAAA,MACrB,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB;AAAA,QACA,QAAQ;AAAA,QACR,WAAW,CAAC,EAAE,WAAW,CAAC;AAAA,QAC1B,OAAO,GAAG,QAAQ,GAAG;AAAA,MACvB;AAAA,MACA,CAAC,cAAc,OAAO,OAAO,aAAa,UAAU;AAAA,IACtD;AAEA,WAAO,oBAAC,SAAS,MAAT,EAAc,OAAO,gBAAgB;AAAA,EAC/C;AACF;AAEA,MAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,OAAO;AAAA,IACL,UAAU;AAAA,IACV,OAAO;AAAA,EACT;AACF,CAAC;","names":["LinearProgress","LinearIndeterminateIndicator"]}
@@ -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<({ accessibilityRole, accessibilityState, accessibilityValue, accessible, color, max, min, size, tone, trackColor, value, variant, ...props }: ProgressProps) => react_jsx_runtime.JSX.Element>;
8
-
9
- export { Progress };
@@ -1,94 +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
- accessibilityRole = "progressbar",
9
- accessibilityState,
10
- accessibilityValue,
11
- accessible = true,
12
- color,
13
- max = 100,
14
- min = 0,
15
- size = "medium",
16
- tone = "primary",
17
- trackColor,
18
- value,
19
- variant = "linear",
20
- ...props
21
- }) {
22
- const tokens = useComponentsTokens().progress;
23
- const sizeTokens = tokens.sizes[size];
24
- const colorTokens = tokens.colors[tone];
25
- const normalized = useMemo(
26
- () => normalizeProgressValue(value, min, max),
27
- [max, min, value]
28
- );
29
- const indeterminate = normalized.value === void 0;
30
- const resolvedAccessibilityState = useMemo(
31
- () => ({
32
- ...accessibilityState,
33
- busy: indeterminate ? true : accessibilityState?.busy
34
- }),
35
- [accessibilityState, indeterminate]
36
- );
37
- const resolvedAccessibilityValue = useMemo(
38
- () => ({
39
- ...accessibilityValue,
40
- max: indeterminate ? void 0 : normalized.max,
41
- min: indeterminate ? void 0 : normalized.min,
42
- now: indeterminate ? void 0 : normalized.value
43
- }),
44
- [accessibilityValue, indeterminate, normalized]
45
- );
46
- const commonProps = useMemo(
47
- () => ({
48
- ...props,
49
- accessibilityRole,
50
- accessibilityState: resolvedAccessibilityState,
51
- accessibilityValue: resolvedAccessibilityValue,
52
- accessible,
53
- animationDuration: tokens.animationDuration,
54
- fraction: normalized.fraction,
55
- indicatorColor: color ?? colorTokens.indicatorColor,
56
- indeterminate,
57
- trackColor: trackColor ?? colorTokens.trackColor
58
- }),
59
- [
60
- accessibilityRole,
61
- accessible,
62
- color,
63
- colorTokens.indicatorColor,
64
- colorTokens.trackColor,
65
- indeterminate,
66
- normalized.fraction,
67
- props,
68
- resolvedAccessibilityState,
69
- resolvedAccessibilityValue,
70
- tokens.animationDuration,
71
- trackColor
72
- ]
73
- );
74
- return variant === "circular" ? /* @__PURE__ */ jsx(
75
- CircularProgress,
76
- {
77
- ...commonProps,
78
- strokeWidth: sizeTokens.circularStrokeWidth,
79
- width: sizeTokens.circularSize
80
- }
81
- ) : /* @__PURE__ */ jsx(
82
- LinearProgress,
83
- {
84
- ...commonProps,
85
- borderRadius: tokens.borderRadius,
86
- indeterminateWidth: tokens.indeterminateLinearWidth,
87
- trackHeight: sizeTokens.linearHeight
88
- }
89
- );
90
- });
91
- export {
92
- Progress
93
- };
94
- //# sourceMappingURL=progress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/atoms/progress.tsx"],"sourcesContent":["import type { AccessibilityState, AccessibilityValue } from \"react-native\";\nimport { 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 accessibilityRole = \"progressbar\",\n accessibilityState,\n accessibilityValue,\n accessible = true,\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 resolvedAccessibilityState = useMemo<AccessibilityState>(\n () => ({\n ...accessibilityState,\n busy: indeterminate ? true : accessibilityState?.busy,\n }),\n [accessibilityState, indeterminate],\n );\n\n const resolvedAccessibilityValue = useMemo<AccessibilityValue>(\n () => ({\n ...accessibilityValue,\n max: indeterminate ? undefined : normalized.max,\n min: indeterminate ? undefined : normalized.min,\n now: indeterminate ? undefined : normalized.value,\n }),\n [accessibilityValue, indeterminate, normalized],\n );\n\n const commonProps = useMemo(\n () => ({\n ...props,\n accessibilityRole,\n accessibilityState: resolvedAccessibilityState,\n accessibilityValue: resolvedAccessibilityValue,\n accessible,\n animationDuration: tokens.animationDuration,\n fraction: normalized.fraction,\n indicatorColor: color ?? colorTokens.indicatorColor,\n indeterminate,\n trackColor: trackColor ?? colorTokens.trackColor,\n }),\n [\n accessibilityRole,\n accessible,\n color,\n colorTokens.indicatorColor,\n colorTokens.trackColor,\n indeterminate,\n normalized.fraction,\n props,\n resolvedAccessibilityState,\n resolvedAccessibilityValue,\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":"AAkFI;AAjFJ,SAAS,MAAM,eAAe;AAE9B,SAAS,2BAA2B;AAGpC,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAExB,MAAM,WAAW,KAAK,SAASA,UAAS;AAAA,EAC7C,oBAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;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,6BAA6B;AAAA,IACjC,OAAO;AAAA,MACL,GAAG;AAAA,MACH,MAAM,gBAAgB,OAAO,oBAAoB;AAAA,IACnD;AAAA,IACA,CAAC,oBAAoB,aAAa;AAAA,EACpC;AAEA,QAAM,6BAA6B;AAAA,IACjC,OAAO;AAAA,MACL,GAAG;AAAA,MACH,KAAK,gBAAgB,SAAY,WAAW;AAAA,MAC5C,KAAK,gBAAgB,SAAY,WAAW;AAAA,MAC5C,KAAK,gBAAgB,SAAY,WAAW;AAAA,IAC9C;AAAA,IACA,CAAC,oBAAoB,eAAe,UAAU;AAAA,EAChD;AAEA,QAAM,cAAc;AAAA,IAClB,OAAO;AAAA,MACL,GAAG;AAAA,MACH;AAAA,MACA,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,MACpB;AAAA,MACA,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;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;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<({ accessibilityRole, accessibilityState, 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":[]}