react-native-mantine 0.5.0 → 0.6.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/README.md +0 -357
- package/lib/commonjs/components/Button/Button.styles.js +4 -4
- package/lib/commonjs/components/Button/Button.styles.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +15 -14
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/CloseButton/index.js +5 -30
- package/lib/commonjs/components/CloseButton/index.js.map +1 -1
- package/lib/commonjs/components/Collapse/index.js +10 -2
- package/lib/commonjs/components/Collapse/index.js.map +1 -1
- package/lib/commonjs/components/Dialog/index.js +51 -8
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Drawer/index.js +4 -13
- package/lib/commonjs/components/Drawer/index.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +53 -0
- package/lib/commonjs/components/Icon/index.js.map +1 -0
- package/lib/commonjs/components/List/index.js.map +1 -1
- package/lib/commonjs/components/Menu/index.js +11 -10
- package/lib/commonjs/components/Menu/index.js.map +1 -1
- package/lib/commonjs/components/Modal/index.js +10 -16
- package/lib/commonjs/components/Modal/index.js.map +1 -1
- package/lib/commonjs/components/Notification/index.js +12 -5
- package/lib/commonjs/components/Notification/index.js.map +1 -1
- package/lib/commonjs/components/NumberInput/index.js +2 -1
- package/lib/commonjs/components/NumberInput/index.js.map +1 -1
- package/lib/commonjs/components/PasswordInput/index.js +5 -6
- package/lib/commonjs/components/PasswordInput/index.js.map +1 -1
- package/lib/commonjs/components/PinInput/index.js +7 -2
- package/lib/commonjs/components/PinInput/index.js.map +1 -1
- package/lib/commonjs/components/Popover/index.js +8 -7
- package/lib/commonjs/components/Popover/index.js.map +1 -1
- package/lib/commonjs/components/RingProgress/index.js +49 -7
- package/lib/commonjs/components/RingProgress/index.js.map +1 -1
- package/lib/commonjs/components/SegmentedControl/index.js +7 -4
- package/lib/commonjs/components/SegmentedControl/index.js.map +1 -1
- package/lib/commonjs/components/Slider/index.js +28 -3
- package/lib/commonjs/components/Slider/index.js.map +1 -1
- package/lib/commonjs/components/Stepper/index.js.map +1 -1
- package/lib/commonjs/components/Table/index.js +22 -20
- package/lib/commonjs/components/Table/index.js.map +1 -1
- package/lib/commonjs/components/TextInput/index.js +2 -2
- package/lib/commonjs/components/TextInput/index.js.map +1 -1
- package/lib/commonjs/components/Timeline/index.js +12 -5
- package/lib/commonjs/components/Timeline/index.js.map +1 -1
- package/lib/commonjs/components/Tooltip/index.js +12 -11
- package/lib/commonjs/components/Tooltip/index.js.map +1 -1
- package/lib/commonjs/components/TransferList/index.js +3 -8
- package/lib/commonjs/components/TransferList/index.js.map +1 -1
- package/lib/commonjs/components/Transition/index.js +4 -0
- package/lib/commonjs/components/Transition/index.js.map +1 -1
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.js +4 -0
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/commonjs/components/index.js +22 -22
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/theme/functions/attach-functions.js +3 -0
- package/lib/commonjs/theme/functions/attach-functions.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/helpers.js +12 -1
- package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/index.js +4 -0
- package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/rgba.js +50 -0
- package/lib/commonjs/theme/functions/fns/rgba.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/size.js +19 -0
- package/lib/commonjs/theme/functions/fns/size.js.map +1 -0
- package/lib/module/components/Button/Button.styles.js +4 -4
- package/lib/module/components/Button/Button.styles.js.map +1 -1
- package/lib/module/components/Button/index.js +15 -14
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/CloseButton/index.js +6 -31
- package/lib/module/components/CloseButton/index.js.map +1 -1
- package/lib/module/components/Collapse/index.js +10 -2
- package/lib/module/components/Collapse/index.js.map +1 -1
- package/lib/module/components/Dialog/index.js +52 -9
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Drawer/index.js +4 -13
- package/lib/module/components/Drawer/index.js.map +1 -1
- package/lib/module/components/Icon/index.js +48 -0
- package/lib/module/components/Icon/index.js.map +1 -0
- package/lib/module/components/List/index.js.map +1 -1
- package/lib/module/components/Menu/index.js +9 -8
- package/lib/module/components/Menu/index.js.map +1 -1
- package/lib/module/components/Modal/index.js +10 -16
- package/lib/module/components/Modal/index.js.map +1 -1
- package/lib/module/components/Notification/index.js +12 -5
- package/lib/module/components/Notification/index.js.map +1 -1
- package/lib/module/components/NumberInput/index.js +2 -1
- package/lib/module/components/NumberInput/index.js.map +1 -1
- package/lib/module/components/PasswordInput/index.js +5 -6
- package/lib/module/components/PasswordInput/index.js.map +1 -1
- package/lib/module/components/PinInput/index.js +7 -2
- package/lib/module/components/PinInput/index.js.map +1 -1
- package/lib/module/components/Popover/index.js +9 -8
- package/lib/module/components/Popover/index.js.map +1 -1
- package/lib/module/components/RingProgress/index.js +51 -9
- package/lib/module/components/RingProgress/index.js.map +1 -1
- package/lib/module/components/SegmentedControl/index.js +7 -4
- package/lib/module/components/SegmentedControl/index.js.map +1 -1
- package/lib/module/components/Slider/index.js +28 -3
- package/lib/module/components/Slider/index.js.map +1 -1
- package/lib/module/components/Stepper/index.js.map +1 -1
- package/lib/module/components/Table/index.js +22 -19
- package/lib/module/components/Table/index.js.map +1 -1
- package/lib/module/components/TextInput/index.js +2 -2
- package/lib/module/components/TextInput/index.js.map +1 -1
- package/lib/module/components/Timeline/index.js +12 -5
- package/lib/module/components/Timeline/index.js.map +1 -1
- package/lib/module/components/Tooltip/index.js +11 -10
- package/lib/module/components/Tooltip/index.js.map +1 -1
- package/lib/module/components/TransferList/index.js +4 -9
- package/lib/module/components/TransferList/index.js.map +1 -1
- package/lib/module/components/Transition/index.js +5 -1
- package/lib/module/components/Transition/index.js.map +1 -1
- package/lib/module/components/UnstyledButton/UnstyledButton.js +4 -0
- package/lib/module/components/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/theme/functions/attach-functions.js +3 -0
- package/lib/module/theme/functions/attach-functions.js.map +1 -1
- package/lib/module/theme/functions/fns/helpers.js +10 -0
- package/lib/module/theme/functions/fns/helpers.js.map +1 -1
- package/lib/module/theme/functions/fns/index.js +4 -0
- package/lib/module/theme/functions/fns/index.js.map +1 -1
- package/lib/module/theme/functions/fns/rgba.js +46 -0
- package/lib/module/theme/functions/fns/rgba.js.map +1 -0
- package/lib/module/theme/functions/fns/size.js +15 -0
- package/lib/module/theme/functions/fns/size.js.map +1 -0
- package/lib/typescript/commonjs/src/components/Button/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/CloseButton/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Collapse/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Drawer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Icon/index.d.ts +26 -0
- package/lib/typescript/commonjs/src/components/Icon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Modal/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Notification/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/NumberInput/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/PinInput/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Popover/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/RingProgress/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/SegmentedControl/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Slider/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stepper/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Table/index.d.ts +16 -7
- package/lib/typescript/commonjs/src/components/Table/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/TextInput/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Timeline/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Tooltip/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/TransferList/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Transition/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +7 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/rgba.d.ts +8 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/rgba.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts +6 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Button/index.d.ts +1 -0
- package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/CloseButton/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Collapse/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/index.d.ts +2 -0
- package/lib/typescript/module/src/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Drawer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Icon/index.d.ts +26 -0
- package/lib/typescript/module/src/components/Icon/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Modal/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Notification/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/NumberInput/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/PinInput/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Popover/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/RingProgress/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/SegmentedControl/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Slider/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stepper/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Table/index.d.ts +16 -7
- package/lib/typescript/module/src/components/Table/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/TextInput/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Timeline/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Tooltip/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/TransferList/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Transition/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts +2 -0
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -1
- package/lib/typescript/module/src/components/index.d.ts +1 -1
- package/lib/typescript/module/src/components/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +7 -0
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts +7 -0
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/rgba.d.ts +8 -0
- package/lib/typescript/module/src/theme/functions/fns/rgba.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/size.d.ts +6 -0
- package/lib/typescript/module/src/theme/functions/fns/size.d.ts.map +1 -0
- package/package.json +12 -9
- package/src/components/Button/Button.styles.ts +3 -3
- package/src/components/Button/index.tsx +56 -61
- package/src/components/Chip/index.tsx +3 -3
- package/src/components/CloseButton/index.tsx +2 -23
- package/src/components/Collapse/index.tsx +11 -2
- package/src/components/Dialog/index.tsx +54 -9
- package/src/components/Drawer/index.tsx +7 -13
- package/src/components/Icon/index.tsx +74 -0
- package/src/components/List/index.tsx +1 -1
- package/src/components/Menu/index.tsx +13 -10
- package/src/components/Modal/index.tsx +11 -16
- package/src/components/Notification/index.tsx +10 -2
- package/src/components/NumberInput/index.tsx +57 -15
- package/src/components/PasswordInput/index.tsx +2 -2
- package/src/components/PinInput/index.tsx +24 -9
- package/src/components/Popover/index.tsx +13 -10
- package/src/components/RingProgress/index.tsx +51 -8
- package/src/components/SegmentedControl/index.tsx +6 -4
- package/src/components/Slider/index.tsx +14 -3
- package/src/components/Stepper/index.tsx +5 -4
- package/src/components/Table/index.tsx +73 -36
- package/src/components/TextInput/index.tsx +93 -66
- package/src/components/Timeline/index.tsx +19 -12
- package/src/components/Tooltip/index.tsx +13 -10
- package/src/components/TransferList/index.tsx +1 -5
- package/src/components/Transition/index.tsx +14 -2
- package/src/components/UnstyledButton/UnstyledButton.tsx +5 -1
- package/src/components/index.tsx +1 -1
- package/src/theme/functions/attach-functions.ts +3 -0
- package/src/theme/functions/fns/helpers.ts +19 -7
- package/src/theme/functions/fns/index.ts +4 -0
- package/src/theme/functions/fns/rgba.ts +45 -0
- package/src/theme/functions/fns/size.ts +14 -0
- package/lib/commonjs/components/Portal/index.js +0 -69
- package/lib/commonjs/components/Portal/index.js.map +0 -1
- package/lib/module/components/Portal/index.js +0 -62
- package/lib/module/components/Portal/index.js.map +0 -1
- package/lib/typescript/commonjs/src/components/Portal/index.d.ts +0 -10
- package/lib/typescript/commonjs/src/components/Portal/index.d.ts.map +0 -1
- package/lib/typescript/module/src/components/Portal/index.d.ts +0 -10
- package/lib/typescript/module/src/components/Portal/index.d.ts.map +0 -1
- package/src/components/Portal/index.tsx +0 -75
|
@@ -247,19 +247,28 @@ export const Slider = forwardRef<any, SliderProps>((props, ref) => {
|
|
|
247
247
|
[trackWidth, min, max]
|
|
248
248
|
);
|
|
249
249
|
|
|
250
|
+
const trackLayoutRef = useRef({ x: 0, y: 0, width: 0, height: 0 });
|
|
251
|
+
|
|
250
252
|
const panResponder = useRef(
|
|
251
253
|
PanResponder.create({
|
|
252
254
|
onStartShouldSetPanResponder: () => !disabled!,
|
|
253
255
|
onMoveShouldSetPanResponder: () => !disabled!,
|
|
254
|
-
onPanResponderGrant: () => {
|
|
256
|
+
onPanResponderGrant: (evt: GestureResponderEvent) => {
|
|
255
257
|
setShowLabel(true);
|
|
256
258
|
Animated.spring(scale, {
|
|
257
259
|
toValue: 1.2,
|
|
258
260
|
useNativeDriver: true,
|
|
259
261
|
}).start();
|
|
262
|
+
|
|
263
|
+
// Handle tap to move slider
|
|
264
|
+
const locationX = evt.nativeEvent.locationX;
|
|
265
|
+
const newValue = getValueFromPosition(locationX);
|
|
266
|
+
updateValue(newValue);
|
|
260
267
|
},
|
|
261
268
|
onPanResponderMove: (_evt: GestureResponderEvent, gestureState: PanResponderGestureState) => {
|
|
262
|
-
|
|
269
|
+
// Calculate position relative to track start
|
|
270
|
+
const relativeX = gestureState.moveX - trackLayoutRef.current.x;
|
|
271
|
+
const newValue = getValueFromPosition(relativeX);
|
|
263
272
|
updateValue(newValue);
|
|
264
273
|
},
|
|
265
274
|
onPanResponderRelease: () => {
|
|
@@ -274,7 +283,9 @@ export const Slider = forwardRef<any, SliderProps>((props, ref) => {
|
|
|
274
283
|
).current;
|
|
275
284
|
|
|
276
285
|
const handleLayout = (event: LayoutChangeEvent) => {
|
|
277
|
-
|
|
286
|
+
const { x, y, width, height } = event.nativeEvent.layout;
|
|
287
|
+
setTrackWidth(width);
|
|
288
|
+
trackLayoutRef.current = { x, y, width, height };
|
|
278
289
|
};
|
|
279
290
|
|
|
280
291
|
const percentage = ((value - min!) / (max! - min!)) * 100;
|
|
@@ -252,10 +252,11 @@ export const Stepper = forwardRef<any, StepperProps>((props, ref) => {
|
|
|
252
252
|
|
|
253
253
|
const childrenArray = React.Children.toArray(children);
|
|
254
254
|
const steps = childrenArray.filter(
|
|
255
|
-
(child)
|
|
255
|
+
(child): child is React.ReactElement<StepProps & { __stepIndex?: number; __isLast?: boolean }> =>
|
|
256
|
+
React.isValidElement(child) && (child.type as any) === Step
|
|
256
257
|
);
|
|
257
258
|
const completedStep = childrenArray.find(
|
|
258
|
-
(child) => React.isValidElement(child) && (child as any)
|
|
259
|
+
(child) => React.isValidElement(child) && (child.type as any) === StepperCompleted
|
|
259
260
|
);
|
|
260
261
|
|
|
261
262
|
const isStepsCompleted = active >= steps.length;
|
|
@@ -275,7 +276,7 @@ export const Stepper = forwardRef<any, StepperProps>((props, ref) => {
|
|
|
275
276
|
<BoxView ref={ref} style={sx(styles.root, style)} {...others}>
|
|
276
277
|
<BoxView style={styles.steps}>
|
|
277
278
|
{steps.map((step, index) => {
|
|
278
|
-
return React.cloneElement(step
|
|
279
|
+
return React.cloneElement<StepProps & { __stepIndex?: number; __isLast?: boolean }>(step, {
|
|
279
280
|
key: index,
|
|
280
281
|
__stepIndex: index,
|
|
281
282
|
__isLast: index === steps.length - 1,
|
|
@@ -286,7 +287,7 @@ export const Stepper = forwardRef<any, StepperProps>((props, ref) => {
|
|
|
286
287
|
<BoxView style={styles.content}>
|
|
287
288
|
{isStepsCompleted
|
|
288
289
|
? completedStep
|
|
289
|
-
: steps[active] &&
|
|
290
|
+
: steps[active] && steps[active].props.children}
|
|
290
291
|
</BoxView>
|
|
291
292
|
</BoxView>
|
|
292
293
|
</StepperContext.Provider>
|
|
@@ -137,12 +137,18 @@ const useTableStyles = createStyles(
|
|
|
137
137
|
borderCollapse: 'collapse' as any,
|
|
138
138
|
...(withBorder && {
|
|
139
139
|
borderWidth: 1,
|
|
140
|
-
borderColor:
|
|
140
|
+
borderColor:
|
|
141
|
+
theme.colorScheme === 'dark'
|
|
142
|
+
? theme.colors.dark?.[4]
|
|
143
|
+
: theme.colors.gray?.[3],
|
|
141
144
|
}),
|
|
142
145
|
},
|
|
143
146
|
caption: {
|
|
144
147
|
fontSize: theme.fontSizes.sm as number,
|
|
145
|
-
color:
|
|
148
|
+
color:
|
|
149
|
+
theme.colorScheme === 'dark'
|
|
150
|
+
? theme.colors.dark?.[2]
|
|
151
|
+
: theme.colors.gray?.[6],
|
|
146
152
|
paddingVertical: theme.spacing.xs,
|
|
147
153
|
textAlign: 'center',
|
|
148
154
|
...(captionSide === 'bottom' && { order: 1 }),
|
|
@@ -153,7 +159,10 @@ const useTableStyles = createStyles(
|
|
|
153
159
|
const useTableHeadStyles = createStyles((theme) => ({
|
|
154
160
|
thead: {
|
|
155
161
|
borderBottomWidth: 1,
|
|
156
|
-
borderBottomColor:
|
|
162
|
+
borderBottomColor:
|
|
163
|
+
theme.colorScheme === 'dark'
|
|
164
|
+
? theme.colors.dark?.[4]
|
|
165
|
+
: theme.colors.gray?.[3],
|
|
157
166
|
},
|
|
158
167
|
}));
|
|
159
168
|
|
|
@@ -171,11 +180,16 @@ const useTableRowStyles = createStyles(
|
|
|
171
180
|
) => ({
|
|
172
181
|
tr: {
|
|
173
182
|
borderBottomWidth: 1,
|
|
174
|
-
borderBottomColor:
|
|
183
|
+
borderBottomColor:
|
|
184
|
+
theme.colorScheme === 'dark'
|
|
185
|
+
? theme.colors.dark?.[4]
|
|
186
|
+
: theme.colors.gray?.[3],
|
|
175
187
|
...(striped &&
|
|
176
188
|
isEven && {
|
|
177
189
|
backgroundColor:
|
|
178
|
-
theme.colorScheme === 'dark'
|
|
190
|
+
theme.colorScheme === 'dark'
|
|
191
|
+
? theme.colors.dark?.[6]
|
|
192
|
+
: theme.colors.gray?.[0],
|
|
179
193
|
}),
|
|
180
194
|
},
|
|
181
195
|
})
|
|
@@ -218,7 +232,9 @@ const useTableCellStyles = createStyles(
|
|
|
218
232
|
...(withColumnBorders && {
|
|
219
233
|
borderRightWidth: 1,
|
|
220
234
|
borderRightColor:
|
|
221
|
-
theme.colorScheme === 'dark'
|
|
235
|
+
theme.colorScheme === 'dark'
|
|
236
|
+
? theme.colors.dark?.[4]
|
|
237
|
+
: theme.colors.gray?.[3],
|
|
222
238
|
}),
|
|
223
239
|
...(isHeader && {
|
|
224
240
|
fontWeight: '600',
|
|
@@ -239,7 +255,7 @@ const defaultProps: Partial<TableProps> = {
|
|
|
239
255
|
captionSide: 'top',
|
|
240
256
|
};
|
|
241
257
|
|
|
242
|
-
|
|
258
|
+
const Table = forwardRef<any, TableProps>((props, ref) => {
|
|
243
259
|
const {
|
|
244
260
|
children,
|
|
245
261
|
horizontalSpacing,
|
|
@@ -255,7 +271,7 @@ export const Table = forwardRef<any, TableProps>((props, ref) => {
|
|
|
255
271
|
...others
|
|
256
272
|
} = useComponentDefaultProps('Table', defaultProps, props);
|
|
257
273
|
|
|
258
|
-
const { styles, sx} = useTableStyles(
|
|
274
|
+
const { styles, sx } = useTableStyles(
|
|
259
275
|
{ withBorder, captionSide },
|
|
260
276
|
{ name: 'Table' }
|
|
261
277
|
) as any;
|
|
@@ -272,7 +288,11 @@ export const Table = forwardRef<any, TableProps>((props, ref) => {
|
|
|
272
288
|
horizontalSpacing: horizontalSpacing!,
|
|
273
289
|
}}
|
|
274
290
|
>
|
|
275
|
-
<ScrollView
|
|
291
|
+
<ScrollView
|
|
292
|
+
horizontal
|
|
293
|
+
style={styles.wrapper}
|
|
294
|
+
showsHorizontalScrollIndicator
|
|
295
|
+
>
|
|
276
296
|
<BoxView ref={ref} style={sx(styles.root, style)} {...others}>
|
|
277
297
|
{caption && <Text style={styles.caption}>{caption}</Text>}
|
|
278
298
|
{children}
|
|
@@ -282,9 +302,9 @@ export const Table = forwardRef<any, TableProps>((props, ref) => {
|
|
|
282
302
|
);
|
|
283
303
|
});
|
|
284
304
|
|
|
285
|
-
|
|
286
|
-
const { children, style, ...others} = props;
|
|
287
|
-
const { styles, sx} = useTableHeadStyles({}, { name: 'Thead' }) as any;
|
|
305
|
+
const Thead = forwardRef<any, TableTheadProps>((props, ref) => {
|
|
306
|
+
const { children, style, ...others } = props;
|
|
307
|
+
const { styles, sx } = useTableHeadStyles({}, { name: 'Thead' }) as any;
|
|
288
308
|
|
|
289
309
|
return (
|
|
290
310
|
<BoxView ref={ref} style={sx(styles.thead, style)} {...others}>
|
|
@@ -293,7 +313,7 @@ export const Thead = forwardRef<any, TableTheadProps>((props, ref) => {
|
|
|
293
313
|
);
|
|
294
314
|
});
|
|
295
315
|
|
|
296
|
-
|
|
316
|
+
const Tbody = forwardRef<any, TableTbodyProps>((props, ref) => {
|
|
297
317
|
const { children, style, ...others } = props;
|
|
298
318
|
|
|
299
319
|
const childrenArray = React.Children.toArray(children);
|
|
@@ -302,16 +322,19 @@ export const Tbody = forwardRef<any, TableTbodyProps>((props, ref) => {
|
|
|
302
322
|
<BoxView ref={ref} style={style} {...others}>
|
|
303
323
|
{childrenArray.map((child, index) => {
|
|
304
324
|
if (!React.isValidElement(child)) return child;
|
|
305
|
-
return React.cloneElement(
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
325
|
+
return React.cloneElement<TableTrProps>(
|
|
326
|
+
child as React.ReactElement<TableTrProps>,
|
|
327
|
+
{
|
|
328
|
+
key: index,
|
|
329
|
+
__index: index,
|
|
330
|
+
}
|
|
331
|
+
);
|
|
309
332
|
})}
|
|
310
333
|
</BoxView>
|
|
311
334
|
);
|
|
312
335
|
});
|
|
313
336
|
|
|
314
|
-
|
|
337
|
+
const Tfoot = forwardRef<any, TableTfootProps>((props, ref) => {
|
|
315
338
|
const { children, style, ...others } = props;
|
|
316
339
|
|
|
317
340
|
return (
|
|
@@ -321,11 +344,11 @@ export const Tfoot = forwardRef<any, TableTfootProps>((props, ref) => {
|
|
|
321
344
|
);
|
|
322
345
|
});
|
|
323
346
|
|
|
324
|
-
|
|
325
|
-
const { children, style, __index, ...others} = props;
|
|
347
|
+
const Tr = forwardRef<any, TableTrProps>((props, ref) => {
|
|
348
|
+
const { children, style, __index, ...others } = props;
|
|
326
349
|
const context = useTableContext();
|
|
327
350
|
|
|
328
|
-
const { styles, sx} = useTableRowStyles(
|
|
351
|
+
const { styles, sx } = useTableRowStyles(
|
|
329
352
|
{
|
|
330
353
|
striped: context?.striped ?? false,
|
|
331
354
|
highlightOnHover: context?.highlightOnHover ?? false,
|
|
@@ -341,11 +364,11 @@ export const Tr = forwardRef<any, TableTrProps>((props, ref) => {
|
|
|
341
364
|
);
|
|
342
365
|
});
|
|
343
366
|
|
|
344
|
-
|
|
345
|
-
const { children, style, ...others} = props;
|
|
367
|
+
const Th = forwardRef<any, TableThProps>((props, ref) => {
|
|
368
|
+
const { children, style, ...others } = props;
|
|
346
369
|
const context = useTableContext();
|
|
347
370
|
|
|
348
|
-
const { styles, sx} = useTableCellStyles(
|
|
371
|
+
const { styles, sx } = useTableCellStyles(
|
|
349
372
|
{
|
|
350
373
|
fontSize: context?.fontSize ?? 'sm',
|
|
351
374
|
verticalSpacing: context?.verticalSpacing ?? 'xs',
|
|
@@ -358,16 +381,16 @@ export const Th = forwardRef<any, TableThProps>((props, ref) => {
|
|
|
358
381
|
|
|
359
382
|
return (
|
|
360
383
|
<BoxView ref={ref} style={sx(styles.cell, style)} {...others}>
|
|
361
|
-
|
|
384
|
+
<Text style={styles.cell}>{children}</Text>)
|
|
362
385
|
</BoxView>
|
|
363
386
|
);
|
|
364
387
|
});
|
|
365
388
|
|
|
366
|
-
|
|
367
|
-
const { children, style, ...others} = props;
|
|
389
|
+
const Td = forwardRef<any, TableTdProps>((props, ref) => {
|
|
390
|
+
const { children, style, ...others } = props;
|
|
368
391
|
const context = useTableContext();
|
|
369
392
|
|
|
370
|
-
const { styles, sx} = useTableCellStyles(
|
|
393
|
+
const { styles, sx } = useTableCellStyles(
|
|
371
394
|
{
|
|
372
395
|
fontSize: context?.fontSize ?? 'sm',
|
|
373
396
|
verticalSpacing: context?.verticalSpacing ?? 'xs',
|
|
@@ -380,7 +403,7 @@ export const Td = forwardRef<any, TableTdProps>((props, ref) => {
|
|
|
380
403
|
|
|
381
404
|
return (
|
|
382
405
|
<BoxView ref={ref} style={sx(styles.cell, style)} {...others}>
|
|
383
|
-
|
|
406
|
+
<Text style={styles.cell}>{children}</Text>
|
|
384
407
|
</BoxView>
|
|
385
408
|
);
|
|
386
409
|
});
|
|
@@ -393,10 +416,24 @@ Tr.displayName = 'Table.Tr';
|
|
|
393
416
|
Th.displayName = 'Table.Th';
|
|
394
417
|
Td.displayName = 'Table.Td';
|
|
395
418
|
|
|
396
|
-
// Attach sub-components
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
419
|
+
// Attach sub-components with proper typing
|
|
420
|
+
interface TableComponent extends React.ForwardRefExoticComponent<
|
|
421
|
+
TableProps & React.RefAttributes<any>
|
|
422
|
+
> {
|
|
423
|
+
Thead: typeof Thead;
|
|
424
|
+
Tbody: typeof Tbody;
|
|
425
|
+
Tfoot: typeof Tfoot;
|
|
426
|
+
Tr: typeof Tr;
|
|
427
|
+
Th: typeof Th;
|
|
428
|
+
Td: typeof Td;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
const TableWithSubComponents = Table as TableComponent;
|
|
432
|
+
TableWithSubComponents.Thead = Thead;
|
|
433
|
+
TableWithSubComponents.Tbody = Tbody;
|
|
434
|
+
TableWithSubComponents.Tfoot = Tfoot;
|
|
435
|
+
TableWithSubComponents.Tr = Tr;
|
|
436
|
+
TableWithSubComponents.Th = Th;
|
|
437
|
+
TableWithSubComponents.Td = Td;
|
|
438
|
+
|
|
439
|
+
export { TableWithSubComponents as Table };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
TextInput as RNTextInput,
|
|
4
|
+
type TextInputProps as RNTextInputProps,
|
|
5
|
+
} from 'react-native';
|
|
3
6
|
import { BoxView } from '../BoxView';
|
|
4
7
|
import { Text } from '../Text';
|
|
5
8
|
import type {
|
|
@@ -12,7 +15,8 @@ import { createStyles, getSize } from '../../theme';
|
|
|
12
15
|
import { rem } from '../../theme/utils/rem';
|
|
13
16
|
import { INPUT_SIZES } from '../Input';
|
|
14
17
|
|
|
15
|
-
export interface TextInputProps
|
|
18
|
+
export interface TextInputProps
|
|
19
|
+
extends DefaultProps, Omit<RNTextInputProps, 'style'> {
|
|
16
20
|
/** Input label */
|
|
17
21
|
label?: React.ReactNode;
|
|
18
22
|
|
|
@@ -71,7 +75,10 @@ const useStyles = createStyles(
|
|
|
71
75
|
const getVariantStyles = () => {
|
|
72
76
|
if (variant === 'filled') {
|
|
73
77
|
return {
|
|
74
|
-
backgroundColor:
|
|
78
|
+
backgroundColor:
|
|
79
|
+
theme.colorScheme === 'dark'
|
|
80
|
+
? (theme.colors.dark || [])[5]
|
|
81
|
+
: (theme.colors.gray || [])[1],
|
|
75
82
|
borderWidth: 1,
|
|
76
83
|
borderColor: 'transparent',
|
|
77
84
|
};
|
|
@@ -87,13 +94,20 @@ const useStyles = createStyles(
|
|
|
87
94
|
|
|
88
95
|
// default variant
|
|
89
96
|
return {
|
|
90
|
-
backgroundColor:
|
|
97
|
+
backgroundColor:
|
|
98
|
+
theme.colorScheme === 'dark'
|
|
99
|
+
? (theme.colors.dark || [])[6]
|
|
100
|
+
: theme.white,
|
|
91
101
|
borderWidth: 1,
|
|
92
|
-
borderColor:
|
|
102
|
+
borderColor:
|
|
103
|
+
theme.colorScheme === 'dark'
|
|
104
|
+
? (theme.colors.dark || [])[4]
|
|
105
|
+
: (theme.colors.gray || [])[4],
|
|
93
106
|
};
|
|
94
107
|
};
|
|
95
108
|
|
|
96
|
-
const sizeValue =
|
|
109
|
+
const sizeValue =
|
|
110
|
+
INPUT_SIZES[size as keyof typeof INPUT_SIZES] || INPUT_SIZES.md;
|
|
97
111
|
|
|
98
112
|
return {
|
|
99
113
|
wrapper: {
|
|
@@ -102,7 +116,10 @@ const useStyles = createStyles(
|
|
|
102
116
|
label: {
|
|
103
117
|
fontSize: theme.fontSizes.sm as number,
|
|
104
118
|
fontWeight: '500',
|
|
105
|
-
color:
|
|
119
|
+
color:
|
|
120
|
+
theme.colorScheme === 'dark'
|
|
121
|
+
? (theme.colors.dark || [])[0]
|
|
122
|
+
: theme.black,
|
|
106
123
|
marginBottom: theme.spacing.xs / 2,
|
|
107
124
|
},
|
|
108
125
|
required: {
|
|
@@ -110,7 +127,10 @@ const useStyles = createStyles(
|
|
|
110
127
|
},
|
|
111
128
|
description: {
|
|
112
129
|
fontSize: theme.fontSizes.xs as number,
|
|
113
|
-
color:
|
|
130
|
+
color:
|
|
131
|
+
theme.colorScheme === 'dark'
|
|
132
|
+
? (theme.colors.dark || [])[2]
|
|
133
|
+
: (theme.colors.gray || [])[6],
|
|
114
134
|
marginTop: theme.spacing.xs / 2,
|
|
115
135
|
marginBottom: theme.spacing.xs / 2,
|
|
116
136
|
},
|
|
@@ -123,23 +143,30 @@ const useStyles = createStyles(
|
|
|
123
143
|
position: 'relative',
|
|
124
144
|
},
|
|
125
145
|
input: {
|
|
126
|
-
...theme.fn.fontStyles(),
|
|
127
146
|
height: sizeValue as any,
|
|
128
147
|
fontSize: getSize({ size, sizes: theme.fontSizes }) as any,
|
|
129
148
|
paddingHorizontal: (variant === 'unstyled' ? 0 : rem(12)) as any,
|
|
130
|
-
paddingLeft: (withIcon
|
|
149
|
+
paddingLeft: (withIcon
|
|
150
|
+
? sizeValue
|
|
151
|
+
: variant === 'unstyled'
|
|
152
|
+
? 0
|
|
153
|
+
: rem(12)) as any,
|
|
131
154
|
paddingRight: (withRightSection
|
|
132
155
|
? rem(rightSectionWidth || sizeValue)
|
|
133
156
|
: variant === 'unstyled'
|
|
134
|
-
|
|
135
|
-
|
|
157
|
+
? 0
|
|
158
|
+
: rem(12)) as any,
|
|
136
159
|
borderRadius: theme.fn.radius(radius),
|
|
137
|
-
color:
|
|
160
|
+
color:
|
|
161
|
+
theme.colorScheme === 'dark'
|
|
162
|
+
? (theme.colors.dark || [])[0]
|
|
163
|
+
: theme.black,
|
|
138
164
|
...getVariantStyles(),
|
|
139
165
|
...(invalid && {
|
|
140
166
|
borderColor: (theme.colors.red || [])[6],
|
|
141
167
|
color: (theme.colors.red || [])[6],
|
|
142
168
|
}),
|
|
169
|
+
fontFamily: theme.fontFamilyInput,
|
|
143
170
|
},
|
|
144
171
|
icon: {
|
|
145
172
|
position: 'absolute',
|
|
@@ -171,62 +198,62 @@ const defaultProps: Partial<TextInputProps> = {
|
|
|
171
198
|
required: false,
|
|
172
199
|
};
|
|
173
200
|
|
|
174
|
-
export const TextInput = forwardRef<RNTextInput, TextInputProps>(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
icon,
|
|
182
|
-
rightSection,
|
|
183
|
-
rightSectionWidth,
|
|
184
|
-
required,
|
|
185
|
-
variant,
|
|
186
|
-
style,
|
|
187
|
-
wrapperStyle,
|
|
188
|
-
...others
|
|
189
|
-
} = useComponentDefaultProps('TextInput', defaultProps, props);
|
|
190
|
-
|
|
191
|
-
const { styles, sx} = useStyles(
|
|
192
|
-
{
|
|
201
|
+
export const TextInput = forwardRef<RNTextInput, TextInputProps>(
|
|
202
|
+
(props, ref) => {
|
|
203
|
+
const {
|
|
204
|
+
label,
|
|
205
|
+
description,
|
|
206
|
+
error,
|
|
207
|
+
size,
|
|
193
208
|
radius,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
withRightSection: !!rightSection,
|
|
209
|
+
icon,
|
|
210
|
+
rightSection,
|
|
197
211
|
rightSectionWidth,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
{
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
<BoxView style={styles.rightSectionContainer}>{rightSection}</BoxView>
|
|
212
|
+
required,
|
|
213
|
+
variant,
|
|
214
|
+
style,
|
|
215
|
+
wrapperStyle,
|
|
216
|
+
...others
|
|
217
|
+
} = useComponentDefaultProps('TextInput', defaultProps, props);
|
|
218
|
+
|
|
219
|
+
const { styles, sx } = useStyles(
|
|
220
|
+
{
|
|
221
|
+
radius,
|
|
222
|
+
invalid: !!error,
|
|
223
|
+
withIcon: !!icon,
|
|
224
|
+
withRightSection: !!rightSection,
|
|
225
|
+
rightSectionWidth,
|
|
226
|
+
},
|
|
227
|
+
{ name: 'TextInput', variant, size }
|
|
228
|
+
) as any;
|
|
229
|
+
|
|
230
|
+
return (
|
|
231
|
+
<BoxView style={sx(styles.wrapper, wrapperStyle)}>
|
|
232
|
+
{label && (
|
|
233
|
+
<Text style={styles.label}>
|
|
234
|
+
{label}
|
|
235
|
+
{required && <Text style={styles.required}> *</Text>}
|
|
236
|
+
</Text>
|
|
224
237
|
)}
|
|
225
|
-
</BoxView>
|
|
226
238
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
239
|
+
{description && <Text style={styles.description}>{description}</Text>}
|
|
240
|
+
|
|
241
|
+
<BoxView style={styles.inputWrapper}>
|
|
242
|
+
{icon && <BoxView style={styles.icon}>{icon}</BoxView>}
|
|
243
|
+
|
|
244
|
+
<RNTextInput ref={ref} style={sx(styles.input, style)} {...others} />
|
|
245
|
+
|
|
246
|
+
{rightSection && (
|
|
247
|
+
<BoxView style={styles.rightSectionContainer}>
|
|
248
|
+
{rightSection}
|
|
249
|
+
</BoxView>
|
|
250
|
+
)}
|
|
251
|
+
</BoxView>
|
|
252
|
+
|
|
253
|
+
{error && <Text style={styles.error}>{error}</Text>}
|
|
254
|
+
</BoxView>
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
);
|
|
231
258
|
|
|
232
259
|
TextInput.displayName = 'TextInput';
|
|
@@ -244,12 +244,15 @@ const TimelineRoot = forwardRef<any, TimelineProps>((props, ref) => {
|
|
|
244
244
|
? index >= itemsCount - (active! + 1)
|
|
245
245
|
: index <= active!;
|
|
246
246
|
|
|
247
|
-
return React.cloneElement
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
return React.cloneElement<TimelineItemProps & { __isActive?: boolean }>(
|
|
248
|
+
child as React.ReactElement<TimelineItemProps & { __isActive?: boolean }>,
|
|
249
|
+
{
|
|
250
|
+
key: index,
|
|
251
|
+
__index: index,
|
|
252
|
+
__isLast: index === itemsCount - 1,
|
|
253
|
+
__isActive: isActive,
|
|
254
|
+
}
|
|
255
|
+
);
|
|
253
256
|
})}
|
|
254
257
|
</BoxView>
|
|
255
258
|
</TimelineContext.Provider>
|
|
@@ -304,14 +307,18 @@ export const TimelineItem = forwardRef<
|
|
|
304
307
|
|
|
305
308
|
<BoxView style={styles.itemBody}>
|
|
306
309
|
{title && (
|
|
307
|
-
|
|
308
|
-
{
|
|
309
|
-
|
|
310
|
+
typeof title === 'string' ? (
|
|
311
|
+
<Text style={styles.title}>{title}</Text>
|
|
312
|
+
) : (
|
|
313
|
+
<BoxView style={{ marginBottom: rem(4) }}>{title}</BoxView>
|
|
314
|
+
)
|
|
310
315
|
)}
|
|
311
316
|
{children && (
|
|
312
|
-
|
|
313
|
-
{
|
|
314
|
-
|
|
317
|
+
typeof children === 'string' ? (
|
|
318
|
+
<Text style={styles.content}>{children}</Text>
|
|
319
|
+
) : (
|
|
320
|
+
<BoxView>{children}</BoxView>
|
|
321
|
+
)
|
|
315
322
|
)}
|
|
316
323
|
</BoxView>
|
|
317
324
|
</BoxView>
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
TouchableWithoutFeedback,
|
|
5
5
|
Animated,
|
|
6
6
|
Platform,
|
|
7
|
+
Modal,
|
|
7
8
|
} from 'react-native';
|
|
8
9
|
import { Text } from '../Text';
|
|
9
|
-
import { Portal } from '../Portal';
|
|
10
10
|
import type {
|
|
11
11
|
DefaultProps,
|
|
12
12
|
MantineColor,
|
|
@@ -210,7 +210,7 @@ export const Tooltip = forwardRef<any, TooltipProps>((props, _ref) => {
|
|
|
210
210
|
? { onLongPress: show }
|
|
211
211
|
: { onPress: show, onPressOut: hide };
|
|
212
212
|
|
|
213
|
-
const childWithRef = React.cloneElement(children
|
|
213
|
+
const childWithRef = React.cloneElement(children as React.ReactElement<any>, {
|
|
214
214
|
ref: targetRef,
|
|
215
215
|
...triggerProps,
|
|
216
216
|
});
|
|
@@ -219,16 +219,18 @@ export const Tooltip = forwardRef<any, TooltipProps>((props, _ref) => {
|
|
|
219
219
|
<>
|
|
220
220
|
{childWithRef}
|
|
221
221
|
{isVisible && (
|
|
222
|
-
<
|
|
222
|
+
<Modal
|
|
223
|
+
visible={isVisible}
|
|
224
|
+
transparent
|
|
225
|
+
animationType="none"
|
|
226
|
+
onRequestClose={hide}
|
|
227
|
+
statusBarTranslucent
|
|
228
|
+
>
|
|
223
229
|
<TouchableWithoutFeedback onPress={hide}>
|
|
224
230
|
<View
|
|
225
231
|
style={{
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
left: 0,
|
|
229
|
-
right: 0,
|
|
230
|
-
bottom: 0,
|
|
231
|
-
zIndex,
|
|
232
|
+
flex: 1,
|
|
233
|
+
backgroundColor: 'transparent',
|
|
232
234
|
}}
|
|
233
235
|
>
|
|
234
236
|
<Animated.View
|
|
@@ -238,6 +240,7 @@ export const Tooltip = forwardRef<any, TooltipProps>((props, _ref) => {
|
|
|
238
240
|
top: tooltipPosition.top,
|
|
239
241
|
left: tooltipPosition.left,
|
|
240
242
|
opacity,
|
|
243
|
+
zIndex,
|
|
241
244
|
},
|
|
242
245
|
]}
|
|
243
246
|
{...others}
|
|
@@ -250,7 +253,7 @@ export const Tooltip = forwardRef<any, TooltipProps>((props, _ref) => {
|
|
|
250
253
|
</Animated.View>
|
|
251
254
|
</View>
|
|
252
255
|
</TouchableWithoutFeedback>
|
|
253
|
-
</
|
|
256
|
+
</Modal>
|
|
254
257
|
)}
|
|
255
258
|
</>
|
|
256
259
|
);
|
|
@@ -184,14 +184,10 @@ const defaultProps: Partial<TransferListProps> = {
|
|
|
184
184
|
};
|
|
185
185
|
|
|
186
186
|
const DefaultItem: React.FC<{ data: TransferListDataItem; selected: boolean }> = ({
|
|
187
|
-
data,
|
|
188
187
|
selected,
|
|
189
188
|
}) => {
|
|
190
189
|
return (
|
|
191
|
-
|
|
192
|
-
<Checkbox checked={selected} onChange={() => {}} />
|
|
193
|
-
<Text>{data.label}</Text>
|
|
194
|
-
</>
|
|
190
|
+
<Checkbox checked={selected} onChange={() => {}} />
|
|
195
191
|
);
|
|
196
192
|
};
|
|
197
193
|
|