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

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 +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 +1 -2
  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 +6 -3
  15. package/framework/src/components/_plus-symbol.scss +1 -1
  16. package/framework/src/components/_price.scss +31 -26
  17. package/framework/src/components/_segmented-control.scss +2 -2
  18. package/framework/src/components/_stepper.scss +2 -2
  19. package/framework/src/components/_timeline.scss +11 -14
  20. package/framework/src/elements/_alert.scss +1 -3
  21. package/framework/src/elements/_all.scss +0 -1
  22. package/framework/src/elements/_autocomplete.scss +3 -3
  23. package/framework/src/elements/_badge.scss +10 -7
  24. package/framework/src/elements/_box.scss +2 -2
  25. package/framework/src/elements/_button.scss +2 -2
  26. package/framework/src/elements/_chips.scss +3 -3
  27. package/framework/src/elements/_entry.scss +1 -1
  28. package/framework/src/elements/_form.scss +14 -14
  29. package/framework/src/elements/_icon.scss +1 -1
  30. package/framework/src/elements/_loader.scss +1 -1
  31. package/framework/src/elements/_other.scss +0 -37
  32. package/framework/src/elements/_progress.scss +5 -5
  33. package/framework/src/elements/_sticker.scss +1 -1
  34. package/framework/src/elements/_switch.scss +4 -4
  35. package/framework/src/elements/_table.scss +11 -11
  36. package/framework/src/elements/_tag.scss +3 -3
  37. package/framework/src/elements/_textarea.scss +18 -1
  38. package/framework/src/elements/_toaster.scss +2 -2
  39. package/framework/src/grid/_columns.scss +1 -1
  40. package/framework/src/layout/_section.scss +1 -18
  41. package/framework/src/theming/buttons_partial.scss +2 -2
  42. package/framework/src/theming/common_partials.scss +1 -1
  43. package/framework/src/utilities/_a11y.scss +13 -0
  44. package/framework/src/utilities/_all.scss +1 -0
  45. package/framework/src/utilities/_background.scss +7 -3
  46. package/framework/src/utilities/_colors.scss +41 -0
  47. package/framework/src/utilities/_derived-variables.scss +3 -3
  48. package/framework/src/utilities/_initial-variables.scss +1 -29
  49. package/framework/src/utilities/_mixins.scss +8 -9
  50. package/package.json +3 -3
  51. package/framework/src/components/_autolayout2.scss +0 -38
  52. package/framework/src/components/_level.scss +0 -120
  53. package/framework/src/components/_media.scss +0 -64
  54. package/framework/src/elements/_dot.scss +0 -6
@@ -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
  }
@@ -0,0 +1,41 @@
1
+ $suffix: '';
2
+
3
+ /*
4
+ All color variables are defined here
5
+ @string slug name used in classname (You can use your brand name)
6
+ @color A valid css color value
7
+ @invert The slug name of the best inverted color
8
+ @hover A valid css color value (a variant color for the hover case)
9
+ @visited A valid css color value (a variant color for the pressed case) -- optional
10
+ @background A valid css color value (a variant color for background) -- optional
11
+ */
12
+ $colors: (
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
+ 'font-placeholder':["#818283",'font-fade','white'],
19
+ 'success':[ #007B52, 'success', 'white'],
20
+ 'success-fade':[ #cae8ca,'success-fade', 'white'],
21
+ 'info':[ #1A688A, 'info', 'white'],
22
+ 'info-fade':[ #c8dbec, 'info-fade', 'white'],
23
+ 'warning':[ #FFBB33, 'warning', 'white'],
24
+ 'warning-fade':[ #ecdbc6, 'warning-fade', 'white'],
25
+ 'error':[ #D42D02,'error', 'white'],
26
+ 'error-fade':[ #eecccc, 'error-fade', 'white'],
27
+ 'disabled':[ #646464, 'disabled', 'white'],
28
+ 'disabled-fade':[ #D1D1D1,'disabled-fade', 'white'],
29
+ 'neutral':[ #707070, 'grey', 'white' ],
30
+ 'neutral-fade':[#F4F4F4, 'grey-fade', 'white' ],
31
+ ) !default;
32
+
33
+ $fade-colors: (
34
+ 'main': 'main-fade',
35
+ 'success': 'success-fade',
36
+ 'info':'info-fade',
37
+ 'warning':'warning-fade',
38
+ 'error':'error-fade',
39
+ 'disabled': 'disabled-fade',
40
+ 'neutral': 'neutral-fade',
41
+ ) !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,11 @@
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-placeholder') !important;
373
373
  opacity: 1 !important;
374
374
  transition: all 0.2s ease-out;
375
375
  }
@@ -419,7 +419,7 @@
419
419
  &:disabled:checked {
420
420
  & ~ label.#{$type}-label {
421
421
  &:after {
422
- background-color: getBGColor('disabled');
422
+ background-color: getColor('disabled-fade');
423
423
  }
424
424
  }
425
425
  }
@@ -606,7 +606,7 @@
606
606
  }
607
607
 
608
608
  @mixin hoverRules {
609
- background-color: var(--color-bg-hovered);
609
+ background-color: getColor('main-fade');
610
610
  }
611
611
 
612
612
  @mixin hover {
@@ -618,7 +618,6 @@
618
618
  }
619
619
  }
620
620
 
621
-
622
621
  @mixin disabledRulesWithoutBG {
623
622
  border-color: transparent !important;
624
623
  box-shadow: none !important;
@@ -628,6 +627,6 @@
628
627
  }
629
628
 
630
629
  @mixin disabledRules {
631
- background-color: getBGColor('disabled') !important;
630
+ background-color: getColor('disabled-fade') !important;
632
631
  @include disabledRulesWithoutBG;
633
632
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trilogy-ds/styles",
3
- "version": "0.0.1-beta-103",
3
+ "version": "0.0.1-beta-105",
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
- }