@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
@@ -20,249 +20,151 @@ $overlap: 30px;
20
20
  $overlap-desktop: 30px;
21
21
 
22
22
  .hero {
23
- align-items: stretch;
24
- background-color: getColor('background');
25
- display: flex;
26
- flex-direction: column;
27
- justify-content: space-between;
23
+ align-items: stretch;
24
+ background-color: getColor('background');
25
+ display: flex;
26
+ flex-direction: column;
27
+ justify-content: space-between;
28
+ position: relative;
29
+
30
+ .hero-body {
31
+ flex-grow: 1;
32
+ flex-shrink: 0;
28
33
  position: relative;
34
+ display: flex;
35
+ flex-wrap: wrap;
36
+ align-items: center;
37
+ padding: 20px;
29
38
 
30
- .hero-body {
31
- flex-grow: 1;
32
- flex-shrink: 0;
33
- position: relative;
34
- display: flex;
35
- flex-wrap: wrap;
36
- align-items: center;
37
- padding: 20px;
39
+ @include desktop {
40
+ padding: 30px 20px;
41
+ }
38
42
 
39
- @include desktop {
40
- padding: 30px 20px;
41
- }
43
+ > .container {
44
+ flex: 1;
45
+ flex-basis: 100%;
46
+ }
42
47
 
43
- .hero-back {
44
- position: relative;
45
- flex-basis: 100%;
46
- opacity: .7;
47
- margin-bottom: 20px;
48
- min-width: 100%;
49
- padding-left: 26px;
50
- transition: opacity 300ms linear;
48
+ .title {
49
+ font-size: 24px;
51
50
 
52
- &::before {
53
- @include arrow(inherit);
51
+ @include desktop {
52
+ font-size: 36px;
53
+ }
54
+ }
55
+ }
54
56
 
55
- transform: rotate(90deg);
56
- top: 0;
57
- bottom: 0;
58
- left: 5px;
59
- width: 11px;
60
- height: 6px;
61
- font-size: 12px;
62
- margin: auto;
63
- }
57
+ &.is-overlapped {
58
+ .hero-body {
59
+ padding-bottom: 50px;
60
+ }
64
61
 
65
- &:hover {
66
- opacity: 1;
67
- }
68
- }
62
+ + .section {
63
+ @include mobile {
64
+ margin-left: -$hero-padding-y;
65
+ margin-right: -$hero-padding-y;
69
66
 
70
- > .container {
71
- flex: 1;
72
- flex-basis: 100%;
67
+ .box {
68
+ box-shadow: none;
69
+ //@todo need confirmation
70
+ border-radius: 24px 24px 0 0;
71
+ overflow: hidden;
73
72
  }
73
+ }
74
74
 
75
- .title {
76
- font-size: 24px;
75
+ > .container {
76
+ margin-top: -$hero-padding-y - $overlap;
77
77
 
78
- @include desktop {
79
- font-size: 36px;
80
- }
78
+ @include desktop {
79
+ margin-top: -$hero-padding-desktop-y - $overlap-desktop;
81
80
  }
82
- }
81
+ }
83
82
 
84
- &.has-pattern-dark,
85
- &.is-instit {
86
- @include pattern-dark(105%, 50%, 35%);
83
+ &.is-small {
84
+ > .container {
85
+ margin-top: -$hero-padding-small-y - $overlap;
87
86
 
88
- p,
89
- strong,
90
- .paragraph,
91
- .suptitle,
92
- .title,
93
- .subtitle,
94
- a:not(.button):not(.tag) {
95
- color: getColor('background');
87
+ @include desktop {
88
+ margin-top: -$hero-padding-desktop-small-y - $overlap-desktop;
89
+ }
96
90
  }
91
+ }
97
92
 
98
- .subtitle {
99
- strong,
100
- a:not(.button) {
101
- color: getColor('background');
102
- }
103
- }
104
- }
93
+ &.is-medium {
94
+ > .container {
95
+ margin-top: -$hero-padding-medium-y - $overlap;
105
96
 
106
- &.is-overlapped {
107
- .hero-body {
108
- padding-bottom: 50px;
97
+ @include desktop {
98
+ margin-top: -$hero-padding-desktop-medium-y - $overlap-desktop;
99
+ }
109
100
  }
101
+ }
110
102
 
111
- + .section {
112
- @include mobile {
113
- margin-left: -$hero-padding-y;
114
- margin-right: -$hero-padding-y;
115
-
116
- .box {
117
- box-shadow: none;
118
- border-radius: 24px 24px 0 0;
119
-
120
- .box-content:only-child {
121
- border-radius: 24px 24px 0 0;
122
- }
123
- }
124
- }
125
-
126
- > .container {
127
- margin-top: -$hero-padding-y - $overlap;
128
-
129
- @include desktop {
130
- margin-top: -$hero-padding-desktop-y - $overlap-desktop;
131
- }
132
- }
133
-
134
- &.is-small {
135
- > .container {
136
- margin-top: -$hero-padding-small-y - $overlap;
137
-
138
- @include desktop {
139
- margin-top: -$hero-padding-desktop-small-y - $overlap-desktop;
140
- }
141
- }
142
- }
143
-
144
- &.is-medium {
145
- > .container {
146
- margin-top: -$hero-padding-medium-y - $overlap;
147
-
148
- @include desktop {
149
- margin-top: -$hero-padding-desktop-medium-y - $overlap-desktop;
150
- }
151
- }
152
- }
153
-
154
- &.is-large {
155
- > .container {
156
- margin-top: -$hero-padding-large-y - $overlap;
103
+ &.is-large {
104
+ > .container {
105
+ margin-top: -$hero-padding-large-y - $overlap;
157
106
 
158
- @include desktop {
159
- margin-top: -$hero-padding-desktop-large-y - $overlap-desktop;
160
- }
161
- }
162
- }
107
+ @include desktop {
108
+ margin-top: -$hero-padding-desktop-large-y - $overlap-desktop;
109
+ }
163
110
  }
111
+ }
164
112
  }
113
+ }
165
114
 
166
- &.has-background {
167
- background-repeat: no-repeat;
168
- background-size: cover;
169
- }
170
-
171
- &.has-pattern-dark,
172
- &.has-background {
173
- .hero-body {
174
- text-align: center;
175
- padding: 100px 20px;
176
-
177
- @include desktop {
178
- text-align: left;
179
- padding-top: 80px;
180
- padding-bottom: 80px;
181
- }
182
-
183
- .suptitle {
184
- display: none;
115
+ &.has-background {
116
+ background-repeat: no-repeat;
117
+ background-size: cover;
118
+ }
185
119
 
186
- @include desktop {
187
- display: block;
188
- margin-bottom: 30px;
189
- font-size: 19px;
190
- text-transform: uppercase;
191
- }
192
- }
193
-
194
- .title {
195
- font-size: 32px;
196
- margin-bottom: 25px;
197
-
198
- @include desktop {
199
- font-size: 52px;
200
- }
201
- }
120
+ &.has-background {
121
+ .hero-body {
122
+ text-align: center;
123
+ padding: 100px 20px;
202
124
 
203
- .button {
204
- width: auto;
205
- }
206
- }
125
+ @include desktop {
126
+ text-align: left;
127
+ padding-top: 80px;
128
+ padding-bottom: 80px;
129
+ }
207
130
 
208
- &.is-overlapped {
209
- .hero-body {
210
- padding: 30px 20px 60px;
131
+ .suptitle {
132
+ display: none;
211
133
 
212
- @include desktop {
213
- padding: 60px 20px;
214
- }
215
- }
134
+ @include desktop {
135
+ display: block;
136
+ margin-bottom: 30px;
137
+ font-size: 19px;
138
+ text-transform: uppercase;
216
139
  }
217
- }
140
+ }
218
141
 
219
- &.is-centered {
220
- text-align: center;
221
- }
222
-
223
- &.is-primary {
224
- color: getColor('background');
142
+ .title {
143
+ font-size: 32px;
144
+ margin-bottom: 25px;
225
145
 
226
- p,
227
- strong,
228
- .paragraph,
229
- .suptitle,
230
- .title,
231
- .subtitle,
232
- a:not(.button):not(.tag) {
233
- color: getColor('background');
146
+ @include desktop {
147
+ font-size: 52px;
234
148
  }
149
+ }
235
150
 
236
- .subtitle {
237
- strong,
238
- a:not(.button) {
239
- color: getColor('background');
240
- }
241
- }
151
+ .button {
152
+ width: auto;
153
+ }
242
154
  }
243
155
 
244
- &.is-info {
245
- background: getVariantColor('alternate',2);
246
-
247
- p,
248
- strong,
249
- .paragraph,
250
- .suptitle,
251
- .title,
252
- .subtitle,
253
- a:not(.button):not(.tag) {
254
- color: getColor('background');
255
- }
156
+ &.is-overlapped {
157
+ .hero-body {
158
+ padding: 30px 20px 60px;
256
159
 
257
- .subtitle {
258
- strong,
259
- a:not(.button) {
260
- color: getColor('background');
261
- }
160
+ @include desktop {
161
+ padding: 60px 20px;
262
162
  }
163
+ }
263
164
  }
165
+ }
264
166
 
265
- .subtitle {
266
- padding-left: 0.2em;
267
- }
167
+ &.is-centered {
168
+ text-align: center;
169
+ }
268
170
  }
@@ -1,27 +1,20 @@
1
- $section-padding-y: $spacing-6;
2
- $section-padding-x: $spacing-5;
3
- $section-padding-desktop-y: $spacing-8;
4
- $section-padding-desktop-x: $spacing-5;
5
- $overlap-section: $spacing-4 !default;
6
- $overlap-section-desktop: $spacing-4 !default;
7
-
8
1
  .section {
9
- padding: $section-padding-y $section-padding-x;
2
+ padding: $spacing-6 $spacing-5;
10
3
 
11
4
  @include desktop {
12
- padding: $section-padding-desktop-y $section-padding-desktop-x;
5
+ padding: $spacing-8 $spacing-5;
13
6
  }
14
7
 
15
8
  &.has-overlap > .container {
16
- margin-top: -$section-padding-y - $overlap-section;
9
+ margin-top: -$spacing-6 - $spacing-4;
17
10
 
18
11
  @include desktop {
19
- margin-top: -$section-padding-desktop-y - $overlap-section-desktop;
12
+ margin-top: -$spacing-8 - $spacing-4;
20
13
  }
21
14
  }
22
15
 
23
16
  &:nth-child(even) {
24
- background-color: getColor('grey-lighter');
17
+ background-color: getBGColor('neutral');
25
18
  }
26
19
 
27
20
  &:nth-child(odd) {
@@ -29,7 +22,7 @@ $overlap-section-desktop: $spacing-4 !default;
29
22
  }
30
23
 
31
24
  &.is-info {
32
- background-color: getVariantColor('alternate',2);
25
+ background-color: getColor('info');
33
26
  color: getColor('background');
34
27
  }
35
28
 
@@ -61,5 +54,5 @@ $overlap-section-desktop: $spacing-4 !default;
61
54
  }
62
55
 
63
56
  .section:nth-child(2n-1).is-inverted {
64
- background-color: getColor('grey-lighter');
57
+ background-color: getBGColor('neutral');
65
58
  }
@@ -0,0 +1,3 @@
1
+ @import "common_partials";
2
+ @import "links_partial";
3
+ @import "buttons_partial";
@@ -0,0 +1,30 @@
1
+ /*
2
+ Colors for buttons
3
+ @string slug name used in classname (You can use your brand name)
4
+ @color-background The name of the color in the color map for the background
5
+ @color-text The name of the color in the color map for the text
6
+ */
7
+ $button-colors: (
8
+ 'accent':['conversion', 'alternate', 'background'],
9
+ 'primary': ['primary', 'main', 'background'],
10
+ 'secondary': ['secondary', 'bg-main', 'main'],
11
+ 'ghost': ['ghost', 'background', 'main'],
12
+ ) !default;
13
+
14
+ %buttons-states {
15
+ #{$hoverSelector} {
16
+ filter: brightness(0.8);
17
+ &.is-primary {
18
+ filter: brightness(1.2);
19
+ }
20
+ }
21
+ &:active:not(:disabled) {
22
+ filter: brightness(0.7);
23
+ }
24
+
25
+ &:focus-visible,
26
+ &:focus:focus-visible {
27
+ outline: var(--border-active);
28
+ outline-offset: 2px;
29
+ }
30
+ }
@@ -0,0 +1,9 @@
1
+ @import "../base/_color.scss";
2
+
3
+ :root {
4
+ --radius: 8px;
5
+ --radius-small: 4px;
6
+ --radius-large: 16px;
7
+ --border: 1px solid #{getBGColor('font')};
8
+ --border-active: 2px solid #{getColor('main')};
9
+ }
@@ -0,0 +1,20 @@
1
+ $link-colors: 'info' !default;
2
+
3
+ %link-over {
4
+ &:hover {
5
+ filter: brightness(0.8);
6
+ }
7
+ }
8
+
9
+ %link-states {
10
+ @extend %link-over;
11
+ &:active {
12
+ filter: brightness(0.9);
13
+ }
14
+ &:focus-visible,
15
+ &:focus:focus-visible {
16
+ outline: 2px solid currentColor;
17
+ border-radius: $radius-small;
18
+ padding: 0 4px;
19
+ }
20
+ }
@@ -3,7 +3,10 @@
3
3
  @import "initial-variables";
4
4
  @import "functions";
5
5
  @import "derived-variables";
6
+ @import '../theming/links_partial';
7
+ @import '../theming/buttons_partial';
6
8
  @import "mixins";
7
9
  @import "controls";
10
+ @import "background";
8
11
  @import "animations";
9
12
  @import "spacing";
@@ -0,0 +1,15 @@
1
+ .is-inverted {
2
+ color: getColor('background');
3
+ }
4
+
5
+ .is-inverted .is-base {
6
+ color: getColor('font');
7
+ }
8
+
9
+ .has-background {
10
+ background-repeat: no-repeat;
11
+
12
+ .box-content {
13
+ background-color: transparent;
14
+ }
15
+ }
@@ -1,67 +1,56 @@
1
- $control-radius: $radius !default;
2
- $control-radius-small: $radius-small !default;
3
-
4
1
  $control-border-width: 1px !default;
5
2
 
6
3
  $control-padding-vertical: calc(0.375em - #{$control-border-width}) !default;
7
4
  $control-padding-horizontal: 20px;
8
5
 
9
- %control {
10
- -moz-appearance: none;
11
- -webkit-appearance: none;
12
- align-items: center;
13
- border: $control-border-width solid transparent;
14
- border-radius: $control-radius-small;
15
- display: inline-flex;
16
- font-size: $size-normal;
17
- height: 2.25em;
18
- justify-content: flex-start;
19
- line-height: 1.5;
20
- padding-bottom: $control-padding-vertical;
21
- padding-left: $control-padding-horizontal;
22
- padding-right: $control-padding-horizontal;
23
- padding-top: $control-padding-vertical;
24
- position: relative;
25
- vertical-align: top;
26
-
27
- // bug fix pour iOS qui zoom sur le champ si la police ne fait pas 16px
6
+ @mixin control {
7
+ -moz-appearance: none;
8
+ -webkit-appearance: none;
9
+ align-items: center;
10
+ border: $control-border-width solid transparent;
11
+ border-radius: var(--radius-small);
12
+ display: inline-flex;
13
+ font-size: $size-normal;
14
+ height: 46px;
15
+ justify-content: flex-start;
16
+ line-height: 1.4;
17
+ padding-bottom: $control-padding-vertical;
18
+ padding-left: $control-padding-horizontal;
19
+ padding-right: $control-padding-horizontal;
20
+ padding-top: $control-padding-vertical;
21
+ position: relative;
22
+ vertical-align: top;
23
+
24
+ // bug fix pour iOS qui zoom sur le champ si la police ne fait pas 16px
25
+ @supports (-webkit-overflow-scrolling: touch) {
26
+ font-size: $text-16;
27
+ }
28
+
29
+ &:focus,
30
+ &:active {
31
+ outline: none;
32
+
33
+ // répétition nécessaire : bug fix pour iOS qui zoom sur le champ si la police ne fait pas 16px
28
34
  @supports (-webkit-overflow-scrolling: touch) {
29
- font-size: $text-16;
30
- }
31
-
32
- &:focus,
33
- &.is-focused,
34
- &:active,
35
- &.is-active {
36
- outline: none;
37
-
38
- // répétition nécessaire : bug fix pour iOS qui zoom sur le champ si la police ne fait pas 16px
39
- @supports (-webkit-overflow-scrolling: touch) {
40
- font-size: $text-16;
41
- }
35
+ font-size: $text-16;
42
36
  }
37
+ }
43
38
 
44
- &[disabled] {
45
- cursor: not-allowed;
46
- }
47
- }
48
-
49
- @mixin control {
50
- @extend %control;
39
+ &[disabled] {
40
+ cursor: not-allowed;
41
+ }
51
42
 
52
- height: 46px;
53
- line-height: 1.4;
54
43
  }
55
44
 
56
45
  @mixin control-small {
57
- border-radius: $control-radius-small;
58
- font-size: $size-small;
46
+ border-radius: var(--radius-small);
47
+ font-size: $size-small;
59
48
  }
60
49
 
61
50
  @mixin control-medium {
62
- font-size: $size-medium;
51
+ font-size: $size-medium;
63
52
  }
64
53
 
65
54
  @mixin control-large {
66
- font-size: $size-large;
55
+ font-size: $size-large;
67
56
  }
@@ -14,27 +14,16 @@ $size-large: $text-24 !default;
14
14
 
15
15
  // Brand Color
16
16
  $colors-brand: (
17
- 'background', 'main', 'font'
17
+ 'background', 'main', 'alternate'
18
18
  );
19
19
 
20
20
  // Brand Color Functionnal
21
21
  $colors-brand-funcionnal: (
22
- 'background', 'main', 'alternate', 'font', 'info', 'success', 'error', 'warning'
22
+ 'background', 'main', 'alternate', 'info', 'success', 'error', 'warning', 'neutral'
23
23
  );
24
24
 
25
25
  $colors-feedback: (
26
- 'success': (
27
- 'bg-success',
28
- ),
29
- 'error': (
30
- 'bg-error',
31
- ),
32
- 'warning': (
33
- 'bg-warning',
34
- ),
35
- 'info': (
36
- 'bg-info',
37
- ),
26
+ 'success', 'error', 'warning', 'info'
38
27
  );
39
28
 
40
29
  // Gestion des z-index