@trilogy-ds/styles 0.0.3-beta-v4 → 0.0.4-esm-cjs

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 (99) hide show
  1. package/dist/default/trilogy-mangled.css +1 -1
  2. package/dist/default/trilogy-partials.css +1 -1
  3. package/dist/default/trilogy.css +1 -1
  4. package/framework/src/_all.scss +2 -2
  5. package/framework/src/base/_all.scss +1 -1
  6. package/framework/src/base/_color.scss +0 -21
  7. package/framework/src/base/_elements.scss +1 -1
  8. package/framework/src/base/_generic.scss +5 -0
  9. package/framework/src/base/_helpers.scss +21 -6
  10. package/framework/src/base/_loading.scss +2 -2
  11. package/framework/src/base/_reset.scss +6 -1
  12. package/framework/src/components/_accordion.scss +4 -3
  13. package/framework/src/components/_autocomplete.scss +38 -0
  14. package/framework/src/components/_autolayout.scss +139 -109
  15. package/framework/src/{elements → components}/_badge.scss +1 -1
  16. package/framework/src/{elements → components}/_box.scss +9 -11
  17. package/framework/src/components/_breadcrumb.scss +17 -31
  18. package/framework/src/{elements → components}/_button.scss +16 -3
  19. package/framework/src/components/_card.scss +26 -9
  20. package/framework/src/{elements → components}/_checkbox.scss +30 -1
  21. package/framework/src/components/_countdown.scss +1 -1
  22. package/framework/src/components/_divider.scss +16 -0
  23. package/framework/src/components/_flex-box.scss +240 -0
  24. package/framework/src/{elements/_all.scss → components/_index.scss} +27 -12
  25. package/framework/src/{elements → components}/_link.scss +9 -3
  26. package/framework/src/components/_list.scss +66 -0
  27. package/framework/src/components/_modal.scss +32 -11
  28. package/framework/src/components/_otp.scss +2 -2
  29. package/framework/src/components/_pagination.scss +5 -2
  30. package/framework/src/components/_price.scss +28 -2
  31. package/framework/src/{elements → components}/_radio.scss +4 -3
  32. package/framework/src/components/_segmented-control.scss +9 -5
  33. package/framework/src/components/_select.scss +131 -0
  34. package/framework/src/components/_stepper.scss +1 -1
  35. package/framework/src/{elements → components}/_sticker.scss +13 -1
  36. package/framework/src/{elements → components}/_switch.scss +13 -8
  37. package/framework/src/{elements → components}/_table.scss +9 -10
  38. package/framework/src/components/_tabs.scss +66 -28
  39. package/framework/src/{elements → components}/_tag.scss +1 -17
  40. package/framework/src/{elements/_paragraph.scss → components/_text.scss} +1 -13
  41. package/framework/src/components/_textarea.scss +46 -0
  42. package/framework/src/components/_timeline.scss +1 -1
  43. package/framework/src/{elements → components}/_title.scss +10 -0
  44. package/framework/src/components/alert/_index.scss +2 -0
  45. package/framework/src/{elements → components/alert}/_toaster.scss +0 -3
  46. package/framework/src/{elements → components/input}/_entry.scss +48 -10
  47. package/framework/src/{elements → components/input}/_form.scss +10 -11
  48. package/framework/src/components/input/_index.scss +4 -0
  49. package/framework/src/{elements → components/input}/_input-icons.scss +14 -2
  50. package/framework/src/components/progress/_index.scss +2 -0
  51. package/framework/src/components/{_progress-radial.scss → progress/_progress-radial.scss} +1 -1
  52. package/framework/src/{elements → components/progress}/_progress.scss +3 -3
  53. package/framework/src/elements/_index.scss +5 -0
  54. package/framework/src/elements/_other.scss +0 -4
  55. package/framework/src/grid/_columns.scss +33 -11
  56. package/framework/src/layout/_hero.scss +4 -0
  57. package/framework/src/layout/_section.scss +5 -0
  58. package/framework/src/theming/buttons_partial.scss +1 -1
  59. package/framework/src/theming/common_partials.scss +1 -1
  60. package/framework/src/trilogy-mangled.scss +3 -3
  61. package/framework/src/trilogy.scss +2 -2
  62. package/framework/src/utilities/_background.scss +3 -1
  63. package/framework/src/utilities/_derived-variables.scss +0 -92
  64. package/framework/src/utilities/_initial-variables.scss +3 -111
  65. package/framework/src/utilities/_pre.scss +3 -1
  66. package/framework/src/utilities/mixins/_arrow.scss +21 -0
  67. package/framework/src/utilities/mixins/_delete.scss +86 -0
  68. package/framework/src/utilities/mixins/_index.scss +11 -0
  69. package/framework/src/utilities/mixins/_markup-group.scss +27 -0
  70. package/framework/src/utilities/mixins/_mixins.scss +293 -0
  71. package/framework/src/utilities/mixins/_overlay.scss +7 -0
  72. package/framework/src/utilities/mixins/_pattern.scss +10 -0
  73. package/framework/src/utilities/mixins/_responsiveness.scss +84 -0
  74. package/framework/src/utilities/mixins/_spinner.scss +12 -0
  75. package/framework/src/utilities/mixins/_state.scss +25 -0
  76. package/framework/src/utilities/mixins/_unselectable.scss +10 -0
  77. package/framework/src/utilities/mixins/_utils.scss +24 -0
  78. package/framework/src/utilities/variables/_animation.scss +2 -0
  79. package/framework/src/utilities/{_colors.scss → variables/_color.scss} +44 -0
  80. package/framework/src/utilities/variables/_font.scss +97 -0
  81. package/framework/src/utilities/variables/_index.scss +6 -0
  82. package/framework/src/utilities/variables/_responsiveness.scss +7 -0
  83. package/framework/src/utilities/variables/_shadow.scss +3 -0
  84. package/framework/src/utilities/variables/_zindex.scss +14 -0
  85. package/package.json +1 -1
  86. package/framework/src/components/_all.scss +0 -24
  87. package/framework/src/elements/_autocomplete.scss +0 -32
  88. package/framework/src/elements/_list.scss +0 -62
  89. package/framework/src/elements/_select.scss +0 -96
  90. package/framework/src/elements/_textarea.scss +0 -133
  91. package/framework/src/utilities/_mixins.scss +0 -635
  92. /package/framework/src/{elements → components}/_chips.scss +0 -0
  93. /package/framework/src/{elements → components}/_container.scss +0 -0
  94. /package/framework/src/{elements → components}/_icon.scss +0 -0
  95. /package/framework/src/{elements → components}/_image.scss +0 -0
  96. /package/framework/src/{elements → components}/_loader.scss +0 -0
  97. /package/framework/src/{elements → components/alert}/_alert.scss +0 -0
  98. /package/framework/src/{elements → components/input}/_input-gauge.scss +0 -0
  99. /package/framework/src/{components → elements}/_plus-symbol.scss +0 -0
@@ -1,635 +0,0 @@
1
- @use "sass:string";
2
- @import "./initial-variables";
3
-
4
- %delete {
5
- @extend %unselectable;
6
-
7
- -moz-appearance: none;
8
- -webkit-appearance: none;
9
- background-color: rgba(black, 0.2);
10
- border: none;
11
- border-radius: 9999px;
12
- cursor: pointer;
13
- display: inline-block;
14
- flex-grow: 0;
15
- flex-shrink: 0;
16
- font-size: 0;
17
- height: 20px;
18
- max-height: 20px;
19
- max-width: 20px;
20
- min-height: 20px;
21
- min-width: 20px;
22
- outline: none;
23
- position: relative;
24
- vertical-align: top;
25
- width: 20px;
26
-
27
- &::before,
28
- &::after {
29
- background-color: #fff;
30
- content: '';
31
- display: block;
32
- left: 50%;
33
- position: absolute;
34
- top: 50%;
35
- transform: translateX(-50%) translateY(-50%) rotate(45deg);
36
- transform-origin: center center;
37
- }
38
-
39
- &::before {
40
- height: 2px;
41
- width: 50%;
42
- }
43
-
44
- &::after {
45
- height: 50%;
46
- width: 2px;
47
- }
48
-
49
- &:hover,
50
- &:focus {
51
- background-color: rgba(black, 0.3);
52
- }
53
-
54
- &:active {
55
- background-color: rgba(black, 0.4);
56
- }
57
-
58
- // Sizes
59
- &.is-small {
60
- height: 16px;
61
- max-height: 16px;
62
- max-width: 16px;
63
- min-height: 16px;
64
- min-width: 16px;
65
- width: 16px;
66
- }
67
-
68
- &.is-medium {
69
- height: 24px;
70
- max-height: 24px;
71
- max-width: 24px;
72
- min-height: 24px;
73
- min-width: 24px;
74
- width: 24px;
75
- }
76
-
77
- &.is-large {
78
- height: 32px;
79
- max-height: 32px;
80
- max-width: 32px;
81
- min-height: 32px;
82
- min-width: 32px;
83
- width: 32px;
84
- }
85
- }
86
-
87
- %unselectable {
88
- -webkit-touch-callout: none;
89
- -webkit-user-select: none;
90
- -moz-user-select: none;
91
- -ms-user-select: none;
92
- user-select: none;
93
- }
94
-
95
- @mixin delete {
96
- @extend %delete;
97
- }
98
-
99
- @mixin arrow( $direction: 'down') {
100
- background-color: currentColor;
101
- @if $direction == 'up' {
102
- content: "";
103
- mask-image: url('./assets/icons/all/arrow-up.svg');
104
- } @else if $direction == 'left' {
105
- content: "";
106
- mask-image: url('./assets/icons/all/arrow-left.svg');
107
- } @else if $direction == 'right' {
108
- content: "";
109
- mask-image: url('./assets/icons/all/arrow-right.svg');
110
- } @else {
111
- content: "";
112
- mask-image: url('./assets/icons/all/arrow-down.svg');
113
- }
114
-
115
- min-width: 15px;
116
- min-height: 15px;
117
- mask-size: 15px;
118
- position: absolute;
119
- display: inline-block;
120
- }
121
-
122
- @mixin block {
123
- &:not(:last-child) {
124
- margin-bottom: 15px;
125
- }
126
- }
127
-
128
- @mixin clearfix {
129
- &::after {
130
- clear: both;
131
- content: ' ';
132
- display: table;
133
- }
134
- }
135
-
136
- @mixin center($width, $height: 0) {
137
- position: absolute;
138
-
139
- @if $height != 0 {
140
- left: calc(50% - (#{$width} / 2));
141
- top: calc(50% - (#{$height} / 2));
142
- } @else {
143
- left: calc(50% - (#{$width} / 2));
144
- top: calc(50% - (#{$width} / 2));
145
- }
146
- }
147
-
148
- @mixin spinner {
149
- animation: spinAround 500ms infinite linear;
150
- border: 2px solid getColor('neutral-fade');
151
- border-radius: 290486px;
152
- border-right-color: transparent;
153
- border-top-color: transparent;
154
- content: '';
155
- display: block;
156
- height: 1em;
157
- position: relative;
158
- width: 1em;
159
- }
160
-
161
- @mixin overflow-touch {
162
- -webkit-overflow-scrolling: touch;
163
- }
164
-
165
- @mixin label-states {
166
- &:focus,
167
- &:active,
168
- &:hover {
169
- @include hover();
170
- }
171
- }
172
-
173
- @mixin overlay($offset: 0) {
174
- position: absolute;
175
- top: $offset;
176
- bottom: $offset;
177
- left: $offset;
178
- right: $offset;
179
- }
180
-
181
- @mixin placeholder {
182
- $placeholders: ':-moz' ':-webkit-input' '-moz' '-ms-input';
183
-
184
- @each $placeholder in $placeholders {
185
- &:#{$placeholder}-placeholder {
186
- @content;
187
- }
188
- }
189
- }
190
-
191
- @mixin unselectable {
192
- @extend %unselectable;
193
- }
194
-
195
- @mixin ui-icon {
196
- font-family: trilogy-all;
197
- font-style: normal;
198
- font-weight: normal;
199
- display: inline-block;
200
- text-decoration: inherit;
201
- margin-right: 0.2em;
202
- text-align: center;
203
-
204
- /* For safety - reset parent styles, that can break glyph codes*/
205
- font-variant: normal;
206
- text-transform: none;
207
-
208
- /* fix buttons height, for twitter bootstrap */
209
- line-height: 1em;
210
-
211
- /* remove if not needed */
212
- margin-left: 0.2em;
213
-
214
- /* Font smoothing. That was taken from TWBS */
215
- -webkit-font-smoothing: antialiased;
216
- -moz-osx-font-smoothing: grayscale;
217
- }
218
-
219
- // Responsiveness
220
- @mixin from($device) {
221
- @media screen and (min-width: $device) {
222
- @content;
223
- }
224
- }
225
-
226
- @mixin until($device) {
227
- @media screen and (max-width: $device - 1px) {
228
- @content;
229
- }
230
- }
231
-
232
- @mixin mobile {
233
- @media screen and (max-width: $tablet - 1px) {
234
- @content;
235
- }
236
- }
237
-
238
- @mixin tablet {
239
- @media screen and (min-width: $tablet), print {
240
- @content;
241
- }
242
- }
243
-
244
- @mixin tablet-only {
245
- @media screen and (min-width: $tablet) and (max-width: $desktop - 1px) {
246
- @content;
247
- }
248
- }
249
-
250
- @mixin touch {
251
- @media screen and (max-width: $desktop - 1px) {
252
- @content;
253
- }
254
- }
255
-
256
- @mixin desktop {
257
- @media screen and (min-width: $desktop) {
258
- @content;
259
- }
260
- }
261
-
262
- @mixin desktop-only {
263
- @media screen and (min-width: $desktop) and (max-width: $widescreen - 1px) {
264
- @content;
265
- }
266
- }
267
-
268
- @mixin until-widescreen {
269
- @media screen and (max-width: $widescreen - 1px) {
270
- @content;
271
- }
272
- }
273
-
274
- @mixin widescreen {
275
- @media screen and (min-width: $widescreen) {
276
- @content;
277
- }
278
- }
279
-
280
- @mixin widescreen-only {
281
- @media screen and (min-width: $widescreen) and (max-width: $fullhd - 1px) {
282
- @content;
283
- }
284
- }
285
-
286
- @mixin until-fullhd {
287
- @media screen and (max-width: $fullhd - 1px) {
288
- @content;
289
- }
290
- }
291
-
292
- @mixin fullhd {
293
- @media screen and (min-width: $fullhd) {
294
- @content;
295
- }
296
- }
297
-
298
- @mixin all-desktop-only {
299
- @media screen and (min-width: $desktop) and (max-width: $fullhd - 1px) {
300
- @content;
301
- }
302
- }
303
-
304
- @mixin ellipsis() {
305
- white-space: nowrap;
306
- overflow-x: hidden;
307
- text-overflow: ellipsis;
308
- }
309
-
310
- @mixin text-tags() {
311
- a,
312
- span,
313
- p,
314
- i,
315
- strong,
316
- h1,
317
- h2,
318
- h3,
319
- h4,
320
- h5,
321
- label,
322
- h6 {
323
- @content;
324
- }
325
- }
326
-
327
- @mixin heading-tags() {
328
- h1,
329
- h2,
330
- h3,
331
- h4,
332
- h5,
333
- h6 {
334
- @content;
335
- }
336
- }
337
-
338
- @mixin apply-shadow-box {
339
- box-shadow: $shadow;
340
- }
341
-
342
- @mixin apply-colors($property: 'color') {
343
- @each $name, $pair in $colors-brand-functionnal {
344
- $color: getColor($name);
345
- $brandName: getColorBrandName($name);
346
- &.is-#{$brandName} {
347
- #{$property}: $color;
348
- }
349
- }
350
- }
351
-
352
- @mixin pattern-light($size, $x-pos: top, $y-pos: center) {
353
- background-size: $size;
354
- background-position: $x-pos $y-pos;
355
- }
356
-
357
- @mixin pattern-dark($size, $x-pos: top, $y-pos: center) {
358
- background: linear-gradient(#1b3650, getColor('accent'));
359
- background-size: auto, $size, auto;
360
- background-position: top left, $x-pos $y-pos, top left;
361
- }
362
-
363
- // import sass bulma
364
- @mixin input {
365
- @include control;
366
- height: 56px;
367
- background-color: getColor('background');
368
- border-color: getColor('neutral');
369
- color: getColor('font');
370
-
371
- @include placeholder {
372
- color: getColor('font') !important;
373
- filter: grayscale(100%);
374
- opacity: 1 !important;
375
- transition: all 0.2s ease-out;
376
- }
377
-
378
- @include hover();
379
- }
380
-
381
- @mixin checkbox-and-radio($type) {
382
- //TILES WRAPPER
383
- .#{$type}-tiles {
384
- display: flex;
385
- gap: 16px;
386
- flex-wrap: wrap;
387
- }
388
-
389
- //BOTH
390
- .#{$type},
391
- .#{$type}-tile {
392
- position: relative;
393
-
394
- label.#{$type}-label {
395
- cursor: pointer;
396
- font-size: 14px;
397
-
398
- &:before,
399
- &:after {
400
- content: '';
401
- position: absolute;
402
- width: 18px;
403
- height: 18px;
404
- }
405
-
406
- &:before {
407
- border: var(--border);
408
- }
409
- }
410
-
411
- input {
412
- display: none;
413
-
414
- &:checked ~ label.#{$type}-label {
415
- border-color: getColor('main');
416
-
417
- &:before {
418
- border-color: getColor('main');
419
- }
420
-
421
- &:after {
422
- background-color: getColor('main');
423
- }
424
- }
425
-
426
- &:disabled,
427
- &:disabled:checked {
428
- & ~ label.#{$type}-label {
429
- &:after {
430
- background-color: getColor('disabled-fade');
431
- }
432
- }
433
- }
434
-
435
- &:disabled {
436
- & ~ label.#{$type}-label {
437
- &:after {
438
- background-color: transparent;
439
- }
440
- }
441
- }
442
- }
443
- }
444
-
445
- // SIMPLE WITH LABEL ONLY
446
- .#{$type} {
447
- display: flex;
448
- align-items: center;
449
- margin: 6px 8px;
450
- width: fit-content;
451
-
452
- input:disabled,
453
- input:disabled:checked {
454
- & ~ label.#{$type}-label {
455
- @include disabledRulesWithoutBG;
456
- }
457
- }
458
-
459
- label.#{$type}-label {
460
- padding: 4px;
461
- padding-left: 34px;
462
-
463
- &:before,
464
- &:after {
465
- top: 50%;
466
- transform: translateY(-50%);
467
- left: 0;
468
- }
469
- }
470
-
471
- &:hover &:not(disabled) {
472
- label.#{$type}-label {
473
- &:before {
474
- @include hoverRules();
475
- }
476
- }
477
- }
478
-
479
- &:focus {
480
- border: 2px;
481
- border-color: getColor('main');
482
- }
483
- }
484
-
485
- //TILE ONLY
486
- .#{$type}-tile {
487
- position: relative;
488
- max-width: 160px;
489
- display: inline-block;
490
- text-align: center;
491
-
492
- input:disabled,
493
- input:disabled:checked {
494
- & ~ label.#{$type}-label {
495
- @include disabledRules;
496
- }
497
- }
498
-
499
- &:first-child {
500
- margin-left: 0;
501
- }
502
-
503
- &:last-child {
504
- margin-right: 0;
505
- }
506
-
507
- label.#{$type}-label {
508
- display: block;
509
- position: relative;
510
- padding: 40px 16px 16px;
511
- border: var(--border);
512
- border-radius: var(--radius);
513
- box-sizing: border-box;
514
- background-color: getColor('background');
515
-
516
- &:before {
517
- top: 16px;
518
- right: 16px;
519
- }
520
-
521
- span.#{$type}-title {
522
- font-weight: bold;
523
- width: 100%;
524
- display: block;
525
- font-size: 16px;
526
- }
527
- }
528
-
529
- input {
530
- &:not(:disabled):not(:checked) ~ label.radio-label {
531
- @include label-states;
532
- }
533
-
534
- &:not(:disabled) ~ label.checkbox-label {
535
- @include label-states;
536
- }
537
-
538
- &:checked:not(:disabled) ~ label.#{$type}-label {
539
- border-color: getColor('main');
540
- border-width: 2px;
541
- padding: 15px;
542
- padding-top: 39px;
543
-
544
- &:before {
545
- top: 15px;
546
- right: 15px;
547
- }
548
-
549
- span.#{$type}-title {
550
- color: getColor('main');
551
- }
552
- }
553
-
554
- &:disabled {
555
- & ~ label.#{$type}-label {
556
- &:before {
557
- border-color: getColor('disabled') !important;
558
- }
559
- }
560
- }
561
-
562
- &:disabled:checked ~ label.#{$type}-label {
563
- .checkbox-title {
564
- color: getColor('disabled');
565
- }
566
- }
567
- }
568
-
569
- &.is-horizontal {
570
- display: flex;
571
- justify-content: space-between;
572
- align-items: center;
573
- max-width: unset;
574
- width: 100%;
575
- position: relative;
576
-
577
- &.is-narrow {
578
- width: fit-content;
579
- }
580
-
581
- input {
582
- &:checked:not(:disabled) ~ label.#{$type}-label {
583
- padding: 15px;
584
- padding-right: 47px;
585
- }
586
-
587
- }
588
-
589
- label.#{$type}-label {
590
- width: 100%;
591
- display: flex;
592
- align-items: center;
593
- justify-content: flex-start;
594
- text-align: left;
595
- padding: 16px 48px 16px 16px;
596
-
597
- &:before,
598
- &:after {
599
- top: 50% !important;
600
- transform: translateY(-50%);
601
- }
602
- }
603
-
604
- .icon {
605
- margin-right: 16px;
606
- }
607
- }
608
- }
609
- }
610
-
611
- @mixin hoverRules {
612
- background-color: getColor('main-fade');
613
- }
614
-
615
- @mixin hover {
616
- &:hover:not(.is-disabled):not(:focus) {
617
- @include hoverRules();
618
- }
619
- &:focus:not(.is-disabled), &:focus-visible:not(.is-disabled) {
620
- border: 2px solid currentColor;
621
- }
622
- }
623
-
624
- @mixin disabledRulesWithoutBG {
625
- border-color: getColor('disabled') !important;
626
- box-shadow: none !important;
627
- color: getColor('disabled') !important;
628
- cursor: not-allowed !important;
629
- filter: grayscale(1);
630
- }
631
-
632
- @mixin disabledRules {
633
- background-color: getColor('disabled-fade') !important;
634
- @include disabledRulesWithoutBG;
635
- }