@trilogy-ds/styles 0.0.1-beta-4 → 0.0.1-beta.11

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 (86) hide show
  1. package/README.md +47 -0
  2. package/dist/default/trilogy-mangled.css +1 -1
  3. package/dist/default/trilogy-partials.css +1 -1
  4. package/dist/default/trilogy.css +1 -1
  5. package/framework/src/base/_color.scss +14 -36
  6. package/framework/src/base/_generic.scss +4 -1
  7. package/framework/src/base/_helpers.scss +10 -29
  8. package/framework/src/base/_loading.scss +7 -0
  9. package/framework/src/components/_accordion.scss +15 -36
  10. package/framework/src/components/_all.scss +0 -3
  11. package/framework/src/components/_breadcrumb.scss +39 -34
  12. package/framework/src/components/_card.scss +6 -5
  13. package/framework/src/components/_countdown.scss +49 -47
  14. package/framework/src/components/_disclaimer.scss +6 -5
  15. package/framework/src/components/_divider.scss +2 -2
  16. package/framework/src/components/_dropdown.scss +95 -101
  17. package/framework/src/components/_fab.scss +6 -21
  18. package/framework/src/components/_media.scss +2 -2
  19. package/framework/src/components/_modal.scss +172 -166
  20. package/framework/src/components/_otp.scss +9 -28
  21. package/framework/src/components/_pagination.scss +109 -131
  22. package/framework/src/components/_plus-symbol.scss +1 -1
  23. package/framework/src/components/_popover.scss +1 -4
  24. package/framework/src/components/_price.scss +118 -169
  25. package/framework/src/components/_product-tour.scss +1 -3
  26. package/framework/src/components/_segmented-control.scss +39 -51
  27. package/framework/src/components/_slider.scss +70 -70
  28. package/framework/src/components/_stepper.scss +16 -140
  29. package/framework/src/components/_tabs.scss +32 -55
  30. package/framework/src/components/_timeline.scss +49 -42
  31. package/framework/src/elements/_alert.scss +4 -5
  32. package/framework/src/elements/_all.scss +0 -2
  33. package/framework/src/elements/_badge.scss +54 -59
  34. package/framework/src/elements/_box.scss +5 -23
  35. package/framework/src/elements/_button.scss +29 -129
  36. package/framework/src/elements/_checkbox.scss +21 -27
  37. package/framework/src/elements/_chips.scss +76 -81
  38. package/framework/src/elements/_entry.scss +73 -89
  39. package/framework/src/elements/_form.scss +15 -15
  40. package/framework/src/elements/_input-gauge.scss +36 -32
  41. package/framework/src/elements/_link.scss +47 -62
  42. package/framework/src/elements/_list.scss +0 -36
  43. package/framework/src/elements/_notification.scss +2 -3
  44. package/framework/src/elements/_other.scss +1 -1
  45. package/framework/src/elements/_paragraph.scss +4 -26
  46. package/framework/src/elements/_progress.scss +9 -18
  47. package/framework/src/elements/_radio.scss +1 -1
  48. package/framework/src/elements/_select.scss +209 -245
  49. package/framework/src/elements/_sticker.scss +8 -9
  50. package/framework/src/elements/_switch.scss +85 -88
  51. package/framework/src/elements/_table.scss +11 -72
  52. package/framework/src/elements/_tag.scss +104 -104
  53. package/framework/src/elements/_textarea.scss +92 -106
  54. package/framework/src/elements/_title.scss +86 -84
  55. package/framework/src/elements/_toaster.scss +2 -3
  56. package/framework/src/grid/_columns.scss +5 -5
  57. package/framework/src/layout/_hero.scss +129 -211
  58. package/framework/src/layout/_section.scss +3 -3
  59. package/framework/src/layout/_toolbar.scss +6 -6
  60. package/framework/src/utilities/_controls.scss +37 -39
  61. package/framework/src/utilities/_derived-variables.scss +3 -14
  62. package/framework/src/utilities/_initial-variables.scss +38 -23
  63. package/framework/src/utilities/_mixins.scss +523 -582
  64. package/package.json +4 -3
  65. package/framework/src/components/_menu.scss +0 -213
  66. package/framework/src/components/_search-modal.scss +0 -197
  67. package/framework/src/components/_slices.scss +0 -316
  68. package/framework/src/components/_switch.scss +0 -209
  69. package/framework/src/elements/_checkradio.scss +0 -173
  70. package/framework/src/elements/_options.scss +0 -146
  71. package/framework/src/elements/_timeline.scss +0 -283
  72. /package/dist/default/assets/icons/all/{all/alert.svg → alert.svg} +0 -0
  73. /package/dist/default/assets/icons/all/{all/arrow-down.svg → arrow-down.svg} +0 -0
  74. /package/dist/default/assets/icons/all/{all/arrow-left.svg → arrow-left.svg} +0 -0
  75. /package/dist/default/assets/icons/all/{all/arrow-right.svg → arrow-right.svg} +0 -0
  76. /package/dist/default/assets/icons/all/{all/arrow-up.svg → arrow-up.svg} +0 -0
  77. /package/dist/default/assets/icons/all/{all/bell.svg → bell.svg} +0 -0
  78. /package/dist/default/assets/icons/all/{all/check-circle.svg → check-circle.svg} +0 -0
  79. /package/dist/default/assets/icons/all/{all/check.svg → check.svg} +0 -0
  80. /package/dist/default/assets/icons/all/{all/exclamation-circle.svg → exclamation-circle.svg} +0 -0
  81. /package/dist/default/assets/icons/all/{all/eye-slash.svg → eye-slash.svg} +0 -0
  82. /package/dist/default/assets/icons/all/{all/eye.svg → eye.svg} +0 -0
  83. /package/dist/default/assets/icons/all/{all/infos-circle.svg → infos-circle.svg} +0 -0
  84. /package/dist/default/assets/icons/all/{all/search.svg → search.svg} +0 -0
  85. /package/dist/default/assets/icons/all/{all/times.svg → times.svg} +0 -0
  86. /package/dist/default/assets/icons/all/{all/trash.svg → trash.svg} +0 -0
@@ -1,125 +1,111 @@
1
1
  .textarea-wrapper {
2
- position: relative;
3
- margin: 16px 0;
2
+ position: relative;
3
+ margin: 16px 0;
4
4
 
5
- textarea.textarea {
6
- padding: $spacing-4;
7
- border-radius: 4px;
8
- outline: none;
5
+ textarea.textarea {
6
+ padding: $spacing-4;
7
+ border-radius: $radius-small;
8
+ outline: none;
9
9
 
10
- &::placeholder {
11
- font-size: 16px;
12
- }
13
-
14
- &.has-dynamic-label {
15
- &.has-icon ~ label {
16
- left: $spacing-9;
17
- margin-right: 2px;
18
- width: calc(100% - 96px - 2px);
19
- }
20
-
21
- ~ label {
22
- visibility: visible;
23
- position: absolute;
24
- top: 2px;
25
- left: $spacing-4;
26
- padding-top: $spacing-2;
27
- width: calc(100% - 28px - 2px);
28
- font-size: 12px;
29
- color: getColor('grey');
30
- transition: top 0.2s ease-out;
31
- background-color: getColor('background');
32
- }
33
-
34
- &:placeholder-shown {
35
- ~ label {
36
- visibility: hidden;
37
- top: $spacing-4;
38
- background-color: getColor('background');
39
- transition: none;
40
- }
41
- }
42
-
43
- &:not(:placeholder-shown) {
44
- padding-top: $spacing-5;
45
- }
46
- }
47
-
48
- &:disabled {
49
- background-color: getColor('grey-disabled');
50
- border-color: getColor('grey-disabled');
51
- color: getColor('grey-dark');
10
+ &::placeholder {
11
+ font-size: 16px;
12
+ }
52
13
 
53
- &::placeholder {
54
- color: black;
55
- }
14
+ &.has-dynamic-label {
15
+ &.has-icon ~ label {
16
+ left: $spacing-9;
17
+ margin-right: 2px;
18
+ width: calc(100% - 98px);
19
+ }
56
20
 
57
- & ~ span.icon {
58
- color: getColor('grey');
59
- }
21
+ ~ label {
22
+ visibility: visible;
23
+ position: absolute;
24
+ top: 2px;
25
+ left: $spacing-4;
26
+ padding-top: $spacing-2;
27
+ width: calc(100% - 28px - 2px);
28
+ font-size: 12px;
29
+ color: getColor('neutral');
30
+ transition: top 0.2s ease-out;
31
+ }
32
+
33
+ &:placeholder-shown {
34
+ ~ label {
35
+ visibility: hidden;
36
+ top: $spacing-4;
37
+ background-color: getColor('background');
38
+ transition: none;
60
39
  }
40
+ }
61
41
 
62
- &.has-icon {
63
- padding-left: $spacing-9;
64
- padding-right: $spacing-9;
65
-
66
- &:hover,
67
- &:focus,
68
- &:focus-visible {
69
- padding-left: 55px;
70
- padding-right: 55px;
71
- }
72
- }
42
+ &:not(:placeholder-shown) {
43
+ padding-top: $spacing-5;
44
+ }
73
45
  }
74
46
 
75
- label {
76
- font-size: 16px;
77
- }
47
+ &.has-icon {
48
+ padding-left: $spacing-9;
49
+ padding-right: $spacing-9;
78
50
 
79
- span.icon {
80
- position: absolute;
81
- top: $spacing-4;
51
+ #{$hoverSelector},
52
+ &:focus,
53
+ &:focus-visible {
54
+ padding-left: 55px;
55
+ padding-right: 55px;
56
+ }
57
+ }
58
+ }
82
59
 
83
- &:first-of-type {
84
- left: $spacing-4;
85
- }
60
+ label {
61
+ font-size: 16px;
62
+ }
86
63
 
87
- &:nth-of-type(2) {
88
- right: $spacing-4;
89
- }
90
- }
64
+ span.icon {
65
+ position: absolute;
66
+ top: $spacing-4;
91
67
 
92
- // Colors
93
- @each $name, $pair in $colors-brand-funcionnal {
94
- $color: getColor($name);
95
- $color-invert: invertColor($name);
96
- $brandName: getColorBrandName($name);
97
- &.is-#{$brandName} {
98
- textarea.textarea {
99
- border-color: $color;
100
- &:active,
101
- &:focus,
102
- &:focus-visible {
103
- &:not(:placeholder-shown) {
104
- padding-top: 29px;
105
- }
106
- }
107
- }
108
-
109
- span.icon:nth-of-type(2) {
110
- color: $color;
111
- }
112
- }
68
+ &:first-of-type {
69
+ left: $spacing-4;
113
70
  }
114
71
 
115
- .counter {
116
- position: absolute;
117
- bottom: $spacing-2;
118
- right: $spacing-4;
119
- font-size: 10px;
72
+ &:nth-of-type(2) {
73
+ right: $spacing-4;
120
74
  }
75
+ }
76
+
77
+ // Colors
78
+ @each $name, $pair in $colors-brand-funcionnal {
79
+ $color: getColor($name);
80
+ $color-invert: invertColor($name);
81
+ $brandName: getColorBrandName($name);
82
+ &.is-#{$brandName} {
83
+ textarea.textarea {
84
+ border-color: $color;
85
+
86
+ &:active,
87
+ &:focus,
88
+ &:focus-visible {
89
+ &:not(:placeholder-shown) {
90
+ padding-top: 29px;
91
+ }
92
+ }
93
+ }
121
94
 
122
- .help ~ .counter {
123
- bottom: $spacing-6;
95
+ span.icon:nth-of-type(2) {
96
+ color: $color;
97
+ }
124
98
  }
99
+ }
100
+
101
+ .counter {
102
+ position: absolute;
103
+ bottom: $spacing-2;
104
+ right: $spacing-4;
105
+ font-size: 10px;
106
+ }
107
+
108
+ .help ~ .counter {
109
+ bottom: $spacing-6;
110
+ }
125
111
  }
@@ -38,102 +38,104 @@ $title-levels-mobile: (
38
38
  .title,
39
39
  .subtitle,
40
40
  .overline {
41
- word-break: break-word;
41
+ word-break: break-word;
42
42
 
43
- em,
44
- span {
45
- font-weight: inherit;
46
- }
43
+ em,
44
+ span {
45
+ font-weight: inherit;
46
+ }
47
47
 
48
- .tag {
49
- vertical-align: middle;
50
- }
48
+ .tag {
49
+ vertical-align: middle;
50
+ }
51
51
  }
52
52
 
53
53
  .title {
54
- font-size: $text-32;
55
- font-weight: $title-weight;
56
- line-height: $title-line-height;
57
-
58
- // new typography
59
- @each $title-level in $title-levels {
60
- $i: index($title-levels, $title-level);
61
- $font-size: nth($title-level, 1);
62
- $line-height: nth($title-level, 2);
63
- $font-family: nth($title-level, 3);
64
-
65
- &.is-level-#{$i} {
66
- font-size: $font-size;
67
- line-height: $line-height;
68
- font-family: $font-family;
69
- }
70
-
71
- &.is-medium {
72
- font-weight: $weight-medium;
73
- }
74
-
75
- &.is-inverted {
76
- color: getColor('background');
77
- }
78
-
79
- .details {
80
- font-size: 80%;
81
- color: getColor('grey');
82
- font-weight: $weight-normal;
83
- }
84
-
85
- &.is-section-title {
86
- text-align: center;
87
- }
88
-
89
- @include tablet {
90
- font-size: $text-40;
91
- }
92
-
93
- sup {
94
- top: -0.5em;
95
- font-size: $title-sup-size;
96
- }
97
-
98
- sub {
99
- bottom: -0.5em;
100
- font-size: $title-sub-size;
101
- }
102
-
103
- &.is-centered {
104
- text-align: center;
105
- }
54
+ font-size: $text-32;
55
+ font-weight: $title-weight;
56
+ line-height: $title-line-height;
57
+
58
+ // new typography
59
+ @each $title-level in $title-levels {
60
+ $i: index($title-levels, $title-level);
61
+ $font-size: nth($title-level, 1);
62
+ $line-height: nth($title-level, 2);
63
+ $font-family: nth($title-level, 3);
64
+
65
+ &.is-level-#{$i} {
66
+ font-size: $font-size;
67
+ line-height: $line-height;
68
+ font-family: $font-family;
106
69
  }
107
70
 
108
- @include mobile {
109
- @each $title-level-mobile in $title-levels-mobile {
110
- $i: index($title-levels-mobile, $title-level-mobile);
111
- $font-size-mobile: nth($title-level-mobile, 1);
112
- $line-height-mobile: nth($title-level-mobile, 2);
113
- &.is-level-#{$i} {
114
- font-size: $font-size-mobile;
115
- line-height: $line-height-mobile;
116
- }
117
- }
71
+ &.is-medium {
72
+ font-weight: $weight-medium;
118
73
  }
119
- }
120
74
 
121
- .subtitle {
122
- color: getColor('alternate');
123
- font-size: $subtitle-size;
124
- font-weight: $subtitle-weight;
125
- line-height: $subtitle-line-height;
126
75
  &.is-inverted {
127
- color: getColor('background');
76
+ color: getColor('background');
77
+ }
78
+
79
+ .details {
80
+ font-size: 80%;
81
+ color: getColor('neutral');
82
+ font-weight: $weight-normal;
83
+ }
84
+
85
+ &.is-section-title {
86
+ text-align: center;
87
+ }
88
+
89
+ @include tablet {
90
+ font-size: $text-40;
91
+ }
92
+
93
+ sup {
94
+ top: -0.5em;
95
+ font-size: $title-sup-size;
96
+ }
97
+
98
+ sub {
99
+ bottom: -0.5em;
100
+ font-size: $title-sub-size;
101
+ }
102
+
103
+ &.is-centered {
104
+ text-align: center;
105
+ }
106
+ }
107
+
108
+ @include mobile {
109
+ @each $title-level-mobile in $title-levels-mobile {
110
+ $i: index($title-levels-mobile, $title-level-mobile);
111
+ $font-size-mobile: nth($title-level-mobile, 1);
112
+ $line-height-mobile: nth($title-level-mobile, 2);
113
+ &.is-level-#{$i} {
114
+ font-size: $font-size-mobile;
115
+ line-height: $line-height-mobile;
116
+ }
128
117
  }
118
+ }
119
+ }
120
+
121
+ .subtitle {
122
+ color: getColor('font');
123
+ font-size: $subtitle-size;
124
+ font-weight: $subtitle-weight;
125
+ line-height: $subtitle-line-height;
126
+
127
+ &.is-inverted {
128
+ color: getColor('background');
129
+ }
129
130
  }
130
131
 
131
132
  .overline {
132
- color: getColor('alternate');
133
- font-size: $overline-size;
134
- font-weight: $overline-weight;
135
- line-height: $overline-line-height;
136
- &.is-inverted {
137
- color: getColor('background');
138
- }
133
+ color: getColor('font');
134
+ font-size: $overline-size;
135
+ font-weight: $overline-weight;
136
+ line-height: $overline-line-height;
137
+
138
+ &.is-inverted {
139
+ color: getColor('background');
140
+ }
139
141
  }
@@ -62,10 +62,9 @@ a.toaster {
62
62
  background: transparent;
63
63
  }
64
64
 
65
- @each $name, $pair in $colors-feedback {
66
- $bg-color: nth($pair, 1);
65
+ @each $name in $colors-feedback {
67
66
  &.is-#{$name} {
68
- background-color: getColor($bg-color);
67
+ background-color: getBGColor($name);
69
68
  border: 2px solid getColor($name);
70
69
 
71
70
  .icon {
@@ -772,7 +772,7 @@
772
772
  scroll-behavior: smooth;
773
773
  scroll-snap-type: x mandatory;
774
774
 
775
- >.column {
775
+ > .column {
776
776
  scroll-snap-align: start;
777
777
  }
778
778
 
@@ -781,14 +781,14 @@
781
781
  }
782
782
 
783
783
  &::-webkit-scrollbar-track {
784
- background-color: getColor('grey-disabled');
785
- border-radius: 8px;
784
+ background-color: getColor('disabled');
785
+ border-radius: $radius;
786
786
  margin: 0 8px;
787
787
  }
788
788
 
789
789
  &::-webkit-scrollbar-thumb {
790
- background: getColor('alternate');
791
- border-radius: 8px;
790
+ background: getColor('main');
791
+ border-radius: $radius;
792
792
  }
793
793
  }
794
794