@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
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<FormField
|
|
2
|
-
@size={{@size}}
|
|
3
|
-
class={{use-frontile-class "form-textarea" @size class=@containerClass}}
|
|
4
|
-
as |f|
|
|
5
|
-
>
|
|
6
|
-
{{#if @label}}
|
|
7
|
-
<f.Label
|
|
8
|
-
class={{use-frontile-class "form-textarea" @size part="label"}}
|
|
9
|
-
>
|
|
10
|
-
{{@label}}
|
|
11
|
-
</f.Label>
|
|
12
|
-
{{/if}}
|
|
13
|
-
|
|
14
|
-
{{#if @hint}}
|
|
15
|
-
<f.Hint
|
|
16
|
-
class={{use-frontile-class "form-textarea" @size part="hint"}}
|
|
17
|
-
>
|
|
18
|
-
{{@hint}}
|
|
19
|
-
</f.Hint>
|
|
20
|
-
{{/if}}
|
|
21
|
-
|
|
22
|
-
<f.Textarea
|
|
23
|
-
{{on "focus" this.handleFocusIn}}
|
|
24
|
-
{{on "blur" this.handleFocusOut}}
|
|
25
|
-
|
|
26
|
-
@onInput={{@onInput}}
|
|
27
|
-
@onChange={{@onChange}}
|
|
28
|
-
@value={{@value}}
|
|
29
|
-
|
|
30
|
-
class={{use-frontile-class "form-textarea" @size part="textarea"}}
|
|
31
|
-
aria-invalid={{if this.showErrorFeedback "true"}}
|
|
32
|
-
aria-describedby="{{if @hint f.hintId}}{{if this.showErrorFeedback (concat " " f.feedbackId)}}"
|
|
33
|
-
...attributes
|
|
34
|
-
/>
|
|
35
|
-
|
|
36
|
-
{{yield}}
|
|
37
|
-
|
|
38
|
-
{{#if this.showErrorFeedback}}
|
|
39
|
-
<f.Feedback
|
|
40
|
-
class={{use-frontile-class "form-textarea" @size part="feedback"}}
|
|
41
|
-
@errors={{@errors}}
|
|
42
|
-
/>
|
|
43
|
-
{{/if}}
|
|
44
|
-
</FormField>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-checkbox-group';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-checkbox';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-field/checkbox';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-field/feedback';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-field/hint';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-field';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-field/input';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-field/label';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-field/radio';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-field/textarea';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-input';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-radio-group';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-radio';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-select';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@frontile/forms/components/form-textarea';
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import FormFieldCheckbox from './checkbox';
|
|
3
|
-
import FormFieldFeedback from './feedback';
|
|
4
|
-
import FormFieldHint from './hint';
|
|
5
|
-
import FormFieldInput from './input';
|
|
6
|
-
import FormFieldLabel from './label';
|
|
7
|
-
import FormFieldRadio from './radio';
|
|
8
|
-
import FormFieldTextarea from './textarea';
|
|
9
|
-
export interface FormFieldArgs {
|
|
10
|
-
size?: 'sm' | 'lg';
|
|
11
|
-
}
|
|
12
|
-
export interface FormFieldSignature {
|
|
13
|
-
Args: FormFieldArgs;
|
|
14
|
-
Blocks: {
|
|
15
|
-
default: [
|
|
16
|
-
{
|
|
17
|
-
id: string;
|
|
18
|
-
hintId: string;
|
|
19
|
-
feedbackId: string;
|
|
20
|
-
Label: FormFieldLabel;
|
|
21
|
-
Hint: FormFieldHint;
|
|
22
|
-
Feedback: FormFieldFeedback;
|
|
23
|
-
Input: FormFieldInput;
|
|
24
|
-
Textarea: FormFieldTextarea;
|
|
25
|
-
Checkbox: FormFieldCheckbox;
|
|
26
|
-
Radio: FormFieldRadio;
|
|
27
|
-
}
|
|
28
|
-
];
|
|
29
|
-
};
|
|
30
|
-
Element: HTMLDivElement;
|
|
31
|
-
}
|
|
32
|
-
export default class FormField extends Component<FormFieldSignature> {
|
|
33
|
-
id: string;
|
|
34
|
-
get hintId(): string;
|
|
35
|
-
get feedbackId(): string;
|
|
36
|
-
}
|
package/config/environment.js
DELETED
package/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
name: require('./package').name,
|
|
5
|
-
options: {
|
|
6
|
-
'ember-power-select': {
|
|
7
|
-
theme: false
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
included(includer, ...rest) {
|
|
12
|
-
const app = includer.app || includer;
|
|
13
|
-
const powerSelectOptions = app.options['ember-power-select'] || {};
|
|
14
|
-
powerSelectOptions.theme = false;
|
|
15
|
-
app.options['ember-power-select'] = powerSelectOptions;
|
|
16
|
-
|
|
17
|
-
// make sure to include ember-basic-dropdown styles
|
|
18
|
-
app.__skipEmberBasicDropdownStyles = true;
|
|
19
|
-
app.import(
|
|
20
|
-
'node_modules/ember-basic-dropdown/vendor/ember-basic-dropdown.css'
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
this._super.included.apply(this, [app, ...rest]);
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
// Ember does not call contentFor on nested addons, so we must call it
|
|
27
|
-
// manually.
|
|
28
|
-
contentFor(type, config) {
|
|
29
|
-
const emberPowerSelect = this.addons.find(
|
|
30
|
-
(a) => a.name === 'ember-power-select'
|
|
31
|
-
);
|
|
32
|
-
return emberPowerSelect.contentFor(type, config);
|
|
33
|
-
}
|
|
34
|
-
};
|
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": ".",
|
|
5
|
-
"paths": {
|
|
6
|
-
"dummy/tests/*": ["tests/*"],
|
|
7
|
-
"dummy/*": ["tests/dummy/app/*", "app/*"],
|
|
8
|
-
"@frontile/forms": ["addon"],
|
|
9
|
-
"@frontile/forms/*": ["addon/*"],
|
|
10
|
-
"@frontile/forms/test-support": ["addon-test-support"],
|
|
11
|
-
"@frontile/forms/test-support/*": ["addon-test-support/*"],
|
|
12
|
-
"*": ["types/*"]
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"include": [
|
|
16
|
-
"app/**/*",
|
|
17
|
-
"addon/**/*",
|
|
18
|
-
"tests/**/*",
|
|
19
|
-
"types/**/*",
|
|
20
|
-
"test-support/**/*",
|
|
21
|
-
"addon-test-support/**/*"
|
|
22
|
-
]
|
|
23
|
-
}
|
package/types/dummy/index.d.ts
DELETED
|
File without changes
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare module 'ember-power-select/test-support' {
|
|
2
|
-
export function selectChoose(
|
|
3
|
-
cssPath: string,
|
|
4
|
-
optionTextOrOptionSelector: string,
|
|
5
|
-
index?: number
|
|
6
|
-
): Promise<void>;
|
|
7
|
-
export function selectSearch(
|
|
8
|
-
cssPath: string,
|
|
9
|
-
searchText: string
|
|
10
|
-
): Promise<void>;
|
|
11
|
-
export function removeMultipleOption(
|
|
12
|
-
cssPath: string,
|
|
13
|
-
optionText: string
|
|
14
|
-
): Promise<void>;
|
|
15
|
-
export function clearSelected(
|
|
16
|
-
cssPath: string,
|
|
17
|
-
optionText: string
|
|
18
|
-
): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare module 'ember-power-select/test-support/helpers' {
|
|
22
|
-
export function clickTrigger(scope?: string): Promise<void>;
|
|
23
|
-
export function typeInSearch(text: string): Promise<void>;
|
|
24
|
-
export function selectChoose(
|
|
25
|
-
cssPath: string,
|
|
26
|
-
optionTextOrOptionSelector: string,
|
|
27
|
-
index?: number
|
|
28
|
-
): Promise<void>;
|
|
29
|
-
}
|
package/types/global.d.ts
DELETED
package/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import 'ember-source/types';
|