@trilogy-ds/styles 0.0.1-beta-99 → 0.0.1-beta-103

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 (54) 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 +17 -9
  5. package/framework/src/base/_generic.scss +1 -1
  6. package/framework/src/base/_helpers.scss +5 -2
  7. package/framework/src/components/_accordion.scss +6 -13
  8. package/framework/src/components/_all.scss +1 -1
  9. package/framework/src/components/_autolayout2.scss +38 -0
  10. package/framework/src/components/_card.scss +1 -1
  11. package/framework/src/components/_divider.scss +2 -1
  12. package/framework/src/components/_fab.scss +19 -20
  13. package/framework/src/components/_level.scss +120 -0
  14. package/framework/src/components/_media.scss +64 -0
  15. package/framework/src/components/_modal.scss +3 -7
  16. package/framework/src/components/_pagination.scss +3 -6
  17. package/framework/src/components/_plus-symbol.scss +1 -1
  18. package/framework/src/components/_price.scss +26 -31
  19. package/framework/src/components/_segmented-control.scss +2 -2
  20. package/framework/src/components/_stepper.scss +2 -2
  21. package/framework/src/components/_timeline.scss +14 -11
  22. package/framework/src/elements/_alert.scss +3 -1
  23. package/framework/src/elements/_all.scss +1 -0
  24. package/framework/src/elements/_autocomplete.scss +3 -3
  25. package/framework/src/elements/_badge.scss +7 -10
  26. package/framework/src/elements/_box.scss +2 -2
  27. package/framework/src/elements/_button.scss +2 -2
  28. package/framework/src/elements/_chips.scss +3 -3
  29. package/framework/src/elements/_dot.scss +6 -0
  30. package/framework/src/elements/_entry.scss +1 -1
  31. package/framework/src/elements/_form.scss +14 -14
  32. package/framework/src/elements/_icon.scss +1 -1
  33. package/framework/src/elements/_loader.scss +1 -1
  34. package/framework/src/elements/_other.scss +37 -0
  35. package/framework/src/elements/_progress.scss +5 -5
  36. package/framework/src/elements/_sticker.scss +1 -1
  37. package/framework/src/elements/_switch.scss +4 -4
  38. package/framework/src/elements/_table.scss +11 -11
  39. package/framework/src/elements/_tag.scss +3 -3
  40. package/framework/src/elements/_textarea.scss +1 -18
  41. package/framework/src/elements/_toaster.scss +2 -2
  42. package/framework/src/grid/_columns.scss +1 -1
  43. package/framework/src/layout/_section.scss +18 -1
  44. package/framework/src/theming/buttons_partial.scss +2 -2
  45. package/framework/src/theming/common_partials.scss +1 -1
  46. package/framework/src/utilities/_all.scss +0 -1
  47. package/framework/src/utilities/_background.scss +3 -7
  48. package/framework/src/utilities/_derived-variables.scss +3 -3
  49. package/framework/src/utilities/_initial-variables.scss +29 -1
  50. package/framework/src/utilities/_mixins.scss +8 -7
  51. package/package.json +3 -3
  52. package/framework/src/components/_autolayout.scss +0 -290
  53. package/framework/src/utilities/_a11y.scss +0 -13
  54. package/framework/src/utilities/_colors.scss +0 -40
@@ -1,28 +1,36 @@
1
1
  @use "sass:map";
2
2
 
3
3
  @function getColor( $name ) {
4
- @return var(--color-#{nth(map-get($colors,$name),2)});
4
+ @if str-slice($name, 0, 3) == 'bg-' {
5
+ $submane: str-slice($name, 4);
6
+ @return getBGColor( $submane );
7
+ }
8
+ @return var(--color-#{nth(map-get($colors,$name),1)})
5
9
  }
6
10
 
7
11
  @function getColorValue( $name ) {
8
- @return #{nth(map-get($colors,$name),1)}
12
+ @return #{nth(map-get($colors,$name),2)}
13
+ }
14
+
15
+ @function getBGColorValue( $name ) {
16
+ @return #{nth(map-get($colors,$name),4)}
9
17
  }
10
18
 
11
19
  @function getColorBrandName( $name ) {
12
- @return #{nth(map-get($colors,$name),2)}
20
+ @return #{nth(map-get($colors,$name),1)}
21
+ }
22
+
23
+ @function getBGColor( $name ) {
24
+ @return var(--color-bg-#{nth(map-get($colors,$name),1)})
13
25
  }
14
26
 
15
27
  :root {
16
28
  @each $name, $color in $colors {
17
- --color-#{nth($color,2)}: #{nth($color,1)};
29
+ --color-#{nth($color,1)}: #{nth($color,2)};
30
+ --color-bg-#{nth($color,1)}: #{nth($color,4)};
18
31
  }
19
32
  }
20
33
 
21
34
  @function invertColor ($colorName) {
22
35
  @return var(--color-#{nth(map-get($colors,$colorName),3)})
23
36
  }
24
-
25
- @function fadeColor ($colorName) {
26
- $name: map-get($fade-colors,$colorName);
27
- @return getColor($name);
28
- }
@@ -7,7 +7,7 @@ $body-line-height: 1.5 !default;
7
7
  .html-wrap {
8
8
  margin: 0;
9
9
  padding: 0;
10
- background-color: getColor('background');
10
+ background-color: getBGColor('neutral');
11
11
  font-size: $body-size;
12
12
  -moz-osx-font-smoothing: grayscale;
13
13
  -webkit-font-smoothing: antialiased;
@@ -197,8 +197,8 @@ $alignments: (
197
197
 
198
198
  @mixin typography-colors() {
199
199
  @each $name, $color in $colors {
200
- $brandName: nth($color, 2);
201
- $color: nth($color, 1);
200
+ $brandName: nth($color, 1);
201
+ $color: nth($color, 2);
202
202
  $color-invert: invertColor($name);
203
203
 
204
204
  .has-text-#{$brandName} {
@@ -210,6 +210,9 @@ $alignments: (
210
210
  .has-background-#{$brandName} {
211
211
  background-color: getColor($name) !important;
212
212
  }
213
+ .has-background-#{$brandName}-fade {
214
+ background-color: getBGColor($name) !important;
215
+ }
213
216
  }
214
217
  }
215
218
 
@@ -1,18 +1,15 @@
1
1
  .accordions#{$suffix} {
2
2
  padding-left: 0;
3
3
  padding-right: 0;
4
+ margin: $spacing-4 0;
4
5
 
5
- /* Chrome + Webkit */
6
6
  details.accordion ::-webkit-details-marker {
7
7
  display: none;
8
8
  content: "";
9
9
  }
10
10
 
11
- details.accordion summary {
12
- list-style-image: none;
13
- }
14
-
15
11
  .accordion {
12
+
16
13
  box-sizing: border-box;
17
14
  display: flex;
18
15
  flex-direction: column;
@@ -23,7 +20,7 @@
23
20
  margin: 8px 0;
24
21
  min-height: 56px;
25
22
  max-height: max-content;
26
- transition: margin 0.3s;
23
+ transition: 0.3s;
27
24
 
28
25
  .accordion-header {
29
26
  font-weight: bold;
@@ -34,13 +31,13 @@
34
31
  padding-top: 0 !important;
35
32
  }
36
33
 
37
- &[open]:hover {
34
+ &:has(summary:hover):not(.is-disabled) {
38
35
  @include hoverRules();
39
36
  }
40
37
 
41
- &:has(summary:focus-visible) {
38
+ &:focus-visible {
42
39
  outline: var(--border-active);
43
- outline-offset: -2px;
40
+ outline-offset: 2px;
44
41
  }
45
42
 
46
43
  .accordion-header:after {
@@ -68,10 +65,6 @@
68
65
  border-radius: var(--radius);
69
66
  transition: margin 300ms ease-out;
70
67
 
71
- &:focus-visible{
72
- outline: none;
73
- }
74
-
75
68
  }
76
69
 
77
70
  &[open] .accordion-header {
@@ -1,10 +1,10 @@
1
1
  @charset "utf-8";
2
2
  @import '../utilities/spacing';
3
3
 
4
- @import 'autolayout';
5
4
  @import 'divider';
6
5
  @import 'breadcrumb';
7
6
  @import 'card';
7
+ @import 'level';
8
8
  @import 'modal';
9
9
  @import 'pagination';
10
10
  @import 'popover';
@@ -0,0 +1,38 @@
1
+ body:not(.is-tight) {
2
+ .box {
3
+ margin-top: 16px;
4
+ }
5
+ .box:not(:first-child) + * {
6
+ margin-top: 16px;
7
+ }
8
+ * + .box {
9
+ margin-top: 8px;
10
+ }
11
+ .text {
12
+ margin-top: 8px;
13
+ }
14
+ .card {
15
+ margin-top: 16px;
16
+ }
17
+ .button {
18
+ margin-top: 16px;
19
+ }
20
+ .accordions {
21
+ margin-top: 16px;
22
+ }
23
+ .alert {
24
+ margin-top: 16px;
25
+ }
26
+ .field {
27
+ margin-top: 8px;
28
+ }
29
+ .chips-list {
30
+ margin-top: 16px;
31
+ }
32
+ .tags {
33
+ margin-top: 16px;
34
+ }
35
+ .chips-list {
36
+ margin-top: 16px;
37
+ }
38
+ }
@@ -6,7 +6,7 @@
6
6
  flex-direction: column;
7
7
  position: relative;
8
8
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
9
- background-color: getColor('background');
9
+ background-color: getColor("background");
10
10
 
11
11
  &:not(:last-child) {
12
12
  margin-bottom: 15px;
@@ -1,9 +1,10 @@
1
1
  .divider {
2
2
  position: relative;
3
3
  text-align: center;
4
- background-color: getColor('neutral-fade');
4
+ background-color: getBGColor('hovered');
5
5
  height: 1px;
6
6
  width: 100%;
7
+ margin: 16px 0;
7
8
 
8
9
  p.divider-content {
9
10
  position: absolute;
@@ -7,41 +7,40 @@
7
7
  display: inline-flex;
8
8
  align-items: center;
9
9
  box-sizing: border-box;
10
- transition: max-width 500ms ease-out;
11
- color: white;
10
+ transition: 0.4s;
11
+ color: transparent;
12
+ letter-spacing: -9px;
12
13
  border: 0;
13
14
  box-shadow: 0px 3px 6px 0px #00000033;
14
- font-size: 16px;
15
+ font-style: normal;
15
16
  font-weight: 600;
17
+ font-size: medium;
16
18
  line-height: 20px;
19
+
17
20
  z-index: 9;
18
- overflow: hidden;
19
- max-width: 54px;
20
- white-space: nowrap;
21
21
 
22
22
  #{$hoverSelector}, &.is-extended, &:focus, &:focus-visible, &:focus-within {
23
- background: linear-gradient(
24
- to top,
25
- rgba(0, 0, 0, 0.25),
26
- rgba(0, 0, 0, 0.25)
27
- ) getColor('font');
28
- max-width: 300px;
23
+ background-color: getColor('hovered');
24
+ transition-duration: 0.5s;
25
+ letter-spacing: initial;
26
+ color: white;
27
+
28
+ .icon,
29
+ .icon .is-small,
30
+ .icon .is-medium,
31
+ .icon .is-large {
32
+ margin-right: 16px;
33
+ }
29
34
  }
30
35
 
31
36
  &:active {
32
- background: linear-gradient(
33
- to top,
34
- rgba(0, 0, 0, 0.25),
35
- rgba(0, 0, 0, 0.25)
36
- ) getColor('font');
37
+ background-color: getColor('hovered');
37
38
  }
38
39
 
39
40
  .icon {
40
- flex: none;
41
41
  font-size: 24px !important;
42
42
  margin-left: -6px;
43
- margin-right: 8px;
43
+ margin-right: -6px;
44
44
  color: white;
45
-
46
45
  }
47
46
  }
@@ -0,0 +1,120 @@
1
+ .level {
2
+ @include block;
3
+
4
+ align-items: center;
5
+ justify-content: space-between;
6
+
7
+ code {
8
+ border-radius: var(--radius);
9
+ }
10
+
11
+ img {
12
+ display: inline-block;
13
+ vertical-align: top;
14
+ }
15
+
16
+ // Modifiers
17
+ &.is-mobile {
18
+ display: flex;
19
+
20
+ .level-left,
21
+ .level-right {
22
+ display: flex;
23
+ }
24
+
25
+ .level-left + .level-right {
26
+ margin-top: 0;
27
+ }
28
+
29
+ .level-item {
30
+ margin-right: 7.4px;
31
+
32
+ &:not(:last-child) {
33
+ margin-bottom: 0;
34
+ }
35
+
36
+ &:not(.is-narrow) {
37
+ flex-grow: 1;
38
+ }
39
+ }
40
+ }
41
+
42
+ // Responsiveness
43
+ @include tablet {
44
+ display: flex;
45
+
46
+ & > .level-item {
47
+ &:not(.is-narrow) {
48
+ flex-grow: 1;
49
+ }
50
+ }
51
+ }
52
+ }
53
+
54
+ .level-item {
55
+ align-items: center;
56
+ display: flex;
57
+ flex-basis: auto;
58
+ flex-grow: 0;
59
+ flex-shrink: 0;
60
+ justify-content: center;
61
+
62
+ .title,
63
+ .subtitle {
64
+ margin-bottom: 0;
65
+ }
66
+
67
+ // Responsiveness
68
+ @include mobile {
69
+ &:not(:last-child) {
70
+ margin-bottom: 7.5px;
71
+ }
72
+ }
73
+ }
74
+
75
+ .level-left,
76
+ .level-right {
77
+ flex-basis: auto;
78
+ flex-grow: 0;
79
+ flex-shrink: 0;
80
+
81
+ .level-item {
82
+ // Modifiers
83
+ &.is-flexible {
84
+ flex-grow: 1;
85
+ }
86
+
87
+ // Responsiveness
88
+ @include tablet {
89
+ &:not(:last-child) {
90
+ margin-right: 7.5px;
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ .level-left {
97
+ align-items: center;
98
+ justify-content: flex-start;
99
+
100
+ // Responsiveness
101
+ @include mobile {
102
+ & + .level-right {
103
+ margin-top: 15px;
104
+ }
105
+ }
106
+
107
+ @include tablet {
108
+ display: flex;
109
+ }
110
+ }
111
+
112
+ .level-right {
113
+ align-items: center;
114
+ justify-content: flex-end;
115
+
116
+ // Responsiveness
117
+ @include tablet {
118
+ display: flex;
119
+ }
120
+ }
@@ -0,0 +1,64 @@
1
+ .media {
2
+ align-items: flex-start;
3
+ display: flex;
4
+ text-align: left;
5
+
6
+ .content:not(:last-child) {
7
+ margin-bottom: 7.5px;
8
+ }
9
+
10
+ .media {
11
+ border-top: 1px solid getBGColor('neutral');
12
+ display: flex;
13
+ padding-top: 7.5px;
14
+
15
+ .content:not(:last-child),
16
+ .control:not(:last-child) {
17
+ margin-bottom: 5px;
18
+ }
19
+
20
+ .media {
21
+ padding-top: 5px;
22
+
23
+ & + .media {
24
+ margin-top: 5px;
25
+ }
26
+ }
27
+ }
28
+
29
+ & + .media {
30
+ border-top: 1px solid getBGColor('neutral');
31
+ margin-top: 10px;
32
+ padding-top: 10px;
33
+ }
34
+
35
+ // Sizes
36
+ &.is-large {
37
+ & + .media {
38
+ margin-top: 15px;
39
+ padding-top: 15px;
40
+ }
41
+ }
42
+ }
43
+
44
+ .media-left,
45
+ .media-right {
46
+ flex-basis: auto;
47
+ flex-grow: 0;
48
+ flex-shrink: 0;
49
+ }
50
+
51
+ .media-left {
52
+ margin-right: 10px;
53
+ }
54
+
55
+ .media-right {
56
+ margin-left: 10px;
57
+ }
58
+
59
+ .media-content {
60
+ flex-basis: auto;
61
+ flex-grow: 1;
62
+ flex-shrink: 1;
63
+ text-align: left;
64
+ }
@@ -135,7 +135,7 @@ body:has(.modal.is-active) {
135
135
  z-index: zindex('medium');
136
136
 
137
137
  #{$hoverSelector} {
138
- background-color: getColor('neutral-fade');
138
+ background-color: getBGColor('neutral');
139
139
  }
140
140
 
141
141
  &::after,
@@ -145,11 +145,6 @@ body:has(.modal.is-active) {
145
145
  }
146
146
 
147
147
  .modal-title {
148
- padding: 20px 0;
149
- }
150
-
151
- .modal-title,
152
- .modal-header {
153
148
  color: getColor('font');
154
149
  font-family: $family-sans-serif;
155
150
  font-size: $size-3;
@@ -159,6 +154,7 @@ body:has(.modal.is-active) {
159
154
  z-index: zindex('small');
160
155
  position: sticky;
161
156
  top: 0;
157
+ padding: 20px 0;
162
158
  width: 100%;
163
159
  word-wrap: break-word;
164
160
 
@@ -203,4 +199,4 @@ body:has(.modal.is-active) {
203
199
  }
204
200
  }
205
201
  }
206
- }
202
+ }
@@ -48,7 +48,7 @@
48
48
  .pagination-previous,
49
49
  .pagination-next,
50
50
  .pagination-link {
51
- color: getColor('neutral');
51
+ color: getColor('neutral-dark');
52
52
  min-width: 2.25em;
53
53
 
54
54
  @include hover();
@@ -66,12 +66,9 @@
66
66
  &[aria-current] {
67
67
  background-color: getColor('font');
68
68
  color: getColor('background');
69
+
69
70
  #{$hoverSelector}, &:focus, &:focus-within {
70
- background: linear-gradient(
71
- to top,
72
- rgba(0, 0, 0, 0.25),
73
- rgba(0, 0, 0, 0.25)
74
- ) getColor('font') !important;
71
+ background-color: getColor('hovered');
75
72
  }
76
73
  }
77
74
  }
@@ -1,6 +1,6 @@
1
1
  $plus-symbol-size: 40px;
2
2
 
3
- @mixin plus-symbol($color: getColor('neutral-fade'), $text-color: getColor('neutral')) {
3
+ @mixin plus-symbol($color: getBGColor('neutral-dark'), $text-color: getColor('neutral-dark')) {
4
4
  &::after {
5
5
  content: "+";
6
6
  display: inline-block;
@@ -8,30 +8,6 @@ $price-levels: (
8
8
  ($text-20),
9
9
  );
10
10
 
11
- .price-container {
12
- display: flex;
13
- align-items: baseline;
14
- column-gap: 12px;
15
- flex-wrap: wrap;
16
-
17
- .overline {
18
- width: 100%;
19
- flex: none;
20
- margin: 0;
21
- --font-size: #{$text-64};
22
- font-size: calc(var(--font-size) * 0.4);
23
-
24
- @each $price-level in $price-levels {
25
- $i: index($price-levels, $price-level);
26
- $font-size: nth($price-level, 1);
27
-
28
- &:has(~ .price.is-level-#{$i}:not(.is-striked)) {
29
- --font-size: #{$font-size};
30
- }
31
- }
32
- }
33
- }
34
-
35
11
  .price {
36
12
  display: inline-flex;
37
13
  font-weight: $weight-semibold;
@@ -94,6 +70,7 @@ $price-levels: (
94
70
  &::before {
95
71
  border-width: 3px;
96
72
  margin-left: -6px;
73
+ margin-top: 4px;
97
74
  border-radius: 1px;
98
75
  }
99
76
  font-size: $text-10;
@@ -145,6 +122,16 @@ $price-levels: (
145
122
  color: getColor('background');
146
123
  }
147
124
 
125
+ &.has-suptitle {
126
+ display: flex;
127
+ flex-wrap: wrap;
128
+
129
+ .price-suptitle {
130
+ flex-basis: 100%;
131
+ font-size: 0.375em;
132
+ }
133
+ }
134
+
148
135
  &.has-description {
149
136
  .cents,
150
137
  .centimes {
@@ -183,7 +170,7 @@ $price-levels: (
183
170
 
184
171
  &.is-striked {
185
172
  position: relative;
186
- color: getColor('main-fade');
173
+ color: getBGColor('font');
187
174
 
188
175
  &::before {
189
176
  position: absolute;
@@ -198,18 +185,27 @@ $price-levels: (
198
185
  }
199
186
 
200
187
  &.is-inverted {
201
- color: getColor('main-fade');
188
+ color: getBGColor('font');
202
189
 
203
190
  &::before {
204
191
  border-color: getColor('background');
205
192
  }
206
193
  }
194
+
195
+ &.has-suptitle {
196
+ display: inline-flex;
197
+ margin-top: 0.55em;
198
+
199
+ .price-suptitle {
200
+ position: absolute;
201
+ top: -1.4em;
202
+ }
203
+ }
207
204
  }
208
205
  }
209
206
 
210
207
  .price-tag {
211
- align-self: center;
212
- background-color: getColor('accent');
208
+ background-color: getColor('alternate');
213
209
  margin-left: 10px;
214
210
  border-radius: 6px;
215
211
  display: inline-flex;
@@ -220,12 +216,11 @@ $price-levels: (
220
216
  line-height: 1em;
221
217
  align-items: baseline;
222
218
  position: relative;
223
- margin-left: -4px;
224
219
  &::before {
225
220
  content: '';
226
221
  border-color: transparent;
227
- border-bottom-color: getColor('accent');
228
- border-left-color: getColor('accent');
222
+ border-bottom-color: getColor('alternate');
223
+ border-left-color: getColor('alternate');
229
224
  transform: rotate(45deg);
230
225
  border-style: solid;
231
226
  border-width: 5px;
@@ -1,7 +1,7 @@
1
1
  .segmented-control {
2
2
  border-radius: 6px;
3
3
  padding: $spacing-1;
4
- background-color: getColor('neutral-fade');
4
+ background-color: getBGColor('neutral');
5
5
  display: inline-block;
6
6
  margin: 16px 0;
7
7
 
@@ -19,7 +19,7 @@
19
19
  border: 2px solid transparent;
20
20
  height: 42px;
21
21
  color: getColor('font');
22
- background-color: getColor('neutral-fade');
22
+ background-color: getBGColor('neutral');
23
23
 
24
24
  &:not(:last-child) {
25
25
  margin-right: 4px;
@@ -23,7 +23,7 @@
23
23
  height: 4px;
24
24
  border-radius: var(--radius-small);
25
25
  background-size: 200% !important;
26
- background-color: getColor('neutral-fade');
26
+ background-color: getBGColor('neutral');
27
27
  }
28
28
 
29
29
  &.is-error {
@@ -204,7 +204,7 @@
204
204
 
205
205
  @keyframes progress {
206
206
  0%, 100% {
207
- background-image: linear-gradient(to right, transparent 0, transparent 50%, getColor('neutral-fade') 50%, getColor('neutral-fade') 100%);
207
+ background-image: linear-gradient(to right, transparent 0, transparent 50%, getBGColor('neutral') 50%, getBGColor('neutral') 100%);
208
208
  }
209
209
  0% {
210
210
  background-position: 100% 0;