@vunk/form 0.0.1-alpha.2 → 0.0.1-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/components/button/index.d.ts +4 -0
  2. package/components/button/index.js +121 -0
  3. package/components/button/src/ctx.d.ts +86 -0
  4. package/components/button/src/ctx.js +39 -0
  5. package/components/button/src/index.vue.d.ts +232 -0
  6. package/components/button/src/types.d.ts +7 -0
  7. package/components/button/src/types.js +1 -0
  8. package/components/checkbox/index.css +38 -0
  9. package/components/checkbox/index.d.ts +4 -0
  10. package/components/checkbox/index.js +125 -0
  11. package/components/checkbox/src/ctx.d.ts +107 -0
  12. package/components/checkbox/src/ctx.js +43 -0
  13. package/components/checkbox/src/index.vue.d.ts +270 -0
  14. package/components/checkbox/src/types.d.ts +1 -0
  15. package/components/checkbox/src/types.js +1 -0
  16. package/components/color-picker/index.d.ts +4 -0
  17. package/components/color-picker/index.js +72 -0
  18. package/components/color-picker/src/ctx.d.ts +74 -0
  19. package/components/color-picker/src/ctx.js +23 -0
  20. package/components/color-picker/src/index.vue.d.ts +196 -0
  21. package/components/color-picker/src/types.d.ts +1 -0
  22. package/components/color-picker/src/types.js +1 -0
  23. package/components/date-picker/index.js +11 -5
  24. package/components/date-picker/src/ctx.d.ts +64 -57
  25. package/components/date-picker/src/ctx.js +1 -1
  26. package/components/date-picker/src/index.vue.d.ts +170 -140
  27. package/components/date-picker/src/types.d.ts +7 -7
  28. package/components/form/index.js +23 -7
  29. package/components/form/src/ctx.d.ts +83 -77
  30. package/components/form/src/ctx.js +5 -2
  31. package/components/form/src/index.vue.d.ts +238 -229
  32. package/components/form-item/index.css +4 -0
  33. package/components/form-item/index.js +19 -3
  34. package/components/form-item/src/ctx.d.ts +15 -7
  35. package/components/form-item/src/ctx.js +8 -0
  36. package/components/form-item/src/index.vue.d.ts +43 -13
  37. package/components/form-item-renderer/index.js +15 -1
  38. package/components/form-item-renderer/src/ctx.d.ts +3 -3
  39. package/components/form-item-renderer/src/index.vue.d.ts +9 -9
  40. package/components/form-item-renderer/src/types.d.ts +2 -0
  41. package/components/form-item-renderer-template/src/index.vue.d.ts +1 -1
  42. package/components/form-item-renderer-template-default/index.js +112 -19
  43. package/components/form-item-renderer-template-default/src/index.vue.d.ts +6 -6
  44. package/components/form-item-renderer-template-layout/index.js +22 -13
  45. package/components/form-item-renderer-template-layout/src/ctx.d.ts +3 -2
  46. package/components/form-item-renderer-template-layout/src/ctx.js +1 -1
  47. package/components/form-item-renderer-template-layout/src/index.vue.d.ts +18 -6
  48. package/components/input/index.js +23 -4
  49. package/components/input/src/ctx.d.ts +80 -48
  50. package/components/input/src/ctx.js +13 -1
  51. package/components/input/src/index.vue.d.ts +194 -115
  52. package/components/input-number/index.css +14 -0
  53. package/components/input-number/index.d.ts +4 -0
  54. package/components/input-number/index.js +76 -0
  55. package/components/input-number/src/ctx.d.ts +79 -0
  56. package/components/input-number/src/ctx.js +23 -0
  57. package/components/input-number/src/index.vue.d.ts +218 -0
  58. package/components/input-number/src/types.d.ts +1 -0
  59. package/components/input-number/src/types.js +1 -0
  60. package/components/radio/index.css +29 -0
  61. package/components/radio/index.d.ts +4 -0
  62. package/components/radio/index.js +116 -0
  63. package/components/radio/src/ctx.d.ts +74 -0
  64. package/components/radio/src/ctx.js +35 -0
  65. package/components/radio/src/index.vue.d.ts +199 -0
  66. package/components/radio/src/types.d.ts +1 -0
  67. package/components/radio/src/types.js +1 -0
  68. package/components/select/index.css +11 -0
  69. package/components/select/index.js +22 -5
  70. package/components/select/src/ctx.d.ts +33 -25
  71. package/components/select/src/index.vue.d.ts +170 -102
  72. package/components/switch/index.css +11 -0
  73. package/components/switch/index.js +41 -13
  74. package/components/switch/src/ctx.d.ts +36 -9
  75. package/components/switch/src/ctx.js +15 -2
  76. package/components/switch/src/index.vue.d.ts +128 -32
  77. package/components/upload/index.css +20 -0
  78. package/components/upload/index.d.ts +4 -0
  79. package/components/upload/index.js +481 -0
  80. package/components/upload/src/ctx.d.ts +168 -0
  81. package/components/upload/src/ctx.js +38 -0
  82. package/components/upload/src/file.vue.d.ts +96 -0
  83. package/components/upload/src/index.vue.d.ts +422 -0
  84. package/components/upload/src/types.d.ts +1 -0
  85. package/components/upload/src/types.js +1 -0
  86. package/composables/index.d.ts +1 -0
  87. package/composables/index.js +304 -3
  88. package/composables/useForm.d.ts +9 -0
  89. package/index.css +134 -0
  90. package/index.d.ts +1 -0
  91. package/index.esm.js +4 -1
  92. package/package.json +4 -1
  93. package/shared/default-renderer-source/index.d.ts +12 -0
  94. package/shared/default-renderer-source/index.js +83 -0
  95. package/shared/element-plus/ctx.d.ts +76 -11
  96. package/shared/element-plus/index.js +51 -2
  97. package/shared/element-plus/instances.d.ts +56 -26
  98. package/shared/infer-prop/index.d.ts +16 -0
  99. package/shared/infer-prop/index.js +29 -0
  100. package/shared/types/basic-source/index.d.ts +6 -0
  101. package/shared/types/basic-source/index.js +1 -0
  102. package/shared/types/form/checkbox.d.ts +13 -0
  103. package/shared/types/form/index.d.ts +2 -0
  104. package/shared/types/form/index.js +1 -0
  105. package/shared/types/form/radio.d.ts +8 -0
  106. package/shared/types/index.d.ts +1 -0
  107. package/shared/types/layout-source/index.d.ts +6 -4
  108. package/shared/types/renderer-source/button.d.ts +7 -0
  109. package/shared/types/renderer-source/checkbox.d.ts +7 -0
  110. package/shared/types/renderer-source/color-picker.d.ts +7 -0
  111. package/shared/types/renderer-source/compoent.d.ts +2 -0
  112. package/shared/types/renderer-source/date-picker.d.ts +3 -2
  113. package/shared/types/renderer-source/index.d.ts +13 -1
  114. package/shared/types/renderer-source/input-number.d.ts +8 -0
  115. package/shared/types/renderer-source/input.d.ts +3 -2
  116. package/shared/types/renderer-source/radio.d.ts +7 -0
  117. package/shared/types/renderer-source/select.d.ts +3 -2
  118. package/shared/types/renderer-source/switch.d.ts +3 -2
  119. package/shared/types/renderer-source/upload.d.ts +7 -0
@@ -1,5 +1,7 @@
1
1
  import type { Merge } from '@vunk/core';
2
+ import { BasicSource } from '@vunk/form/shared/types/basic-source';
2
3
  export declare type ComponentSource<C = undefined> = Merge<{
3
4
  templateType: 'Component';
5
+ templateIf?: BasicSource['templateIf'];
4
6
  is: any;
5
7
  }, C>;
@@ -1,7 +1,8 @@
1
1
  import { VkfDatePicker } from '@vunk/form/components/date-picker';
2
2
  import type { Merge, VueComponentPropsType } from '@vunk/core';
3
+ import { BasicSource } from '@vunk/form/shared/types/basic-source';
3
4
  export declare type VkfDatePickerProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfDatePicker>, T>;
4
- export declare type VkfDatePickerSource<P = string> = VkfDatePickerProps<{
5
+ export interface VkfDatePickerSource<P extends string = string> extends VkfDatePickerProps, BasicSource {
5
6
  prop: P;
6
7
  templateType: 'VkfDatePicker';
7
- }>;
8
+ }
@@ -3,9 +3,21 @@ import type { VkfDatePickerSource } from './date-picker';
3
3
  import type { VkfInputSource } from './input';
4
4
  import type { VkfSelectSource } from './select';
5
5
  import type { VkfSwitchSource } from './switch';
6
+ import type { VkfInputNumberSource } from './input-number';
7
+ import type { VkfRadioSource } from './radio';
8
+ import type { VkfCheckboxSource } from './checkbox';
9
+ import type { VkfUploadSource } from './upload';
10
+ import type { VkfColorPickerSource } from './color-picker';
11
+ import type { VkfButtonSource } from './button';
6
12
  export * from './compoent';
7
13
  export * from './date-picker';
8
14
  export * from './input';
9
15
  export * from './select';
10
16
  export * from './switch';
11
- export declare type FormItemRendererSource<P = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | ComponentSource;
17
+ export * from './input-number';
18
+ export * from './radio';
19
+ export * from './checkbox';
20
+ export * from './upload';
21
+ export * from './color-picker';
22
+ export * from './button';
23
+ export declare type FormItemRendererSource<P extends string = string> = VkfInputSource<P> | VkfSwitchSource<P> | VkfSelectSource<P> | VkfDatePickerSource<P> | VkfInputNumberSource<P> | VkfRadioSource<P> | VkfCheckboxSource<P> | VkfUploadSource<P> | VkfColorPickerSource<P> | VkfButtonSource<P> | ComponentSource;
@@ -0,0 +1,8 @@
1
+ import { VkfInputNumber } from '@vunk/form/components/input-number';
2
+ import type { Merge, VueComponentPropsType } from '@vunk/core';
3
+ import { BasicSource } from '@vunk/form/shared/types/basic-source';
4
+ export declare type VkfInputNumberProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfInputNumber>, T>;
5
+ export interface VkfInputNumberSource<P extends string = string> extends VkfInputNumberProps, BasicSource {
6
+ prop: P;
7
+ templateType: 'VkfInputNumber';
8
+ }
@@ -1,7 +1,8 @@
1
1
  import { VkfInput } from '@vunk/form/components/input';
2
2
  import type { Merge, VueComponentPropsType } from '@vunk/core';
3
+ import { BasicSource } from '@vunk/form/shared/types/basic-source';
3
4
  export declare type VkfInputProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfInput>, T>;
4
- export declare type VkfInputSource<P = string> = VkfInputProps<{
5
+ export interface VkfInputSource<P extends string = string> extends VkfInputProps, BasicSource {
5
6
  prop: P;
6
7
  templateType: 'VkfInput';
7
- }>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import VkfRadio from '@vunk/form/components/radio';
2
+ import { VueComponentPropsType } from '@vunk/core';
3
+ import { BasicSource } from '@vunk/form/shared/types/basic-source';
4
+ export interface VkfRadioSource<P extends string = string> extends VueComponentPropsType<typeof VkfRadio>, BasicSource {
5
+ prop: P;
6
+ templateType: 'VkfRadio';
7
+ }
@@ -1,7 +1,8 @@
1
1
  import { VkfSelect } from '@vunk/form/components/select';
2
2
  import type { Merge, VueComponentPropsType } from '@vunk/core';
3
+ import { BasicSource } from '@vunk/form/shared/types/basic-source';
3
4
  export declare type VkfSelectProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfSelect>, T>;
4
- export declare type VkfSelectSource<P = string> = VkfSelectProps<{
5
+ export interface VkfSelectSource<P extends string = string> extends VkfSelectProps, BasicSource {
5
6
  prop: P;
6
7
  templateType: 'VkfSelect';
7
- }>;
8
+ }
@@ -1,7 +1,8 @@
1
1
  import { VkfSwitch } from '@vunk/form/components/switch';
2
2
  import type { Merge, VueComponentPropsType } from '@vunk/core';
3
+ import { BasicSource } from '@vunk/form/shared/types/basic-source';
3
4
  export declare type VkfSwitchProps<T = undefined> = Merge<VueComponentPropsType<typeof VkfSwitch>, T>;
4
- export declare type VkfSwitchSource<P = string> = VkfSwitchProps<{
5
+ export interface VkfSwitchSource<P extends string = string> extends VkfSwitchProps, BasicSource {
5
6
  prop: P;
6
7
  templateType: 'VkfSwitch';
7
- }>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { VkfUpload } from '@vunk/form/components/upload';
2
+ import { VueComponentPropsType } from '@vunk/core';
3
+ import { BasicSource } from '@vunk/form/shared/types/basic-source';
4
+ export interface VkfUploadSource<P extends string = string> extends VueComponentPropsType<typeof VkfUpload>, BasicSource {
5
+ prop: P;
6
+ templateType: 'VkfUpload';
7
+ }