@frontile/forms 0.18.0-alpha.1 → 0.18.0-alpha.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 (60) hide show
  1. package/declarations/components/select.d.ts +2 -2
  2. package/declarations/index.d.ts +1 -17
  3. package/declarations/template-registry.d.ts +1 -15
  4. package/declarations/test-support.d.ts +1 -2
  5. package/dist/index.js +13 -15
  6. package/dist/index.js.map +1 -1
  7. package/dist/test-support.js +1 -1336
  8. package/dist/test-support.js.map +1 -1
  9. package/package.json +4 -30
  10. package/dist/_app_/components/checkbox-group.js +0 -1
  11. package/dist/_app_/components/checkbox.js +0 -1
  12. package/dist/_app_/components/field-types.js +0 -1
  13. package/dist/_app_/components/field.js +0 -1
  14. package/dist/_app_/components/form-control.js +0 -1
  15. package/dist/_app_/components/form-description.js +0 -1
  16. package/dist/_app_/components/form-feedback.js +0 -1
  17. package/dist/_app_/components/form.js +0 -1
  18. package/dist/_app_/components/icons.js +0 -1
  19. package/dist/_app_/components/input.js +0 -1
  20. package/dist/_app_/components/label.js +0 -1
  21. package/dist/_app_/components/native-select.js +0 -1
  22. package/dist/_app_/components/radio-group.js +0 -1
  23. package/dist/_app_/components/radio.js +0 -1
  24. package/dist/_app_/components/select.js +0 -1
  25. package/dist/_app_/components/switch.js +0 -1
  26. package/dist/_app_/components/textarea.js +0 -1
  27. package/dist/components/checkbox-group.js +0 -29
  28. package/dist/components/checkbox-group.js.map +0 -1
  29. package/dist/components/checkbox.js +0 -50
  30. package/dist/components/checkbox.js.map +0 -1
  31. package/dist/components/field-types.js +0 -2
  32. package/dist/components/field-types.js.map +0 -1
  33. package/dist/components/field.js +0 -103
  34. package/dist/components/field.js.map +0 -1
  35. package/dist/components/form-control.js +0 -61
  36. package/dist/components/form-control.js.map +0 -1
  37. package/dist/components/form-description.js +0 -24
  38. package/dist/components/form-description.js.map +0 -1
  39. package/dist/components/form-feedback.js +0 -36
  40. package/dist/components/form-feedback.js.map +0 -1
  41. package/dist/components/form.js +0 -13
  42. package/dist/components/form.js.map +0 -1
  43. package/dist/components/icons.js +0 -13
  44. package/dist/components/icons.js.map +0 -1
  45. package/dist/components/input.js +0 -106
  46. package/dist/components/input.js.map +0 -1
  47. package/dist/components/label.js +0 -23
  48. package/dist/components/label.js.map +0 -1
  49. package/dist/components/native-select.js +0 -134
  50. package/dist/components/native-select.js.map +0 -1
  51. package/dist/components/radio-group.js +0 -29
  52. package/dist/components/radio-group.js.map +0 -1
  53. package/dist/components/radio.js +0 -49
  54. package/dist/components/radio.js.map +0 -1
  55. package/dist/components/select.js +0 -386
  56. package/dist/components/select.js.map +0 -1
  57. package/dist/components/switch.js +0 -63
  58. package/dist/components/switch.js.map +0 -1
  59. package/dist/components/textarea.js +0 -53
  60. package/dist/components/textarea.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox-group.js","sources":["../../src/components/checkbox-group.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { Checkbox, type CheckboxSignature } from './checkbox';\nimport { FormControl, type FormControlSharedArgs } from './form-control';\nimport {\n useStyles,\n type CheckboxGroupVariants,\n type CheckboxGroupSlots,\n type SlotsToClasses\n} from '@frontile/theme';\nimport type { WithBoundArgs } from '@glint/template';\n\ninterface Args extends FormControlSharedArgs {\n name?: string;\n onChange?: CheckboxSignature['Args']['onChange'];\n size?: CheckboxGroupVariants['size'];\n classes?: SlotsToClasses<CheckboxGroupSlots>;\n\n /*\n *\n * @defaultValue 'vertical'\n */\n orientation?: 'horizontal' | 'vertical';\n}\n\ninterface CheckboxGroupSignature {\n Args: Args;\n Blocks: {\n default: [\n Checkbox: WithBoundArgs<\n typeof Checkbox,\n 'name' | 'onChange' | 'isDisabled'\n >\n ];\n };\n Element: HTMLDivElement;\n}\n\nclass CheckboxGroup extends Component<CheckboxGroupSignature> {\n get classes() {\n const { checkboxGroup } = useStyles();\n return checkboxGroup({\n size: this.args.size\n });\n }\n\n <template>\n <FormControl\n @size={{@size}}\n @isRequired={{@isRequired}}\n @description={{@description}}\n @errors={{@errors}}\n @isInvalid={{@isInvalid}}\n @class={{this.classes.base class=@classes.base}}\n ...attributes\n as |c|\n >\n <c.Label @class={{this.classes.label class=@classes.label}}>\n {{@label}}\n </c.Label>\n <div\n class={{this.classes.optionsContainer class=@classes.optionsContainer}}\n data-orientation={{if @orientation @orientation \"vertical\"}}\n >\n {{yield\n (component\n Checkbox\n name=@name\n onChange=@onChange\n size=@size\n isDisabled=@isDisabled\n )\n to=\"default\"\n }}\n </div>\n </FormControl>\n </template>\n}\n\nexport { CheckboxGroup, type CheckboxGroupSignature };\nexport default CheckboxGroup;\n"],"names":["CheckboxGroup","Component","classes","checkboxGroup","useStyles","size","args","setComponentTemplate","precompileTemplate","strictMode","scope","FormControl","Checkbox"],"mappings":";;;;;;;AAqCA,MAAMA,sBAAsBC,SAAA,CAAU;EACpC,IAAIC,OAAAA,GAAU;IACZ,MAAM;AAAEC,MAAAA;KAAe,GAAGC,SAAA,EAAA;AAC1B,IAAA,OAAOD,aAAA,CAAc;AACnBE,MAAAA,IAAA,EAAM,IAAI,CAACC,IAAI,CAACD;AAClB,KAAA,CAAA;AACF,EAAA;AAEA,EAAA;IAAAE,oBAAA,CAAAC,kBAAA,CAAA,8mBAAA,EA8BA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,WAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,50 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { action } from '@ember/object';
3
- import { on } from '@ember/modifier';
4
- import { FormControl } from './form-control.js';
5
- import { useStyles } from '@frontile/theme';
6
- import { precompileTemplate } from '@ember/template-compilation';
7
- import { setComponentTemplate } from '@ember/component';
8
- import { a as decorateMethodV2 } from '../runtime-BPCpkOf1-B5Lbloj7.js';
9
-
10
- class Checkbox extends Component {
11
- get isChecked() {
12
- return !!this.args.checked;
13
- }
14
- handleChange(event) {
15
- event.preventDefault();
16
- const value = !this.args.checked;
17
- if (typeof this.args.onChange === 'function') {
18
- this.args.onChange(value, event);
19
- }
20
- }
21
- static {
22
- decorateMethodV2(this.prototype, "handleChange", [action]);
23
- }
24
- handleBlur() {
25
- this.args.onBlur?.();
26
- }
27
- static {
28
- decorateMethodV2(this.prototype, "handleBlur", [action]);
29
- }
30
- get classes() {
31
- const {
32
- checkbox
33
- } = useStyles();
34
- return checkbox({
35
- size: this.args.size
36
- });
37
- }
38
- static {
39
- setComponentTemplate(precompileTemplate("\n <FormControl @isInvalid={{@isInvalid}} @errors={{@errors}} @size={{@size}} @isRequired={{@isRequired}} @class={{this.classes.base class=@classes.base}} @preventErrorFeedback={{true}} as |c|>\n <input {{on \"change\" this.handleChange}} {{on \"blur\" this.handleBlur}} id={{c.id}} name={{@name}} checked={{this.isChecked}} type=\"checkbox\" disabled={{@isDisabled}} class={{this.classes.input class=@classes.input}} data-component=\"checkbox\" aria-invalid={{if c.isInvalid \"true\"}} aria-describedby={{c.describedBy @description c.isInvalid}} ...attributes />\n <div class={{this.classes.labelContainer class=@classes.labelContainer}}>\n {{#if @label}}\n <c.Label @class={{this.classes.label class=@classes.label}}>\n {{@label}}\n </c.Label>\n {{/if}}\n {{#if @description}}\n <c.Description>{{@description}}</c.Description>\n {{/if}}\n {{#if c.isInvalid}}\n <c.Feedback />\n {{/if}}\n </div>\n </FormControl>\n ", {
40
- strictMode: true,
41
- scope: () => ({
42
- FormControl,
43
- on
44
- })
45
- }), this);
46
- }
47
- }
48
-
49
- export { Checkbox, Checkbox as default };
50
- //# sourceMappingURL=checkbox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox.js","sources":["../../src/components/checkbox.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { on } from '@ember/modifier';\nimport { FormControl, type FormControlSharedArgs } from './form-control';\nimport {\n useStyles,\n type CheckboxVariants,\n type CheckboxSlots,\n type SlotsToClasses\n} from '@frontile/theme';\n\ninterface Args extends FormControlSharedArgs {\n checked?: boolean;\n name?: string;\n size?: CheckboxVariants['size'];\n classes?: SlotsToClasses<CheckboxSlots>;\n\n /*\n * Callback when onchange is triggered\n */\n onChange?: (value: boolean, event: Event) => void;\n\n /*\n * Callback when onblur is triggered\n */\n onBlur?: () => void;\n}\n\ninterface CheckboxSignature {\n Args: Args;\n Element: HTMLInputElement;\n}\n\nclass Checkbox extends Component<CheckboxSignature> {\n get isChecked(): boolean {\n return !!this.args.checked;\n }\n\n @action handleChange(event: Event): void {\n event.preventDefault();\n\n const value = !this.args.checked;\n\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(value, event);\n }\n }\n\n @action handleBlur(): void {\n this.args.onBlur?.();\n }\n\n get classes() {\n const { checkbox } = useStyles();\n return checkbox({\n size: this.args.size\n });\n }\n\n <template>\n <FormControl\n @isInvalid={{@isInvalid}}\n @errors={{@errors}}\n @size={{@size}}\n @isRequired={{@isRequired}}\n @class={{this.classes.base class=@classes.base}}\n @preventErrorFeedback={{true}}\n as |c|\n >\n <input\n {{on \"change\" this.handleChange}}\n {{on \"blur\" this.handleBlur}}\n id={{c.id}}\n name={{@name}}\n checked={{this.isChecked}}\n type=\"checkbox\"\n disabled={{@isDisabled}}\n class={{this.classes.input class=@classes.input}}\n data-component=\"checkbox\"\n aria-invalid={{if c.isInvalid \"true\"}}\n aria-describedby={{c.describedBy @description c.isInvalid}}\n ...attributes\n />\n <div class={{this.classes.labelContainer class=@classes.labelContainer}}>\n {{#if @label}}\n <c.Label @class={{this.classes.label class=@classes.label}}>\n {{@label}}\n </c.Label>\n {{/if}}\n {{#if @description}}\n <c.Description>{{@description}}</c.Description>\n {{/if}}\n {{#if c.isInvalid}}\n <c.Feedback />\n {{/if}}\n </div>\n </FormControl>\n </template>\n}\n\nexport { Checkbox, type CheckboxSignature };\nexport default Checkbox;\n"],"names":["Checkbox","Component","isChecked","args","checked","handleChange","event","preventDefault","value","onChange","n","prototype","action","handleBlur","onBlur","classes","checkbox","useStyles","size","setComponentTemplate","precompileTemplate","strictMode","scope","FormControl","on"],"mappings":";;;;;;;;;AAiCA,MAAMA,iBAAiBC,SAAA,CAAU;EAC/B,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,OAAO;AAC5B,EAAA;EAEQC,YAAAA,CAAaC,KAAY,EAAQ;IACvCA,KAAA,CAAMC,cAAc,EAAA;AAEpB,IAAA,MAAMC,QAAQ,CAAC,IAAI,CAACL,IAAI,CAACC,OAAO;IAEhC,IAAI,OAAO,IAAI,CAACD,IAAI,CAACM,QAAQ,KAAK,UAAA,EAAY;MAC5C,IAAI,CAACN,IAAI,CAACM,QAAQ,CAACD,KAAA,EAAOF,KAAA,CAAA;AAC5B,IAAA;AACF,EAAA;AAAA,EAAA;IAAAI,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,cAAA,EAAA,CARCC,MAAA,CAAA,CAAA;AAAA;AAUOC,EAAAA,UAAAA,GAAmB;AACzB,IAAA,IAAI,CAACV,IAAI,CAACW,MAAM,IAAA;AAClB,EAAA;AAAA,EAAA;IAAAJ,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,YAAA,EAAA,CAFCC,MAAA,CAAA,CAAA;AAAA;EAID,IAAIG,OAAAA,GAAU;IACZ,MAAM;AAAEC,MAAAA;KAAU,GAAGC,SAAA,EAAA;AACrB,IAAA,OAAOD,QAAA,CAAS;AACdE,MAAAA,IAAA,EAAM,IAAI,CAACf,IAAI,CAACe;AAClB,KAAA,CAAA;AACF,EAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,qgCAAA,EAsCA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,WAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=field-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field-types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,103 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { hash } from '@ember/helper';
3
- import { get, action } from '@ember/object';
4
- import { debounce } from '@ember/runloop';
5
- import { Checkbox } from './checkbox.js';
6
- import { CheckboxGroup } from './checkbox-group.js';
7
- import { Input } from './input.js';
8
- import { Radio } from './radio.js';
9
- import { RadioGroup } from './radio-group.js';
10
- import { Select } from './select.js';
11
- import { Switch } from './switch.js';
12
- import { Textarea } from './textarea.js';
13
- import { precompileTemplate } from '@ember/template-compilation';
14
- import { setComponentTemplate } from '@ember/component';
15
- import { a as decorateMethodV2 } from '../runtime-BPCpkOf1-B5Lbloj7.js';
16
-
17
- /**
18
- * Field is a component wrapper that provides conveniences for form fields.
19
- * It automatically binds the appropriate form errors by name to yielded
20
- * components.
21
- */
22
- class Field extends Component {
23
- /**
24
- * Returns the validation errors for the field.
25
- * Supports dotted field names (e.g., 'profile.email').
26
- */
27
- get fieldErrors() {
28
- return this.args.errors?.[this.args.name];
29
- }
30
- /** The events on which validation should run. Defaults to ['change']. */
31
- get validateOn() {
32
- return this.args.validateOn ?? ['change'];
33
- }
34
- /**
35
- * Returns the current value for the field from formData.
36
- * Supports both flat and dotted field names (e.g., 'email' or 'profile.email').
37
- * Uses Ember's get() which handles both flat keys and dotted paths.
38
- */
39
- get fieldValue() {
40
- if (!this.args.formData) return undefined;
41
- // Ember's get() handles both flat keys and dotted paths correctly
42
- return get(this.args.formData, this.args.name);
43
- }
44
- /**
45
- * Validates the field by calling the validateField function passed in args.
46
- */
47
- validateField() {
48
- this.args.validateField?.(this.args.formData, this.args.name);
49
- }
50
- /**
51
- * Validates the field on change if change validation is enabled.
52
- */
53
- handleChange() {
54
- if (this.validateOn?.includes('change')) {
55
- this.validateField();
56
- }
57
- }
58
- /**
59
- * Validates the field on input if input validation is enabled.
60
- * Debounces validation to avoid excessive validation calls on every keystroke.
61
- */
62
- static {
63
- decorateMethodV2(this.prototype, "handleChange", [action]);
64
- }
65
- handleInput() {
66
- if (this.validateOn?.includes('input')) {
67
- debounce(this, this.validateField, 300);
68
- }
69
- }
70
- /**
71
- * Validates the field on blur if blur validation is enabled.
72
- */
73
- static {
74
- decorateMethodV2(this.prototype, "handleInput", [action]);
75
- }
76
- handleBlur() {
77
- if (this.validateOn.includes('blur')) {
78
- this.validateField();
79
- }
80
- }
81
- static {
82
- decorateMethodV2(this.prototype, "handleBlur", [action]);
83
- }
84
- static {
85
- setComponentTemplate(precompileTemplate("\n {{!-- @glint-nocheck component generics (radio, radio-group, select) trigger: type instantiation is excessively deep and possibly infinite --}}\n {{yield (hash Checkbox=(component Checkbox name=@name errors=this.fieldErrors checked=this.fieldValue isDisabled=@disabled onChange=this.handleChange onBlur=this.handleBlur) CheckboxGroup=(component CheckboxGroup name=@name errors=this.fieldErrors isDisabled=@disabled) Input=(component Input name=@name errors=this.fieldErrors value=this.fieldValue isDisabled=@disabled onChange=this.handleChange onInput=this.handleInput onBlur=this.handleBlur) Radio=(component Radio name=@name errors=this.fieldErrors checkedValue=this.fieldValue isDisabled=@disabled onChange=this.handleChange onBlur=this.handleBlur) RadioGroup=(component RadioGroup name=@name errors=this.fieldErrors value=this.fieldValue isDisabled=@disabled onChange=this.handleChange) SingleSelect=(component Select name=@name errors=this.fieldErrors selectedKey=this.fieldValue isDisabled=@disabled onBlur=this.handleBlur) MultiSelect=(component Select selectionMode=\"multiple\" name=@name errors=this.fieldErrors selectedKeys=this.fieldValue isDisabled=@disabled onBlur=this.handleBlur) Switch=(component Switch name=@name errors=this.fieldErrors isSelected=this.fieldValue isDisabled=@disabled onChange=this.handleChange onBlur=this.handleBlur) Textarea=(component Textarea name=@name errors=this.fieldErrors value=this.fieldValue isDisabled=@disabled onChange=this.handleChange onInput=this.handleInput onBlur=this.handleBlur)) to=\"default\"}}\n ", {
86
- strictMode: true,
87
- scope: () => ({
88
- hash,
89
- Checkbox,
90
- CheckboxGroup,
91
- Input,
92
- Radio,
93
- RadioGroup,
94
- Select,
95
- Switch,
96
- Textarea
97
- })
98
- }), this);
99
- }
100
- }
101
-
102
- export { Field, Field as default };
103
- //# sourceMappingURL=field.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field.js","sources":["../../src/components/field.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { hash } from '@ember/helper';\nimport { action, get } from '@ember/object';\nimport { debounce } from '@ember/runloop';\nimport Checkbox from './checkbox';\nimport CheckboxGroup from './checkbox-group';\nimport Input from './input';\nimport Radio from './radio';\nimport RadioGroup from './radio-group';\nimport Select from './select';\nimport Switch from './switch';\nimport Textarea from './textarea';\n\nimport type { WithBoundArgs } from '@glint/template';\nimport type { FormDataCompiled, FormErrors } from './form';\nimport type { SelectSignature } from './select';\nimport type { WithBoundArgsForSignature } from './field-types';\n\ntype BoundSingleSelect<S = unknown> = WithBoundArgsForSignature<\n SelectSignature<S>,\n 'name' | 'errors' | 'selectedKey' | 'onBlur' | 'isDisabled'\n>;\n\ntype BoundMultiSelect<S = unknown> = WithBoundArgsForSignature<\n SelectSignature<S>,\n 'selectionMode' | 'name' | 'errors' | 'selectedKeys' | 'onBlur' | 'isDisabled'\n>;\n\ninterface FieldSignature<T extends Record<string, unknown> = FormDataCompiled> {\n Element: HTMLElement;\n Args: {\n /** The name of the form field. */\n name: string;\n /** The validation errors for the form, keyed by field name. */\n errors?: FormErrors;\n /** The form data as key/value pairs. */\n formData?: T;\n /** Whether the field should be disabled. */\n disabled?: boolean;\n /** When to run validation. */\n validateOn?: ('change' | 'input' | 'blur')[];\n /** Function to validate a single field by name. */\n validateField?: (data: T, name: string) => Promise<FormErrors | undefined>;\n };\n Blocks: {\n default: [\n {\n Checkbox: WithBoundArgs<\n typeof Checkbox,\n 'name' | 'errors' | 'checked' | 'onChange' | 'onBlur' | 'isDisabled'\n >;\n CheckboxGroup: WithBoundArgs<\n typeof CheckboxGroup,\n 'name' | 'errors' | 'isDisabled'\n >;\n Input: WithBoundArgs<\n typeof Input,\n | 'name'\n | 'errors'\n | 'value'\n | 'onChange'\n | 'onInput'\n | 'onBlur'\n | 'isDisabled'\n >;\n Radio: WithBoundArgs<\n typeof Radio,\n | 'name'\n | 'errors'\n | 'checkedValue'\n | 'onChange'\n | 'onBlur'\n | 'isDisabled'\n >;\n RadioGroup: WithBoundArgs<\n typeof RadioGroup,\n 'name' | 'errors' | 'value' | 'onChange' | 'isDisabled'\n >;\n SingleSelect: BoundSingleSelect;\n MultiSelect: BoundMultiSelect;\n Switch: WithBoundArgs<\n typeof Switch,\n | 'name'\n | 'errors'\n | 'isSelected'\n | 'onChange'\n | 'onBlur'\n | 'isDisabled'\n >;\n Textarea: WithBoundArgs<\n typeof Textarea,\n | 'name'\n | 'errors'\n | 'value'\n | 'onChange'\n | 'onInput'\n | 'onBlur'\n | 'isDisabled'\n >;\n }\n ];\n };\n}\n\n/**\n * Field is a component wrapper that provides conveniences for form fields.\n * It automatically binds the appropriate form errors by name to yielded\n * components.\n */\nclass Field<\n T extends Record<string, unknown> = FormDataCompiled\n> extends Component<FieldSignature<T>> {\n /**\n * Returns the validation errors for the field.\n * Supports dotted field names (e.g., 'profile.email').\n */\n get fieldErrors() {\n return this.args.errors?.[this.args.name];\n }\n\n /** The events on which validation should run. Defaults to ['change']. */\n get validateOn(): ('change' | 'input' | 'blur')[] {\n return this.args.validateOn ?? ['change'];\n }\n\n /**\n * Returns the current value for the field from formData.\n * Supports both flat and dotted field names (e.g., 'email' or 'profile.email').\n * Uses Ember's get() which handles both flat keys and dotted paths.\n */\n get fieldValue() {\n if (!this.args.formData) return undefined;\n\n // Ember's get() handles both flat keys and dotted paths correctly\n return get(this.args.formData, this.args.name);\n }\n\n /**\n * Validates the field by calling the validateField function passed in args.\n */\n validateField() {\n this.args.validateField?.(this.args.formData as T, this.args.name);\n }\n\n /**\n * Validates the field on change if change validation is enabled.\n */\n @action\n handleChange() {\n if (this.validateOn?.includes('change')) {\n this.validateField();\n }\n }\n\n /**\n * Validates the field on input if input validation is enabled.\n * Debounces validation to avoid excessive validation calls on every keystroke.\n */\n @action\n handleInput() {\n if (this.validateOn?.includes('input')) {\n debounce(this, this.validateField, 300);\n }\n }\n\n /**\n * Validates the field on blur if blur validation is enabled.\n */\n @action\n handleBlur() {\n if (this.validateOn.includes('blur')) {\n this.validateField();\n }\n }\n\n <template>\n {{! @glint-nocheck component generics (radio, radio-group, select) trigger: type instantiation is excessively deep and possibly infinite }}\n {{yield\n (hash\n Checkbox=(component\n Checkbox\n name=@name\n errors=this.fieldErrors\n checked=this.fieldValue\n isDisabled=@disabled\n onChange=this.handleChange\n onBlur=this.handleBlur\n )\n CheckboxGroup=(component\n CheckboxGroup name=@name errors=this.fieldErrors isDisabled=@disabled\n )\n Input=(component\n Input\n name=@name\n errors=this.fieldErrors\n value=this.fieldValue\n isDisabled=@disabled\n onChange=this.handleChange\n onInput=this.handleInput\n onBlur=this.handleBlur\n )\n Radio=(component\n Radio\n name=@name\n errors=this.fieldErrors\n checkedValue=this.fieldValue\n isDisabled=@disabled\n onChange=this.handleChange\n onBlur=this.handleBlur\n )\n RadioGroup=(component\n RadioGroup\n name=@name\n errors=this.fieldErrors\n value=this.fieldValue\n isDisabled=@disabled\n onChange=this.handleChange\n )\n SingleSelect=(component\n Select\n name=@name\n errors=this.fieldErrors\n selectedKey=this.fieldValue\n isDisabled=@disabled\n onBlur=this.handleBlur\n )\n MultiSelect=(component\n Select\n selectionMode=\"multiple\"\n name=@name\n errors=this.fieldErrors\n selectedKeys=this.fieldValue\n isDisabled=@disabled\n onBlur=this.handleBlur\n )\n Switch=(component\n Switch\n name=@name\n errors=this.fieldErrors\n isSelected=this.fieldValue\n isDisabled=@disabled\n onChange=this.handleChange\n onBlur=this.handleBlur\n )\n Textarea=(component\n Textarea\n name=@name\n errors=this.fieldErrors\n value=this.fieldValue\n isDisabled=@disabled\n onChange=this.handleChange\n onInput=this.handleInput\n onBlur=this.handleBlur\n )\n )\n to=\"default\"\n }}\n </template>\n}\n\nexport { Field, type FieldSignature };\nexport default Field;\n"],"names":["Field","Component","fieldErrors","args","errors","name","validateOn","fieldValue","formData","undefined","get","validateField","handleChange","includes","n","prototype","action","handleInput","debounce","handleBlur","setComponentTemplate","precompileTemplate","strictMode","scope","hash","Checkbox","CheckboxGroup","Input","Radio","RadioGroup","Select","Switch","Textarea"],"mappings":";;;;;;;;;;;;;;;;AAwGA;;;;;AAKA,MAAMA,KAAA,SAEIC,SAAA,CAAyB;AACjC;;;AAGC;EACD,IAAIC,WAAAA,GAAc;IAChB,OAAO,IAAI,CAACC,IAAI,CAACC,MAAM,GAAG,IAAI,CAACD,IAAI,CAACE,IAAI,CAAC;AAC3C,EAAA;AAEA;EACA,IAAIC,UAAAA,GAA8C;IAChD,OAAO,IAAI,CAACH,IAAI,CAACG,UAAU,IAAI,CAAC,QAAA,CAAS;AAC3C,EAAA;AAEA;;;;AAIC;EACD,IAAIC,UAAAA,GAAa;IACf,IAAI,CAAC,IAAI,CAACJ,IAAI,CAACK,QAAQ,EAAE,OAAOC,SAAA;AAEhC;AACA,IAAA,OAAOC,GAAA,CAAI,IAAI,CAACP,IAAI,CAACK,QAAQ,EAAE,IAAI,CAACL,IAAI,CAACE,IAAI,CAAA;AAC/C,EAAA;AAEA;;AAEC;AACDM,EAAAA,aAAAA,GAAgB;AACd,IAAA,IAAI,CAACR,IAAI,CAACQ,aAAa,GAAG,IAAI,CAACR,IAAI,CAACK,QAAQ,EAAO,IAAI,CAACL,IAAI,CAACE,IAAI,CAAA;AACnE,EAAA;AAEA;;AAEC;AAEDO,EAAAA,YAAAA,GAAe;IACb,IAAI,IAAI,CAACN,UAAU,EAAEO,SAAS,QAAA,CAAA,EAAW;MACvC,IAAI,CAACF,aAAa,EAAA;AACpB,IAAA;AACF,EAAA;AAEA;;;AAGC;AAHD,EAAA;IAAAG,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,cAAA,EAAA,CAPCC,MAAA,CAAA,CAAA;AAAA;AAYDC,EAAAA,WAAAA,GAAc;IACZ,IAAI,IAAI,CAACX,UAAU,EAAEO,SAAS,OAAA,CAAA,EAAU;MACtCK,QAAA,CAAS,IAAI,EAAE,IAAI,CAACP,aAAa,EAAE,GAAA,CAAA;AACrC,IAAA;AACF,EAAA;AAEA;;AAEC;AAFD,EAAA;IAAAG,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,aAAA,EAAA,CAPCC,MAAA,CAAA,CAAA;AAAA;AAWDG,EAAAA,UAAAA,GAAa;IACX,IAAI,IAAI,CAACb,UAAU,CAACO,QAAQ,CAAC,MAAA,CAAA,EAAS;MACpC,IAAI,CAACF,aAAa,EAAA;AACpB,IAAA;AACF,EAAA;AAAA,EAAA;IAAAG,gBAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,YAAA,EAAA,CALCC,MAAA,CAAA,CAAA;AAAA;AAOD,EAAA;IAAAI,oBAAA,CAAAC,kBAAA,CAAA,miDAAA,EAkFA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,IAAA;QAAAC,QAAA;QAAAC,aAAA;QAAAC,KAAA;QAAAC,KAAA;QAAAC,UAAA;QAAAC,MAAA;QAAAC,MAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,61 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { guidFor } from '@ember/object/internals';
3
- import { hash } from '@ember/helper';
4
- import { FormFeedback } from './form-feedback.js';
5
- import { FormDescription } from './form-description.js';
6
- import { Label } from './label.js';
7
- import { precompileTemplate } from '@ember/template-compilation';
8
- import { setComponentTemplate } from '@ember/component';
9
-
10
- function or(arg1, arg2) {
11
- return !!(arg1 || arg2);
12
- }
13
- class FormControl extends Component {
14
- id = this.args.id || guidFor(this);
15
- get descriptionId() {
16
- return this.id + '-description';
17
- }
18
- get feedbackId() {
19
- return this.id + '-feedback';
20
- }
21
- describedBy = (hasDescription, hasFeedback) => {
22
- const ids = [];
23
- if (hasDescription) {
24
- ids.push(this.descriptionId);
25
- }
26
- if (hasFeedback) {
27
- ids.push(this.feedbackId);
28
- }
29
- if (ids.length > 0) {
30
- return ids.join(' ');
31
- }
32
- };
33
- get isInvalid() {
34
- if (this.args.isInvalid || this.args.errors && this.args.errors.length > 0) {
35
- return true;
36
- } else {
37
- return false;
38
- }
39
- }
40
- get showErrorFeedback() {
41
- if (!(this.args.preventErrorFeedback === true) && this.isInvalid) {
42
- return true;
43
- }
44
- return false;
45
- }
46
- static {
47
- setComponentTemplate(precompileTemplate("\n <div class={{@class}} ...attributes>\n {{#if (or @label (has-block \"label\"))}}\n <Label @for={{this.id}} @isRequired={{@isRequired}} @size={{@size}}>\n {{@label}}\n {{yield to=\"label\"}}\n </Label>\n {{/if}}\n\n {{#if (or @description (has-block \"Description\"))}}\n <Description @id={{this.descriptionId}} @size={{@size}}>\n {{@description}}\n {{yield to=\"description\"}}\n </Description>\n {{/if}}\n\n {{yield (hash id=this.id isInvalid=this.isInvalid describedBy=this.describedBy Label=(component Label for=this.id size=@size isRequired=@isRequired) Description=(component Description id=this.descriptionId size=@size) Feedback=(component Feedback id=this.feedbackId size=@size messages=@errors intent=\"danger\")) to=\"default\"}}\n\n {{#if this.showErrorFeedback}}\n <Feedback @id={{this.feedbackId}} @size={{@size}} @messages={{@errors}} @intent=\"danger\" />\n {{/if}}\n </div>\n ", {
48
- strictMode: true,
49
- scope: () => ({
50
- or,
51
- Label,
52
- Description: FormDescription,
53
- hash,
54
- Feedback: FormFeedback
55
- })
56
- }), this);
57
- }
58
- }
59
-
60
- export { FormControl, FormControl as default };
61
- //# sourceMappingURL=form-control.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-control.js","sources":["../../src/components/form-control.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { hash } from '@ember/helper';\nimport Feedback, { type FormFeedbackSignature } from './form-feedback';\nimport Description, { type FormDescriptionSignature } from './form-description';\nimport Label, { type LabelSignature } from './label';\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\n\ninterface FormControlSharedArgs {\n label?: string;\n isRequired?: boolean;\n description?: string;\n errors?: string[] | string;\n isInvalid?: boolean;\n isDisabled?: boolean;\n}\n\ninterface Args extends FormControlSharedArgs {\n id?: string;\n size?: 'sm' | 'md' | 'lg';\n preventErrorFeedback?: boolean;\n class?: string;\n}\n\ninterface FormControlSignature {\n Args: Args;\n Blocks: {\n default: [\n {\n id: string;\n isInvalid: boolean;\n describedBy: (\n hasDescription?: string | boolean,\n hasFeedback?: string | boolean\n ) => string | undefined;\n Label: WithBoundArgs<ComponentLike<LabelSignature>, 'for' | 'size' | 'isRequired'>;\n Description: WithBoundArgs<ComponentLike<FormDescriptionSignature>, 'id' | 'size'>;\n Feedback: WithBoundArgs<\n ComponentLike<FormFeedbackSignature>,\n 'id' | 'size' | 'messages' | 'intent'\n >;\n }\n ];\n label: [];\n description: [];\n };\n Element: HTMLDivElement;\n}\n\nfunction or(arg1: unknown, arg2: unknown): boolean {\n return !!(arg1 || arg2);\n}\n\nclass FormControl extends Component<FormControlSignature> {\n id = this.args.id || guidFor(this);\n\n get descriptionId(): string {\n return this.id + '-description';\n }\n\n get feedbackId(): string {\n return this.id + '-feedback';\n }\n\n describedBy = (\n hasDescription?: string | boolean,\n hasFeedback?: string | boolean\n ): string | undefined => {\n const ids = [];\n\n if (hasDescription) {\n ids.push(this.descriptionId);\n }\n\n if (hasFeedback) {\n ids.push(this.feedbackId);\n }\n\n if (ids.length > 0) {\n return ids.join(' ');\n }\n };\n\n get isInvalid(): boolean {\n if (\n this.args.isInvalid ||\n (this.args.errors && this.args.errors.length > 0)\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n get showErrorFeedback(): boolean {\n if (!(this.args.preventErrorFeedback === true) && this.isInvalid) {\n return true;\n }\n return false;\n }\n\n <template>\n <div class={{@class}} ...attributes>\n {{#if (or @label (has-block \"label\"))}}\n <Label @for={{this.id}} @isRequired={{@isRequired}} @size={{@size}}>\n {{@label}}\n {{yield to=\"label\"}}\n </Label>\n {{/if}}\n\n {{#if (or @description (has-block \"Description\"))}}\n <Description @id={{this.descriptionId}} @size={{@size}}>\n {{@description}}\n {{yield to=\"description\"}}\n </Description>\n {{/if}}\n\n {{yield\n (hash\n id=this.id\n isInvalid=this.isInvalid\n describedBy=this.describedBy\n Label=(component Label for=this.id size=@size isRequired=@isRequired)\n Description=(component Description id=this.descriptionId size=@size)\n Feedback=(component\n Feedback\n id=this.feedbackId\n size=@size\n messages=@errors\n intent=\"danger\"\n )\n )\n to=\"default\"\n }}\n\n {{#if this.showErrorFeedback}}\n <Feedback\n @id={{this.feedbackId}}\n @size={{@size}}\n @messages={{@errors}}\n @intent=\"danger\"\n />\n {{/if}}\n </div>\n </template>\n}\n\nexport { FormControl, type FormControlSignature, type FormControlSharedArgs };\nexport default FormControl;\n"],"names":["or","arg1","arg2","FormControl","Component","id","args","guidFor","descriptionId","feedbackId","describedBy","hasDescription","hasFeedback","ids","push","length","join","isInvalid","errors","showErrorFeedback","preventErrorFeedback","setComponentTemplate","precompileTemplate","strictMode","scope","Label","Description","hash","Feedback"],"mappings":";;;;;;;;;AAiDA,SAASA,GAAGC,IAAa,EAAEC,IAAa,EAAU;AAChD,EAAA,OAAO,CAAC,EAAED,IAAA,IAAQC,IAAI,CAAA;AACxB;AAEA,MAAMC,oBAAoBC,SAAA,CAAU;EAClCC,EAAA,GAAK,IAAI,CAACC,IAAI,CAACD,EAAE,IAAIE,OAAA,CAAQ,IAAI,CAAA;EAEjC,IAAIC,aAAAA,GAAwB;AAC1B,IAAA,OAAO,IAAI,CAACH,EAAE,GAAG,cAAA;AACnB,EAAA;EAEA,IAAII,UAAAA,GAAqB;AACvB,IAAA,OAAO,IAAI,CAACJ,EAAE,GAAG,WAAA;AACnB,EAAA;AAEAK,EAAAA,WAAA,GAAcA,CACZC,cAAiC,EACjCC,WAA8B,KACX;IACnB,MAAMC,MAAM,EAAE;AAEd,IAAA,IAAIF,cAAA,EAAgB;AAClBE,MAAAA,GAAA,CAAIC,IAAI,CAAC,IAAI,CAACN,aAAa,CAAA;AAC7B,IAAA;AAEA,IAAA,IAAII,WAAA,EAAa;AACfC,MAAAA,GAAA,CAAIC,IAAI,CAAC,IAAI,CAACL,UAAU,CAAA;AAC1B,IAAA;AAEA,IAAA,IAAII,GAAA,CAAIE,MAAM,GAAG,CAAA,EAAG;AAClB,MAAA,OAAOF,GAAA,CAAIG,IAAI,CAAC,GAAA,CAAA;AAClB,IAAA;EACF,CAAA;EAEA,IAAIC,SAAAA,GAAqB;IACvB,IACE,IAAI,CAACX,IAAI,CAACW,SAAS,IAClB,IAAI,CAACX,IAAI,CAACY,MAAM,IAAI,IAAI,CAACZ,IAAI,CAACY,MAAM,CAACH,MAAM,GAAG,CAAC,EAChD;AACA,MAAA,OAAO,IAAA;AACT,IAAA,CAAA,MAAO;AACL,MAAA,OAAO,KAAA;AACT,IAAA;AACF,EAAA;EAEA,IAAII,iBAAAA,GAA6B;AAC/B,IAAA,IAAI,EAAE,IAAI,CAACb,IAAI,CAACc,oBAAoB,KAAK,IAAI,CAAA,IAAK,IAAI,CAACH,SAAS,EAAE;AAChE,MAAA,OAAO,IAAA;AACT,IAAA;AACA,IAAA,OAAO,KAAA;AACT,EAAA;AAEA,EAAA;IAAAI,oBAAA,CAAAC,kBAAA,CAAA,k/BAAA,EA2CA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAxB,EAAA;QAAAyB,KAAA;qBAAAC,eAAA;QAAAC,IAAA;AAAAC,kBAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,24 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { useStyles } from '@frontile/theme';
3
- import { precompileTemplate } from '@ember/template-compilation';
4
- import { setComponentTemplate } from '@ember/component';
5
-
6
- class FormDescription extends Component {
7
- get classes() {
8
- const {
9
- formDescription
10
- } = useStyles();
11
- return formDescription({
12
- size: this.args.size || 'md',
13
- class: this.args.class
14
- });
15
- }
16
- static {
17
- setComponentTemplate(precompileTemplate("\n <div id={{@id}} class={{this.classes}} data-component=\"form-description\" ...attributes>\n {{yield}}\n </div>\n ", {
18
- strictMode: true
19
- }), this);
20
- }
21
- }
22
-
23
- export { FormDescription, FormDescription as default };
24
- //# sourceMappingURL=form-description.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-description.js","sources":["../../src/components/form-description.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { useStyles, type FormDescriptionVariants } from '@frontile/theme';\n\ninterface FormDescriptionSignature {\n Args: {\n id?: string;\n /*\n * @defaultValue 'md'\n */\n size?: FormDescriptionVariants['size'];\n\n class?: string;\n };\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\n\nclass FormDescription extends Component<FormDescriptionSignature> {\n get classes() {\n const { formDescription } = useStyles();\n\n return formDescription({\n size: this.args.size || 'md',\n class: this.args.class\n });\n }\n\n <template>\n <div\n id={{@id}}\n class={{this.classes}}\n data-component=\"form-description\"\n ...attributes\n >\n {{yield}}\n </div>\n </template>\n}\n\nexport { FormDescription, type FormDescriptionSignature };\nexport default FormDescription;\n"],"names":["FormDescription","Component","classes","formDescription","useStyles","size","args","class","setComponentTemplate","precompileTemplate","strictMode"],"mappings":";;;;;AAmBA,MAAMA,wBAAwBC,SAAA,CAAU;EACtC,IAAIC,OAAAA,GAAU;IACZ,MAAM;AAAEC,MAAAA;KAAiB,GAAGC,SAAA,EAAA;AAE5B,IAAA,OAAOD,eAAA,CAAgB;AACrBE,MAAAA,IAAA,EAAM,IAAI,CAACC,IAAI,CAACD,IAAI,IAAI,IAAA;AACxBE,MAAAA,KAAA,EAAO,IAAI,CAACD,IAAI,CAACC;AACnB,KAAA,CAAA;AACF,EAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,kIAAA,EASA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,36 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { useStyles } from '@frontile/theme';
3
- import { precompileTemplate } from '@ember/template-compilation';
4
- import { setComponentTemplate } from '@ember/component';
5
-
6
- class FormFeedback extends Component {
7
- get isError() {
8
- return typeof this.args.messages !== 'undefined' && (this.args.intent === 'danger' || typeof this.args.intent === 'undefined');
9
- }
10
- get classes() {
11
- const {
12
- formFeedback
13
- } = useStyles();
14
- return formFeedback({
15
- size: this.args.size || 'md',
16
- intent: this.args.intent || 'danger',
17
- class: this.args.class
18
- });
19
- }
20
- get messageText() {
21
- if (!this.args.messages) return '';
22
- if (typeof this.args.messages === 'string') {
23
- return this.args.messages;
24
- } else {
25
- return this.args.messages.join('; ');
26
- }
27
- }
28
- static {
29
- setComponentTemplate(precompileTemplate("\n <div id={{@id}} class={{this.classes}} data-component=\"form-feedback\" aria-live={{if this.isError \"assertive\" \"polite\"}} ...attributes>\n {{this.messageText}}\n {{yield}}\n </div>\n ", {
30
- strictMode: true
31
- }), this);
32
- }
33
- }
34
-
35
- export { FormFeedback, FormFeedback as default };
36
- //# sourceMappingURL=form-feedback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-feedback.js","sources":["../../src/components/form-feedback.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { useStyles, type FormFeedbackVariants } from '@frontile/theme';\n\ninterface FormFeedbackSignature {\n Args: {\n id?: string;\n /*\n * A list of messages or a single message string\n */\n messages?: string[] | string;\n\n /*\n * The intent of the feedback\n * @defaultValue 'danger'\n */\n intent?: FormFeedbackVariants['intent'];\n\n /*\n * @defaultValue 'md'\n */\n size?: FormFeedbackVariants['size'];\n class?: string;\n };\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\n\nclass FormFeedback extends Component<FormFeedbackSignature> {\n get isError(): boolean {\n return (\n typeof this.args.messages !== 'undefined' &&\n (this.args.intent === 'danger' || typeof this.args.intent === 'undefined')\n );\n }\n\n get classes() {\n const { formFeedback } = useStyles();\n\n return formFeedback({\n size: this.args.size || 'md',\n intent: this.args.intent || 'danger',\n class: this.args.class\n });\n }\n\n get messageText(): string {\n if (!this.args.messages) return '';\n\n if (typeof this.args.messages === 'string') {\n return this.args.messages;\n } else {\n return this.args.messages.join('; ');\n }\n }\n\n <template>\n <div\n id={{@id}}\n class={{this.classes}}\n data-component=\"form-feedback\"\n aria-live={{if this.isError \"assertive\" \"polite\"}}\n ...attributes\n >\n {{this.messageText}}\n {{yield}}\n </div>\n </template>\n}\n\nexport { FormFeedback, type FormFeedbackSignature };\nexport default FormFeedback;\n"],"names":["FormFeedback","Component","isError","args","messages","intent","classes","formFeedback","useStyles","size","class","messageText","join","setComponentTemplate","precompileTemplate","strictMode"],"mappings":";;;;;AA6BA,MAAMA,qBAAqBC,SAAA,CAAU;EACnC,IAAIC,OAAAA,GAAmB;IACrB,OACE,OAAO,IAAI,CAACC,IAAI,CAACC,QAAQ,KAAK,WAAA,KAC7B,IAAI,CAACD,IAAI,CAACE,MAAM,KAAK,QAAA,IAAY,OAAO,IAAI,CAACF,IAAI,CAACE,MAAM,KAAK,WAAW,CAC3E;AACF,EAAA;EAEA,IAAIC,OAAAA,GAAU;IACZ,MAAM;AAAEC,MAAAA;KAAc,GAAGC,SAAA,EAAA;AAEzB,IAAA,OAAOD,YAAA,CAAa;AAClBE,MAAAA,IAAA,EAAM,IAAI,CAACN,IAAI,CAACM,IAAI,IAAI,IAAA;AACxBJ,MAAAA,MAAA,EAAQ,IAAI,CAACF,IAAI,CAACE,MAAM,IAAI,QAAA;AAC5BK,MAAAA,KAAA,EAAO,IAAI,CAACP,IAAI,CAACO;AACnB,KAAA,CAAA;AACF,EAAA;EAEA,IAAIC,WAAAA,GAAsB;IACxB,IAAI,CAAC,IAAI,CAACR,IAAI,CAACC,QAAQ,EAAE,OAAO,EAAA;IAEhC,IAAI,OAAO,IAAI,CAACD,IAAI,CAACC,QAAQ,KAAK,QAAA,EAAU;AAC1C,MAAA,OAAO,IAAI,CAACD,IAAI,CAACC,QAAQ;AAC3B,IAAA,CAAA,MAAO;MACL,OAAO,IAAI,CAACD,IAAI,CAACC,QAAQ,CAACQ,IAAI,CAAC,IAAA,CAAA;AACjC,IAAA;AACF,EAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,kNAAA,EAWA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,13 +0,0 @@
1
- import '@glimmer/component';
2
- import '@glimmer/tracking';
3
- import '@ember/object';
4
- import '@ember/helper';
5
- import '@ember/modifier';
6
- import '@frontile/utilities';
7
- import 'form-data-utils';
8
- export { F as Form, F as default } from '../form-CVuJDJUq.js';
9
- import './field.js';
10
- import '@ember/template-compilation';
11
- import '@ember/component';
12
- import '../runtime-BPCpkOf1-B5Lbloj7.js';
13
- //# sourceMappingURL=form.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -1,13 +0,0 @@
1
- import { precompileTemplate } from '@ember/template-compilation';
2
- import { setComponentTemplate } from '@ember/component';
3
- import templateOnly from '@ember/component/template-only';
4
-
5
- const IconChevronUpDown = setComponentTemplate(precompileTemplate("\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" aria-hidden=\"true\" ...attributes>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9\" />\n </svg>\n", {
6
- strictMode: true
7
- }), templateOnly());
8
- var icons = setComponentTemplate(precompileTemplate("\n @frontile/froms Icons component is empty, use template imports.\n", {
9
- strictMode: true
10
- }), templateOnly());
11
-
12
- export { IconChevronUpDown, icons as default };
13
- //# sourceMappingURL=icons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icons.js","sources":["../../src/components/icons.gts"],"sourcesContent":["import type { TOC } from '@ember/component/template-only';\n\nconst IconChevronUpDown: TOC<{\n Element: SVGElement;\n}> = <template>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n aria-hidden=\"true\"\n ...attributes\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9\"\n />\n </svg>\n</template>;\n\nexport { IconChevronUpDown };\n\n<template>\n @frontile/froms Icons component is empty, use template imports.\n</template>\n"],"names":["IconChevronUpDown","setComponentTemplate","precompileTemplate","strictMode","templateOnly"],"mappings":";;;;AAEA,MAAMA,iBAED,GAAAC,oBAAA,CAAAC,kBAAA,CAAA,ySAAA,EAgBL;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;AAIV,YAAAH,oBAAA,CAAAC,kBAAA,CAAA,uEAAA,EAEA;EAAAC,UAAA,EAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA,CAAA;;;;"}
@@ -1,106 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { tracked } from '@glimmer/tracking';
3
- import { action } from '@ember/object';
4
- import { on } from '@ember/modifier';
5
- import { useStyles } from '@frontile/theme';
6
- import { FormControl } from './form-control.js';
7
- import { t as triggerFormInputEvent } from '../index-6gTa9ocT.js';
8
- import { ref } from '@frontile/utilities';
9
- import { CloseButton } from '@frontile/buttons';
10
- import { precompileTemplate } from '@ember/template-compilation';
11
- import { setComponentTemplate } from '@ember/component';
12
- import { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMethodV2 } from '../runtime-BPCpkOf1-B5Lbloj7.js';
13
-
14
- function or(arg1, arg2) {
15
- return !!(arg1 || arg2);
16
- }
17
- class Input extends Component {
18
- static {
19
- decorateFieldV2(this.prototype, "uncontrolledValue", [tracked], function () {
20
- return this.args.value || '';
21
- });
22
- }
23
- #uncontrolledValue = (initializeDeferredDecorator(this, "uncontrolledValue"), void 0);
24
- inputRef = ref();
25
- get isControlled() {
26
- return typeof this.args.onChange === 'function' || typeof this.args.onInput === 'function';
27
- }
28
- get value() {
29
- return this.isControlled ? this.args.value : this.uncontrolledValue;
30
- }
31
- get type() {
32
- if (typeof this.args.type === 'string') {
33
- return this.args.type;
34
- }
35
- return 'text';
36
- }
37
- handleOnInput(event) {
38
- const value = event.target.value;
39
- if (this.isControlled) {
40
- this.args.onInput?.(value, event);
41
- } else {
42
- this.uncontrolledValue = value;
43
- }
44
- }
45
- static {
46
- decorateMethodV2(this.prototype, "handleOnInput", [action]);
47
- }
48
- handleOnChange(event) {
49
- const value = event.target.value;
50
- if (this.isControlled) {
51
- this.args.onChange?.(value, event);
52
- } else {
53
- this.uncontrolledValue = value;
54
- }
55
- }
56
- static {
57
- decorateMethodV2(this.prototype, "handleOnChange", [action]);
58
- }
59
- handleOnBlur() {
60
- this.args.onBlur?.();
61
- }
62
- static {
63
- decorateMethodV2(this.prototype, "handleOnBlur", [action]);
64
- }
65
- clearValue() {
66
- if (this.isControlled) {
67
- this.args.onChange?.('');
68
- this.args.onInput?.('');
69
- } else {
70
- this.uncontrolledValue = '';
71
- }
72
- this.inputRef.current?.focus();
73
- triggerFormInputEvent(this.inputRef.current);
74
- }
75
- static {
76
- decorateMethodV2(this.prototype, "clearValue", [action]);
77
- }
78
- get isClearable() {
79
- if (this.args.isClearable === true && this.value !== '' && typeof this.value !== 'undefined') {
80
- return true;
81
- }
82
- return false;
83
- }
84
- get classes() {
85
- const {
86
- input
87
- } = useStyles();
88
- return input({
89
- size: this.args.size
90
- });
91
- }
92
- static {
93
- setComponentTemplate(precompileTemplate("\n <FormControl @size={{@size}} @label={{@label}} @isRequired={{@isRequired}} @description={{@description}} @errors={{@errors}} @isInvalid={{@isInvalid}} @class={{this.classes.base class=@classes.base}} as |c|>\n <div class={{this.classes.innerContainer class=@classes.innerContainer}}>\n {{#if (has-block \"startContent\")}}\n <div data-test-id=\"input-start-content\" class={{this.classes.startContent class=@classes.startContent startContentPointerEvents=(if @startContentPointerEvents @startContentPointerEvents \"auto\")}}>\n {{yield to=\"startContent\"}}\n </div>\n {{/if}}\n <input {{this.inputRef.setup}} {{on \"input\" this.handleOnInput}} {{on \"change\" this.handleOnChange}} {{on \"blur\" this.handleOnBlur}} id={{c.id}} name={{@name}} value={{this.value}} type={{this.type}} disabled={{@isDisabled}} class={{this.classes.input class=@classes.input hasStartContent=(has-block \"startContent\") hasEndContent=(or (has-block \"endContent\") this.isClearable)}} data-component=\"input\" aria-invalid={{if c.isInvalid \"true\"}} aria-describedby={{c.describedBy @description c.isInvalid}} ...attributes />\n {{#if (or (has-block \"endContent\") this.isClearable)}}\n <div data-test-id=\"input-end-content\" class={{this.classes.endContent class=@classes.endContent endContentPointerEvents=(if @endContentPointerEvents @endContentPointerEvents \"auto\")}}>\n {{yield to=\"endContent\"}}\n\n {{#if this.isClearable}}\n <CloseButton @title=\"Clear\" @variant=\"subtle\" @size=\"xs\" data-test-id=\"input-clear-button\" @onPress={{this.clearValue}} />\n {{/if}}\n </div>\n {{/if}}\n </div>\n </FormControl>\n ", {
94
- strictMode: true,
95
- scope: () => ({
96
- FormControl,
97
- or,
98
- on,
99
- CloseButton
100
- })
101
- }), this);
102
- }
103
- }
104
-
105
- export { Input, Input as default };
106
- //# sourceMappingURL=input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.js","sources":["../../src/components/input.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { on } from '@ember/modifier';\nimport {\n useStyles,\n type InputSlots,\n type InputVariants,\n type SlotsToClasses\n} from '@frontile/theme';\nimport { FormControl, type FormControlSharedArgs } from './form-control';\nimport { triggerFormInputEvent } from '../utils';\nimport { ref } from '@frontile/utilities';\nimport { CloseButton } from '@frontile/buttons';\n\ninterface Args extends FormControlSharedArgs {\n type?: string;\n value?: string;\n name?: string;\n size?: InputVariants['size'];\n classes?: SlotsToClasses<InputSlots>;\n\n /**\n * Whether to include a clear button\n */\n isClearable?: boolean;\n\n /**\n * Controls pointer-events property of startContent.\n * If you want to pass the click event to the input, set it to `none`.\n *\n * @defaultValue 'auto'\n */\n startContentPointerEvents?: 'none' | 'auto';\n\n /**\n * Controls pointer-events property of endContent.\n * If you want to pass the click event to the input, set it to `none`.\n *\n * @defaultValue 'auto'\n */\n endContentPointerEvents?: 'none' | 'auto';\n\n /**\n * Callback when oninput is triggered\n */\n onInput?: (value: string, event?: InputEvent) => void;\n\n /**\n * Callback when onchange is triggered\n */\n onChange?: (value: string, event?: InputEvent) => void;\n\n /**\n * Callback when onblur is triggered\n */\n onBlur?: () => void;\n}\n\ninterface InputSignature {\n Args: Args;\n Blocks: {\n startContent: [];\n endContent: [];\n };\n Element: HTMLInputElement;\n}\n\nfunction or(arg1: unknown, arg2: unknown): boolean {\n return !!(arg1 || arg2);\n}\n\nclass Input extends Component<InputSignature> {\n @tracked uncontrolledValue: string = this.args.value || '';\n\n inputRef = ref<HTMLInputElement>();\n\n get isControlled() {\n return (\n typeof this.args.onChange === 'function' ||\n typeof this.args.onInput === 'function'\n );\n }\n\n get value(): string | undefined {\n return this.isControlled ? this.args.value : this.uncontrolledValue;\n }\n\n get type(): string {\n if (typeof this.args.type === 'string') {\n return this.args.type;\n }\n return 'text';\n }\n\n @action handleOnInput(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n\n if (this.isControlled) {\n this.args.onInput?.(value, event as InputEvent);\n } else {\n this.uncontrolledValue = value;\n }\n }\n\n @action handleOnChange(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n\n if (this.isControlled) {\n this.args.onChange?.(value, event as InputEvent);\n } else {\n this.uncontrolledValue = value;\n }\n }\n\n @action handleOnBlur(): void {\n this.args.onBlur?.();\n }\n\n @action clearValue(): void {\n if (this.isControlled) {\n this.args.onChange?.('');\n this.args.onInput?.('');\n } else {\n this.uncontrolledValue = '';\n }\n\n this.inputRef.current?.focus();\n triggerFormInputEvent(this.inputRef.current);\n }\n\n get isClearable(): boolean {\n if (\n this.args.isClearable === true &&\n this.value !== '' &&\n typeof this.value !== 'undefined'\n ) {\n return true;\n }\n return false;\n }\n\n get classes() {\n const { input } = useStyles();\n return input({\n size: this.args.size\n });\n }\n\n <template>\n <FormControl\n @size={{@size}}\n @label={{@label}}\n @isRequired={{@isRequired}}\n @description={{@description}}\n @errors={{@errors}}\n @isInvalid={{@isInvalid}}\n @class={{this.classes.base class=@classes.base}}\n as |c|\n >\n <div class={{this.classes.innerContainer class=@classes.innerContainer}}>\n {{#if (has-block \"startContent\")}}\n <div\n data-test-id=\"input-start-content\"\n class={{this.classes.startContent\n class=@classes.startContent\n startContentPointerEvents=(if\n @startContentPointerEvents @startContentPointerEvents \"auto\"\n )\n }}\n >\n {{yield to=\"startContent\"}}\n </div>\n {{/if}}\n <input\n {{this.inputRef.setup}}\n {{on \"input\" this.handleOnInput}}\n {{on \"change\" this.handleOnChange}}\n {{on \"blur\" this.handleOnBlur}}\n id={{c.id}}\n name={{@name}}\n value={{this.value}}\n type={{this.type}}\n disabled={{@isDisabled}}\n class={{this.classes.input\n class=@classes.input\n hasStartContent=(has-block \"startContent\")\n hasEndContent=(or (has-block \"endContent\") this.isClearable)\n }}\n data-component=\"input\"\n aria-invalid={{if c.isInvalid \"true\"}}\n aria-describedby={{c.describedBy @description c.isInvalid}}\n ...attributes\n />\n {{#if (or (has-block \"endContent\") this.isClearable)}}\n <div\n data-test-id=\"input-end-content\"\n class={{this.classes.endContent\n class=@classes.endContent\n endContentPointerEvents=(if\n @endContentPointerEvents @endContentPointerEvents \"auto\"\n )\n }}\n >\n {{yield to=\"endContent\"}}\n\n {{#if this.isClearable}}\n <CloseButton\n @title=\"Clear\"\n @variant=\"subtle\"\n @size=\"xs\"\n data-test-id=\"input-clear-button\"\n @onPress={{this.clearValue}}\n />\n {{/if}}\n </div>\n {{/if}}\n </div>\n </FormControl>\n </template>\n}\n\nexport { Input, type InputSignature };\nexport default Input;\n"],"names":["or","arg1","arg2","Input","Component","g","prototype","tracked","args","value","i","void 0","inputRef","ref","isControlled","onChange","onInput","uncontrolledValue","type","handleOnInput","event","target","n","action","handleOnChange","handleOnBlur","onBlur","clearValue","current","focus","triggerFormInputEvent","isClearable","classes","input","useStyles","size","setComponentTemplate","precompileTemplate","strictMode","scope","FormControl","on","CloseButton"],"mappings":"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"}
@@ -1,23 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { useStyles } from '@frontile/theme';
3
- import { precompileTemplate } from '@ember/template-compilation';
4
- import { setComponentTemplate } from '@ember/component';
5
-
6
- class Label extends Component {
7
- get classes() {
8
- const {
9
- label
10
- } = useStyles();
11
- return label({
12
- size: this.args.size || 'md'
13
- });
14
- }
15
- static {
16
- setComponentTemplate(precompileTemplate("\n <label for={{@for}} class={{this.classes.base class=@class}} data-component=\"label\" ...attributes>\n {{yield}}\n {{#if @isRequired}}\n <span class={{this.classes.asterisk class=@classes.asterisk}}>*</span>\n {{/if}}\n </label>\n ", {
17
- strictMode: true
18
- }), this);
19
- }
20
- }
21
-
22
- export { Label, Label as default };
23
- //# sourceMappingURL=label.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"label.js","sources":["../../src/components/label.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport {\n useStyles,\n type LabelSlots,\n type LabelVariants,\n type SlotsToClasses\n} from '@frontile/theme';\n\ninterface LabelSignature {\n Args: {\n /**\n * The 'for' attribute of a <label>.\n */\n for?: string;\n\n /*\n * @defaultValue 'md'\n */\n size?: LabelVariants['size'];\n classes?: SlotsToClasses<LabelSlots>;\n\n /**\n * The class name to be passed to the label base slot.\n */\n class?: string;\n\n /*\n * Whether the field is required or not, if true, an asterisk will be added to the label.\n * @defaultValue false\n */\n isRequired?: boolean;\n };\n Element: HTMLLabelElement;\n Blocks: {\n default: [];\n };\n}\n\nclass Label extends Component<LabelSignature> {\n get classes() {\n const { label } = useStyles();\n return label({\n size: this.args.size || 'md'\n });\n }\n\n <template>\n <label\n for={{@for}}\n class={{this.classes.base class=@class}}\n data-component=\"label\"\n ...attributes\n >\n {{yield}}\n {{#if @isRequired}}\n <span class={{this.classes.asterisk class=@classes.asterisk}}>*</span>\n {{/if}}\n </label>\n </template>\n}\n\nexport { Label, type LabelSignature };\nexport default Label;\n"],"names":["Label","Component","classes","label","useStyles","size","args","setComponentTemplate","precompileTemplate","strictMode"],"mappings":";;;;;AAsCA,MAAMA,cAAcC,SAAA,CAAU;EAC5B,IAAIC,OAAAA,GAAU;IACZ,MAAM;AAAEC,MAAAA;KAAO,GAAGC,SAAA,EAAA;AAClB,IAAA,OAAOD,KAAA,CAAM;AACXE,MAAAA,IAAA,EAAM,IAAI,CAACC,IAAI,CAACD,IAAI,IAAI;AAC1B,KAAA,CAAA;AACF,EAAA;AAEA,EAAA;IAAAE,oBAAA,CAAAC,kBAAA,CAAA,yQAAA,EAYA;MAAAC,UAAA,EAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}