@trilogy-ds/styles 4.1.3-beta-1 → 4.2.2-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 (37) hide show
  1. package/dist/default/trilogy-mangled.css +1 -1
  2. package/dist/default/trilogy-partials.css +1 -1
  3. package/dist/default/trilogy.css +1 -1
  4. package/framework/src/base/_color.scss +6 -7
  5. package/framework/src/base/_helpers.scss +8 -13
  6. package/framework/src/base/_loading.scss +1 -1
  7. package/framework/src/components/_modal.scss +1 -3
  8. package/framework/src/components/_pagination.scss +2 -2
  9. package/framework/src/components/_price.scss +6 -8
  10. package/framework/src/components/_tabs.scss +2 -3
  11. package/framework/src/elements/_button.scss +8 -10
  12. package/framework/src/elements/_entry.scss +3 -3
  13. package/framework/src/elements/_icon.scss +23 -26
  14. package/framework/src/elements/_paragraph.scss +4 -6
  15. package/framework/src/elements/_progress.scss +3 -4
  16. package/framework/src/elements/_select.scss +2 -3
  17. package/framework/src/elements/_title.scss +7 -8
  18. package/framework/src/elements/_toaster.scss +4 -4
  19. package/framework/src/grid/_columns.scss +2 -3
  20. package/framework/src/grid/_rows.scss +2 -4
  21. package/framework/src/theming/buttons_partial.scss +0 -2
  22. package/framework/src/utilities/_background.scss +0 -2
  23. package/framework/src/utilities/_functions.scss +8 -12
  24. package/framework/src/utilities/mixins/_arrow.scss +19 -0
  25. package/framework/src/utilities/mixins/_delete.scss +86 -0
  26. package/framework/src/utilities/mixins/_index.scss +11 -0
  27. package/framework/src/utilities/mixins/_markup-group.scss +27 -0
  28. package/framework/src/utilities/mixins/_mixins.scss +276 -0
  29. package/framework/src/utilities/mixins/_overlay.scss +7 -0
  30. package/framework/src/utilities/mixins/_pattern.scss +10 -0
  31. package/framework/src/utilities/mixins/_responsiveness.scss +84 -0
  32. package/framework/src/utilities/mixins/_spinner.scss +12 -0
  33. package/framework/src/utilities/mixins/_state.scss +25 -0
  34. package/framework/src/utilities/mixins/_unselectable.scss +10 -0
  35. package/framework/src/utilities/mixins/_utils.scss +24 -0
  36. package/package.json +1 -1
  37. package/framework/src/utilities/_mixins.scss +0 -642
@@ -0,0 +1,27 @@
1
+ @mixin text-tags() {
2
+ a,
3
+ span,
4
+ p,
5
+ i,
6
+ strong,
7
+ h1,
8
+ h2,
9
+ h3,
10
+ h4,
11
+ h5,
12
+ label,
13
+ h6 {
14
+ @content;
15
+ }
16
+ }
17
+
18
+ @mixin heading-tags() {
19
+ h1,
20
+ h2,
21
+ h3,
22
+ h4,
23
+ h5,
24
+ h6 {
25
+ @content;
26
+ }
27
+ }
@@ -0,0 +1,276 @@
1
+ @use "sass:string";
2
+ @import "../initial-variables";
3
+
4
+ @mixin center($width, $height: 0) {
5
+ position: absolute;
6
+
7
+ @if $height != 0 {
8
+ left: calc(50% - (#{$width} / 2));
9
+ top: calc(50% - (#{$height} / 2));
10
+ } @else {
11
+ left: calc(50% - (#{$width} / 2));
12
+ top: calc(50% - (#{$width} / 2));
13
+ }
14
+ }
15
+
16
+ @mixin label-states {
17
+ &:focus,
18
+ &:active,
19
+ &:hover {
20
+ @include hover();
21
+ }
22
+ }
23
+
24
+ // import sass bulma
25
+ @mixin input {
26
+ @include control;
27
+ height: 56px;
28
+ background-color: getColor('background');
29
+ border-color: getColor('neutral');
30
+ color: getColor('font');
31
+
32
+ @include placeholder {
33
+ color: getColor('font') !important;
34
+ filter: grayscale(100%);
35
+ opacity: 1 !important;
36
+ transition: all 0.2s ease-out;
37
+ }
38
+
39
+ @include hover();
40
+ }
41
+
42
+ @mixin checkbox-and-radio($type) {
43
+ //TILES WRAPPER
44
+ .#{$type}-tiles {
45
+ display: flex;
46
+ gap: 16px;
47
+ flex-wrap: wrap;
48
+ }
49
+
50
+ //BOTH
51
+ .#{$type},
52
+ .#{$type}-tile {
53
+ position: relative;
54
+
55
+ label.#{$type}-label {
56
+ cursor: pointer;
57
+ font-size: 14px;
58
+
59
+ &:before,
60
+ &:after {
61
+ content: '';
62
+ position: absolute;
63
+ width: 18px;
64
+ height: 18px;
65
+ }
66
+
67
+ &:before {
68
+ border: var(--border);
69
+ }
70
+ }
71
+
72
+ input {
73
+ opacity: 0;
74
+ position: absolute;
75
+ outline: none;
76
+
77
+ &:checked ~ label.#{$type}-label {
78
+ border-color: getColor('main');
79
+
80
+ &:before {
81
+ border-color: getColor('main');
82
+ }
83
+
84
+ &:after {
85
+ background-color: getColor('main');
86
+ }
87
+ }
88
+ &:focus-visible ~ label.#{$type}-label:before {
89
+ outline: 1px solid;
90
+ }
91
+
92
+ &:disabled,
93
+ &:disabled:checked {
94
+ & ~ label.#{$type}-label {
95
+ &:after {
96
+ background-color: getColor('disabled-fade');
97
+ }
98
+ }
99
+ }
100
+
101
+ &:disabled {
102
+ & ~ label.#{$type}-label {
103
+ &:after {
104
+ background-color: transparent;
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+
111
+ // SIMPLE WITH LABEL ONLY
112
+ .#{$type} {
113
+ display: flex;
114
+ align-items: center;
115
+ width: fit-content;
116
+
117
+ input:disabled,
118
+ input:disabled:checked {
119
+ & ~ label.#{$type}-label {
120
+ @include disabledRulesWithoutBG;
121
+ }
122
+ }
123
+
124
+ label.#{$type}-label {
125
+ padding-left: 30px;
126
+
127
+ &:before,
128
+ &:after {
129
+ top: 50%;
130
+ transform: translateY(-50%);
131
+ left: 0;
132
+ }
133
+ }
134
+
135
+ &:hover &:not(disabled) {
136
+ label.#{$type}-label {
137
+ &:before {
138
+ @include hoverRules();
139
+ }
140
+ }
141
+ }
142
+
143
+ &:focus {
144
+ border: 2px;
145
+ border-color: getColor('main');
146
+ }
147
+ }
148
+
149
+ //TILE ONLY
150
+ .#{$type}-tile {
151
+ position: relative;
152
+ max-width: 160px;
153
+ display: inline-block;
154
+ text-align: center;
155
+
156
+ input:disabled,
157
+ input:disabled:checked {
158
+ & ~ label.#{$type}-label {
159
+ @include disabledRules;
160
+ }
161
+ }
162
+ &:has(input:focus-visible) label.#{$type}-label{
163
+ outline: 1px solid;
164
+ }
165
+
166
+ &:first-child {
167
+ margin-left: 0;
168
+ }
169
+
170
+ &:last-child {
171
+ margin-right: 0;
172
+ }
173
+
174
+ label.#{$type}-label {
175
+ display: block;
176
+ position: relative;
177
+ padding: 40px 16px 16px;
178
+ border: var(--border);
179
+ border-radius: var(--radius);
180
+ box-sizing: border-box;
181
+ background-color: getColor('background');
182
+
183
+ &:before {
184
+ top: 16px;
185
+ right: 16px;
186
+ }
187
+
188
+ span.#{$type}-title {
189
+ font-weight: bold;
190
+ width: 100%;
191
+ display: block;
192
+ font-size: 16px;
193
+ }
194
+ }
195
+
196
+ input {
197
+ &:not(:disabled):not(:checked) ~ label.radio-label {
198
+ @include label-states;
199
+ }
200
+
201
+ &:not(:disabled) ~ label.checkbox-label {
202
+ @include label-states;
203
+ }
204
+
205
+ &:checked:not(:disabled) ~ label.#{$type}-label {
206
+ border-color: getColor('main');
207
+ border-width: 2px;
208
+ padding: 15px;
209
+ padding-top: 39px;
210
+
211
+ &:before {
212
+ top: 15px;
213
+ right: 15px;
214
+ }
215
+
216
+ span.#{$type}-title {
217
+ color: getColor('main');
218
+ }
219
+ }
220
+
221
+ &:disabled {
222
+ & ~ label.#{$type}-label {
223
+ &:before {
224
+ border-color: getColor('disabled') !important;
225
+ }
226
+ }
227
+ }
228
+
229
+ &:disabled:checked ~ label.#{$type}-label {
230
+ .checkbox-title {
231
+ color: getColor('disabled');
232
+ }
233
+ }
234
+ }
235
+
236
+ &.is-horizontal {
237
+ display: flex;
238
+ justify-content: space-between;
239
+ align-items: center;
240
+ max-width: unset;
241
+ width: 100%;
242
+ position: relative;
243
+
244
+ &.is-narrow {
245
+ width: fit-content;
246
+ }
247
+
248
+ input {
249
+ &:checked:not(:disabled) ~ label.#{$type}-label {
250
+ padding: 15px;
251
+ padding-right: 47px;
252
+ }
253
+
254
+ }
255
+
256
+ label.#{$type}-label {
257
+ width: 100%;
258
+ display: flex;
259
+ align-items: center;
260
+ justify-content: flex-start;
261
+ text-align: left;
262
+ padding: 16px 48px 16px 16px;
263
+
264
+ &:before,
265
+ &:after {
266
+ top: 50% !important;
267
+ transform: translateY(-50%);
268
+ }
269
+ }
270
+
271
+ .icon {
272
+ margin-right: 16px;
273
+ }
274
+ }
275
+ }
276
+ }
@@ -0,0 +1,7 @@
1
+ @mixin overlay($offset: 0) {
2
+ position: absolute;
3
+ top: $offset;
4
+ bottom: $offset;
5
+ left: $offset;
6
+ right: $offset;
7
+ }
@@ -0,0 +1,10 @@
1
+ @mixin pattern-light($size, $x-pos: top, $y-pos: center) {
2
+ background-size: $size;
3
+ background-position: $x-pos $y-pos;
4
+ }
5
+
6
+ @mixin pattern-dark($size, $x-pos: top, $y-pos: center) {
7
+ background: linear-gradient(#1b3650, getColor('accent'));
8
+ background-size: auto, $size, auto;
9
+ background-position: top left, $x-pos $y-pos, top left;
10
+ }
@@ -0,0 +1,84 @@
1
+ // Responsiveness
2
+ @mixin from($device) {
3
+ @media screen and (min-width: $device) {
4
+ @content;
5
+ }
6
+ }
7
+
8
+ @mixin until($device) {
9
+ @media screen and (max-width: $device - 1px) {
10
+ @content;
11
+ }
12
+ }
13
+
14
+ @mixin mobile {
15
+ @media screen and (max-width: $tablet - 1px) {
16
+ @content;
17
+ }
18
+ }
19
+
20
+ @mixin tablet {
21
+ @media screen and (min-width: $tablet), print {
22
+ @content;
23
+ }
24
+ }
25
+
26
+ @mixin tablet-only {
27
+ @media screen and (min-width: $tablet) and (max-width: $desktop - 1px) {
28
+ @content;
29
+ }
30
+ }
31
+
32
+ @mixin touch {
33
+ @media screen and (max-width: $desktop - 1px) {
34
+ @content;
35
+ }
36
+ }
37
+
38
+ @mixin desktop {
39
+ @media screen and (min-width: $desktop) {
40
+ @content;
41
+ }
42
+ }
43
+
44
+ @mixin desktop-only {
45
+ @media screen and (min-width: $desktop) and (max-width: $widescreen - 1px) {
46
+ @content;
47
+ }
48
+ }
49
+
50
+ @mixin until-widescreen {
51
+ @media screen and (max-width: $widescreen - 1px) {
52
+ @content;
53
+ }
54
+ }
55
+
56
+ @mixin widescreen {
57
+ @media screen and (min-width: $widescreen) {
58
+ @content;
59
+ }
60
+ }
61
+
62
+ @mixin widescreen-only {
63
+ @media screen and (min-width: $widescreen) and (max-width: $fullhd - 1px) {
64
+ @content;
65
+ }
66
+ }
67
+
68
+ @mixin until-fullhd {
69
+ @media screen and (max-width: $fullhd - 1px) {
70
+ @content;
71
+ }
72
+ }
73
+
74
+ @mixin fullhd {
75
+ @media screen and (min-width: $fullhd) {
76
+ @content;
77
+ }
78
+ }
79
+
80
+ @mixin all-desktop-only {
81
+ @media screen and (min-width: $desktop) and (max-width: $fullhd - 1px) {
82
+ @content;
83
+ }
84
+ }
@@ -0,0 +1,12 @@
1
+ @mixin spinner {
2
+ animation: spinAround 500ms infinite linear;
3
+ border: 2px solid getColor('neutral-fade');
4
+ border-radius: 290486px;
5
+ border-right-color: transparent;
6
+ border-top-color: transparent;
7
+ content: '';
8
+ display: block;
9
+ height: 1em;
10
+ position: relative;
11
+ width: 1em;
12
+ }
@@ -0,0 +1,25 @@
1
+ @mixin hoverRules {
2
+ background-color: getColor('main-fade');
3
+ }
4
+
5
+ @mixin hover {
6
+ &:hover:not(.is-disabled):not(:focus) {
7
+ @include hoverRules();
8
+ }
9
+ &:focus:not(.is-disabled), &:focus-visible:not(.is-disabled) {
10
+ border: 2px solid currentColor;
11
+ }
12
+ }
13
+
14
+ @mixin disabledRulesWithoutBG {
15
+ border-color: getColor('disabled') !important;
16
+ box-shadow: none !important;
17
+ color: getColor('disabled') !important;
18
+ cursor: not-allowed !important;
19
+ filter: grayscale(1);
20
+ }
21
+
22
+ @mixin disabledRules {
23
+ background-color: getColor('disabled-fade') !important;
24
+ @include disabledRulesWithoutBG;
25
+ }
@@ -0,0 +1,10 @@
1
+ %unselectable {
2
+ -webkit-touch-callout: none;
3
+ -webkit-user-select: none;
4
+ -moz-user-select: none;
5
+ -ms-user-select: none;
6
+ user-select: none;
7
+ }
8
+ @mixin unselectable {
9
+ @extend %unselectable;
10
+ }
@@ -0,0 +1,24 @@
1
+ @mixin block {
2
+ &:not(:last-child) {
3
+ margin-bottom: 15px;
4
+ }
5
+ }
6
+
7
+ @mixin overflow-touch {
8
+ -webkit-overflow-scrolling: touch;
9
+ }
10
+
11
+ @mixin placeholder {
12
+ $placeholders: ':-moz' ':-webkit-input' '-moz' '-ms-input';
13
+ @each $placeholder in $placeholders {
14
+ &:#{$placeholder}-placeholder {
15
+ @content;
16
+ }
17
+ }
18
+ }
19
+
20
+ @mixin ellipsis() {
21
+ white-space: nowrap;
22
+ overflow-x: hidden;
23
+ text-overflow: ellipsis;
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trilogy-ds/styles",
3
- "version": "4.1.3-beta-1",
3
+ "version": "4.2.2-beta-1",
4
4
  "author": "Bouygues Telecom",
5
5
  "license": "UNLICENSED",
6
6
  "files": [