@modul/mbui 0.0.27-beta-webpack-559623b1 → 0.0.27-beta-webpack-305b06ab
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/dist/Chip/Chip.d.ts +1 -1
- package/dist/Input-OTP/Input.d.ts +2 -2
- package/dist/{index.js → main.js} +3 -3
- package/package.json +3 -1
- package/src/@/config/button.ts +77 -0
- package/src/@/config/index.ts +97 -0
- package/src/@/config/label.ts +89 -0
- package/src/@/lib/utils.ts +7 -0
- package/src/Alert/Alert.tsx +81 -0
- package/src/Alert/index.ts +1 -0
- package/src/AlertDialog/AlertDialog.tsx +137 -0
- package/src/AlertDialog/index.ts +13 -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/Badge/Badge.tsx +58 -0
- package/src/Badge/index.ts +1 -0
- package/src/Base/Input/Base.tsx +37 -0
- package/src/Base/Input/Input.tsx +42 -0
- package/src/Base/Input/index.ts +3 -0
- package/src/Base/Input/types.ts +11 -0
- package/src/Base/Links/TextLink.tsx +16 -0
- package/src/Base/Links/index.ts +3 -0
- package/src/BottomNavigation/BottomNavigation.tsx +62 -0
- package/src/BottomNavigation/index.ts +1 -0
- package/src/Button/Button.tsx +124 -0
- package/src/Button/ButtonWidget.tsx +67 -0
- package/src/Button/index.ts +2 -0
- package/src/Calendar/Calendar.tsx +61 -0
- package/src/Calendar/index.ts +1 -0
- package/src/Chat/MessageTyping.tsx +61 -0
- package/src/Chat/index.ts +1 -0
- package/src/Checkbox/Checkbox.tsx +28 -0
- package/src/Checkbox/index.ts +1 -0
- package/src/Chip/Chip.tsx +55 -0
- package/src/Chip/index.ts +1 -0
- package/src/Collapsible/AccountCollapsible.tsx +79 -0
- package/src/Collapsible/Collapsible.tsx +13 -0
- package/src/Collapsible/index.ts +8 -0
- package/src/DatePicker/DatePicker.tsx +41 -0
- package/src/DatePicker/index.ts +1 -0
- package/src/DigitKeyPad/DigitKeyPad.tsx +69 -0
- package/src/DigitKeyPad/index.ts +1 -0
- package/src/Drawer/Drawer.tsx +89 -0
- package/src/Drawer/index.ts +7 -0
- package/src/FavoritePyments/FavoritePaymentsList.tsx +40 -0
- package/src/FavoritePyments/index.ts +1 -0
- package/src/Form/Form.tsx +154 -0
- package/src/Form/index.ts +1 -0
- package/src/Icon/SvgIcon.tsx +32 -0
- package/src/Icon/icons/AddList.tsx +19 -0
- package/src/Icon/icons/AlertCircle.tsx +18 -0
- package/src/Icon/icons/AlertCircleSolid.tsx +18 -0
- package/src/Icon/icons/AlertDiamond.tsx +18 -0
- package/src/Icon/icons/AlertDiamondSolid.tsx +18 -0
- package/src/Icon/icons/AlertShield.tsx +18 -0
- package/src/Icon/icons/Android.tsx +18 -0
- package/src/Icon/icons/Apple.tsx +18 -0
- package/src/Icon/icons/Archive.tsx +18 -0
- package/src/Icon/icons/ArrowCircle.tsx +18 -0
- package/src/Icon/icons/ArrowDown.tsx +18 -0
- package/src/Icon/icons/ArrowLeft.tsx +18 -0
- package/src/Icon/icons/ArrowRight.tsx +18 -0
- package/src/Icon/icons/ArrowUp.tsx +18 -0
- package/src/Icon/icons/ArrowUpCorner.tsx +18 -0
- package/src/Icon/icons/ArrowsChange.tsx +18 -0
- package/src/Icon/icons/Atm.tsx +18 -0
- package/src/Icon/icons/Attach.tsx +18 -0
- package/src/Icon/icons/Bank.tsx +18 -0
- package/src/Icon/icons/Bold.tsx +18 -0
- package/src/Icon/icons/Bonus.tsx +18 -0
- package/src/Icon/icons/Building.tsx +18 -0
- package/src/Icon/icons/Calendar.tsx +18 -0
- package/src/Icon/icons/CalendarCancel.tsx +18 -0
- package/src/Icon/icons/Call.tsx +18 -0
- package/src/Icon/icons/CallEnd.tsx +18 -0
- package/src/Icon/icons/CallMissed.tsx +18 -0
- package/src/Icon/icons/Callback.tsx +18 -0
- package/src/Icon/icons/Camera.tsx +18 -0
- package/src/Icon/icons/Cancel.tsx +18 -0
- package/src/Icon/icons/CancelSolid.tsx +18 -0
- package/src/Icon/icons/Card.tsx +18 -0
- package/src/Icon/icons/CardLock.tsx +18 -0
- package/src/Icon/icons/CardRefill.tsx +18 -0
- package/src/Icon/icons/CardReissue.tsx +18 -0
- package/src/Icon/icons/CardScan.tsx +18 -0
- package/src/Icon/icons/CardToCard.tsx +18 -0
- package/src/Icon/icons/CardUnlock.tsx +18 -0
- package/src/Icon/icons/Change.tsx +18 -0
- package/src/Icon/icons/Chart.tsx +18 -0
- package/src/Icon/icons/Chat.tsx +18 -0
- package/src/Icon/icons/ChatSolid.tsx +18 -0
- package/src/Icon/icons/Check.tsx +18 -0
- package/src/Icon/icons/CheckCircle.tsx +18 -0
- package/src/Icon/icons/CheckCircleSolid.tsx +18 -0
- package/src/Icon/icons/CheckShield.tsx +20 -0
- package/src/Icon/icons/CheckSmall.tsx +18 -0
- package/src/Icon/icons/Checklist.tsx +18 -0
- package/src/Icon/icons/Circle.tsx +18 -0
- package/src/Icon/icons/Clock.tsx +18 -0
- package/src/Icon/icons/ClockSolid.tsx +18 -0
- package/src/Icon/icons/Close.tsx +18 -0
- package/src/Icon/icons/Coins.tsx +18 -0
- package/src/Icon/icons/Collapse.tsx +18 -0
- package/src/Icon/icons/Copy.tsx +18 -0
- package/src/Icon/icons/Cup.tsx +18 -0
- package/src/Icon/icons/CurrencyChange.tsx +18 -0
- package/src/Icon/icons/CurrencyTransfer.tsx +18 -0
- package/src/Icon/icons/Deposit.tsx +18 -0
- package/src/Icon/icons/Diamond.tsx +18 -0
- package/src/Icon/icons/Dislike.tsx +18 -0
- package/src/Icon/icons/DislikeSolid.tsx +18 -0
- package/src/Icon/icons/Doc.tsx +18 -0
- package/src/Icon/icons/DocCancel.tsx +18 -0
- package/src/Icon/icons/Dollar.tsx +18 -0
- package/src/Icon/icons/DoubleArrow.tsx +18 -0
- package/src/Icon/icons/DoubleTick.tsx +18 -0
- package/src/Icon/icons/Download.tsx +18 -0
- package/src/Icon/icons/Dropdown.tsx +18 -0
- package/src/Icon/icons/DropdownSmall.tsx +20 -0
- package/src/Icon/icons/DropdownSmallOld.tsx +20 -0
- package/src/Icon/icons/Dropup.tsx +18 -0
- package/src/Icon/icons/Edit.tsx +18 -0
- package/src/Icon/icons/Email.tsx +18 -0
- package/src/Icon/icons/Erase.tsx +16 -0
- package/src/Icon/icons/Excel.tsx +18 -0
- package/src/Icon/icons/Expand.tsx +18 -0
- package/src/Icon/icons/Eye.tsx +18 -0
- package/src/Icon/icons/EyeOff.tsx +18 -0
- package/src/Icon/icons/Favorite.tsx +18 -0
- package/src/Icon/icons/FavoriteSolid.tsx +18 -0
- package/src/Icon/icons/Fb.tsx +18 -0
- package/src/Icon/icons/FbCircle.tsx +18 -0
- package/src/Icon/icons/File.tsx +18 -0
- package/src/Icon/icons/FileAdd.tsx +18 -0
- package/src/Icon/icons/Files.tsx +18 -0
- package/src/Icon/icons/Filter.tsx +18 -0
- package/src/Icon/icons/Folder.tsx +18 -0
- package/src/Icon/icons/Geolocation.tsx +18 -0
- package/src/Icon/icons/Gift.tsx +18 -0
- package/src/Icon/icons/Globe.tsx +18 -0
- package/src/Icon/icons/Heart.tsx +18 -0
- package/src/Icon/icons/HeartSolid.tsx +18 -0
- package/src/Icon/icons/Help.tsx +18 -0
- package/src/Icon/icons/Home.tsx +18 -0
- package/src/Icon/icons/Housing.tsx +18 -0
- package/src/Icon/icons/Ig.tsx +18 -0
- package/src/Icon/icons/IgCircle.tsx +18 -0
- package/src/Icon/icons/Info.tsx +18 -0
- package/src/Icon/icons/InfoBook.tsx +18 -0
- package/src/Icon/icons/InfoSolid.tsx +18 -0
- package/src/Icon/icons/Italic.tsx +18 -0
- package/src/Icon/icons/Key.tsx +18 -0
- package/src/Icon/icons/Left.tsx +18 -0
- package/src/Icon/icons/Lightbulb.tsx +18 -0
- package/src/Icon/icons/Like.tsx +18 -0
- package/src/Icon/icons/LikeSolid.tsx +18 -0
- package/src/Icon/icons/Link.tsx +18 -0
- package/src/Icon/icons/Lock.tsx +18 -0
- package/src/Icon/icons/Logout.tsx +18 -0
- package/src/Icon/icons/MagicWand.tsx +18 -0
- package/src/Icon/icons/Mail.tsx +18 -0
- package/src/Icon/icons/MailSend.tsx +18 -0
- package/src/Icon/icons/Map.tsx +18 -0
- package/src/Icon/icons/MapPin.tsx +18 -0
- package/src/Icon/icons/MapPinSolid.tsx +18 -0
- package/src/Icon/icons/Menu.tsx +18 -0
- package/src/Icon/icons/Mic.tsx +18 -0
- package/src/Icon/icons/MicOff.tsx +18 -0
- package/src/Icon/icons/Minus.tsx +18 -0
- package/src/Icon/icons/MinusCircle.tsx +18 -0
- package/src/Icon/icons/MinusShort.tsx +18 -0
- package/src/Icon/icons/Moneybox.tsx +18 -0
- package/src/Icon/icons/More.tsx +18 -0
- package/src/Icon/icons/Move.tsx +18 -0
- package/src/Icon/icons/Newbie.tsx +20 -0
- package/src/Icon/icons/News.tsx +18 -0
- package/src/Icon/icons/Notes.tsx +18 -0
- package/src/Icon/icons/Notification.tsx +18 -0
- package/src/Icon/icons/Ok.tsx +18 -0
- package/src/Icon/icons/OkCircle.tsx +18 -0
- package/src/Icon/icons/Order.tsx +18 -0
- package/src/Icon/icons/OrderLoad.tsx +18 -0
- package/src/Icon/icons/OrderSend.tsx +18 -0
- package/src/Icon/icons/Pause.tsx +18 -0
- package/src/Icon/icons/PauseCircle.tsx +18 -0
- package/src/Icon/icons/Payment.tsx +18 -0
- package/src/Icon/icons/PhoneShake.tsx +18 -0
- package/src/Icon/icons/Play.tsx +18 -0
- package/src/Icon/icons/PlaySolid.tsx +18 -0
- package/src/Icon/icons/Plus.tsx +18 -0
- package/src/Icon/icons/PlusCircle.tsx +18 -0
- package/src/Icon/icons/Pos.tsx +18 -0
- package/src/Icon/icons/Print.tsx +18 -0
- package/src/Icon/icons/QrPay.tsx +18 -0
- package/src/Icon/icons/Redirect.tsx +18 -0
- package/src/Icon/icons/Refill.tsx +18 -0
- package/src/Icon/icons/Refund.tsx +18 -0
- package/src/Icon/icons/Reload.tsx +19 -0
- package/src/Icon/icons/Reply.tsx +18 -0
- package/src/Icon/icons/ReplyShape.tsx +18 -0
- package/src/Icon/icons/ReplyShapeSolid.tsx +18 -0
- package/src/Icon/icons/Request.tsx +18 -0
- package/src/Icon/icons/Right.tsx +18 -0
- package/src/Icon/icons/Route.tsx +18 -0
- package/src/Icon/icons/Ruble.tsx +18 -0
- package/src/Icon/icons/Sbp.tsx +18 -0
- package/src/Icon/icons/SbpColored.tsx +46 -0
- package/src/Icon/icons/Search.tsx +18 -0
- package/src/Icon/icons/Send.tsx +18 -0
- package/src/Icon/icons/Services.tsx +17 -0
- package/src/Icon/icons/Settings.tsx +17 -0
- package/src/Icon/icons/Share.tsx +18 -0
- package/src/Icon/icons/ShoppingCart.tsx +18 -0
- package/src/Icon/icons/Sign.tsx +18 -0
- package/src/Icon/icons/SlotMachine.tsx +18 -0
- package/src/Icon/icons/SortDown.tsx +18 -0
- package/src/Icon/icons/SortDownSolid.tsx +18 -0
- package/src/Icon/icons/SortUp.tsx +18 -0
- package/src/Icon/icons/SortUpSolid.tsx +18 -0
- package/src/Icon/icons/Stop.tsx +18 -0
- package/src/Icon/icons/Support.tsx +18 -0
- package/src/Icon/icons/Sync.tsx +18 -0
- package/src/Icon/icons/Table.tsx +18 -0
- package/src/Icon/icons/Tariffs.tsx +19 -0
- package/src/Icon/icons/Tg.tsx +18 -0
- package/src/Icon/icons/TgCircle.tsx +18 -0
- package/src/Icon/icons/Timeout.tsx +18 -0
- package/src/Icon/icons/Timer.tsx +18 -0
- package/src/Icon/icons/Transfer.tsx +17 -0
- package/src/Icon/icons/Trash.tsx +18 -0
- package/src/Icon/icons/TurnOff.tsx +18 -0
- package/src/Icon/icons/Twitter.tsx +18 -0
- package/src/Icon/icons/TwitterCircle.tsx +18 -0
- package/src/Icon/icons/Underline.tsx +18 -0
- package/src/Icon/icons/Unlink.tsx +18 -0
- package/src/Icon/icons/Unsorted.tsx +18 -0
- package/src/Icon/icons/UnsortedSolid.tsx +18 -0
- package/src/Icon/icons/Upload.tsx +18 -0
- package/src/Icon/icons/User.tsx +18 -0
- package/src/Icon/icons/UserAdd.tsx +18 -0
- package/src/Icon/icons/UserCard.tsx +18 -0
- package/src/Icon/icons/UserEdit.tsx +18 -0
- package/src/Icon/icons/UserQueue.tsx +18 -0
- package/src/Icon/icons/Viber.tsx +18 -0
- package/src/Icon/icons/ViberCircle.tsx +18 -0
- package/src/Icon/icons/ViewGrid.tsx +18 -0
- package/src/Icon/icons/ViewHorizontal.tsx +18 -0
- package/src/Icon/icons/ViewList.tsx +18 -0
- package/src/Icon/icons/ViewRows.tsx +18 -0
- package/src/Icon/icons/ViewVertical.tsx +18 -0
- package/src/Icon/icons/Vk.tsx +18 -0
- package/src/Icon/icons/VkCircle.tsx +18 -0
- package/src/Icon/icons/Wallet.tsx +17 -0
- package/src/Icon/icons/Warning.tsx +18 -0
- package/src/Icon/icons/WarningClean.tsx +18 -0
- package/src/Icon/icons/Whatsapp.tsx +18 -0
- package/src/Icon/icons/WhatsappCircle.tsx +18 -0
- package/src/Icon/icons/Wheelchair.tsx +18 -0
- package/src/Icon/icons/index.ts +209 -0
- package/src/Icon/index.ts +2 -0
- package/src/Input/Input.tsx +35 -0
- package/src/Input/InputMask.tsx +36 -0
- package/src/Input/index.ts +2 -0
- package/src/Input-OTP/Input.tsx +64 -0
- package/src/Input-OTP/index.ts +3 -0
- package/src/Label/Label.tsx +20 -0
- package/src/Label/index.ts +1 -0
- package/src/Logo/Logo.tsx +22 -0
- package/src/Logo/index.ts +3 -0
- package/src/Navbar/Navbar.tsx +21 -0
- package/src/Navbar/index.tsx +2 -0
- package/src/Page/Page.tsx +43 -0
- package/src/Page/index.ts +1 -0
- package/src/Popover/Popover.tsx +64 -0
- package/src/Popover/index.ts +5 -0
- package/src/Progress/Progress.tsx +31 -0
- package/src/Progress/index.ts +1 -0
- package/src/Select/Select.tsx +19 -0
- package/src/Select/SelectAccount.tsx +101 -0
- package/src/Select/SelectAccountCard.tsx +146 -0
- package/src/Select/SelectAsync.tsx +28 -0
- package/src/Select/SelectBase.tsx +54 -0
- package/src/Select/components/components.tsx +186 -0
- package/src/Select/components/index.tsx +15 -0
- package/src/Select/index.ts +5 -0
- package/src/Skeleton/Skeleton.tsx +25 -0
- package/src/Skeleton/index.ts +1 -0
- package/src/Slider/Slider.tsx +38 -0
- package/src/Slider/index.ts +4 -0
- package/src/Swipe2Show/Swipe2Show.tsx +71 -0
- package/src/Swipe2Show/index.ts +1 -0
- package/src/Switch/Switch.tsx +59 -0
- package/src/Switch/index.ts +1 -0
- package/src/Tabs/Tabs.tsx +106 -0
- package/src/Tabs/index.ts +1 -0
- package/src/Textarea/Textarea.tsx +35 -0
- package/src/Textarea/index.ts +1 -0
- package/src/Toaster/Toaster.tsx +71 -0
- package/src/Toaster/index.ts +1 -0
- package/src/assets/css/global.css +209 -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/1c.svg +1 -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/assets/images/logo/sbp-logo.svg +1 -0
- package/src/assets/images/statusbar.svg +1 -0
- package/src/index.ts +134 -0
- package/src/pages/payments/SmsSign/sms-sign.tsx +91 -0
- package/dist/@/config/button.d.ts +0 -78
- package/dist/@/config/index.d.ts +0 -223
- package/dist/@/config/index.js +0 -1
- package/dist/@/config/label.d.ts +0 -90
- package/dist/Alert/index.js +0 -1
- package/dist/AlertDialog/index.js +0 -21
- package/dist/Audio/index.js +0 -11
- package/dist/Badge/index.js +0 -1
- package/dist/Base/Input/Base.d.ts +0 -4
- package/dist/Base/Input/Input.d.ts +0 -4
- package/dist/Base/Input/index.d.ts +0 -2
- package/dist/Base/Input/index.js +0 -1
- package/dist/Base/Input/types.d.ts +0 -9
- package/dist/Base/Links/TextLink.d.ts +0 -4
- package/dist/Base/Links/index.d.ts +0 -2
- package/dist/Base/Links/index.js +0 -1
- package/dist/BottomNavigation/index.js +0 -11
- package/dist/Button/index.js +0 -11
- package/dist/Calendar/index.js +0 -1
- package/dist/Chat/index.js +0 -1
- package/dist/Checkbox/index.js +0 -11
- package/dist/Chip/index.js +0 -11
- package/dist/Collapsible/index.js +0 -11
- package/dist/DatePicker/index.js +0 -11
- package/dist/DigitKeyPad/index.js +0 -1
- package/dist/Drawer/index.js +0 -15
- package/dist/FavoritePyments/index.js +0 -1
- package/dist/Form/index.js +0 -11
- package/dist/Icon/icons/index.js +0 -1
- package/dist/Icon/index.js +0 -1
- package/dist/Input/index.js +0 -1
- package/dist/Input-OTP/index.js +0 -20
- package/dist/Label/index.js +0 -11
- package/dist/Logo/index.js +0 -1
- package/dist/Navbar/Navbar.d.ts +0 -6
- package/dist/Navbar/index.d.ts +0 -1
- package/dist/Navbar/index.js +0 -1
- package/dist/Page/index.js +0 -1
- package/dist/Popover/index.js +0 -11
- package/dist/Progress/index.js +0 -16
- package/dist/Select/components/index.js +0 -10
- package/dist/Select/index.js +0 -10
- package/dist/Skeleton/index.js +0 -1
- package/dist/Slider/index.js +0 -11
- package/dist/Swipe2Show/index.js +0 -1
- package/dist/Switch/index.js +0 -11
- package/dist/Tabs/index.js +0 -11
- package/dist/Textarea/index.js +0 -1
- package/dist/Toaster/index.js +0 -2
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot'
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
+
import { cn } from '../@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const buttonClasses = {
|
|
7
|
+
base: `
|
|
8
|
+
inline-flex
|
|
9
|
+
justify-center
|
|
10
|
+
items-center
|
|
11
|
+
border-[2px]
|
|
12
|
+
rounded-md
|
|
13
|
+
font-medium
|
|
14
|
+
leading-[1]
|
|
15
|
+
focus-visible:ring
|
|
16
|
+
focus-visible:outline-none
|
|
17
|
+
ring-offset-1
|
|
18
|
+
disabled:pointer-events-none
|
|
19
|
+
transition-colors
|
|
20
|
+
whitespace-nowrap
|
|
21
|
+
shrink-0
|
|
22
|
+
`,
|
|
23
|
+
primary: `
|
|
24
|
+
text-btn-primary
|
|
25
|
+
bg-btn-primary
|
|
26
|
+
border-btn-primary
|
|
27
|
+
hover:bg-btn-primary-hover
|
|
28
|
+
hover:border-btn-primary-hover
|
|
29
|
+
focus-visible:bg-btn-primary-focus
|
|
30
|
+
focus-visible:border-btn-primary-focus
|
|
31
|
+
active:bg-btn-primary-active
|
|
32
|
+
active:border-btn-primary-active
|
|
33
|
+
disabled:bg-btn-primary-disabled
|
|
34
|
+
disabled:border-btn-primary-disabled
|
|
35
|
+
`,
|
|
36
|
+
secondary: `
|
|
37
|
+
text-btn-secondary
|
|
38
|
+
bg-btn-secondary
|
|
39
|
+
border-btn-secondary
|
|
40
|
+
hover:bg-btn-secondary-hover
|
|
41
|
+
hover:border-btn-secondary-hover
|
|
42
|
+
focus-visible:bg-btn-secondary-focus
|
|
43
|
+
focus-visibleborder-btn-secondary-focus
|
|
44
|
+
active:bg-btn-secondary-active
|
|
45
|
+
active:border-btn-secondary-active
|
|
46
|
+
disabled:text-btn-secondary-disabled
|
|
47
|
+
`,
|
|
48
|
+
outline: `
|
|
49
|
+
text-btn-outline
|
|
50
|
+
border-[1px]
|
|
51
|
+
border-btn-outline
|
|
52
|
+
hover:border-btn-outline-hover
|
|
53
|
+
focus:border-btn-outline-focus
|
|
54
|
+
active:border-btn-outline-active
|
|
55
|
+
disabled:border-btn-outline-disabled
|
|
56
|
+
disabled:text-btn-outline-disabled
|
|
57
|
+
`,
|
|
58
|
+
ghost: `
|
|
59
|
+
text-btn-ghost
|
|
60
|
+
border-transparent
|
|
61
|
+
hover:text-btn-ghost-hover
|
|
62
|
+
focus-visible:text-btn-ghost-focus
|
|
63
|
+
active:text-btn-ghost-active
|
|
64
|
+
disabled:text-btn-ghost-disabled
|
|
65
|
+
`,
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const getPadings = (icon, variant) => {
|
|
69
|
+
return cn(
|
|
70
|
+
icon && 'p-[12px] aspect-square',
|
|
71
|
+
icon && variant === 'outline' && 'p-[13px] aspect-square',
|
|
72
|
+
!icon && 'px-[24px] py-[12px]',
|
|
73
|
+
!icon && variant === 'outline' && 'px-[25px] py-[13px]',
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
interface IVariantProps {
|
|
77
|
+
variant?: 'primary'| 'secondary' | 'outline' | 'ghost',
|
|
78
|
+
className?: string,
|
|
79
|
+
icon?: boolean
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
const buttonVariants = ({ variant, className, icon }: IVariantProps) => {
|
|
84
|
+
return cva(`${buttonClasses.base} ${getPadings(icon, variant)}`,
|
|
85
|
+
{
|
|
86
|
+
variants: {
|
|
87
|
+
variant: {
|
|
88
|
+
primary: buttonClasses.primary,
|
|
89
|
+
secondary: buttonClasses.secondary,
|
|
90
|
+
outline: buttonClasses.outline,
|
|
91
|
+
ghost: buttonClasses.ghost,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
defaultVariants: {
|
|
95
|
+
variant: 'primary',
|
|
96
|
+
},
|
|
97
|
+
}
|
|
98
|
+
)({ variant, className })
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface ButtonProps
|
|
102
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
103
|
+
VariantProps<typeof buttonVariants> {
|
|
104
|
+
asChild?: boolean
|
|
105
|
+
icon?: boolean
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
109
|
+
({ className, variant, asChild = false, icon, ...props }, ref) => {
|
|
110
|
+
const Comp = asChild ? Slot : 'button'
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<Comp
|
|
114
|
+
className={cn(buttonVariants({ variant, className, icon }))}
|
|
115
|
+
ref={ref}
|
|
116
|
+
{...props}
|
|
117
|
+
/>
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
Button.displayName = 'Button'
|
|
123
|
+
|
|
124
|
+
export { Button, buttonVariants }
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot'
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
+
import { cn } from '../@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const buttonClasses = `
|
|
7
|
+
inline-flex
|
|
8
|
+
items-center
|
|
9
|
+
shrink-0
|
|
10
|
+
p-[8px]
|
|
11
|
+
rounded-md
|
|
12
|
+
font-medium
|
|
13
|
+
leading-[1]
|
|
14
|
+
focus-visible:ring
|
|
15
|
+
focus-visible:outline-none
|
|
16
|
+
ring-offset-1
|
|
17
|
+
transition-colors
|
|
18
|
+
whitespace-nowrap
|
|
19
|
+
bg-page
|
|
20
|
+
shadow-md
|
|
21
|
+
active:shadow-sm
|
|
22
|
+
disabled:pointer-events-none
|
|
23
|
+
`
|
|
24
|
+
|
|
25
|
+
interface IProps {
|
|
26
|
+
children?: React.ReactNode
|
|
27
|
+
className?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
31
|
+
asChild?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const Icon: React.FC<IProps> = ({ children }) => {
|
|
35
|
+
return <span className="flex justify-center items-center bg-primary-light [&+span]:ml-[16px] rounded-full text-primary size-[40px]">{children}</span>
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const Content: React.FC<IProps> = ({ children, className }) => {
|
|
39
|
+
return <span className={cn('text-dark', className)}>{children}</span>
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface IButtonWidgetProps {
|
|
43
|
+
displayName: string
|
|
44
|
+
Icon: typeof Icon
|
|
45
|
+
Content: typeof Content
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const ButtonWidget: React.FC<ButtonProps> & IButtonWidgetProps = ({ className, asChild = false, ...props }) => {
|
|
49
|
+
const Comp = asChild ? Slot : 'button'
|
|
50
|
+
return (
|
|
51
|
+
<Comp
|
|
52
|
+
className={cn(buttonClasses, className)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
ButtonWidget.displayName = 'ButtonWidget'
|
|
60
|
+
|
|
61
|
+
ButtonWidget.Icon = Icon
|
|
62
|
+
ButtonWidget.Icon.displayName = 'ButtonWidget.Icon'
|
|
63
|
+
|
|
64
|
+
ButtonWidget.Content = Content
|
|
65
|
+
ButtonWidget.Content.displayName = 'ButtonWidget.Content'
|
|
66
|
+
|
|
67
|
+
export { ButtonWidget }
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { DayPicker } from 'react-day-picker'
|
|
3
|
+
import { cn } from '../@/lib/utils'
|
|
4
|
+
import { ru } from 'date-fns/locale'
|
|
5
|
+
|
|
6
|
+
const daySelectedClasses = 'bg-btn-primary text-btn-primary rounded-sm'
|
|
7
|
+
const dayTodayClasses = 'bg-btn-secondary text-btn-secondary rounded-sm'
|
|
8
|
+
const rangeMiddleClasses = 'date-range-middle aria-selected:bg-btn-primary/50 aria-selected:text-white'
|
|
9
|
+
const btnNavClasses =
|
|
10
|
+
'opacity-50 hover:opacity-100 ring-offset-2 focus-visible:opacity-100 focus-visible:outline-primary border-input border rounded-sm shadow-sm'
|
|
11
|
+
|
|
12
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>
|
|
13
|
+
function Calendar({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) {
|
|
14
|
+
return (
|
|
15
|
+
<DayPicker
|
|
16
|
+
locale={ru}
|
|
17
|
+
showOutsideDays={showOutsideDays}
|
|
18
|
+
className={cn('inline-flex', className)}
|
|
19
|
+
classNames={{
|
|
20
|
+
months: 'relative',
|
|
21
|
+
month: 'flex flex-col space-y-[16px] items-center',
|
|
22
|
+
month_grid: 'w-full border-collapse',
|
|
23
|
+
month_caption: 'inline m-x-auto',
|
|
24
|
+
caption_label: 'text-sm font-medium capitalize',
|
|
25
|
+
nav: 'flex justify-between absolute start-0 end-0',
|
|
26
|
+
button_previous: btnNavClasses,
|
|
27
|
+
button_next: btnNavClasses,
|
|
28
|
+
weekdays: 'flex',
|
|
29
|
+
weekday: 'text-light w-[32px] font-normal text-[14px]',
|
|
30
|
+
week: 'flex w-full mt-2',
|
|
31
|
+
day_button: 'w-[32px] h-[32px] p-0',
|
|
32
|
+
day: cn(
|
|
33
|
+
'aria-selected:opacity-100 text-[14px] leading-[1]',
|
|
34
|
+
props.mode === 'range'
|
|
35
|
+
? '[&:(.day-range-middle)]:rounded-0 [&:has(>.day-range-end)]:rounded-r-sm [&:has(>.day-range-start)]:rounded-l-sm first:[&:has([aria-selected])]:rounded-l-sm last:[&:has([aria-selected])]:rounded-r-sm'
|
|
36
|
+
: '[&:([aria-selected])]:rounded-sm'
|
|
37
|
+
),
|
|
38
|
+
range_start: 'day-range-start',
|
|
39
|
+
range_end: 'day-range-end',
|
|
40
|
+
range_middle: rangeMiddleClasses,
|
|
41
|
+
selected: daySelectedClasses,
|
|
42
|
+
today: dayTodayClasses,
|
|
43
|
+
outside:
|
|
44
|
+
'day-outside opacity-50 aria-selected:bg-primary aria-selected:text-[white] aria-selected:opacity-30',
|
|
45
|
+
disabled: 'text-light opacity-50',
|
|
46
|
+
hidden: 'invisible',
|
|
47
|
+
...classNames,
|
|
48
|
+
}}
|
|
49
|
+
components={
|
|
50
|
+
{
|
|
51
|
+
// Chevron: () => <Left className="w-4 h-4" />,
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
Calendar.displayName = 'Calendar'
|
|
60
|
+
|
|
61
|
+
export { Calendar }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Calendar } from './Calendar'
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { FC, SVGProps } from 'react'
|
|
2
|
+
import { cn } from '../@/lib/utils'
|
|
3
|
+
|
|
4
|
+
export const MessageTyping: FC<SVGProps<SVGElement>> = ({ className }) => {
|
|
5
|
+
return (
|
|
6
|
+
<svg
|
|
7
|
+
className={cn(className)}
|
|
8
|
+
width="72"
|
|
9
|
+
height="40"
|
|
10
|
+
fill="none"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M0 8a8 8 0 0 1 8-8h56a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8H0V8Z"
|
|
15
|
+
fill="#F5F5F6"
|
|
16
|
+
/>
|
|
17
|
+
<path
|
|
18
|
+
id="dot_1"
|
|
19
|
+
d="M20 24a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"
|
|
20
|
+
fill="#9B9FA8"
|
|
21
|
+
/>
|
|
22
|
+
<animate
|
|
23
|
+
href="#dot_1"
|
|
24
|
+
attributeType="CSS"
|
|
25
|
+
attributeName="opacity"
|
|
26
|
+
values="1;0;1;"
|
|
27
|
+
dur=".8s"
|
|
28
|
+
begin="0"
|
|
29
|
+
repeatCount="indefinite"
|
|
30
|
+
/>
|
|
31
|
+
<path
|
|
32
|
+
id="dot_2"
|
|
33
|
+
d="M36 24a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"
|
|
34
|
+
fill="#9B9FA8"
|
|
35
|
+
/>
|
|
36
|
+
<animate
|
|
37
|
+
href="#dot_2"
|
|
38
|
+
attributeType="CSS"
|
|
39
|
+
attributeName="opacity"
|
|
40
|
+
values="1;0;1;"
|
|
41
|
+
dur=".8s"
|
|
42
|
+
begin=".15s"
|
|
43
|
+
repeatCount="indefinite"
|
|
44
|
+
/>
|
|
45
|
+
<path
|
|
46
|
+
id="dot_3"
|
|
47
|
+
d="M52 24a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"
|
|
48
|
+
fill="#9B9FA8"
|
|
49
|
+
/>
|
|
50
|
+
<animate
|
|
51
|
+
href="#dot_3"
|
|
52
|
+
attributeType="CSS"
|
|
53
|
+
attributeName="opacity"
|
|
54
|
+
values="1;0;1;"
|
|
55
|
+
dur=".8s"
|
|
56
|
+
begin=".3s"
|
|
57
|
+
repeatCount="indefinite"
|
|
58
|
+
/>
|
|
59
|
+
</svg>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MessageTyping } from './MessageTyping'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react"
|
|
3
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
|
|
4
|
+
import { cn } from "../@/lib/utils"
|
|
5
|
+
import { Check } from '../Icon'
|
|
6
|
+
|
|
7
|
+
const Checkbox = React.forwardRef<
|
|
8
|
+
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
9
|
+
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
10
|
+
>(({ className, ...props }, ref) => (
|
|
11
|
+
<CheckboxPrimitive.Root
|
|
12
|
+
ref={ref}
|
|
13
|
+
className={cn(
|
|
14
|
+
"peer h-[16px] w-[14px] shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
<CheckboxPrimitive.Indicator
|
|
20
|
+
className={cn("flex items-center justify-center text-current")}
|
|
21
|
+
>
|
|
22
|
+
<Check className="w-[16px] h-[16px] text-white" />
|
|
23
|
+
</CheckboxPrimitive.Indicator>
|
|
24
|
+
</CheckboxPrimitive.Root>
|
|
25
|
+
))
|
|
26
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName
|
|
27
|
+
|
|
28
|
+
export { Checkbox }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Checkbox } from './Checkbox'
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
3
|
+
import { Slot } from '@radix-ui/react-slot'
|
|
4
|
+
import { cn } from '../@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const chipVariants = cva(
|
|
7
|
+
'inline-flex justify-center items-center border-[2px] disabled:opacity-[.24] rounded-full ring-offset-1 font-medium whitespace-nowrap transition-colors disabled:pointer-events-none',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
primary:
|
|
12
|
+
'text-btn-primary bg-btn-primary hover:bg-btn-primary-hover focus:bg-btn-primary-focus active:bg-btn-primary-active border-btn-primary hover:border-btn-primary-hover focus:border-btn-primary-focus active:border-btn-primary-active',
|
|
13
|
+
secondary:
|
|
14
|
+
'text-btn-secondary bg-btn-secondary hover:bg-btn-secondary-hover focus:bg-btn-secondary-focus active:bg-btn-secondary-active border-btn-secondary hover:border-btn-secondary-hover focus:border-btn-secondary-focus active:border-btn-secondary-active',
|
|
15
|
+
success:
|
|
16
|
+
'text-btn-success bg-btn-success hover:bg-btn-success-hover focus:bg-btn-success-focus active:bg-btn-success-active border-btn-success hover:border-btn-success-hover focus:border-btn-success-focus active:border-btn-success-active',
|
|
17
|
+
'primary-outline':
|
|
18
|
+
'text-btn-primary-outline hover:text-btn-primary-outline-hover focus:text-btn-primary-outline-focus active:text-btn-primary-outline-active bg-btn-primary-outline hover:bg-btn-primary-outline-hover focus:bg-btn-primary-outline-focus active:bg-btn-primary-outline-active border-btn-primary-outline hover:border-btn-primary-outline-hover focus:border-btn-primary-outline-focus active:border-btn-primary-outline-active',
|
|
19
|
+
outline: 'border-[1px] text-btn-outline border-btn-outline ring-[currentColor]',
|
|
20
|
+
ghost: 'text-btn-ghost bg-btn-ghost hover:bg-btn-ghost-hover focus:bg-btn-ghost-focus active:bg-btn-ghost-active border-transparent',
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
lg: '',
|
|
24
|
+
md: '',
|
|
25
|
+
sm: 'h-[14px] px-[20px] text-[10px] leading-[1.4]',
|
|
26
|
+
xs: '',
|
|
27
|
+
xxs: '',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: 'secondary',
|
|
32
|
+
size: 'sm',
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
export interface IChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof chipVariants> {
|
|
38
|
+
asChild?: boolean
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const Chip = React.forwardRef<HTMLButtonElement, IChipProps>(({ children, variant, size, className, asChild = false, ...props }, ref) => {
|
|
42
|
+
const Comp = asChild ? Slot : "span"
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Comp
|
|
46
|
+
className={cn(chipVariants({ variant, size, className }))}
|
|
47
|
+
ref={ref}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
Chip.displayName = 'Chip'
|
|
54
|
+
|
|
55
|
+
export { Chip }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Chip } from './Chip'
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React, { FC, ReactNode } from 'react'
|
|
2
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'
|
|
3
|
+
import { DropdownSmallOld } from '../../src/Icon'
|
|
4
|
+
import { cn } from '../@/lib/utils'
|
|
5
|
+
import { Slot } from '@radix-ui/react-slot'
|
|
6
|
+
|
|
7
|
+
const AccountCollapsible = CollapsiblePrimitive.Root
|
|
8
|
+
|
|
9
|
+
const AccountCollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
|
|
10
|
+
|
|
11
|
+
const AccountCollapsibleContent = CollapsiblePrimitive.CollapsibleContent
|
|
12
|
+
|
|
13
|
+
export type AccountCollapsibleHeaderProps = {
|
|
14
|
+
label: ReactNode
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type AccountCollapsibleContentItemProps = {
|
|
18
|
+
className?: string
|
|
19
|
+
children: ReactNode
|
|
20
|
+
asChild: boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const AccountCollapsibleHeader: FC<AccountCollapsibleHeaderProps> = ({ label }) => {
|
|
24
|
+
return (
|
|
25
|
+
<AccountCollapsibleTrigger className="flex justify-between items-center w-full text-light align-center group">
|
|
26
|
+
<div className="font-medium text-[12px] leading-[1.33]">{label}</div>
|
|
27
|
+
<DropdownSmallOld className='group-[[data-state=open]]:rotate-180 transition-transform'/>
|
|
28
|
+
</AccountCollapsibleTrigger>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const accountCollapsibleClasses = `
|
|
33
|
+
text-left
|
|
34
|
+
w-full
|
|
35
|
+
rounded-[4px]
|
|
36
|
+
px-[12px]
|
|
37
|
+
py-[16px]
|
|
38
|
+
bg-btn-secondary
|
|
39
|
+
border-btn-secondary
|
|
40
|
+
hover:bg-btn-secondary-hover
|
|
41
|
+
hover:border-btn-secondary-hover
|
|
42
|
+
focus:bg-btn-secondary-focus
|
|
43
|
+
focus:border-btn-secondary-focus
|
|
44
|
+
active:border-btn-secondary-active
|
|
45
|
+
active:bg-btn-secondary-active
|
|
46
|
+
`
|
|
47
|
+
const AccountCollapsibleContentItem: FC<AccountCollapsibleContentItemProps> = ({
|
|
48
|
+
children,
|
|
49
|
+
asChild = true,
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
}) => {
|
|
53
|
+
const Comp = asChild ? Slot : 'div'
|
|
54
|
+
return (
|
|
55
|
+
<Comp
|
|
56
|
+
className={cn(
|
|
57
|
+
accountCollapsibleClasses,
|
|
58
|
+
className
|
|
59
|
+
)}
|
|
60
|
+
{...props}
|
|
61
|
+
>
|
|
62
|
+
{children}
|
|
63
|
+
</Comp>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
AccountCollapsible.displayName = 'AccountCollaspible'
|
|
68
|
+
AccountCollapsibleTrigger.displayName = 'AccountCollaspibleTrigger'
|
|
69
|
+
AccountCollapsibleHeader.displayName = 'AccountCollapsibleHeader'
|
|
70
|
+
AccountCollapsibleContent.displayName = 'AccountCollaspibleContent'
|
|
71
|
+
AccountCollapsibleContentItem.displayName = 'AccountCollapsibleContentItem'
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
AccountCollapsible,
|
|
75
|
+
AccountCollapsibleHeader,
|
|
76
|
+
AccountCollapsibleTrigger,
|
|
77
|
+
AccountCollapsibleContent,
|
|
78
|
+
AccountCollapsibleContentItem,
|
|
79
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'
|
|
2
|
+
|
|
3
|
+
const Collapsible = CollapsiblePrimitive.Root
|
|
4
|
+
|
|
5
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
|
|
6
|
+
|
|
7
|
+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
|
|
8
|
+
|
|
9
|
+
Collapsible.displayName = 'Collapsible'
|
|
10
|
+
CollapsibleTrigger.displayName = 'CollapsibleTrigger'
|
|
11
|
+
CollapsibleContent.displayName = 'CollapsibleContent'
|
|
12
|
+
|
|
13
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './Collapsible'
|
|
2
|
+
export {
|
|
3
|
+
AccountCollapsible,
|
|
4
|
+
AccountCollapsibleHeader,
|
|
5
|
+
AccountCollapsibleTrigger,
|
|
6
|
+
AccountCollapsibleContent,
|
|
7
|
+
AccountCollapsibleContentItem,
|
|
8
|
+
} from './AccountCollapsible'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { format } from 'date-fns'
|
|
3
|
+
import { cn } from '../@/lib/utils'
|
|
4
|
+
import { Calendar } from '../../src/Calendar'
|
|
5
|
+
import { Calendar as CalendarIcon } from '../../src/Icon'
|
|
6
|
+
import { Popover } from '../../src/Popover'
|
|
7
|
+
import { ru } from 'date-fns/locale'
|
|
8
|
+
|
|
9
|
+
const trigegrClasses = 'inline-flex items-center px-[12px] h-[44px] text-left border-input border rounded-sm'
|
|
10
|
+
|
|
11
|
+
interface IProps {
|
|
12
|
+
dateFormat?: any,
|
|
13
|
+
mode?: any;
|
|
14
|
+
placeholder?: string,
|
|
15
|
+
date?: Date,
|
|
16
|
+
classTrigger?: string,
|
|
17
|
+
triggerDisabled?: boolean,
|
|
18
|
+
onSelect?: (value: Date) => void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const DatePicker: React.FC<IProps> = ({placeholder, triggerDisabled, date, classTrigger, dateFormat = 'PPP', ...props}) => {
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Popover>
|
|
25
|
+
<Popover.Trigger asChild>
|
|
26
|
+
<button className={cn(trigegrClasses, {'bg-light text-light':triggerDisabled}, classTrigger)} disabled={triggerDisabled}>
|
|
27
|
+
{date ? <span className='w-[calc(100%-26px)] truncate'>{format(date ,dateFormat, {locale: ru})}</span> : <span className='w-[calc(100%-26px)] text-light truncate'>{placeholder}</span>}
|
|
28
|
+
<CalendarIcon width={18} height={18} className="ml-[8px] text-light shrink-0" />
|
|
29
|
+
</button>
|
|
30
|
+
</Popover.Trigger>
|
|
31
|
+
<Popover.Content
|
|
32
|
+
className="bg-page p-0 w-auto"
|
|
33
|
+
align="center"
|
|
34
|
+
>
|
|
35
|
+
<Calendar {...props}/>
|
|
36
|
+
</Popover.Content>
|
|
37
|
+
</Popover>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { DatePicker }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DatePicker } from './DatePicker'
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { FC, ReactNode } from 'react'
|
|
2
|
+
import { cn } from '../@/lib/utils'
|
|
3
|
+
|
|
4
|
+
const buttonClasses = {
|
|
5
|
+
base: `
|
|
6
|
+
size-[64px]
|
|
7
|
+
text-[32px]
|
|
8
|
+
leading-[32px]
|
|
9
|
+
text-primary
|
|
10
|
+
rounded-full
|
|
11
|
+
hover:bg-primary-light
|
|
12
|
+
focus-visible:bg-primary-light
|
|
13
|
+
active:text-white
|
|
14
|
+
active:bg-primary
|
|
15
|
+
border-[1px]
|
|
16
|
+
border-primary
|
|
17
|
+
`,
|
|
18
|
+
clean: `
|
|
19
|
+
border-none
|
|
20
|
+
`,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
24
|
+
clean?: boolean
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const Button: FC<IButtonProps> = ({ children, className, clean = false, type = 'button', ...props }) => {
|
|
28
|
+
return (
|
|
29
|
+
<button
|
|
30
|
+
className={cn(buttonClasses.base, clean && buttonClasses.clean, className)}
|
|
31
|
+
type={type}
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
</button>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface IDigitKeyPadProps {
|
|
40
|
+
isDisabled: boolean
|
|
41
|
+
legend?: string
|
|
42
|
+
children?: ReactNode
|
|
43
|
+
className?: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface IDigitKeyPad {
|
|
47
|
+
displayName: string
|
|
48
|
+
Button: typeof Button
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const DigitKeyPad: FC<IDigitKeyPadProps> & IDigitKeyPad = ({ legend, children, isDisabled }) => {
|
|
52
|
+
return (
|
|
53
|
+
<fieldset
|
|
54
|
+
disabled={isDisabled}
|
|
55
|
+
className="gap-[32px] grid grid-cols-3 grid-rows-4 mx-auto w-[256px]"
|
|
56
|
+
>
|
|
57
|
+
{legend && <legend className="sr-only">{legend}</legend>}
|
|
58
|
+
{children}
|
|
59
|
+
</fieldset>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
DigitKeyPad.displayName = 'DigitKeyPad'
|
|
64
|
+
|
|
65
|
+
DigitKeyPad.Button = Button
|
|
66
|
+
|
|
67
|
+
DigitKeyPad.Button.displayName = 'DigitKeyPad.Button'
|
|
68
|
+
|
|
69
|
+
export { DigitKeyPad }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DigitKeyPad } from './DigitKeyPad'
|