@modul/mbui 0.0.20-beta-test-30add321 → 0.0.20-beta-pv-52992-d5155aa6
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/Drawer/Drawer.d.ts +10 -4
- package/dist/Drawer/Drawer.js +29 -5
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +2 -2
- package/dist/Drawer/index.js.map +1 -1
- package/dist/Input-OTP/Input.js +3 -2
- package/dist/Input-OTP/Input.js.map +1 -1
- package/dist/Select/SelectAccount.d.ts +8 -0
- package/dist/Select/SelectAccount.js +50 -0
- package/dist/Select/SelectAccount.js.map +1 -0
- package/dist/Select/SelectAccountCard.js +5 -33
- package/dist/Select/SelectAccountCard.js.map +1 -1
- package/dist/Select/SelectAsync.js +12 -73
- package/dist/Select/SelectAsync.js.map +1 -1
- package/dist/Select/SelectBase.js +13 -73
- package/dist/Select/SelectBase.js.map +1 -1
- package/dist/Select/components/components.d.ts +15 -0
- package/dist/Select/components/components.js +80 -0
- package/dist/Select/components/components.js.map +1 -0
- package/dist/Select/components/index.d.ts +1 -0
- package/dist/Select/components/index.js +17 -0
- package/dist/Select/components/index.js.map +1 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/Select/index.js +3 -1
- package/dist/Select/index.js.map +1 -1
- package/dist/index.d.ts +5 -8
- package/dist/index.js +5 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/src/@/config/index.ts +0 -5
- package/src/Drawer/Drawer.tsx +82 -3
- package/src/Drawer/index.ts +1 -1
- package/src/Input-OTP/Input.tsx +2 -2
- package/src/Select/SelectAccount.tsx +101 -0
- package/src/Select/SelectAccountCard.tsx +1 -51
- package/src/Select/SelectAsync.tsx +1 -162
- package/src/Select/SelectBase.tsx +19 -168
- package/src/Select/components/components.tsx +186 -0
- package/src/Select/components/index.tsx +15 -0
- package/src/Select/index.ts +1 -0
- package/src/assets/css/global.css +1 -4
- package/src/index.ts +10 -15
- package/dist/Badge/Badge.d.ts +0 -10
- package/dist/Badge/Badge.js +0 -52
- package/dist/Badge/Badge.js.map +0 -1
- package/dist/Badge/index.d.ts +0 -1
- package/dist/Badge/index.js +0 -7
- package/dist/Badge/index.js.map +0 -1
- package/dist/Checkbox/Checkbox.d.ts +0 -4
- package/dist/Checkbox/Checkbox.js +0 -35
- package/dist/Checkbox/Checkbox.js.map +0 -1
- package/dist/Checkbox/index.d.ts +0 -1
- package/dist/Checkbox/index.js +0 -6
- package/dist/Checkbox/index.js.map +0 -1
- package/src/Badge/Badge.tsx +0 -58
- package/src/Badge/index.ts +0 -1
- package/src/Checkbox/Checkbox.tsx +0 -44
- package/src/Checkbox/index.ts +0 -1
- package/src/pages/payments/SmsSign/sms-sign.tsx +0 -75
|
@@ -1,167 +1,6 @@
|
|
|
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'
|
|
17
2
|
import AsyncSelect from 'react-select/async'
|
|
18
|
-
import {
|
|
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
|
-
}
|
|
3
|
+
import { colourStyles, Control, DropdownIndicator, IndicatorsContainer, Input, LoadingIndicator, Menu, Option, Placeholder, SingleValue, ValueContainer } from './components'
|
|
165
4
|
|
|
166
5
|
const SelectAsync = ({ ...props }) => (
|
|
167
6
|
<AsyncSelect
|
|
@@ -1,169 +1,22 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
|
|
3
|
-
import { DropdownSmallOld, CheckSmall } from '../../src/Icon'
|
|
4
|
-
|
|
5
3
|
import Select, {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
OptionProps,
|
|
9
|
-
DropdownIndicatorProps,
|
|
10
|
-
StylesConfig,
|
|
11
|
-
SingleValueProps,
|
|
12
|
-
MenuProps,
|
|
13
|
-
PlaceholderProps,
|
|
14
|
-
ValueContainerProps,
|
|
15
|
-
InputProps,
|
|
16
|
-
LoadingIndicatorProps,
|
|
17
|
-
IndicatorsContainerProps, GroupBase, Props,
|
|
4
|
+
GroupBase,
|
|
5
|
+
Props,
|
|
18
6
|
} from 'react-select'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
cursor-pointer
|
|
33
|
-
`
|
|
34
|
-
|
|
35
|
-
const colourStyles: StylesConfig = {
|
|
36
|
-
control: () => ({}),
|
|
37
|
-
option: () => ({}),
|
|
38
|
-
input: () => ({}),
|
|
39
|
-
dropdownIndicator: () => ({}),
|
|
40
|
-
indicatorsContainer: () => ({}),
|
|
41
|
-
menu: () => ({}),
|
|
42
|
-
menuList: () => ({}),
|
|
43
|
-
singleValue: () => ({}),
|
|
44
|
-
valueContainer: () => ({}),
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const Input = ({...props }: InputProps) => {
|
|
48
|
-
return <components.Input className='col-start-1 col-end-3 row-start-1 row-end-2' {...props} />
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const Control = ({ children, ...props }: ControlProps) => {
|
|
52
|
-
const { isFocused } = props
|
|
53
|
-
return (
|
|
54
|
-
<components.Control
|
|
55
|
-
className={cn(selectTriggerClasses, { 'outline outline-primary outline-offset-2 outline-2': isFocused })}
|
|
56
|
-
{...props}
|
|
57
|
-
>
|
|
58
|
-
{children}
|
|
59
|
-
</components.Control>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const optionClasses =
|
|
64
|
-
'flex items-center first:rounded-t-sm last:rounded-b-sm px-[16px] py-[12px] w-full cursor-default select-none outline-none'
|
|
65
|
-
|
|
66
|
-
const Option = ({ children, ...props }: OptionProps) => {
|
|
67
|
-
const {
|
|
68
|
-
isSelected,
|
|
69
|
-
isFocused,
|
|
70
|
-
isDisabled,
|
|
71
|
-
} = props
|
|
72
|
-
return (
|
|
73
|
-
<components.Option
|
|
74
|
-
className={cn(optionClasses, { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled })}
|
|
75
|
-
{...props}
|
|
76
|
-
>
|
|
77
|
-
<span className="flex basis-0 grow">{children}</span>
|
|
78
|
-
|
|
79
|
-
<span className="ml-[16px] shrink-0 size-[24px]">
|
|
80
|
-
{isSelected && (
|
|
81
|
-
<CheckSmall
|
|
82
|
-
width="24"
|
|
83
|
-
height="24"
|
|
84
|
-
className="text-primary"
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
</span>
|
|
88
|
-
</components.Option>
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const IndicatorsContainer = ({ children, ...props }: IndicatorsContainerProps) => {
|
|
93
|
-
return (
|
|
94
|
-
<components.IndicatorsContainer className='flex items-center gap-x-[8px] shrink-0' {...props}>
|
|
95
|
-
{children}
|
|
96
|
-
</components.IndicatorsContainer>
|
|
97
|
-
)
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const LoadingIndicator = ({...props }: LoadingIndicatorProps) => {
|
|
101
|
-
return (
|
|
102
|
-
<components.LoadingIndicator
|
|
103
|
-
className='text-light shrink-0'
|
|
104
|
-
{...props}
|
|
105
|
-
/>
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const DropdownIndicator = ({ children, ...props }: DropdownIndicatorProps) => {
|
|
110
|
-
return (
|
|
111
|
-
<components.DropdownIndicator
|
|
112
|
-
className="shrink-0"
|
|
113
|
-
{...props}
|
|
114
|
-
>
|
|
115
|
-
<DropdownSmallOld
|
|
116
|
-
className="text-light"
|
|
117
|
-
width="12"
|
|
118
|
-
height="12"
|
|
119
|
-
/>
|
|
120
|
-
</components.DropdownIndicator>
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const ValueContainer = ({ children, ...props }: ValueContainerProps) => {
|
|
125
|
-
return (
|
|
126
|
-
<components.ValueContainer
|
|
127
|
-
className="flex-1 grid"
|
|
128
|
-
{...props}
|
|
129
|
-
>
|
|
130
|
-
{children}
|
|
131
|
-
</components.ValueContainer>
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const SingleValue = ({ children, ...props }: SingleValueProps) => {
|
|
136
|
-
return (
|
|
137
|
-
<components.SingleValue
|
|
138
|
-
className="col-start-1 col-end-3 row-start-1 row-end-2"
|
|
139
|
-
{...props}
|
|
140
|
-
>
|
|
141
|
-
{children}
|
|
142
|
-
</components.SingleValue>
|
|
143
|
-
)
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
const Menu = ({ children, ...props }: MenuProps) => {
|
|
147
|
-
return (
|
|
148
|
-
<components.Menu
|
|
149
|
-
className="z-[1] absolute inset-x-0 bg-page shadow-sm mt-[8px] rounded-sm"
|
|
150
|
-
{...props}
|
|
151
|
-
>
|
|
152
|
-
{children}
|
|
153
|
-
</components.Menu>
|
|
154
|
-
)
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const Placeholder = ({ children, ...props }: PlaceholderProps) => {
|
|
158
|
-
return (
|
|
159
|
-
<components.Placeholder
|
|
160
|
-
className="col-start-1 col-end-3 row-start-1 row-end-2 text-[16px] text-light truncate"
|
|
161
|
-
{...props}
|
|
162
|
-
>
|
|
163
|
-
{children}
|
|
164
|
-
</components.Placeholder>
|
|
165
|
-
)
|
|
166
|
-
}
|
|
7
|
+
import {
|
|
8
|
+
colourStyles,
|
|
9
|
+
Control,
|
|
10
|
+
DropdownIndicator,
|
|
11
|
+
IndicatorsContainer,
|
|
12
|
+
Input,
|
|
13
|
+
LoadingIndicator,
|
|
14
|
+
Menu,
|
|
15
|
+
Placeholder,
|
|
16
|
+
SingleValue,
|
|
17
|
+
ValueContainer,
|
|
18
|
+
Option,
|
|
19
|
+
} from './components'
|
|
167
20
|
|
|
168
21
|
type SelectBaseProps<
|
|
169
22
|
Option,
|
|
@@ -171,11 +24,9 @@ type SelectBaseProps<
|
|
|
171
24
|
Group extends GroupBase<Option> = GroupBase<Option>
|
|
172
25
|
> = Props<Option, IsMulti, Group>
|
|
173
26
|
|
|
174
|
-
function SelectBase<
|
|
175
|
-
Option,
|
|
176
|
-
|
|
177
|
-
Group extends GroupBase<Option> = GroupBase<Option>
|
|
178
|
-
>(props: SelectBaseProps<Option, IsMulti, Group>) {
|
|
27
|
+
function SelectBase<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(
|
|
28
|
+
props: SelectBaseProps<Option, IsMulti, Group>
|
|
29
|
+
) {
|
|
179
30
|
return (
|
|
180
31
|
<Select
|
|
181
32
|
components={{
|
|
@@ -189,7 +40,7 @@ function SelectBase<
|
|
|
189
40
|
Placeholder,
|
|
190
41
|
Input,
|
|
191
42
|
LoadingIndicator,
|
|
192
|
-
IndicatorsContainer
|
|
43
|
+
IndicatorsContainer,
|
|
193
44
|
}}
|
|
194
45
|
styles={colourStyles}
|
|
195
46
|
unstyled={true}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {
|
|
3
|
+
components,
|
|
4
|
+
ControlProps,
|
|
5
|
+
OptionProps,
|
|
6
|
+
DropdownIndicatorProps,
|
|
7
|
+
StylesConfig,
|
|
8
|
+
SingleValueProps,
|
|
9
|
+
MenuProps,
|
|
10
|
+
PlaceholderProps,
|
|
11
|
+
ValueContainerProps,
|
|
12
|
+
InputProps,
|
|
13
|
+
LoadingIndicatorProps,
|
|
14
|
+
IndicatorsContainerProps,
|
|
15
|
+
} from 'react-select'
|
|
16
|
+
import { cn } from '../../@/lib/utils'
|
|
17
|
+
import { CheckSmall, DropdownSmallOld } from '../../Icon'
|
|
18
|
+
|
|
19
|
+
const Input = ({ ...props }: InputProps) => {
|
|
20
|
+
return (
|
|
21
|
+
<components.Input
|
|
22
|
+
className="col-start-1 col-end-3 row-start-1 row-end-2"
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const selectTriggerClasses: string = `
|
|
29
|
+
flex
|
|
30
|
+
items-center
|
|
31
|
+
py-[12px]
|
|
32
|
+
px-[16px]
|
|
33
|
+
h-[44px]
|
|
34
|
+
text-left
|
|
35
|
+
border-[1px]
|
|
36
|
+
border-input
|
|
37
|
+
rounded-sm
|
|
38
|
+
cursor-pointer
|
|
39
|
+
`
|
|
40
|
+
const Control = ({ children, ...props }: ControlProps) => {
|
|
41
|
+
const { isFocused } = props
|
|
42
|
+
return (
|
|
43
|
+
<components.Control
|
|
44
|
+
className={cn(selectTriggerClasses, { 'outline outline-primary outline-offset-2 outline-2': isFocused })}
|
|
45
|
+
{...props}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
</components.Control>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const colourStyles: StylesConfig = {
|
|
53
|
+
control: () => ({}),
|
|
54
|
+
option: () => ({}),
|
|
55
|
+
input: () => ({}),
|
|
56
|
+
dropdownIndicator: () => ({}),
|
|
57
|
+
indicatorsContainer: () => ({}),
|
|
58
|
+
menu: () => ({}),
|
|
59
|
+
menuList: () => ({}),
|
|
60
|
+
singleValue: () => ({}),
|
|
61
|
+
valueContainer: () => ({}),
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const optionClasses =
|
|
65
|
+
'flex items-center first:rounded-t-sm last:rounded-b-sm px-[16px] py-[12px] w-full cursor-default select-none outline-none'
|
|
66
|
+
|
|
67
|
+
const Option = ({ children, ...props }: OptionProps) => {
|
|
68
|
+
const { isSelected, isFocused, isDisabled } = props
|
|
69
|
+
return (
|
|
70
|
+
<components.Option
|
|
71
|
+
className={cn(
|
|
72
|
+
optionClasses,
|
|
73
|
+
'items-start',
|
|
74
|
+
{ 'bg-light': isFocused },
|
|
75
|
+
{ 'opacity-50 pointer-events-none': isDisabled }
|
|
76
|
+
)}
|
|
77
|
+
{...props}
|
|
78
|
+
>
|
|
79
|
+
<span className="flex basis-0 grow">{children}</span>
|
|
80
|
+
|
|
81
|
+
<span className="ml-[16px] shrink-0 size-[24px]">
|
|
82
|
+
{isSelected && (
|
|
83
|
+
<CheckSmall
|
|
84
|
+
width="24"
|
|
85
|
+
height="24"
|
|
86
|
+
className="text-primary"
|
|
87
|
+
/>
|
|
88
|
+
)}
|
|
89
|
+
</span>
|
|
90
|
+
</components.Option>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const IndicatorsContainer = ({ children, ...props }: IndicatorsContainerProps) => {
|
|
95
|
+
return (
|
|
96
|
+
<components.IndicatorsContainer
|
|
97
|
+
className="flex items-center gap-x-[8px] shrink-0"
|
|
98
|
+
{...props}
|
|
99
|
+
>
|
|
100
|
+
{children}
|
|
101
|
+
</components.IndicatorsContainer>
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const LoadingIndicator = ({ ...props }: LoadingIndicatorProps) => {
|
|
106
|
+
return (
|
|
107
|
+
<components.LoadingIndicator
|
|
108
|
+
className="text-light shrink-0"
|
|
109
|
+
{...props}
|
|
110
|
+
/>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const DropdownIndicator = ({ children, ...props }: DropdownIndicatorProps) => {
|
|
115
|
+
return (
|
|
116
|
+
<components.DropdownIndicator
|
|
117
|
+
className="shrink-0"
|
|
118
|
+
{...props}
|
|
119
|
+
>
|
|
120
|
+
<DropdownSmallOld
|
|
121
|
+
className="text-light"
|
|
122
|
+
width="12"
|
|
123
|
+
height="12"
|
|
124
|
+
/>
|
|
125
|
+
</components.DropdownIndicator>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const ValueContainer = ({ children, ...props }: ValueContainerProps) => {
|
|
130
|
+
return (
|
|
131
|
+
<components.ValueContainer
|
|
132
|
+
className="flex-1 grid"
|
|
133
|
+
{...props}
|
|
134
|
+
>
|
|
135
|
+
{children}
|
|
136
|
+
</components.ValueContainer>
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const SingleValue = ({ children, ...props }: SingleValueProps) => {
|
|
141
|
+
return (
|
|
142
|
+
<components.SingleValue
|
|
143
|
+
className="col-start-1 col-end-3 row-start-1 row-end-2"
|
|
144
|
+
{...props}
|
|
145
|
+
>
|
|
146
|
+
{children}
|
|
147
|
+
</components.SingleValue>
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const Menu = ({ children, ...props }: MenuProps) => {
|
|
152
|
+
return (
|
|
153
|
+
<components.Menu
|
|
154
|
+
className="z-[1] absolute inset-x-0 bg-page shadow-sm mt-[8px] rounded-sm"
|
|
155
|
+
{...props}
|
|
156
|
+
>
|
|
157
|
+
{children}
|
|
158
|
+
</components.Menu>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const Placeholder = ({ children, ...props }: PlaceholderProps) => {
|
|
163
|
+
return (
|
|
164
|
+
<components.Placeholder
|
|
165
|
+
className="col-start-1 col-end-3 row-start-1 row-end-2 text-[16px] text-light truncate"
|
|
166
|
+
{...props}
|
|
167
|
+
>
|
|
168
|
+
{children}
|
|
169
|
+
</components.Placeholder>
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export {
|
|
174
|
+
Input,
|
|
175
|
+
Control,
|
|
176
|
+
colourStyles,
|
|
177
|
+
optionClasses,
|
|
178
|
+
Option,
|
|
179
|
+
IndicatorsContainer,
|
|
180
|
+
LoadingIndicator,
|
|
181
|
+
DropdownIndicator,
|
|
182
|
+
ValueContainer,
|
|
183
|
+
SingleValue,
|
|
184
|
+
Menu,
|
|
185
|
+
Placeholder,
|
|
186
|
+
}
|
package/src/Select/index.ts
CHANGED
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
--bg-light: var(--cl-graphite-7);
|
|
93
93
|
--warning: var(--cl-orange-2);
|
|
94
94
|
--warning-light: var(--cl-yellow-7);
|
|
95
|
-
--critical: var(--cl-red-
|
|
95
|
+
--critical: var(--cl-red-3);
|
|
96
96
|
--critical-light: var(--cl-red-7);
|
|
97
97
|
/* --text-quaternary:; */
|
|
98
98
|
|
|
@@ -134,9 +134,6 @@
|
|
|
134
134
|
--btn-txt-primary-hover: var(--cl-blue-3);
|
|
135
135
|
--btn-txt-primary-focus: var(--cl-blue-3);
|
|
136
136
|
--btn-txt-primary-active: var(--cl-blue-1);
|
|
137
|
-
|
|
138
|
-
--btn-widget-bg:var(--page-bg);
|
|
139
|
-
--btn-widget-icon:var(--primary);
|
|
140
137
|
/* =========================================== */
|
|
141
138
|
/* ЦВЕТ КНОПОК */
|
|
142
139
|
|
package/src/index.ts
CHANGED
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
AccountCollapsibleContent,
|
|
20
20
|
AccountCollapsibleContentItem,
|
|
21
21
|
} from './Collapsible'
|
|
22
|
-
import { Button,
|
|
22
|
+
import { Button, ButtonWidget } from './Button'
|
|
23
23
|
import { Audio } from './Audio'
|
|
24
24
|
import { cn } from './@/lib/utils'
|
|
25
|
-
import { Drawer, DrawerTrigger, DrawerClose, DrawerContent } from './Drawer'
|
|
25
|
+
import { Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent } from './Drawer'
|
|
26
26
|
import { Page } from './Page'
|
|
27
27
|
import { Chip } from './Chip'
|
|
28
28
|
import { InputField, InputLabel, InputMask } from './Input'
|
|
@@ -30,12 +30,12 @@ import { Alert } from './Alert'
|
|
|
30
30
|
import { Switch } from './Switch'
|
|
31
31
|
import { Label } from './Label'
|
|
32
32
|
import { Textarea } from './Textarea'
|
|
33
|
-
import { SelectAccountCard, SelectAsync } from './Select'
|
|
33
|
+
import { SelectAccountCard, SelectAsync, SelectAccount, Select } from './Select'
|
|
34
34
|
import { Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage } from './Form'
|
|
35
35
|
import { Calendar } from './Calendar'
|
|
36
36
|
import { DatePicker } from './DatePicker'
|
|
37
|
-
|
|
38
|
-
import { Progress } from
|
|
37
|
+
|
|
38
|
+
import { Progress } from "./Progress"
|
|
39
39
|
import {
|
|
40
40
|
AlertDialog,
|
|
41
41
|
AlertDialogTrigger,
|
|
@@ -50,8 +50,6 @@ import {
|
|
|
50
50
|
import { MessageTyping } from "./Chat"
|
|
51
51
|
import { FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription, farvoriteLinkClasses } from './FavoritePyments'
|
|
52
52
|
import { DigitKeyPad } from "./DigitKeyPad"
|
|
53
|
-
import { Badge, badgeVariants } from './Badge'
|
|
54
|
-
import { Checkbox } from './Checkbox'
|
|
55
53
|
|
|
56
54
|
|
|
57
55
|
export {
|
|
@@ -73,7 +71,6 @@ export {
|
|
|
73
71
|
AccountCollapsibleContent,
|
|
74
72
|
AccountCollapsibleContentItem,
|
|
75
73
|
Button,
|
|
76
|
-
buttonVariants,
|
|
77
74
|
InputField,
|
|
78
75
|
InputLabel,
|
|
79
76
|
Audio,
|
|
@@ -81,7 +78,7 @@ export {
|
|
|
81
78
|
Icon,
|
|
82
79
|
Drawer,
|
|
83
80
|
DrawerTrigger,
|
|
84
|
-
|
|
81
|
+
DrawerTitle,
|
|
85
82
|
DrawerClose,
|
|
86
83
|
DrawerContent,
|
|
87
84
|
BottomNavigation,
|
|
@@ -96,6 +93,9 @@ export {
|
|
|
96
93
|
Label,
|
|
97
94
|
Textarea,
|
|
98
95
|
SelectAccountCard,
|
|
96
|
+
SelectAccount,
|
|
97
|
+
SelectAsync,
|
|
98
|
+
Select,
|
|
99
99
|
Form,
|
|
100
100
|
FormLabel,
|
|
101
101
|
FormField,
|
|
@@ -105,9 +105,7 @@ export {
|
|
|
105
105
|
FormMessage,
|
|
106
106
|
Calendar,
|
|
107
107
|
DatePicker,
|
|
108
|
-
SelectAsync,
|
|
109
108
|
InputMask,
|
|
110
|
-
Select,
|
|
111
109
|
AlertDialog,
|
|
112
110
|
AlertDialogTrigger,
|
|
113
111
|
AlertDialogContent,
|
|
@@ -121,10 +119,7 @@ export {
|
|
|
121
119
|
FavoritePaymentsList,
|
|
122
120
|
FavoritePaymentsItem,
|
|
123
121
|
FarvoritePaymentDescription,
|
|
124
|
-
Badge,
|
|
125
|
-
badgeVariants,
|
|
126
|
-
Checkbox,
|
|
127
122
|
farvoriteLinkClasses,
|
|
128
123
|
DigitKeyPad,
|
|
129
124
|
ButtonWidget,
|
|
130
|
-
}
|
|
125
|
+
}
|
package/dist/Badge/Badge.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
declare const badgeVariants: (props?: {
|
|
4
|
-
variant?: "default";
|
|
5
|
-
size?: "default" | "dot";
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) => string;
|
|
7
|
-
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
8
|
-
}
|
|
9
|
-
declare function Badge({ className, variant, size, ...props }: BadgeProps): React.JSX.Element;
|
|
10
|
-
export { Badge, badgeVariants };
|