@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,241 @@
|
|
|
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 type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
8
|
+
import { Motion, AnimatePresence, createMotionAnimatedComponent } from '@legendapp/motion';
|
|
9
|
+
|
|
10
|
+
const SCOPE = 'ALERT_DIALOG';
|
|
11
|
+
|
|
12
|
+
// Create base components with proper types
|
|
13
|
+
interface BaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const RootComponent = React.forwardRef<HTMLDivElement, BaseProps>((props, ref) => <div {...props} ref={ref} />);
|
|
22
|
+
const BodyComponent = React.forwardRef<HTMLDivElement, BaseProps>((props, ref) => <div {...props} ref={ref} />);
|
|
23
|
+
const ContentComponent = Motion.View;
|
|
24
|
+
const CloseButtonComponent = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => (
|
|
25
|
+
<button {...props} ref={ref} />
|
|
26
|
+
));
|
|
27
|
+
const HeaderComponent = React.forwardRef<HTMLDivElement, BaseProps>((props, ref) => <div {...props} ref={ref} />);
|
|
28
|
+
const FooterComponent = React.forwardRef<HTMLDivElement, BaseProps>((props, ref) => <div {...props} ref={ref} />);
|
|
29
|
+
const BackdropComponent = createMotionAnimatedComponent(
|
|
30
|
+
React.forwardRef<HTMLDivElement, BaseProps>((props, ref) => <div {...props} ref={ref} />),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const UIAccessibleAlertDialog = createAlertDialog({
|
|
34
|
+
Root: withStyleContext(RootComponent, SCOPE),
|
|
35
|
+
Body: BodyComponent,
|
|
36
|
+
Content: ContentComponent,
|
|
37
|
+
CloseButton: CloseButtonComponent,
|
|
38
|
+
Header: HeaderComponent,
|
|
39
|
+
Footer: FooterComponent,
|
|
40
|
+
Backdrop: BackdropComponent,
|
|
41
|
+
AnimatePresence: AnimatePresence,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
cssInterop(Motion.View, { className: 'style' });
|
|
45
|
+
cssInterop(BackdropComponent, { className: 'style' });
|
|
46
|
+
|
|
47
|
+
const alertDialogStyle = tva({
|
|
48
|
+
base: 'group/modal w-full h-full justify-center items-center pointer-events-none',
|
|
49
|
+
parentVariants: {
|
|
50
|
+
size: {
|
|
51
|
+
xs: '',
|
|
52
|
+
sm: '',
|
|
53
|
+
md: '',
|
|
54
|
+
lg: '',
|
|
55
|
+
full: '',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const alertDialogContentStyle = tva({
|
|
61
|
+
base: 'bg-background-0 rounded-lg overflow-hidden border border-outline-100 p-6',
|
|
62
|
+
parentVariants: {
|
|
63
|
+
size: {
|
|
64
|
+
xs: 'w-[60%] max-w-[360px]',
|
|
65
|
+
sm: 'w-[70%] max-w-[420px]',
|
|
66
|
+
md: 'w-[80%] max-w-[510px]',
|
|
67
|
+
lg: 'w-[90%] max-w-[640px]',
|
|
68
|
+
full: 'w-full',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const alertDialogCloseButtonStyle = tva({
|
|
74
|
+
base: 'group/alert-dialog-close-button z-10 rounded-sm p-2 data-[focus-visible=true]:bg-background-100 cursor-pointer outline-0',
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const alertDialogHeaderStyle = tva({
|
|
78
|
+
base: 'justify-between items-center flex-row',
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const alertDialogFooterStyle = tva({
|
|
82
|
+
base: 'flex-row justify-end items-center gap-3',
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const alertDialogBodyStyle = tva({ base: '' });
|
|
86
|
+
|
|
87
|
+
const alertDialogBackdropStyle = tva({
|
|
88
|
+
base: 'absolute left-0 top-0 right-0 bottom-0 bg-background-dark cursor-default',
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
type IAlertDialogProps = React.ComponentPropsWithoutRef<typeof UIAccessibleAlertDialog> &
|
|
92
|
+
VariantProps<typeof alertDialogStyle>;
|
|
93
|
+
|
|
94
|
+
type IAlertDialogContentProps = React.ComponentPropsWithoutRef<typeof UIAccessibleAlertDialog.Content> &
|
|
95
|
+
VariantProps<typeof alertDialogContentStyle> & { className?: string };
|
|
96
|
+
|
|
97
|
+
type IAlertDialogCloseButtonProps = React.ComponentPropsWithoutRef<typeof UIAccessibleAlertDialog.CloseButton> &
|
|
98
|
+
VariantProps<typeof alertDialogCloseButtonStyle>;
|
|
99
|
+
|
|
100
|
+
type IAlertDialogHeaderProps = React.ComponentPropsWithoutRef<typeof UIAccessibleAlertDialog.Header> &
|
|
101
|
+
VariantProps<typeof alertDialogHeaderStyle>;
|
|
102
|
+
|
|
103
|
+
type IAlertDialogFooterProps = React.ComponentPropsWithoutRef<typeof UIAccessibleAlertDialog.Footer> &
|
|
104
|
+
VariantProps<typeof alertDialogFooterStyle>;
|
|
105
|
+
|
|
106
|
+
type IAlertDialogBodyProps = React.ComponentPropsWithoutRef<typeof UIAccessibleAlertDialog.Body> &
|
|
107
|
+
VariantProps<typeof alertDialogBodyStyle>;
|
|
108
|
+
|
|
109
|
+
type IAlertDialogBackdropProps = React.ComponentPropsWithoutRef<typeof UIAccessibleAlertDialog.Backdrop> &
|
|
110
|
+
VariantProps<typeof alertDialogBackdropStyle> & { className?: string };
|
|
111
|
+
|
|
112
|
+
const AlertDialog = React.forwardRef<React.ElementRef<typeof UIAccessibleAlertDialog>, IAlertDialogProps>(
|
|
113
|
+
({ className, size = 'md', ...props }, ref) => {
|
|
114
|
+
const classes = alertDialogStyle({ class: className });
|
|
115
|
+
return <UIAccessibleAlertDialog ref={ref} {...props} className={classes} context={{ size }} />;
|
|
116
|
+
},
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const AlertDialogContent = React.forwardRef<
|
|
120
|
+
React.ElementRef<typeof UIAccessibleAlertDialog.Content>,
|
|
121
|
+
IAlertDialogContentProps
|
|
122
|
+
>(({ className, size, ...props }, ref) => {
|
|
123
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
124
|
+
const classes = alertDialogContentStyle({
|
|
125
|
+
parentVariants: {
|
|
126
|
+
size: parentSize,
|
|
127
|
+
},
|
|
128
|
+
size,
|
|
129
|
+
class: className,
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<UIAccessibleAlertDialog.Content
|
|
134
|
+
ref={ref}
|
|
135
|
+
initial={{
|
|
136
|
+
scale: 0.9,
|
|
137
|
+
opacity: 0,
|
|
138
|
+
}}
|
|
139
|
+
animate={{
|
|
140
|
+
scale: 1,
|
|
141
|
+
opacity: 1,
|
|
142
|
+
}}
|
|
143
|
+
exit={{
|
|
144
|
+
scale: 0.9,
|
|
145
|
+
opacity: 0,
|
|
146
|
+
}}
|
|
147
|
+
transition={{
|
|
148
|
+
type: 'spring',
|
|
149
|
+
damping: 18,
|
|
150
|
+
stiffness: 250,
|
|
151
|
+
opacity: {
|
|
152
|
+
type: 'timing',
|
|
153
|
+
duration: 250,
|
|
154
|
+
},
|
|
155
|
+
}}
|
|
156
|
+
{...props}
|
|
157
|
+
className={classes}
|
|
158
|
+
/>
|
|
159
|
+
);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
const AlertDialogCloseButton = React.forwardRef<
|
|
163
|
+
React.ElementRef<typeof UIAccessibleAlertDialog.CloseButton>,
|
|
164
|
+
IAlertDialogCloseButtonProps
|
|
165
|
+
>(({ className, ...props }, ref) => {
|
|
166
|
+
const classes = alertDialogCloseButtonStyle({ class: className });
|
|
167
|
+
return <UIAccessibleAlertDialog.CloseButton ref={ref} {...props} className={classes} />;
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
const AlertDialogHeader = React.forwardRef<
|
|
171
|
+
React.ElementRef<typeof UIAccessibleAlertDialog.Header>,
|
|
172
|
+
IAlertDialogHeaderProps
|
|
173
|
+
>(({ className, ...props }, ref) => {
|
|
174
|
+
const classes = alertDialogHeaderStyle({ class: className });
|
|
175
|
+
return <UIAccessibleAlertDialog.Header ref={ref} {...props} className={classes} />;
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
const AlertDialogFooter = React.forwardRef<
|
|
179
|
+
React.ElementRef<typeof UIAccessibleAlertDialog.Footer>,
|
|
180
|
+
IAlertDialogFooterProps
|
|
181
|
+
>(({ className, ...props }, ref) => {
|
|
182
|
+
const classes = alertDialogFooterStyle({ class: className });
|
|
183
|
+
return <UIAccessibleAlertDialog.Footer ref={ref} {...props} className={classes} />;
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
const AlertDialogBody = React.forwardRef<React.ElementRef<typeof UIAccessibleAlertDialog.Body>, IAlertDialogBodyProps>(
|
|
187
|
+
({ className, ...props }, ref) => {
|
|
188
|
+
const classes = alertDialogBodyStyle({ class: className });
|
|
189
|
+
return <UIAccessibleAlertDialog.Body ref={ref} {...props} className={classes} />;
|
|
190
|
+
},
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
const AlertDialogBackdrop = React.forwardRef<
|
|
194
|
+
React.ElementRef<typeof UIAccessibleAlertDialog.Backdrop>,
|
|
195
|
+
IAlertDialogBackdropProps
|
|
196
|
+
>(({ className, ...props }, ref) => {
|
|
197
|
+
const classes = alertDialogBackdropStyle({ class: className });
|
|
198
|
+
return (
|
|
199
|
+
<UIAccessibleAlertDialog.Backdrop
|
|
200
|
+
ref={ref}
|
|
201
|
+
initial={{
|
|
202
|
+
opacity: 0,
|
|
203
|
+
}}
|
|
204
|
+
animate={{
|
|
205
|
+
opacity: 0.5,
|
|
206
|
+
}}
|
|
207
|
+
exit={{
|
|
208
|
+
opacity: 0,
|
|
209
|
+
}}
|
|
210
|
+
transition={{
|
|
211
|
+
type: 'spring',
|
|
212
|
+
damping: 18,
|
|
213
|
+
stiffness: 250,
|
|
214
|
+
opacity: {
|
|
215
|
+
type: 'timing',
|
|
216
|
+
duration: 250,
|
|
217
|
+
},
|
|
218
|
+
}}
|
|
219
|
+
{...props}
|
|
220
|
+
className={classes}
|
|
221
|
+
/>
|
|
222
|
+
);
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
AlertDialog.displayName = 'AlertDialog';
|
|
226
|
+
AlertDialogContent.displayName = 'AlertDialogContent';
|
|
227
|
+
AlertDialogCloseButton.displayName = 'AlertDialogCloseButton';
|
|
228
|
+
AlertDialogHeader.displayName = 'AlertDialogHeader';
|
|
229
|
+
AlertDialogFooter.displayName = 'AlertDialogFooter';
|
|
230
|
+
AlertDialogBody.displayName = 'AlertDialogBody';
|
|
231
|
+
AlertDialogBackdrop.displayName = 'AlertDialogBackdrop';
|
|
232
|
+
|
|
233
|
+
export {
|
|
234
|
+
AlertDialog,
|
|
235
|
+
AlertDialogContent,
|
|
236
|
+
AlertDialogCloseButton,
|
|
237
|
+
AlertDialogHeader,
|
|
238
|
+
AlertDialogFooter,
|
|
239
|
+
AlertDialogBody,
|
|
240
|
+
AlertDialogBackdrop,
|
|
241
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
|
|
7
|
+
const SCOPE = 'AVATAR';
|
|
8
|
+
import type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
9
|
+
|
|
10
|
+
type SizeType = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
11
|
+
|
|
12
|
+
const UIAvatar = createAvatar({
|
|
13
|
+
Root: withStyleContext(({ children, ...props }: any) => <div {...props}>{children}</div>, SCOPE),
|
|
14
|
+
Badge: ({ children, ...props }: any) => <div {...props}>{children}</div>,
|
|
15
|
+
Group: ({ children, ...props }: any) => <div {...props}>{children}</div>,
|
|
16
|
+
Image: (props: any) => <img {...props} />,
|
|
17
|
+
FallbackText: ({ children, ...props }: any) => <span {...props}>{children}</span>,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const avatarStyle = tva({
|
|
21
|
+
base: 'rounded-full justify-center items-center relative bg-primary-600 group-[.avatar-group]/avatar-group:-ml-2.5',
|
|
22
|
+
variants: {
|
|
23
|
+
size: {
|
|
24
|
+
xs: 'w-6 h-6',
|
|
25
|
+
sm: 'w-8 h-8',
|
|
26
|
+
md: 'w-12 h-12',
|
|
27
|
+
lg: 'w-16 h-16',
|
|
28
|
+
xl: 'w-24 h-24',
|
|
29
|
+
'2xl': 'w-32 h-32',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const avatarFallbackTextStyle = tva({
|
|
35
|
+
base: 'text-typography-0 font-semibold overflow-hidden text-transform:uppercase cursor-default',
|
|
36
|
+
variants: {
|
|
37
|
+
size: {
|
|
38
|
+
xs: 'text-2xs',
|
|
39
|
+
sm: 'text-xs',
|
|
40
|
+
md: 'text-base',
|
|
41
|
+
lg: 'text-xl',
|
|
42
|
+
xl: 'text-3xl',
|
|
43
|
+
'2xl': 'text-5xl',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const avatarGroupStyle = tva({
|
|
49
|
+
base: 'group/avatar-group flex-row-reverse relative avatar-group',
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const avatarBadgeStyle = tva({
|
|
53
|
+
base: 'w-5 h-5 bg-success-500 rounded-full absolute right-0 bottom-0 border-background-0 border-2',
|
|
54
|
+
variants: {
|
|
55
|
+
size: {
|
|
56
|
+
xs: 'w-2 h-2',
|
|
57
|
+
sm: 'w-2 h-2',
|
|
58
|
+
md: 'w-3 h-3',
|
|
59
|
+
lg: 'w-4 h-4',
|
|
60
|
+
xl: 'w-6 h-6',
|
|
61
|
+
'2xl': 'w-8 h-8',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const avatarImageStyle = tva({
|
|
67
|
+
base: 'h-full w-full rounded-full absolute',
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
71
|
+
size?: SizeType;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const Avatar = React.forwardRef<HTMLDivElement, AvatarProps>(({ className, size = 'md', ...props }, ref) => {
|
|
75
|
+
return <UIAvatar {...props} ref={ref} className={avatarStyle({ size, class: className })} context={{ size }} />;
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
interface AvatarBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
79
|
+
size?: SizeType;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const AvatarBadge = React.forwardRef<HTMLDivElement, AvatarBadgeProps>(({ className, size, ...props }, ref) => {
|
|
83
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
84
|
+
return (
|
|
85
|
+
<UIAvatar.Badge
|
|
86
|
+
{...props}
|
|
87
|
+
ref={ref}
|
|
88
|
+
className={avatarBadgeStyle({
|
|
89
|
+
size: size || parentSize,
|
|
90
|
+
class: className,
|
|
91
|
+
})}
|
|
92
|
+
/>
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
interface AvatarFallbackTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
97
|
+
size?: SizeType;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const AvatarFallbackText = React.forwardRef<HTMLSpanElement, AvatarFallbackTextProps>(
|
|
101
|
+
({ className, size, ...props }, ref) => {
|
|
102
|
+
const { size: parentSize } = useStyleContext(SCOPE);
|
|
103
|
+
return (
|
|
104
|
+
<UIAvatar.FallbackText
|
|
105
|
+
{...props}
|
|
106
|
+
ref={ref}
|
|
107
|
+
className={avatarFallbackTextStyle({
|
|
108
|
+
size: size || parentSize,
|
|
109
|
+
class: className,
|
|
110
|
+
})}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
},
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
interface AvatarImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {}
|
|
117
|
+
|
|
118
|
+
const AvatarImage = React.forwardRef<HTMLImageElement, AvatarImageProps>(({ className, ...props }, ref) => {
|
|
119
|
+
return (
|
|
120
|
+
<UIAvatar.Image
|
|
121
|
+
{...props}
|
|
122
|
+
ref={ref}
|
|
123
|
+
className={avatarImageStyle({
|
|
124
|
+
class: className,
|
|
125
|
+
})}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
131
|
+
|
|
132
|
+
const AvatarGroup = React.forwardRef<HTMLDivElement, AvatarGroupProps>(({ className, ...props }, ref) => {
|
|
133
|
+
return (
|
|
134
|
+
<UIAvatar.Group
|
|
135
|
+
{...props}
|
|
136
|
+
ref={ref}
|
|
137
|
+
className={avatarGroupStyle({
|
|
138
|
+
class: className,
|
|
139
|
+
})}
|
|
140
|
+
/>
|
|
141
|
+
);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
Avatar.displayName = 'Avatar';
|
|
145
|
+
AvatarBadge.displayName = 'AvatarBadge';
|
|
146
|
+
AvatarFallbackText.displayName = 'AvatarFallbackText';
|
|
147
|
+
AvatarImage.displayName = 'AvatarImage';
|
|
148
|
+
AvatarGroup.displayName = 'AvatarGroup';
|
|
149
|
+
|
|
150
|
+
export { Avatar, AvatarBadge, AvatarFallbackText, AvatarImage, AvatarGroup };
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PrimitiveIcon, UIIcon } from '@gluestack-ui/icon';
|
|
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 type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
8
|
+
const SCOPE = 'BADGE';
|
|
9
|
+
|
|
10
|
+
const badgeStyle = tva({
|
|
11
|
+
base: 'flex-row items-center rounded-sm data-[disabled=true]:opacity-50 px-2 py-1',
|
|
12
|
+
variants: {
|
|
13
|
+
action: {
|
|
14
|
+
error: 'bg-background-error border-error-300',
|
|
15
|
+
warning: 'bg-background-warning border-warning-300',
|
|
16
|
+
success: 'bg-background-success border-success-300',
|
|
17
|
+
info: 'bg-background-info border-info-300',
|
|
18
|
+
muted: 'bg-background-muted border-background-300',
|
|
19
|
+
},
|
|
20
|
+
variant: {
|
|
21
|
+
solid: '',
|
|
22
|
+
outline: 'border',
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
sm: '',
|
|
26
|
+
md: '',
|
|
27
|
+
lg: '',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const badgeTextStyle = tva({
|
|
33
|
+
base: 'text-typography-700 font-body font-normal tracking-normal uppercase',
|
|
34
|
+
|
|
35
|
+
parentVariants: {
|
|
36
|
+
action: {
|
|
37
|
+
error: 'text-error-600',
|
|
38
|
+
warning: 'text-warning-600',
|
|
39
|
+
success: 'text-success-600',
|
|
40
|
+
info: 'text-info-600',
|
|
41
|
+
muted: 'text-background-800',
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
sm: 'text-2xs',
|
|
45
|
+
md: 'text-xs',
|
|
46
|
+
lg: 'text-sm',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
variants: {
|
|
50
|
+
isTruncated: {
|
|
51
|
+
true: 'web:truncate',
|
|
52
|
+
},
|
|
53
|
+
bold: {
|
|
54
|
+
true: 'font-bold',
|
|
55
|
+
},
|
|
56
|
+
underline: {
|
|
57
|
+
true: 'underline',
|
|
58
|
+
},
|
|
59
|
+
strikeThrough: {
|
|
60
|
+
true: 'line-through',
|
|
61
|
+
},
|
|
62
|
+
sub: {
|
|
63
|
+
true: 'text-xs',
|
|
64
|
+
},
|
|
65
|
+
italic: {
|
|
66
|
+
true: 'italic',
|
|
67
|
+
},
|
|
68
|
+
highlight: {
|
|
69
|
+
true: 'bg-yellow-500',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const badgeIconStyle = tva({
|
|
75
|
+
base: 'fill-none',
|
|
76
|
+
parentVariants: {
|
|
77
|
+
action: {
|
|
78
|
+
error: 'text-error-600',
|
|
79
|
+
warning: 'text-warning-600',
|
|
80
|
+
success: 'text-success-600',
|
|
81
|
+
info: 'text-info-600',
|
|
82
|
+
muted: 'text-background-800',
|
|
83
|
+
},
|
|
84
|
+
size: {
|
|
85
|
+
sm: 'h-3 w-3',
|
|
86
|
+
md: 'h-3.5 w-3.5',
|
|
87
|
+
lg: 'h-4 w-4',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const ContextView = withStyleContext(
|
|
93
|
+
({ children, ...props }: React.HTMLProps<HTMLDivElement>) => <div {...props}>{children}</div>,
|
|
94
|
+
SCOPE,
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
cssInterop(PrimitiveIcon, {
|
|
98
|
+
className: {
|
|
99
|
+
target: 'style',
|
|
100
|
+
nativeStyleToProp: {
|
|
101
|
+
height: true,
|
|
102
|
+
width: true,
|
|
103
|
+
fill: true,
|
|
104
|
+
color: 'classNameColor',
|
|
105
|
+
stroke: true,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
type IBadgeProps = React.ComponentPropsWithoutRef<'div'> & VariantProps<typeof badgeStyle>;
|
|
111
|
+
const Badge = ({
|
|
112
|
+
children,
|
|
113
|
+
action = 'muted',
|
|
114
|
+
variant = 'solid',
|
|
115
|
+
size = 'md',
|
|
116
|
+
className,
|
|
117
|
+
...props
|
|
118
|
+
}: { className?: string } & IBadgeProps) => {
|
|
119
|
+
return (
|
|
120
|
+
<ContextView
|
|
121
|
+
className={badgeStyle({ action, variant, class: className })}
|
|
122
|
+
{...props}
|
|
123
|
+
context={{
|
|
124
|
+
action,
|
|
125
|
+
variant,
|
|
126
|
+
size,
|
|
127
|
+
}}
|
|
128
|
+
>
|
|
129
|
+
{children}
|
|
130
|
+
</ContextView>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
type IBadgeTextProps = React.ComponentPropsWithoutRef<'span'> & VariantProps<typeof badgeTextStyle>;
|
|
135
|
+
|
|
136
|
+
const BadgeText = React.forwardRef<HTMLSpanElement, IBadgeTextProps>(({ children, className, size, ...props }, ref) => {
|
|
137
|
+
const { size: parentSize, action: parentAction } = useStyleContext(SCOPE);
|
|
138
|
+
return (
|
|
139
|
+
<span
|
|
140
|
+
ref={ref}
|
|
141
|
+
className={badgeTextStyle({
|
|
142
|
+
parentVariants: {
|
|
143
|
+
size: parentSize,
|
|
144
|
+
action: parentAction,
|
|
145
|
+
},
|
|
146
|
+
size,
|
|
147
|
+
class: className,
|
|
148
|
+
})}
|
|
149
|
+
{...props}
|
|
150
|
+
>
|
|
151
|
+
{children}
|
|
152
|
+
</span>
|
|
153
|
+
);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
type IBadgeIconProps = React.ComponentPropsWithoutRef<typeof PrimitiveIcon> & VariantProps<typeof badgeIconStyle>;
|
|
157
|
+
|
|
158
|
+
const BadgeIcon = React.forwardRef<React.ElementRef<typeof UIIcon>, IBadgeIconProps>(
|
|
159
|
+
({ className, size, ...props }, ref) => {
|
|
160
|
+
const { size: parentSize, action: parentAction } = useStyleContext(SCOPE);
|
|
161
|
+
|
|
162
|
+
if (typeof size === 'number') {
|
|
163
|
+
return <UIIcon ref={ref} {...props} className={badgeIconStyle({ class: className })} size={size} />;
|
|
164
|
+
} else if ((props?.height !== undefined || props?.width !== undefined) && size === undefined) {
|
|
165
|
+
return <UIIcon ref={ref} {...props} className={badgeIconStyle({ class: className })} />;
|
|
166
|
+
}
|
|
167
|
+
return (
|
|
168
|
+
<UIIcon
|
|
169
|
+
className={badgeIconStyle({
|
|
170
|
+
parentVariants: {
|
|
171
|
+
size: parentSize,
|
|
172
|
+
action: parentAction,
|
|
173
|
+
},
|
|
174
|
+
size,
|
|
175
|
+
class: className,
|
|
176
|
+
})}
|
|
177
|
+
{...props}
|
|
178
|
+
ref={ref}
|
|
179
|
+
/>
|
|
180
|
+
);
|
|
181
|
+
},
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
Badge.displayName = 'Badge';
|
|
185
|
+
BadgeText.displayName = 'BadgeText';
|
|
186
|
+
BadgeIcon.displayName = 'BadgeIcon';
|
|
187
|
+
|
|
188
|
+
export { Badge, BadgeIcon, BadgeText };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { createButton } from '@gluestack-ui/button';
|
|
4
|
+
import { tva } from '@gluestack-ui/nativewind-utils/tva';
|
|
5
|
+
import { withStyleContext } from '@gluestack-ui/nativewind-utils/withStyleContext';
|
|
6
|
+
import { cssInterop } from 'nativewind';
|
|
7
|
+
import type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
8
|
+
|
|
9
|
+
const SCOPE = 'BUTTON';
|
|
10
|
+
|
|
11
|
+
const StyledButton = forwardRef<HTMLButtonElement, any>(({ onPress, onClick, disabled, ...props }, ref) => {
|
|
12
|
+
const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
13
|
+
if (onClick) {
|
|
14
|
+
onClick(e);
|
|
15
|
+
}
|
|
16
|
+
if (onPress) {
|
|
17
|
+
onPress(e);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return <button ref={ref} onClick={handleClick} disabled={disabled} {...props} />;
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
StyledButton.displayName = 'StyledButton';
|
|
25
|
+
|
|
26
|
+
const buttonStyle = tva({
|
|
27
|
+
base: 'px-4 py-2 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent',
|
|
28
|
+
variants: {
|
|
29
|
+
size: {
|
|
30
|
+
xs: 'px-2 py-1 text-xs',
|
|
31
|
+
sm: 'px-3 py-1.5 text-sm',
|
|
32
|
+
md: 'text-base',
|
|
33
|
+
lg: 'px-5 py-2.5 text-lg',
|
|
34
|
+
},
|
|
35
|
+
variant: {
|
|
36
|
+
solid: 'bg-blue-500 text-white hover:bg-blue-600',
|
|
37
|
+
outline: 'border border-blue-500 text-blue-500 hover:bg-blue-50',
|
|
38
|
+
ghost: 'text-blue-500 hover:bg-blue-50',
|
|
39
|
+
link: 'text-blue-500 hover:underline',
|
|
40
|
+
},
|
|
41
|
+
action: {
|
|
42
|
+
primary: 'bg-blue-500 text-white',
|
|
43
|
+
secondary: 'bg-gray-500 text-white',
|
|
44
|
+
positive: 'bg-green-500 text-white',
|
|
45
|
+
negative: 'bg-red-500 text-white',
|
|
46
|
+
},
|
|
47
|
+
state: {
|
|
48
|
+
loading: 'opacity-70 cursor-not-allowed',
|
|
49
|
+
disabled: 'opacity-50 cursor-not-allowed',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
size: 'md',
|
|
54
|
+
variant: 'solid',
|
|
55
|
+
action: 'primary',
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
type IButtonProps = React.ComponentProps<typeof StyledButton> &
|
|
60
|
+
VariantProps<typeof buttonStyle> & {
|
|
61
|
+
className?: string;
|
|
62
|
+
onPress?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
63
|
+
isDisabled?: boolean;
|
|
64
|
+
isLoading?: boolean;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const Button = React.forwardRef<HTMLButtonElement, IButtonProps>(
|
|
68
|
+
({ className, size, variant, action, state, isDisabled, isLoading, ...props }, ref) => {
|
|
69
|
+
const buttonState = {
|
|
70
|
+
state: isLoading ? ('loading' as const) : isDisabled ? ('disabled' as const) : undefined,
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<StyledButton
|
|
75
|
+
ref={ref}
|
|
76
|
+
className={buttonStyle({ size, variant, action, ...buttonState, class: className })}
|
|
77
|
+
disabled={isDisabled || isLoading}
|
|
78
|
+
{...props}
|
|
79
|
+
/>
|
|
80
|
+
);
|
|
81
|
+
},
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
Button.displayName = 'Button';
|
|
85
|
+
|
|
86
|
+
export { Button };
|