@1024pix/pix-ui 46.7.0 → 46.9.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.
@@ -7,6 +7,7 @@
7
7
  @screenReaderOnly={{@screenReaderOnly}}
8
8
  @isDisabled={{this.isDisabled}}
9
9
  @inlineLabel={{true}}
10
+ @variant={{@variant}}
10
11
  >
11
12
  <:inputElement>
12
13
  <input
@@ -24,12 +24,16 @@ Pour les considérer comme un seul groupe d'inputs, **il est nécessaire qu'ils
24
24
 
25
25
  <Story of={ComponentStories.multiple} height={140} />
26
26
 
27
- ### Dimensions du label
27
+ ### Variations graphiques du composant
28
28
 
29
- PixRadioButton prend tout l'espace à sa disposition.
29
+ Le PixRadioButton prend toute la largeur à sa disposition.
30
30
 
31
31
  <Story of={ComponentStories.FullWidth} height={100} />
32
32
 
33
+ Si le paramètre `variant` est précisé avec la valeur `tile`, le radiobutton et son label sont visuellement regroupés dans un ensemble intégralement cliquable.
34
+
35
+ <Story of={ComponentStories.VariantTile} height={100} />
36
+
33
37
  ## Disabled
34
38
 
35
39
  L'attribut `@isDisabled` permet de désactiver la radio en conservant la possibilité de naviguer avec le clavier ou le lecteur d'écran. Il est préféré à l'attribut natif `disabled` qui empêche ces usages.
@@ -114,6 +114,23 @@ const FullWidthTemplate = (args) => {
114
114
  };
115
115
  };
116
116
 
117
+ const VariantTileTemplate = (args) => {
118
+ return {
119
+ template: hbs`{{! template-lint-disable no-inline-styles }}
120
+ <div
121
+ style='border: 1px solid var(--pix-neutral-500); background: var(--pix-neutral-20); padding: var(--pix-spacing-4x); width: 500px'
122
+ ><PixRadioButton
123
+ @id={{this.id}}
124
+ @isDisabled={{this.isDisabled}}
125
+ checked={{this.checked}}
126
+ @variant='tile'
127
+ >
128
+ <:label>{{this.label}}</:label>
129
+ </PixRadioButton></div>`,
130
+ context: args,
131
+ };
132
+ };
133
+
117
134
  export const Default = Template.bind({});
118
135
  Default.args = {
119
136
  label: 'Poivron',
@@ -130,12 +147,25 @@ FullWidth.args = {
130
147
  label: 'Une réponse',
131
148
  };
132
149
 
150
+ export const VariantTile = VariantTileTemplate.bind({});
151
+ VariantTile.args = {
152
+ id: 'proposal',
153
+ label: 'Une réponse',
154
+ };
155
+
133
156
  export const isDisabled = Template.bind({});
134
157
  isDisabled.args = {
135
158
  ...Default.args,
136
159
  isDisabled: true,
137
160
  };
138
161
 
162
+ export const isDisabledVariantTile = VariantTileTemplate.bind({});
163
+ isDisabledVariantTile.args = {
164
+ id: 'accept-newsletter-2',
165
+ label: 'Recevoir la newsletter',
166
+ isDisabled: true,
167
+ };
168
+
139
169
  export const checkedIsDisabled = Template.bind({});
140
170
  checkedIsDisabled.args = {
141
171
  ...Default.args,
@@ -143,6 +173,14 @@ checkedIsDisabled.args = {
143
173
  checked: true,
144
174
  };
145
175
 
176
+ export const checkedIsDisabledVariantTile = VariantTileTemplate.bind({});
177
+ checkedIsDisabledVariantTile.args = {
178
+ id: 'accept-newsletter-2',
179
+ label: 'Recevoir la newsletter',
180
+ isDisabled: true,
181
+ checked: true,
182
+ };
183
+
146
184
  /* Multiple components story */
147
185
  const multipleTemplate = (args) => {
148
186
  return {
@@ -0,0 +1,21 @@
1
+ module.exports = () => ({
2
+ 'free-solid-svg-icons': [
3
+ 'arrow-right',
4
+ 'bullhorn',
5
+ 'check',
6
+ 'chevron-up',
7
+ 'chevron-down',
8
+ 'circle-check',
9
+ 'circle-exclamation',
10
+ 'circle-info',
11
+ 'circle-question',
12
+ 'earth-europe',
13
+ 'eye',
14
+ 'eye-slash',
15
+ 'plus',
16
+ 'triangle-exclamation',
17
+ 'up-right-from-square',
18
+ 'user',
19
+ 'xmark',
20
+ ],
21
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "46.7.0",
3
+ "version": "46.9.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"
@@ -69,7 +69,6 @@
69
69
  "@embroider/macros": "^1.11.0",
70
70
  "@embroider/test-setup": "^4.0.0",
71
71
  "@fortawesome/ember-fontawesome": "^2.0.0",
72
- "@fortawesome/free-regular-svg-icons": "^6.2.1",
73
72
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
74
73
  "@glimmer/component": "^1.1.2",
75
74
  "@glimmer/syntax": "^0.92.0",
@@ -136,6 +135,7 @@
136
135
  "files": [
137
136
  "addon/",
138
137
  "app/",
138
+ "config/icons.js",
139
139
  "public/",
140
140
  "scripts/migrate-colors-scss-vars-to-css-vars.sh",
141
141
  "scripts/migrate-spacing-scss-vars-to-css-vars.sh"