@trilogy-ds/styles 4.8.2-beta-2 → 4.8.2
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.
- package/dist/default/trilogy-mangled.css +1 -1
- package/dist/default/trilogy-partials.css +1 -1
- package/dist/default/trilogy.css +1 -1
- package/framework/src/base/_helpers.scss +14 -4
- package/framework/src/base/_loading.scss +1 -1
- package/framework/src/components/_autolayout.scss +112 -106
- package/framework/src/components/_button.scss +3 -0
- package/framework/src/components/_flex-box.scss +240 -0
- package/framework/src/components/_index.scss +1 -1
- package/framework/src/components/_segmented-control.scss +0 -1
- package/framework/src/components/input/_form.scss +2 -2
- package/framework/src/utilities/mixins/_spinner.scss +2 -2
- package/package.json +1 -1
- package/framework/src/components/_stack.scss +0 -43
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
3
|
+
.flex-box {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
--ColumnGap: 8px;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
justify-content: flex-start;
|
|
9
|
+
|
|
10
|
+
// DIRECTION
|
|
11
|
+
&.is-direction-column {
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&.is-direction-row {
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include desktop {
|
|
20
|
+
&.is-direction-row-desktop {
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.is-direction-column-desktop {
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include tablet {
|
|
30
|
+
&.is-direction-row-tablet {
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.is-direction-column-tablet {
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@include mobile {
|
|
40
|
+
&:has(>.flex-item):not([class*='is-direction']) {
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.is-direction-row-mobile {
|
|
45
|
+
flex-direction: row;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.is-direction-column-mobile {
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.is-scrollable {
|
|
54
|
+
overflow: auto;
|
|
55
|
+
width: calc(100% + 48px) !important;
|
|
56
|
+
margin: -24px auto -24px 50% !important;
|
|
57
|
+
transform: translate(-50%);
|
|
58
|
+
padding: 24px;
|
|
59
|
+
scroll-padding: 24px;
|
|
60
|
+
scroll-behavior: smooth;
|
|
61
|
+
scroll-snap-type: x mandatory;
|
|
62
|
+
|
|
63
|
+
@include mobile {
|
|
64
|
+
width: calc(100% + 32px) !important;
|
|
65
|
+
margin: -16px auto -16px 50% !important;
|
|
66
|
+
padding: 16px;
|
|
67
|
+
scroll-padding: 16px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:not(:last-child) {
|
|
71
|
+
margin-bottom: auto !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.flex-item {
|
|
75
|
+
scroll-snap-align: center;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
// GAP
|
|
81
|
+
$gap: 4px, 8px, 12px, 16px, 24px, 32px, 40px, 48px, 54px, 62px;
|
|
82
|
+
|
|
83
|
+
@for $i from 1 through length($gap) {
|
|
84
|
+
$item: nth($gap, $i);
|
|
85
|
+
&.is-mobile.has-gap-#{$i} {
|
|
86
|
+
gap: $item;
|
|
87
|
+
|
|
88
|
+
> .flex-item {
|
|
89
|
+
--ColumnGap: #{$item};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@include tablet {
|
|
94
|
+
&.has-gap-#{$i}:not(.is-desktop) {
|
|
95
|
+
gap: $item;
|
|
96
|
+
|
|
97
|
+
> .flex-item {
|
|
98
|
+
--ColumnGap: #{$item};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include desktop {
|
|
104
|
+
&.has-gap-#{$i},
|
|
105
|
+
&.has-gap-#{$i}-desktop {
|
|
106
|
+
gap: $item;
|
|
107
|
+
|
|
108
|
+
> .flex-item {
|
|
109
|
+
--ColumnGap: #{$item};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@include widescreen {
|
|
115
|
+
&.has-gap-#{$i}-widescreen {
|
|
116
|
+
gap: $item;
|
|
117
|
+
|
|
118
|
+
> .flex-item {
|
|
119
|
+
--ColumnGap: #{$item};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@include fullhd {
|
|
125
|
+
&.has-gap-#{$i}-fullhd {
|
|
126
|
+
gap: $item;
|
|
127
|
+
|
|
128
|
+
> .flex-item {
|
|
129
|
+
--ColumnGap: #{$item};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.is-gapless {
|
|
136
|
+
gap: 0;
|
|
137
|
+
|
|
138
|
+
> .flex-item {
|
|
139
|
+
--ColumnGap: 1px;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
$itemWidth: calc((100% / (var(--ColumnFraction))) - ((((var(--ColumnFraction)) - 1) / (var(--ColumnFraction))) * var(--ColumnGap)));
|
|
144
|
+
$itemSize: (
|
|
145
|
+
"1" : math.div(12, 1),
|
|
146
|
+
"2" : math.div(12, 2),
|
|
147
|
+
"3" : math.div(12, 3),
|
|
148
|
+
"4" : math.div(12, 4),
|
|
149
|
+
"5" : math.div(12, 5),
|
|
150
|
+
"6" : math.div(12, 6),
|
|
151
|
+
"7" : math.div(12, 7),
|
|
152
|
+
"8" : math.div(12, 8),
|
|
153
|
+
"9" : math.div(12, 9),
|
|
154
|
+
"10" : math.div(12, 10),
|
|
155
|
+
"11" : math.div(12, 11),
|
|
156
|
+
"12" : math.div(12, 12),
|
|
157
|
+
"full" : math.div(12, 12),
|
|
158
|
+
"half" : math.div(12, 6)
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
// SIZE
|
|
162
|
+
.flex-item {
|
|
163
|
+
width: 100%;
|
|
164
|
+
|
|
165
|
+
&.is-narrow {
|
|
166
|
+
width: auto;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&[class*="is-"]:not(.is-narrow) {
|
|
170
|
+
width: #{$itemWidth};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&:not(.is-narrow) {
|
|
174
|
+
@include mobile {
|
|
175
|
+
--ColumnFraction: 1;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@each $key, $value in $itemSize {
|
|
181
|
+
.flex-item.is-#{$key} {
|
|
182
|
+
flex: none;
|
|
183
|
+
--ColumnFraction: #{$value};
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@include mobile {
|
|
188
|
+
@each $key, $value in $itemSize {
|
|
189
|
+
.flex-item.is-#{$key}-mobile {
|
|
190
|
+
flex: none;
|
|
191
|
+
--ColumnFraction: #{$value};
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@include tablet {
|
|
197
|
+
@each $key, $value in $itemSize {
|
|
198
|
+
.flex-item.is-#{$key}-tablet {
|
|
199
|
+
flex: none;
|
|
200
|
+
--ColumnFraction: #{$value};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@include touch {
|
|
206
|
+
@each $key, $value in $itemSize {
|
|
207
|
+
.flex-item.is-#{$key}-touch {
|
|
208
|
+
flex: none;
|
|
209
|
+
--ColumnFraction: #{$value};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@include desktop {
|
|
215
|
+
@each $key, $value in $itemSize {
|
|
216
|
+
.flex-item.is-#{$key}-desktop {
|
|
217
|
+
flex: none;
|
|
218
|
+
--ColumnFraction: #{$value};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@include widescreen {
|
|
224
|
+
@each $key, $value in $itemSize {
|
|
225
|
+
.flex-item.is-#{$key}-widescreen {
|
|
226
|
+
flex: none;
|
|
227
|
+
--ColumnFraction: #{$value};
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@include fullhd {
|
|
233
|
+
@each $key, $value in $itemSize {
|
|
234
|
+
.flex-item.is-#{$key}-fullhd {
|
|
235
|
+
flex: none;
|
|
236
|
+
--ColumnFraction: #{$value};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
@import 'countdown';
|
|
17
17
|
@import 'divider';
|
|
18
18
|
@import 'fab';
|
|
19
|
+
@import 'flex-box';
|
|
19
20
|
@import 'icon';
|
|
20
21
|
@import 'image';
|
|
21
22
|
@import 'input';
|
|
@@ -34,7 +35,6 @@
|
|
|
34
35
|
@import 'scroll-view';
|
|
35
36
|
@import 'segmented-control';
|
|
36
37
|
@import 'select';
|
|
37
|
-
@import 'stack';
|
|
38
38
|
@import 'stepper';
|
|
39
39
|
@import 'sticker';
|
|
40
40
|
@import 'switch';
|
|
@@ -416,14 +416,14 @@ $label-weight: $weight-bold;
|
|
|
416
416
|
width: 45px;
|
|
417
417
|
|
|
418
418
|
&::after {
|
|
419
|
-
@include spinner;
|
|
419
|
+
@include spinner();
|
|
420
420
|
@include center(1em);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
&.is-loading {
|
|
425
425
|
&::after {
|
|
426
|
-
@include spinner;
|
|
426
|
+
@include spinner();
|
|
427
427
|
|
|
428
428
|
position: absolute !important;
|
|
429
429
|
right: 0.625em;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@mixin spinner {
|
|
1
|
+
@mixin spinner($color: 'neutral') {
|
|
2
2
|
animation: spinAround 500ms infinite linear;
|
|
3
|
-
border: 2px solid getColor(
|
|
3
|
+
border: 2px solid getColor("#{$color}");
|
|
4
4
|
border-radius: 290486px;
|
|
5
5
|
border-right-color: transparent;
|
|
6
6
|
border-top-color: transparent;
|
package/package.json
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
$gap: 4px,8px,12px,16px,24px,32px,40px,48px,54px,62px;
|
|
2
|
-
|
|
3
|
-
.stack {
|
|
4
|
-
display: flex;
|
|
5
|
-
|
|
6
|
-
&.is-column {
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&.is-row {
|
|
11
|
-
flex-direction: row;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@for $i from 1 through length($gap) {
|
|
17
|
-
$item: nth($gap, $i);
|
|
18
|
-
&.has-gap-#{$i}{
|
|
19
|
-
gap: $item;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@include mobile {
|
|
23
|
-
&.has-gap-mobile-#{$i} {
|
|
24
|
-
gap: $item;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@include tablet {
|
|
29
|
-
&.has-gap-tablet-#{$i} {
|
|
30
|
-
gap: $item;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@include desktop {
|
|
35
|
-
&.has-gap-desktop-#{$i} {
|
|
36
|
-
gap: $item;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|