creactive 0.0.56 → 0.0.57

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 (63) hide show
  1. package/build/index.js +2 -1656
  2. package/build/index.js.LICENSE.txt +9 -0
  3. package/build/web.d.ts +1 -0
  4. package/build/web.js +2 -0
  5. package/build/web.js.LICENSE.txt +9 -0
  6. package/package.json +10 -6
  7. package/source/components/index.ts +0 -2
  8. package/source/components/text/constants/color.ts +0 -26
  9. package/source/components/text/constants/font.ts +0 -32
  10. package/source/components/text/constants/index.ts +0 -5
  11. package/source/components/text/constants/role.ts +0 -12
  12. package/source/components/text/constants/text.ts +0 -22
  13. package/source/components/text/constants/type.ts +0 -27
  14. package/source/components/text/index.ts +0 -2
  15. package/source/components/text/spec/children.spec.tsx +0 -13
  16. package/source/components/text/spec/color.spec.native.tsx +0 -15
  17. package/source/components/text/spec/color.spec.tsx +0 -159
  18. package/source/components/text/spec/color.spec.web.tsx +0 -15
  19. package/source/components/text/spec/font.spec.tsx +0 -196
  20. package/source/components/text/spec/position.spec.tsx +0 -15
  21. package/source/components/text/spec/text.spec.native.tsx +0 -1043
  22. package/source/components/text/spec/text.spec.tsx +0 -39
  23. package/source/components/text/spec/text.spec.web.tsx +0 -1043
  24. package/source/components/text/spec/type.spec.web.tsx +0 -55
  25. package/source/components/text/text.stories.tsx +0 -46
  26. package/source/components/text/text.tsx +0 -262
  27. package/source/components/text/text.types.ts +0 -67
  28. package/source/constants/index.ts +0 -46
  29. package/source/constants/theme/color.ts +0 -27
  30. package/source/constants/theme/font.ts +0 -48
  31. package/source/constants/theme/index.ts +0 -50
  32. package/source/constants/theme/text.ts +0 -12
  33. package/source/contexts/index.ts +0 -15
  34. package/source/contexts/media/components/index.ts +0 -4
  35. package/source/contexts/media/components/media/index.ts +0 -2
  36. package/source/contexts/media/components/media/media.tsx +0 -37
  37. package/source/contexts/media/components/media/media.types.ts +0 -26
  38. package/source/contexts/media/components/wrapper/index.ts +0 -2
  39. package/source/contexts/media/components/wrapper/wrapper.tsx +0 -73
  40. package/source/contexts/media/components/wrapper/wrapper.types.ts +0 -3
  41. package/source/contexts/media/constants/breakpoint.ts +0 -18
  42. package/source/contexts/media/constants/index.ts +0 -6
  43. package/source/contexts/media/hooks/index.ts +0 -1
  44. package/source/contexts/media/hooks/use-breakpoint.ts +0 -18
  45. package/source/contexts/media/index.ts +0 -7
  46. package/source/contexts/media/media.tsx +0 -36
  47. package/source/contexts/media/media.types.ts +0 -38
  48. package/source/contexts/theme/index.ts +0 -8
  49. package/source/contexts/theme/theme.tsx +0 -280
  50. package/source/contexts/theme/theme.types.ts +0 -284
  51. package/source/helpers/index.ts +0 -3
  52. package/source/helpers/storybook/constants/control.ts +0 -25
  53. package/source/helpers/storybook/constants/index.ts +0 -1
  54. package/source/helpers/storybook/control.spec.ts +0 -140
  55. package/source/helpers/storybook/control.ts +0 -115
  56. package/source/helpers/storybook/index.ts +0 -1
  57. package/source/helpers/style/index.ts +0 -2
  58. package/source/helpers/style/style.spec.web.ts +0 -20
  59. package/source/helpers/style/style.ts +0 -14
  60. package/source/helpers/style/style.types.ts +0 -14
  61. package/source/hooks/index.ts +0 -1
  62. package/source/hooks/use-theme-style-sheet.ts +0 -135
  63. package/source/index.ts +0 -24
@@ -1,135 +0,0 @@
1
- import { useThemeContext } from '@/contexts/theme'
2
- import { useMemo } from 'react'
3
- import { StyleSheet } from 'react-native'
4
-
5
- // Create tailwind-like style sheet for each theme token.
6
- // Some styles are shared across multiple components.
7
- // We also export this hook outside just in case.
8
- export const useThemeStyleSheet = () => {
9
- const themeContext = useThemeContext()
10
- // Re-creating style sheet only when theme context changes.
11
- return useMemo(
12
- () =>
13
- StyleSheet.create({
14
- // Foreground color styles.
15
- colorForegroundBase100: {
16
- color: themeContext.colorForegroundBase100,
17
- },
18
- colorForegroundBase200: {
19
- color: themeContext.colorForegroundBase200,
20
- },
21
- colorForegroundBase300: {
22
- color: themeContext.colorForegroundBase300,
23
- },
24
- colorForegroundBase400: {
25
- color: themeContext.colorForegroundBase400,
26
- },
27
- colorForegroundBase500: {
28
- color: themeContext.colorForegroundBase500,
29
- },
30
- colorForegroundBase600: {
31
- color: themeContext.colorForegroundBase600,
32
- },
33
- colorForegroundBase700: {
34
- color: themeContext.colorForegroundBase700,
35
- },
36
- colorForegroundBase800: {
37
- color: themeContext.colorForegroundBase800,
38
- },
39
- colorForegroundBase900: {
40
- color: themeContext.colorForegroundBase900,
41
- },
42
- colorForegroundInverse100: {
43
- color: themeContext.colorForegroundInverse100,
44
- },
45
- colorForegroundInverse200: {
46
- color: themeContext.colorForegroundInverse200,
47
- },
48
- colorForegroundInverse300: {
49
- color: themeContext.colorForegroundInverse300,
50
- },
51
- colorForegroundInverse400: {
52
- color: themeContext.colorForegroundInverse400,
53
- },
54
- colorForegroundInverse500: {
55
- color: themeContext.colorForegroundInverse500,
56
- },
57
- colorForegroundInverse600: {
58
- color: themeContext.colorForegroundInverse600,
59
- },
60
- colorForegroundInverse700: {
61
- color: themeContext.colorForegroundInverse700,
62
- },
63
- colorForegroundInverse800: {
64
- color: themeContext.colorForegroundInverse800,
65
- },
66
- colorForegroundInverse900: {
67
- color: themeContext.colorForegroundInverse900,
68
- },
69
- // Font family styles.
70
- fontFamilyBase: {
71
- fontFamily: themeContext.fontFamilyBase,
72
- },
73
- // Base font weight styles.
74
- fontWeightBaseThin: {
75
- fontWeight: themeContext.fontWeightBaseThin,
76
- },
77
- fontWeightBaseExtraLight: {
78
- fontWeight: themeContext.fontWeightBaseExtraLight,
79
- },
80
- fontWeightBaseLight: {
81
- fontWeight: themeContext.fontWeightBaseLight,
82
- },
83
- fontWeightBaseRegular: {
84
- fontWeight: themeContext.fontWeightBaseRegular,
85
- },
86
- fontWeightBaseMedium: {
87
- fontWeight: themeContext.fontWeightBaseMedium,
88
- },
89
- fontWeightBaseSemibold: {
90
- fontWeight: themeContext.fontWeightBaseSemibold,
91
- },
92
- fontWeightBaseBold: {
93
- fontWeight: themeContext.fontWeightBaseBold,
94
- },
95
- fontWeightBaseExtraBold: {
96
- fontWeight: themeContext.fontWeightBaseExtraBold,
97
- },
98
- fontWeightBaseBlack: {
99
- fontWeight: themeContext.fontWeightBaseBlack,
100
- },
101
- // Base font size styles.
102
- fontSizeBaseX2S: {
103
- fontSize: themeContext.fontSizeBaseX2S,
104
- },
105
- fontSizeBaseXS: {
106
- fontSize: themeContext.fontSizeBaseXS,
107
- },
108
- fontSizeBaseSM: {
109
- fontSize: themeContext.fontSizeBaseSM,
110
- },
111
- fontSizeBaseMD: {
112
- fontSize: themeContext.fontSizeBaseMD,
113
- },
114
- fontSizeBaseLG: {
115
- fontSize: themeContext.fontSizeBaseLG,
116
- },
117
- fontSizeBaseXL: {
118
- fontSize: themeContext.fontSizeBaseXL,
119
- },
120
- fontSizeBaseX2L: {
121
- fontSize: themeContext.fontSizeBaseX2L,
122
- },
123
- fontSizeBaseX3L: {
124
- fontSize: themeContext.fontSizeBaseX3L,
125
- },
126
- fontSizeBaseX4L: {
127
- fontSize: themeContext.fontSizeBaseX4L,
128
- },
129
- fontSizeBaseX5L: {
130
- fontSize: themeContext.fontSizeBaseX5L,
131
- },
132
- }),
133
- [themeContext]
134
- )
135
- }
package/source/index.ts DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * Exports all public stuff, including types.
3
- * Allows to keep some exports private at the same time.
4
- */
5
- export { Text } from '@/components/text'
6
- export type { TextComponent, TextProps } from '@/components/text'
7
- export { Media, MediaContextProvider, useMediaContext } from '@/contexts/media'
8
- export type {
9
- MediaComponent,
10
- MediaContextProviderComponent,
11
- MediaContextValue,
12
- MediaProps,
13
- } from '@/contexts/media'
14
- export { ThemeContextProvider, useThemeContext } from '@/contexts/theme'
15
- export type {
16
- ThemeColorRGB,
17
- ThemeContextProviderComponent,
18
- ThemeContextProviderProps,
19
- ThemeContextValue,
20
- ThemeFontWeight,
21
- } from '@/contexts/theme'
22
- export { renderStyle } from '@/helpers/style'
23
- export type { RenderStyleHelper } from '@/helpers/style'
24
- export { useThemeStyleSheet } from '@/hooks/use-theme-style-sheet'