@frontile/forms 0.17.0-alpha.8 → 0.17.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon-main.js +0 -33
- package/declarations/components/checkbox-group.d.ts +41 -0
- package/declarations/components/checkbox-group.d.ts.map +1 -0
- package/declarations/components/checkbox.d.ts +39 -0
- package/declarations/components/checkbox.d.ts.map +1 -0
- package/declarations/components/form-control.d.ts +47 -0
- package/declarations/components/form-control.d.ts.map +1 -0
- package/declarations/components/form-description.d.ts +19 -0
- package/declarations/components/form-description.d.ts.map +1 -0
- package/declarations/components/form-feedback.d.ts +23 -0
- package/declarations/components/form-feedback.d.ts.map +1 -0
- package/declarations/components/form.d.ts +19 -0
- package/declarations/components/form.d.ts.map +1 -0
- package/declarations/components/icons.d.ts +8 -0
- package/declarations/components/icons.d.ts.map +1 -0
- package/declarations/components/input.d.ts +140 -0
- package/declarations/components/input.d.ts.map +1 -0
- package/declarations/components/label.d.ts +41 -0
- package/declarations/components/label.d.ts.map +1 -0
- package/declarations/components/native-select.d.ts +96 -21
- package/declarations/components/native-select.d.ts.map +1 -1
- package/declarations/components/radio-group.d.ts +44 -0
- package/declarations/components/radio-group.d.ts.map +1 -0
- package/declarations/components/radio.d.ts +40 -0
- package/declarations/components/radio.d.ts.map +1 -0
- package/declarations/components/select.d.ts +127 -15
- package/declarations/components/select.d.ts.map +1 -1
- package/declarations/components/textarea.d.ts +68 -0
- package/declarations/components/textarea.d.ts.map +1 -0
- package/declarations/index-CeaQc-U7.d.ts +3 -0
- package/declarations/index-CeaQc-U7.d.ts.map +1 -0
- package/declarations/index.d.ts +12 -2
- package/declarations/index.d.ts.map +1 -1
- package/declarations/template-registry.d.ts +13 -30
- package/declarations/template-registry.d.ts.map +1 -1
- package/declarations/utils/index.d.ts +3 -0
- package/declarations/utils/index.d.ts.map +1 -0
- package/dist/_app_/components/checkbox-group.js +1 -0
- package/dist/_app_/components/checkbox.js +1 -0
- package/dist/_app_/components/form-control.js +1 -0
- package/dist/_app_/components/form-description.js +1 -0
- package/dist/_app_/components/form-feedback.js +1 -0
- package/dist/_app_/components/form.js +1 -0
- package/dist/_app_/components/icons.js +1 -0
- package/dist/_app_/components/input.js +1 -0
- package/dist/_app_/components/label.js +1 -0
- package/dist/_app_/components/radio-group.js +1 -0
- package/dist/_app_/components/radio.js +1 -0
- package/dist/_app_/components/textarea.js +1 -0
- package/dist/components/checkbox-group.js +29 -0
- package/dist/components/checkbox-group.js.map +1 -0
- package/dist/components/checkbox.js +39 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/form-control.js +65 -0
- package/dist/components/form-control.js.map +1 -0
- package/dist/components/form-description.js +24 -0
- package/dist/components/form-description.js.map +1 -0
- package/dist/components/form-feedback.js +36 -0
- package/dist/components/form-feedback.js.map +1 -0
- package/dist/components/form.js +47 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/icons.js +13 -0
- package/dist/components/icons.js.map +1 -0
- package/dist/components/input.js +97 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.js +23 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/native-select.js +27 -23
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/radio-group.js +29 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/radio.js +38 -0
- package/dist/components/radio.js.map +1 -0
- package/dist/components/select.js +61 -42
- package/dist/components/select.js.map +1 -1
- package/dist/components/textarea.js +39 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/index-CeaQc-U7.js +23 -0
- package/dist/index-CeaQc-U7.js.map +1 -0
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +37 -39
- package/declarations/components/form-checkbox-group.d.ts +0 -50
- package/declarations/components/form-checkbox-group.d.ts.map +0 -1
- package/declarations/components/form-checkbox.d.ts +0 -49
- package/declarations/components/form-checkbox.d.ts.map +0 -1
- package/declarations/components/form-field/checkbox.d.ts +0 -19
- package/declarations/components/form-field/checkbox.d.ts.map +0 -1
- package/declarations/components/form-field/feedback.d.ts +0 -21
- package/declarations/components/form-field/feedback.d.ts.map +0 -1
- package/declarations/components/form-field/hint.d.ts +0 -17
- package/declarations/components/form-field/hint.d.ts.map +0 -1
- package/declarations/components/form-field/input.d.ts +0 -21
- package/declarations/components/form-field/input.d.ts.map +0 -1
- package/declarations/components/form-field/label.d.ts +0 -17
- package/declarations/components/form-field/label.d.ts.map +0 -1
- package/declarations/components/form-field/radio.d.ts +0 -20
- package/declarations/components/form-field/radio.d.ts.map +0 -1
- package/declarations/components/form-field/select.d.ts +0 -38
- package/declarations/components/form-field/select.d.ts.map +0 -1
- package/declarations/components/form-field/textarea.d.ts +0 -19
- package/declarations/components/form-field/textarea.d.ts.map +0 -1
- package/declarations/components/form-field.d.ts +0 -38
- package/declarations/components/form-field.d.ts.map +0 -1
- package/declarations/components/form-input.d.ts +0 -64
- package/declarations/components/form-input.d.ts.map +0 -1
- package/declarations/components/form-radio-group.d.ts +0 -48
- package/declarations/components/form-radio-group.d.ts.map +0 -1
- package/declarations/components/form-radio.d.ts +0 -54
- package/declarations/components/form-radio.d.ts.map +0 -1
- package/declarations/components/form-select.d.ts +0 -51
- package/declarations/components/form-select.d.ts.map +0 -1
- package/declarations/components/form-textarea.d.ts +0 -17
- package/declarations/components/form-textarea.d.ts.map +0 -1
- package/dist/_app_/components/form-checkbox-group.js +0 -1
- package/dist/_app_/components/form-checkbox.js +0 -1
- package/dist/_app_/components/form-field/checkbox.js +0 -1
- package/dist/_app_/components/form-field/feedback.js +0 -1
- package/dist/_app_/components/form-field/hint.js +0 -1
- package/dist/_app_/components/form-field/input.js +0 -1
- package/dist/_app_/components/form-field/label.js +0 -1
- package/dist/_app_/components/form-field/radio.js +0 -1
- package/dist/_app_/components/form-field/textarea.js +0 -1
- package/dist/_app_/components/form-field.js +0 -1
- package/dist/_app_/components/form-input.js +0 -1
- package/dist/_app_/components/form-radio-group.js +0 -1
- package/dist/_app_/components/form-radio.js +0 -1
- package/dist/_app_/components/form-select.js +0 -1
- package/dist/_app_/components/form-textarea.js +0 -1
- package/dist/components/form-checkbox-group.js +0 -77
- package/dist/components/form-checkbox-group.js.map +0 -1
- package/dist/components/form-checkbox.js +0 -59
- package/dist/components/form-checkbox.js.map +0 -1
- package/dist/components/form-field/checkbox.js +0 -38
- package/dist/components/form-field/checkbox.js.map +0 -1
- package/dist/components/form-field/feedback.js +0 -36
- package/dist/components/form-field/feedback.js.map +0 -1
- package/dist/components/form-field/hint.js +0 -24
- package/dist/components/form-field/hint.js.map +0 -1
- package/dist/components/form-field/input.js +0 -44
- package/dist/components/form-field/input.js.map +0 -1
- package/dist/components/form-field/label.js +0 -24
- package/dist/components/form-field/label.js.map +0 -1
- package/dist/components/form-field/radio.js +0 -37
- package/dist/components/form-field/radio.js.map +0 -1
- package/dist/components/form-field/textarea.js +0 -38
- package/dist/components/form-field/textarea.js.map +0 -1
- package/dist/components/form-field.js +0 -44
- package/dist/components/form-field.js.map +0 -1
- package/dist/components/form-input.js +0 -89
- package/dist/components/form-input.js.map +0 -1
- package/dist/components/form-radio-group.js +0 -77
- package/dist/components/form-radio-group.js.map +0 -1
- package/dist/components/form-radio.js +0 -63
- package/dist/components/form-radio.js.map +0 -1
- package/dist/components/form-select.js +0 -124
- package/dist/components/form-select.js.map +0 -1
- package/dist/components/form-textarea.js +0 -48
- package/dist/components/form-textarea.js.map +0 -1
package/addon-main.js
CHANGED
|
@@ -2,36 +2,3 @@
|
|
|
2
2
|
|
|
3
3
|
const { addonV1Shim } = require('@embroider/addon-shim');
|
|
4
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
|
-
// };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { Checkbox, type CheckboxSignature } from './checkbox';
|
|
3
|
+
import { type FormControlSharedArgs } from './form-control';
|
|
4
|
+
import { type CheckboxGroupVariants, type CheckboxGroupSlots, type SlotsToClasses } from '@frontile/theme';
|
|
5
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
6
|
+
interface Args extends FormControlSharedArgs {
|
|
7
|
+
name?: string;
|
|
8
|
+
onChange?: CheckboxSignature['Args']['onChange'];
|
|
9
|
+
size?: CheckboxGroupVariants['size'];
|
|
10
|
+
classes?: SlotsToClasses<CheckboxGroupSlots>;
|
|
11
|
+
orientation?: 'horizontal' | 'vertical';
|
|
12
|
+
}
|
|
13
|
+
interface CheckboxGroupSignature {
|
|
14
|
+
Args: Args;
|
|
15
|
+
Blocks: {
|
|
16
|
+
default: [Checkbox: WithBoundArgs<typeof Checkbox, 'name' | 'onChange'>];
|
|
17
|
+
};
|
|
18
|
+
Element: HTMLDivElement;
|
|
19
|
+
}
|
|
20
|
+
declare class CheckboxGroup extends Component<CheckboxGroupSignature> {
|
|
21
|
+
get classes(): {
|
|
22
|
+
base: (slotProps?: ({
|
|
23
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
24
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
25
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
26
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
27
|
+
optionsContainer: (slotProps?: ({
|
|
28
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
29
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
30
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
31
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
32
|
+
label: (slotProps?: ({
|
|
33
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
34
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | ({
|
|
35
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
36
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
37
|
+
} & {} & {};
|
|
38
|
+
}
|
|
39
|
+
export { CheckboxGroup, type CheckboxGroupSignature };
|
|
40
|
+
export default CheckboxGroup;
|
|
41
|
+
//# sourceMappingURL=checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../src/components/checkbox-group.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAe,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,UAAU,IAAK,SAAQ,qBAAqB;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAM7C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,OAAO,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC;KAC1E,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,cAAM,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IAC3D,IAAI,OAAO;;;;;;;;;;;;;;;;gBAKV;CA8BF;AAED,OAAO,EAAE,aAAa,EAAE,KAAK,sBAAsB,EAAE,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type FormControlSharedArgs } from './form-control';
|
|
3
|
+
import { type CheckboxVariants, type CheckboxSlots, type SlotsToClasses } from '@frontile/theme';
|
|
4
|
+
interface Args extends FormControlSharedArgs {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
name?: string;
|
|
7
|
+
size?: CheckboxVariants['size'];
|
|
8
|
+
classes?: SlotsToClasses<CheckboxSlots>;
|
|
9
|
+
onChange?: (value: boolean, event: Event) => void;
|
|
10
|
+
}
|
|
11
|
+
interface CheckboxSignature {
|
|
12
|
+
Args: Args;
|
|
13
|
+
Element: HTMLInputElement;
|
|
14
|
+
}
|
|
15
|
+
declare class Checkbox extends Component<CheckboxSignature> {
|
|
16
|
+
get isChecked(): boolean;
|
|
17
|
+
handleChange(event: Event): void;
|
|
18
|
+
get classes(): {
|
|
19
|
+
base: (slotProps?: ({
|
|
20
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
21
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
22
|
+
input: (slotProps?: ({
|
|
23
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
24
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
25
|
+
labelContainer: (slotProps?: ({
|
|
26
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
27
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
28
|
+
label: (slotProps?: ({
|
|
29
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
30
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
31
|
+
} & {
|
|
32
|
+
input: (slotProps?: ({
|
|
33
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
34
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
35
|
+
} & {};
|
|
36
|
+
}
|
|
37
|
+
export { Checkbox, type CheckboxSignature };
|
|
38
|
+
export default Checkbox;
|
|
39
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAe,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,UAAU,IAAK,SAAQ,qBAAqB;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAKxC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACnD;AAED,UAAU,iBAAiB;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,cAAM,QAAS,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACjD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAEO,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAUxC,IAAI,OAAO;;;;;;;;;;;;;;;;;WAKV;CA8DF;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import Feedback from './form-feedback';
|
|
3
|
+
import Description from './form-description';
|
|
4
|
+
import Label from './label';
|
|
5
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
6
|
+
interface FormControlSharedArgs {
|
|
7
|
+
label?: string;
|
|
8
|
+
isRequired?: boolean;
|
|
9
|
+
description?: string;
|
|
10
|
+
errors?: string[] | string;
|
|
11
|
+
isInvalid?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface Args extends FormControlSharedArgs {
|
|
14
|
+
id?: string;
|
|
15
|
+
size?: 'sm' | 'md' | 'lg';
|
|
16
|
+
preventErrorFeedback?: boolean;
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
interface FormControlSignature {
|
|
20
|
+
Args: Args;
|
|
21
|
+
Blocks: {
|
|
22
|
+
default: [
|
|
23
|
+
{
|
|
24
|
+
id: string;
|
|
25
|
+
isInvalid: boolean;
|
|
26
|
+
describedBy: (hasDescription?: string | boolean, hasFeedback?: string | boolean) => string | undefined;
|
|
27
|
+
Label: WithBoundArgs<typeof Label, 'for' | 'size' | 'isRequired'>;
|
|
28
|
+
Description: WithBoundArgs<typeof Description, 'id' | 'size'>;
|
|
29
|
+
Feedback: WithBoundArgs<typeof Feedback, 'id' | 'size' | 'messages' | 'intent'>;
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
label: [];
|
|
33
|
+
description: [];
|
|
34
|
+
};
|
|
35
|
+
Element: HTMLDivElement;
|
|
36
|
+
}
|
|
37
|
+
declare class FormControl extends Component<FormControlSignature> {
|
|
38
|
+
id: string;
|
|
39
|
+
get descriptionId(): string;
|
|
40
|
+
get feedbackId(): string;
|
|
41
|
+
describedBy: (hasDescription?: string | boolean, hasFeedback?: string | boolean) => string | undefined;
|
|
42
|
+
get isInvalid(): boolean;
|
|
43
|
+
get showErrorFeedback(): boolean;
|
|
44
|
+
}
|
|
45
|
+
export { FormControl, type FormControlSignature, type FormControlSharedArgs };
|
|
46
|
+
export default FormControl;
|
|
47
|
+
//# sourceMappingURL=form-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../src/components/form-control.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,UAAU,qBAAqB;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO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AG,OAAO,KAC7B,MAAM,GAAG,SAAS,CAcnB;IAEF,IAAI,SAAS,IAAI,OAAO,CASvB;IAED,IAAI,iBAAiB,IAAI,OAAO,CAK/B;CAkDF;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE,KAAK,qBAAqB,EAAE,CAAC;AAC9E,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type FormDescriptionVariants } from '@frontile/theme';
|
|
3
|
+
interface FormDescriptionSignature {
|
|
4
|
+
Args: {
|
|
5
|
+
id?: string;
|
|
6
|
+
size?: FormDescriptionVariants['size'];
|
|
7
|
+
class?: string;
|
|
8
|
+
};
|
|
9
|
+
Element: HTMLDivElement;
|
|
10
|
+
Blocks: {
|
|
11
|
+
default: [];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare class FormDescription extends Component<FormDescriptionSignature> {
|
|
15
|
+
get classes(): string;
|
|
16
|
+
}
|
|
17
|
+
export { FormDescription, type FormDescriptionSignature };
|
|
18
|
+
export default FormDescription;
|
|
19
|
+
//# sourceMappingURL=form-description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-description.d.ts","sourceRoot":"","sources":["../../src/components/form-description.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAa,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1E,UAAU,wBAAwB;IAChC,IAAI,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,CAAC;QAIZ,IAAI,CAAC,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAEvC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,cAAM,eAAgB,SAAQ,SAAS,CAAC,wBAAwB,CAAC;IAC/D,IAAI,OAAO,WAOV;CAeF;AAED,OAAO,EAAE,eAAe,EAAE,KAAK,wBAAwB,EAAE,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type FormFeedbackVariants } from '@frontile/theme';
|
|
3
|
+
interface FormFeedbackSignature {
|
|
4
|
+
Args: {
|
|
5
|
+
id?: string;
|
|
6
|
+
messages?: string[] | string;
|
|
7
|
+
intent?: FormFeedbackVariants['intent'];
|
|
8
|
+
size?: FormFeedbackVariants['size'];
|
|
9
|
+
class?: string;
|
|
10
|
+
};
|
|
11
|
+
Element: HTMLDivElement;
|
|
12
|
+
Blocks: {
|
|
13
|
+
default: [];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare class FormFeedback extends Component<FormFeedbackSignature> {
|
|
17
|
+
get isError(): boolean;
|
|
18
|
+
get classes(): string;
|
|
19
|
+
get messageText(): string;
|
|
20
|
+
}
|
|
21
|
+
export { FormFeedback, type FormFeedbackSignature };
|
|
22
|
+
export default FormFeedback;
|
|
23
|
+
//# sourceMappingURL=form-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-feedback.d.ts","sourceRoot":"","sources":["../../src/components/form-feedback.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAa,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,UAAU,qBAAqB;IAC7B,IAAI,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,CAAC;QAIZ,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAM7B,MAAM,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAKxC,IAAI,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,cAAM,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACzD,IAAI,OAAO,IAAI,OAAO,CAKrB;IAED,IAAI,OAAO,WAQV;IAED,IAAI,WAAW,IAAI,MAAM,CAQxB;CAiBF;AAED,OAAO,EAAE,YAAY,EAAE,KAAK,qBAAqB,EAAE,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
type FormDataEntryValue = NonNullable<ReturnType<FormData['get']>>;
|
|
3
|
+
type FormResultData = Record<string, FormDataEntryValue>;
|
|
4
|
+
interface FormSignature {
|
|
5
|
+
Element: HTMLFormElement;
|
|
6
|
+
Args: {
|
|
7
|
+
onChange: (data: FormResultData, eventType: 'input' | 'submit', event: Event | SubmitEvent) => void;
|
|
8
|
+
};
|
|
9
|
+
Blocks: {
|
|
10
|
+
default: [];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare class Form extends Component<FormSignature> {
|
|
14
|
+
handleInput: (event: Event | SubmitEvent, eventType?: "input" | "submit") => void;
|
|
15
|
+
handleSubmit: (event: SubmitEvent) => void;
|
|
16
|
+
}
|
|
17
|
+
export { Form, type FormSignature, type FormResultData };
|
|
18
|
+
export default Form;
|
|
19
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,KAAK,kBAAkB,GAAG,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnE,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAEzD,UAAU,aAAa;IACrB,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,EAAE;QACJ,QAAQ,EAAE,CACR,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,OAAO,GAAG,QAAQ,EAC7B,KAAK,EAAE,KAAK,GAAG,WAAW,KACvB,IAAI,CAAC;KACX,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,cAAM,IAAK,SAAQ,SAAS,CAAC,aAAa,CAAC;IACzC,WAAW,UACF,KAAK,GAAG,WAAW,cACf,OAAO,GAAG,QAAQ,UAwB7B;IAEF,YAAY,UAAW,WAAW,UAGhC;CAYH;AAED,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,CAAC;AACzD,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TOC } from '@ember/component/template-only';
|
|
2
|
+
declare const IconChevronUpDown: TOC<{
|
|
3
|
+
Element: SVGElement;
|
|
4
|
+
}>;
|
|
5
|
+
export { IconChevronUpDown };
|
|
6
|
+
declare const _default: import("@ember/component/template-only").TemplateOnlyComponent<never> & (abstract new () => import("@glint/template/-private/integration").InvokableInstance<() => import("@glint/template/-private/integration").ComponentReturn<{}>> & import("@glint/template/-private/integration").HasContext<import("@glint/template/-private/integration").TemplateContext<void, {}, {}, void>>);
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/components/icons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAE1D,QAAA,MAAM,iBAAiB,EAAE,GAAG,CAAC;IAC3B,OAAO,EAAE,UAAU,CAAC;CACrB,CAsBC,CAAC;AAEH,OAAO,EAAE,iBAAiB,EAAE,CAAC;;AAE7B,wBAEE"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type InputSlots, type InputVariants, type SlotsToClasses } from '@frontile/theme';
|
|
3
|
+
import { type FormControlSharedArgs } from './form-control';
|
|
4
|
+
interface Args extends FormControlSharedArgs {
|
|
5
|
+
type?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
size?: InputVariants['size'];
|
|
9
|
+
classes?: SlotsToClasses<InputSlots>;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to include a clear button
|
|
12
|
+
*/
|
|
13
|
+
isClearable?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Controls pointer-events property of startContent.
|
|
16
|
+
* If you want to pass the click event to the input, set it to `none`.
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue 'auto'
|
|
19
|
+
*/
|
|
20
|
+
startContentPointerEvents?: 'none' | 'auto';
|
|
21
|
+
/**
|
|
22
|
+
* Controls pointer-events property of endContent.
|
|
23
|
+
* If you want to pass the click event to the input, set it to `none`.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue 'auto'
|
|
26
|
+
*/
|
|
27
|
+
endContentPointerEvents?: 'none' | 'auto';
|
|
28
|
+
/**
|
|
29
|
+
* Callback when oninput is triggered
|
|
30
|
+
*/
|
|
31
|
+
onInput?: (value: string, event?: InputEvent) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Callback when onchange is triggered
|
|
34
|
+
*/
|
|
35
|
+
onChange?: (value: string, event?: InputEvent) => void;
|
|
36
|
+
}
|
|
37
|
+
interface InputSignature {
|
|
38
|
+
Args: Args;
|
|
39
|
+
Blocks: {
|
|
40
|
+
startContent: [];
|
|
41
|
+
endContent: [];
|
|
42
|
+
};
|
|
43
|
+
Element: HTMLInputElement;
|
|
44
|
+
}
|
|
45
|
+
declare class Input extends Component<InputSignature> {
|
|
46
|
+
uncontrolledValue: string;
|
|
47
|
+
inputRef: {
|
|
48
|
+
readonly element: HTMLInputElement | undefined;
|
|
49
|
+
setup: import("ember-modifier").FunctionBasedModifier<{
|
|
50
|
+
Args: {
|
|
51
|
+
Positional: unknown[];
|
|
52
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
53
|
+
};
|
|
54
|
+
Element: HTMLInputElement;
|
|
55
|
+
}>;
|
|
56
|
+
};
|
|
57
|
+
get isControlled(): boolean;
|
|
58
|
+
get value(): string | undefined;
|
|
59
|
+
get type(): string;
|
|
60
|
+
handleOnInput(event: Event): void;
|
|
61
|
+
handleOnChange(event: Event): void;
|
|
62
|
+
clearValue(): void;
|
|
63
|
+
get isClearable(): boolean;
|
|
64
|
+
get classes(): {
|
|
65
|
+
base: (slotProps?: ({
|
|
66
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
67
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
68
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
69
|
+
hasStartContent?: boolean | undefined;
|
|
70
|
+
hasEndContent?: boolean | undefined;
|
|
71
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
72
|
+
innerContainer: (slotProps?: ({
|
|
73
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
74
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
75
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
76
|
+
hasStartContent?: boolean | undefined;
|
|
77
|
+
hasEndContent?: boolean | undefined;
|
|
78
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
79
|
+
startContent: (slotProps?: ({
|
|
80
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
81
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
82
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
83
|
+
hasStartContent?: boolean | undefined;
|
|
84
|
+
hasEndContent?: boolean | undefined;
|
|
85
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
86
|
+
endContent: (slotProps?: ({
|
|
87
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
88
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
89
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
90
|
+
hasStartContent?: boolean | undefined;
|
|
91
|
+
hasEndContent?: boolean | undefined;
|
|
92
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
93
|
+
input: (slotProps?: ({
|
|
94
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
95
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
96
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
97
|
+
hasStartContent?: boolean | undefined;
|
|
98
|
+
hasEndContent?: boolean | undefined;
|
|
99
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
100
|
+
} & {
|
|
101
|
+
base: (slotProps?: ({
|
|
102
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
103
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
104
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
105
|
+
hasStartContent?: boolean | undefined;
|
|
106
|
+
hasEndContent?: boolean | undefined;
|
|
107
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
108
|
+
innerContainer: (slotProps?: ({
|
|
109
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
110
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
111
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
112
|
+
hasStartContent?: boolean | undefined;
|
|
113
|
+
hasEndContent?: boolean | undefined;
|
|
114
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
115
|
+
startContent: (slotProps?: ({
|
|
116
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
117
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
118
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
119
|
+
hasStartContent?: boolean | undefined;
|
|
120
|
+
hasEndContent?: boolean | undefined;
|
|
121
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
122
|
+
endContent: (slotProps?: ({
|
|
123
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
124
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
125
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
126
|
+
hasStartContent?: boolean | undefined;
|
|
127
|
+
hasEndContent?: boolean | undefined;
|
|
128
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
129
|
+
input: (slotProps?: ({
|
|
130
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
131
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
132
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
133
|
+
hasStartContent?: boolean | undefined;
|
|
134
|
+
hasEndContent?: boolean | undefined;
|
|
135
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
136
|
+
} & {};
|
|
137
|
+
}
|
|
138
|
+
export { Input, type InputSignature };
|
|
139
|
+
export default Input;
|
|
140
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAKzE,UAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAKV;CAgEF;AAED,OAAO,EAAE,KAAK,EAAE,KAAK,cAAc,EAAE,CAAC;AACtC,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type LabelSlots, type LabelVariants, type SlotsToClasses } from '@frontile/theme';
|
|
3
|
+
interface LabelSignature {
|
|
4
|
+
Args: {
|
|
5
|
+
/**
|
|
6
|
+
* The 'for' attribute of a <label>.
|
|
7
|
+
*/
|
|
8
|
+
for?: string;
|
|
9
|
+
size?: LabelVariants['size'];
|
|
10
|
+
classes?: SlotsToClasses<LabelSlots>;
|
|
11
|
+
/**
|
|
12
|
+
* The class name to be passed to the label base slot.
|
|
13
|
+
*/
|
|
14
|
+
class?: string;
|
|
15
|
+
isRequired?: boolean;
|
|
16
|
+
};
|
|
17
|
+
Element: HTMLLabelElement;
|
|
18
|
+
Blocks: {
|
|
19
|
+
default: [];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
declare class Label extends Component<LabelSignature> {
|
|
23
|
+
get classes(): {
|
|
24
|
+
base: (slotProps?: ({
|
|
25
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
26
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
27
|
+
asterisk: (slotProps?: ({
|
|
28
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
29
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
30
|
+
} & {
|
|
31
|
+
base: (slotProps?: ({
|
|
32
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
33
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
34
|
+
asterisk: (slotProps?: ({
|
|
35
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
36
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
37
|
+
} & {};
|
|
38
|
+
}
|
|
39
|
+
export { Label, type LabelSignature };
|
|
40
|
+
export default Label;
|
|
41
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,UAAU,cAAc;IACtB,IAAI,EAAE;QACJ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAKb,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;QAErC;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAMf,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,cAAM,KAAM,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC3C,IAAI,OAAO;;;;;;;;;;;;;;WAKV;CAuBF;AAED,OAAO,EAAE,KAAK,EAAE,KAAK,cAAc,EAAE,CAAC;AACtC,eAAe,KAAK,CAAC"}
|
|
@@ -1,26 +1,48 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
+
import { type NativeSelectSlots, type NativeSelectVariants, type SlotsToClasses } from '@frontile/theme';
|
|
3
|
+
import { type FormControlSharedArgs } from './form-control';
|
|
2
4
|
import { ListManager, type ListItem } from '@frontile/collections/utils/listManager';
|
|
3
5
|
import type { WithBoundArgs } from '@glint/template';
|
|
4
6
|
type ItemCompBounded = WithBoundArgs<typeof NativeSelectItem, 'manager'>;
|
|
5
|
-
interface
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
interface Args<T> extends FormControlSharedArgs {
|
|
8
|
+
selectionMode?: 'single' | 'multiple';
|
|
9
|
+
selectedKeys?: string[];
|
|
10
|
+
disabledKeys?: string[];
|
|
11
|
+
allowEmpty?: boolean;
|
|
12
|
+
items?: T[];
|
|
13
|
+
id?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
size?: NativeSelectVariants['size'];
|
|
16
|
+
classes?: SlotsToClasses<NativeSelectSlots>;
|
|
17
|
+
/**
|
|
18
|
+
* Placeholder text used when `allowEmpty` is set to `true`.
|
|
19
|
+
*/
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
onAction?: (key: string) => void;
|
|
22
|
+
onSelectionChange?: (key: string[]) => void;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
onItemsChange?: (items: ListItem[], action: 'add' | 'remove') => void;
|
|
27
|
+
/**
|
|
28
|
+
* Controls pointer-events property of startContent.
|
|
29
|
+
* If you want to pass the click event to the input, set it to `none`.
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue 'auto'
|
|
32
|
+
*/
|
|
33
|
+
startContentPointerEvents?: 'none' | 'auto';
|
|
34
|
+
/**
|
|
35
|
+
* Controls pointer-events property of endContent.
|
|
36
|
+
* Defauled to `none` to pass the click event to the input. If your content
|
|
37
|
+
* needs to capture events, consider adding `pointer-events-auto` class to that
|
|
38
|
+
* element only.
|
|
39
|
+
*
|
|
40
|
+
* @defaultValue 'none'
|
|
41
|
+
*/
|
|
42
|
+
endContentPointerEvents?: 'none' | 'auto';
|
|
43
|
+
}
|
|
44
|
+
interface NativeSelectSignature<T> {
|
|
45
|
+
Args: Args<T>;
|
|
24
46
|
Element: HTMLSelectElement;
|
|
25
47
|
Blocks: {
|
|
26
48
|
item: [{
|
|
@@ -32,11 +54,64 @@ interface NativeSelectSignature<T = unknown> {
|
|
|
32
54
|
default: [{
|
|
33
55
|
Item: ItemCompBounded;
|
|
34
56
|
}];
|
|
57
|
+
startContent: [];
|
|
58
|
+
endContent: [];
|
|
35
59
|
};
|
|
36
60
|
}
|
|
37
|
-
declare class NativeSelect extends Component<NativeSelectSignature
|
|
61
|
+
declare class NativeSelect<T = unknown> extends Component<NativeSelectSignature<T>> {
|
|
38
62
|
listManager: ListManager;
|
|
39
|
-
get
|
|
63
|
+
get classes(): {
|
|
64
|
+
base: (slotProps?: ({
|
|
65
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
66
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
67
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
68
|
+
hasStartContent?: boolean | undefined;
|
|
69
|
+
hasEndContent?: boolean | undefined;
|
|
70
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
71
|
+
innerContainer: (slotProps?: ({
|
|
72
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
73
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
74
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
75
|
+
hasStartContent?: boolean | undefined;
|
|
76
|
+
hasEndContent?: boolean | undefined;
|
|
77
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
78
|
+
startContent: (slotProps?: ({
|
|
79
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
80
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
81
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
82
|
+
hasStartContent?: boolean | undefined;
|
|
83
|
+
hasEndContent?: boolean | undefined;
|
|
84
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
85
|
+
endContent: (slotProps?: ({
|
|
86
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
87
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
88
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
89
|
+
hasStartContent?: boolean | undefined;
|
|
90
|
+
hasEndContent?: boolean | undefined;
|
|
91
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
92
|
+
input: (slotProps?: ({
|
|
93
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
94
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
95
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
96
|
+
hasStartContent?: boolean | undefined;
|
|
97
|
+
hasEndContent?: boolean | undefined;
|
|
98
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
99
|
+
} & {
|
|
100
|
+
input: (slotProps?: ({
|
|
101
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
102
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
103
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
104
|
+
hasStartContent?: boolean | undefined;
|
|
105
|
+
hasEndContent?: boolean | undefined;
|
|
106
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
107
|
+
icon: (slotProps?: ({
|
|
108
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
109
|
+
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
110
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
111
|
+
hasStartContent?: boolean | undefined;
|
|
112
|
+
hasEndContent?: boolean | undefined;
|
|
113
|
+
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
114
|
+
} & {};
|
|
40
115
|
get isMultiple(): boolean;
|
|
41
116
|
handleOnChange(event: Event): void;
|
|
42
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EACL,WAAW,EAEX,KAAK,QAAQ,EACd,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,KAAK,eAAe,GAAG,aAAa,CAAC,OAAO,gBAAgB,EAAE,SAAS,CAAC,CAAC;AAEzE,UAAU,IAAI,CAAC,CAAC,CAAE,SAAQ,qBAAqB;IAC7C,aAAa,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAE5C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,E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