@flipova/foundation 2.3.0 → 2.4.0-beta.1
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 +157 -156
- package/components/ui/accordion/ANIMATION_CUSTOMIZATION.md +16 -7
- package/components/ui/accordion/AccordionAnimatedHeight.tsx +3 -15
- package/components/ui/accordion/AccordionAnimatedIcon.tsx +2 -9
- package/components/ui/accordion/AnimatedHeight.tsx +3 -15
- package/components/ui/accordion/AnimatedIcon.tsx +2 -9
- package/components/ui/accordion/MIGRATION_SUMMARY.md +22 -11
- package/components/ui/accordion/USAGE_EXAMPLE.tsx +10 -25
- package/components/ui/accordion/index.tsx +71 -139
- package/components/ui/actionsheet/index.tsx +63 -105
- package/components/ui/alert/index.tsx +20 -50
- package/components/ui/alert-dialog/index.tsx +23 -48
- package/components/ui/avatar/index.tsx +32 -68
- package/components/ui/badge/index.tsx +18 -49
- package/components/ui/bottomsheet/index.tsx +20 -52
- package/components/ui/box/index.tsx +4 -9
- package/components/ui/box/index.web.tsx +3 -9
- package/components/ui/button/index.tsx +73 -109
- package/components/ui/calendar/creator.tsx +69 -30
- package/components/ui/calendar/index.tsx +81 -159
- package/components/ui/calendar/styles.tsx +10 -10
- package/components/ui/card/index.tsx +8 -9
- package/components/ui/card/index.web.tsx +4 -10
- package/components/ui/center/index.tsx +6 -11
- package/components/ui/center/index.web.tsx +3 -9
- package/components/ui/checkbox/index.tsx +46 -107
- package/components/ui/date-time-picker/creator.tsx +14 -1
- package/components/ui/date-time-picker/index.tsx +107 -156
- package/components/ui/date-time-picker/index.web.tsx +11 -33
- package/components/ui/date-time-picker/styles.tsx +5 -5
- package/components/ui/divider/index.tsx +5 -6
- package/components/ui/drawer/index.tsx +108 -128
- package/components/ui/fab/index.tsx +25 -68
- package/components/ui/flat-list/index.tsx +11 -8
- package/components/ui/form-control/index.tsx +49 -90
- package/components/ui/gluestack-ui-provider/index.tsx +4 -18
- package/components/ui/gluestack-ui-provider/index.web.tsx +10 -11
- package/components/ui/gluestack-ui-provider/script.ts +1 -3
- package/components/ui/gluestack-ui-provider/theme-context.ts +2 -2
- package/components/ui/gluestack-ui-provider/useGluestackColors.ts +2 -6
- package/components/ui/grid/index.tsx +128 -165
- package/components/ui/grid/index.web.tsx +17 -19
- package/components/ui/grid/styles.tsx +1 -3
- package/components/ui/heading/index.tsx +146 -169
- package/components/ui/heading/index.web.tsx +7 -28
- package/components/ui/heading/styles.tsx +5 -5
- package/components/ui/hstack/index.tsx +16 -15
- package/components/ui/hstack/index.web.tsx +17 -17
- package/components/ui/hstack/styles.tsx +5 -5
- package/components/ui/icon/index.tsx +95 -486
- package/components/ui/icon/index.web.tsx +79 -439
- package/components/ui/image/index.tsx +13 -18
- package/components/ui/image-viewer/index.tsx +149 -221
- package/components/ui/image-viewer/index.web.tsx +88 -113
- package/components/ui/input/index.tsx +20 -33
- package/components/ui/link/index.tsx +16 -22
- package/components/ui/liquid-glass/index.tsx +19 -25
- package/components/ui/menu/index.tsx +44 -66
- package/components/ui/modal/index.tsx +70 -91
- package/components/ui/popover/index.tsx +102 -121
- package/components/ui/portal/index.tsx +5 -6
- package/components/ui/pressable/index.tsx +5 -9
- package/components/ui/progress/index.tsx +4 -11
- package/components/ui/radio/index.tsx +47 -83
- package/components/ui/select/index.tsx +38 -59
- package/components/ui/select/select-actionsheet.tsx +61 -108
- package/components/ui/skeleton/index.tsx +22 -43
- package/components/ui/skeleton/index.web.tsx +63 -75
- package/components/ui/slider/index.tsx +36 -56
- package/components/ui/spinner/index.tsx +1 -10
- package/components/ui/switch/index.tsx +6 -13
- package/components/ui/table/index.tsx +39 -102
- package/components/ui/table/index.web.tsx +41 -79
- package/components/ui/tabs/TabsAnimatedIndicator.tsx +10 -38
- package/components/ui/tabs/creator.tsx +32 -24
- package/components/ui/tabs/index.tsx +253 -309
- package/components/ui/text/index.tsx +23 -37
- package/components/ui/text/index.web.tsx +33 -35
- package/components/ui/text/styles.tsx +5 -5
- package/components/ui/textarea/index.tsx +24 -38
- package/components/ui/toast/index.tsx +47 -52
- package/components/ui/tooltip/index.tsx +12 -28
- package/components/ui/vstack/index.tsx +17 -17
- package/components/ui/vstack/index.web.tsx +17 -17
- package/components/ui/vstack/styles.tsx +5 -5
- package/design/tools/design.js +15 -12
- package/design/tools/npm.js +4 -3
- package/dist/{chunk-B277QSR5.mjs → chunk-2R66P5X5.mjs} +1816 -3124
- package/dist/chunk-2R66P5X5.mjs.map +1 -0
- package/dist/{chunk-GD37RFBR.js → chunk-LCTFQJZM.js} +1816 -3124
- package/dist/chunk-LCTFQJZM.js.map +1 -0
- package/dist/index.js +294 -294
- package/dist/index.mjs +1 -1
- package/dist/ui/index.js +294 -294
- package/dist/ui/index.mjs +1 -1
- package/package.json +12 -7
- package/dist/chunk-B277QSR5.mjs.map +0 -1
- package/dist/chunk-GD37RFBR.js.map +0 -1
|
@@ -2,18 +2,9 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { createModal } from '@gluestack-ui/core/modal/creator';
|
|
4
4
|
import { Pressable, View, ScrollView } from 'react-native';
|
|
5
|
-
import Animated, {
|
|
6
|
-
FadeIn,
|
|
7
|
-
FadeOut,
|
|
8
|
-
ZoomIn,
|
|
9
|
-
ZoomOut,
|
|
10
|
-
Easing,
|
|
11
|
-
} from 'react-native-reanimated';
|
|
5
|
+
import Animated, { FadeIn, FadeOut, ZoomIn, ZoomOut, Easing } from 'react-native-reanimated';
|
|
12
6
|
import { tva } from '@gluestack-ui/utils/nativewind-utils';
|
|
13
|
-
import {
|
|
14
|
-
withStyleContext,
|
|
15
|
-
useStyleContext,
|
|
16
|
-
} from '@gluestack-ui/utils/nativewind-utils';
|
|
7
|
+
import { withStyleContext, useStyleContext } from '@gluestack-ui/utils/nativewind-utils';
|
|
17
8
|
import { cssInterop } from 'nativewind';
|
|
18
9
|
import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
|
|
19
10
|
|
|
@@ -80,8 +71,7 @@ const modalFooterStyle = tva({
|
|
|
80
71
|
base: 'flex-row justify-end items-center gap-2',
|
|
81
72
|
});
|
|
82
73
|
|
|
83
|
-
type IModalProps = React.ComponentProps<typeof UIModal> &
|
|
84
|
-
VariantProps<typeof modalStyle> & { className?: string };
|
|
74
|
+
type IModalProps = React.ComponentProps<typeof UIModal> & VariantProps<typeof modalStyle> & { className?: string };
|
|
85
75
|
|
|
86
76
|
type IModalBackdropProps = React.ComponentProps<typeof UIModal.Backdrop> &
|
|
87
77
|
VariantProps<typeof modalBackdropStyle> & { className?: string };
|
|
@@ -110,57 +100,55 @@ const Modal = React.forwardRef<React.ComponentRef<typeof UIModal>, IModalProps>(
|
|
|
110
100
|
className={modalStyle({ size, class: className })}
|
|
111
101
|
context={{ size }}
|
|
112
102
|
/>
|
|
113
|
-
)
|
|
103
|
+
),
|
|
114
104
|
);
|
|
115
105
|
|
|
116
|
-
const ModalBackdrop = React.forwardRef<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
const ModalContent = React.forwardRef<
|
|
134
|
-
React.ComponentRef<typeof UIModal.Content>,
|
|
135
|
-
IModalContentProps
|
|
136
|
-
>(function ModalContent({ className, size, ...props }, ref) {
|
|
137
|
-
const { size: parentSize } = useStyleContext(SCOPE);
|
|
106
|
+
const ModalBackdrop = React.forwardRef<React.ComponentRef<typeof UIModal.Backdrop>, IModalBackdropProps>(
|
|
107
|
+
function ModalBackdrop({ className, ...props }, ref) {
|
|
108
|
+
return (
|
|
109
|
+
<UIModal.Backdrop
|
|
110
|
+
ref={ref}
|
|
111
|
+
entering={FadeIn.duration(200).easing(Easing.linear)}
|
|
112
|
+
exiting={FadeOut.duration(200).easing(Easing.linear)}
|
|
113
|
+
{...props}
|
|
114
|
+
className={modalBackdropStyle({
|
|
115
|
+
class: className,
|
|
116
|
+
})}
|
|
117
|
+
/>
|
|
118
|
+
);
|
|
119
|
+
},
|
|
120
|
+
);
|
|
138
121
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
})
|
|
122
|
+
const ModalContent = React.forwardRef<React.ComponentRef<typeof UIModal.Content>, IModalContentProps>(
|
|
123
|
+
function ModalContent({ className, size, ...props }, ref) {
|
|
124
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<UIModal.Content
|
|
128
|
+
ref={ref}
|
|
129
|
+
entering={ZoomIn.duration(200).withInitialValues({
|
|
130
|
+
transform: [{ scale: 0.9 }],
|
|
131
|
+
opacity: 0,
|
|
132
|
+
})}
|
|
133
|
+
exiting={FadeOut.duration(200)}
|
|
134
|
+
{...props}
|
|
135
|
+
className={modalContentStyle({
|
|
136
|
+
parentVariants: {
|
|
137
|
+
size: parentSize,
|
|
138
|
+
},
|
|
139
|
+
size,
|
|
140
|
+
class: className,
|
|
141
|
+
})}
|
|
142
|
+
pointerEvents="auto"
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
145
|
+
},
|
|
146
|
+
);
|
|
159
147
|
|
|
160
|
-
const ModalHeader = React.forwardRef<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
148
|
+
const ModalHeader = React.forwardRef<React.ComponentRef<typeof UIModal.Header>, IModalHeaderProps>(function ModalHeader(
|
|
149
|
+
{ className, ...props },
|
|
150
|
+
ref,
|
|
151
|
+
) {
|
|
164
152
|
return (
|
|
165
153
|
<UIModal.Header
|
|
166
154
|
ref={ref}
|
|
@@ -172,10 +160,10 @@ const ModalHeader = React.forwardRef<
|
|
|
172
160
|
);
|
|
173
161
|
});
|
|
174
162
|
|
|
175
|
-
const ModalBody = React.forwardRef<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
163
|
+
const ModalBody = React.forwardRef<React.ComponentRef<typeof UIModal.Body>, IModalBodyProps>(function ModalBody(
|
|
164
|
+
{ className, ...props },
|
|
165
|
+
ref,
|
|
166
|
+
) {
|
|
179
167
|
return (
|
|
180
168
|
<UIModal.Body
|
|
181
169
|
scrollEnabled={false}
|
|
@@ -188,10 +176,10 @@ const ModalBody = React.forwardRef<
|
|
|
188
176
|
);
|
|
189
177
|
});
|
|
190
178
|
|
|
191
|
-
const ModalFooter = React.forwardRef<
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
179
|
+
const ModalFooter = React.forwardRef<React.ComponentRef<typeof UIModal.Footer>, IModalFooterProps>(function ModalFooter(
|
|
180
|
+
{ className, ...props },
|
|
181
|
+
ref,
|
|
182
|
+
) {
|
|
195
183
|
return (
|
|
196
184
|
<UIModal.Footer
|
|
197
185
|
ref={ref}
|
|
@@ -203,20 +191,19 @@ const ModalFooter = React.forwardRef<
|
|
|
203
191
|
);
|
|
204
192
|
});
|
|
205
193
|
|
|
206
|
-
const ModalCloseButton = React.forwardRef<
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
});
|
|
194
|
+
const ModalCloseButton = React.forwardRef<React.ComponentRef<typeof UIModal.CloseButton>, IModalCloseButtonProps>(
|
|
195
|
+
function ModalCloseButton({ className, ...props }, ref) {
|
|
196
|
+
return (
|
|
197
|
+
<UIModal.CloseButton
|
|
198
|
+
ref={ref}
|
|
199
|
+
{...props}
|
|
200
|
+
className={modalCloseButtonStyle({
|
|
201
|
+
class: className,
|
|
202
|
+
})}
|
|
203
|
+
/>
|
|
204
|
+
);
|
|
205
|
+
},
|
|
206
|
+
);
|
|
220
207
|
|
|
221
208
|
Modal.displayName = 'Modal';
|
|
222
209
|
ModalBackdrop.displayName = 'ModalBackdrop';
|
|
@@ -226,12 +213,4 @@ ModalBody.displayName = 'ModalBody';
|
|
|
226
213
|
ModalFooter.displayName = 'ModalFooter';
|
|
227
214
|
ModalCloseButton.displayName = 'ModalCloseButton';
|
|
228
215
|
|
|
229
|
-
export {
|
|
230
|
-
Modal,
|
|
231
|
-
ModalBackdrop,
|
|
232
|
-
ModalContent,
|
|
233
|
-
ModalCloseButton,
|
|
234
|
-
ModalHeader,
|
|
235
|
-
ModalBody,
|
|
236
|
-
ModalFooter,
|
|
237
|
-
};
|
|
216
|
+
export { Modal, ModalBackdrop, ModalContent, ModalCloseButton, ModalHeader, ModalBody, ModalFooter };
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { createPopover } from '@gluestack-ui/core/popover/creator';
|
|
3
3
|
import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
|
|
4
|
-
import {
|
|
5
|
-
tva,
|
|
6
|
-
useStyleContext,
|
|
7
|
-
withStyleContext,
|
|
8
|
-
} from '@gluestack-ui/utils/nativewind-utils';
|
|
4
|
+
import { tva, useStyleContext, withStyleContext } from '@gluestack-ui/utils/nativewind-utils';
|
|
9
5
|
import { cssInterop } from 'nativewind';
|
|
10
6
|
import React from 'react';
|
|
11
7
|
import { Pressable, ScrollView, View } from 'react-native';
|
|
12
|
-
import Animated, {
|
|
13
|
-
FadeIn,
|
|
14
|
-
FadeOut,
|
|
15
|
-
ZoomIn,
|
|
16
|
-
ZoomOut,
|
|
17
|
-
} from 'react-native-reanimated';
|
|
8
|
+
import Animated, { FadeIn, FadeOut, ZoomIn, ZoomOut } from 'react-native-reanimated';
|
|
18
9
|
|
|
19
10
|
const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
20
11
|
const AnimatedView = Animated.createAnimatedComponent(View);
|
|
@@ -45,23 +36,21 @@ const popoverArrowStyle = tva({
|
|
|
45
36
|
placement: {
|
|
46
37
|
'top left':
|
|
47
38
|
'data-[flip=false]:border-t-0 data-[flip=false]:border-l-0 data-[flip=true]:border-b-0 data-[flip=true]:border-r-0',
|
|
48
|
-
|
|
49
|
-
'data-[flip=false]:border-t-0 data-[flip=false]:border-l-0 data-[flip=true]:border-b-0 data-[flip=true]:border-r-0',
|
|
39
|
+
top: 'data-[flip=false]:border-t-0 data-[flip=false]:border-l-0 data-[flip=true]:border-b-0 data-[flip=true]:border-r-0',
|
|
50
40
|
'top right':
|
|
51
41
|
'data-[flip=false]:border-t-0 data-[flip=false]:border-l-0 data-[flip=true]:border-b-0 data-[flip=true]:border-r-0',
|
|
52
|
-
|
|
42
|
+
bottom:
|
|
53
43
|
'data-[flip=false]:border-b-0 data-[flip=false]:border-r-0 data-[flip=true]:border-t-0 data-[flip=true]:border-l-0',
|
|
54
44
|
'bottom left':
|
|
55
45
|
'data-[flip=false]:border-b-0 data-[flip=false]:border-r-0 data-[flip=true]:border-t-0 data-[flip=true]:border-l-0',
|
|
56
46
|
'bottom right':
|
|
57
47
|
'data-[flip=false]:border-b-0 data-[flip=false]:border-r-0 data-[flip=true]:border-t-0 data-[flip=true]:border-l-0',
|
|
58
|
-
|
|
59
|
-
'data-[flip=false]:border-l-0 data-[flip=false]:border-b-0 data-[flip=true]:border-r-0 data-[flip=true]:border-t-0',
|
|
48
|
+
left: 'data-[flip=false]:border-l-0 data-[flip=false]:border-b-0 data-[flip=true]:border-r-0 data-[flip=true]:border-t-0',
|
|
60
49
|
'left top':
|
|
61
50
|
'data-[flip=false]:border-l-0 data-[flip=false]:border-b-0 data-[flip=true]:border-r-0 data-[flip=true]:border-t-0',
|
|
62
51
|
'left bottom':
|
|
63
52
|
'data-[flip=false]:border-l-0 data-[flip=false]:border-b-0 data-[flip=true]:border-r-0 data-[flip=true]:border-t-0',
|
|
64
|
-
|
|
53
|
+
right:
|
|
65
54
|
'data-[flip=false]:border-r-0 data-[flip=false]:border-t-0 data-[flip=true]:border-l-0 data-[flip=true]:border-b-0',
|
|
66
55
|
'right top':
|
|
67
56
|
'data-[flip=false]:border-r-0 data-[flip=false]:border-t-0 data-[flip=true]:border-l-0 data-[flip=true]:border-b-0',
|
|
@@ -116,15 +105,13 @@ type IPopoverBodyProps = React.ComponentProps<typeof UIPopover.Body> &
|
|
|
116
105
|
type IPopoverBackdropProps = React.ComponentProps<typeof UIPopover.Backdrop> &
|
|
117
106
|
VariantProps<typeof popoverBackdropStyle> & { className?: string };
|
|
118
107
|
|
|
119
|
-
type IPopoverCloseButtonProps = React.ComponentProps<
|
|
120
|
-
typeof UIPopover.CloseButton
|
|
121
|
-
> &
|
|
108
|
+
type IPopoverCloseButtonProps = React.ComponentProps<typeof UIPopover.CloseButton> &
|
|
122
109
|
VariantProps<typeof popoverCloseButtonStyle> & { className?: string };
|
|
123
110
|
|
|
124
|
-
const Popover = React.forwardRef<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
111
|
+
const Popover = React.forwardRef<React.ComponentRef<typeof UIPopover>, IPopoverProps>(function Popover(
|
|
112
|
+
{ className, placement = 'bottom', ...props },
|
|
113
|
+
ref,
|
|
114
|
+
) {
|
|
128
115
|
return (
|
|
129
116
|
<UIPopover
|
|
130
117
|
ref={ref}
|
|
@@ -141,60 +128,57 @@ const Popover = React.forwardRef<
|
|
|
141
128
|
);
|
|
142
129
|
});
|
|
143
130
|
|
|
144
|
-
const PopoverContent = React.forwardRef<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
/>
|
|
191
|
-
);
|
|
192
|
-
});
|
|
131
|
+
const PopoverContent = React.forwardRef<React.ComponentRef<typeof UIPopover.Content>, IPopoverContentProps>(
|
|
132
|
+
function PopoverContent({ className, ...props }, ref) {
|
|
133
|
+
return (
|
|
134
|
+
<UIPopover.Content
|
|
135
|
+
ref={ref}
|
|
136
|
+
{...props}
|
|
137
|
+
className={popoverContentStyle({
|
|
138
|
+
class: className,
|
|
139
|
+
})}
|
|
140
|
+
pointerEvents="auto"
|
|
141
|
+
/>
|
|
142
|
+
);
|
|
143
|
+
},
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
const PopoverArrow = React.forwardRef<React.ComponentRef<typeof UIPopover.Arrow>, IPopoverArrowProps>(
|
|
147
|
+
function PopoverArrow({ className, ...props }, ref) {
|
|
148
|
+
const { placement } = useStyleContext(SCOPE);
|
|
149
|
+
return (
|
|
150
|
+
<UIPopover.Arrow
|
|
151
|
+
ref={ref}
|
|
152
|
+
{...props}
|
|
153
|
+
className={popoverArrowStyle({
|
|
154
|
+
class: className,
|
|
155
|
+
placement,
|
|
156
|
+
})}
|
|
157
|
+
/>
|
|
158
|
+
);
|
|
159
|
+
},
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
const PopoverBackdrop = React.forwardRef<React.ComponentRef<typeof UIPopover.Backdrop>, IPopoverBackdropProps>(
|
|
163
|
+
function PopoverBackdrop({ className, ...props }, ref) {
|
|
164
|
+
return (
|
|
165
|
+
<UIPopover.Backdrop
|
|
166
|
+
ref={ref}
|
|
167
|
+
entering={FadeIn.duration(100).delay(50)}
|
|
168
|
+
exiting={FadeOut.duration(100)}
|
|
169
|
+
{...props}
|
|
170
|
+
className={popoverBackdropStyle({
|
|
171
|
+
class: className,
|
|
172
|
+
})}
|
|
173
|
+
/>
|
|
174
|
+
);
|
|
175
|
+
},
|
|
176
|
+
);
|
|
193
177
|
|
|
194
|
-
const PopoverBody = React.forwardRef<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
178
|
+
const PopoverBody = React.forwardRef<React.ComponentRef<typeof UIPopover.Body>, IPopoverBodyProps>(function PopoverBody(
|
|
179
|
+
{ className, ...props },
|
|
180
|
+
ref,
|
|
181
|
+
) {
|
|
198
182
|
return (
|
|
199
183
|
<UIPopover.Body
|
|
200
184
|
ref={ref}
|
|
@@ -206,50 +190,47 @@ const PopoverBody = React.forwardRef<
|
|
|
206
190
|
);
|
|
207
191
|
});
|
|
208
192
|
|
|
209
|
-
const PopoverCloseButton = React.forwardRef<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
/>
|
|
251
|
-
);
|
|
252
|
-
});
|
|
193
|
+
const PopoverCloseButton = React.forwardRef<React.ComponentRef<typeof UIPopover.CloseButton>, IPopoverCloseButtonProps>(
|
|
194
|
+
function PopoverCloseButton({ className, ...props }, ref) {
|
|
195
|
+
return (
|
|
196
|
+
<UIPopover.CloseButton
|
|
197
|
+
ref={ref}
|
|
198
|
+
{...props}
|
|
199
|
+
className={popoverCloseButtonStyle({
|
|
200
|
+
class: className,
|
|
201
|
+
})}
|
|
202
|
+
/>
|
|
203
|
+
);
|
|
204
|
+
},
|
|
205
|
+
);
|
|
206
|
+
|
|
207
|
+
const PopoverFooter = React.forwardRef<React.ComponentRef<typeof UIPopover.Footer>, IPopoverFooterProps>(
|
|
208
|
+
function PopoverFooter({ className, ...props }, ref) {
|
|
209
|
+
return (
|
|
210
|
+
<UIPopover.Footer
|
|
211
|
+
ref={ref}
|
|
212
|
+
{...props}
|
|
213
|
+
className={popoverFooterStyle({
|
|
214
|
+
class: className,
|
|
215
|
+
})}
|
|
216
|
+
/>
|
|
217
|
+
);
|
|
218
|
+
},
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
const PopoverHeader = React.forwardRef<React.ComponentRef<typeof UIPopover.Header>, IPopoverHeaderProps>(
|
|
222
|
+
function PopoverHeader({ className, ...props }, ref) {
|
|
223
|
+
return (
|
|
224
|
+
<UIPopover.Header
|
|
225
|
+
ref={ref}
|
|
226
|
+
{...props}
|
|
227
|
+
className={popoverHeaderStyle({
|
|
228
|
+
class: className,
|
|
229
|
+
})}
|
|
230
|
+
/>
|
|
231
|
+
);
|
|
232
|
+
},
|
|
233
|
+
);
|
|
253
234
|
|
|
254
235
|
Popover.displayName = 'Popover';
|
|
255
236
|
PopoverArrow.displayName = 'PopoverArrow';
|
|
@@ -5,12 +5,11 @@ import { cssInterop } from 'nativewind';
|
|
|
5
5
|
|
|
6
6
|
cssInterop(Overlay, { className: 'style' });
|
|
7
7
|
|
|
8
|
-
const Portal = React.forwardRef<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
8
|
+
const Portal = React.forwardRef<React.ComponentRef<typeof Overlay>, React.ComponentProps<typeof Overlay>>(
|
|
9
|
+
function Portal({ ...props }, ref) {
|
|
10
|
+
return <Overlay {...props} ref={ref} />;
|
|
11
|
+
},
|
|
12
|
+
);
|
|
14
13
|
|
|
15
14
|
Portal.displayName = 'Portal';
|
|
16
15
|
|
|
@@ -15,15 +15,11 @@ const pressableStyle = tva({
|
|
|
15
15
|
base: 'data-[focus-visible=true]:outline-none data-[focus-visible=true]:ring-indicator-info data-[focus-visible=true]:ring-2 data-[disabled=true]:opacity-40',
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
type IPressableProps = Omit<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const Pressable = React.forwardRef<
|
|
24
|
-
React.ComponentRef<typeof UIPressable>,
|
|
25
|
-
IPressableProps
|
|
26
|
-
>(function Pressable({ className, ...props }, ref) {
|
|
18
|
+
type IPressableProps = Omit<React.ComponentProps<typeof UIPressable>, 'context'> & VariantProps<typeof pressableStyle>;
|
|
19
|
+
const Pressable = React.forwardRef<React.ComponentRef<typeof UIPressable>, IPressableProps>(function Pressable(
|
|
20
|
+
{ className, ...props },
|
|
21
|
+
ref,
|
|
22
|
+
) {
|
|
27
23
|
return (
|
|
28
24
|
<UIPressable
|
|
29
25
|
{...props}
|
|
@@ -3,10 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { createProgress } from '@gluestack-ui/core/progress/creator';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
5
|
import { tva } from '@gluestack-ui/utils/nativewind-utils';
|
|
6
|
-
import {
|
|
7
|
-
withStyleContext,
|
|
8
|
-
useStyleContext,
|
|
9
|
-
} from '@gluestack-ui/utils/nativewind-utils';
|
|
6
|
+
import { withStyleContext, useStyleContext } from '@gluestack-ui/utils/nativewind-utils';
|
|
10
7
|
import { cssInterop } from 'nativewind';
|
|
11
8
|
import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
|
|
12
9
|
|
|
@@ -39,17 +36,13 @@ const progressFilledTrackStyle = tva({
|
|
|
39
36
|
},
|
|
40
37
|
});
|
|
41
38
|
|
|
42
|
-
type IProgressProps = VariantProps<typeof progressStyle> &
|
|
43
|
-
React.ComponentProps<typeof UIProgress>;
|
|
39
|
+
type IProgressProps = VariantProps<typeof progressStyle> & React.ComponentProps<typeof UIProgress>;
|
|
44
40
|
type IProgressFilledTrackProps = VariantProps<typeof progressFilledTrackStyle> &
|
|
45
41
|
React.ComponentProps<typeof UIProgress.FilledTrack>;
|
|
46
42
|
|
|
47
|
-
const Progress = React.forwardRef<
|
|
48
|
-
React.ComponentRef<typeof UIProgress>,
|
|
49
|
-
IProgressProps
|
|
50
|
-
>(function Progress(
|
|
43
|
+
const Progress = React.forwardRef<React.ComponentRef<typeof UIProgress>, IProgressProps>(function Progress(
|
|
51
44
|
{ className, orientation = 'horizontal', ...props },
|
|
52
|
-
ref
|
|
45
|
+
ref,
|
|
53
46
|
) {
|
|
54
47
|
return (
|
|
55
48
|
<UIProgress
|