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

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 (56) 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 -17
  5. package/framework/src/base/_generic.scss +1 -1
  6. package/framework/src/base/_helpers.scss +2 -5
  7. package/framework/src/components/_accordion.scss +13 -6
  8. package/framework/src/components/_all.scss +1 -1
  9. package/framework/src/components/_autolayout.scss +290 -0
  10. package/framework/src/components/_card.scss +1 -1
  11. package/framework/src/components/_divider.scss +11 -15
  12. package/framework/src/components/_fab.scss +20 -19
  13. package/framework/src/components/_modal.scss +7 -3
  14. package/framework/src/components/_pagination.scss +48 -121
  15. package/framework/src/components/_plus-symbol.scss +1 -1
  16. package/framework/src/components/_price.scss +32 -27
  17. package/framework/src/components/_segmented-control.scss +2 -2
  18. package/framework/src/components/_stepper.scss +2 -2
  19. package/framework/src/components/_tabs.scss +2 -1
  20. package/framework/src/components/_timeline.scss +26 -118
  21. package/framework/src/elements/_alert.scss +1 -3
  22. package/framework/src/elements/_all.scss +0 -1
  23. package/framework/src/elements/_autocomplete.scss +3 -3
  24. package/framework/src/elements/_badge.scss +10 -7
  25. package/framework/src/elements/_box.scss +2 -2
  26. package/framework/src/elements/_button.scss +2 -2
  27. package/framework/src/elements/_chips.scss +3 -3
  28. package/framework/src/elements/_entry.scss +1 -1
  29. package/framework/src/elements/_form.scss +16 -15
  30. package/framework/src/elements/_icon.scss +1 -1
  31. package/framework/src/elements/_loader.scss +1 -1
  32. package/framework/src/elements/_other.scss +0 -37
  33. package/framework/src/elements/_progress.scss +5 -5
  34. package/framework/src/elements/_sticker.scss +1 -1
  35. package/framework/src/elements/_switch.scss +4 -4
  36. package/framework/src/elements/_table.scss +11 -11
  37. package/framework/src/elements/_tag.scss +3 -3
  38. package/framework/src/elements/_textarea.scss +20 -2
  39. package/framework/src/elements/_toaster.scss +2 -2
  40. package/framework/src/grid/_columns.scss +284 -751
  41. package/framework/src/grid/_rows.scss +44 -42
  42. package/framework/src/layout/_section.scss +1 -18
  43. package/framework/src/theming/buttons_partial.scss +2 -2
  44. package/framework/src/theming/common_partials.scss +1 -1
  45. package/framework/src/utilities/_a11y.scss +13 -0
  46. package/framework/src/utilities/_all.scss +1 -0
  47. package/framework/src/utilities/_background.scss +7 -3
  48. package/framework/src/utilities/_colors.scss +27 -10
  49. package/framework/src/utilities/_derived-variables.scss +3 -3
  50. package/framework/src/utilities/_initial-variables.scss +1 -29
  51. package/framework/src/utilities/_mixins.scss +10 -10
  52. package/package.json +3 -3
  53. package/framework/src/components/_autolayout2.scss +0 -38
  54. package/framework/src/components/_level.scss +0 -120
  55. package/framework/src/components/_media.scss +0 -64
  56. package/framework/src/elements/_dot.scss +0 -6
@@ -1,47 +1,49 @@
1
- .rows {
2
- display: flex;
3
- flex-direction: column;
4
- margin: -$row-gap-tablet-desktop;
5
- flex: 1 1 auto;
6
- justify-self: stretch;
7
- height: calc(100% + #{$row-gap-tablet-desktop * 2});
8
-
9
- @include mobile {
10
- margin: -$row-gap-mobile;
11
- height: calc(100% + #{$row-gap-mobile * 2});
12
- }
13
-
14
- &.is-aligned-end {
15
- justify-content: flex-end;
16
- }
17
-
18
- &.is-gapless {
19
- .row:not(:first-child) {
20
- padding-top: 0;
21
- }
22
1
 
23
- .row:not(:last-child) {
24
- padding-bottom: 0;
25
- }
26
- }
27
-
28
- .is-divider {
29
- margin-top: 0;
30
- margin-bottom: 0;
31
- }
2
+ $gap :
3
+ 4px,
4
+ 8px,
5
+ 12px,
6
+ 16px,
7
+ 24px,
8
+ 32px,
9
+ 40px,
10
+ 48px,
11
+ 54px,
12
+ 62px
13
+ ;
32
14
 
33
- .row {
34
- display: block;
35
- flex-grow: 1;
36
- flex-shrink: 1;
37
- padding: $row-gap-tablet-desktop;
38
15
 
39
- @include mobile {
40
- padding: $row-gap-mobile;
41
- }
42
-
43
- &.is-narrow {
44
- flex-grow: 0;
45
- }
16
+ .rows {
17
+ display: flex;
18
+ flex-direction: column;
19
+ flex: 1 1 auto;
20
+ justify-self: stretch;
21
+ height: 100%;
22
+ gap: 24px;
23
+
24
+ @include mobile{
25
+ gap: 16px;
26
+ }
27
+
28
+ &.is-aligned-end {
29
+ justify-content: flex-end;
30
+ }
31
+
32
+ &.is-gapless {
33
+ gap: 0;
34
+ }
35
+
36
+ .is-divider {
37
+ margin-top: 0;
38
+ margin-bottom: 0;
39
+ }
40
+
41
+ .row {
42
+ display: block;
43
+ flex-grow: 1;
44
+ flex-shrink: 1;
45
+ &.is-narrow {
46
+ flex-grow: 0;
46
47
  }
48
+ }
47
49
  }
@@ -1,5 +1,5 @@
1
1
  .section {
2
- padding: $spacing-6 $spacing-5;
2
+ padding: $spacing-6 $spacing-4;
3
3
 
4
4
  @include desktop {
5
5
  padding: $spacing-8 $spacing-5;
@@ -13,14 +13,6 @@
13
13
  }
14
14
  }
15
15
 
16
- &:nth-child(even) {
17
- background-color: getBGColor('neutral');
18
- }
19
-
20
- &:nth-child(odd) {
21
- background-color: getColor('background');
22
- }
23
-
24
16
  &.is-info {
25
17
  background-color: getColor('info');
26
18
  color: getColor('background');
@@ -46,13 +38,4 @@
46
38
  &.has-pattern-dark {
47
39
  @include pattern-dark(120%, 260px, -30%);
48
40
  }
49
-
50
- }
51
-
52
- .section:nth-child(2n).is-inverted {
53
- background-color: getColor('background');
54
- }
55
-
56
- .section:nth-child(2n-1).is-inverted {
57
- background-color: getBGColor('neutral');
58
41
  }
@@ -7,9 +7,9 @@ Colors for buttons
7
7
  @color-text The name of the color in the color map for the text
8
8
  */
9
9
  $button-colors: (
10
- 'accent':['conversion', 'alternate', 'background'],
10
+ 'accent':['conversion', 'accent', 'background'],
11
11
  'primary': ['primary', 'main', 'background'],
12
- 'secondary': ['secondary', 'bg-main', 'main'],
12
+ 'secondary': ['secondary', 'main-fade', 'main'],
13
13
  'ghost': ['ghost', 'background', 'main'],
14
14
  ) !default;
15
15
 
@@ -4,6 +4,6 @@
4
4
  --radius: 8px;
5
5
  --radius-small: 4px;
6
6
  --radius-large: 16px;
7
- --border: 1px solid #{getBGColor('font')};
7
+ --border: 1px solid #{getColor('neutral')};
8
8
  --border-active: 2px solid #{getColor('main')};
9
9
  }
@@ -0,0 +1,13 @@
1
+ .sr-only {
2
+ position: absolute;
3
+ width: 1px;
4
+ height: 1px;
5
+ margin: -1px;
6
+ padding: 0;
7
+ border: 0;
8
+ overflow: hidden;
9
+ clip: rect(0, 0, 0, 0);
10
+ white-space: nowrap;
11
+ top: 0;
12
+ left: 0;
13
+ }
@@ -10,3 +10,4 @@
10
10
  @import "background";
11
11
  @import "animations";
12
12
  @import "spacing";
13
+ @import "a11y";
@@ -2,13 +2,17 @@
2
2
  color: getColor('background');
3
3
  }
4
4
 
5
- .is-inverted .is-base {
6
- color: getColor('font');
5
+ .is-inverted {
6
+ .box, .section, .container, .view, .hero {
7
+ &:not(.is-inverted) {
8
+ color: getColor('font');
9
+ }
10
+ }
7
11
  }
8
12
 
9
13
  .has-background {
10
14
  background-repeat: no-repeat;
11
-
15
+
12
16
  .box-content {
13
17
  background-color: transparent;
14
18
  }
@@ -10,14 +10,31 @@ $suffix: '';
10
10
  @background A valid css color value (a variant color for background) -- optional
11
11
  */
12
12
  $colors: (
13
- 'background': [#fff, #E9E9E9, 'white', 'main'],
14
- 'main':[ #3d5d7e, #eff2f8, 'main', 'white'],
15
- 'alternate':[ #da641b, #bb5118,'accent', 'white'],
16
- 'font':[ #3d5d7e, #BBC6CD, 'main', 'white'],
17
- 'success':[ #007B52, #cae8ca,'success', 'white'],
18
- 'info':[ #1A688A, #c8dbec, 'info','white'],
19
- 'warning':[ #FFBB33, #ecdbc6,'warning', 'white'],
20
- 'error':[ #D42D02,#eecccc,'error', 'white'],
21
- 'disabled':[ #646464, #D1D1D1,'disabled', 'white'],
22
- 'neutral':[ #707070, #F4F4F4,'grey', 'white' ],
13
+ 'background': [#fff, 'white', 'main'],
14
+ 'main':[ #3d5d7e, 'main', 'white'],
15
+ 'main-fade':[ #eff2f8, 'main-fade', 'white'],
16
+ 'accent':[ #da641b,'accent', 'white'],
17
+ 'font':[ #3d5d7e, 'font', 'white'],
18
+ 'success':[ #007B52, 'success', 'white'],
19
+ 'success-fade':[ #cae8ca,'success-fade', 'white'],
20
+ 'info':[ #1A688A, 'info', 'white'],
21
+ 'info-fade':[ #c8dbec, 'info-fade', 'white'],
22
+ 'warning':[ #FFBB33, 'warning', 'white'],
23
+ 'warning-fade':[ #ecdbc6, 'warning-fade', 'white'],
24
+ 'error':[ #D42D02,'error', 'white'],
25
+ 'error-fade':[ #eecccc, 'error-fade', 'white'],
26
+ 'disabled':[ #646464, 'disabled', 'white'],
27
+ 'disabled-fade':[ #D1D1D1,'disabled-fade', 'white'],
28
+ 'neutral':[ #707070, 'grey', 'white' ],
29
+ 'neutral-fade':[#F4F4F4, 'grey-fade', 'white' ],
30
+ ) !default;
31
+
32
+ $fade-colors: (
33
+ 'main': 'main-fade',
34
+ 'success': 'success-fade',
35
+ 'info':'info-fade',
36
+ 'warning':'warning-fade',
37
+ 'error':'error-fade',
38
+ 'disabled': 'disabled-fade',
39
+ 'neutral': 'neutral-fade',
23
40
  ) !default;
@@ -14,12 +14,12 @@ $size-large: $text-24 !default;
14
14
 
15
15
  // Brand Color
16
16
  $colors-brand: (
17
- 'background', 'main', 'alternate'
17
+ 'background', 'main', 'accent'
18
18
  );
19
19
 
20
20
  // Brand Color Functionnal
21
- $colors-brand-funcionnal: (
22
- 'background', 'main', 'alternate', 'info', 'success', 'error', 'warning', 'neutral'
21
+ $colors-brand-functionnal: (
22
+ 'background', 'main', 'accent', 'info', 'success', 'error', 'warning', 'neutral'
23
23
  );
24
24
 
25
25
  $colors-feedback: (
@@ -1,33 +1,5 @@
1
1
  @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
2
-
3
- $suffix: '';
4
-
5
- /*
6
- All color variables are defined here
7
- @string slug name used in classname (You can use your brand name)
8
- @color A valid css color value
9
- @invert The slug name of the best inverted color
10
- @hover A valid css color value (a variant color for the hover case)
11
- @visited A valid css color value (a variant color for the pressed case) -- optional
12
- @background A valid css color value (a variant color for background) -- optional
13
- */
14
- $colors: (
15
- 'background': ['white', #fff, 'main', #E9E9E9],
16
- 'main':['main', #3d5d7e, 'white', #eff2f8],
17
- 'alternate':['accent', #da641b, 'white', #bb5118],
18
- 'font':['main', #3d5d7e, 'white', #BBC6CD],
19
- 'success':['success', #007B52, 'white', #cae8ca],
20
- 'info':['info', #1A688A, 'white', #c8dbec],
21
- 'warning':['warning', #FFBB33, 'white', #ecdbc6],
22
- 'error':['error', #D42D02, 'white',#eecccc],
23
- /* Grey disabled // BG : bg-disabled */
24
- 'disabled':['disabled', #646464, 'white', #D1D1D1],
25
- 'hovered': ['hovered', #24374a, 'font',#e4eaed],
26
- /* grey , BG : grey-lighter */
27
- 'neutral':['grey', #707070, 'white', #F4F4F4 ],
28
- /* grey dark , BG : grey-light */
29
- 'neutral-dark':['grey-dark', #646464, 'white', #E9E9E9 ]
30
- ) !default;
2
+ @import "colors";
31
3
 
32
4
  $hoverSelector: "&:hover:not([disabled]):not([aria-disabled=true])";
33
5
 
@@ -147,7 +147,7 @@
147
147
 
148
148
  @mixin spinner {
149
149
  animation: spinAround 500ms infinite linear;
150
- border: 2px solid getBGColor('neutral-dark');
150
+ border: 2px solid getColor('neutral-fade');
151
151
  border-radius: 290486px;
152
152
  border-right-color: transparent;
153
153
  border-top-color: transparent;
@@ -340,7 +340,7 @@
340
340
  }
341
341
 
342
342
  @mixin apply-colors($property: 'color') {
343
- @each $name, $pair in $colors-brand-funcionnal {
343
+ @each $name, $pair in $colors-brand-functionnal {
344
344
  $color: getColor($name);
345
345
  $brandName: getColorBrandName($name);
346
346
  &.is-#{$brandName} {
@@ -355,7 +355,7 @@
355
355
  }
356
356
 
357
357
  @mixin pattern-dark($size, $x-pos: top, $y-pos: center) {
358
- background: linear-gradient(#1b3650, getColor('alternate'));
358
+ background: linear-gradient(#1b3650, getColor('accent'));
359
359
  background-size: auto, $size, auto;
360
360
  background-position: top left, $x-pos $y-pos, top left;
361
361
  }
@@ -365,11 +365,12 @@
365
365
  @include control;
366
366
  height: 56px;
367
367
  background-color: getColor('background');
368
- border-color: getBGColor('font');
368
+ border-color: getColor('neutral');
369
369
  color: getColor('font');
370
370
 
371
371
  @include placeholder {
372
- color: getColor('neutral') !important;
372
+ color: getColor('font') !important;
373
+ filter: grayscale(100%);
373
374
  opacity: 1 !important;
374
375
  transition: all 0.2s ease-out;
375
376
  }
@@ -419,7 +420,7 @@
419
420
  &:disabled:checked {
420
421
  & ~ label.#{$type}-label {
421
422
  &:after {
422
- background-color: getBGColor('disabled');
423
+ background-color: getColor('disabled-fade');
423
424
  }
424
425
  }
425
426
  }
@@ -606,7 +607,7 @@
606
607
  }
607
608
 
608
609
  @mixin hoverRules {
609
- background-color: var(--color-bg-hovered);
610
+ background-color: getColor('main-fade');
610
611
  }
611
612
 
612
613
  @mixin hover {
@@ -618,9 +619,8 @@
618
619
  }
619
620
  }
620
621
 
621
-
622
622
  @mixin disabledRulesWithoutBG {
623
- border-color: transparent !important;
623
+ border-color: getColor('disabled') !important;
624
624
  box-shadow: none !important;
625
625
  color: getColor('disabled') !important;
626
626
  cursor: not-allowed !important;
@@ -628,6 +628,6 @@
628
628
  }
629
629
 
630
630
  @mixin disabledRules {
631
- background-color: getBGColor('disabled') !important;
631
+ background-color: getColor('disabled-fade') !important;
632
632
  @include disabledRulesWithoutBG;
633
633
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trilogy-ds/styles",
3
- "version": "0.0.1-beta-112",
3
+ "version": "0.0.1-beta-117",
4
4
  "author": "Bouygues Telecom",
5
5
  "license": "UNLICENSED",
6
6
  "files": [
@@ -16,8 +16,8 @@
16
16
  "create:autolayout": "node scripts/dist/autolayout.cjs",
17
17
  "create:spacing": "node scripts/dist/spacing.cjs",
18
18
  "prebuild": "npm run copy:icons",
19
- "build": "vite --config vite.config.js build",
20
- "watch:css": "vite --config vite.config.js watch",
19
+ "build": "npm run build:autolayout && npm run create:autolayout && vite --config vite.config.js build",
20
+ "watch:css": "vite --config vite.config.js build -- --watch",
21
21
  "copy:icons": "mkdir -p ./dist/default/assets/icons && cp -R ../assets/lib/icons/all ./dist/default/assets/icons/."
22
22
  }
23
23
  }
@@ -1,38 +0,0 @@
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
- }
@@ -1,120 +0,0 @@
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
- }
@@ -1,64 +0,0 @@
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
- }
@@ -1,6 +0,0 @@
1
- .dot {
2
- display: inline-block;
3
- width: 10px;
4
- height: 10px;
5
- border-radius: 9999px;
6
- }