@1024pix/pix-ui 41.1.2 → 42.0.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.
- package/addon/components/pix-button-base.js +3 -3
- package/addon/components/pix-button.hbs +31 -42
- package/addon/components/pix-input-code.hbs +0 -1
- package/addon/components/pix-input-password.hbs +1 -1
- package/addon/components/pix-input.hbs +2 -2
- package/addon/components/pix-progress-gauge.js +10 -2
- package/addon/components/pix-return-to.hbs +0 -2
- package/addon/components/pix-search-input.hbs +0 -2
- package/addon/components/pix-select.hbs +4 -5
- package/addon/components/pix-select.js +1 -3
- package/addon/styles/_pix-background-header.scss +3 -3
- package/addon/styles/_pix-banner.scss +29 -32
- package/addon/styles/_pix-block.scss +3 -3
- package/addon/styles/_pix-button-base.scss +98 -77
- package/addon/styles/_pix-button.scss +5 -5
- package/addon/styles/_pix-checkbox.scss +108 -105
- package/addon/styles/_pix-collapsible.scss +22 -13
- package/addon/styles/_pix-filter-banner.scss +15 -14
- package/addon/styles/_pix-filterable-and-searchable-select.scss +11 -21
- package/addon/styles/_pix-icon-button.scss +8 -9
- package/addon/styles/_pix-indicator-card.scss +28 -20
- package/addon/styles/_pix-input-code.scss +16 -24
- package/addon/styles/_pix-input-password.scss +17 -20
- package/addon/styles/_pix-input.scss +19 -33
- package/addon/styles/_pix-message.scss +16 -16
- package/addon/styles/_pix-modal.scss +21 -22
- package/addon/styles/_pix-multi-select.scss +27 -28
- package/addon/styles/_pix-pagination.scss +6 -6
- package/addon/styles/_pix-progress-gauge.scss +21 -21
- package/addon/styles/_pix-radio-button.scss +21 -16
- package/addon/styles/_pix-return-to.scss +21 -51
- package/addon/styles/_pix-search-input.scss +14 -14
- package/addon/styles/_pix-select.scss +44 -50
- package/addon/styles/_pix-selectable-tag.scss +24 -29
- package/addon/styles/_pix-sidebar.scss +16 -16
- package/addon/styles/_pix-stars.scss +14 -17
- package/addon/styles/_pix-tag.scss +48 -39
- package/addon/styles/_pix-textarea.scss +10 -11
- package/addon/styles/_pix-toggle.scss +11 -11
- package/addon/styles/_pix-tooltip.scss +29 -28
- package/addon/styles/addon.scss +1 -0
- package/addon/styles/component-state/_form.scss +101 -0
- package/addon/styles/component-state/index.scss +1 -0
- package/addon/styles/normalize-reset/_reset.scss +1 -1
- package/addon/styles/pix-design-tokens/_colors.scss +71 -10
- package/addon/styles/pix-design-tokens/_spacing.scss +12 -0
- package/addon/styles/pix-design-tokens/index.scss +0 -1
- package/app/stories/form.stories.js +7 -5
- package/app/stories/pix-background-header.stories.js +2 -0
- package/app/stories/pix-button-link.stories.js +11 -3
- package/app/stories/pix-button.stories.js +23 -25
- package/app/stories/pix-checkbox.stories.js +6 -10
- package/app/stories/pix-filter-banner.stories.js +21 -3
- package/app/stories/pix-filterable-and-searchable-select.stories.js +15 -17
- package/app/stories/pix-indicator-card.stories.js +18 -18
- package/app/stories/pix-modal.stories.js +12 -2
- package/app/stories/pix-multi-select.stories.js +56 -61
- package/app/stories/pix-progress-gauge.mdx +5 -1
- package/app/stories/pix-progress-gauge.stories.js +40 -5
- package/app/stories/pix-radio-button.stories.js +16 -16
- package/app/stories/pix-return-to.stories.js +3 -3
- package/app/stories/pix-search-input.stories.js +8 -10
- package/app/stories/pix-select.stories.js +55 -58
- package/app/stories/pix-selectable-tag.stories.js +8 -2
- package/app/stories/pix-sidebar.stories.js +9 -3
- package/app/stories/pix-stars.stories.js +1 -1
- package/app/stories/pix-tag.stories.js +2 -15
- package/app/stories/pix-toggle.stories.js +13 -21
- package/app/stories/pix-tooltip.stories.js +2 -0
- package/package.json +10 -7
- package/scripts/migrate-colors-scss-vars-to-css-vars.sh +120 -0
- package/scripts/migrate-spacing-scss-vars-to-css-vars.sh +23 -0
- package/addon/styles/pix-design-tokens/_form.scss +0 -99
|
@@ -6,7 +6,7 @@ export default class PixButtonBase extends Component {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
get backgroundColor() {
|
|
9
|
-
return this.args.backgroundColor || '
|
|
9
|
+
return this.args.backgroundColor || 'primary';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
get size() {
|
|
@@ -18,10 +18,10 @@ export default class PixButtonBase extends Component {
|
|
|
18
18
|
'pix-button',
|
|
19
19
|
`pix-button--shape-${this.shape}`,
|
|
20
20
|
`pix-button--size-${this.size}`,
|
|
21
|
-
`pix-button
|
|
21
|
+
`pix-button--${this.backgroundColor}`,
|
|
22
22
|
];
|
|
23
23
|
this.args.isBorderVisible && classNames.push('pix-button--border');
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
return classNames;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,44 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<button
|
|
2
|
+
type={{this.type}}
|
|
3
|
+
class={{this.className}}
|
|
4
|
+
{{on "click" this.triggerAction}}
|
|
5
|
+
...attributes
|
|
6
|
+
disabled={{this.isDisabled}}
|
|
7
|
+
aria-disabled="{{this.isDisabled}}"
|
|
8
|
+
>
|
|
9
|
+
{{#if this.isLoading}}
|
|
10
|
+
<div class="loader loader--{{this.loadingColor}}">
|
|
11
|
+
<div class="bounce1"></div>
|
|
12
|
+
<div class="bounce2"></div>
|
|
13
|
+
<div class="bounce3"></div>
|
|
14
|
+
</div>
|
|
15
|
+
<span class="loader__not-visible-text">{{yield}}</span>
|
|
16
|
+
{{else}}
|
|
17
|
+
{{#if @iconBefore}}
|
|
18
|
+
<FaIcon
|
|
19
|
+
class="pix-button__icon pix-button__icon--before"
|
|
20
|
+
@icon={{@iconBefore}}
|
|
21
|
+
@prefix={{@prefixIconBefore}}
|
|
22
|
+
/>
|
|
23
|
+
{{/if}}
|
|
8
24
|
{{yield}}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...attributes
|
|
16
|
-
disabled={{this.isDisabled}}
|
|
17
|
-
aria-disabled="{{this.isDisabled}}"
|
|
18
|
-
>
|
|
19
|
-
{{#if this.isLoading}}
|
|
20
|
-
<div class="loader loader--{{this.loadingColor}}">
|
|
21
|
-
<div class="bounce1"></div>
|
|
22
|
-
<div class="bounce2"></div>
|
|
23
|
-
<div class="bounce3"></div>
|
|
24
|
-
</div>
|
|
25
|
-
<span class="loader__not-visible-text">{{yield}}</span>
|
|
26
|
-
{{else}}
|
|
27
|
-
{{#if @iconBefore}}
|
|
28
|
-
<FaIcon
|
|
29
|
-
class="pix-button__icon pix-button__icon--before"
|
|
30
|
-
@icon={{@iconBefore}}
|
|
31
|
-
@prefix={{@prefixIconBefore}}
|
|
32
|
-
/>
|
|
33
|
-
{{/if}}
|
|
34
|
-
{{yield}}
|
|
35
|
-
{{#if @iconAfter}}
|
|
36
|
-
<FaIcon
|
|
37
|
-
class="pix-button__icon pix-button__icon--after"
|
|
38
|
-
@icon={{@iconAfter}}
|
|
39
|
-
@prefix={{@prefixIconAfter}}
|
|
40
|
-
/>
|
|
41
|
-
{{/if}}
|
|
25
|
+
{{#if @iconAfter}}
|
|
26
|
+
<FaIcon
|
|
27
|
+
class="pix-button__icon pix-button__icon--after"
|
|
28
|
+
@icon={{@iconAfter}}
|
|
29
|
+
@prefix={{@prefixIconAfter}}
|
|
30
|
+
/>
|
|
42
31
|
{{/if}}
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
{{/if}}
|
|
33
|
+
</button>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{{@label}}
|
|
9
9
|
|
|
10
10
|
{{#if @information}}
|
|
11
|
-
<span class="pix-
|
|
11
|
+
<span class="pix-input__sub-label">{{@information}}</span>
|
|
12
12
|
{{/if}}
|
|
13
13
|
</label>
|
|
14
14
|
{{/if}}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<div class="pix-input__container">
|
|
17
17
|
<input
|
|
18
18
|
id={{this.id}}
|
|
19
|
-
class="pix-input__input
|
|
19
|
+
class="pix-input__input {{this.validationStatusClassName}}"
|
|
20
20
|
value={{@value}}
|
|
21
21
|
aria-label={{this.ariaLabel}}
|
|
22
22
|
aria-required="{{if @requiredLabel true false}}"
|
|
@@ -38,10 +38,18 @@ export default class PixProgressGauge extends Component {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
get colorClass() {
|
|
41
|
-
const availableColor = [
|
|
41
|
+
const availableColor = [
|
|
42
|
+
'primary',
|
|
43
|
+
'success',
|
|
44
|
+
'tertiary',
|
|
45
|
+
// deprecated color
|
|
46
|
+
'blue',
|
|
47
|
+
'green',
|
|
48
|
+
'purple',
|
|
49
|
+
];
|
|
42
50
|
|
|
43
51
|
const color =
|
|
44
|
-
this.args.color && availableColor.includes(this.args.color) ? this.args.color : '
|
|
52
|
+
this.args.color && availableColor.includes(this.args.color) ? this.args.color : 'primary';
|
|
45
53
|
|
|
46
54
|
return `progress-gauge--content-${color}`;
|
|
47
55
|
}
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
class="pix-return-to pix-return-to--{{this.shade}}"
|
|
5
5
|
...attributes
|
|
6
6
|
>
|
|
7
|
-
|
|
8
7
|
{{#if (has-block)}}
|
|
9
8
|
<span aria-hidden="true" class="pix-return-to__icon"><FaIcon @icon="arrow-left" /></span>
|
|
10
9
|
<span class="pix-return-to__text"> {{yield}} </span>
|
|
11
10
|
{{else}}
|
|
12
11
|
<span title="Flèche de retour" class="pix-return-to__icon"><FaIcon @icon="arrow-left" /></span>
|
|
13
12
|
{{/if}}
|
|
14
|
-
|
|
15
13
|
</LinkTo>
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
<div class="pix-search-input__input-container">
|
|
7
7
|
<FaIcon @icon="magnifying-glass" />
|
|
8
|
-
{{! template-lint-disable require-input-label }}
|
|
9
8
|
<input
|
|
10
9
|
id={{this.searchInputId}}
|
|
11
10
|
class="pix-search-input__input"
|
|
12
|
-
role="searchbox"
|
|
13
11
|
name={{@inputName}}
|
|
14
12
|
placeholder={{@placeholder}}
|
|
15
13
|
aria-label={{this.ariaLabel}}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
{{! template-lint-disable no-down-event-binding require-context-role require-presentational-children }}
|
|
2
1
|
<div
|
|
3
2
|
class="pix-select"
|
|
4
3
|
id="container-{{this.selectId}}"
|
|
@@ -89,8 +88,6 @@
|
|
|
89
88
|
aria-labelledby={{if this.displayCategory (concat "cat-" this.selectId "-" index)}}
|
|
90
89
|
>
|
|
91
90
|
{{#if this.displayCategory}}
|
|
92
|
-
{{! template-lint-disable no-invalid-role }}
|
|
93
|
-
{{!https://www.w3.org/WAI/ARIA/apg/example-index/listbox/listbox-grouped.html}}
|
|
94
91
|
<li
|
|
95
92
|
class="pix-select-options-category__name"
|
|
96
93
|
role="presentation"
|
|
@@ -101,6 +98,8 @@
|
|
|
101
98
|
{{/if}}
|
|
102
99
|
|
|
103
100
|
{{#each element.options as |option|}}
|
|
101
|
+
{{! template-lint-disable require-context-role }}
|
|
102
|
+
{{!https://www.w3.org/WAI/ARIA/apg/example-index/listbox/listbox-grouped.html}}
|
|
104
103
|
<li
|
|
105
104
|
class="pix-select-options-category__option{{if
|
|
106
105
|
(eq option.value @value)
|
|
@@ -116,7 +115,7 @@
|
|
|
116
115
|
{{option.label}}
|
|
117
116
|
|
|
118
117
|
{{#if (eq option.value @value)}}
|
|
119
|
-
<FaIcon @icon="check" />
|
|
118
|
+
<FaIcon @icon="check" role="presentation" />
|
|
120
119
|
{{/if}}
|
|
121
120
|
</li>
|
|
122
121
|
{{/each}}
|
|
@@ -139,7 +138,7 @@
|
|
|
139
138
|
{{option.label}}
|
|
140
139
|
|
|
141
140
|
{{#if (eq option.value @value)}}
|
|
142
|
-
<FaIcon @icon="check" />
|
|
141
|
+
<FaIcon @icon="check" role="presentation" />
|
|
143
142
|
{{/if}}
|
|
144
143
|
</li>
|
|
145
144
|
{{/each}}
|
|
@@ -46,9 +46,7 @@ export default class PixSelect extends Component {
|
|
|
46
46
|
if (this.args.errorMessage) {
|
|
47
47
|
classes.push('pix-select-button--error');
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
classes.push('pix-select-button--disabled');
|
|
51
|
-
}
|
|
49
|
+
|
|
52
50
|
return classes.join(' ');
|
|
53
51
|
}
|
|
54
52
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.pix-background-header {
|
|
2
2
|
position: relative;
|
|
3
|
-
padding: 68px
|
|
3
|
+
padding: 68px var(--pix-spacing-6x) 0;
|
|
4
4
|
|
|
5
5
|
&__background {
|
|
6
6
|
position: absolute;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
z-index: -1;
|
|
10
10
|
width: 100%;
|
|
11
11
|
min-height: 270px;
|
|
12
|
-
color:
|
|
12
|
+
color: var(--pix-neutral-0);
|
|
13
13
|
background: $pix-primary-app-gradient;
|
|
14
14
|
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
|
|
15
15
|
}
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
max-width: 980px;
|
|
19
19
|
margin: 0 auto;
|
|
20
20
|
}
|
|
21
|
-
}
|
|
21
|
+
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
.pix-banner {
|
|
2
2
|
display: flex;
|
|
3
|
+
gap: var(--pix-spacing-2x);
|
|
3
4
|
align-items: center;
|
|
4
|
-
padding:
|
|
5
|
+
padding: var(--pix-spacing-4x) var(--pix-spacing-6x);
|
|
5
6
|
font-size: 0.875rem;
|
|
6
|
-
|
|
7
|
+
border: 1px solid currentcolor;
|
|
8
|
+
border-radius: var(--pix-spacing-2x);
|
|
7
9
|
|
|
8
10
|
&__action {
|
|
9
11
|
color: inherit;
|
|
10
12
|
text-decoration: underline;
|
|
11
13
|
|
|
12
14
|
.external-link {
|
|
13
|
-
margin-left:
|
|
15
|
+
margin-left: var(--pix-spacing-1x);
|
|
14
16
|
font-size: 0.875rem;
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -18,89 +20,84 @@
|
|
|
18
20
|
&__close {
|
|
19
21
|
display: flex;
|
|
20
22
|
margin-left: auto;
|
|
21
|
-
padding-left: 8px;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
&__icon {
|
|
25
|
-
margin-right: $pix-spacing-xs;
|
|
26
26
|
font-size: 1.125rem;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&--information {
|
|
30
|
-
color:
|
|
31
|
-
background-color:
|
|
30
|
+
color: var(--pix-info-700);
|
|
31
|
+
background-color: var(--pix-info-50);
|
|
32
32
|
|
|
33
33
|
.pix-icon-button {
|
|
34
|
-
color:
|
|
35
|
-
background-color:
|
|
34
|
+
color: var(--pix-neutral-800);
|
|
35
|
+
background-color: var(--pix-info-50);
|
|
36
36
|
|
|
37
37
|
&:hover:enabled,
|
|
38
38
|
&:focus:enabled,
|
|
39
39
|
&:active:enabled {
|
|
40
|
-
color:
|
|
41
|
-
background-color: $pix-primary-10;
|
|
40
|
+
background-color: var(--pix-info-100);
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
&:focus:enabled {
|
|
45
|
-
outline-color:
|
|
44
|
+
outline-color: var(--pix-primary-700);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
&--warning {
|
|
51
|
-
color:
|
|
52
|
-
background-color:
|
|
50
|
+
color: var(--pix-warning-700);
|
|
51
|
+
background-color: var(--pix-warning-50);
|
|
53
52
|
|
|
54
53
|
.pix-icon-button {
|
|
55
|
-
color:
|
|
56
|
-
background-color:
|
|
54
|
+
color: var(--pix-neutral-800);
|
|
55
|
+
background-color: var(--pix-warning-50);
|
|
57
56
|
|
|
58
57
|
&:hover:enabled,
|
|
59
58
|
&:focus:enabled,
|
|
60
59
|
&:active:enabled {
|
|
61
|
-
color:
|
|
62
|
-
background-color: $pix-warning-10;
|
|
60
|
+
background-color: var(--pix-warning-100);
|
|
63
61
|
}
|
|
64
62
|
|
|
65
63
|
&:focus:enabled {
|
|
66
|
-
outline-color:
|
|
64
|
+
outline-color: var(--pix-warning-700);
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
&--error {
|
|
72
|
-
color:
|
|
73
|
-
background-color:
|
|
70
|
+
color: var(--pix-error-700);
|
|
71
|
+
background-color: var(--pix-error-50);
|
|
74
72
|
|
|
75
73
|
.pix-icon-button {
|
|
76
|
-
color:
|
|
77
|
-
background-color:
|
|
74
|
+
color: var(--pix-neutral-800);
|
|
75
|
+
background-color: var(--pix-error-50);
|
|
78
76
|
|
|
79
77
|
&:hover:enabled,
|
|
80
78
|
&:focus:enabled,
|
|
81
79
|
&:active:enabled {
|
|
82
|
-
color:
|
|
83
|
-
background-color: $pix-error-10;
|
|
80
|
+
background-color: var(--pix-error-100);
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
&:focus:enabled {
|
|
87
|
-
outline-color:
|
|
84
|
+
outline-color: var(--pix-error-700);
|
|
88
85
|
}
|
|
89
86
|
}
|
|
90
87
|
}
|
|
91
88
|
|
|
92
89
|
&--communication {
|
|
93
|
-
color:
|
|
94
|
-
background-color:
|
|
90
|
+
color: var(--pix-neutral-0);
|
|
91
|
+
background-color: var(--pix-primary-500);
|
|
95
92
|
|
|
96
93
|
&-orga {
|
|
97
|
-
color:
|
|
98
|
-
background-color:
|
|
94
|
+
color: var(--pix-neutral-0);
|
|
95
|
+
background-color: var(--pix-orga-500);
|
|
99
96
|
}
|
|
100
97
|
|
|
101
98
|
&-certif {
|
|
102
|
-
color:
|
|
103
|
-
background-color:
|
|
99
|
+
color: var(--pix-neutral-0);
|
|
100
|
+
background-color: var(--pix-certif-500);
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
103
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
.pix-block {
|
|
2
2
|
position: relative;
|
|
3
|
-
background-color:
|
|
3
|
+
background-color: var(--pix-neutral-0);
|
|
4
4
|
border-radius: 5px;
|
|
5
5
|
|
|
6
6
|
&--shadow-light {
|
|
7
|
-
|
|
7
|
+
@extend %pix-shadow-sm;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
&--shadow-heavy {
|
|
11
|
-
|
|
11
|
+
@extend %pix-shadow-xl;
|
|
12
12
|
}
|
|
13
13
|
}
|