@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,209 +1,239 @@
1
1
  $price-levels: (
2
- ($text-64),
3
- ($text-56),
4
- ($text-44),
5
- ($text-32),
6
- ($text-28),
7
- ($text-24),
8
- ($text-20),
2
+ ($text-64),
3
+ ($text-56),
4
+ ($text-44),
5
+ ($text-32),
6
+ ($text-28),
7
+ ($text-24),
8
+ ($text-20),
9
9
  );
10
10
 
11
-
12
11
  .price {
13
- display: inline-flex;
14
- // flex-wrap: wrap;
15
- &:not(.is-inlined){
16
- font-size: 44px;
17
- }
18
-
19
-
20
- @each $price-level in $price-levels {
21
- $i: index($price-levels, $price-level);
22
- $font-size: nth($price-level , 1);
23
-
24
- &.is-level-#{$i} {
25
- font-size: $font-size;
26
-
27
- @if $i > 4 {
28
- .price-details {
29
- padding-left: 2px !important;
30
- }
31
- }
12
+ display: inline-flex;
13
+ font-weight: $weight-semibold;
14
+ line-height: 0.8;
15
+ margin-bottom: 0;
16
+
17
+ &:not(.is-inlined) {
18
+ font-size: $text-44;
19
+ }
20
+
21
+ @each $price-level in $price-levels {
22
+ $i: index($price-levels, $price-level);
23
+ $font-size: nth($price-level, 1);
24
+
25
+ &.is-level-#{$i} {
26
+ font-size: $font-size;
27
+
28
+ @if $i == 1 {
29
+ + .price-tag {
30
+ span:nth-child(2) {
31
+ font-size: $text-16;
32
32
  }
33
+ }
34
+ }
33
35
 
34
- // the details : cents + period
36
+ @if $i == 2 {
37
+ + .price-tag {
38
+ font-size: 22px;
39
+ span:nth-child(2) {
40
+ font-size: $text-16;
41
+ }
42
+ }
43
+ }
35
44
 
36
- .price-details {
37
- padding-left: $spacing-1;
38
-
39
- .cents,
40
- .centimes,
41
- .periode,
42
- .period {
43
- line-height: 1;
44
- display: block;
45
+ @if $i == 3 {
46
+ + .price-tag {
47
+ font-size: 16px;
48
+ span:nth-child(2) {
49
+ font-size: $text-16;
50
+ }
45
51
  }
52
+ }
46
53
 
47
- .cents,
48
- .centimes {
49
- font-weight: 600;
50
- font-size: 0.475em;
51
- vertical-align: top;
52
- text-align: left;
53
-
54
- sup {
55
- font-weight: $weight-medium;
56
- padding-left: 2px;
57
- top: -0.3em;
58
- }
54
+ @if $i < 4 {
55
+ + .price-tag {
56
+ span:nth-child(2) {
57
+ place-self: flex-end;
58
+ margin-bottom: 3px;
59
+ }
59
60
  }
61
+ }
60
62
 
61
- .period,
62
- .periode {
63
- font-size: 0.375em;
64
- margin-top: 0;
65
- padding-left: 0.1em;
66
- text-align: left;
63
+ @if $i > 4 {
64
+ .price-details {
65
+ padding-left: 2px !important;
67
66
  }
67
+ }
68
+ @if $i > 3 {
69
+ + .price-tag {
70
+ &::before {
71
+ border-width: 3px;
72
+ margin-left: -6px;
73
+ margin-top: 4px;
74
+ border-radius: 1px;
75
+ }
76
+ font-size: $text-10;
77
+ padding: 4px !important;
78
+ }
79
+ }
68
80
  }
69
81
 
82
+ // the details : cents + period
70
83
 
71
- }
84
+ .price-details {
85
+ padding-left: $spacing-1;
86
+
87
+ .cents,
88
+ .centimes,
89
+ .periode,
90
+ .period {
91
+ line-height: 1;
92
+ display: block;
93
+ }
94
+
95
+ .cents,
96
+ .centimes {
97
+ font-weight: 600;
98
+ font-size: 0.475em;
99
+ vertical-align: top;
100
+ text-align: left;
101
+
102
+ sup {
103
+ font-weight: $weight-medium;
104
+ padding-left: 2px;
105
+ top: -0.3em;
106
+ }
107
+ }
72
108
 
73
- // FIXME : le nom de cette classe devrait être préfixé de "price-"
74
- .main,
75
- .price-main {
76
- font-weight: $weight-semibold;
77
- line-height: 0.8;
78
- margin-bottom: 0;
109
+ .period,
110
+ .periode {
111
+ font-size: 0.375em;
112
+ margin-top: 0;
113
+ padding-left: 0.1em;
114
+ text-align: left;
115
+ }
79
116
  }
80
117
 
81
118
 
119
+ }
82
120
 
121
+ &.is-inverted {
122
+ color: getColor('background');
123
+ }
83
124
 
125
+ &.has-suptitle {
126
+ display: flex;
127
+ flex-wrap: wrap;
84
128
 
85
- // rendre les is-n deprecated dans 4 versions - v1.18.11 -
86
-
87
- &.is-1 {
88
- font-size: 56px;
129
+ .price-suptitle {
130
+ flex-basis: 100%;
131
+ font-size: 0.375em;
89
132
  }
133
+ }
90
134
 
91
- &.is-2 {
92
- font-size: 44px;
135
+ &.has-description {
136
+ .cents,
137
+ .centimes {
138
+ align-items: flex-start;
139
+ display: flex;
93
140
  }
94
141
 
95
- &.is-3 {
96
- font-size: 32px;
142
+ .icon {
143
+ height: inherit;
144
+ width: inherit;
97
145
  }
146
+ }
98
147
 
99
- &.is-4 {
100
- font-size: 29px;
148
+ &.is-inlined {
149
+ .price-details {
150
+ display: inline-flex;
151
+ margin-left: 0;
152
+ padding-left: 0 !important;
153
+
154
+ .cents,
155
+ .centimes,
156
+ .periode,
157
+ .period {
158
+ font-size: inherit;
159
+ line-height: 0.8;
160
+ padding-left: 0;
161
+ }
101
162
  }
102
163
 
103
- &.is-5 {
104
- font-size: 23px;
164
+ &.is-striked {
165
+ &::before {
166
+ transform: rotate(-12deg);
167
+ }
105
168
  }
169
+ }
106
170
 
107
- &.is-6 {
108
- font-size: 14px;
109
- }
171
+ &.is-striked {
172
+ position: relative;
173
+ color: getBGColor('font');
110
174
 
111
- &.is-huge {
112
- font-size: 62px;
113
- }
114
-
115
- &.is-main-price {
116
- color: getColor('alternate');
175
+ &::before {
176
+ position: absolute;
177
+ content: "";
178
+ left: 0;
179
+ top: 50%;
180
+ right: 0;
181
+ border-top: 2px solid;
182
+ border-color: getColor('font');
183
+ border-radius: 5px;
184
+ transform: rotate(-20deg);
117
185
  }
118
186
 
119
187
  &.is-inverted {
120
- color: getColor('background');
121
- }
122
-
123
- &.has-suptitle {
124
- display: flex;
125
- flex-wrap: wrap;
188
+ color: getBGColor('font');
126
189
 
127
- .price-suptitle {
128
- flex-basis: 100%;
129
- font-size: 0.375em;
130
- }
190
+ &::before {
191
+ border-color: getColor('background');
192
+ }
131
193
  }
132
194
 
133
- &.has-description {
134
- .cents,
135
- .centimes {
136
- align-items: flex-start;
137
- display: flex;
138
- }
139
-
140
- .icon {
141
- height: inherit;
142
- width: inherit;
143
- }
144
- }
145
-
146
- &.is-inlined {
147
- .price-details {
148
- display: inline-flex;
149
- margin-left: 0;
150
- padding-left: 0 !important;
151
- .cents,
152
- .centimes,
153
- .periode,
154
- .period {
155
- font-size: inherit;
156
- line-height: 0.8;
157
- padding-left: 0;
158
- }
159
- }
195
+ &.has-suptitle {
196
+ display: inline-flex;
197
+ margin-top: 0.55em;
160
198
 
161
- &.is-striked {
162
- &::before {
163
- transform: rotate(-12deg);
164
- }
165
- }
199
+ .price-suptitle {
200
+ position: absolute;
201
+ top: -1.4em;
202
+ }
166
203
  }
204
+ }
205
+ }
167
206
 
168
- &.is-striked {
169
- position: relative;
170
- color: getVariantColor('font', 2);
171
-
172
- &::before {
173
- position: absolute;
174
- content: "";
175
- left: 0;
176
- top: 50%;
177
- right: 0;
178
- border-top: 2px solid;
179
- border-color: getColor('font');
180
- border-radius: 5px;
181
- transform: rotate(-20deg);
182
- }
183
-
184
- &.is-main-price {
185
- color: getVariantColor('alternate', 2);
186
- &::before {
187
- border-color: getColor('alternate');
188
- }
189
- }
190
-
191
- &.is-inverted {
192
- color: getVariantColor('background', 2);
193
-
194
- &::before {
195
- border-color: getColor('background');
196
- }
197
- }
198
-
199
- &.has-suptitle {
200
- display: inline-flex;
201
- margin-top: 0.55em;
202
-
203
- .price-suptitle {
204
- position: absolute;
205
- top: -1.4em;
206
- }
207
- }
208
- }
207
+ .price-tag {
208
+ background-color: getColor('alternate');
209
+ margin-left: 10px;
210
+ border-radius: 6px;
211
+ display: inline-flex;
212
+ color: getColor('background');
213
+ height: fit-content;
214
+ padding: 8px;
215
+ font-size: 28px;
216
+ line-height: 1em;
217
+ align-items: baseline;
218
+ position: relative;
219
+ &::before {
220
+ content: '';
221
+ border-color: transparent;
222
+ border-bottom-color: getColor('alternate');
223
+ border-left-color: getColor('alternate');
224
+ transform: rotate(45deg);
225
+ border-style: solid;
226
+ border-width: 5px;
227
+ border-radius: 2px;
228
+ pointer-events: none;
229
+ position: absolute;
230
+ margin-left: -12px;
231
+ top: 0;
232
+ bottom: 0;
233
+ margin-top: auto;
234
+ margin-bottom: auto;
235
+ transform-origin: center;
236
+ height: 0;
237
+ width: 0;
238
+ }
209
239
  }
@@ -1,5 +1,3 @@
1
- $product-tour-target-outline: rgba(10,10,10,.86); // comes from Bulma's .modal-background defaults
2
-
3
1
  .product-tour {
4
2
  position: absolute;
5
3
  z-index: zindex('modal');
@@ -94,7 +92,7 @@ $product-tour-target-outline: rgba(10,10,10,.86); // comes from Bulma's .modal-b
94
92
  top: 0;
95
93
  left: 0;
96
94
  background: white;
97
- border-radius: 100%;
95
+ border-radius: 9999px;
98
96
  box-shadow: $shadow;
99
97
  transform: translate(-50%, -50%);
100
98
 
@@ -124,7 +122,7 @@ $product-tour-target-outline: rgba(10,10,10,.86); // comes from Bulma's .modal-b
124
122
 
125
123
  .product-tour-target {
126
124
  &-active {
127
- outline: 999em solid $product-tour-target-outline !important;
125
+ outline: 999em solid getColor('main') !important;
128
126
  outline-offset: 10px !important;
129
127
  z-index: zindex('modal');
130
128
  }
@@ -1,84 +1,85 @@
1
1
  .range-container {
2
- @mixin appearence {
3
- appearance: none;
4
- height: 5px;
5
- }
2
+ @mixin appearence {
3
+ appearance: none;
4
+ height: 5px;
5
+ }
6
6
 
7
- @mixin slider-thumb {
8
- appearance: none;
9
- width: 20px;
10
- height: 20px;
11
- background-color: white;
12
- pointer-events: auto;
13
- border-radius: 50%;
14
- box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
15
- outline: none;
16
- border: none;
17
- }
18
- .range {
19
- width: 100%;
20
- position: relative;
21
- margin-top: 18px;
22
- margin-bottom: 20px;
7
+ @mixin slider-thumb {
8
+ appearance: none;
9
+ width: 20px;
10
+ height: 20px;
11
+ background-color: white;
12
+ pointer-events: auto;
13
+ border-radius: 50%;
14
+ box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
15
+ outline: none;
16
+ border: none;
17
+ }
18
+
19
+ .range {
20
+ width: 100%;
21
+ position: relative;
22
+ margin-top: 18px;
23
+ margin-bottom: 20px;
23
24
 
24
- .range-track {
25
- width: 100%;
26
- height: 8px;
27
- border-radius: 8px;
28
- position: absolute;
29
- margin: auto;
30
- top: 0;
31
- bottom: 0;
32
- color: getColor('alternate');
33
- @include mobile {
34
- height: 4px;
35
- border-radius: 4px;
36
- }
37
- }
25
+ .range-track {
26
+ width: 100%;
27
+ height: 8px;
28
+ border-radius: var(--radius);
29
+ position: absolute;
30
+ margin: auto;
31
+ top: 0;
32
+ bottom: 0;
33
+ @include mobile {
34
+ height: 4px;
35
+ border-radius: var(--radius-small);
36
+ }
37
+ }
38
38
 
39
- .range-cursor {
40
- appearance: none;
41
- -webkit-appearance: none;
42
- -moz-appearance: none;
43
- width: 100%;
44
- outline: none;
45
- position: absolute;
46
- margin: auto;
47
- top: 0;
48
- bottom: 0;
49
- background-color: transparent;
50
- pointer-events: none;
39
+ .range-cursor {
40
+ appearance: none;
41
+ -webkit-appearance: none;
42
+ -moz-appearance: none;
43
+ width: 100%;
44
+ outline: none;
45
+ position: absolute;
46
+ margin: auto;
47
+ top: 0;
48
+ bottom: 0;
49
+ background-color: transparent;
50
+ pointer-events: none;
51
51
 
52
- &::-webkit-slider-runnable-track {
53
- @include appearence;
54
- }
52
+ &::-webkit-slider-runnable-track {
53
+ @include appearence;
54
+ }
55
55
 
56
- &::-moz-range-track {
57
- @include appearence;
58
- }
56
+ &::-moz-range-track {
57
+ @include appearence;
58
+ }
59
59
 
60
- &::-ms-track {
61
- @include appearence;
62
- }
60
+ &::-ms-track {
61
+ @include appearence;
62
+ }
63
63
 
64
- &::-webkit-slider-thumb {
65
- @include slider-thumb;
66
- margin-top: -8px;
67
- }
64
+ &::-webkit-slider-thumb {
65
+ @include slider-thumb;
66
+ margin-top: -8px;
67
+ }
68
68
 
69
- &::-moz-range-thumb {
70
- @include slider-thumb;
71
- }
69
+ &::-moz-range-thumb {
70
+ @include slider-thumb;
71
+ }
72
72
 
73
- &::-ms-thumb {
74
- @include slider-thumb;
75
- }
76
- }
77
- }
78
- .range-values {
79
- display: flex;
80
- justify-content: space-between;
81
- padding-top: 14px;
82
- font-weight: bold;
73
+ &::-ms-thumb {
74
+ @include slider-thumb;
75
+ }
83
76
  }
77
+ }
78
+
79
+ .range-values {
80
+ display: flex;
81
+ justify-content: space-between;
82
+ padding-top: 14px;
83
+ font-weight: bold;
84
+ }
84
85
  }
@@ -1,60 +1,46 @@
1
1
  .segmented-control {
2
- border-radius: 6px;
3
- padding: $spacing-1;
4
- border: 1px solid getColor('grey-light');
5
- background-color: getColor('grey-lighter');
6
- display: inline-block;
7
- margin: 16px 0;
2
+ border-radius: 6px;
3
+ padding: $spacing-1;
4
+ background-color: getBGColor('neutral');
5
+ display: inline-block;
6
+ margin: 16px 0;
8
7
 
9
- @include mobile {
10
- display: flex;
11
- margin: 24px auto;
12
- width: 100%;
13
- }
8
+ @include mobile {
9
+ display: flex;
10
+ margin: 24px auto;
11
+ width: 100%;
12
+ }
14
13
 
15
- .segmented-control-item {
16
- padding: 0 $spacing-5;
17
- border-radius: 4px;
18
- font-size: 16px;
19
- text-align: center;
20
- border: 2px solid transparent;
21
- height: 42px;
22
- color: getColor('font');
23
- background-color: getColor('grey-lighter');
24
- font-family: $body-family;
14
+ .segmented-control-item {
15
+ padding: 0 $spacing-5;
16
+ border-radius: var(--radius-small);
17
+ font-size: 16px;
18
+ text-align: center;
19
+ border: 2px solid transparent;
20
+ height: 42px;
21
+ color: getColor('font');
22
+ background-color: getBGColor('neutral');
25
23
 
26
- &:not(:last-child) {
27
- margin-right: 4px;
28
- }
29
-
30
- @include mobile {
31
- padding: 0 $spacing-4;
32
- flex: 1 1 0;
33
- width: 0;
34
- text-overflow: ellipsis;
35
- overflow: hidden;
36
- }
24
+ &:not(:last-child) {
25
+ margin-right: 4px;
26
+ }
37
27
 
38
- &:hover {
39
- cursor: pointer;
40
- background-color: transparent;
41
- color: getColor('alternate');
42
- border-color: currentColor;
43
- }
28
+ @include mobile {
29
+ padding: 0 $spacing-4;
30
+ flex: 1 1 0;
31
+ width: 0;
32
+ text-overflow: ellipsis;
33
+ overflow: hidden;
34
+ }
44
35
 
45
- &.is-active {
46
- background-color: getColor('alternate');
47
- color: invertColor('alternate');
48
- font-weight: 600;
49
- }
36
+ &:hover:not([disabled], [aria-disabled=true], .is-active) {
37
+ cursor: pointer;
38
+ @include hoverRules()
39
+ }
50
40
 
51
- &[disabled] {
52
- background-color: getColor('grey-disabled');
53
- border-color: getColor('grey-disabled');
54
- color: getColor('grey-darker');
55
- &:hover {
56
- cursor: not-allowed;
57
- }
58
- }
41
+ &.is-active {
42
+ background-color: getColor('main');
43
+ color: invertColor('main');
59
44
  }
45
+ }
60
46
  }