@modul/mbui 0.0.20-beta-pv-52992-d5155aa6 → 0.0.20-beta-pv-53154-4403aebc
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/Alert/Alert.js +1 -1
- package/dist/Alert/Alert.js.map +1 -1
- package/dist/Badge/Badge.d.ts +10 -0
- package/dist/Badge/Badge.js +52 -0
- package/dist/Badge/Badge.js.map +1 -0
- package/dist/Badge/index.d.ts +1 -0
- package/dist/Badge/index.js +7 -0
- package/dist/Badge/index.js.map +1 -0
- package/dist/Button/Button.js +1 -1
- package/dist/FavoritePyments/FavoritePaymentsList.js +1 -1
- package/dist/FavoritePyments/FavoritePaymentsList.js.map +1 -1
- package/dist/Input-OTP/Input.js +2 -3
- package/dist/Input-OTP/Input.js.map +1 -1
- package/dist/Page/Page.js +1 -1
- package/dist/Page/Page.js.map +1 -1
- package/dist/Select/SelectAccountCard.js +33 -5
- package/dist/Select/SelectAccountCard.js.map +1 -1
- package/dist/Select/SelectAsync.js +73 -12
- package/dist/Select/SelectAsync.js.map +1 -1
- package/dist/Select/SelectBase.js +73 -13
- package/dist/Select/SelectBase.js.map +1 -1
- package/dist/Select/index.d.ts +0 -1
- package/dist/Select/index.js +1 -3
- package/dist/Select/index.js.map +1 -1
- package/dist/Toaster/Toaster.d.ts +13 -0
- package/dist/Toaster/Toaster.js +60 -0
- package/dist/Toaster/Toaster.js.map +1 -0
- package/dist/Toaster/index.d.ts +1 -0
- package/dist/Toaster/index.js +7 -0
- package/dist/Toaster/index.js.map +1 -0
- package/dist/index.d.ts +8 -5
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/@/config/index.ts +5 -0
- package/src/Alert/Alert.tsx +1 -1
- package/src/Badge/Badge.tsx +58 -0
- package/src/Badge/index.ts +1 -0
- package/src/Button/Button.tsx +1 -1
- package/src/FavoritePyments/FavoritePaymentsList.tsx +1 -1
- package/src/Input-OTP/Input.tsx +2 -2
- package/src/Page/Page.tsx +1 -1
- package/src/Select/SelectAccountCard.tsx +51 -1
- package/src/Select/SelectAsync.tsx +162 -1
- package/src/Select/SelectBase.tsx +168 -19
- package/src/Select/index.ts +0 -1
- package/src/Toaster/Toaster.tsx +71 -0
- package/src/Toaster/index.ts +1 -0
- package/src/assets/css/global.css +9 -1
- package/src/assets/images/logo/sbp-logo.svg +1 -0
- package/src/index.ts +15 -10
- package/src/pages/payments/SmsSign/sms-sign.tsx +91 -0
- package/dist/Select/SelectAccount.d.ts +0 -8
- package/dist/Select/SelectAccount.js +0 -50
- package/dist/Select/SelectAccount.js.map +0 -1
- package/dist/Select/components/components.d.ts +0 -15
- package/dist/Select/components/components.js +0 -80
- package/dist/Select/components/components.js.map +0 -1
- package/dist/Select/components/index.d.ts +0 -1
- package/dist/Select/components/index.js +0 -17
- package/dist/Select/components/index.js.map +0 -1
- package/src/Select/SelectAccount.tsx +0 -101
- package/src/Select/components/components.tsx +0 -186
- package/src/Select/components/index.tsx +0 -15
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ import { BottomNavigation, BottomNavigationList, BottomNavigationListItem, Botto
|
|
|
8
8
|
import * as Icon from './Icon';
|
|
9
9
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './Collapsible';
|
|
10
10
|
import { AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem } from './Collapsible';
|
|
11
|
-
import { Button, ButtonWidget } from './Button';
|
|
11
|
+
import { Button, buttonVariants, ButtonWidget } from './Button';
|
|
12
12
|
import { Audio } from './Audio';
|
|
13
13
|
import { cn } from './@/lib/utils';
|
|
14
|
-
import { Drawer, DrawerTrigger,
|
|
14
|
+
import { Drawer, DrawerTrigger, DrawerClose, DrawerContent, DrawerTitle } from './Drawer';
|
|
15
15
|
import { Page } from './Page';
|
|
16
16
|
import { Chip } from './Chip';
|
|
17
17
|
import { InputField, InputLabel, InputMask } from './Input';
|
|
@@ -19,13 +19,16 @@ import { Alert } from './Alert';
|
|
|
19
19
|
import { Switch } from './Switch';
|
|
20
20
|
import { Label } from './Label';
|
|
21
21
|
import { Textarea } from './Textarea';
|
|
22
|
-
import { SelectAccountCard, SelectAsync
|
|
22
|
+
import { SelectAccountCard, SelectAsync } from './Select';
|
|
23
23
|
import { Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage } from './Form';
|
|
24
24
|
import { Calendar } from './Calendar';
|
|
25
25
|
import { DatePicker } from './DatePicker';
|
|
26
|
-
import {
|
|
26
|
+
import { Select } from './Select';
|
|
27
|
+
import { Progress } from './Progress';
|
|
27
28
|
import { AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel } from './AlertDialog';
|
|
28
29
|
import { MessageTyping } from "./Chat";
|
|
29
30
|
import { FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription, farvoriteLinkClasses } from './FavoritePyments';
|
|
30
31
|
import { DigitKeyPad } from "./DigitKeyPad";
|
|
31
|
-
|
|
32
|
+
import { Badge, badgeVariants } from './Badge';
|
|
33
|
+
import { Toaster, toast } from './Toaster';
|
|
34
|
+
export { Tooltip, Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, buttonVariants, InputField, InputLabel, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page, Chip, Progress, Alert, Switch, Label, Textarea, SelectAccountCard, Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage, Calendar, DatePicker, SelectAsync, InputMask, Select, AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, MessageTyping, FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription, farvoriteLinkClasses, Badge, badgeVariants, DigitKeyPad, ButtonWidget, Toaster, toast, };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.ButtonWidget = exports.DigitKeyPad = exports.farvoriteLinkClasses = exports.FarvoritePaymentDescription = exports.FavoritePaymentsItem = exports.FavoritePaymentsList = exports.MessageTyping = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialog = exports.
|
|
3
|
+
exports.DatePicker = exports.Calendar = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormItem = exports.FormField = exports.FormLabel = exports.Form = exports.SelectAccountCard = exports.Textarea = exports.Label = exports.Switch = exports.Alert = exports.Progress = exports.Chip = exports.Page = exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = exports.DrawerContent = exports.DrawerClose = exports.DrawerTitle = exports.DrawerTrigger = exports.Drawer = exports.Icon = exports.cn = exports.Audio = exports.InputLabel = exports.InputField = exports.buttonVariants = exports.Button = exports.AccountCollapsibleContentItem = exports.AccountCollapsibleContent = exports.AccountCollapsibleTrigger = exports.AccountCollapsibleHeader = exports.AccountCollapsible = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.Logo = exports.Popover = exports.Slider = exports.Tabs = exports.Tooltip = void 0;
|
|
4
|
+
exports.toast = exports.Toaster = exports.ButtonWidget = exports.DigitKeyPad = exports.badgeVariants = exports.Badge = exports.farvoriteLinkClasses = exports.FarvoritePaymentDescription = exports.FavoritePaymentsItem = exports.FavoritePaymentsList = exports.MessageTyping = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialog = exports.Select = exports.InputMask = exports.SelectAsync = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const Tooltip_1 = require("./Tooltip");
|
|
7
7
|
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "AccountCollapsibleContent", { enumerable: true,
|
|
|
37
37
|
Object.defineProperty(exports, "AccountCollapsibleContentItem", { enumerable: true, get: function () { return Collapsible_2.AccountCollapsibleContentItem; } });
|
|
38
38
|
const Button_1 = require("./Button");
|
|
39
39
|
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
40
|
+
Object.defineProperty(exports, "buttonVariants", { enumerable: true, get: function () { return Button_1.buttonVariants; } });
|
|
40
41
|
Object.defineProperty(exports, "ButtonWidget", { enumerable: true, get: function () { return Button_1.ButtonWidget; } });
|
|
41
42
|
const Audio_1 = require("./Audio");
|
|
42
43
|
Object.defineProperty(exports, "Audio", { enumerable: true, get: function () { return Audio_1.Audio; } });
|
|
@@ -45,9 +46,9 @@ Object.defineProperty(exports, "cn", { enumerable: true, get: function () { retu
|
|
|
45
46
|
const Drawer_1 = require("./Drawer");
|
|
46
47
|
Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return Drawer_1.Drawer; } });
|
|
47
48
|
Object.defineProperty(exports, "DrawerTrigger", { enumerable: true, get: function () { return Drawer_1.DrawerTrigger; } });
|
|
48
|
-
Object.defineProperty(exports, "DrawerTitle", { enumerable: true, get: function () { return Drawer_1.DrawerTitle; } });
|
|
49
49
|
Object.defineProperty(exports, "DrawerClose", { enumerable: true, get: function () { return Drawer_1.DrawerClose; } });
|
|
50
50
|
Object.defineProperty(exports, "DrawerContent", { enumerable: true, get: function () { return Drawer_1.DrawerContent; } });
|
|
51
|
+
Object.defineProperty(exports, "DrawerTitle", { enumerable: true, get: function () { return Drawer_1.DrawerTitle; } });
|
|
51
52
|
const Page_1 = require("./Page");
|
|
52
53
|
Object.defineProperty(exports, "Page", { enumerable: true, get: function () { return Page_1.Page; } });
|
|
53
54
|
const Chip_1 = require("./Chip");
|
|
@@ -67,8 +68,6 @@ Object.defineProperty(exports, "Textarea", { enumerable: true, get: function ()
|
|
|
67
68
|
const Select_1 = require("./Select");
|
|
68
69
|
Object.defineProperty(exports, "SelectAccountCard", { enumerable: true, get: function () { return Select_1.SelectAccountCard; } });
|
|
69
70
|
Object.defineProperty(exports, "SelectAsync", { enumerable: true, get: function () { return Select_1.SelectAsync; } });
|
|
70
|
-
Object.defineProperty(exports, "SelectAccount", { enumerable: true, get: function () { return Select_1.SelectAccount; } });
|
|
71
|
-
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return Select_1.Select; } });
|
|
72
71
|
const Form_1 = require("./Form");
|
|
73
72
|
Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return Form_1.Form; } });
|
|
74
73
|
Object.defineProperty(exports, "FormLabel", { enumerable: true, get: function () { return Form_1.FormLabel; } });
|
|
@@ -81,6 +80,8 @@ const Calendar_1 = require("./Calendar");
|
|
|
81
80
|
Object.defineProperty(exports, "Calendar", { enumerable: true, get: function () { return Calendar_1.Calendar; } });
|
|
82
81
|
const DatePicker_1 = require("./DatePicker");
|
|
83
82
|
Object.defineProperty(exports, "DatePicker", { enumerable: true, get: function () { return DatePicker_1.DatePicker; } });
|
|
83
|
+
const Select_2 = require("./Select");
|
|
84
|
+
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return Select_2.Select; } });
|
|
84
85
|
const Progress_1 = require("./Progress");
|
|
85
86
|
Object.defineProperty(exports, "Progress", { enumerable: true, get: function () { return Progress_1.Progress; } });
|
|
86
87
|
const AlertDialog_1 = require("./AlertDialog");
|
|
@@ -102,4 +103,10 @@ Object.defineProperty(exports, "FarvoritePaymentDescription", { enumerable: true
|
|
|
102
103
|
Object.defineProperty(exports, "farvoriteLinkClasses", { enumerable: true, get: function () { return FavoritePyments_1.farvoriteLinkClasses; } });
|
|
103
104
|
const DigitKeyPad_1 = require("./DigitKeyPad");
|
|
104
105
|
Object.defineProperty(exports, "DigitKeyPad", { enumerable: true, get: function () { return DigitKeyPad_1.DigitKeyPad; } });
|
|
106
|
+
const Badge_1 = require("./Badge");
|
|
107
|
+
Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return Badge_1.Badge; } });
|
|
108
|
+
Object.defineProperty(exports, "badgeVariants", { enumerable: true, get: function () { return Badge_1.badgeVariants; } });
|
|
109
|
+
const Toaster_1 = require("./Toaster");
|
|
110
|
+
Object.defineProperty(exports, "Toaster", { enumerable: true, get: function () { return Toaster_1.Toaster; } });
|
|
111
|
+
Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return Toaster_1.toast; } });
|
|
105
112
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,uCAAmC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,uCAAmC;AAwDlC,wFAxDQ,iBAAO,OAwDR;AAvDR,iCAA6B;AAwD5B,qFAxDQ,WAAI,OAwDR;AAvDL,qCAAiC;AAwDhC,uFAxDQ,eAAM,OAwDR;AAvDP,uCAAmC;AAwDlC,wFAxDQ,iBAAO,OAwDR;AAvDR,+DAAyB;AAwDxB,eAxDM,cAAI,CAwDN;AAvDL,2CAAsF;AAwDrF,yFAxDQ,oBAAQ,OAwDR;AACR,8FAzDkB,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
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modul/mbui",
|
|
3
|
-
"version": "0.0.20-beta-pv-
|
|
3
|
+
"version": "0.0.20-beta-pv-53154-4403aebc",
|
|
4
4
|
"packageManager": "yarn@3.5.1",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"react-hook-form": "7.53.0",
|
|
46
46
|
"react-imask": "7.6.1",
|
|
47
47
|
"react-select": "5.8.0",
|
|
48
|
+
"sonner": "^1.5.0",
|
|
48
49
|
"tailwind-merge": "^2.3.0",
|
|
49
50
|
"tailwindcss": "^3.4.4",
|
|
50
51
|
"tailwindcss-animate": "^1.0.7",
|
package/src/@/config/index.ts
CHANGED
|
@@ -75,10 +75,15 @@ export default {
|
|
|
75
75
|
from: { height: 'var(--radix-accordion-content-height)' },
|
|
76
76
|
to: { height: '0' },
|
|
77
77
|
},
|
|
78
|
+
'caret-blink': {
|
|
79
|
+
'0%,70%,100%': { opacity: '1' },
|
|
80
|
+
'20%,50%': { opacity: '0' },
|
|
81
|
+
},
|
|
78
82
|
},
|
|
79
83
|
animation: {
|
|
80
84
|
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
81
85
|
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
86
|
+
'caret-blink': 'caret-blink 1.25s ease-out infinite',
|
|
82
87
|
},
|
|
83
88
|
},
|
|
84
89
|
}
|
package/src/Alert/Alert.tsx
CHANGED
|
@@ -58,7 +58,7 @@ type TAlertProps = IAlertProps & React.DetailedHTMLProps<React.HTMLAttributes<HT
|
|
|
58
58
|
const Alert: React.FC<TAlertProps> & IAlertComponents = ({ className, variant = 'info', type, children, ...props }) => {
|
|
59
59
|
return (
|
|
60
60
|
<div
|
|
61
|
-
className={cn('flex', getClass(variant, type))}
|
|
61
|
+
className={cn('flex', getClass(variant, type), className)}
|
|
62
62
|
role='alert'
|
|
63
63
|
{...props}
|
|
64
64
|
>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
3
|
+
|
|
4
|
+
import { cn } from '../@/lib/utils'
|
|
5
|
+
|
|
6
|
+
const badgeClasses = {
|
|
7
|
+
variant: {
|
|
8
|
+
base: `
|
|
9
|
+
inline-block
|
|
10
|
+
focus:ring-2
|
|
11
|
+
focus:ring-ring
|
|
12
|
+
focus:ring-offset-2
|
|
13
|
+
focus:outline-none
|
|
14
|
+
transition-colors
|
|
15
|
+
rounded-full
|
|
16
|
+
`,
|
|
17
|
+
default: `
|
|
18
|
+
bg-critical
|
|
19
|
+
text-white
|
|
20
|
+
`,
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: 'size-[16px] text-[10px] text-center leadimg-[1] truncate',
|
|
24
|
+
dot: 'size-[10px] bg-critical-light border-critical border-[3px]',
|
|
25
|
+
sm: '',
|
|
26
|
+
md: '',
|
|
27
|
+
lg: '',
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const badgeVariants = cva(badgeClasses.variant.base, {
|
|
32
|
+
variants: {
|
|
33
|
+
variant: {
|
|
34
|
+
default: badgeClasses.variant.default,
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
default: badgeClasses.size.default,
|
|
38
|
+
dot: badgeClasses.size.dot
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
variant: 'default',
|
|
43
|
+
size: 'default',
|
|
44
|
+
},
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
|
|
48
|
+
|
|
49
|
+
function Badge({ className, variant, size, ...props }: BadgeProps) {
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
className={cn(badgeVariants({ variant, size }), className)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { Badge, badgeVariants }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge, badgeVariants } from './Badge'
|
package/src/Button/Button.tsx
CHANGED
|
@@ -10,7 +10,7 @@ const farvoriteLinkClasses: string = `
|
|
|
10
10
|
`
|
|
11
11
|
|
|
12
12
|
const FavoritePaymentsList: FC<{children: React.ReactNode}> = ({children}) => {
|
|
13
|
-
return <ul className="
|
|
13
|
+
return <ul className="divide-y">{children}</ul>
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const FavoritePaymentsItem: FC<{children: React.ReactNode}> = ({children}) => {
|
package/src/Input-OTP/Input.tsx
CHANGED
|
@@ -37,7 +37,7 @@ const InputOTPSlot = React.forwardRef<
|
|
|
37
37
|
ref={ref}
|
|
38
38
|
className={cn(
|
|
39
39
|
'relative flex h-[48px] w-[20px] items-center justify-center border-b-[2px] border-input transition-all',
|
|
40
|
-
isActive && '
|
|
40
|
+
isActive && 'border-b-primary',
|
|
41
41
|
className
|
|
42
42
|
)}
|
|
43
43
|
{...props}
|
|
@@ -46,7 +46,7 @@ const InputOTPSlot = React.forwardRef<
|
|
|
46
46
|
{char}
|
|
47
47
|
{hasFakeCaret && (
|
|
48
48
|
<div className="absolute inset-0 flex justify-center items-center pointer-events-none">
|
|
49
|
-
<div className="bg-
|
|
49
|
+
{/* <div className="bg-primary w-[2px] h-[32px] animate-caret-blink duration-1000" /> */}
|
|
50
50
|
</div>
|
|
51
51
|
)}
|
|
52
52
|
</div>
|
package/src/Page/Page.tsx
CHANGED
|
@@ -6,7 +6,7 @@ type IProps = {
|
|
|
6
6
|
className?: string
|
|
7
7
|
}
|
|
8
8
|
const Navbar: FC<IProps> = ({ children, className }) => {
|
|
9
|
-
return <div className={cn('flex items-center h-[
|
|
9
|
+
return <div className={cn('flex items-center h-[--page-header-height] px-[20px] shrink-0', className)}>{children}</div>
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const Content: FC<IProps> = ({ children, className }) => {
|
|
@@ -5,12 +5,14 @@ import Select, {
|
|
|
5
5
|
ControlProps,
|
|
6
6
|
OptionProps,
|
|
7
7
|
DropdownIndicatorProps,
|
|
8
|
+
StylesConfig,
|
|
8
9
|
SingleValueProps,
|
|
10
|
+
MenuProps,
|
|
11
|
+
ValueContainerProps,
|
|
9
12
|
Props,
|
|
10
13
|
GroupBase,
|
|
11
14
|
} from 'react-select'
|
|
12
15
|
import { cn } from '../@/lib/utils'
|
|
13
|
-
import { colourStyles, Menu, optionClasses, ValueContainer } from './components'
|
|
14
16
|
|
|
15
17
|
const selectTriggerClasses: string = `
|
|
16
18
|
flex
|
|
@@ -28,6 +30,19 @@ const selectTriggerClasses: string = `
|
|
|
28
30
|
shadow-[0px_8px_18px_0px_rgba(73,113,208,0.38)]
|
|
29
31
|
cursor-pointer
|
|
30
32
|
`
|
|
33
|
+
|
|
34
|
+
const colourStyles: StylesConfig = {
|
|
35
|
+
control: () => ({}),
|
|
36
|
+
option: () => ({}),
|
|
37
|
+
input: () => ({}),
|
|
38
|
+
dropdownIndicator: () => ({}),
|
|
39
|
+
indicatorsContainer: () => ({}),
|
|
40
|
+
menu: () => ({}),
|
|
41
|
+
menuList: () => ({}),
|
|
42
|
+
singleValue: () => ({}),
|
|
43
|
+
valueContainer: () => ({}),
|
|
44
|
+
}
|
|
45
|
+
|
|
31
46
|
const Control = ({ children, ...props }: ControlProps) => {
|
|
32
47
|
const { isFocused } = props
|
|
33
48
|
return (
|
|
@@ -43,6 +58,19 @@ const Control = ({ children, ...props }: ControlProps) => {
|
|
|
43
58
|
)
|
|
44
59
|
}
|
|
45
60
|
|
|
61
|
+
const optionClasses = `
|
|
62
|
+
flex
|
|
63
|
+
items-center
|
|
64
|
+
py-[16px]
|
|
65
|
+
px-[12px]
|
|
66
|
+
w-full
|
|
67
|
+
first:rounded-t-md
|
|
68
|
+
last:rounded-b-md
|
|
69
|
+
cursor-default
|
|
70
|
+
select-none
|
|
71
|
+
outline-none
|
|
72
|
+
`
|
|
73
|
+
|
|
46
74
|
const Option = ({ children, ...props }: OptionProps) => {
|
|
47
75
|
const {
|
|
48
76
|
isSelected,
|
|
@@ -95,6 +123,17 @@ const DropdownIndicator = ({ children, ...props }: DropdownIndicatorProps) => {
|
|
|
95
123
|
)
|
|
96
124
|
}
|
|
97
125
|
|
|
126
|
+
const ValueContainer = ({ children, ...props }: ValueContainerProps) => {
|
|
127
|
+
return (
|
|
128
|
+
<components.ValueContainer
|
|
129
|
+
className="flex-1 grid"
|
|
130
|
+
{...props}
|
|
131
|
+
>
|
|
132
|
+
{children}
|
|
133
|
+
</components.ValueContainer>
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
|
|
98
137
|
const SingleValue = ({ children, ...props }: SingleValueProps) => {
|
|
99
138
|
// @ts-ignore
|
|
100
139
|
const { label, account, balance, cur } = props.data
|
|
@@ -113,6 +152,17 @@ const SingleValue = ({ children, ...props }: SingleValueProps) => {
|
|
|
113
152
|
)
|
|
114
153
|
}
|
|
115
154
|
|
|
155
|
+
const Menu = ({ children, ...props }: MenuProps) => {
|
|
156
|
+
return (
|
|
157
|
+
<components.Menu
|
|
158
|
+
className="z-[1] absolute inset-x-0 bg-page shadow-md mt-[8px] rounded-md"
|
|
159
|
+
{...props}
|
|
160
|
+
>
|
|
161
|
+
{children}
|
|
162
|
+
</components.Menu>
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
|
|
116
166
|
type SelectAccountCardProps<
|
|
117
167
|
Option,
|
|
118
168
|
IsMulti extends boolean = false,
|
|
@@ -1,6 +1,167 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
+
import { DropdownSmallOld, CheckSmall } from '../../src/Icon'
|
|
3
|
+
import {
|
|
4
|
+
components,
|
|
5
|
+
ControlProps,
|
|
6
|
+
OptionProps,
|
|
7
|
+
DropdownIndicatorProps,
|
|
8
|
+
StylesConfig,
|
|
9
|
+
SingleValueProps,
|
|
10
|
+
MenuProps,
|
|
11
|
+
PlaceholderProps,
|
|
12
|
+
ValueContainerProps,
|
|
13
|
+
InputProps,
|
|
14
|
+
LoadingIndicatorProps,
|
|
15
|
+
IndicatorsContainerProps,
|
|
16
|
+
} from 'react-select'
|
|
2
17
|
import AsyncSelect from 'react-select/async'
|
|
3
|
-
import {
|
|
18
|
+
import { cn } from '../@/lib/utils'
|
|
19
|
+
|
|
20
|
+
const selectTriggerClasses: string = `
|
|
21
|
+
flex
|
|
22
|
+
items-center
|
|
23
|
+
py-[12px]
|
|
24
|
+
px-[16px]
|
|
25
|
+
h-[44px]
|
|
26
|
+
border-[1px]
|
|
27
|
+
border-input
|
|
28
|
+
rounded-sm
|
|
29
|
+
text-left
|
|
30
|
+
cursor-pointer
|
|
31
|
+
`
|
|
32
|
+
|
|
33
|
+
const colourStyles: StylesConfig = {
|
|
34
|
+
control: () => ({}),
|
|
35
|
+
option: () => ({}),
|
|
36
|
+
input: () => ({}),
|
|
37
|
+
dropdownIndicator: () => ({}),
|
|
38
|
+
indicatorsContainer: () => ({}),
|
|
39
|
+
menu: () => ({}),
|
|
40
|
+
menuList: () => ({}),
|
|
41
|
+
singleValue: () => ({}),
|
|
42
|
+
valueContainer: () => ({}),
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const Input = ({...props }: InputProps) => {
|
|
46
|
+
return <components.Input className='col-start-1 col-end-3 row-start-1 row-end-2' {...props} />
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const Control = ({ children, ...props }: ControlProps) => {
|
|
50
|
+
const { isFocused } = props
|
|
51
|
+
return (
|
|
52
|
+
<components.Control
|
|
53
|
+
className={cn(selectTriggerClasses, { 'outline outline-primary outline-offset-2 outline-2': isFocused })}
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
{children}
|
|
57
|
+
</components.Control>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const optionClasses =
|
|
62
|
+
'flex items-center first:rounded-t-sm last:rounded-b-sm px-[16px] py-[12px] w-full cursor-default select-none outline-none'
|
|
63
|
+
|
|
64
|
+
const Option = ({ children, ...props }: OptionProps) => {
|
|
65
|
+
const {
|
|
66
|
+
isSelected,
|
|
67
|
+
isFocused,
|
|
68
|
+
isDisabled,
|
|
69
|
+
} = props
|
|
70
|
+
return (
|
|
71
|
+
<components.Option
|
|
72
|
+
className={cn(optionClasses, { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled })}
|
|
73
|
+
{...props}
|
|
74
|
+
>
|
|
75
|
+
<span className="flex basis-0 grow">{children}</span>
|
|
76
|
+
|
|
77
|
+
<span className="ml-[16px] shrink-0 size-[24px]">
|
|
78
|
+
{isSelected && (
|
|
79
|
+
<CheckSmall
|
|
80
|
+
width="24"
|
|
81
|
+
height="24"
|
|
82
|
+
className="text-primary"
|
|
83
|
+
/>
|
|
84
|
+
)}
|
|
85
|
+
</span>
|
|
86
|
+
</components.Option>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const IndicatorsContainer = ({ children, ...props }: IndicatorsContainerProps) => {
|
|
91
|
+
return (
|
|
92
|
+
<components.IndicatorsContainer className='flex items-center gap-x-[8px] shrink-0' {...props}>
|
|
93
|
+
{children}
|
|
94
|
+
</components.IndicatorsContainer>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const LoadingIndicator = ({...props }: LoadingIndicatorProps) => {
|
|
99
|
+
return (
|
|
100
|
+
<components.LoadingIndicator
|
|
101
|
+
className='text-light shrink-0'
|
|
102
|
+
{...props}
|
|
103
|
+
/>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const DropdownIndicator = ({ children, ...props }: DropdownIndicatorProps) => {
|
|
108
|
+
return (
|
|
109
|
+
<components.DropdownIndicator
|
|
110
|
+
className="shrink-0"
|
|
111
|
+
{...props}
|
|
112
|
+
>
|
|
113
|
+
<DropdownSmallOld
|
|
114
|
+
className="text-light"
|
|
115
|
+
width="12"
|
|
116
|
+
height="12"
|
|
117
|
+
/>
|
|
118
|
+
</components.DropdownIndicator>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const ValueContainer = ({ children, ...props }: ValueContainerProps) => {
|
|
123
|
+
return (
|
|
124
|
+
<components.ValueContainer
|
|
125
|
+
className="flex-1 grid"
|
|
126
|
+
{...props}
|
|
127
|
+
>
|
|
128
|
+
{children}
|
|
129
|
+
</components.ValueContainer>
|
|
130
|
+
)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const SingleValue = ({ children, ...props }: SingleValueProps) => {
|
|
134
|
+
return (
|
|
135
|
+
<components.SingleValue
|
|
136
|
+
className="col-start-1 col-end-3 row-start-1 row-end-2"
|
|
137
|
+
{...props}
|
|
138
|
+
>
|
|
139
|
+
{children}
|
|
140
|
+
</components.SingleValue>
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const Menu = ({ children, ...props }: MenuProps) => {
|
|
145
|
+
return (
|
|
146
|
+
<components.Menu
|
|
147
|
+
className="z-[1] absolute inset-x-0 bg-page shadow-sm mt-[8px] rounded-sm"
|
|
148
|
+
{...props}
|
|
149
|
+
>
|
|
150
|
+
{children}
|
|
151
|
+
</components.Menu>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const Placeholder = ({ children, ...props }: PlaceholderProps) => {
|
|
156
|
+
return (
|
|
157
|
+
<components.Placeholder
|
|
158
|
+
className="col-start-1 col-end-3 row-start-1 row-end-2 text-[16px] text-light truncate"
|
|
159
|
+
{...props}
|
|
160
|
+
>
|
|
161
|
+
{children}
|
|
162
|
+
</components.Placeholder>
|
|
163
|
+
)
|
|
164
|
+
}
|
|
4
165
|
|
|
5
166
|
const SelectAsync = ({ ...props }) => (
|
|
6
167
|
<AsyncSelect
|