ember-validated-form 7.0.1 → 8.0.1

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.
Files changed (36) hide show
  1. package/.husky/commit-msg +2 -7
  2. package/.husky/pre-commit +0 -6
  3. package/CHANGELOG.md +36 -0
  4. package/README.md +1 -1
  5. package/addon/-private/features.js +7 -0
  6. package/addon/components/validated-button/button.hbs +5 -5
  7. package/addon/components/validated-button.hbs +19 -19
  8. package/addon/components/validated-button.js +5 -10
  9. package/addon/components/validated-form.hbs +1 -0
  10. package/addon/components/validated-form.js +11 -14
  11. package/addon/components/validated-input/error.hbs +2 -5
  12. package/addon/components/validated-input/hint.hbs +3 -5
  13. package/addon/components/validated-input/label.hbs +1 -1
  14. package/addon/components/validated-input/render/wrapper.hbs +1 -1
  15. package/addon/components/validated-input/render.hbs +149 -124
  16. package/addon/components/validated-input/types/checkbox-group.hbs +2 -2
  17. package/addon/components/validated-input/types/checkbox.hbs +2 -2
  18. package/addon/components/validated-input/types/date.hbs +16 -0
  19. package/addon/components/validated-input/types/input.hbs +5 -5
  20. package/addon/components/validated-input/types/radio-group.hbs +2 -2
  21. package/addon/components/validated-input/types/select.hbs +6 -6
  22. package/addon/components/validated-input/types/textarea.hbs +5 -5
  23. package/addon/components/validated-input.hbs +88 -76
  24. package/addon/components/validated-input.js +0 -7
  25. package/addon/helpers/evf-theme.js +14 -0
  26. package/app/components/validated-input/types/date.js +1 -0
  27. package/app/helpers/evf-class-list.js +1 -0
  28. package/app/helpers/evf-theme.js +1 -0
  29. package/config/addon-docs.js +9 -0
  30. package/index.js +9 -61
  31. package/package.json +74 -63
  32. package/addon/components/validated-input/render.js +0 -13
  33. package/addon/passed-or-default.js +0 -16
  34. package/app/helpers/class-list.js +0 -1
  35. package/tsconfig.declarations.json +0 -10
  36. /package/addon/helpers/{class-list.js → evf-class-list.js} +0 -0
package/.husky/commit-msg CHANGED
@@ -1,7 +1,2 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- # skip in CI
5
- [ -n "$CI" ] && exit 0
6
-
7
- pnpm commitlint --edit $1
1
+ # lint commit message
2
+ pnpm commitlint --edit "$1"
package/.husky/pre-commit CHANGED
@@ -1,8 +1,2 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- # skip in CI
5
- [ -n "$CI" ] && exit 0
6
-
7
1
  # lint only staged files
8
2
  pnpm lint-staged
package/CHANGELOG.md CHANGED
@@ -1,3 +1,39 @@
1
+ ## [8.0.1](https://github.com/adfinis/ember-validated-form/compare/v8.0.0...v8.0.1) (2026-05-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * yield submit action to allow custom handling of things ([#1280](https://github.com/adfinis/ember-validated-form/issues/1280)) ([651f64a](https://github.com/adfinis/ember-validated-form/commit/651f64a9d9686e81735d6bb10dd4675889a79fdc))
7
+
8
+ # [8.0.0](https://github.com/adfinis/ember-validated-form/compare/v7.0.1...v8.0.0) (2026-04-23)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **config:** remove usage of importSync for global component overrides ([895790c](https://github.com/adfinis/ember-validated-form/commit/895790c27141a9c14569a4f263827d532edf9452)), closes [#1215](https://github.com/adfinis/ember-validated-form/issues/1215) [#1190](https://github.com/adfinis/ember-validated-form/issues/1190) [#915](https://github.com/adfinis/ember-validated-form/issues/915)
14
+ * **deps:** convert template relevant addons to peer dependencies ([09e7f5b](https://github.com/adfinis/ember-validated-form/commit/09e7f5bb8a9e42ffda3c56b33aeff85d023c8f4e))
15
+ * **deps:** update dependencies ([18c6f02](https://github.com/adfinis/ember-validated-form/commit/18c6f023d569498e2977fa32fc44f8da6d588b4a))
16
+ * **validated-input/types/select:** typo in inputId ([b6e347b](https://github.com/adfinis/ember-validated-form/commit/b6e347bd51883b5705f614c160f8c062cc2263df))
17
+
18
+
19
+ ### chore
20
+
21
+ * **ember:** drop support for Ember < 5.12 LTS ([c6a1bed](https://github.com/adfinis/ember-validated-form/commit/c6a1bed4b3c9a23a880b22fe498f61773f6d0278)), closes [#1211](https://github.com/adfinis/ember-validated-form/issues/1211)
22
+
23
+
24
+ ### Features
25
+
26
+ * **form:** pass event to submit action ([076bddf](https://github.com/adfinis/ember-validated-form/commit/076bddfc6079b800b69950771f327fcf719531d7)), closes [#661](https://github.com/adfinis/ember-validated-form/issues/661)
27
+
28
+
29
+ ### BREAKING CHANGES
30
+
31
+ * **config:** This changes the the way that global overrides for
32
+ `ember-validated-form` components are configured. For instructions on
33
+ how to migrate, check the [migration to v8 guide](https://docs.adfinis.com/ember-validated-form/docs/migration-v8).
34
+ * **ember:** This addon now only supports Ember.js versions from
35
+ 5.12 upwards.
36
+
1
37
  ## [7.0.1](https://github.com/adfinis/ember-validated-form/compare/v7.0.0...v7.0.1) (2024-03-18)
2
38
 
3
39
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/ember-validated-form.svg)](https://badge.fury.io/js/ember-validated-form)
4
4
  [![Ember Observer Score](https://emberobserver.com/badges/ember-validated-form.svg)](https://emberobserver.com/addons/ember-validated-form)
5
- [![Test](https://github.com/adfinis/ember-validated-form/workflows/Test/badge.svg)](https://github.com/adfinis/ember-validated-form/actions?query=workflow%3ATest)
5
+ [![CI](https://github.com/adfinis/ember-validated-form/actions/workflows/ci.yml/badge.svg)](https://github.com/adfinis/ember-validated-form/actions/workflows/ci.yml)
6
6
  [![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
7
7
 
8
8
  Easily create forms with client side validations.
@@ -0,0 +1,7 @@
1
+ import { getOwner } from "@ember/application";
2
+
3
+ export function scrollErrorIntoViewEnabled(target) {
4
+ return getOwner(target).resolveRegistration("config:environment")[
5
+ "ember-validated-form"
6
+ ].scrollErrorIntoView;
7
+ }
@@ -1,15 +1,15 @@
1
1
  <button
2
- class={{class-list
2
+ class={{evf-class-list
3
3
  (if
4
- (macroCondition (macroGetOwnConfig "isUikit"))
5
- (class-list
4
+ (evf-theme "uikit")
5
+ (evf-class-list
6
6
  "uk-button"
7
7
  (if (eq @type "submit") "uk-button-primary" "uk-button-default")
8
8
  )
9
9
  )
10
10
  (if
11
- (macroCondition (macroGetOwnConfig "isBootstrap"))
12
- (class-list
11
+ (evf-theme "bootstrap")
12
+ (evf-class-list
13
13
  "btn"
14
14
  (if (eq @type "submit") "btn-primary" "btn-default")
15
15
  (if @loading "loading")
@@ -1,19 +1,19 @@
1
- {{#if (has-block)}}
2
- <this.buttonComponent
3
- @onClick={{this.click}}
4
- @loading={{this.loading}}
5
- @disabled={{or @disabled this.loading}}
6
- @label={{@label}}
7
- @type={{@type}}
8
- ...attributes
9
- >{{yield}}</this.buttonComponent>
10
- {{else}}
11
- <this.buttonComponent
12
- @onClick={{this.click}}
13
- @loading={{this.loading}}
14
- @disabled={{or @disabled this.loading}}
15
- @label={{@label}}
16
- @type={{@type}}
17
- ...attributes
18
- />
19
- {{/if}}
1
+ {{#let
2
+ (component
3
+ (ensure-safe-component
4
+ (or @buttonComponent (component "validated-button/button"))
5
+ )
6
+ onClick=this.click
7
+ loading=this.loading
8
+ disabled=(or @disabled this.loading)
9
+ label=@label
10
+ type=@type
11
+ )
12
+ as |ButtonComponent|
13
+ }}
14
+ {{#if (has-block)}}
15
+ <ButtonComponent ...attributes>{{yield}}</ButtonComponent>
16
+ {{else}}
17
+ <ButtonComponent ...attributes />
18
+ {{/if}}
19
+ {{/let}}
@@ -1,18 +1,15 @@
1
1
  import { action } from "@ember/object";
2
- import { macroCondition, getOwnConfig } from "@embroider/macros";
3
2
  import Component from "@glimmer/component";
4
3
  import { tracked } from "@glimmer/tracking";
5
4
  import { resolve } from "rsvp";
6
5
 
7
- import passedOrDefault from "ember-validated-form/passed-or-default";
6
+ import { scrollErrorIntoViewEnabled } from "ember-validated-form/-private/features";
8
7
 
9
8
  const ON_CLICK = "on-click";
10
9
  const ON_INVALID_CLICK = "on-invalid-click";
11
10
  export default class ValidatedButtonComponent extends Component {
12
11
  @tracked _loading;
13
12
 
14
- @passedOrDefault("button") buttonComponent;
15
-
16
13
  get loading() {
17
14
  return this.args.loading || this._loading;
18
15
  }
@@ -40,12 +37,10 @@ export default class ValidatedButtonComponent extends Component {
40
37
 
41
38
  await model.validate();
42
39
 
43
- if (macroCondition(getOwnConfig().scrollErrorIntoView)) {
44
- if (model.errors[0]?.key) {
45
- document
46
- .querySelector(`[name=${model.errors[0].key.replaceAll(".", "\\.")}]`)
47
- ?.scrollIntoView({ behavior: "smooth" });
48
- }
40
+ if (scrollErrorIntoViewEnabled(this) && model.errors[0]?.key) {
41
+ document
42
+ .querySelector(`[name=${model.errors[0].key.replaceAll(".", "\\.")}]`)
43
+ ?.scrollIntoView({ behavior: "smooth" });
49
44
  }
50
45
 
51
46
  if (model.get("isInvalid")) {
@@ -7,6 +7,7 @@
7
7
  (hash
8
8
  model=@model
9
9
  loading=this.loading
10
+ submitAction=this.submit
10
11
  input=(component
11
12
  "validated-input"
12
13
  model=@model
@@ -1,10 +1,11 @@
1
1
  import { action } from "@ember/object";
2
2
  import { scheduleOnce } from "@ember/runloop";
3
- import { macroCondition, getOwnConfig } from "@embroider/macros";
4
3
  import Component from "@glimmer/component";
5
4
  import { tracked } from "@glimmer/tracking";
6
5
  import { resolve } from "rsvp";
7
6
 
7
+ import { scrollErrorIntoViewEnabled } from "ember-validated-form/-private/features";
8
+
8
9
  const PROP_ON_SUBMIT = "on-submit";
9
10
  const PROP_ON_INVALID_SUBMIT = "on-invalid-submit";
10
11
 
@@ -38,38 +39,34 @@ export default class ValidatedFormComponent extends Component {
38
39
  const model = this.args.model;
39
40
 
40
41
  if (!model || !model.validate) {
41
- this.runCallback(PROP_ON_SUBMIT);
42
+ this.runCallback(PROP_ON_SUBMIT, event);
42
43
  return false;
43
44
  }
44
45
 
45
46
  await model.validate();
46
47
 
47
48
  if (model.get("isInvalid")) {
48
- if (macroCondition(getOwnConfig().scrollErrorIntoView)) {
49
- if (model.errors[0]?.key) {
50
- document
51
- .querySelector(
52
- `[name=${model.errors[0].key.replaceAll(".", "\\.")}]`,
53
- )
54
- ?.scrollIntoView({ behavior: "smooth" });
55
- }
49
+ if (scrollErrorIntoViewEnabled(this) && model.errors[0]?.key) {
50
+ document
51
+ .querySelector(`[name=${model.errors[0].key.replaceAll(".", "\\.")}]`)
52
+ ?.scrollIntoView({ behavior: "smooth" });
56
53
  }
57
- this.runCallback(PROP_ON_INVALID_SUBMIT);
54
+ this.runCallback(PROP_ON_INVALID_SUBMIT, event);
58
55
  } else {
59
- this.runCallback(PROP_ON_SUBMIT);
56
+ this.runCallback(PROP_ON_SUBMIT, event);
60
57
  }
61
58
 
62
59
  return false;
63
60
  }
64
61
 
65
- runCallback(callbackProp) {
62
+ runCallback(callbackProp, event) {
66
63
  const callback = this.args[callbackProp];
67
64
  if (typeof callback !== "function") {
68
65
  return;
69
66
  }
70
67
 
71
68
  this.loading = true;
72
- resolve(callback(this.args.model)).finally(() => {
69
+ resolve(callback(this.args.model, event)).finally(() => {
73
70
  this.loading = false;
74
71
  });
75
72
  }
@@ -1,14 +1,11 @@
1
- {{#if (macroCondition (macroGetOwnConfig "isUikit"))}}
1
+ {{#if (evf-theme "uikit")}}
2
2
  <small id={{@id}} class="uk-text-danger" ...attributes>
3
3
  {{yield}}{{this.errorString}}
4
4
  </small>
5
5
  {{else}}
6
6
  <span
7
7
  id={{@id}}
8
- class={{if
9
- (macroCondition (macroGetOwnConfig "isBootstrap"))
10
- "d-block invalid-feedback"
11
- }}
8
+ class={{if (evf-theme "bootstrap") "d-block invalid-feedback"}}
12
9
  ...attributes
13
10
  >
14
11
  {{yield}}{{this.errorString}}
@@ -1,10 +1,8 @@
1
1
  <small
2
2
  id={{@id}}
3
- class={{class-list
4
- (if (macroCondition (macroGetOwnConfig "isUikit")) "uk-text-muted")
5
- (if
6
- (macroCondition (macroGetOwnConfig "isBootstrap")) "form-text text-muted"
7
- )
3
+ class={{evf-class-list
4
+ (if (evf-theme "uikit") "uk-text-muted")
5
+ (if (evf-theme "bootstrap") "form-text text-muted")
8
6
  }}
9
7
  ...attributes
10
8
  >{{yield}}{{@hint}}</small>
@@ -1,5 +1,5 @@
1
1
  <label
2
- class={{if (macroCondition (macroGetOwnConfig "isUikit")) "uk-form-label"}}
2
+ class={{if (evf-theme "uikit") "uk-form-label"}}
3
3
  for={{@inputId}}
4
4
  ...attributes
5
5
  >
@@ -1,4 +1,4 @@
1
- {{#if (macroCondition (macroGetOwnConfig "isUikit"))}}
1
+ {{#if (evf-theme "uikit")}}
2
2
  <div class="uk-form-controls">{{yield}}</div>
3
3
  {{else}}
4
4
  {{yield}}
@@ -1,127 +1,152 @@
1
- {{! template-lint-disable no-autofocus-attribute }}
2
- <div
3
- class={{class-list
4
- (if (macroCondition (macroGetOwnConfig "isUikit")) "uk-margin")
5
- (if (macroCondition (macroGetOwnConfig "isBootstrap")) "form-group")
6
- }}
7
- >
8
- {{#if (not-eq @type "checkbox")}}
9
- <@labelComponent />
10
- {{/if}}
11
-
12
- <ValidatedInput::Render::Wrapper>
13
- {{#if (eq @type "select")}}
14
- <this.selectComponent
15
- @disabled={{@disabled}}
16
- @inputId={{@inputId}}
17
- @isInvalid={{@isInvalid}}
18
- @isValid={{@isValid}}
19
- @multiple={{@multiple}}
20
- @name={{or @inputName @name}}
21
- @optionLabelPath={{@optionLabelPath}}
22
- @options={{@options}}
23
- @optionTargetPath={{@optionTargetPath}}
24
- @optionValuePath={{@optionValuePath}}
25
- @prompt={{@prompt}}
26
- @promptIsSelectable={{@promptIsSelectable}}
27
- @setDirty={{@setDirty}}
28
- @update={{@update}}
29
- @value={{@value}}
30
- ...attributes
31
- />
32
- {{else if (or (eq @type "radioGroup") (eq @type "radio-group"))}}
33
- <this.radioGroupComponent
34
- @disabled={{@disabled}}
35
- @inputId={{@inputId}}
36
- @isInvalid={{@isInvalid}}
37
- @isValid={{@isValid}}
38
- @name={{or @inputName @name}}
39
- @options={{@options}}
40
- @setDirty={{@setDirty}}
41
- @update={{@update}}
42
- @value={{@value}}
43
- ...attributes
44
- />
45
- {{else if (or (eq @type "checkboxGroup") (eq @type "checkbox-group"))}}
46
- <this.checkboxGroupComponent
47
- @disabled={{@disabled}}
48
- @inputId={{@inputId}}
49
- @isInvalid={{@isInvalid}}
50
- @isValid={{@isValid}}
51
- @name={{or @inputName @name}}
52
- @options={{@options}}
53
- @setDirty={{@setDirty}}
54
- @update={{@update}}
55
- @value={{@value}}
56
- ...attributes
57
- />
58
- {{else if (eq @type "checkbox")}}
59
- <this.checkboxComponent
60
- @disabled={{@disabled}}
61
- @inputId={{@inputId}}
62
- @isInvalid={{@isInvalid}}
63
- @isValid={{@isValid}}
64
- @labelComponent={{@labelComponent}}
65
- @name={{or @inputName @name}}
66
- @options={{@options}}
67
- @setDirty={{@setDirty}}
68
- @update={{@update}}
69
- @value={{@value}}
70
- ...attributes
71
- />
72
- {{else if (eq @type "textarea")}}
73
- <this.textareaComponent
74
- autocomplete={{@autocomplete}}
75
- autofocus={{@autofocus}}
76
- cols={{@cols}}
77
- disabled={{@disabled}}
78
- id={{@inputId}}
79
- name={{or @inputName @name}}
80
- placeholder={{@placeholder}}
81
- rows={{@rows}}
82
- value={{@value}}
83
- @isInvalid={{@isInvalid}}
84
- @isValid={{@isValid}}
85
- @setDirty={{@setDirty}}
86
- @update={{@update}}
87
- ...attributes
88
- />
89
- {{else if
90
- (and (eq @type "date") (not-eq this.dateComponent this.inputComponent))
1
+ {{#let
2
+ (ensure-safe-component
3
+ (or @selectComponent (component "validated-input/types/select"))
4
+ )
5
+ (ensure-safe-component
6
+ (or @radioGroupComponent (component "validated-input/types/radio-group"))
7
+ )
8
+ (ensure-safe-component
9
+ (or
10
+ @checkboxGroupComponent (component "validated-input/types/checkbox-group")
11
+ )
12
+ )
13
+ (ensure-safe-component
14
+ (or @checkboxComponent (component "validated-input/types/checkbox"))
15
+ )
16
+ (ensure-safe-component
17
+ (or @textareaComponent (component "validated-input/types/textarea"))
18
+ )
19
+ (ensure-safe-component
20
+ (or @dateComponent (component "validated-input/types/date"))
21
+ )
22
+ (ensure-safe-component
23
+ (or @inputComponent (component "validated-input/types/input"))
24
+ )
25
+ as |SelectComponent RadioGroupComponent CheckboxGroupComponent CheckboxComponent TextareaComponent DateComponent InputComponent|
26
+ }}
27
+ {{! template-lint-disable no-autofocus-attribute }}
28
+ <div
29
+ class={{evf-class-list
30
+ (if (evf-theme "uikit") "uk-margin")
31
+ (if (evf-theme "bootstrap") "form-group")
91
32
  }}
92
- <this.dateComponent
93
- @autocomplete={{@autocomplete}}
94
- @autofocus={{@autofocus}}
95
- @disabled={{@disabled}}
96
- @id={{@inputId}}
97
- @name={{or @inputName @name}}
98
- @placeholder={{@placeholder}}
99
- @value={{@value}}
100
- @isInvalid={{@isInvalid}}
101
- @isValid={{@isValid}}
102
- @setDirty={{@setDirty}}
103
- @update={{@update}}
104
- ...attributes
105
- />
106
- {{else}}
107
- <this.inputComponent
108
- autocomplete={{@autocomplete}}
109
- autofocus={{@autofocus}}
110
- disabled={{@disabled}}
111
- id={{@inputId}}
112
- name={{or @inputName @name}}
113
- placeholder={{@placeholder}}
114
- type={{@type}}
115
- value={{@value}}
116
- @isInvalid={{@isInvalid}}
117
- @isValid={{@isValid}}
118
- @setDirty={{@setDirty}}
119
- @update={{@update}}
120
- ...attributes
121
- />
33
+ >
34
+ {{#if (not-eq @type "checkbox")}}
35
+ <@labelComponent />
122
36
  {{/if}}
123
- </ValidatedInput::Render::Wrapper>
124
37
 
125
- <@hintComponent />
126
- <@errorComponent />
127
- </div>
38
+ <ValidatedInput::Render::Wrapper>
39
+ {{#if (eq @type "select")}}
40
+ <SelectComponent
41
+ @disabled={{@disabled}}
42
+ @inputId={{@inputId}}
43
+ @isInvalid={{@isInvalid}}
44
+ @isValid={{@isValid}}
45
+ @multiple={{@multiple}}
46
+ @name={{or @inputName @name}}
47
+ @optionLabelPath={{@optionLabelPath}}
48
+ @options={{@options}}
49
+ @optionTargetPath={{@optionTargetPath}}
50
+ @optionValuePath={{@optionValuePath}}
51
+ @prompt={{@prompt}}
52
+ @promptIsSelectable={{@promptIsSelectable}}
53
+ @setDirty={{@setDirty}}
54
+ @update={{@update}}
55
+ @value={{@value}}
56
+ ...attributes
57
+ />
58
+ {{else if (or (eq @type "radioGroup") (eq @type "radio-group"))}}
59
+ <RadioGroupComponent
60
+ @disabled={{@disabled}}
61
+ @inputId={{@inputId}}
62
+ @isInvalid={{@isInvalid}}
63
+ @isValid={{@isValid}}
64
+ @name={{or @inputName @name}}
65
+ @options={{@options}}
66
+ @setDirty={{@setDirty}}
67
+ @update={{@update}}
68
+ @value={{@value}}
69
+ ...attributes
70
+ />
71
+ {{else if (or (eq @type "checkboxGroup") (eq @type "checkbox-group"))}}
72
+ <CheckboxGroupComponent
73
+ @disabled={{@disabled}}
74
+ @inputId={{@inputId}}
75
+ @isInvalid={{@isInvalid}}
76
+ @isValid={{@isValid}}
77
+ @name={{or @inputName @name}}
78
+ @options={{@options}}
79
+ @setDirty={{@setDirty}}
80
+ @update={{@update}}
81
+ @value={{@value}}
82
+ ...attributes
83
+ />
84
+ {{else if (eq @type "checkbox")}}
85
+ <CheckboxComponent
86
+ @disabled={{@disabled}}
87
+ @inputId={{@inputId}}
88
+ @isInvalid={{@isInvalid}}
89
+ @isValid={{@isValid}}
90
+ @labelComponent={{@labelComponent}}
91
+ @name={{or @inputName @name}}
92
+ @options={{@options}}
93
+ @setDirty={{@setDirty}}
94
+ @update={{@update}}
95
+ @value={{@value}}
96
+ ...attributes
97
+ />
98
+ {{else if (eq @type "textarea")}}
99
+ <TextareaComponent
100
+ autocomplete={{@autocomplete}}
101
+ autofocus={{@autofocus}}
102
+ cols={{@cols}}
103
+ disabled={{@disabled}}
104
+ id={{@inputId}}
105
+ name={{or @inputName @name}}
106
+ placeholder={{@placeholder}}
107
+ rows={{@rows}}
108
+ value={{@value}}
109
+ @isInvalid={{@isInvalid}}
110
+ @isValid={{@isValid}}
111
+ @setDirty={{@setDirty}}
112
+ @update={{@update}}
113
+ ...attributes
114
+ />
115
+ {{else if (eq @type "date")}}
116
+ <DateComponent
117
+ @autocomplete={{@autocomplete}}
118
+ @autofocus={{@autofocus}}
119
+ @disabled={{@disabled}}
120
+ @id={{@inputId}}
121
+ @name={{or @inputName @name}}
122
+ @placeholder={{@placeholder}}
123
+ @value={{@value}}
124
+ @isInvalid={{@isInvalid}}
125
+ @isValid={{@isValid}}
126
+ @setDirty={{@setDirty}}
127
+ @update={{@update}}
128
+ ...attributes
129
+ />
130
+ {{else}}
131
+ <InputComponent
132
+ autocomplete={{@autocomplete}}
133
+ autofocus={{@autofocus}}
134
+ disabled={{@disabled}}
135
+ id={{@inputId}}
136
+ name={{or @inputName @name}}
137
+ placeholder={{@placeholder}}
138
+ type={{@type}}
139
+ value={{@value}}
140
+ @isInvalid={{@isInvalid}}
141
+ @isValid={{@isValid}}
142
+ @setDirty={{@setDirty}}
143
+ @update={{@update}}
144
+ ...attributes
145
+ />
146
+ {{/if}}
147
+ </ValidatedInput::Render::Wrapper>
148
+
149
+ <@hintComponent />
150
+ <@errorComponent />
151
+ </div>
152
+ {{/let}}
@@ -1,5 +1,5 @@
1
1
  {{#each @options as |option i|}}
2
- {{#if (macroCondition (macroGetOwnConfig "isUikit"))}}
2
+ {{#if (evf-theme "uikit")}}
3
3
  {{#if (not-eq i 0)}}<br />{{/if}}
4
4
  <label
5
5
  class="uk-form-label
@@ -18,7 +18,7 @@
18
18
  />
19
19
  {{option.label}}
20
20
  </label>
21
- {{else if (macroCondition (macroGetOwnConfig "isBootstrap"))}}
21
+ {{else if (evf-theme "bootstrap")}}
22
22
  <div class="custom-control custom-checkbox">
23
23
  <input
24
24
  type="checkbox"
@@ -1,4 +1,4 @@
1
- {{#if (macroCondition (macroGetOwnConfig "isUikit"))}}
1
+ {{#if (evf-theme "uikit")}}
2
2
  <@labelComponent
3
3
  class="{{if @isValid 'uk-text-success'}} {{if @isInvalid 'uk-text-danger'}}"
4
4
  >
@@ -13,7 +13,7 @@
13
13
  ...attributes
14
14
  />
15
15
  </@labelComponent>
16
- {{else if (macroCondition (macroGetOwnConfig "isBootstrap"))}}
16
+ {{else if (evf-theme "bootstrap")}}
17
17
  <div class="custom-control custom-checkbox">
18
18
  <input
19
19
  class="custom-control-input
@@ -0,0 +1,16 @@
1
+ {{! template-lint-disable no-autofocus-attribute }}
2
+ <ValidatedInput::Types::Input
3
+ autocomplete={{@autocomplete}}
4
+ autofocus={{@autofocus}}
5
+ disabled={{@disabled}}
6
+ id={{@id}}
7
+ name={{@name}}
8
+ placeholder={{@placeholder}}
9
+ type="date"
10
+ value={{@value}}
11
+ @isInvalid={{@isInvalid}}
12
+ @isValid={{@isValid}}
13
+ @setDirty={{@setDirty}}
14
+ @update={{@update}}
15
+ ...attributes
16
+ />
@@ -1,16 +1,16 @@
1
1
  <input
2
- class={{class-list
2
+ class={{evf-class-list
3
3
  (if
4
- (macroCondition (macroGetOwnConfig "isUikit"))
5
- (class-list
4
+ (evf-theme "uikit")
5
+ (evf-class-list
6
6
  "uk-input"
7
7
  (if @isValid "uk-form-success")
8
8
  (if @isInvalid "uk-form-danger")
9
9
  )
10
10
  )
11
11
  (if
12
- (macroCondition (macroGetOwnConfig "isBootstrap"))
13
- (class-list
12
+ (evf-theme "bootstrap")
13
+ (evf-class-list
14
14
  "form-control" (if @isValid "is-valid") (if @isInvalid "is-invalid")
15
15
  )
16
16
  )
@@ -1,5 +1,5 @@
1
1
  {{#each @options as |option i|}}
2
- {{#if (macroCondition (macroGetOwnConfig "isUikit"))}}
2
+ {{#if (evf-theme "uikit")}}
3
3
  {{#if (not-eq i 0)}}<br />{{/if}}
4
4
  <label
5
5
  class="uk-form-label
@@ -19,7 +19,7 @@
19
19
  />
20
20
  {{option.label}}
21
21
  </label>
22
- {{else if (macroCondition (macroGetOwnConfig "isBootstrap"))}}
22
+ {{else if (evf-theme "bootstrap")}}
23
23
  <div class="custom-control custom-radio">
24
24
  <input
25
25
  type="radio"