@admin-layout/gluestack-ui-mobile 11.0.4-alpha.0 → 12.0.16-alpha.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/CHANGELOG.md +60 -4
- package/lib/__tests__/prolayout-layout-feature.test.js +1 -1
- package/lib/__tests__/prolayout-layout-feature.test.js.map +1 -1
- package/lib/components/AuthWrapper.js +5 -3
- package/lib/components/AuthWrapper.js.map +1 -1
- package/lib/components/ErrorBounday.js.map +1 -1
- package/lib/components/NavigationComponent.js.map +1 -1
- package/lib/components/UnAuthenticatedComponent.js.map +1 -1
- package/lib/components/WithConfiguration.js +4 -4
- package/lib/components/WithConfiguration.js.map +1 -1
- package/lib/components/WithPermission.js +1 -1
- package/lib/components/WithPermission.js.map +1 -1
- package/lib/components/WithPolicy.js +2 -2
- package/lib/components/WithPolicy.js.map +1 -1
- package/lib/components/ui/accordion/index.web.d.ts +209 -0
- package/lib/components/ui/accordion/index.web.js +156 -0
- package/lib/components/ui/accordion/index.web.js.map +1 -0
- package/lib/components/ui/actionsheet/index.web.d.ts +872 -0
- package/lib/components/ui/actionsheet/index.web.js +286 -0
- package/lib/components/ui/actionsheet/index.web.js.map +1 -0
- package/lib/components/ui/alert/index.web.d.ts +135 -0
- package/lib/components/ui/alert/index.web.js +38 -0
- package/lib/components/ui/alert/index.web.js.map +1 -0
- package/lib/components/ui/alert-dialog/index.web.d.ts +64 -0
- package/lib/components/ui/alert-dialog/index.web.js +139 -0
- package/lib/components/ui/alert-dialog/index.web.js.map +1 -0
- package/lib/components/ui/avatar/index.web.d.ts +21 -0
- package/lib/components/ui/avatar/index.web.js +92 -0
- package/lib/components/ui/avatar/index.web.js.map +1 -0
- package/lib/components/ui/badge/index.web.d.ts +382 -0
- package/lib/components/ui/badge/index.web.js +138 -0
- package/lib/components/ui/badge/index.web.js.map +1 -0
- package/lib/components/ui/button/index.web.d.ts +247 -0
- package/lib/components/ui/button/index.web.js +57 -0
- package/lib/components/ui/button/index.web.js.map +1 -0
- package/lib/components/ui/checkbox/index.web.d.ts +265 -0
- package/lib/components/ui/checkbox/index.web.js +77 -0
- package/lib/components/ui/checkbox/index.web.js.map +1 -0
- package/lib/components/ui/divider/index.web.d.ts +53 -0
- package/lib/components/ui/divider/index.web.js +21 -0
- package/lib/components/ui/divider/index.web.js.map +1 -0
- package/lib/components/ui/drawer/index.web.d.ts +174 -0
- package/lib/components/ui/drawer/index.web.js +65 -0
- package/lib/components/ui/drawer/index.web.js.map +1 -0
- package/lib/components/ui/fab/index.web.d.ts +520 -0
- package/lib/components/ui/fab/index.web.js +146 -0
- package/lib/components/ui/fab/index.web.js.map +1 -0
- package/lib/components/ui/flat-list/index.web.d.ts +21 -0
- package/lib/components/ui/flat-list/index.web.js +41 -0
- package/lib/components/ui/flat-list/index.web.js.map +1 -0
- package/lib/components/ui/form-control/index.web.d.ts +2071 -0
- package/lib/components/ui/form-control/index.web.js +290 -0
- package/lib/components/ui/form-control/index.web.js.map +1 -0
- package/lib/components/ui/image/index.web.d.ts +142 -0
- package/lib/components/ui/image/index.web.js +29 -0
- package/lib/components/ui/image/index.web.js.map +1 -0
- package/lib/components/ui/image-background/index.web.d.ts +8 -0
- package/lib/components/ui/image-background/index.web.js +23 -0
- package/lib/components/ui/image-background/index.web.js.map +1 -0
- package/lib/components/ui/input/index.web.d.ts +163 -0
- package/lib/components/ui/input/index.web.js +50 -0
- package/lib/components/ui/input/index.web.js.map +1 -0
- package/lib/components/ui/input-accessory-view/index.web.d.ts +9 -0
- package/lib/components/ui/input-accessory-view/index.web.js +16 -0
- package/lib/components/ui/input-accessory-view/index.web.js.map +1 -0
- package/lib/components/ui/keyboard-avoiding-view/index.web.d.ts +9 -0
- package/lib/components/ui/keyboard-avoiding-view/index.web.js +8 -0
- package/lib/components/ui/keyboard-avoiding-view/index.web.js.map +1 -0
- package/lib/components/ui/link/index.web.d.ts +365 -0
- package/lib/components/ui/link/index.web.js +70 -0
- package/lib/components/ui/link/index.web.js.map +1 -0
- package/lib/components/ui/menu/index.web.d.ts +142 -0
- package/lib/components/ui/menu/index.web.js +83 -0
- package/lib/components/ui/menu/index.web.js.map +1 -0
- package/lib/components/ui/modal/index.web.d.ts +111 -0
- package/lib/components/ui/modal/index.web.js +58 -0
- package/lib/components/ui/modal/index.web.js.map +1 -0
- package/lib/components/ui/popover/index.web.d.ts +309 -0
- package/lib/components/ui/popover/index.web.js +184 -0
- package/lib/components/ui/popover/index.web.js.map +1 -0
- package/lib/components/ui/portal/index.web.d.ts +9 -0
- package/lib/components/ui/portal/index.web.js +16 -0
- package/lib/components/ui/portal/index.web.js.map +1 -0
- package/lib/components/ui/pressable/index.web.d.ts +8 -0
- package/lib/components/ui/pressable/index.web.js +44 -0
- package/lib/components/ui/pressable/index.web.js.map +1 -0
- package/lib/components/ui/progress/index.web.d.ts +237 -0
- package/lib/components/ui/progress/index.web.js +73 -0
- package/lib/components/ui/progress/index.web.js.map +1 -0
- package/lib/components/ui/radio/index.web.d.ts +224 -0
- package/lib/components/ui/radio/index.web.js +69 -0
- package/lib/components/ui/radio/index.web.js.map +1 -0
- package/lib/components/ui/refresh-control/index.web.d.ts +14 -0
- package/lib/components/ui/refresh-control/index.web.js +69 -0
- package/lib/components/ui/refresh-control/index.web.js.map +1 -0
- package/lib/components/ui/safe-area-view/index.web.d.ts +6 -0
- package/lib/components/ui/safe-area-view/index.web.js +10 -0
- package/lib/components/ui/safe-area-view/index.web.js.map +1 -0
- package/lib/components/ui/scroll-view/index.web.d.ts +44 -0
- package/lib/components/ui/scroll-view/index.web.js +41 -0
- package/lib/components/ui/scroll-view/index.web.js.map +1 -0
- package/lib/components/ui/section-list/index.web.d.ts +26 -0
- package/lib/components/ui/section-list/index.web.js +35 -0
- package/lib/components/ui/section-list/index.web.js.map +1 -0
- package/lib/components/ui/select/index.web.d.ts +162 -0
- package/lib/components/ui/select/index.web.js +51 -0
- package/lib/components/ui/select/index.web.js.map +1 -0
- package/lib/components/ui/slider/index.web.d.ts +223 -0
- package/lib/components/ui/slider/index.web.js +189 -0
- package/lib/components/ui/slider/index.web.js.map +1 -0
- package/lib/components/ui/spinner/index.web.d.ts +176 -0
- package/lib/components/ui/spinner/index.web.js +55 -0
- package/lib/components/ui/spinner/index.web.js.map +1 -0
- package/lib/components/ui/status-bar/index.web.d.ts +14 -0
- package/lib/components/ui/status-bar/index.web.js +7 -0
- package/lib/components/ui/status-bar/index.web.js.map +1 -0
- package/lib/components/ui/switch/index.web.d.ts +71 -0
- package/lib/components/ui/switch/index.web.js +27 -0
- package/lib/components/ui/switch/index.web.js.map +1 -0
- package/lib/components/ui/tabs/index.web.d.ts +351 -0
- package/lib/components/ui/tabs/index.web.js +120 -0
- package/lib/components/ui/tabs/index.web.js.map +1 -0
- package/lib/components/ui/textarea/index.web.d.ts +162 -0
- package/lib/components/ui/textarea/index.web.js +50 -0
- package/lib/components/ui/textarea/index.web.js.map +1 -0
- package/lib/components/ui/toast/index.web.d.ts +225 -0
- package/lib/components/ui/toast/index.web.js +80 -0
- package/lib/components/ui/toast/index.web.js.map +1 -0
- package/lib/components/ui/tooltip/index.web.d.ts +86 -0
- package/lib/components/ui/tooltip/index.web.js +110 -0
- package/lib/components/ui/tooltip/index.web.js.map +1 -0
- package/lib/components/ui/view/index.web.d.ts +2 -0
- package/lib/components/ui/view/index.web.js +7 -0
- package/lib/components/ui/view/index.web.js.map +1 -0
- package/lib/components/ui/virtualized-list/index.web.d.ts +19 -0
- package/lib/components/ui/virtualized-list/index.web.js +30 -0
- package/lib/components/ui/virtualized-list/index.web.js.map +1 -0
- package/lib/components/usePermissionAutoFetch.d.ts +7 -19
- package/lib/components/with-interactions-lifecycle-managed.js.map +1 -1
- package/lib/components/with-interactions-managed.js +2 -3
- package/lib/components/with-interactions-managed.js.map +1 -1
- package/lib/containers/layout/DrawerBottomNavigationConfig.d.ts +47 -47
- package/lib/containers/layout/DrawerConfig.d.ts +31 -31
- package/lib/containers/layout/module.js +1 -1
- package/lib/containers/layout/module.js.map +1 -1
- package/lib/interfaces/settings.d.ts +1 -0
- package/lib/redux/settings.d.ts +4 -9
- package/lib/utils/routeConfigKeyReplace.test.js +1 -1
- package/lib/utils/routeConfigKeyReplace.test.js.map +1 -1
- package/package.json +7 -4
- package/src/__tests__/prolayout-layout-feature.test.tsx +2 -2
- package/src/components/AuthWrapper.tsx +6 -3
- package/src/components/ErrorBounday.tsx +18 -19
- package/src/components/NavigationComponent.tsx +1 -1
- package/src/components/UnAuthenticatedComponent.tsx +1 -3
- package/src/components/WithConfiguration.tsx +5 -8
- package/src/components/WithPermission.tsx +1 -1
- package/src/components/WithPolicy.tsx +4 -3
- package/src/components/ui/accordion/index.web.tsx +294 -0
- package/src/components/ui/actionsheet/index.web.tsx +555 -0
- package/src/components/ui/alert/index.web.tsx +71 -0
- package/src/components/ui/alert-dialog/index.web.tsx +241 -0
- package/src/components/ui/avatar/index.web.tsx +150 -0
- package/src/components/ui/badge/index.web.tsx +188 -0
- package/src/components/ui/button/index.web.tsx +86 -0
- package/src/components/ui/checkbox/index.web.tsx +151 -0
- package/src/components/ui/divider/index.web.tsx +37 -0
- package/src/components/ui/drawer/index.web.tsx +144 -0
- package/src/components/ui/fab/index.web.tsx +201 -0
- package/src/components/ui/flat-list/index.web.tsx +89 -0
- package/src/components/ui/form-control/index.web.tsx +451 -0
- package/src/components/ui/image/index.web.tsx +43 -0
- package/src/components/ui/image-background/index.web.tsx +43 -0
- package/src/components/ui/input/index.web.tsx +80 -0
- package/src/components/ui/input-accessory-view/index.web.tsx +31 -0
- package/src/components/ui/keyboard-avoiding-view/index.web.tsx +23 -0
- package/src/components/ui/link/index.web.tsx +103 -0
- package/src/components/ui/menu/index.web.tsx +159 -0
- package/src/components/ui/modal/index.web.tsx +135 -0
- package/src/components/ui/popover/index.web.tsx +326 -0
- package/src/components/ui/portal/index.web.tsx +34 -0
- package/src/components/ui/pressable/index.web.tsx +73 -0
- package/src/components/ui/progress/index.web.tsx +123 -0
- package/src/components/ui/radio/index.web.tsx +130 -0
- package/src/components/ui/refresh-control/index.web.tsx +104 -0
- package/src/components/ui/safe-area-view/index.web.tsx +24 -0
- package/src/components/ui/scroll-view/index.web.tsx +142 -0
- package/src/components/ui/section-list/index.web.tsx +93 -0
- package/src/components/ui/select/index.web.tsx +83 -0
- package/src/components/ui/slider/index.web.tsx +283 -0
- package/src/components/ui/spinner/index.web.tsx +81 -0
- package/src/components/ui/status-bar/index.web.tsx +20 -0
- package/src/components/ui/switch/index.web.tsx +44 -0
- package/src/components/ui/tabs/index.web.tsx +205 -0
- package/src/components/ui/textarea/index.web.tsx +86 -0
- package/src/components/ui/toast/index.web.tsx +132 -0
- package/src/components/ui/tooltip/index.web.tsx +155 -0
- package/src/components/ui/view/index.web.tsx +15 -0
- package/src/components/ui/virtualized-list/index.web.tsx +84 -0
- package/src/components/with-interactions-lifecycle-managed.tsx +0 -4
- package/src/components/with-interactions-managed.tsx +3 -4
- package/src/containers/layout/module.ts +1 -1
- package/src/interfaces/settings.ts +1 -0
- package/src/utils/routeConfigKeyReplace.test.ts +4 -4
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { createAlertDialog } from '@gluestack-ui/alert-dialog';
|
|
4
|
+
import { tva } from '@gluestack-ui/nativewind-utils/tva';
|
|
5
|
+
import { withStyleContext, useStyleContext } from '@gluestack-ui/nativewind-utils/withStyleContext';
|
|
6
|
+
import { cssInterop } from 'nativewind';
|
|
7
|
+
import { Motion, AnimatePresence, createMotionAnimatedComponent } from '@legendapp/motion';
|
|
8
|
+
const SCOPE = 'ALERT_DIALOG';
|
|
9
|
+
const RootComponent = React.forwardRef((props, ref) => React.createElement("div", { ...props, ref: ref }));
|
|
10
|
+
const BodyComponent = React.forwardRef((props, ref) => React.createElement("div", { ...props, ref: ref }));
|
|
11
|
+
const ContentComponent = Motion.View;
|
|
12
|
+
const CloseButtonComponent = React.forwardRef((props, ref) => (React.createElement("button", { ...props, ref: ref })));
|
|
13
|
+
const HeaderComponent = React.forwardRef((props, ref) => React.createElement("div", { ...props, ref: ref }));
|
|
14
|
+
const FooterComponent = React.forwardRef((props, ref) => React.createElement("div", { ...props, ref: ref }));
|
|
15
|
+
const BackdropComponent = createMotionAnimatedComponent(React.forwardRef((props, ref) => React.createElement("div", { ...props, ref: ref })));
|
|
16
|
+
const UIAccessibleAlertDialog = createAlertDialog({
|
|
17
|
+
Root: withStyleContext(RootComponent, SCOPE),
|
|
18
|
+
Body: BodyComponent,
|
|
19
|
+
Content: ContentComponent,
|
|
20
|
+
CloseButton: CloseButtonComponent,
|
|
21
|
+
Header: HeaderComponent,
|
|
22
|
+
Footer: FooterComponent,
|
|
23
|
+
Backdrop: BackdropComponent,
|
|
24
|
+
AnimatePresence: AnimatePresence,
|
|
25
|
+
});
|
|
26
|
+
cssInterop(Motion.View, { className: 'style' });
|
|
27
|
+
cssInterop(BackdropComponent, { className: 'style' });
|
|
28
|
+
const alertDialogStyle = tva({
|
|
29
|
+
base: 'group/modal w-full h-full justify-center items-center pointer-events-none',
|
|
30
|
+
parentVariants: {
|
|
31
|
+
size: {
|
|
32
|
+
xs: '',
|
|
33
|
+
sm: '',
|
|
34
|
+
md: '',
|
|
35
|
+
lg: '',
|
|
36
|
+
full: '',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const alertDialogContentStyle = tva({
|
|
41
|
+
base: 'bg-background-0 rounded-lg overflow-hidden border border-outline-100 p-6',
|
|
42
|
+
parentVariants: {
|
|
43
|
+
size: {
|
|
44
|
+
xs: 'w-[60%] max-w-[360px]',
|
|
45
|
+
sm: 'w-[70%] max-w-[420px]',
|
|
46
|
+
md: 'w-[80%] max-w-[510px]',
|
|
47
|
+
lg: 'w-[90%] max-w-[640px]',
|
|
48
|
+
full: 'w-full',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
const alertDialogCloseButtonStyle = tva({
|
|
53
|
+
base: 'group/alert-dialog-close-button z-10 rounded-sm p-2 data-[focus-visible=true]:bg-background-100 cursor-pointer outline-0',
|
|
54
|
+
});
|
|
55
|
+
const alertDialogHeaderStyle = tva({
|
|
56
|
+
base: 'justify-between items-center flex-row',
|
|
57
|
+
});
|
|
58
|
+
const alertDialogFooterStyle = tva({
|
|
59
|
+
base: 'flex-row justify-end items-center gap-3',
|
|
60
|
+
});
|
|
61
|
+
const alertDialogBodyStyle = tva({ base: '' });
|
|
62
|
+
const alertDialogBackdropStyle = tva({
|
|
63
|
+
base: 'absolute left-0 top-0 right-0 bottom-0 bg-background-dark cursor-default',
|
|
64
|
+
});
|
|
65
|
+
const AlertDialog = React.forwardRef(({ className, size = 'md', ...props }, ref) => {
|
|
66
|
+
const classes = alertDialogStyle({ class: className });
|
|
67
|
+
return React.createElement(UIAccessibleAlertDialog, { ref: ref, ...props, className: classes, context: { size } });
|
|
68
|
+
});
|
|
69
|
+
const AlertDialogContent = React.forwardRef(({ className, size, ...props }, ref) => {
|
|
70
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
71
|
+
const classes = alertDialogContentStyle({
|
|
72
|
+
parentVariants: {
|
|
73
|
+
size: parentSize,
|
|
74
|
+
},
|
|
75
|
+
size,
|
|
76
|
+
class: className,
|
|
77
|
+
});
|
|
78
|
+
return (React.createElement(UIAccessibleAlertDialog.Content, { ref: ref, initial: {
|
|
79
|
+
scale: 0.9,
|
|
80
|
+
opacity: 0,
|
|
81
|
+
}, animate: {
|
|
82
|
+
scale: 1,
|
|
83
|
+
opacity: 1,
|
|
84
|
+
}, exit: {
|
|
85
|
+
scale: 0.9,
|
|
86
|
+
opacity: 0,
|
|
87
|
+
}, transition: {
|
|
88
|
+
type: 'spring',
|
|
89
|
+
damping: 18,
|
|
90
|
+
stiffness: 250,
|
|
91
|
+
opacity: {
|
|
92
|
+
type: 'timing',
|
|
93
|
+
duration: 250,
|
|
94
|
+
},
|
|
95
|
+
}, ...props, className: classes }));
|
|
96
|
+
});
|
|
97
|
+
const AlertDialogCloseButton = React.forwardRef(({ className, ...props }, ref) => {
|
|
98
|
+
const classes = alertDialogCloseButtonStyle({ class: className });
|
|
99
|
+
return React.createElement(UIAccessibleAlertDialog.CloseButton, { ref: ref, ...props, className: classes });
|
|
100
|
+
});
|
|
101
|
+
const AlertDialogHeader = React.forwardRef(({ className, ...props }, ref) => {
|
|
102
|
+
const classes = alertDialogHeaderStyle({ class: className });
|
|
103
|
+
return React.createElement(UIAccessibleAlertDialog.Header, { ref: ref, ...props, className: classes });
|
|
104
|
+
});
|
|
105
|
+
const AlertDialogFooter = React.forwardRef(({ className, ...props }, ref) => {
|
|
106
|
+
const classes = alertDialogFooterStyle({ class: className });
|
|
107
|
+
return React.createElement(UIAccessibleAlertDialog.Footer, { ref: ref, ...props, className: classes });
|
|
108
|
+
});
|
|
109
|
+
const AlertDialogBody = React.forwardRef(({ className, ...props }, ref) => {
|
|
110
|
+
const classes = alertDialogBodyStyle({ class: className });
|
|
111
|
+
return React.createElement(UIAccessibleAlertDialog.Body, { ref: ref, ...props, className: classes });
|
|
112
|
+
});
|
|
113
|
+
const AlertDialogBackdrop = React.forwardRef(({ className, ...props }, ref) => {
|
|
114
|
+
const classes = alertDialogBackdropStyle({ class: className });
|
|
115
|
+
return (React.createElement(UIAccessibleAlertDialog.Backdrop, { ref: ref, initial: {
|
|
116
|
+
opacity: 0,
|
|
117
|
+
}, animate: {
|
|
118
|
+
opacity: 0.5,
|
|
119
|
+
}, exit: {
|
|
120
|
+
opacity: 0,
|
|
121
|
+
}, transition: {
|
|
122
|
+
type: 'spring',
|
|
123
|
+
damping: 18,
|
|
124
|
+
stiffness: 250,
|
|
125
|
+
opacity: {
|
|
126
|
+
type: 'timing',
|
|
127
|
+
duration: 250,
|
|
128
|
+
},
|
|
129
|
+
}, ...props, className: classes }));
|
|
130
|
+
});
|
|
131
|
+
AlertDialog.displayName = 'AlertDialog';
|
|
132
|
+
AlertDialogContent.displayName = 'AlertDialogContent';
|
|
133
|
+
AlertDialogCloseButton.displayName = 'AlertDialogCloseButton';
|
|
134
|
+
AlertDialogHeader.displayName = 'AlertDialogHeader';
|
|
135
|
+
AlertDialogFooter.displayName = 'AlertDialogFooter';
|
|
136
|
+
AlertDialogBody.displayName = 'AlertDialogBody';
|
|
137
|
+
AlertDialogBackdrop.displayName = 'AlertDialogBackdrop';
|
|
138
|
+
export { AlertDialog, AlertDialogContent, AlertDialogCloseButton, AlertDialogHeader, AlertDialogFooter, AlertDialogBody, AlertDialogBackdrop, };
|
|
139
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/alert-dialog/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAE3F,MAAM,KAAK,GAAG,cAAc,CAAC;AAW7B,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAA4B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,gCAAS,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC,CAAC;AAChH,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAA4B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,gCAAS,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC,CAAC;AAChH,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC;AACrC,MAAM,oBAAoB,GAAG,KA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,IAAI,EAAE;YACF,OAAO,EAAE,CAAC;SACb,EACD,UAAU,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,GAAG;YACd,OAAO,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,GAAG;aAChB;SACJ,KACG,KAAK,EACT,SAAS,EAAE,OAAO,GACpB,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AACxC,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AACtD,sBAAsB,CAAC,WAAW,GAAG,wBAAwB,CAAC;AAC9D,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AACpD,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AACpD,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAChD,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC;AAExD,OAAO,EACH,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,GACtB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SizeType = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3
|
+
interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
size?: SizeType;
|
|
5
|
+
}
|
|
6
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
interface AvatarBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
size?: SizeType;
|
|
9
|
+
}
|
|
10
|
+
declare const AvatarBadge: React.ForwardRefExoticComponent<AvatarBadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
interface AvatarFallbackTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
12
|
+
size?: SizeType;
|
|
13
|
+
}
|
|
14
|
+
declare const AvatarFallbackText: React.ForwardRefExoticComponent<AvatarFallbackTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
interface AvatarImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
16
|
+
}
|
|
17
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
|
|
18
|
+
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
}
|
|
20
|
+
declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export { Avatar, AvatarBadge, AvatarFallbackText, AvatarImage, AvatarGroup };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { createAvatar } from '@gluestack-ui/avatar';
|
|
4
|
+
import { tva } from '@gluestack-ui/nativewind-utils/tva';
|
|
5
|
+
import { withStyleContext, useStyleContext } from '@gluestack-ui/nativewind-utils/withStyleContext';
|
|
6
|
+
const SCOPE = 'AVATAR';
|
|
7
|
+
const UIAvatar = createAvatar({
|
|
8
|
+
Root: withStyleContext(({ children, ...props }) => React.createElement("div", { ...props }, children), SCOPE),
|
|
9
|
+
Badge: ({ children, ...props }) => React.createElement("div", { ...props }, children),
|
|
10
|
+
Group: ({ children, ...props }) => React.createElement("div", { ...props }, children),
|
|
11
|
+
Image: (props) => React.createElement("img", { ...props }),
|
|
12
|
+
FallbackText: ({ children, ...props }) => React.createElement("span", { ...props }, children),
|
|
13
|
+
});
|
|
14
|
+
const avatarStyle = tva({
|
|
15
|
+
base: 'rounded-full justify-center items-center relative bg-primary-600 group-[.avatar-group]/avatar-group:-ml-2.5',
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
xs: 'w-6 h-6',
|
|
19
|
+
sm: 'w-8 h-8',
|
|
20
|
+
md: 'w-12 h-12',
|
|
21
|
+
lg: 'w-16 h-16',
|
|
22
|
+
xl: 'w-24 h-24',
|
|
23
|
+
'2xl': 'w-32 h-32',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const avatarFallbackTextStyle = tva({
|
|
28
|
+
base: 'text-typography-0 font-semibold overflow-hidden text-transform:uppercase cursor-default',
|
|
29
|
+
variants: {
|
|
30
|
+
size: {
|
|
31
|
+
xs: 'text-2xs',
|
|
32
|
+
sm: 'text-xs',
|
|
33
|
+
md: 'text-base',
|
|
34
|
+
lg: 'text-xl',
|
|
35
|
+
xl: 'text-3xl',
|
|
36
|
+
'2xl': 'text-5xl',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const avatarGroupStyle = tva({
|
|
41
|
+
base: 'group/avatar-group flex-row-reverse relative avatar-group',
|
|
42
|
+
});
|
|
43
|
+
const avatarBadgeStyle = tva({
|
|
44
|
+
base: 'w-5 h-5 bg-success-500 rounded-full absolute right-0 bottom-0 border-background-0 border-2',
|
|
45
|
+
variants: {
|
|
46
|
+
size: {
|
|
47
|
+
xs: 'w-2 h-2',
|
|
48
|
+
sm: 'w-2 h-2',
|
|
49
|
+
md: 'w-3 h-3',
|
|
50
|
+
lg: 'w-4 h-4',
|
|
51
|
+
xl: 'w-6 h-6',
|
|
52
|
+
'2xl': 'w-8 h-8',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
const avatarImageStyle = tva({
|
|
57
|
+
base: 'h-full w-full rounded-full absolute',
|
|
58
|
+
});
|
|
59
|
+
const Avatar = React.forwardRef(({ className, size = 'md', ...props }, ref) => {
|
|
60
|
+
return React.createElement(UIAvatar, { ...props, ref: ref, className: avatarStyle({ size, class: className }), context: { size } });
|
|
61
|
+
});
|
|
62
|
+
const AvatarBadge = React.forwardRef(({ className, size, ...props }, ref) => {
|
|
63
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
64
|
+
return (React.createElement(UIAvatar.Badge, { ...props, ref: ref, className: avatarBadgeStyle({
|
|
65
|
+
size: size || parentSize,
|
|
66
|
+
class: className,
|
|
67
|
+
}) }));
|
|
68
|
+
});
|
|
69
|
+
const AvatarFallbackText = React.forwardRef(({ className, size, ...props }, ref) => {
|
|
70
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
71
|
+
return (React.createElement(UIAvatar.FallbackText, { ...props, ref: ref, className: avatarFallbackTextStyle({
|
|
72
|
+
size: size || parentSize,
|
|
73
|
+
class: className,
|
|
74
|
+
}) }));
|
|
75
|
+
});
|
|
76
|
+
const AvatarImage = React.forwardRef(({ className, ...props }, ref) => {
|
|
77
|
+
return (React.createElement(UIAvatar.Image, { ...props, ref: ref, className: avatarImageStyle({
|
|
78
|
+
class: className,
|
|
79
|
+
}) }));
|
|
80
|
+
});
|
|
81
|
+
const AvatarGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
82
|
+
return (React.createElement(UIAvatar.Group, { ...props, ref: ref, className: avatarGroupStyle({
|
|
83
|
+
class: className,
|
|
84
|
+
}) }));
|
|
85
|
+
});
|
|
86
|
+
Avatar.displayName = 'Avatar';
|
|
87
|
+
AvatarBadge.displayName = 'AvatarBadge';
|
|
88
|
+
AvatarFallbackText.displayName = 'AvatarFallbackText';
|
|
89
|
+
AvatarImage.displayName = 'AvatarImage';
|
|
90
|
+
AvatarGroup.displayName = 'AvatarGroup';
|
|
91
|
+
export { Avatar, AvatarBadge, AvatarFallbackText, AvatarImage, AvatarGroup };
|
|
92
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/avatar/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,GA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xC,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
3
|
+
declare const badgeStyle: import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
4
|
+
action: {
|
|
5
|
+
error: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
success: string;
|
|
8
|
+
info: string;
|
|
9
|
+
muted: string;
|
|
10
|
+
};
|
|
11
|
+
variant: {
|
|
12
|
+
solid: string;
|
|
13
|
+
outline: string;
|
|
14
|
+
};
|
|
15
|
+
size: {
|
|
16
|
+
sm: string;
|
|
17
|
+
md: string;
|
|
18
|
+
lg: string;
|
|
19
|
+
};
|
|
20
|
+
} | ({
|
|
21
|
+
action: {
|
|
22
|
+
error: string;
|
|
23
|
+
warning: string;
|
|
24
|
+
success: string;
|
|
25
|
+
info: string;
|
|
26
|
+
muted: string;
|
|
27
|
+
};
|
|
28
|
+
variant: {
|
|
29
|
+
solid: string;
|
|
30
|
+
outline: string;
|
|
31
|
+
};
|
|
32
|
+
size: {
|
|
33
|
+
sm: string;
|
|
34
|
+
md: string;
|
|
35
|
+
lg: string;
|
|
36
|
+
};
|
|
37
|
+
} & {
|
|
38
|
+
action: {
|
|
39
|
+
error: import("tailwind-merge").ClassNameValue | {
|
|
40
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
41
|
+
};
|
|
42
|
+
warning: import("tailwind-merge").ClassNameValue | {
|
|
43
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
44
|
+
};
|
|
45
|
+
success: import("tailwind-merge").ClassNameValue | {
|
|
46
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
47
|
+
};
|
|
48
|
+
info: import("tailwind-merge").ClassNameValue | {
|
|
49
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
50
|
+
};
|
|
51
|
+
muted: import("tailwind-merge").ClassNameValue | {
|
|
52
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
variant: {
|
|
56
|
+
solid: import("tailwind-merge").ClassNameValue | {
|
|
57
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
58
|
+
};
|
|
59
|
+
outline: import("tailwind-merge").ClassNameValue | {
|
|
60
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
size: {
|
|
64
|
+
sm: import("tailwind-merge").ClassNameValue | {
|
|
65
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
66
|
+
};
|
|
67
|
+
md: import("tailwind-merge").ClassNameValue | {
|
|
68
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
69
|
+
};
|
|
70
|
+
lg: import("tailwind-merge").ClassNameValue | {
|
|
71
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}), undefined, "flex-row items-center rounded-sm data-[disabled=true]:opacity-50 px-2 py-1", import("tailwind-variants/dist/config").TVConfig<{
|
|
75
|
+
action: {
|
|
76
|
+
error: string;
|
|
77
|
+
warning: string;
|
|
78
|
+
success: string;
|
|
79
|
+
info: string;
|
|
80
|
+
muted: string;
|
|
81
|
+
};
|
|
82
|
+
variant: {
|
|
83
|
+
solid: string;
|
|
84
|
+
outline: string;
|
|
85
|
+
};
|
|
86
|
+
size: {
|
|
87
|
+
sm: string;
|
|
88
|
+
md: string;
|
|
89
|
+
lg: string;
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
action: {
|
|
93
|
+
error: string;
|
|
94
|
+
warning: string;
|
|
95
|
+
success: string;
|
|
96
|
+
info: string;
|
|
97
|
+
muted: string;
|
|
98
|
+
};
|
|
99
|
+
variant: {
|
|
100
|
+
solid: string;
|
|
101
|
+
outline: string;
|
|
102
|
+
};
|
|
103
|
+
size: {
|
|
104
|
+
sm: string;
|
|
105
|
+
md: string;
|
|
106
|
+
lg: string;
|
|
107
|
+
};
|
|
108
|
+
}>, {
|
|
109
|
+
action: {
|
|
110
|
+
error: string;
|
|
111
|
+
warning: string;
|
|
112
|
+
success: string;
|
|
113
|
+
info: string;
|
|
114
|
+
muted: string;
|
|
115
|
+
};
|
|
116
|
+
variant: {
|
|
117
|
+
solid: string;
|
|
118
|
+
outline: string;
|
|
119
|
+
};
|
|
120
|
+
size: {
|
|
121
|
+
sm: string;
|
|
122
|
+
md: string;
|
|
123
|
+
lg: string;
|
|
124
|
+
};
|
|
125
|
+
}, undefined, import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
126
|
+
action: {
|
|
127
|
+
error: string;
|
|
128
|
+
warning: string;
|
|
129
|
+
success: string;
|
|
130
|
+
info: string;
|
|
131
|
+
muted: string;
|
|
132
|
+
};
|
|
133
|
+
variant: {
|
|
134
|
+
solid: string;
|
|
135
|
+
outline: string;
|
|
136
|
+
};
|
|
137
|
+
size: {
|
|
138
|
+
sm: string;
|
|
139
|
+
md: string;
|
|
140
|
+
lg: string;
|
|
141
|
+
};
|
|
142
|
+
}, undefined, "flex-row items-center rounded-sm data-[disabled=true]:opacity-50 px-2 py-1", import("tailwind-variants/dist/config").TVConfig<{
|
|
143
|
+
action: {
|
|
144
|
+
error: string;
|
|
145
|
+
warning: string;
|
|
146
|
+
success: string;
|
|
147
|
+
info: string;
|
|
148
|
+
muted: string;
|
|
149
|
+
};
|
|
150
|
+
variant: {
|
|
151
|
+
solid: string;
|
|
152
|
+
outline: string;
|
|
153
|
+
};
|
|
154
|
+
size: {
|
|
155
|
+
sm: string;
|
|
156
|
+
md: string;
|
|
157
|
+
lg: string;
|
|
158
|
+
};
|
|
159
|
+
}, {
|
|
160
|
+
action: {
|
|
161
|
+
error: string;
|
|
162
|
+
warning: string;
|
|
163
|
+
success: string;
|
|
164
|
+
info: string;
|
|
165
|
+
muted: string;
|
|
166
|
+
};
|
|
167
|
+
variant: {
|
|
168
|
+
solid: string;
|
|
169
|
+
outline: string;
|
|
170
|
+
};
|
|
171
|
+
size: {
|
|
172
|
+
sm: string;
|
|
173
|
+
md: string;
|
|
174
|
+
lg: string;
|
|
175
|
+
};
|
|
176
|
+
}>, unknown, unknown, undefined>>;
|
|
177
|
+
type IBadgeProps = React.ComponentPropsWithoutRef<'div'> & VariantProps<typeof badgeStyle>;
|
|
178
|
+
declare const Badge: {
|
|
179
|
+
({ children, action, variant, size, className, ...props }: {
|
|
180
|
+
className?: string;
|
|
181
|
+
} & IBadgeProps): React.JSX.Element;
|
|
182
|
+
displayName: string;
|
|
183
|
+
};
|
|
184
|
+
declare const BadgeText: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & VariantProps<import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
185
|
+
isTruncated: {
|
|
186
|
+
true: string;
|
|
187
|
+
};
|
|
188
|
+
bold: {
|
|
189
|
+
true: string;
|
|
190
|
+
};
|
|
191
|
+
underline: {
|
|
192
|
+
true: string;
|
|
193
|
+
};
|
|
194
|
+
strikeThrough: {
|
|
195
|
+
true: string;
|
|
196
|
+
};
|
|
197
|
+
sub: {
|
|
198
|
+
true: string;
|
|
199
|
+
};
|
|
200
|
+
italic: {
|
|
201
|
+
true: string;
|
|
202
|
+
};
|
|
203
|
+
highlight: {
|
|
204
|
+
true: string;
|
|
205
|
+
};
|
|
206
|
+
} & {
|
|
207
|
+
action: {
|
|
208
|
+
error: string;
|
|
209
|
+
warning: string;
|
|
210
|
+
success: string;
|
|
211
|
+
info: string;
|
|
212
|
+
muted: string;
|
|
213
|
+
};
|
|
214
|
+
size: {
|
|
215
|
+
sm: string;
|
|
216
|
+
md: string;
|
|
217
|
+
lg: string;
|
|
218
|
+
};
|
|
219
|
+
}, undefined, "text-typography-700 font-body font-normal tracking-normal uppercase", import("tailwind-variants/dist/config").TVConfig<{
|
|
220
|
+
isTruncated: {
|
|
221
|
+
true: string;
|
|
222
|
+
};
|
|
223
|
+
bold: {
|
|
224
|
+
true: string;
|
|
225
|
+
};
|
|
226
|
+
underline: {
|
|
227
|
+
true: string;
|
|
228
|
+
};
|
|
229
|
+
strikeThrough: {
|
|
230
|
+
true: string;
|
|
231
|
+
};
|
|
232
|
+
sub: {
|
|
233
|
+
true: string;
|
|
234
|
+
};
|
|
235
|
+
italic: {
|
|
236
|
+
true: string;
|
|
237
|
+
};
|
|
238
|
+
highlight: {
|
|
239
|
+
true: string;
|
|
240
|
+
};
|
|
241
|
+
}, {
|
|
242
|
+
isTruncated: {
|
|
243
|
+
true: string;
|
|
244
|
+
};
|
|
245
|
+
bold: {
|
|
246
|
+
true: string;
|
|
247
|
+
};
|
|
248
|
+
underline: {
|
|
249
|
+
true: string;
|
|
250
|
+
};
|
|
251
|
+
strikeThrough: {
|
|
252
|
+
true: string;
|
|
253
|
+
};
|
|
254
|
+
sub: {
|
|
255
|
+
true: string;
|
|
256
|
+
};
|
|
257
|
+
italic: {
|
|
258
|
+
true: string;
|
|
259
|
+
};
|
|
260
|
+
highlight: {
|
|
261
|
+
true: string;
|
|
262
|
+
};
|
|
263
|
+
}>, {
|
|
264
|
+
isTruncated: {
|
|
265
|
+
true: string;
|
|
266
|
+
};
|
|
267
|
+
bold: {
|
|
268
|
+
true: string;
|
|
269
|
+
};
|
|
270
|
+
underline: {
|
|
271
|
+
true: string;
|
|
272
|
+
};
|
|
273
|
+
strikeThrough: {
|
|
274
|
+
true: string;
|
|
275
|
+
};
|
|
276
|
+
sub: {
|
|
277
|
+
true: string;
|
|
278
|
+
};
|
|
279
|
+
italic: {
|
|
280
|
+
true: string;
|
|
281
|
+
};
|
|
282
|
+
highlight: {
|
|
283
|
+
true: string;
|
|
284
|
+
};
|
|
285
|
+
}, undefined, import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
286
|
+
isTruncated: {
|
|
287
|
+
true: string;
|
|
288
|
+
};
|
|
289
|
+
bold: {
|
|
290
|
+
true: string;
|
|
291
|
+
};
|
|
292
|
+
underline: {
|
|
293
|
+
true: string;
|
|
294
|
+
};
|
|
295
|
+
strikeThrough: {
|
|
296
|
+
true: string;
|
|
297
|
+
};
|
|
298
|
+
sub: {
|
|
299
|
+
true: string;
|
|
300
|
+
};
|
|
301
|
+
italic: {
|
|
302
|
+
true: string;
|
|
303
|
+
};
|
|
304
|
+
highlight: {
|
|
305
|
+
true: string;
|
|
306
|
+
};
|
|
307
|
+
}, undefined, "text-typography-700 font-body font-normal tracking-normal uppercase", import("tailwind-variants/dist/config").TVConfig<{
|
|
308
|
+
isTruncated: {
|
|
309
|
+
true: string;
|
|
310
|
+
};
|
|
311
|
+
bold: {
|
|
312
|
+
true: string;
|
|
313
|
+
};
|
|
314
|
+
underline: {
|
|
315
|
+
true: string;
|
|
316
|
+
};
|
|
317
|
+
strikeThrough: {
|
|
318
|
+
true: string;
|
|
319
|
+
};
|
|
320
|
+
sub: {
|
|
321
|
+
true: string;
|
|
322
|
+
};
|
|
323
|
+
italic: {
|
|
324
|
+
true: string;
|
|
325
|
+
};
|
|
326
|
+
highlight: {
|
|
327
|
+
true: string;
|
|
328
|
+
};
|
|
329
|
+
}, {
|
|
330
|
+
isTruncated: {
|
|
331
|
+
true: string;
|
|
332
|
+
};
|
|
333
|
+
bold: {
|
|
334
|
+
true: string;
|
|
335
|
+
};
|
|
336
|
+
underline: {
|
|
337
|
+
true: string;
|
|
338
|
+
};
|
|
339
|
+
strikeThrough: {
|
|
340
|
+
true: string;
|
|
341
|
+
};
|
|
342
|
+
sub: {
|
|
343
|
+
true: string;
|
|
344
|
+
};
|
|
345
|
+
italic: {
|
|
346
|
+
true: string;
|
|
347
|
+
};
|
|
348
|
+
highlight: {
|
|
349
|
+
true: string;
|
|
350
|
+
};
|
|
351
|
+
}>, unknown, unknown, undefined>>> & React.RefAttributes<HTMLSpanElement>>;
|
|
352
|
+
declare const BadgeIcon: React.ForwardRefExoticComponent<Omit<import("@gluestack-ui/icon").IPrimitiveIcon & React.RefAttributes<import("@gluestack-ui/icon").Svg>, "ref"> & VariantProps<import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
|
|
353
|
+
action: {
|
|
354
|
+
error: string;
|
|
355
|
+
warning: string;
|
|
356
|
+
success: string;
|
|
357
|
+
info: string;
|
|
358
|
+
muted: string;
|
|
359
|
+
};
|
|
360
|
+
size: {
|
|
361
|
+
sm: string;
|
|
362
|
+
md: string;
|
|
363
|
+
lg: string;
|
|
364
|
+
};
|
|
365
|
+
} | ({} & {
|
|
366
|
+
action: {
|
|
367
|
+
error: string;
|
|
368
|
+
warning: string;
|
|
369
|
+
success: string;
|
|
370
|
+
info: string;
|
|
371
|
+
muted: string;
|
|
372
|
+
};
|
|
373
|
+
size: {
|
|
374
|
+
sm: string;
|
|
375
|
+
md: string;
|
|
376
|
+
lg: string;
|
|
377
|
+
};
|
|
378
|
+
}), undefined, "fill-none", import("tailwind-variants/dist/config").TVConfig<unknown, unknown>, unknown, undefined, import("@gluestack-ui/nativewind-utils/types").TVReturnType<unknown, undefined, "fill-none", import("tailwind-variants/dist/config").TVConfig<unknown, unknown>, unknown, unknown, undefined>>> & React.RefAttributes<(import("@gluestack-ui/icon").IPrimitiveIcon & React.RefAttributes<import("@gluestack-ui/icon").Svg>) | {
|
|
379
|
+
fill?: import("react-native").ColorValue;
|
|
380
|
+
stroke?: import("react-native").ColorValue;
|
|
381
|
+
}>>;
|
|
382
|
+
export { Badge, BadgeIcon, BadgeText };
|