@flipova/foundation 2.3.0 → 2.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/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
|
@@ -46,11 +46,11 @@ export const dateTimePickerIconStyle = tva({
|
|
|
46
46
|
parentVariants: {
|
|
47
47
|
size: {
|
|
48
48
|
'2xs': 'h-3 w-3',
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
xs: 'h-3.5 w-3.5',
|
|
50
|
+
sm: 'h-4 w-4',
|
|
51
|
+
md: 'h-[18px] w-[18px]',
|
|
52
|
+
lg: 'h-5 w-5',
|
|
53
|
+
xl: 'h-6 w-6',
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
});
|
|
@@ -14,13 +14,12 @@ const dividerStyle = tva({
|
|
|
14
14
|
},
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
type IUIDividerProps = React.ComponentPropsWithoutRef<typeof View> &
|
|
18
|
-
VariantProps<typeof dividerStyle>;
|
|
17
|
+
type IUIDividerProps = React.ComponentPropsWithoutRef<typeof View> & VariantProps<typeof dividerStyle>;
|
|
19
18
|
|
|
20
|
-
const Divider = React.forwardRef<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
const Divider = React.forwardRef<React.ComponentRef<typeof View>, IUIDividerProps>(function Divider(
|
|
20
|
+
{ className, orientation = 'horizontal', ...props },
|
|
21
|
+
ref,
|
|
22
|
+
) {
|
|
24
23
|
return (
|
|
25
24
|
<View
|
|
26
25
|
ref={ref}
|
|
@@ -4,11 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { Pressable, ScrollView, View } from 'react-native';
|
|
5
5
|
|
|
6
6
|
import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
|
|
7
|
-
import {
|
|
8
|
-
tva,
|
|
9
|
-
useStyleContext,
|
|
10
|
-
withStyleContext,
|
|
11
|
-
} from '@gluestack-ui/utils/nativewind-utils';
|
|
7
|
+
import { tva, useStyleContext, withStyleContext } from '@gluestack-ui/utils/nativewind-utils';
|
|
12
8
|
import { cssInterop } from 'nativewind';
|
|
13
9
|
import Animated, {
|
|
14
10
|
SlideInLeft,
|
|
@@ -179,8 +175,7 @@ const drawerFooterStyle = tva({
|
|
|
179
175
|
base: 'flex-col-reverse gap-2 sm:flex-row sm:justify-end pt-4',
|
|
180
176
|
});
|
|
181
177
|
|
|
182
|
-
type IDrawerProps = React.ComponentProps<typeof UIDrawer> &
|
|
183
|
-
VariantProps<typeof drawerStyle> & { className?: string };
|
|
178
|
+
type IDrawerProps = React.ComponentProps<typeof UIDrawer> & VariantProps<typeof drawerStyle> & { className?: string };
|
|
184
179
|
|
|
185
180
|
type IDrawerBackdropProps = React.ComponentProps<typeof UIDrawer.Backdrop> &
|
|
186
181
|
VariantProps<typeof drawerBackdropStyle> & { className?: string };
|
|
@@ -197,15 +192,13 @@ type IDrawerBodyProps = React.ComponentProps<typeof UIDrawer.Body> &
|
|
|
197
192
|
type IDrawerFooterProps = React.ComponentProps<typeof UIDrawer.Footer> &
|
|
198
193
|
VariantProps<typeof drawerFooterStyle> & { className?: string };
|
|
199
194
|
|
|
200
|
-
type IDrawerCloseButtonProps = React.ComponentProps<
|
|
201
|
-
typeof UIDrawer.CloseButton
|
|
202
|
-
> &
|
|
195
|
+
type IDrawerCloseButtonProps = React.ComponentProps<typeof UIDrawer.CloseButton> &
|
|
203
196
|
VariantProps<typeof drawerCloseButtonStyle> & { className?: string };
|
|
204
197
|
|
|
205
|
-
const Drawer = React.forwardRef<
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
198
|
+
const Drawer = React.forwardRef<React.ComponentRef<typeof UIDrawer>, IDrawerProps>(function Drawer(
|
|
199
|
+
{ className, size = 'md', anchor = 'left', ...props },
|
|
200
|
+
ref,
|
|
201
|
+
) {
|
|
209
202
|
return (
|
|
210
203
|
<UIDrawer
|
|
211
204
|
ref={ref}
|
|
@@ -217,91 +210,88 @@ const Drawer = React.forwardRef<
|
|
|
217
210
|
);
|
|
218
211
|
});
|
|
219
212
|
|
|
220
|
-
const DrawerBackdrop = React.forwardRef<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
});
|
|
213
|
+
const DrawerBackdrop = React.forwardRef<React.ComponentRef<typeof UIDrawer.Backdrop>, IDrawerBackdropProps>(
|
|
214
|
+
function DrawerBackdrop({ className, ...props }, ref) {
|
|
215
|
+
return (
|
|
216
|
+
<UIDrawer.Backdrop
|
|
217
|
+
ref={ref}
|
|
218
|
+
entering={FadeIn.duration(200).easing(Easing.in(Easing.cubic))}
|
|
219
|
+
exiting={FadeOut.duration(150)}
|
|
220
|
+
{...props}
|
|
221
|
+
className={drawerBackdropStyle({
|
|
222
|
+
class: className,
|
|
223
|
+
})}
|
|
224
|
+
/>
|
|
225
|
+
);
|
|
226
|
+
},
|
|
227
|
+
);
|
|
236
228
|
|
|
237
|
-
const DrawerContent = React.forwardRef<
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
>(function DrawerContent({ className, ...props }, ref) {
|
|
241
|
-
const { size: parentSize, anchor: parentAnchor } = useStyleContext(SCOPE);
|
|
229
|
+
const DrawerContent = React.forwardRef<React.ComponentRef<typeof UIDrawer.Content>, IDrawerContentProps>(
|
|
230
|
+
function DrawerContent({ className, ...props }, ref) {
|
|
231
|
+
const { size: parentSize, anchor: parentAnchor } = useStyleContext(SCOPE);
|
|
242
232
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
233
|
+
// Calculate positioning classes
|
|
234
|
+
const customClass =
|
|
235
|
+
parentAnchor === 'left' || parentAnchor === 'right'
|
|
236
|
+
? `top-0 ${parentAnchor === 'left' ? 'left-0' : 'right-0'}`
|
|
237
|
+
: `left-0 ${parentAnchor === 'top' ? 'top-0' : 'bottom-0'}`;
|
|
248
238
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
239
|
+
// Select entering and exiting animations based on anchor
|
|
240
|
+
const enteringAnimation =
|
|
241
|
+
parentAnchor === 'left'
|
|
242
|
+
? SlideInLeft.duration(200).easing(Easing.in(Easing.cubic))
|
|
243
|
+
: parentAnchor === 'right'
|
|
244
|
+
? SlideInRight.duration(200)
|
|
245
|
+
: parentAnchor === 'top'
|
|
246
|
+
? SlideInUp.duration(200)
|
|
247
|
+
: SlideInDown.duration(200);
|
|
258
248
|
|
|
259
|
-
|
|
260
|
-
|
|
249
|
+
const exitingAnimation =
|
|
250
|
+
parentAnchor === 'left'
|
|
261
251
|
? SlideOutLeft.duration(200)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
252
|
+
: parentAnchor === 'right'
|
|
253
|
+
? SlideOutRight.duration(200)
|
|
254
|
+
: parentAnchor === 'top'
|
|
255
|
+
? SlideOutUp.duration(200)
|
|
256
|
+
: SlideOutDown.duration(200);
|
|
267
257
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
258
|
+
return (
|
|
259
|
+
<UIDrawer.Content
|
|
260
|
+
ref={ref}
|
|
261
|
+
entering={enteringAnimation}
|
|
262
|
+
exiting={exitingAnimation}
|
|
263
|
+
{...props}
|
|
264
|
+
className={drawerContentStyle({
|
|
265
|
+
parentVariants: {
|
|
266
|
+
size: parentSize,
|
|
267
|
+
anchor: parentAnchor,
|
|
268
|
+
},
|
|
269
|
+
class: `${className || ''} ${customClass}`,
|
|
270
|
+
})}
|
|
271
|
+
pointerEvents="auto"
|
|
272
|
+
/>
|
|
273
|
+
);
|
|
274
|
+
},
|
|
275
|
+
);
|
|
285
276
|
|
|
286
|
-
const DrawerHeader = React.forwardRef<
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
});
|
|
277
|
+
const DrawerHeader = React.forwardRef<React.ComponentRef<typeof UIDrawer.Header>, IDrawerHeaderProps>(
|
|
278
|
+
function DrawerHeader({ className, ...props }, ref) {
|
|
279
|
+
return (
|
|
280
|
+
<UIDrawer.Header
|
|
281
|
+
ref={ref}
|
|
282
|
+
{...props}
|
|
283
|
+
className={drawerHeaderStyle({
|
|
284
|
+
class: className,
|
|
285
|
+
})}
|
|
286
|
+
/>
|
|
287
|
+
);
|
|
288
|
+
},
|
|
289
|
+
);
|
|
300
290
|
|
|
301
|
-
const DrawerBody = React.forwardRef<
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
291
|
+
const DrawerBody = React.forwardRef<React.ComponentRef<typeof UIDrawer.Body>, IDrawerBodyProps>(function DrawerBody(
|
|
292
|
+
{ className, ...props },
|
|
293
|
+
ref,
|
|
294
|
+
) {
|
|
305
295
|
return (
|
|
306
296
|
<UIDrawer.Body
|
|
307
297
|
ref={ref}
|
|
@@ -313,35 +303,33 @@ const DrawerBody = React.forwardRef<
|
|
|
313
303
|
);
|
|
314
304
|
});
|
|
315
305
|
|
|
316
|
-
const DrawerFooter = React.forwardRef<
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
});
|
|
306
|
+
const DrawerFooter = React.forwardRef<React.ComponentRef<typeof UIDrawer.Footer>, IDrawerFooterProps>(
|
|
307
|
+
function DrawerFooter({ className, ...props }, ref) {
|
|
308
|
+
return (
|
|
309
|
+
<UIDrawer.Footer
|
|
310
|
+
ref={ref}
|
|
311
|
+
{...props}
|
|
312
|
+
className={drawerFooterStyle({
|
|
313
|
+
class: className,
|
|
314
|
+
})}
|
|
315
|
+
/>
|
|
316
|
+
);
|
|
317
|
+
},
|
|
318
|
+
);
|
|
330
319
|
|
|
331
|
-
const DrawerCloseButton = React.forwardRef<
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
});
|
|
320
|
+
const DrawerCloseButton = React.forwardRef<React.ComponentRef<typeof UIDrawer.CloseButton>, IDrawerCloseButtonProps>(
|
|
321
|
+
function DrawerCloseButton({ className, ...props }, ref) {
|
|
322
|
+
return (
|
|
323
|
+
<UIDrawer.CloseButton
|
|
324
|
+
ref={ref}
|
|
325
|
+
{...props}
|
|
326
|
+
className={drawerCloseButtonStyle({
|
|
327
|
+
class: className,
|
|
328
|
+
})}
|
|
329
|
+
/>
|
|
330
|
+
);
|
|
331
|
+
},
|
|
332
|
+
);
|
|
345
333
|
|
|
346
334
|
Drawer.displayName = 'Drawer';
|
|
347
335
|
DrawerBackdrop.displayName = 'DrawerBackdrop';
|
|
@@ -351,12 +339,4 @@ DrawerBody.displayName = 'DrawerBody';
|
|
|
351
339
|
DrawerFooter.displayName = 'DrawerFooter';
|
|
352
340
|
DrawerCloseButton.displayName = 'DrawerCloseButton';
|
|
353
341
|
|
|
354
|
-
export {
|
|
355
|
-
Drawer,
|
|
356
|
-
DrawerBackdrop,
|
|
357
|
-
DrawerBody,
|
|
358
|
-
DrawerCloseButton,
|
|
359
|
-
DrawerContent,
|
|
360
|
-
DrawerFooter,
|
|
361
|
-
DrawerHeader,
|
|
362
|
-
};
|
|
342
|
+
export { Drawer, DrawerBackdrop, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader };
|
|
@@ -3,10 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { createFab } from '@gluestack-ui/core/fab/creator';
|
|
4
4
|
import { Pressable, Text } 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
|
import { UIIcon } from '@gluestack-ui/core/icon/creator';
|
|
@@ -67,11 +64,9 @@ const fabLabelStyle = tva({
|
|
|
67
64
|
true: 'line-through',
|
|
68
65
|
},
|
|
69
66
|
size: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
'lg': 'text-lg',
|
|
74
|
-
|
|
67
|
+
sm: 'text-sm',
|
|
68
|
+
md: 'text-base',
|
|
69
|
+
lg: 'text-lg',
|
|
75
70
|
},
|
|
76
71
|
sub: {
|
|
77
72
|
true: 'text-xs',
|
|
@@ -96,49 +91,27 @@ const fabIconStyle = tva({
|
|
|
96
91
|
base: 'text-primary-foreground/90 fill-none',
|
|
97
92
|
variants: {
|
|
98
93
|
size: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
sm: 'h-3.5 w-3.5',
|
|
95
|
+
md: 'h-4 w-4',
|
|
96
|
+
lg: 'h-5 w-5',
|
|
102
97
|
},
|
|
103
98
|
},
|
|
104
99
|
});
|
|
105
100
|
|
|
106
|
-
type IFabProps = Omit<React.ComponentPropsWithoutRef<typeof UIFab>, 'context'> &
|
|
107
|
-
VariantProps<typeof fabStyle>;
|
|
101
|
+
type IFabProps = Omit<React.ComponentPropsWithoutRef<typeof UIFab>, 'context'> & VariantProps<typeof fabStyle>;
|
|
108
102
|
|
|
109
|
-
const Fab = React.forwardRef<React.ComponentRef<typeof UIFab>, IFabProps>(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
) {
|
|
114
|
-
|
|
115
|
-
<UIFab
|
|
116
|
-
ref={ref}
|
|
117
|
-
{...props}
|
|
118
|
-
className={fabStyle({ size, placement, class: className })}
|
|
119
|
-
context={{ size }}
|
|
120
|
-
/>
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
);
|
|
103
|
+
const Fab = React.forwardRef<React.ComponentRef<typeof UIFab>, IFabProps>(function Fab(
|
|
104
|
+
{ size = 'md', placement = 'bottom right', className, ...props },
|
|
105
|
+
ref,
|
|
106
|
+
) {
|
|
107
|
+
return <UIFab ref={ref} {...props} className={fabStyle({ size, placement, class: className })} context={{ size }} />;
|
|
108
|
+
});
|
|
124
109
|
|
|
125
|
-
type IFabLabelProps = React.ComponentPropsWithoutRef<typeof UIFab.Label> &
|
|
126
|
-
VariantProps<typeof fabLabelStyle>;
|
|
110
|
+
type IFabLabelProps = React.ComponentPropsWithoutRef<typeof UIFab.Label> & VariantProps<typeof fabLabelStyle>;
|
|
127
111
|
|
|
128
|
-
const FabLabel = React.forwardRef<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
>(function FabLabel(
|
|
132
|
-
{
|
|
133
|
-
size,
|
|
134
|
-
isTruncated = false,
|
|
135
|
-
bold = false,
|
|
136
|
-
underline = false,
|
|
137
|
-
strikeThrough = false,
|
|
138
|
-
className,
|
|
139
|
-
...props
|
|
140
|
-
},
|
|
141
|
-
ref
|
|
112
|
+
const FabLabel = React.forwardRef<React.ComponentRef<typeof UIFab.Label>, IFabLabelProps>(function FabLabel(
|
|
113
|
+
{ size, isTruncated = false, bold = false, underline = false, strikeThrough = false, className, ...props },
|
|
114
|
+
ref,
|
|
142
115
|
) {
|
|
143
116
|
const { size: parentSize } = useStyleContext(SCOPE);
|
|
144
117
|
return (
|
|
@@ -166,32 +139,16 @@ type IFabIconProps = React.ComponentPropsWithoutRef<typeof UIFab.Icon> &
|
|
|
166
139
|
width?: number;
|
|
167
140
|
};
|
|
168
141
|
|
|
169
|
-
const FabIcon = React.forwardRef<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
142
|
+
const FabIcon = React.forwardRef<React.ComponentRef<typeof UIFab.Icon>, IFabIconProps>(function FabIcon(
|
|
143
|
+
{ size, className, ...props },
|
|
144
|
+
ref,
|
|
145
|
+
) {
|
|
173
146
|
const { size: parentSize } = useStyleContext(SCOPE);
|
|
174
147
|
|
|
175
148
|
if (typeof size === 'number') {
|
|
176
|
-
return (
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
{...props}
|
|
180
|
-
className={fabIconStyle({ class: className })}
|
|
181
|
-
size={size}
|
|
182
|
-
/>
|
|
183
|
-
);
|
|
184
|
-
} else if (
|
|
185
|
-
(props.height !== undefined || props.width !== undefined) &&
|
|
186
|
-
size === undefined
|
|
187
|
-
) {
|
|
188
|
-
return (
|
|
189
|
-
<UIFab.Icon
|
|
190
|
-
ref={ref}
|
|
191
|
-
{...props}
|
|
192
|
-
className={fabIconStyle({ class: className })}
|
|
193
|
-
/>
|
|
194
|
-
);
|
|
149
|
+
return <UIFab.Icon ref={ref} {...props} className={fabIconStyle({ class: className })} size={size} />;
|
|
150
|
+
} else if ((props.height !== undefined || props.width !== undefined) && size === undefined) {
|
|
151
|
+
return <UIFab.Icon ref={ref} {...props} className={fabIconStyle({ class: className })} />;
|
|
195
152
|
}
|
|
196
153
|
return (
|
|
197
154
|
<UIFab.Icon
|
|
@@ -5,14 +5,17 @@ import { FlatList as RNFlatList, Platform, FlatListProps } from 'react-native';
|
|
|
5
5
|
// Performance-optimized FlatList with Android defaults
|
|
6
6
|
export function FlatList<ItemT = any>(props: FlatListProps<ItemT>) {
|
|
7
7
|
// Apply Android-specific performance defaults if not explicitly overridden
|
|
8
|
-
const optimizedProps =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
const optimizedProps =
|
|
9
|
+
Platform.OS === 'android'
|
|
10
|
+
? {
|
|
11
|
+
removeClippedSubviews: true,
|
|
12
|
+
maxToRenderPerBatch: 5,
|
|
13
|
+
updateCellsBatchingPeriod: 100,
|
|
14
|
+
initialNumToRender: 5,
|
|
15
|
+
windowSize: 5,
|
|
16
|
+
...props,
|
|
17
|
+
}
|
|
18
|
+
: props;
|
|
16
19
|
|
|
17
20
|
return <RNFlatList {...optimizedProps} />;
|
|
18
21
|
}
|
|
@@ -138,25 +138,22 @@ const formControlLabelAstrickStyle = tva({
|
|
|
138
138
|
},
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
type IFormControlLabelAstrickProps = React.ComponentPropsWithoutRef<
|
|
142
|
-
typeof Text
|
|
143
|
-
> &
|
|
141
|
+
type IFormControlLabelAstrickProps = React.ComponentPropsWithoutRef<typeof Text> &
|
|
144
142
|
VariantProps<typeof formControlLabelAstrickStyle>;
|
|
145
143
|
|
|
146
|
-
const FormControlLabelAstrick = React.forwardRef<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
});
|
|
144
|
+
const FormControlLabelAstrick = React.forwardRef<React.ComponentRef<typeof Text>, IFormControlLabelAstrickProps>(
|
|
145
|
+
function FormControlLabelAstrick({ className, ...props }, ref) {
|
|
146
|
+
return (
|
|
147
|
+
<Text
|
|
148
|
+
ref={ref}
|
|
149
|
+
className={formControlLabelAstrickStyle({
|
|
150
|
+
class: className,
|
|
151
|
+
})}
|
|
152
|
+
{...props}
|
|
153
|
+
/>
|
|
154
|
+
);
|
|
155
|
+
},
|
|
156
|
+
);
|
|
160
157
|
|
|
161
158
|
export const UIFormControl = createFormControl({
|
|
162
159
|
Root: withStyleContext(View, SCOPE),
|
|
@@ -183,41 +180,25 @@ cssInterop(UIIcon, {
|
|
|
183
180
|
},
|
|
184
181
|
});
|
|
185
182
|
|
|
186
|
-
type IFormControlProps = React.ComponentProps<typeof UIFormControl> &
|
|
187
|
-
VariantProps<typeof formControlStyle>;
|
|
183
|
+
type IFormControlProps = React.ComponentProps<typeof UIFormControl> & VariantProps<typeof formControlStyle>;
|
|
188
184
|
|
|
189
|
-
const FormControl = React.forwardRef<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return (
|
|
194
|
-
<UIFormControl
|
|
195
|
-
ref={ref}
|
|
196
|
-
className={formControlStyle({ class: className })}
|
|
197
|
-
{...props}
|
|
198
|
-
/>
|
|
199
|
-
);
|
|
185
|
+
const FormControl = React.forwardRef<React.ComponentRef<typeof UIFormControl>, IFormControlProps>(function FormControl(
|
|
186
|
+
{ className, ...props },
|
|
187
|
+
ref,
|
|
188
|
+
) {
|
|
189
|
+
return <UIFormControl ref={ref} className={formControlStyle({ class: className })} {...props} />;
|
|
200
190
|
});
|
|
201
191
|
|
|
202
192
|
type IFormControlErrorProps = React.ComponentProps<typeof UIFormControl.Error> &
|
|
203
193
|
VariantProps<typeof formControlErrorStyle>;
|
|
204
194
|
|
|
205
|
-
const FormControlError = React.forwardRef<
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
<UIFormControl.Error
|
|
211
|
-
ref={ref}
|
|
212
|
-
className={formControlErrorStyle({ class: className })}
|
|
213
|
-
{...props}
|
|
214
|
-
/>
|
|
215
|
-
);
|
|
216
|
-
});
|
|
195
|
+
const FormControlError = React.forwardRef<React.ComponentRef<typeof UIFormControl.Error>, IFormControlErrorProps>(
|
|
196
|
+
function FormControlError({ className, ...props }, ref) {
|
|
197
|
+
return <UIFormControl.Error ref={ref} className={formControlErrorStyle({ class: className })} {...props} />;
|
|
198
|
+
},
|
|
199
|
+
);
|
|
217
200
|
|
|
218
|
-
type IFormControlErrorTextProps = React.ComponentProps<
|
|
219
|
-
typeof UIFormControl.Error.Text
|
|
220
|
-
> &
|
|
201
|
+
type IFormControlErrorTextProps = React.ComponentProps<typeof UIFormControl.Error.Text> &
|
|
221
202
|
VariantProps<typeof formControlErrorTextStyle>;
|
|
222
203
|
|
|
223
204
|
const FormControlErrorText = React.forwardRef<
|
|
@@ -235,43 +216,26 @@ const FormControlErrorText = React.forwardRef<
|
|
|
235
216
|
);
|
|
236
217
|
});
|
|
237
218
|
|
|
238
|
-
type IFormControlErrorIconProps = React.ComponentProps<
|
|
239
|
-
typeof UIFormControl.Error.Icon
|
|
240
|
-
> &
|
|
219
|
+
type IFormControlErrorIconProps = React.ComponentProps<typeof UIFormControl.Error.Icon> &
|
|
241
220
|
VariantProps<typeof formControlErrorIconStyle>;
|
|
242
221
|
|
|
243
222
|
const FormControlErrorIcon = React.forwardRef<
|
|
244
223
|
React.ComponentRef<typeof UIFormControl.Error.Icon>,
|
|
245
224
|
IFormControlErrorIconProps
|
|
246
225
|
>(function FormControlErrorIcon({ className, ...props }, ref) {
|
|
247
|
-
return (
|
|
248
|
-
<UIFormControl.Error.Icon
|
|
249
|
-
ref={ref}
|
|
250
|
-
{...props}
|
|
251
|
-
className={formControlErrorIconStyle({ class: className })}
|
|
252
|
-
/>
|
|
253
|
-
);
|
|
226
|
+
return <UIFormControl.Error.Icon ref={ref} {...props} className={formControlErrorIconStyle({ class: className })} />;
|
|
254
227
|
});
|
|
255
228
|
|
|
256
229
|
type IFormControlLabelProps = React.ComponentProps<typeof UIFormControl.Label> &
|
|
257
230
|
VariantProps<typeof formControlLabelStyle>;
|
|
258
231
|
|
|
259
|
-
const FormControlLabel = React.forwardRef<
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
<UIFormControl.Label
|
|
265
|
-
ref={ref}
|
|
266
|
-
className={formControlLabelStyle({ class: className })}
|
|
267
|
-
{...props}
|
|
268
|
-
/>
|
|
269
|
-
);
|
|
270
|
-
});
|
|
232
|
+
const FormControlLabel = React.forwardRef<React.ComponentRef<typeof UIFormControl.Label>, IFormControlLabelProps>(
|
|
233
|
+
function FormControlLabel({ className, ...props }, ref) {
|
|
234
|
+
return <UIFormControl.Label ref={ref} className={formControlLabelStyle({ class: className })} {...props} />;
|
|
235
|
+
},
|
|
236
|
+
);
|
|
271
237
|
|
|
272
|
-
type IFormControlLabelTextProps = React.ComponentProps<
|
|
273
|
-
typeof UIFormControl.Label.Text
|
|
274
|
-
> &
|
|
238
|
+
type IFormControlLabelTextProps = React.ComponentProps<typeof UIFormControl.Label.Text> &
|
|
275
239
|
VariantProps<typeof formControlLabelTextStyle>;
|
|
276
240
|
|
|
277
241
|
const FormControlLabelText = React.forwardRef<
|
|
@@ -289,29 +253,24 @@ const FormControlLabelText = React.forwardRef<
|
|
|
289
253
|
);
|
|
290
254
|
});
|
|
291
255
|
|
|
292
|
-
type IFormControlHelperProps = React.ComponentProps<
|
|
293
|
-
typeof UIFormControl.Helper
|
|
294
|
-
> &
|
|
256
|
+
type IFormControlHelperProps = React.ComponentProps<typeof UIFormControl.Helper> &
|
|
295
257
|
VariantProps<typeof formControlHelperStyle>;
|
|
296
258
|
|
|
297
|
-
const FormControlHelper = React.forwardRef<
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
});
|
|
259
|
+
const FormControlHelper = React.forwardRef<React.ComponentRef<typeof UIFormControl.Helper>, IFormControlHelperProps>(
|
|
260
|
+
function FormControlHelper({ className, ...props }, ref) {
|
|
261
|
+
return (
|
|
262
|
+
<UIFormControl.Helper
|
|
263
|
+
ref={ref}
|
|
264
|
+
className={formControlHelperStyle({
|
|
265
|
+
class: className,
|
|
266
|
+
})}
|
|
267
|
+
{...props}
|
|
268
|
+
/>
|
|
269
|
+
);
|
|
270
|
+
},
|
|
271
|
+
);
|
|
311
272
|
|
|
312
|
-
type IFormControlHelperTextProps = React.ComponentProps<
|
|
313
|
-
typeof UIFormControl.Helper.Text
|
|
314
|
-
> &
|
|
273
|
+
type IFormControlHelperTextProps = React.ComponentProps<typeof UIFormControl.Helper.Text> &
|
|
315
274
|
VariantProps<typeof formControlHelperTextStyle>;
|
|
316
275
|
|
|
317
276
|
const FormControlHelperText = React.forwardRef<
|