@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.
Files changed (64) hide show
  1. package/dist/Alert/Alert.js +1 -1
  2. package/dist/Alert/Alert.js.map +1 -1
  3. package/dist/Badge/Badge.d.ts +10 -0
  4. package/dist/Badge/Badge.js +52 -0
  5. package/dist/Badge/Badge.js.map +1 -0
  6. package/dist/Badge/index.d.ts +1 -0
  7. package/dist/Badge/index.js +7 -0
  8. package/dist/Badge/index.js.map +1 -0
  9. package/dist/Button/Button.js +1 -1
  10. package/dist/FavoritePyments/FavoritePaymentsList.js +1 -1
  11. package/dist/FavoritePyments/FavoritePaymentsList.js.map +1 -1
  12. package/dist/Input-OTP/Input.js +2 -3
  13. package/dist/Input-OTP/Input.js.map +1 -1
  14. package/dist/Page/Page.js +1 -1
  15. package/dist/Page/Page.js.map +1 -1
  16. package/dist/Select/SelectAccountCard.js +33 -5
  17. package/dist/Select/SelectAccountCard.js.map +1 -1
  18. package/dist/Select/SelectAsync.js +73 -12
  19. package/dist/Select/SelectAsync.js.map +1 -1
  20. package/dist/Select/SelectBase.js +73 -13
  21. package/dist/Select/SelectBase.js.map +1 -1
  22. package/dist/Select/index.d.ts +0 -1
  23. package/dist/Select/index.js +1 -3
  24. package/dist/Select/index.js.map +1 -1
  25. package/dist/Toaster/Toaster.d.ts +13 -0
  26. package/dist/Toaster/Toaster.js +60 -0
  27. package/dist/Toaster/Toaster.js.map +1 -0
  28. package/dist/Toaster/index.d.ts +1 -0
  29. package/dist/Toaster/index.js +7 -0
  30. package/dist/Toaster/index.js.map +1 -0
  31. package/dist/index.d.ts +8 -5
  32. package/dist/index.js +12 -5
  33. package/dist/index.js.map +1 -1
  34. package/package.json +2 -1
  35. package/src/@/config/index.ts +5 -0
  36. package/src/Alert/Alert.tsx +1 -1
  37. package/src/Badge/Badge.tsx +58 -0
  38. package/src/Badge/index.ts +1 -0
  39. package/src/Button/Button.tsx +1 -1
  40. package/src/FavoritePyments/FavoritePaymentsList.tsx +1 -1
  41. package/src/Input-OTP/Input.tsx +2 -2
  42. package/src/Page/Page.tsx +1 -1
  43. package/src/Select/SelectAccountCard.tsx +51 -1
  44. package/src/Select/SelectAsync.tsx +162 -1
  45. package/src/Select/SelectBase.tsx +168 -19
  46. package/src/Select/index.ts +0 -1
  47. package/src/Toaster/Toaster.tsx +71 -0
  48. package/src/Toaster/index.ts +1 -0
  49. package/src/assets/css/global.css +9 -1
  50. package/src/assets/images/logo/sbp-logo.svg +1 -0
  51. package/src/index.ts +15 -10
  52. package/src/pages/payments/SmsSign/sms-sign.tsx +91 -0
  53. package/dist/Select/SelectAccount.d.ts +0 -8
  54. package/dist/Select/SelectAccount.js +0 -50
  55. package/dist/Select/SelectAccount.js.map +0 -1
  56. package/dist/Select/components/components.d.ts +0 -15
  57. package/dist/Select/components/components.js +0 -80
  58. package/dist/Select/components/components.js.map +0 -1
  59. package/dist/Select/components/index.d.ts +0 -1
  60. package/dist/Select/components/index.js +0 -17
  61. package/dist/Select/components/index.js.map +0 -1
  62. package/src/Select/SelectAccount.tsx +0 -101
  63. package/src/Select/components/components.tsx +0 -186
  64. package/src/Select/components/index.tsx +0 -15
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Placeholder = exports.Menu = exports.SingleValue = exports.ValueContainer = exports.DropdownIndicator = exports.LoadingIndicator = exports.IndicatorsContainer = exports.Option = exports.optionClasses = exports.colourStyles = exports.Control = exports.Input = void 0;
4
- var components_1 = require("./components");
5
- Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return components_1.Input; } });
6
- Object.defineProperty(exports, "Control", { enumerable: true, get: function () { return components_1.Control; } });
7
- Object.defineProperty(exports, "colourStyles", { enumerable: true, get: function () { return components_1.colourStyles; } });
8
- Object.defineProperty(exports, "optionClasses", { enumerable: true, get: function () { return components_1.optionClasses; } });
9
- Object.defineProperty(exports, "Option", { enumerable: true, get: function () { return components_1.Option; } });
10
- Object.defineProperty(exports, "IndicatorsContainer", { enumerable: true, get: function () { return components_1.IndicatorsContainer; } });
11
- Object.defineProperty(exports, "LoadingIndicator", { enumerable: true, get: function () { return components_1.LoadingIndicator; } });
12
- Object.defineProperty(exports, "DropdownIndicator", { enumerable: true, get: function () { return components_1.DropdownIndicator; } });
13
- Object.defineProperty(exports, "ValueContainer", { enumerable: true, get: function () { return components_1.ValueContainer; } });
14
- Object.defineProperty(exports, "SingleValue", { enumerable: true, get: function () { return components_1.SingleValue; } });
15
- Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return components_1.Menu; } });
16
- Object.defineProperty(exports, "Placeholder", { enumerable: true, get: function () { return components_1.Placeholder; } });
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Select/components/index.tsx"],"names":[],"mappings":";;;AAAA,2CAcqB;AAbpB,mGAAA,KAAK,OAAA;AACL,qGAAA,OAAO,OAAA;AACP,0GAAA,YAAY,OAAA;AACZ,2GAAA,aAAa,OAAA;AACb,oGAAA,MAAM,OAAA;AACN,iHAAA,mBAAmB,OAAA;AACnB,8GAAA,gBAAgB,OAAA;AAChB,+GAAA,iBAAiB,OAAA;AACjB,4GAAA,cAAc,OAAA;AACd,yGAAA,WAAW,OAAA;AACX,kGAAA,IAAI,OAAA;AACJ,yGAAA,WAAW,OAAA"}
@@ -1,101 +0,0 @@
1
- import * as React from 'react'
2
- import { CheckSmall } from '../../src/Icon'
3
- import Select, { components, OptionProps, SingleValueProps, GroupBase, Props } from 'react-select'
4
- import { cn } from '../@/lib/utils'
5
- import {
6
- colourStyles,
7
- Control,
8
- DropdownIndicator,
9
- IndicatorsContainer,
10
- Input,
11
- LoadingIndicator,
12
- Menu,
13
- optionClasses,
14
- Placeholder,
15
- ValueContainer,
16
- } from './components'
17
-
18
- const Option = ({ children, ...props }: OptionProps) => {
19
- const {
20
- isSelected,
21
- isFocused,
22
- isDisabled,
23
- // @ts-ignore
24
- data: { label, account, balance, cur },
25
- } = props
26
- return (
27
- <components.Option
28
- className={cn(optionClasses, 'items-start', { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled })}
29
- {...props}
30
- >
31
- <span className="flex basis-0 grow">
32
- <span>
33
- <span className="text-[16px`] leading-[1.375]">{label}</span>
34
- <br />
35
- <span className="text-[12px] text-light">{account}</span>
36
- </span>
37
- <span className="ml-auto shrink-0">{cur}</span>
38
- </span>
39
-
40
- <span className="ml-[16px] shrink-0 size-[24px]">
41
- {isSelected && (
42
- <CheckSmall
43
- width="24"
44
- height="24"
45
- className="text-primary"
46
- />
47
- )}
48
- </span>
49
- </components.Option>
50
- )
51
- }
52
-
53
- const SingleValue = ({ children, ...props }: SingleValueProps) => {
54
- const {
55
- // @ts-ignore
56
- data: { account, cur },
57
- } = props
58
- return (
59
- <components.SingleValue
60
- className="col-start-1 col-end-3 row-start-1 row-end-2"
61
- {...props}
62
- >
63
- {account} ({cur})
64
- </components.SingleValue>
65
- )
66
- }
67
-
68
- type SelectAccountProps<
69
- Option,
70
- IsMulti extends boolean = false,
71
- Group extends GroupBase<Option> = GroupBase<Option>
72
- > = Props<Option, IsMulti, Group>
73
-
74
- function SelectAccount<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(
75
- props: SelectAccountProps<Option, IsMulti, Group>
76
- ) {
77
- return (
78
- <Select
79
- components={{
80
- Control,
81
- Option,
82
- SingleValue,
83
- DropdownIndicator,
84
- IndicatorSeparator: () => null,
85
- Menu,
86
- ValueContainer,
87
- Placeholder,
88
- Input,
89
- LoadingIndicator,
90
- IndicatorsContainer,
91
- }}
92
- styles={colourStyles}
93
- unstyled={true}
94
- {...props}
95
- />
96
- )
97
- }
98
-
99
- SelectAccount.displayName = 'SelectAccount'
100
-
101
- export { SelectAccount }
@@ -1,186 +0,0 @@
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
- }
@@ -1,15 +0,0 @@
1
- export {
2
- Input,
3
- Control,
4
- colourStyles,
5
- optionClasses,
6
- Option,
7
- IndicatorsContainer,
8
- LoadingIndicator,
9
- DropdownIndicator,
10
- ValueContainer,
11
- SingleValue,
12
- Menu,
13
- Placeholder,
14
-
15
- } from './components'