Skip to content

Commit c7d5c72

Browse files
nick-skriabinMihajloHomaborisheartexnass600yyassi-heartex
authored
feat: DIA-2142: Use the new Button component in LSO apps and libraries (#7359)
Co-authored-by: MihajloHoma <MihajloHoma@users.noreply.github.com> Co-authored-by: borisheartex <borisheartex@users.noreply.github.com> Co-authored-by: nick-skriabin <nick-skriabin@users.noreply.github.com> Co-authored-by: Ignacio Velazquez <ignacio@humansignal.com> Co-authored-by: Yousif Yassi <104568407+yyassi-heartex@users.noreply.github.com> Co-authored-by: Andrew <hlomzik@gmail.com>
1 parent d0c2765 commit c7d5c72

File tree

174 files changed

+1875
-2266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+1875
-2266
lines changed

label_studio/core/static/css/login.css

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
html, body {
1+
html,
2+
body {
23
height: 100%;
34
}
45

@@ -85,9 +86,9 @@ html, body {
8586
background: var(--color-neutral-surface);
8687
box-shadow: 0 2px 6px 0 rgb(var(--color-neutral-shadow) / 20%);
8788
padding: 16px;
88-
margin:18vh 60px 0 60px;
89+
margin: 18vh 60px 0 60px;
8990
position: relative;
90-
z-index:3;
91+
z-index: 3;
9192
}
9293

9394
.login_page_new_ui .tips:after {
@@ -105,7 +106,7 @@ html, body {
105106
font-size: 16px;
106107
font-style: normal;
107108
font-weight: bold;
108-
line-height: 24px;
109+
line-height: 24px;
109110
letter-spacing: 0.15px;
110111
margin-bottom: 8px;
111112
}
@@ -148,7 +149,7 @@ html, body {
148149
justify-content: stretch;
149150
}
150151

151-
.login_page_new_ui .toggle > * {
152+
.login_page_new_ui .toggle>* {
152153
flex-grow: 1;
153154
text-align: center;
154155
padding: .75rem 0;
@@ -157,15 +158,18 @@ html, body {
157158
border-top: 2px solid transparent;
158159
transition: all 150ms ease-out;
159160
}
160-
.login_page_new_ui .toggle > *.active {
161-
border-color: var(--color-primary-surface);
161+
162+
.login_page_new_ui .toggle>*.active {
163+
border-color: var(--color-primary-surface);
162164
color: var(--color-primary-content);
163165
}
164-
.login_page_new_ui .toggle > *:hover {
166+
167+
.login_page_new_ui .toggle>*:hover {
165168
color: var(--color-primary-surface-hover);
166169
border-color: var(--color-primary-surface-hover);
167170
}
168-
.form-wrapper{
171+
172+
.form-wrapper {
169173
position: relative;
170174
background: var(--color-neutral-surface);
171175
margin-top: 1.5rem;
@@ -176,7 +180,7 @@ html, body {
176180
width: 22rem;
177181
}
178182

179-
.form-wrapper h2{
183+
.form-wrapper h2 {
180184
font-size: 2rem;
181185
font-weight: 500;
182186
margin: 0 0 1rem 0;
@@ -190,26 +194,39 @@ html, body {
190194
grid-auto-flow: rows;
191195
grid-gap: 1rem;
192196
}
193-
.login_page_new_ui form > * {
197+
198+
.login_page_new_ui form>* {
194199
position: relative;
195200
}
201+
196202
.login_page_new_ui form p {
197203
margin: 0;
198204
}
205+
199206
.login_page_new_ui form .error {
200207
color: var(--color-negative-content);
201208
font-size: .875rem;
202209
}
210+
203211
.login_page_new_ui form input,
204212
.login_page_new_ui form button,
205213
.login_page_new_ui form select {
206214
width: 100%;
207215
font-family: 'Hellix', sans-serif;
208216
}
209217

210-
.login_page_new_ui form .lsf-button-ls.lsf-button-ls_look_primary {
211-
--button-color: var(--color-neutral-inverted-content);
218+
.login_page_new_ui form input {
219+
padding: 10px 15px;
220+
border-radius: var(--corner-radius-smaller);
221+
box-sizing: border-box;
222+
border: 1px solid var(--color-neutral-border);
223+
}
224+
225+
.login_page_new_ui form button {
212226
border-radius: 4rem;
227+
color: var(--color-neutral-inverted-content);
228+
padding: 10px 0;
229+
border: none;
213230
background: var(--color-neutral-inverted-surface);
214231
}
215232

@@ -222,16 +239,19 @@ html, body {
222239
line-height: 16px;
223240
color: var(--color-negative-content);
224241
}
242+
225243
.login_page_new_ui .field_errors li {
226244
margin-top: .25rem;
227245
}
228246

229247
.auto-generated form {
230248
width: 100%;
231249
}
250+
232251
.auto-generated form label {
233252
display: block;
234253
}
254+
235255
.auto-generated form input {
236256
height: 40px;
237257
min-height: 40px;
@@ -248,28 +268,34 @@ html, body {
248268
.auto-generated p:empty {
249269
display: none;
250270
}
271+
251272
.auto-generated form ul li:not(:last-child) {
252273
margin-bottom: 0.5em;
253274
}
275+
254276
.auto-generated form ul {
255277
margin-bottom: 0;
256278
}
257279

258-
.input-wrapper label{
280+
.input-wrapper label {
259281
font-size: .825rem !important;
260282
margin-bottom: .2rem;
261283
font-family: 'Hellix', sans-serif !important;
262284
font-weight: 500;
263285
}
264286

265-
label{
287+
label {
266288
font-family: 'Hellix', sans-serif !important;
267289
font-weight: 500;
268290
font-size: .825rem !important;
269291
margin-bottom: .2rem;
270292
display: block;
271293
}
272294

295+
.login-button {
296+
font-size: var(--font-size-body-medium);
297+
}
298+
273299
.form-group {
274300
display: block;
275301
margin-bottom: .5rem;
@@ -290,13 +316,13 @@ label{
290316
font-size: .875rem;
291317
}
292318

293-
.form-group label a{
319+
.form-group label a {
294320
font-family: 'Hellix', sans-serif !important;
295321
font-weight: 500;
296322
}
297323

298324
.form-group label:before {
299-
content:'';
325+
content: '';
300326
-webkit-appearance: none;
301327
background-color: transparent;
302328
border: 1px solid #CAC5B8;
@@ -310,12 +336,12 @@ label{
310336
top: -1px;
311337
}
312338

313-
.form-group input:checked + label:before {
339+
.form-group input:checked+label:before {
314340
background: var(--primary_link);
315341
border: 1px solid var(--primary_link);
316342
}
317343

318-
.form-group input:checked + label:after {
344+
.form-group input:checked+label:after {
319345
content: '';
320346
display: block;
321347
position: absolute;
@@ -328,19 +354,19 @@ label{
328354
transform: rotate(45deg);
329355
}
330356

331-
.text-wrapper{
357+
.text-wrapper {
332358
display: flex;
333359
align-items: center;
334360
gap: 4px;
335361
font-size: .875rem;
336362
}
337363

338-
.text-wrapper a{
364+
.text-wrapper a {
339365
color: var(--primary_link);
340366
text-decoration: underline;
341367
font-weight: 500;
342368
}
343369

344-
.text-wrapper a:hover{
370+
.text-wrapper a:hover {
345371
text-decoration: none;
346372
}

label_studio/users/templates/users/new-ui/user_login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h2>Log in</h2>
3636
<input type="checkbox" id="persist_session" name="persist_session" class="lsf-checkbox-ls" checked="checked" style="width: auto;" />
3737
<label for="persist_session">Keep me logged in this browser</label>
3838
</div>
39-
<button type="submit" aria-label="Log In" class="lsf-button-ls lsf-button-ls_look_primary">Log in</button>
39+
<button type="submit" aria-label="Log In" class="login-button">Log in</button>
4040
</form>
4141
</div>
4242
{% if not settings.DISABLE_SIGNUP_WITHOUT_LINK %}

web/apps/labelstudio/src/components/Button/Button.jsx

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)