ember-validated-form 5.3.1 → 6.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 +152 -135
- package/README.md +3 -3
- package/addon/components/validated-button/button.hbs +17 -1
- package/addon/components/validated-button.hbs +19 -17
- package/addon/components/validated-button.js +9 -15
- package/addon/components/validated-form.js +7 -9
- package/addon/components/validated-input/error.hbs +15 -1
- package/addon/components/validated-input/hint.hbs +9 -1
- package/addon/components/validated-input/label.hbs +5 -1
- package/addon/components/validated-input/render/wrapper.hbs +5 -0
- package/addon/components/validated-input/render.hbs +21 -27
- package/addon/components/validated-input/render.js +7 -8
- package/addon/components/validated-input/types/checkbox-group.hbs +51 -13
- package/addon/components/validated-input/types/checkbox.hbs +41 -10
- package/addon/components/validated-input/types/input.hbs +16 -1
- package/addon/components/validated-input/types/input.js +0 -1
- package/addon/components/validated-input/types/radio-group.hbs +53 -13
- package/addon/components/validated-input/types/select.hbs +18 -3
- package/addon/components/validated-input/types/select.js +8 -28
- package/addon/components/validated-input/types/textarea.hbs +16 -1
- package/addon/components/validated-input.hbs +52 -54
- package/addon/components/validated-input.js +5 -5
- package/addon/helpers/class-list.js +9 -0
- package/addon/passed-or-default.js +16 -0
- package/app/components/validated-input/{-themes/uikit/hint.js → render/wrapper.js} +1 -1
- package/app/helpers/class-list.js +1 -0
- package/index.js +63 -0
- package/package.json +25 -23
- package/addon/-private/themed-component.js +0 -38
- package/addon/components/validated-button/-themes/bootstrap/button.js +0 -10
- package/addon/components/validated-button/-themes/uikit/button.js +0 -10
- package/addon/components/validated-button/button.js +0 -4
- package/addon/components/validated-input/-themes/bootstrap/error.js +0 -5
- package/addon/components/validated-input/-themes/bootstrap/hint.js +0 -5
- package/addon/components/validated-input/-themes/bootstrap/label.js +0 -3
- package/addon/components/validated-input/-themes/bootstrap/render.js +0 -5
- package/addon/components/validated-input/-themes/uikit/error.hbs +0 -4
- package/addon/components/validated-input/-themes/uikit/error.js +0 -3
- package/addon/components/validated-input/-themes/uikit/hint.js +0 -5
- package/addon/components/validated-input/-themes/uikit/label.js +0 -5
- package/addon/components/validated-input/-themes/uikit/render.hbs +0 -118
- package/addon/components/validated-input/-themes/uikit/render.js +0 -5
- package/addon/components/validated-input/hint.js +0 -4
- package/addon/components/validated-input/label.js +0 -4
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.hbs +0 -19
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox-group.js +0 -3
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox.hbs +0 -14
- package/addon/components/validated-input/types/-themes/bootstrap/checkbox.js +0 -3
- package/addon/components/validated-input/types/-themes/bootstrap/input.js +0 -13
- package/addon/components/validated-input/types/-themes/bootstrap/radio-group.hbs +0 -20
- package/addon/components/validated-input/types/-themes/bootstrap/radio-group.js +0 -3
- package/addon/components/validated-input/types/-themes/bootstrap/select.js +0 -13
- package/addon/components/validated-input/types/-themes/bootstrap/textarea.js +0 -13
- package/addon/components/validated-input/types/-themes/uikit/checkbox-group.hbs +0 -19
- package/addon/components/validated-input/types/-themes/uikit/checkbox-group.js +0 -3
- package/addon/components/validated-input/types/-themes/uikit/checkbox.hbs +0 -15
- package/addon/components/validated-input/types/-themes/uikit/checkbox.js +0 -3
- package/addon/components/validated-input/types/-themes/uikit/input.js +0 -13
- package/addon/components/validated-input/types/-themes/uikit/radio-group.hbs +0 -20
- package/addon/components/validated-input/types/-themes/uikit/radio-group.js +0 -3
- package/addon/components/validated-input/types/-themes/uikit/select.js +0 -13
- package/addon/components/validated-input/types/-themes/uikit/textarea.js +0 -13
- package/app/components/validated-button/-themes/bootstrap/button.js +0 -1
- package/app/components/validated-button/-themes/uikit/button.js +0 -1
- package/app/components/validated-input/-themes/bootstrap/error.js +0 -1
- package/app/components/validated-input/-themes/bootstrap/hint.js +0 -1
- package/app/components/validated-input/-themes/bootstrap/label.js +0 -1
- package/app/components/validated-input/-themes/bootstrap/render.js +0 -1
- package/app/components/validated-input/-themes/uikit/error.js +0 -1
- package/app/components/validated-input/-themes/uikit/label.js +0 -1
- package/app/components/validated-input/-themes/uikit/render.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/checkbox-group.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/checkbox.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/input.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/radio-group.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/select.js +0 -1
- package/app/components/validated-input/types/-themes/bootstrap/textarea.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/checkbox-group.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/checkbox.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/input.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/radio-group.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/select.js +0 -1
- package/app/components/validated-input/types/-themes/uikit/textarea.js +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<div class="custom-control custom-checkbox">
|
|
2
|
-
<input
|
|
3
|
-
class="custom-control-input
|
|
4
|
-
{{if @isValid 'is-valid'}}
|
|
5
|
-
{{if @isInvalid 'is-invalid'}}"
|
|
6
|
-
type="checkbox"
|
|
7
|
-
name={{@name}}
|
|
8
|
-
id={{@inputId}}
|
|
9
|
-
disabled={{@disabled}}
|
|
10
|
-
checked={{@value}}
|
|
11
|
-
{{on "input" this.onUpdate}}
|
|
12
|
-
/>
|
|
13
|
-
<@labelComponent class="custom-control-label" />
|
|
14
|
-
</div>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Component from "../../input";
|
|
2
|
-
|
|
3
|
-
export default class BootstrapInputComponent extends Component {
|
|
4
|
-
get class() {
|
|
5
|
-
const style = this.args.isValid
|
|
6
|
-
? "is-valid"
|
|
7
|
-
: this.args.isInvalid
|
|
8
|
-
? "is-invalid"
|
|
9
|
-
: "";
|
|
10
|
-
|
|
11
|
-
return `form-control ${style}`;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{{#each @options as |option i|}}
|
|
2
|
-
<div class="custom-control custom-radio">
|
|
3
|
-
<input
|
|
4
|
-
type="radio"
|
|
5
|
-
class="custom-control-input
|
|
6
|
-
{{if @isValid 'is-valid'}}
|
|
7
|
-
{{if @isInvalid 'is-invalid'}}"
|
|
8
|
-
checked={{eq @value option.key}}
|
|
9
|
-
value={{option.key}}
|
|
10
|
-
name={{@name}}
|
|
11
|
-
id="{{@inputId}}-{{i}}"
|
|
12
|
-
disabled={{@disabled}}
|
|
13
|
-
{{on "input" (fn this.onUpdate option.key)}}
|
|
14
|
-
/>
|
|
15
|
-
<label
|
|
16
|
-
class="custom-control-label"
|
|
17
|
-
for="{{@inputId}}-{{i}}"
|
|
18
|
-
>{{option.label}}</label>
|
|
19
|
-
</div>
|
|
20
|
-
{{/each}}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Component from "../../select";
|
|
2
|
-
|
|
3
|
-
export default class BootstrapSelectComponent extends Component {
|
|
4
|
-
get class() {
|
|
5
|
-
const style = this.args.isValid
|
|
6
|
-
? "is-valid"
|
|
7
|
-
: this.args.isInvalid
|
|
8
|
-
? "is-invalid"
|
|
9
|
-
: "";
|
|
10
|
-
|
|
11
|
-
return `form-control ${style}`;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Component from "../../textarea";
|
|
2
|
-
|
|
3
|
-
export default class BootstrapTextareaComponent extends Component {
|
|
4
|
-
get class() {
|
|
5
|
-
const style = this.args.isValid
|
|
6
|
-
? "is-valid"
|
|
7
|
-
: this.args.isInvalid
|
|
8
|
-
? "is-invalid"
|
|
9
|
-
: "";
|
|
10
|
-
|
|
11
|
-
return `form-control ${style}`;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{{#each @options as |option i|}}
|
|
2
|
-
{{#if (not-eq i 0)}}<br />{{/if}}
|
|
3
|
-
<label
|
|
4
|
-
class="uk-form-label
|
|
5
|
-
{{if @isValid 'uk-text-success'}}
|
|
6
|
-
{{if @isInvalid 'uk-text-danger'}}"
|
|
7
|
-
>
|
|
8
|
-
<input
|
|
9
|
-
type="checkbox"
|
|
10
|
-
class="uk-checkbox uk-margin-small-right"
|
|
11
|
-
checked={{includes option.key @value}}
|
|
12
|
-
name={{@name}}
|
|
13
|
-
id="{{@inputId}}-{{i}}"
|
|
14
|
-
disabled={{@disabled}}
|
|
15
|
-
{{on "input" (fn this.onUpdate option.key)}}
|
|
16
|
-
/>
|
|
17
|
-
{{option.label}}
|
|
18
|
-
</label>
|
|
19
|
-
{{/each}}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{{#let (component @labelComponent) as |Label|}}
|
|
2
|
-
<Label
|
|
3
|
-
class="{{if @isValid 'uk-text-success'}} {{if @isInvalid 'uk-text-danger'}}"
|
|
4
|
-
>
|
|
5
|
-
<input
|
|
6
|
-
class="uk-checkbox uk-margin-small-right"
|
|
7
|
-
type="checkbox"
|
|
8
|
-
name={{@name}}
|
|
9
|
-
id={{@inputId}}
|
|
10
|
-
disabled={{@disabled}}
|
|
11
|
-
checked={{@value}}
|
|
12
|
-
{{on "input" this.onUpdate}}
|
|
13
|
-
/>
|
|
14
|
-
</Label>
|
|
15
|
-
{{/let}}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Component from "../../input";
|
|
2
|
-
|
|
3
|
-
export default class UikitInputComponent extends Component {
|
|
4
|
-
get class() {
|
|
5
|
-
const style = this.args.isValid
|
|
6
|
-
? "uk-form-success"
|
|
7
|
-
: this.args.isInvalid
|
|
8
|
-
? "uk-form-danger"
|
|
9
|
-
: "";
|
|
10
|
-
|
|
11
|
-
return `uk-input ${style}`;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{{#each @options as |option i|}}
|
|
2
|
-
{{#if (not-eq i 0)}}<br />{{/if}}
|
|
3
|
-
<label
|
|
4
|
-
class="uk-form-label
|
|
5
|
-
{{if @isValid 'uk-text-success'}}
|
|
6
|
-
{{if @isInvalid 'uk-text-danger'}}"
|
|
7
|
-
>
|
|
8
|
-
<input
|
|
9
|
-
type="radio"
|
|
10
|
-
class="uk-radio uk-margin-small-right"
|
|
11
|
-
checked={{eq @value option.key}}
|
|
12
|
-
value={{option.key}}
|
|
13
|
-
name={{@name}}
|
|
14
|
-
id="{{@inputId}}-{{i}}"
|
|
15
|
-
disabled={{@disabled}}
|
|
16
|
-
{{on "input" (fn this.onUpdate option.key)}}
|
|
17
|
-
/>
|
|
18
|
-
{{option.label}}
|
|
19
|
-
</label>
|
|
20
|
-
{{/each}}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Component from "../../select";
|
|
2
|
-
|
|
3
|
-
export default class UikitSelectComponent extends Component {
|
|
4
|
-
get class() {
|
|
5
|
-
const style = this.args.isValid
|
|
6
|
-
? "uk-form-success"
|
|
7
|
-
: this.args.isInvalid
|
|
8
|
-
? "uk-form-danger"
|
|
9
|
-
: "";
|
|
10
|
-
|
|
11
|
-
return `uk-select ${style}`;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Component from "../../textarea";
|
|
2
|
-
|
|
3
|
-
export default class UikitTextareaComponent extends Component {
|
|
4
|
-
get class() {
|
|
5
|
-
const style = this.args.isValid
|
|
6
|
-
? "uk-form-success"
|
|
7
|
-
: this.args.isInvalid
|
|
8
|
-
? "uk-form-danger"
|
|
9
|
-
: "";
|
|
10
|
-
|
|
11
|
-
return `uk-textarea ${style}`;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-button/-themes/bootstrap/button";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-button/-themes/uikit/button";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/-themes/bootstrap/error";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/-themes/bootstrap/hint";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/-themes/bootstrap/label";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/-themes/bootstrap/render";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/-themes/uikit/error";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/-themes/uikit/label";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/-themes/uikit/render";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/bootstrap/checkbox-group";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/bootstrap/checkbox";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/bootstrap/input";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/bootstrap/radio-group";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/bootstrap/select";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/bootstrap/textarea";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/uikit/checkbox-group";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/uikit/checkbox";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/uikit/input";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/uikit/radio-group";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/uikit/select";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-validated-form/components/validated-input/types/-themes/uikit/textarea";
|