@frontile/forms 0.15.0 → 0.16.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon-main.js +37 -0
- package/{components → declarations/components}/form-checkbox-group.d.ts +3 -1
- package/declarations/components/form-checkbox-group.d.ts.map +1 -0
- package/{components → declarations/components}/form-checkbox.d.ts +9 -0
- package/declarations/components/form-checkbox.d.ts.map +1 -0
- package/{components → declarations/components}/form-field/checkbox.d.ts +2 -0
- package/declarations/components/form-field/checkbox.d.ts.map +1 -0
- package/{components → declarations/components}/form-field/feedback.d.ts +5 -0
- package/declarations/components/form-field/feedback.d.ts.map +1 -0
- package/{components → declarations/components}/form-field/hint.d.ts +4 -0
- package/declarations/components/form-field/hint.d.ts.map +1 -0
- package/{components → declarations/components}/form-field/input.d.ts +4 -2
- package/declarations/components/form-field/input.d.ts.map +1 -0
- package/{components → declarations/components}/form-field/label.d.ts +4 -0
- package/declarations/components/form-field/label.d.ts.map +1 -0
- package/{components → declarations/components}/form-field/radio.d.ts +3 -1
- package/declarations/components/form-field/radio.d.ts.map +1 -0
- package/{components → declarations/components}/form-field/textarea.d.ts +4 -2
- package/declarations/components/form-field/textarea.d.ts.map +1 -0
- package/declarations/components/form-field.d.ts +38 -0
- package/declarations/components/form-field.d.ts.map +1 -0
- package/{components → declarations/components}/form-input.d.ts +5 -1
- package/declarations/components/form-input.d.ts.map +1 -0
- package/{components → declarations/components}/form-radio-group.d.ts +6 -2
- package/declarations/components/form-radio-group.d.ts.map +1 -0
- package/{components → declarations/components}/form-radio.d.ts +9 -1
- package/declarations/components/form-radio.d.ts.map +1 -0
- package/{components → declarations/components}/form-select.d.ts +6 -2
- package/declarations/components/form-select.d.ts.map +1 -0
- package/{components → declarations/components}/form-textarea.d.ts +5 -1
- package/declarations/components/form-textarea.d.ts.map +1 -0
- package/declarations/template-registry.d.ts +33 -0
- package/declarations/template-registry.d.ts.map +1 -0
- package/dist/_app_/components/form-checkbox-group.js +1 -0
- package/dist/_app_/components/form-checkbox.js +1 -0
- package/dist/_app_/components/form-field/checkbox.js +1 -0
- package/dist/_app_/components/form-field/feedback.js +1 -0
- package/dist/_app_/components/form-field/hint.js +1 -0
- package/dist/_app_/components/form-field/input.js +1 -0
- package/dist/_app_/components/form-field/label.js +1 -0
- package/dist/_app_/components/form-field/radio.js +1 -0
- package/dist/_app_/components/form-field/textarea.js +1 -0
- package/dist/_app_/components/form-field.js +1 -0
- package/dist/_app_/components/form-input.js +1 -0
- package/dist/_app_/components/form-radio-group.js +1 -0
- package/dist/_app_/components/form-radio.js +1 -0
- package/dist/_app_/components/form-select.js +1 -0
- package/dist/_app_/components/form-textarea.js +1 -0
- package/dist/components/form-checkbox-group.js +55 -0
- package/dist/components/form-checkbox-group.js.map +1 -0
- package/dist/components/form-checkbox.js +30 -0
- package/dist/components/form-checkbox.js.map +1 -0
- package/dist/components/form-field/checkbox.js +30 -0
- package/dist/components/form-field/checkbox.js.map +1 -0
- package/dist/components/form-field/feedback.js +29 -0
- package/dist/components/form-field/feedback.js.map +1 -0
- package/dist/components/form-field/hint.js +17 -0
- package/dist/components/form-field/hint.js.map +1 -0
- package/dist/components/form-field/input.js +36 -0
- package/dist/components/form-field/input.js.map +1 -0
- package/dist/components/form-field/label.js +17 -0
- package/dist/components/form-field/label.js.map +1 -0
- package/dist/components/form-field/radio.js +29 -0
- package/dist/components/form-field/radio.js.map +1 -0
- package/dist/components/form-field/textarea.js +30 -0
- package/dist/components/form-field/textarea.js.map +1 -0
- package/dist/components/form-field.js +44 -0
- package/dist/components/form-field.js.map +1 -0
- package/dist/components/form-input.js +64 -0
- package/dist/components/form-input.js.map +1 -0
- package/dist/components/form-radio-group.js +55 -0
- package/dist/components/form-radio-group.js.map +1 -0
- package/dist/components/form-radio.js +34 -0
- package/dist/components/form-radio.js.map +1 -0
- package/dist/components/form-select.js +102 -0
- package/dist/components/form-select.js.map +1 -0
- package/dist/components/form-textarea.js +23 -0
- package/dist/components/form-textarea.js.map +1 -0
- package/dist/template-registry.js +2 -0
- package/dist/template-registry.js.map +1 -0
- package/package.json +90 -48
- package/addon/components/form-checkbox-demo/usage.md +0 -30
- package/addon/components/form-checkbox-group-demo/usage.md +0 -54
- package/addon/components/form-checkbox-group.hbs +0 -38
- package/addon/components/form-checkbox-group.md +0 -5
- package/addon/components/form-checkbox-group.ts +0 -68
- package/addon/components/form-checkbox.hbs +0 -43
- package/addon/components/form-checkbox.md +0 -5
- package/addon/components/form-checkbox.ts +0 -45
- package/addon/components/form-field/checkbox.hbs +0 -10
- package/addon/components/form-field/checkbox.ts +0 -32
- package/addon/components/form-field/feedback.hbs +0 -10
- package/addon/components/form-field/feedback.ts +0 -30
- package/addon/components/form-field/hint.hbs +0 -8
- package/addon/components/form-field/hint.ts +0 -13
- package/addon/components/form-field/index.hbs +0 -20
- package/addon/components/form-field/index.ts +0 -46
- package/addon/components/form-field/input.hbs +0 -10
- package/addon/components/form-field/input.ts +0 -40
- package/addon/components/form-field/label.hbs +0 -8
- package/addon/components/form-field/label.ts +0 -13
- package/addon/components/form-field/radio.hbs +0 -11
- package/addon/components/form-field/radio.ts +0 -31
- package/addon/components/form-field/textarea.hbs +0 -10
- package/addon/components/form-field/textarea.ts +0 -32
- package/addon/components/form-input-demo/hint.md +0 -34
- package/addon/components/form-input-demo/no-label.md +0 -33
- package/addon/components/form-input-demo/simple.md +0 -42
- package/addon/components/form-input-demo/with-button.md +0 -60
- package/addon/components/form-input.hbs +0 -45
- package/addon/components/form-input.md +0 -5
- package/addon/components/form-input.ts +0 -96
- package/addon/components/form-radio-demo/usage.md +0 -39
- package/addon/components/form-radio-group-demo/usage.md +0 -43
- package/addon/components/form-radio-group.hbs +0 -39
- package/addon/components/form-radio-group.md +0 -5
- package/addon/components/form-radio-group.ts +0 -67
- package/addon/components/form-radio.hbs +0 -40
- package/addon/components/form-radio.md +0 -5
- package/addon/components/form-radio.ts +0 -53
- package/addon/components/form-select-demo/multiple.md +0 -60
- package/addon/components/form-select-demo/usage.md +0 -60
- package/addon/components/form-select.hbs +0 -101
- package/addon/components/form-select.md +0 -11
- package/addon/components/form-select.ts +0 -126
- package/addon/components/form-textarea-demo/usage.md +0 -40
- package/addon/components/form-textarea.hbs +0 -44
- package/addon/components/form-textarea.md +0 -5
- package/addon/components/form-textarea.ts +0 -7
- package/app/components/form-checkbox-group.js +0 -1
- package/app/components/form-checkbox.js +0 -1
- package/app/components/form-field/checkbox.js +0 -1
- package/app/components/form-field/feedback.js +0 -1
- package/app/components/form-field/hint.js +0 -1
- package/app/components/form-field/index.js +0 -1
- package/app/components/form-field/input.js +0 -1
- package/app/components/form-field/label.js +0 -1
- package/app/components/form-field/radio.js +0 -1
- package/app/components/form-field/textarea.js +0 -1
- package/app/components/form-input.js +0 -1
- package/app/components/form-radio-group.js +0 -1
- package/app/components/form-radio.js +0 -1
- package/app/components/form-select.js +0 -1
- package/app/components/form-textarea.js +0 -1
- package/components/form-field/index.d.ts +0 -36
- package/config/environment.js +0 -5
- package/index.js +0 -34
- package/tsconfig.json +0 -23
- package/types/dummy/index.d.ts +0 -0
- package/types/ember-get-config.d.ts +0 -3
- package/types/ember-power-select/test-support.d.ts +0 -29
- package/types/global.d.ts +0 -6
- package/types/index.d.ts +0 -1
package/addon-main.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { addonV1Shim } = require('@embroider/addon-shim');
|
|
4
|
+
module.exports = addonV1Shim(__dirname);
|
|
5
|
+
|
|
6
|
+
// module.exports = {
|
|
7
|
+
// name: require('./package').name,
|
|
8
|
+
// options: {
|
|
9
|
+
// 'ember-power-select': {
|
|
10
|
+
// theme: false
|
|
11
|
+
// }
|
|
12
|
+
// },
|
|
13
|
+
|
|
14
|
+
// included(includer, ...rest) {
|
|
15
|
+
// const app = includer.app || includer;
|
|
16
|
+
// const powerSelectOptions = app.options['ember-power-select'] || {};
|
|
17
|
+
// powerSelectOptions.theme = false;
|
|
18
|
+
// app.options['ember-power-select'] = powerSelectOptions;
|
|
19
|
+
|
|
20
|
+
// // make sure to include ember-basic-dropdown styles
|
|
21
|
+
// app.__skipEmberBasicDropdownStyles = true;
|
|
22
|
+
// app.import(
|
|
23
|
+
// 'node_modules/ember-basic-dropdown/vendor/ember-basic-dropdown.css'
|
|
24
|
+
// );
|
|
25
|
+
|
|
26
|
+
// this._super.included.apply(this, [app, ...rest]);
|
|
27
|
+
// },
|
|
28
|
+
|
|
29
|
+
// // Ember does not call contentFor on nested addons, so we must call it
|
|
30
|
+
// // manually.
|
|
31
|
+
// contentFor(type, config) {
|
|
32
|
+
// const emberPowerSelect = this.addons.find(
|
|
33
|
+
// (a) => a.name === 'ember-power-select'
|
|
34
|
+
// );
|
|
35
|
+
// return emberPowerSelect.contentFor(type, config);
|
|
36
|
+
// }
|
|
37
|
+
// };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import FormCheckbox from './form-checkbox';
|
|
3
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
3
4
|
export interface FormCheckboxGroupArgs {
|
|
4
5
|
/** The group label */
|
|
5
6
|
label?: string;
|
|
@@ -26,7 +27,7 @@ export interface FormCheckboxGroupSignature {
|
|
|
26
27
|
Args: FormCheckboxGroupArgs;
|
|
27
28
|
Blocks: {
|
|
28
29
|
default: [
|
|
29
|
-
checkbox: FormCheckbox,
|
|
30
|
+
checkbox: WithBoundArgs<typeof FormCheckbox, 'privateContainerClass'> & WithBoundArgs<typeof FormCheckbox, '_parentOnChange'> & WithBoundArgs<typeof FormCheckbox, 'size'>,
|
|
30
31
|
api: {
|
|
31
32
|
onChange: (value: unknown, event: Event) => void;
|
|
32
33
|
}
|
|
@@ -39,3 +40,4 @@ export default class FormCheckboxGroup extends Component<FormCheckboxGroupSignat
|
|
|
39
40
|
get showErrorFeedback(): boolean;
|
|
40
41
|
handleChange(value: unknown, event: Event): void;
|
|
41
42
|
}
|
|
43
|
+
//# sourceMappingURL=form-checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-checkbox-group.d.ts","sourceRoot":"","sources":["../../src/components/form-checkbox-group.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAI3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,qBAAqB;IACpC,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC3B,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACnD;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,MAAM,EAAE;QACN,OAAO,EAAE;YACP,QAAQ,EAAE,aAAa,CAAC,OAAO,YAAY,EAAE,uBAAuB,CAAC,GACnE,aAAa,CAAC,OAAO,YAAY,EAAE,iBAAiB,CAAC,GACrD,aAAa,CAAC,OAAO,YAAY,EAAE,MAAM,CAAC;YAC5C,GAAG,EAAE;gBAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;aAAE;SAC1D,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IACzE,uBAAuB,UAAS;IAEzC,IAAI,iBAAiB,IAAI,OAAO,CAgB/B;IAEO,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;CA4DzD"}
|
|
@@ -22,11 +22,20 @@ export interface FormCheckboxArgs {
|
|
|
22
22
|
* @ignore
|
|
23
23
|
**/
|
|
24
24
|
_parentOnChange?: (value: boolean, event: Event) => void;
|
|
25
|
+
/**
|
|
26
|
+
* CSS classes to be added in the container element
|
|
27
|
+
* @ignore
|
|
28
|
+
* */
|
|
29
|
+
privateContainerClass?: string;
|
|
25
30
|
}
|
|
26
31
|
export interface FormCheckboxSignature {
|
|
27
32
|
Args: FormCheckboxArgs;
|
|
28
33
|
Element: HTMLInputElement;
|
|
34
|
+
Blocks: {
|
|
35
|
+
default: [];
|
|
36
|
+
};
|
|
29
37
|
}
|
|
30
38
|
export default class FormCheckbox extends Component<FormCheckboxSignature> {
|
|
31
39
|
handleChange(value: boolean, event: Event): void;
|
|
32
40
|
}
|
|
41
|
+
//# sourceMappingURL=form-checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-checkbox.d.ts","sourceRoot":"","sources":["../../src/components/form-checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjD;;;QAGI;IACJ,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEzD;;;SAGK;IACL,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IAChE,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;CAuEzD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
export interface FormFieldCheckboxArgs {
|
|
3
|
+
id?: string;
|
|
3
4
|
checked?: boolean;
|
|
4
5
|
name?: string;
|
|
5
6
|
size?: 'sm' | 'lg';
|
|
@@ -13,3 +14,4 @@ export default class FormFieldCheckbox extends Component<FormFieldCheckboxSignat
|
|
|
13
14
|
get isChecked(): boolean;
|
|
14
15
|
handleChange(event: Event): void;
|
|
15
16
|
}
|
|
17
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,qBAAqB;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACnD;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAClF,IAAI,SAAS,IAAI,OAAO,CAEvB;IAEO,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CA0BzC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
export interface FormFieldFeedbackArgs {
|
|
3
|
+
id?: string;
|
|
3
4
|
isError?: boolean;
|
|
4
5
|
errors?: string[] | string;
|
|
5
6
|
size?: 'sm' | 'lg';
|
|
@@ -7,8 +8,12 @@ export interface FormFieldFeedbackArgs {
|
|
|
7
8
|
export interface FormFieldFeedbackSignature {
|
|
8
9
|
Args: FormFieldFeedbackArgs;
|
|
9
10
|
Element: HTMLDivElement;
|
|
11
|
+
Blocks: {
|
|
12
|
+
default: [];
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
15
|
export default class FormFieldFeedback extends Component<FormFieldFeedbackSignature> {
|
|
12
16
|
get isError(): boolean;
|
|
13
17
|
get errorMessage(): string;
|
|
14
18
|
}
|
|
19
|
+
//# sourceMappingURL=feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,qBAAqB;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAClF,IAAI,OAAO,IAAI,OAAO,CAIrB;IAED,IAAI,YAAY,IAAI,MAAM,CAQzB;CAiBF"}
|
|
@@ -6,6 +6,10 @@ export interface FormFieldHintArgs {
|
|
|
6
6
|
export interface FormFieldHintSignature {
|
|
7
7
|
Args: FormFieldHintArgs;
|
|
8
8
|
Element: HTMLDivElement;
|
|
9
|
+
Blocks: {
|
|
10
|
+
default: [];
|
|
11
|
+
};
|
|
9
12
|
}
|
|
10
13
|
export default class FormFieldHint extends Component<FormFieldHintSignature> {
|
|
11
14
|
}
|
|
15
|
+
//# sourceMappingURL=hint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hint.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/hint.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,iBAAiB;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;CAc3E"}
|
|
@@ -3,6 +3,7 @@ export interface FormFieldInputArgs {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
type?: string;
|
|
5
5
|
size?: 'sm' | 'lg';
|
|
6
|
+
value?: string;
|
|
6
7
|
onInput?: (value: string, event: InputEvent) => void;
|
|
7
8
|
onChange?: (value: string, event: InputEvent) => void;
|
|
8
9
|
}
|
|
@@ -12,6 +13,7 @@ export interface FormFieldInputSignature {
|
|
|
12
13
|
}
|
|
13
14
|
export default class FormFieldInput extends Component<FormFieldInputSignature> {
|
|
14
15
|
get type(): string;
|
|
15
|
-
handleOnInput(event:
|
|
16
|
-
handleOnChange(event:
|
|
16
|
+
handleOnInput(event: Event): void;
|
|
17
|
+
handleOnChange(event: Event): void;
|
|
17
18
|
}
|
|
19
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/input.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,kBAAkB;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAGrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IAC5E,IAAI,IAAI,IAAI,MAAM,CAKjB;IAEO,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IASjC,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAyB3C"}
|
|
@@ -6,6 +6,10 @@ export interface FormFieldLabelArgs {
|
|
|
6
6
|
export interface FormFieldLabelSignature {
|
|
7
7
|
Args: FormFieldLabelArgs;
|
|
8
8
|
Element: HTMLLabelElement;
|
|
9
|
+
Blocks: {
|
|
10
|
+
default: [];
|
|
11
|
+
};
|
|
9
12
|
}
|
|
10
13
|
export default class FormFieldLabel extends Component<FormFieldLabelSignature> {
|
|
11
14
|
}
|
|
15
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/label.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;CAc7E"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
export interface FormFieldRadioArgs {
|
|
3
|
-
|
|
3
|
+
id?: string;
|
|
4
|
+
value?: string | number | boolean;
|
|
4
5
|
checked?: unknown;
|
|
5
6
|
name?: string;
|
|
6
7
|
size?: 'sm' | 'lg';
|
|
@@ -14,3 +15,4 @@ export default class FormFieldRadio extends Component<FormFieldRadioSignature> {
|
|
|
14
15
|
get isChecked(): boolean;
|
|
15
16
|
handleChange(event: Event): void;
|
|
16
17
|
}
|
|
18
|
+
//# sourceMappingURL=radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/radio.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,kBAAkB;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACnD;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IAC5E,IAAI,SAAS,IAAI,OAAO,CAEvB;IAEO,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAyBzC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
export interface FormFieldTextareaArgs {
|
|
3
3
|
id?: string;
|
|
4
|
+
value?: string | number | boolean;
|
|
4
5
|
size?: 'sm' | 'lg';
|
|
5
6
|
onInput?: (value: string, event: InputEvent) => void;
|
|
6
7
|
onChange?: (value: string, event: InputEvent) => void;
|
|
@@ -10,6 +11,7 @@ export interface FormFieldTextareaSignature {
|
|
|
10
11
|
Element: HTMLTextAreaElement;
|
|
11
12
|
}
|
|
12
13
|
export default class FormFieldTextarea extends Component<FormFieldTextareaSignature> {
|
|
13
|
-
handleOnInput(event:
|
|
14
|
-
handleOnChange(event:
|
|
14
|
+
handleOnInput(event: Event): void;
|
|
15
|
+
handleOnChange(event: Event): void;
|
|
15
16
|
}
|
|
17
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/textarea.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,qBAAqB;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAClC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAGrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAC1E,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IASjC,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAwB3C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import FormFieldCheckbox from './form-field/checkbox';
|
|
3
|
+
import FormFieldFeedback from './form-field/feedback';
|
|
4
|
+
import FormFieldHint from './form-field/hint';
|
|
5
|
+
import FormFieldInput from './form-field/input';
|
|
6
|
+
import FormFieldLabel from './form-field/label';
|
|
7
|
+
import FormFieldRadio from './form-field/radio';
|
|
8
|
+
import FormFieldTextarea from './form-field/textarea';
|
|
9
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
10
|
+
export interface FormFieldArgs {
|
|
11
|
+
size?: 'sm' | 'lg';
|
|
12
|
+
}
|
|
13
|
+
export interface FormFieldSignature {
|
|
14
|
+
Args: FormFieldArgs;
|
|
15
|
+
Blocks: {
|
|
16
|
+
default: [
|
|
17
|
+
{
|
|
18
|
+
id: string;
|
|
19
|
+
hintId: string;
|
|
20
|
+
feedbackId: string;
|
|
21
|
+
Label: WithBoundArgs<typeof FormFieldLabel, 'for'> & WithBoundArgs<typeof FormFieldLabel, 'size'>;
|
|
22
|
+
Hint: WithBoundArgs<typeof FormFieldHint, 'id'> & WithBoundArgs<typeof FormFieldHint, 'size'>;
|
|
23
|
+
Feedback: WithBoundArgs<typeof FormFieldFeedback, 'id'> & WithBoundArgs<typeof FormFieldFeedback, 'size'>;
|
|
24
|
+
Input: WithBoundArgs<typeof FormFieldInput, 'id'> & WithBoundArgs<typeof FormFieldInput, 'size'>;
|
|
25
|
+
Textarea: WithBoundArgs<typeof FormFieldTextarea, 'id'> & WithBoundArgs<typeof FormFieldTextarea, 'size'>;
|
|
26
|
+
Checkbox: WithBoundArgs<typeof FormFieldCheckbox, 'id'> & WithBoundArgs<typeof FormFieldCheckbox, 'size'>;
|
|
27
|
+
Radio: WithBoundArgs<typeof FormFieldRadio, 'id'> & WithBoundArgs<typeof FormFieldRadio, 'size'>;
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
};
|
|
31
|
+
Element: HTMLDivElement;
|
|
32
|
+
}
|
|
33
|
+
export default class FormField extends Component<FormFieldSignature> {
|
|
34
|
+
id: string;
|
|
35
|
+
get hintId(): string;
|
|
36
|
+
get feedbackId(): string;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=form-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../src/components/form-field.ts"],"names":[],"mappings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AAC;gBAClD,QAAQ,EAAE,aAAa,CAAC,OAAO,iBAAiB,EAAE,IAAI,CAAC,GACrD,aAAa,CAAC,OAAO,iBAAiB,EAAE,MAAM,CAAC,CAAC;gBAClD,KAAK,EAAE,aAAa,CAAC,OAAO,cAAc,EAAE,IAAI,CAAC,GAC/C,aAAa,CAAC,OAAO,cAAc,EAAE,MAAM,CAAC,CAAC;aAChD;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAClE,EAAE,SAAiB;IAEnB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;CAqBF"}
|
|
@@ -4,7 +4,7 @@ export interface FormInputArgs {
|
|
|
4
4
|
* The value to be used in the input.
|
|
5
5
|
* You must also pass `onChange` or `onInput` to update its value.
|
|
6
6
|
*/
|
|
7
|
-
value:
|
|
7
|
+
value: string | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* The input type
|
|
10
10
|
* @defaultValue 'text'
|
|
@@ -40,6 +40,9 @@ export interface FormInputBaseSignature {
|
|
|
40
40
|
}
|
|
41
41
|
export interface FormInputSignature extends FormInputBaseSignature {
|
|
42
42
|
Element: HTMLInputElement;
|
|
43
|
+
Blocks: {
|
|
44
|
+
default: [];
|
|
45
|
+
};
|
|
43
46
|
}
|
|
44
47
|
export declare class FormInputBase<T extends FormInputBaseSignature> extends Component<T> {
|
|
45
48
|
shouldShowErrorFeedback: boolean;
|
|
@@ -49,3 +52,4 @@ export declare class FormInputBase<T extends FormInputBaseSignature> extends Com
|
|
|
49
52
|
}
|
|
50
53
|
export default class FormInput extends FormInputBase<FormInputSignature> {
|
|
51
54
|
}
|
|
55
|
+
//# sourceMappingURL=form-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-input.d.ts","sourceRoot":"","sources":["../../src/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xB,CAAC,SAAS,sBAAsB,CAChC,SAAQ,SAAS,CAAC,CAAC,CAAC;IACX,uBAAuB,UAAS;IAEzC,IAAI,iBAAiB,IAAI,OAAO,CAgB/B;IAEO,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAQtC,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;CAOhD;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa,CAAC,kBAAkB,CAAC;CA4DvE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import FormRadio from './form-radio';
|
|
3
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
3
4
|
export interface FormRadioGroupArgs {
|
|
4
|
-
value:
|
|
5
|
+
value: string | number | boolean | undefined;
|
|
5
6
|
/** The group label */
|
|
6
7
|
label?: string;
|
|
7
8
|
/** A help text to be displayed */
|
|
@@ -26,7 +27,9 @@ export interface FormRadioGroupArgs {
|
|
|
26
27
|
export interface FormRadioGroupSignature {
|
|
27
28
|
Args: FormRadioGroupArgs;
|
|
28
29
|
Blocks: {
|
|
29
|
-
default: [
|
|
30
|
+
default: [
|
|
31
|
+
radio: WithBoundArgs<typeof FormRadio, 'checked'> & WithBoundArgs<typeof FormRadio, 'privateContainerClass'> & WithBoundArgs<typeof FormRadio, '_parentOnChange'> & WithBoundArgs<typeof FormRadio, 'size'> & WithBoundArgs<typeof FormRadio, 'name'>
|
|
32
|
+
];
|
|
30
33
|
};
|
|
31
34
|
Element: HTMLDivElement;
|
|
32
35
|
}
|
|
@@ -35,3 +38,4 @@ export default class FormRadioGroup extends Component<FormRadioGroupSignature> {
|
|
|
35
38
|
get showErrorFeedback(): boolean;
|
|
36
39
|
handleChange(value: unknown, event: Event): void;
|
|
37
40
|
}
|
|
41
|
+
//# sourceMappingURL=form-radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-radio-group.d.ts","sourceR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C;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IACnE,uBAAuB,UAAS;IAEzC,IAAI,iBAAiB,IAAI,OAAO,CAgB/B;IAEO,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;CA0DzD"}
|
|
@@ -8,7 +8,7 @@ export interface FormRadioArgs {
|
|
|
8
8
|
* The value to be used in the radio button.
|
|
9
9
|
* You must also pass `onChange` to update its value.
|
|
10
10
|
*/
|
|
11
|
-
value:
|
|
11
|
+
value: string | number | boolean | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* The current checked value.
|
|
14
14
|
* This will be used to compare against the `value` argument,
|
|
@@ -28,11 +28,19 @@ export interface FormRadioArgs {
|
|
|
28
28
|
* @ignore
|
|
29
29
|
**/
|
|
30
30
|
_parentOnChange?: (value: unknown, event: Event) => void;
|
|
31
|
+
/** CSS classes to be added in the container element, in be used in for group
|
|
32
|
+
* @ignore*/
|
|
33
|
+
privateContainerClass?: string;
|
|
31
34
|
}
|
|
32
35
|
export interface FormRadioSignature {
|
|
33
36
|
Args: FormRadioArgs;
|
|
34
37
|
Element: HTMLInputElement;
|
|
38
|
+
Blocks: {
|
|
39
|
+
default: [];
|
|
40
|
+
};
|
|
35
41
|
}
|
|
36
42
|
export default class FormRadio extends Component<FormRadioSignature> {
|
|
37
43
|
handleChange(value: unknown, event: Event): void;
|
|
44
|
+
get isChecked(): boolean;
|
|
38
45
|
}
|
|
46
|
+
//# sourceMappingURL=form-radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-radio.d.ts","sourceRoot":"","sources":["../../src/components/form-radio.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,MAAM,WAAW,aAAa;IAC5B,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC7C;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjD;;;QAGI;IACJ,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEzD;gBACY;IACZ,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAC1D,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAYxD,IAAI,SAAS,IAAI,OAAO,CAEvB;CA+DF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { PowerSelectArgs, Select } from 'ember-power-select/
|
|
2
|
+
import { type PowerSelectArgs, type Select } from 'ember-power-select/components/power-select';
|
|
3
|
+
export type { Select } from 'ember-power-select/components/power-select';
|
|
3
4
|
export interface FormSelectArgs extends PowerSelectArgs {
|
|
4
5
|
/** The input field label */
|
|
5
6
|
label?: string;
|
|
@@ -17,13 +18,15 @@ export interface FormSelectArgs extends PowerSelectArgs {
|
|
|
17
18
|
containerClass?: string;
|
|
18
19
|
/** The size */
|
|
19
20
|
size?: 'sm' | 'lg';
|
|
21
|
+
/** If is multiple select instead of single */
|
|
22
|
+
isMultiple?: boolean;
|
|
20
23
|
onFocusIn?: (select: Select, event: FocusEvent) => void;
|
|
21
24
|
onFocusOut?: (select: Select, event: FocusEvent) => void;
|
|
22
25
|
}
|
|
23
26
|
export interface FormSelectSignature {
|
|
24
27
|
Args: FormSelectArgs;
|
|
25
28
|
Blocks: {
|
|
26
|
-
default: [
|
|
29
|
+
default: [unknown, Select];
|
|
27
30
|
};
|
|
28
31
|
Element: HTMLDivElement;
|
|
29
32
|
}
|
|
@@ -38,3 +41,4 @@ export default class FormSelect extends Component<FormSelectSignature> {
|
|
|
38
41
|
handleFocusOut(select: Select, event: FocusEvent): void;
|
|
39
42
|
handleChange(selection: unknown, select: Select, event?: Event): void;
|
|
40
43
|
}
|
|
44
|
+
//# sourceMappingURL=form-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-select.d.ts","sourceRoot":"","sources":["../../src/components/form-select.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAoB,EAClB,KAAK,eAAe,EACpB,KAAK,MAAM,EACZ,MAAM,4CAA4C,CAAC;AAKpD,YAAY,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AAEzE,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC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InputBaseSignature } from './form-input';
|
|
1
|
+
import { FormInputBase, type FormInputBaseSignature } from './form-input';
|
|
2
2
|
export interface FormTextareaSignature extends FormInputBaseSignature {
|
|
3
3
|
Element: HTMLTextAreaElement;
|
|
4
|
+
Blocks: {
|
|
5
|
+
default: [];
|
|
6
|
+
};
|
|
4
7
|
}
|
|
5
8
|
export default class FormTextarea extends FormInputBase<FormTextareaSignature> {
|
|
6
9
|
}
|
|
10
|
+
//# sourceMappingURL=form-textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-textarea.d.ts","sourceRoot":"","sources":["../../src/components/form-textarea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAM1E,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IACnE,OAAO,EAAE,mBAAmB,CAAC;IAC7B,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,aAAa,CAAC,qBAAqB,CAAC;CA4D7E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type FormFieldCheckbox from './components/form-field/checkbox';
|
|
2
|
+
import type FormFieldFeedback from './components/form-field/feedback';
|
|
3
|
+
import type FormFieldHint from './components/form-field/hint';
|
|
4
|
+
import type FormFieldInput from './components/form-field/input';
|
|
5
|
+
import type FormFieldLabel from './components/form-field/label';
|
|
6
|
+
import type FormFieldRadio from './components/form-field/radio';
|
|
7
|
+
import type FormFieldTextarea from './components/form-field/textarea';
|
|
8
|
+
import type FormCheckboxGroup from './components/form-checkbox-group';
|
|
9
|
+
import type FormCheckbox from './components/form-checkbox';
|
|
10
|
+
import type FormField from './components/form-field';
|
|
11
|
+
import type FormInput from './components/form-input';
|
|
12
|
+
import type FormRadioGroup from './components/form-radio-group';
|
|
13
|
+
import type FormRadio from './components/form-radio';
|
|
14
|
+
import type FormSelect from './components/form-select';
|
|
15
|
+
import type FormTextarea from './components/form-textarea';
|
|
16
|
+
export default interface Registry {
|
|
17
|
+
FormFieldCheckbox: typeof FormFieldCheckbox;
|
|
18
|
+
FormFieldFeedback: typeof FormFieldFeedback;
|
|
19
|
+
FormFieldHint: typeof FormFieldHint;
|
|
20
|
+
FormFieldInput: typeof FormFieldInput;
|
|
21
|
+
FormFieldLabel: typeof FormFieldLabel;
|
|
22
|
+
FormFieldRadio: typeof FormFieldRadio;
|
|
23
|
+
FormFieldTextarea: typeof FormFieldTextarea;
|
|
24
|
+
FormCheckboxGroup: typeof FormCheckboxGroup;
|
|
25
|
+
FormCheckbox: typeof FormCheckbox;
|
|
26
|
+
FormField: typeof FormField;
|
|
27
|
+
FormInput: typeof FormInput;
|
|
28
|
+
FormRadioGroup: typeof FormRadioGroup;
|
|
29
|
+
FormRadio: typeof FormRadio;
|
|
30
|
+
FormSelect: typeof FormSelect;
|
|
31
|
+
FormTextarea: typeof FormTextarea;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=template-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,iBAAiB,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,aAAa,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,iBAAiB,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,iBAAiB,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,YAAY,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,UAAU,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,YAAY,MAAM,4BAA4B,CAAC;AAE3D,MAAM,CAAC,OAAO,WAAW,QAAQ;IAC/B,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAC5C,YAAY,EAAE,OAAO,YAAY,CAAC;IAClC,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,UAAU,EAAE,OAAO,UAAU,CAAC;IAC9B,YAAY,EAAE,OAAO,YAAY,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-checkbox-group";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-checkbox";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-field/checkbox";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-field/feedback";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-field/hint";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-field/input";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-field/label";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-field/radio";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-field/textarea";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-field";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-input";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-radio-group";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-radio";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-select";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/forms/components/form-textarea";
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
import Component from '@glimmer/component';
|
|
6
|
+
import { action } from '@ember/object';
|
|
7
|
+
import { tracked } from '@glimmer/tracking';
|
|
8
|
+
import FormCheckbox from './form-checkbox.js';
|
|
9
|
+
import useFrontileClass from '@frontile/core/helpers/use-frontile-class';
|
|
10
|
+
import FormField from './form-field.js';
|
|
11
|
+
import { hash } from '@ember/helper';
|
|
12
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
13
|
+
import { setComponentTemplate } from '@ember/component';
|
|
14
|
+
|
|
15
|
+
var _class, _descriptor, _class2;
|
|
16
|
+
let FormCheckboxGroup = (_class = (_class2 = class FormCheckboxGroup extends Component {
|
|
17
|
+
constructor(...args) {
|
|
18
|
+
super(...args);
|
|
19
|
+
_initializerDefineProperty(this, "shouldShowErrorFeedback", _descriptor, this);
|
|
20
|
+
}
|
|
21
|
+
get showErrorFeedback() {
|
|
22
|
+
if (this.args.hasError === false) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if ((this.args.showError || this.args.hasSubmitted || this.shouldShowErrorFeedback) && this.args.errors && this.args.errors.length > 0) {
|
|
26
|
+
return true;
|
|
27
|
+
} else {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
handleChange(value1, event1) {
|
|
32
|
+
this.shouldShowErrorFeedback = true;
|
|
33
|
+
if (typeof this.args.onChange === 'function') {
|
|
34
|
+
this.args.onChange(value1, event1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, setComponentTemplate(precompileTemplate("\n <FormField @size={{@size}} class={{useFrontileClass \"form-checkbox-group\" @size (if @isInline \"inline\") class=@containerClass}} role=\"group\" ...attributes as |f|>\n {{#if @label}}\n <f.Label class={{useFrontileClass \"form-checkbox-group\" @size (if @isInline \"inline\") part=\"label\"}}>\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint class={{useFrontileClass \"form-checkbox-group\" @size (if @isInline \"inline\") part=\"hint\"}}>\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n {{yield (component FormCheckbox privateContainerClass=(useFrontileClass \"form-checkbox-group\" @size (if @isInline \"inline\") part=\"form-checkbox\") _parentOnChange=this.handleChange size=@size) (hash onChange=this.handleChange)}}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback class={{useFrontileClass \"form-checkbox-group\" @size (if @isInline \"inline\") part=\"feedback\"}} @errors={{@errors}} />\n {{/if}}\n </FormField>\n ", {
|
|
38
|
+
scope: () => ({
|
|
39
|
+
FormField,
|
|
40
|
+
useFrontileClass,
|
|
41
|
+
FormCheckbox,
|
|
42
|
+
hash
|
|
43
|
+
}),
|
|
44
|
+
strictMode: true
|
|
45
|
+
}), _class2), _class2), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "shouldShowErrorFeedback", [tracked], {
|
|
46
|
+
configurable: true,
|
|
47
|
+
enumerable: true,
|
|
48
|
+
writable: true,
|
|
49
|
+
initializer: function () {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}), _applyDecoratedDescriptor(_class.prototype, "handleChange", [action], Object.getOwnPropertyDescriptor(_class.prototype, "handleChange"), _class.prototype)), _class);
|
|
53
|
+
|
|
54
|
+
export { FormCheckboxGroup as default };
|
|
55
|
+
//# sourceMappingURL=form-checkbox-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-checkbox-group.js","sources":["../../src/components/form-checkbox-group.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport FormCheckbox from './form-checkbox';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nimport FormField from './form-field';\nimport { hash } from '@ember/helper';\nimport type { WithBoundArgs } from '@glint/template';\nexport interface FormCheckboxGroupArgs {\n /** The group label */ label?: string;\n /** A help text to be displayed */ hint?: string;\n /** If the form has been submitted, used to force displaying errors */ hasSubmitted?: boolean;\n /** If has errors */ hasError?: boolean;\n /** Force displaying errors */ showError?: boolean;\n /** A list of errors or a single text describing the error */ errors?: string[] | string;\n /** CSS classes to be added in the container element */ containerClass?: string;\n /** The size */ size?: 'sm' | 'lg';\n /** If the Checkbox should be in one line */ isInline?: boolean;\n /** Default callback added to the yielded FormCheckbox component, called when onchange is triggered */ onChange?: (value: unknown, event: Event) => void;\n}\nexport interface FormCheckboxGroupSignature {\n Args: FormCheckboxGroupArgs;\n Blocks: {\n default: [checkbox: WithBoundArgs<typeof FormCheckbox, 'privateContainerClass'> & WithBoundArgs<typeof FormCheckbox, '_parentOnChange'> & WithBoundArgs<typeof FormCheckbox, 'size'>, api: {\n onChange: (value: unknown, event: Event) => void;\n }];\n };\n Element: HTMLDivElement;\n}\nexport default class FormCheckboxGroup extends Component<FormCheckboxGroupSignature> {\n @tracked\n shouldShowErrorFeedback = false;\n get showErrorFeedback(): boolean {\n if (this.args.hasError === false) {\n return false;\n }\n if ((this.args.showError || this.args.hasSubmitted || this.shouldShowErrorFeedback) && this.args.errors && this.args.errors.length > 0) {\n return true;\n } else {\n return false;\n }\n }\n @action\n handleChange(value1: unknown, event1: Event): void {\n this.shouldShowErrorFeedback = true;\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(value1, event1);\n }\n }\n static{\n template(`\n <FormField\n @size={{@size}}\n class={{useFrontileClass\n \"form-checkbox-group\"\n @size\n (if @isInline \"inline\")\n class=@containerClass\n }}\n role=\"group\"\n ...attributes\n as |f|\n >\n {{#if @label}}\n <f.Label\n class={{useFrontileClass\n \"form-checkbox-group\"\n @size\n (if @isInline \"inline\")\n part=\"label\"\n }}\n >\n {{@label}}\n </f.Label>\n {{/if}}\n\n {{#if @hint}}\n <f.Hint\n class={{useFrontileClass\n \"form-checkbox-group\"\n @size\n (if @isInline \"inline\")\n part=\"hint\"\n }}\n >\n {{@hint}}\n </f.Hint>\n {{/if}}\n\n {{yield\n (component\n FormCheckbox\n privateContainerClass=(useFrontileClass\n \"form-checkbox-group\"\n @size\n (if @isInline \"inline\")\n part=\"form-checkbox\"\n )\n _parentOnChange=this.handleChange\n size=@size\n )\n (hash onChange=this.handleChange)\n }}\n\n {{#if this.showErrorFeedback}}\n <f.Feedback\n class={{useFrontileClass\n \"form-checkbox-group\"\n @size\n (if @isInline \"inline\")\n part=\"feedback\"\n }}\n @errors={{@errors}}\n />\n {{/if}}\n </FormField>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["FormCheckboxGroup","_class","_class2","Component","constructor","args","_initializerDefineProperty","_descriptor","showErrorFeedback","hasError","showError","hasSubmitted","shouldShowErrorFeedback","errors","length","handleChange","value1","event1","onChange","setComponentTemplate","precompileTemplate","scope","FormField","useFrontileClass","FormCheckbox","hash","strictMode","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor"],"mappings":";;;;;;;;;;;;;;;AA8BqBA,IAAAA,iBAAiB,IAAAC,MAAA,IAAAC,OAAA,GAAvB,MAAMF,iBAAiB,SAASG,SAAS,CAA6B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,kCAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;EAGjF,IAAIC,iBAAiBA,GAAY;AAC7B,IAAA,IAAI,IAAI,CAACH,IAAI,CAACI,QAAQ,KAAK,KAAK,EAAE;AAC9B,MAAA,OAAO,KAAK,CAAA;AAChB,KAAA;AACA,IAAA,IAAI,CAAC,IAAI,CAACJ,IAAI,CAACK,SAAS,IAAI,IAAI,CAACL,IAAI,CAACM,YAAY,IAAI,IAAI,CAACC,uBAAuB,KAAK,IAAI,CAACP,IAAI,CAACQ,MAAM,IAAI,IAAI,CAACR,IAAI,CAACQ,MAAM,CAACC,MAAM,GAAG,CAAC,EAAE;AACpI,MAAA,OAAO,IAAI,CAAA;AACf,KAAC,MAAM;AACH,MAAA,OAAO,KAAK,CAAA;AAChB,KAAA;AACJ,GAAA;AAEAC,EAAAA,YAAYA,CAACC,MAAe,EAAEC,MAAa,EAAQ;IAC/C,IAAI,CAACL,uBAAuB,GAAG,IAAI,CAAA;IACnC,IAAI,OAAO,IAAI,CAACP,IAAI,CAACa,QAAQ,KAAK,UAAU,EAAE;MAC1C,IAAI,CAACb,IAAI,CAACa,QAAQ,CAACF,MAAM,EAAEC,MAAM,CAAC,CAAA;AACtC,KAAA;AACJ,GAAA;AA2EJ,CAAC,EAAAE,oBAAA,CAzEOC,kBAAA,CAkEH,sgCAAA,EAAA;AAAAC,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