@1024pix/pix-ui 46.15.2 → 47.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-banner.hbs +3 -3
- package/addon/components/pix-banner.js +6 -6
- package/addon/components/pix-button.hbs +6 -6
- package/addon/components/pix-collapsible.hbs +12 -11
- package/addon/components/pix-icon-button.hbs +7 -3
- package/addon/components/pix-icon-button.js +9 -8
- package/addon/components/pix-icon.hbs +2 -0
- package/addon/components/pix-icon.js +1 -1
- package/addon/components/pix-indicator-card.hbs +11 -4
- package/addon/components/pix-indicator-card.js +2 -2
- package/addon/components/pix-input-password.hbs +4 -3
- package/addon/components/pix-input.hbs +2 -2
- package/addon/components/pix-label-wrapped.hbs +12 -2
- package/addon/components/pix-message.hbs +6 -1
- package/addon/components/pix-message.js +7 -13
- package/addon/components/pix-modal.hbs +1 -1
- package/addon/components/pix-multi-select.hbs +3 -3
- package/addon/components/pix-pagination.hbs +4 -4
- package/addon/components/pix-return-to.hbs +2 -2
- package/addon/components/pix-search-input.hbs +1 -1
- package/addon/components/pix-select.hbs +7 -7
- package/addon/components/pix-sidebar.hbs +1 -1
- package/addon/components/pix-toggle.hbs +5 -13
- package/addon/components/pix-tooltip.hbs +1 -1
- package/addon/helpers/icons.js +2 -4
- package/addon/styles/_pix-banner.scss +14 -8
- package/addon/styles/_pix-button-base.scss +9 -0
- package/addon/styles/_pix-button.scss +2 -1
- package/addon/styles/_pix-checkbox.scss +3 -4
- package/addon/styles/_pix-collapsible.scss +2 -4
- package/addon/styles/_pix-icon-button.scss +16 -11
- package/addon/styles/_pix-icon.scss +4 -0
- package/addon/styles/_pix-indicator-card.scss +14 -8
- package/addon/styles/_pix-input-password.scss +3 -4
- package/addon/styles/_pix-input.scss +3 -4
- package/addon/styles/_pix-label-wrapped.scss +2 -0
- package/addon/styles/_pix-message.scss +5 -0
- package/addon/styles/_pix-multi-select.scss +2 -2
- package/addon/styles/_pix-pagination.scss +1 -0
- package/addon/styles/_pix-return-to.scss +3 -2
- package/addon/styles/_pix-search-input.scss +3 -7
- package/addon/styles/_pix-select.scss +6 -2
- package/addon/styles/_pix-toggle.scss +14 -1
- package/addon/styles/_pix-tooltip.scss +12 -0
- package/addon/styles/addon.scss +2 -0
- package/package.json +1 -1
- package/public/svg/pix-sprite.svg +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{{#if this.displayBanner}}
|
|
2
2
|
<div class="pix-banner pix-banner--{{this.type}}" role="alert" ...attributes>
|
|
3
|
-
<
|
|
3
|
+
<PixIcon @name={{this.icon}} @plainIcon={{true}} @ariaHidden="true" class="pix-banner__icon" />
|
|
4
4
|
<div>
|
|
5
5
|
{{yield}}
|
|
6
6
|
{{#if this.displayAction}}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
rel="noopener noreferrer"
|
|
13
13
|
>
|
|
14
14
|
{{@actionLabel}}
|
|
15
|
-
<
|
|
15
|
+
<PixIcon @name="openNew" class="external-link" />
|
|
16
16
|
</a>
|
|
17
17
|
{{else}}
|
|
18
18
|
<LinkTo class="pix-banner__action" @route={{@actionUrl}}>{{@actionLabel}}</LinkTo>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<div class="pix-banner__close">
|
|
24
24
|
<PixIconButton
|
|
25
25
|
@ariaLabel="Fermer"
|
|
26
|
-
@
|
|
26
|
+
@iconName="close"
|
|
27
27
|
@size="small"
|
|
28
28
|
@triggerAction={{this.closeBanner}}
|
|
29
29
|
/>
|
|
@@ -18,12 +18,12 @@ const types = [
|
|
|
18
18
|
];
|
|
19
19
|
|
|
20
20
|
const icons = {
|
|
21
|
-
[TYPE_INFO]: '
|
|
22
|
-
[TYPE_ERROR]: '
|
|
23
|
-
[TYPE_WARNING]: '
|
|
24
|
-
[TYPE_COMMUNICATION]: '
|
|
25
|
-
[TYPE_COMMUNICATION_ORGA]: '
|
|
26
|
-
[TYPE_COMMUNICATION_CERTIF]: '
|
|
21
|
+
[TYPE_INFO]: 'info',
|
|
22
|
+
[TYPE_ERROR]: 'error',
|
|
23
|
+
[TYPE_WARNING]: 'warning',
|
|
24
|
+
[TYPE_COMMUNICATION]: 'campaign',
|
|
25
|
+
[TYPE_COMMUNICATION_ORGA]: 'campaign',
|
|
26
|
+
[TYPE_COMMUNICATION_CERTIF]: 'campaign',
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export default class PixBanner extends Component {
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
<span class="loader__not-visible-text">{{yield}}</span>
|
|
16
16
|
{{else}}
|
|
17
17
|
{{#if @iconBefore}}
|
|
18
|
-
<
|
|
18
|
+
<PixIcon
|
|
19
19
|
class="pix-button__icon pix-button__icon--before"
|
|
20
|
-
@
|
|
21
|
-
@
|
|
20
|
+
@name={{@iconBefore}}
|
|
21
|
+
@plainIcon={{@plainIconBefore}}
|
|
22
22
|
/>
|
|
23
23
|
{{/if}}
|
|
24
24
|
{{yield}}
|
|
25
25
|
{{#if @iconAfter}}
|
|
26
|
-
<
|
|
26
|
+
<PixIcon
|
|
27
27
|
class="pix-button__icon pix-button__icon--after"
|
|
28
|
-
@
|
|
29
|
-
@
|
|
28
|
+
@name={{@iconAfter}}
|
|
29
|
+
@plainIcon={{@plainIconAfter}}
|
|
30
30
|
/>
|
|
31
31
|
{{/if}}
|
|
32
32
|
{{/if}}
|
|
@@ -8,16 +8,17 @@
|
|
|
8
8
|
aria-expanded={{if this.isUnCollapsed "true" "false"}}
|
|
9
9
|
...attributes
|
|
10
10
|
>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
{{#if @iconName}}
|
|
12
|
+
<PixIcon
|
|
13
|
+
class="pix-collapsible-title__icon"
|
|
14
|
+
@name={{@iconName}}
|
|
15
|
+
@plainIcon={{@plainIcon}}
|
|
16
|
+
@ariaHidden={{true}}
|
|
17
|
+
/>
|
|
18
|
+
{{/if}}
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{{else}}
|
|
19
|
-
{{this.title}}
|
|
20
|
-
{{/if}}
|
|
20
|
+
<span>
|
|
21
|
+
{{yield to="title"}}
|
|
21
22
|
</span>
|
|
22
23
|
|
|
23
24
|
<span class="pix-collapsible-title__container">
|
|
@@ -26,9 +27,9 @@
|
|
|
26
27
|
{{@tagContent}}
|
|
27
28
|
</PixTag>
|
|
28
29
|
{{/if}}
|
|
29
|
-
<
|
|
30
|
+
<PixIcon
|
|
30
31
|
class="pix-collapsible-title-container__toggle-icon"
|
|
31
|
-
@
|
|
32
|
+
@name="{{if this.isCollapsed 'chevronBottom' 'chevronTop'}}"
|
|
32
33
|
/>
|
|
33
34
|
</span>
|
|
34
35
|
</button>
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<button
|
|
2
2
|
type="button"
|
|
3
|
-
aria-label={{this.ariaLabel}}
|
|
4
3
|
class="pix-icon-button pix-icon-button--{{this.size}}
|
|
5
|
-
pix-icon-button--{{this.color}}
|
|
6
4
|
{{if @withBackground ' pix-icon-button--background'}}"
|
|
7
5
|
{{on "click" this.triggerAction}}
|
|
8
6
|
...attributes
|
|
9
7
|
>
|
|
10
|
-
<
|
|
8
|
+
<span class="screen-reader-only">{{this.ariaLabel}}</span>
|
|
9
|
+
<PixIcon
|
|
10
|
+
class="pix-icon-button__icon pix-icon-button__icon--{{this.size}}"
|
|
11
|
+
@ariaHidden={{true}}
|
|
12
|
+
@name={{@iconName}}
|
|
13
|
+
@plainIcon={{@plainIcon}}
|
|
14
|
+
/>
|
|
11
15
|
</button>
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
|
+
import { warn } from '@ember/debug';
|
|
3
4
|
|
|
4
5
|
export default class PixIconButton extends Component {
|
|
5
6
|
text = 'pix-icon-button';
|
|
6
7
|
|
|
7
|
-
get icon() {
|
|
8
|
-
const defaultIcon = 'plus';
|
|
9
|
-
return this.args.icon ? this.args.icon : defaultIcon;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
8
|
get size() {
|
|
13
9
|
return this.args.size || 'big';
|
|
14
10
|
}
|
|
@@ -18,9 +14,14 @@ export default class PixIconButton extends Component {
|
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
get ariaLabel() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
warn(
|
|
18
|
+
'PixIconButton: @label attribute should be a string.',
|
|
19
|
+
!['', null, undefined].includes(this.args.ariaLabel),
|
|
20
|
+
{
|
|
21
|
+
id: 'pix-ui.icon-button.close-button-label.not-string',
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
|
|
24
25
|
return this.args.ariaLabel;
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -20,7 +20,7 @@ export default class PixIcon extends Component {
|
|
|
20
20
|
|
|
21
21
|
get iconName() {
|
|
22
22
|
warn(
|
|
23
|
-
`PixIcon: @name
|
|
23
|
+
`PixIcon: @name "${this.args.name}" is not one of these : ${Object.keys(ICONS).join(' | ')}`,
|
|
24
24
|
Object.keys(ICONS).includes(this.args.name),
|
|
25
25
|
{
|
|
26
26
|
id: 'pix-ui.icon.not-valid',
|
|
@@ -4,8 +4,13 @@
|
|
|
4
4
|
<div class="indicator-card__icon" aria-hidden="true"></div>
|
|
5
5
|
<div class="indicator-card__content" aria-hidden="true"></div>
|
|
6
6
|
{{else}}
|
|
7
|
-
<div id={{this.iconId}} class="indicator-card__icon {{this.color}}"
|
|
8
|
-
<
|
|
7
|
+
<div id={{this.iconId}} class="indicator-card__icon-wrapper {{this.color}}">
|
|
8
|
+
<PixIcon
|
|
9
|
+
@name={{@iconName}}
|
|
10
|
+
@plainIcon={{@plainIcon}}
|
|
11
|
+
@ariaHidden={{true}}
|
|
12
|
+
class="indicator-card__icon"
|
|
13
|
+
/>
|
|
9
14
|
</div>
|
|
10
15
|
<dl class="indicator-card__content">
|
|
11
16
|
<div class="indicator-card__title">
|
|
@@ -18,10 +23,12 @@
|
|
|
18
23
|
class="indicator-card__tooltip hide-on-mobile"
|
|
19
24
|
>
|
|
20
25
|
<:triggerElement>
|
|
21
|
-
<
|
|
22
|
-
@
|
|
26
|
+
<PixIcon
|
|
27
|
+
@name="info"
|
|
28
|
+
@plainIcon={{true}}
|
|
23
29
|
class="indicator-card__tooltip-icon"
|
|
24
30
|
tabindex="0"
|
|
31
|
+
aria-label={{@infoLabel}}
|
|
25
32
|
aria-describedby={{this.tooltipId}}
|
|
26
33
|
/>
|
|
27
34
|
</:triggerElement>
|
|
@@ -8,7 +8,7 @@ export default class PixIndicatorCard extends Component {
|
|
|
8
8
|
|
|
9
9
|
get color() {
|
|
10
10
|
const { color } = this.args;
|
|
11
|
-
if (!color) return `indicator-card__icon--grey`;
|
|
12
|
-
return `indicator-card__icon--${color}`;
|
|
11
|
+
if (!color) return `indicator-card__icon-wrapper--grey`;
|
|
12
|
+
return `indicator-card__icon-wrapper--${color}`;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
|
|
33
33
|
<PixIconButton
|
|
34
34
|
class="pix-input-password__button"
|
|
35
|
-
@
|
|
35
|
+
@iconName={{if this.isPasswordVisible "eye" "eyeOff"}}
|
|
36
|
+
@plainIcon={{true}}
|
|
36
37
|
@ariaLabel={{if
|
|
37
38
|
this.isPasswordVisible
|
|
38
39
|
"Masquer le mot de passe"
|
|
@@ -43,10 +44,10 @@
|
|
|
43
44
|
/>
|
|
44
45
|
|
|
45
46
|
{{#if this.hasError}}
|
|
46
|
-
<
|
|
47
|
+
<PixIcon @name="close" class="pix-input-password__icon pix-input-password__error-icon" />
|
|
47
48
|
{{/if}}
|
|
48
49
|
{{#if this.hasSuccess}}
|
|
49
|
-
<
|
|
50
|
+
<PixIcon @name="check" class="pix-input-password__icon pix-input-password__success-icon" />
|
|
50
51
|
{{/if}}
|
|
51
52
|
</div>
|
|
52
53
|
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
/>
|
|
25
25
|
|
|
26
26
|
{{#if this.hasError}}
|
|
27
|
-
<
|
|
27
|
+
<PixIcon @name="close" class="pix-input__error-icon" />
|
|
28
28
|
{{/if}}
|
|
29
29
|
{{#if this.hasSuccess}}
|
|
30
|
-
<
|
|
30
|
+
<PixIcon @name="check" class="pix-input__success-icon" />
|
|
31
31
|
{{/if}}
|
|
32
32
|
</div>
|
|
33
33
|
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
<label for={{@for}} class={{this.className}} ...attributes>
|
|
2
2
|
{{#if this.hasError}}
|
|
3
|
-
<
|
|
3
|
+
<PixIcon
|
|
4
|
+
@name="cancel"
|
|
5
|
+
@plainIcon={{true}}
|
|
6
|
+
@ariaHidden={{true}}
|
|
7
|
+
class="pix-label-wrapped__state-icon"
|
|
8
|
+
/>
|
|
4
9
|
{{/if}}
|
|
5
10
|
{{#if this.hasSuccess}}
|
|
6
|
-
<
|
|
11
|
+
<PixIcon
|
|
12
|
+
@name="checkCircle"
|
|
13
|
+
@plainIcon={{true}}
|
|
14
|
+
@ariaHidden={{true}}
|
|
15
|
+
class="pix-label-wrapped__state-icon"
|
|
16
|
+
/>
|
|
7
17
|
{{/if}}
|
|
8
18
|
|
|
9
19
|
{{yield to="inputElement"}}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<p class="pix-message {{concat 'pix-message--' this.type}}" ...attributes>
|
|
2
2
|
{{#if @withIcon}}
|
|
3
|
-
<
|
|
3
|
+
<PixIcon
|
|
4
|
+
@name={{this.iconName}}
|
|
5
|
+
@ariaHidden={{true}}
|
|
6
|
+
@plainIcon={{true}}
|
|
7
|
+
class="pix-message__icon"
|
|
8
|
+
/>
|
|
4
9
|
{{/if}}
|
|
5
10
|
<span class="pix-message__content">
|
|
6
11
|
{{yield}}
|
|
@@ -3,27 +3,21 @@ import Component from '@glimmer/component';
|
|
|
3
3
|
const TYPE_INFO = 'info';
|
|
4
4
|
const TYPE_SUCCESS = 'success';
|
|
5
5
|
const TYPE_WARNING = 'warning';
|
|
6
|
-
const TYPE_ALERT = 'alert';
|
|
7
6
|
const TYPE_ERROR = 'error';
|
|
8
7
|
|
|
9
8
|
export default class PixMessage extends Component {
|
|
10
9
|
get type() {
|
|
11
|
-
const correctTypes = [TYPE_INFO, TYPE_SUCCESS, TYPE_WARNING,
|
|
12
|
-
|
|
13
|
-
console.warn(
|
|
14
|
-
'ERROR in PixMessage component, "alert" type is deprecated. Use "error" type instead.',
|
|
15
|
-
);
|
|
16
|
-
}
|
|
10
|
+
const correctTypes = [TYPE_INFO, TYPE_SUCCESS, TYPE_WARNING, TYPE_ERROR];
|
|
11
|
+
|
|
17
12
|
return correctTypes.includes(this.args.type) ? this.args.type : 'info';
|
|
18
13
|
}
|
|
19
14
|
|
|
20
|
-
get
|
|
15
|
+
get iconName() {
|
|
21
16
|
const classes = {
|
|
22
|
-
[TYPE_INFO]: '
|
|
23
|
-
[TYPE_SUCCESS]: '
|
|
24
|
-
[TYPE_WARNING]: '
|
|
25
|
-
[
|
|
26
|
-
[TYPE_ERROR]: 'triangle-exclamation',
|
|
17
|
+
[TYPE_INFO]: 'info',
|
|
18
|
+
[TYPE_SUCCESS]: 'checkCircle',
|
|
19
|
+
[TYPE_WARNING]: 'warning',
|
|
20
|
+
[TYPE_ERROR]: 'error',
|
|
27
21
|
};
|
|
28
22
|
return classes[this.type];
|
|
29
23
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
{{#if @isSearchable}}
|
|
22
22
|
<span {{reference}} class={{this.headerClassName}}>
|
|
23
|
-
<
|
|
23
|
+
<PixIcon @name="search" class="pix-multi-select-header__search-icon" />
|
|
24
24
|
|
|
25
25
|
<input
|
|
26
26
|
class="pix-multi-select-header__search-input"
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
{{else if @placeholder}}
|
|
53
53
|
{{this.placeholder}}
|
|
54
54
|
{{/if}}
|
|
55
|
-
<
|
|
55
|
+
<PixIcon
|
|
56
56
|
class="pix-multi-select-header__dropdown-icon
|
|
57
57
|
{{if this.isExpanded ' pix-multi-select-header__dropdown-icon--expand'}}"
|
|
58
|
-
@
|
|
58
|
+
@name={{if this.isExpanded "chevronTop" "chevronBottom"}}
|
|
59
59
|
/>
|
|
60
60
|
</button>
|
|
61
61
|
{{/if}}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
<div class="pix-pagination-navigation__action">
|
|
25
25
|
<PixIconButton
|
|
26
26
|
class="pix-pagination-navigation__action-button"
|
|
27
|
-
@
|
|
28
|
-
|
|
27
|
+
@iconName="arrowLeft"
|
|
28
|
+
@ariaLabel={{this.previousPageLabel}}
|
|
29
29
|
@triggerAction={{this.goToPreviousPage}}
|
|
30
30
|
@withBackground={{false}}
|
|
31
31
|
@size="big"
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
</span>
|
|
39
39
|
<PixIconButton
|
|
40
40
|
class="pix-pagination-navigation__action-button"
|
|
41
|
-
@
|
|
42
|
-
|
|
41
|
+
@iconName="arrowRight"
|
|
42
|
+
@ariaLabel={{this.nextPageLabel}}
|
|
43
43
|
@triggerAction={{this.goToNextPage}}
|
|
44
44
|
@withBackground={{false}}
|
|
45
45
|
@size="big"
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
...attributes
|
|
6
6
|
>
|
|
7
7
|
{{#if (has-block)}}
|
|
8
|
-
<
|
|
8
|
+
<PixIcon @name="arrowLeft" @ariaHidden={{true}} class="pix-return-to__icon" />
|
|
9
9
|
<span class="pix-return-to__text"> {{yield}} </span>
|
|
10
10
|
{{else}}
|
|
11
|
-
<
|
|
11
|
+
<PixIcon class="pix-return-to__icon" aria-label={{@arrowLabel}} @name="arrowLeft" />
|
|
12
12
|
{{/if}}
|
|
13
13
|
</LinkTo>
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
aria-controls={{this.listId}}
|
|
33
33
|
aria-disabled={{@isDisabled}}
|
|
34
34
|
>
|
|
35
|
-
{{#if @
|
|
36
|
-
<
|
|
35
|
+
{{#if @iconName}}
|
|
36
|
+
<PixIcon @name={{@iconName}} @plainIcon={{@plainIcon}} class="pix-select-button__icon" />
|
|
37
37
|
{{/if}}
|
|
38
38
|
|
|
39
39
|
<span class="pix-select-button__text">{{this.placeholder}}</span>
|
|
40
40
|
|
|
41
|
-
<
|
|
41
|
+
<PixIcon
|
|
42
42
|
class="pix-select-button__dropdown-icon"
|
|
43
|
-
@
|
|
43
|
+
@name={{if this.isExpanded "chevronTop" "chevronBottom"}}
|
|
44
44
|
/>
|
|
45
45
|
</button>
|
|
46
46
|
<div
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
>
|
|
51
51
|
{{#if @isSearchable}}
|
|
52
52
|
<div class="pix-select__search">
|
|
53
|
-
<
|
|
53
|
+
<PixIcon class="pix-select-search__icon" @name="search" />
|
|
54
54
|
<label class="screen-reader-only" for={{this.searchId}}>{{@searchLabel}}</label>
|
|
55
55
|
<input
|
|
56
56
|
class="pix-select-search__input"
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
{{option.label}}
|
|
117
117
|
|
|
118
118
|
{{#if (eq option.value @value)}}
|
|
119
|
-
<
|
|
119
|
+
<PixIcon @name="check" role="presentation" />
|
|
120
120
|
{{/if}}
|
|
121
121
|
</li>
|
|
122
122
|
{{/each}}
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
{{option.label}}
|
|
140
140
|
|
|
141
141
|
{{#if (eq option.value @value)}}
|
|
142
|
-
<
|
|
142
|
+
<PixIcon @name="check" role="presentation" />
|
|
143
143
|
{{/if}}
|
|
144
144
|
</li>
|
|
145
145
|
{{/each}}
|
|
@@ -7,25 +7,17 @@
|
|
|
7
7
|
@inlineLabel={{@inlineLabel}}
|
|
8
8
|
>{{yield to="label"}}</PixLabel>
|
|
9
9
|
<button
|
|
10
|
-
class="pix-toggle__button"
|
|
10
|
+
class="pix-toggle__button{{if @useIcons ' pix-toggle__button--icon'}}"
|
|
11
11
|
id={{this.id}}
|
|
12
12
|
aria-pressed={{if @toggled "true" "false"}}
|
|
13
13
|
type="button"
|
|
14
14
|
{{on "click" this.onToggle}}
|
|
15
15
|
>
|
|
16
|
-
<span class="pix-toggle__on">
|
|
17
|
-
{{
|
|
18
|
-
{{@onLabel}}
|
|
19
|
-
{{else}}
|
|
20
|
-
{{yield to="on"}}
|
|
21
|
-
{{/if}}
|
|
16
|
+
<span class="pix-toggle__on{{if @useIcons ' pix-toggle__with-icon'}}">
|
|
17
|
+
{{yield to="on"}}
|
|
22
18
|
</span>
|
|
23
|
-
<span class="pix-toggle__off">
|
|
24
|
-
{{
|
|
25
|
-
{{@offLabel}}
|
|
26
|
-
{{else}}
|
|
27
|
-
{{yield to="off"}}
|
|
28
|
-
{{/if}}
|
|
19
|
+
<span class="pix-toggle__off{{if @useIcons ' pix-toggle__with-icon'}}">
|
|
20
|
+
{{yield to="off"}}
|
|
29
21
|
</span>
|
|
30
22
|
</button>
|
|
31
23
|
</div>
|
package/addon/helpers/icons.js
CHANGED
|
@@ -15,17 +15,16 @@ export const ICONS = {
|
|
|
15
15
|
cancel: { default: 'cancel', plainIcon: 'cancel_plainIcon' },
|
|
16
16
|
check: { default: 'check' },
|
|
17
17
|
checkCircle: { default: 'check_circle', plainIcon: 'check_circle_plainIcon' },
|
|
18
|
-
chevronBottom: { default: '
|
|
18
|
+
chevronBottom: { default: 'keyboard_arrow_down' },
|
|
19
19
|
chevronLeft: { default: 'chevron_left' },
|
|
20
20
|
chevronRight: { default: 'chevron_right' },
|
|
21
|
-
chevronTop: { default: '
|
|
21
|
+
chevronTop: { default: 'keyboard_arrow_up' },
|
|
22
22
|
clock: { default: 'schedule', plainIcon: 'schedule_plainIcon' },
|
|
23
23
|
close: { default: 'close' },
|
|
24
24
|
cloudUpload: { default: 'cloud_upload', plainIcon: 'cloud_upload_plainIcon' },
|
|
25
25
|
conversionPath: { default: 'conversion_path' },
|
|
26
26
|
copy: { default: 'content_copy', plainIcon: 'content_copy_plainIcon' },
|
|
27
27
|
delete: { default: 'delete', plainIcon: 'delete_plainIcon' },
|
|
28
|
-
down: { default: 'keyboard_arrow_down' },
|
|
29
28
|
download: { default: 'download' },
|
|
30
29
|
edit: { default: 'edit_square', plainIcon: 'edit_square_plainIcon' },
|
|
31
30
|
error: { default: 'error', plainIcon: 'error_plainIcon' },
|
|
@@ -71,7 +70,6 @@ export const ICONS = {
|
|
|
71
70
|
tablet: { default: 'tablet_android', plainIcon: 'tablet_android_plainIcon' },
|
|
72
71
|
thumbUp: { default: 'thumb_up', plainIcon: 'thumb_up_plainIcon' },
|
|
73
72
|
tools: { default: 'construction' },
|
|
74
|
-
up: { default: 'keyboard_arrow_up' },
|
|
75
73
|
upload: { default: 'upload' },
|
|
76
74
|
uploadFile: { default: 'upload_file', plainIcon: 'upload_file_plainIcon' },
|
|
77
75
|
userCircle: { default: 'account_circle', plainIcon: 'account_circle_plainIcon' },
|
|
@@ -7,13 +7,20 @@
|
|
|
7
7
|
border: 1px solid currentcolor;
|
|
8
8
|
border-radius: var(--pix-spacing-2x);
|
|
9
9
|
|
|
10
|
+
&__icon {
|
|
11
|
+
flex-shrink: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
&__action {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
11
17
|
color: inherit;
|
|
12
18
|
text-decoration: underline;
|
|
13
19
|
|
|
14
20
|
.external-link {
|
|
21
|
+
width: 1rem;
|
|
22
|
+
height: 1rem;
|
|
15
23
|
margin-left: var(--pix-spacing-1x);
|
|
16
|
-
font-size: 0.875rem;
|
|
17
24
|
}
|
|
18
25
|
}
|
|
19
26
|
|
|
@@ -22,16 +29,12 @@
|
|
|
22
29
|
margin-left: auto;
|
|
23
30
|
}
|
|
24
31
|
|
|
25
|
-
&__icon {
|
|
26
|
-
font-size: 1.125rem;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
32
|
&--information {
|
|
30
33
|
color: var(--pix-info-700);
|
|
31
34
|
background-color: var(--pix-info-50);
|
|
35
|
+
fill: var(--pix-info-700);
|
|
32
36
|
|
|
33
37
|
.pix-icon-button {
|
|
34
|
-
color: var(--pix-neutral-800);
|
|
35
38
|
background-color: var(--pix-info-50);
|
|
36
39
|
|
|
37
40
|
&:hover:enabled,
|
|
@@ -49,9 +52,9 @@
|
|
|
49
52
|
&--warning {
|
|
50
53
|
color: var(--pix-warning-700);
|
|
51
54
|
background-color: var(--pix-warning-50);
|
|
55
|
+
fill: var(--pix-warning-700);
|
|
52
56
|
|
|
53
57
|
.pix-icon-button {
|
|
54
|
-
color: var(--pix-neutral-800);
|
|
55
58
|
background-color: var(--pix-warning-50);
|
|
56
59
|
|
|
57
60
|
&:hover:enabled,
|
|
@@ -69,9 +72,9 @@
|
|
|
69
72
|
&--error {
|
|
70
73
|
color: var(--pix-error-700);
|
|
71
74
|
background-color: var(--pix-error-50);
|
|
75
|
+
fill: var(--pix-error-700);
|
|
72
76
|
|
|
73
77
|
.pix-icon-button {
|
|
74
|
-
color: var(--pix-neutral-800);
|
|
75
78
|
background-color: var(--pix-error-50);
|
|
76
79
|
|
|
77
80
|
&:hover:enabled,
|
|
@@ -89,15 +92,18 @@
|
|
|
89
92
|
&--communication {
|
|
90
93
|
color: var(--pix-neutral-0);
|
|
91
94
|
background-color: var(--pix-primary-500);
|
|
95
|
+
fill: var(--pix-neutral-0);
|
|
92
96
|
|
|
93
97
|
&-orga {
|
|
94
98
|
color: var(--pix-neutral-0);
|
|
95
99
|
background-color: var(--pix-orga-500);
|
|
100
|
+
fill: var(--pix-neutral-0);
|
|
96
101
|
}
|
|
97
102
|
|
|
98
103
|
&-certif {
|
|
99
104
|
color: var(--pix-neutral-0);
|
|
100
105
|
background-color: var(--pix-certif-500);
|
|
106
|
+
fill: var(--pix-neutral-0);
|
|
101
107
|
}
|
|
102
108
|
}
|
|
103
109
|
}
|