@impulse-ui-native/primitives 2.7.0 → 2.8.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 (99) hide show
  1. package/README.md +49 -3
  2. package/dist/components/atoms/avatar.d.mts +10 -0
  3. package/dist/components/atoms/avatar.js +161 -0
  4. package/dist/components/atoms/avatar.js.map +1 -0
  5. package/dist/components/atoms/button.js +4 -3
  6. package/dist/components/atoms/button.js.map +1 -1
  7. package/dist/components/atoms/circular-progress.d.mts +16 -0
  8. package/dist/components/atoms/circular-progress.js +144 -0
  9. package/dist/components/atoms/circular-progress.js.map +1 -0
  10. package/dist/components/atoms/divider.d.mts +10 -0
  11. package/dist/components/atoms/divider.js +48 -0
  12. package/dist/components/atoms/divider.js.map +1 -0
  13. package/dist/components/atoms/icon-button.js +3 -2
  14. package/dist/components/atoms/icon-button.js.map +1 -1
  15. package/dist/components/atoms/index.d.mts +11 -2
  16. package/dist/components/atoms/index.js +8 -0
  17. package/dist/components/atoms/index.js.map +1 -1
  18. package/dist/components/atoms/linear-progress.d.mts +17 -0
  19. package/dist/components/atoms/linear-progress.js +97 -0
  20. package/dist/components/atoms/linear-progress.js.map +1 -0
  21. package/dist/components/atoms/pressable.d.mts +4 -4
  22. package/dist/components/atoms/pressable.js +48 -43
  23. package/dist/components/atoms/pressable.js.map +1 -1
  24. package/dist/components/atoms/progress.d.mts +9 -0
  25. package/dist/components/atoms/progress.js +94 -0
  26. package/dist/components/atoms/progress.js.map +1 -0
  27. package/dist/components/atoms/spinner.d.mts +9 -0
  28. package/dist/components/atoms/spinner.js +74 -0
  29. package/dist/components/atoms/spinner.js.map +1 -0
  30. package/dist/components/card/card.d.mts +17 -0
  31. package/dist/components/card/card.js +18 -0
  32. package/dist/components/card/card.js.map +1 -0
  33. package/dist/components/card/content.d.mts +10 -0
  34. package/dist/components/card/content.js +27 -0
  35. package/dist/components/card/content.js.map +1 -0
  36. package/dist/components/card/footer.d.mts +10 -0
  37. package/dist/components/card/footer.js +27 -0
  38. package/dist/components/card/footer.js.map +1 -0
  39. package/dist/components/card/header.d.mts +10 -0
  40. package/dist/components/card/header.js +27 -0
  41. package/dist/components/card/header.js.map +1 -0
  42. package/dist/components/card/index.d.mts +7 -0
  43. package/dist/components/card/index.js +5 -0
  44. package/dist/components/card/index.js.map +1 -0
  45. package/dist/components/card/media.d.mts +10 -0
  46. package/dist/components/card/media.js +32 -0
  47. package/dist/components/card/media.js.map +1 -0
  48. package/dist/components/card/pressable.d.mts +10 -0
  49. package/dist/components/card/pressable.js +45 -0
  50. package/dist/components/card/pressable.js.map +1 -0
  51. package/dist/components/card/root.d.mts +10 -0
  52. package/dist/components/card/root.js +21 -0
  53. package/dist/components/card/root.js.map +1 -0
  54. package/dist/components/card/root.styles.d.mts +13 -0
  55. package/dist/components/card/root.styles.js +17 -0
  56. package/dist/components/card/root.styles.js.map +1 -0
  57. package/dist/components/controls/addon.d.mts +1 -0
  58. package/dist/components/controls/container.d.mts +1 -0
  59. package/dist/components/controls/control.d.mts +3 -2
  60. package/dist/components/controls/error.d.mts +1 -0
  61. package/dist/components/controls/index.d.mts +1 -0
  62. package/dist/components/controls/input.d.mts +1 -0
  63. package/dist/components/controls/label.d.mts +1 -0
  64. package/dist/components/controls/loader.d.mts +7 -1
  65. package/dist/components/controls/loader.js +3 -3
  66. package/dist/components/controls/loader.js.map +1 -1
  67. package/dist/components/controls/placeholder.d.mts +1 -0
  68. package/dist/components/controls/provider.d.mts +1 -0
  69. package/dist/components/controls/value.d.mts +1 -0
  70. package/dist/components/index.d.mts +13 -3
  71. package/dist/components/index.js +1 -0
  72. package/dist/components/index.js.map +1 -1
  73. package/dist/hooks/use-indeterminate-progress-animation.hook.d.mts +5 -0
  74. package/dist/hooks/use-indeterminate-progress-animation.hook.js +47 -0
  75. package/dist/hooks/use-indeterminate-progress-animation.hook.js.map +1 -0
  76. package/dist/index.d.mts +11 -1
  77. package/dist/types/avatar.types.d.mts +20 -0
  78. package/dist/types/avatar.types.js +1 -0
  79. package/dist/types/avatar.types.js.map +1 -0
  80. package/dist/types/card.types.d.mts +21 -0
  81. package/dist/types/card.types.js +1 -0
  82. package/dist/types/card.types.js.map +1 -0
  83. package/dist/types/control-components.types.d.mts +3 -2
  84. package/dist/types/divider.types.d.mts +14 -0
  85. package/dist/types/divider.types.js +1 -0
  86. package/dist/types/divider.types.js.map +1 -0
  87. package/dist/types/index.d.mts +6 -1
  88. package/dist/types/index.js +5 -0
  89. package/dist/types/index.js.map +1 -1
  90. package/dist/types/progress.types.d.mts +15 -0
  91. package/dist/types/progress.types.js +1 -0
  92. package/dist/types/progress.types.js.map +1 -0
  93. package/dist/types/spinner.types.d.mts +9 -0
  94. package/dist/types/spinner.types.js +1 -0
  95. package/dist/types/spinner.types.js.map +1 -0
  96. package/dist/utils/progress.utils.d.mts +9 -0
  97. package/dist/utils/progress.utils.js +27 -0
  98. package/dist/utils/progress.utils.js.map +1 -0
  99. package/package.json +8 -6
@@ -0,0 +1,10 @@
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 };
@@ -0,0 +1,27 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { memo, useMemo } from "react";
3
+ import { useComponentsTokens, useStyleProps } from "@impulse-ui-native/theme";
4
+ import { View } from "../atoms/view";
5
+ const CardHeader = memo(function CardHeader2({
6
+ style,
7
+ ...props
8
+ }) {
9
+ const tokens = useComponentsTokens().card.header;
10
+ const extractedStyleProps = useStyleProps(props);
11
+ const headerStyle = useMemo(
12
+ () => [
13
+ {
14
+ gap: tokens.gap,
15
+ padding: tokens.padding
16
+ },
17
+ extractedStyleProps,
18
+ style
19
+ ],
20
+ [extractedStyleProps, style, tokens]
21
+ );
22
+ return /* @__PURE__ */ jsx(View, { ...props, style: headerStyle });
23
+ });
24
+ export {
25
+ CardHeader
26
+ };
27
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/card/header.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\n\nimport { useComponentsTokens, useStyleProps } 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 tokens = useComponentsTokens().card.header;\n const extractedStyleProps = useStyleProps(props);\n const headerStyle = useMemo(\n () => [\n {\n gap: tokens.gap,\n padding: tokens.padding,\n },\n extractedStyleProps,\n style,\n ],\n [extractedStyleProps, style, tokens],\n );\n\n return <View {...props} style={headerStyle} />;\n});\n"],"mappings":"AAyBS;AAzBT,SAAS,MAAM,eAAe;AAE9B,SAAS,qBAAqB,qBAAqB;AAGnD,SAAS,YAAY;AAEd,MAAM,aAAa,KAAK,SAASA,YAAW;AAAA,EACjD;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,QAAM,SAAS,oBAAoB,EAAE,KAAK;AAC1C,QAAM,sBAAsB,cAAc,KAAK;AAC/C,QAAM,cAAc;AAAA,IAClB,MAAM;AAAA,MACJ;AAAA,QACE,KAAK,OAAO;AAAA,QACZ,SAAS,OAAO;AAAA,MAClB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,qBAAqB,OAAO,MAAM;AAAA,EACrC;AAEA,SAAO,oBAAC,QAAM,GAAG,OAAO,OAAO,aAAa;AAC9C,CAAC;","names":["CardHeader"]}
@@ -0,0 +1,7 @@
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';
@@ -0,0 +1,5 @@
1
+ import { Card } from "./card";
2
+ export {
3
+ Card
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/card/index.ts"],"sourcesContent":["export { Card } from \"./card\";\n"],"mappings":"AAAA,SAAS,YAAY;","names":[]}
@@ -0,0 +1,10 @@
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 };
@@ -0,0 +1,32 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { memo, useMemo } from "react";
3
+ import { StyleSheet } from "react-native";
4
+ import { useComponentsTokens, useStyleProps } from "@impulse-ui-native/theme";
5
+ import { View } from "../atoms/view";
6
+ const CardMedia = memo(function CardMedia2({
7
+ style,
8
+ ...props
9
+ }) {
10
+ const tokens = useComponentsTokens().card;
11
+ const extractedStyleProps = useStyleProps(props);
12
+ const mediaStyle = useMemo(
13
+ () => [
14
+ styles.media,
15
+ { backgroundColor: tokens.mediaBackgroundColor },
16
+ extractedStyleProps,
17
+ style
18
+ ],
19
+ [extractedStyleProps, style, tokens.mediaBackgroundColor]
20
+ );
21
+ return /* @__PURE__ */ jsx(View, { ...props, style: mediaStyle });
22
+ });
23
+ const styles = StyleSheet.create({
24
+ media: {
25
+ overflow: "hidden",
26
+ width: "100%"
27
+ }
28
+ });
29
+ export {
30
+ CardMedia
31
+ };
32
+ //# sourceMappingURL=media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/card/media.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\nimport { StyleSheet } from \"react-native\";\n\nimport { useComponentsTokens, useStyleProps } 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 tokens = useComponentsTokens().card;\n const extractedStyleProps = useStyleProps(props);\n const mediaStyle = useMemo(\n () => [\n styles.media,\n { backgroundColor: tokens.mediaBackgroundColor },\n extractedStyleProps,\n style,\n ],\n [extractedStyleProps, style, tokens.mediaBackgroundColor],\n );\n\n return <View {...props} style={mediaStyle} />;\n});\n\nconst styles = StyleSheet.create({\n media: {\n overflow: \"hidden\",\n width: \"100%\",\n },\n});\n"],"mappings":"AAwBS;AAxBT,SAAS,MAAM,eAAe;AAC9B,SAAS,kBAAkB;AAE3B,SAAS,qBAAqB,qBAAqB;AAGnD,SAAS,YAAY;AAEd,MAAM,YAAY,KAAK,SAASA,WAAU;AAAA,EAC/C;AAAA,EACA,GAAG;AACL,GAAmB;AACjB,QAAM,SAAS,oBAAoB,EAAE;AACrC,QAAM,sBAAsB,cAAc,KAAK;AAC/C,QAAM,aAAa;AAAA,IACjB,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,EAAE,iBAAiB,OAAO,qBAAqB;AAAA,MAC/C;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,qBAAqB,OAAO,OAAO,oBAAoB;AAAA,EAC1D;AAEA,SAAO,oBAAC,QAAM,GAAG,OAAO,OAAO,YAAY;AAC7C,CAAC;AAED,MAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,OAAO;AAAA,IACL,UAAU;AAAA,IACV,OAAO;AAAA,EACT;AACF,CAAC;","names":["CardMedia"]}
@@ -0,0 +1,10 @@
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<({ accessibilityRole, accessibilityState, disabled, style, ...props }: CardPressableProps) => react_jsx_runtime.JSX.Element>;
9
+
10
+ export { CardPressable };
@@ -0,0 +1,45 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { memo, useCallback, useMemo } from "react";
3
+ import { StyleSheet } from "react-native";
4
+ import { useStyleProps, useThemedStyles } from "@impulse-ui-native/theme";
5
+ import { Pressable } from "../atoms/pressable";
6
+ import { cardRootStyles } from "./root.styles";
7
+ const CardPressable = memo(function CardPressable2({
8
+ accessibilityRole = "button",
9
+ accessibilityState,
10
+ disabled,
11
+ style,
12
+ ...props
13
+ }) {
14
+ const styles = useThemedStyles(cardRootStyles);
15
+ const extractedStyleProps = useStyleProps(props);
16
+ const resolvedAccessibilityState = useMemo(
17
+ () => ({
18
+ ...accessibilityState,
19
+ disabled: disabled === true
20
+ }),
21
+ [accessibilityState, disabled]
22
+ );
23
+ const rootStyle = useCallback(
24
+ (state) => StyleSheet.flatten([
25
+ styles.root,
26
+ extractedStyleProps,
27
+ typeof style === "function" ? style(state) : style
28
+ ]),
29
+ [extractedStyleProps, style, styles.root]
30
+ );
31
+ return /* @__PURE__ */ jsx(
32
+ Pressable,
33
+ {
34
+ ...props,
35
+ accessibilityRole,
36
+ accessibilityState: resolvedAccessibilityState,
37
+ disabled: disabled === true,
38
+ style: rootStyle
39
+ }
40
+ );
41
+ });
42
+ export {
43
+ CardPressable
44
+ };
45
+ //# sourceMappingURL=pressable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/card/pressable.tsx"],"sourcesContent":["import type {\n AccessibilityState,\n PressableStateCallbackType,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport { memo, useCallback, useMemo } from \"react\";\nimport { StyleSheet } from \"react-native\";\n\nimport { useStyleProps, useThemedStyles } from \"@impulse-ui-native/theme\";\n\nimport type { CardPressableProps } from \"../../types\";\nimport { Pressable } from \"../atoms/pressable\";\nimport { cardRootStyles } from \"./root.styles\";\n\nexport const CardPressable = memo(function CardPressable({\n accessibilityRole = \"button\",\n accessibilityState,\n disabled,\n style,\n ...props\n}: CardPressableProps) {\n const styles = useThemedStyles(cardRootStyles);\n const extractedStyleProps = useStyleProps(props);\n\n const resolvedAccessibilityState = useMemo<AccessibilityState>(\n () => ({\n ...accessibilityState,\n disabled: disabled === true,\n }),\n [accessibilityState, disabled],\n );\n\n const rootStyle = useCallback(\n (state: PressableStateCallbackType): StyleProp<ViewStyle> =>\n StyleSheet.flatten([\n styles.root,\n extractedStyleProps,\n typeof style === \"function\" ? style(state) : style,\n ]),\n [extractedStyleProps, style, styles.root],\n );\n\n return (\n <Pressable\n {...props}\n accessibilityRole={accessibilityRole}\n accessibilityState={resolvedAccessibilityState}\n disabled={disabled === true}\n style={rootStyle}\n />\n );\n});\n"],"mappings":"AA4CI;AAtCJ,SAAS,MAAM,aAAa,eAAe;AAC3C,SAAS,kBAAkB;AAE3B,SAAS,eAAe,uBAAuB;AAG/C,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAExB,MAAM,gBAAgB,KAAK,SAASA,eAAc;AAAA,EACvD,oBAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAuB;AACrB,QAAM,SAAS,gBAAgB,cAAc;AAC7C,QAAM,sBAAsB,cAAc,KAAK;AAE/C,QAAM,6BAA6B;AAAA,IACjC,OAAO;AAAA,MACL,GAAG;AAAA,MACH,UAAU,aAAa;AAAA,IACzB;AAAA,IACA,CAAC,oBAAoB,QAAQ;AAAA,EAC/B;AAEA,QAAM,YAAY;AAAA,IAChB,CAAC,UACC,WAAW,QAAQ;AAAA,MACjB,OAAO;AAAA,MACP;AAAA,MACA,OAAO,UAAU,aAAa,MAAM,KAAK,IAAI;AAAA,IAC/C,CAAC;AAAA,IACH,CAAC,qBAAqB,OAAO,OAAO,IAAI;AAAA,EAC1C;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,oBAAoB;AAAA,MACpB,UAAU,aAAa;AAAA,MACvB,OAAO;AAAA;AAAA,EACT;AAEJ,CAAC;","names":["CardPressable"]}
@@ -0,0 +1,10 @@
1
+ import * as react from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { CardRootProps } 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 CardRoot: react.MemoExoticComponent<({ style, ...props }: CardRootProps) => react_jsx_runtime.JSX.Element>;
9
+
10
+ export { CardRoot };
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { memo, useMemo } from "react";
3
+ import { useStyleProps, useThemedStyles } from "@impulse-ui-native/theme";
4
+ import { View } from "../atoms/view";
5
+ import { cardRootStyles } from "./root.styles";
6
+ const CardRoot = memo(function CardRoot2({
7
+ style,
8
+ ...props
9
+ }) {
10
+ const styles = useThemedStyles(cardRootStyles);
11
+ const extractedStyleProps = useStyleProps(props);
12
+ const rootStyle = useMemo(
13
+ () => [styles.root, extractedStyleProps, style],
14
+ [extractedStyleProps, style, styles.root]
15
+ );
16
+ return /* @__PURE__ */ jsx(View, { ...props, style: rootStyle });
17
+ });
18
+ export {
19
+ CardRoot
20
+ };
21
+ //# sourceMappingURL=root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/card/root.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\n\nimport { useStyleProps, useThemedStyles } from \"@impulse-ui-native/theme\";\n\nimport type { CardRootProps } from \"../../types\";\nimport { View } from \"../atoms/view\";\nimport { cardRootStyles } from \"./root.styles\";\n\nexport const CardRoot = memo(function CardRoot({\n style,\n ...props\n}: CardRootProps) {\n const styles = useThemedStyles(cardRootStyles);\n const extractedStyleProps = useStyleProps(props);\n const rootStyle = useMemo(\n () => [styles.root, extractedStyleProps, style],\n [extractedStyleProps, style, styles.root],\n );\n\n return <View {...props} style={rootStyle} />;\n});\n"],"mappings":"AAmBS;AAnBT,SAAS,MAAM,eAAe;AAE9B,SAAS,eAAe,uBAAuB;AAG/C,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAExB,MAAM,WAAW,KAAK,SAASA,UAAS;AAAA,EAC7C;AAAA,EACA,GAAG;AACL,GAAkB;AAChB,QAAM,SAAS,gBAAgB,cAAc;AAC7C,QAAM,sBAAsB,cAAc,KAAK;AAC/C,QAAM,YAAY;AAAA,IAChB,MAAM,CAAC,OAAO,MAAM,qBAAqB,KAAK;AAAA,IAC9C,CAAC,qBAAqB,OAAO,OAAO,IAAI;AAAA,EAC1C;AAEA,SAAO,oBAAC,QAAM,GAAG,OAAO,OAAO,WAAW;AAC5C,CAAC;","names":["CardRoot"]}
@@ -0,0 +1,13 @@
1
+ import { AppTheme } from '@impulse-ui-native/theme';
2
+
3
+ declare function cardRootStyles(theme: AppTheme): {
4
+ root: {
5
+ overflow: "hidden";
6
+ backgroundColor: string;
7
+ borderColor: string;
8
+ borderRadius: number;
9
+ borderWidth: number;
10
+ };
11
+ };
12
+
13
+ export { cardRootStyles };
@@ -0,0 +1,17 @@
1
+ import { StyleSheet } from "react-native";
2
+ function cardRootStyles(theme) {
3
+ const tokens = theme.components.card;
4
+ return StyleSheet.create({
5
+ root: {
6
+ overflow: "hidden",
7
+ backgroundColor: tokens.backgroundColor,
8
+ borderColor: tokens.borderColor,
9
+ borderRadius: tokens.borderRadius,
10
+ borderWidth: tokens.borderWidth
11
+ }
12
+ });
13
+ }
14
+ export {
15
+ cardRootStyles
16
+ };
17
+ //# sourceMappingURL=root.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/card/root.styles.ts"],"sourcesContent":["import { StyleSheet } from \"react-native\";\n\nimport type { AppTheme } from \"@impulse-ui-native/theme\";\n\nexport function cardRootStyles(theme: AppTheme) {\n const tokens = theme.components.card;\n\n return StyleSheet.create({\n root: {\n overflow: \"hidden\",\n backgroundColor: tokens.backgroundColor,\n borderColor: tokens.borderColor,\n borderRadius: tokens.borderRadius,\n borderWidth: tokens.borderWidth,\n },\n });\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAIpB,SAAS,eAAe,OAAiB;AAC9C,QAAM,SAAS,MAAM,WAAW;AAEhC,SAAO,WAAW,OAAO;AAAA,IACvB,MAAM;AAAA,MACJ,UAAU;AAAA,MACV,iBAAiB,OAAO;AAAA,MACxB,aAAa,OAAO;AAAA,MACpB,cAAc,OAAO;AAAA,MACrB,aAAa,OAAO;AAAA,IACtB;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -4,6 +4,7 @@ import { ControlAddonProps } from '../../types/control-components.types.mjs';
4
4
  import 'react-native';
5
5
  import '@impulse-ui-native/icon/types';
6
6
  import '@impulse-ui-native/theme';
7
+ import '../../types/spinner.types.mjs';
7
8
  import '../../types/button.types.mjs';
8
9
 
9
10
  declare const ControlAddon: react.MemoExoticComponent<(props: ControlAddonProps) => react_jsx_runtime.JSX.Element | null>;
@@ -4,6 +4,7 @@ import { ControlContainerProps } from '../../types/control-components.types.mjs'
4
4
  import 'react-native';
5
5
  import '@impulse-ui-native/icon/types';
6
6
  import '@impulse-ui-native/theme';
7
+ import '../../types/spinner.types.mjs';
7
8
  import '../../types/button.types.mjs';
8
9
 
9
10
  declare const ControlContainer: react.MemoExoticComponent<(props: ControlContainerProps) => react_jsx_runtime.JSX.Element>;
@@ -1,10 +1,11 @@
1
1
  import * as react from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { ViewProps } from '../../types/view.types.mjs';
4
- import { ControlContainerProps, ControlContextData, ControlLabelProps, ControlErrorLabelProps, ControlAddonProps, ControlInputProps, ControlPlaceholderProps, ControlValueProps } from '../../types/control-components.types.mjs';
4
+ import { ControlContainerProps, ControlContextData, ControlLabelProps, ControlErrorLabelProps, ControlAddonProps, ControlInputProps, ControlPlaceholderProps, ControlValueProps, ControlLoaderProps } from '../../types/control-components.types.mjs';
5
5
  import 'react-native';
6
6
  import '@impulse-ui-native/theme';
7
7
  import '@impulse-ui-native/icon/types';
8
+ import '../../types/spinner.types.mjs';
8
9
  import '../../types/button.types.mjs';
9
10
 
10
11
  declare const Control: {
@@ -17,7 +18,7 @@ declare const Control: {
17
18
  Input: react.MemoExoticComponent<(props: ControlInputProps) => react_jsx_runtime.JSX.Element>;
18
19
  Placeholder: react.MemoExoticComponent<(props: ControlPlaceholderProps) => react_jsx_runtime.JSX.Element>;
19
20
  Value: react.MemoExoticComponent<(props: ControlValueProps) => react_jsx_runtime.JSX.Element>;
20
- Loader: react.MemoExoticComponent<() => react_jsx_runtime.JSX.Element>;
21
+ Loader: react.MemoExoticComponent<(props: ControlLoaderProps) => react_jsx_runtime.JSX.Element>;
21
22
  };
22
23
 
23
24
  export { Control };
@@ -4,6 +4,7 @@ import { ControlErrorLabelProps } from '../../types/control-components.types.mjs
4
4
  import 'react-native';
5
5
  import '@impulse-ui-native/icon/types';
6
6
  import '@impulse-ui-native/theme';
7
+ import '../../types/spinner.types.mjs';
7
8
  import '../../types/button.types.mjs';
8
9
 
9
10
  declare const ControlError: react.MemoExoticComponent<(props: ControlErrorLabelProps) => react_jsx_runtime.JSX.Element | null>;
@@ -7,4 +7,5 @@ import 'react-native';
7
7
  import '@impulse-ui-native/theme';
8
8
  import '../../types/control-components.types.mjs';
9
9
  import '@impulse-ui-native/icon/types';
10
+ import '../../types/spinner.types.mjs';
10
11
  import '../../types/button.types.mjs';
@@ -4,6 +4,7 @@ import { ControlInputProps } from '../../types/control-components.types.mjs';
4
4
  import 'react-native';
5
5
  import '@impulse-ui-native/icon/types';
6
6
  import '@impulse-ui-native/theme';
7
+ import '../../types/spinner.types.mjs';
7
8
  import '../../types/button.types.mjs';
8
9
 
9
10
  declare const ControlInput: react.MemoExoticComponent<(props: ControlInputProps) => react_jsx_runtime.JSX.Element>;
@@ -4,6 +4,7 @@ import { ControlLabelProps } from '../../types/control-components.types.mjs';
4
4
  import 'react-native';
5
5
  import '@impulse-ui-native/icon/types';
6
6
  import '@impulse-ui-native/theme';
7
+ import '../../types/spinner.types.mjs';
7
8
  import '../../types/button.types.mjs';
8
9
 
9
10
  declare const ControlLabel: react.MemoExoticComponent<(props: ControlLabelProps) => react_jsx_runtime.JSX.Element | null>;
@@ -1,6 +1,12 @@
1
1
  import * as react from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { ControlLoaderProps } from '../../types/control-components.types.mjs';
4
+ import 'react-native';
5
+ import '@impulse-ui-native/icon/types';
6
+ import '@impulse-ui-native/theme';
7
+ import '../../types/spinner.types.mjs';
8
+ import '../../types/button.types.mjs';
3
9
 
4
- declare const ControlLoader: react.MemoExoticComponent<() => react_jsx_runtime.JSX.Element>;
10
+ declare const ControlLoader: react.MemoExoticComponent<(props: ControlLoaderProps) => react_jsx_runtime.JSX.Element>;
5
11
 
6
12
  export { ControlLoader };
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { memo } from "react";
3
- import { ActivityIndicator } from "react-native";
4
- const ControlLoader = memo(function ControlLoader2() {
5
- return /* @__PURE__ */ jsx(ActivityIndicator, {});
3
+ import { Spinner } from "../atoms/spinner";
4
+ const ControlLoader = memo(function ControlLoader2(props) {
5
+ return /* @__PURE__ */ jsx(Spinner, { ...props });
6
6
  });
7
7
  export {
8
8
  ControlLoader
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/controls/loader.tsx"],"sourcesContent":["import { memo } from \"react\";\nimport { ActivityIndicator } from \"react-native\";\n\nexport const ControlLoader = memo(function ControlLoader() {\n return <ActivityIndicator />;\n});\n"],"mappings":"AAIS;AAJT,SAAS,YAAY;AACrB,SAAS,yBAAyB;AAE3B,MAAM,gBAAgB,KAAK,SAASA,iBAAgB;AACzD,SAAO,oBAAC,qBAAkB;AAC5B,CAAC;","names":["ControlLoader"]}
1
+ {"version":3,"sources":["../../../src/components/controls/loader.tsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport type { ControlLoaderProps } from \"../../types\";\nimport { Spinner } from \"../atoms/spinner\";\n\nexport const ControlLoader = memo(function ControlLoader(\n props: ControlLoaderProps,\n) {\n return <Spinner {...props} />;\n});\n"],"mappings":"AAQS;AART,SAAS,YAAY;AAGrB,SAAS,eAAe;AAEjB,MAAM,gBAAgB,KAAK,SAASA,eACzC,OACA;AACA,SAAO,oBAAC,WAAS,GAAG,OAAO;AAC7B,CAAC;","names":["ControlLoader"]}
@@ -4,6 +4,7 @@ import { ControlPlaceholderProps } from '../../types/control-components.types.mj
4
4
  import 'react-native';
5
5
  import '@impulse-ui-native/icon/types';
6
6
  import '@impulse-ui-native/theme';
7
+ import '../../types/spinner.types.mjs';
7
8
  import '../../types/button.types.mjs';
8
9
 
9
10
  declare const ControlPlaceholder: react.MemoExoticComponent<(props: ControlPlaceholderProps) => react_jsx_runtime.JSX.Element>;
@@ -5,6 +5,7 @@ import { ControlContextData } from '../../types/control-components.types.mjs';
5
5
  import 'react-native';
6
6
  import '@impulse-ui-native/icon/types';
7
7
  import '@impulse-ui-native/theme';
8
+ import '../../types/spinner.types.mjs';
8
9
  import '../../types/button.types.mjs';
9
10
 
10
11
  declare const ControlProvider: react.MemoExoticComponent<(props: PropsWithChildren<ControlContextData>) => react_jsx_runtime.JSX.Element>;
@@ -4,6 +4,7 @@ import { ControlValueProps } from '../../types/control-components.types.mjs';
4
4
  import 'react-native';
5
5
  import '@impulse-ui-native/icon/types';
6
6
  import '@impulse-ui-native/theme';
7
+ import '../../types/spinner.types.mjs';
7
8
  import '../../types/button.types.mjs';
8
9
 
9
10
  declare const ControlValue: react.MemoExoticComponent<(props: ControlValueProps) => react_jsx_runtime.JSX.Element>;
@@ -1,22 +1,32 @@
1
+ export { Avatar } from './atoms/avatar.mjs';
1
2
  export { View } from './atoms/view.mjs';
2
3
  export { SafeAreaView } from './atoms/safe-area-view.mjs';
3
4
  export { Typography, TypographyComponent } from './atoms/typography.mjs';
4
5
  export { Button } from './atoms/button.mjs';
6
+ export { Divider } from './atoms/divider.mjs';
5
7
  export { IconButton } from './atoms/icon-button.mjs';
6
8
  export { Pressable } from './atoms/pressable.mjs';
9
+ export { Progress } from './atoms/progress.mjs';
10
+ export { Spinner } from './atoms/spinner.mjs';
7
11
  export { Tag } from './atoms/tag.mjs';
12
+ export { Card } from './card/card.mjs';
8
13
  export { Control } from './controls/control.mjs';
9
14
  export { useControlContext } from './controls/provider.mjs';
10
15
  import 'react';
11
- import '@impulse-ui-native/theme';
12
- import 'react-native';
13
16
  import 'react/jsx-runtime';
17
+ import '../types/avatar.types.mjs';
18
+ import 'react-native';
19
+ import '@impulse-ui-native/theme';
20
+ import '../types/view.types.mjs';
14
21
  import '../types/safe-area-view.types.mjs';
15
22
  import 'react-native-safe-area-context';
16
23
  import '../types/typography.types.mjs';
17
24
  import '../types/button.types.mjs';
25
+ import '../types/divider.types.mjs';
18
26
  import '../types/icon-button.types.mjs';
19
27
  import '@impulse-ui-native/icon/types';
28
+ import '../types/progress.types.mjs';
29
+ import '../types/spinner.types.mjs';
20
30
  import '../types/tag.types.mjs';
21
- import '../types/view.types.mjs';
31
+ import '../types/card.types.mjs';
22
32
  import '../types/control-components.types.mjs';
@@ -1,3 +1,4 @@
1
1
  export * from "./atoms";
2
+ export * from "./card";
2
3
  export * from "./controls";
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["export * from \"./atoms\";\nexport * from \"./controls\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/index.ts"],"sourcesContent":["export * from \"./atoms\";\nexport * from \"./card\";\nexport * from \"./controls\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,5 @@
1
+ import { Animated } from 'react-native';
2
+
3
+ declare function useIndeterminateProgressAnimation(duration: number): Animated.Value;
4
+
5
+ export { useIndeterminateProgressAnimation };
@@ -0,0 +1,47 @@
1
+ import { useEffect, useRef, useState } from "react";
2
+ import { AccessibilityInfo, Animated, Easing } from "react-native";
3
+ function useIndeterminateProgressAnimation(duration) {
4
+ const [reduceMotion, setReduceMotion] = useState(false);
5
+ const progress = useRef(new Animated.Value(0)).current;
6
+ useEffect(() => {
7
+ let mounted = true;
8
+ AccessibilityInfo.isReduceMotionEnabled().then((enabled) => {
9
+ if (mounted) {
10
+ setReduceMotion(enabled);
11
+ }
12
+ });
13
+ const subscription = AccessibilityInfo.addEventListener(
14
+ "reduceMotionChanged",
15
+ setReduceMotion
16
+ );
17
+ return () => {
18
+ mounted = false;
19
+ subscription.remove();
20
+ };
21
+ }, []);
22
+ useEffect(() => {
23
+ progress.stopAnimation();
24
+ if (reduceMotion) {
25
+ progress.setValue(0.5);
26
+ return;
27
+ }
28
+ progress.setValue(0);
29
+ const animation = Animated.loop(
30
+ Animated.timing(progress, {
31
+ duration,
32
+ easing: Easing.linear,
33
+ toValue: 1,
34
+ useNativeDriver: true
35
+ })
36
+ );
37
+ animation.start();
38
+ return () => {
39
+ animation.stop();
40
+ };
41
+ }, [duration, progress, reduceMotion]);
42
+ return progress;
43
+ }
44
+ export {
45
+ useIndeterminateProgressAnimation
46
+ };
47
+ //# sourceMappingURL=use-indeterminate-progress-animation.hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/use-indeterminate-progress-animation.hook.ts"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { AccessibilityInfo, Animated, Easing } from \"react-native\";\n\nexport function useIndeterminateProgressAnimation(duration: number) {\n const [reduceMotion, setReduceMotion] = useState(false);\n const progress = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n let mounted = true;\n\n AccessibilityInfo.isReduceMotionEnabled().then((enabled) => {\n if (mounted) {\n setReduceMotion(enabled);\n }\n });\n\n const subscription = AccessibilityInfo.addEventListener(\n \"reduceMotionChanged\",\n setReduceMotion,\n );\n\n return () => {\n mounted = false;\n subscription.remove();\n };\n }, []);\n\n useEffect(() => {\n progress.stopAnimation();\n\n if (reduceMotion) {\n progress.setValue(0.5);\n return;\n }\n\n progress.setValue(0);\n\n const animation = Animated.loop(\n Animated.timing(progress, {\n duration,\n easing: Easing.linear,\n toValue: 1,\n useNativeDriver: true,\n }),\n );\n\n animation.start();\n\n return () => {\n animation.stop();\n };\n }, [duration, progress, reduceMotion]);\n\n return progress;\n}\n"],"mappings":"AAAA,SAAS,WAAW,QAAQ,gBAAgB;AAC5C,SAAS,mBAAmB,UAAU,cAAc;AAE7C,SAAS,kCAAkC,UAAkB;AAClE,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,KAAK;AACtD,QAAM,WAAW,OAAO,IAAI,SAAS,MAAM,CAAC,CAAC,EAAE;AAE/C,YAAU,MAAM;AACd,QAAI,UAAU;AAEd,sBAAkB,sBAAsB,EAAE,KAAK,CAAC,YAAY;AAC1D,UAAI,SAAS;AACX,wBAAgB,OAAO;AAAA,MACzB;AAAA,IACF,CAAC;AAED,UAAM,eAAe,kBAAkB;AAAA,MACrC;AAAA,MACA;AAAA,IACF;AAEA,WAAO,MAAM;AACX,gBAAU;AACV,mBAAa,OAAO;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,YAAU,MAAM;AACd,aAAS,cAAc;AAEvB,QAAI,cAAc;AAChB,eAAS,SAAS,GAAG;AACrB;AAAA,IACF;AAEA,aAAS,SAAS,CAAC;AAEnB,UAAM,YAAY,SAAS;AAAA,MACzB,SAAS,OAAO,UAAU;AAAA,QACxB;AAAA,QACA,QAAQ,OAAO;AAAA,QACf,SAAS;AAAA,QACT,iBAAiB;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,cAAU,MAAM;AAEhB,WAAO,MAAM;AACX,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,UAAU,UAAU,YAAY,CAAC;AAErC,SAAO;AACT;","names":[]}
package/dist/index.d.mts CHANGED
@@ -1,24 +1,34 @@
1
+ export { Avatar } from './components/atoms/avatar.mjs';
1
2
  export { View } from './components/atoms/view.mjs';
2
3
  export { SafeAreaView } from './components/atoms/safe-area-view.mjs';
3
4
  export { Typography, TypographyComponent } from './components/atoms/typography.mjs';
4
5
  export { Button } from './components/atoms/button.mjs';
6
+ export { Divider } from './components/atoms/divider.mjs';
5
7
  export { IconButton } from './components/atoms/icon-button.mjs';
6
8
  export { Pressable } from './components/atoms/pressable.mjs';
9
+ export { Progress } from './components/atoms/progress.mjs';
10
+ export { Spinner } from './components/atoms/spinner.mjs';
7
11
  export { Tag } from './components/atoms/tag.mjs';
12
+ export { Card } from './components/card/card.mjs';
8
13
  export { Control } from './components/controls/control.mjs';
9
14
  export { useControlContext } from './components/controls/provider.mjs';
10
15
  export { createPreset } from './hocs/create-preset.hoc.mjs';
11
16
  export { EdgeToShorthandKeyMap, EdgeToSpacingKeyMap } from './constants/safe-area-view.constants.mjs';
17
+ export { AvatarImageProps, AvatarProps } from './types/avatar.types.mjs';
12
18
  export { ViewProps } from './types/view.types.mjs';
13
19
  export { SafeAreaViewProps } from './types/safe-area-view.types.mjs';
14
20
  export { TextProps } from './types/typography.types.mjs';
15
21
  export { ButtonProps, ButtonThemeProps, PressableCoreProps } from './types/button.types.mjs';
22
+ export { CardContentProps, CardFooterProps, CardHeaderProps, CardMediaProps, CardPressableProps, CardRootProps } from './types/card.types.mjs';
23
+ export { DividerInset, DividerOrientation, DividerProps } from './types/divider.types.mjs';
16
24
  export { IconButtonProps, IconButtonThemeProps } from './types/icon-button.types.mjs';
25
+ export { ProgressProps } from './types/progress.types.mjs';
26
+ export { SpinnerProps } from './types/spinner.types.mjs';
17
27
  export { TagProps, TagThemeProps } from './types/tag.types.mjs';
18
28
  export { ControlAddonProps, ControlComponentCommonProps, ControlComponentProps, ControlContainerProps, ControlContextData, ControlErrorLabelProps, ControlInputProps, ControlLabelProps, ControlLoaderProps, ControlPlaceholderProps, ControlValueProps } from './types/control-components.types.mjs';
19
29
  import 'react';
30
+ import 'react/jsx-runtime';
20
31
  import '@impulse-ui-native/theme';
21
32
  import 'react-native';
22
- import 'react/jsx-runtime';
23
33
  import 'react-native-safe-area-context';
24
34
  import '@impulse-ui-native/icon/types';
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import { ImageProps, StyleProp, ImageStyle, ImageSourcePropType, ViewStyle } from 'react-native';
3
+ import { ComponentSize, AvatarStatus, ComponentVariant } from '@impulse-ui-native/theme';
4
+ import { ViewProps } from './view.types.mjs';
5
+
6
+ interface AvatarImageProps extends Omit<ImageProps, "accessible" | "source" | "style"> {
7
+ style?: StyleProp<ImageStyle>;
8
+ }
9
+ interface AvatarProps extends Omit<ViewProps, "children"> {
10
+ fallback?: ReactNode;
11
+ imageProps?: AvatarImageProps;
12
+ initials?: string;
13
+ size?: ComponentSize;
14
+ source?: ImageSourcePropType;
15
+ status?: AvatarStatus;
16
+ statusColor?: ViewStyle["backgroundColor"];
17
+ variant?: ComponentVariant;
18
+ }
19
+
20
+ export type { AvatarImageProps, AvatarProps };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=avatar.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,21 @@
1
+ import { ReactNode } from 'react';
2
+ import { PressableProps, StyleProp, ViewStyle } from 'react-native';
3
+ import { DimensionProps, SpacingProps, ShadowProps } from '@impulse-ui-native/theme';
4
+ import { ViewProps } from './view.types.mjs';
5
+
6
+ interface CardRootProps extends ViewProps {
7
+ }
8
+ interface CardPressableProps extends Omit<PressableProps, "children">, DimensionProps, SpacingProps, ShadowProps {
9
+ children?: ReactNode;
10
+ pressedStyle?: StyleProp<ViewStyle>;
11
+ }
12
+ interface CardHeaderProps extends ViewProps {
13
+ }
14
+ interface CardContentProps extends ViewProps {
15
+ }
16
+ interface CardFooterProps extends ViewProps {
17
+ }
18
+ interface CardMediaProps extends ViewProps {
19
+ }
20
+
21
+ export type { CardContentProps, CardFooterProps, CardHeaderProps, CardMediaProps, CardPressableProps, CardRootProps };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=card.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,7 +1,8 @@
1
1
  import { ComponentType } from 'react';
2
- import { ViewProps, TextProps, TextInputProps, ActivityIndicatorProps } from 'react-native';
2
+ import { ViewProps, TextProps, TextInputProps } from 'react-native';
3
3
  import { IconProps } from '@impulse-ui-native/icon/types';
4
4
  import { ComponentSize, ComponentVariant } from '@impulse-ui-native/theme';
5
+ import { SpinnerProps } from './spinner.types.mjs';
5
6
  import { PressableCoreProps } from './button.types.mjs';
6
7
 
7
8
  interface ControlComponentCommonProps {
@@ -39,7 +40,7 @@ interface ControlPlaceholderProps extends TextProps {
39
40
  }
40
41
  interface ControlValueProps extends TextProps {
41
42
  }
42
- interface ControlLoaderProps extends ActivityIndicatorProps {
43
+ interface ControlLoaderProps extends SpinnerProps {
43
44
  }
44
45
 
45
46
  export type { ControlAddonProps, ControlComponentCommonProps, ControlComponentProps, ControlContainerProps, ControlContextData, ControlErrorLabelProps, ControlInputProps, ControlLabelProps, ControlLoaderProps, ControlPlaceholderProps, ControlValueProps };