@1024pix/pix-ui 44.3.8 → 45.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-checkbox.hbs +2 -2
- package/addon/components/pix-filterable-and-searchable-select.hbs +5 -4
- package/addon/components/pix-input-base.js +44 -0
- package/addon/components/pix-input-password.hbs +46 -39
- package/addon/components/pix-input-password.js +12 -27
- package/addon/components/pix-input.hbs +25 -23
- package/addon/components/pix-input.js +10 -16
- package/addon/components/pix-label.js +2 -4
- package/addon/components/pix-multi-select.hbs +7 -6
- package/addon/components/pix-multi-select.js +0 -3
- package/addon/components/pix-pagination.hbs +3 -2
- package/addon/components/pix-radio-button.hbs +2 -2
- package/addon/components/pix-search-input.hbs +7 -6
- package/addon/components/pix-search-input.js +6 -19
- package/addon/components/pix-select.hbs +135 -129
- package/addon/components/pix-textarea.hbs +23 -19
- package/addon/components/pix-textarea.js +6 -0
- package/addon/components/pix-toggle.hbs +3 -3
- package/addon/components/pix-toggle.js +5 -0
- package/addon/styles/_pix-input-password.scss +19 -13
- package/addon/styles/_pix-input.scss +9 -2
- package/addon/styles/_pix-label.scss +0 -1
- package/addon/styles/_pix-multi-select.scss +9 -1
- package/addon/styles/_pix-search-input.scss +8 -1
- package/addon/styles/_pix-select.scss +9 -1
- package/addon/styles/_pix-toggle.scss +8 -1
- package/app/stories/form.stories.js +31 -24
- package/app/stories/pix-checkbox.mdx +2 -2
- package/app/stories/pix-checkbox.stories.js +52 -33
- package/app/stories/pix-filter-banner.stories.js +9 -6
- package/app/stories/pix-filterable-and-searchable-select.mdx +9 -8
- package/app/stories/pix-filterable-and-searchable-select.stories.js +13 -11
- package/app/stories/pix-input-password.mdx +8 -5
- package/app/stories/pix-input-password.stories.js +50 -28
- package/app/stories/pix-input.mdx +14 -8
- package/app/stories/pix-input.stories.js +46 -21
- package/app/stories/pix-label.stories.js +3 -2
- package/app/stories/pix-multi-select.mdx +7 -5
- package/app/stories/pix-multi-select.stories.js +74 -36
- package/app/stories/pix-radio-button.mdx +3 -1
- package/app/stories/pix-radio-button.stories.js +47 -40
- package/app/stories/pix-search-input.mdx +6 -4
- package/app/stories/pix-search-input.stories.js +57 -22
- package/app/stories/pix-select.mdx +4 -3
- package/app/stories/pix-select.stories.js +64 -57
- package/app/stories/pix-textarea.mdx +6 -2
- package/app/stories/pix-textarea.stories.js +42 -20
- package/app/stories/pix-toggle.stories.js +12 -10
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="pix-select"
|
|
2
|
+
class="pix-select {{if @inlineLabel ' pix-select--inline'}}"
|
|
3
3
|
id="container-{{this.selectId}}"
|
|
4
4
|
{{on-click-outside this.hideDropdown}}
|
|
5
5
|
{{on-arrow-down-up-action this.listId this.showDropdown this.isExpanded}}
|
|
@@ -8,146 +8,152 @@
|
|
|
8
8
|
{{on "keydown" this.lockTab}}
|
|
9
9
|
...attributes
|
|
10
10
|
>
|
|
11
|
-
{{#if
|
|
11
|
+
{{#if (has-block "label")}}
|
|
12
12
|
<PixLabel
|
|
13
13
|
@for={{this.selectId}}
|
|
14
|
-
@requiredLabel={{@
|
|
14
|
+
@requiredLabel={{@requiredLabel}}
|
|
15
15
|
@subLabel={{@subLabel}}
|
|
16
|
-
@
|
|
16
|
+
@size={{@size}}
|
|
17
17
|
@screenReaderOnly={{@screenReaderOnly}}
|
|
18
|
+
@inlineLabel={{@inlineLabel}}
|
|
18
19
|
>
|
|
19
|
-
{{
|
|
20
|
+
{{yield to="label"}}
|
|
20
21
|
</PixLabel>
|
|
21
22
|
{{/if}}
|
|
22
23
|
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
<div>
|
|
25
|
+
<PopperJS @placement={{@placement}} as |reference popover|>
|
|
26
|
+
<button
|
|
27
|
+
{{reference}}
|
|
28
|
+
type="button"
|
|
29
|
+
id={{this.selectId}}
|
|
30
|
+
class={{this.className}}
|
|
31
|
+
{{on "click" this.toggleDropdown}}
|
|
32
|
+
aria-expanded={{this.isAriaExpanded}}
|
|
33
|
+
aria-controls={{this.listId}}
|
|
34
|
+
aria-disabled={{@isDisabled}}
|
|
35
|
+
>
|
|
36
|
+
{{#if @icon}}
|
|
37
|
+
<FaIcon @icon={{@icon}} />
|
|
38
|
+
{{/if}}
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
<span class="pix-select-button__text">{{this.placeholder}}</span>
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
42
|
+
<FaIcon
|
|
43
|
+
class="pix-select-button__dropdown-icon"
|
|
44
|
+
@icon={{if this.isExpanded "chevron-up" "chevron-down"}}
|
|
45
|
+
/>
|
|
46
|
+
</button>
|
|
47
|
+
<div
|
|
48
|
+
{{popover}}
|
|
49
|
+
class="pix-select__dropdown{{unless this.isExpanded ' pix-select__dropdown--closed'}}"
|
|
50
|
+
id={{this.dropDownId}}
|
|
51
|
+
{{on "transitionend" this.focus}}
|
|
52
|
+
>
|
|
53
|
+
{{#if @isSearchable}}
|
|
54
|
+
<div class="pix-select__search">
|
|
55
|
+
<FaIcon class="pix-select-search__icon" @icon="magnifying-glass" />
|
|
56
|
+
<label class="screen-reader-only" for={{this.searchId}}>{{@searchLabel}}</label>
|
|
57
|
+
<input
|
|
58
|
+
class="pix-select-search__input"
|
|
59
|
+
id={{this.searchId}}
|
|
60
|
+
autocomplete="off"
|
|
61
|
+
tabindex={{if this.isExpanded "0" "-1"}}
|
|
62
|
+
placeholder={{@searchPlaceholder}}
|
|
63
|
+
{{on "input" this.setSearchValue}}
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
{{/if}}
|
|
67
|
+
<ul role="listbox" id={{this.listId}} class="pix-select__options">
|
|
68
|
+
<li
|
|
69
|
+
class="pix-select-options-category__option{{unless
|
|
70
|
+
@value
|
|
71
|
+
' pix-select-options-category__option--selected'
|
|
72
|
+
}}{{unless this.displayDefaultOption ' pix-select-options-category__option--hidden'}}"
|
|
73
|
+
role="option"
|
|
74
|
+
tabindex={{if this.isDefaultOptionHidden "-1" "0"}}
|
|
75
|
+
aria-selected={{if @value "false" "true"}}
|
|
76
|
+
{{on "click" (fn this.onChange this.defaultOption)}}
|
|
77
|
+
{{on-enter-action (fn this.onChange this.defaultOption)}}
|
|
78
|
+
{{on-space-action (fn this.onChange this.defaultOption)}}
|
|
79
|
+
>
|
|
80
|
+
{{@placeholder}}
|
|
81
|
+
</li>
|
|
82
|
+
{{#if this.results}}
|
|
83
|
+
{{#if this.displayCategory}}
|
|
84
|
+
{{#each this.results as |element index|}}
|
|
85
|
+
<ul
|
|
86
|
+
class="pix-select-options__category"
|
|
87
|
+
role="group"
|
|
88
|
+
aria-labelledby={{if
|
|
89
|
+
this.displayCategory
|
|
90
|
+
(concat "cat-" this.selectId "-" index)
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
{{#if this.displayCategory}}
|
|
94
|
+
<li
|
|
95
|
+
class="pix-select-options-category__name"
|
|
96
|
+
role="presentation"
|
|
97
|
+
id={{concat "cat-" this.selectId "-" index}}
|
|
98
|
+
>
|
|
99
|
+
{{element.category}}
|
|
100
|
+
</li>
|
|
101
|
+
{{/if}}
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
103
|
+
{{#each element.options as |option|}}
|
|
104
|
+
{{! template-lint-disable require-context-role }}
|
|
105
|
+
{{!https://www.w3.org/WAI/ARIA/apg/example-index/listbox/listbox-grouped.html}}
|
|
106
|
+
<li
|
|
107
|
+
class="pix-select-options-category__option{{if
|
|
108
|
+
(eq option.value @value)
|
|
109
|
+
' pix-select-options-category__option--selected'
|
|
110
|
+
}}"
|
|
111
|
+
role="option"
|
|
112
|
+
tabindex={{if this.isExpanded "0" "-1"}}
|
|
113
|
+
aria-selected={{if (eq option.value @value) "true" "false"}}
|
|
114
|
+
{{on "click" (fn this.onChange option)}}
|
|
115
|
+
{{on-enter-action (fn this.onChange option)}}
|
|
116
|
+
{{on-space-action (fn this.onChange option)}}
|
|
117
|
+
>
|
|
118
|
+
{{option.label}}
|
|
114
119
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
120
|
+
{{#if (eq option.value @value)}}
|
|
121
|
+
<FaIcon @icon="check" role="presentation" />
|
|
122
|
+
{{/if}}
|
|
123
|
+
</li>
|
|
124
|
+
{{/each}}
|
|
125
|
+
</ul>
|
|
126
|
+
{{/each}}
|
|
127
|
+
{{else}}
|
|
128
|
+
{{#each this.results as |option|}}
|
|
129
|
+
<li
|
|
130
|
+
class="pix-select-options-category__option{{if
|
|
131
|
+
(eq option.value @value)
|
|
132
|
+
' pix-select-options-category__option--selected'
|
|
133
|
+
}}"
|
|
134
|
+
role="option"
|
|
135
|
+
tabindex={{if this.isExpanded "0" "-1"}}
|
|
136
|
+
aria-selected={{if (eq option.value @value) "true" "false"}}
|
|
137
|
+
{{on "click" (fn this.onChange option)}}
|
|
138
|
+
{{on-enter-action (fn this.onChange option)}}
|
|
139
|
+
{{on-space-action (fn this.onChange this.defaultOption)}}
|
|
140
|
+
>
|
|
141
|
+
{{option.label}}
|
|
137
142
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
{{#if (eq option.value @value)}}
|
|
144
|
+
<FaIcon @icon="check" role="presentation" />
|
|
145
|
+
{{/if}}
|
|
146
|
+
</li>
|
|
147
|
+
{{/each}}
|
|
148
|
+
{{/if}}
|
|
149
|
+
{{else}}
|
|
150
|
+
<li class="pix-select__empty-search-message">{{@emptySearchMessage}}</li>
|
|
143
151
|
{{/if}}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
<p class="pix-select__error-message">{{@errorMessage}}</p>
|
|
152
|
-
{{/if}}
|
|
152
|
+
</ul>
|
|
153
|
+
</div>
|
|
154
|
+
</PopperJS>
|
|
155
|
+
{{#if @errorMessage}}
|
|
156
|
+
<p class="pix-select__error-message">{{@errorMessage}}</p>
|
|
157
|
+
{{/if}}
|
|
158
|
+
</div>
|
|
153
159
|
</div>
|
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
<div class="pix-textarea">
|
|
1
|
+
<div class="pix-textarea {{if @inlineLabel ' pix-textarea--inline'}}">
|
|
2
2
|
<PixLabel
|
|
3
|
-
@for={{
|
|
3
|
+
@for={{this.id}}
|
|
4
4
|
@requiredLabel={{@requiredLabel}}
|
|
5
5
|
@subLabel={{@subLabel}}
|
|
6
|
-
@
|
|
6
|
+
@size={{@size}}
|
|
7
7
|
@screenReaderOnly={{@screenReaderOnly}}
|
|
8
|
+
@inlineLabel={{@inlineLabel}}
|
|
8
9
|
>
|
|
9
|
-
{{
|
|
10
|
+
{{yield to="label"}}
|
|
10
11
|
</PixLabel>
|
|
11
12
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
<div>
|
|
14
|
+
<textarea
|
|
15
|
+
id={{this.id}}
|
|
16
|
+
maxlength={{if @maxlength @maxlength}}
|
|
17
|
+
aria-required="{{if @requiredLabel true false}}"
|
|
18
|
+
required={{if @requiredLabel true false}}
|
|
19
|
+
class="{{if @errorMessage 'pix-textarea--error'}}"
|
|
20
|
+
{{on "keyup" this.updateValue}}
|
|
21
|
+
...attributes
|
|
22
|
+
>{{@value}}</textarea>
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
{{#if @maxlength}}
|
|
25
|
+
<p>{{this.textLengthIndicator}} / {{@maxlength}}</p>
|
|
26
|
+
{{/if}}
|
|
27
|
+
|
|
28
|
+
{{#if @errorMessage}}
|
|
29
|
+
<label for={{this.id}} class="pix-textarea__error-message">{{@errorMessage}}</label>
|
|
30
|
+
{{/if}}
|
|
31
|
+
</div>
|
|
25
32
|
|
|
26
|
-
{{#if @errorMessage}}
|
|
27
|
-
<label for={{this.id}} class="pix-textarea__error-message">{{@errorMessage}}</label>
|
|
28
|
-
{{/if}}
|
|
29
33
|
</div>
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { guidFor } from '@ember/object/internals';
|
|
4
5
|
|
|
5
6
|
export default class PixTextarea extends Component {
|
|
6
7
|
// eslint-disable-next-line ember/no-tracked-properties-from-args
|
|
7
8
|
@tracked value = this.args.value;
|
|
8
9
|
|
|
10
|
+
get id() {
|
|
11
|
+
if (this.args.id) return this.args.id;
|
|
12
|
+
return 'textarea-' + guidFor(this);
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
get textLengthIndicator() {
|
|
10
16
|
return this.value ? this.value.length : 0;
|
|
11
17
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
@for={{this.id}}
|
|
4
4
|
@screenReaderOnly={{@screenReaderOnly}}
|
|
5
5
|
@subLabel={{@subLabel}}
|
|
6
|
-
@
|
|
7
|
-
@inlineLabel={{@
|
|
8
|
-
>{{
|
|
6
|
+
@size={{@size}}
|
|
7
|
+
@inlineLabel={{@inlineLabel}}
|
|
8
|
+
>{{yield to="label"}}</PixLabel>
|
|
9
9
|
<button
|
|
10
10
|
class="pix-toggle__button"
|
|
11
11
|
id={{this.id}}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
.pix-input-password {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: flex;
|
|
3
|
+
display: inline-flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
+
gap: var(--pix-spacing-1x);
|
|
6
|
+
|
|
7
|
+
&--inline {
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
gap: var(--pix-spacing-2x);
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
5
12
|
|
|
6
13
|
&__container {
|
|
7
14
|
@extend %pix-form-element-state;
|
|
@@ -12,6 +19,17 @@
|
|
|
12
19
|
border: 1px solid var(--pix-neutral-500);
|
|
13
20
|
border-radius: var(--pix-spacing-1x);
|
|
14
21
|
|
|
22
|
+
&--error {
|
|
23
|
+
@extend %pix-form-error-state;
|
|
24
|
+
|
|
25
|
+
padding-right: var(--pix-spacing-6x);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--success {
|
|
29
|
+
@extend %pix-form-success-state;
|
|
30
|
+
|
|
31
|
+
padding-right: var(--pix-spacing-6x);
|
|
32
|
+
}
|
|
15
33
|
|
|
16
34
|
input {
|
|
17
35
|
@extend %pix-input-default;
|
|
@@ -44,18 +62,6 @@
|
|
|
44
62
|
}
|
|
45
63
|
}
|
|
46
64
|
|
|
47
|
-
&__error-container {
|
|
48
|
-
@extend %pix-form-error-state;
|
|
49
|
-
|
|
50
|
-
padding-right: var(--pix-spacing-6x);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&__success-container {
|
|
54
|
-
@extend %pix-form-success-state;
|
|
55
|
-
|
|
56
|
-
padding-right: var(--pix-spacing-6x);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
65
|
&__icon {
|
|
60
66
|
position: absolute;
|
|
61
67
|
right: 12px;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
.pix-input {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: flex;
|
|
3
|
+
display: inline-flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
+
gap: var(--pix-spacing-1x);
|
|
6
|
+
|
|
7
|
+
&--inline {
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
gap: var(--pix-spacing-2x);
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
5
12
|
|
|
6
13
|
&__container {
|
|
7
14
|
position: relative;
|
|
@@ -10,7 +17,7 @@
|
|
|
10
17
|
svg {
|
|
11
18
|
position: absolute;
|
|
12
19
|
right: 12px;
|
|
13
|
-
bottom:
|
|
20
|
+
bottom: calc(50% - 7px); // height/2 + padding
|
|
14
21
|
width: 10px;
|
|
15
22
|
height: 10px;
|
|
16
23
|
padding: 2px;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
.pix-multi-select {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: inline-
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--pix-spacing-1x);
|
|
6
|
+
|
|
7
|
+
&--inline {
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
gap: var(--pix-spacing-2x);
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
4
12
|
}
|
|
5
13
|
|
|
6
14
|
.pix-multi-select-header {
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
.pix-search-input {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: flex;
|
|
3
|
+
display: inline-flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
+
gap: var(--pix-spacing-1x);
|
|
6
|
+
|
|
7
|
+
&--inline {
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
gap: var(--pix-spacing-2x);
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
5
12
|
|
|
6
13
|
&__input-container {
|
|
7
14
|
position: relative;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
.pix-select {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: inline-
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: var(--pix-spacing-1x);
|
|
6
|
+
|
|
7
|
+
&--inline {
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
gap: var(--pix-spacing-2x);
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
4
12
|
|
|
5
13
|
&__dropdown {
|
|
6
14
|
@extend %pix-shadow-sm;
|
|
@@ -10,75 +10,82 @@ export const form = (args) => {
|
|
|
10
10
|
template: hbs`<form>
|
|
11
11
|
<PixInput
|
|
12
12
|
@id='firstName'
|
|
13
|
-
@label='Prénom'
|
|
14
13
|
@errorMessage={{this.genericErrorMessage}}
|
|
15
14
|
@requiredLabel='champ obligatoire'
|
|
16
15
|
@validationStatus={{this.validationStatus}}
|
|
17
|
-
|
|
16
|
+
>
|
|
17
|
+
<:label>Prénom</:label>
|
|
18
|
+
</PixInput>
|
|
18
19
|
<br />
|
|
19
|
-
<PixInputPassword
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@errorMessage={{this.genericErrorMessage}}
|
|
23
|
-
/>
|
|
20
|
+
<PixInputPassword @id='password' @errorMessage={{this.genericErrorMessage}}>
|
|
21
|
+
<:label>Mot de passe</:label>
|
|
22
|
+
</PixInputPassword>
|
|
24
23
|
<br />
|
|
25
24
|
|
|
26
25
|
<PixMultiSelect
|
|
27
|
-
@innerText='Votre notation en étoiles...'
|
|
28
26
|
@id='form__pix-multi-select'
|
|
29
|
-
@label='A quel point aimez-vous Pix UI ?'
|
|
30
27
|
@onSelect={{this.onSelect}}
|
|
31
28
|
@selected={{this.selected}}
|
|
32
29
|
@options={{this.options}}
|
|
33
|
-
as |star|
|
|
34
30
|
>
|
|
35
|
-
|
|
31
|
+
<:label>A quel point aimez-vous Pix UI ?</:label>
|
|
32
|
+
<:placeholder>Votre notation en étoiles...</:placeholder>
|
|
33
|
+
<:default as |star|>
|
|
34
|
+
<PixStars @count={{star.value}} @total={{star.total}} />
|
|
35
|
+
</:default>
|
|
36
36
|
</PixMultiSelect>
|
|
37
37
|
<br /><br />
|
|
38
38
|
|
|
39
39
|
<PixMultiSelect
|
|
40
|
-
@innerText='Mes condiments'
|
|
41
40
|
@id='form__pix-multi-select-searchable'
|
|
42
|
-
@label='Choississez vos condiments'
|
|
43
41
|
@onSelect={{this.onSelect}}
|
|
44
42
|
@selected={{this.selected}}
|
|
45
43
|
@isSearchable={{true}}
|
|
46
44
|
@options={{this.optionsSearch}}
|
|
47
|
-
as |condiment|
|
|
48
45
|
>
|
|
49
|
-
|
|
46
|
+
<:label>Choississez vos condiments</:label>
|
|
47
|
+
<:placeholder>Mes condiments</:placeholder>
|
|
48
|
+
<:default as |condiment|>
|
|
49
|
+
{{condiment.label}}
|
|
50
|
+
</:default>
|
|
50
51
|
</PixMultiSelect>
|
|
51
52
|
<br /><br />
|
|
52
53
|
{{! template-lint-disable no-inline-styles }}
|
|
53
54
|
|
|
54
55
|
<PixSelect
|
|
55
56
|
@id='form__searchable-pix-select'
|
|
56
|
-
@label='Votre fruit préféré est : '
|
|
57
57
|
@options={{this.selectOptions}}
|
|
58
58
|
@isSearchable={{true}}
|
|
59
59
|
@isValidationActive={{true}}
|
|
60
60
|
placeholder='Fraises, Mangues...'
|
|
61
61
|
style='width:100%'
|
|
62
|
-
|
|
62
|
+
>
|
|
63
|
+
<:label>Votre fruit préféré est :</:label>
|
|
64
|
+
</PixSelect>
|
|
63
65
|
<br />
|
|
64
66
|
|
|
65
67
|
<PixTextarea
|
|
66
68
|
@id='form__pix-textarea'
|
|
67
|
-
@value=''
|
|
68
69
|
@maxlength={{200}}
|
|
69
|
-
@label='Un commentaire ?'
|
|
70
70
|
@requiredLabel='Champ obligatoire'
|
|
71
71
|
@errorMessage={{this.genericErrorMessage}}
|
|
72
|
-
|
|
72
|
+
>
|
|
73
|
+
<:label>Un commentaire ?</:label>
|
|
74
|
+
</PixTextarea>
|
|
73
75
|
<br />
|
|
74
76
|
|
|
75
77
|
<label class='pix-form__label'> Votre légume préféré est : </label>
|
|
76
|
-
<PixRadioButton @
|
|
77
|
-
|
|
78
|
+
<PixRadioButton @value='chou' name='légume'>
|
|
79
|
+
<:label>Chou</:label>
|
|
80
|
+
</PixRadioButton>
|
|
81
|
+
<PixRadioButton @value='carotte' name='légume'>
|
|
82
|
+
<:label>Carotte</:label>
|
|
83
|
+
</PixRadioButton>
|
|
84
|
+
|
|
78
85
|
<br />
|
|
79
86
|
|
|
80
|
-
<PixCheckbox @id='spam-pub' @
|
|
81
|
-
Acceptez-vous de vous faire spammer de PUB
|
|
87
|
+
<PixCheckbox @id='spam-pub' @size='small'>
|
|
88
|
+
<:label>Acceptez-vous de vous faire spammer de PUB ?</:label>
|
|
82
89
|
</PixCheckbox>
|
|
83
90
|
|
|
84
91
|
<br /><br />
|
|
@@ -53,10 +53,10 @@ En ce sens, nous avons déjà prévu un espace vertical pour séparer 2 composan
|
|
|
53
53
|
<PixCheckbox
|
|
54
54
|
@screenReaderOnly="{{false}}"
|
|
55
55
|
@isIndeterminate="{{false}}"
|
|
56
|
-
@
|
|
56
|
+
@size="small"
|
|
57
57
|
disabled
|
|
58
58
|
>
|
|
59
|
-
Recevoir la newsletter
|
|
59
|
+
<:label>Recevoir la newsletter</:label>
|
|
60
60
|
</PixCheckbox>
|
|
61
61
|
```
|
|
62
62
|
|