@1024pix/pix-ui 34.2.0 → 35.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.
@@ -19,6 +19,18 @@ workflows:
19
19
  - gh-pages
20
20
  requires:
21
21
  - install
22
+ - try-scenarios:
23
+ matrix:
24
+ parameters:
25
+ try-scenario:
26
+ - embroider-safe
27
+ - embroider-optimized
28
+ filters:
29
+ branches:
30
+ ignore:
31
+ - gh-pages
32
+ requires:
33
+ - install
22
34
  - chromatic-deployment:
23
35
  filters:
24
36
  branches:
@@ -55,7 +67,21 @@ jobs:
55
67
  - run: npm run lint:hbs
56
68
  - run: npm run lint:scss
57
69
  - run: npm test
58
- - run: npx ember try:one embroider-safe
70
+
71
+ try-scenarios:
72
+ parameters:
73
+ try-scenario:
74
+ type: string
75
+ docker:
76
+ - image: cimg/node:16.20.0-browsers
77
+ resource_class: medium+
78
+ working_directory: ~/pix-ui
79
+ steps:
80
+ - attach_workspace:
81
+ at: ~/pix-ui
82
+ - browser-tools/install-chrome
83
+ - browser-tools/install-chromedriver
84
+ - run: npx ember try:one << parameters.try-scenario >>
59
85
 
60
86
  chromatic-deployment:
61
87
  docker:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Pix-UI Changelog
2
2
 
3
+ ## v35.0.0 (31/05/2023)
4
+
5
+
6
+ ### :rocket: Amélioration
7
+ - [#415](https://github.com/1024pix/pix-ui/pull/415) [FEATURE] Utiliser les éléments HTML native pour le TextArea (PIX-8200)
8
+
9
+ ### :building_construction: Tech
10
+ - [#409](https://github.com/1024pix/pix-ui/pull/409) [TECH] Fait tourner le scenario embroider-optimized sur la CI
11
+
12
+ ### :coffee: Autre
13
+ - [#408](https://github.com/1024pix/pix-ui/pull/408) [BUMP] Update dependency fs-extra to v11 (dossier racine)
14
+
3
15
  ## v34.2.0 (26/05/2023)
4
16
 
5
17
 
@@ -10,15 +10,15 @@
10
10
  </label>
11
11
  {{/if}}
12
12
 
13
- <Textarea
13
+ <textarea
14
14
  id={{@id}}
15
- @value={{@value}}
16
15
  maxlength={{if @maxlength @maxlength}}
17
16
  aria-required="{{if this.requiredLabel true false}}"
18
17
  required={{if this.requiredLabel true false}}
19
18
  class="{{if @errorMessage 'pix-textarea--error'}}"
19
+ {{on "keyup" this.updateValue}}
20
20
  ...attributes
21
- />
21
+ >{{@value}}</textarea>
22
22
 
23
23
  {{#if @maxlength}}
24
24
  <p>{{this.textLengthIndicator}} / {{@maxlength}}</p>
@@ -1,8 +1,12 @@
1
1
  import Component from '@glimmer/component';
2
+ import { action } from '@ember/object';
3
+ import { tracked } from '@glimmer/tracking';
2
4
 
3
5
  export default class PixTextarea extends Component {
6
+ @tracked value = this.args.value;
7
+
4
8
  get textLengthIndicator() {
5
- return this.args.value ? this.args.value.length : 0;
9
+ return this.value ? this.value.length : 0;
6
10
  }
7
11
 
8
12
  get label() {
@@ -15,6 +19,11 @@ export default class PixTextarea extends Component {
15
19
  return this.args.label || null;
16
20
  }
17
21
 
22
+ @action
23
+ updateValue(event) {
24
+ this.value = event.target.value;
25
+ }
26
+
18
27
  get requiredLabel() {
19
28
  const idRequiredLabelDefined = this.args.requiredLabel?.trim();
20
29
  const labelIsDefined = this.args.label?.trim();
@@ -1,4 +1,4 @@
1
- # 1. Eviter les balises HTML natives
1
+ # 1. Utiliser les balises HTML natives
2
2
 
3
3
  Date : 2022-01-04
4
4
 
@@ -48,6 +48,4 @@ Nous privilégierons les éléments HTML natifs et éviterons autant que possibl
48
48
 
49
49
  ## Conséquences
50
50
 
51
- Il faut mettre à jour le PixTextarea pour qu'il utilise une balise `<textarea>`.
52
-
53
51
  ⚠️ Pour ne pas casser le comportement existant. lors de la mise à jour des versions v11.0.0 / v11.1.0 de Pix-UI il faut mettre à jour tous les PixInput et PixInputPassword afin qu'il définissent un `onChange`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "34.2.0",
3
+ "version": "35.0.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"
@@ -67,6 +67,7 @@
67
67
  "@ember/render-modifiers": "^2.0.5",
68
68
  "@ember/string": "^3.0.1",
69
69
  "@ember/test-helpers": "^2.8.1",
70
+ "@embroider/macros": "^1.11.0",
70
71
  "@embroider/test-setup": "^3.0.0",
71
72
  "@fortawesome/ember-fontawesome": "^1.0.0",
72
73
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
@@ -111,7 +112,7 @@
111
112
  "eslint-plugin-node": "^11.1.0",
112
113
  "eslint-plugin-prettier": "^4.2.1",
113
114
  "eslint-plugin-qunit": "^7.3.3",
114
- "fs-extra": "^10.1.0",
115
+ "fs-extra": "^11.0.0",
115
116
  "html-webpack-plugin": "^5.5.0",
116
117
  "loader.js": "^4.7.0",
117
118
  "lodash": "^4.17.21",