@modul/mbui 0.0.2-beta-storybook-9d462616 → 0.0.2-beta-pv-52768-9b2131f6
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/package.json +25 -2
- package/src/@/config/button.ts +89 -0
- package/src/@/config/index.ts +99 -0
- package/src/@/lib/utils.ts +7 -0
- package/src/Audio/Audio.styl +115 -0
- package/src/Audio/Audio.tsx +359 -0
- package/src/Audio/index.ts +4 -0
- package/src/Audio/types.ts +40 -0
- package/src/Base/Buttons/Button.tsx +66 -41
- package/src/Base/Buttons/index.ts +2 -1
- package/src/Base/Input/Base.tsx +35 -0
- package/src/Base/Input/Input.tsx +31 -11
- package/src/Base/Input/types.ts +3 -2
- package/src/Collapse/Collapse.tsx +88 -0
- package/src/Collapse/ant-collapse.styl +93 -0
- package/src/Collapse/index.ts +5 -0
- package/src/Input-OTP/Input.tsx +71 -0
- package/src/Input-OTP/index.ts +3 -0
- package/src/Logo/Logo.tsx +16 -0
- package/src/Logo/index.ts +3 -0
- package/src/Popover/Popover.tsx +42 -0
- package/src/Popover/index.ts +5 -0
- package/src/Slider/Slider.tsx +21 -0
- package/src/Slider/index.ts +4 -0
- package/src/Slider/slider.styl +62 -0
- package/src/Tabs/Tabs.tsx +63 -0
- package/src/Tabs/ant-tabs.styl +91 -0
- package/src/Tabs/index.ts +5 -0
- package/src/Tooltip/Tooltip.tsx +47 -0
- package/src/Tooltip/index.ts +5 -0
- package/src/assets/css/global.css +125 -0
- package/src/assets/fonts/Roboto-Italic.ttf +0 -0
- package/src/assets/fonts/Roboto-Italic.woff2 +0 -0
- package/src/assets/fonts/Roboto.ttf +0 -0
- package/src/assets/fonts/Roboto.woff2 +0 -0
- package/src/assets/images/logo/bank/emblem-white.svg +1 -0
- package/src/assets/images/logo/bank/emblem.svg +1 -0
- package/src/assets/images/logo/bank/logo-white.svg +1 -0
- package/src/assets/images/logo/bank/logo.svg +1 -0
- package/src/assets/images/logo/garant/emblem-white.svg +1 -0
- package/src/assets/images/logo/garant/emblem.svg +1 -0
- package/src/assets/images/logo/garant/logo-white.svg +1 -0
- package/src/assets/images/logo/garant/logo.svg +1 -0
- package/src/assets/images/logo/kassa/emblem-white.svg +1 -0
- package/src/assets/images/logo/kassa/emblem.svg +1 -0
- package/src/assets/images/logo/kassa/logo-white.svg +1 -0
- package/src/assets/images/logo/kassa/logo.svg +1 -0
- package/src/components/BottonNavigation/BottonNavigation.tsx +55 -0
- package/src/components/BottonNavigation/index.ts +6 -0
- package/src/components/SvgIcon/SvgIcon.tsx +32 -0
- package/src/components/SvgIcon/icons/AddList.tsx +18 -0
- package/src/components/SvgIcon/icons/AlertCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/AlertCircleSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/AlertDiamond.tsx +18 -0
- package/src/components/SvgIcon/icons/AlertDiamondSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/AlertShield.tsx +18 -0
- package/src/components/SvgIcon/icons/Android.tsx +18 -0
- package/src/components/SvgIcon/icons/Apple.tsx +18 -0
- package/src/components/SvgIcon/icons/Archive.tsx +18 -0
- package/src/components/SvgIcon/icons/ArrowCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/ArrowDown.tsx +18 -0
- package/src/components/SvgIcon/icons/ArrowLeft.tsx +18 -0
- package/src/components/SvgIcon/icons/ArrowRight.tsx +18 -0
- package/src/components/SvgIcon/icons/ArrowUp.tsx +18 -0
- package/src/components/SvgIcon/icons/ArrowUpCorner.tsx +18 -0
- package/src/components/SvgIcon/icons/ArrowsChange.tsx +18 -0
- package/src/components/SvgIcon/icons/Atm.tsx +18 -0
- package/src/components/SvgIcon/icons/Attach.tsx +18 -0
- package/src/components/SvgIcon/icons/Bank.tsx +18 -0
- package/src/components/SvgIcon/icons/Bold.tsx +18 -0
- package/src/components/SvgIcon/icons/Bonus.tsx +18 -0
- package/src/components/SvgIcon/icons/Building.tsx +18 -0
- package/src/components/SvgIcon/icons/Calendar.tsx +18 -0
- package/src/components/SvgIcon/icons/CalendarCancel.tsx +18 -0
- package/src/components/SvgIcon/icons/Call.tsx +18 -0
- package/src/components/SvgIcon/icons/CallEnd.tsx +18 -0
- package/src/components/SvgIcon/icons/CallMissed.tsx +18 -0
- package/src/components/SvgIcon/icons/Callback.tsx +18 -0
- package/src/components/SvgIcon/icons/Camera.tsx +18 -0
- package/src/components/SvgIcon/icons/Cancel.tsx +18 -0
- package/src/components/SvgIcon/icons/CancelSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Card.tsx +18 -0
- package/src/components/SvgIcon/icons/CardLock.tsx +18 -0
- package/src/components/SvgIcon/icons/CardRefill.tsx +18 -0
- package/src/components/SvgIcon/icons/CardReissue.tsx +18 -0
- package/src/components/SvgIcon/icons/CardScan.tsx +18 -0
- package/src/components/SvgIcon/icons/CardToCard.tsx +18 -0
- package/src/components/SvgIcon/icons/CardUnlock.tsx +18 -0
- package/src/components/SvgIcon/icons/Change.tsx +18 -0
- package/src/components/SvgIcon/icons/Chart.tsx +18 -0
- package/src/components/SvgIcon/icons/Chat.tsx +18 -0
- package/src/components/SvgIcon/icons/ChatSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Check.tsx +18 -0
- package/src/components/SvgIcon/icons/CheckCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/CheckCircleSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/CheckShield.tsx +20 -0
- package/src/components/SvgIcon/icons/CheckSmall.tsx +18 -0
- package/src/components/SvgIcon/icons/Checklist.tsx +18 -0
- package/src/components/SvgIcon/icons/Circle.tsx +18 -0
- package/src/components/SvgIcon/icons/Clock.tsx +18 -0
- package/src/components/SvgIcon/icons/Close.tsx +18 -0
- package/src/components/SvgIcon/icons/Coins.tsx +18 -0
- package/src/components/SvgIcon/icons/Collapse.tsx +18 -0
- package/src/components/SvgIcon/icons/Copy.tsx +18 -0
- package/src/components/SvgIcon/icons/Cup.tsx +18 -0
- package/src/components/SvgIcon/icons/CurrencyChange.tsx +18 -0
- package/src/components/SvgIcon/icons/CurrencyTransfer.tsx +18 -0
- package/src/components/SvgIcon/icons/Deposit.tsx +18 -0
- package/src/components/SvgIcon/icons/Diamond.tsx +18 -0
- package/src/components/SvgIcon/icons/Dislike.tsx +18 -0
- package/src/components/SvgIcon/icons/DislikeSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Doc.tsx +18 -0
- package/src/components/SvgIcon/icons/DocCancel.tsx +18 -0
- package/src/components/SvgIcon/icons/Dollar.tsx +18 -0
- package/src/components/SvgIcon/icons/DoubleArrow.tsx +18 -0
- package/src/components/SvgIcon/icons/DoubleTick.tsx +18 -0
- package/src/components/SvgIcon/icons/Download.tsx +18 -0
- package/src/components/SvgIcon/icons/Dropdown.tsx +18 -0
- package/src/components/SvgIcon/icons/DropdownSmallOld.tsx +20 -0
- package/src/components/SvgIcon/icons/Dropup.tsx +18 -0
- package/src/components/SvgIcon/icons/Edit.tsx +18 -0
- package/src/components/SvgIcon/icons/Email.tsx +18 -0
- package/src/components/SvgIcon/icons/Excel.tsx +18 -0
- package/src/components/SvgIcon/icons/Expand.tsx +18 -0
- package/src/components/SvgIcon/icons/Eye.tsx +18 -0
- package/src/components/SvgIcon/icons/EyeOff.tsx +18 -0
- package/src/components/SvgIcon/icons/Favorite.tsx +18 -0
- package/src/components/SvgIcon/icons/FavoriteSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Fb.tsx +18 -0
- package/src/components/SvgIcon/icons/FbCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/File.tsx +18 -0
- package/src/components/SvgIcon/icons/FileAdd.tsx +18 -0
- package/src/components/SvgIcon/icons/Files.tsx +18 -0
- package/src/components/SvgIcon/icons/Filter.tsx +18 -0
- package/src/components/SvgIcon/icons/Folder.tsx +18 -0
- package/src/components/SvgIcon/icons/Geolocation.tsx +18 -0
- package/src/components/SvgIcon/icons/Gift.tsx +18 -0
- package/src/components/SvgIcon/icons/Globe.tsx +18 -0
- package/src/components/SvgIcon/icons/Heart.tsx +18 -0
- package/src/components/SvgIcon/icons/HeartSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Help.tsx +18 -0
- package/src/components/SvgIcon/icons/Home.tsx +18 -0
- package/src/components/SvgIcon/icons/Housing.tsx +18 -0
- package/src/components/SvgIcon/icons/Ig.tsx +18 -0
- package/src/components/SvgIcon/icons/IgCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/Info.tsx +18 -0
- package/src/components/SvgIcon/icons/InfoBook.tsx +18 -0
- package/src/components/SvgIcon/icons/InfoSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Italic.tsx +18 -0
- package/src/components/SvgIcon/icons/Key.tsx +18 -0
- package/src/components/SvgIcon/icons/Left.tsx +18 -0
- package/src/components/SvgIcon/icons/Lightbulb.tsx +18 -0
- package/src/components/SvgIcon/icons/Like.tsx +18 -0
- package/src/components/SvgIcon/icons/LikeSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Link.tsx +18 -0
- package/src/components/SvgIcon/icons/Lock.tsx +18 -0
- package/src/components/SvgIcon/icons/Logout.tsx +18 -0
- package/src/components/SvgIcon/icons/MagicWand.tsx +18 -0
- package/src/components/SvgIcon/icons/Mail.tsx +18 -0
- package/src/components/SvgIcon/icons/MailSend.tsx +18 -0
- package/src/components/SvgIcon/icons/Map.tsx +18 -0
- package/src/components/SvgIcon/icons/MapPin.tsx +18 -0
- package/src/components/SvgIcon/icons/Menu.tsx +18 -0
- package/src/components/SvgIcon/icons/Mic.tsx +18 -0
- package/src/components/SvgIcon/icons/MicOff.tsx +18 -0
- package/src/components/SvgIcon/icons/Minus.tsx +18 -0
- package/src/components/SvgIcon/icons/MinusCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/MinusShort.tsx +18 -0
- package/src/components/SvgIcon/icons/Moneybox.tsx +18 -0
- package/src/components/SvgIcon/icons/More.tsx +18 -0
- package/src/components/SvgIcon/icons/Move.tsx +18 -0
- package/src/components/SvgIcon/icons/Newbie.tsx +20 -0
- package/src/components/SvgIcon/icons/News.tsx +18 -0
- package/src/components/SvgIcon/icons/Notes.tsx +18 -0
- package/src/components/SvgIcon/icons/Notification.tsx +18 -0
- package/src/components/SvgIcon/icons/Ok.tsx +18 -0
- package/src/components/SvgIcon/icons/OkCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/Order.tsx +18 -0
- package/src/components/SvgIcon/icons/OrderLoad.tsx +18 -0
- package/src/components/SvgIcon/icons/OrderSend.tsx +18 -0
- package/src/components/SvgIcon/icons/Pause.tsx +18 -0
- package/src/components/SvgIcon/icons/PauseCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/Payment.tsx +18 -0
- package/src/components/SvgIcon/icons/PhoneShake.tsx +18 -0
- package/src/components/SvgIcon/icons/Play.tsx +18 -0
- package/src/components/SvgIcon/icons/PlaySolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Plus.tsx +18 -0
- package/src/components/SvgIcon/icons/PlusCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/Pos.tsx +18 -0
- package/src/components/SvgIcon/icons/Print.tsx +18 -0
- package/src/components/SvgIcon/icons/QrPay.tsx +18 -0
- package/src/components/SvgIcon/icons/Redirect.tsx +18 -0
- package/src/components/SvgIcon/icons/Refill.tsx +18 -0
- package/src/components/SvgIcon/icons/Refund.tsx +18 -0
- package/src/components/SvgIcon/icons/Reload.tsx +18 -0
- package/src/components/SvgIcon/icons/Reply.tsx +18 -0
- package/src/components/SvgIcon/icons/ReplyShape.tsx +18 -0
- package/src/components/SvgIcon/icons/ReplyShapeSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Request.tsx +18 -0
- package/src/components/SvgIcon/icons/Right.tsx +18 -0
- package/src/components/SvgIcon/icons/Route.tsx +18 -0
- package/src/components/SvgIcon/icons/Ruble.tsx +18 -0
- package/src/components/SvgIcon/icons/Sbp.tsx +18 -0
- package/src/components/SvgIcon/icons/Search.tsx +18 -0
- package/src/components/SvgIcon/icons/Send.tsx +18 -0
- package/src/components/SvgIcon/icons/Services.tsx +18 -0
- package/src/components/SvgIcon/icons/Settings.tsx +18 -0
- package/src/components/SvgIcon/icons/Share.tsx +18 -0
- package/src/components/SvgIcon/icons/ShoppingCart.tsx +18 -0
- package/src/components/SvgIcon/icons/Sign.tsx +18 -0
- package/src/components/SvgIcon/icons/SlotMachine.tsx +18 -0
- package/src/components/SvgIcon/icons/SortDown.tsx +18 -0
- package/src/components/SvgIcon/icons/SortDownSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/SortUp.tsx +18 -0
- package/src/components/SvgIcon/icons/SortUpSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Stop.tsx +18 -0
- package/src/components/SvgIcon/icons/Support.tsx +18 -0
- package/src/components/SvgIcon/icons/Sync.tsx +18 -0
- package/src/components/SvgIcon/icons/Table.tsx +18 -0
- package/src/components/SvgIcon/icons/Tariffs.tsx +18 -0
- package/src/components/SvgIcon/icons/Tg.tsx +18 -0
- package/src/components/SvgIcon/icons/TgCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/Timeout.tsx +18 -0
- package/src/components/SvgIcon/icons/Timer.tsx +18 -0
- package/src/components/SvgIcon/icons/Trash.tsx +18 -0
- package/src/components/SvgIcon/icons/TurnOff.tsx +18 -0
- package/src/components/SvgIcon/icons/Twitter.tsx +18 -0
- package/src/components/SvgIcon/icons/TwitterCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/Underline.tsx +18 -0
- package/src/components/SvgIcon/icons/Unlink.tsx +18 -0
- package/src/components/SvgIcon/icons/Unsorted.tsx +18 -0
- package/src/components/SvgIcon/icons/UnsortedSolid.tsx +18 -0
- package/src/components/SvgIcon/icons/Upload.tsx +18 -0
- package/src/components/SvgIcon/icons/User.tsx +18 -0
- package/src/components/SvgIcon/icons/UserAdd.tsx +18 -0
- package/src/components/SvgIcon/icons/UserCard.tsx +18 -0
- package/src/components/SvgIcon/icons/UserEdit.tsx +18 -0
- package/src/components/SvgIcon/icons/UserQueue.tsx +18 -0
- package/src/components/SvgIcon/icons/Viber.tsx +18 -0
- package/src/components/SvgIcon/icons/ViberCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/ViewGrid.tsx +18 -0
- package/src/components/SvgIcon/icons/ViewHorizontal.tsx +18 -0
- package/src/components/SvgIcon/icons/ViewList.tsx +18 -0
- package/src/components/SvgIcon/icons/ViewRows.tsx +18 -0
- package/src/components/SvgIcon/icons/ViewVertical.tsx +18 -0
- package/src/components/SvgIcon/icons/Vk.tsx +18 -0
- package/src/components/SvgIcon/icons/VkCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/Wallet.tsx +18 -0
- package/src/components/SvgIcon/icons/Warning.tsx +18 -0
- package/src/components/SvgIcon/icons/WarningClean.tsx +18 -0
- package/src/components/SvgIcon/icons/Whatsapp.tsx +18 -0
- package/src/components/SvgIcon/icons/WhatsappCircle.tsx +18 -0
- package/src/components/SvgIcon/icons/Wheelchair.tsx +18 -0
- package/src/components/SvgIcon/icons/index.ts +203 -0
- package/src/components/SvgIcon/index.ts +1 -0
- package/src/DatePicker/DatePicker.styl +0 -5
- package/src/DatePicker/index.tsx +0 -5
- package/src/DatePicker/test.ts +0 -0
- package/src/index.ts +0 -6
- package/src/stories/DatePicker/DatePicker.stories.tsx +0 -47
- package/src/stories/Input/Input.stories.tsx +0 -30
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import cn from 'classnames'
|
|
3
|
+
import * as Accordion from '@radix-ui/react-accordion'
|
|
4
|
+
import {
|
|
5
|
+
AccordionMultipleProps,
|
|
6
|
+
AccordionSingleProps,
|
|
7
|
+
AccordionContent,
|
|
8
|
+
AccordionHeader,
|
|
9
|
+
AccordionItem,
|
|
10
|
+
AccordionTrigger
|
|
11
|
+
} from "@radix-ui/react-accordion";
|
|
12
|
+
|
|
13
|
+
type CollapseComponents = {
|
|
14
|
+
Item: typeof AccordionItem,
|
|
15
|
+
Header: typeof AccordionHeader,
|
|
16
|
+
Trigger: typeof AccordionTrigger,
|
|
17
|
+
Content: typeof AccordionContent,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const Collapse: React.FC<AccordionSingleProps | AccordionMultipleProps> & CollapseComponents = ({...props}) => <Accordion.Root {...props}/>
|
|
21
|
+
|
|
22
|
+
const CollapseItem = React.forwardRef<
|
|
23
|
+
React.ElementRef<typeof Accordion.Item>,
|
|
24
|
+
React.ComponentPropsWithoutRef<typeof Accordion.Item>
|
|
25
|
+
>(({ className, ...props }, ref) => (
|
|
26
|
+
<Accordion.Item
|
|
27
|
+
ref={ref}
|
|
28
|
+
className={cn('border-b', className)}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
))
|
|
32
|
+
|
|
33
|
+
const CollapseHeader = React.forwardRef<
|
|
34
|
+
React.ElementRef<typeof Accordion.Header>,
|
|
35
|
+
React.ComponentPropsWithoutRef<typeof Accordion.Header>
|
|
36
|
+
>(({ className, children, ...props }, ref) => (
|
|
37
|
+
<Accordion.Header
|
|
38
|
+
className={cn('flex', className)}
|
|
39
|
+
{...props}
|
|
40
|
+
ref={ref}
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</Accordion.Header>
|
|
44
|
+
))
|
|
45
|
+
|
|
46
|
+
const CollapseTrigger = React.forwardRef<
|
|
47
|
+
React.ElementRef<typeof Accordion.Trigger>,
|
|
48
|
+
React.ComponentPropsWithoutRef<typeof Accordion.Trigger>
|
|
49
|
+
>(({ className, children, ...props }, ref) => (
|
|
50
|
+
<Accordion.Trigger
|
|
51
|
+
ref={ref}
|
|
52
|
+
className={cn(
|
|
53
|
+
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
|
|
54
|
+
className
|
|
55
|
+
)}
|
|
56
|
+
{...props}
|
|
57
|
+
>
|
|
58
|
+
{children}
|
|
59
|
+
{/*<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />*/}
|
|
60
|
+
</Accordion.Trigger>
|
|
61
|
+
))
|
|
62
|
+
|
|
63
|
+
const CollapseContent = React.forwardRef<
|
|
64
|
+
React.ElementRef<typeof Accordion.Content>,
|
|
65
|
+
React.ComponentPropsWithoutRef<typeof Accordion.Content>
|
|
66
|
+
>(({ className, children, ...props }, ref) => (
|
|
67
|
+
<Accordion.Content
|
|
68
|
+
ref={ref}
|
|
69
|
+
className={cn(
|
|
70
|
+
'overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down',
|
|
71
|
+
className
|
|
72
|
+
)}
|
|
73
|
+
{...props}
|
|
74
|
+
>
|
|
75
|
+
{children}
|
|
76
|
+
</Accordion.Content>
|
|
77
|
+
))
|
|
78
|
+
|
|
79
|
+
Collapse.Item = CollapseItem
|
|
80
|
+
CollapseItem.displayName = "CollapseItem"
|
|
81
|
+
Collapse.Header = CollapseHeader
|
|
82
|
+
CollapseHeader.displayName = "CollapseHeader"
|
|
83
|
+
Collapse.Trigger = CollapseTrigger
|
|
84
|
+
CollapseTrigger.displayName = "CollapseTrigger"
|
|
85
|
+
Collapse.Content = CollapseContent
|
|
86
|
+
CollapseContent.displayName = "CollapseContent"
|
|
87
|
+
|
|
88
|
+
export default Collapse
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@require '../../../Markup.Common/markup/stylus/variables'
|
|
2
|
+
|
|
3
|
+
$prefix-collapse = ant-collapse;
|
|
4
|
+
|
|
5
|
+
// Блок аккордеона
|
|
6
|
+
.{$prefix-collapse}-item
|
|
7
|
+
background-color $cl-graphite-7
|
|
8
|
+
border-radius 4px
|
|
9
|
+
&:hover
|
|
10
|
+
.{$prefix-collapse}-header
|
|
11
|
+
background-color lighten($cl-graphite-6, 20%)
|
|
12
|
+
|
|
13
|
+
& + .{$prefix-collapse}-item
|
|
14
|
+
margin-top 12px
|
|
15
|
+
|
|
16
|
+
// Открытый аккордеон
|
|
17
|
+
.{$prefix-collapse}-item-active
|
|
18
|
+
.{$prefix-collapse}-header
|
|
19
|
+
&::after
|
|
20
|
+
transform rotate(180deg)
|
|
21
|
+
|
|
22
|
+
// Отключенный аккордеон
|
|
23
|
+
.{$prefix-collapse}-item-disabled
|
|
24
|
+
&:hover
|
|
25
|
+
.{$prefix-collapse}-header
|
|
26
|
+
background-color $cl-graphite-7
|
|
27
|
+
|
|
28
|
+
&::after
|
|
29
|
+
color $cl-text-light
|
|
30
|
+
|
|
31
|
+
.{$prefix-collapse}-header
|
|
32
|
+
color $cl-text-disabled
|
|
33
|
+
cursor default
|
|
34
|
+
&:hover
|
|
35
|
+
&::after
|
|
36
|
+
color $cl-text-light
|
|
37
|
+
|
|
38
|
+
&::after
|
|
39
|
+
color $cl-text-disabled
|
|
40
|
+
|
|
41
|
+
// Шапка аккордеона
|
|
42
|
+
.{$prefix-collapse}-header
|
|
43
|
+
padding 12px 56px 12px 24px
|
|
44
|
+
box-sizing border-box
|
|
45
|
+
overflow hidden
|
|
46
|
+
white-space nowrap
|
|
47
|
+
text-overflow ellipsis
|
|
48
|
+
font-weight $fw-medium
|
|
49
|
+
transition .2s
|
|
50
|
+
cursor pointer
|
|
51
|
+
&:hover
|
|
52
|
+
&::after
|
|
53
|
+
color $cl-text
|
|
54
|
+
|
|
55
|
+
// Стрелка
|
|
56
|
+
&::after
|
|
57
|
+
position absolute
|
|
58
|
+
top 6px
|
|
59
|
+
right 12px
|
|
60
|
+
display flex
|
|
61
|
+
justify-content center
|
|
62
|
+
align-items center
|
|
63
|
+
width 32px
|
|
64
|
+
height @width
|
|
65
|
+
font-icon 'dropdown'
|
|
66
|
+
font-size 12px
|
|
67
|
+
color $cl-text-light
|
|
68
|
+
transition transform .2s
|
|
69
|
+
|
|
70
|
+
.anticon
|
|
71
|
+
display none
|
|
72
|
+
|
|
73
|
+
// Обертка контента аккордеона
|
|
74
|
+
.{$prefix-collapse}-content
|
|
75
|
+
border-top 1px solid $cl-graphite-6
|
|
76
|
+
|
|
77
|
+
// Контент аккордеона
|
|
78
|
+
.{$prefix-collapse}-content-box
|
|
79
|
+
padding 24px 20px
|
|
80
|
+
box-sizing border-box
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
// АНИМАЦИЯ
|
|
84
|
+
.ant-motion-collapse
|
|
85
|
+
overflow hidden
|
|
86
|
+
|
|
87
|
+
.ant-motion-collapse-active
|
|
88
|
+
.{$prefix-collapse}-content-inactive
|
|
89
|
+
transition height .25s cubic-bezier(.075, .82, .165, 1),
|
|
90
|
+
opacity .25s cubic-bezier(.075, .82, .165, 1) !important
|
|
91
|
+
|
|
92
|
+
.{$prefix-collapse}-content-inactive
|
|
93
|
+
display none
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { OTPInput, OTPInputContext } from 'input-otp'
|
|
3
|
+
import { cn } from '../@/lib/utils'
|
|
4
|
+
// import { cn } from "@/lib/utils" порешать с алиасами
|
|
5
|
+
|
|
6
|
+
const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(
|
|
7
|
+
({ className, containerClassName, ...props }, ref) => (
|
|
8
|
+
<OTPInput
|
|
9
|
+
ref={ref}
|
|
10
|
+
containerClassName={cn('flex items-center has-[:disabled]:opacity-50', containerClassName)}
|
|
11
|
+
className={cn('disabled:cursor-not-allowed', className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
15
|
+
)
|
|
16
|
+
InputOTP.displayName = 'InputOTP'
|
|
17
|
+
|
|
18
|
+
const InputOTPGroup = React.forwardRef<React.ElementRef<'div'>, React.ComponentPropsWithoutRef<'div'>>(
|
|
19
|
+
({ className, ...props }, ref) => (
|
|
20
|
+
<div
|
|
21
|
+
ref={ref}
|
|
22
|
+
className={cn('flex items-center', className)}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
InputOTPGroup.displayName = 'InputOTPGroup'
|
|
28
|
+
|
|
29
|
+
const InputOTPSlot = React.forwardRef<
|
|
30
|
+
React.ElementRef<'div'>,
|
|
31
|
+
React.ComponentPropsWithoutRef<'div'> & { index: number }
|
|
32
|
+
>(({ index, className, ...props }, ref) => {
|
|
33
|
+
const inputOTPContext = React.useContext(OTPInputContext)
|
|
34
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<div
|
|
38
|
+
ref={ref}
|
|
39
|
+
className={cn(
|
|
40
|
+
'relative flex h-[48px] w-[20px] items-center justify-center border-b-[2px] border-input transition-all',
|
|
41
|
+
isActive && 'z-10 ring-2 ring-ring ring-offset-background',
|
|
42
|
+
className
|
|
43
|
+
)}
|
|
44
|
+
{...props}
|
|
45
|
+
>
|
|
46
|
+
{/* {char && <span className='bg-black rounded-full w-[8px] h-[8px]'></span>} */}
|
|
47
|
+
{char}
|
|
48
|
+
{hasFakeCaret && (
|
|
49
|
+
<div className="absolute inset-0 flex justify-center items-center pointer-events-none">
|
|
50
|
+
<div className="bg-foreground w-px h-4 animate-caret-blink duration-1000" />
|
|
51
|
+
</div>
|
|
52
|
+
)}
|
|
53
|
+
</div>
|
|
54
|
+
)
|
|
55
|
+
})
|
|
56
|
+
InputOTPSlot.displayName = 'InputOTPSlot'
|
|
57
|
+
|
|
58
|
+
const InputOTPSeparator = React.forwardRef<React.ElementRef<'div'>, React.ComponentPropsWithoutRef<'div'>>(
|
|
59
|
+
({ ...props }, ref) => (
|
|
60
|
+
<div
|
|
61
|
+
ref={ref}
|
|
62
|
+
role="separator"
|
|
63
|
+
{...props}
|
|
64
|
+
>
|
|
65
|
+
{/* <Dot /> */}точка
|
|
66
|
+
</div>
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
InputOTPSeparator.displayName = 'InputOTPSeparator'
|
|
70
|
+
|
|
71
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import bank from '../assets/images/logo/bank/logo.svg'
|
|
3
|
+
import kassa from '../assets/images/logo/kassa/logo.svg'
|
|
4
|
+
import garant from '../assets/images/logo/garant/logo.svg'
|
|
5
|
+
|
|
6
|
+
interface LogoProps extends React.ImgHTMLAttributes<HTMLImageElement>{
|
|
7
|
+
variant?: 'bank' | 'kassa' | 'garant',
|
|
8
|
+
className?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const Logo: React.FC<LogoProps> = ({variant = bank, width = 132, height = 32, className}) => {
|
|
12
|
+
|
|
13
|
+
return <img className={className} src={variant} width={width} height={height} />
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default Logo
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import cn from 'classnames'
|
|
3
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover'
|
|
4
|
+
import {PopoverPortalProps, PopoverProps} from "@radix-ui/react-popover";
|
|
5
|
+
|
|
6
|
+
type PopoverComponents = {
|
|
7
|
+
Trigger: typeof PopoverTrigger,
|
|
8
|
+
Portal: typeof PopoverPortal,
|
|
9
|
+
Content: typeof PopoverContent,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const Popover: React.FC<PopoverProps> & PopoverComponents = (props) => <PopoverPrimitive.Root {...props} />
|
|
13
|
+
|
|
14
|
+
const PopoverTrigger: typeof PopoverPrimitive.Trigger = PopoverPrimitive.Trigger
|
|
15
|
+
|
|
16
|
+
const PopoverPortal: React.FC<PopoverPortalProps> = ({ children, ...props }) => (
|
|
17
|
+
<PopoverPrimitive.Portal {...props}>{children}</PopoverPrimitive.Portal>
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
const PopoverContent = React.forwardRef<
|
|
21
|
+
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
22
|
+
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
23
|
+
>(({ className = '', align = 'center', sideOffset = 4, ...props }, ref) => (
|
|
24
|
+
<PopoverPrimitive.Content
|
|
25
|
+
ref={ref}
|
|
26
|
+
align={align}
|
|
27
|
+
sideOffset={sideOffset}
|
|
28
|
+
className={cn(
|
|
29
|
+
'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md 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',
|
|
30
|
+
className
|
|
31
|
+
)}
|
|
32
|
+
{...props}
|
|
33
|
+
/>
|
|
34
|
+
))
|
|
35
|
+
|
|
36
|
+
Popover.Trigger = PopoverTrigger
|
|
37
|
+
Popover.Portal = PopoverPortal
|
|
38
|
+
Popover.Portal.displayName = PopoverPrimitive.Portal.displayName
|
|
39
|
+
Popover.Content = PopoverContent
|
|
40
|
+
Popover.Content.displayName = PopoverPrimitive.Content.displayName
|
|
41
|
+
|
|
42
|
+
export default Popover
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider'
|
|
3
|
+
import cn from 'classnames'
|
|
4
|
+
|
|
5
|
+
const Slider = React.forwardRef<
|
|
6
|
+
React.ElementRef<typeof SliderPrimitive.Root>,
|
|
7
|
+
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
|
|
8
|
+
>(({ className = '', ...props }, ref) => (
|
|
9
|
+
<SliderPrimitive.Root
|
|
10
|
+
ref={ref}
|
|
11
|
+
className={cn('relative flex w-full touch-none select-none items-center', className)}
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
|
|
15
|
+
<SliderPrimitive.Range className="absolute h-full bg-primary" />
|
|
16
|
+
</SliderPrimitive.Track>
|
|
17
|
+
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
|
|
18
|
+
</SliderPrimitive.Root>
|
|
19
|
+
))
|
|
20
|
+
|
|
21
|
+
export default Slider
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@require '../../../Markup.Common/markup/stylus/variables'
|
|
2
|
+
|
|
3
|
+
.ant
|
|
4
|
+
// SLIDER BEGIN
|
|
5
|
+
&-slider-rail
|
|
6
|
+
&-slider-track
|
|
7
|
+
height 2px
|
|
8
|
+
border-radius @height
|
|
9
|
+
|
|
10
|
+
&-slider-rail
|
|
11
|
+
background-color $cl-graphite-5
|
|
12
|
+
|
|
13
|
+
&-slider-track
|
|
14
|
+
position absolute
|
|
15
|
+
top 0
|
|
16
|
+
background-color $cl-green-2
|
|
17
|
+
transition background-color 0.3s ease-in-out
|
|
18
|
+
|
|
19
|
+
&-slider-handle
|
|
20
|
+
position absolute
|
|
21
|
+
top 50%
|
|
22
|
+
margin-top -7px
|
|
23
|
+
box-sizing border-box
|
|
24
|
+
width 14px
|
|
25
|
+
height @width
|
|
26
|
+
background-color $cl-white
|
|
27
|
+
border 2px solid $cl-green-2
|
|
28
|
+
border-radius 50%
|
|
29
|
+
transition background-color 0.3s ease-in-out, border-color 0.3s ease-in-out
|
|
30
|
+
cursor pointer
|
|
31
|
+
|
|
32
|
+
&-slider-disabled
|
|
33
|
+
.ant-slider-track
|
|
34
|
+
.ant-slider-handle
|
|
35
|
+
background-color $cl-graphite-4
|
|
36
|
+
|
|
37
|
+
.ant-slider-handle
|
|
38
|
+
border-color $cl-white
|
|
39
|
+
cursor not-allowed
|
|
40
|
+
// SLIDER END
|
|
41
|
+
|
|
42
|
+
// SLIDER TOOLTIP BEGIN
|
|
43
|
+
&-slider
|
|
44
|
+
position relative
|
|
45
|
+
|
|
46
|
+
& .ant-tooltip
|
|
47
|
+
background-color transparent
|
|
48
|
+
|
|
49
|
+
&-placement-bottom
|
|
50
|
+
padding-top 0
|
|
51
|
+
|
|
52
|
+
&-arrow
|
|
53
|
+
display none
|
|
54
|
+
|
|
55
|
+
&-content
|
|
56
|
+
padding 0
|
|
57
|
+
min-height auto
|
|
58
|
+
font-size $fz-small
|
|
59
|
+
color $cl-graphite-3
|
|
60
|
+
background-color transparent
|
|
61
|
+
box-shadow none
|
|
62
|
+
// SLIDER TOOLTIP END
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import cn from 'classnames'
|
|
3
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs'
|
|
4
|
+
import {TabsProps} from "@radix-ui/react-tabs";
|
|
5
|
+
|
|
6
|
+
type TabsComponents = {
|
|
7
|
+
List: typeof TabsList,
|
|
8
|
+
Trigger: typeof TabsTrigger,
|
|
9
|
+
Content: typeof TabsContent,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const Tabs: React.FC<TabsProps> & TabsComponents = ({ ...props }) => <TabsPrimitive.Root {...props}/>
|
|
13
|
+
|
|
14
|
+
const TabsList = React.forwardRef<
|
|
15
|
+
React.ElementRef<typeof TabsPrimitive.List>,
|
|
16
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
17
|
+
>(({ className, ...props }, ref) => (
|
|
18
|
+
<TabsPrimitive.List
|
|
19
|
+
ref={ref}
|
|
20
|
+
className={cn(
|
|
21
|
+
'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',
|
|
22
|
+
className
|
|
23
|
+
)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
))
|
|
27
|
+
|
|
28
|
+
const TabsTrigger = React.forwardRef<
|
|
29
|
+
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
30
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
|
31
|
+
>(({ className, ...props }, ref) => (
|
|
32
|
+
<TabsPrimitive.Trigger
|
|
33
|
+
ref={ref}
|
|
34
|
+
className={cn(
|
|
35
|
+
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
))
|
|
41
|
+
|
|
42
|
+
const TabsContent = React.forwardRef<
|
|
43
|
+
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
44
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
45
|
+
>(({ className, ...props }, ref) => (
|
|
46
|
+
<TabsPrimitive.Content
|
|
47
|
+
ref={ref}
|
|
48
|
+
className={cn(
|
|
49
|
+
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
50
|
+
className
|
|
51
|
+
)}
|
|
52
|
+
{...props}
|
|
53
|
+
/>
|
|
54
|
+
))
|
|
55
|
+
|
|
56
|
+
Tabs.List = TabsList
|
|
57
|
+
TabsList.displayName = "TabsList"
|
|
58
|
+
Tabs.Trigger = TabsTrigger
|
|
59
|
+
TabsTrigger.displayName = "TabsTrigger"
|
|
60
|
+
Tabs.Content = TabsContent
|
|
61
|
+
TabsContent.displayName = "TabsContent"
|
|
62
|
+
|
|
63
|
+
export default Tabs
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@require '../../../Markup.Common/markup/stylus/variables'
|
|
2
|
+
|
|
3
|
+
$prefix-tabs = ant-tabs
|
|
4
|
+
|
|
5
|
+
// Общая обретка
|
|
6
|
+
.{$prefix-tabs}
|
|
7
|
+
position relative
|
|
8
|
+
|
|
9
|
+
&._wide
|
|
10
|
+
.{$prefix-tabs}-tab
|
|
11
|
+
padding 0 16px 8px
|
|
12
|
+
|
|
13
|
+
&:not(:last-child)
|
|
14
|
+
margin-right 0
|
|
15
|
+
|
|
16
|
+
// Панелька с названиями табов
|
|
17
|
+
.{$prefix-tabs}-bar
|
|
18
|
+
position relative
|
|
19
|
+
display flex
|
|
20
|
+
flex-wrap nowrap
|
|
21
|
+
|
|
22
|
+
&::after
|
|
23
|
+
content ''
|
|
24
|
+
position absolute
|
|
25
|
+
right 0
|
|
26
|
+
bottom 0
|
|
27
|
+
left 0
|
|
28
|
+
height 2px
|
|
29
|
+
background-color $cl-graphite-6
|
|
30
|
+
|
|
31
|
+
.{$prefix-tabs}-nav-wrap
|
|
32
|
+
overflow hidden
|
|
33
|
+
|
|
34
|
+
.{$prefix-tabs}-nav-scroll
|
|
35
|
+
overflow hidden
|
|
36
|
+
white-space nowrap
|
|
37
|
+
|
|
38
|
+
.{$prefix-tabs}-nav
|
|
39
|
+
display inline-block
|
|
40
|
+
|
|
41
|
+
// Таб
|
|
42
|
+
.{$prefix-tabs}-tab
|
|
43
|
+
display inline-block
|
|
44
|
+
padding-bottom 8px
|
|
45
|
+
user-select none
|
|
46
|
+
cursor pointer
|
|
47
|
+
|
|
48
|
+
&:not(:last-child)
|
|
49
|
+
margin-right 32px
|
|
50
|
+
|
|
51
|
+
// Активный таб
|
|
52
|
+
.{$prefix-tabs}-tab-active
|
|
53
|
+
position relative
|
|
54
|
+
color $cl-blue-2
|
|
55
|
+
|
|
56
|
+
// Стрелки переключения между табами
|
|
57
|
+
.{$prefix-tabs}-tab-prev
|
|
58
|
+
.{$prefix-tabs}-tab-next
|
|
59
|
+
display none
|
|
60
|
+
|
|
61
|
+
// Обертка всех табов
|
|
62
|
+
.{$prefix-tabs}-content
|
|
63
|
+
display flex
|
|
64
|
+
margin-left 0 !important // fix стандартного поведения ant-tabs - табы уезжают влево через margin-left: -100%
|
|
65
|
+
width 100%
|
|
66
|
+
|
|
67
|
+
// Контент табов
|
|
68
|
+
.{$prefix-tabs}-tabpane
|
|
69
|
+
flex-shrink 0
|
|
70
|
+
width 100%
|
|
71
|
+
|
|
72
|
+
// Подчеркивание активного таба
|
|
73
|
+
.{$prefix-tabs}-ink-bar
|
|
74
|
+
position relative
|
|
75
|
+
height 3px
|
|
76
|
+
background-color $cl-blue-2
|
|
77
|
+
transition transform .2s
|
|
78
|
+
z-index 1
|
|
79
|
+
|
|
80
|
+
// Скрытие неактивного таба
|
|
81
|
+
.{$prefix-tabs}-tabpane-inactive
|
|
82
|
+
display none
|
|
83
|
+
|
|
84
|
+
// Заготовка для анимаций
|
|
85
|
+
// .{$prefix-tabs}-tabpane-active
|
|
86
|
+
// animation-name anim-tab-active
|
|
87
|
+
// animation-duration 1s
|
|
88
|
+
|
|
89
|
+
// .{$prefix-tabs}-tabpane-inactive
|
|
90
|
+
// animation-name anim-tab-inactive
|
|
91
|
+
// animation-duration 1s
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import cn from 'classnames'
|
|
3
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip'
|
|
4
|
+
import {TooltipProps} from "@radix-ui/react-tooltip";
|
|
5
|
+
// import './ant-tooltip.styl'
|
|
6
|
+
|
|
7
|
+
// "_error": mdStyle === "error",
|
|
8
|
+
// "_white": mdStyle === "white",
|
|
9
|
+
//
|
|
10
|
+
// "_sm": mdSize === "sm",
|
|
11
|
+
// "_md": mdSize === "md",
|
|
12
|
+
// "_lg": mdSize === "lg",
|
|
13
|
+
// "_xl": mdSize === "xl",
|
|
14
|
+
|
|
15
|
+
type TooltipComponents = {
|
|
16
|
+
Provider: typeof TooltipProvider,
|
|
17
|
+
Trigger: typeof TooltipTrigger,
|
|
18
|
+
Content: typeof TooltipContent,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const Tooltip: React.FC<TooltipProps> & TooltipComponents = ({...props}) => <TooltipPrimitive.Root {...props}/>
|
|
22
|
+
|
|
23
|
+
const TooltipProvider = TooltipPrimitive.Provider
|
|
24
|
+
|
|
25
|
+
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
26
|
+
|
|
27
|
+
const TooltipContent = React.forwardRef<
|
|
28
|
+
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
29
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
30
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
31
|
+
<TooltipPrimitive.Content
|
|
32
|
+
ref={ref}
|
|
33
|
+
sideOffset={sideOffset}
|
|
34
|
+
className={cn(
|
|
35
|
+
'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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',
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
))
|
|
41
|
+
|
|
42
|
+
Tooltip.Provider = TooltipProvider
|
|
43
|
+
Tooltip.Trigger = TooltipTrigger
|
|
44
|
+
Tooltip.Content = TooltipContent
|
|
45
|
+
TooltipContent.displayName = "TooltipContent"
|
|
46
|
+
|
|
47
|
+
export default Tooltip
|