@1024pix/pix-ui 30.1.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 +12 -0
- package/addon/components/pix-select.hbs +4 -0
- package/addon/styles/pix-design-tokens/_colors.scss +1 -1
- package/addon/styles/pix-design-tokens/_typography.scss +0 -2
- package/app/stories/pix-select.stories.js +24 -0
- package/app/stories/pix-select.stories.mdx +7 -0
- package/docs/colors-palette.stories.mdx +2 -2
- package/docs/typography.stories.mdx +24 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
9
|
+
## v31.0.0 (14/04/2023)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### :building_construction: Tech
|
|
13
|
+
- [#381](https://github.com/1024pix/pix-ui/pull/381) [TECH] Modification de la valeur du Design Token warning-60 et suppression des placeholders de font-weight (PIX-7666).
|
|
14
|
+
|
|
3
15
|
## v30.1.0 (14/04/2023)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -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
|
|
|
@@ -38,7 +38,7 @@ import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs';
|
|
|
38
38
|
Secondary: '#ffd235',
|
|
39
39
|
40: '#ffbe00',
|
|
40
40
|
50: '#eaa600',
|
|
41
|
-
60: '#
|
|
41
|
+
60: '#d87016',
|
|
42
42
|
70: '#a95800',
|
|
43
43
|
80: '#874d00'}}
|
|
44
44
|
/>
|
|
@@ -103,7 +103,7 @@ import { Meta, ColorPalette, ColorItem } from '@storybook/addon-docs';
|
|
|
103
103
|
30: '#ffd235',
|
|
104
104
|
40: '#ffbe00',
|
|
105
105
|
50: '#eaa600',
|
|
106
|
-
60: '#
|
|
106
|
+
60: '#d87016',
|
|
107
107
|
70: '#a95800',
|
|
108
108
|
80: '#874d00'}}
|
|
109
109
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Typography.stories.mdx -->
|
|
2
2
|
|
|
3
|
-
import { Meta, Typeset } from '@storybook/addon-docs';
|
|
3
|
+
import { Meta, Typeset, Markdown } from '@storybook/addon-docs';
|
|
4
4
|
|
|
5
5
|
<Meta title="Utiliser Pix UI/Design Tokens/Typographie" />
|
|
6
6
|
|
|
@@ -82,24 +82,6 @@ Des **placeholder SCSS** équivalents aux tokens de Figma sont disponibles. C'es
|
|
|
82
82
|
fontFamily={'Roboto, Arial, sans-serif'}
|
|
83
83
|
/>
|
|
84
84
|
|
|
85
|
-
#### Variantes de gras
|
|
86
|
-
|
|
87
|
-
Pour les corps, on peut préciser une graisse différente en complément :
|
|
88
|
-
|
|
89
|
-
<Typeset
|
|
90
|
-
fontSizes={[16]}
|
|
91
|
-
fontWeight={500}
|
|
92
|
-
sampleText={'@extend %pix-weight-medium;'}
|
|
93
|
-
fontFamily={'Roboto, Arial, sans-serif'}
|
|
94
|
-
/>
|
|
95
|
-
|
|
96
|
-
<Typeset
|
|
97
|
-
fontSizes={[16]}
|
|
98
|
-
fontWeight={700}
|
|
99
|
-
sampleText={'@extend %pix-weight-bold;'}
|
|
100
|
-
fontFamily={'Roboto, Arial, sans-serif'}
|
|
101
|
-
/>
|
|
102
|
-
|
|
103
85
|
### Comment utiliser un placeholder SCSS ?
|
|
104
86
|
|
|
105
87
|
```css
|
|
@@ -140,6 +122,29 @@ Pour chaque placeholder SCSS, une **classe CSS** utilitaire de même nom existe
|
|
|
140
122
|
- `pix-body-s`
|
|
141
123
|
- `pix-body-xs`
|
|
142
124
|
|
|
125
|
+
## Design tokens
|
|
126
|
+
|
|
127
|
+
Des variables SCSS existent pour certaines propriétés de typographie.
|
|
128
|
+
|
|
129
|
+
### Font-weight
|
|
130
|
+
|
|
131
|
+
ℹ️ Ces variables ne devraient pas être utilisées pour modifier la graisse d'un titre car les classes utilitaires et les placeholders ci-dessus s'en occupent déjà.
|
|
132
|
+
|
|
133
|
+
`$font-normal: 400;`
|
|
134
|
+
|
|
135
|
+
`$font-medium: 500;`
|
|
136
|
+
|
|
137
|
+
`$font-bold: 700;`
|
|
138
|
+
|
|
139
|
+
### Font-family
|
|
140
|
+
|
|
141
|
+
ℹ️ Vous ne devriez pas avoir à les utiliser car elles vont de pair avec d'autres propriétés de typo (font-size, line-height, ...).<br/>
|
|
142
|
+
Pour en savoir plus, voir les classes utilitaires et les placeholders ci-dessus.
|
|
143
|
+
|
|
144
|
+
`$font-open-sans: 'Open Sans', Arial, sans-serif;`
|
|
145
|
+
|
|
146
|
+
`$font-roboto: 'Roboto', Arial, sans-serif;`
|
|
147
|
+
|
|
143
148
|
## Détails techniques
|
|
144
149
|
|
|
145
150
|
On utilise sur les applications Pix deux polices d'écriture :
|