cpk-ui 0.5.4 → 0.7.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 (136) hide show
  1. package/README.md +80 -147
  2. package/components/modals/AlertDialog/AlertDialog.d.ts.map +1 -1
  3. package/components/modals/AlertDialog/AlertDialog.js +14 -7
  4. package/components/modals/Snackbar/Snackbar.d.ts.map +1 -1
  5. package/components/modals/Snackbar/Snackbar.js +20 -17
  6. package/components/uis/Accordion/AccordionItem.d.ts.map +1 -1
  7. package/components/uis/Accordion/AccordionItem.js +41 -17
  8. package/components/uis/Button/Button.d.ts +2 -1
  9. package/components/uis/Button/Button.d.ts.map +1 -1
  10. package/components/uis/Button/Button.js +11 -11
  11. package/components/uis/Card/Card.d.ts +2 -1
  12. package/components/uis/Card/Card.d.ts.map +1 -1
  13. package/components/uis/Card/Card.js +12 -3
  14. package/components/uis/Checkbox/Checkbox.d.ts +2 -1
  15. package/components/uis/Checkbox/Checkbox.d.ts.map +1 -1
  16. package/components/uis/Checkbox/Checkbox.js +2 -2
  17. package/components/uis/CustomPressable/CustomPressable.d.ts.map +1 -1
  18. package/components/uis/CustomPressable/CustomPressable.js +6 -6
  19. package/components/uis/EditText/EditText.d.ts +1 -0
  20. package/components/uis/EditText/EditText.d.ts.map +1 -1
  21. package/components/uis/EditText/EditText.js +18 -13
  22. package/components/uis/Fab/Fab.d.ts +2 -2
  23. package/components/uis/Fab/Fab.d.ts.map +1 -1
  24. package/components/uis/Fab/Fab.js +22 -4
  25. package/components/uis/Icon/Icon.d.ts.map +1 -1
  26. package/components/uis/Icon/Icon.js +6 -3
  27. package/components/uis/IconButton/IconButton.d.ts +2 -1
  28. package/components/uis/IconButton/IconButton.d.ts.map +1 -1
  29. package/components/uis/IconButton/IconButton.js +44 -42
  30. package/components/uis/LoadingIndicator/LoadingIndicator.d.ts +2 -1
  31. package/components/uis/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
  32. package/components/uis/LoadingIndicator/LoadingIndicator.js +4 -4
  33. package/components/uis/RadioGroup/RadioButton.d.ts +2 -1
  34. package/components/uis/RadioGroup/RadioButton.d.ts.map +1 -1
  35. package/components/uis/RadioGroup/RadioButton.js +2 -2
  36. package/components/uis/RadioGroup/RadioGroup.d.ts.map +1 -1
  37. package/components/uis/RadioGroup/RadioGroup.js +16 -3
  38. package/components/uis/Rating/Rating.d.ts.map +1 -1
  39. package/components/uis/Rating/Rating.js +23 -19
  40. package/components/uis/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  41. package/components/uis/SegmentedControl/SegmentedControl.js +1 -1
  42. package/components/uis/StatusbarBrightness/StatusBarBrightness.d.ts +2 -2
  43. package/components/uis/StatusbarBrightness/StatusBarBrightness.d.ts.map +1 -1
  44. package/components/uis/StatusbarBrightness/StatusBarBrightness.js +1 -1
  45. package/components/uis/SwitchToggle/SwitchToggle.d.ts +2 -1
  46. package/components/uis/SwitchToggle/SwitchToggle.d.ts.map +1 -1
  47. package/components/uis/SwitchToggle/SwitchToggle.js +2 -2
  48. package/hooks/useHoverState.d.ts +8 -0
  49. package/hooks/useHoverState.d.ts.map +1 -0
  50. package/hooks/useHoverState.js +16 -0
  51. package/package.json +18 -6
  52. package/providers/ThemeProvider.d.ts.map +1 -1
  53. package/providers/ThemeProvider.js +0 -1
  54. package/providers/index.d.ts.map +1 -1
  55. package/providers/index.js +3 -2
  56. package/components/uis/Icon/selection.json +0 -1
  57. package/src/components/common/ErrorBoundary/ErrorBoundary.tsx +0 -75
  58. package/src/components/modals/AlertDialog/AlertDialog.stories.tsx +0 -216
  59. package/src/components/modals/AlertDialog/AlertDialog.test.tsx +0 -251
  60. package/src/components/modals/AlertDialog/AlertDialog.tsx +0 -356
  61. package/src/components/modals/Snackbar/Snackbar.stories.tsx +0 -182
  62. package/src/components/modals/Snackbar/Snackbar.test.tsx +0 -319
  63. package/src/components/modals/Snackbar/Snackbar.tsx +0 -260
  64. package/src/components/modals/Snackbar/const.ts +0 -4
  65. package/src/components/uis/Accordion/Accordion.stories.tsx +0 -167
  66. package/src/components/uis/Accordion/Accordion.test.tsx +0 -272
  67. package/src/components/uis/Accordion/Accordion.tsx +0 -109
  68. package/src/components/uis/Accordion/AccordionItem.tsx +0 -306
  69. package/src/components/uis/Button/Button.stories.tsx +0 -218
  70. package/src/components/uis/Button/Button.test.tsx +0 -620
  71. package/src/components/uis/Button/Button.tsx +0 -436
  72. package/src/components/uis/Card/Card.test.tsx +0 -146
  73. package/src/components/uis/Card/Card.tsx +0 -102
  74. package/src/components/uis/Checkbox/Checkbox.stories.tsx +0 -216
  75. package/src/components/uis/Checkbox/Checkbox.test.tsx +0 -173
  76. package/src/components/uis/Checkbox/Checkbox.tsx +0 -220
  77. package/src/components/uis/CustomPressable/CustomPressable.tsx +0 -48
  78. package/src/components/uis/EditText/EditText.stories.tsx +0 -124
  79. package/src/components/uis/EditText/EditText.test.tsx +0 -477
  80. package/src/components/uis/EditText/EditText.tsx +0 -590
  81. package/src/components/uis/Fab/Fab.stories.tsx +0 -133
  82. package/src/components/uis/Fab/Fab.test.tsx +0 -110
  83. package/src/components/uis/Fab/Fab.tsx +0 -168
  84. package/src/components/uis/Hr/Hr.test.tsx +0 -26
  85. package/src/components/uis/Hr/Hr.tsx +0 -19
  86. package/src/components/uis/Icon/Icon.stories.tsx +0 -98
  87. package/src/components/uis/Icon/Icon.test.tsx +0 -49
  88. package/src/components/uis/Icon/Icon.tsx +0 -3819
  89. package/src/components/uis/IconButton/IconButton.test.tsx +0 -165
  90. package/src/components/uis/IconButton/IconButton.tsx +0 -275
  91. package/src/components/uis/LoadingIndicator/LoadingIndicator.tsx +0 -126
  92. package/src/components/uis/LoadingIndicator/LodingIndicator.stories.tsx +0 -81
  93. package/src/components/uis/PinchZoom/PinchZoom.stories.tsx +0 -266
  94. package/src/components/uis/PinchZoom/PinchZoom.test.tsx +0 -113
  95. package/src/components/uis/PinchZoom/PinchZoom.tsx +0 -424
  96. package/src/components/uis/RadioGroup/RadioButton.tsx +0 -188
  97. package/src/components/uis/RadioGroup/RadioGroup.stories.tsx +0 -188
  98. package/src/components/uis/RadioGroup/RadioGroup.test.tsx +0 -287
  99. package/src/components/uis/RadioGroup/RadioGroup.tsx +0 -109
  100. package/src/components/uis/Rating/Rating.test.tsx +0 -98
  101. package/src/components/uis/Rating/Rating.tsx +0 -200
  102. package/src/components/uis/SegmentedControl/SegmentedControl.stories.tsx +0 -546
  103. package/src/components/uis/SegmentedControl/SegmentedControl.test.tsx +0 -274
  104. package/src/components/uis/SegmentedControl/SegmentedControl.tsx +0 -229
  105. package/src/components/uis/StatusbarBrightness/StatusBarBrightness.test.tsx +0 -41
  106. package/src/components/uis/StatusbarBrightness/StatusBarBrightness.tsx +0 -26
  107. package/src/components/uis/Styled/StyledComponents.tsx +0 -217
  108. package/src/components/uis/SwitchToggle/SwitchToggle.stories.tsx +0 -75
  109. package/src/components/uis/SwitchToggle/SwitchToggle.test.tsx +0 -105
  110. package/src/components/uis/SwitchToggle/SwitchToggle.tsx +0 -305
  111. package/src/components/uis/Typography/Typography.stories.tsx +0 -149
  112. package/src/components/uis/Typography/Typography.test.tsx +0 -58
  113. package/src/components/uis/Typography/Typography.tsx +0 -386
  114. package/src/hooks/index.ts +0 -2
  115. package/src/hooks/useAnimations.ts +0 -71
  116. package/src/hooks/useDebouncedColorScheme.tsx +0 -30
  117. package/src/hooks/useOptimizedStyles.ts +0 -22
  118. package/src/hooks/usePerformance.ts +0 -93
  119. package/src/index.tsx +0 -38
  120. package/src/providers/ThemeProvider.tsx +0 -177
  121. package/src/providers/index.tsx +0 -130
  122. package/src/test/testUtils.tsx +0 -101
  123. package/src/types/common.ts +0 -77
  124. package/src/types/index.ts +0 -1
  125. package/src/types/kstyled.d.ts +0 -6
  126. package/src/utils/accessibility.ts +0 -110
  127. package/src/utils/colors.ts +0 -151
  128. package/src/utils/createCtx.tsx +0 -26
  129. package/src/utils/guards.ts +0 -93
  130. package/src/utils/index.ts +0 -2
  131. package/src/utils/performanceTest.ts +0 -174
  132. package/src/utils/platform.ts +0 -69
  133. package/src/utils/theme.ts +0 -38
  134. package/test/testUtils.d.ts +0 -113
  135. package/test/testUtils.d.ts.map +0 -1
  136. package/test/testUtils.js +0 -65
@@ -1,113 +0,0 @@
1
- import React, { type ReactElement } from 'react';
2
- import { light as lightTheme } from '../utils/colors';
3
- /**
4
- * Custom render function that wraps components with necessary providers
5
- */
6
- export declare function renderWithProviders(ui: ReactElement, options?: {
7
- theme?: 'light' | 'dark';
8
- initialTheme?: typeof lightTheme;
9
- }): {
10
- update: (component: React.ReactElement) => void;
11
- unmount: () => void;
12
- rerender: (component: React.ReactElement) => void;
13
- toJSON: () => null | import("react-test-renderer").ReactTestRendererJSON | import("react-test-renderer").ReactTestRendererJSON[];
14
- debug: import("@testing-library/react-native").DebugFunction;
15
- root: import("react-test-renderer").ReactTestInstance;
16
- UNSAFE_root: import("react-test-renderer").ReactTestInstance;
17
- UNSAFE_getByProps: (props: {
18
- [x: string]: unknown;
19
- }) => import("react-test-renderer").ReactTestInstance;
20
- UNSAFE_getAllByProps: (props: {
21
- [x: string]: unknown;
22
- }) => Array<import("react-test-renderer").ReactTestInstance>;
23
- UNSAFE_queryByProps: (props: {
24
- [x: string]: unknown;
25
- }) => import("react-test-renderer").ReactTestInstance | null;
26
- UNSAFE_queryAllByProps: (props: {
27
- [x: string]: unknown;
28
- }) => Array<import("react-test-renderer").ReactTestInstance>;
29
- UNSAFE_getByType: <P>(type: React.ComponentType<P>) => import("react-test-renderer").ReactTestInstance;
30
- UNSAFE_getAllByType: <P>(type: React.ComponentType<P>) => Array<import("react-test-renderer").ReactTestInstance>;
31
- UNSAFE_queryByType: <P>(type: React.ComponentType<P>) => import("react-test-renderer").ReactTestInstance | null;
32
- UNSAFE_queryAllByType: <P>(type: React.ComponentType<P>) => Array<import("react-test-renderer").ReactTestInstance>;
33
- getByRole: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/queries/role").ByRoleMatcher, import("@testing-library/react-native/build/queries/role").ByRoleOptions>;
34
- getAllByRole: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/queries/role").ByRoleMatcher, import("@testing-library/react-native/build/queries/role").ByRoleOptions>;
35
- queryByRole: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/queries/role").ByRoleMatcher, import("@testing-library/react-native/build/queries/role").ByRoleOptions>;
36
- queryAllByRole: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/queries/role").ByRoleMatcher, import("@testing-library/react-native/build/queries/role").ByRoleOptions>;
37
- findByRole: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/queries/role").ByRoleMatcher, import("@testing-library/react-native/build/queries/role").ByRoleOptions>;
38
- findAllByRole: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/queries/role").ByRoleMatcher, import("@testing-library/react-native/build/queries/role").ByRoleOptions>;
39
- getByHintText: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
40
- getAllByHintText: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
41
- queryByHintText: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
42
- queryAllByHintText: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
43
- findByHintText: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
44
- findAllByHintText: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
45
- getByA11yHint: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
46
- getAllByA11yHint: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
47
- queryByA11yHint: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
48
- queryAllByA11yHint: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
49
- findByA11yHint: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
50
- findAllByA11yHint: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
51
- getByAccessibilityHint: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
52
- getAllByAccessibilityHint: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
53
- queryByAccessibilityHint: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
54
- queryAllByAccessibilityHint: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
55
- findByAccessibilityHint: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
56
- findAllByAccessibilityHint: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
57
- getByLabelText: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
58
- getAllByLabelText: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
59
- queryByLabelText: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
60
- queryAllByLabelText: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
61
- findByLabelText: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
62
- findAllByLabelText: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
63
- getByPlaceholderText: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
64
- getAllByPlaceholderText: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
65
- queryByPlaceholderText: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
66
- queryAllByPlaceholderText: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
67
- findByPlaceholderText: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
68
- findAllByPlaceholderText: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
69
- getByDisplayValue: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
70
- getAllByDisplayValue: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
71
- queryByDisplayValue: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
72
- queryAllByDisplayValue: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
73
- findByDisplayValue: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
74
- findAllByDisplayValue: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
75
- getByTestId: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
76
- getAllByTestId: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
77
- queryByTestId: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
78
- queryAllByTestId: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
79
- findByTestId: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
80
- findAllByTestId: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
81
- getByText: import("@testing-library/react-native/build/queries/make-queries").GetByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
82
- getAllByText: import("@testing-library/react-native/build/queries/make-queries").GetAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
83
- queryByText: import("@testing-library/react-native/build/queries/make-queries").QueryByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
84
- queryAllByText: import("@testing-library/react-native/build/queries/make-queries").QueryAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
85
- findByText: import("@testing-library/react-native/build/queries/make-queries").FindByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
86
- findAllByText: import("@testing-library/react-native/build/queries/make-queries").FindAllByQuery<import("@testing-library/react-native/build/matches").TextMatch, import("@testing-library/react-native/build/queries/options").CommonQueryOptions & import("@testing-library/react-native/build/matches").TextMatchOptions>;
87
- };
88
- /**
89
- * Test helper for checking accessibility properties
90
- */
91
- export declare function expectAccessibilityProps(element: any, expectedProps: {
92
- role?: string;
93
- label?: string;
94
- hint?: string;
95
- state?: Record<string, any>;
96
- }): void;
97
- /**
98
- * Test helper for animation testing
99
- */
100
- export declare function waitForAnimation(duration?: number): Promise<void>;
101
- /**
102
- * Test helper for press events with different delays
103
- */
104
- export declare function pressWithDelay(element: any, delay?: number): Promise<void>;
105
- /**
106
- * Mock platform for testing
107
- */
108
- export declare function mockPlatform(platform: 'ios' | 'android' | 'web'): void;
109
- /**
110
- * Test performance of component renders
111
- */
112
- export declare function measureRenderTime(renderFn: () => void): number;
113
- //# sourceMappingURL=testUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../../src/test/testUtils.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAC,KAAK,YAAY,EAAC,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAC,KAAK,IAAI,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAEpD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,YAAY,EAChB,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,UAAU,CAAC;CAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASP;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,GAAG,EACZ,aAAa,EAAE;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B,QAqBF;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,GAAE,MAAY,iBAE5D;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,GAAG,EACZ,KAAK,GAAE,MAAU,GAChB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,KAAK,QAU/D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,CAK9D"}
package/test/testUtils.js DELETED
@@ -1,65 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { render, fireEvent, waitFor } from '@testing-library/react-native';
3
- import { CpkProvider } from '../providers';
4
- /**
5
- * Custom render function that wraps components with necessary providers
6
- */
7
- export function renderWithProviders(ui, options = {}) {
8
- const { theme = 'light', initialTheme } = options;
9
- const Wrapper = ({ children }) => (_jsx(CpkProvider, { children: children }));
10
- return render(ui, { wrapper: Wrapper });
11
- }
12
- /**
13
- * Test helper for checking accessibility properties
14
- */
15
- export function expectAccessibilityProps(element, expectedProps) {
16
- const { role, label, hint, state } = expectedProps;
17
- if (role) {
18
- expect(element.props.accessibilityRole).toBe(role);
19
- }
20
- if (label) {
21
- expect(element.props.accessibilityLabel).toBe(label);
22
- }
23
- if (hint) {
24
- expect(element.props.accessibilityHint).toBe(hint);
25
- }
26
- if (state) {
27
- expect(element.props.accessibilityState).toEqual(expect.objectContaining(state));
28
- }
29
- }
30
- /**
31
- * Test helper for animation testing
32
- */
33
- export async function waitForAnimation(duration = 300) {
34
- await waitFor(() => { }, { timeout: duration + 100 });
35
- }
36
- /**
37
- * Test helper for press events with different delays
38
- */
39
- export async function pressWithDelay(element, delay = 0) {
40
- fireEvent.press(element);
41
- if (delay > 0) {
42
- await new Promise((resolve) => setTimeout(resolve, delay));
43
- }
44
- }
45
- /**
46
- * Mock platform for testing
47
- */
48
- export function mockPlatform(platform) {
49
- const originalPlatform = require('react-native').Platform.OS;
50
- beforeEach(() => {
51
- require('react-native').Platform.OS = platform;
52
- });
53
- afterEach(() => {
54
- require('react-native').Platform.OS = originalPlatform;
55
- });
56
- }
57
- /**
58
- * Test performance of component renders
59
- */
60
- export function measureRenderTime(renderFn) {
61
- const startTime = performance.now();
62
- renderFn();
63
- const endTime = performance.now();
64
- return endTime - startTime;
65
- }