@modul/mbui 0.0.8-beta-pv-52970-3f3b204b → 0.0.9
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/Button/Button.js +2 -2
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -2
- package/dist/Button/index.js.map +1 -1
- package/dist/{DashboardDrawer → DasboardDrawer}/DashboardDrawer.d.ts +1 -2
- package/dist/{DashboardDrawer → DasboardDrawer}/DashboardDrawer.js +8 -11
- package/dist/DasboardDrawer/DashboardDrawer.js.map +1 -0
- package/dist/DasboardDrawer/index.js.map +1 -0
- package/dist/Icon/icons/ArrowLeft.js +2 -2
- package/dist/Icon/icons/ArrowLeft.js.map +1 -1
- package/dist/Icon/icons/Chat.js +2 -2
- package/dist/Icon/icons/Chat.js.map +1 -1
- package/dist/Icon/icons/Clock.js +2 -2
- package/dist/Icon/icons/Clock.js.map +1 -1
- package/dist/Icon/icons/Home.js +2 -2
- package/dist/Icon/icons/Home.js.map +1 -1
- package/dist/Icon/icons/Services.js +2 -2
- package/dist/Icon/icons/Services.js.map +1 -1
- package/dist/Icon/icons/Settings.js +2 -2
- package/dist/Icon/icons/Settings.js.map +1 -1
- package/dist/Icon/icons/Transfer.d.ts +4 -0
- package/dist/Icon/icons/Transfer.js +9 -0
- package/dist/Icon/icons/Transfer.js.map +1 -0
- package/dist/Icon/icons/Wallet.js +2 -2
- package/dist/Icon/icons/Wallet.js.map +1 -1
- package/dist/Icon/icons/index.d.ts +1 -0
- package/dist/Icon/icons/index.js +3 -1
- package/dist/Icon/icons/index.js.map +1 -1
- package/dist/Page/Page.d.ts +3 -4
- package/dist/Page/Page.js +1 -7
- package/dist/Page/Page.js.map +1 -1
- package/dist/Page/index.d.ts +1 -1
- package/dist/Page/index.js +1 -2
- package/dist/Page/index.js.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.js +8 -12
- package/dist/index.js.map +1 -1
- package/package.json +11 -14
- package/src/@/config/index.ts +9 -20
- package/src/Button/Button.tsx +2 -2
- package/src/Button/index.ts +1 -1
- package/src/{Drawer → DasboardDrawer}/DashboardDrawer.tsx +2 -4
- package/src/Icon/icons/ArrowLeft.tsx +3 -4
- package/src/Icon/icons/Chat.tsx +4 -4
- package/src/Icon/icons/Clock.tsx +3 -4
- package/src/Icon/icons/Home.tsx +4 -4
- package/src/Icon/icons/Services.tsx +3 -4
- package/src/Icon/icons/Settings.tsx +3 -4
- package/src/Icon/icons/Transfer.tsx +17 -0
- package/src/Icon/icons/Wallet.tsx +3 -4
- package/src/Icon/icons/index.ts +2 -1
- package/src/Page/Page.tsx +3 -13
- package/src/Page/index.ts +1 -1
- package/src/assets/css/global.css +4 -21
- package/src/index.ts +2 -6
- package/dist/Chip/Chip.d.ts +0 -11
- package/dist/Chip/Chip.js +0 -38
- package/dist/Chip/Chip.js.map +0 -1
- package/dist/Chip/index.d.ts +0 -1
- package/dist/Chip/index.js +0 -6
- package/dist/Chip/index.js.map +0 -1
- package/dist/DashboardDrawer/DashboardDrawer.js.map +0 -1
- package/dist/DashboardDrawer/index.js.map +0 -1
- package/src/@/config/label.ts +0 -89
- package/src/Chip/Chip.tsx +0 -54
- package/src/Chip/index.ts +0 -1
- package/src/DashboardDrawer/DashboardDrawer.tsx +0 -119
- package/src/Drawer/BottomDrawer.tsx +0 -108
- package/src/Label/Label.tsx +0 -20
- package/src/Label/index.ts +0 -1
- package/src/input/Input.tsx +0 -37
- package/src/input/index.ts +0 -1
- /package/dist/{DashboardDrawer → DasboardDrawer}/index.d.ts +0 -0
- /package/dist/{DashboardDrawer → DasboardDrawer}/index.js +0 -0
- /package/src/{DashboardDrawer → DasboardDrawer}/index.ts +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { Drawer as DrawerPrimitive } from 'vaul'
|
|
3
|
-
import { Check } from '../Icon'
|
|
4
|
-
import { cn } from '../@/lib/utils'
|
|
5
|
-
|
|
6
|
-
const Drawer = ({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => <DrawerPrimitive.Root {...props} />
|
|
7
|
-
|
|
8
|
-
Drawer.displayName = 'Drawer'
|
|
9
|
-
|
|
10
|
-
const DrawerTrigger = DrawerPrimitive.Trigger
|
|
11
|
-
|
|
12
|
-
const DrawerPortal = DrawerPrimitive.Portal
|
|
13
|
-
|
|
14
|
-
const DrawerClose = DrawerPrimitive.Close
|
|
15
|
-
|
|
16
|
-
const DrawerTitle = React.forwardRef<
|
|
17
|
-
React.ElementRef<typeof DrawerPrimitive.Title>,
|
|
18
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
|
|
19
|
-
>(({ className, ...props }, ref) => (
|
|
20
|
-
<DrawerPrimitive.Title
|
|
21
|
-
ref={ref}
|
|
22
|
-
className={cn(className)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
))
|
|
26
|
-
DrawerTitle.displayName = DrawerPrimitive.Title.displayName
|
|
27
|
-
|
|
28
|
-
const DrawerFooter: React.FC = () => (
|
|
29
|
-
<DrawerClose className="p-[16px]">
|
|
30
|
-
<svg
|
|
31
|
-
className="mx-auto"
|
|
32
|
-
width="38"
|
|
33
|
-
height="10"
|
|
34
|
-
viewBox="0 0 38 10"
|
|
35
|
-
fill="none"
|
|
36
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
37
|
-
>
|
|
38
|
-
<path
|
|
39
|
-
d="M0 7.39774C0 8.68678 1.25226 9.60455 2.48147 9.21638L17.7955 4.38038C18.5794 4.13282 19.4206 4.13282 20.2045 4.38038L35.5185 9.21638C36.7477 9.60455 38 8.68678 38 7.39774C38 6.56568 37.4606 5.82966 36.6671 5.5791L20.2045 0.380377C19.4206 0.132817 18.5794 0.132817 17.7955 0.380377L1.33286 5.5791C0.539422 5.82966 0 6.56568 0 7.39774Z"
|
|
40
|
-
fill="#243036"
|
|
41
|
-
fillOpacity="0.24"
|
|
42
|
-
/>
|
|
43
|
-
</svg>
|
|
44
|
-
</DrawerClose>
|
|
45
|
-
)
|
|
46
|
-
type DrawerListProps = {
|
|
47
|
-
children: React.ReactNode
|
|
48
|
-
}
|
|
49
|
-
const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
|
|
50
|
-
return (
|
|
51
|
-
<div
|
|
52
|
-
role="list"
|
|
53
|
-
className="px-[20px] divide-y"
|
|
54
|
-
>
|
|
55
|
-
{children}
|
|
56
|
-
</div>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
type DrawerListItemProps = {
|
|
60
|
-
value: string
|
|
61
|
-
label: string | JSX.Element
|
|
62
|
-
isActive?: boolean
|
|
63
|
-
onClick?: () => void
|
|
64
|
-
}
|
|
65
|
-
const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isActive, onClick }) => {
|
|
66
|
-
return (
|
|
67
|
-
<button
|
|
68
|
-
className="flex py-[16px] w-full text-left"
|
|
69
|
-
role="listitem"
|
|
70
|
-
aria-selected={isActive}
|
|
71
|
-
aria-labelledby="1"
|
|
72
|
-
onClick={onClick}
|
|
73
|
-
>
|
|
74
|
-
<span className="w-[calc(100%-50px)]">
|
|
75
|
-
<span
|
|
76
|
-
className="flex [&+span]:mt-[4px] font-medium text-[14px] text-muted leading-[1.28]"
|
|
77
|
-
id="1"
|
|
78
|
-
>
|
|
79
|
-
<span className="[&+span]:ml-[8px] truncate">{label}</span>
|
|
80
|
-
|
|
81
|
-
<span className="inline-flex bg-[#EE7C2D] px-[4px] rounded-full h-[16px] text-[#fff] text-[12px] truncate leading-[16px] shrink-0">
|
|
82
|
-
23
|
|
83
|
-
</span>
|
|
84
|
-
</span>
|
|
85
|
-
<span className="block font-bold text-[20px] leading-[1.2]">{value}</span>
|
|
86
|
-
</span>
|
|
87
|
-
{isActive && (
|
|
88
|
-
<Check
|
|
89
|
-
width={16}
|
|
90
|
-
height={16}
|
|
91
|
-
className="ml-auto text-primary self-center"
|
|
92
|
-
/>
|
|
93
|
-
)}
|
|
94
|
-
</button>
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const DrawerContent = React.forwardRef<
|
|
99
|
-
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
100
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
|
|
101
|
-
>(({ className, children, ...props }, ref) => (
|
|
102
|
-
<DrawerPortal>
|
|
103
|
-
<DrawerPrimitive.Content
|
|
104
|
-
ref={ref}
|
|
105
|
-
className={cn(
|
|
106
|
-
'fixed inset-x-0 top-0 flex h-auto flex-col bg-page drop-shadow-1 rounded-[8px] #24303614; 0px 0px 16px 4px',
|
|
107
|
-
className
|
|
108
|
-
)}
|
|
109
|
-
{...props}
|
|
110
|
-
>
|
|
111
|
-
<DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
|
|
112
|
-
{children}
|
|
113
|
-
<DrawerFooter />
|
|
114
|
-
</DrawerPrimitive.Content>
|
|
115
|
-
</DrawerPortal>
|
|
116
|
-
))
|
|
117
|
-
DrawerContent.displayName = 'DrawerContent'
|
|
118
|
-
|
|
119
|
-
export { Drawer, DrawerTrigger, DrawerContent, DrawerClose, DrawerList, DrawerListItem }
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { Drawer as DrawerPrimitive } from 'vaul'
|
|
3
|
-
import { cn } from '../@/lib/utils'
|
|
4
|
-
|
|
5
|
-
const Drawer = ({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) => <DrawerPrimitive.Root {...props} />
|
|
6
|
-
|
|
7
|
-
Drawer.displayName = 'Drawer'
|
|
8
|
-
|
|
9
|
-
const DrawerTrigger = DrawerPrimitive.Trigger
|
|
10
|
-
|
|
11
|
-
const DrawerPortal = DrawerPrimitive.Portal
|
|
12
|
-
|
|
13
|
-
const DrawerClose = DrawerPrimitive.Close
|
|
14
|
-
|
|
15
|
-
const DrawerTitle = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof DrawerPrimitive.Title>,
|
|
17
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
|
|
18
|
-
>(({ className, ...props }, ref) => (
|
|
19
|
-
<DrawerPrimitive.Title
|
|
20
|
-
ref={ref}
|
|
21
|
-
className={cn(className)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
))
|
|
25
|
-
DrawerTitle.displayName = DrawerPrimitive.Title.displayName
|
|
26
|
-
|
|
27
|
-
const DrawerFooter: React.FC = () => (
|
|
28
|
-
<DrawerClose className="p-[16px]">
|
|
29
|
-
<svg
|
|
30
|
-
className="mx-auto"
|
|
31
|
-
width="38"
|
|
32
|
-
height="10"
|
|
33
|
-
viewBox="0 0 38 10"
|
|
34
|
-
fill="none"
|
|
35
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
36
|
-
>
|
|
37
|
-
<path
|
|
38
|
-
d="M0 7.39774C0 8.68678 1.25226 9.60455 2.48147 9.21638L17.7955 4.38038C18.5794 4.13282 19.4206 4.13282 20.2045 4.38038L35.5185 9.21638C36.7477 9.60455 38 8.68678 38 7.39774C38 6.56568 37.4606 5.82966 36.6671 5.5791L20.2045 0.380377C19.4206 0.132817 18.5794 0.132817 17.7955 0.380377L1.33286 5.5791C0.539422 5.82966 0 6.56568 0 7.39774Z"
|
|
39
|
-
fill="#243036"
|
|
40
|
-
fillOpacity="0.24"
|
|
41
|
-
/>
|
|
42
|
-
</svg>
|
|
43
|
-
</DrawerClose>
|
|
44
|
-
)
|
|
45
|
-
type DrawerListProps = {
|
|
46
|
-
children: React.ReactNode
|
|
47
|
-
}
|
|
48
|
-
const DrawerList: React.FC<DrawerListProps> = ({ children }) => {
|
|
49
|
-
return (
|
|
50
|
-
<div
|
|
51
|
-
role="listbox"
|
|
52
|
-
className="px-[20px]"
|
|
53
|
-
>
|
|
54
|
-
{children}
|
|
55
|
-
</div>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
type DrawerListItemProps = {
|
|
59
|
-
value: string
|
|
60
|
-
label: string | JSX.Element
|
|
61
|
-
isSelected?: boolean,
|
|
62
|
-
}
|
|
63
|
-
const DrawerListItem: React.FC<DrawerListItemProps> = ({ label, value, isSelected }) => {
|
|
64
|
-
return (
|
|
65
|
-
<div
|
|
66
|
-
role="option"
|
|
67
|
-
aria-labelledby="1"
|
|
68
|
-
aria-selected={isSelected}
|
|
69
|
-
className="flex"
|
|
70
|
-
tabIndex={0}
|
|
71
|
-
>
|
|
72
|
-
<div className="shrink-0">
|
|
73
|
-
<p
|
|
74
|
-
className="font-medium text-[14px] text-muted leading-[1.4]"
|
|
75
|
-
id="1"
|
|
76
|
-
>
|
|
77
|
-
{label}
|
|
78
|
-
</p>
|
|
79
|
-
<p className="font-bold text-[20px] leading-[1.2]">{value}</p>
|
|
80
|
-
</div>
|
|
81
|
-
{isSelected && <span></span>}
|
|
82
|
-
</div>
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const DrawerContent = React.forwardRef<
|
|
87
|
-
React.ElementRef<typeof DrawerPrimitive.Content>,
|
|
88
|
-
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
|
|
89
|
-
>(({ className, children, ...props }, ref) => (
|
|
90
|
-
<DrawerPortal>
|
|
91
|
-
<DrawerPrimitive.Content
|
|
92
|
-
ref={ref}
|
|
93
|
-
className={cn(
|
|
94
|
-
'fixed inset-x-0 top-0 flex h-auto flex-col bg-page drop-shadow-1 rounded-[8px] #24303614; 0px 0px 16px 4px',
|
|
95
|
-
className
|
|
96
|
-
)}
|
|
97
|
-
|
|
98
|
-
{...props}
|
|
99
|
-
>
|
|
100
|
-
<DrawerTitle className="sr-only">Выбор компании</DrawerTitle>
|
|
101
|
-
{children}
|
|
102
|
-
<DrawerFooter />
|
|
103
|
-
</DrawerPrimitive.Content>
|
|
104
|
-
</DrawerPortal>
|
|
105
|
-
))
|
|
106
|
-
DrawerContent.displayName = 'DrawerContent'
|
|
107
|
-
|
|
108
|
-
export { Drawer, DrawerTrigger, DrawerContent, DrawerClose, DrawerList, DrawerListItem }
|
package/src/Label/Label.tsx
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import * as LabelPrimitive from '@radix-ui/react-label'
|
|
3
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
-
import { cn } from '../@/lib/utils'
|
|
5
|
-
|
|
6
|
-
const labelVariants = cva('peer-disabled:opacity-70 font-medium text-[12px] leading-[1.33] peer-disabled:cursor-not-allowed')
|
|
7
|
-
|
|
8
|
-
const Label = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<LabelPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(labelVariants(), className)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
))
|
|
18
|
-
Label.displayName = LabelPrimitive.Root.displayName
|
|
19
|
-
|
|
20
|
-
export { Label }
|
package/src/Label/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Label } from './Label'
|
package/src/input/Input.tsx
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import { cn } from '../@/lib/utils'
|
|
3
|
-
|
|
4
|
-
const InputLabel = React.forwardRef<HTMLLabelElement, React.LabelHTMLAttributes<HTMLLabelElement>>(
|
|
5
|
-
({ className, children, ...props }) => {
|
|
6
|
-
return (
|
|
7
|
-
<label
|
|
8
|
-
className={cn('text-[12px] leading-[1.33]', className)}
|
|
9
|
-
{...props}
|
|
10
|
-
>
|
|
11
|
-
{children}
|
|
12
|
-
</label>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
InputLabel.displayName = 'InputLabel'
|
|
18
|
-
|
|
19
|
-
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
20
|
-
|
|
21
|
-
const InputField = React.forwardRef<HTMLInputElement, InputProps>(({ className, type, ...props }, ref) => {
|
|
22
|
-
return (
|
|
23
|
-
<input
|
|
24
|
-
type={type}
|
|
25
|
-
className={cn(
|
|
26
|
-
'h-[44px] leading-[1.17] rounded-1 w-full border border-input bg-transparent transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
|
|
27
|
-
className
|
|
28
|
-
)}
|
|
29
|
-
ref={ref}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
)
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
InputField.displayName = 'InputField'
|
|
36
|
-
|
|
37
|
-
export { InputField, InputLabel }
|
package/src/input/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { InputField, InputLabel } from './Input'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|