@trilogy-ds/styles 0.0.1-beta.17 → 0.0.1-beta.18

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.
@@ -64,6 +64,9 @@ $body-line-height: 1.5 !default;
64
64
  overflow-x: hidden;
65
65
  overflow-y: scroll;
66
66
  min-height: 100vh;
67
+ a {
68
+ @extend .link;
69
+ }
67
70
  }
68
71
 
69
72
  .header {
@@ -4,7 +4,6 @@
4
4
  margin: $spacing-4 0;
5
5
 
6
6
  .accordion {
7
- @include hover();
8
7
 
9
8
  box-sizing: border-box;
10
9
  display: flex;
@@ -23,6 +22,14 @@
23
22
  padding-top: 0 !important;
24
23
  }
25
24
 
25
+ &:hover:not(.is-disabled) {
26
+ @include hoverRules();
27
+ }
28
+
29
+ &:focus:not(.is-disabled), &:focus-visible:not(.is-disabled) {
30
+ border: 1px solid currentColor;
31
+ }
32
+
26
33
  &:focus-visible {
27
34
  outline: 2px solid getColor('main');
28
35
  outline-offset: 2px;
@@ -3,25 +3,27 @@
3
3
  border-radius: 16px;
4
4
  cursor: pointer;
5
5
  height: 56px;
6
- color: white;
7
6
  padding: $spacing-4;
8
7
  display: inline-flex;
9
8
  align-items: center;
10
9
  box-sizing: border-box;
11
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
15
  font-style: normal;
15
16
  font-weight: 600;
16
- font-size: 0;
17
+ font-size: medium;
17
18
  line-height: 20px;
18
19
 
19
20
  z-index: 9;
20
21
 
21
22
  #{$hoverSelector}, &.is-extended, &:focus, &:focus-visible, &:focus-within {
22
23
  background-color: getColor('hovered');
23
- transition: 0.5s;
24
- font-size: initial;
24
+ transition-duration: 0.5s;
25
+ letter-spacing: initial;
26
+ color: white;
25
27
 
26
28
  .icon,
27
29
  .icon .is-small,
@@ -41,5 +43,4 @@
41
43
  margin-right: -6px;
42
44
  color: white;
43
45
  }
44
-
45
46
  }
@@ -1,84 +1,85 @@
1
1
  .range-container {
2
- @mixin appearence {
3
- appearance: none;
4
- height: 5px;
5
- }
2
+ @mixin appearence {
3
+ appearance: none;
4
+ height: 5px;
5
+ }
6
6
 
7
- @mixin slider-thumb {
8
- appearance: none;
9
- width: 20px;
10
- height: 20px;
11
- background-color: white;
12
- pointer-events: auto;
13
- border-radius: 50%;
14
- box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
15
- outline: none;
16
- border: none;
17
- }
18
- .range {
19
- width: 100%;
20
- position: relative;
21
- margin-top: 18px;
22
- margin-bottom: 20px;
7
+ @mixin slider-thumb {
8
+ appearance: none;
9
+ width: 20px;
10
+ height: 20px;
11
+ background-color: white;
12
+ pointer-events: auto;
13
+ border-radius: 50%;
14
+ box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
15
+ outline: none;
16
+ border: none;
17
+ }
18
+
19
+ .range {
20
+ width: 100%;
21
+ position: relative;
22
+ margin-top: 18px;
23
+ margin-bottom: 20px;
23
24
 
24
- .range-track {
25
- width: 100%;
26
- height: 8px;
27
- border-radius: 8px;
28
- position: absolute;
29
- margin: auto;
30
- top: 0;
31
- bottom: 0;
32
- color: getColor('alternate');
33
- @include mobile {
34
- height: 4px;
35
- border-radius: 4px;
36
- }
37
- }
25
+ .range-track {
26
+ width: 100%;
27
+ height: 8px;
28
+ border-radius: 8px;
29
+ position: absolute;
30
+ margin: auto;
31
+ top: 0;
32
+ bottom: 0;
33
+ @include mobile {
34
+ height: 4px;
35
+ border-radius: 4px;
36
+ }
37
+ }
38
38
 
39
- .range-cursor {
40
- appearance: none;
41
- -webkit-appearance: none;
42
- -moz-appearance: none;
43
- width: 100%;
44
- outline: none;
45
- position: absolute;
46
- margin: auto;
47
- top: 0;
48
- bottom: 0;
49
- background-color: transparent;
50
- pointer-events: none;
39
+ .range-cursor {
40
+ appearance: none;
41
+ -webkit-appearance: none;
42
+ -moz-appearance: none;
43
+ width: 100%;
44
+ outline: none;
45
+ position: absolute;
46
+ margin: auto;
47
+ top: 0;
48
+ bottom: 0;
49
+ background-color: transparent;
50
+ pointer-events: none;
51
51
 
52
- &::-webkit-slider-runnable-track {
53
- @include appearence;
54
- }
52
+ &::-webkit-slider-runnable-track {
53
+ @include appearence;
54
+ }
55
55
 
56
- &::-moz-range-track {
57
- @include appearence;
58
- }
56
+ &::-moz-range-track {
57
+ @include appearence;
58
+ }
59
59
 
60
- &::-ms-track {
61
- @include appearence;
62
- }
60
+ &::-ms-track {
61
+ @include appearence;
62
+ }
63
63
 
64
- &::-webkit-slider-thumb {
65
- @include slider-thumb;
66
- margin-top: -8px;
67
- }
64
+ &::-webkit-slider-thumb {
65
+ @include slider-thumb;
66
+ margin-top: -8px;
67
+ }
68
68
 
69
- &::-moz-range-thumb {
70
- @include slider-thumb;
71
- }
69
+ &::-moz-range-thumb {
70
+ @include slider-thumb;
71
+ }
72
72
 
73
- &::-ms-thumb {
74
- @include slider-thumb;
75
- }
76
- }
77
- }
78
- .range-values {
79
- display: flex;
80
- justify-content: space-between;
81
- padding-top: 14px;
82
- font-weight: bold;
73
+ &::-ms-thumb {
74
+ @include slider-thumb;
75
+ }
83
76
  }
77
+ }
78
+
79
+ .range-values {
80
+ display: flex;
81
+ justify-content: space-between;
82
+ padding-top: 14px;
83
+ font-weight: bold;
84
+ }
84
85
  }
@@ -34,7 +34,7 @@
34
34
  overflow: hidden;
35
35
  }
36
36
 
37
- #{$hoverSelector} {
37
+ &:hover:not([disabled], [aria-disabled=true], .is-active) {
38
38
  cursor: pointer;
39
39
  @include hoverRules()
40
40
  }
@@ -105,7 +105,7 @@
105
105
  padding: 6px 14px;
106
106
  font-size: $text-14;
107
107
  border: 0px solid transparent;
108
- border-bottom: 2px solid getBGColor('font');
108
+ border-bottom: 2px solid transparent;
109
109
 
110
110
  .tab-icon {
111
111
  margin-top: 2px;
@@ -1,3 +1,6 @@
1
+ @import "../theming/buttons/mixins";
2
+ @import "../theming/buttons/variables";
3
+
1
4
  $button-border-width: 2px !default;
2
5
 
3
6
  .buttons {
@@ -32,6 +35,8 @@ $button-border-width: 2px !default;
32
35
  .button {
33
36
  @include control;
34
37
  @include unselectable;
38
+ @include buttons-states;
39
+
35
40
 
36
41
  background-color: white;
37
42
  border-width: $button-border-width;
@@ -41,9 +46,7 @@ $button-border-width: 2px !default;
41
46
  text-align: center;
42
47
  font-family: $body-family;
43
48
  white-space: nowrap;
44
- height: 44px;
45
49
  padding: 0 $spacing-4;
46
- font-size: $text-15;
47
50
  text-decoration: inherit;
48
51
  font-weight: $weight-semibold;
49
52
 
@@ -52,41 +55,15 @@ $button-border-width: 2px !default;
52
55
  margin: 8px 0 !important;
53
56
  }
54
57
 
55
- #{$hoverSelector} {
56
- filter: brightness(0.9)
57
- }
58
-
59
- &:active {
60
- filter: brightness(0.8)
61
- }
62
-
63
- @each $name, $pair in $btn-colors {
58
+ @each $name, $pair in $button-colors {
64
59
  $variantName: nth($pair, 1);
65
60
  $colorBG: getColor(#{nth($pair, 2)});
66
61
  $colorText: getColor(nth($pair, 3));
67
- $effectHover: nth($pair, 4);
68
- $effectActive: nth($pair, 5);
69
62
 
70
63
  &.is-#{$variantName} {
71
64
  background-color: $colorBG;
72
65
  color: $colorText;
73
-
74
- @if $effectHover {
75
- #{$hoverSelector} {
76
- filter: $effectHover;
77
- }
78
- }
79
- @if $effectActive {
80
- &:active {
81
- filter: $effectActive;
82
- }
83
- }
84
66
  }
85
67
  }
86
68
 
87
- &:focus-visible {
88
- outline: 2px solid getColor('main');
89
- outline-offset: 2px;
90
- }
91
-
92
69
  }
@@ -254,6 +254,7 @@ $label-weight: $weight-bold;
254
254
  left: 0;
255
255
  border-top-left-radius: $radius;
256
256
  border-bottom-left-radius: $radius;
257
+ padding: 0 24px;
257
258
  }
258
259
 
259
260
  .textarea {
@@ -296,6 +297,7 @@ $label-weight: $weight-bold;
296
297
  right: 0;
297
298
  border-top-right-radius: $radius;
298
299
  border-bottom-right-radius: $radius;
300
+ padding: 0 24px;
299
301
  }
300
302
  }
301
303
 
@@ -1,22 +1,22 @@
1
+ @import '../theming/links/variables';
2
+ @import '../theming/links/mixins';
3
+
4
+ .link {
5
+ [disabled] {
6
+ @include disabledRulesWithoutBG;
7
+ }
8
+ }
9
+
1
10
  .link:not([disabled]) {
11
+ @include link-states;
12
+
2
13
  position: relative;
3
14
  font-weight: $weight-normal;
4
- color: getColor('font');
15
+ color: getColor($link-colors);
5
16
  box-decoration-break: clone;
6
17
  text-decoration: underline;
7
18
  cursor: pointer;
8
19
 
9
- &:hover {
10
- font-weight: $weight-semibold;
11
- }
12
-
13
- &:focus-visible,
14
- &:focus:focus-visible {
15
- outline: 2px solid getColor('font');
16
- border-radius: $radius-small;
17
- padding: 4px;
18
- }
19
-
20
20
  &.has-icon {
21
21
  display: inline-flex;
22
22
  align-items: center;
@@ -44,21 +44,9 @@
44
44
  }
45
45
  }
46
46
 
47
- .text .link {
47
+ .text .link:not([disabled]) {
48
48
  &:hover {
49
49
  font-weight: $weight-normal;
50
50
  filter: brightness(0.8);
51
51
  }
52
52
  }
53
-
54
- @keyframes sliding-link {
55
- 50% {
56
- left: 100%;
57
- right: 0;
58
- }
59
-
60
- 50.01% {
61
- left: 0;
62
- right: 100%;
63
- }
64
- }
@@ -23,10 +23,6 @@ $sticker-radius: $radius-large;
23
23
  height: auto;
24
24
  line-height: 15px;
25
25
 
26
- &.is-flag {
27
- border-radius: 0 $sticker-radius 0 0;
28
- }
29
-
30
26
  }
31
27
  }
32
28
 
@@ -40,10 +36,6 @@ $sticker-radius: $radius-large;
40
36
  color: getColor('background') !important;
41
37
  }
42
38
 
43
- &.is-flag {
44
- border-radius: 0 16px 0 0;
45
- }
46
-
47
39
  &.is-inverted {
48
40
  background-color: white !important;
49
41
  border-style: solid;
@@ -59,9 +51,6 @@ $sticker-radius: $radius-large;
59
51
  height: auto;
60
52
  line-height: 15px;
61
53
 
62
- &.is-flag {
63
- border-radius: 0 $sticker-radius 0 0;
64
- }
65
54
  }
66
55
 
67
56
  // deprecated
@@ -3,4 +3,3 @@
3
3
  @import "main";
4
4
  @import "section";
5
5
  @import "hero";
6
- @import "toolbar";
@@ -0,0 +1,17 @@
1
+ @mixin buttons-states {
2
+ #{$hoverSelector} {
3
+ filter: brightness(0.8);
4
+ &.is-primary {
5
+ filter: brightness(1.2);
6
+ }
7
+ }
8
+ &:active {
9
+ filter: brightness(0.7);
10
+ }
11
+
12
+ &:focus-visible,
13
+ &:focus:focus-visible {
14
+ outline: 2px solid getColor('main');
15
+ outline-offset: 2px;
16
+ }
17
+ }
@@ -0,0 +1,12 @@
1
+ /*
2
+ Colors for buttons
3
+ @string slug name used in classname (You can use your brand name)
4
+ @color-background The name of the color in the color map for the background
5
+ @color-text The name of the color in the color map for the text
6
+ */
7
+ $button-colors: (
8
+ 'accent':['conversion', 'alternate', 'background'],
9
+ 'primary': ['primary', 'main', 'background'],
10
+ 'secondary': ['secondary', 'bg-main', 'main'],
11
+ 'ghost': ['ghost', 'background', 'main'],
12
+ ) !default;
@@ -0,0 +1,14 @@
1
+ @mixin link-states {
2
+ &:hover {
3
+ filter: brightness(0.8);
4
+ }
5
+ &:active {
6
+ filter: brightness(0.9);
7
+ }
8
+ &:focus-visible,
9
+ &:focus:focus-visible {
10
+ outline: 2px solid currentColor;
11
+ border-radius: $radius-small;
12
+ padding: 0 4px;
13
+ }
14
+ }
@@ -0,0 +1 @@
1
+ $link-colors: 'info';
@@ -8,12 +8,7 @@
8
8
 
9
9
  .has-background {
10
10
  background-repeat: no-repeat;
11
- text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
12
-
13
- &.is-inverted {
14
- text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
15
- }
16
-
11
+
17
12
  .box-content {
18
13
  background-color: transparent;
19
14
  }
@@ -6,7 +6,7 @@ $control-border-width: 1px !default;
6
6
  $control-padding-vertical: calc(0.375em - #{$control-border-width}) !default;
7
7
  $control-padding-horizontal: 20px;
8
8
 
9
- %control {
9
+ @mixin control {
10
10
  -moz-appearance: none;
11
11
  -webkit-appearance: none;
12
12
  align-items: center;
@@ -14,9 +14,9 @@ $control-padding-horizontal: 20px;
14
14
  border-radius: $control-radius-small;
15
15
  display: inline-flex;
16
16
  font-size: $size-normal;
17
- height: 2.25em;
17
+ height: 46px;
18
18
  justify-content: flex-start;
19
- line-height: 1.5;
19
+ line-height: 1.4;
20
20
  padding-bottom: $control-padding-vertical;
21
21
  padding-left: $control-padding-horizontal;
22
22
  padding-right: $control-padding-horizontal;
@@ -42,13 +42,7 @@ $control-padding-horizontal: 20px;
42
42
  &[disabled] {
43
43
  cursor: not-allowed;
44
44
  }
45
- }
46
45
 
47
- @mixin control {
48
- @extend %control;
49
-
50
- height: 46px;
51
- line-height: 1.4;
52
46
  }
53
47
 
54
48
  @mixin control-small {
@@ -29,24 +29,7 @@ $colors: (
29
29
  'neutral-dark':['grey-dark', #646464, 'white', #E9E9E9 ]
30
30
  ) !default;
31
31
 
32
- /*
33
- Colors for buttons
34
- @string slug name used in classname (You can use your brand name)
35
- @color-background The name of the color in the color map for the background
36
- @color-text The name of the color in the color map for the text
37
- @effect-hover A valid css filter value or null (brightness(0.8) by default)
38
- @effect-active A valid css filter value or null (brightness(0.7) by default)
39
- */
40
- $btn-colors: (
41
- 'accent':['accent', 'alternate', 'background', null, null],
42
- 'primary': ['primary', 'main', 'background', brightness(0.8), brightness(0.7)],
43
- 'secondary': ['secondary', 'bg-main', 'main', brightness(0.8), brightness(0.7)],
44
- 'ghost': ['ghost', 'background', 'main', brightness(0.8), brightness(0.7)],
45
- ) !default;
46
-
47
-
48
- $hoverSelector: "&:hover:not([disabled]),&:hover:not([aria-disabled=true])";
49
-
32
+ $hoverSelector: "&:hover:not([disabled]):not([aria-disabled=true])";
50
33
 
51
34
  // Typography OS-regular
52
35
  $family-sans-serif: 'Poppins Read', BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif !default;
@@ -96,7 +79,7 @@ $text-64: 64px !default;
96
79
  $text-80: 80px !default;
97
80
 
98
81
 
99
- $size-1: $text-32;
82
+ $size-1: 32px;
100
83
  $size-2: $text-28;
101
84
  $size-3: $text-24;
102
85
  $size-4: $text-20;
@@ -489,6 +489,7 @@
489
489
  display: flex;
490
490
  align-items: center;
491
491
  margin: 6px 8px;
492
+ width: fit-content;
492
493
 
493
494
  input:disabled,
494
495
  input:disabled:checked {
@@ -666,8 +667,7 @@
666
667
  @include hoverRules();
667
668
  }
668
669
  &:focus:not(.is-disabled), &:focus-visible:not(.is-disabled) {
669
- @include hoverRules();
670
- border: 1px solid currentColor;
670
+ border: 2px solid currentColor;
671
671
  }
672
672
  }
673
673
 
@@ -2,5 +2,7 @@
2
2
  // Mixins can not be redefined
3
3
 
4
4
  @import 'mixins';
5
+ @import '../theming/links/mixins';
6
+ @import '../theming/buttons/mixins';
5
7
  @import 'animations';
6
8
  @import 'controls';
@@ -2,4 +2,6 @@
2
2
  /* Variables can be redefined*/
3
3
 
4
4
  @import 'initial-variables';
5
+ @import '../theming/links/variables';
6
+ @import '../theming/buttons/variables';
5
7
  @import 'derived-variables';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trilogy-ds/styles",
3
- "version": "0.0.1-beta.17",
3
+ "version": "0.0.1-beta.18",
4
4
  "author": "Bouygues Telecom",
5
5
  "license": "UNLICENSED",
6
6
  "files": [