@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.
Files changed (98) hide show
  1. package/README.md +157 -156
  2. package/components/ui/accordion/ANIMATION_CUSTOMIZATION.md +16 -7
  3. package/components/ui/accordion/AccordionAnimatedHeight.tsx +3 -15
  4. package/components/ui/accordion/AccordionAnimatedIcon.tsx +2 -9
  5. package/components/ui/accordion/AnimatedHeight.tsx +3 -15
  6. package/components/ui/accordion/AnimatedIcon.tsx +2 -9
  7. package/components/ui/accordion/MIGRATION_SUMMARY.md +22 -11
  8. package/components/ui/accordion/USAGE_EXAMPLE.tsx +10 -25
  9. package/components/ui/accordion/index.tsx +71 -139
  10. package/components/ui/actionsheet/index.tsx +63 -105
  11. package/components/ui/alert/index.tsx +20 -50
  12. package/components/ui/alert-dialog/index.tsx +23 -48
  13. package/components/ui/avatar/index.tsx +32 -68
  14. package/components/ui/badge/index.tsx +18 -49
  15. package/components/ui/bottomsheet/index.tsx +20 -52
  16. package/components/ui/box/index.tsx +4 -9
  17. package/components/ui/box/index.web.tsx +3 -9
  18. package/components/ui/button/index.tsx +73 -109
  19. package/components/ui/calendar/creator.tsx +69 -30
  20. package/components/ui/calendar/index.tsx +81 -159
  21. package/components/ui/calendar/styles.tsx +10 -10
  22. package/components/ui/card/index.tsx +8 -9
  23. package/components/ui/card/index.web.tsx +4 -10
  24. package/components/ui/center/index.tsx +6 -11
  25. package/components/ui/center/index.web.tsx +3 -9
  26. package/components/ui/checkbox/index.tsx +46 -107
  27. package/components/ui/date-time-picker/creator.tsx +14 -1
  28. package/components/ui/date-time-picker/index.tsx +107 -156
  29. package/components/ui/date-time-picker/index.web.tsx +11 -33
  30. package/components/ui/date-time-picker/styles.tsx +5 -5
  31. package/components/ui/divider/index.tsx +5 -6
  32. package/components/ui/drawer/index.tsx +108 -128
  33. package/components/ui/fab/index.tsx +25 -68
  34. package/components/ui/flat-list/index.tsx +11 -8
  35. package/components/ui/form-control/index.tsx +49 -90
  36. package/components/ui/gluestack-ui-provider/index.tsx +4 -18
  37. package/components/ui/gluestack-ui-provider/index.web.tsx +10 -11
  38. package/components/ui/gluestack-ui-provider/script.ts +1 -3
  39. package/components/ui/gluestack-ui-provider/theme-context.ts +2 -2
  40. package/components/ui/gluestack-ui-provider/useGluestackColors.ts +2 -6
  41. package/components/ui/grid/index.tsx +128 -165
  42. package/components/ui/grid/index.web.tsx +17 -19
  43. package/components/ui/grid/styles.tsx +1 -3
  44. package/components/ui/heading/index.tsx +146 -169
  45. package/components/ui/heading/index.web.tsx +7 -28
  46. package/components/ui/heading/styles.tsx +5 -5
  47. package/components/ui/hstack/index.tsx +16 -15
  48. package/components/ui/hstack/index.web.tsx +17 -17
  49. package/components/ui/hstack/styles.tsx +5 -5
  50. package/components/ui/icon/index.tsx +95 -486
  51. package/components/ui/icon/index.web.tsx +79 -439
  52. package/components/ui/image/index.tsx +13 -18
  53. package/components/ui/image-viewer/index.tsx +149 -221
  54. package/components/ui/image-viewer/index.web.tsx +88 -113
  55. package/components/ui/input/index.tsx +20 -33
  56. package/components/ui/link/index.tsx +16 -22
  57. package/components/ui/liquid-glass/index.tsx +19 -25
  58. package/components/ui/menu/index.tsx +44 -66
  59. package/components/ui/modal/index.tsx +70 -91
  60. package/components/ui/popover/index.tsx +102 -121
  61. package/components/ui/portal/index.tsx +5 -6
  62. package/components/ui/pressable/index.tsx +5 -9
  63. package/components/ui/progress/index.tsx +4 -11
  64. package/components/ui/radio/index.tsx +47 -83
  65. package/components/ui/select/index.tsx +38 -59
  66. package/components/ui/select/select-actionsheet.tsx +61 -108
  67. package/components/ui/skeleton/index.tsx +22 -43
  68. package/components/ui/skeleton/index.web.tsx +63 -75
  69. package/components/ui/slider/index.tsx +36 -56
  70. package/components/ui/spinner/index.tsx +1 -10
  71. package/components/ui/switch/index.tsx +6 -13
  72. package/components/ui/table/index.tsx +39 -102
  73. package/components/ui/table/index.web.tsx +41 -79
  74. package/components/ui/tabs/TabsAnimatedIndicator.tsx +10 -38
  75. package/components/ui/tabs/creator.tsx +32 -24
  76. package/components/ui/tabs/index.tsx +253 -309
  77. package/components/ui/text/index.tsx +23 -37
  78. package/components/ui/text/index.web.tsx +33 -35
  79. package/components/ui/text/styles.tsx +5 -5
  80. package/components/ui/textarea/index.tsx +24 -38
  81. package/components/ui/toast/index.tsx +47 -52
  82. package/components/ui/tooltip/index.tsx +12 -28
  83. package/components/ui/vstack/index.tsx +17 -17
  84. package/components/ui/vstack/index.web.tsx +17 -17
  85. package/components/ui/vstack/styles.tsx +5 -5
  86. package/design/tools/design.js +15 -12
  87. package/design/tools/npm.js +4 -3
  88. package/dist/{chunk-B277QSR5.mjs → chunk-2R66P5X5.mjs} +1816 -3124
  89. package/dist/chunk-2R66P5X5.mjs.map +1 -0
  90. package/dist/{chunk-GD37RFBR.js → chunk-LCTFQJZM.js} +1816 -3124
  91. package/dist/chunk-LCTFQJZM.js.map +1 -0
  92. package/dist/index.js +294 -294
  93. package/dist/index.mjs +1 -1
  94. package/dist/ui/index.js +294 -294
  95. package/dist/ui/index.mjs +1 -1
  96. package/package.json +12 -7
  97. package/dist/chunk-B277QSR5.mjs.map +0 -1
  98. package/dist/chunk-GD37RFBR.js.map +0 -1
@@ -11,11 +11,9 @@ import { UIIcon } from '@gluestack-ui/core/icon/creator';
11
11
  const SCOPE = 'Radio';
12
12
 
13
13
  const UIRadio = createRadio({
14
- Root: (Platform.OS === 'web'
15
- ? withStyleContext(View, SCOPE)
16
- : withStyleContext(Pressable, SCOPE)) as ReturnType<
17
- typeof withStyleContext<typeof Pressable>
18
- >,
14
+ Root: (Platform.OS === 'web' ? withStyleContext(View, SCOPE) : withStyleContext(Pressable, SCOPE)) as ReturnType<
15
+ typeof withStyleContext<typeof Pressable>
16
+ >,
19
17
  Group: View,
20
18
  Icon: UIIcon,
21
19
  Indicator: View,
@@ -77,11 +75,11 @@ const radioLabelStyle = tva({
77
75
  parentVariants: {
78
76
  size: {
79
77
  '2xs': 'text-2xs',
80
- 'xs': 'text-xs',
81
- 'sm': 'text-sm',
82
- 'md': 'text-base',
83
- 'lg': 'text-lg',
84
- 'xl': 'text-xl',
78
+ xs: 'text-xs',
79
+ sm: 'text-sm',
80
+ md: 'text-base',
81
+ lg: 'text-lg',
82
+ xl: 'text-xl',
85
83
  '2xl': 'text-2xl',
86
84
  '3xl': 'text-3xl',
87
85
  '4xl': 'text-4xl',
@@ -91,61 +89,44 @@ const radioLabelStyle = tva({
91
89
  },
92
90
  });
93
91
 
94
- type IRadioProps = Omit<React.ComponentProps<typeof UIRadio>, 'context'> &
95
- VariantProps<typeof radioStyle>;
96
- const Radio = React.forwardRef<React.ComponentRef<typeof UIRadio>, IRadioProps>(
97
- function Radio({ className, size = 'md', ...props }, ref) {
92
+ type IRadioProps = Omit<React.ComponentProps<typeof UIRadio>, 'context'> & VariantProps<typeof radioStyle>;
93
+ const Radio = React.forwardRef<React.ComponentRef<typeof UIRadio>, IRadioProps>(function Radio(
94
+ { className, size = 'md', ...props },
95
+ ref,
96
+ ) {
97
+ return <UIRadio className={radioStyle({ class: className, size })} {...props} ref={ref} context={{ size }} />;
98
+ });
99
+
100
+ type IRadioGroupProps = React.ComponentProps<typeof UIRadio.Group> & VariantProps<typeof radioGroupStyle>;
101
+ const RadioGroup = React.forwardRef<React.ComponentRef<typeof UIRadio.Group>, IRadioGroupProps>(function RadioGroup(
102
+ { className, ...props },
103
+ ref,
104
+ ) {
105
+ return <UIRadio.Group className={radioGroupStyle({ class: className })} {...props} ref={ref} />;
106
+ });
107
+
108
+ type IRadioIndicatorProps = React.ComponentProps<typeof UIRadio.Indicator> & VariantProps<typeof radioIndicatorStyle>;
109
+ const RadioIndicator = React.forwardRef<React.ComponentRef<typeof UIRadio.Indicator>, IRadioIndicatorProps>(
110
+ function RadioIndicator({ className, ...props }, ref) {
111
+ const { size } = useStyleContext(SCOPE);
98
112
  return (
99
- <UIRadio
100
- className={radioStyle({ class: className, size })}
101
- {...props}
113
+ <UIRadio.Indicator
114
+ className={radioIndicatorStyle({
115
+ parentVariants: { size },
116
+ class: className,
117
+ })}
102
118
  ref={ref}
103
- context={{ size }}
119
+ {...props}
104
120
  />
105
121
  );
106
- }
122
+ },
107
123
  );
108
124
 
109
- type IRadioGroupProps = React.ComponentProps<typeof UIRadio.Group> &
110
- VariantProps<typeof radioGroupStyle>;
111
- const RadioGroup = React.forwardRef<
112
- React.ComponentRef<typeof UIRadio.Group>,
113
- IRadioGroupProps
114
- >(function RadioGroup({ className, ...props }, ref) {
115
- return (
116
- <UIRadio.Group
117
- className={radioGroupStyle({ class: className })}
118
- {...props}
119
- ref={ref}
120
- />
121
- );
122
- });
123
-
124
- type IRadioIndicatorProps = React.ComponentProps<typeof UIRadio.Indicator> &
125
- VariantProps<typeof radioIndicatorStyle>;
126
- const RadioIndicator = React.forwardRef<
127
- React.ComponentRef<typeof UIRadio.Indicator>,
128
- IRadioIndicatorProps
129
- >(function RadioIndicator({ className, ...props }, ref) {
130
- const { size } = useStyleContext(SCOPE);
131
- return (
132
- <UIRadio.Indicator
133
- className={radioIndicatorStyle({
134
- parentVariants: { size },
135
- class: className,
136
- })}
137
- ref={ref}
138
- {...props}
139
- />
140
- );
141
- });
142
-
143
- type IRadioLabelProps = React.ComponentProps<typeof UIRadio.Label> &
144
- VariantProps<typeof radioIndicatorStyle>;
145
- const RadioLabel = React.forwardRef<
146
- React.ComponentRef<typeof UIRadio.Label>,
147
- IRadioLabelProps
148
- >(function RadioLabel({ className, ...props }, ref) {
125
+ type IRadioLabelProps = React.ComponentProps<typeof UIRadio.Label> & VariantProps<typeof radioIndicatorStyle>;
126
+ const RadioLabel = React.forwardRef<React.ComponentRef<typeof UIRadio.Label>, IRadioLabelProps>(function RadioLabel(
127
+ { className, ...props },
128
+ ref,
129
+ ) {
149
130
  const { size } = useStyleContext(SCOPE);
150
131
  return (
151
132
  <UIRadio.Label
@@ -164,32 +145,16 @@ type IRadioIconProps = React.ComponentProps<typeof UIRadio.Icon> &
164
145
  height?: number;
165
146
  width?: number;
166
147
  };
167
- const RadioIcon = React.forwardRef<
168
- React.ComponentRef<typeof UIRadio.Icon>,
169
- IRadioIconProps
170
- >(function RadioIcon({ className, size, ...props }, ref) {
148
+ const RadioIcon = React.forwardRef<React.ComponentRef<typeof UIRadio.Icon>, IRadioIconProps>(function RadioIcon(
149
+ { className, size, ...props },
150
+ ref,
151
+ ) {
171
152
  const { size: parentSize } = useStyleContext(SCOPE);
172
153
 
173
154
  if (typeof size === 'number') {
174
- return (
175
- <UIRadio.Icon
176
- ref={ref}
177
- {...props}
178
- className={radioIconStyle({ class: className })}
179
- size={size}
180
- />
181
- );
182
- } else if (
183
- (props.height !== undefined || props.width !== undefined) &&
184
- size === undefined
185
- ) {
186
- return (
187
- <UIRadio.Icon
188
- ref={ref}
189
- {...props}
190
- className={radioIconStyle({ class: className })}
191
- />
192
- );
155
+ return <UIRadio.Icon ref={ref} {...props} className={radioIconStyle({ class: className })} size={size} />;
156
+ } else if ((props.height !== undefined || props.width !== undefined) && size === undefined) {
157
+ return <UIRadio.Icon ref={ref} {...props} className={radioIconStyle({ class: className })} />;
193
158
  }
194
159
 
195
160
  return (
@@ -207,7 +172,6 @@ const RadioIcon = React.forwardRef<
207
172
  );
208
173
  });
209
174
 
210
-
211
175
  Radio.displayName = 'Radio';
212
176
  RadioGroup.displayName = 'RadioGroup';
213
177
  RadioIndicator.displayName = 'RadioIndicator';
@@ -3,10 +3,7 @@
3
3
  import React from 'react';
4
4
  import { tva } from '@gluestack-ui/utils/nativewind-utils';
5
5
  import { UIIcon } from '@gluestack-ui/core/icon/creator';
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 type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
11
8
  import { createSelect } from '@gluestack-ui/core/select/creator';
12
9
  import { cssInterop } from 'nativewind';
@@ -38,11 +35,11 @@ const selectIconStyle = tva({
38
35
  parentVariants: {
39
36
  size: {
40
37
  '2xs': 'h-3 w-3',
41
- 'xs': 'h-3.5 w-3.5',
42
- 'sm': 'h-4 w-4',
43
- 'md': 'h-[18px] w-[18px]',
44
- 'lg': 'h-5 w-5',
45
- 'xl': 'h-6 w-6',
38
+ xs: 'h-3.5 w-3.5',
39
+ sm: 'h-4 w-4',
40
+ md: 'h-[18px] w-[18px]',
41
+ lg: 'h-5 w-5',
42
+ xl: 'h-6 w-6',
46
43
  },
47
44
  },
48
45
  });
@@ -108,7 +105,7 @@ const UISelect = createSelect(
108
105
  FlatList: ActionsheetFlatList,
109
106
  SectionList: ActionsheetSectionList,
110
107
  SectionHeaderText: ActionsheetSectionHeaderText,
111
- }
108
+ },
112
109
  );
113
110
 
114
111
  cssInterop(UISelect, { className: 'style' });
@@ -130,13 +127,12 @@ cssInterop(UIIcon, {
130
127
  },
131
128
  });
132
129
 
133
- type ISelectProps = VariantProps<typeof selectStyle> &
134
- React.ComponentProps<typeof UISelect> & { className?: string };
130
+ type ISelectProps = VariantProps<typeof selectStyle> & React.ComponentProps<typeof UISelect> & { className?: string };
135
131
 
136
- const Select = React.forwardRef<
137
- React.ComponentRef<typeof UISelect>,
138
- ISelectProps
139
- >(function Select({ className, ...props }, ref) {
132
+ const Select = React.forwardRef<React.ComponentRef<typeof UISelect>, ISelectProps>(function Select(
133
+ { className, ...props },
134
+ ref,
135
+ ) {
140
136
  return (
141
137
  <UISelect
142
138
  className={selectStyle({
@@ -151,34 +147,30 @@ const Select = React.forwardRef<
151
147
  type ISelectTriggerProps = VariantProps<typeof selectTriggerStyle> &
152
148
  React.ComponentProps<typeof UISelect.Trigger> & { className?: string };
153
149
 
154
- const SelectTrigger = React.forwardRef<
155
- React.ComponentRef<typeof UISelect.Trigger>,
156
- ISelectTriggerProps
157
- >(function SelectTrigger(
158
- { className, size = 'md', variant = 'outline', ...props },
159
- ref
160
- ) {
161
- return (
162
- <UISelect.Trigger
163
- className={selectTriggerStyle({
164
- class: className,
165
- size,
166
- variant,
167
- })}
168
- ref={ref}
169
- context={{ size, variant }}
170
- {...props}
171
- />
172
- );
173
- });
150
+ const SelectTrigger = React.forwardRef<React.ComponentRef<typeof UISelect.Trigger>, ISelectTriggerProps>(
151
+ function SelectTrigger({ className, size = 'md', variant = 'outline', ...props }, ref) {
152
+ return (
153
+ <UISelect.Trigger
154
+ className={selectTriggerStyle({
155
+ class: className,
156
+ size,
157
+ variant,
158
+ })}
159
+ ref={ref}
160
+ context={{ size, variant }}
161
+ {...props}
162
+ />
163
+ );
164
+ },
165
+ );
174
166
 
175
167
  type ISelectInputProps = VariantProps<typeof selectInputStyle> &
176
168
  React.ComponentProps<typeof UISelect.Input> & { className?: string };
177
169
 
178
- const SelectInput = React.forwardRef<
179
- React.ComponentRef<typeof UISelect.Input>,
180
- ISelectInputProps
181
- >(function SelectInput({ className, ...props }, ref) {
170
+ const SelectInput = React.forwardRef<React.ComponentRef<typeof UISelect.Input>, ISelectInputProps>(function SelectInput(
171
+ { className, ...props },
172
+ ref,
173
+ ) {
182
174
  const { size: parentSize, variant: parentVariant } = useStyleContext();
183
175
  return (
184
176
  <UISelect.Input
@@ -198,32 +190,19 @@ const SelectInput = React.forwardRef<
198
190
  type ISelectIcon = VariantProps<typeof selectIconStyle> &
199
191
  React.ComponentProps<typeof UISelect.Icon> & { className?: string };
200
192
 
201
- const SelectIcon = React.forwardRef<
202
- React.ComponentRef<typeof UISelect.Icon>,
203
- ISelectIcon
204
- >(function SelectIcon({ className, size, ...props }, ref) {
193
+ const SelectIcon = React.forwardRef<React.ComponentRef<typeof UISelect.Icon>, ISelectIcon>(function SelectIcon(
194
+ { className, size, ...props },
195
+ ref,
196
+ ) {
205
197
  const { size: parentSize } = useStyleContext();
206
198
  if (typeof size === 'number') {
207
- return (
208
- <UISelect.Icon
209
- ref={ref}
210
- {...props}
211
- className={selectIconStyle({ class: className })}
212
- size={size}
213
- />
214
- );
199
+ return <UISelect.Icon ref={ref} {...props} className={selectIconStyle({ class: className })} size={size} />;
215
200
  } else if (
216
201
  //@ts-expect-error : web only
217
202
  (props?.height !== undefined || props?.width !== undefined) &&
218
203
  size === undefined
219
204
  ) {
220
- return (
221
- <UISelect.Icon
222
- ref={ref}
223
- {...props}
224
- className={selectIconStyle({ class: className })}
225
- />
226
- );
205
+ return <UISelect.Icon ref={ref} {...props} className={selectIconStyle({ class: className })} />;
227
206
  }
228
207
  return (
229
208
  <UISelect.Icon
@@ -2,36 +2,20 @@
2
2
 
3
3
  import { H4 } from '@expo/html-elements';
4
4
  import { createActionsheet } from '@gluestack-ui/core/actionsheet/creator';
5
- import {
6
- Pressable,
7
- View,
8
- Text,
9
- ScrollView,
10
- VirtualizedList,
11
- FlatList,
12
- SectionList,
13
- ViewStyle,
14
- } from 'react-native';
5
+ import { Pressable, View, Text, ScrollView, VirtualizedList, FlatList, SectionList, ViewStyle } from 'react-native';
15
6
  import { UIIcon } from '@gluestack-ui/core/icon/creator';
16
7
  import { tva } from '@gluestack-ui/utils/nativewind-utils';
17
8
  import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
18
9
  import { withStyleContext } from '@gluestack-ui/utils/nativewind-utils';
19
10
  import { cssInterop } from 'nativewind';
20
- import {
21
- Motion,
22
- AnimatePresence,
23
- createMotionAnimatedComponent,
24
- MotionComponentProps,
25
- } from '@legendapp/motion';
11
+ import { Motion, AnimatePresence, createMotionAnimatedComponent, MotionComponentProps } from '@legendapp/motion';
26
12
 
27
13
  import React from 'react';
28
14
 
29
15
  type IAnimatedPressableProps = React.ComponentProps<typeof Pressable> &
30
16
  MotionComponentProps<typeof Pressable, ViewStyle, unknown, unknown, unknown>;
31
17
 
32
- const AnimatedPressable = createMotionAnimatedComponent(
33
- Pressable
34
- ) as React.ComponentType<IAnimatedPressableProps>;
18
+ const AnimatedPressable = createMotionAnimatedComponent(Pressable) as React.ComponentType<IAnimatedPressableProps>;
35
19
 
36
20
  type IMotionViewProps = React.ComponentProps<typeof View> &
37
21
  MotionComponentProps<typeof View, ViewStyle, unknown, unknown, unknown>;
@@ -124,11 +108,11 @@ const actionsheetItemTextStyle = tva({
124
108
  },
125
109
  size: {
126
110
  '2xs': 'text-2xs',
127
- 'xs': 'text-xs',
128
- 'sm': 'text-sm',
129
- 'md': 'text-base',
130
- 'lg': 'text-lg',
131
- 'xl': 'text-xl',
111
+ xs: 'text-xs',
112
+ sm: 'text-sm',
113
+ md: 'text-base',
114
+ lg: 'text-lg',
115
+ xl: 'text-xl',
132
116
  '2xl': 'text-2xl',
133
117
  '3xl': 'text-3xl',
134
118
  '4xl': 'text-4xl',
@@ -189,11 +173,11 @@ const actionsheetSectionHeaderTextStyle = tva({
189
173
  '4xl': 'text-4xl',
190
174
  '3xl': 'text-3xl',
191
175
  '2xl': 'text-2xl',
192
- 'xl': 'text-xl',
193
- 'lg': 'text-lg',
194
- 'md': 'text-base',
195
- 'sm': 'text-sm',
196
- 'xs': 'text-xs',
176
+ xl: 'text-xl',
177
+ lg: 'text-lg',
178
+ md: 'text-base',
179
+ sm: 'text-sm',
180
+ xs: 'text-xs',
197
181
  },
198
182
 
199
183
  sub: {
@@ -216,11 +200,11 @@ const actionsheetIconStyle = tva({
216
200
  variants: {
217
201
  size: {
218
202
  '2xs': 'h-3 w-3',
219
- 'xs': 'h-3.5 w-3.5',
220
- 'sm': 'h-4 w-4',
221
- 'md': 'w-4 h-4',
222
- 'lg': 'h-5 w-5',
223
- 'xl': 'h-6 w-6',
203
+ xs: 'h-3.5 w-3.5',
204
+ sm: 'h-4 w-4',
205
+ md: 'w-4 h-4',
206
+ lg: 'h-5 w-5',
207
+ xl: 'h-6 w-6',
224
208
  },
225
209
  },
226
210
  });
@@ -237,16 +221,12 @@ type IActionsheetItemProps = VariantProps<typeof actionsheetItemStyle> &
237
221
  type IActionsheetItemTextProps = VariantProps<typeof actionsheetItemTextStyle> &
238
222
  React.ComponentProps<typeof UIActionsheet.ItemText> & { className?: string };
239
223
 
240
- type IActionsheetDragIndicatorProps = VariantProps<
241
- typeof actionsheetDragIndicatorStyle
242
- > &
224
+ type IActionsheetDragIndicatorProps = VariantProps<typeof actionsheetDragIndicatorStyle> &
243
225
  React.ComponentProps<typeof UIActionsheet.DragIndicator> & {
244
226
  className?: string;
245
227
  };
246
228
 
247
- type IActionsheetDragIndicatorWrapperProps = VariantProps<
248
- typeof actionsheetDragIndicatorWrapperStyle
249
- > &
229
+ type IActionsheetDragIndicatorWrapperProps = VariantProps<typeof actionsheetDragIndicatorWrapperStyle> &
250
230
  React.ComponentProps<typeof UIActionsheet.DragIndicatorWrapper> & {
251
231
  className?: string;
252
232
  };
@@ -256,16 +236,12 @@ type IActionsheetBackdropProps = VariantProps<typeof actionsheetBackdropStyle> &
256
236
  className?: string;
257
237
  };
258
238
 
259
- type IActionsheetScrollViewProps = VariantProps<
260
- typeof actionsheetScrollViewStyle
261
- > &
239
+ type IActionsheetScrollViewProps = VariantProps<typeof actionsheetScrollViewStyle> &
262
240
  React.ComponentProps<typeof UIActionsheet.ScrollView> & {
263
241
  className?: string;
264
242
  };
265
243
 
266
- type IActionsheetVirtualizedListProps = VariantProps<
267
- typeof actionsheetVirtualizedListStyle
268
- > &
244
+ type IActionsheetVirtualizedListProps = VariantProps<typeof actionsheetVirtualizedListStyle> &
269
245
  React.ComponentProps<typeof UIActionsheet.VirtualizedList> & {
270
246
  className?: string;
271
247
  };
@@ -275,16 +251,12 @@ type IActionsheetFlatListProps = VariantProps<typeof actionsheetFlatListStyle> &
275
251
  className?: string;
276
252
  };
277
253
 
278
- type IActionsheetSectionListProps = VariantProps<
279
- typeof actionsheetSectionListStyle
280
- > &
254
+ type IActionsheetSectionListProps = VariantProps<typeof actionsheetSectionListStyle> &
281
255
  React.ComponentProps<typeof UIActionsheet.SectionList> & {
282
256
  className?: string;
283
257
  };
284
258
 
285
- type IActionsheetSectionHeaderTextProps = VariantProps<
286
- typeof actionsheetSectionHeaderTextStyle
287
- > &
259
+ type IActionsheetSectionHeaderTextProps = VariantProps<typeof actionsheetSectionHeaderTextStyle> &
288
260
  React.ComponentProps<typeof UIActionsheet.SectionHeaderText> & {
289
261
  className?: string;
290
262
  };
@@ -295,10 +267,10 @@ type IActionsheetIconProps = VariantProps<typeof actionsheetIconStyle> &
295
267
  as?: React.ElementType;
296
268
  };
297
269
 
298
- const Actionsheet = React.forwardRef<
299
- React.ComponentRef<typeof UIActionsheet>,
300
- IActionsheetProps
301
- >(function Actionsheet({ className, ...props }, ref) {
270
+ const Actionsheet = React.forwardRef<React.ComponentRef<typeof UIActionsheet>, IActionsheetProps>(function Actionsheet(
271
+ { className, ...props },
272
+ ref,
273
+ ) {
302
274
  return (
303
275
  <UIActionsheet
304
276
  className={actionsheetStyle({
@@ -325,28 +297,24 @@ const ActionsheetContent = React.forwardRef<
325
297
  );
326
298
  });
327
299
 
328
- const ActionsheetItem = React.forwardRef<
329
- React.ComponentRef<typeof UIActionsheet.Item>,
330
- IActionsheetItemProps
331
- >(function ActionsheetItem({ className, ...props }, ref) {
332
- return (
333
- <UIActionsheet.Item
334
- className={actionsheetItemStyle({
335
- class: className,
336
- })}
337
- ref={ref}
338
- {...props}
339
- />
340
- );
341
- });
300
+ const ActionsheetItem = React.forwardRef<React.ComponentRef<typeof UIActionsheet.Item>, IActionsheetItemProps>(
301
+ function ActionsheetItem({ className, ...props }, ref) {
302
+ return (
303
+ <UIActionsheet.Item
304
+ className={actionsheetItemStyle({
305
+ class: className,
306
+ })}
307
+ ref={ref}
308
+ {...props}
309
+ />
310
+ );
311
+ },
312
+ );
342
313
 
343
314
  const ActionsheetItemText = React.forwardRef<
344
315
  React.ComponentRef<typeof UIActionsheet.ItemText>,
345
316
  IActionsheetItemTextProps
346
- >(function ActionsheetItemText(
347
- { className, isTruncated, bold, underline, strikeThrough, size, ...props },
348
- ref
349
- ) {
317
+ >(function ActionsheetItemText({ className, isTruncated, bold, underline, strikeThrough, size, ...props }, ref) {
350
318
  return (
351
319
  <UIActionsheet.ItemText
352
320
  className={actionsheetItemTextStyle({
@@ -481,19 +449,8 @@ const ActionsheetSectionHeaderText = React.forwardRef<
481
449
  React.ComponentRef<typeof UIActionsheet.SectionHeaderText>,
482
450
  IActionsheetSectionHeaderTextProps
483
451
  >(function ActionsheetSectionHeaderText(
484
- {
485
- className,
486
- isTruncated,
487
- bold,
488
- underline,
489
- strikeThrough,
490
- size,
491
- sub,
492
- italic,
493
- highlight,
494
- ...props
495
- },
496
- ref
452
+ { className, isTruncated, bold, underline, strikeThrough, size, sub, italic, highlight, ...props },
453
+ ref,
497
454
  ) {
498
455
  return (
499
456
  <UIActionsheet.SectionHeaderText
@@ -514,16 +471,22 @@ const ActionsheetSectionHeaderText = React.forwardRef<
514
471
  );
515
472
  });
516
473
 
517
- const ActionsheetIcon = React.forwardRef<
518
- React.ComponentRef<typeof UIActionsheet.Icon>,
519
- IActionsheetIconProps
520
- >(function ActionsheetIcon(
521
- { className, as: AsComp, size = 'sm', ...props },
522
- ref
523
- ) {
524
- if (AsComp) {
474
+ const ActionsheetIcon = React.forwardRef<React.ComponentRef<typeof UIActionsheet.Icon>, IActionsheetIconProps>(
475
+ function ActionsheetIcon({ className, as: AsComp, size = 'sm', ...props }, ref) {
476
+ if (AsComp) {
477
+ return (
478
+ <AsComp
479
+ className={actionsheetIconStyle({
480
+ class: className,
481
+ size,
482
+ })}
483
+ ref={ref}
484
+ {...props}
485
+ />
486
+ );
487
+ }
525
488
  return (
526
- <AsComp
489
+ <UIActionsheet.Icon
527
490
  className={actionsheetIconStyle({
528
491
  class: className,
529
492
  size,
@@ -532,18 +495,8 @@ const ActionsheetIcon = React.forwardRef<
532
495
  {...props}
533
496
  />
534
497
  );
535
- }
536
- return (
537
- <UIActionsheet.Icon
538
- className={actionsheetIconStyle({
539
- class: className,
540
- size,
541
- })}
542
- ref={ref}
543
- {...props}
544
- />
545
- );
546
- });
498
+ },
499
+ );
547
500
 
548
501
  export {
549
502
  Actionsheet,
@@ -17,51 +17,30 @@ type ISkeletonTextProps = React.ComponentProps<typeof View> &
17
17
  startColor?: string;
18
18
  };
19
19
 
20
- const Skeleton = forwardRef<React.ComponentRef<typeof View>, ISkeletonProps>(
21
- function Skeleton(
22
- {
23
- className,
24
- variant,
25
- children,
26
- startColor = 'bg-accent',
27
- isLoaded = false,
28
- speed = 4,
29
- ...props
30
- },
31
- ref
32
- ) {
33
- if (!isLoaded) {
34
- return (
35
- <View
36
- className={`animate-pulse ${startColor} ${skeletonStyle({
37
- variant,
38
- speed: speed as 1 | 2 | 3 | 4,
39
- class: className,
40
- })}`}
41
- {...props}
42
- ref={ref}
43
- />
44
- );
45
- } else {
46
- return children;
47
- }
20
+ const Skeleton = forwardRef<React.ComponentRef<typeof View>, ISkeletonProps>(function Skeleton(
21
+ { className, variant, children, startColor = 'bg-accent', isLoaded = false, speed = 4, ...props },
22
+ ref,
23
+ ) {
24
+ if (!isLoaded) {
25
+ return (
26
+ <View
27
+ className={`animate-pulse ${startColor} ${skeletonStyle({
28
+ variant,
29
+ speed: speed as 1 | 2 | 3 | 4,
30
+ class: className,
31
+ })}`}
32
+ {...props}
33
+ ref={ref}
34
+ />
35
+ );
36
+ } else {
37
+ return children;
48
38
  }
49
- );
39
+ });
50
40
 
51
- const SkeletonText = forwardRef<
52
- React.ComponentRef<typeof View>,
53
- ISkeletonTextProps
54
- >(function SkeletonText(
55
- {
56
- className,
57
- _lines,
58
- isLoaded = false,
59
- startColor = 'bg-accent',
60
- gap = 2,
61
- children,
62
- ...props
63
- },
64
- ref
41
+ const SkeletonText = forwardRef<React.ComponentRef<typeof View>, ISkeletonTextProps>(function SkeletonText(
42
+ { className, _lines, isLoaded = false, startColor = 'bg-accent', gap = 2, children, ...props },
43
+ ref,
65
44
  ) {
66
45
  if (!isLoaded) {
67
46
  if (_lines) {