@1024pix/pix-ui 31.0.0 → 31.1.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Pix-UI Changelog
2
2
 
3
+ ## v31.1.0 (18/04/2023)
4
+
5
+
6
+ ### :rocket: Amélioration
7
+ - [#384](https://github.com/1024pix/pix-ui/pull/384) [FEATURE] Ajouter une icône avant le label du composant Pix-Select (PIX-7634)
8
+
3
9
  ## v31.0.0 (14/04/2023)
4
10
 
5
11
 
@@ -34,6 +34,10 @@
34
34
  aria-controls={{this.listId}}
35
35
  aria-disabled={{@isDisabled}}
36
36
  >
37
+ {{#if @icon}}
38
+ <FaIcon @icon={{@icon}} />
39
+ {{/if}}
40
+
37
41
  <span class="pix-select-button__text">{{this.placeholder}}</span>
38
42
 
39
43
  <FaIcon
@@ -28,6 +28,7 @@ export const Template = (args) => {
28
28
  @errorMessage={{this.errorMessage}}
29
29
  @isDisabled={{this.isDisabled}}
30
30
  @placement={{this.placement}}
31
+ @icon={{this.icon}}
31
32
  />
32
33
  `,
33
34
  context: args,
@@ -218,6 +219,19 @@ WithDropDownAtTheTop.args = {
218
219
  placement: 'top',
219
220
  };
220
221
 
222
+ export const WithIcon = Template.bind({});
223
+ WithIcon.args = {
224
+ icon: 'earth-europe',
225
+ isSearchable: false,
226
+ label: 'With icon',
227
+ onChange: action('onChange'),
228
+ options: [
229
+ { value: 'en', label: 'English' },
230
+ { value: 'fr', label: 'Français' },
231
+ ],
232
+ value: 'fr',
233
+ };
234
+
221
235
  export const argTypes = {
222
236
  options: {
223
237
  name: 'options',
@@ -374,4 +388,14 @@ export const argTypes = {
374
388
  defaultValue: { summary: null },
375
389
  },
376
390
  },
391
+ icon: {
392
+ name: 'icon',
393
+ description:
394
+ "Permet l'affichage d'une icône FontAwesome avant le placeholder ou le label de l'option sélectionnée.",
395
+ type: { name: 'string', required: false },
396
+ table: {
397
+ type: { summary: 'string' },
398
+ defaultValue: { summary: null },
399
+ },
400
+ },
377
401
  };
@@ -61,6 +61,12 @@ Ici nous avons forcé le placement de la dropdown en haut du select mais sachez
61
61
  <Story name="WithDropDownAtTheTop" story={stories.WithDropDownAtTheTop} />
62
62
  </Canvas>
63
63
 
64
+ ## WithIcon
65
+
66
+ <Canvas>
67
+ <Story name="WithIcon" story={stories.WithIcon} />
68
+ </Canvas>
69
+
64
70
  ## Usage
65
71
 
66
72
  ```html
@@ -80,6 +86,7 @@ Ici nous avons forcé le placement de la dropdown en haut du select mais sachez
80
86
  @requiredText="{{requiredText}}"
81
87
  @errorMessage="{{errorMessage}}"
82
88
  @placement="{{placement}}"
89
+ @icon="{{icon}}"
83
90
  />
84
91
  ```
85
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "31.0.0",
3
+ "version": "31.1.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"