@1money/react-ui 1.13.10 → 1.14.0-alpha.1

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.
@@ -0,0 +1,240 @@
1
+ @use '../../../variable.scss'as *;
2
+
3
+ $component: 'input-amount';
4
+ $cls: #{$prefix}-#{$component};
5
+ $cls-normal: #{$cls}-normal;
6
+
7
+ .#{$cls-normal}-wrapper {
8
+ display: inline-flex;
9
+ flex-direction: column;
10
+ width: 100%;
11
+ }
12
+
13
+ .#{$cls-normal} {
14
+ & {
15
+ display: inline-flex;
16
+ gap: 8px;
17
+ align-items: center;
18
+ justify-content: start;
19
+ width: 100%;
20
+ height: 56px;
21
+ padding: 12px 16px;
22
+ padding-bottom: 16px;
23
+ background-color: $color-grey-light;
24
+ border-color: $color-grey-bold;
25
+ border-style: solid;
26
+ border-width: 1px;
27
+ border-radius: 12px;
28
+ cursor: text;
29
+
30
+ &:hover {
31
+ border-color: $color-primary;
32
+ }
33
+ }
34
+
35
+ &-focus {
36
+ border-color: $color-primary;
37
+ border-width: 2px;
38
+ }
39
+
40
+ &-element {
41
+ width: 100%;
42
+
43
+ input {
44
+ width: 100%;
45
+ height: 52px;
46
+ padding: 0;
47
+ color: $color-primary-black;
48
+ font-weight: 400;
49
+ font-size: 16px;
50
+ font-family: inherit;
51
+ font-style: normal;
52
+ line-height: 22px;
53
+ background-color: inherit;
54
+ border: none;
55
+ border-radius: 0;
56
+ outline: none;
57
+ transition: none;
58
+
59
+ &::placeholder {
60
+ color: $color-grey-dark;
61
+ font-weight: 400;
62
+ }
63
+ }
64
+ }
65
+
66
+ &-fake {
67
+ position: absolute;
68
+ top: 0;
69
+ left: -9999px;
70
+ z-index: -1;
71
+ display: inline-block;
72
+ white-space: pre;
73
+ visibility: hidden;
74
+ opacity: 0;
75
+ user-select: none;
76
+ pointer-events: none;
77
+ inset-block-start: 0;
78
+ inset-inline-start: 0;
79
+ }
80
+
81
+ &-label {
82
+ display: inline-block;
83
+ margin-bottom: 8px;
84
+ font-weight: 600;
85
+ font-size: 16px;
86
+ font-style: normal;
87
+ line-height: 18px;
88
+ word-wrap: break-word;
89
+ word-break: break-all;
90
+
91
+ &-required {
92
+ &::after {
93
+ margin-left: 4px;
94
+ color: $color-negative;
95
+ font-size: 16px;
96
+ font-style: normal;
97
+ line-height: 120%;
98
+ content: '*';
99
+ }
100
+ }
101
+
102
+ &-loading {
103
+ margin-bottom: 8px;
104
+ }
105
+ }
106
+
107
+ &-prefix,
108
+ &-currency,
109
+ &-suffix {
110
+ display: inline-flex;
111
+ flex-grow: 0;
112
+ flex-shrink: 0;
113
+ align-items: center;
114
+ }
115
+
116
+ &-suffix {
117
+ margin-left: auto;
118
+
119
+ &-loading {
120
+ display: inline-block;
121
+ width: 16px;
122
+ height: 16px;
123
+ margin: 0 8px 0 auto;
124
+
125
+ svg circle {
126
+ stroke: $color-grey-dark !important;
127
+ }
128
+ }
129
+ }
130
+
131
+ &-message {
132
+ display: flex;
133
+ gap: 4px;
134
+ align-items: center;
135
+ justify-content: flex-start;
136
+ margin-top: 4px;
137
+ color: $color-grey-midnight;
138
+ font-weight: 400;
139
+ font-size: 12px;
140
+ font-style: normal;
141
+ line-height: 17px;
142
+ word-wrap: break-word;
143
+ word-break: keep-all;
144
+
145
+ &-success {
146
+ color: $color-success;
147
+ }
148
+
149
+ &-error {
150
+ color: $color-negative;
151
+ }
152
+ }
153
+
154
+ &-footnote {
155
+ margin-top: 4px;
156
+ text-align: left;
157
+ }
158
+
159
+ &-readonly {
160
+ .#{$cls-normal} {
161
+ border-color: $color-grey-bold;
162
+ border-width: 1px;
163
+ }
164
+
165
+ .#{$cls-normal}-element {
166
+ input {
167
+ cursor: default;
168
+ }
169
+ }
170
+ }
171
+
172
+ &-disabled {
173
+ .#{$cls-normal} {
174
+ background-color: $color-grey-deep;
175
+ border-color: $color-grey-deep;
176
+ border-width: 1px;
177
+ cursor: not-allowed;
178
+ }
179
+
180
+ .#{$cls-normal}-element {
181
+ input {
182
+ opacity: 1;
183
+ }
184
+ }
185
+ }
186
+
187
+ &-disabled.#{$cls-normal}-filled {
188
+ .#{$cls-normal} {
189
+ background-color: $color-grey;
190
+ border-color: $color-grey;
191
+ cursor: text;
192
+ }
193
+
194
+ .#{$cls-normal}-element {
195
+ input {
196
+ cursor: text;
197
+ user-select: text;
198
+ pointer-events: auto;
199
+ }
200
+ }
201
+ }
202
+
203
+ &-success {
204
+ .#{$cls-normal} {
205
+ border-color: $color-success;
206
+ border-width: 1px;
207
+ }
208
+
209
+ .#{$cls-normal}-prefix,
210
+ .#{$cls-normal}-element,
211
+ .#{$cls-normal}-message {
212
+ color: $color-success;
213
+ }
214
+
215
+ .#{$cls-normal}-element {
216
+ input {
217
+ color: $color-success;
218
+ }
219
+ }
220
+ }
221
+
222
+ &-invalid {
223
+ .#{$cls-normal} {
224
+ border-color: $color-negative;
225
+ border-width: 1px;
226
+ }
227
+
228
+ .#{$cls-normal}-prefix,
229
+ .#{$cls-normal}-element,
230
+ .#{$cls-normal}-message {
231
+ color: $color-negative;
232
+ }
233
+
234
+ .#{$cls-normal}-element {
235
+ input {
236
+ color: $color-negative;
237
+ }
238
+ }
239
+ }
240
+ }
@@ -0,0 +1 @@
1
+ .om-react-ui-input-amount-primary-wrapper{display:inline-flex;flex-direction:column;gap:16px;width:100%}.om-react-ui-input-amount-primary{display:inline-flex;gap:8px;align-items:center;justify-content:start;width:100%;padding-bottom:16px;border-bottom:1px solid #d1d2d2;cursor:text}.om-react-ui-input-amount-primary-focus{border-bottom-color:#073387}.om-react-ui-input-amount-primary-element{position:relative;display:inline-flex;flex-grow:0;color:#073387;font-weight:500;font-size:52px;font-family:var(--font-aeonik),Aeonik;line-height:56px;letter-spacing:-.25px}.om-react-ui-input-amount-primary-element input{position:relative;width:var(--input-width);max-width:100%;padding:0;color:inherit;font-weight:inherit;font-size:inherit;font-family:inherit;line-height:inherit;letter-spacing:inherit;border:none;border-radius:0;outline:none;box-shadow:none}.om-react-ui-input-amount-primary-element input::placeholder{color:inherit}.om-react-ui-input-amount-primary-element-max:after{position:absolute;top:0;right:0;width:98px;height:100%;background:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.51) 37.98%,#fff 84.13%);cursor:text;content:""}.om-react-ui-input-amount-primary-fake{position:absolute;top:0;left:-9999px;z-index:-1;display:inline-block;color:#073387;font-weight:500;font-size:52px;font-family:var(--font-aeonik),Aeonik;line-height:56px;letter-spacing:-.25px;white-space:pre;visibility:hidden;opacity:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;inset-block-start:0;inset-inline-start:0}.om-react-ui-input-amount-primary-label{display:inline-block;margin-bottom:8px;font-weight:600;font-size:16px;font-style:normal;line-height:18px;word-wrap:break-word;word-break:break-all}.om-react-ui-input-amount-primary-label-required:after{margin-left:4px;color:#ae0000;font-size:16px;font-style:normal;line-height:120%;content:"*"}.om-react-ui-input-amount-primary-label-loading{margin-bottom:8px}.om-react-ui-input-amount-primary-currency,.om-react-ui-input-amount-primary-prefix,.om-react-ui-input-amount-primary-suffix{display:inline-flex;flex-grow:0;flex-shrink:0;align-items:center}.om-react-ui-input-amount-primary-prefix{color:#073387}.om-react-ui-input-amount-primary-currency,.om-react-ui-input-amount-primary-prefix{font-weight:500;font-size:52px;font-family:var(--font-aeonik),Aeonik;line-height:56px;letter-spacing:-.25px}.om-react-ui-input-amount-primary-currency{color:#e3e4e4}.om-react-ui-input-amount-primary-suffix{margin-left:auto}.om-react-ui-input-amount-primary-suffix-loading{display:inline-block;width:32px;height:32px;margin:0 8px 0 auto}.om-react-ui-input-amount-primary-suffix-loading svg circle{stroke:#9fa3a3!important}.om-react-ui-input-amount-primary-extra{display:inline-flex;flex-direction:column;gap:16px}.om-react-ui-input-amount-primary-message{color:#131313;font-weight:400;font-size:12px;font-family:var(--font-inter),Inter;line-height:140%}.om-react-ui-input-amount-primary-footnote{text-align:left}.om-react-ui-input-amount-primary-readonly .om-react-ui-input-amount-primary{border-bottom-color:#d1d2d2}.om-react-ui-input-amount-primary-readonly .om-react-ui-input-amount-primary-element,.om-react-ui-input-amount-primary-readonly .om-react-ui-input-amount-primary-message,.om-react-ui-input-amount-primary-readonly .om-react-ui-input-amount-primary-prefix{color:#d1d2d2}.om-react-ui-input-amount-primary-disabled .om-react-ui-input-amount-primary{border-bottom-color:#e3e4e4}.om-react-ui-input-amount-primary-disabled .om-react-ui-input-amount-primary-element,.om-react-ui-input-amount-primary-disabled .om-react-ui-input-amount-primary-message,.om-react-ui-input-amount-primary-disabled .om-react-ui-input-amount-primary-prefix{color:#e3e4e4}.om-react-ui-input-amount-primary-disabled .om-react-ui-input-amount-primary-element input{background-color:transparent}.om-react-ui-input-amount-primary-success .om-react-ui-input-amount-primary{border-bottom-color:#1f5800}.om-react-ui-input-amount-primary-success .om-react-ui-input-amount-primary-element,.om-react-ui-input-amount-primary-success .om-react-ui-input-amount-primary-message,.om-react-ui-input-amount-primary-success .om-react-ui-input-amount-primary-prefix{color:#1f5800}.om-react-ui-input-amount-primary-invalid .om-react-ui-input-amount-primary{border-bottom-color:#ae0000}.om-react-ui-input-amount-primary-invalid .om-react-ui-input-amount-primary-element,.om-react-ui-input-amount-primary-invalid .om-react-ui-input-amount-primary-message,.om-react-ui-input-amount-primary-invalid .om-react-ui-input-amount-primary-prefix{color:#ae0000}
@@ -2,6 +2,7 @@
2
2
 
3
3
  $component: 'input-amount';
4
4
  $cls: #{$prefix}-#{$component};
5
+ $cls-primary: #{$cls}-primary;
5
6
 
6
7
  @mixin input-amount-font($color: $color-primary) {
7
8
  color: $color;
@@ -12,7 +13,15 @@ $cls: #{$prefix}-#{$component};
12
13
  letter-spacing: -0.25px;
13
14
  }
14
15
 
15
- .#{$cls} {
16
+
17
+ .#{$cls-primary}-wrapper {
18
+ display: inline-flex;
19
+ flex-direction: column;
20
+ gap: 16px;
21
+ width: 100%;
22
+ }
23
+
24
+ .#{$cls-primary} {
16
25
  & {
17
26
  display: inline-flex;
18
27
  gap: 8px;
@@ -88,6 +97,32 @@ $cls: #{$prefix}-#{$component};
88
97
  inset-inline-start: 0;
89
98
  }
90
99
 
100
+ &-label {
101
+ display: inline-block;
102
+ margin-bottom: 8px;
103
+ font-weight: 600;
104
+ font-size: 16px;
105
+ font-style: normal;
106
+ line-height: 18px;
107
+ word-wrap: break-word;
108
+ word-break: break-all;
109
+
110
+ &-required {
111
+ &::after {
112
+ margin-left: 4px;
113
+ color: $color-negative;
114
+ font-size: 16px;
115
+ font-style: normal;
116
+ line-height: 120%;
117
+ content: '*';
118
+ }
119
+ }
120
+
121
+ &-loading {
122
+ margin-bottom: 8px;
123
+ }
124
+ }
125
+
91
126
  &-prefix,
92
127
  &-currency,
93
128
  &-suffix {
@@ -107,6 +142,17 @@ $cls: #{$prefix}-#{$component};
107
142
 
108
143
  &-suffix {
109
144
  margin-left: auto;
145
+
146
+ &-loading {
147
+ display: inline-block;
148
+ width: 32px;
149
+ height: 32px;
150
+ margin: 0 8px 0 auto;
151
+
152
+ svg circle {
153
+ stroke: $color-grey-dark !important;
154
+ }
155
+ }
110
156
  }
111
157
 
112
158
  &-extra {
@@ -127,22 +173,57 @@ $cls: #{$prefix}-#{$component};
127
173
  text-align: left;
128
174
  }
129
175
 
176
+ &-readonly {
177
+ .#{$cls-primary} {
178
+ border-bottom-color: $color-grey-bold;
179
+ }
180
+
181
+ .#{$cls-primary}-prefix,
182
+ .#{$cls-primary}-element,
183
+ .#{$cls-primary}-message {
184
+ color: $color-grey-bold;
185
+ }
186
+ }
187
+
188
+ &-disabled {
189
+ .#{$cls-primary} {
190
+ border-bottom-color: $color-grey-deep;
191
+ }
192
+
193
+ .#{$cls-primary}-prefix,
194
+ .#{$cls-primary}-element,
195
+ .#{$cls-primary}-message {
196
+ color: $color-grey-deep;
197
+ }
198
+
199
+ .#{$cls-primary}-element {
200
+ input {
201
+ background-color: transparent;
202
+ }
203
+ }
204
+ }
205
+
206
+ &-success {
207
+ .#{$cls-primary} {
208
+ border-bottom-color: $color-success;
209
+ }
210
+
211
+ .#{$cls-primary}-prefix,
212
+ .#{$cls-primary}-element,
213
+ .#{$cls-primary}-message {
214
+ color: $color-success;
215
+ }
216
+ }
217
+
130
218
  &-invalid {
131
- .#{$cls} {
219
+ .#{$cls-primary} {
132
220
  border-bottom-color: $color-negative;
133
221
  }
134
222
 
135
- .#{$cls}-prefix,
136
- .#{$cls}-element,
137
- .#{$cls}-message {
223
+ .#{$cls-primary}-prefix,
224
+ .#{$cls-primary}-element,
225
+ .#{$cls-primary}-message {
138
226
  color: $color-negative;
139
227
  }
140
228
  }
141
- }
142
-
143
- .#{$cls}-wrapper {
144
- display: inline-flex;
145
- flex-direction: column;
146
- gap: 16px;
147
- width: 100%;
148
229
  }