@1024pix/pix-ui 48.9.0 → 49.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.
Files changed (27) hide show
  1. package/addon/components/{pix-collapsible.hbs → pix-accordions.hbs} +8 -8
  2. package/addon/components/{pix-collapsible.js → pix-accordions.js} +4 -4
  3. package/addon/components/{pix-banner.hbs → pix-banner-alert.hbs} +5 -5
  4. package/addon/components/{pix-banner.js → pix-banner-alert.js} +1 -1
  5. package/addon/components/pix-notification-alert.hbs +13 -0
  6. package/addon/components/{pix-message.js → pix-notification-alert.js} +1 -1
  7. package/addon/components/{pix-progress-gauge.hbs → pix-progress-bar.hbs} +4 -4
  8. package/addon/components/{pix-progress-gauge.js → pix-progress-bar.js} +5 -5
  9. package/addon/components/{pix-toggle.hbs → pix-toggle-button.hbs} +3 -3
  10. package/addon/components/{pix-toggle.js → pix-toggle-button.js} +4 -4
  11. package/addon/styles/{_pix-collapsible.scss → _pix-accordions.scss} +8 -8
  12. package/addon/styles/{_pix-banner.scss → _pix-banner-alert.scss} +1 -1
  13. package/addon/styles/{_pix-message.scss → _pix-notification-alert.scss} +6 -6
  14. package/addon/styles/{_pix-progress-gauge.scss → _pix-progress-bar.scss} +24 -24
  15. package/addon/styles/{_pix-toggle.scss → _pix-toggle-button.scss} +2 -2
  16. package/addon/styles/addon.scss +5 -5
  17. package/app/components/pix-accordions.js +1 -0
  18. package/app/components/pix-banner-alert.js +1 -0
  19. package/app/components/pix-notification-alert.js +1 -0
  20. package/app/components/{pix-progress-gauge.js → pix-progress-bar.js} +1 -1
  21. package/app/components/pix-toggle-button.js +1 -0
  22. package/package.json +1 -1
  23. package/addon/components/pix-message.hbs +0 -13
  24. package/app/components/pix-banner.js +0 -1
  25. package/app/components/pix-collapsible.js +0 -1
  26. package/app/components/pix-message.js +0 -1
  27. package/app/components/pix-toggle.js +0 -1
@@ -1,18 +1,18 @@
1
- <div class="pix-collapsible">
1
+ <div class="pix-accordions">
2
2
 
3
3
  <button
4
- class="pix-collapsible__title"
4
+ class="pix-accordions__title"
5
5
  type="button"
6
- {{on "click" this.toggleCollapsible}}
6
+ {{on "click" this.toggleAccordions}}
7
7
  aria-controls={{this.contentId}}
8
8
  aria-expanded={{if this.isUnCollapsed "true" "false"}}
9
9
  ...attributes
10
10
  >
11
11
 
12
- <span class="pix-collapsible-title__container">
12
+ <span class="pix-accordions-title__container">
13
13
  {{#if @iconName}}
14
14
  <PixIcon
15
- class="pix-collapsible-title__icon"
15
+ class="pix-accordions-title__icon"
16
16
  @name={{@iconName}}
17
17
  @plainIcon={{@plainIcon}}
18
18
  @ariaHidden={{true}}
@@ -22,14 +22,14 @@
22
22
  {{yield to="title"}}
23
23
  </span>
24
24
 
25
- <span class="pix-collapsible-title__container">
25
+ <span class="pix-accordions-title__container">
26
26
  {{#if @tagContent}}
27
27
  <PixTag @color={{@tagColor}}>
28
28
  {{@tagContent}}
29
29
  </PixTag>
30
30
  {{/if}}
31
31
  <PixIcon
32
- class="pix-collapsible-title-container__toggle-icon"
32
+ class="pix-accordions-title-container__toggle-icon"
33
33
  @ariaHidden={{true}}
34
34
  @name="{{if this.isCollapsed 'chevronBottom' 'chevronTop'}}"
35
35
  />
@@ -38,7 +38,7 @@
38
38
 
39
39
  <div
40
40
  id={{this.contentId}}
41
- class="pix-collapsible__content"
41
+ class="pix-accordions__content"
42
42
  aria-hidden={{if this.isCollapsed "true" "false"}}
43
43
  >
44
44
  {{#if this.isContentRendered}}
@@ -3,9 +3,9 @@ import { tracked } from '@glimmer/tracking';
3
3
  import { action } from '@ember/object';
4
4
  import { guidFor } from '@ember/object/internals';
5
5
 
6
- export default class PixCollapsible extends Component {
7
- text = 'pix-collapsible';
8
- contentId = 'pix-collapsible-' + guidFor(this);
6
+ export default class PixAccordions extends Component {
7
+ text = 'pix-accordions';
8
+ contentId = 'pix-accordions-' + guidFor(this);
9
9
 
10
10
  @tracked isCollapsed = true;
11
11
  @tracked hasUnCollapsedOnce = false;
@@ -19,7 +19,7 @@ export default class PixCollapsible extends Component {
19
19
  }
20
20
 
21
21
  @action
22
- toggleCollapsible() {
22
+ toggleAccordions() {
23
23
  this.isCollapsed = !this.isCollapsed;
24
24
  this.hasUnCollapsedOnce = true;
25
25
  }
@@ -1,17 +1,17 @@
1
1
  {{#if this.displayBanner}}
2
- <div class="pix-banner pix-banner--{{this.type}}" role="alert" ...attributes>
2
+ <div class="pix-banner-alert pix-banner-alert--{{this.type}}" role="alert" ...attributes>
3
3
  <PixIcon
4
4
  @name={{this.icon}}
5
5
  @plainIcon={{true}}
6
6
  @ariaHidden={{true}}
7
- class="pix-banner__icon"
7
+ class="pix-banner-alert__icon"
8
8
  />
9
9
  <div>
10
10
  {{yield}}
11
11
  {{#if this.displayAction}}
12
12
  {{#if this.isExternalLink}}
13
13
  <a
14
- class="pix-banner__action"
14
+ class="pix-banner-alert__action"
15
15
  href={{@actionUrl}}
16
16
  target="_blank"
17
17
  rel="noopener noreferrer"
@@ -20,12 +20,12 @@
20
20
  <PixIcon @name="openNew" class="external-link" />
21
21
  </a>
22
22
  {{else}}
23
- <LinkTo class="pix-banner__action" @route={{@actionUrl}}>{{@actionLabel}}</LinkTo>
23
+ <LinkTo class="pix-banner-alert__action" @route={{@actionUrl}}>{{@actionLabel}}</LinkTo>
24
24
  {{/if}}
25
25
  {{/if}}
26
26
  </div>
27
27
  {{#if this.canCloseBanner}}
28
- <div class="pix-banner__close">
28
+ <div class="pix-banner-alert__close">
29
29
  <PixIconButton
30
30
  @ariaLabel="Fermer"
31
31
  @iconName="close"
@@ -26,7 +26,7 @@ const icons = {
26
26
  [TYPE_COMMUNICATION_CERTIF]: 'campaign',
27
27
  };
28
28
 
29
- export default class PixBanner extends Component {
29
+ export default class PixBannerAlert extends Component {
30
30
  @tracked isBannerVisible = true;
31
31
  get type() {
32
32
  return types.includes(this.args.type) ? this.args.type : TYPE_INFO;
@@ -0,0 +1,13 @@
1
+ <p class="pix-notification-alert {{concat 'pix-notification-alert--' this.type}}" ...attributes>
2
+ {{#if @withIcon}}
3
+ <PixIcon
4
+ @name={{this.iconName}}
5
+ @ariaHidden={{true}}
6
+ @plainIcon={{true}}
7
+ class="pix-notification-alert__icon"
8
+ />
9
+ {{/if}}
10
+ <span class="pix-notification-alert__content">
11
+ {{yield}}
12
+ </span>
13
+ </p>
@@ -5,7 +5,7 @@ const TYPE_SUCCESS = 'success';
5
5
  const TYPE_WARNING = 'warning';
6
6
  const TYPE_ERROR = 'error';
7
7
 
8
- export default class PixMessage extends Component {
8
+ export default class PixNotificationAlert extends Component {
9
9
  get type() {
10
10
  const correctTypes = [TYPE_INFO, TYPE_SUCCESS, TYPE_WARNING, TYPE_ERROR];
11
11
 
@@ -1,19 +1,19 @@
1
1
  <div
2
- class="progress-gauge {{this.themeMode}} {{this.colorClass}}"
2
+ class="progress-bar {{this.themeMode}} {{this.colorClass}}"
3
3
  aria-hidden={{if @isDecorative "true"}}
4
4
  ...attributes
5
5
  >
6
6
  {{#unless @hidePercentage}}
7
- <div class="progress-gauge__text" role="presentation">{{this.percentageValue}}</div>
7
+ <div class="progress-bar__text" role="presentation">{{this.percentageValue}}</div>
8
8
  {{/unless}}
9
9
  <label for={{this.id}} class="screen-reader-only">{{@label}}</label>
10
10
  <progress
11
- class="progress-gauge__bar"
11
+ class="progress-bar__bar"
12
12
  id={{this.id}}
13
13
  max="100"
14
14
  value={{this.value}}
15
15
  >{{this.value}}%</progress>
16
16
  {{#if @subtitle}}
17
- <p class="progress-gauge__sub-title">{{@subtitle}}</p>
17
+ <p class="progress-bar__sub-title">{{@subtitle}}</p>
18
18
  {{/if}}
19
19
  </div>
@@ -1,7 +1,7 @@
1
1
  import Component from '@glimmer/component';
2
2
  import { guidFor } from '@ember/object/internals';
3
3
 
4
- export default class PixProgressGauge extends Component {
4
+ export default class PixProgressBar extends Component {
5
5
  get id() {
6
6
  return guidFor(this);
7
7
  }
@@ -10,7 +10,7 @@ export default class PixProgressGauge extends Component {
10
10
  if (Number(this.args.value) <= 0) return 0;
11
11
  if (Number(this.args.value) > 100) return 100;
12
12
  if (!this.args.value) {
13
- throw new Error('ERROR in PixProgressGauge component, @value param is not provided.');
13
+ throw new Error('ERROR in PixProgressBar component, @value param is not provided.');
14
14
  }
15
15
  return Number(this.args.value);
16
16
  }
@@ -23,7 +23,7 @@ export default class PixProgressGauge extends Component {
23
23
  const thereIsNoLabel = !this.args.label || !this.args.label.trim();
24
24
 
25
25
  if (thereIsNoLabel && !this.args.isDecorative) {
26
- throw new Error('ERROR in PixProgressGauge component, @label param is not provided.');
26
+ throw new Error('ERROR in PixProgressBar component, @label param is not provided.');
27
27
  }
28
28
  return this.args.label;
29
29
  }
@@ -36,7 +36,7 @@ export default class PixProgressGauge extends Component {
36
36
  ? this.args.themeMode
37
37
  : 'light';
38
38
 
39
- return `progress-gauge--theme-${themeMode}`;
39
+ return `progress-bar--theme-${themeMode}`;
40
40
  }
41
41
 
42
42
  get colorClass() {
@@ -53,6 +53,6 @@ export default class PixProgressGauge extends Component {
53
53
  const color =
54
54
  this.args.color && availableColor.includes(this.args.color) ? this.args.color : 'primary';
55
55
 
56
- return `progress-gauge--content-${color}`;
56
+ return `progress-bar--content-${color}`;
57
57
  }
58
58
  }
@@ -7,16 +7,16 @@
7
7
  @inlineLabel={{@inlineLabel}}
8
8
  >{{yield to="label"}}</PixLabel>
9
9
  <button
10
- class="pix-toggle__button{{if @useIcons ' pix-toggle__button--icon'}}"
10
+ class="pix-toggle-button__button{{if @useIcons ' pix-toggle-button__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{{if @useIcons ' pix-toggle__with-icon'}}">
16
+ <span class="pix-toggle-button__on{{if @useIcons ' pix-toggle-button__with-icon'}}">
17
17
  {{yield to="on"}}
18
18
  </span>
19
- <span class="pix-toggle__off{{if @useIcons ' pix-toggle__with-icon'}}">
19
+ <span class="pix-toggle-button__off{{if @useIcons ' pix-toggle-button__with-icon'}}">
20
20
  {{yield to="off"}}
21
21
  </span>
22
22
  </button>
@@ -2,15 +2,15 @@ import Component from '@glimmer/component';
2
2
  import { action } from '@ember/object';
3
3
  import { guidFor } from '@ember/object/internals';
4
4
 
5
- export default class PixToggle extends Component {
5
+ export default class PixToggleButton extends Component {
6
6
  get className() {
7
- const classes = ['pix-toggle'];
7
+ const classes = ['pix-toggle-button'];
8
8
  if (this.args.toggled) {
9
- classes.push('pix-toggle--pressed');
9
+ classes.push('pix-toggle-button--pressed');
10
10
  }
11
11
 
12
12
  if (this.args.inlineLabel) {
13
- classes.push('pix-toggle--inline');
13
+ classes.push('pix-toggle-button--inline');
14
14
  }
15
15
 
16
16
  return classes.join(' ');
@@ -1,15 +1,15 @@
1
- .pix-collapsible {
1
+ .pix-accordions {
2
2
  background-color: var(--pix-neutral-0);
3
3
  border: 1px solid var(--pix-neutral-100);
4
4
 
5
5
  &:first-child,
6
- &:first-child .pix-collapsible__title {
6
+ &:first-child .pix-accordions__title {
7
7
  border-top-left-radius: 0.5rem;
8
8
  border-top-right-radius: 0.5rem;
9
9
  }
10
10
 
11
11
  &:last-child,
12
- &:last-child .pix-collapsible__title:not([aria-expanded='true']) {
12
+ &:last-child .pix-accordions__title:not([aria-expanded='true']) {
13
13
  border-bottom-right-radius: 0.5rem;
14
14
  border-bottom-left-radius: 0.5rem;
15
15
  }
@@ -28,7 +28,7 @@
28
28
  }
29
29
  }
30
30
 
31
- .pix-collapsible__title {
31
+ .pix-accordions__title {
32
32
  display: flex;
33
33
  align-items: center;
34
34
  justify-content: space-between;
@@ -50,7 +50,7 @@
50
50
  }
51
51
  }
52
52
 
53
- .pix-collapsible-title {
53
+ .pix-accordions-title {
54
54
  &__container {
55
55
  display: flex;
56
56
  align-items: center;
@@ -62,7 +62,7 @@
62
62
  }
63
63
  }
64
64
 
65
- .pix-collapsible-title-container {
65
+ .pix-accordions-title-container {
66
66
 
67
67
  &__toggle-icon {
68
68
  margin-left: var(--pix-spacing-2x);
@@ -70,11 +70,11 @@
70
70
  }
71
71
  }
72
72
 
73
- .pix-collapsible__title:hover .pix-collapsible-title__toggle-icon {
73
+ .pix-accordions__title:hover .pix-accordions-title__toggle-icon {
74
74
  background-color: var(--pix-neutral-100);
75
75
  }
76
76
 
77
- .pix-collapsible__content {
77
+ .pix-accordions__content {
78
78
  padding: var(--pix-spacing-4x);
79
79
  color: var(--pix-neutral-500);
80
80
  font-size: 0.875rem;
@@ -1,4 +1,4 @@
1
- .pix-banner {
1
+ .pix-banner-alert {
2
2
  display: flex;
3
3
  gap: var(--pix-spacing-2x);
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- .pix-message {
1
+ .pix-notification-alert {
2
2
  @extend %pix-body-s;
3
3
 
4
4
  display: flex;
@@ -10,27 +10,27 @@
10
10
  border: 1px solid currentcolor;
11
11
  border-radius: var(--pix-spacing-1x);
12
12
 
13
- &.pix-message--info {
13
+ &.pix-notification-alert--info {
14
14
  color: var(--pix-info-700);
15
15
  background-color: var(--pix-info-50);
16
16
  }
17
17
 
18
- &.pix-message--alert {
18
+ &.pix-notification-alert--alert {
19
19
  color: var(--pix-error-700);
20
20
  background-color: var(--pix-error-50);
21
21
  }
22
22
 
23
- &.pix-message--error {
23
+ &.pix-notification-alert--error {
24
24
  color: var(--pix-error-700);
25
25
  background-color: var(--pix-error-50);
26
26
  }
27
27
 
28
- &.pix-message--success {
28
+ &.pix-notification-alert--success {
29
29
  color: var(--pix-success-700);
30
30
  background-color: var(--pix-success-50);
31
31
  }
32
32
 
33
- &.pix-message--warning {
33
+ &.pix-notification-alert--warning {
34
34
  color: var(--pix-warning-700);
35
35
  background-color: var(--pix-warning-50);
36
36
  }
@@ -1,4 +1,4 @@
1
- .progress-gauge {
1
+ .progress-bar {
2
2
  position: relative;
3
3
  display: grid;
4
4
  grid-template-areas:
@@ -60,68 +60,68 @@
60
60
  }
61
61
 
62
62
  // THEME DARK
63
- .progress-gauge--theme-dark {
64
- .progress-gauge__bar {
63
+ .progress-bar--theme-dark {
64
+ .progress-bar__bar {
65
65
  border: 2px solid var(--pix-neutral-0);
66
66
  }
67
67
 
68
- .progress-gauge__bar::-webkit-progress-bar {
68
+ .progress-bar__bar::-webkit-progress-bar {
69
69
  background-color: var(--pix-neutral-0);
70
70
  }
71
71
 
72
- .progress-gauge__text,
73
- .progress-gauge__sub-title {
72
+ .progress-bar__text,
73
+ .progress-bar__sub-title {
74
74
  color: var(--pix-neutral-0);
75
75
  }
76
76
  }
77
77
 
78
78
  // SPECIFIC BAR COLORS
79
- .progress-gauge--content-blue, .progress-gauge--content-primary {
80
- .progress-gauge__bar::-webkit-progress-value {
79
+ .progress-bar--content-blue, .progress-bar--content-primary {
80
+ .progress-bar__bar::-webkit-progress-value {
81
81
  background-color: var(--pix-primary-500);
82
82
  }
83
83
 
84
- .progress-gauge__bar::-moz-progress-bar {
84
+ .progress-bar__bar::-moz-progress-bar {
85
85
  background-color: var(--pix-primary-500);
86
86
  }
87
87
 
88
- &:not(.progress-gauge--theme-dark) {
89
- .progress-gauge__text,
90
- .progress-gauge__sub-title {
88
+ &:not(.progress-bar--theme-dark) {
89
+ .progress-bar__text,
90
+ .progress-bar__sub-title {
91
91
  color: var(--pix-primary-500);
92
92
  }
93
93
  }
94
94
  }
95
95
 
96
- .progress-gauge--content-green, .progress-gauge--content-success {
97
- .progress-gauge__bar::-webkit-progress-value {
96
+ .progress-bar--content-green, .progress-bar--content-success {
97
+ .progress-bar__bar::-webkit-progress-value {
98
98
  background-color: var(--pix-success-700);
99
99
  }
100
100
 
101
- .progress-gauge__bar::-moz-progress-bar {
101
+ .progress-bar__bar::-moz-progress-bar {
102
102
  background-color: var(--pix-success-700);
103
103
  }
104
104
 
105
- &:not(.progress-gauge--theme-dark) {
106
- .progress-gauge__text,
107
- .progress-gauge__sub-title {
105
+ &:not(.progress-bar--theme-dark) {
106
+ .progress-bar__text,
107
+ .progress-bar__sub-title {
108
108
  color: var(--pix-success-700);
109
109
  }
110
110
  }
111
111
  }
112
112
 
113
- .progress-gauge--content-purple, .progress-gauge--content-tertiary {
114
- .progress-gauge__bar::-webkit-progress-value {
113
+ .progress-bar--content-purple, .progress-bar--content-tertiary {
114
+ .progress-bar__bar::-webkit-progress-value {
115
115
  background-color: var(--pix-tertiary-900);
116
116
  }
117
117
 
118
- .progress-gauge__bar::-moz-progress-bar {
118
+ .progress-bar__bar::-moz-progress-bar {
119
119
  background-color: var(--pix-tertiary-900);
120
120
  }
121
121
 
122
- &:not(.progress-gauge--theme-dark) {
123
- .progress-gauge__text,
124
- .progress-gauge__sub-title {
122
+ &:not(.progress-bar--theme-dark) {
123
+ .progress-bar__text,
124
+ .progress-bar__sub-title {
125
125
  color: var(--pix-tertiary-900);
126
126
  }
127
127
  }
@@ -1,4 +1,4 @@
1
- .pix-toggle {
1
+ .pix-toggle-button {
2
2
  display: inline-flex;
3
3
  flex-direction: column;
4
4
  gap: var(--pix-spacing-1x);
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  &--pressed {
51
- .pix-toggle {
51
+ .pix-toggle-button {
52
52
  &__on {
53
53
  color: var(--pix-neutral-20);
54
54
  font-weight: inherit;
@@ -3,16 +3,16 @@
3
3
  @import 'a11y';
4
4
  @import 'pix-icon';
5
5
  @import 'pix-background-header';
6
- @import 'pix-banner';
6
+ @import 'pix-banner-alert';
7
7
  @import 'pix-block';
8
8
  @import 'pix-button-base';
9
9
  @import 'pix-button';
10
- @import 'pix-collapsible';
10
+ @import 'pix-accordions';
11
11
  @import 'pix-filter-banner';
12
12
  @import 'pix-icon-button';
13
- @import 'pix-message';
13
+ @import 'pix-notification-alert';
14
14
  @import 'pix-multi-select';
15
- @import 'pix-progress-gauge';
15
+ @import 'pix-progress-bar';
16
16
  @import 'pix-return-to';
17
17
  @import 'pix-select';
18
18
  @import 'pix-select-list';
@@ -32,7 +32,7 @@
32
32
  @import 'pix-selectable-tag';
33
33
  @import 'pix-pagination';
34
34
  @import 'pix-checkbox';
35
- @import 'pix-toggle';
35
+ @import 'pix-toggle-button';
36
36
  @import 'pix-indicator-card';
37
37
  @import 'trap-focus';
38
38
  @import 'pix-search-input';
@@ -0,0 +1 @@
1
+ export { default } from '@1024pix/pix-ui/components/pix-accordions';
@@ -0,0 +1 @@
1
+ export { default } from '@1024pix/pix-ui/components/pix-banner-alert';
@@ -0,0 +1 @@
1
+ export { default } from '@1024pix/pix-ui/components/pix-notification-alert';
@@ -1 +1 @@
1
- export { default } from '@1024pix/pix-ui/components/pix-progress-gauge';
1
+ export { default } from '@1024pix/pix-ui/components/pix-progress-bar';
@@ -0,0 +1 @@
1
+ export { default } from '@1024pix/pix-ui/components/pix-toggle-button';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "48.9.0",
3
+ "version": "49.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"
@@ -1,13 +0,0 @@
1
- <p class="pix-message {{concat 'pix-message--' this.type}}" ...attributes>
2
- {{#if @withIcon}}
3
- <PixIcon
4
- @name={{this.iconName}}
5
- @ariaHidden={{true}}
6
- @plainIcon={{true}}
7
- class="pix-message__icon"
8
- />
9
- {{/if}}
10
- <span class="pix-message__content">
11
- {{yield}}
12
- </span>
13
- </p>
@@ -1 +0,0 @@
1
- export { default } from '@1024pix/pix-ui/components/pix-banner';
@@ -1 +0,0 @@
1
- export { default } from '@1024pix/pix-ui/components/pix-collapsible';
@@ -1 +0,0 @@
1
- export { default } from '@1024pix/pix-ui/components/pix-message';
@@ -1 +0,0 @@
1
- export { default } from '@1024pix/pix-ui/components/pix-toggle';