@1024pix/pix-ui 15.0.2 → 17.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/CHANGELOG.md +18 -0
- package/addon/components/pix-banner.hbs +1 -1
- package/addon/components/pix-banner.js +3 -3
- package/addon/components/pix-checkbox.hbs +14 -0
- package/addon/components/pix-checkbox.js +30 -0
- package/addon/components/pix-dropdown.hbs +2 -2
- package/addon/components/pix-filter-banner.hbs +1 -1
- package/addon/components/pix-input-password.hbs +1 -1
- package/addon/components/pix-input.hbs +1 -1
- package/addon/components/pix-message.js +5 -5
- package/addon/components/pix-modal.hbs +1 -1
- package/addon/components/pix-multi-select.hbs +1 -1
- package/addon/styles/_colors.scss +6 -6
- package/addon/styles/_pix-banner.scss +4 -4
- package/addon/styles/_pix-checkbox.scss +77 -0
- package/addon/styles/_pix-message.scss +6 -6
- package/addon/styles/addon.scss +1 -0
- package/app/components/pix-checkbox.js +1 -0
- package/app/stories/form.stories.js +4 -0
- package/app/stories/pix-checkbox.stories.js +88 -0
- package/app/stories/pix-checkbox.stories.mdx +50 -0
- package/app/stories/pix-icon-button.stories.js +2 -3
- package/app/stories/pix-icon-button.stories.mdx +1 -1
- package/app/stories/pix-tooltip.stories.js +1 -1
- package/app/stories/pix-tooltip.stories.mdx +2 -2
- package/docs/colors-palette.stories.mdx +2 -2
- package/docs/design-tokens.stories.mdx +5 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Pix-UI Changelog
|
|
2
2
|
|
|
3
|
+
## v17.0.0 (09/08/2022)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### :coffee: Autre
|
|
7
|
+
- [#239](https://github.com/1024pix/pix-ui/pull/239) [BREAKING_CHANGES][BUGFIX] Correction des couleurs du design system par rapport à Figma (PIX-5331).
|
|
8
|
+
|
|
9
|
+
## v16.1.0 (03/08/2022)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### :rocket: Amélioration
|
|
13
|
+
- [#232](https://github.com/1024pix/pix-ui/pull/232) [FEATURE] Ajout du composant checkbox (PIX-3030)
|
|
14
|
+
|
|
15
|
+
## v16.0.0 (13/07/2022)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### :building_construction: Tech
|
|
19
|
+
- [#238](https://github.com/1024pix/pix-ui/pull/238) [TECH] Monter de version fontawesome (PIX-5325)
|
|
20
|
+
|
|
3
21
|
## v15.0.2 (11/07/2022)
|
|
4
22
|
|
|
5
23
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{{#if this.isExternalLink}}
|
|
7
7
|
<a class="pix-banner__action" href={{@actionUrl}} target="_blank" rel="noopener noreferrer">
|
|
8
8
|
{{@actionLabel}}
|
|
9
|
-
<FaIcon class="external-link" @icon="
|
|
9
|
+
<FaIcon class="external-link" @icon="up-right-from-square" />
|
|
10
10
|
</a>
|
|
11
11
|
{{else}}
|
|
12
12
|
<LinkTo class="pix-banner__action" @route={{@actionUrl}}>{{@actionLabel}}</LinkTo>
|
|
@@ -16,9 +16,9 @@ const types = [
|
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
const icons = {
|
|
19
|
-
[TYPE_INFO]: 'info
|
|
20
|
-
[TYPE_ERROR]: 'exclamation
|
|
21
|
-
[TYPE_WARNING]: 'exclamation
|
|
19
|
+
[TYPE_INFO]: 'circle-info',
|
|
20
|
+
[TYPE_ERROR]: 'triangle-exclamation',
|
|
21
|
+
[TYPE_WARNING]: 'circle-exclamation',
|
|
22
22
|
[TYPE_COMMUNICATION]: 'bullhorn',
|
|
23
23
|
[TYPE_COMMUNICATION_ORGA]: 'bullhorn',
|
|
24
24
|
[TYPE_COMMUNICATION_CERTIF]: 'bullhorn',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div class="pix-checkbox">
|
|
2
|
+
<label
|
|
3
|
+
class="pix-checkbox__label {{this.labelSizeClass}} {{if @screenReaderOnly 'sr-only'}}"
|
|
4
|
+
for={{this.id}}
|
|
5
|
+
>
|
|
6
|
+
{{this.label}}
|
|
7
|
+
</label>
|
|
8
|
+
<input
|
|
9
|
+
id={{this.id}}
|
|
10
|
+
type="checkbox"
|
|
11
|
+
class="pix-checkbox__input {{if @isIndeterminate ' pix-checkbox__input--indeterminate'}}"
|
|
12
|
+
...attributes
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { htmlSafe } from '@ember/string';
|
|
3
|
+
|
|
4
|
+
const labelSizeToClass = new Map([
|
|
5
|
+
['small', 'pix-checkbox__label--small'],
|
|
6
|
+
['default', 'pix-checkbox__label--default'],
|
|
7
|
+
['large', 'pix-checkbox__label--large'],
|
|
8
|
+
]);
|
|
9
|
+
|
|
10
|
+
export default class PixCheckbox extends Component {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
|
|
14
|
+
if (!this.args.label) {
|
|
15
|
+
throw new Error('ERROR in PixCheckbox component, you must provide @label params');
|
|
16
|
+
}
|
|
17
|
+
this.label = htmlSafe(this.args.label);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
get id() {
|
|
21
|
+
if (!this.args.id || !this.args.id.toString().trim()) {
|
|
22
|
+
throw new Error('ERROR in PixCheckbox component, @id param is not provided');
|
|
23
|
+
}
|
|
24
|
+
return this.args.id;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
get labelSizeClass() {
|
|
28
|
+
return labelSizeToClass.get(this.args.labelSize);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
aria-label={{@clearLabel}}
|
|
34
34
|
{{on "click" this.clearSelection}}
|
|
35
35
|
>
|
|
36
|
-
<FaIcon @icon="
|
|
36
|
+
<FaIcon @icon="xmark" />
|
|
37
37
|
</button>
|
|
38
38
|
{{/if}}
|
|
39
39
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
{{#if @isSearchable}}
|
|
64
64
|
<div class="pix-dropdown__menu--search">
|
|
65
|
-
<FaIcon class="pix-dropdown__menu--search-icon" @icon="
|
|
65
|
+
<FaIcon class="pix-dropdown__menu--search-icon" @icon="magnifying-glass" />
|
|
66
66
|
<label
|
|
67
67
|
class="pix-dropdown__menu--search-input-label"
|
|
68
68
|
for={{this.searchInputId}}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@size="small"
|
|
24
24
|
@triggerAction={{@onClearFilters}}
|
|
25
25
|
>
|
|
26
|
-
<FaIcon class="pix-filter-banner-button__icon" @icon="trash-
|
|
26
|
+
<FaIcon class="pix-filter-banner-button__icon" @icon="trash-can" @prefix="far" />
|
|
27
27
|
{{@clearFiltersLabel}}
|
|
28
28
|
</PixButton>
|
|
29
29
|
</div>
|
|
@@ -19,11 +19,11 @@ export default class PixMessage extends Component {
|
|
|
19
19
|
|
|
20
20
|
get iconClass() {
|
|
21
21
|
const classes = {
|
|
22
|
-
[TYPE_INFO]: 'info
|
|
23
|
-
[TYPE_SUCCESS]: 'check
|
|
24
|
-
[TYPE_WARNING]: 'exclamation
|
|
25
|
-
[TYPE_ALERT]: 'exclamation
|
|
26
|
-
[TYPE_ERROR]: 'exclamation
|
|
22
|
+
[TYPE_INFO]: 'circle-info',
|
|
23
|
+
[TYPE_SUCCESS]: 'circle-check',
|
|
24
|
+
[TYPE_WARNING]: 'circle-exclamation',
|
|
25
|
+
[TYPE_ALERT]: 'triangle-exclamation',
|
|
26
|
+
[TYPE_ERROR]: 'triangle-exclamation',
|
|
27
27
|
};
|
|
28
28
|
return classes[this.type];
|
|
29
29
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<label class="pix-multi-select-header {{if this.isBig 'pix-multi-select-header--big'}}">
|
|
9
9
|
|
|
10
10
|
<span class="pix-multi-select-header__title">{{@title}}</span>
|
|
11
|
-
<FaIcon @icon="
|
|
11
|
+
<FaIcon @icon="magnifying-glass" class="pix-multi-select-header__search-icon" />
|
|
12
12
|
|
|
13
13
|
<input
|
|
14
14
|
id={{@id}}
|
|
@@ -14,7 +14,7 @@ $pix-primary-80: #000e87;
|
|
|
14
14
|
|
|
15
15
|
// Secondary
|
|
16
16
|
$pix-secondary-5: #fff9e6;
|
|
17
|
-
$pix-secondary-10: #
|
|
17
|
+
$pix-secondary-10: #fff1c5;
|
|
18
18
|
$pix-secondary-20: #ffe381;
|
|
19
19
|
$pix-secondary: #ffd235;
|
|
20
20
|
$pix-secondary-40: #ffbe00;
|
|
@@ -75,7 +75,7 @@ $pix-warning-30: #ffd235;
|
|
|
75
75
|
$pix-warning-40: #ffbe00;
|
|
76
76
|
$pix-warning-50: #eaa600;
|
|
77
77
|
$pix-warning-60: #ce8900;
|
|
78
|
-
$pix-warning-70: #
|
|
78
|
+
$pix-warning-70: #a95800;
|
|
79
79
|
$pix-warning-80: #874d00;
|
|
80
80
|
|
|
81
81
|
// Error
|
|
@@ -489,20 +489,20 @@ $yellow-alert-dark: #a95800;
|
|
|
489
489
|
/**
|
|
490
490
|
* @deprecated
|
|
491
491
|
*-To style text or border : $pix-error-70
|
|
492
|
-
*-To style background : $pix-error-
|
|
492
|
+
*-To style background : $pix-error-5
|
|
493
493
|
*/
|
|
494
494
|
$error: #ff4b00;
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
497
|
* @deprecated
|
|
498
498
|
*-To style text or border : $pix-success-70
|
|
499
|
-
*-To style background : $pix-success-
|
|
499
|
+
*-To style background : $pix-success-5
|
|
500
500
|
*/
|
|
501
501
|
$success: #57c884;
|
|
502
502
|
|
|
503
503
|
/**
|
|
504
504
|
* @deprecated
|
|
505
|
-
*-To style text or border : $pix-warning-
|
|
506
|
-
*-To style background : $pix-warning-
|
|
505
|
+
*-To style text or border : $pix-warning-70
|
|
506
|
+
*-To style background : $pix-warning-5
|
|
507
507
|
*/
|
|
508
508
|
$warning: #ffbe00;
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&--information {
|
|
39
|
-
background-color: $pix-primary-
|
|
39
|
+
background-color: $pix-primary-5;
|
|
40
40
|
color: $pix-primary-70;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&--warning {
|
|
44
|
-
background-color: $pix-warning-
|
|
45
|
-
color: $pix-warning-
|
|
44
|
+
background-color: $pix-warning-5;
|
|
45
|
+
color: $pix-warning-70;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
&--error {
|
|
49
|
-
background-color: $pix-error-
|
|
49
|
+
background-color: $pix-error-5;
|
|
50
50
|
color: $pix-error-70;
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.pix-checkbox {
|
|
2
|
+
@import 'reset-css';
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row-reverse;
|
|
7
|
+
|
|
8
|
+
label, input {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__label {
|
|
13
|
+
color: $pix-neutral-70;
|
|
14
|
+
@include text;
|
|
15
|
+
|
|
16
|
+
&--small {
|
|
17
|
+
@include text-small;
|
|
18
|
+
}
|
|
19
|
+
&--default {
|
|
20
|
+
@include text;
|
|
21
|
+
}
|
|
22
|
+
&--large {
|
|
23
|
+
@include text-large;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__input {
|
|
28
|
+
appearance: none;
|
|
29
|
+
margin: 0 10px;
|
|
30
|
+
min-width: 18px;
|
|
31
|
+
min-height: 18px;
|
|
32
|
+
border: 1.2px solid $pix-neutral-90;
|
|
33
|
+
border-radius: 2px;
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
align-items: center;
|
|
37
|
+
|
|
38
|
+
&:hover, &:focus {
|
|
39
|
+
box-shadow: inset 0 1px 3px rgba(0,0,0, .1), 0 0 0 6px $pix-neutral-15;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:active {
|
|
43
|
+
box-shadow: inset 0 1px 3px rgba(0,0,0, .1), 0 0 0 6px $pix-neutral-22;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:checked {
|
|
47
|
+
background: $pix-primary border-box;
|
|
48
|
+
border-color: $pix-primary;
|
|
49
|
+
|
|
50
|
+
&::after {
|
|
51
|
+
content: '';
|
|
52
|
+
background-image: url("data:image/svg+xml,%3Csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 3L0 4.5L5 9.5L13 1.5L11.5 0L5 6.5L1.5 3Z' fill='white'/%3E%3C/svg%3E%0A");
|
|
53
|
+
background-repeat: no-repeat;
|
|
54
|
+
background-position: center;
|
|
55
|
+
width: 16px;
|
|
56
|
+
height: 16px;
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.pix-checkbox__input--indeterminate {
|
|
62
|
+
&:checked {
|
|
63
|
+
background: $pix-neutral-60 border-box;
|
|
64
|
+
border-color: $pix-neutral-60;
|
|
65
|
+
|
|
66
|
+
&::after {
|
|
67
|
+
content: '';
|
|
68
|
+
background-image: url("data:image/svg+xml,%3Csvg width='10' height='2' viewBox='0 0 10 2' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='10' height='2' fill='white'/%3E%3C/svg%3E%0A");
|
|
69
|
+
background-repeat: no-repeat;
|
|
70
|
+
background-position: center;
|
|
71
|
+
width: 16px;
|
|
72
|
+
height: 16px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -10,23 +10,23 @@
|
|
|
10
10
|
|
|
11
11
|
&.pix-message--info {
|
|
12
12
|
color: $pix-primary-70;
|
|
13
|
-
background-color: $pix-primary-
|
|
13
|
+
background-color: $pix-primary-5;
|
|
14
14
|
}
|
|
15
15
|
&.pix-message--alert {
|
|
16
16
|
color: $pix-error-70;
|
|
17
|
-
background-color: $pix-error-
|
|
17
|
+
background-color: $pix-error-5;
|
|
18
18
|
}
|
|
19
19
|
&.pix-message--error {
|
|
20
20
|
color: $pix-error-70;
|
|
21
|
-
background-color: $pix-error-
|
|
21
|
+
background-color: $pix-error-5;
|
|
22
22
|
}
|
|
23
23
|
&.pix-message--success {
|
|
24
24
|
color: $pix-success-70;
|
|
25
|
-
background-color: $pix-success-
|
|
25
|
+
background-color: $pix-success-5;
|
|
26
26
|
}
|
|
27
27
|
&.pix-message--warning {
|
|
28
|
-
color: $pix-warning-
|
|
29
|
-
background-color: $pix-warning-
|
|
28
|
+
color: $pix-warning-70;
|
|
29
|
+
background-color: $pix-warning-5;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
svg {
|
package/addon/styles/addon.scss
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@1024pix/pix-ui/components/pix-checkbox';
|
|
@@ -67,6 +67,10 @@ export const form = (args) => {
|
|
|
67
67
|
/>
|
|
68
68
|
<br>
|
|
69
69
|
|
|
70
|
+
<PixCheckbox @id="spam-pub" @labelSize="small" @label="Acceptez-vous de vous faire spammer de PUB ?" />
|
|
71
|
+
|
|
72
|
+
<br><br>
|
|
73
|
+
|
|
70
74
|
<div class="pix-form__actions">
|
|
71
75
|
<PixButton @triggerAction={{cancel}} @backgroundColor="transparent-light" @isBorderVisible={{true}}>
|
|
72
76
|
Annuler
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { hbs } from 'ember-cli-htmlbars';
|
|
2
|
+
|
|
3
|
+
export const Template = (args) => {
|
|
4
|
+
return {
|
|
5
|
+
template: hbs`
|
|
6
|
+
<PixCheckbox
|
|
7
|
+
@id={{id}}
|
|
8
|
+
@label={{label}}
|
|
9
|
+
@screenReaderOnly={{screenReaderOnly}}
|
|
10
|
+
@isIndeterminate={{isIndeterminate}}
|
|
11
|
+
@labelSize={{labelSize}}
|
|
12
|
+
/>
|
|
13
|
+
`,
|
|
14
|
+
context: args,
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const Default = Template.bind({});
|
|
19
|
+
Default.args = {
|
|
20
|
+
id: 'acceptNewsletter',
|
|
21
|
+
label: 'Recevoir la newsletter',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const indeterminateCheckbox = Template.bind({});
|
|
25
|
+
indeterminateCheckbox.args = {
|
|
26
|
+
id: 'acceptNewsletter2',
|
|
27
|
+
label: 'Recevoir la newsletter',
|
|
28
|
+
isIndeterminate: true,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const checkboxWithSmallLabel = Template.bind({});
|
|
32
|
+
checkboxWithSmallLabel.args = {
|
|
33
|
+
id: 'acceptNewsletter2',
|
|
34
|
+
label: 'Recevoir la newsletter',
|
|
35
|
+
labelSize: 'small',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const checkboxWithLargeLabel = Template.bind({});
|
|
39
|
+
checkboxWithLargeLabel.args = {
|
|
40
|
+
id: 'acceptNewsletter2',
|
|
41
|
+
label: 'Recevoir la newsletter',
|
|
42
|
+
labelSize: 'large',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const argTypes = {
|
|
46
|
+
id: {
|
|
47
|
+
name: 'id',
|
|
48
|
+
description: 'Identifiant du champ permettant de lui attacher un label',
|
|
49
|
+
type: { name: 'string', required: true },
|
|
50
|
+
defaultValue: null,
|
|
51
|
+
},
|
|
52
|
+
label: {
|
|
53
|
+
name: 'label',
|
|
54
|
+
description: "Le label de l'input",
|
|
55
|
+
type: { name: 'string', required: false },
|
|
56
|
+
defaultValue: null,
|
|
57
|
+
},
|
|
58
|
+
screenReaderOnly: {
|
|
59
|
+
name: 'screenReaderOnly',
|
|
60
|
+
description:
|
|
61
|
+
"Permet de ne pas afficher le label à l'écran. Sert à garder un label qui sera lisible par les lecteurs d'écran.",
|
|
62
|
+
type: { name: 'boolean', required: true },
|
|
63
|
+
table: {
|
|
64
|
+
type: { summary: 'boolean' },
|
|
65
|
+
defaultValue: { summary: false },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
isIndeterminate: {
|
|
69
|
+
name: 'isIndeterminate',
|
|
70
|
+
description:
|
|
71
|
+
"Rendre la checkbox indéterminée, état indiquant que la/les case(s) n'est/ne sont ni cochée(s) ni décochée(s) (exemple: une checkbox parente indiquant la sélection partielle de plusieurs checkbox enfants)",
|
|
72
|
+
type: { name: 'boolean', required: true },
|
|
73
|
+
table: {
|
|
74
|
+
type: { summary: 'boolean' },
|
|
75
|
+
defaultValue: { summary: false },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
labelSize: {
|
|
79
|
+
name: 'labelSize',
|
|
80
|
+
description: 'Correspond à la taille de la police du label.',
|
|
81
|
+
type: { name: 'string', required: false },
|
|
82
|
+
defaultValue: { summary: 'default' },
|
|
83
|
+
control: {
|
|
84
|
+
type: 'select',
|
|
85
|
+
options: ['small', 'default', 'large'],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import centered from '@storybook/addon-centered/ember';
|
|
3
|
+
|
|
4
|
+
import * as stories from './pix-checkbox.stories.js';
|
|
5
|
+
|
|
6
|
+
<Meta
|
|
7
|
+
title='Form/Checkbox'
|
|
8
|
+
component='PixCheckbox'
|
|
9
|
+
decorators={[centered]}
|
|
10
|
+
argTypes={stories.argTypes}
|
|
11
|
+
/>
|
|
12
|
+
|
|
13
|
+
# PixCheckbox
|
|
14
|
+
|
|
15
|
+
La PixCheckbox permet de créer des checkbox basiques ou des checkbox mixées (checkbox servant d'indicateur lors d'une sélection multiple).
|
|
16
|
+
|
|
17
|
+
<Canvas>
|
|
18
|
+
<Story name='Default' story={stories.Default} height={60} />
|
|
19
|
+
</Canvas>
|
|
20
|
+
|
|
21
|
+
## Checkbox indéterminée
|
|
22
|
+
<Canvas>
|
|
23
|
+
<Story name='Indeterminate' story={stories.indeterminateCheckbox} height={60} />
|
|
24
|
+
</Canvas>
|
|
25
|
+
|
|
26
|
+
## Checkbox avec un petit label
|
|
27
|
+
<Canvas>
|
|
28
|
+
<Story name='SmallLabel' story={stories.checkboxWithSmallLabel} height={60} />
|
|
29
|
+
</Canvas>
|
|
30
|
+
|
|
31
|
+
## Checkbox avec un grand label
|
|
32
|
+
<Canvas>
|
|
33
|
+
<Story name='LargeLabel' story={stories.checkboxWithLargeLabel} height={60} />
|
|
34
|
+
</Canvas>
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<PixCheckbox
|
|
40
|
+
@id="superId"
|
|
41
|
+
@label="Recevoir la newsletter"
|
|
42
|
+
@screenReaderOnly={{false}}
|
|
43
|
+
@isIndeterminate={{false}}
|
|
44
|
+
@labelSize="small"
|
|
45
|
+
/>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Arguments
|
|
49
|
+
|
|
50
|
+
<ArgsTable story="Default" />
|
|
@@ -20,7 +20,7 @@ const Template = (args) => {
|
|
|
20
20
|
export const Default = Template.bind({});
|
|
21
21
|
Default.args = {
|
|
22
22
|
ariaLabel: 'Action du bouton',
|
|
23
|
-
icon: '
|
|
23
|
+
icon: 'xmark',
|
|
24
24
|
triggerAction: () => {
|
|
25
25
|
return new Promise().resolves();
|
|
26
26
|
},
|
|
@@ -43,13 +43,12 @@ export const argTypes = {
|
|
|
43
43
|
name: 'ariaLabel',
|
|
44
44
|
description: "l'action du bouton, pour l'accessibilité",
|
|
45
45
|
type: { name: 'string', required: true },
|
|
46
|
-
table: { defaultValue: { summary: 'times' } },
|
|
47
46
|
},
|
|
48
47
|
icon: {
|
|
49
48
|
name: 'icon',
|
|
50
49
|
description: 'Icône font-awesome',
|
|
51
50
|
type: { name: 'string', required: true },
|
|
52
|
-
table: { defaultValue: { summary: '
|
|
51
|
+
table: { defaultValue: { summary: 'plus' } },
|
|
53
52
|
},
|
|
54
53
|
iconPrefix: {
|
|
55
54
|
name: 'iconPrefix',
|
|
@@ -37,7 +37,7 @@ Si vous utilisez un élément `<div>` ou `<span>`, il faut ajouter `tabindex="0"
|
|
|
37
37
|
</PixTooltip>
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
Les tooltips doivent prendre un `@id` et être référencées par leur élément déclencheur
|
|
40
|
+
Les tooltips doivent prendre un `@id` et être référencées par leur élément déclencheur
|
|
41
41
|
|
|
42
42
|
- soit via `aria-describedby` si l'élément possèdent déjà un label, car le tooltip agit alors comme une description supplémentaire.
|
|
43
43
|
|
|
@@ -131,7 +131,7 @@ Infobulle contenant des éléments HTML
|
|
|
131
131
|
<button>Tooltip par défaut</button>
|
|
132
132
|
</:triggerElement>
|
|
133
133
|
<:tooltip>
|
|
134
|
-
<FaIcon @icon="
|
|
134
|
+
<FaIcon @icon="up-right-from-square" /> Avec des <strong>éléments</strong> HTML/Ember
|
|
135
135
|
</:tooltip>
|
|
136
136
|
</PixTooltip>
|
|
137
137
|
|
|
@@ -33,7 +33,7 @@ import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs';
|
|
|
33
33
|
title="Pix Secondary"
|
|
34
34
|
subtitle="$pix-secondary-"
|
|
35
35
|
colors={{ 5: '#fff9e6',
|
|
36
|
-
10: '#
|
|
36
|
+
10: '#fff1c5',
|
|
37
37
|
20: '#ffe381',
|
|
38
38
|
Secondary: '#ffd235',
|
|
39
39
|
40: '#ffbe00',
|
|
@@ -104,7 +104,7 @@ import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs';
|
|
|
104
104
|
40: '#ffbe00',
|
|
105
105
|
50: '#eaa600',
|
|
106
106
|
60: '#ce8900',
|
|
107
|
-
70: '#
|
|
107
|
+
70: '#a95800',
|
|
108
108
|
80: '#874d00'}}
|
|
109
109
|
/>
|
|
110
110
|
<ColorItem
|
|
@@ -38,23 +38,23 @@ Les couleurs pour définir un état d'une alerte ont été attribuées pour unif
|
|
|
38
38
|
### Success
|
|
39
39
|
```
|
|
40
40
|
Texte ou bordure : $pix-success-70
|
|
41
|
-
Background : $pix-success-
|
|
41
|
+
Background : $pix-success-5
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
### Warning
|
|
45
45
|
```
|
|
46
|
-
Texte ou bordure : $pix-warning-
|
|
47
|
-
Background : $pix-warning-
|
|
46
|
+
Texte ou bordure : $pix-warning-70
|
|
47
|
+
Background : $pix-warning-5
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### Error
|
|
51
51
|
```
|
|
52
52
|
Texte ou bordure : $pix-error-70
|
|
53
|
-
Background : $pix-error-
|
|
53
|
+
Background : $pix-error-5
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
### Information
|
|
57
57
|
```
|
|
58
58
|
Texte ou bordure : $pix-primary-70
|
|
59
|
-
Background : $pix-primary-
|
|
59
|
+
Background : $pix-primary-5
|
|
60
60
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1024pix/pix-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@ember/test-helpers": "^2.6.0",
|
|
59
59
|
"@formatjs/intl": "^2.1.0",
|
|
60
60
|
"@fortawesome/ember-fontawesome": "^0.2.3",
|
|
61
|
-
"@fortawesome/free-regular-svg-icons": "^
|
|
62
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
61
|
+
"@fortawesome/free-regular-svg-icons": "^6.1.1",
|
|
62
|
+
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
|
63
63
|
"@glimmer/component": "^1.0.4",
|
|
64
64
|
"@glimmer/tracking": "^1.0.4",
|
|
65
65
|
"@storybook/addon-a11y": "^6.3.7",
|