@1024pix/pix-ui 14.3.1 → 14.6.0

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 (39) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/addon/components/pix-collapsible.hbs +3 -1
  3. package/addon/components/pix-collapsible.js +6 -0
  4. package/addon/components/pix-stars.hbs +7 -1
  5. package/addon/styles/_colors.scss +486 -66
  6. package/addon/styles/_form.scss +15 -16
  7. package/addon/styles/_pix-background-header.scss +4 -3
  8. package/addon/styles/_pix-banner.scss +11 -11
  9. package/addon/styles/_pix-block.scss +5 -5
  10. package/addon/styles/_pix-button-base.scss +33 -26
  11. package/addon/styles/_pix-button-link.scss +0 -1
  12. package/addon/styles/_pix-button.scss +10 -7
  13. package/addon/styles/_pix-collapsible.scss +11 -10
  14. package/addon/styles/_pix-dropdown.scss +18 -18
  15. package/addon/styles/_pix-filter-banner.scss +8 -8
  16. package/addon/styles/_pix-icon-button.scss +12 -9
  17. package/addon/styles/_pix-input-code.scss +10 -10
  18. package/addon/styles/_pix-input-password.scss +6 -6
  19. package/addon/styles/_pix-input.scss +7 -7
  20. package/addon/styles/_pix-message.scss +10 -10
  21. package/addon/styles/_pix-modal.scss +9 -9
  22. package/addon/styles/_pix-multi-select.scss +27 -28
  23. package/addon/styles/_pix-pagination.scss +3 -2
  24. package/addon/styles/_pix-progress-gauge.scss +15 -14
  25. package/addon/styles/_pix-radio-button.scss +12 -12
  26. package/addon/styles/_pix-return-to.scss +33 -15
  27. package/addon/styles/_pix-select.scss +3 -3
  28. package/addon/styles/_pix-selectable-tag.scss +26 -27
  29. package/addon/styles/_pix-stars.scss +7 -7
  30. package/addon/styles/_pix-tag.scss +12 -12
  31. package/addon/styles/_pix-textarea.scss +4 -4
  32. package/addon/styles/_pix-tooltip.scss +24 -24
  33. package/addon/styles/_typography.scss +2 -2
  34. package/app/stories/pix-input.stories.mdx +27 -0
  35. package/docs/colors-palette.stories.mdx +239 -0
  36. package/docs/design-tokens.stories.mdx +60 -0
  37. package/docs/pix-design-tokens-dev.stories.mdx +1 -1
  38. package/package.json +1 -1
  39. package/docs/pix-design-tokens.stories.mdx +0 -23
@@ -1,21 +1,21 @@
1
- @mixin hoverFormElement(){
1
+ @mixin hoverFormElement() {
2
2
  &:hover {
3
- box-shadow: inset 0px 0px 0px 0.6px $grey-40;
3
+ box-shadow: inset 0px 0px 0px 0.6px $pix-neutral-40;
4
4
  }
5
5
  }
6
6
 
7
- @mixin focusFormElement(){
7
+ @mixin focusFormElement() {
8
8
  &:focus {
9
- border-color: $blue;
10
- box-shadow: inset 0px 0px 0px 0.6px $blue;
9
+ border-color: $pix-primary;
10
+ box-shadow: inset 0px 0px 0px 0.6px $pix-primary;
11
11
  outline: none;
12
12
  }
13
13
  }
14
14
 
15
- @mixin focusWithinFormElement(){
15
+ @mixin focusWithinFormElement() {
16
16
  &:focus {
17
- border-color: $blue;
18
- box-shadow: inset 0px 0px 0px 0.6px $blue;
17
+ border-color: $pix-primary;
18
+ box-shadow: inset 0px 0px 0px 0.6px $pix-primary;
19
19
  outline: none;
20
20
  }
21
21
  }
@@ -24,26 +24,26 @@
24
24
  display: block;
25
25
  font-family: $font-roboto;
26
26
  font-size: 0.875rem;
27
- color: $grey-70;
27
+ color: $pix-neutral-70;
28
28
  margin-bottom: 4px;
29
29
  }
30
30
 
31
31
  @mixin errorMessage() {
32
32
  font-family: $font-roboto;
33
33
  font-size: 0.75rem;
34
- color: $red;
34
+ color: $pix-error-70;
35
35
  }
36
36
 
37
37
  @mixin formElementInError() {
38
- border-color: $red;
39
- box-shadow: inset 0px 0px 0px 0.6px $red;
38
+ border-color: $pix-error-70;
39
+ box-shadow: inset 0px 0px 0px 0.6px $pix-error-70;
40
40
  }
41
41
 
42
42
  @mixin input() {
43
43
  font-family: $font-roboto;
44
44
  font-size: 0.875rem;
45
45
  font-weight: 400;
46
- color: $grey-90;
46
+ color: $pix-neutral-90;
47
47
  border-radius: $spacing-xxs;
48
48
  padding: 0 $spacing-s 0 $spacing-s;
49
49
  }
@@ -57,7 +57,6 @@
57
57
  padding: $spacing-xs 0 $spacing-xs 0;
58
58
  }
59
59
 
60
-
61
60
  .pix-form__actions {
62
61
  display: flex;
63
62
  justify-content: center;
@@ -69,7 +68,7 @@
69
68
 
70
69
  abbr.mandatory-mark {
71
70
  cursor: help;
72
- color: $pink-alert-dark;
71
+ color: $pix-error-70;
73
72
  text-decoration: none;
74
73
  border: none;
75
- }
74
+ }
@@ -9,12 +9,13 @@
9
9
 
10
10
  &__background {
11
11
  position: absolute;
12
- top: 0; left: 0;
12
+ top: 0;
13
+ left: 0;
13
14
  z-index: -1;
14
15
  width: 100%;
15
16
  min-height: 270px;
16
- background: $pix-gradient;
17
+ background: $pix-primary-app-gradient;
17
18
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
18
- color: $white;
19
+ color: $pix-neutral-0;
19
20
  }
20
21
  }
@@ -36,32 +36,32 @@
36
36
  }
37
37
 
38
38
  &--information {
39
- background-color: $blue-alert-light;
40
- color: $blue-alert-dark;
39
+ background-color: $pix-primary-10;
40
+ color: $pix-primary-70;
41
41
  }
42
42
 
43
43
  &--warning {
44
- background-color: $yellow-alert-light;
45
- color: $yellow-alert-dark;
44
+ background-color: $pix-warning-10;
45
+ color: $pix-warning-60;
46
46
  }
47
47
 
48
48
  &--error {
49
- background-color: $pink-alert-light;
50
- color: $pink-alert-dark;
49
+ background-color: $pix-error-10;
50
+ color: $pix-error-70;
51
51
  }
52
52
 
53
53
  &--communication {
54
- background-color: $blue;
55
- color: $white;
54
+ background-color: $pix-primary;
55
+ color: $pix-neutral-0;
56
56
 
57
57
  &-orga {
58
58
  background-color: $dark-orga;
59
- color: $white;
59
+ color: $pix-neutral-0;
60
60
  }
61
61
 
62
62
  &-certif {
63
- background-color: $dark-green-certif;
64
- color: $white;
63
+ background-color: $pix-secondary-certif-50;
64
+ color: $pix-neutral-0;
65
65
  }
66
66
  }
67
67
  }
@@ -4,15 +4,15 @@
4
4
  max-width: 980px;
5
5
  padding: 14px 24px;
6
6
  margin-bottom: 32px;
7
- background-color: $white;
7
+ background-color: $pix-neutral-0;
8
8
  border-radius: 5px;
9
-
9
+
10
10
  &--shadow-light {
11
- box-shadow: 0 10px 20px 0 rgba($blue, .06);
11
+ box-shadow: 0 10px 20px 0 rgba($pix-primary, 0.06);
12
12
  }
13
13
  &--shadow-heavy {
14
- box-shadow: 0 50px 54px -40px rgba($grey-200, .4),
15
- 0 7px 14px 0 rgba($grey-150, .1);
14
+ box-shadow: 0 50px 54px -40px rgba($pix-neutral-110, 0.4),
15
+ 0 7px 14px 0 rgba($pix-neutral-100, 0.1);
16
16
  }
17
17
  }
18
18
 
@@ -1,14 +1,14 @@
1
1
  .pix-button {
2
2
  @import 'reset-css';
3
3
 
4
- color: $white;
4
+ color: $pix-neutral-0;
5
5
  font-family: $font-roboto;
6
6
  font-size: 0.875rem;
7
7
  font-weight: 500;
8
8
  white-space: nowrap;
9
- letter-spacing: .028rem;
9
+ letter-spacing: 0.028rem;
10
10
  cursor: pointer;
11
- background-color: $blue;
11
+ background-color: $pix-primary;
12
12
  border: 2px solid transparent;
13
13
  display: flex;
14
14
  justify-content: center;
@@ -36,7 +36,7 @@
36
36
  }
37
37
 
38
38
  &--disabled {
39
- opacity: .5;
39
+ opacity: 0.5;
40
40
  cursor: not-allowed;
41
41
  }
42
42
 
@@ -45,10 +45,12 @@
45
45
  border-color: $backgroundColor;
46
46
 
47
47
  &:not(.pix-button--disabled) {
48
- &:hover, &:focus, &:focus-visible {
48
+ &:hover,
49
+ &:focus,
50
+ &:focus-visible {
49
51
  background-color: darken($backgroundColor, 8%);
50
52
  box-shadow: 0 0 0 2px darken($outlineColor, 8%);
51
- border-color: $white;
53
+ border-color: $pix-neutral-0;
52
54
  outline: none;
53
55
  }
54
56
 
@@ -59,7 +61,7 @@
59
61
  }
60
62
 
61
63
  &--background-blue {
62
- @include colorizeBackground($blue, $blue);
64
+ @include colorizeBackground($pix-primary, $pix-primary);
63
65
  }
64
66
 
65
67
  &--background-green {
@@ -67,48 +69,51 @@
67
69
  }
68
70
 
69
71
  &--background-yellow {
70
- color: $grey-100;
71
- @include colorizeBackground($yellow, $yellow);
72
+ color: $pix-neutral-100;
73
+ @include colorizeBackground($pix-warning-40, $pix-warning-40);
72
74
  }
73
75
 
74
76
  &--background-red {
75
- color: $white;
76
- @include colorizeBackground($red, $red);
77
+ color: $pix-neutral-0;
78
+ @include colorizeBackground($pix-error-70, $pix-error-70);
77
79
  }
78
80
 
79
81
  &--background-grey {
80
- @include colorizeBackground($blue-zodiac, $blue-zodiac);
82
+ @include colorizeBackground($pix-neutral-60, $pix-neutral-60);
81
83
  }
82
84
 
83
85
  /* deprecated in favor of --background-transparent-light + --border */
84
86
  &--background-transparent {
85
87
  background-color: transparent;
86
- color: $grey-50;
87
- border: 2px solid $grey-50;
88
+ color: $pix-neutral-50;
89
+ border: 2px solid $pix-neutral-50;
88
90
  }
89
91
 
90
92
  &--background-transparent-light {
91
93
  background-color: transparent;
92
94
  border-color: transparent;
93
- color: $grey-90;
95
+ color: $pix-neutral-90;
94
96
 
95
97
  &:not(.pix-button--disabled) {
96
- &:hover, &:focus, &:focus-visible {
97
- background-color: rgba($black, 0.1);
98
+ &:hover,
99
+ &:focus,
100
+ &:focus-visible {
101
+ background-color: rgba($pix-neutral-110, 0.1);
98
102
  outline: none;
99
103
  }
100
104
 
101
105
  &:active {
102
- background-color: rgba($black, 0.2);
106
+ background-color: rgba($pix-neutral-110, 0.2);
103
107
  }
104
108
  }
105
109
 
106
110
  &.pix-button--border {
107
- border-color: $grey-50;
111
+ border-color: $pix-neutral-50;
108
112
 
109
113
  &:not(.pix-button--disabled) {
110
- &:hover, &:active {
111
- border-color: $grey-80;
114
+ &:hover,
115
+ &:active {
116
+ border-color: $pix-neutral-80;
112
117
  }
113
118
  }
114
119
  }
@@ -117,21 +122,23 @@
117
122
  &--background-transparent-dark {
118
123
  background-color: transparent;
119
124
  border-color: transparent;
120
- color: $white;
125
+ color: $pix-neutral-0;
121
126
 
122
127
  &:not(.pix-button--disabled) {
123
- &:hover, &:focus, &:focus-visible {
124
- background-color: rgba($black, 0.1);
128
+ &:hover,
129
+ &:focus,
130
+ &:focus-visible {
131
+ background-color: rgba($pix-neutral-110, 0.1);
125
132
  outline: none;
126
133
  }
127
134
 
128
135
  &:active {
129
- background-color: rgba($black, 0.2);
136
+ background-color: rgba($pix-neutral-110, 0.2);
130
137
  }
131
138
  }
132
139
 
133
140
  &.pix-button--border {
134
- border-color: $white;
141
+ border-color: $pix-neutral-0;
135
142
  }
136
143
  }
137
144
  }
@@ -1,4 +1,3 @@
1
1
  .pix-button-link {
2
2
  @import 'reset-css';
3
-
4
3
  }
@@ -6,21 +6,21 @@
6
6
  visibility: hidden;
7
7
  }
8
8
  }
9
-
9
+
10
10
  .loader > div {
11
11
  width: 10px;
12
12
  height: 10px;
13
- background-color: $white;
13
+ background-color: $pix-neutral-0;
14
14
  border-radius: 100%;
15
15
  display: inline-block;
16
16
  animation: sk-bouncedelay 1.4s infinite ease-in-out both;
17
17
  }
18
18
 
19
19
  .loader--white > div {
20
- background-color: $white;
20
+ background-color: $pix-neutral-0;
21
21
  }
22
22
  .loader--grey > div {
23
- background-color: $grey-80;
23
+ background-color: $pix-neutral-80;
24
24
  }
25
25
  .loader .bounce1 {
26
26
  animation-delay: -0.32s;
@@ -31,10 +31,13 @@
31
31
  }
32
32
 
33
33
  @keyframes sk-bouncedelay {
34
- 0%, 80%, 100% {
34
+ 0%,
35
+ 80%,
36
+ 100% {
35
37
  transform: scale(0);
36
- } 40% {
37
- transform: scale(1.0);
38
+ }
39
+ 40% {
40
+ transform: scale(1);
38
41
  }
39
42
  }
40
43
  }
@@ -6,10 +6,10 @@
6
6
  flex-direction: column;
7
7
  font-family: $font-roboto;
8
8
  font-size: 1rem;
9
- border: 1px solid $grey-20;
9
+ border: 1px solid $pix-neutral-20;
10
10
  padding: 0;
11
11
  cursor: pointer;
12
- background-color: $white;
12
+ background-color: $pix-neutral-0;
13
13
 
14
14
  &__title {
15
15
  padding: 14px 10px 14px 16px;
@@ -19,28 +19,28 @@
19
19
  justify-content: space-between;
20
20
  background: transparent;
21
21
  border: none;
22
- color: $grey-60;
22
+ color: $pix-neutral-60;
23
23
  font-size: 1rem;
24
24
  font-weight: 500;
25
25
 
26
26
  .pix-collapsible-title__icon {
27
- color: $grey-45;
27
+ color: $pix-neutral-45;
28
28
  margin-right: 6px;
29
29
  }
30
30
 
31
31
  &:hover {
32
- background-color: $grey-10;
32
+ background-color: $pix-neutral-10;
33
33
  }
34
34
 
35
35
  &:focus {
36
- background-color: $grey-10;
36
+ background-color: $pix-neutral-10;
37
37
  }
38
38
 
39
39
  &--uncollapsed {
40
- background-color: $grey-10;
40
+ background-color: $pix-neutral-10;
41
41
  }
42
42
  }
43
-
43
+
44
44
  &__content {
45
45
  padding: 16px 20px;
46
46
  display: none;
@@ -64,7 +64,7 @@
64
64
  .pix-collapsible--uncollapsed {
65
65
  margin-top: 10px;
66
66
  margin-bottom: 10px;
67
- box-shadow: 0 2px 5px 0 rgba($black, 0.05);
67
+ box-shadow: 0 2px 5px 0 rgba($pix-neutral-110, 0.05);
68
68
  border-radius: 4px;
69
69
  }
70
70
 
@@ -77,6 +77,7 @@
77
77
  }
78
78
 
79
79
  // Pour le deuxième élément d'affilé qui est refermé, on enlève la bordure-top
80
- .pix-collapsible:not(.pix-collapsible--uncollapsed) + .pix-collapsible:not(.pix-collapsible--uncollapsed) {
80
+ .pix-collapsible:not(.pix-collapsible--uncollapsed)
81
+ + .pix-collapsible:not(.pix-collapsible--uncollapsed) {
81
82
  border-top: none;
82
83
  }
@@ -23,10 +23,10 @@
23
23
  width: 100%;
24
24
  min-width: 250px;
25
25
  min-height: 34px;
26
- border: 1px solid $grey-40;
26
+ border: 1px solid $pix-neutral-40;
27
27
  border-radius: $spacing-xxs;
28
28
  padding: 0;
29
- background: $white;
29
+ background: $pix-neutral-0;
30
30
 
31
31
  &.expanded {
32
32
  border-bottom-left-radius: 0;
@@ -35,7 +35,7 @@
35
35
  }
36
36
 
37
37
  &--placeholder-text {
38
- color: $grey-90;
38
+ color: $pix-neutral-90;
39
39
  margin: 0;
40
40
  font-size: 0.875rem;
41
41
  overflow: hidden;
@@ -44,7 +44,7 @@
44
44
  padding: 8px 68px 8px 16px;
45
45
 
46
46
  &.default {
47
- color: $grey-60;
47
+ color: $pix-neutral-60;
48
48
  padding-right: 36px;
49
49
  }
50
50
  }
@@ -52,17 +52,17 @@
52
52
  &--clear {
53
53
  background: transparent;
54
54
  font-size: 1rem;
55
- color: $grey-50;
55
+ color: $pix-neutral-50;
56
56
  position: absolute;
57
57
  padding: 8px 8px 6px;
58
58
  border: none;
59
- border-right: 2px solid $grey-40;
59
+ border-right: 2px solid $pix-neutral-40;
60
60
  right: 38px;
61
61
  top: 1px;
62
62
  width: fit-content;
63
63
 
64
64
  &:hover {
65
- color: $grey-70;
65
+ color: $pix-neutral-70;
66
66
  }
67
67
  }
68
68
 
@@ -73,17 +73,17 @@
73
73
  position: absolute;
74
74
  top: 9px;
75
75
  right: 12px;
76
- color: $grey-50;
76
+ color: $pix-neutral-50;
77
77
  cursor: pointer;
78
78
 
79
79
  &:hover {
80
- color: $grey-70;
80
+ color: $pix-neutral-70;
81
81
  }
82
82
  }
83
83
  }
84
84
 
85
85
  &__menu {
86
- background: white;
86
+ background: $pix-neutral-0;
87
87
  position: absolute;
88
88
  top: 100%;
89
89
  width: 100%;
@@ -95,7 +95,7 @@
95
95
 
96
96
  &.expanded {
97
97
  max-height: 300px;
98
- border: 1px solid $grey-40;
98
+ border: 1px solid $pix-neutral-40;
99
99
  border-top: none;
100
100
  border-radius: 0 0 $spacing-xxs $spacing-xxs;
101
101
  }
@@ -105,7 +105,7 @@
105
105
  position: relative;
106
106
 
107
107
  &-icon {
108
- color: $grey-30;
108
+ color: $pix-neutral-30;
109
109
  margin: 4px;
110
110
  position: absolute;
111
111
  left: 16px;
@@ -114,7 +114,7 @@
114
114
 
115
115
  &-input {
116
116
  border: none;
117
- border-bottom: 1px solid $grey-40;
117
+ border-bottom: 1px solid $pix-neutral-40;
118
118
  font-size: 0.875rem;
119
119
  flex-grow: 1;
120
120
  margin: 12px 12px 8px;
@@ -122,12 +122,12 @@
122
122
  outline: none;
123
123
 
124
124
  &:hover {
125
- box-shadow: inset 0 -0.7px 0 0 $grey-40;
125
+ box-shadow: inset 0 -0.7px 0 0 $pix-neutral-40;
126
126
  }
127
127
 
128
128
  &:focus {
129
- box-shadow: inset 0 -0.7px 0 0 $blue;
130
- border-color: $blue;
129
+ box-shadow: inset 0 -0.7px 0 0 $pix-primary;
130
+ border-color: $pix-primary;
131
131
  }
132
132
 
133
133
  &-label {
@@ -144,13 +144,13 @@
144
144
  cursor: pointer;
145
145
 
146
146
  &.selected {
147
- color: $grey-70;
147
+ color: $pix-neutral-70;
148
148
  }
149
149
 
150
150
  &:focus,
151
151
  &:hover {
152
152
  outline: none;
153
- background: $grey-15;
153
+ background: $pix-neutral-15;
154
154
  }
155
155
  }
156
156
  }
@@ -7,8 +7,8 @@
7
7
  gap: 6px;
8
8
  width: 100%;
9
9
 
10
- background-color: $white;
11
- box-shadow: 0 2px 5px 0 rgba($black, 0.05);
10
+ background-color: $pix-neutral-0;
11
+ box-shadow: 0 2px 5px 0 rgba($pix-neutral-110, 0.05);
12
12
  min-height: 64px;
13
13
  padding: 14px 24px;
14
14
 
@@ -16,7 +16,7 @@
16
16
  display: flex;
17
17
  flex-direction: column;
18
18
  gap: 12px;
19
-
19
+
20
20
  > * > * {
21
21
  width: 100%;
22
22
  }
@@ -28,20 +28,20 @@
28
28
  }
29
29
 
30
30
  &__title {
31
- color: $grey-60;
31
+ color: $pix-neutral-60;
32
32
  font-family: $font-roboto;
33
33
  font-size: 0.875rem;
34
34
  margin: 0;
35
35
  }
36
36
 
37
37
  p.pix-filter-banner__details {
38
- color: $grey-60;
38
+ color: $pix-neutral-60;
39
39
  font-family: $font-roboto;
40
40
  font-weight: $font-medium;
41
41
  font-size: 0.875rem;
42
42
  margin-top: 10px;
43
43
  padding-top: 10px;
44
- border-top: 1px solid $grey-15;
44
+ border-top: 1px solid$pix-neutral-15;
45
45
  }
46
46
 
47
47
  &__button {
@@ -97,8 +97,8 @@
97
97
  }
98
98
 
99
99
  &__button-container {
100
- border-left: 1px solid $grey-15;
100
+ border-left: 1px solid $pix-neutral-15;
101
101
  padding-left: 16px;
102
102
  }
103
103
  }
104
- }
104
+ }
@@ -12,13 +12,14 @@
12
12
  background-color: transparent;
13
13
 
14
14
  &:disabled {
15
- opacity: .5;
15
+ opacity: 0.5;
16
16
  cursor: default;
17
17
  }
18
18
 
19
- &:hover, &:focus {
19
+ &:hover,
20
+ &:focus {
20
21
  transition: background-color 0.2s ease;
21
- background-color: $grey-15;
22
+ background-color: $pix-neutral-15;
22
23
  &:disabled {
23
24
  background-color: transparent;
24
25
  }
@@ -26,14 +27,16 @@
26
27
 
27
28
  &:active {
28
29
  transition: background-color 0.2s ease;
29
- background-color: $grey-20;
30
+ background-color: $pix-neutral-20;
30
31
  }
31
32
 
32
33
  &--background {
33
- background-color: $grey-10;
34
- &:hover, &:focus, &:active {
34
+ background-color: $pix-neutral-10;
35
+ &:hover,
36
+ &:focus,
37
+ &:active {
35
38
  &:disabled {
36
- background-color: $grey-15;
39
+ background-color: $pix-neutral-15;
37
40
  }
38
41
  }
39
42
  }
@@ -51,10 +54,10 @@
51
54
  }
52
55
 
53
56
  &--dark-grey {
54
- color: $grey-60;
57
+ color: $pix-neutral-60;
55
58
  }
56
59
 
57
60
  &--light-grey {
58
- color: $grey-60;
61
+ color: $pix-neutral-60;
59
62
  }
60
63
  }