@trilogy-ds/styles 0.0.1-beta-1

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 (104) hide show
  1. package/framework/src/_all.scss +8 -0
  2. package/framework/src/base/_all.scss +9 -0
  3. package/framework/src/base/_color.scss +58 -0
  4. package/framework/src/base/_elements.scss +34 -0
  5. package/framework/src/base/_fonts.scss +2 -0
  6. package/framework/src/base/_generic.scss +68 -0
  7. package/framework/src/base/_helpers.scss +880 -0
  8. package/framework/src/base/_loading.scss +102 -0
  9. package/framework/src/base/_reset.scss +138 -0
  10. package/framework/src/components/_accordion.scss +178 -0
  11. package/framework/src/components/_all.scss +30 -0
  12. package/framework/src/components/_autolayout2.scss +38 -0
  13. package/framework/src/components/_breadcrumb.scss +45 -0
  14. package/framework/src/components/_card.scss +298 -0
  15. package/framework/src/components/_countdown.scss +55 -0
  16. package/framework/src/components/_disclaimer.scss +84 -0
  17. package/framework/src/components/_divider.scss +18 -0
  18. package/framework/src/components/_dropdown.scss +128 -0
  19. package/framework/src/components/_fab.scss +60 -0
  20. package/framework/src/components/_level.scss +120 -0
  21. package/framework/src/components/_media.scss +64 -0
  22. package/framework/src/components/_menu.scss +213 -0
  23. package/framework/src/components/_modal.scss +201 -0
  24. package/framework/src/components/_otp.scss +92 -0
  25. package/framework/src/components/_pagination.scss +182 -0
  26. package/framework/src/components/_plus-symbol.scss +32 -0
  27. package/framework/src/components/_popover.scss +340 -0
  28. package/framework/src/components/_price.scss +209 -0
  29. package/framework/src/components/_product-tour.scss +131 -0
  30. package/framework/src/components/_progress-radial.scss +23 -0
  31. package/framework/src/components/_range.scss +84 -0
  32. package/framework/src/components/_scroll-view.scss +19 -0
  33. package/framework/src/components/_search-modal.scss +197 -0
  34. package/framework/src/components/_segmented-control.scss +60 -0
  35. package/framework/src/components/_slices.scss +316 -0
  36. package/framework/src/components/_slider.scss +92 -0
  37. package/framework/src/components/_stepper.scss +397 -0
  38. package/framework/src/components/_switch.scss +209 -0
  39. package/framework/src/components/_tabs.scss +212 -0
  40. package/framework/src/components/_timeline.scss +367 -0
  41. package/framework/src/elements/_alert.scss +91 -0
  42. package/framework/src/elements/_all.scss +35 -0
  43. package/framework/src/elements/_badge.scss +81 -0
  44. package/framework/src/elements/_box.scss +267 -0
  45. package/framework/src/elements/_button.scss +192 -0
  46. package/framework/src/elements/_checkbox.scss +39 -0
  47. package/framework/src/elements/_checkradio.scss +173 -0
  48. package/framework/src/elements/_chips.scss +100 -0
  49. package/framework/src/elements/_container.scss +108 -0
  50. package/framework/src/elements/_dot.scss +6 -0
  51. package/framework/src/elements/_entry.scss +109 -0
  52. package/framework/src/elements/_form.scss +593 -0
  53. package/framework/src/elements/_icon.scss +384 -0
  54. package/framework/src/elements/_image.scss +59 -0
  55. package/framework/src/elements/_input-gauge.scss +37 -0
  56. package/framework/src/elements/_input-icons.scss +41 -0
  57. package/framework/src/elements/_link.scss +79 -0
  58. package/framework/src/elements/_list.scss +61 -0
  59. package/framework/src/elements/_loader.scss +126 -0
  60. package/framework/src/elements/_notification.scss +151 -0
  61. package/framework/src/elements/_options.scss +146 -0
  62. package/framework/src/elements/_other.scss +44 -0
  63. package/framework/src/elements/_paragraph.scss +101 -0
  64. package/framework/src/elements/_progress.scss +212 -0
  65. package/framework/src/elements/_radio.scss +67 -0
  66. package/framework/src/elements/_select.scss +315 -0
  67. package/framework/src/elements/_sticker.scss +151 -0
  68. package/framework/src/elements/_switch.scss +108 -0
  69. package/framework/src/elements/_table.scss +298 -0
  70. package/framework/src/elements/_tag.scss +131 -0
  71. package/framework/src/elements/_textarea.scss +125 -0
  72. package/framework/src/elements/_timeline.scss +283 -0
  73. package/framework/src/elements/_title.scss +139 -0
  74. package/framework/src/elements/_toaster.scss +128 -0
  75. package/framework/src/grid/_all.scss +3 -0
  76. package/framework/src/grid/_columns.scss +952 -0
  77. package/framework/src/grid/_rows.scss +47 -0
  78. package/framework/src/grid/_tiles.scss +78 -0
  79. package/framework/src/layout/_all.scss +6 -0
  80. package/framework/src/layout/_hero.scss +268 -0
  81. package/framework/src/layout/_main.scss +36 -0
  82. package/framework/src/layout/_section.scss +65 -0
  83. package/framework/src/layout/_toolbar.scss +100 -0
  84. package/framework/src/trilogy-core.scss +16 -0
  85. package/framework/src/trilogy-mangled.scss +14 -0
  86. package/framework/src/trilogy-namespaced.scss +14 -0
  87. package/framework/src/trilogy.scss +8 -0
  88. package/framework/src/utilities/_all.scss +9 -0
  89. package/framework/src/utilities/_animations.scss +71 -0
  90. package/framework/src/utilities/_controls.scss +67 -0
  91. package/framework/src/utilities/_derived-variables.scss +104 -0
  92. package/framework/src/utilities/_functions.scss +94 -0
  93. package/framework/src/utilities/_initial-variables.scss +150 -0
  94. package/framework/src/utilities/_mixins.scss +745 -0
  95. package/framework/src/utilities/_post.scss +6 -0
  96. package/framework/src/utilities/_pre.scss +5 -0
  97. package/framework/src/utilities/_spacing.scss +10 -0
  98. package/framework/src/utilities/_tools.scss +3 -0
  99. package/package.json +22 -0
  100. package/themes/default/src/_all.scss +1 -0
  101. package/themes/default/src/assets.scss +11 -0
  102. package/themes/default/src/utilities/_all.scss +0 -0
  103. package/themes/default/src/utilities/_post.scss +0 -0
  104. package/themes/default/src/utilities/_pre.scss +3 -0
@@ -0,0 +1,397 @@
1
+ @use "sass:math";
2
+
3
+ $step-width: 30px;
4
+ $step-font-size: 18px;
5
+ $step-gap: $step-width;
6
+ $step-gap-desktop: $step-width * 3;
7
+
8
+
9
+ // old stepper , déprécié since ( v2 )
10
+ .stepper {
11
+ display: inline-flex;
12
+ position: relative;
13
+
14
+ @include mobile {
15
+ &::after {
16
+ content: attr(data-label-mobile);
17
+ position: absolute;
18
+ bottom: 0;
19
+ width: 100%;
20
+ font-weight: $weight-semibold;
21
+ color: getColor('alternate');
22
+ }
23
+ }
24
+
25
+ .step {
26
+ position: relative;
27
+ z-index: zindex('void');
28
+ display: inline-flex;
29
+ justify-content: center;
30
+ align-items: center;
31
+ width: $step-width;
32
+ height: $step-width;
33
+ border-radius: 100%;
34
+ background: getColor('grey-disabled');
35
+ color: getColor('background');
36
+ font-size: $step-font-size;
37
+ transition: background .15s ease;
38
+
39
+ &.is-done {
40
+ background: getColor('font');
41
+ }
42
+
43
+ &.is-current,
44
+ &.is-active {
45
+ background: getColor('alternate');
46
+ }
47
+ }
48
+
49
+ .step + .step {
50
+ margin-left: $step-gap;
51
+
52
+ @include desktop {
53
+ margin-left: $step-gap-desktop;
54
+ }
55
+
56
+ &::before {
57
+ content: '';
58
+ height: 4px;
59
+ width: $step-gap;
60
+ display: block;
61
+ position: absolute;
62
+ z-index: zindex('subzero');
63
+ left: -$step-gap;
64
+ top: 50%;
65
+ transform: translateY(-50%);
66
+ transition: background .15s ease;
67
+ background-color: getColor('grey-disabled');
68
+
69
+ @include desktop {
70
+ width: $step-gap-desktop;
71
+ margin-left: -$step-gap-desktop + $step-width;
72
+ }
73
+ }
74
+ }
75
+
76
+ // done steps successively
77
+ .step.is-done + .step.is-done::before {
78
+ background: getColor('font');
79
+ }
80
+
81
+ // done step followed by current step
82
+ .step.is-done + .step.is-current::before {
83
+ background: linear-gradient(90deg, getColor('font'), getColor('alternate'));
84
+ }
85
+
86
+ // active step followed by done step(s)
87
+ .step.is-active + .step.is-done::before {
88
+ background: linear-gradient(90deg, getColor('alternate'), getColor('font'));
89
+ }
90
+
91
+ // current step followed by unvisited step(s)
92
+ .step.is-current + .step::before {
93
+ background: linear-gradient(90deg, getColor('alternate'), getColor('grey-disabled') 75%);
94
+ }
95
+
96
+ // labels
97
+ .step[data-label] {
98
+ margin-bottom: 40px;
99
+
100
+ &::after {
101
+ position: absolute;
102
+ left: -$step-gap-desktop * 0.5;
103
+ right: -$step-gap-desktop * 0.5;
104
+ color: getColor('grey');
105
+ font-size: $size-7;
106
+ font-weight: $weight-semibold;
107
+ top: 50px;
108
+ text-align: center;
109
+
110
+ @include desktop {
111
+ content: attr(data-label);
112
+ }
113
+ }
114
+
115
+ // active or current step
116
+ &.is-current::after,
117
+ &.is-active::after {
118
+ color: getColor('alternate');
119
+ }
120
+ }
121
+ }
122
+
123
+ // back to grey label when going back in steps: the current step is followed by the active step
124
+ .step[data-label].is-active ~ .step[data-label].is-current::after {
125
+ color: getColor('grey');
126
+ }
127
+
128
+
129
+ // Nouveau stepper
130
+
131
+ .stepper-wrapper {
132
+ display: flex;
133
+ position: relative;
134
+ justify-content: space-between;
135
+ min-height: 44px;
136
+ margin-left: -8px;
137
+ margin-right: -8px;
138
+
139
+ @include touch {
140
+ margin-left: -4px !important;
141
+ margin-right: -4px !important;
142
+ }
143
+ }
144
+
145
+ .stepper-item {
146
+ display: flex;
147
+ flex-direction: column;
148
+ width: 100%;
149
+ padding: $spacing-2;
150
+
151
+ &:before{
152
+ content: "";
153
+ display: block;
154
+ height: 4px;
155
+ background: getColor('grey-disabled');
156
+ border-radius: 4px;
157
+ }
158
+
159
+ &.is-error {
160
+
161
+ &:before{
162
+ background: getColor('error') !important;
163
+ }
164
+ .step-bars {
165
+ background: getColor('error') !important;
166
+ }
167
+ color: getColor('font');
168
+
169
+ .step-label {
170
+
171
+ padding-left: $spacing-2;
172
+
173
+ @include touch {
174
+ padding-left: $spacing-1;
175
+ }
176
+
177
+ &::before {
178
+ content: "";
179
+ mask-image: url('./assets/icons/all/times-circle.svg') !important;
180
+ background-color: getColor('error') !important;
181
+ border-width: 0;
182
+ width: 20px;
183
+ height: 20px;
184
+ margin: 2px 8px 0 -8px;
185
+ align-self: baseline;
186
+ }
187
+
188
+ .icon {
189
+ display: none;
190
+ }
191
+ }
192
+ }
193
+
194
+ &.is-done {
195
+
196
+ &:before{
197
+ background: getColor('font');
198
+ transition: background-color 2s ease-in-out;
199
+ }
200
+ .step-bars {
201
+ background: getColor('font');
202
+ transition: background-color 2s ease-in-out;
203
+ }
204
+
205
+ .step-label {
206
+ color: getColor('font');
207
+ padding-left: $spacing-2;
208
+
209
+ &::before {
210
+ content: "";
211
+ mask-image: url('./assets/icons/all/check-circle.svg');
212
+ background-color: getColor('success');
213
+ border-width: 0;
214
+ min-width: 20px;
215
+ height: 20px;
216
+ margin: 2px 8px 0 -8px;
217
+ align-self: baseline;
218
+ }
219
+ }
220
+ }
221
+
222
+ &.is-current,
223
+ &.is-active {
224
+
225
+ &:before{
226
+ background: getColor('alternate');
227
+ animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
228
+ -o-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
229
+ -webkit-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
230
+ -moz-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
231
+ }
232
+ .step-bars {
233
+ background: getColor('alternate');
234
+ animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
235
+ -o-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
236
+ -webkit-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
237
+ -moz-animation: cssload-width 2s cubic-bezier(0.45, 0, 1, 1);
238
+ }
239
+
240
+ .step-label {
241
+ font-style: normal;
242
+ font-weight: 600;
243
+ font-size: 22px;
244
+ line-height: 24px;
245
+ color: getColor('font');
246
+ transition: color 1.45s ease;
247
+ width: max-content;
248
+
249
+ .icon [class^=tri-], .icon [class*=" tri-"] {
250
+ height: 22px;
251
+ width: 22px;
252
+ margin: 0 4px 0 -4px;
253
+ }
254
+
255
+ @include tablet-only {
256
+ width: 90% !important;
257
+ }
258
+
259
+ @include mobile {
260
+ font-size: 18px;
261
+ width: 90%;
262
+ }
263
+ }
264
+ }
265
+
266
+ @include touch {
267
+ padding: $spacing-1 !important;
268
+ }
269
+ }
270
+
271
+ .step-bars {
272
+ height: 4px;
273
+ background: getColor('grey-disabled');
274
+ border-radius: 4px;
275
+ display: none;
276
+ }
277
+
278
+ .step-label {
279
+ display: flex;
280
+ align-items: center;
281
+ color: getColor('grey');
282
+ font-style: normal;
283
+ font-weight: 400;
284
+ font-size: 16px;
285
+ line-height: 24px;
286
+ padding-top: $spacing-2;
287
+
288
+ .icon {
289
+ font-size: 20px;
290
+ margin-left: 8px;
291
+ height: auto;
292
+ }
293
+
294
+ .icon [class^=tri-], .icon [class*=" tri-"] {
295
+ margin: 0 4px 0 -4px;
296
+ }
297
+
298
+
299
+ @include touch {
300
+ position: absolute;
301
+ top: 10px;
302
+ left: 4px;
303
+ }
304
+ }
305
+
306
+ @include desktop {
307
+ .step-count {
308
+ display: none;
309
+ }
310
+ }
311
+
312
+ @include mobile {
313
+ .step-count {
314
+ position: absolute;
315
+ top: 23px;
316
+ right: 8px;
317
+ font-size: 14px;
318
+ line-height: 18px;
319
+ font-weight: 600;
320
+ }
321
+
322
+ .stepper-item:not(.is-current) {
323
+ display: flex;
324
+
325
+ .step-label {
326
+ display: none;
327
+ }
328
+ }
329
+ }
330
+
331
+ @include tablet-only {
332
+ .step-count {
333
+ position: absolute;
334
+ top: 24px;
335
+ right: 8px;
336
+ font-size: 14px;
337
+ line-height: 18px;
338
+ font-weight: 600;
339
+ }
340
+
341
+ .stepper-item:not(.is-current) {
342
+ display: flex;
343
+
344
+ .step-label {
345
+ display: none;
346
+ }
347
+ }
348
+ }
349
+
350
+ @keyframes cssload-width {
351
+ 0%, 100% {
352
+ transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
353
+ }
354
+ 0% {
355
+ width: 0;
356
+ }
357
+ 100% {
358
+ width: 100%;
359
+ }
360
+ }
361
+
362
+ @-o-keyframes cssload-width {
363
+ 0%, 100% {
364
+ -o-transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
365
+ }
366
+ 0% {
367
+ width: 0;
368
+ }
369
+ 100% {
370
+ width: 100%;
371
+ }
372
+ }
373
+
374
+ @-webkit-keyframes cssload-width {
375
+ 0%, 100% {
376
+ -webkit-transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
377
+ }
378
+ 0% {
379
+ width: 0;
380
+ }
381
+ 100% {
382
+ width: 100%;
383
+ }
384
+ }
385
+
386
+ @-moz-keyframes cssload-width {
387
+ 0%, 100% {
388
+ -moz-transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
389
+ }
390
+ 0% {
391
+ width: 0;
392
+ }
393
+ 100% {
394
+ width: 100%;
395
+ }
396
+ }
397
+
@@ -0,0 +1,209 @@
1
+ $switch-margin: 10px !default;
2
+ $switch-paddle-offset: 2px !default;
3
+ $switch-height: 22px;
4
+ $switch-width: $switch-height * 2;
5
+ $paddle-height: $switch-height - $switch-paddle-offset * 2;
6
+ $paddle-width: $paddle-height;
7
+
8
+ .switch[type='checkbox'] {
9
+ outline: 0;
10
+ user-select: none;
11
+ display: inline-block;
12
+ position: absolute;
13
+ opacity: 0;
14
+
15
+ &[disabled] {
16
+ cursor: not-allowed;
17
+
18
+ + label {
19
+ opacity: 0.5;
20
+
21
+ &::before,
22
+ &::after {
23
+ opacity: 0.5;
24
+ }
25
+
26
+ &:hover {
27
+ cursor: not-allowed;
28
+ }
29
+ }
30
+ }
31
+
32
+ + label {
33
+ flex-direction: row-reverse;
34
+ justify-content: space-between;
35
+
36
+ &::before,
37
+ &::after {
38
+ content: '';
39
+ border: none;
40
+ }
41
+
42
+ &::before {
43
+ min-width: $switch-width;
44
+ flex-basis: $switch-width;
45
+ height: $switch-height;
46
+ background: getColor('grey-disabled');
47
+ border-radius: $radius * 4;
48
+ margin-right: 0;
49
+ margin-left: $switch-margin;
50
+ }
51
+
52
+ &::after {
53
+ content: '\f103';
54
+ margin-left: 0;
55
+ margin-right: 0;
56
+ display: inline-flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ width: $paddle-width;
60
+ height: $paddle-height;
61
+ color: getColor('grey-disabled');
62
+ left: auto;
63
+ right: $switch-width - $paddle-width - $switch-paddle-offset;
64
+ top: 50%;
65
+ transform: translateY(-50%);
66
+ background: getColor('background');
67
+ transition: all 0.25s ease-out;
68
+ border-radius: 100%;
69
+ }
70
+ }
71
+
72
+ &:checked {
73
+ + label {
74
+ &::before {
75
+ background: getColor('alternate');
76
+ }
77
+
78
+ &::after {
79
+ right: $switch-paddle-offset;
80
+ content: '\f102';
81
+ color: getColor('alternate');
82
+ }
83
+ }
84
+ }
85
+
86
+ &.is-success {
87
+ &:checked {
88
+ + label {
89
+ &::before {
90
+ background: getColor('success');
91
+ }
92
+
93
+ &::after {
94
+ color: getColor('success');
95
+ }
96
+ }
97
+ }
98
+ }
99
+
100
+ &.is-info {
101
+ &:checked {
102
+ + label {
103
+ &::before {
104
+ background: getColor('info');
105
+ }
106
+
107
+ &::after {
108
+ color: getColor('info');
109
+ }
110
+ }
111
+ }
112
+ }
113
+
114
+ &.is-warning {
115
+ &:checked {
116
+ + label {
117
+ &::before {
118
+ background: getColor('warning');
119
+ }
120
+
121
+ &::after {
122
+ color: getColor('warning');
123
+ }
124
+ }
125
+ }
126
+ }
127
+
128
+ &.is-error {
129
+ &:checked {
130
+ + label {
131
+ &::before {
132
+ background: getColor('error');
133
+ }
134
+
135
+ &::after {
136
+ color: getColor('error');
137
+ }
138
+ }
139
+ }
140
+ }
141
+
142
+ &.has-slice {
143
+ + label {
144
+ justify-content: center;
145
+ flex-direction: column;
146
+ align-items: flex-start;
147
+ padding-right: $switch-width + $switch-margin;
148
+
149
+ &::before {
150
+ position: absolute;
151
+ right: 0;
152
+ top: 50%;
153
+ transform: translateY(-50%);
154
+ margin-left: 0;
155
+ }
156
+
157
+ &::after {
158
+ position: absolute;
159
+ }
160
+ }
161
+ }
162
+
163
+ &.is-inverted {
164
+ + label::before {
165
+ background: getColor('background');
166
+ }
167
+
168
+ + label::after {
169
+ background: getColor('grey-disabled');
170
+ }
171
+
172
+ &:checked {
173
+ + label {
174
+ &::before {
175
+ background: getColor('background');
176
+ }
177
+
178
+ &::after {
179
+ background: getColor('alternate');
180
+ color: getColor('background');
181
+ }
182
+ }
183
+ }
184
+
185
+ &.is-success {
186
+ &:checked + label::after {
187
+ background: getColor('success');
188
+ }
189
+ }
190
+
191
+ &.is-info {
192
+ &:checked + label::after {
193
+ background: getColor('info');
194
+ }
195
+ }
196
+
197
+ &.is-warning {
198
+ &:checked + label::after {
199
+ background: getColor('warning');
200
+ }
201
+ }
202
+
203
+ &.is-error {
204
+ &:checked + label::after {
205
+ background: getColor('error');
206
+ }
207
+ }
208
+ }
209
+ }