react-native-varia 0.5.1 → 0.5.2

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 (28) hide show
  1. package/lib/components/context/Field.tsx +2 -2
  2. package/package.json +1 -1
  3. package/lib/components/ui/context/Field.tsx +0 -27
  4. /package/lib/components/{ui/Accordion.tsx → Accordion.tsx} +0 -0
  5. /package/lib/components/{ui/Badge.tsx → Badge.tsx} +0 -0
  6. /package/lib/components/{ui/Button.tsx → Button.tsx} +0 -0
  7. /package/lib/components/{ui/Checkbox.tsx → Checkbox.tsx} +0 -0
  8. /package/lib/components/{ui/CircleProgress.tsx → CircleProgress.tsx} +0 -0
  9. /package/lib/components/{ui/Divider.tsx → Divider.tsx} +0 -0
  10. /package/lib/components/{ui/Drawer.tsx → Drawer.tsx} +0 -0
  11. /package/lib/components/{ui/Field.tsx → Field.tsx} +0 -0
  12. /package/lib/components/{ui/FloatingAction.tsx → FloatingAction.tsx} +0 -0
  13. /package/lib/components/{ui/GradientBackground.tsx → GradientBackground.tsx} +0 -0
  14. /package/lib/components/{ui/GradientText.tsx → GradientText.tsx} +0 -0
  15. /package/lib/components/{ui/IconWrapper.tsx → IconWrapper.tsx} +0 -0
  16. /package/lib/components/{ui/Input.tsx → Input.tsx} +0 -0
  17. /package/lib/components/{ui/Link.tsx → Link.tsx} +0 -0
  18. /package/lib/components/{ui/Modal.tsx → Modal.tsx} +0 -0
  19. /package/lib/components/{ui/NumberInput.tsx → NumberInput.tsx} +0 -0
  20. /package/lib/components/{ui/RadioGroup.tsx → RadioGroup.tsx} +0 -0
  21. /package/lib/components/{ui/ReText.tsx → ReText.tsx} +0 -0
  22. /package/lib/components/{ui/Select.tsx → Select.tsx} +0 -0
  23. /package/lib/components/{ui/Slider.tsx → Slider.tsx} +0 -0
  24. /package/lib/components/{ui/Slideshow.tsx → Slideshow.tsx} +0 -0
  25. /package/lib/components/{ui/Spinner.tsx → Spinner.tsx} +0 -0
  26. /package/lib/components/{ui/Switch.tsx → Switch.tsx} +0 -0
  27. /package/lib/components/{ui/Text.tsx → Text.tsx} +0 -0
  28. /package/lib/components/{ui/Toast.tsx → Toast.tsx} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {createContext, useContext} from 'react'
2
2
  import {UnistylesVariants} from 'react-native-unistyles'
3
- import {FieldStyles} from '../../theme/Field.recipe'
4
- import {PalettesWithNestedKeys} from '../../style/varia/types'
3
+ import {FieldStyles} from '../../../theme/Field.recipe'
4
+ import {PalettesWithNestedKeys} from '../../../style/varia/types'
5
5
 
6
6
  export type FieldVariants = UnistylesVariants<typeof FieldStyles>
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-varia",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "bin": {
5
5
  "varia": "bin/cli.js"
6
6
  },
@@ -1,27 +0,0 @@
1
- import {createContext, useContext} from 'react'
2
- import {UnistylesVariants} from 'react-native-unistyles'
3
- import {FieldStyles} from '../../../theme/Field.recipe'
4
- import {PalettesWithNestedKeys} from '../../../style/varia/types'
5
-
6
- export type FieldVariants = UnistylesVariants<typeof FieldStyles>
7
-
8
- export type FieldContextType = {
9
- error?: string
10
- variant?: FieldVariants['variant']
11
- size?: FieldVariants['size']
12
- colorPalette?: PalettesWithNestedKeys
13
- }
14
-
15
- const FieldContext = createContext<FieldContextType | undefined>(undefined)
16
-
17
- export function useField() {
18
- const context = useContext(FieldContext)
19
- if (!context) {
20
- throw new Error(
21
- 'Field subcomponents (Label, Error) must be used inside Field.Root',
22
- )
23
- }
24
- return context
25
- }
26
-
27
- export default FieldContext
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes