@1024pix/pix-ui 24.0.1 → 24.0.2
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,14 @@
|
|
|
1
1
|
# Pix-UI Changelog
|
|
2
2
|
|
|
3
|
+
## v24.0.2 (18/01/2023)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### :rocket: Amélioration
|
|
7
|
+
- [#319](https://github.com/1024pix/pix-ui/pull/319) [FEATURE] Ajouter un argument IconPrefixe au composant IndicatorCard afin d'autoriser l'utilisation d'icônes personnalisées (PIX-6809)
|
|
8
|
+
|
|
9
|
+
### :building_construction: Tech
|
|
10
|
+
- [#318](https://github.com/1024pix/pix-ui/pull/318) [TECH] Changement du ratio minimal pour la couleur de fond accessible de 4.5 à 3 (PIX-6802)
|
|
11
|
+
|
|
3
12
|
## v24.0.1 (11/01/2023)
|
|
4
13
|
|
|
5
14
|
|
|
@@ -24,6 +24,6 @@ export default function (hex) {
|
|
|
24
24
|
contrast = color.contrast(newColor);
|
|
25
25
|
|
|
26
26
|
// newColor.luminosity() can return 0.9999..99 when newColor is white but reinstanciating Color with the hexacode #FFFFFF returns 1
|
|
27
|
-
} while (contrast <
|
|
27
|
+
} while (contrast < 3 && Color(newColor.hex()).luminosity() < 1);
|
|
28
28
|
return newColor.hex();
|
|
29
29
|
}
|
|
@@ -8,6 +8,7 @@ const Template = (args) => {
|
|
|
8
8
|
@title={{this.title}}
|
|
9
9
|
@color={{this.color}}
|
|
10
10
|
@icon={{this.icon}}
|
|
11
|
+
@iconPrefix={{this.iconPrefix}}
|
|
11
12
|
@info={{this.info}}
|
|
12
13
|
@isLoading={{this.isLoading}}
|
|
13
14
|
@loadingMessage={{this.loadingMessage}}
|
|
@@ -33,6 +34,12 @@ Default.args = {
|
|
|
33
34
|
loadingMessage: 'texte de chargement ScreenReader',
|
|
34
35
|
};
|
|
35
36
|
|
|
37
|
+
export const withIconPrefix = Template.bind({});
|
|
38
|
+
withIconPrefix.args = {
|
|
39
|
+
...Default.args,
|
|
40
|
+
iconPrefix: 'far',
|
|
41
|
+
};
|
|
42
|
+
|
|
36
43
|
export const argTypes = {
|
|
37
44
|
title: {
|
|
38
45
|
name: 'Title',
|
|
@@ -46,6 +53,12 @@ export const argTypes = {
|
|
|
46
53
|
name: 'Icon',
|
|
47
54
|
description: "Icone dans l'encart",
|
|
48
55
|
},
|
|
56
|
+
iconPrefix: {
|
|
57
|
+
name: 'IconPrefix',
|
|
58
|
+
description:
|
|
59
|
+
"Préfixe pour l'icone dans l'encart - permet d'utiliser une variation de l'icone font awesome différente de celle par défaut (fa).",
|
|
60
|
+
defaultValue: null,
|
|
61
|
+
},
|
|
49
62
|
value: {
|
|
50
63
|
name: 'Value',
|
|
51
64
|
description: 'Contenu principal',
|
|
@@ -17,6 +17,11 @@ Une carte est un bloc en 2 parties dont les bords sont arrondis et ayant une omb
|
|
|
17
17
|
<Story name="Default" story={stories.Default} height={200} />
|
|
18
18
|
</Canvas>
|
|
19
19
|
|
|
20
|
+
## WithIconPrefix
|
|
21
|
+
<Canvas>
|
|
22
|
+
<Story name="WithIconPrefix" story={stories.withIconPrefix} height={200} />
|
|
23
|
+
</Canvas>
|
|
24
|
+
|
|
20
25
|
## Usage
|
|
21
26
|
|
|
22
27
|
```html
|
|
@@ -24,6 +29,7 @@ Une carte est un bloc en 2 parties dont les bords sont arrondis et ayant une omb
|
|
|
24
29
|
@title={{this.title}}
|
|
25
30
|
@color={{this.color}}
|
|
26
31
|
@icon={{this.icon}}
|
|
32
|
+
@iconPrefix={{this.iconPrefix}}
|
|
27
33
|
@info={{this.info}}
|
|
28
34
|
@isLoading={{this.isLoading}}
|
|
29
35
|
@loadingMessage={{this.loadingMessage}}
|