@thl-ui/styles 0.0.0-stage → 0.1.0

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 (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -2
  3. package/dist/components/alert.css +1 -0
  4. package/dist/components/app.css +1 -0
  5. package/dist/components/avatar.css +1 -0
  6. package/dist/components/badge.css +1 -0
  7. package/dist/components/button.css +1 -0
  8. package/dist/components/card.css +1 -0
  9. package/dist/components/form.css +1 -0
  10. package/dist/components/nav.css +1 -0
  11. package/dist/components/overlay.css +1 -0
  12. package/dist/components/pages.css +1 -0
  13. package/dist/components/progress.css +1 -0
  14. package/dist/components/ribbon.css +1 -0
  15. package/dist/components/table.css +1 -0
  16. package/dist/components/widgets.css +1 -0
  17. package/dist/fonts/OFL.txt +93 -0
  18. package/dist/fonts/open-sans-cyrillic-ext-wght-normal.woff2 +0 -0
  19. package/dist/fonts/open-sans-cyrillic-wght-normal.woff2 +0 -0
  20. package/dist/fonts/open-sans-greek-ext-wght-normal.woff2 +0 -0
  21. package/dist/fonts/open-sans-greek-wght-normal.woff2 +0 -0
  22. package/dist/fonts/open-sans-latin-ext-wght-normal.woff2 +0 -0
  23. package/dist/fonts/open-sans-latin-wght-normal.woff2 +0 -0
  24. package/dist/fonts/open-sans-vietnamese-wght-normal.woff2 +0 -0
  25. package/dist/fonts.css +70 -0
  26. package/dist/thl-ui.css +447 -0
  27. package/dist/tokens.css +376 -0
  28. package/package.json +48 -4
  29. package/src/_base.scss +408 -0
  30. package/src/_mixins.scss +53 -0
  31. package/src/components/_alert.scss +183 -0
  32. package/src/components/_avatar.scss +75 -0
  33. package/src/components/_badge.scss +112 -0
  34. package/src/components/_button.scss +242 -0
  35. package/src/components/_card.scss +211 -0
  36. package/src/components/_form.scss +959 -0
  37. package/src/components/_nav.scss +738 -0
  38. package/src/components/_overlay.scss +382 -0
  39. package/src/components/_progress.scss +103 -0
  40. package/src/components/_ribbon.scss +136 -0
  41. package/src/components/_table.scss +215 -0
  42. package/src/components/_widgets.scss +1050 -0
  43. package/src/index.scss +16 -0
  44. package/src/layout/_app.scss +804 -0
  45. package/src/pages/_pages.scss +691 -0
@@ -0,0 +1,691 @@
1
+ @use '../mixins' as *;
2
+
3
+ /* login-register / lock-screen */
4
+ .#{$p}-auth {
5
+ min-height: 100vh;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ padding: 30px 16px;
10
+ position: relative;
11
+ background: linear-gradient(135deg, #{v(topbar-1)}, #{v(topbar-2)});
12
+ &__box {
13
+ width: 400px;
14
+ max-width: 100%;
15
+ background: v(surface);
16
+ border-radius: v(radius);
17
+ box-shadow: v(shadow-lg);
18
+ padding: 35px 30px;
19
+ animation: #{$p}-zoom-in 0.3s both;
20
+ }
21
+ &__logo {
22
+ text-align: center;
23
+ margin-bottom: 20px;
24
+ font-size: 26px;
25
+ font-weight: 700;
26
+ color: v(theme-text);
27
+ }
28
+ &__title {
29
+ text-align: center;
30
+ margin: 0 0 25px !important;
31
+ color: v(heading);
32
+ font-size: 21px !important;
33
+ }
34
+ &__row {
35
+ display: flex;
36
+ justify-content: space-between;
37
+ align-items: center;
38
+ gap: 10px;
39
+ margin-bottom: 20px;
40
+ font-size: 14px;
41
+ }
42
+ &__social {
43
+ display: flex;
44
+ gap: 10px;
45
+ justify-content: center;
46
+ margin-top: 15px;
47
+ }
48
+ &__foot {
49
+ text-align: center;
50
+ margin-top: 20px;
51
+ color: v(text);
52
+ font-size: 14px;
53
+ }
54
+ &__lang {
55
+ position: absolute;
56
+ top: 16px;
57
+ inset-inline-end: 16px;
58
+ }
59
+ &__avatar {
60
+ display: block;
61
+ margin: 0 auto 15px;
62
+ width: 90px;
63
+ height: 90px;
64
+ border-radius: 50%;
65
+ object-fit: cover;
66
+ border: 4px solid v(surface);
67
+ box-shadow: v(shadow);
68
+ }
69
+ }
70
+
71
+ /* error pages */
72
+ .#{$p}-error {
73
+ min-height: 100vh;
74
+ display: flex;
75
+ flex-direction: column;
76
+ align-items: center;
77
+ justify-content: center;
78
+ text-align: center;
79
+ padding: 30px 16px;
80
+ background: v(body-bg);
81
+ &__code {
82
+ /* !important: base heading sizes (h1) must not shrink the error code */
83
+ font-size: 160px !important;
84
+ font-weight: 900 !important;
85
+ line-height: 1 !important;
86
+ margin: 0 !important;
87
+ letter-spacing: -0.02em;
88
+ background: linear-gradient(to right, #{v(topbar-1)}, #{v(topbar-2)});
89
+ -webkit-background-clip: text;
90
+ background-clip: text;
91
+ color: transparent !important;
92
+ @include down(sm) {
93
+ font-size: 100px !important;
94
+ }
95
+ }
96
+ &__title {
97
+ text-transform: uppercase;
98
+ margin: 10px 0 !important;
99
+ color: v(heading);
100
+ font-size: v(h3) !important;
101
+ line-height: 30px !important;
102
+ }
103
+ &__text {
104
+ margin: 0 0 30px;
105
+ color: v(text);
106
+ }
107
+ &__footer {
108
+ margin-top: 40px;
109
+ color: v(text);
110
+ font-size: 13px;
111
+ }
112
+ }
113
+
114
+ /* inbox */
115
+ .#{$p}-inbox {
116
+ display: grid;
117
+ grid-template-columns: 240px 1fr;
118
+ gap: 0;
119
+ background: v(surface);
120
+ border: 1px solid v(border-color);
121
+ border-radius: v(radius);
122
+ overflow: hidden;
123
+ margin-bottom: v(space-7);
124
+ &__aside {
125
+ padding: 25px 20px;
126
+ border-inline-end: 1px solid v(border-color);
127
+ }
128
+ &__label-title {
129
+ font-size: v(h5) !important;
130
+ line-height: 18px !important;
131
+ }
132
+ &__main > h2 {
133
+ font-size: v(h3);
134
+ line-height: 30px;
135
+ }
136
+ &__main > h3 {
137
+ font-size: v(h5);
138
+ line-height: 18px;
139
+ }
140
+ &__folders {
141
+ list-style: none;
142
+ margin: 20px 0;
143
+ padding: 0;
144
+ a,
145
+ button {
146
+ display: flex;
147
+ justify-content: space-between;
148
+ align-items: center;
149
+ width: 100%;
150
+ padding: 9px 12px;
151
+ border-radius: v(radius-sm);
152
+ color: v(text-strong);
153
+ background: none;
154
+ border: 0;
155
+ font: inherit;
156
+ cursor: pointer;
157
+ &:hover,
158
+ &.is-active {
159
+ background: v(surface-muted);
160
+ color: v(theme-text);
161
+ }
162
+ }
163
+ }
164
+ &__main {
165
+ min-width: 0;
166
+ padding: 25px;
167
+ }
168
+ &__toolbar {
169
+ display: flex;
170
+ gap: 8px;
171
+ align-items: center;
172
+ flex-wrap: wrap;
173
+ margin-bottom: 15px;
174
+ }
175
+ &__row {
176
+ cursor: pointer;
177
+ td {
178
+ white-space: nowrap;
179
+ }
180
+ &.is-unread td {
181
+ font-weight: 700;
182
+ color: v(text-strong);
183
+ }
184
+ }
185
+ &__subject {
186
+ max-width: 0;
187
+ width: 100%;
188
+ overflow: hidden;
189
+ text-overflow: ellipsis;
190
+ }
191
+ &__mail-head {
192
+ display: flex;
193
+ gap: 15px;
194
+ align-items: center;
195
+ padding-bottom: 15px;
196
+ border-bottom: 1px solid v(border-color);
197
+ margin-bottom: 20px;
198
+ }
199
+ &__attachments {
200
+ display: flex;
201
+ gap: 12px;
202
+ flex-wrap: wrap;
203
+ margin-top: 20px;
204
+ img {
205
+ width: 120px;
206
+ height: 90px;
207
+ object-fit: cover;
208
+ border-radius: v(radius-sm);
209
+ }
210
+ }
211
+ @include down(md) {
212
+ grid-template-columns: 1fr;
213
+ &__aside {
214
+ border-inline-end: 0;
215
+ border-bottom: 1px solid v(border-color);
216
+ }
217
+ }
218
+ }
219
+
220
+ /* rich text editor (html5-editor replacement) */
221
+ .#{$p}-editor {
222
+ border: 1px solid v(border-color);
223
+ border-radius: v(radius-sm);
224
+ background: v(surface);
225
+ &__toolbar {
226
+ display: flex;
227
+ gap: 2px;
228
+ flex-wrap: wrap;
229
+ padding: 6px;
230
+ border-bottom: 1px solid v(border-color);
231
+ background: v(surface-muted);
232
+ button {
233
+ min-width: 32px;
234
+ height: 30px;
235
+ border: 0;
236
+ background: none;
237
+ cursor: pointer;
238
+ border-radius: v(radius-sm);
239
+ color: v(text-strong);
240
+ font: inherit;
241
+ font-weight: 600;
242
+ &:hover,
243
+ &.is-active {
244
+ background: v(surface);
245
+ color: v(theme-text);
246
+ }
247
+ }
248
+ }
249
+ &__content {
250
+ min-height: 220px;
251
+ padding: 12px;
252
+ outline: none;
253
+ color: v(text-strong);
254
+ &:empty::before {
255
+ content: attr(data-placeholder);
256
+ color: v(text);
257
+ }
258
+ }
259
+ }
260
+
261
+ /* invoice */
262
+ .#{$p}-invoice {
263
+ &__head {
264
+ display: flex;
265
+ justify-content: space-between;
266
+ gap: 20px;
267
+ flex-wrap: wrap;
268
+ padding-bottom: 20px;
269
+ border-bottom: 1px solid v(border-color);
270
+ margin-bottom: 20px;
271
+ }
272
+ &__address {
273
+ font-style: normal;
274
+ color: v(text);
275
+ line-height: 1.7;
276
+ strong {
277
+ color: v(heading);
278
+ }
279
+ }
280
+ &__totals {
281
+ margin-inline-start: auto;
282
+ width: 320px;
283
+ max-width: 100%;
284
+ text-align: end;
285
+ p {
286
+ display: flex;
287
+ justify-content: space-between;
288
+ margin: 0 0 8px;
289
+ }
290
+ h3 {
291
+ display: flex;
292
+ justify-content: space-between;
293
+ border-top: 1px solid v(border-color);
294
+ padding-top: 10px;
295
+ }
296
+ }
297
+ &__actions {
298
+ display: flex;
299
+ justify-content: flex-end;
300
+ gap: 10px;
301
+ margin-top: 20px;
302
+ }
303
+ @media print {
304
+ &__actions {
305
+ display: none;
306
+ }
307
+ }
308
+ }
309
+ @media print {
310
+ .#{$p}-topbar,
311
+ .#{$p}-sidebar,
312
+ .#{$p}-page-header,
313
+ .#{$p}-footer,
314
+ .#{$p}-drawer {
315
+ display: none !important;
316
+ }
317
+ .#{$p}-page {
318
+ margin: 0 !important;
319
+ }
320
+ .#{$p}-app {
321
+ padding: 0 !important;
322
+ }
323
+ }
324
+
325
+ /* products / ecommerce */
326
+ .#{$p}-product {
327
+ background: v(surface);
328
+ border: 1px solid v(border-color);
329
+ border-radius: v(radius);
330
+ overflow: hidden;
331
+ margin-bottom: v(space-7);
332
+ display: flex;
333
+ flex-direction: column;
334
+ &__img {
335
+ position: relative;
336
+ aspect-ratio: 1;
337
+ background: v(surface-muted);
338
+ overflow: hidden;
339
+ img {
340
+ width: 100%;
341
+ height: 100%;
342
+ object-fit: cover;
343
+ transition: transform 0.4s;
344
+ }
345
+ &:hover img {
346
+ transform: scale(1.06);
347
+ }
348
+ }
349
+ &__body {
350
+ padding: 15px 18px 18px;
351
+ display: flex;
352
+ flex-direction: column;
353
+ gap: 6px;
354
+ flex: 1;
355
+ }
356
+ &__name {
357
+ margin: 0 !important;
358
+ font-size: 16px !important;
359
+ line-height: 22px !important;
360
+ color: v(heading);
361
+ font-weight: 500;
362
+ }
363
+ &__price {
364
+ font-size: 18px;
365
+ color: v(theme-text);
366
+ font-weight: 600;
367
+ del {
368
+ color: v(text);
369
+ font-size: 14px;
370
+ font-weight: 400;
371
+ margin-inline-start: 6px;
372
+ }
373
+ }
374
+ &__actions {
375
+ margin-top: auto;
376
+ display: flex;
377
+ gap: 8px;
378
+ /* the main action takes the free width and may wrap its label on narrow cards;
379
+ the icon button keeps its size */
380
+ > .#{$p}-btn:first-child {
381
+ flex: 1 1 auto;
382
+ min-width: 0;
383
+ white-space: normal;
384
+ text-align: center;
385
+ line-height: 1.25;
386
+ padding-block: 6px;
387
+ height: auto;
388
+ min-height: v(control-height-sm);
389
+ }
390
+ }
391
+ }
392
+ .#{$p}-rating {
393
+ color: v(color-warning-text);
394
+ letter-spacing: 2px;
395
+ display: inline-flex;
396
+ gap: 1px;
397
+ }
398
+
399
+ /* search results */
400
+ .#{$p}-search-result {
401
+ padding: 15px 0;
402
+ border-bottom: 1px solid v(border-color);
403
+ h2,
404
+ h4 {
405
+ margin: 0 0 4px !important;
406
+ a {
407
+ color: v(link);
408
+ }
409
+ }
410
+ &__url {
411
+ color: v(color-success-text);
412
+ font-size: 13px;
413
+ }
414
+ p {
415
+ margin: 4px 0 0;
416
+ }
417
+ }
418
+
419
+ /* landing page (Cubic landingpage/index.html) */
420
+ .#{$p}-landing {
421
+ background: v(surface);
422
+ color: v(text);
423
+ &__wrap {
424
+ max-width: 1170px;
425
+ margin: 0 auto;
426
+ padding: 0 20px;
427
+ }
428
+ &__hero {
429
+ padding: 60px 0 40px;
430
+ text-align: center;
431
+ h1 {
432
+ color: v(heading) !important;
433
+ font-size: clamp(28px, 4vw, 36px) !important;
434
+ line-height: 1.25 !important;
435
+ font-weight: 400;
436
+ margin: 18px 0 14px !important;
437
+ }
438
+ p {
439
+ font-size: 17px;
440
+ line-height: 1.8;
441
+ max-width: 760px;
442
+ margin: 0 auto 26px;
443
+ }
444
+ }
445
+ &__logo {
446
+ display: inline-flex;
447
+ align-items: center;
448
+ justify-content: center;
449
+ width: 84px;
450
+ height: 84px;
451
+ color: v(theme-text);
452
+ border: 2px solid v(theme);
453
+ border-radius: 22px;
454
+ transform: rotate(45deg);
455
+ > * {
456
+ transform: rotate(-45deg);
457
+ }
458
+ }
459
+ &__demos {
460
+ padding: 40px 0 70px;
461
+ text-align: center;
462
+ }
463
+ &__demo {
464
+ margin-bottom: 30px;
465
+ text-decoration: none;
466
+ display: block;
467
+ color: inherit;
468
+ h2,
469
+ h3 {
470
+ margin: 30px 0 0 !important;
471
+ padding: 15px;
472
+ font-size: 18px !important;
473
+ line-height: 22px;
474
+ font-weight: 600;
475
+ color: v(heading);
476
+ background: v(surface);
477
+ border: 1px solid v(border-color);
478
+ border-radius: v(radius);
479
+ }
480
+ }
481
+ &__figure {
482
+ position: relative;
483
+ box-shadow: v(shadow-lg);
484
+ border-radius: v(radius-sm);
485
+ overflow: hidden;
486
+ }
487
+ &__overlay {
488
+ position: absolute;
489
+ inset: 0;
490
+ background: rgba(0, 0, 0, 0.55);
491
+ display: flex;
492
+ align-items: center;
493
+ justify-content: center;
494
+ opacity: 0;
495
+ transition: opacity 0.3s;
496
+ }
497
+ &__demo:hover &__overlay,
498
+ &__demo:focus-visible &__overlay {
499
+ opacity: 1;
500
+ }
501
+ &__demo:focus-visible {
502
+ outline: none;
503
+ .#{$p}-landing__figure {
504
+ outline: 2px solid v(theme);
505
+ outline-offset: 4px;
506
+ }
507
+ }
508
+ /* layout mockups drawn with CSS (no screenshots): --s1/--s2 = topbar gradient, --ss = sidebar */
509
+ &__shot {
510
+ --s1: #0078bc;
511
+ --s2: #00beda;
512
+ --ss: #fff;
513
+ display: grid;
514
+ grid-template-columns: 22% 1fr;
515
+ grid-template-rows: 9% 1fr;
516
+ aspect-ratio: 16 / 10.5;
517
+ background: #f1f4f5;
518
+ i,
519
+ b,
520
+ em {
521
+ display: block;
522
+ font-style: normal;
523
+ }
524
+ > .s-top {
525
+ grid-column: 1 / -1;
526
+ background: linear-gradient(90deg, var(--s1), var(--s2));
527
+ }
528
+ > .s-side {
529
+ background: var(--ss);
530
+ background-image: repeating-linear-gradient(to bottom, transparent 0 26%, rgba(127, 127, 127, 0.25) 26% 29%, transparent 29% 36%);
531
+ background-size: 60% 40%;
532
+ background-position: 20% 85%;
533
+ background-repeat: no-repeat;
534
+ box-shadow: 1px 0 4px rgba(0, 0, 0, 0.06);
535
+ }
536
+ > .s-main {
537
+ padding: 5%;
538
+ display: grid;
539
+ grid-template-columns: repeat(4, 1fr);
540
+ grid-template-rows: 22% 1fr;
541
+ gap: 4%;
542
+ > b {
543
+ background: #fff;
544
+ border-radius: 2px;
545
+ position: relative;
546
+ &::before {
547
+ content: '';
548
+ position: absolute;
549
+ left: 12%;
550
+ top: 22%;
551
+ width: 26%;
552
+ aspect-ratio: 1;
553
+ border-radius: 50%;
554
+ background: var(--s1);
555
+ }
556
+ &::after {
557
+ content: '';
558
+ position: absolute;
559
+ left: 46%;
560
+ right: 12%;
561
+ top: 32%;
562
+ height: 12%;
563
+ border-radius: 2px;
564
+ background: #d7dde0;
565
+ }
566
+ }
567
+ > em {
568
+ grid-column: span 3;
569
+ background: #fff
570
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C15 10 25 45 40 25 S65 5 75 30 S90 20 100 8' fill='none' stroke='%2300beda' stroke-width='1.6'/%3E%3Cpath d='M0 30 C12 45 30 15 45 35 S70 40 80 20 S95 30 100 25' fill='none' stroke='%232ecc71' stroke-width='1.6'/%3E%3C/svg%3E")
571
+ center / 86% 60% no-repeat;
572
+ border-radius: 2px;
573
+ }
574
+ > em + em {
575
+ grid-column: span 1;
576
+ background: #fff
577
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='13' fill='none' stroke='%23e8ecef' stroke-width='6'/%3E%3Ccircle cx='20' cy='20' r='13' fill='none' stroke='%230283cc' stroke-width='6' stroke-dasharray='55 100' transform='rotate(-90 20 20)'/%3E%3C/svg%3E")
578
+ center / 70% no-repeat;
579
+ }
580
+ }
581
+ &--horizontal {
582
+ grid-template-columns: 1fr;
583
+ grid-template-rows: 9% 7% 1fr;
584
+ > .s-side {
585
+ background-image: repeating-linear-gradient(to right, rgba(127, 127, 127, 0.3) 0 9%, transparent 9% 13%);
586
+ background-size: 60% 22%;
587
+ background-position: 4% 50%;
588
+ }
589
+ }
590
+ &--mini {
591
+ grid-template-columns: 6% 1fr;
592
+ > .s-side {
593
+ background-size: 50% 50%;
594
+ background-position: 50% 70%;
595
+ }
596
+ }
597
+ }
598
+ &__more {
599
+ margin-top: 10px;
600
+ }
601
+ &__features {
602
+ background: v(body-bg);
603
+ padding: 80px 0 90px;
604
+ h2 {
605
+ text-align: center;
606
+ font-weight: 400;
607
+ font-size: clamp(24px, 3.4vw, 36px) !important;
608
+ line-height: 1.3 !important;
609
+ color: v(heading);
610
+ margin: 0 0 30px !important;
611
+ }
612
+ }
613
+ &__feature {
614
+ display: flex;
615
+ gap: 22px;
616
+ align-items: flex-start;
617
+ padding: 20px;
618
+ margin-top: 20px;
619
+ &-icon {
620
+ flex-shrink: 0;
621
+ font-size: 36px;
622
+ line-height: 1;
623
+ color: v(text);
624
+ opacity: 0.8;
625
+ }
626
+ h3 {
627
+ margin: 6px 0 8px !important;
628
+ font-weight: 400;
629
+ font-size: 19px !important;
630
+ line-height: 24px;
631
+ color: v(heading);
632
+ }
633
+ p {
634
+ margin: 0;
635
+ line-height: 22px;
636
+ }
637
+ }
638
+ &__cta {
639
+ text-align: center;
640
+ margin-top: 50px;
641
+ }
642
+ &__footer {
643
+ text-align: center;
644
+ padding: 20px;
645
+ color: v(text);
646
+ }
647
+ }
648
+
649
+ /* misc demo helpers */
650
+ .#{$p}-demo-block {
651
+ display: flex;
652
+ flex-wrap: wrap;
653
+ gap: 10px;
654
+ align-items: center;
655
+ margin-bottom: 15px;
656
+ }
657
+ .#{$p}-kbd {
658
+ font-family: ui-monospace, monospace;
659
+ font-size: 12px;
660
+ padding: 2px 6px;
661
+ border-radius: v(radius-sm);
662
+ background: v(surface-muted);
663
+ border: 1px solid v(border-color);
664
+ color: v(text-strong);
665
+ }
666
+ .#{$p}-code {
667
+ display: block;
668
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
669
+ font-size: 12.5px;
670
+ padding: 14px 16px;
671
+ border-radius: v(radius);
672
+ background: v(color-inverse);
673
+ color: #e8ebee;
674
+ overflow-x: auto;
675
+ white-space: pre;
676
+ line-height: 1.6;
677
+ }
678
+ .#{$p}-scroll-box {
679
+ max-height: 250px;
680
+ overflow-y: auto;
681
+ padding-inline-end: 8px;
682
+ scrollbar-width: thin;
683
+ scrollbar-color: v(border-color) transparent;
684
+ &::-webkit-scrollbar {
685
+ width: 6px;
686
+ }
687
+ &::-webkit-scrollbar-thumb {
688
+ background: v(border-color);
689
+ border-radius: 3px;
690
+ }
691
+ }