@flipova/foundation 2.2.1 → 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 (109) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +157 -156
  3. package/components/ui/accordion/ANIMATION_CUSTOMIZATION.md +16 -7
  4. package/components/ui/accordion/AccordionAnimatedHeight.tsx +3 -15
  5. package/components/ui/accordion/AccordionAnimatedIcon.tsx +2 -9
  6. package/components/ui/accordion/AnimatedHeight.tsx +3 -15
  7. package/components/ui/accordion/AnimatedIcon.tsx +2 -9
  8. package/components/ui/accordion/MIGRATION_SUMMARY.md +22 -11
  9. package/components/ui/accordion/USAGE_EXAMPLE.tsx +10 -25
  10. package/components/ui/accordion/index.tsx +71 -139
  11. package/components/ui/actionsheet/index.tsx +63 -105
  12. package/components/ui/alert/index.tsx +20 -50
  13. package/components/ui/alert-dialog/index.tsx +23 -48
  14. package/components/ui/avatar/index.tsx +32 -68
  15. package/components/ui/badge/index.tsx +18 -49
  16. package/components/ui/bottomsheet/index.tsx +20 -52
  17. package/components/ui/box/index.tsx +4 -9
  18. package/components/ui/box/index.web.tsx +3 -9
  19. package/components/ui/button/index.tsx +73 -109
  20. package/components/ui/calendar/creator.tsx +69 -30
  21. package/components/ui/calendar/index.tsx +81 -159
  22. package/components/ui/calendar/styles.tsx +10 -10
  23. package/components/ui/card/index.tsx +8 -9
  24. package/components/ui/card/index.web.tsx +4 -10
  25. package/components/ui/center/index.tsx +6 -11
  26. package/components/ui/center/index.web.tsx +3 -9
  27. package/components/ui/checkbox/index.tsx +46 -107
  28. package/components/ui/date-time-picker/creator.tsx +14 -1
  29. package/components/ui/date-time-picker/index.tsx +107 -156
  30. package/components/ui/date-time-picker/index.web.tsx +11 -33
  31. package/components/ui/date-time-picker/styles.tsx +5 -5
  32. package/components/ui/divider/index.tsx +5 -6
  33. package/components/ui/drawer/index.tsx +108 -128
  34. package/components/ui/fab/index.tsx +25 -68
  35. package/components/ui/flat-list/index.tsx +11 -8
  36. package/components/ui/form-control/index.tsx +49 -90
  37. package/components/ui/gluestack-ui-provider/config.ts +69 -2
  38. package/components/ui/gluestack-ui-provider/index.tsx +32 -12
  39. package/components/ui/gluestack-ui-provider/index.web.tsx +43 -16
  40. package/components/ui/gluestack-ui-provider/script.ts +13 -8
  41. package/components/ui/gluestack-ui-provider/theme-context.ts +36 -1
  42. package/components/ui/gluestack-ui-provider/useGluestackColors.ts +11 -4
  43. package/components/ui/grid/index.tsx +128 -165
  44. package/components/ui/grid/index.web.tsx +17 -19
  45. package/components/ui/grid/styles.tsx +1 -3
  46. package/components/ui/heading/index.tsx +146 -169
  47. package/components/ui/heading/index.web.tsx +7 -28
  48. package/components/ui/heading/styles.tsx +5 -5
  49. package/components/ui/hstack/index.tsx +16 -15
  50. package/components/ui/hstack/index.web.tsx +17 -17
  51. package/components/ui/hstack/styles.tsx +5 -5
  52. package/components/ui/icon/index.tsx +95 -486
  53. package/components/ui/icon/index.web.tsx +79 -439
  54. package/components/ui/image/index.tsx +13 -18
  55. package/components/ui/image-viewer/index.tsx +149 -221
  56. package/components/ui/image-viewer/index.web.tsx +88 -113
  57. package/components/ui/input/index.tsx +20 -33
  58. package/components/ui/link/index.tsx +16 -22
  59. package/components/ui/liquid-glass/index.tsx +19 -25
  60. package/components/ui/menu/index.tsx +44 -66
  61. package/components/ui/modal/index.tsx +70 -91
  62. package/components/ui/popover/index.tsx +102 -121
  63. package/components/ui/portal/index.tsx +5 -6
  64. package/components/ui/pressable/index.tsx +5 -9
  65. package/components/ui/progress/index.tsx +4 -11
  66. package/components/ui/radio/index.tsx +47 -83
  67. package/components/ui/select/index.tsx +38 -59
  68. package/components/ui/select/select-actionsheet.tsx +61 -108
  69. package/components/ui/skeleton/index.tsx +22 -43
  70. package/components/ui/skeleton/index.web.tsx +63 -75
  71. package/components/ui/slider/index.tsx +36 -56
  72. package/components/ui/spinner/index.tsx +1 -10
  73. package/components/ui/switch/index.tsx +6 -13
  74. package/components/ui/table/index.tsx +39 -102
  75. package/components/ui/table/index.web.tsx +41 -79
  76. package/components/ui/tabs/TabsAnimatedIndicator.tsx +10 -38
  77. package/components/ui/tabs/creator.tsx +32 -24
  78. package/components/ui/tabs/index.tsx +253 -309
  79. package/components/ui/text/index.tsx +23 -37
  80. package/components/ui/text/index.web.tsx +33 -35
  81. package/components/ui/text/styles.tsx +5 -5
  82. package/components/ui/textarea/index.tsx +24 -38
  83. package/components/ui/toast/index.tsx +47 -52
  84. package/components/ui/tooltip/index.tsx +12 -28
  85. package/components/ui/vstack/index.tsx +17 -17
  86. package/components/ui/vstack/index.web.tsx +17 -17
  87. package/components/ui/vstack/styles.tsx +5 -5
  88. package/design/canonical.index.txt +15 -1
  89. package/design/manifest.xml +2 -0
  90. package/design/schema.xsd +11 -0
  91. package/design/themes.xml +175 -2
  92. package/design/tools/design.js +15 -12
  93. package/design/tools/npm.js +4 -3
  94. package/design/tools/sources/.generate/config.py +60 -2
  95. package/dist/{chunk-RPLDFHEZ.mjs → chunk-2R66P5X5.mjs} +1907 -3130
  96. package/dist/chunk-2R66P5X5.mjs.map +1 -0
  97. package/dist/{chunk-JVHJUIXV.js → chunk-LCTFQJZM.js} +1909 -3129
  98. package/dist/chunk-LCTFQJZM.js.map +1 -0
  99. package/dist/index.d.mts +1 -1
  100. package/dist/index.d.ts +1 -1
  101. package/dist/index.js +303 -291
  102. package/dist/index.mjs +1 -1
  103. package/dist/ui/index.d.mts +44 -3
  104. package/dist/ui/index.d.ts +44 -3
  105. package/dist/ui/index.js +303 -291
  106. package/dist/ui/index.mjs +1 -1
  107. package/package.json +12 -7
  108. package/dist/chunk-JVHJUIXV.js.map +0 -1
  109. package/dist/chunk-RPLDFHEZ.mjs.map +0 -1
@@ -4,44 +4,30 @@ import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
4
4
  import { Text as RNText } from 'react-native';
5
5
  import { textStyle } from './styles';
6
6
 
7
- type ITextProps = React.ComponentProps<typeof RNText> &
8
- VariantProps<typeof textStyle>;
7
+ type ITextProps = React.ComponentProps<typeof RNText> & VariantProps<typeof textStyle>;
9
8
 
10
- const Text = React.forwardRef<React.ComponentRef<typeof RNText>, ITextProps>(
11
- function Text(
12
- {
13
- className,
14
- isTruncated,
15
- bold,
16
- underline,
17
- strikeThrough,
18
- size = 'md',
19
- sub,
20
- italic,
21
- highlight,
22
- ...props
23
- },
24
- ref
25
- ) {
26
- return (
27
- <RNText
28
- className={textStyle({
29
- isTruncated: isTruncated as boolean,
30
- bold: bold as boolean,
31
- underline: underline as boolean,
32
- strikeThrough: strikeThrough as boolean,
33
- size,
34
- sub: sub as boolean,
35
- italic: italic as boolean,
36
- highlight: highlight as boolean,
37
- class: className,
38
- })}
39
- {...props}
40
- ref={ref}
41
- />
42
- );
43
- }
44
- );
9
+ const Text = React.forwardRef<React.ComponentRef<typeof RNText>, ITextProps>(function Text(
10
+ { className, isTruncated, bold, underline, strikeThrough, size = 'md', sub, italic, highlight, ...props },
11
+ ref,
12
+ ) {
13
+ return (
14
+ <RNText
15
+ className={textStyle({
16
+ isTruncated: isTruncated as boolean,
17
+ bold: bold as boolean,
18
+ underline: underline as boolean,
19
+ strikeThrough: strikeThrough as boolean,
20
+ size,
21
+ sub: sub as boolean,
22
+ italic: italic as boolean,
23
+ highlight: highlight as boolean,
24
+ class: className,
25
+ })}
26
+ {...props}
27
+ ref={ref}
28
+ />
29
+ );
30
+ });
45
31
 
46
32
  Text.displayName = 'Text';
47
33
 
@@ -4,41 +4,39 @@ import { textStyle } from './styles';
4
4
 
5
5
  type ITextProps = React.ComponentProps<'span'> & VariantProps<typeof textStyle>;
6
6
 
7
- const Text = React.forwardRef<React.ComponentRef<'span'>, ITextProps>(
8
- function Text(
9
- {
10
- className,
11
- isTruncated,
12
- bold,
13
- underline,
14
- strikeThrough,
15
- size = 'md',
16
- sub,
17
- italic,
18
- highlight,
19
- ...props
20
- }: { className?: string } & ITextProps,
21
- ref
22
- ) {
23
- return (
24
- <span
25
- className={textStyle({
26
- isTruncated: isTruncated as boolean,
27
- bold: bold as boolean,
28
- underline: underline as boolean,
29
- strikeThrough: strikeThrough as boolean,
30
- size,
31
- sub: sub as boolean,
32
- italic: italic as boolean,
33
- highlight: highlight as boolean,
34
- class: className,
35
- })}
36
- {...props}
37
- ref={ref}
38
- />
39
- );
40
- }
41
- );
7
+ const Text = React.forwardRef<React.ComponentRef<'span'>, ITextProps>(function Text(
8
+ {
9
+ className,
10
+ isTruncated,
11
+ bold,
12
+ underline,
13
+ strikeThrough,
14
+ size = 'md',
15
+ sub,
16
+ italic,
17
+ highlight,
18
+ ...props
19
+ }: { className?: string } & ITextProps,
20
+ ref,
21
+ ) {
22
+ return (
23
+ <span
24
+ className={textStyle({
25
+ isTruncated: isTruncated as boolean,
26
+ bold: bold as boolean,
27
+ underline: underline as boolean,
28
+ strikeThrough: strikeThrough as boolean,
29
+ size,
30
+ sub: sub as boolean,
31
+ italic: italic as boolean,
32
+ highlight: highlight as boolean,
33
+ class: className,
34
+ })}
35
+ {...props}
36
+ ref={ref}
37
+ />
38
+ );
39
+ });
42
40
 
43
41
  Text.displayName = 'Text';
44
42
 
@@ -23,11 +23,11 @@ export const textStyle = tva({
23
23
  },
24
24
  size: {
25
25
  '2xs': 'text-2xs',
26
- 'xs': 'text-xs',
27
- 'sm': 'text-sm',
28
- 'md': 'text-base',
29
- 'lg': 'text-lg',
30
- 'xl': 'text-xl',
26
+ xs: 'text-xs',
27
+ sm: 'text-sm',
28
+ md: 'text-base',
29
+ lg: 'text-lg',
30
+ xl: 'text-xl',
31
31
  '2xl': 'text-2xl',
32
32
  '3xl': 'text-3xl',
33
33
  '4xl': 'text-4xl',
@@ -3,10 +3,7 @@ import React from 'react';
3
3
  import { createTextarea } from '@gluestack-ui/core/textarea/creator';
4
4
  import { View, TextInput } 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 type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
11
8
 
12
9
  const SCOPE = 'TEXTAREA';
@@ -44,49 +41,38 @@ const textareaInputStyle = tva({
44
41
  },
45
42
  });
46
43
 
47
- type ITextareaProps = React.ComponentProps<typeof UITextarea> &
48
- VariantProps<typeof textareaStyle>;
44
+ type ITextareaProps = React.ComponentProps<typeof UITextarea> & VariantProps<typeof textareaStyle>;
49
45
 
50
- const Textarea = React.forwardRef<
51
- React.ComponentRef<typeof UITextarea>,
52
- ITextareaProps
53
- >(function Textarea(
46
+ const Textarea = React.forwardRef<React.ComponentRef<typeof UITextarea>, ITextareaProps>(function Textarea(
54
47
  { className, variant = 'default', size = 'md', ...props },
55
- ref
48
+ ref,
56
49
  ) {
57
50
  return (
58
- <UITextarea
59
- ref={ref}
60
- {...props}
61
- className={textareaStyle({ variant, class: className })}
62
- context={{ size }}
63
- />
51
+ <UITextarea ref={ref} {...props} className={textareaStyle({ variant, class: className })} context={{ size }} />
64
52
  );
65
53
  });
66
54
 
67
- type ITextareaInputProps = React.ComponentProps<typeof UITextarea.Input> &
68
- VariantProps<typeof textareaInputStyle>;
55
+ type ITextareaInputProps = React.ComponentProps<typeof UITextarea.Input> & VariantProps<typeof textareaInputStyle>;
69
56
 
70
- const TextareaInput = React.forwardRef<
71
- React.ComponentRef<typeof UITextarea.Input>,
72
- ITextareaInputProps
73
- >(function TextareaInput({ className, ...props }, ref) {
74
- const { size: parentSize } = useStyleContext(SCOPE);
57
+ const TextareaInput = React.forwardRef<React.ComponentRef<typeof UITextarea.Input>, ITextareaInputProps>(
58
+ function TextareaInput({ className, ...props }, ref) {
59
+ const { size: parentSize } = useStyleContext(SCOPE);
75
60
 
76
- return (
77
- <UITextarea.Input
78
- ref={ref}
79
- {...props}
80
- textAlignVertical="top"
81
- className={textareaInputStyle({
82
- parentVariants: {
83
- size: parentSize,
84
- },
85
- class: className,
86
- })}
87
- />
88
- );
89
- });
61
+ return (
62
+ <UITextarea.Input
63
+ ref={ref}
64
+ {...props}
65
+ textAlignVertical="top"
66
+ className={textareaInputStyle({
67
+ parentVariants: {
68
+ size: parentSize,
69
+ },
70
+ class: className,
71
+ })}
72
+ />
73
+ );
74
+ },
75
+ );
90
76
 
91
77
  Textarea.displayName = 'Textarea';
92
78
  TextareaInput.displayName = 'TextareaInput';
@@ -45,11 +45,11 @@ const toastTitleStyle = tva({
45
45
  },
46
46
  size: {
47
47
  '2xs': 'text-2xs',
48
- 'xs': 'text-xs',
49
- 'sm': 'text-sm',
50
- 'md': 'text-base',
51
- 'lg': 'text-lg',
52
- 'xl': 'text-xl',
48
+ xs: 'text-xs',
49
+ sm: 'text-sm',
50
+ md: 'text-base',
51
+ lg: 'text-lg',
52
+ xl: 'text-xl',
53
53
  '2xl': 'text-2xl',
54
54
  '3xl': 'text-3xl',
55
55
  '4xl': 'text-4xl',
@@ -141,11 +141,11 @@ const toastDescriptionStyle = tva({
141
141
  },
142
142
  size: {
143
143
  '2xs': 'text-2xs',
144
- 'xs': 'text-xs',
145
- 'sm': 'text-sm',
146
- 'md': 'text-base',
147
- 'lg': 'text-lg',
148
- 'xl': 'text-xl',
144
+ xs: 'text-xs',
145
+ sm: 'text-sm',
146
+ md: 'text-base',
147
+ lg: 'text-lg',
148
+ xl: 'text-xl',
149
149
  '2xl': 'text-2xl',
150
150
  '3xl': 'text-3xl',
151
151
  '4xl': 'text-4xl',
@@ -166,33 +166,30 @@ type IToastProps = React.ComponentProps<typeof Root> & {
166
166
  className?: string;
167
167
  } & VariantProps<typeof toastStyle>;
168
168
 
169
- const Toast = React.forwardRef<React.ComponentRef<typeof Root>, IToastProps>(
170
- function Toast(
171
- { className, variant = 'solid', action = 'muted', ...props },
172
- ref
173
- ) {
174
- return (
175
- <Root
176
- ref={ref}
177
- entering={SlideInUp}
178
- className={toastStyle({ variant, action, class: className })}
179
- context={{ variant, action }}
180
- {...props}
181
- />
182
- );
183
- }
184
- );
169
+ const Toast = React.forwardRef<React.ComponentRef<typeof Root>, IToastProps>(function Toast(
170
+ { className, variant = 'solid', action = 'muted', ...props },
171
+ ref,
172
+ ) {
173
+ return (
174
+ <Root
175
+ ref={ref}
176
+ entering={SlideInUp}
177
+ className={toastStyle({ variant, action, class: className })}
178
+ context={{ variant, action }}
179
+ {...props}
180
+ />
181
+ );
182
+ });
185
183
 
186
184
  type IToastTitleProps = React.ComponentProps<typeof Text> & {
187
185
  className?: string;
188
186
  } & VariantProps<typeof toastTitleStyle>;
189
187
 
190
- const ToastTitle = React.forwardRef<
191
- React.ComponentRef<typeof Text>,
192
- IToastTitleProps
193
- >(function ToastTitle({ className, size = 'md', children, ...props }, ref) {
194
- const { variant: parentVariant, action: parentAction } =
195
- useStyleContext(SCOPE);
188
+ const ToastTitle = React.forwardRef<React.ComponentRef<typeof Text>, IToastTitleProps>(function ToastTitle(
189
+ { className, size = 'md', children, ...props },
190
+ ref,
191
+ ) {
192
+ const { variant: parentVariant, action: parentAction } = useStyleContext(SCOPE);
196
193
  React.useEffect(() => {
197
194
  // Issue from react-native side
198
195
  // Hack for now, will fix this later
@@ -224,29 +221,27 @@ type IToastDescriptionProps = React.ComponentProps<typeof Text> & {
224
221
  className?: string;
225
222
  } & VariantProps<typeof toastDescriptionStyle>;
226
223
 
227
- const ToastDescription = React.forwardRef<
228
- React.ComponentRef<typeof Text>,
229
- IToastDescriptionProps
230
- >(function ToastDescription({ className, size = 'md', ...props }, ref) {
231
- const { variant: parentVariant } = useStyleContext(SCOPE);
232
- return (
233
- <Text
234
- ref={ref}
235
- {...props}
236
- className={toastDescriptionStyle({
237
- size,
238
- class: className,
239
- parentVariants: {
240
- variant: parentVariant,
241
- },
242
- })}
243
- />
244
- );
245
- });
224
+ const ToastDescription = React.forwardRef<React.ComponentRef<typeof Text>, IToastDescriptionProps>(
225
+ function ToastDescription({ className, size = 'md', ...props }, ref) {
226
+ const { variant: parentVariant } = useStyleContext(SCOPE);
227
+ return (
228
+ <Text
229
+ ref={ref}
230
+ {...props}
231
+ className={toastDescriptionStyle({
232
+ size,
233
+ class: className,
234
+ parentVariants: {
235
+ variant: parentVariant,
236
+ },
237
+ })}
238
+ />
239
+ );
240
+ },
241
+ );
246
242
 
247
243
  Toast.displayName = 'Toast';
248
244
  ToastTitle.displayName = 'ToastTitle';
249
245
  ToastDescription.displayName = 'ToastDescription';
250
246
 
251
247
  export { Toast, ToastDescription, ToastTitle, useToast };
252
-
@@ -5,11 +5,7 @@ import { View, Text, ViewStyle } from 'react-native';
5
5
  import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
6
6
  import { tva } from '@gluestack-ui/utils/nativewind-utils';
7
7
  import { withStyleContext } from '@gluestack-ui/utils/nativewind-utils';
8
- import {
9
- Motion,
10
- AnimatePresence,
11
- MotionComponentProps,
12
- } from '@legendapp/motion';
8
+ import { Motion, AnimatePresence, MotionComponentProps } from '@legendapp/motion';
13
9
  import { cssInterop } from 'nativewind';
14
10
 
15
11
  type IMotionViewProps = React.ComponentProps<typeof View> &
@@ -52,11 +48,11 @@ const tooltipTextStyle = tva({
52
48
  },
53
49
  size: {
54
50
  '2xs': 'text-2xs',
55
- 'xs': 'text-xs',
56
- 'sm': 'text-sm',
57
- 'md': 'text-base',
58
- 'lg': 'text-lg',
59
- 'xl': 'text-xl',
51
+ xs: 'text-xs',
52
+ sm: 'text-sm',
53
+ md: 'text-base',
54
+ lg: 'text-lg',
55
+ xl: 'text-xl',
60
56
  '2xl': 'text-2xl',
61
57
  '3xl': 'text-3xl',
62
58
  '4xl': 'text-4xl',
@@ -82,17 +78,11 @@ type ITooltipContentProps = React.ComponentProps<typeof UITooltip.Content> &
82
78
  type ITooltipTextProps = React.ComponentProps<typeof UITooltip.Text> &
83
79
  VariantProps<typeof tooltipTextStyle> & { className?: string };
84
80
 
85
- const Tooltip = React.forwardRef<
86
- React.ComponentRef<typeof UITooltip>,
87
- ITooltipProps
88
- >(function Tooltip({ className, ...props }, ref) {
89
- return (
90
- <UITooltip
91
- ref={ref}
92
- className={tooltipStyle({ class: className })}
93
- {...props}
94
- />
95
- );
81
+ const Tooltip = React.forwardRef<React.ComponentRef<typeof UITooltip>, ITooltipProps>(function Tooltip(
82
+ { className, ...props },
83
+ ref,
84
+ ) {
85
+ return <UITooltip ref={ref} className={tooltipStyle({ class: className })} {...props} />;
96
86
  });
97
87
 
98
88
  const TooltipContent = React.forwardRef<
@@ -115,13 +105,7 @@ const TooltipText = React.forwardRef<
115
105
  React.ComponentRef<typeof UITooltip.Text>,
116
106
  ITooltipTextProps & { className?: string }
117
107
  >(function TooltipText({ size, className, ...props }, ref) {
118
- return (
119
- <UITooltip.Text
120
- ref={ref}
121
- className={tooltipTextStyle({ size, class: className })}
122
- {...props}
123
- />
124
- );
108
+ return <UITooltip.Text ref={ref} className={tooltipTextStyle({ size, class: className })} {...props} />;
125
109
  });
126
110
 
127
111
  Tooltip.displayName = 'Tooltip';
@@ -4,24 +4,24 @@ import { View } from 'react-native';
4
4
 
5
5
  import { vstackStyle } from './styles';
6
6
 
7
- type IVStackProps = React.ComponentProps<typeof View> &
8
- VariantProps<typeof vstackStyle>;
7
+ type IVStackProps = React.ComponentProps<typeof View> & VariantProps<typeof vstackStyle>;
9
8
 
10
- const VStack = React.forwardRef<React.ComponentRef<typeof View>, IVStackProps>(
11
- function VStack({ className, space, reversed, ...props }, ref) {
12
- return (
13
- <View
14
- className={vstackStyle({
15
- space,
16
- reversed: reversed as boolean,
17
- class: className,
18
- })}
19
- {...props}
20
- ref={ref}
21
- />
22
- );
23
- }
24
- );
9
+ const VStack = React.forwardRef<React.ComponentRef<typeof View>, IVStackProps>(function VStack(
10
+ { className, space, reversed, ...props },
11
+ ref,
12
+ ) {
13
+ return (
14
+ <View
15
+ className={vstackStyle({
16
+ space,
17
+ reversed: reversed as boolean,
18
+ class: className,
19
+ })}
20
+ {...props}
21
+ ref={ref}
22
+ />
23
+ );
24
+ });
25
25
 
26
26
  VStack.displayName = 'VStack';
27
27
 
@@ -3,24 +3,24 @@ import type { VariantProps } from '@gluestack-ui/utils/nativewind-utils';
3
3
 
4
4
  import { vstackStyle } from './styles';
5
5
 
6
- type IVStackProps = React.ComponentProps<'div'> &
7
- VariantProps<typeof vstackStyle>;
6
+ type IVStackProps = React.ComponentProps<'div'> & VariantProps<typeof vstackStyle>;
8
7
 
9
- const VStack = React.forwardRef<React.ComponentRef<'div'>, IVStackProps>(
10
- function VStack({ className, space, reversed, ...props }, ref) {
11
- return (
12
- <div
13
- className={vstackStyle({
14
- space,
15
- reversed: reversed as boolean,
16
- class: className,
17
- })}
18
- {...props}
19
- ref={ref}
20
- />
21
- );
22
- }
23
- );
8
+ const VStack = React.forwardRef<React.ComponentRef<'div'>, IVStackProps>(function VStack(
9
+ { className, space, reversed, ...props },
10
+ ref,
11
+ ) {
12
+ return (
13
+ <div
14
+ className={vstackStyle({
15
+ space,
16
+ reversed: reversed as boolean,
17
+ class: className,
18
+ })}
19
+ {...props}
20
+ ref={ref}
21
+ />
22
+ );
23
+ });
24
24
 
25
25
  VStack.displayName = 'VStack';
26
26
 
@@ -9,11 +9,11 @@ export const vstackStyle = tva({
9
9
  base: `flex-col ${baseStyle}`,
10
10
  variants: {
11
11
  space: {
12
- 'xs': 'gap-1',
13
- 'sm': 'gap-2',
14
- 'md': 'gap-3',
15
- 'lg': 'gap-4',
16
- 'xl': 'gap-5',
12
+ xs: 'gap-1',
13
+ sm: 'gap-2',
14
+ md: 'gap-3',
15
+ lg: 'gap-4',
16
+ xl: 'gap-5',
17
17
  '2xl': 'gap-6',
18
18
  '3xl': 'gap-7',
19
19
  '4xl': 'gap-8',
@@ -5,6 +5,8 @@
5
5
  # entries (register/id) — canonical sort by (register, id)
6
6
  themes/dark
7
7
  themes/light
8
+ themes/spring-dark
9
+ themes/spring-light
8
10
  tokens/breakpoints
9
11
  tokens/color
10
12
  tokens/duration
@@ -22,6 +24,7 @@ tokens/zIndex
22
24
 
23
25
  ## references (resolved, never dangling)
24
26
  $ref.tokens.color.black -> #000000
27
+ $ref.tokens.color.error.400 -> #F87171
25
28
  $ref.tokens.color.error.500 -> #EF4444
26
29
  $ref.tokens.color.error.600 -> #DC2626
27
30
  $ref.tokens.color.gray.50 -> #FAFAFA
@@ -32,6 +35,7 @@ $ref.tokens.color.gray.600 -> #52525B
32
35
  $ref.tokens.color.gray.700 -> #3F3F46
33
36
  $ref.tokens.color.gray.800 -> #27272A
34
37
  $ref.tokens.color.gray.900 -> #18181B
38
+ $ref.tokens.color.info.400 -> #38BDF8
35
39
  $ref.tokens.color.info.500 -> #0EA5E9
36
40
  $ref.tokens.color.info.600 -> #0284C7
37
41
  $ref.tokens.color.neutral.900 -> #262626
@@ -43,11 +47,21 @@ $ref.tokens.color.primary.600 -> #2563EB
43
47
  $ref.tokens.color.primary.900 -> #1E3A8A
44
48
  $ref.tokens.color.secondary.500 -> #64748B
45
49
  $ref.tokens.color.secondary.600 -> #475569
50
+ $ref.tokens.color.success.50 -> #F0FDF4
51
+ $ref.tokens.color.success.100 -> #DCFCE7
52
+ $ref.tokens.color.success.200 -> #BBF7D0
53
+ $ref.tokens.color.success.300 -> #86EFAC
54
+ $ref.tokens.color.success.400 -> #4ADE80
46
55
  $ref.tokens.color.success.500 -> #22C55E
47
56
  $ref.tokens.color.success.600 -> #16A34A
57
+ $ref.tokens.color.success.700 -> #15803D
58
+ $ref.tokens.color.success.800 -> #166534
59
+ $ref.tokens.color.success.900 -> #14532D
60
+ $ref.tokens.color.success.950 -> #052E16
61
+ $ref.tokens.color.warning.400 -> #FBBF24
48
62
  $ref.tokens.color.warning.500 -> #F59E0B
49
63
  $ref.tokens.color.warning.600 -> #D97706
50
64
  $ref.tokens.color.white -> #FFFFFF
51
65
 
52
66
  ## sha256
53
- a6278c2bf241fbb45ffa7e7ce58f8d9d362e08b536751fdac5e976cbe445842c
67
+ b330516c315d00effb781f75e1229580352989b12c7131a1b6265869e3b5a9f1
@@ -85,6 +85,8 @@
85
85
  <register name="themes">
86
86
  <item>light</item>
87
87
  <item>dark</item>
88
+ <item>spring-light</item>
89
+ <item>spring-dark</item>
88
90
  </register>
89
91
  </index>
90
92
  </foundationRegistry>
package/design/schema.xsd CHANGED
@@ -594,6 +594,17 @@
594
594
  <xs:documentation>Theme mode (e.g. "light", "dark").</xs:documentation>
595
595
  </xs:annotation>
596
596
  </xs:attribute>
597
+ <xs:attribute name="variant" type="xs:string" use="optional">
598
+ <xs:annotation>
599
+ <xs:documentation>
600
+ Variant this theme belongs to (e.g. "default", "spring"). A variant is a
601
+ coherent light/dark PAIR, so a themed product can offer several palettes
602
+ ("spring-light"/"spring-dark", "autumn-light"/"autumn-dark") that all
603
+ respond to the same light/dark mode. Defaults to "default" when absent,
604
+ which keeps the bare "light"/"dark" ids working unchanged.
605
+ </xs:documentation>
606
+ </xs:annotation>
607
+ </xs:attribute>
597
608
  </xs:complexType>
598
609
 
599
610
  <xs:complexType name="RoleMapType">