@trilogy-ds/styles 0.0.1-beta.9 → 0.0.3-beta-v4

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 (94) 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 +9 -39
  5. package/framework/src/base/_generic.scss +4 -1
  6. package/framework/src/base/_helpers.scss +13 -38
  7. package/framework/src/base/_loading.scss +8 -1
  8. package/framework/src/base/_reset.scss +8 -3
  9. package/framework/src/components/_accordion.scss +53 -88
  10. package/framework/src/components/_all.scss +1 -7
  11. package/framework/src/components/_autolayout.scss +302 -0
  12. package/framework/src/components/_breadcrumb.scss +39 -34
  13. package/framework/src/components/_card.scss +8 -79
  14. package/framework/src/components/_countdown.scss +49 -47
  15. package/framework/src/components/_divider.scss +10 -15
  16. package/framework/src/components/_fab.scss +25 -38
  17. package/framework/src/components/_modal.scss +161 -158
  18. package/framework/src/components/_otp.scss +10 -29
  19. package/framework/src/components/_pagination.scss +59 -161
  20. package/framework/src/components/_plus-symbol.scss +1 -1
  21. package/framework/src/components/_popover.scss +260 -260
  22. package/framework/src/components/_price.scss +119 -170
  23. package/framework/src/components/_product-tour.scss +2 -4
  24. package/framework/src/components/_progress-radial.scss +24 -19
  25. package/framework/src/components/_range.scss +73 -72
  26. package/framework/src/components/_segmented-control.scss +51 -53
  27. package/framework/src/components/_stepper.scss +42 -222
  28. package/framework/src/components/_tabs.scss +46 -81
  29. package/framework/src/components/_timeline.scss +27 -112
  30. package/framework/src/elements/_alert.scss +13 -10
  31. package/framework/src/elements/_all.scss +1 -4
  32. package/framework/src/elements/_autocomplete.scss +32 -0
  33. package/framework/src/elements/_badge.scss +67 -61
  34. package/framework/src/elements/_box.scss +64 -161
  35. package/framework/src/elements/_button.scss +15 -141
  36. package/framework/src/elements/_checkbox.scss +29 -26
  37. package/framework/src/elements/_chips.scss +69 -85
  38. package/framework/src/elements/_container.scss +7 -39
  39. package/framework/src/elements/_entry.scss +76 -88
  40. package/framework/src/elements/_form.scss +26 -23
  41. package/framework/src/elements/_icon.scss +4 -4
  42. package/framework/src/elements/_image.scss +50 -40
  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 +45 -44
  47. package/framework/src/elements/_loader.scss +2 -2
  48. package/framework/src/elements/_other.scss +0 -37
  49. package/framework/src/elements/_paragraph.scss +35 -69
  50. package/framework/src/elements/_progress.scss +33 -22
  51. package/framework/src/elements/_radio.scss +45 -31
  52. package/framework/src/elements/_select.scss +85 -304
  53. package/framework/src/elements/_sticker.scss +12 -27
  54. package/framework/src/elements/_switch.scss +101 -99
  55. package/framework/src/elements/_table.scss +175 -228
  56. package/framework/src/elements/_tag.scss +104 -105
  57. package/framework/src/elements/_textarea.scss +113 -105
  58. package/framework/src/elements/_title.scss +89 -87
  59. package/framework/src/elements/_toaster.scss +4 -5
  60. package/framework/src/grid/_columns.scss +257 -764
  61. package/framework/src/grid/_rows.scss +45 -38
  62. package/framework/src/layout/_all.scss +0 -1
  63. package/framework/src/layout/_hero.scss +89 -215
  64. package/framework/src/layout/_section.scss +5 -29
  65. package/framework/src/theming/_all.scss +3 -0
  66. package/framework/src/theming/buttons_partial.scss +32 -0
  67. package/framework/src/theming/common_partials.scss +10 -0
  68. package/framework/src/theming/links_partial.scss +20 -0
  69. package/framework/src/utilities/_a11y.scss +13 -0
  70. package/framework/src/utilities/_all.scss +4 -0
  71. package/framework/src/utilities/_background.scss +19 -0
  72. package/framework/src/utilities/_colors.scss +40 -0
  73. package/framework/src/utilities/_controls.scss +38 -49
  74. package/framework/src/utilities/_derived-variables.scss +4 -15
  75. package/framework/src/utilities/_initial-variables.scss +4 -36
  76. package/framework/src/utilities/_mixins.scss +483 -592
  77. package/framework/src/utilities/_pre.scss +1 -0
  78. package/package.json +3 -3
  79. package/framework/src/components/_autolayout2.scss +0 -38
  80. package/framework/src/components/_disclaimer.scss +0 -84
  81. package/framework/src/components/_dropdown.scss +0 -128
  82. package/framework/src/components/_level.scss +0 -120
  83. package/framework/src/components/_media.scss +0 -64
  84. package/framework/src/components/_menu.scss +0 -213
  85. package/framework/src/components/_search-modal.scss +0 -197
  86. package/framework/src/components/_slices.scss +0 -316
  87. package/framework/src/components/_slider.scss +0 -92
  88. package/framework/src/components/_switch.scss +0 -209
  89. package/framework/src/elements/_checkradio.scss +0 -173
  90. package/framework/src/elements/_dot.scss +0 -6
  91. package/framework/src/elements/_notification.scss +0 -151
  92. package/framework/src/elements/_options.scss +0 -146
  93. package/framework/src/elements/_timeline.scss +0 -283
  94. package/framework/src/layout/_toolbar.scss +0 -100
@@ -1,58 +1,28 @@
1
1
  @use "sass:map";
2
2
 
3
3
  @function getColor( $name ) {
4
- @return var(--color-#{nth(map-get($colors,$name),1)})
4
+ @return var(--color-#{nth(map-get($colors,$name),2)});
5
5
  }
6
6
 
7
7
  @function getColorValue( $name ) {
8
- @return #{nth(map-get($colors,$name),2)}
8
+ @return #{nth(map-get($colors,$name),1)}
9
9
  }
10
10
 
11
11
  @function getColorBrandName( $name ) {
12
- @return #{nth(map-get($colors,$name),1)}
12
+ @return #{nth(map-get($colors,$name),2)}
13
13
  }
14
14
 
15
- @function getVariantColor($name, $n:1) {
16
- @return #{nth(map-get($colors,$name),$n+3)}
17
- };
18
-
19
15
  :root {
20
16
  @each $name, $color in $colors {
21
- --color-#{nth($color,1)}: #{nth($color,2)};
22
- }
23
-
24
- // Colors
25
- @each $name, $color in $colors {
26
- $colorname: nth($color, 1);
27
- $bgcolorval: nth($color, 2);
28
- $colorval: nth($color, 3);
29
- .has-background-#{$colorname} {
30
- background-color: var(--color-#{$colorname}) !important;
31
- color: var(--color-#{$colorval});
32
- }
17
+ --color-#{nth($color,2)}: #{nth($color,1)};
33
18
  }
34
19
  }
35
20
 
36
- .is-hovered {
37
- background-color: var(--color-hovered);
21
+ @function invertColor ($colorName) {
22
+ @return var(--color-#{nth(map-get($colors,$colorName),3)})
38
23
  }
39
24
 
40
- @function invertColor ($colorName, $context:'') {
41
- $invertcolormap: ('tertiary': 'grey-dark', 'grey-dark': 'grey-light', 'grey-light': 'grey-dark');
42
- $defaultInvert: white;
43
-
44
- @if ($context == 'dark') {
45
- $invertcolormap: ('tertiary':'var(--color-success)');
46
- $defaultInvert: black;
47
- }
48
-
49
- @if ($context == 'accordion') {
50
- $defaultInvert: 'grey-lighter'
51
- }
52
-
53
- $result: map.get($invertcolormap, $colorName);
54
- @if ($result) {
55
- @return $result
56
- }
57
- @return $defaultInvert
25
+ @function fadeColor ($colorName) {
26
+ $name: map-get($fade-colors,$colorName);
27
+ @return getColor($name);
58
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('grey-lighter');
10
+ background-color: getColor('background');
11
11
  font-size: $body-size;
12
12
  -moz-osx-font-smoothing: grayscale;
13
13
  -webkit-font-smoothing: antialiased;
@@ -55,6 +55,9 @@ $body-line-height: 1.5 !default;
55
55
  z-index: zindex('small');
56
56
  }
57
57
  }
58
+ [disabled], [aria-disabled="true"] {
59
+ @include disabledRules;
60
+ }
58
61
  }
59
62
 
60
63
  .body-wrap {
@@ -195,47 +195,26 @@ $alignments: (
195
195
  font-weight: $weight-semibold !important;
196
196
  }
197
197
 
198
- @mixin typography-colors($target: '') {
198
+ @mixin typography-colors() {
199
199
  @each $name, $color in $colors {
200
- $brandName:nth($color, 1);
201
- $color: nth($color, 2);
200
+ $brandName: nth($color, 2);
201
+ $color: nth($color, 1);
202
202
  $color-invert: invertColor($name);
203
203
 
204
- .has-text-#{$brandName}#{if($target == '', '', '-' + $target)} {
204
+ .has-text-#{$brandName} {
205
205
  color: $color !important;
206
206
  }
207
- .has-text-#{$brandName}-invert#{if($target == '', '', '-' + $target)} {
207
+ .has-text-#{$brandName}-invert {
208
208
  color: $color-invert !important;
209
209
  }
210
+ .has-background-#{$brandName} {
211
+ background-color: getColor($name) !important;
212
+ }
210
213
  }
211
214
  }
212
215
 
213
216
  @include typography-colors;
214
217
 
215
- @include mobile {
216
- @include typography-colors('mobile');
217
- }
218
-
219
- @include tablet {
220
- @include typography-colors('tablet');
221
- }
222
-
223
- @include touch {
224
- @include typography-colors('touch');
225
- }
226
-
227
- @include desktop {
228
- @include typography-colors('desktop');
229
- }
230
-
231
- @include widescreen {
232
- @include typography-colors('widescreen');
233
- }
234
-
235
- @include fullhd {
236
- @include typography-colors('fullhd');
237
- }
238
-
239
218
  // Visibility
240
219
  $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex';
241
220
 
@@ -441,11 +420,11 @@ $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex';
441
420
  }
442
421
 
443
422
  .is-rounded {
444
- border-radius: 50% !important;
423
+ border-radius: 9999px !important;
445
424
  }
446
425
 
447
426
  .is-bordered {
448
- border: 1px solid getColor('grey-light');
427
+ border: var(--border);
449
428
  }
450
429
 
451
430
  .is-vertical-paddingless {
@@ -454,15 +433,11 @@ $displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex';
454
433
  }
455
434
 
456
435
  // Radius
457
- $radius-list: (
458
- 'radius-small': $radius-small,
459
- 'radius': $radius,
460
- 'radius-large': $radius-large,
461
- );
436
+ $radius-list: ['radius-large', 'radius-medium', 'radius-small', 'radius'];
462
437
 
463
- @each $label, $radius-size in $radius-list {
438
+ @each $label in $radius-list {
464
439
  .has-border-#{$label} {
465
- border-radius: $radius-size;
440
+ border-radius: var(--#{$label});
466
441
  }
467
442
  }
468
443
 
@@ -35,6 +35,11 @@ p.is-loading,
35
35
  .is-checkradio[type="checkbox"] + label::after {
36
36
  visibility: hidden;
37
37
  }
38
+ &::after {
39
+ @include spinner;
40
+ @include center(1em);
41
+ position: absolute !important;
42
+ }
38
43
 
39
44
  &.field,
40
45
  .field {
@@ -54,11 +59,13 @@ p.is-loading,
54
59
 
55
60
  filter: grayscale(1);
56
61
  cursor: default !important;
62
+ color: transparent !important;
63
+ pointer-events: none;
57
64
 
58
65
  // make the text elements like subtle animated lines
59
66
  @include text-tags {
60
67
  display: inline;
61
- border-radius: 99em;
68
+ border-radius: 9999px;
62
69
  background: currentColor !important;
63
70
  box-decoration-break: clone;
64
71
  font-size: 70%;
@@ -41,10 +41,15 @@
41
41
  margin-bottom: 10px;
42
42
  }
43
43
 
44
- a {
45
- cursor: pointer;
46
- text-decoration: none;
44
+ a {
45
+ color: getColor('font');
46
+ cursor: pointer;
47
+ text-decoration: none;
48
+
49
+ strong {
50
+ color: currentColor;
47
51
  }
52
+ }
48
53
 
49
54
  // List
50
55
  ul {
@@ -1,63 +1,81 @@
1
- .accordions#{$suffix} {
1
+ .accordion#{$suffix} {
2
2
  padding-left: 0;
3
3
  padding-right: 0;
4
- margin: $spacing-4 0;
5
4
 
6
- .accordion {
5
+ /* Chrome + Webkit */
6
+ details.accordion-item ::-webkit-details-marker {
7
+ display: none;
8
+ content: "";
9
+ }
10
+
11
+ details.accordion-item summary {
12
+ list-style-image: none;
13
+ }
14
+
15
+ .accordion-item {
7
16
  box-sizing: border-box;
8
17
  display: flex;
9
18
  flex-direction: column;
10
- background-color: invertColor(currentColor, 'accordion');
19
+ background-color: getColor('background');
11
20
  font-size: $size-normal;
12
- border: 1px solid getColor('grey-disabled');
13
- border-radius: 8px;
21
+ border: var(--border);
22
+ border-radius: var(--radius);
14
23
  margin: 8px 0;
15
24
  min-height: 56px;
16
25
  max-height: max-content;
26
+ transition: margin 0.3s;
27
+
28
+ .accordion-header {
29
+ font-weight: bold;
30
+ }
17
31
 
18
32
  .accordion-body {
19
- display: none;
20
33
  padding: $spacing-4;
21
34
  padding-top: 0 !important;
22
35
  }
23
36
 
24
- &.is-active > .accordion-header:first-child, [data-accordion-toggle]:checked ~ .accordion-header {
25
- font-weight: bold;
26
- & .toggle {
27
- &::before {
28
- @include arrow(getColor('font'), 'up');
29
- }
30
- }
37
+ &:has(summary:hover):not(.is-disabled) {
38
+ @include hoverRules();
31
39
  }
32
40
 
33
- &.is-active > .accordion-header:first-child ~ .accordion-body, [data-accordion-toggle]:checked ~ .accordion-body {
34
- display: block;
41
+ &:has(summary:focus-visible) {
42
+ outline: var(--border-active);
43
+ outline-offset: -2px;
35
44
  }
36
45
 
37
- &:hover:not(.is-disabled) {
38
- border: 2px solid getColor('alternate');
46
+ .accordion-header:after {
47
+ max-width: 15px;
48
+ max-height: 15px;
49
+ position: absolute;
50
+ margin-top: 0;
51
+ right: 20px;
52
+ }
39
53
 
40
- .accordion-header {
41
- color: getColor('alternate');
42
- padding: 15px;
43
- }
54
+ &[open]:not([aria-disabled="true"]) .accordion-header:after {
55
+ transform: rotate(180deg);
56
+ }
44
57
 
45
- .accordion-body {
46
- padding: 15px;
47
- padding-top: 1px !important;
48
- }
58
+ .accordion-header:after, &[aria-disabled="true"] .accordion-header:after {
59
+ @include arrow();
60
+ transition: transform 0.3s;
49
61
  }
50
62
 
51
- &:not(:first-child) {
52
- .accordion-header {
53
- border-radius: 0;
54
- }
63
+ &[aria-disabled="true"] .accordion-body {
64
+ display: none !important;
55
65
  }
56
66
 
57
- &:not(:last-child) {
58
- .accordion-content {
59
- border-radius: 0;
67
+ .accordion-header {
68
+ border-radius: var(--radius);
69
+ transition: margin 300ms ease-out;
70
+
71
+ &:focus-visible{
72
+ outline: none;
60
73
  }
74
+
75
+ }
76
+
77
+ &[open] .accordion-header {
78
+ margin-bottom: 4px;
61
79
  }
62
80
 
63
81
  &:first-child {
@@ -68,22 +86,6 @@
68
86
  margin-bottom: 0;
69
87
  }
70
88
 
71
- &.is-disabled {
72
- background-color: getColor('bg-disabled');
73
- cursor: no-drop;
74
- .accordion-header,
75
- .accordion-header .toggle::before {
76
- color: getColor('disabled');
77
- cursor: no-drop;
78
- }
79
-
80
- &.is-active {
81
- .accordion-header:not(input) + .accordion-body {
82
- color: getColor('grey');
83
- }
84
- }
85
- }
86
-
87
89
  .accordion-header {
88
90
  align-items: center;
89
91
  display: flex;
@@ -112,52 +114,15 @@
112
114
  }
113
115
  }
114
116
 
115
- .toggle {
116
- -moz-appearance: none;
117
- -webkit-appearance: none;
118
- user-select: none;
119
- border: none;
120
- background-color: transparent;
121
- cursor: pointer;
122
- display: inline-block;
123
- flex-grow: 0;
124
- flex-shrink: 0;
125
- height: 20px;
126
- width: 20px;
127
- max-height: 20px;
128
- max-width: 20px;
129
- min-height: 20px;
130
- min-width: 20px;
131
- outline-offset: 8px;
132
- position: relative;
133
- vertical-align: top;
134
- margin-left: auto;
135
- padding: 0 0 0 10px;
136
-
137
- &::after {
138
- display: none;
139
- }
140
-
141
- &::before {
142
- @include arrow(getColor('grey-dark'));
143
- top: -0.25em;
144
- left: 0;
145
- right: 0;
146
- bottom: 0;
147
- width: 15px;
148
- height: 5px;
149
- margin: auto;
150
- }
151
- }
152
-
153
117
  p {
154
118
  margin-bottom: 0;
155
119
  }
156
120
 
157
121
  & + .accordion-body {
158
122
  overflow-y: hidden;
123
+
159
124
  .accordion-content {
160
- border-radius: $radius;
125
+ border-radius: var(--radius);
161
126
  margin-bottom: 10px;
162
127
 
163
128
  @include mobile() {
@@ -1,14 +1,10 @@
1
1
  @charset "utf-8";
2
2
  @import '../utilities/spacing';
3
3
 
4
- @import 'disclaimer';
4
+ @import 'autolayout';
5
5
  @import 'divider';
6
6
  @import 'breadcrumb';
7
- @import 'switch';
8
7
  @import 'card';
9
- @import 'dropdown';
10
- @import 'level';
11
- @import 'menu';
12
8
  @import 'modal';
13
9
  @import 'pagination';
14
10
  @import 'popover';
@@ -18,9 +14,7 @@
18
14
  @import 'accordion';
19
15
  @import 'countdown';
20
16
  @import 'timeline';
21
- @import 'slices';
22
17
  @import 'stepper';
23
- @import 'slider';
24
18
  @import 'plus-symbol';
25
19
  @import 'otp';
26
20
  @import 'segmented-control';