@trilogy-ds/styles 0.0.1-beta.5 → 0.0.1-beta.50

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 (87) 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 +20 -37
  8. package/framework/src/base/_loading.scss +8 -1
  9. package/framework/src/base/_reset.scss +8 -3
  10. package/framework/src/components/_accordion.scss +40 -86
  11. package/framework/src/components/_all.scss +0 -6
  12. package/framework/src/components/_breadcrumb.scss +39 -34
  13. package/framework/src/components/_card.scss +7 -78
  14. package/framework/src/components/_countdown.scss +49 -47
  15. package/framework/src/components/_divider.scss +2 -2
  16. package/framework/src/components/_fab.scss +12 -26
  17. package/framework/src/components/_level.scss +1 -1
  18. package/framework/src/components/_media.scss +2 -2
  19. package/framework/src/components/_modal.scss +167 -166
  20. package/framework/src/components/_otp.scss +9 -28
  21. package/framework/src/components/_pagination.scss +104 -133
  22. package/framework/src/components/_plus-symbol.scss +1 -1
  23. package/framework/src/components/_popover.scss +255 -255
  24. package/framework/src/components/_price.scss +196 -166
  25. package/framework/src/components/_product-tour.scss +2 -4
  26. package/framework/src/components/_range.scss +73 -72
  27. package/framework/src/components/_segmented-control.scss +37 -51
  28. package/framework/src/components/_stepper.scss +18 -142
  29. package/framework/src/components/_tabs.scss +32 -59
  30. package/framework/src/components/_timeline.scss +52 -45
  31. package/framework/src/elements/_alert.scss +5 -8
  32. package/framework/src/elements/_all.scss +1 -3
  33. package/framework/src/elements/_autocomplete.scss +32 -0
  34. package/framework/src/elements/_badge.scss +54 -59
  35. package/framework/src/elements/_box.scss +8 -115
  36. package/framework/src/elements/_button.scss +15 -133
  37. package/framework/src/elements/_checkbox.scss +21 -27
  38. package/framework/src/elements/_chips.scss +74 -83
  39. package/framework/src/elements/_dot.scss +1 -1
  40. package/framework/src/elements/_entry.scss +76 -88
  41. package/framework/src/elements/_form.scss +17 -15
  42. package/framework/src/elements/_icon.scss +3 -3
  43. package/framework/src/elements/_input-gauge.scss +32 -33
  44. package/framework/src/elements/_input-icons.scss +33 -31
  45. package/framework/src/elements/_link.scss +38 -65
  46. package/framework/src/elements/_list.scss +38 -46
  47. package/framework/src/elements/_loader.scss +1 -1
  48. package/framework/src/elements/_other.scss +2 -2
  49. package/framework/src/elements/_paragraph.scss +4 -26
  50. package/framework/src/elements/_progress.scss +12 -21
  51. package/framework/src/elements/_radio.scss +2 -2
  52. package/framework/src/elements/_select.scss +84 -301
  53. package/framework/src/elements/_sticker.scss +12 -27
  54. package/framework/src/elements/_switch.scss +85 -88
  55. package/framework/src/elements/_table.scss +173 -226
  56. package/framework/src/elements/_tag.scss +104 -105
  57. package/framework/src/elements/_textarea.scss +95 -105
  58. package/framework/src/elements/_title.scss +89 -87
  59. package/framework/src/elements/_toaster.scss +3 -4
  60. package/framework/src/grid/_columns.scss +5 -5
  61. package/framework/src/layout/_all.scss +0 -1
  62. package/framework/src/layout/_hero.scss +109 -207
  63. package/framework/src/layout/_section.scss +7 -14
  64. package/framework/src/theming/_all.scss +3 -0
  65. package/framework/src/theming/buttons_partial.scss +30 -0
  66. package/framework/src/theming/common_partials.scss +9 -0
  67. package/framework/src/theming/links_partial.scss +20 -0
  68. package/framework/src/utilities/_all.scss +3 -0
  69. package/framework/src/utilities/_background.scss +15 -0
  70. package/framework/src/utilities/_controls.scss +37 -48
  71. package/framework/src/utilities/_derived-variables.scss +3 -14
  72. package/framework/src/utilities/_initial-variables.scss +22 -26
  73. package/framework/src/utilities/_mixins.scss +481 -593
  74. package/framework/src/utilities/_pre.scss +1 -0
  75. package/package.json +3 -2
  76. package/framework/src/components/_disclaimer.scss +0 -84
  77. package/framework/src/components/_dropdown.scss +0 -128
  78. package/framework/src/components/_menu.scss +0 -213
  79. package/framework/src/components/_search-modal.scss +0 -197
  80. package/framework/src/components/_slices.scss +0 -316
  81. package/framework/src/components/_slider.scss +0 -92
  82. package/framework/src/components/_switch.scss +0 -209
  83. package/framework/src/elements/_checkradio.scss +0 -173
  84. package/framework/src/elements/_notification.scss +0 -151
  85. package/framework/src/elements/_options.scss +0 -146
  86. package/framework/src/elements/_timeline.scss +0 -283
  87. package/framework/src/layout/_toolbar.scss +0 -100
@@ -1,55 +1,57 @@
1
1
  .countdown {
2
- border: 1px solid currentcolor;
3
- border-radius: 8px;
4
- display: inline-flex;
5
- padding: $spacing-2;
6
- color: getColor('font');
2
+ border: 1px solid currentcolor;
3
+ border-radius: var(--radius);
4
+ display: inline-flex;
5
+ padding: $spacing-2;
6
+ color: getColor('font');
7
7
 
8
- .count {
9
- font-family: $family-sans-serif;
10
- font-size: $text-14;
11
- font-weight: 400;
12
- list-style-type: none;
13
- text-align: center;
14
- padding: 0 $spacing-2;
15
- position: relative;
16
-
17
- &:not(:last-child)::before {
18
- content: ' ';
19
- border-left: 1px solid currentcolor;
20
- height: 100%;
21
- position: absolute;
22
- top: 0;
23
- bottom: 0;
24
- right: 0;
25
- }
26
-
27
- .value {
28
- font-size: $text-24;
29
- font-weight: 600;
30
- }
8
+ .count {
9
+ font-family: $family-sans-serif;
10
+ font-size: $text-14;
11
+ font-weight: 400;
12
+ list-style-type: none;
13
+ text-align: center;
14
+ padding: 0 $spacing-2;
15
+ position: relative;
16
+
17
+ &:not(:last-child)::before {
18
+ content: ' ';
19
+ border-left: 1px solid currentcolor;
20
+ height: 100%;
21
+ position: absolute;
22
+ top: 0;
23
+ bottom: 0;
24
+ right: 0;
31
25
  }
32
26
 
33
- &.is-small {
34
- padding: $spacing-2 0;
35
- border-radius: 4px;
36
- .count {
37
- font-size: $text-12;
38
- padding: 0 $spacing-2;
39
- font-weight: 500;
40
-
41
- .value {
42
- font-size: $text-16;
43
- font-weight: 600;
44
- }
45
- }
27
+ .value {
28
+ font-size: $text-24;
29
+ font-weight: 600;
46
30
  }
31
+ }
32
+
33
+ &.is-small {
34
+ padding: $spacing-2 0;
35
+ border-radius: var(--radius-small);
36
+
37
+ .count {
38
+ font-size: $text-12;
39
+ padding: 0 $spacing-2;
40
+ font-weight: 500;
47
41
 
48
- &.is-inverted {
49
- color: invertColor('font');
50
- .count {
51
- &:not(:last-child)::before {
52
- }
53
- }
42
+ .value {
43
+ font-size: $text-16;
44
+ font-weight: 600;
45
+ }
46
+ }
47
+ }
48
+
49
+ &.is-inverted {
50
+ color: invertColor('font');
51
+
52
+ .count {
53
+ &:not(:last-child)::before {
54
+ }
54
55
  }
56
+ }
55
57
  }
@@ -1,7 +1,7 @@
1
1
  .divider {
2
2
  position: relative;
3
3
  text-align: center;
4
- background-color: getColor('grey');
4
+ background-color: getBGColor('hovered');
5
5
  height: 1px;
6
6
  width: 100%;
7
7
  margin: 16px 0;
@@ -13,6 +13,6 @@
13
13
  transform: translate(-50%, -50%);
14
14
  white-space: nowrap;
15
15
  padding: 0 $spacing-4;
16
- background-color: invertColor('grey');
16
+ background-color: invertColor('neutral');
17
17
  }
18
18
  }
@@ -1,30 +1,29 @@
1
1
  .fab {
2
- background-color: getColor('alternate');
3
- border: 1px getColor('alternate');
2
+ background-color: getColor('font');
4
3
  border-radius: 16px;
5
4
  cursor: pointer;
6
5
  height: 56px;
7
- color: white;
8
6
  padding: $spacing-4;
9
7
  display: inline-flex;
10
8
  align-items: center;
11
9
  box-sizing: border-box;
12
10
  transition: 0.4s;
13
-
14
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
15
-
11
+ color: transparent;
12
+ letter-spacing: -9px;
13
+ border: 0;
14
+ box-shadow: 0px 3px 6px 0px #00000033;
16
15
  font-style: normal;
17
16
  font-weight: 600;
18
- font-size: 0;
17
+ font-size: medium;
19
18
  line-height: 20px;
20
19
 
21
20
  z-index: 9;
22
21
 
23
- &:hover, &.is-extended {
24
- background-color: getVariantColor('alternate',1);
25
- border-color:getVariantColor('alternate',2);
26
- transition: 0.5s;
27
- font-size: initial;
22
+ #{$hoverSelector}, &.is-extended, &:focus, &:focus-visible, &:focus-within {
23
+ background-color: getColor('hovered');
24
+ transition-duration: 0.5s;
25
+ letter-spacing: initial;
26
+ color: white;
28
27
 
29
28
  .icon,
30
29
  .icon .is-small,
@@ -34,20 +33,8 @@
34
33
  }
35
34
  }
36
35
 
37
- &:focus, &:focus-visible, &:focus-within {
38
- background-color:getVariantColor('alternate', 4);
39
- border-color: getVariantColor('alternate', 4);
40
- outline: 1px auto getVariantColor('alternate', 4);
41
- }
42
-
43
36
  &:active {
44
- background-color: getVariantColor('alternate', 5);
45
- border-color: getVariantColor('alternate', 5);
46
- }
47
-
48
- .disabled {
49
- background-color: getColor('bg-disabled');
50
- color: getColor('grey-disabled');
37
+ background-color: getColor('hovered');
51
38
  }
52
39
 
53
40
  .icon {
@@ -56,5 +43,4 @@
56
43
  margin-right: -6px;
57
44
  color: white;
58
45
  }
59
-
60
46
  }
@@ -5,7 +5,7 @@
5
5
  justify-content: space-between;
6
6
 
7
7
  code {
8
- border-radius: $radius;
8
+ border-radius: var(--radius);
9
9
  }
10
10
 
11
11
  img {
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  .media {
11
- border-top: 1px solid getColor('grey-lighter');
11
+ border-top: 1px solid getBGColor('neutral');
12
12
  display: flex;
13
13
  padding-top: 7.5px;
14
14
 
@@ -27,7 +27,7 @@
27
27
  }
28
28
 
29
29
  & + .media {
30
- border-top: 1px solid getColor('grey-lighter');
30
+ border-top: 1px solid getBGColor('neutral');
31
31
  margin-top: 10px;
32
32
  padding-top: 10px;
33
33
  }
@@ -2,200 +2,201 @@ $modal-content-width: 640px !default;
2
2
  $modal-content-margin-mobile: 20px !default;
3
3
  $modal-close-dimensions: 40px !default;
4
4
  $modal-dimensions: (
5
- 'xsmall': 40vw,
6
- 'small': 50vw,
7
- 'medium': 60vw,
8
- 'large': 70vw,
9
- 'xlarge': 80vw
5
+ 'xsmall': 40vw,
6
+ 'small': 50vw,
7
+ 'medium': 60vw,
8
+ 'large': 70vw,
9
+ 'xlarge': 80vw
10
10
  );
11
11
 
12
12
  body:has(.modal.is-active) {
13
- height: 100%;
14
- overflow: hidden
13
+ height: 100%;
14
+ overflow: hidden
15
15
  }
16
16
 
17
17
  .modal {
18
+ @include overlay;
19
+
20
+ position: fixed;
21
+ z-index: zindex('modal');
22
+ overflow: hidden;
23
+ display: flex;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ justify-content: flex-end;
27
+ visibility: hidden;
28
+ opacity: 0;
29
+ transition: opacity 250ms ease-in-out,
30
+ visibility 0ms linear 250ms;
31
+
32
+ // overlay
33
+ &::after {
18
34
  @include overlay;
19
35
 
20
- position: fixed;
21
- z-index: zindex('modal');
22
- overflow: hidden;
23
- display: flex;
24
- flex-direction: column;
25
- align-items: center;
26
- justify-content: flex-end;
27
- visibility: hidden;
28
- opacity: 0;
29
- transition:
30
- opacity 250ms ease-in-out,
31
- visibility 0ms linear 250ms;
32
-
33
- // overlay
34
- &::after {
35
- @include overlay;
36
+ content: '';
37
+ background-color: rgba(#000, 0.86);
38
+ }
39
+
40
+ &.is-active {
41
+ opacity: 1;
42
+ visibility: inherit;
43
+ transition: opacity 250ms ease-in-out,
44
+ visibility 0ms linear;
36
45
 
37
- content: '';
38
- background-color: rgba(#000, 0.86);
46
+ .modal-content {
47
+ transform: translateY(0);
39
48
  }
49
+ }
40
50
 
41
- &.is-active {
42
- opacity: 1;
43
- visibility: inherit;
44
- transition:
45
- opacity 250ms ease-in-out,
46
- visibility 0ms linear;
51
+ // gestion des tailles
52
+ @include tablet {
53
+ justify-content: center;
54
+ @each $dimension in $dimensions-extended {
55
+ &.is-#{$dimension} {
47
56
  .modal-content {
48
- transform: translateY(0);
57
+ width: map-get($modal-dimensions, $dimension);
49
58
  }
59
+ }
60
+ }
61
+ }
62
+
63
+ // spécificité pour le bouton en position: relative par défaut
64
+ .button {
65
+ position: static;
66
+ }
67
+
68
+ .modal-content {
69
+ background-color: getColor('background');
70
+ border-radius: var(--radius) var(--radius) 0 0;
71
+ color: getColor('font');
72
+ overflow: auto;
73
+ position: relative;
74
+ padding: 0 30px 30px;
75
+ margin: 0 $modal-content-margin-mobile;
76
+ max-height: calc(100vh - 40px);
77
+ text-align: center;
78
+ width: 100%;
79
+ z-index: zindex('tiny');
80
+ transition: transform ease-in-out 250ms;
81
+ transform: translateY(100%);
82
+
83
+ &:has(.modal-footer) {
84
+ padding-bottom: 0;
50
85
  }
51
86
 
52
- // gestion des tailles
53
87
  @include tablet {
54
- justify-content: center;
55
- @each $dimension in $dimensions-extended {
56
- &.is-#{$dimension} {
57
- .modal-content {
58
- width: map-get($modal-dimensions, $dimension);
59
- }
60
- }
61
- }
88
+ max-height: calc(100vh - 120px);
89
+ width: $modal-content-width;
90
+ border-radius: $radius;
62
91
  }
63
92
 
64
- // spécificité pour le bouton en position: relative par défaut
65
- .button {
66
- position: static;
93
+ // Annulation des propriétés du composant box, se trouvant dans une modal
94
+ > .box {
95
+ background-color: transparent;
96
+ border-radius: 0;
97
+ box-shadow: none;
98
+ padding: 0;
99
+ max-height: inherit;
100
+
101
+ .box-content {
102
+ background-color: transparent;
103
+ border-radius: 0;
104
+ padding: 0;
105
+ padding-bottom: 30px;
106
+ margin: 0;
107
+ text-align: inherit;
108
+ }
67
109
  }
68
110
 
69
- // ancien overlay : n'a plus d'utilité mais conservée pour rétrocompatibilité
70
- .modal-background {
71
- display: none;
111
+ .modal-footer {
112
+ position: sticky;
113
+ width: 100%;
114
+ background: getColor('background');
115
+ bottom: 0;
116
+ padding: 16px;
72
117
  }
73
118
 
74
- .modal-content {
75
- background-color: getColor('background');
76
- border-radius: $radius $radius 0 0;
77
- color: getColor('font');
78
- overflow: auto;
79
- position: relative;
80
- padding: 0 30px 30px;
81
- margin: 0 $modal-content-margin-mobile;
82
- max-height: calc(100vh - 40px);
83
- text-align: center;
84
- width: 100%;
85
- z-index: zindex('tiny');
86
- transition: transform ease-in-out 250ms;
87
- transform: translateY(100%);
88
-
89
- &.is-fullwidth {
90
- width: 100% !important;
91
- }
92
-
93
- @include tablet {
94
- max-height: calc(100vh - 120px);
95
- width: $modal-content-width;
96
- border-radius: $radius;
97
- }
98
-
99
- // Annulation des propriétés du composant box, se trouvant dans une modal
100
- > .box {
101
- background-color: transparent;
102
- border-radius: 0;
103
- box-shadow: none;
104
- padding: 0;
105
- max-height: inherit;
106
-
107
- .box-content {
108
- background-color: transparent;
109
- border-radius: 0;
110
- padding: 0;
111
- padding-bottom: 30px;
112
- margin: 0;
113
- text-align: inherit;
114
- }
115
- }
116
-
117
- .modal-footer {
118
- position: sticky;
119
- background: getColor('background');
120
- bottom: -30px;
121
- margin: 30px -30px -30px;
122
- padding: 20px 30px;
123
- }
124
-
125
- // If Close Icon Modal & Title Modal are sibling elements, override margin
126
- .modal-close ~ .modal-title {
127
- margin-top: -32px;
128
- }
119
+ // If Close Icon Modal & Title Modal are sibling elements, override margin
120
+ .modal-close ~ .modal-title {
121
+ margin-top: -32px;
122
+ }
123
+ }
124
+
125
+ .modal-close {
126
+ @include delete;
127
+
128
+ background-color: getColor('background');
129
+ position: sticky;
130
+ top: 20px;
131
+ left: 100%;
132
+ display: block;
133
+ height: $modal-close-dimensions;
134
+ width: $modal-close-dimensions;
135
+ z-index: zindex('medium');
136
+
137
+ #{$hoverSelector} {
138
+ background-color: getBGColor('neutral');
129
139
  }
130
140
 
131
- .modal-close {
132
- @include delete;
133
-
134
- background-color: getColor('background');
135
- position: sticky;
136
- top: 20px;
137
- left: 100%;
138
- display: block;
139
- height: $modal-close-dimensions;
140
- width: $modal-close-dimensions;
141
- z-index: zindex('medium');
142
-
143
- &:hover {
144
- background-color: getColor('grey-light');
145
- }
146
-
147
- &::after,
148
- &::before {
149
- background-color: getColor('font');
150
- }
141
+ &::after,
142
+ &::before {
143
+ background-color: getColor('font');
151
144
  }
145
+ }
146
+
147
+ .modal-title {
148
+ color: getColor('font');
149
+ font-family: $family-sans-serif;
150
+ font-size: $size-3;
151
+ font-weight: $weight-semibold;
152
+ line-height: 1.1;
153
+ background-color: getColor('background');
154
+ z-index: zindex('small');
155
+ position: sticky;
156
+ top: 0;
157
+ padding: 20px 0;
158
+ width: 100%;
159
+ word-wrap: break-word;
160
+
161
+ @include desktop {
162
+ font-size: $size-3-desktop;
163
+ }
164
+ }
152
165
 
153
- .modal-title {
154
- color: getColor('font');
155
- font-family: $family-sans-serif;
156
- font-size: $size-3;
157
- font-weight: $weight-semibold;
158
- line-height: 1.1;
159
- background-color: getColor('background');
160
- z-index: zindex('small');
161
- position: sticky;
162
- top: 0;
163
- padding: 20px 0;
164
- width: 100%;
165
- word-wrap: break-word;
166
-
167
- @include desktop {
168
- font-size: $size-3-desktop;
169
- }
166
+ // version "panel" de la modal
167
+ &.is-panel {
168
+ &::after {
169
+ position: fixed;
170
170
  }
171
171
 
172
- // version "panel" de la modal
173
- &.is-panel {
174
- &::after {
175
- position: fixed;
176
- }
172
+ .modal-content {
173
+ border-radius: 0;
174
+ position: fixed;
175
+ right: 0;
176
+ top: 0;
177
+ min-height: 100%;
178
+ height: 100%;
179
+ max-height: none;
180
+ margin: 0;
181
+ text-align: left;
182
+ display: flex;
183
+ flex-direction: column;
184
+ align-items: flex-start;
185
+ transform: translateX(100%);
186
+
187
+ @include tablet {
188
+ max-width: 375px;
189
+ }
190
+
191
+ .modal-footer {
192
+ margin-top: auto;
193
+ }
194
+ }
177
195
 
178
- .modal-content {
179
- border-radius: 0;
180
- position: fixed;
181
- right: 0;
182
- top: 0;
183
- min-height: 100%;
184
- height: 100%;
185
- max-height: none;
186
- margin: 0;
187
- text-align: left;
188
- display: flex;
189
- flex-direction: column;
190
- align-items: flex-start;
191
-
192
- @include tablet {
193
- max-width: 375px;
194
- }
195
-
196
- .modal-footer {
197
- margin-top: auto;
198
- }
199
- }
196
+ &.is-active {
197
+ .modal-content {
198
+ transform: translateX(0);
199
+ }
200
200
  }
201
+ }
201
202
  }
@@ -3,15 +3,17 @@
3
3
  flex-wrap: nowrap;
4
4
 
5
5
  .otp {
6
+ @include hover();
6
7
  outline: none;
7
8
  border: 1px solid currentColor;
8
- border-radius: 4px;
9
+ border-radius: var(--radius-small);
9
10
  background: transparent;
10
11
  width: 33px;
11
12
  height: 40px;
12
13
  margin: 4px 4px 0 4px;
13
14
  text-align: center;
14
- color: getColor('grey');
15
+ color: getColor('neutral');
16
+
15
17
  &:first-child {
16
18
  margin: 4px 4px 0 0;
17
19
  }
@@ -24,13 +26,7 @@
24
26
 
25
27
  &.is-danger {
26
28
  .otp {
27
- border: 2px solid getColor('error');
28
- }
29
- }
30
-
31
- &.is-tertiary {
32
- .otp {
33
- border: 2px solid getColor('font');
29
+ border: 1px solid getColor('error');
34
30
  }
35
31
  }
36
32
 
@@ -42,7 +38,7 @@
42
38
 
43
39
  &.is-focus {
44
40
  .otp {
45
- border: 2px solid getColor('alternate');;
41
+ border: 1px solid getColor('font');;
46
42
  color: getColor('font')
47
43
  }
48
44
  }
@@ -50,38 +46,23 @@
50
46
 
51
47
  &.is-error {
52
48
  .otp {
53
- border: 2px solid getColor('error');
49
+ border: 1px solid getColor('error');
54
50
  color: getColor('font')
55
51
  }
56
52
  }
57
53
 
58
- &.is-tertiary {
59
- .otp {
60
- border: 2px solid getColor('font');
61
- }
62
- }
63
-
64
- &.is-disabled {
65
- .otp {
66
- border: none !important;
67
- background: getColor('grey-disabled');
68
- pointer-events: none;
69
- color: getColor('grey');
70
- }
71
- }
72
-
73
54
  }
74
55
 
75
56
  .otp-list:focus-within {
76
57
  .otp {
77
- border: 2px solid getColor('alternate');;
58
+ border: 1px solid getColor('font');;
78
59
  color: getColor('font');
79
60
  }
80
61
  }
81
62
 
82
63
  .otp-list.is-error:focus-within {
83
64
  .otp {
84
- border: 2px solid getColor('error');
65
+ border: 1px solid getColor('error');
85
66
  color: getColor('font');
86
67
  }
87
68
  }