@trilogy-ds/styles 0.0.1-beta-110 → 0.0.1-beta-112

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 (55) 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 +15 -11
  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 +121 -48
  17. package/framework/src/components/_plus-symbol.scss +1 -1
  18. package/framework/src/components/_price.scss +27 -32
  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 +118 -26
  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 +751 -284
  43. package/framework/src/grid/_rows.scss +42 -44
  44. package/framework/src/layout/_section.scss +18 -1
  45. package/framework/src/theming/buttons_partial.scss +2 -2
  46. package/framework/src/theming/common_partials.scss +1 -1
  47. package/framework/src/utilities/_all.scss +0 -1
  48. package/framework/src/utilities/_background.scss +3 -7
  49. package/framework/src/utilities/_colors.scss +10 -28
  50. package/framework/src/utilities/_derived-variables.scss +3 -3
  51. package/framework/src/utilities/_initial-variables.scss +29 -1
  52. package/framework/src/utilities/_mixins.scss +10 -9
  53. package/package.json +3 -3
  54. package/framework/src/components/_autolayout.scss +0 -290
  55. package/framework/src/utilities/_a11y.scss +0 -13
@@ -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
- &:has(summary:hover):not(.is-disabled) {
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,14 +1,18 @@
1
1
  .divider {
2
- background-color: getColor('neutral');
3
- height: 1px;
4
- width: 100%;
5
- display: flex;
6
- justify-content: center;
7
- align-items: center;
2
+ position: relative;
3
+ text-align: center;
4
+ background-color: getBGColor('hovered');
5
+ height: 1px;
6
+ width: 100%;
7
+ margin: 16px 0;
8
8
 
9
- p.divider-content {
10
- white-space: nowrap;
11
- padding: 0 $spacing-4;
12
- background-color: invertColor('neutral');
13
- }
9
+ p.divider-content {
10
+ position: absolute;
11
+ left: 50%;
12
+ top: 50%;
13
+ transform: translate(-50%, -50%);
14
+ white-space: nowrap;
15
+ padding: 0 $spacing-4;
16
+ background-color: invertColor('neutral');
17
+ }
14
18
  }
@@ -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
+ }
@@ -1,55 +1,115 @@
1
1
  .pagination {
2
2
  font-size: $size-normal;
3
3
  margin: -2.5px;
4
- align-items: center;
5
- display: flex;
6
- justify-content: space-between;
7
- text-align: center;
8
4
 
9
5
  .pagination-previous,
10
- .pagination-next,
11
- .pagination-link,
12
- .pagination-ellipsis {
13
- @include control;
14
- @include unselectable;
15
- font-size: 1em;
16
- padding-left: 0.5em;
17
- padding-right: 0.5em;
18
- justify-content: center;
19
- margin: 2.5px;
20
- text-align: center;
6
+ .pagination-next {
7
+ padding-left: 1em;
8
+ padding-right: 1em;
9
+ height: 35px;
10
+ width: 35px;
11
+ border-radius: 9999px;
21
12
  }
22
13
 
23
- .pagination-previous,
24
- .pagination-next,
25
- .pagination-link,
26
- .pagination-ellipsis {
27
- @include hover();
28
- color: getColor('font');
29
- min-width: 2.25em;
14
+ .pagination-link {
30
15
  height: 35px;
31
- width: 35px;
32
16
  border-radius: 9999px;
33
- padding-left: 0.75em;
34
- padding-right: 0.75em;
35
- white-space: nowrap;
36
17
  }
37
18
 
38
19
  .pagination-list {
39
20
  flex: 0 0 auto;
21
+ }
22
+
23
+ }
24
+
25
+ .pagination,
26
+ .pagination-list {
27
+ align-items: center;
28
+ display: flex;
29
+ justify-content: center;
30
+ text-align: center;
31
+ }
32
+
33
+ .pagination-previous,
34
+ .pagination-next,
35
+ .pagination-link,
36
+ .pagination-ellipsis {
37
+ @include control;
38
+ @include unselectable;
39
+
40
+ font-size: 1em;
41
+ padding-left: 0.5em;
42
+ padding-right: 0.5em;
43
+ justify-content: center;
44
+ margin: 2.5px;
45
+ text-align: center;
46
+ }
47
+
48
+ .pagination-previous,
49
+ .pagination-next,
50
+ .pagination-link {
51
+ color: getColor('neutral-dark');
52
+ min-width: 2.25em;
53
+
54
+ @include hover();
55
+
56
+ }
57
+
58
+ .pagination-previous,
59
+ .pagination-next {
60
+ padding-left: 0.75em;
61
+ padding-right: 0.75em;
62
+ white-space: nowrap;
63
+ }
64
+
65
+ .pagination-link {
66
+ &[aria-current] {
67
+ background-color: getColor('font');
68
+ color: getColor('background');
69
+
70
+ #{$hoverSelector}, &:focus, &:focus-within {
71
+ background-color: getColor('hovered');
72
+ }
73
+ }
74
+ }
75
+
76
+ .pagination-ellipsis {
77
+ color: getColor('background');
78
+ pointer-events: none;
79
+ }
80
+
81
+ .pagination-list {
82
+ flex-wrap: wrap;
83
+ }
84
+
85
+ @include mobile {
86
+ .pagination {
40
87
  flex-wrap: wrap;
88
+ }
89
+
90
+ .pagination-previous,
91
+ .pagination-next {
41
92
  flex-grow: 1;
42
- align-items: center;
43
- display: flex;
44
- justify-content: center;
45
- text-align: center;
93
+ flex-shrink: 1;
46
94
  }
47
95
 
48
- .pagination-previous {
49
- order: 1;
96
+ .pagination-list {
97
+ li {
98
+ flex-grow: 1;
99
+ flex-shrink: 1;
100
+ }
50
101
  }
102
+ }
51
103
 
104
+ @include tablet {
52
105
  .pagination-list {
106
+ flex-grow: 1;
107
+ flex-shrink: 1;
108
+ justify-content: flex-start;
109
+ order: 1;
110
+ }
111
+
112
+ .pagination-previous {
53
113
  order: 2;
54
114
  }
55
115
 
@@ -57,24 +117,37 @@
57
117
  order: 3;
58
118
  }
59
119
 
60
- .pagination-link {
61
- &[aria-current] {
62
- background-color: getColor('font');
63
- color: getColor('background');
64
- #{$hoverSelector}, &:focus, &:focus-within {
65
- background: linear-gradient(
66
- to top,
67
- rgba(0, 0, 0, 0.25),
68
- rgba(0, 0, 0, 0.25)
69
- ) getColor('font') !important;
120
+ .pagination {
121
+ justify-content: space-between;
122
+
123
+ &.is-centered {
124
+ .pagination-previous {
125
+ order: 1;
70
126
  }
71
- }
72
- }
73
127
 
74
- .pagination-ellipsis {
75
- pointer-events: none;
76
- }
128
+ .pagination-list {
129
+ justify-content: center;
130
+ order: 2;
131
+ }
77
132
 
78
- }
133
+ .pagination-next {
134
+ order: 3;
135
+ }
136
+ }
137
+
138
+ &.is-right {
139
+ .pagination-previous {
140
+ order: 1;
141
+ }
79
142
 
143
+ .pagination-next {
144
+ order: 2;
145
+ }
80
146
 
147
+ .pagination-list {
148
+ justify-content: flex-end;
149
+ order: 3;
150
+ }
151
+ }
152
+ }
153
+ }