react-native-varia 0.4.2 → 0.4.4
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/CircleProgress.tsx +5 -0
- package/lib/components/Drawer.tsx +1 -3
- package/lib/components/Link.tsx +3 -1
- package/lib/components/Modal.tsx +18 -5
- package/lib/components/NumberInput.tsx +4 -0
- package/lib/components/RadioGroup.tsx +7 -2
- package/lib/components/Select.tsx +14 -5
- package/lib/components/Slider.tsx +6 -3
- package/lib/components/Slideshow.tsx +2 -0
- package/lib/components/Switch.tsx +14 -6
- package/lib/components/Toast.tsx +2 -1
- package/lib/patterns/index.tsx +7 -3
- package/lib/theme/Slider.recipe.tsx +41 -83
- package/lib/theme/Switch.recipe.tsx +0 -5
- package/package.json +1 -1
|
@@ -240,9 +240,7 @@ const DrawerSliderInternal = ({
|
|
|
240
240
|
|
|
241
241
|
useEffect(() => {
|
|
242
242
|
const showSub = Keyboard.addListener('keyboardDidShow', e => {
|
|
243
|
-
if (e.endCoordinates.height < 50) return
|
|
244
|
-
|
|
245
|
-
console.log(e.endCoordinates.height)
|
|
243
|
+
if (e.endCoordinates.height < 50) return
|
|
246
244
|
setKeyboardHeight(e.endCoordinates.height)
|
|
247
245
|
})
|
|
248
246
|
const hideSub = Keyboard.addListener('keyboardDidHide', () => {
|
package/lib/components/Link.tsx
CHANGED
|
@@ -40,14 +40,16 @@ const Link = ({
|
|
|
40
40
|
console.log(color)
|
|
41
41
|
return (
|
|
42
42
|
<TouchableOpacity
|
|
43
|
+
testID="varia-link"
|
|
43
44
|
onPress={async () => {
|
|
44
45
|
try {
|
|
45
46
|
await Linking.openURL(url)
|
|
46
47
|
} catch {
|
|
47
|
-
Alert.alert('
|
|
48
|
+
Alert.alert('Could not open this link')
|
|
48
49
|
}
|
|
49
50
|
}}>
|
|
50
51
|
<Text
|
|
52
|
+
testID="varia-link-text"
|
|
51
53
|
size={size}
|
|
52
54
|
variant={variant}
|
|
53
55
|
fontSize={fontSize}
|
package/lib/components/Modal.tsx
CHANGED
|
@@ -91,11 +91,15 @@ const ModalOverlay = ({children, ...props}: ModalOverlayProps) => {
|
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
93
|
<AnimatedView
|
|
94
|
+
testID="varia-modal-overlay"
|
|
94
95
|
style={[styles.overlay, ModalStyles.overlay(colorPalette)]}
|
|
95
96
|
entering={ModalTokens.animations.variants[animation]?.enteringOverlay}
|
|
96
97
|
exiting={ModalTokens.animations.variants[animation]?.exitingOverlay}>
|
|
97
98
|
<TouchableWithoutFeedback onPress={() => setIsOpen(false)}>
|
|
98
|
-
<View
|
|
99
|
+
<View
|
|
100
|
+
testID="varia-modal-backdrop"
|
|
101
|
+
style={StyleSheet.absoluteFillObject}
|
|
102
|
+
/>
|
|
99
103
|
</TouchableWithoutFeedback>
|
|
100
104
|
{children}
|
|
101
105
|
</AnimatedView>
|
|
@@ -125,6 +129,7 @@ const ModalContent = ({children, ...props}: ModalContentProps) => {
|
|
|
125
129
|
|
|
126
130
|
return (
|
|
127
131
|
<AnimatedView
|
|
132
|
+
testID="varia-modal-content"
|
|
128
133
|
style={[styles.content(), ModalStyles.content(colorPalette)]}
|
|
129
134
|
entering={ModalTokens.animations.variants[animation]?.enteringContent}
|
|
130
135
|
exiting={ModalTokens.animations.variants[animation]?.exitingContent}>
|
|
@@ -134,7 +139,11 @@ const ModalContent = ({children, ...props}: ModalContentProps) => {
|
|
|
134
139
|
}
|
|
135
140
|
|
|
136
141
|
const ModalHeader = ({children}: {children: React.ReactNode}) => {
|
|
137
|
-
return
|
|
142
|
+
return (
|
|
143
|
+
<View testID="varia-modal-header" style={styles.header}>
|
|
144
|
+
{children}
|
|
145
|
+
</View>
|
|
146
|
+
)
|
|
138
147
|
}
|
|
139
148
|
|
|
140
149
|
const ModalTitle = ({children, ...props}: {children: React.ReactNode}) => {
|
|
@@ -142,7 +151,11 @@ const ModalTitle = ({children, ...props}: {children: React.ReactNode}) => {
|
|
|
142
151
|
const {variant, colorPalette = 'accent'} = {...context, ...props}
|
|
143
152
|
|
|
144
153
|
ModalStyles.useVariants({variant})
|
|
145
|
-
return
|
|
154
|
+
return (
|
|
155
|
+
<Text testID="varia-modal-title" style={ModalStyles.title(colorPalette)}>
|
|
156
|
+
{children}
|
|
157
|
+
</Text>
|
|
158
|
+
)
|
|
146
159
|
}
|
|
147
160
|
|
|
148
161
|
type ModalBodyProps = Omit<ModalVariants, 'variant'> & {
|
|
@@ -153,7 +166,7 @@ type ModalBodyProps = Omit<ModalVariants, 'variant'> & {
|
|
|
153
166
|
}
|
|
154
167
|
|
|
155
168
|
const ModalBody = ({children}: ModalBodyProps) => {
|
|
156
|
-
return <View>{children}</View>
|
|
169
|
+
return <View testID="varia-modal-body">{children}</View>
|
|
157
170
|
}
|
|
158
171
|
|
|
159
172
|
type CloseButtonProps = {
|
|
@@ -168,7 +181,7 @@ const CloseButton = ({
|
|
|
168
181
|
color,
|
|
169
182
|
...rest
|
|
170
183
|
}: CloseButtonProps) => (
|
|
171
|
-
<TouchableOpacity onPress={onClose}>
|
|
184
|
+
<TouchableOpacity testID="varia-modal-close-button" onPress={onClose}>
|
|
172
185
|
<Svg
|
|
173
186
|
width={scale * 24}
|
|
174
187
|
height={scale * 24}
|
|
@@ -125,6 +125,7 @@ const NumberInput = {
|
|
|
125
125
|
direction,
|
|
126
126
|
}}>
|
|
127
127
|
<View
|
|
128
|
+
testID="varia-select-root"
|
|
128
129
|
style={[
|
|
129
130
|
simpleNumberInputstyles.rootContainer(flex, alignSelf),
|
|
130
131
|
NumberInputStyles.container(colorPalette),
|
|
@@ -177,6 +178,7 @@ const NumberInput = {
|
|
|
177
178
|
NumberInputStyles.useVariants({variant, size, distribution})
|
|
178
179
|
return (
|
|
179
180
|
<TextInput
|
|
181
|
+
testID="varia-select-input"
|
|
180
182
|
style={[
|
|
181
183
|
simpleNumberInputstyles.input(childFlex as number),
|
|
182
184
|
NumberInputStyles.input(colorPalette),
|
|
@@ -222,6 +224,7 @@ const NumberInput = {
|
|
|
222
224
|
|
|
223
225
|
return (
|
|
224
226
|
<Pressable
|
|
227
|
+
testID="varia-select-increment"
|
|
225
228
|
onPress={() => setValue(value + 1)}
|
|
226
229
|
disabled={max !== undefined && value >= max}
|
|
227
230
|
style={[
|
|
@@ -265,6 +268,7 @@ const NumberInput = {
|
|
|
265
268
|
|
|
266
269
|
return (
|
|
267
270
|
<Pressable
|
|
271
|
+
testID="varia-select-decrement"
|
|
268
272
|
onPress={() => setValue(value - 1)}
|
|
269
273
|
disabled={min !== undefined && value <= min}
|
|
270
274
|
style={[
|
|
@@ -91,6 +91,7 @@ function Root({
|
|
|
91
91
|
return (
|
|
92
92
|
<RadioGroupContext.Provider value={contextValue}>
|
|
93
93
|
<View
|
|
94
|
+
testID="varia-radio-group-root"
|
|
94
95
|
style={[
|
|
95
96
|
styles.root(
|
|
96
97
|
flex,
|
|
@@ -139,6 +140,8 @@ function Item({children, value: itemValue}: PublicItemProps) {
|
|
|
139
140
|
|
|
140
141
|
return (
|
|
141
142
|
<Pressable
|
|
143
|
+
aria-checked={value === itemValue}
|
|
144
|
+
testID={`varia-radio-group-item-${value}`}
|
|
142
145
|
style={({pressed}) => [
|
|
143
146
|
styles.item,
|
|
144
147
|
RadioGroupStyles.item(colorPalette, pressed),
|
|
@@ -172,7 +175,9 @@ function Indicator({
|
|
|
172
175
|
})
|
|
173
176
|
|
|
174
177
|
return (
|
|
175
|
-
<View
|
|
178
|
+
<View
|
|
179
|
+
testID="varia-radio-group-indicator"
|
|
180
|
+
style={RadioGroupStyles.control(colorPalette)}>
|
|
176
181
|
<View style={RadioGroupStyles.indicator(colorPalette)} />
|
|
177
182
|
</View>
|
|
178
183
|
)
|
|
@@ -214,7 +219,7 @@ const styles = StyleSheet.create({
|
|
|
214
219
|
alignSelf?: AlignSelf,
|
|
215
220
|
justifyContent?: ViewStyle['justifyContent'],
|
|
216
221
|
alignItems?: ViewStyle['alignItems'],
|
|
217
|
-
gap?:
|
|
222
|
+
gap?: Gap,
|
|
218
223
|
) => ({
|
|
219
224
|
flex,
|
|
220
225
|
flexDirection: direction,
|
|
@@ -116,7 +116,7 @@ const SelectRoot = ({
|
|
|
116
116
|
)
|
|
117
117
|
|
|
118
118
|
return (
|
|
119
|
-
<View style={[styles.container(flex, stretch)]}>
|
|
119
|
+
<View style={[styles.container(flex, stretch)]} testID="varia-select-root">
|
|
120
120
|
{trigger &&
|
|
121
121
|
React.cloneElement(trigger as ReactElement<TriggerProps>, {
|
|
122
122
|
isOpen,
|
|
@@ -194,7 +194,8 @@ const SelectTrigger = ({
|
|
|
194
194
|
style={({pressed}) => [
|
|
195
195
|
styles.input(childFlex),
|
|
196
196
|
SelectStyles.trigger(colorPalette, pressed),
|
|
197
|
-
]}
|
|
197
|
+
]}
|
|
198
|
+
testID="varia-select-trigger">
|
|
198
199
|
<Text>{selected ? selected.label : placeholder}</Text>
|
|
199
200
|
</Pressable>
|
|
200
201
|
)
|
|
@@ -214,7 +215,10 @@ const SelectOverlay = ({
|
|
|
214
215
|
const {setIsOpen} = useSelect()
|
|
215
216
|
return (
|
|
216
217
|
<TouchableWithoutFeedback onPress={() => setIsOpen(false)}>
|
|
217
|
-
<View
|
|
218
|
+
<View
|
|
219
|
+
style={[styles.backdrop, SelectStyles.overlay(colorPalette)]}
|
|
220
|
+
testID="varia-select-overlay"
|
|
221
|
+
/>
|
|
218
222
|
</TouchableWithoutFeedback>
|
|
219
223
|
)
|
|
220
224
|
}
|
|
@@ -231,7 +235,9 @@ const SelectContent = ({
|
|
|
231
235
|
const {variant, size, colorPalette} = {...useSelect(), ...props}
|
|
232
236
|
SelectStyles.useVariants({variant, size})
|
|
233
237
|
return (
|
|
234
|
-
<View
|
|
238
|
+
<View
|
|
239
|
+
style={[styles.modalContent, SelectStyles.content(colorPalette)]}
|
|
240
|
+
testID="varia-select-content">
|
|
235
241
|
<ScrollView>{children}</ScrollView>
|
|
236
242
|
</View>
|
|
237
243
|
)
|
|
@@ -249,7 +255,10 @@ const SelectItem = ({value, label, ...props}: Option) => {
|
|
|
249
255
|
const isSelected = selected === value
|
|
250
256
|
SelectStyles.useVariants({variant, size})
|
|
251
257
|
return (
|
|
252
|
-
<TouchableOpacity
|
|
258
|
+
<TouchableOpacity
|
|
259
|
+
onPress={() => setValue(value)}
|
|
260
|
+
testID="varia-select-item"
|
|
261
|
+
aria-selected={isSelected}>
|
|
253
262
|
<View style={[styles.item, SelectStyles.item(colorPalette, isSelected)]}>
|
|
254
263
|
<Text style={SelectStyles.itemText(colorPalette, isSelected)}>
|
|
255
264
|
{label}
|
|
@@ -273,6 +273,7 @@ const Slider = ({
|
|
|
273
273
|
|
|
274
274
|
return (
|
|
275
275
|
<View
|
|
276
|
+
testID="varia-slider-container"
|
|
276
277
|
style={[
|
|
277
278
|
styles.container(halfSize, flex, alignSelf),
|
|
278
279
|
SliderStyles.container(colorPalette),
|
|
@@ -280,12 +281,14 @@ const Slider = ({
|
|
|
280
281
|
{axis === 'x' && <View style={{width: halfSize}} />}
|
|
281
282
|
<GestureDetector gesture={Gesture.Simultaneous(trackPan, tapGesture)}>
|
|
282
283
|
<View
|
|
284
|
+
testID="varia-slider-maximun-track"
|
|
283
285
|
style={[
|
|
284
286
|
styles.maximumTrack(),
|
|
285
287
|
SliderStyles.maximumTrack(colorPalette),
|
|
286
288
|
]}
|
|
287
289
|
onLayout={handleTrackLayout}>
|
|
288
290
|
<AnimatedView
|
|
291
|
+
testID="varia-slider-minimum-track"
|
|
289
292
|
style={[
|
|
290
293
|
styles.minimumTrack(halfSize),
|
|
291
294
|
SliderStyles.minimumTrack(colorPalette),
|
|
@@ -295,7 +298,7 @@ const Slider = ({
|
|
|
295
298
|
|
|
296
299
|
{steps && (
|
|
297
300
|
<View style={[styles.stepsOverlay]} pointerEvents="none">
|
|
298
|
-
<View style={styles.steps}>
|
|
301
|
+
<View style={styles.steps} testID="varia-slider-steps">
|
|
299
302
|
{Array.from({length: steps + 1}, (_, index) => index).map(
|
|
300
303
|
(_, i) => (
|
|
301
304
|
<View
|
|
@@ -311,7 +314,7 @@ const Slider = ({
|
|
|
311
314
|
</View>
|
|
312
315
|
)}
|
|
313
316
|
<GestureDetector gesture={slideGesture}>
|
|
314
|
-
<View style={styles.thumbContainerFull}>
|
|
317
|
+
<View style={styles.thumbContainerFull} testID="varia-slider-tumb">
|
|
315
318
|
<AnimatedView style={[animatedThumb, {flex: 1}]}>
|
|
316
319
|
<View
|
|
317
320
|
style={[
|
|
@@ -350,7 +353,7 @@ const styles = StyleSheet.create(theme => ({
|
|
|
350
353
|
},
|
|
351
354
|
y: {
|
|
352
355
|
// maxHeight: 'auto',
|
|
353
|
-
height: '100%',
|
|
356
|
+
// height: '100%',
|
|
354
357
|
paddingTop: halfSize,
|
|
355
358
|
paddingRight: 0,
|
|
356
359
|
flexDirection: 'column',
|
|
@@ -170,6 +170,7 @@ const Slideshow = ({
|
|
|
170
170
|
<View style={styles.flex(flex)}>
|
|
171
171
|
<GestureDetector gesture={slideGesture}>
|
|
172
172
|
<View
|
|
173
|
+
testID="varia-slideshow"
|
|
173
174
|
style={[styles.container(), SlideshowStyles.container(colorPalette)]}
|
|
174
175
|
onLayout={e => {
|
|
175
176
|
setContainerWidth(e.nativeEvent.layout.width)
|
|
@@ -182,6 +183,7 @@ const Slideshow = ({
|
|
|
182
183
|
]}>
|
|
183
184
|
{slides.map((Slide, index) => (
|
|
184
185
|
<View
|
|
186
|
+
testID={`varia-slides-slide-${index}`}
|
|
185
187
|
key={index}
|
|
186
188
|
style={[
|
|
187
189
|
styles.slide(`${slideSize}%`, isHorizontal),
|
|
@@ -87,24 +87,30 @@ const Switch = ({
|
|
|
87
87
|
useLayoutEffect(() => {
|
|
88
88
|
animatedRef.current?.measure((x, y, width) => {
|
|
89
89
|
containerWidth.value = width
|
|
90
|
-
// const thumbWidth = SwitchStyles.thumb(colorPalette).width
|
|
91
90
|
const thumbWidth = getVariantValue(
|
|
92
91
|
SwitchStyles.thumb(colorPalette),
|
|
93
92
|
'size',
|
|
94
93
|
size,
|
|
95
94
|
'width',
|
|
96
95
|
)
|
|
97
|
-
// const padding = SwitchStyles.container(colorPalette).padding || 0
|
|
98
96
|
const padding =
|
|
99
97
|
getVariantValue(
|
|
100
98
|
SwitchStyles.container(colorPalette),
|
|
101
99
|
'size',
|
|
102
100
|
size,
|
|
103
101
|
'padding',
|
|
104
|
-
) ||
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const trackBorderWidth =
|
|
102
|
+
) ||
|
|
103
|
+
SwitchStyles.container(colorPalette).padding ||
|
|
104
|
+
0
|
|
105
|
+
const trackBorderWidth =
|
|
106
|
+
getVariantValue(
|
|
107
|
+
SwitchStyles.container(colorPalette),
|
|
108
|
+
'size',
|
|
109
|
+
size,
|
|
110
|
+
'borderWidth',
|
|
111
|
+
) ||
|
|
112
|
+
SwitchStyles.container(colorPalette).borderWidth ||
|
|
113
|
+
0
|
|
108
114
|
thumbEnabledPosition.value =
|
|
109
115
|
width - thumbWidth - trackBorderWidth * 2 - padding * 2
|
|
110
116
|
})
|
|
@@ -141,6 +147,7 @@ const Switch = ({
|
|
|
141
147
|
|
|
142
148
|
return (
|
|
143
149
|
<TouchableWithoutFeedback
|
|
150
|
+
testID="varia-switch"
|
|
144
151
|
onPress={() => {
|
|
145
152
|
if (isAnimating.value) return
|
|
146
153
|
isAnimating.value = true
|
|
@@ -164,6 +171,7 @@ const Switch = ({
|
|
|
164
171
|
SwitchStyles.container(colorPalette),
|
|
165
172
|
]}>
|
|
166
173
|
<AnimatedView
|
|
174
|
+
testID="varia-switch-thumb"
|
|
167
175
|
style={[
|
|
168
176
|
styles.thumb,
|
|
169
177
|
SwitchStyles.thumb(colorPalette),
|
package/lib/components/Toast.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import {ToastStyles, ToastDefaultVariants} from '../theme/Toast.recipe'
|
|
|
13
13
|
import {UnistylesVariants} from 'react-native-unistyles'
|
|
14
14
|
import {PalettesWithNestedKeys} from '../style/varia/types'
|
|
15
15
|
import Text from './Text'
|
|
16
|
-
import {AnimatedHStack, VStack} from '../patterns
|
|
16
|
+
import {AnimatedHStack, VStack} from '../patterns'
|
|
17
17
|
|
|
18
18
|
type ToastVariants = UnistylesVariants<typeof ToastStyles>
|
|
19
19
|
|
|
@@ -81,6 +81,7 @@ const Toast: React.FC<ToastProps> = ({
|
|
|
81
81
|
|
|
82
82
|
return (
|
|
83
83
|
<VStack
|
|
84
|
+
testID="varia-toast"
|
|
84
85
|
style={[
|
|
85
86
|
{
|
|
86
87
|
...StyleSheet.absoluteFill,
|
package/lib/patterns/index.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import type {StyleProp, ViewProps, ViewStyle} from 'react-native'
|
|
|
6
6
|
import Animated, {AnimatedRef} from 'react-native-reanimated'
|
|
7
7
|
import {StyleSheet, UnistylesRuntime} from 'react-native-unistyles'
|
|
8
8
|
|
|
9
|
-
interface StackProps {
|
|
9
|
+
interface StackProps extends ViewProps {
|
|
10
10
|
backgroundColor?: ViewStyle['backgroundColor']
|
|
11
11
|
bg?: ViewStyle['backgroundColor']
|
|
12
12
|
width?: ViewStyle['width']
|
|
@@ -85,7 +85,9 @@ const VStack = ({children, style, align, ...props}: StackProps) => {
|
|
|
85
85
|
const styleArr = useMemo(() => mapProps(props), [props])
|
|
86
86
|
|
|
87
87
|
return (
|
|
88
|
-
<View
|
|
88
|
+
<View
|
|
89
|
+
style={[stackStyles.stack, stackStyles.vstack, styleArr, style]}
|
|
90
|
+
{...props}>
|
|
89
91
|
{children}
|
|
90
92
|
</View>
|
|
91
93
|
)
|
|
@@ -96,7 +98,9 @@ const HStack = ({children, style, align, ...props}: StackProps) => {
|
|
|
96
98
|
const styleArr = useMemo(() => mapProps(props), [props])
|
|
97
99
|
|
|
98
100
|
return (
|
|
99
|
-
<View
|
|
101
|
+
<View
|
|
102
|
+
style={[stackStyles.stack, stackStyles.hstack, styleArr, style]}
|
|
103
|
+
{...props}>
|
|
100
104
|
{children}
|
|
101
105
|
</View>
|
|
102
106
|
)
|
|
@@ -26,15 +26,41 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
size: {
|
|
29
|
-
sm: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
sm: {
|
|
30
|
+
borderRadius: theme.radii.lg,
|
|
31
|
+
},
|
|
32
|
+
md: {
|
|
33
|
+
borderRadius: theme.radii.xl,
|
|
34
|
+
},
|
|
35
|
+
lg: {
|
|
36
|
+
borderRadius: theme.radii['2xl'],
|
|
37
|
+
},
|
|
33
38
|
flex: {},
|
|
34
39
|
minimal: {},
|
|
35
40
|
},
|
|
36
41
|
},
|
|
37
42
|
compoundVariants: [
|
|
43
|
+
{
|
|
44
|
+
size: 'sm',
|
|
45
|
+
variant: 'outline',
|
|
46
|
+
styles: {
|
|
47
|
+
borderRadius: theme.radii.sm,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
size: 'md',
|
|
52
|
+
variant: 'outline',
|
|
53
|
+
styles: {
|
|
54
|
+
borderRadius: theme.radii.sm,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
size: 'lg',
|
|
59
|
+
variant: 'outline',
|
|
60
|
+
styles: {
|
|
61
|
+
borderRadius: theme.radii.sm,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
38
64
|
{
|
|
39
65
|
axis: 'x',
|
|
40
66
|
size: 'sm',
|
|
@@ -56,13 +82,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
56
82
|
height: theme.sizes[8],
|
|
57
83
|
},
|
|
58
84
|
},
|
|
59
|
-
{
|
|
60
|
-
axis: 'x',
|
|
61
|
-
size: 'xl',
|
|
62
|
-
styles: {
|
|
63
|
-
height: theme.sizes[10],
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
85
|
{
|
|
67
86
|
axis: 'x',
|
|
68
87
|
size: 'flex',
|
|
@@ -91,13 +110,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
91
110
|
width: theme.sizes[8],
|
|
92
111
|
},
|
|
93
112
|
},
|
|
94
|
-
{
|
|
95
|
-
axis: 'y',
|
|
96
|
-
size: 'xl',
|
|
97
|
-
styles: {
|
|
98
|
-
width: theme.sizes[10],
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
113
|
{
|
|
102
114
|
axis: 'y',
|
|
103
115
|
size: 'flex',
|
|
@@ -125,7 +137,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
125
137
|
sm: {},
|
|
126
138
|
md: {},
|
|
127
139
|
lg: {},
|
|
128
|
-
xl: {},
|
|
129
140
|
flex: {},
|
|
130
141
|
minimal: {},
|
|
131
142
|
},
|
|
@@ -152,13 +163,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
152
163
|
height: theme.sizes[8],
|
|
153
164
|
},
|
|
154
165
|
},
|
|
155
|
-
{
|
|
156
|
-
axis: 'x',
|
|
157
|
-
size: 'xl',
|
|
158
|
-
styles: {
|
|
159
|
-
height: theme.sizes[10],
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
166
|
{
|
|
163
167
|
axis: 'x',
|
|
164
168
|
size: 'flex',
|
|
@@ -185,13 +189,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
185
189
|
width: theme.sizes[8],
|
|
186
190
|
},
|
|
187
191
|
},
|
|
188
|
-
{
|
|
189
|
-
axis: 'y',
|
|
190
|
-
size: 'xl',
|
|
191
|
-
styles: {
|
|
192
|
-
width: theme.sizes[10],
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
192
|
],
|
|
196
193
|
}),
|
|
197
194
|
minimumTrack: (colorPalette: PalettesWithNestedKeys) => ({
|
|
@@ -199,14 +196,14 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
199
196
|
variants: {
|
|
200
197
|
axis: {
|
|
201
198
|
x: {
|
|
202
|
-
borderBottomLeftRadius: theme.radii.xl,
|
|
203
|
-
borderBottomRightRadius: 0,
|
|
204
|
-
borderTopLeftRadius: theme.radii.xl,
|
|
199
|
+
// borderBottomLeftRadius: theme.radii.xl,
|
|
200
|
+
// borderBottomRightRadius: 0,
|
|
201
|
+
// borderTopLeftRadius: theme.radii.xl,
|
|
205
202
|
},
|
|
206
203
|
y: {
|
|
207
|
-
borderBottomLeftRadius: theme.radii.xl,
|
|
208
|
-
borderBottomRightRadius: theme.radii.xl,
|
|
209
|
-
borderTopLeftRadius: 0,
|
|
204
|
+
// borderBottomLeftRadius: theme.radii.xl,
|
|
205
|
+
// borderBottomRightRadius: theme.radii.xl,
|
|
206
|
+
// borderTopLeftRadius: 0,
|
|
210
207
|
},
|
|
211
208
|
},
|
|
212
209
|
variant: {
|
|
@@ -218,10 +215,9 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
218
215
|
sm: {},
|
|
219
216
|
md: {},
|
|
220
217
|
lg: {},
|
|
221
|
-
xl: {},
|
|
222
218
|
flex: {},
|
|
223
219
|
minimal: {
|
|
224
|
-
borderRadius: theme.radii.sm,
|
|
220
|
+
// borderRadius: theme.radii.sm,
|
|
225
221
|
},
|
|
226
222
|
},
|
|
227
223
|
},
|
|
@@ -247,13 +243,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
247
243
|
height: theme.sizes[8],
|
|
248
244
|
},
|
|
249
245
|
},
|
|
250
|
-
{
|
|
251
|
-
axis: 'x',
|
|
252
|
-
size: 'xl',
|
|
253
|
-
styles: {
|
|
254
|
-
height: theme.sizes[10],
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
246
|
{
|
|
258
247
|
axis: 'x',
|
|
259
248
|
size: 'flex',
|
|
@@ -280,13 +269,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
280
269
|
width: theme.sizes[8],
|
|
281
270
|
},
|
|
282
271
|
},
|
|
283
|
-
{
|
|
284
|
-
axis: 'y',
|
|
285
|
-
size: 'xl',
|
|
286
|
-
styles: {
|
|
287
|
-
width: theme.sizes[10],
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
272
|
{
|
|
291
273
|
axis: 'y',
|
|
292
274
|
size: 'flex',
|
|
@@ -318,7 +300,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
318
300
|
sm: {},
|
|
319
301
|
md: {},
|
|
320
302
|
lg: {},
|
|
321
|
-
xl: {},
|
|
322
303
|
flex: {},
|
|
323
304
|
minimal: {},
|
|
324
305
|
},
|
|
@@ -328,16 +309,16 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
328
309
|
axis: 'x',
|
|
329
310
|
size: 'sm',
|
|
330
311
|
styles: {
|
|
331
|
-
width: theme.sizes[
|
|
332
|
-
height: theme.sizes[
|
|
312
|
+
width: theme.sizes[4],
|
|
313
|
+
height: theme.sizes[4],
|
|
333
314
|
},
|
|
334
315
|
},
|
|
335
316
|
{
|
|
336
317
|
axis: 'x',
|
|
337
318
|
size: 'md',
|
|
338
319
|
styles: {
|
|
339
|
-
width: theme.sizes[
|
|
340
|
-
height: theme.sizes[
|
|
320
|
+
width: theme.sizes[5],
|
|
321
|
+
height: theme.sizes[5],
|
|
341
322
|
},
|
|
342
323
|
},
|
|
343
324
|
{
|
|
@@ -348,22 +329,11 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
348
329
|
height: theme.sizes[8],
|
|
349
330
|
},
|
|
350
331
|
},
|
|
351
|
-
{
|
|
352
|
-
axis: 'x',
|
|
353
|
-
size: 'xl',
|
|
354
|
-
styles: {
|
|
355
|
-
width: theme.sizes[11],
|
|
356
|
-
height: theme.sizes[11],
|
|
357
|
-
},
|
|
358
|
-
},
|
|
359
332
|
{
|
|
360
333
|
axis: 'x',
|
|
361
334
|
size: 'flex',
|
|
362
335
|
styles: {
|
|
363
336
|
width: 30,
|
|
364
|
-
// height: 50,
|
|
365
|
-
// alignSel: 'stretch',
|
|
366
|
-
// flex: 1,
|
|
367
337
|
},
|
|
368
338
|
},
|
|
369
339
|
{
|
|
@@ -371,9 +341,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
371
341
|
size: 'minimal',
|
|
372
342
|
styles: {
|
|
373
343
|
width: 0,
|
|
374
|
-
// height: 50,
|
|
375
|
-
// alignSel: 'stretch',
|
|
376
|
-
// flex: 1,
|
|
377
344
|
},
|
|
378
345
|
},
|
|
379
346
|
{
|
|
@@ -400,14 +367,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
400
367
|
height: theme.sizes[8],
|
|
401
368
|
},
|
|
402
369
|
},
|
|
403
|
-
{
|
|
404
|
-
axis: 'y',
|
|
405
|
-
size: 'xl',
|
|
406
|
-
styles: {
|
|
407
|
-
width: theme.sizes[11],
|
|
408
|
-
height: theme.sizes[11],
|
|
409
|
-
},
|
|
410
|
-
},
|
|
411
370
|
{
|
|
412
371
|
axis: 'y',
|
|
413
372
|
size: 'flex',
|
|
@@ -444,7 +403,6 @@ export const SliderStyles = StyleSheet.create(theme => ({
|
|
|
444
403
|
sm: {},
|
|
445
404
|
md: {},
|
|
446
405
|
lg: {},
|
|
447
|
-
xl: {},
|
|
448
406
|
flex: {},
|
|
449
407
|
minimal: {},
|
|
450
408
|
},
|
|
@@ -30,8 +30,6 @@ export const SwitchTokens = {
|
|
|
30
30
|
|
|
31
31
|
export const SwitchStyles = StyleSheet.create(theme => ({
|
|
32
32
|
container: (colorPalette: PalettesWithNestedKeys) => ({
|
|
33
|
-
// width: theme.sizes[16],
|
|
34
|
-
// height: theme.sizes[16],
|
|
35
33
|
borderRadius: theme.radii.full,
|
|
36
34
|
padding: theme.spacing['0.5'],
|
|
37
35
|
borderWidth: 0,
|
|
@@ -57,7 +55,6 @@ export const SwitchStyles = StyleSheet.create(theme => ({
|
|
|
57
55
|
},
|
|
58
56
|
flex: {
|
|
59
57
|
borderRadius: theme.radii.md,
|
|
60
|
-
// alignSelf: 'stretch',
|
|
61
58
|
},
|
|
62
59
|
},
|
|
63
60
|
enabled: {
|
|
@@ -81,8 +78,6 @@ export const SwitchStyles = StyleSheet.create(theme => ({
|
|
|
81
78
|
thumb: (colorPalette: PalettesWithNestedKeys) => ({
|
|
82
79
|
backgroundColor: theme.colors.bg.default,
|
|
83
80
|
borderRadius: theme.radii.full,
|
|
84
|
-
// width: theme.sizes[6],
|
|
85
|
-
// height: theme.sizes[6],
|
|
86
81
|
variants: {
|
|
87
82
|
variant: {
|
|
88
83
|
solid: {},
|