myshell-react-lib 0.1.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/README.md +268 -0
- package/dist/assets/audio-playing.json +3657 -0
- package/dist/index.cjs +9654 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1431 -0
- package/dist/index.d.ts +1431 -0
- package/dist/index.js +8788 -0
- package/dist/index.js.map +1 -0
- package/package.json +140 -0
- package/src/common/assets/audio-playing.json +3657 -0
- package/src/common/constants/constants.ts +24 -0
- package/src/common/constants/types/common.ts +10 -0
- package/src/common/hooks/useAudioPlayer.tsx +198 -0
- package/src/common/hooks/useDevice.ts +26 -0
- package/src/common/hooks/useNativeBridge.ts +42 -0
- package/src/common/hooks/useNotification.tsx +179 -0
- package/src/common/hooks/useWindowWidth.ts +19 -0
- package/src/common/utils/common-helper.ts +81 -0
- package/src/components/ItemDemo.tsx +15 -0
- package/src/components/accordion.tsx +126 -0
- package/src/components/alert-dialog.tsx +148 -0
- package/src/components/alert.tsx +65 -0
- package/src/components/aspect-ratio.tsx +7 -0
- package/src/components/audio-player.tsx +58 -0
- package/src/components/avatar.tsx +133 -0
- package/src/components/badge.tsx +65 -0
- package/src/components/button/button.styles.ts +258 -0
- package/src/components/button/button.tsx +215 -0
- package/src/components/button/icon-button.styles.ts +101 -0
- package/src/components/button/icon-button.tsx +100 -0
- package/src/components/button/index.tsx +3 -0
- package/src/components/button/link-button.tsx +184 -0
- package/src/components/cascader.tsx +175 -0
- package/src/components/checkbox.tsx +135 -0
- package/src/components/command.tsx +155 -0
- package/src/components/context-menu.tsx +198 -0
- package/src/components/count-down.tsx +83 -0
- package/src/components/custom-notification.tsx +95 -0
- package/src/components/dialog.tsx +158 -0
- package/src/components/drawer.tsx +116 -0
- package/src/components/dropdown-menu.tsx +196 -0
- package/src/components/energy-progress.tsx +55 -0
- package/src/components/form.tsx +201 -0
- package/src/components/group.tsx +9 -0
- package/src/components/guide.tsx +243 -0
- package/src/components/icon.tsx +89 -0
- package/src/components/icons/outline/DownIcon.tsx +18 -0
- package/src/components/icons/outline/FilterIcon.tsx +21 -0
- package/src/components/icons/outline/arrow-left.tsx +16 -0
- package/src/components/icons/outline/arrow-up-tray.tsx +16 -0
- package/src/components/icons/outline/check-circle.tsx +17 -0
- package/src/components/icons/outline/config.tsx +42 -0
- package/src/components/icons/outline/pencil-square.tsx +16 -0
- package/src/components/icons/outline/trash.tsx +17 -0
- package/src/components/icons/outline/window.tsx +16 -0
- package/src/components/icons/outline/x-circle.tsx +17 -0
- package/src/components/icons/outline/x-mark.tsx +16 -0
- package/src/components/icons/solid/audio-playing.tsx +31 -0
- package/src/components/icons/solid/caret-down.tsx +14 -0
- package/src/components/icons/solid/code.tsx +18 -0
- package/src/components/icons/solid/drag.tsx +14 -0
- package/src/components/icons/solid/phone.tsx +23 -0
- package/src/components/icons/solid/rectangle-group.tsx +14 -0
- package/src/components/image.tsx +151 -0
- package/src/components/input.tsx +118 -0
- package/src/components/label.tsx +26 -0
- package/src/components/link.tsx +123 -0
- package/src/components/marquee/index.css +15 -0
- package/src/components/marquee/marquee.tsx +220 -0
- package/src/components/masonry.tsx +138 -0
- package/src/components/menubar.tsx +234 -0
- package/src/components/mobile/m-tooltip.tsx +34 -0
- package/src/components/modal.tsx +561 -0
- package/src/components/navigation-bar.tsx +100 -0
- package/src/components/number-input.tsx +143 -0
- package/src/components/page-content.tsx +16 -0
- package/src/components/popover.tsx +191 -0
- package/src/components/progress.tsx +80 -0
- package/src/components/radio-group.tsx +44 -0
- package/src/components/scroll-area.tsx +49 -0
- package/src/components/search-bar.tsx +140 -0
- package/src/components/secondary-navigation-bar.tsx +307 -0
- package/src/components/select.tsx +273 -0
- package/src/components/separator.tsx +31 -0
- package/src/components/sheet.tsx +143 -0
- package/src/components/skeleton.tsx +20 -0
- package/src/components/slider.tsx +160 -0
- package/src/components/spinner.tsx +48 -0
- package/src/components/swiper/index.module.scss +88 -0
- package/src/components/swiper/index.tsx +319 -0
- package/src/components/switch.tsx +67 -0
- package/src/components/tabs.tsx +325 -0
- package/src/components/textarea.tsx +71 -0
- package/src/components/toast/toast.tsx +182 -0
- package/src/components/toast/toaster.tsx +160 -0
- package/src/components/toast/use-toast.tsx +248 -0
- package/src/components/toggle-group.tsx +64 -0
- package/src/components/toggle.tsx +46 -0
- package/src/components/tooltip.tsx +283 -0
- package/src/components/typography.tsx +437 -0
- package/src/index.ts +66 -0
- package/src/lib/utils.ts +62 -0
- package/src/stories/Accordion.stories.tsx +64 -0
- package/src/stories/AccordionItem.stories.tsx +48 -0
- package/src/stories/Avatar.stories.ts +58 -0
- package/src/stories/Badge.stories.tsx +40 -0
- package/src/stories/BannerSwiper.stories.tsx +102 -0
- package/src/stories/Button.stories.tsx +543 -0
- package/src/stories/Checkbox.stories.tsx +161 -0
- package/src/stories/Configure.mdx +341 -0
- package/src/stories/CssProperties.mdx +30 -0
- package/src/stories/Description.stories.ts +70 -0
- package/src/stories/Display.stories.ts +64 -0
- package/src/stories/FeaturedSwiper.stories.tsx +6978 -0
- package/src/stories/GridSwiper.stories.tsx +1407 -0
- package/src/stories/Guide.stories.tsx +247 -0
- package/src/stories/Heading.stories.ts +89 -0
- package/src/stories/Icon.stories.ts +77 -0
- package/src/stories/IconButton.stories.tsx +301 -0
- package/src/stories/IconTextButton.stories.ts +59 -0
- package/src/stories/Image.stories.ts +55 -0
- package/src/stories/Input.stories.tsx +203 -0
- package/src/stories/Modal.stories.tsx +144 -0
- package/src/stories/NavigationBar.stories.tsx +81 -0
- package/src/stories/Notification.stories.tsx +276 -0
- package/src/stories/Popover.stories.tsx +100 -0
- package/src/stories/SearchBar.stories.ts +43 -0
- package/src/stories/SecondaryNavigationBar.stories.tsx +199 -0
- package/src/stories/Select.stories.tsx +107 -0
- package/src/stories/Separator.stories.tsx +49 -0
- package/src/stories/Spinner.stories.tsx +48 -0
- package/src/stories/SubHeading.stories.ts +64 -0
- package/src/stories/Swich.stories.tsx +69 -0
- package/src/stories/Tabs.stories.tsx +90 -0
- package/src/stories/Text.stories.ts +78 -0
- package/src/stories/Textarea.stories.tsx +155 -0
- package/src/stories/Toast.stories.tsx +424 -0
- package/src/stories/Tooltip.stories.tsx +244 -0
- package/src/stories/ViewAutoSwiper.stories.tsx +1408 -0
- package/src/styles/components-dark.scss +212 -0
- package/src/styles/components-light.scss +210 -0
- package/src/styles/design-dark.scss +330 -0
- package/src/styles/design-light.scss +345 -0
- package/src/styles/design2-dark.scss +319 -0
- package/src/styles/design2-light.scss +364 -0
- package/src/styles/font.css +19 -0
- package/src/styles/global.scss +251 -0
- package/src/styles/md-viewer.scss +155 -0
- package/src/styles/new-tokens.scss +255 -0
- package/src/styles/tokens.scss +401 -0
- package/src/types/scss.d.ts +24 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
3
|
+
import { Check, ChevronRight, Circle } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import { cn } from '@/lib/utils';
|
|
6
|
+
|
|
7
|
+
const MenubarMenu = MenubarPrimitive.Menu;
|
|
8
|
+
|
|
9
|
+
const MenubarGroup = MenubarPrimitive.Group;
|
|
10
|
+
|
|
11
|
+
const MenubarPortal = MenubarPrimitive.Portal;
|
|
12
|
+
|
|
13
|
+
const MenubarSub = MenubarPrimitive.Sub;
|
|
14
|
+
|
|
15
|
+
const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
16
|
+
|
|
17
|
+
const Menubar = React.forwardRef<
|
|
18
|
+
React.ElementRef<typeof MenubarPrimitive.Root>,
|
|
19
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
|
|
20
|
+
>(({ className, ...props }, ref) => (
|
|
21
|
+
<MenubarPrimitive.Root
|
|
22
|
+
ref={ref}
|
|
23
|
+
className={cn(
|
|
24
|
+
'flex h-10 items-center space-x-1 rounded-md border border-slate-200 bg-white p-1 dark:border-slate-800 dark:bg-slate-950',
|
|
25
|
+
className
|
|
26
|
+
)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
));
|
|
30
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
31
|
+
|
|
32
|
+
const MenubarTrigger = React.forwardRef<
|
|
33
|
+
React.ElementRef<typeof MenubarPrimitive.Trigger>,
|
|
34
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
|
|
35
|
+
>(({ className, ...props }, ref) => (
|
|
36
|
+
<MenubarPrimitive.Trigger
|
|
37
|
+
ref={ref}
|
|
38
|
+
className={cn(
|
|
39
|
+
'flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-slate-100 focus:text-slate-900 data-[state=open]:bg-slate-100 data-[state=open]:text-slate-900 dark:focus:bg-slate-800 dark:focus:text-slate-50 dark:data-[state=open]:bg-slate-800 dark:data-[state=open]:text-slate-50',
|
|
40
|
+
className
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
));
|
|
45
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
46
|
+
|
|
47
|
+
const MenubarSubTrigger = React.forwardRef<
|
|
48
|
+
React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
|
|
49
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
|
|
50
|
+
inset?: boolean;
|
|
51
|
+
}
|
|
52
|
+
>(({ className, inset, children, ...props }, ref) => (
|
|
53
|
+
<MenubarPrimitive.SubTrigger
|
|
54
|
+
ref={ref}
|
|
55
|
+
className={cn(
|
|
56
|
+
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-slate-100 focus:text-slate-900 data-[state=open]:bg-slate-100 data-[state=open]:text-slate-900 dark:focus:bg-slate-800 dark:focus:text-slate-50 dark:data-[state=open]:bg-slate-800 dark:data-[state=open]:text-slate-50',
|
|
57
|
+
inset && 'pl-8',
|
|
58
|
+
className
|
|
59
|
+
)}
|
|
60
|
+
{...props}
|
|
61
|
+
>
|
|
62
|
+
{children}
|
|
63
|
+
<ChevronRight className="ml-auto h-4 w-4" />
|
|
64
|
+
</MenubarPrimitive.SubTrigger>
|
|
65
|
+
));
|
|
66
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
67
|
+
|
|
68
|
+
const MenubarSubContent = React.forwardRef<
|
|
69
|
+
React.ElementRef<typeof MenubarPrimitive.SubContent>,
|
|
70
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
|
|
71
|
+
>(({ className, ...props }, ref) => (
|
|
72
|
+
<MenubarPrimitive.SubContent
|
|
73
|
+
ref={ref}
|
|
74
|
+
className={cn(
|
|
75
|
+
'z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-200 bg-white p-1 text-slate-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50',
|
|
76
|
+
className
|
|
77
|
+
)}
|
|
78
|
+
{...props}
|
|
79
|
+
/>
|
|
80
|
+
));
|
|
81
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
82
|
+
|
|
83
|
+
const MenubarContent = React.forwardRef<
|
|
84
|
+
React.ElementRef<typeof MenubarPrimitive.Content>,
|
|
85
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
|
|
86
|
+
>(
|
|
87
|
+
(
|
|
88
|
+
{ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props },
|
|
89
|
+
ref
|
|
90
|
+
) => (
|
|
91
|
+
<MenubarPrimitive.Portal>
|
|
92
|
+
<MenubarPrimitive.Content
|
|
93
|
+
ref={ref}
|
|
94
|
+
align={align}
|
|
95
|
+
alignOffset={alignOffset}
|
|
96
|
+
sideOffset={sideOffset}
|
|
97
|
+
className={cn(
|
|
98
|
+
'z-50 min-w-[12rem] overflow-hidden rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50',
|
|
99
|
+
className
|
|
100
|
+
)}
|
|
101
|
+
{...props}
|
|
102
|
+
/>
|
|
103
|
+
</MenubarPrimitive.Portal>
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
107
|
+
|
|
108
|
+
const MenubarItem = React.forwardRef<
|
|
109
|
+
React.ElementRef<typeof MenubarPrimitive.Item>,
|
|
110
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
|
|
111
|
+
inset?: boolean;
|
|
112
|
+
}
|
|
113
|
+
>(({ className, inset, ...props }, ref) => (
|
|
114
|
+
<MenubarPrimitive.Item
|
|
115
|
+
ref={ref}
|
|
116
|
+
className={cn(
|
|
117
|
+
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50',
|
|
118
|
+
inset && 'pl-8',
|
|
119
|
+
className
|
|
120
|
+
)}
|
|
121
|
+
{...props}
|
|
122
|
+
/>
|
|
123
|
+
));
|
|
124
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
125
|
+
|
|
126
|
+
const MenubarCheckboxItem = React.forwardRef<
|
|
127
|
+
React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
|
|
128
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
|
|
129
|
+
>(({ className, children, checked, ...props }, ref) => (
|
|
130
|
+
<MenubarPrimitive.CheckboxItem
|
|
131
|
+
ref={ref}
|
|
132
|
+
className={cn(
|
|
133
|
+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50',
|
|
134
|
+
className
|
|
135
|
+
)}
|
|
136
|
+
checked={checked}
|
|
137
|
+
{...props}
|
|
138
|
+
>
|
|
139
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
140
|
+
<MenubarPrimitive.ItemIndicator>
|
|
141
|
+
<Check className="h-4 w-4" />
|
|
142
|
+
</MenubarPrimitive.ItemIndicator>
|
|
143
|
+
</span>
|
|
144
|
+
{children}
|
|
145
|
+
</MenubarPrimitive.CheckboxItem>
|
|
146
|
+
));
|
|
147
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
148
|
+
|
|
149
|
+
const MenubarRadioItem = React.forwardRef<
|
|
150
|
+
React.ElementRef<typeof MenubarPrimitive.RadioItem>,
|
|
151
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
|
|
152
|
+
>(({ className, children, ...props }, ref) => (
|
|
153
|
+
<MenubarPrimitive.RadioItem
|
|
154
|
+
ref={ref}
|
|
155
|
+
className={cn(
|
|
156
|
+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50',
|
|
157
|
+
className
|
|
158
|
+
)}
|
|
159
|
+
{...props}
|
|
160
|
+
>
|
|
161
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
162
|
+
<MenubarPrimitive.ItemIndicator>
|
|
163
|
+
<Circle className="h-2 w-2 fill-current" />
|
|
164
|
+
</MenubarPrimitive.ItemIndicator>
|
|
165
|
+
</span>
|
|
166
|
+
{children}
|
|
167
|
+
</MenubarPrimitive.RadioItem>
|
|
168
|
+
));
|
|
169
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
170
|
+
|
|
171
|
+
const MenubarLabel = React.forwardRef<
|
|
172
|
+
React.ElementRef<typeof MenubarPrimitive.Label>,
|
|
173
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
|
|
174
|
+
inset?: boolean;
|
|
175
|
+
}
|
|
176
|
+
>(({ className, inset, ...props }, ref) => (
|
|
177
|
+
<MenubarPrimitive.Label
|
|
178
|
+
ref={ref}
|
|
179
|
+
className={cn(
|
|
180
|
+
'px-2 py-1.5 text-sm font-semibold',
|
|
181
|
+
inset && 'pl-8',
|
|
182
|
+
className
|
|
183
|
+
)}
|
|
184
|
+
{...props}
|
|
185
|
+
/>
|
|
186
|
+
));
|
|
187
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
188
|
+
|
|
189
|
+
const MenubarSeparator = React.forwardRef<
|
|
190
|
+
React.ElementRef<typeof MenubarPrimitive.Separator>,
|
|
191
|
+
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
|
|
192
|
+
>(({ className, ...props }, ref) => (
|
|
193
|
+
<MenubarPrimitive.Separator
|
|
194
|
+
ref={ref}
|
|
195
|
+
className={cn('-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-800', className)}
|
|
196
|
+
{...props}
|
|
197
|
+
/>
|
|
198
|
+
));
|
|
199
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
200
|
+
|
|
201
|
+
const MenubarShortcut = ({
|
|
202
|
+
className,
|
|
203
|
+
...props
|
|
204
|
+
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
205
|
+
return (
|
|
206
|
+
<span
|
|
207
|
+
className={cn(
|
|
208
|
+
'ml-auto text-xs tracking-widest text-slate-500 dark:text-slate-400',
|
|
209
|
+
className
|
|
210
|
+
)}
|
|
211
|
+
{...props}
|
|
212
|
+
/>
|
|
213
|
+
);
|
|
214
|
+
};
|
|
215
|
+
MenubarShortcut.displayname = 'MenubarShortcut';
|
|
216
|
+
|
|
217
|
+
export {
|
|
218
|
+
Menubar,
|
|
219
|
+
MenubarMenu,
|
|
220
|
+
MenubarTrigger,
|
|
221
|
+
MenubarContent,
|
|
222
|
+
MenubarItem,
|
|
223
|
+
MenubarSeparator,
|
|
224
|
+
MenubarLabel,
|
|
225
|
+
MenubarCheckboxItem,
|
|
226
|
+
MenubarRadioGroup,
|
|
227
|
+
MenubarRadioItem,
|
|
228
|
+
MenubarPortal,
|
|
229
|
+
MenubarSubContent,
|
|
230
|
+
MenubarSubTrigger,
|
|
231
|
+
MenubarGroup,
|
|
232
|
+
MenubarSub,
|
|
233
|
+
MenubarShortcut,
|
|
234
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
|
|
6
|
+
import { cn } from '@/lib/utils';
|
|
7
|
+
|
|
8
|
+
const MTooltip = PopoverPrimitive.Root;
|
|
9
|
+
|
|
10
|
+
const MTooltipTrigger = PopoverPrimitive.Trigger;
|
|
11
|
+
|
|
12
|
+
const MTooltipArrow = PopoverPrimitive.Arrow;
|
|
13
|
+
|
|
14
|
+
const MTooltipContent = React.forwardRef<
|
|
15
|
+
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
16
|
+
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
17
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
+
<PopoverPrimitive.Portal>
|
|
19
|
+
<PopoverPrimitive.Content
|
|
20
|
+
ref={ref}
|
|
21
|
+
align="center"
|
|
22
|
+
side="top"
|
|
23
|
+
sideOffset={sideOffset}
|
|
24
|
+
className={cn(
|
|
25
|
+
'z-50 rounded-lg border border-opaque bg-Colors-Background-Normal-Primary-Default px-3 py-2 text-xs text-Colors-Text-Subtle shadow-modal-default outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
26
|
+
className
|
|
27
|
+
)}
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
</PopoverPrimitive.Portal>
|
|
31
|
+
));
|
|
32
|
+
MTooltipContent.displayName = PopoverPrimitive.Content.displayName;
|
|
33
|
+
|
|
34
|
+
export { MTooltip, MTooltipTrigger, MTooltipContent, MTooltipArrow };
|