@frontile/forms-legacy 0.17.0-beta.1 → 0.17.0-beta.10

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 (35) hide show
  1. package/declarations/components/form-select.d.ts +2 -1
  2. package/declarations/components/form-select.d.ts.map +1 -1
  3. package/dist/components/form-checkbox-group.js +20 -23
  4. package/dist/components/form-checkbox-group.js.map +1 -1
  5. package/dist/components/form-checkbox.js +14 -9
  6. package/dist/components/form-checkbox.js.map +1 -1
  7. package/dist/components/form-field/checkbox.js +14 -9
  8. package/dist/components/form-field/checkbox.js.map +1 -1
  9. package/dist/components/form-field/feedback.js +5 -5
  10. package/dist/components/form-field/feedback.js.map +1 -1
  11. package/dist/components/form-field/hint.js +5 -5
  12. package/dist/components/form-field/hint.js.map +1 -1
  13. package/dist/components/form-field/input.js +17 -9
  14. package/dist/components/form-field/input.js.map +1 -1
  15. package/dist/components/form-field/label.js +5 -5
  16. package/dist/components/form-field/label.js.map +1 -1
  17. package/dist/components/form-field/radio.js +14 -9
  18. package/dist/components/form-field/radio.js.map +1 -1
  19. package/dist/components/form-field/textarea.js +17 -9
  20. package/dist/components/form-field/textarea.js.map +1 -1
  21. package/dist/components/form-field.js +16 -20
  22. package/dist/components/form-field.js.map +1 -1
  23. package/dist/components/form-input.js +23 -25
  24. package/dist/components/form-input.js.map +1 -1
  25. package/dist/components/form-radio-group.js +20 -23
  26. package/dist/components/form-radio-group.js.map +1 -1
  27. package/dist/components/form-radio.js +14 -9
  28. package/dist/components/form-radio.js.map +1 -1
  29. package/dist/components/form-select.js +41 -31
  30. package/dist/components/form-select.js.map +1 -1
  31. package/dist/components/form-textarea.js +10 -10
  32. package/dist/components/form-textarea.js.map +1 -1
  33. package/dist/runtime-BPCpkOf1-DV8zmEr2.js +67 -0
  34. package/dist/runtime-BPCpkOf1-DV8zmEr2.js.map +1 -0
  35. package/package.json +47 -50
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.js","sources":["../../../src/components/form-field/textarea.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { on } from '@ember/modifier';\nimport { useStyles } from '@frontile/theme';\n\nexport interface FormFieldTextareaArgs {\n id?: string;\n value?: string | number | boolean;\n size?: 'sm' | 'md' | 'lg';\n class?: string;\n\n // Callback when oninput is triggered\n onInput?: (value: string, event: InputEvent) => void;\n\n // Callback when onchange is triggered\n onChange?: (value: string, event: InputEvent) => void;\n}\n\nexport interface FormFieldTextareaSignature {\n Args: FormFieldTextareaArgs;\n Element: HTMLTextAreaElement;\n}\n\nexport default class FormFieldTextarea extends Component<FormFieldTextareaSignature> {\n @action handleOnInput(event: Event): void {\n if (typeof this.args.onInput === 'function') {\n this.args.onInput(\n (event.target as HTMLInputElement).value,\n event as InputEvent\n );\n }\n }\n\n @action handleOnChange(event: Event): void {\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(\n (event.target as HTMLInputElement).value,\n event as InputEvent\n );\n }\n }\n\n get classes() {\n const { textarea } = useStyles();\n\n return textarea({\n size: this.args.size\n }).input({\n class: this.args.class\n });\n }\n\n <template>\n <textarea\n {{on \"input\" this.handleOnInput}}\n {{on \"change\" this.handleOnChange}}\n id={{@id}}\n value={{@value}}\n class={{this.classes}}\n data-test-id=\"form-field-textarea\"\n ...attributes\n >\n </textarea>\n </template>\n}\n"],"names":["FormFieldTextarea","Component","handleOnInput","event","args","onInput","target","value","handleOnChange","onChange","classes","textarea","useStyles","size","input","class","setComponentTemplate","precompileTemplate","strictMode","scope","on","_FormFieldTextarea","_applyDecoratedDescriptor","_class","prototype","action","Object","getOwnPropertyDescriptor"],"mappings":";;;;;;;;;AAuBqBA,IAAAA,oDAAN,MAAMA,0BAA0BC,SAAU,CAAA;EAC/CC,aAAAA,CAAcC,KAAY,EAAQ;IACxC,IAAI,OAAO,IAAI,CAACC,IAAI,CAACC,OAAO,KAAK,UAAY,EAAA;AAC3C,MAAA,IAAI,CAACD,IAAI,CAACC,OAAO,CACdF,KAAM,CAAAG,MAAM,CAAsBC,KAAK,EACxCJ,KAAS,CAAA;AAEb;AACF;EAEQK,cAAAA,CAAeL,KAAY,EAAQ;IACzC,IAAI,OAAO,IAAI,CAACC,IAAI,CAACK,QAAQ,KAAK,UAAY,EAAA;AAC5C,MAAA,IAAI,CAACL,IAAI,CAACK,QAAQ,CACfN,KAAM,CAAAG,MAAM,CAAsBC,KAAK,EACxCJ,KAAS,CAAA;AAEb;AACF;EAEA,IAAIO,OAAUA,GAAA;IACZ,MAAM;AAAEC,MAAAA;KAAU,GAAGC,SAAA,EAAA;AAErB,IAAA,OAAOD,QAAS,CAAA;AACdE,MAAAA,IAAA,EAAM,IAAI,CAACT,IAAI,CAACS;KAClB,CAAA,CAAGC,KAAK,CAAC;AACPC,MAAAA,KAAA,EAAO,IAAI,CAACX,IAAI,CAACW;AACnB,KAAA,CAAA;AACF;AAcF,CAAA,EAAAC,oBAAA,CAZEC,kBAAA,CAWA,uNAAA,EAAA;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAC,kBAAA,CAAA,EAAAA,kBAAA,CAAAC,EAAAA,yBAAA,CAAAC,MAAA,CAAAC,SAAA,EAvCTC,eAAAA,EAAAA,CAAAA,MAAA,GAAAC,MAAA,CAAAC,wBAAA,CAAAJ,MAAA,CAAAC,SAAA,EAAAD,eAAAA,CAAAA,EAAAA,MAAA,CAAAC,SAAA,CAAA,EAAAF,yBAAA,CAAAC,MAAA,CAAAC,SAAA,EAAA,gBAAA,EAAA,CASAC,MAAA,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAJ,MAAA,CAAAC,SAAA,qBAAAD,MAAA,CAAAC,SAAA,CAAA,EAAAD,MAAA;;;;"}
1
+ {"version":3,"file":"textarea.js","sources":["../../../src/components/form-field/textarea.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { on } from '@ember/modifier';\nimport { useStyles } from '@frontile/theme';\n\nexport interface FormFieldTextareaArgs {\n id?: string;\n value?: string | number | boolean;\n size?: 'sm' | 'md' | 'lg';\n class?: string;\n\n // Callback when oninput is triggered\n onInput?: (value: string, event: InputEvent) => void;\n\n // Callback when onchange is triggered\n onChange?: (value: string, event: InputEvent) => void;\n}\n\nexport interface FormFieldTextareaSignature {\n Args: FormFieldTextareaArgs;\n Element: HTMLTextAreaElement;\n}\n\nexport default class FormFieldTextarea extends Component<FormFieldTextareaSignature> {\n @action handleOnInput(event: Event): void {\n if (typeof this.args.onInput === 'function') {\n this.args.onInput(\n (event.target as HTMLInputElement).value,\n event as InputEvent\n );\n }\n }\n\n @action handleOnChange(event: Event): void {\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(\n (event.target as HTMLInputElement).value,\n event as InputEvent\n );\n }\n }\n\n get classes() {\n const { textarea } = useStyles();\n\n return textarea({\n size: this.args.size\n }).input({\n class: this.args.class\n });\n }\n\n <template>\n <textarea\n {{on \"input\" this.handleOnInput}}\n {{on \"change\" this.handleOnChange}}\n id={{@id}}\n value={{@value}}\n class={{this.classes}}\n data-test-id=\"form-field-textarea\"\n ...attributes\n >\n </textarea>\n </template>\n}\n"],"names":["FormFieldTextarea","Component","handleOnInput","event","args","onInput","target","value","n","prototype","action","handleOnChange","onChange","classes","textarea","useStyles","size","input","class","setComponentTemplate","precompileTemplate","strictMode","scope","on"],"mappings":";;;;;;;;AAuBe,MAAMA,0BAA0BC,SAAU,CAAA;EAC/CC,aAAAA,CAAcC,KAAY,EAAQ;IACxC,IAAI,OAAO,IAAI,CAACC,IAAI,CAACC,OAAO,KAAK,UAAY,EAAA;AAC3C,MAAA,IAAI,CAACD,IAAI,CAACC,OAAO,CACdF,KAAM,CAAAG,MAAM,CAAsBC,KAAK,EACxCJ,KAAS,CAAA;AAEb;AACF;AAAA,EAAA;IAAAK,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,eAAA,EAAA,CAPCC,MAAA,CAAA,CAAA;AAAA;EASOC,cAAAA,CAAeR,KAAY,EAAQ;IACzC,IAAI,OAAO,IAAI,CAACC,IAAI,CAACQ,QAAQ,KAAK,UAAY,EAAA;AAC5C,MAAA,IAAI,CAACR,IAAI,CAACQ,QAAQ,CACfT,KAAM,CAAAG,MAAM,CAAsBC,KAAK,EACxCJ,KAAS,CAAA;AAEb;AACF;AAAA,EAAA;IAAAK,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,gBAAA,EAAA,CAPCC,MAAA,CAAA,CAAA;AAAA;EASD,IAAIG,OAAUA,GAAA;IACZ,MAAM;AAAEC,MAAAA;KAAU,GAAGC,SAAA,EAAA;AAErB,IAAA,OAAOD,QAAS,CAAA;AACdE,MAAAA,IAAA,EAAM,IAAI,CAACZ,IAAI,CAACY;KAClB,CAAA,CAAGC,KAAK,CAAC;AACPC,MAAAA,KAAA,EAAO,IAAI,CAACd,IAAI,CAACc;AACnB,KAAA,CAAA;AACF;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAWA,uNAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,4 +1,3 @@
1
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
1
  import Component from '@glimmer/component';
3
2
  import { guidFor } from '@ember/object/internals';
4
3
  import { hash } from '@ember/helper';
@@ -12,33 +11,30 @@ import FormFieldTextarea from './form-field/textarea.js';
12
11
  import { precompileTemplate } from '@ember/template-compilation';
13
12
  import { setComponentTemplate } from '@ember/component';
14
13
 
15
- var _FormField;
16
14
  class FormField extends Component {
17
- constructor(...args) {
18
- super(...args);
19
- _defineProperty(this, "id", guidFor(this));
20
- }
15
+ id = guidFor(this);
21
16
  get hintId() {
22
17
  return this.id + '-hint';
23
18
  }
24
19
  get feedbackId() {
25
20
  return this.id + '-feedback';
26
21
  }
22
+ static {
23
+ setComponentTemplate(precompileTemplate("\n <div ...attributes>\n {{yield (hash id=this.id hintId=this.hintId feedbackId=this.feedbackId Label=(component FormFieldLabel for=this.id size=@size) Hint=(component FormFieldHint id=this.hintId size=@size) Feedback=(component FormFieldFeedback id=this.feedbackId size=@size) Input=(component FormFieldInput id=this.id size=@size) Textarea=(component FormFieldTextarea id=this.id size=@size) Checkbox=(component FormFieldCheckbox id=this.id size=@size) Radio=(component FormFieldRadio id=this.id size=@size))}}\n </div>\n ", {
24
+ strictMode: true,
25
+ scope: () => ({
26
+ hash,
27
+ FormFieldLabel,
28
+ FormFieldHint,
29
+ FormFieldFeedback,
30
+ FormFieldInput,
31
+ FormFieldTextarea,
32
+ FormFieldCheckbox,
33
+ FormFieldRadio
34
+ })
35
+ }), this);
36
+ }
27
37
  }
28
- _FormField = FormField;
29
- setComponentTemplate(precompileTemplate("\n <div ...attributes>\n {{yield (hash id=this.id hintId=this.hintId feedbackId=this.feedbackId Label=(component FormFieldLabel for=this.id size=@size) Hint=(component FormFieldHint id=this.hintId size=@size) Feedback=(component FormFieldFeedback id=this.feedbackId size=@size) Input=(component FormFieldInput id=this.id size=@size) Textarea=(component FormFieldTextarea id=this.id size=@size) Checkbox=(component FormFieldCheckbox id=this.id size=@size) Radio=(component FormFieldRadio id=this.id size=@size))}}\n </div>\n ", {
30
- strictMode: true,
31
- scope: () => ({
32
- hash,
33
- FormFieldLabel,
34
- FormFieldHint,
35
- FormFieldFeedback,
36
- FormFieldInput,
37
- FormFieldTextarea,
38
- FormFieldCheckbox,
39
- FormFieldRadio
40
- })
41
- }), _FormField);
42
38
 
43
39
  export { FormField as default };
44
40
  //# sourceMappingURL=form-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.js","sources":["../../src/components/form-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { hash } from '@ember/helper';\nimport FormFieldCheckbox from './form-field/checkbox';\nimport FormFieldFeedback from './form-field/feedback';\nimport FormFieldHint from './form-field/hint';\nimport FormFieldInput from './form-field/input';\nimport FormFieldLabel from './form-field/label';\nimport FormFieldRadio from './form-field/radio';\nimport FormFieldTextarea from './form-field/textarea';\nimport type { WithBoundArgs } from '@glint/template';\n\nexport interface FormFieldArgs {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport interface FormFieldSignature {\n Args: FormFieldArgs;\n Blocks: {\n default: [\n {\n id: string;\n hintId: string;\n feedbackId: string;\n Label: WithBoundArgs<typeof FormFieldLabel, 'for'> &\n WithBoundArgs<typeof FormFieldLabel, 'size'>;\n Hint: WithBoundArgs<typeof FormFieldHint, 'id'> &\n WithBoundArgs<typeof FormFieldHint, 'size'>;\n Feedback: WithBoundArgs<typeof FormFieldFeedback, 'id'> &\n WithBoundArgs<typeof FormFieldFeedback, 'size'>;\n Input: WithBoundArgs<typeof FormFieldInput, 'id'> &\n WithBoundArgs<typeof FormFieldInput, 'size'>;\n Textarea: WithBoundArgs<typeof FormFieldTextarea, 'id'> &\n WithBoundArgs<typeof FormFieldTextarea, 'size'>;\n Checkbox: WithBoundArgs<typeof FormFieldCheckbox, 'id'> &\n WithBoundArgs<typeof FormFieldCheckbox, 'size'>;\n Radio: WithBoundArgs<typeof FormFieldRadio, 'id'> &\n WithBoundArgs<typeof FormFieldRadio, 'size'>;\n }\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class FormField extends Component<FormFieldSignature> {\n id = guidFor(this);\n\n get hintId(): string {\n return this.id + '-hint';\n }\n\n get feedbackId(): string {\n return this.id + '-feedback';\n }\n\n <template>\n <div ...attributes>\n {{yield\n (hash\n id=this.id\n hintId=this.hintId\n feedbackId=this.feedbackId\n Label=(component FormFieldLabel for=this.id size=@size)\n Hint=(component FormFieldHint id=this.hintId size=@size)\n Feedback=(component FormFieldFeedback id=this.feedbackId size=@size)\n Input=(component FormFieldInput id=this.id size=@size)\n Textarea=(component FormFieldTextarea id=this.id size=@size)\n Checkbox=(component FormFieldCheckbox id=this.id size=@size)\n Radio=(component FormFieldRadio id=this.id size=@size)\n )\n }}\n </div>\n </template>\n}\n"],"names":["FormField","Component","constructor","args","_defineProperty","guidFor","hintId","id","feedbackId","_FormField","setComponentTemplate","precompileTemplate","strictMode","scope","hash","FormFieldLabel","FormFieldHint","FormFieldFeedback","FormFieldInput","FormFieldTextarea","FormFieldCheckbox","FormFieldRadio"],"mappings":";;;;;;;;;;;;;;;AA4Ce,MAAMA,kBAAkBC,SAAU,CAAA;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,eAAA,CAC1CC,IAAAA,EAAAA,IAAAA,EAAAA,OAAA,CAAQ,IAAI,CAAE,CAAA;AAAA;EAEnB,IAAIC,MAAAA,GAAiB;AACnB,IAAA,OAAO,IAAI,CAACC,EAAE,GAAG,OAAA;AACnB;EAEA,IAAIC,UAAAA,GAAqB;AACvB,IAAA,OAAO,IAAI,CAACD,EAAE,GAAG,WAAA;AACnB;AAoBF;AAAAE,UAAA,GA7BqBT;AAWnBU,oBAAA,CAAAC,kBAAA,CAiBA,0hBAAA,EAAA;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;IAAAC,IAAA;IAAAC,cAAA;IAAAC,aAAA;IAAAC,iBAAA;IAAAC,cAAA;IAAAC,iBAAA;IAAAC,iBAAA;AAAAC,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAZ,UAAA,CAAA;;;;"}
1
+ {"version":3,"file":"form-field.js","sources":["../../src/components/form-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { hash } from '@ember/helper';\nimport FormFieldCheckbox from './form-field/checkbox';\nimport FormFieldFeedback from './form-field/feedback';\nimport FormFieldHint from './form-field/hint';\nimport FormFieldInput from './form-field/input';\nimport FormFieldLabel from './form-field/label';\nimport FormFieldRadio from './form-field/radio';\nimport FormFieldTextarea from './form-field/textarea';\nimport type { WithBoundArgs } from '@glint/template';\n\nexport interface FormFieldArgs {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport interface FormFieldSignature {\n Args: FormFieldArgs;\n Blocks: {\n default: [\n {\n id: string;\n hintId: string;\n feedbackId: string;\n Label: WithBoundArgs<typeof FormFieldLabel, 'for'> &\n WithBoundArgs<typeof FormFieldLabel, 'size'>;\n Hint: WithBoundArgs<typeof FormFieldHint, 'id'> &\n WithBoundArgs<typeof FormFieldHint, 'size'>;\n Feedback: WithBoundArgs<typeof FormFieldFeedback, 'id'> &\n WithBoundArgs<typeof FormFieldFeedback, 'size'>;\n Input: WithBoundArgs<typeof FormFieldInput, 'id'> &\n WithBoundArgs<typeof FormFieldInput, 'size'>;\n Textarea: WithBoundArgs<typeof FormFieldTextarea, 'id'> &\n WithBoundArgs<typeof FormFieldTextarea, 'size'>;\n Checkbox: WithBoundArgs<typeof FormFieldCheckbox, 'id'> &\n WithBoundArgs<typeof FormFieldCheckbox, 'size'>;\n Radio: WithBoundArgs<typeof FormFieldRadio, 'id'> &\n WithBoundArgs<typeof FormFieldRadio, 'size'>;\n }\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class FormField extends Component<FormFieldSignature> {\n id = guidFor(this);\n\n get hintId(): string {\n return this.id + '-hint';\n }\n\n get feedbackId(): string {\n return this.id + '-feedback';\n }\n\n <template>\n <div ...attributes>\n {{yield\n (hash\n id=this.id\n hintId=this.hintId\n feedbackId=this.feedbackId\n Label=(component FormFieldLabel for=this.id size=@size)\n Hint=(component FormFieldHint id=this.hintId size=@size)\n Feedback=(component FormFieldFeedback id=this.feedbackId size=@size)\n Input=(component FormFieldInput id=this.id size=@size)\n Textarea=(component FormFieldTextarea id=this.id size=@size)\n Checkbox=(component FormFieldCheckbox id=this.id size=@size)\n Radio=(component FormFieldRadio id=this.id size=@size)\n )\n }}\n </div>\n </template>\n}\n"],"names":["FormField","Component","id","guidFor","hintId","feedbackId","setComponentTemplate","precompileTemplate","strictMode","scope","hash","FormFieldLabel","FormFieldHint","FormFieldFeedback","FormFieldInput","FormFieldTextarea","FormFieldCheckbox","FormFieldRadio"],"mappings":";;;;;;;;;;;;;AA4Ce,MAAMA,kBAAkBC,SAAU,CAAA;AAC/CC,EAAAA,EAAK,GAAAC,OAAA,CAAQ,IAAI,CAAE;EAEnB,IAAIC,MAAAA,GAAiB;AACnB,IAAA,OAAO,IAAI,CAACF,EAAE,GAAG,OAAA;AACnB;EAEA,IAAIG,UAAAA,GAAqB;AACvB,IAAA,OAAO,IAAI,CAACH,EAAE,GAAG,WAAA;AACnB;AAEA,EAAA;IAAAI,oBAAA,CAAAC,kBAAA,CAiBA,0hBAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,IAAA;QAAAC,cAAA;QAAAC,aAAA;QAAAC,iBAAA;QAAAC,cAAA;QAAAC,iBAAA;QAAAC,iBAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,7 +1,3 @@
1
- import _initializerDefineProperty from '@babel/runtime/helpers/esm/initializerDefineProperty';
2
- import '@babel/runtime/helpers/esm/defineProperty';
3
- import _applyDecoratedDescriptor from '@babel/runtime/helpers/esm/applyDecoratedDescriptor';
4
- import '@babel/runtime/helpers/esm/initializerWarningHelper';
5
1
  import Component from '@glimmer/component';
6
2
  import { action } from '@ember/object';
7
3
  import { tracked } from '@glimmer/tracking';
@@ -11,13 +7,15 @@ import { useStyles } from '@frontile/theme';
11
7
  import FormField from './form-field.js';
12
8
  import { precompileTemplate } from '@ember/template-compilation';
13
9
  import { setComponentTemplate } from '@ember/component';
10
+ import { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMethodV2 } from '../runtime-BPCpkOf1-DV8zmEr2.js';
14
11
 
15
- var _class, _descriptor, _FormInput;
16
- let FormInputBase = (_class = class FormInputBase extends Component {
17
- constructor(...args) {
18
- super(...args);
19
- _initializerDefineProperty(this, "shouldShowErrorFeedback", _descriptor, this);
12
+ class FormInputBase extends Component {
13
+ static {
14
+ decorateFieldV2(this.prototype, "shouldShowErrorFeedback", [tracked], function () {
15
+ return false;
16
+ });
20
17
  }
18
+ #shouldShowErrorFeedback = (initializeDeferredDecorator(this, "shouldShowErrorFeedback"), undefined);
21
19
  get showErrorFeedback() {
22
20
  if (this.args.hasError === false) {
23
21
  return false;
@@ -34,20 +32,19 @@ let FormInputBase = (_class = class FormInputBase extends Component {
34
32
  this.args.onFocusIn(event);
35
33
  }
36
34
  }
35
+ static {
36
+ decorateMethodV2(this.prototype, "handleFocusIn", [action]);
37
+ }
37
38
  handleFocusOut(event) {
38
39
  this.shouldShowErrorFeedback = true;
39
40
  if (typeof this.args.onFocusOut === 'function') {
40
41
  this.args.onFocusOut(event);
41
42
  }
42
43
  }
43
- }, _descriptor = _applyDecoratedDescriptor(_class.prototype, "shouldShowErrorFeedback", [tracked], {
44
- configurable: true,
45
- enumerable: true,
46
- writable: true,
47
- initializer: function () {
48
- return false;
44
+ static {
45
+ decorateMethodV2(this.prototype, "handleFocusOut", [action]);
49
46
  }
50
- }), _applyDecoratedDescriptor(_class.prototype, "handleFocusIn", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleFocusIn"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "handleFocusOut", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleFocusOut"), _class.prototype), _class);
47
+ }
51
48
  class FormInput extends FormInputBase {
52
49
  get classes() {
53
50
  const {
@@ -74,16 +71,17 @@ class FormInput extends FormInputBase {
74
71
  feedback: feedback()
75
72
  };
76
73
  }
74
+ static {
75
+ setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n {{#if @label}}\n <f.Label @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n <f.Input {{on \"focus\" this.handleFocusIn}} {{on \"blur\" this.handleFocusOut}} @onInput={{@onInput}} @onChange={{@onChange}} @value={{@value}} @type={{@type}} @class={{this.classes.input}} aria-invalid={{if this.showErrorFeedback \"true\"}} aria-describedby=\"{{if @hint f.hintId}}{{if this.showErrorFeedback (concat \" \" f.feedbackId)}}\" ...attributes />\n\n {{yield}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n ", {
76
+ strictMode: true,
77
+ scope: () => ({
78
+ FormField,
79
+ concat,
80
+ on
81
+ })
82
+ }), this);
83
+ }
77
84
  }
78
- _FormInput = FormInput;
79
- setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n {{#if @label}}\n <f.Label @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n <f.Input {{on \"focus\" this.handleFocusIn}} {{on \"blur\" this.handleFocusOut}} @onInput={{@onInput}} @onChange={{@onChange}} @value={{@value}} @type={{@type}} @class={{this.classes.input}} aria-invalid={{if this.showErrorFeedback \"true\"}} aria-describedby=\"{{if @hint f.hintId}}{{if this.showErrorFeedback (concat \" \" f.feedbackId)}}\" ...attributes />\n\n {{yield}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n ", {
80
- strictMode: true,
81
- scope: () => ({
82
- FormField,
83
- concat,
84
- on
85
- })
86
- }), _FormInput);
87
85
 
88
86
  export { FormInputBase, FormInput as default };
89
87
  //# sourceMappingURL=form-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-input.js","sources":["../../src/components/form-input.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { concat } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { useStyles } from '@frontile/theme';\nimport FormField from './form-field';\n\nexport interface FormInputArgs {\n /**\n * The value to be used in the input.\n * You must also pass `onChange` or `onInput` to update its value.\n */\n value: string | undefined;\n\n /**\n * The input type\n * @defaultValue 'text'\n */\n type?: string;\n\n /** The group label */\n label?: string;\n /** A help text to be displayed */\n hint?: string;\n /** If the form has been submitted, used to force displaying errors */\n hasSubmitted?: boolean;\n /** If has errors */\n hasError?: boolean;\n /** Force displaying errors */\n showError?: boolean;\n /** A list of errors or a single text describing the error */\n errors?: string[] | string;\n /** CSS classes to be added in the container element */\n containerClass?: string;\n /** The size */\n size?: 'sm' | 'md' | 'lg';\n /** CSS classes to be added in the input element */\n inputClass?: string;\n\n /** Callback when oninput is triggered */\n onInput?: (value: string, event: InputEvent) => void;\n\n /** Callback when onchange is triggered */\n onChange?: (value: string, event: InputEvent) => void;\n\n /** Callback when onfocus is triggered */\n onFocusIn?: (event: FocusEvent) => void;\n\n /** Callback when onblur is triggered */\n onFocusOut?: (event: FocusEvent) => void;\n}\n\nexport interface FormInputBaseSignature {\n Args: FormInputArgs;\n}\n\nexport interface FormInputSignature extends FormInputBaseSignature {\n Element: HTMLInputElement;\n Blocks: {\n default: [];\n };\n}\n\nexport class FormInputBase<\n T extends FormInputBaseSignature\n> extends Component<T> {\n @tracked shouldShowErrorFeedback = false;\n\n get showErrorFeedback(): boolean {\n if (this.args.hasError === false) {\n return false;\n }\n\n if (\n (this.args.showError ||\n this.args.hasSubmitted ||\n this.shouldShowErrorFeedback) &&\n this.args.errors &&\n this.args.errors.length > 0\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n @action handleFocusIn(event: FocusEvent): void {\n this.shouldShowErrorFeedback = false;\n\n if (typeof this.args.onFocusIn === 'function') {\n this.args.onFocusIn(event);\n }\n }\n\n @action handleFocusOut(event: FocusEvent): void {\n this.shouldShowErrorFeedback = true;\n\n if (typeof this.args.onFocusOut === 'function') {\n this.args.onFocusOut(event);\n }\n }\n}\n\nexport default class FormInput extends FormInputBase<FormInputSignature> {\n get classes() {\n const { formInput } = useStyles();\n\n const { base, label, input, hint, feedback } = formInput({\n size: this.args.size\n });\n\n return {\n base: base({\n class: this.args.containerClass\n }),\n label: label(),\n input: input({ class: this.args.inputClass }),\n hint: hint(),\n feedback: feedback()\n };\n }\n\n <template>\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n {{#if @label}}\n <f.Label @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n <f.Input\n {{on \"focus\" this.handleFocusIn}}\n {{on \"blur\" this.handleFocusOut}}\n @onInput={{@onInput}}\n @onChange={{@onChange}}\n @value={{@value}}\n @type={{@type}}\n @class={{this.classes.input}}\n aria-invalid={{if this.showErrorFeedback \"true\"}}\n aria-describedby=\"{{if @hint f.hintId}}{{if\n this.showErrorFeedback\n (concat ' ' f.feedbackId)\n }}\"\n ...attributes\n />\n\n {{yield}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n </template>\n}\n"],"names":["FormInputBase","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","showErrorFeedback","hasError","showError","hasSubmitted","shouldShowErrorFeedback","errors","length","handleFocusIn","event","onFocusIn","handleFocusOut","onFocusOut","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","FormInput","classes","formInput","useStyles","base","label","input","hint","feedback","size","class","containerClass","inputClass","_FormInput","setComponentTemplate","precompileTemplate","strictMode","scope","FormField","concat","on"],"mappings":";;;;;;;;;;;;;;;AAgEaA,IAAAA,aAAA,IAAAC,MAAA,GAAN,MAAMD,aAAA,SAEHE,SAAU,CA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U,CAAA,CAAA,EAAAP,UAAA,CAAA;;;;"}
1
+ {"version":3,"file":"form-input.js","sources":["../../src/components/form-input.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { concat } from '@ember/helper';\nimport { on } from '@ember/modifier';\nimport { useStyles } from '@frontile/theme';\nimport FormField from './form-field';\n\nexport interface FormInputArgs {\n /**\n * The value to be used in the input.\n * You must also pass `onChange` or `onInput` to update its value.\n */\n value: string | undefined;\n\n /**\n * The input type\n * @defaultValue 'text'\n */\n type?: string;\n\n /** The group label */\n label?: string;\n /** A help text to be displayed */\n hint?: string;\n /** If the form has been submitted, used to force displaying errors */\n hasSubmitted?: boolean;\n /** If has errors */\n hasError?: boolean;\n /** Force displaying errors */\n showError?: boolean;\n /** A list of errors or a single text describing the error */\n errors?: string[] | string;\n /** CSS classes to be added in the container element */\n containerClass?: string;\n /** The size */\n size?: 'sm' | 'md' | 'lg';\n /** CSS classes to be added in the input element */\n inputClass?: string;\n\n /** Callback when oninput is triggered */\n onInput?: (value: string, event: InputEvent) => void;\n\n /** Callback when onchange is triggered */\n onChange?: (value: string, event: InputEvent) => void;\n\n /** Callback when onfocus is triggered */\n onFocusIn?: (event: FocusEvent) => void;\n\n /** Callback when onblur is triggered */\n onFocusOut?: (event: FocusEvent) => void;\n}\n\nexport interface FormInputBaseSignature {\n Args: FormInputArgs;\n}\n\nexport interface FormInputSignature extends FormInputBaseSignature {\n Element: HTMLInputElement;\n Blocks: {\n default: [];\n };\n}\n\nexport class FormInputBase<\n T extends FormInputBaseSignature\n> extends Component<T> {\n @tracked shouldShowErrorFeedback = false;\n\n get showErrorFeedback(): boolean {\n if (this.args.hasError === false) {\n return false;\n }\n\n if (\n (this.args.showError ||\n this.args.hasSubmitted ||\n this.shouldShowErrorFeedback) &&\n this.args.errors &&\n this.args.errors.length > 0\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n @action handleFocusIn(event: FocusEvent): void {\n this.shouldShowErrorFeedback = false;\n\n if (typeof this.args.onFocusIn === 'function') {\n this.args.onFocusIn(event);\n }\n }\n\n @action handleFocusOut(event: FocusEvent): void {\n this.shouldShowErrorFeedback = true;\n\n if (typeof this.args.onFocusOut === 'function') {\n this.args.onFocusOut(event);\n }\n }\n}\n\nexport default class FormInput extends FormInputBase<FormInputSignature> {\n get classes() {\n const { formInput } = useStyles();\n\n const { base, label, input, hint, feedback } = formInput({\n size: this.args.size\n });\n\n return {\n base: base({\n class: this.args.containerClass\n }),\n label: label(),\n input: input({ class: this.args.inputClass }),\n hint: hint(),\n feedback: feedback()\n };\n }\n\n <template>\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n {{#if @label}}\n <f.Label @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n <f.Input\n {{on \"focus\" this.handleFocusIn}}\n {{on \"blur\" this.handleFocusOut}}\n @onInput={{@onInput}}\n @onChange={{@onChange}}\n @value={{@value}}\n @type={{@type}}\n @class={{this.classes.input}}\n aria-invalid={{if this.showErrorFeedback \"true\"}}\n aria-describedby=\"{{if @hint f.hintId}}{{if\n this.showErrorFeedback\n (concat ' ' f.feedbackId)\n }}\"\n ...attributes\n />\n\n {{yield}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n </template>\n}\n"],"names":["FormInputBase","Component","g","prototype","tracked","i","void 0","showErrorFeedback","args","hasError","showError","hasSubmitted","shouldShowErrorFeedback","errors","length","handleFocusIn","event","onFocusIn","n","action","handleFocusOut","onFocusOut","FormInput","classes","formInput","useStyles","base","label","input","hint","feedback","size","class","containerClass","inputClass","setComponentTemplate","precompileTemplate","strictMode","scope","FormField","concat","on"],"mappings":";;;;;;;;;;;AAgEO,MAAMA,aAAA,SAEHC,SAAU,CAAA;AAAA,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,EAAA,gBAAA,EAAA,CANCgB,MAAA,CAAA,CAAA;AAAA;AAOH;AAEe,MAAMG,kBAAkBtB,aAAc,CAAA;EACnD,IAAIuB,OAAUA,GAAA;IACZ,MAAM;AAAEC,MAAAA;KAAW,GAAGC,SAAA,EAAA;IAEtB,MAAM;MAAEC,IAAI;MAAEC,KAAK;MAAEC,KAAK;MAAEC,IAAI;AAAEC,MAAAA;KAAU,GAAGN,SAAU,CAAA;AACvDO,MAAAA,IAAA,EAAM,IAAI,CAACvB,IAAI,CAACuB;AAClB,KAAA,CAAA;IAEA,OAAO;MACLL,IAAA,EAAMA,IAAK,CAAA;AACTM,QAAAA,KAAA,EAAO,IAAI,CAACxB,IAAI,CAACyB;AACnB,OAAA,CAAA;MACAN,KAAO,EAAAA,KAAA,EAAA;MACPC,KAAA,EAAOA,KAAM,CAAA;AAAEI,QAAAA,KAAA,EAAO,IAAI,CAACxB,IAAI,CAAC0B;AAAW,OAAA,CAAA;MAC3CL,IAAM,EAAAA,IAAA,EAAA;MACNC,QAAU,EAAAA,QAAA;KACZ;AACF;AAEA,EAAA;IAAAK,oBAAA,CAAAC,kBAAA,CAoCA,i2BAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,SAAA;QAAAC,MAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,7 +1,3 @@
1
- import _initializerDefineProperty from '@babel/runtime/helpers/esm/initializerDefineProperty';
2
- import '@babel/runtime/helpers/esm/defineProperty';
3
- import _applyDecoratedDescriptor from '@babel/runtime/helpers/esm/applyDecoratedDescriptor';
4
- import '@babel/runtime/helpers/esm/initializerWarningHelper';
5
1
  import Component from '@glimmer/component';
6
2
  import { action } from '@ember/object';
7
3
  import { tracked } from '@glimmer/tracking';
@@ -11,13 +7,15 @@ import FormField from './form-field.js';
11
7
  import { useStyles } from '@frontile/theme';
12
8
  import { precompileTemplate } from '@ember/template-compilation';
13
9
  import { setComponentTemplate } from '@ember/component';
10
+ import { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMethodV2 } from '../runtime-BPCpkOf1-DV8zmEr2.js';
14
11
 
15
- var _class, _descriptor, _FormRadioGroup;
16
- let FormRadioGroup = (_class = (_FormRadioGroup = class FormRadioGroup extends Component {
17
- constructor(...args) {
18
- super(...args);
19
- _initializerDefineProperty(this, "shouldShowErrorFeedback", _descriptor, this);
12
+ class FormRadioGroup extends Component {
13
+ static {
14
+ decorateFieldV2(this.prototype, "shouldShowErrorFeedback", [tracked], function () {
15
+ return false;
16
+ });
20
17
  }
18
+ #shouldShowErrorFeedback = (initializeDeferredDecorator(this, "shouldShowErrorFeedback"), undefined);
21
19
  get showErrorFeedback() {
22
20
  if (this.args.hasError === false) {
23
21
  return false;
@@ -34,6 +32,9 @@ let FormRadioGroup = (_class = (_FormRadioGroup = class FormRadioGroup extends C
34
32
  this.args.onChange(value, event);
35
33
  }
36
34
  }
35
+ static {
36
+ decorateMethodV2(this.prototype, "handleChange", [action]);
37
+ }
37
38
  get classes() {
38
39
  const {
39
40
  formRadioGroup
@@ -57,21 +58,17 @@ let FormRadioGroup = (_class = (_FormRadioGroup = class FormRadioGroup extends C
57
58
  formRadio: formRadio()
58
59
  };
59
60
  }
60
- }, setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{this.classes.base}} role=\"radiogroup\" ...attributes as |f|>\n {{#if @label}}\n <f.Label @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n {{yield (component FormRadio checked=@value privateContainerClass=this.classes.formRadio _parentOnChange=this.handleChange size=@size name=(concat f.id \"-radio-group\"))}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n ", {
61
- strictMode: true,
62
- scope: () => ({
63
- FormField,
64
- FormRadio,
65
- concat
66
- })
67
- }), _FormRadioGroup), _FormRadioGroup), _descriptor = _applyDecoratedDescriptor(_class.prototype, "shouldShowErrorFeedback", [tracked], {
68
- configurable: true,
69
- enumerable: true,
70
- writable: true,
71
- initializer: function () {
72
- return false;
61
+ static {
62
+ setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{this.classes.base}} role=\"radiogroup\" ...attributes as |f|>\n {{#if @label}}\n <f.Label @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n {{yield (component FormRadio checked=@value privateContainerClass=this.classes.formRadio _parentOnChange=this.handleChange size=@size name=(concat f.id \"-radio-group\"))}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n ", {
63
+ strictMode: true,
64
+ scope: () => ({
65
+ FormField,
66
+ FormRadio,
67
+ concat
68
+ })
69
+ }), this);
73
70
  }
74
- }), _applyDecoratedDescriptor(_class.prototype, "handleChange", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleChange"), _class.prototype), _class);
71
+ }
75
72
 
76
73
  export { FormRadioGroup as default };
77
74
  //# sourceMappingURL=form-radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-radio-group.js","sources":["../../src/components/form-radio-group.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { concat } from '@ember/helper';\nimport FormRadio from './form-radio';\nimport FormField from './form-field';\nimport { useStyles } from '@frontile/theme';\nimport type { WithBoundArgs } from '@glint/template';\n\nexport interface FormRadioGroupArgs {\n value: string | number | boolean | undefined;\n /** The group label */\n label?: string;\n /** A help text to be displayed */\n hint?: string;\n /** If the form has been submitted, used to force displaying errors */\n hasSubmitted?: boolean;\n /** If has errors */\n hasError?: boolean;\n /** Force displaying errors */\n showError?: boolean;\n /** A list of errors or a single text describing the error */\n errors?: string[] | string;\n /** CSS classes to be added in the container element */\n containerClass?: string;\n /** The size */\n size?: 'sm' | 'md' | 'lg';\n /** If the Checkbox should be in one line */\n isInline?: boolean;\n\n /** Default callback added to the yielded FormRadio component, called when onchange is triggered */\n onChange?: (value: unknown, event: Event) => void;\n}\n\nexport interface FormRadioGroupSignature {\n Args: FormRadioGroupArgs;\n Blocks: {\n default: [\n radio: WithBoundArgs<typeof FormRadio, 'checked'> &\n WithBoundArgs<typeof FormRadio, 'privateContainerClass'> &\n WithBoundArgs<typeof FormRadio, '_parentOnChange'> &\n WithBoundArgs<typeof FormRadio, 'size'> &\n WithBoundArgs<typeof FormRadio, 'name'>\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class FormRadioGroup extends Component<FormRadioGroupSignature> {\n @tracked shouldShowErrorFeedback = false;\n\n get showErrorFeedback(): boolean {\n if (this.args.hasError === false) {\n return false;\n }\n\n if (\n (this.args.showError ||\n this.args.hasSubmitted ||\n this.shouldShowErrorFeedback) &&\n this.args.errors &&\n this.args.errors.length > 0\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n @action handleChange(value: unknown, event: Event): void {\n this.shouldShowErrorFeedback = true;\n\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(value, event);\n }\n }\n\n get classes() {\n const { formRadioGroup } = useStyles();\n const { base, label, formRadio, hint, feedback } = formRadioGroup({\n isInline: this.args.isInline\n });\n\n return {\n base: base({\n class: this.args.containerClass\n }),\n label: label(),\n hint: hint(),\n feedback: feedback(),\n formRadio: formRadio()\n };\n }\n\n <template>\n <FormField\n @size={{@size}}\n class={{this.classes.base}}\n role=\"radiogroup\"\n ...attributes\n as |f|\n >\n {{#if @label}}\n <f.Label @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n {{yield\n (component\n FormRadio\n checked=@value\n privateContainerClass=this.classes.formRadio\n _parentOnChange=this.handleChange\n size=@size\n name=(concat f.id \"-radio-group\")\n )\n }}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n </template>\n}\n"],"names":["FormRadioGroup","Component","constructor","args","_initializerDefineProperty","_descriptor","showErrorFeedback","hasError","showError","hasSubmitted","shouldShowErrorFeedback","errors","length","handleChange","value","event","onChange","classes","formRadioGroup","useStyles","base","label","formRadio","hint","feedback","isInline","class","containerClass","setComponentTemplate","precompileTemplate","strictMode","scope","FormField","FormRadio","concat","_FormRadioGroup","_applyDecoratedDescriptor","_class","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor"],"mappings":";;;;;;;;;;;;;;;AAgDqBA,IAAAA,8CAAN,MAAMA,uBAAuBC,SAAU,CAAA;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,0BAAA,kCAAAC,WAAA,EAAA,IAAA,CAAA;AAAA;EAGpD,IAAIC,iBAAAA,GAA6B;AAC/B,IAAA,IAAI,IAAI,CAACH,IAAI,CAACI,QAAQ,KAAK,KAAO,EAAA;AAChC,MAAA,OAAO,KAAA;AACT;AAEA,IAAA,IACE,CAAC,IAAI,CAACJ,IAAI,CAACK,SAAS,IAClB,IAAI,CAACL,IAAI,CAACM,YAAY,IACtB,IAAI,CAACC,uBAAuB,KAC9B,IAAI,CAACP,IAAI,CAACQ,MAAM,IAChB,IAAI,CAACR,IAAI,CAACQ,MAAM,CAACC,MAAM,GAAG,CAC1B,EAAA;AACA,MAAA,OAAO,IAAA;AACT,KAAO,MAAA;AACL,MAAA,OAAO,KAAA;AACT;AACF;AAEQC,EAAAA,YAAAA,CAAaC,KAAc,EAAEC,KAAY,EAAQ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AAA,GAAAC,MAAA,CAAAC,wBAAA,CAAAT,MAAA,CAAAC,SAAA,EAAA,cAAA,CAAA,EAAAD,MAAA,CAAAC,SAAA,GAAAD,MAAA;;;;"}
1
+ {"version":3,"file":"form-radio-group.js","sources":["../../src/components/form-radio-group.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { concat } from '@ember/helper';\nimport FormRadio from './form-radio';\nimport FormField from './form-field';\nimport { useStyles } from '@frontile/theme';\nimport type { WithBoundArgs } from '@glint/template';\n\nexport interface FormRadioGroupArgs {\n value: string | number | boolean | undefined;\n /** The group label */\n label?: string;\n /** A help text to be displayed */\n hint?: string;\n /** If the form has been submitted, used to force displaying errors */\n hasSubmitted?: boolean;\n /** If has errors */\n hasError?: boolean;\n /** Force displaying errors */\n showError?: boolean;\n /** A list of errors or a single text describing the error */\n errors?: string[] | string;\n /** CSS classes to be added in the container element */\n containerClass?: string;\n /** The size */\n size?: 'sm' | 'md' | 'lg';\n /** If the Checkbox should be in one line */\n isInline?: boolean;\n\n /** Default callback added to the yielded FormRadio component, called when onchange is triggered */\n onChange?: (value: unknown, event: Event) => void;\n}\n\nexport interface FormRadioGroupSignature {\n Args: FormRadioGroupArgs;\n Blocks: {\n default: [\n radio: WithBoundArgs<typeof FormRadio, 'checked'> &\n WithBoundArgs<typeof FormRadio, 'privateContainerClass'> &\n WithBoundArgs<typeof FormRadio, '_parentOnChange'> &\n WithBoundArgs<typeof FormRadio, 'size'> &\n WithBoundArgs<typeof FormRadio, 'name'>\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class FormRadioGroup extends Component<FormRadioGroupSignature> {\n @tracked shouldShowErrorFeedback = false;\n\n get showErrorFeedback(): boolean {\n if (this.args.hasError === false) {\n return false;\n }\n\n if (\n (this.args.showError ||\n this.args.hasSubmitted ||\n this.shouldShowErrorFeedback) &&\n this.args.errors &&\n this.args.errors.length > 0\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n @action handleChange(value: unknown, event: Event): void {\n this.shouldShowErrorFeedback = true;\n\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(value, event);\n }\n }\n\n get classes() {\n const { formRadioGroup } = useStyles();\n const { base, label, formRadio, hint, feedback } = formRadioGroup({\n isInline: this.args.isInline\n });\n\n return {\n base: base({\n class: this.args.containerClass\n }),\n label: label(),\n hint: hint(),\n feedback: feedback(),\n formRadio: formRadio()\n };\n }\n\n <template>\n <FormField\n @size={{@size}}\n class={{this.classes.base}}\n role=\"radiogroup\"\n ...attributes\n as |f|\n >\n {{#if @label}}\n <f.Label @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n {{yield\n (component\n FormRadio\n checked=@value\n privateContainerClass=this.classes.formRadio\n _parentOnChange=this.handleChange\n size=@size\n name=(concat f.id \"-radio-group\")\n )\n }}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n </template>\n}\n"],"names":["FormRadioGroup","Component","g","prototype","tracked","i","void 0","showErrorFeedback","args","hasError","showError","hasSubmitted","shouldShowErrorFeedback","errors","length","handleChange","value","event","onChange","n","action","classes","formRadioGroup","useStyles","base","label","formRadio","hint","feedback","isInline","class","containerClass","setComponentTemplate","precompileTemplate","strictMode","scope","FormField","FormRadio","concat"],"mappings":";;;;;;;;;;;AAgDe,MAAMA,uBAAuBC,SAAU,CAAA;AAAA,EAAA;IAAAC,eAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,yBAAA,EAAA,CACnDC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAkC,KAAM;AAAA,KAAA,CAAA;AAAA;AAAA,EAAA,wBAAA,IAAAC,2BAAA,CAAA,IAAA,EAAA,yBAAA,CAAA,EAAAC,SAAA;EAEzC,IAAIC,iBAAAA,G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;KACb;AACF;AAEA,EAAA;IAAAM,oBAAA,CAAAC,kBAAA,CAoCA,urBAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,SAAA;QAAAC,SAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,13 +1,12 @@
1
- import _applyDecoratedDescriptor from '@babel/runtime/helpers/esm/applyDecoratedDescriptor';
2
1
  import Component from '@glimmer/component';
3
2
  import { action } from '@ember/object';
4
3
  import FormField from './form-field.js';
5
4
  import { useStyles } from '@frontile/theme';
6
5
  import { precompileTemplate } from '@ember/template-compilation';
7
6
  import { setComponentTemplate } from '@ember/component';
7
+ import { a as decorateMethodV2 } from '../runtime-BPCpkOf1-DV8zmEr2.js';
8
8
 
9
- var _class, _FormRadio;
10
- let FormRadio = (_class = (_FormRadio = class FormRadio extends Component {
9
+ class FormRadio extends Component {
11
10
  handleChange(value, event) {
12
11
  event.preventDefault();
13
12
  if (typeof this.args.onChange === 'function') {
@@ -17,6 +16,9 @@ let FormRadio = (_class = (_FormRadio = class FormRadio extends Component {
17
16
  this.args._parentOnChange(value, event);
18
17
  }
19
18
  }
19
+ static {
20
+ decorateMethodV2(this.prototype, "handleChange", [action]);
21
+ }
20
22
  get isChecked() {
21
23
  return this.args.checked == this.args.value;
22
24
  }
@@ -52,12 +54,15 @@ let FormRadio = (_class = (_FormRadio = class FormRadio extends Component {
52
54
  radio: radio()
53
55
  };
54
56
  }
55
- }, setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n <div class={{this.classes.labelContainer}}>\n <div class={{this.classes.inputContainer}}>\n {{!-- Zero-width space character, used to align checkbox properly --}}\n {{!-- eslint-disable no-irregular-whitespace--}}\n \u200B\n <f.Radio @onChange={{this.handleChange}} @value={{@value}} @checked={{@checked}} @name={{@name}} @class={{this.classes.radio}} aria-describedby={{if @hint f.hintId}} ...attributes />\n </div>\n\n <f.Label @class={{this.classes.label}}>\n {{#if (has-block)}}\n {{yield}}\n {{else}}\n {{@label}}\n {{/if}}\n </f.Label>\n </div>\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n </FormField>\n ", {
56
- strictMode: true,
57
- scope: () => ({
58
- FormField
59
- })
60
- }), _FormRadio), _FormRadio), _applyDecoratedDescriptor(_class.prototype, "handleChange", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleChange"), _class.prototype), _class);
57
+ static {
58
+ setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n <div class={{this.classes.labelContainer}}>\n <div class={{this.classes.inputContainer}}>\n {{!-- Zero-width space character, used to align checkbox properly --}}\n {{!-- eslint-disable no-irregular-whitespace--}}\n \u200B\n <f.Radio @onChange={{this.handleChange}} @value={{@value}} @checked={{@checked}} @name={{@name}} @class={{this.classes.radio}} aria-describedby={{if @hint f.hintId}} ...attributes />\n </div>\n\n <f.Label @class={{this.classes.label}}>\n {{#if (has-block)}}\n {{yield}}\n {{else}}\n {{@label}}\n {{/if}}\n </f.Label>\n </div>\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n </FormField>\n ", {
59
+ strictMode: true,
60
+ scope: () => ({
61
+ FormField
62
+ })
63
+ }), this);
64
+ }
65
+ }
61
66
 
62
67
  export { FormRadio as default };
63
68
  //# sourceMappingURL=form-radio.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-radio.js","sources":["../../src/components/form-radio.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport FormField from './form-field';\nimport { useStyles } from '@frontile/theme';\n\nexport interface FormRadioArgs {\n /** The input field label */\n label?: string;\n /** A help text to be displayed */\n hint?: string;\n /**\n * The value to be used in the radio button.\n * You must also pass `onChange` to update its value.\n */\n value: string | number | boolean | undefined;\n /**\n * The current checked value.\n * This will be used to compare against the `value` argument,\n * if equal, the radio will me marked as checked.\n */\n checked: unknown;\n /** The name of the checkbox */\n name?: string;\n /** CSS classes to be added in the container element */\n containerClass?: string;\n /** The size */\n size?: 'sm' | 'md' | 'lg';\n /** Callback when onchange is triggered */\n onChange: (value: unknown, event: Event) => void;\n\n /**\n * Internal function for InputRadioGroup\n * @ignore\n **/\n _parentOnChange?: (value: unknown, event: Event) => void;\n\n /** CSS classes to be added in the container element, in be used in for group\n * @ignore*/\n privateContainerClass?: string;\n}\n\nexport interface FormRadioSignature {\n Args: FormRadioArgs;\n Element: HTMLInputElement;\n Blocks: {\n default: [];\n };\n}\n\nexport default class FormRadio extends Component<FormRadioSignature> {\n @action handleChange(value: unknown, event: Event): void {\n event.preventDefault();\n\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(value, event);\n }\n\n if (typeof this.args._parentOnChange === 'function') {\n this.args._parentOnChange(value, event);\n }\n }\n\n get isChecked(): boolean {\n return this.args.checked == this.args.value;\n }\n\n get classes() {\n const { formRadio } = useStyles();\n\n const { base, label, radio, hint, labelContainer, inputContainer } =\n formRadio({\n size: this.args.size\n });\n\n let containerClasses = '';\n if (this.args.containerClass) {\n containerClasses = this.args.containerClass;\n }\n if (this.args.privateContainerClass) {\n containerClasses += ' ' + this.args.privateContainerClass;\n }\n\n return {\n base: base({\n class: containerClasses\n }),\n label: label(),\n inputContainer: inputContainer(),\n labelContainer: labelContainer(),\n hint: hint(),\n radio: radio()\n };\n }\n\n <template>\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n <div class={{this.classes.labelContainer}}>\n <div class={{this.classes.inputContainer}}>\n {{! Zero-width space character, used to align checkbox properly }}\n {{! eslint-disable no-irregular-whitespace}}\n ​\n <f.Radio\n @onChange={{this.handleChange}}\n @value={{@value}}\n @checked={{@checked}}\n @name={{@name}}\n @class={{this.classes.radio}}\n aria-describedby={{if @hint f.hintId}}\n ...attributes\n />\n </div>\n\n <f.Label @class={{this.classes.label}}>\n {{#if (has-block)}}\n {{yield}}\n {{else}}\n {{@label}}\n {{/if}}\n </f.Label>\n </div>\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n </FormField>\n </template>\n}\n"],"names":["FormRadio","Component","handleChange","value","event","preventDefault","args","onChange","_parentOnChange","isChecked","checked","classes","formRadio","useStyles","base","label","radio","hint","labelContainer","inputContainer","size","containerClasses","containerClass","privateContainerClass","class","setComponentTemplate","precompileTemplate","strictMode","scope","FormField","_FormRadio","_applyDecoratedDescriptor","_class","prototype","action","Object","getOwnPropertyDescriptor"],"mappings":";;;;;;;;;AAiDqBA,IAAAA,oCAAN,MAAMA,kBAAkBC,SAAU,CAAA;AACvCC,EAAAA,YAAAA,CAAaC,KAAc,EAAEC,KAAY,EAAQ;IACvDA,KAAA,CAAMC,cAAc,EAAA;IAEpB,IAAI,OAAO,IAAI,CAACC,IAAI,CAACC,QAAQ,KAAK,UAAY,EAAA;MAC5C,IAAI,CAACD,IAAI,CAACC,QAAQ,CAACJ,KAAO,EAAAC,KAAA,CAAA;AAC5B;IAEA,IAAI,OAAO,IAAI,CAACE,IAAI,CAACE,eAAe,KAAK,UAAY,EAAA;MACnD,IAAI,CAACF,IAAI,CAACE,eAAe,CAACL,KAAO,EAAAC,KAAA,CAAA;AACnC;AACF;EAEA,IAAIK,SAAAA,GAAqB;IACvB,OAAO,IAAI,CAACH,IAAI,CAACI,OAAO,IAAI,IAAI,CAACJ,IAAI,CAACH,KAAK;AAC7C;EAEA,IAAIQ,OAAUA,GAAA;IACZ,MAAM;AAAEC,MAAAA;KAAW,GAAGC,SAAA,EAAA;IAEtB,MAAM;MAAEC,IAAI;MAAEC,KAAK;MAAEC,KAAK;MAAEC,IAAI;MAAEC,cAAc;AAAEC,MAAAA;KAAgB,GAChEP,SAAU,CAAA;AACRQ,MAAAA,IAAA,EAAM,IAAI,CAACd,IAAI,CAACc;AAClB,KAAA,CAAA;IAEF,IAAIC,gBAAmB,GAAA,EAAA;AACvB,IAAA,IAAI,IAAI,CAACf,IAAI,CAACgB,cAAc,EAAE;AAC5BD,MAAAA,gBAAA,GAAmB,IAAI,CAACf,IAAI,CAACgB,cAAc;AAC7C;AACA,IAAA,IAAI,IAAI,CAAChB,IAAI,CAACiB,qBAAqB,EAAE;AACnCF,MAAAA,gBAAA,IAAoB,GAAM,GAAA,IAAI,CAACf,IAAI,CAACiB,qBAAqB;AAC3D;IAEA,OAAO;MACLT,IAAA,EAAMA,IAAK,CAAA;AACTU,QAAAA,KAAO,EAAAH;AACT,OAAA,CAAA;MACAN,KAAO,EAAAA,KAAA,EAAA;MACPI,cAAgB,EAAAA,cAAA,EAAA;MAChBD,cAAgB,EAAAA,cAAA,EAAA;MAChBD,IAAM,EAAAA,IAAA,EAAA;MACND,KAAO,EAAAA,KAAA;KACT;AACF;AAoCF,CAAA,EAAAS,oBAAA,CAlCEC,kBAAA,CAiCA,83BAAA,EAAA;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAC,UAAA,CAAAA,EAAAA,UAAA,CAAAC,EAAAA,yBAAA,CAAAC,MAAA,CAAAC,SAAA,EA7ETC,cAAAA,EAAAA,CAAAA,MAAA,GAAAC,MAAA,CAAAC,wBAAA,CAAAJ,MAAA,CAAAC,SAAA,EAAA,cAAA,CAAA,EAAAD,MAAA,CAAAC,SAAA,CAAA,EAAAD,MAAA;;;;"}
1
+ {"version":3,"file":"form-radio.js","sources":["../../src/components/form-radio.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport FormField from './form-field';\nimport { useStyles } from '@frontile/theme';\n\nexport interface FormRadioArgs {\n /** The input field label */\n label?: string;\n /** A help text to be displayed */\n hint?: string;\n /**\n * The value to be used in the radio button.\n * You must also pass `onChange` to update its value.\n */\n value: string | number | boolean | undefined;\n /**\n * The current checked value.\n * This will be used to compare against the `value` argument,\n * if equal, the radio will me marked as checked.\n */\n checked: unknown;\n /** The name of the checkbox */\n name?: string;\n /** CSS classes to be added in the container element */\n containerClass?: string;\n /** The size */\n size?: 'sm' | 'md' | 'lg';\n /** Callback when onchange is triggered */\n onChange: (value: unknown, event: Event) => void;\n\n /**\n * Internal function for InputRadioGroup\n * @ignore\n **/\n _parentOnChange?: (value: unknown, event: Event) => void;\n\n /** CSS classes to be added in the container element, in be used in for group\n * @ignore*/\n privateContainerClass?: string;\n}\n\nexport interface FormRadioSignature {\n Args: FormRadioArgs;\n Element: HTMLInputElement;\n Blocks: {\n default: [];\n };\n}\n\nexport default class FormRadio extends Component<FormRadioSignature> {\n @action handleChange(value: unknown, event: Event): void {\n event.preventDefault();\n\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(value, event);\n }\n\n if (typeof this.args._parentOnChange === 'function') {\n this.args._parentOnChange(value, event);\n }\n }\n\n get isChecked(): boolean {\n return this.args.checked == this.args.value;\n }\n\n get classes() {\n const { formRadio } = useStyles();\n\n const { base, label, radio, hint, labelContainer, inputContainer } =\n formRadio({\n size: this.args.size\n });\n\n let containerClasses = '';\n if (this.args.containerClass) {\n containerClasses = this.args.containerClass;\n }\n if (this.args.privateContainerClass) {\n containerClasses += ' ' + this.args.privateContainerClass;\n }\n\n return {\n base: base({\n class: containerClasses\n }),\n label: label(),\n inputContainer: inputContainer(),\n labelContainer: labelContainer(),\n hint: hint(),\n radio: radio()\n };\n }\n\n <template>\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n <div class={{this.classes.labelContainer}}>\n <div class={{this.classes.inputContainer}}>\n {{! Zero-width space character, used to align checkbox properly }}\n {{! eslint-disable no-irregular-whitespace}}\n ​\n <f.Radio\n @onChange={{this.handleChange}}\n @value={{@value}}\n @checked={{@checked}}\n @name={{@name}}\n @class={{this.classes.radio}}\n aria-describedby={{if @hint f.hintId}}\n ...attributes\n />\n </div>\n\n <f.Label @class={{this.classes.label}}>\n {{#if (has-block)}}\n {{yield}}\n {{else}}\n {{@label}}\n {{/if}}\n </f.Label>\n </div>\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n </FormField>\n </template>\n}\n"],"names":["FormRadio","Component","handleChange","value","event","preventDefault","args","onChange","_parentOnChange","n","prototype","action","isChecked","checked","classes","formRadio","useStyles","base","label","radio","hint","labelContainer","inputContainer","size","containerClasses","containerClass","privateContainerClass","class","setComponentTemplate","precompileTemplate","strictMode","scope","FormField"],"mappings":";;;;;;;;AAiDe,MAAMA,kBAAkBC,SAAU,CAAA;AACvCC,EAAAA,YAAAA,CAAaC,KAAc,EAAEC,KAAY,EAAQ;IACvDA,KAAA,CAAMC,cAAc,EAAA;IAEpB,IAAI,OAAO,IAAI,CAACC,IAAI,CAACC,QAAQ,KAAK,UAAY,EAAA;MAC5C,IAAI,CAACD,IAAI,CAACC,QAAQ,CAACJ,KAAO,EAAAC,KAAA,CAAA;AAC5B;IAEA,IAAI,OAAO,IAAI,CAACE,IAAI,CAACE,eAAe,KAAK,UAAY,EAAA;MACnD,IAAI,CAACF,IAAI,CAACE,eAAe,CAACL,KAAO,EAAAC,KAAA,CAAA;AACnC;AACF;AAAA,EAAA;IAAAK,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,cAAA,EAAA,CAVCC,MAAA,CAAA,CAAA;AAAA;EAYD,IAAIC,SAAAA,GAAqB;IACvB,OAAO,IAAI,CAACN,IAAI,CAACO,OAAO,IAAI,IAAI,CAACP,IAAI,CAACH,KAAK;AAC7C;EAEA,IAAIW,OAAUA,GAAA;IACZ,MAAM;AAAEC,MAAAA;KAAW,GAAGC,SAAA,EAAA;IAEtB,MAAM;MAAEC,IAAI;MAAEC,KAAK;MAAEC,KAAK;MAAEC,IAAI;MAAEC,cAAc;AAAEC,MAAAA;KAAgB,GAChEP,SAAU,CAAA;AACRQ,MAAAA,IAAA,EAAM,IAAI,CAACjB,IAAI,CAACiB;AAClB,KAAA,CAAA;IAEF,IAAIC,gBAAmB,GAAA,EAAA;AACvB,IAAA,IAAI,IAAI,CAAClB,IAAI,CAACmB,cAAc,EAAE;AAC5BD,MAAAA,gBAAA,GAAmB,IAAI,CAAClB,IAAI,CAACmB,cAAc;AAC7C;AACA,IAAA,IAAI,IAAI,CAACnB,IAAI,CAACoB,qBAAqB,EAAE;AACnCF,MAAAA,gBAAA,IAAoB,GAAM,GAAA,IAAI,CAAClB,IAAI,CAACoB,qBAAqB;AAC3D;IAEA,OAAO;MACLT,IAAA,EAAMA,IAAK,CAAA;AACTU,QAAAA,KAAO,EAAAH;AACT,OAAA,CAAA;MACAN,KAAO,EAAAA,KAAA,EAAA;MACPI,cAAgB,EAAAA,cAAA,EAAA;MAChBD,cAAgB,EAAAA,cAAA,EAAA;MAChBD,IAAM,EAAAA,IAAA,EAAA;MACND,KAAO,EAAAA,KAAA;KACT;AACF;AAEA,EAAA;IAAAS,oBAAA,CAAAC,kBAAA,CAiCA,83BAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,7 +1,3 @@
1
- import _initializerDefineProperty from '@babel/runtime/helpers/esm/initializerDefineProperty';
2
- import '@babel/runtime/helpers/esm/defineProperty';
3
- import _applyDecoratedDescriptor from '@babel/runtime/helpers/esm/applyDecoratedDescriptor';
4
- import '@babel/runtime/helpers/esm/initializerWarningHelper';
5
1
  import Component from '@glimmer/component';
6
2
  import { tracked } from '@glimmer/tracking';
7
3
  import { action } from '@ember/object';
@@ -13,13 +9,23 @@ import { concat } from '@ember/helper';
13
9
  import { useStyles } from '@frontile/theme';
14
10
  import { precompileTemplate } from '@ember/template-compilation';
15
11
  import { setComponentTemplate } from '@ember/component';
12
+ import { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMethodV2 } from '../runtime-BPCpkOf1-DV8zmEr2.js';
16
13
 
17
- var _class, _descriptor, _descriptor2, _FormSelect;
18
- let FormSelect = (_class = (_FormSelect = class FormSelect extends Component {
14
+ class FormSelect extends Component {
15
+ static {
16
+ decorateFieldV2(this.prototype, "shouldShowErrorFeedback", [tracked], function () {
17
+ return false;
18
+ });
19
+ }
20
+ #shouldShowErrorFeedback = (initializeDeferredDecorator(this, "shouldShowErrorFeedback"), undefined);
21
+ static {
22
+ decorateFieldV2(this.prototype, "isOpen", [tracked], function () {
23
+ return false;
24
+ });
25
+ }
26
+ #isOpen = (initializeDeferredDecorator(this, "isOpen"), undefined);
19
27
  constructor(owner, args) {
20
28
  super(owner, args);
21
- _initializerDefineProperty(this, "shouldShowErrorFeedback", _descriptor, this);
22
- _initializerDefineProperty(this, "isOpen", _descriptor2, this);
23
29
  assert('<FormSelect> requires an `@onChange` function', this.args.onChange && typeof this.args.onChange === 'function');
24
30
  }
25
31
  get showErrorFeedback() {
@@ -39,6 +45,9 @@ let FormSelect = (_class = (_FormSelect = class FormSelect extends Component {
39
45
  this.args.onOpen(select, event);
40
46
  }
41
47
  }
48
+ static {
49
+ decorateMethodV2(this.prototype, "handleOpen", [action]);
50
+ }
42
51
  handleClose(select, event) {
43
52
  this.isOpen = false;
44
53
  this.shouldShowErrorFeedback = true;
@@ -46,6 +55,9 @@ let FormSelect = (_class = (_FormSelect = class FormSelect extends Component {
46
55
  this.args.onClose(select, event);
47
56
  }
48
57
  }
58
+ static {
59
+ decorateMethodV2(this.prototype, "handleClose", [action]);
60
+ }
49
61
  handleFocusIn(select, event) {
50
62
  this.shouldShowErrorFeedback = false;
51
63
  if (typeof this.args.onFocusIn === 'function') {
@@ -56,6 +68,9 @@ let FormSelect = (_class = (_FormSelect = class FormSelect extends Component {
56
68
  this.args.onFocus(select, event);
57
69
  }
58
70
  }
71
+ static {
72
+ decorateMethodV2(this.prototype, "handleFocusIn", [action]);
73
+ }
59
74
  handleFocusOut(select, event) {
60
75
  if (!this.isOpen) {
61
76
  this.shouldShowErrorFeedback = true;
@@ -68,10 +83,16 @@ let FormSelect = (_class = (_FormSelect = class FormSelect extends Component {
68
83
  this.args.onBlur(select, event);
69
84
  }
70
85
  }
86
+ static {
87
+ decorateMethodV2(this.prototype, "handleFocusOut", [action]);
88
+ }
71
89
  handleChange(selection, select, event) {
72
90
  this.shouldShowErrorFeedback = true;
73
91
  this.args.onChange(selection, select, event);
74
92
  }
93
+ static {
94
+ decorateMethodV2(this.prototype, "handleChange", [action]);
95
+ }
75
96
  get classes() {
76
97
  const {
77
98
  formSelect
@@ -95,29 +116,18 @@ let FormSelect = (_class = (_FormSelect = class FormSelect extends Component {
95
116
  feedback: feedback()
96
117
  };
97
118
  }
98
- }, setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n\n {{#if @label}}\n <f.Label @for id={{f.id}} @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n {{!-- @glint-nocheck: need to fix powerselect types--}}\n {{#let (if @isMultiple PowerSelectMultiple PowerSelect) as |Component|}}\n <Component ...attributes @onChange={{this.handleChange}} @onFocus={{this.handleFocusIn}} @onBlur={{this.handleFocusOut}} @onOpen={{this.handleOpen}} @onClose={{this.handleClose}} @ariaDescribedBy=\"{{if @hint f.hintId}} {{if this.showErrorFeedback (concat \" \" f.feedbackId)}}{{if @ariaDescribedBy (concat \" \" @ariaDescribedBy)}}\" @ariaLabelledBy=\"{{if @label f.id}} {{if @ariaLabelledBy (concat \" \" @ariaLabelledBy)}}\" @ariaInvalid={{if this.showErrorFeedback \"true\"}} @triggerClass=\"{{@triggerClass}} {{if @size (concat \"ember-power-select-trigger-\" @size)}} {{this.classes.select}}\" @highlightOnHover={{@highlightOnHover}} @placeholderComponent={{@placeholderComponent}} @searchMessage={{@searchMessage}} @noMatchesMessage={{@noMatchesMessage}} @matchTriggerWidth={{@matchTriggerWidth}} @options={{@options}} @selected={{@selected}} @closeOnSelect={{@closeOnSelect}} @defaultHighlighted={{@defaultHighlighted}} @searchField={{@searchField}} @searchEnabled={{@searchEnabled}} @tabindex={{@tabindex}} @triggerComponent={{@triggerComponent}} @matcher={{@matcher}} @initiallyOpened={{@initiallyOpened}} @typeAheadOptionMatcher={{@typeAheadOptionMatcher}} @buildSelection={{@buildSelection}} @search={{@search}} @onInput={{@onInput}} @onKeydown={{@onKeydown}} @scrollTo={{@scrollTo}} @registerAPI={{@registerAPI}} @horizontalPosition={{@horizontalPosition}} @destination={{@destination}} @preventScroll={{@preventScroll}} @renderInPlace={{@renderInPlace}} @verticalPosition={{@verticalPosition}} @disabled={{@disabled}} @calculatePosition={{@calculatePosition}} @eventType={{@eventType}} @ariaLabel={{@ariaLabel}} @required={{@required}} @triggerRole={{@triggerRole}} @title={{@title}} @triggerId={{@triggerId}} @allowClear={{@allowClear}} @loadingMessage={{@loadingMessage}} @selectedItemComponent={{@selectedItemComponent}} @dropdownClass={{@dropdownClass}} @beforeOptionsComponent={{@beforeOptionsComponent}} @placeholder={{@placeholder}} @searchPlaceholder={{@searchPlaceholder}} @searchMessageComponent={{@searchMessageComponent}} @optionsComponent={{@optionsComponent}} @extra={{@extra}} @groupComponent={{@groupComponent}} @afterOptionsComponent={{@afterOptionsComponent}} as |option term|>\n {{yield option term}}\n </Component>\n {{/let}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n ", {
99
- strictMode: true,
100
- scope: () => ({
101
- FormField,
102
- PowerSelectMultiple,
103
- PowerSelect,
104
- concat
105
- })
106
- }), _FormSelect), _FormSelect), _descriptor = _applyDecoratedDescriptor(_class.prototype, "shouldShowErrorFeedback", [tracked], {
107
- configurable: true,
108
- enumerable: true,
109
- writable: true,
110
- initializer: function () {
111
- return false;
112
- }
113
- }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "isOpen", [tracked], {
114
- configurable: true,
115
- enumerable: true,
116
- writable: true,
117
- initializer: function () {
118
- return false;
119
- }
120
- }), _applyDecoratedDescriptor(_class.prototype, "handleOpen", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleOpen"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "handleClose", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleClose"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "handleFocusIn", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleFocusIn"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "handleFocusOut", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleFocusOut"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "handleChange", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleChange"), _class.prototype), _class);
119
+ static {
120
+ setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{this.classes.base}} as |f|>\n\n {{#if @label}}\n <f.Label @for id={{f.id}} @class={{this.classes.label}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint @class={{this.classes.hint}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n {{!-- @glint-nocheck: need to fix powerselect types--}}\n {{#let (if @isMultiple PowerSelectMultiple PowerSelect) as |Component|}}\n <Component ...attributes @onChange={{this.handleChange}} @onFocus={{this.handleFocusIn}} @onBlur={{this.handleFocusOut}} @onOpen={{this.handleOpen}} @onClose={{this.handleClose}} @ariaDescribedBy=\"{{if @hint f.hintId}} {{if this.showErrorFeedback (concat \" \" f.feedbackId)}}{{if @ariaDescribedBy (concat \" \" @ariaDescribedBy)}}\" @ariaLabelledBy=\"{{if @label f.id}} {{if @ariaLabelledBy (concat \" \" @ariaLabelledBy)}}\" @ariaInvalid={{if this.showErrorFeedback \"true\"}} @triggerClass=\"{{@triggerClass}} {{if @size (concat \"ember-power-select-trigger-\" @size)}} {{this.classes.select}}\" @highlightOnHover={{@highlightOnHover}} @placeholderComponent={{@placeholderComponent}} @searchMessage={{@searchMessage}} @noMatchesMessage={{@noMatchesMessage}} @matchTriggerWidth={{@matchTriggerWidth}} @options={{@options}} @selected={{@selected}} @closeOnSelect={{@closeOnSelect}} @defaultHighlighted={{@defaultHighlighted}} @searchField={{@searchField}} @searchEnabled={{@searchEnabled}} @tabindex={{@tabindex}} @triggerComponent={{@triggerComponent}} @matcher={{@matcher}} @initiallyOpened={{@initiallyOpened}} @typeAheadOptionMatcher={{@typeAheadOptionMatcher}} @buildSelection={{@buildSelection}} @search={{@search}} @onInput={{@onInput}} @onKeydown={{@onKeydown}} @scrollTo={{@scrollTo}} @registerAPI={{@registerAPI}} @horizontalPosition={{@horizontalPosition}} @destination={{@destination}} @preventScroll={{@preventScroll}} @renderInPlace={{@renderInPlace}} @verticalPosition={{@verticalPosition}} @disabled={{@disabled}} @calculatePosition={{@calculatePosition}} @eventType={{@eventType}} @ariaLabel={{@ariaLabel}} @required={{@required}} @triggerRole={{@triggerRole}} @title={{@title}} @triggerId={{@triggerId}} @allowClear={{@allowClear}} @loadingMessage={{@loadingMessage}} @selectedItemComponent={{@selectedItemComponent}} @dropdownClass={{@dropdownClass}} @beforeOptionsComponent={{@beforeOptionsComponent}} @placeholder={{@placeholder}} @searchPlaceholder={{@searchPlaceholder}} @searchMessageComponent={{@searchMessageComponent}} @optionsComponent={{@optionsComponent}} @extra={{@extra}} @groupComponent={{@groupComponent}} @afterOptionsComponent={{@afterOptionsComponent}} as |option term|>\n {{yield option term}}\n </Component>\n {{/let}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback @class={{this.classes.feedback}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n ", {
121
+ strictMode: true,
122
+ scope: () => ({
123
+ FormField,
124
+ PowerSelectMultiple,
125
+ PowerSelect,
126
+ concat
127
+ })
128
+ }), this);
129
+ }
130
+ }
121
131
 
122
132
  export { FormSelect as default };
123
133
  //# sourceMappingURL=form-select.js.map