@vuecs/forms 4.0.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/LICENSE +201 -0
- package/README.md +43 -0
- package/dist/components/constants.d.ts +5 -0
- package/dist/components/constants.d.ts.map +1 -0
- package/dist/components/form-checkbox/FormCheckbox.vue.d.ts +205 -0
- package/dist/components/form-checkbox/FormCheckbox.vue.d.ts.map +1 -0
- package/dist/components/form-checkbox/index.d.ts +5 -0
- package/dist/components/form-checkbox/index.d.ts.map +1 -0
- package/dist/components/form-checkbox-group/FormCheckboxGroup.vue.d.ts +170 -0
- package/dist/components/form-checkbox-group/FormCheckboxGroup.vue.d.ts.map +1 -0
- package/dist/components/form-checkbox-group/index.d.ts +5 -0
- package/dist/components/form-checkbox-group/index.d.ts.map +1 -0
- package/dist/components/form-group/FormGroup.vue.d.ts +218 -0
- package/dist/components/form-group/FormGroup.vue.d.ts.map +1 -0
- package/dist/components/form-group/index.d.ts +5 -0
- package/dist/components/form-group/index.d.ts.map +1 -0
- package/dist/components/form-input/FormInput.vue.d.ts +195 -0
- package/dist/components/form-input/FormInput.vue.d.ts.map +1 -0
- package/dist/components/form-input/index.d.ts +5 -0
- package/dist/components/form-input/index.d.ts.map +1 -0
- package/dist/components/form-number/FormNumber.vue.d.ts +268 -0
- package/dist/components/form-number/FormNumber.vue.d.ts.map +1 -0
- package/dist/components/form-number/index.d.ts +5 -0
- package/dist/components/form-number/index.d.ts.map +1 -0
- package/dist/components/form-pin/FormPin.vue.d.ts +221 -0
- package/dist/components/form-pin/FormPin.vue.d.ts.map +1 -0
- package/dist/components/form-pin/index.d.ts +5 -0
- package/dist/components/form-pin/index.d.ts.map +1 -0
- package/dist/components/form-radio/FormRadio.vue.d.ts +170 -0
- package/dist/components/form-radio/FormRadio.vue.d.ts.map +1 -0
- package/dist/components/form-radio/index.d.ts +5 -0
- package/dist/components/form-radio/index.d.ts.map +1 -0
- package/dist/components/form-radio-group/FormRadioGroup.vue.d.ts +172 -0
- package/dist/components/form-radio-group/FormRadioGroup.vue.d.ts.map +1 -0
- package/dist/components/form-radio-group/index.d.ts +5 -0
- package/dist/components/form-radio-group/index.d.ts.map +1 -0
- package/dist/components/form-select/FormSelect.vue.d.ts +172 -0
- package/dist/components/form-select/FormSelect.vue.d.ts.map +1 -0
- package/dist/components/form-select/index.d.ts +5 -0
- package/dist/components/form-select/index.d.ts.map +1 -0
- package/dist/components/form-select-search/FormSelectSearch.vue.d.ts +272 -0
- package/dist/components/form-select-search/FormSelectSearch.vue.d.ts.map +1 -0
- package/dist/components/form-select-search/FormSelectSearchEntry.vue.d.ts +40 -0
- package/dist/components/form-select-search/FormSelectSearchEntry.vue.d.ts.map +1 -0
- package/dist/components/form-select-search/index.d.ts +6 -0
- package/dist/components/form-select-search/index.d.ts.map +1 -0
- package/dist/components/form-select-search/type.d.ts +10 -0
- package/dist/components/form-select-search/type.d.ts.map +1 -0
- package/dist/components/form-slider/FormSlider.vue.d.ts +227 -0
- package/dist/components/form-slider/FormSlider.vue.d.ts.map +1 -0
- package/dist/components/form-slider/index.d.ts +5 -0
- package/dist/components/form-slider/index.d.ts.map +1 -0
- package/dist/components/form-switch/FormSwitch.vue.d.ts +204 -0
- package/dist/components/form-switch/FormSwitch.vue.d.ts.map +1 -0
- package/dist/components/form-switch/index.d.ts +5 -0
- package/dist/components/form-switch/index.d.ts.map +1 -0
- package/dist/components/form-tags/FormTags.vue.d.ts +255 -0
- package/dist/components/form-tags/FormTags.vue.d.ts.map +1 -0
- package/dist/components/form-tags/index.d.ts +5 -0
- package/dist/components/form-tags/index.d.ts.map +1 -0
- package/dist/components/form-textarea/FormTextarea.vue.d.ts +89 -0
- package/dist/components/form-textarea/FormTextarea.vue.d.ts.map +1 -0
- package/dist/components/form-textarea/index.d.ts +5 -0
- package/dist/components/form-textarea/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +18 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/type.d.ts +17 -0
- package/dist/components/type.d.ts.map +1 -0
- package/dist/components/validation-group/ValidationGroup.vue.d.ts +119 -0
- package/dist/components/validation-group/ValidationGroup.vue.d.ts.map +1 -0
- package/dist/components/validation-group/index.d.ts +5 -0
- package/dist/components/validation-group/index.d.ts.map +1 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/use-submit-button.d.ts +63 -0
- package/dist/composables/use-submit-button.d.ts.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1764 -0
- package/dist/index.mjs.map +1 -0
- package/dist/style.css +791 -0
- package/dist/type.d.ts +3 -0
- package/dist/type.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/option.d.ts +40 -0
- package/dist/types/option.d.ts.map +1 -0
- package/dist/vue.d.ts +20 -0
- package/dist/vue.d.ts.map +1 -0
- package/package.json +68 -0
package/dist/type.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../src/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AcceptableValue } from 'reka-ui';
|
|
2
|
+
/**
|
|
3
|
+
* A single selectable option in a form control (Select, SelectSearch, …).
|
|
4
|
+
*
|
|
5
|
+
* `value` is the bound value (what flows through `v-model`); `label` is the
|
|
6
|
+
* display string. This matches HTML `<option value="...">label</option>`,
|
|
7
|
+
* Reka UI, and every mainstream form-library convention.
|
|
8
|
+
*/
|
|
9
|
+
export type FormOption<T extends AcceptableValue = AcceptableValue> = {
|
|
10
|
+
/** Bound value — flows through `v-model`. */
|
|
11
|
+
value: T;
|
|
12
|
+
/** Display string the user sees. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** When `true`, the option is rendered but not selectable. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Optional secondary line shown below or beside the label. */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Optional icon — class string, URL, or any token a consumer slot can render. */
|
|
19
|
+
icon?: string;
|
|
20
|
+
/** Free-form metadata for custom rendering / filtering / consumer-side logic. */
|
|
21
|
+
meta?: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A group of options rendered under a shared label (HTML `<optgroup>`).
|
|
25
|
+
*/
|
|
26
|
+
export type FormOptionGroup<T extends AcceptableValue = AcceptableValue> = {
|
|
27
|
+
/** Group heading text. */
|
|
28
|
+
label: string;
|
|
29
|
+
/** Options inside this group. */
|
|
30
|
+
options: FormOption<T>[];
|
|
31
|
+
/** When `true`, every option in the group is non-selectable. */
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* What `<VCFormSelect>` and friends accept — flat options, groups, or a mix.
|
|
36
|
+
*/
|
|
37
|
+
export type FormOptionItems<T extends AcceptableValue = AcceptableValue> = (FormOption<T> | FormOptionGroup<T>)[];
|
|
38
|
+
/** Type guard for narrowing in render code. */
|
|
39
|
+
export declare const isFormOptionGroup: <T extends AcceptableValue>(item: FormOption<T> | FormOptionGroup<T>) => item is FormOptionGroup<T>;
|
|
40
|
+
//# sourceMappingURL=option.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../src/types/option.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,IAAI;IAClE,6CAA6C;IAC7C,KAAK,EAAE,CAAC,CAAC;IACT,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,IAAI;IACvE,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IACzB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,IAAO,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAErH,+CAA+C;AAC/C,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,eAAe,EACvD,MAAM,UAAU,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,KACzC,IAAI,IAAI,eAAe,CAAC,CAAC,CAAwD,CAAC"}
|
package/dist/vue.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { VCFormCheckbox, VCFormCheckboxGroup, VCFormGroup, VCFormInput, VCFormNumber, VCFormPin, VCFormRadio, VCFormRadioGroup, VCFormSelect, VCFormSelectSearch, VCFormSlider, VCFormSwitch, VCFormTags, VCFormTextarea } from './components';
|
|
2
|
+
declare module '@vue/runtime-core' {
|
|
3
|
+
interface GlobalComponents {
|
|
4
|
+
VCFormCheckbox: typeof VCFormCheckbox;
|
|
5
|
+
VCFormCheckboxGroup: typeof VCFormCheckboxGroup;
|
|
6
|
+
VCFormGroup: typeof VCFormGroup;
|
|
7
|
+
VCFormInput: typeof VCFormInput;
|
|
8
|
+
VCFormNumber: typeof VCFormNumber;
|
|
9
|
+
VCFormPin: typeof VCFormPin;
|
|
10
|
+
VCFormRadio: typeof VCFormRadio;
|
|
11
|
+
VCFormRadioGroup: typeof VCFormRadioGroup;
|
|
12
|
+
VCFormSelect: typeof VCFormSelect;
|
|
13
|
+
VCFormSelectSearch: typeof VCFormSelectSearch;
|
|
14
|
+
VCFormSlider: typeof VCFormSlider;
|
|
15
|
+
VCFormSwitch: typeof VCFormSwitch;
|
|
16
|
+
VCFormTags: typeof VCFormTags;
|
|
17
|
+
VCFormTextarea: typeof VCFormTextarea;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../src/vue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,cAAc,EACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,QAAQ,mBAAmB,CAAC;IAC/B,UAAiB,gBAAgB;QAC7B,cAAc,EAAE,OAAO,cAAc,CAAC;QACtC,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;QAChD,WAAW,EAAE,OAAO,WAAW,CAAC;QAChC,WAAW,EAAE,OAAO,WAAW,CAAC;QAChC,YAAY,EAAE,OAAO,YAAY,CAAC;QAClC,SAAS,EAAE,OAAO,SAAS,CAAC;QAC5B,WAAW,EAAE,OAAO,WAAW,CAAC;QAChC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;QAC1C,YAAY,EAAE,OAAO,YAAY,CAAC;QAClC,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;QAC9C,YAAY,EAAE,OAAO,YAAY,CAAC;QAClC,YAAY,EAAE,OAAO,YAAY,CAAC;QAClC,UAAU,EAAE,OAAO,UAAU,CAAC;QAC9B,cAAc,EAAE,OAAO,cAAc,CAAC;KACzC;CACJ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vuecs/forms",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Form controls (inputs, checkbox, switch, select, textarea, range slider) on Reka UI primitives.",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./package.json": "./package.json",
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"style": "./dist/style.css",
|
|
11
|
+
"import": "./dist/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"./style.css": "./dist/style.css",
|
|
14
|
+
"./dist/style.css": "./dist/style.css"
|
|
15
|
+
},
|
|
16
|
+
"style": "./dist/style.css",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"keywords": [
|
|
21
|
+
"vue",
|
|
22
|
+
"layout",
|
|
23
|
+
"hyperscript",
|
|
24
|
+
"components",
|
|
25
|
+
"forms",
|
|
26
|
+
"form-control",
|
|
27
|
+
"builder",
|
|
28
|
+
"template"
|
|
29
|
+
],
|
|
30
|
+
"author": {
|
|
31
|
+
"name": "Peter Placzek",
|
|
32
|
+
"email": "contact@tada5hi.net",
|
|
33
|
+
"url": "https://tada5hi.net"
|
|
34
|
+
},
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/tada5hi/vuecs.git",
|
|
39
|
+
"directory": "packages/forms"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build:js": "tsdown",
|
|
43
|
+
"build:types": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.build.json",
|
|
44
|
+
"build": "rimraf dist && npm run build:js && npm run build:types",
|
|
45
|
+
"test": "vitest --config test/vitest.config.ts --run",
|
|
46
|
+
"test:coverage": "vitest --config test/vitest.config.ts --run --coverage"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@vueuse/core": "^14.3.0",
|
|
50
|
+
"reka-ui": "^2.9.7"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@vue/test-utils": "^2.4.10",
|
|
54
|
+
"@vuecs/core": "^3.0.0",
|
|
55
|
+
"jsdom": "^29.1.1",
|
|
56
|
+
"vue": "^3.5.34"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@vuecs/core": "^3.0.0",
|
|
60
|
+
"vue": "^3.x"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=22.0.0"
|
|
64
|
+
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
}
|
|
68
|
+
}
|