@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.
- package/CHANGELOG.md +6 -0
- 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/config.ts +69 -2
- package/components/ui/gluestack-ui-provider/index.tsx +32 -12
- package/components/ui/gluestack-ui-provider/index.web.tsx +43 -16
- package/components/ui/gluestack-ui-provider/script.ts +13 -8
- package/components/ui/gluestack-ui-provider/theme-context.ts +36 -1
- package/components/ui/gluestack-ui-provider/useGluestackColors.ts +11 -4
- 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/canonical.index.txt +15 -1
- package/design/manifest.xml +2 -0
- package/design/schema.xsd +11 -0
- package/design/themes.xml +175 -2
- package/design/tools/design.js +15 -12
- package/design/tools/npm.js +4 -3
- package/design/tools/sources/.generate/config.py +60 -2
- package/dist/{chunk-RPLDFHEZ.mjs → chunk-2R66P5X5.mjs} +1907 -3130
- package/dist/chunk-2R66P5X5.mjs.map +1 -0
- package/dist/{chunk-JVHJUIXV.js → chunk-LCTFQJZM.js} +1909 -3129
- package/dist/chunk-LCTFQJZM.js.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +303 -291
- package/dist/index.mjs +1 -1
- package/dist/ui/index.d.mts +44 -3
- package/dist/ui/index.d.ts +44 -3
- package/dist/ui/index.js +303 -291
- package/dist/ui/index.mjs +1 -1
- package/package.json +12 -7
- package/dist/chunk-JVHJUIXV.js.map +0 -1
- 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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
72
|
-
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
67
|
+
b330516c315d00effb781f75e1229580352989b12c7131a1b6265869e3b5a9f1
|
package/design/manifest.xml
CHANGED
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">
|