@1024pix/pix-ui 43.1.0 → 44.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.
- package/addon/components/pix-button-base.js +1 -5
- package/addon/components/pix-filter-banner.hbs +0 -1
- package/addon/styles/_pix-button-base.scss +2 -13
- package/app/stories/pix-button-link.mdx +2 -2
- package/app/stories/pix-button-link.stories.js +0 -13
- package/app/stories/pix-button-upload.mdx +1 -1
- package/app/stories/pix-button-upload.stories.js +0 -12
- package/app/stories/pix-button.mdx +0 -7
- package/app/stories/pix-button.stories.js +0 -21
- package/package.json +1 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
|
|
3
3
|
export default class PixButtonBase extends Component {
|
|
4
|
-
get shape() {
|
|
5
|
-
return this.args.shape || 'squircle';
|
|
6
|
-
}
|
|
7
|
-
|
|
8
4
|
get backgroundColor() {
|
|
9
5
|
return this.args.backgroundColor || 'primary';
|
|
10
6
|
}
|
|
@@ -16,10 +12,10 @@ export default class PixButtonBase extends Component {
|
|
|
16
12
|
get baseClassNames() {
|
|
17
13
|
const classNames = [
|
|
18
14
|
'pix-button',
|
|
19
|
-
`pix-button--shape-${this.shape}`,
|
|
20
15
|
`pix-button--size-${this.size}`,
|
|
21
16
|
`pix-button--${this.backgroundColor}`,
|
|
22
17
|
];
|
|
18
|
+
|
|
23
19
|
this.args.isBorderVisible && classNames.push('pix-button--border');
|
|
24
20
|
|
|
25
21
|
return classNames;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
text-decoration: none;
|
|
10
10
|
background-color: var(--pix-primary-500);
|
|
11
11
|
border: 2px solid transparent;
|
|
12
|
+
border-radius: 25px;
|
|
12
13
|
outline: none;
|
|
13
14
|
cursor: pointer;
|
|
14
15
|
|
|
@@ -35,26 +36,14 @@
|
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
&--shape-rounded {
|
|
39
|
-
border-radius: 25px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&--shape-squircle {
|
|
43
|
-
border-radius: 4px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
39
|
&--size-big {
|
|
47
40
|
padding: var(--pix-spacing-3x) var(--pix-spacing-6x);
|
|
48
41
|
}
|
|
49
42
|
|
|
50
|
-
&--size-small
|
|
43
|
+
&--size-small {
|
|
51
44
|
padding: var(--pix-spacing-2x) var(--pix-spacing-6x);
|
|
52
45
|
}
|
|
53
46
|
|
|
54
|
-
&--size-small.pix-button--shape-squircle {
|
|
55
|
-
padding: var(--pix-spacing-2x) var(--pix-spacing-4x);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
47
|
&--primary {
|
|
59
48
|
background-color: var(--pix-primary-500);
|
|
60
49
|
|
|
@@ -8,7 +8,7 @@ import * as ComponentStories from './pix-button-link.stories';
|
|
|
8
8
|
|
|
9
9
|
Affiche un lien avec le style d'un bouton Pix. Il peut être de type HTML ou Route EmberJS.
|
|
10
10
|
|
|
11
|
-
Hérite des styles de base de `PixButton` (`
|
|
11
|
+
Hérite des styles de base de `PixButton` (`backgroundColor`, `size`, `isBorderVisible`, `isDisabled`)
|
|
12
12
|
|
|
13
13
|
## Lien HTML
|
|
14
14
|
|
|
@@ -36,4 +36,4 @@ Un bouton de route EmberJS peut être désactivé via la propriété `@isDisable
|
|
|
36
36
|
|
|
37
37
|
## Arguments
|
|
38
38
|
|
|
39
|
-
<ArgTypes of={ComponentStories} />
|
|
39
|
+
<ArgTypes of={ComponentStories} />
|
|
@@ -26,17 +26,6 @@ export default {
|
|
|
26
26
|
"Paramètre facultatif du <LinkTo> Ember permettant d'ajouter des paires de clé/valeur dans les paramètres d'une URL",
|
|
27
27
|
type: { required: false },
|
|
28
28
|
},
|
|
29
|
-
shape: {
|
|
30
|
-
name: 'shape',
|
|
31
|
-
description: 'forme: `rounded`,`squircle`',
|
|
32
|
-
type: { name: 'string', required: false },
|
|
33
|
-
options: ['rounded', 'squircle'],
|
|
34
|
-
control: { type: 'select' },
|
|
35
|
-
table: {
|
|
36
|
-
type: { summary: 'string' },
|
|
37
|
-
defaultValue: { summary: 'squircle' },
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
29
|
backgroundColor: {
|
|
41
30
|
name: 'backgroundColor',
|
|
42
31
|
description:
|
|
@@ -96,7 +85,6 @@ export const htmlLink = {
|
|
|
96
85
|
template: hbs`<PixButtonLink
|
|
97
86
|
@href='https://pix.fr'
|
|
98
87
|
target='NEW'
|
|
99
|
-
@shape={{this.shape}}
|
|
100
88
|
@backgroundColor={{this.backgroundColor}}
|
|
101
89
|
@size={{this.size}}
|
|
102
90
|
@isBorderVisible={{this.isBorderVisible}}
|
|
@@ -114,7 +102,6 @@ export const emberLink = (args) => {
|
|
|
114
102
|
@route=''
|
|
115
103
|
@model=''
|
|
116
104
|
@query={{this.query}}
|
|
117
|
-
@shape={{this.shape}}
|
|
118
105
|
@backgroundColor={{this.backgroundColor}}
|
|
119
106
|
@size={{this.size}}
|
|
120
107
|
@isBorderVisible={{this.isBorderVisible}}
|
|
@@ -7,7 +7,7 @@ import * as ComponentStories from './pix-button-upload.stories';
|
|
|
7
7
|
|
|
8
8
|
Affiche un bouton d'upload de fichiers.
|
|
9
9
|
|
|
10
|
-
Hérite des styles de base de `PixButton` (`
|
|
10
|
+
Hérite des styles de base de `PixButton` (`backgroundColor`, `size`, `isBorderVisible`)
|
|
11
11
|
|
|
12
12
|
Toutes les [propriétés HTML d'un input de type file](https://developer.mozilla.org/fr/docs/Web/HTML/Element/Input/file) sont supportées.
|
|
13
13
|
|
|
@@ -15,17 +15,6 @@ export default {
|
|
|
15
15
|
"fonction à exécuter au moment de l'upload du fichier, elle prend en entrée la liste des fichiers uploadés.",
|
|
16
16
|
type: { name: 'function', required: true },
|
|
17
17
|
},
|
|
18
|
-
shape: {
|
|
19
|
-
name: 'shape',
|
|
20
|
-
description: 'forme: `rounded`,`squircle`',
|
|
21
|
-
type: { name: 'string', required: false },
|
|
22
|
-
options: ['rounded', 'squircle'],
|
|
23
|
-
control: { type: 'select' },
|
|
24
|
-
table: {
|
|
25
|
-
type: { summary: 'string' },
|
|
26
|
-
defaultValue: { summary: 'squircle' },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
18
|
backgroundColor: {
|
|
30
19
|
name: 'backgroundColor',
|
|
31
20
|
description:
|
|
@@ -76,7 +65,6 @@ export const buttonUpload = (args) => {
|
|
|
76
65
|
template: hbs`<PixButtonUpload
|
|
77
66
|
@id={{this.id}}
|
|
78
67
|
@onChange={{this.onChange}}
|
|
79
|
-
@shape={{this.shape}}
|
|
80
68
|
@backgroundColor={{this.backgroundColor}}
|
|
81
69
|
@size={{this.size}}
|
|
82
70
|
@isBorderVisible={{this.isBorderVisible}}
|
|
@@ -54,12 +54,6 @@ Le loader peut être affiché de deux façons :
|
|
|
54
54
|
|
|
55
55
|
<Story of={ComponentStories.loader} height={150} />
|
|
56
56
|
|
|
57
|
-
## Shape
|
|
58
|
-
|
|
59
|
-
Le bouton rounded
|
|
60
|
-
|
|
61
|
-
<Story of={ComponentStories.shape} height={75} />
|
|
62
|
-
|
|
63
57
|
|
|
64
58
|
## Size
|
|
65
59
|
|
|
@@ -77,7 +71,6 @@ Un petit bouton avec les bords arrondis en fond transparent avec une bordure
|
|
|
77
71
|
@triggerAction="{{action"
|
|
78
72
|
triggerAction}}
|
|
79
73
|
@loadingColor="white"
|
|
80
|
-
@shape="squircle"
|
|
81
74
|
@backgroundColor="transparent-light"
|
|
82
75
|
@isDisabled="{{false}}"
|
|
83
76
|
@size="small"
|
|
@@ -30,17 +30,6 @@ export default {
|
|
|
30
30
|
defaultValue: { summary: 'white' },
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
|
-
shape: {
|
|
34
|
-
name: 'shape',
|
|
35
|
-
description: 'forme: `rounded`,`squircle`',
|
|
36
|
-
type: { name: 'string', required: false },
|
|
37
|
-
options: ['rounded', 'squircle'],
|
|
38
|
-
control: { type: 'select' },
|
|
39
|
-
table: {
|
|
40
|
-
type: { summary: 'string' },
|
|
41
|
-
defaultValue: { summary: 'squircle' },
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
33
|
backgroundColor: {
|
|
45
34
|
name: 'backgroundColor',
|
|
46
35
|
description:
|
|
@@ -155,7 +144,6 @@ const Template = (args) => ({
|
|
|
155
144
|
<PixButton
|
|
156
145
|
@triggerAction={{this.triggerAction}}
|
|
157
146
|
@loadingColor={{this.loadingColor}}
|
|
158
|
-
@shape={{this.shape}}
|
|
159
147
|
@backgroundColor={{this.backgroundColor}}
|
|
160
148
|
@isDisabled={{this.isDisabled}}
|
|
161
149
|
@isLoading={{this.isLoading}}
|
|
@@ -174,7 +162,6 @@ const Template = (args) => ({
|
|
|
174
162
|
<PixButton
|
|
175
163
|
@triggerAction={{this.triggerAction}}
|
|
176
164
|
@loadingColor={{button.loadingColor}}
|
|
177
|
-
@shape={{button.shape}}
|
|
178
165
|
@backgroundColor={{button.backgroundColor}}
|
|
179
166
|
@isDisabled={{button.isDisabled}}
|
|
180
167
|
@isLoading={{button.isLoading}}
|
|
@@ -195,7 +182,6 @@ const Template = (args) => ({
|
|
|
195
182
|
export const Default = Template.bind({});
|
|
196
183
|
Default.args = {
|
|
197
184
|
loadingColor: 'white',
|
|
198
|
-
shape: 'squircle',
|
|
199
185
|
size: 'big',
|
|
200
186
|
backgroundColor: 'primary',
|
|
201
187
|
label: 'Bouton',
|
|
@@ -296,13 +282,6 @@ loader.args = {
|
|
|
296
282
|
],
|
|
297
283
|
};
|
|
298
284
|
|
|
299
|
-
export const shape = Template.bind({});
|
|
300
|
-
shape.args = {
|
|
301
|
-
...Default.args,
|
|
302
|
-
label: 'Bouton rounded',
|
|
303
|
-
shape: 'rounded',
|
|
304
|
-
};
|
|
305
|
-
|
|
306
285
|
export const size = Template.bind({});
|
|
307
286
|
size.args = {
|
|
308
287
|
...Default.args,
|