@1024pix/pix-ui 58.4.2 → 58.4.4

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 (106) hide show
  1. package/addon/components/pix-accordions.gjs +81 -0
  2. package/addon/components/pix-app-layout.gjs +1 -1
  3. package/addon/components/pix-background-header.gjs +15 -0
  4. package/addon/components/{pix-banner-alert.js → pix-banner-alert.gjs} +49 -0
  5. package/addon/components/{pix-block.js → pix-block.gjs} +18 -0
  6. package/addon/components/pix-breadcrumb.gjs +40 -0
  7. package/addon/components/pix-button/pix-button-content.gjs +21 -0
  8. package/addon/components/pix-button-link.gjs +49 -0
  9. package/addon/components/{pix-button-upload.js → pix-button-upload.gjs} +15 -0
  10. package/addon/components/{pix-button.js → pix-button.gjs} +30 -0
  11. package/addon/components/{pix-checkbox.js → pix-checkbox.gjs} +42 -1
  12. package/addon/components/pix-code.gjs +59 -0
  13. package/addon/components/{pix-filterable-and-searchable-select.js → pix-filterable-and-searchable-select.gjs} +55 -0
  14. package/addon/components/pix-gauge.gjs +199 -0
  15. package/addon/components/{pix-icon-button.js → pix-icon-button.gjs} +21 -0
  16. package/addon/components/{pix-icon.js → pix-icon.gjs} +19 -0
  17. package/addon/components/pix-indicator-card.gjs +68 -0
  18. package/addon/components/{pix-input-code.js → pix-input-code.gjs} +29 -0
  19. package/addon/components/pix-input-password.gjs +102 -0
  20. package/addon/components/pix-input.gjs +57 -0
  21. package/addon/components/pix-label-wrapped.gjs +64 -0
  22. package/addon/components/pix-modal.gjs +55 -0
  23. package/addon/components/pix-navigation-separator.gjs +1 -0
  24. package/addon/components/{pix-navigation.js → pix-navigation.gjs} +49 -0
  25. package/addon/components/{pix-notification-alert.js → pix-notification-alert.gjs} +19 -0
  26. package/addon/components/pix-overlay.gjs +31 -0
  27. package/addon/components/{pix-pagination.js → pix-pagination.gjs} +58 -0
  28. package/addon/components/{pix-progress-bar.js → pix-progress-bar.gjs} +22 -0
  29. package/addon/components/{pix-radio-button.js → pix-radio-button.gjs} +42 -0
  30. package/addon/components/{pix-search-input.js → pix-search-input.gjs} +31 -0
  31. package/addon/components/pix-select-list.gjs +166 -0
  32. package/addon/components/pix-selectable-tag.gjs +23 -0
  33. package/addon/components/pix-sidebar.gjs +49 -0
  34. package/addon/components/pix-stars.gjs +34 -0
  35. package/addon/components/pix-structure-switcher.gjs +107 -0
  36. package/addon/components/{pix-table-column.js → pix-table-column.gjs} +33 -0
  37. package/addon/components/{pix-tabs.js → pix-tabs.gjs} +6 -0
  38. package/addon/components/pix-textarea.gjs +68 -0
  39. package/addon/components/pix-toast-container.gjs +16 -0
  40. package/addon/components/{pix-toast.js → pix-toast.gjs} +25 -0
  41. package/addon/components/pix-tooltip.gjs +82 -0
  42. package/addon/components/{toast-example.js → toast-example.gjs} +13 -0
  43. package/package.json +1 -1
  44. package/addon/components/pix-accordions.hbs +0 -48
  45. package/addon/components/pix-accordions.js +0 -26
  46. package/addon/components/pix-background-header.hbs +0 -7
  47. package/addon/components/pix-background-header.js +0 -5
  48. package/addon/components/pix-banner-alert.hbs +0 -38
  49. package/addon/components/pix-block.hbs +0 -8
  50. package/addon/components/pix-breadcrumb.hbs +0 -21
  51. package/addon/components/pix-breadcrumb.js +0 -12
  52. package/addon/components/pix-button/pix-button-content.hbs +0 -17
  53. package/addon/components/pix-button-link.hbs +0 -32
  54. package/addon/components/pix-button-link.js +0 -10
  55. package/addon/components/pix-button-upload.hbs +0 -11
  56. package/addon/components/pix-button.hbs +0 -25
  57. package/addon/components/pix-checkbox.hbs +0 -37
  58. package/addon/components/pix-code.hbs +0 -31
  59. package/addon/components/pix-code.js +0 -24
  60. package/addon/components/pix-filterable-and-searchable-select.hbs +0 -48
  61. package/addon/components/pix-gauge.hbs +0 -98
  62. package/addon/components/pix-gauge.js +0 -96
  63. package/addon/components/pix-icon-button.hbs +0 -15
  64. package/addon/components/pix-icon.hbs +0 -15
  65. package/addon/components/pix-indicator-card.hbs +0 -47
  66. package/addon/components/pix-indicator-card.js +0 -14
  67. package/addon/components/pix-input-code.hbs +0 -24
  68. package/addon/components/pix-input-password.hbs +0 -68
  69. package/addon/components/pix-input-password.js +0 -28
  70. package/addon/components/pix-input.hbs +0 -38
  71. package/addon/components/pix-input.js +0 -14
  72. package/addon/components/pix-label-wrapped.hbs +0 -32
  73. package/addon/components/pix-label-wrapped.js +0 -27
  74. package/addon/components/pix-modal.hbs +0 -33
  75. package/addon/components/pix-modal.js +0 -16
  76. package/addon/components/pix-navigation-separator.hbs +0 -1
  77. package/addon/components/pix-navigation.hbs +0 -43
  78. package/addon/components/pix-notification-alert.hbs +0 -13
  79. package/addon/components/pix-overlay.hbs +0 -11
  80. package/addon/components/pix-overlay.js +0 -13
  81. package/addon/components/pix-pagination.hbs +0 -52
  82. package/addon/components/pix-progress-bar.hbs +0 -19
  83. package/addon/components/pix-radio-button.hbs +0 -37
  84. package/addon/components/pix-search-input.hbs +0 -25
  85. package/addon/components/pix-select-list.hbs +0 -115
  86. package/addon/components/pix-select-list.js +0 -41
  87. package/addon/components/pix-selectable-tag.hbs +0 -10
  88. package/addon/components/pix-selectable-tag.js +0 -9
  89. package/addon/components/pix-sidebar.hbs +0 -28
  90. package/addon/components/pix-sidebar.js +0 -16
  91. package/addon/components/pix-stars.hbs +0 -17
  92. package/addon/components/pix-stars.js +0 -13
  93. package/addon/components/pix-structure-switcher.hbs +0 -41
  94. package/addon/components/pix-structure-switcher.js +0 -54
  95. package/addon/components/pix-table-column.hbs +0 -28
  96. package/addon/components/pix-tabs.hbs +0 -3
  97. package/addon/components/pix-textarea.hbs +0 -36
  98. package/addon/components/pix-textarea.js +0 -23
  99. package/addon/components/pix-toast-container.hbs +0 -5
  100. package/addon/components/pix-toast-container.js +0 -6
  101. package/addon/components/pix-toast.hbs +0 -17
  102. package/addon/components/pix-tooltip.hbs +0 -30
  103. package/addon/components/pix-tooltip.js +0 -46
  104. package/addon/components/toast-example.hbs +0 -7
  105. /package/addon/components/{pix-button-base.js → pix-button-base.gjs} +0 -0
  106. /package/addon/components/{pix-input-base.js → pix-input-base.gjs} +0 -0
@@ -1,28 +0,0 @@
1
- {{#if this.displayHeader}}
2
- <th scope="col" ...attributes aria-sort={{this.ariaSort}}>
3
- <div class="pix-table-header-container">
4
- {{yield to="header"}}
5
- {{#if this.sortable}}
6
- <PixIconButton
7
- @ariaLabel={{this.iconLabel}}
8
- @iconName={{this.iconName}}
9
- @triggerAction={{@onSort}}
10
- @size="small"
11
- />
12
- {{/if}}
13
- </div>
14
- </th>
15
- {{else}}
16
- {{#if @isMainRow}}
17
- <th scope="row" class={{this.typeClass}} ...attributes>
18
- {{yield to="cell"}}
19
- </th>
20
- {{else}}
21
- <td class={{this.typeClass}} ...attributes>
22
- {{yield to="cell"}}
23
- {{#if (has-block "subCell")}}
24
- <p>{{yield to="subCell"}}</p>
25
- {{/if}}
26
- </td>
27
- {{/if}}
28
- {{/if}}
@@ -1,3 +0,0 @@
1
- <nav class={{this.classNames}} aria-label={{this.ariaLabel}} ...attributes>
2
- {{yield}}
3
- </nav>
@@ -1,36 +0,0 @@
1
- <div class="pix-textarea {{if @inlineLabel ' pix-textarea--inline'}}">
2
- {{#if (has-block "label")}}
3
- <PixLabel
4
- @for={{this.id}}
5
- @requiredLabel={{@requiredLabel}}
6
- @subLabel={{@subLabel}}
7
- @size={{@size}}
8
- @screenReaderOnly={{@screenReaderOnly}}
9
- @inlineLabel={{@inlineLabel}}
10
- >
11
- {{yield to="label"}}
12
- </PixLabel>
13
- {{/if}}
14
-
15
- <div class="pix-textarea__container">
16
- <textarea
17
- id={{this.id}}
18
- maxlength={{if @maxlength @maxlength}}
19
- aria-required="{{if @requiredLabel true false}}"
20
- required={{if @requiredLabel true false}}
21
- class="pix-textarea-container__input {{if @errorMessage 'pix-textarea--error'}}"
22
- {{on "keyup" this.updateValue}}
23
- ...attributes
24
- >{{@value}}</textarea>
25
-
26
- {{#if @maxlength}}
27
- {{! prettier-ignore }}
28
- <p class="pix-textarea-container__text-length-indicator">{{this.textLengthIndicator}} / {{@maxlength}}</p>
29
- {{/if}}
30
-
31
- {{#if @errorMessage}}
32
- <label for={{this.id}} class="pix-textarea-container__error-message">{{@errorMessage}}</label>
33
- {{/if}}
34
- </div>
35
-
36
- </div>
@@ -1,23 +0,0 @@
1
- import { action } from '@ember/object';
2
- import { guidFor } from '@ember/object/internals';
3
- import Component from '@glimmer/component';
4
- import { tracked } from '@glimmer/tracking';
5
-
6
- export default class PixTextarea extends Component {
7
- // eslint-disable-next-line ember/no-tracked-properties-from-args
8
- @tracked value = this.args.value;
9
-
10
- get id() {
11
- if (this.args.id) return this.args.id;
12
- return 'textarea-' + guidFor(this);
13
- }
14
-
15
- get textLengthIndicator() {
16
- return this.value ? this.value.length : 0;
17
- }
18
-
19
- @action
20
- updateValue(event) {
21
- this.value = event.target.value;
22
- }
23
- }
@@ -1,5 +0,0 @@
1
- <div class="pix-toast-container">
2
- {{#each this.pixToast.content as |toast|}}
3
- <PixToast @toast={{toast}} @closeButtonAriaLabel={{@closeButtonAriaLabel}} />
4
- {{/each}}
5
- </div>
@@ -1,6 +0,0 @@
1
- import { service } from '@ember/service';
2
- import Component from '@glimmer/component';
3
-
4
- export default class PixToastContainer extends Component {
5
- @service pixToast;
6
- }
@@ -1,17 +0,0 @@
1
- <div class="pix-toast {{concat 'pix-toast--' this.type}}" role="alert" ...attributes>
2
- <div class="pix-toast__icon {{concat 'pix-toast__icon--' this.type}}">
3
- <PixIcon @name={{this.iconClass}} @ariaHidden={{true}} @plainIcon={{true}} />
4
- </div>
5
- <p class="pix-toast__content">
6
- {{@toast.message}}
7
- </p>
8
- <div class="pix-toast__close-button-container">
9
- <PixIconButton
10
- @ariaLabel={{@closeButtonAriaLabel}}
11
- @iconName="close"
12
- @size="small"
13
- @triggerAction={{this.removeNotification}}
14
- class="{{concat 'pix-toast__close-button--' this.type}}"
15
- />
16
- </div>
17
- </div>
@@ -1,30 +0,0 @@
1
- <div
2
- class="pix-tooltip {{if this.isTooltipVisible 'pix-tooltip--visible' ''}}"
3
- {{on-escape-action this.hideTooltip}}
4
- {{on "mouseover" this.showTooltip}}
5
- {{on "mouseleave" this.hideTooltipOnMouseOut}}
6
- {{on "focusin" this.showTooltip}}
7
- {{on "focusout" this.hideTooltip}}
8
- ...attributes
9
- >
10
- {{#if (has-block "triggerElement")}}
11
- <span class="pix-tooltip__trigger-element" tabindex="0">
12
- {{yield to="triggerElement"}}
13
- </span>
14
- {{/if}}
15
-
16
- {{#if (has-block "tooltip")}}
17
- {{#if this.display}}
18
- <span
19
- id={{@id}}
20
- role="tooltip"
21
- class="pix-tooltip__content pix-tooltip__content--{{this.position}}
22
- {{if @isInline 'pix-tooltip__content--inline'}}
23
- {{if @isLight 'pix-tooltip__content--light'}}
24
- {{if @isWide 'pix-tooltip__content--wide'}}"
25
- >
26
- {{yield to="tooltip"}}
27
- </span>
28
- {{/if}}
29
- {{/if}}
30
- </div>
@@ -1,46 +0,0 @@
1
- import { action } from '@ember/object';
2
- import Component from '@glimmer/component';
3
- import { tracked } from '@glimmer/tracking';
4
-
5
- export default class PixTooltip extends Component {
6
- @tracked isTooltipVisible = false;
7
-
8
- get position() {
9
- const correctsPosition = [
10
- 'top',
11
- 'right',
12
- 'bottom',
13
- 'bottom-left',
14
- 'bottom-right',
15
- 'left',
16
- 'top-left',
17
- 'top-right',
18
- ];
19
- return correctsPosition.includes(this.args.position) ? this.args.position : 'top';
20
- }
21
-
22
- get display() {
23
- return typeof this.args.hide === 'undefined' || !this.args.hide;
24
- }
25
-
26
- @action
27
- showTooltip() {
28
- this.isTooltipVisible = true;
29
- }
30
-
31
- @action
32
- hideTooltip() {
33
- setTimeout(() => (this.isTooltipVisible = false));
34
- }
35
-
36
- @action
37
- hideTooltipOnMouseOut(event) {
38
- const isFocused = event.target.contains(document.activeElement);
39
-
40
- if (isFocused) {
41
- return;
42
- }
43
-
44
- this.hideTooltip(event);
45
- }
46
- }
@@ -1,7 +0,0 @@
1
- <div class="toast-example">
2
- <PixButton @size="small" @triggerAction={{this.displayNotification}}>
3
- Afficher une notification
4
- </PixButton>
5
-
6
- <PixToastContainer @closeButtonAriaLabel="Fermer la notification" />
7
- </div>