react-native-varia 0.2.4 → 0.4.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.
- package/lib/components/Accordion.tsx +61 -21
- package/lib/components/Badge.tsx +9 -0
- package/lib/components/Button.tsx +21 -6
- package/lib/components/Checkbox.tsx +22 -8
- package/lib/components/CircleProgress.tsx +8 -0
- package/lib/components/Divider.tsx +11 -4
- package/lib/components/Drawer.tsx +34 -25
- package/lib/components/Field.tsx +4 -0
- package/lib/components/GradientBackground.tsx +3 -0
- package/lib/components/GradientText.tsx +37 -11
- package/lib/components/IconWrapper.tsx +3 -2
- package/lib/components/Input.tsx +47 -20
- package/lib/components/Link.tsx +4 -0
- package/lib/components/Modal.tsx +21 -14
- package/lib/components/NumberInput.tsx +27 -5
- package/lib/components/RadioGroup.tsx +19 -6
- package/lib/components/ReText.tsx +4 -1
- package/lib/components/Select.tsx +20 -0
- package/lib/components/Slider.tsx +244 -134
- package/lib/components/Slideshow.tsx +19 -3
- package/lib/components/Spinner.tsx +12 -2
- package/lib/components/Switch.tsx +57 -26
- package/lib/components/Text.tsx +3 -0
- package/lib/components/Toast.tsx +110 -36
- package/lib/patterns/index.tsx +299 -79
- package/lib/theme/Accordion.tsx +184 -0
- package/lib/theme/Button.recipe.tsx +24 -7
- package/lib/theme/{SlidingDrawer.recipe.tsx → Drawer.recipe.tsx} +4 -6
- package/lib/theme/Field.recipe.tsx +45 -15
- package/lib/theme/GradientText.recipe.tsx +103 -34
- package/lib/theme/Input.recipe.tsx +14 -6
- package/lib/theme/Select.recipe.tsx +3 -0
- package/lib/theme/Slider.recipe.tsx +108 -141
- package/lib/theme/Spinner.recipe.tsx +4 -0
- package/lib/theme/Switch.recipe.tsx +19 -0
- package/lib/theme/Text.recipe.tsx +63 -12
- package/lib/theme/Toast.recipe.tsx +40 -7
- package/lib/varia/mixins.ts +0 -4
- package/lib/varia/types.ts +11 -0
- package/lib/varia/utils.ts +172 -14
- package/package.json +1 -1
- package/lib/components/OldSlider.tsx +0 -327
- package/lib/components/SlidingDrawer.tsx +0 -301
|
@@ -23,15 +23,13 @@ export const FieldStyles = StyleSheet.create(theme => ({
|
|
|
23
23
|
color: theme.colors.fg.default,
|
|
24
24
|
variants: {
|
|
25
25
|
variant: {
|
|
26
|
-
solid: {
|
|
27
|
-
|
|
28
|
-
// marginLeft: theme.spacing['3'],
|
|
29
|
-
// paddingHorizontal: theme.spacing['1'],
|
|
30
|
-
backgroundColor: theme.colors.bg.default,
|
|
31
|
-
zIndex: 10,
|
|
32
|
-
flex: 0,
|
|
33
|
-
width: 'auto',
|
|
26
|
+
solid: {},
|
|
27
|
+
floating: {
|
|
34
28
|
alignSelf: 'baseline',
|
|
29
|
+
width: 'auto',
|
|
30
|
+
flex: 0,
|
|
31
|
+
zIndex: 10,
|
|
32
|
+
backgroundColor: theme.colors.bg.default,
|
|
35
33
|
},
|
|
36
34
|
},
|
|
37
35
|
size: {
|
|
@@ -43,18 +41,50 @@ export const FieldStyles = StyleSheet.create(theme => ({
|
|
|
43
41
|
},
|
|
44
42
|
md: {
|
|
45
43
|
fontSize: theme.fontSizes.md,
|
|
46
|
-
transform: [{translateY: theme.spacing['4.5']}],
|
|
47
|
-
marginLeft: theme.spacing['2'],
|
|
48
|
-
paddingHorizontal: theme.spacing['1'],
|
|
49
44
|
},
|
|
50
45
|
lg: {
|
|
51
|
-
fontSize: theme.fontSizes['
|
|
52
|
-
transform: [{translateY: theme.spacing['5']}],
|
|
53
|
-
marginLeft: theme.spacing['2.5'],
|
|
54
|
-
paddingHorizontal: theme.spacing['1'],
|
|
46
|
+
fontSize: theme.fontSizes['lg'],
|
|
55
47
|
},
|
|
56
48
|
},
|
|
57
49
|
},
|
|
50
|
+
compoundVariants: [
|
|
51
|
+
{
|
|
52
|
+
variant: 'floating',
|
|
53
|
+
size: 'xs',
|
|
54
|
+
styles: {
|
|
55
|
+
paddingHorizontal: theme.spacing['1'],
|
|
56
|
+
marginLeft: theme.spacing['1'],
|
|
57
|
+
transform: [{translateY: theme.spacing['3']}],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
variant: 'floating',
|
|
62
|
+
size: 'sm',
|
|
63
|
+
styles: {
|
|
64
|
+
paddingHorizontal: theme.spacing['1'],
|
|
65
|
+
marginLeft: theme.spacing['2'],
|
|
66
|
+
transform: [{translateY: theme.spacing['3.5']}],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
variant: 'floating',
|
|
71
|
+
size: 'md',
|
|
72
|
+
styles: {
|
|
73
|
+
paddingHorizontal: theme.spacing['1'],
|
|
74
|
+
marginLeft: theme.spacing['2'],
|
|
75
|
+
transform: [{translateY: theme.spacing['4.5']}],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
variant: 'floating',
|
|
80
|
+
size: 'lg',
|
|
81
|
+
styles: {
|
|
82
|
+
paddingHorizontal: theme.spacing['1.5'],
|
|
83
|
+
marginLeft: theme.spacing['2'],
|
|
84
|
+
transform: [{translateY: theme.spacing['6']}],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
58
88
|
}),
|
|
59
89
|
error: (colorPalette: PalettesWithNestedKeys) => ({
|
|
60
90
|
color: theme.colors.fg.error,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native-unistyles'
|
|
1
2
|
import {textStyle} from '../style/varia/textStyles'
|
|
2
|
-
import {createGradientTextTokens} from '../style/varia/types'
|
|
3
|
+
import {createGradientTextTokens, PalettesWithNestedKeys} from '../style/varia/types'
|
|
3
4
|
|
|
4
5
|
export const gradientTextTokens = createGradientTextTokens({
|
|
5
6
|
defaultProps: {
|
|
@@ -25,39 +26,107 @@ export const gradientTextTokens = createGradientTextTokens({
|
|
|
25
26
|
},
|
|
26
27
|
},
|
|
27
28
|
size: {
|
|
28
|
-
xs: {
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
sm: {
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
md: {
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
lg: {
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
xl: {
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
'2xl': {
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
'3xl': {
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
'4xl': {
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
'5xl': {
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
'6xl': {
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
'7xl': {
|
|
59
|
-
|
|
60
|
-
},
|
|
29
|
+
// xs: {
|
|
30
|
+
// ...textStyle.xs,
|
|
31
|
+
// },
|
|
32
|
+
// sm: {
|
|
33
|
+
// ...textStyle.sm,
|
|
34
|
+
// },
|
|
35
|
+
// md: {
|
|
36
|
+
// ...textStyle.md,
|
|
37
|
+
// },
|
|
38
|
+
// lg: {
|
|
39
|
+
// ...textStyle.lg,
|
|
40
|
+
// },
|
|
41
|
+
// xl: {
|
|
42
|
+
// ...textStyle.xl,
|
|
43
|
+
// },
|
|
44
|
+
// '2xl': {
|
|
45
|
+
// ...textStyle['2xl'],
|
|
46
|
+
// },
|
|
47
|
+
// '3xl': {
|
|
48
|
+
// ...textStyle['3xl'],
|
|
49
|
+
// },
|
|
50
|
+
// '4xl': {
|
|
51
|
+
// ...textStyle['4xl'],
|
|
52
|
+
// },
|
|
53
|
+
// '5xl': {
|
|
54
|
+
// ...textStyle['5xl'],
|
|
55
|
+
// },
|
|
56
|
+
// '6xl': {
|
|
57
|
+
// ...textStyle['6xl'],
|
|
58
|
+
// },
|
|
59
|
+
// '7xl': {
|
|
60
|
+
// ...textStyle['7xl'],
|
|
61
|
+
// },
|
|
61
62
|
},
|
|
62
63
|
},
|
|
63
64
|
} as const)
|
|
65
|
+
|
|
66
|
+
const GradientTextStyles = StyleSheet.create(theme => ({
|
|
67
|
+
text: (colorPalette: PalettesWithNestedKeys) => ({
|
|
68
|
+
color: theme.colors.fg.default,
|
|
69
|
+
variants: {
|
|
70
|
+
variant: {
|
|
71
|
+
heading: {
|
|
72
|
+
color: theme.colors.fg.default,
|
|
73
|
+
fontWeight: theme.fontWeights.bold,
|
|
74
|
+
},
|
|
75
|
+
default: {
|
|
76
|
+
color: theme.colors.fg.default,
|
|
77
|
+
fontWeight: theme.fontWeights.medium,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
size: {
|
|
81
|
+
xs: {
|
|
82
|
+
fontSize: theme.fontSizes.xs,
|
|
83
|
+
lineHeight: 12,
|
|
84
|
+
},
|
|
85
|
+
sm: {
|
|
86
|
+
fontSize: theme.fontSizes.sm,
|
|
87
|
+
lineHeight: 20,
|
|
88
|
+
},
|
|
89
|
+
md: {
|
|
90
|
+
fontSize: theme.fontSizes.md,
|
|
91
|
+
lineHeight: 24,
|
|
92
|
+
},
|
|
93
|
+
lg: {
|
|
94
|
+
fontSize: theme.fontSizes.lg,
|
|
95
|
+
lineHeight: 28,
|
|
96
|
+
},
|
|
97
|
+
xl: {
|
|
98
|
+
fontSize: theme.fontSizes.xl,
|
|
99
|
+
lineHeight: 30,
|
|
100
|
+
},
|
|
101
|
+
'2xl': {
|
|
102
|
+
fontSize: theme.fontSizes['2xl'],
|
|
103
|
+
lineHeight: 32,
|
|
104
|
+
},
|
|
105
|
+
'3xl': {
|
|
106
|
+
fontSize: theme.fontSizes['3xl'],
|
|
107
|
+
lineHeight: 38,
|
|
108
|
+
},
|
|
109
|
+
'4xl': {
|
|
110
|
+
fontSize: theme.fontSizes['4xl'],
|
|
111
|
+
lineHeight: 44,
|
|
112
|
+
letterSpacing: -0.032,
|
|
113
|
+
},
|
|
114
|
+
'5xl': {
|
|
115
|
+
fontSize: theme.fontSizes['5xl'],
|
|
116
|
+
lineHeight: 60,
|
|
117
|
+
letterSpacing: -0.032,
|
|
118
|
+
},
|
|
119
|
+
'6xl': {
|
|
120
|
+
fontSize: theme.fontSizes['6xl'],
|
|
121
|
+
lineHeight: 72,
|
|
122
|
+
letterSpacing: -0.032,
|
|
123
|
+
},
|
|
124
|
+
'7xl': {
|
|
125
|
+
fontSize: theme.fontSizes['7xl'],
|
|
126
|
+
lineHeight: 92,
|
|
127
|
+
letterSpacing: -0.032,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
}),
|
|
132
|
+
}))
|
|
@@ -11,7 +11,9 @@ export const InputStyles = StyleSheet.create(theme => ({
|
|
|
11
11
|
placeholder: (colorPalette: PalettesWithNestedKeys) => ({
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
|
-
solid: {
|
|
14
|
+
solid: {
|
|
15
|
+
color: theme.colors.fg.subtle,
|
|
16
|
+
},
|
|
15
17
|
},
|
|
16
18
|
invalid: {
|
|
17
19
|
true: {
|
|
@@ -38,6 +40,11 @@ export const InputStyles = StyleSheet.create(theme => ({
|
|
|
38
40
|
variants: {
|
|
39
41
|
variant: {
|
|
40
42
|
solid: {},
|
|
43
|
+
underline: {
|
|
44
|
+
borderWidth: 0,
|
|
45
|
+
borderBottomWidth: 1,
|
|
46
|
+
borderRadius: 0,
|
|
47
|
+
},
|
|
41
48
|
},
|
|
42
49
|
focused: {
|
|
43
50
|
true: {
|
|
@@ -75,14 +82,14 @@ export const InputStyles = StyleSheet.create(theme => ({
|
|
|
75
82
|
fontSize: theme.fontSizes.sm,
|
|
76
83
|
},
|
|
77
84
|
md: {
|
|
78
|
-
paddingHorizontal: theme.sizes[
|
|
85
|
+
paddingHorizontal: theme.sizes['2.5'],
|
|
79
86
|
minHeight: theme.sizes[10],
|
|
80
87
|
maxHeight: theme.sizes[20],
|
|
81
88
|
minWidth: theme.sizes[10],
|
|
82
89
|
fontSize: theme.fontSizes.md,
|
|
83
90
|
},
|
|
84
91
|
lg: {
|
|
85
|
-
paddingHorizontal: theme.sizes[
|
|
92
|
+
paddingHorizontal: theme.sizes[3],
|
|
86
93
|
minHeight: theme.sizes[11],
|
|
87
94
|
maxHeight: theme.sizes[11],
|
|
88
95
|
minWidth: theme.sizes[11],
|
|
@@ -90,18 +97,19 @@ export const InputStyles = StyleSheet.create(theme => ({
|
|
|
90
97
|
lineHeight: 18,
|
|
91
98
|
},
|
|
92
99
|
xl: {
|
|
93
|
-
paddingHorizontal: theme.sizes[
|
|
100
|
+
paddingHorizontal: theme.sizes['3.5'],
|
|
94
101
|
minHeight: theme.sizes[12],
|
|
95
102
|
maxHeight: theme.sizes[12],
|
|
96
103
|
minWidth: theme.sizes[12],
|
|
97
104
|
fontSize: theme.fontSizes.lg,
|
|
98
105
|
},
|
|
99
106
|
'2xl': {
|
|
100
|
-
paddingHorizontal: theme.sizes[
|
|
107
|
+
paddingHorizontal: theme.sizes[4],
|
|
101
108
|
minHeight: theme.sizes[16],
|
|
102
109
|
maxHeight: theme.sizes[16],
|
|
103
110
|
minWidth: theme.sizes[16],
|
|
104
|
-
...textStyle['3xl'],
|
|
111
|
+
// ...textStyle['3xl'],
|
|
112
|
+
fontSize: theme.fontSizes['3xl'],
|
|
105
113
|
},
|
|
106
114
|
flex: {
|
|
107
115
|
paddingHorizontal: theme.sizes[2],
|
|
@@ -24,12 +24,15 @@ export const SelectStyles = StyleSheet.create((theme, rt) => ({
|
|
|
24
24
|
size: {
|
|
25
25
|
sm: {
|
|
26
26
|
height: theme.sizes[9],
|
|
27
|
+
padding: theme.spacing[1],
|
|
27
28
|
},
|
|
28
29
|
md: {
|
|
29
30
|
height: theme.sizes[10],
|
|
31
|
+
padding: theme.spacing[2],
|
|
30
32
|
},
|
|
31
33
|
lg: {
|
|
32
34
|
height: theme.sizes[11],
|
|
35
|
+
padding: theme.spacing[3],
|
|
33
36
|
},
|
|
34
37
|
nosize: {},
|
|
35
38
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {StyleSheet} from 'react-native-unistyles'
|
|
2
|
-
import {hexToRgba} from '../style/varia/utils'
|
|
3
2
|
import {PalettesWithNestedKeys} from '../style/varia/types'
|
|
4
3
|
|
|
5
4
|
export const SliderDefaultVariants = {
|
|
@@ -9,7 +8,7 @@ export const SliderDefaultVariants = {
|
|
|
9
8
|
export const SliderStyles = StyleSheet.create(theme => ({
|
|
10
9
|
container: (colorPalette: PalettesWithNestedKeys) => ({
|
|
11
10
|
backgroundColor: theme.colors.bg.emphasized,
|
|
12
|
-
borderRadius: theme.radii
|
|
11
|
+
borderRadius: theme.radii.xl,
|
|
13
12
|
variants: {
|
|
14
13
|
axis: {
|
|
15
14
|
x: {},
|
|
@@ -17,34 +16,25 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
17
16
|
},
|
|
18
17
|
variant: {
|
|
19
18
|
solid: {},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
sm: {
|
|
26
|
-
// height: theme.sizes[4],
|
|
27
|
-
},
|
|
28
|
-
md: {
|
|
29
|
-
// height: theme.sizes[5],
|
|
19
|
+
outline: {
|
|
20
|
+
borderRadius: theme.radii.sm,
|
|
21
|
+
borderColor: theme.colors[colorPalette].default,
|
|
22
|
+
borderWidth: 1,
|
|
30
23
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
xl: {
|
|
35
|
-
// height: theme.sizes[10],
|
|
24
|
+
subtle: {
|
|
25
|
+
backgroundColor: theme.colors.bg.subtle,
|
|
36
26
|
},
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
sm: {},
|
|
30
|
+
md: {},
|
|
31
|
+
lg: {},
|
|
32
|
+
xl: {},
|
|
37
33
|
flex: {},
|
|
34
|
+
minimal: {},
|
|
38
35
|
},
|
|
39
36
|
},
|
|
40
37
|
compoundVariants: [
|
|
41
|
-
{
|
|
42
|
-
axis: 'x',
|
|
43
|
-
size: 'xs',
|
|
44
|
-
styles: {
|
|
45
|
-
height: theme.sizes[2],
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
38
|
{
|
|
49
39
|
axis: 'x',
|
|
50
40
|
size: 'sm',
|
|
@@ -74,10 +64,10 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
74
64
|
},
|
|
75
65
|
},
|
|
76
66
|
{
|
|
77
|
-
axis: '
|
|
78
|
-
size: '
|
|
67
|
+
axis: 'x',
|
|
68
|
+
size: 'flex',
|
|
79
69
|
styles: {
|
|
80
|
-
|
|
70
|
+
minHeight: 50,
|
|
81
71
|
},
|
|
82
72
|
},
|
|
83
73
|
{
|
|
@@ -108,12 +98,17 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
108
98
|
width: theme.sizes[10],
|
|
109
99
|
},
|
|
110
100
|
},
|
|
101
|
+
{
|
|
102
|
+
axis: 'y',
|
|
103
|
+
size: 'flex',
|
|
104
|
+
styles: {
|
|
105
|
+
minWidth: 50,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
111
108
|
],
|
|
112
109
|
}),
|
|
113
110
|
maximumTrack: (colorPalette: PalettesWithNestedKeys) => ({
|
|
114
111
|
backgroundColor: theme.colors.bg.emphasized,
|
|
115
|
-
// borderRadius: theme.radii.full,
|
|
116
|
-
// height: theme.sizes[5],
|
|
117
112
|
variants: {
|
|
118
113
|
axis: {
|
|
119
114
|
x: {},
|
|
@@ -121,34 +116,21 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
121
116
|
},
|
|
122
117
|
variant: {
|
|
123
118
|
solid: {},
|
|
119
|
+
outline: {},
|
|
120
|
+
subtle: {
|
|
121
|
+
backgroundColor: theme.colors.bg.subtle,
|
|
122
|
+
},
|
|
124
123
|
},
|
|
125
124
|
size: {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
// height: theme.sizes[4],
|
|
131
|
-
},
|
|
132
|
-
md: {
|
|
133
|
-
// height: theme.sizes[5],
|
|
134
|
-
},
|
|
135
|
-
lg: {
|
|
136
|
-
// height: theme.sizes[8],
|
|
137
|
-
},
|
|
138
|
-
xl: {
|
|
139
|
-
// height: theme.sizes[10],
|
|
140
|
-
},
|
|
125
|
+
sm: {},
|
|
126
|
+
md: {},
|
|
127
|
+
lg: {},
|
|
128
|
+
xl: {},
|
|
141
129
|
flex: {},
|
|
130
|
+
minimal: {},
|
|
142
131
|
},
|
|
143
132
|
},
|
|
144
133
|
compoundVariants: [
|
|
145
|
-
{
|
|
146
|
-
axis: 'x',
|
|
147
|
-
size: 'xs',
|
|
148
|
-
styles: {
|
|
149
|
-
height: theme.sizes[2],
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
134
|
{
|
|
153
135
|
axis: 'x',
|
|
154
136
|
size: 'sm',
|
|
@@ -178,11 +160,9 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
178
160
|
},
|
|
179
161
|
},
|
|
180
162
|
{
|
|
181
|
-
axis: '
|
|
182
|
-
size: '
|
|
183
|
-
styles: {
|
|
184
|
-
width: theme.sizes[2],
|
|
185
|
-
},
|
|
163
|
+
axis: 'x',
|
|
164
|
+
size: 'flex',
|
|
165
|
+
styles: {},
|
|
186
166
|
},
|
|
187
167
|
{
|
|
188
168
|
axis: 'y',
|
|
@@ -214,48 +194,38 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
214
194
|
},
|
|
215
195
|
],
|
|
216
196
|
}),
|
|
217
|
-
minimumTrack: (
|
|
218
|
-
|
|
219
|
-
opacityTrack: boolean,
|
|
220
|
-
) => ({
|
|
221
|
-
backgroundColor: opacityTrack
|
|
222
|
-
? hexToRgba(theme.colors[colorPalette].default, 0.5)
|
|
223
|
-
: theme.colors[colorPalette].default,
|
|
224
|
-
height: theme.sizes[5],
|
|
197
|
+
minimumTrack: (colorPalette: PalettesWithNestedKeys) => ({
|
|
198
|
+
backgroundColor: theme.colors[colorPalette].default,
|
|
225
199
|
variants: {
|
|
226
200
|
axis: {
|
|
227
|
-
x: {
|
|
228
|
-
|
|
201
|
+
x: {
|
|
202
|
+
borderBottomLeftRadius: theme.radii.xl,
|
|
203
|
+
borderBottomRightRadius: 0,
|
|
204
|
+
borderTopLeftRadius: theme.radii.xl,
|
|
205
|
+
},
|
|
206
|
+
y: {
|
|
207
|
+
borderBottomLeftRadius: theme.radii.xl,
|
|
208
|
+
borderBottomRightRadius: theme.radii.xl,
|
|
209
|
+
borderTopLeftRadius: 0,
|
|
210
|
+
},
|
|
229
211
|
},
|
|
230
212
|
variant: {
|
|
231
213
|
solid: {},
|
|
214
|
+
outline: {},
|
|
215
|
+
subtle: {},
|
|
232
216
|
},
|
|
233
217
|
size: {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
// height: theme.sizes[5],
|
|
242
|
-
},
|
|
243
|
-
lg: {
|
|
244
|
-
// height: theme.sizes[8],
|
|
245
|
-
},
|
|
246
|
-
xl: {
|
|
247
|
-
// height: theme.sizes[10],
|
|
218
|
+
sm: {},
|
|
219
|
+
md: {},
|
|
220
|
+
lg: {},
|
|
221
|
+
xl: {},
|
|
222
|
+
flex: {},
|
|
223
|
+
minimal: {
|
|
224
|
+
borderRadius: theme.radii.sm,
|
|
248
225
|
},
|
|
249
226
|
},
|
|
250
227
|
},
|
|
251
228
|
compoundVariants: [
|
|
252
|
-
{
|
|
253
|
-
axis: 'x',
|
|
254
|
-
size: 'xs',
|
|
255
|
-
styles: {
|
|
256
|
-
height: theme.sizes[2],
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
229
|
{
|
|
260
230
|
axis: 'x',
|
|
261
231
|
size: 'sm',
|
|
@@ -285,11 +255,9 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
285
255
|
},
|
|
286
256
|
},
|
|
287
257
|
{
|
|
288
|
-
axis: '
|
|
289
|
-
size: '
|
|
290
|
-
styles: {
|
|
291
|
-
width: theme.sizes[2],
|
|
292
|
-
},
|
|
258
|
+
axis: 'x',
|
|
259
|
+
size: 'flex',
|
|
260
|
+
styles: {},
|
|
293
261
|
},
|
|
294
262
|
{
|
|
295
263
|
axis: 'y',
|
|
@@ -319,59 +287,43 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
319
287
|
width: theme.sizes[10],
|
|
320
288
|
},
|
|
321
289
|
},
|
|
290
|
+
{
|
|
291
|
+
axis: 'y',
|
|
292
|
+
size: 'flex',
|
|
293
|
+
styles: {},
|
|
294
|
+
},
|
|
322
295
|
],
|
|
323
296
|
}),
|
|
324
297
|
thumb: (colorPalette: PalettesWithNestedKeys) => ({
|
|
325
|
-
backgroundColor: theme.colors.bg.default,
|
|
326
|
-
borderColor: theme.colors[colorPalette].default,
|
|
327
|
-
borderRadius: theme.radii.full,
|
|
328
|
-
borderWidth: 2,
|
|
329
|
-
// width: theme.sizes[7],
|
|
330
|
-
// height: theme.sizes[7],
|
|
331
298
|
variants: {
|
|
332
299
|
axis: {
|
|
333
300
|
x: {},
|
|
334
301
|
y: {},
|
|
335
302
|
},
|
|
336
303
|
variant: {
|
|
337
|
-
solid: {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
// height: theme.sizes[4],
|
|
304
|
+
solid: {
|
|
305
|
+
backgroundColor: theme.colors.bg.default,
|
|
306
|
+
borderColor: theme.colors[colorPalette].default,
|
|
307
|
+
borderRadius: theme.radii.full,
|
|
308
|
+
borderWidth: 2,
|
|
343
309
|
},
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
// height: theme.sizes[6],
|
|
310
|
+
subtle: {
|
|
311
|
+
backgroundColor: theme.colors[colorPalette].default,
|
|
347
312
|
},
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
// height: theme.sizes[7],
|
|
351
|
-
},
|
|
352
|
-
lg: {
|
|
353
|
-
// width: theme.sizes[8],
|
|
354
|
-
// height: theme.sizes[8],
|
|
355
|
-
},
|
|
356
|
-
xl: {
|
|
357
|
-
// width: theme.sizes[11],
|
|
358
|
-
// height: theme.sizes[11],
|
|
359
|
-
},
|
|
360
|
-
flex: {
|
|
361
|
-
// width: 30,
|
|
362
|
-
// height: 50,
|
|
313
|
+
outline: {
|
|
314
|
+
backgroundColor: theme.colors[colorPalette][11],
|
|
363
315
|
},
|
|
364
316
|
},
|
|
317
|
+
size: {
|
|
318
|
+
sm: {},
|
|
319
|
+
md: {},
|
|
320
|
+
lg: {},
|
|
321
|
+
xl: {},
|
|
322
|
+
flex: {},
|
|
323
|
+
minimal: {},
|
|
324
|
+
},
|
|
365
325
|
},
|
|
366
326
|
compoundVariants: [
|
|
367
|
-
{
|
|
368
|
-
axis: 'x',
|
|
369
|
-
size: 'xs',
|
|
370
|
-
styles: {
|
|
371
|
-
width: theme.sizes[4],
|
|
372
|
-
height: theme.sizes[4],
|
|
373
|
-
},
|
|
374
|
-
},
|
|
375
327
|
{
|
|
376
328
|
axis: 'x',
|
|
377
329
|
size: 'sm',
|
|
@@ -409,15 +361,19 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
409
361
|
size: 'flex',
|
|
410
362
|
styles: {
|
|
411
363
|
width: 30,
|
|
412
|
-
height: 50,
|
|
364
|
+
// height: 50,
|
|
365
|
+
// alignSel: 'stretch',
|
|
366
|
+
// flex: 1,
|
|
413
367
|
},
|
|
414
368
|
},
|
|
415
369
|
{
|
|
416
|
-
axis: '
|
|
417
|
-
size: '
|
|
370
|
+
axis: 'x',
|
|
371
|
+
size: 'minimal',
|
|
418
372
|
styles: {
|
|
419
|
-
width:
|
|
420
|
-
height:
|
|
373
|
+
width: 0,
|
|
374
|
+
// height: 50,
|
|
375
|
+
// alignSel: 'stretch',
|
|
376
|
+
// flex: 1,
|
|
421
377
|
},
|
|
422
378
|
},
|
|
423
379
|
{
|
|
@@ -456,30 +412,41 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
456
412
|
axis: 'y',
|
|
457
413
|
size: 'flex',
|
|
458
414
|
styles: {
|
|
459
|
-
|
|
415
|
+
alignSelf: 'stretch',
|
|
460
416
|
height: 30,
|
|
461
417
|
},
|
|
462
418
|
},
|
|
419
|
+
{
|
|
420
|
+
axis: 'y',
|
|
421
|
+
size: 'minimal',
|
|
422
|
+
styles: {
|
|
423
|
+
alignSelf: 'stretch',
|
|
424
|
+
height: 5,
|
|
425
|
+
},
|
|
426
|
+
},
|
|
463
427
|
],
|
|
464
428
|
}),
|
|
465
429
|
step: (colorPalette: PalettesWithNestedKeys) => ({
|
|
466
|
-
|
|
467
|
-
// @ts-ignore
|
|
468
|
-
backgroundColor: theme.colors.white['0'],
|
|
430
|
+
backgroundColor: theme.colors.bg.default,
|
|
469
431
|
variants: {
|
|
470
432
|
axis: {
|
|
471
433
|
x: {},
|
|
472
434
|
y: {},
|
|
473
435
|
},
|
|
474
436
|
variant: {
|
|
475
|
-
solid: {
|
|
437
|
+
solid: {
|
|
438
|
+
backgroundColor: theme.colors.bg.default,
|
|
439
|
+
},
|
|
440
|
+
subtle: {},
|
|
441
|
+
outline: {},
|
|
476
442
|
},
|
|
477
443
|
size: {
|
|
478
|
-
xs: {},
|
|
479
444
|
sm: {},
|
|
480
445
|
md: {},
|
|
481
446
|
lg: {},
|
|
482
447
|
xl: {},
|
|
448
|
+
flex: {},
|
|
449
|
+
minimal: {},
|
|
483
450
|
},
|
|
484
451
|
},
|
|
485
452
|
}),
|