@polyv/vue-components 1.0.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.
Files changed (159) hide show
  1. package/font/din-pro/index.scss +26 -0
  2. package/font/youshe/index.scss +8 -0
  3. package/index.es.js +5574 -0
  4. package/package.json +22 -0
  5. package/src/components/basic-countdown/basic-countdown.vue.d.ts +71 -0
  6. package/src/components/basic-countdown/index.d.ts +2 -0
  7. package/src/components/basic-countdown/use-basic-countdown.d.ts +44 -0
  8. package/src/components/exports.d.ts +7 -0
  9. package/src/components/form/form-area-picker/form-area-picker.vue.d.ts +39 -0
  10. package/src/components/form/form-area-picker/index.d.ts +2 -0
  11. package/src/components/form/form-area-picker/use-form-area-picker.d.ts +50 -0
  12. package/src/components/form/form-checkbox/form-checkbox-group.vue.d.ts +27 -0
  13. package/src/components/form/form-checkbox/form-checkbox.vue.d.ts +67 -0
  14. package/src/components/form/form-checkbox/index.d.ts +4 -0
  15. package/src/components/form/form-checkbox/type.d.ts +8 -0
  16. package/src/components/form/form-checkbox/use-form-checkbox.d.ts +38 -0
  17. package/src/components/form/form-input/form-input.vue.d.ts +117 -0
  18. package/src/components/form/form-input/index.d.ts +2 -0
  19. package/src/components/form/form-input/use-form-input.d.ts +88 -0
  20. package/src/components/form/form-item/form-item.vue.d.ts +54 -0
  21. package/src/components/form/form-item/index.d.ts +2 -0
  22. package/src/components/form/form-item/use-form-item.d.ts +71 -0
  23. package/src/components/form/form-protocol/form-protocol.vue.d.ts +19 -0
  24. package/src/components/form/form-protocol/index.d.ts +2 -0
  25. package/src/components/form/form-protocol/use-form-protocol.d.ts +19 -0
  26. package/src/components/form/form-radio/form-radio-group.vue.d.ts +21 -0
  27. package/src/components/form/form-radio/form-radio.vue.d.ts +56 -0
  28. package/src/components/form/form-radio/index.d.ts +3 -0
  29. package/src/components/form/form-radio/type.d.ts +7 -0
  30. package/src/components/form/form-submit-button/form-submit-button.vue.d.ts +61 -0
  31. package/src/components/form/form-submit-button/index.d.ts +2 -0
  32. package/src/components/form/form-submit-button/use-form-submit-button.d.ts +35 -0
  33. package/src/components/form/form-wrap/form-wrap.vue.d.ts +74 -0
  34. package/src/components/form/form-wrap/index.d.ts +2 -0
  35. package/src/components/form/form-wrap/use-form-wrap.d.ts +64 -0
  36. package/src/components/form/hooks/use-form-common.d.ts +25 -0
  37. package/src/components/form/index.d.ts +9 -0
  38. package/src/components/form/types/index.d.ts +19 -0
  39. package/src/components/icons/icons/arrow-down/index.d.ts +6 -0
  40. package/src/components/icons/icons/arrow-left/index.d.ts +6 -0
  41. package/src/components/icons/icons/arrow-right/index.d.ts +6 -0
  42. package/src/components/icons/icons/arrow-up/index.d.ts +6 -0
  43. package/src/components/icons/icons/check/index.d.ts +6 -0
  44. package/src/components/icons/icons/close/index.d.ts +6 -0
  45. package/src/components/icons/icons/close-round-fill/index.d.ts +6 -0
  46. package/src/components/icons/icons/empty-prize/index.d.ts +6 -0
  47. package/src/components/icons/icons/error-round/index.d.ts +6 -0
  48. package/src/components/icons/icons/info-round-filled/index.d.ts +6 -0
  49. package/src/components/icons/icons/list/index.d.ts +6 -0
  50. package/src/components/icons/icons/question-round/index.d.ts +6 -0
  51. package/src/components/icons/icons/success-round/index.d.ts +6 -0
  52. package/src/components/icons/map.d.ts +17 -0
  53. package/src/components/normal-button/index.d.ts +3 -0
  54. package/src/components/normal-button/normal-button.vue.d.ts +64 -0
  55. package/src/components/normal-button/type.d.ts +28 -0
  56. package/src/components/normal-button/use-normal-button.d.ts +37 -0
  57. package/src/components/normal-pendant/index.d.ts +1 -0
  58. package/src/components/normal-pendant/normal-pendant.vue.d.ts +43 -0
  59. package/src/components/popup/hooks/popup-props.d.ts +114 -0
  60. package/src/components/popup/hooks/use-popup-append.d.ts +13 -0
  61. package/src/components/popup/hooks/use-popup-back.d.ts +13 -0
  62. package/src/components/popup/hooks/use-popup-config.d.ts +13 -0
  63. package/src/components/popup/hooks/use-popup-draggable.d.ts +15 -0
  64. package/src/components/popup/hooks/use-popup-height.d.ts +25 -0
  65. package/src/components/popup/hooks/use-popup-position.d.ts +11 -0
  66. package/src/components/popup/hooks/use-popup-scroll.d.ts +8 -0
  67. package/src/components/popup/hooks/use-popup-visible.d.ts +14 -0
  68. package/src/components/popup/hooks/use-popup-width.d.ts +10 -0
  69. package/src/components/popup/index.d.ts +4 -0
  70. package/src/components/popup/popup.vue.d.ts +205 -0
  71. package/src/components/popup/types.d.ts +17 -0
  72. package/src/components/reward-receive/entrance/reward-receive.vue.d.ts +31 -0
  73. package/src/components/reward-receive/hooks/use-reward-receive.d.ts +82 -0
  74. package/src/components/reward-receive/index.d.ts +3 -0
  75. package/src/components/reward-receive/types/index.d.ts +66 -0
  76. package/src/hooks/business/use-app-element/index.d.ts +4 -0
  77. package/src/hooks/business/use-config-provider/index.d.ts +22 -0
  78. package/src/hooks/business/use-track-event/index.d.ts +21 -0
  79. package/src/hooks/components/use-action-sheet/_component/action-sheet.vue.d.ts +20 -0
  80. package/src/hooks/components/use-action-sheet/_component/use-action-sheet-comp.d.ts +13 -0
  81. package/src/hooks/components/use-action-sheet/hook.d.ts +4 -0
  82. package/src/hooks/components/use-action-sheet/index.d.ts +3 -0
  83. package/src/hooks/components/use-action-sheet/types.d.ts +15 -0
  84. package/src/hooks/components/use-auto-topmost/index.d.ts +13 -0
  85. package/src/hooks/components/use-message-box/_component/message-box-element.vue.d.ts +64 -0
  86. package/src/hooks/components/use-message-box/_component/use-message-box-element.d.ts +46 -0
  87. package/src/hooks/components/use-message-box/index.d.ts +9 -0
  88. package/src/hooks/components/use-message-box/types.d.ts +24 -0
  89. package/src/hooks/components/use-popper/_hooks/use-popper-arrow.d.ts +2 -0
  90. package/src/hooks/components/use-popper/_hooks/use-popper-core.d.ts +15 -0
  91. package/src/hooks/components/use-popper/_hooks/use-popper-interactive.d.ts +5 -0
  92. package/src/hooks/components/use-popper/_hooks/use-popper-visible.d.ts +6 -0
  93. package/src/hooks/components/use-popper/_popper-type.d.ts +75 -0
  94. package/src/hooks/components/use-popper/index.d.ts +32 -0
  95. package/src/hooks/components/use-toast/_component/toast-element.vue.d.ts +34 -0
  96. package/src/hooks/components/use-toast/_component/use-toast-element.d.ts +32 -0
  97. package/src/hooks/components/use-toast/index.d.ts +11 -0
  98. package/src/hooks/components/use-toast/types.d.ts +21 -0
  99. package/src/hooks/exports.d.ts +34 -0
  100. package/src/hooks/interactive/use-click-outside/index.d.ts +14 -0
  101. package/src/hooks/interactive/use-fullscreen/index.d.ts +29 -0
  102. package/src/hooks/interactive/use-hover-visible/index.d.ts +16 -0
  103. package/src/hooks/interactive/use-page-fullscreen/index.d.ts +6 -0
  104. package/src/hooks/interactive/use-screen-orientation/index.d.ts +25 -0
  105. package/src/hooks/interactive/use-scroll/index.d.ts +20 -0
  106. package/src/hooks/interactive/use-sound-effect/index.d.ts +6 -0
  107. package/src/hooks/pagination/types.d.ts +60 -0
  108. package/src/hooks/pagination/use-scroll-pagintaion/index.d.ts +17 -0
  109. package/src/hooks/pagination/use-static-pagination/index.d.ts +24 -0
  110. package/src/hooks/plugin/use-resize-observer/index.d.ts +13 -0
  111. package/src/hooks/plugin/use-svga-animation/index.d.ts +25 -0
  112. package/src/hooks/plugin/use-svga-player/index.d.ts +24 -0
  113. package/src/hooks/tools/use-append-to/index.d.ts +7 -0
  114. package/src/hooks/tools/use-body-locked/index.d.ts +10 -0
  115. package/src/hooks/tools/use-browser/index.d.ts +14 -0
  116. package/src/hooks/tools/use-copy-text/index.d.ts +9 -0
  117. package/src/hooks/tools/use-count-down/index.d.ts +39 -0
  118. package/src/hooks/tools/use-event-bus/index.d.ts +19 -0
  119. package/src/hooks/tools/use-event-listener/index.d.ts +2 -0
  120. package/src/hooks/tools/use-link-open/index.d.ts +3 -0
  121. package/src/hooks/tools/use-set-interval/index.d.ts +9 -0
  122. package/src/hooks/tools/use-set-timeout/index.d.ts +9 -0
  123. package/src/hooks/tools/use-simple-visible/index.d.ts +41 -0
  124. package/src/hooks/tools/use-target-event-emitter/index.d.ts +10 -0
  125. package/src/hooks/tools/use-window-resize-listener/index.d.ts +34 -0
  126. package/src/hooks/vue/use-model-value/index.d.ts +13 -0
  127. package/src/hooks/vue/use-vue/index.d.ts +15 -0
  128. package/src/index.d.ts +6 -0
  129. package/src/interface/index.d.ts +4 -0
  130. package/src/lang/common/en.json.d.ts +14 -0
  131. package/src/lang/common/index.d.ts +4 -0
  132. package/src/lang/common/ja.json.d.ts +13 -0
  133. package/src/lang/common/ko.json.d.ts +13 -0
  134. package/src/lang/common/ru.json.d.ts +13 -0
  135. package/src/lang/common/zh-CN.json.d.ts +14 -0
  136. package/src/lang/common/zh-TW.json.d.ts +13 -0
  137. package/src/lang/exports.d.ts +2 -0
  138. package/src/lang/hook.d.ts +12 -0
  139. package/src/lang/internal/en.json.d.ts +21 -0
  140. package/src/lang/internal/index.d.ts +34 -0
  141. package/src/lang/internal/ja.json.d.ts +21 -0
  142. package/src/lang/internal/ko.json.d.ts +21 -0
  143. package/src/lang/internal/ru.json.d.ts +21 -0
  144. package/src/lang/internal/zh-CN.json.d.ts +21 -0
  145. package/src/lang/internal/zh-TW.json.d.ts +21 -0
  146. package/src/lang/types.d.ts +12 -0
  147. package/src/lang/utils.d.ts +1 -0
  148. package/src/plugins/async-validator/index.d.ts +3 -0
  149. package/src/plugins/exports.d.ts +2 -0
  150. package/src/plugins/polyv-ui/area-utils.d.ts +13 -0
  151. package/src/plugins/polyv-ui/mobile-import.d.ts +1 -0
  152. package/src/plugins/polyv-ui/types.d.ts +19 -0
  153. package/src/plugins/svgaplayerweb/load-svga-player.d.ts +15 -0
  154. package/src/utils/dom.d.ts +5 -0
  155. package/src/vue-utils/emit-utils.d.ts +12 -0
  156. package/src/vue-utils/index.d.ts +18 -0
  157. package/src/vue-utils/props-utils.d.ts +61 -0
  158. package/styles/animation.scss +24 -0
  159. package/styles/mixins.scss +123 -0
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@polyv/vue-components",
3
+ "version": "1.0.1",
4
+ "main": "./index.es.js",
5
+ "types": "./src/index.d.ts",
6
+ "dependencies": {
7
+ "@juggle/resize-observer": "^3.4.0",
8
+ "@just4/dom": "^1.0.0",
9
+ "@just4/load-script": "^1.2.0",
10
+ "@just4/ua-info": "^3.0.0",
11
+ "@polyv/icons-vue": "1.1.0",
12
+ "@polyv/polyv-ui": "4.10.0-dev-20250904.1",
13
+ "@popperjs/core": "2.11.4",
14
+ "async-validator": "4.2.5",
15
+ "clipboard": "2.0.10",
16
+ "lodash-es": "4.17.21",
17
+ "svgaplayerweb": "2.3.2",
18
+ "vue-types": "5.1.1"
19
+ },
20
+ "module": "./index.es.js",
21
+ "type": "module"
22
+ }
@@ -0,0 +1,71 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {
5
+ timeText: {
6
+ hours: number;
7
+ hoursText: string;
8
+ minutes: number;
9
+ minutesText: string;
10
+ seconds: number;
11
+ secondsText: string;
12
+ };
13
+ surplusSecond: number;
14
+ }): any;
15
+ };
16
+ refs: {};
17
+ rootEl: HTMLDivElement;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<{
21
+ second: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
22
+ timestamp: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
23
+ hideZeroHour: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
24
+ default: boolean;
25
+ };
26
+ useClock: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
27
+ default: boolean;
28
+ };
29
+ itemClass: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
30
+ default: string;
31
+ };
32
+ colonClass: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
33
+ default: string;
34
+ };
35
+ finishSecond: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
36
+ default: number;
37
+ };
38
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
39
+ finish: (arg?: void | undefined) => void;
40
+ }, string, Readonly<import('vue').ExtractPropTypes<{
41
+ second: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
42
+ timestamp: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
43
+ hideZeroHour: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
44
+ default: boolean;
45
+ };
46
+ useClock: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
47
+ default: boolean;
48
+ };
49
+ itemClass: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
50
+ default: string;
51
+ };
52
+ colonClass: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
53
+ default: string;
54
+ };
55
+ finishSecond: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
56
+ default: number;
57
+ };
58
+ }>>, {
59
+ hideZeroHour: boolean;
60
+ useClock: boolean;
61
+ itemClass: string;
62
+ colonClass: string;
63
+ finishSecond: number;
64
+ }>;
65
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
66
+ export default _default;
67
+ type __VLS_WithTemplateSlots<T, S> = T & {
68
+ new (): {
69
+ $scopedSlots: S;
70
+ };
71
+ };
@@ -0,0 +1,2 @@
1
+ export { default as PwcBasicCountdown } from './basic-countdown.vue';
2
+ export * from './use-basic-countdown';
@@ -0,0 +1,44 @@
1
+ import { VueEmit, VueProps } from '../../vue-utils';
2
+ export declare const basicCountdownProps: () => {
3
+ /** 秒数 */
4
+ second: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
5
+ /** 时间戳 */
6
+ timestamp: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>>;
7
+ /** 时数为 0 时隐藏 */
8
+ hideZeroHour: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
9
+ default: boolean;
10
+ };
11
+ /** 是否使用倒计时 */
12
+ useClock: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
13
+ default: boolean;
14
+ };
15
+ /** 数字样式 */
16
+ itemClass: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
17
+ default: string;
18
+ };
19
+ /** 冒号样式 */
20
+ colonClass: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
21
+ default: string;
22
+ };
23
+ /** 完成秒数 */
24
+ finishSecond: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
25
+ default: number;
26
+ };
27
+ };
28
+ export declare const basicCountdownEmit: () => {
29
+ finish: import('../../vue-utils').EmitFuncType<void>;
30
+ };
31
+ export declare const useBasicCountdown: (options: {
32
+ props: VueProps<typeof basicCountdownProps>;
33
+ emit: VueEmit<typeof basicCountdownEmit>;
34
+ }) => {
35
+ surplusSecond: import('vue').Ref<number>;
36
+ timeText: import('vue').ComputedRef<{
37
+ hours: number;
38
+ hoursText: string;
39
+ minutes: number;
40
+ minutesText: string;
41
+ seconds: number;
42
+ secondsText: string;
43
+ }>;
44
+ };
@@ -0,0 +1,7 @@
1
+ export * from './basic-countdown';
2
+ export * from './form';
3
+ export * from './icons/map';
4
+ export * from './normal-button';
5
+ export * from './normal-pendant';
6
+ export * from './popup';
7
+ export * from './reward-receive';
@@ -0,0 +1,39 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ value: import('vue-types').VueTypeValidableDef<string[], import('vue-types/dist/types').ValidatorFunction<string[]>> & {
3
+ default: () => string[];
4
+ };
5
+ areaPickerText: import('vue-types').VueTypeValidableDef<string[], import('vue-types/dist/types').ValidatorFunction<string[]>> & {
6
+ default: () => string[];
7
+ };
8
+ placeholder: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
9
+ default: string;
10
+ };
11
+ size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
12
+ validateForm: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
13
+ default: boolean;
14
+ };
15
+ }, {
16
+ isFinish: import('vue').ComputedRef<boolean>;
17
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ "picker-text-change": (arg: string[]) => void;
19
+ }, string, Readonly<import('vue').ExtractPropTypes<{
20
+ value: import('vue-types').VueTypeValidableDef<string[], import('vue-types/dist/types').ValidatorFunction<string[]>> & {
21
+ default: () => string[];
22
+ };
23
+ areaPickerText: import('vue-types').VueTypeValidableDef<string[], import('vue-types/dist/types').ValidatorFunction<string[]>> & {
24
+ default: () => string[];
25
+ };
26
+ placeholder: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
27
+ default: string;
28
+ };
29
+ size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
30
+ validateForm: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
31
+ default: boolean;
32
+ };
33
+ }>>, {
34
+ value: string[];
35
+ validateForm: boolean;
36
+ placeholder: string;
37
+ areaPickerText: string[];
38
+ }>;
39
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as PwcFormAreaPicker } from './form-area-picker.vue';
2
+ export * from './use-form-area-picker';
@@ -0,0 +1,50 @@
1
+ import { AreaPickerComponent } from '../../../plugins/polyv-ui/types';
2
+ import { VueEmit, VueProps } from '../../../vue-utils';
3
+ import { ComputedRef } from 'vue';
4
+ export declare const formAreaPickerProps: () => {
5
+ /** 绑定值 */
6
+ value: import('vue-types').VueTypeValidableDef<string[], import('vue-types/dist/types').ValidatorFunction<string[]>> & {
7
+ default: () => string[];
8
+ };
9
+ areaPickerText: import('vue-types').VueTypeValidableDef<string[], import('vue-types/dist/types').ValidatorFunction<string[]>> & {
10
+ default: () => string[];
11
+ };
12
+ /** 占位文本 */
13
+ placeholder: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
14
+ default: string;
15
+ };
16
+ size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
17
+ validateForm: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
18
+ default: boolean;
19
+ };
20
+ };
21
+ export declare const formAreaPickerEmit: () => {
22
+ /** 选择器文本变化 */
23
+ 'picker-text-change': import('../../../vue-utils').EmitFuncType<string[]>;
24
+ };
25
+ export interface FormAreaPickerInstance {
26
+ /** 是否已选择完成 */
27
+ isFinish: ComputedRef<boolean>;
28
+ }
29
+ export declare const useFormAreaPicker: (options: {
30
+ AreaPicker: AreaPickerComponent;
31
+ props: VueProps<typeof formAreaPickerProps>;
32
+ emit: VueEmit<typeof formAreaPickerEmit>;
33
+ }) => {
34
+ innerValue: import('vue').Ref<string[]>;
35
+ isFinish: ComputedRef<boolean>;
36
+ innerIsFinish: ComputedRef<boolean>;
37
+ instance: FormAreaPickerInstance;
38
+ inputValue: ComputedRef<string>;
39
+ inputPlaceholder: ComputedRef<string>;
40
+ refreshKey: import('vue').Ref<number>;
41
+ formItemIsError: ComputedRef<boolean>;
42
+ blurToValidateItem: () => Promise<void>;
43
+ focusToRemoveError: () => void;
44
+ pickerVisible: import('vue').Ref<boolean>;
45
+ openPicker: () => void;
46
+ closePicker: () => void;
47
+ onHiddenPicker: () => void;
48
+ onShowPicker: () => void;
49
+ onClickConfirm: () => void;
50
+ };
@@ -0,0 +1,27 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLDivElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{
11
+ value: import('vue-types').VueTypeValidableDef<any[], import('vue-types/dist/types').ValidatorFunction<any[]>> & {
12
+ default: () => any[];
13
+ };
14
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{
15
+ value: import('vue-types').VueTypeValidableDef<any[], import('vue-types/dist/types').ValidatorFunction<any[]>> & {
16
+ default: () => any[];
17
+ };
18
+ }>>, {
19
+ value: any[];
20
+ }>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
+ export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $scopedSlots: S;
26
+ };
27
+ };
@@ -0,0 +1,67 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLDivElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{
11
+ circle: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
12
+ default: boolean;
13
+ };
14
+ checked: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
15
+ default: boolean;
16
+ };
17
+ value: import('vue-types').VueTypeDef<any>;
18
+ label: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
19
+ default: string;
20
+ };
21
+ showBackground: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
22
+ default: boolean;
23
+ };
24
+ disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
25
+ default: boolean;
26
+ };
27
+ showPrefix: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
28
+ default: boolean;
29
+ };
30
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
31
+ change: (arg: boolean) => void;
32
+ "update:checked": (arg: boolean) => void;
33
+ }, string, Readonly<import('vue').ExtractPropTypes<{
34
+ circle: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
35
+ default: boolean;
36
+ };
37
+ checked: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
38
+ default: boolean;
39
+ };
40
+ value: import('vue-types').VueTypeDef<any>;
41
+ label: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
42
+ default: string;
43
+ };
44
+ showBackground: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
45
+ default: boolean;
46
+ };
47
+ disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
48
+ default: boolean;
49
+ };
50
+ showPrefix: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
51
+ default: boolean;
52
+ };
53
+ }>>, {
54
+ label: string;
55
+ circle: boolean;
56
+ disabled: boolean;
57
+ checked: boolean;
58
+ showBackground: boolean;
59
+ showPrefix: boolean;
60
+ }>;
61
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
62
+ export default _default;
63
+ type __VLS_WithTemplateSlots<T, S> = T & {
64
+ new (): {
65
+ $scopedSlots: S;
66
+ };
67
+ };
@@ -0,0 +1,4 @@
1
+ export { default as PwcFormCheckbox } from './form-checkbox.vue';
2
+ export { default as PwcFormCheckboxGroup } from './form-checkbox-group.vue';
3
+ export * from './type';
4
+ export * from './use-form-checkbox';
@@ -0,0 +1,8 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ export type FormCheckboxValue = any;
3
+ export interface CheckboxGroupInjectData {
4
+ inGroup: boolean;
5
+ modelValue?: ComputedRef<FormCheckboxValue[]>;
6
+ emitInput?: (value: FormCheckboxValue[]) => void;
7
+ }
8
+ export declare const CHECKBOX_GROUP_INJECT_KEY: InjectionKey<CheckboxGroupInjectData>;
@@ -0,0 +1,38 @@
1
+ import { VueEmit, VueProps } from '../../../vue-utils';
2
+ export declare const formCheckboxProps: () => {
3
+ /** 使用圆形样式 */
4
+ circle: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
5
+ default: boolean;
6
+ };
7
+ /** 是否选中,支持.sync */
8
+ checked: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
9
+ default: boolean;
10
+ };
11
+ value: import('vue-types').VueTypeDef<any>;
12
+ label: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
13
+ default: string;
14
+ };
15
+ /** 是否显示背景色 */
16
+ showBackground: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
17
+ default: boolean;
18
+ };
19
+ /** 是否禁用 */
20
+ disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
21
+ default: boolean;
22
+ };
23
+ /** 显示前缀 */
24
+ showPrefix: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
25
+ default: boolean;
26
+ };
27
+ };
28
+ export declare const formCheckboxEmits: () => {
29
+ change: import('../../../vue-utils').EmitFuncType<boolean>;
30
+ "update:checked": import('../../../vue-utils').EmitFuncType<boolean>;
31
+ };
32
+ export declare const useFormCheckbox: (options: {
33
+ props: VueProps<typeof formCheckboxProps>;
34
+ emit: VueEmit<typeof formCheckboxEmits>;
35
+ }) => {
36
+ isChecked: import('vue').ComputedRef<boolean>;
37
+ onClickCheckbox: () => void;
38
+ };
@@ -0,0 +1,117 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ prefix?(_: {}): any;
5
+ suffix?(_: {}): any;
6
+ };
7
+ refs: {
8
+ inputRef: HTMLTextAreaElement;
9
+ };
10
+ rootEl: HTMLDivElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<{
14
+ value: import('vue-types').VueTypeDef<import('./use-form-input').InputValueType> & {
15
+ default: import('./use-form-input').InputValueType;
16
+ };
17
+ readonly: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
18
+ default: boolean;
19
+ };
20
+ disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
21
+ default: boolean;
22
+ };
23
+ type: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
24
+ default: string;
25
+ };
26
+ placeholder: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
27
+ default: string;
28
+ };
29
+ maxlength: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
30
+ default: number;
31
+ };
32
+ showWordLimit: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
33
+ default: boolean;
34
+ };
35
+ suffixText: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
36
+ default: string;
37
+ };
38
+ clearabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
39
+ default: boolean;
40
+ };
41
+ useTextarea: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
42
+ default: boolean;
43
+ };
44
+ rows: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
45
+ default: number;
46
+ };
47
+ size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
48
+ validateForm: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
49
+ default: boolean;
50
+ };
51
+ }, {
52
+ forceUpdate(): void;
53
+ focusInput(): void;
54
+ blurInput(): void;
55
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
56
+ blur: (arg: import('./use-form-input').InputValueType) => void;
57
+ focus: (arg: import('./use-form-input').InputValueType) => void;
58
+ enter: (arg: import('./use-form-input').InputValueType) => void;
59
+ }, string, Readonly<import('vue').ExtractPropTypes<{
60
+ value: import('vue-types').VueTypeDef<import('./use-form-input').InputValueType> & {
61
+ default: import('./use-form-input').InputValueType;
62
+ };
63
+ readonly: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
64
+ default: boolean;
65
+ };
66
+ disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
67
+ default: boolean;
68
+ };
69
+ type: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
70
+ default: string;
71
+ };
72
+ placeholder: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
73
+ default: string;
74
+ };
75
+ maxlength: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
76
+ default: number;
77
+ };
78
+ showWordLimit: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
79
+ default: boolean;
80
+ };
81
+ suffixText: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
82
+ default: string;
83
+ };
84
+ clearabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
85
+ default: boolean;
86
+ };
87
+ useTextarea: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
88
+ default: boolean;
89
+ };
90
+ rows: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
91
+ default: number;
92
+ };
93
+ size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
94
+ validateForm: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
95
+ default: boolean;
96
+ };
97
+ }>>, {
98
+ value: import('./use-form-input').InputValueType;
99
+ type: string;
100
+ disabled: boolean;
101
+ validateForm: boolean;
102
+ readonly: boolean;
103
+ placeholder: string;
104
+ maxlength: number;
105
+ showWordLimit: boolean;
106
+ suffixText: string;
107
+ clearabled: boolean;
108
+ useTextarea: boolean;
109
+ rows: number;
110
+ }>;
111
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
112
+ export default _default;
113
+ type __VLS_WithTemplateSlots<T, S> = T & {
114
+ new (): {
115
+ $scopedSlots: S;
116
+ };
117
+ };
@@ -0,0 +1,2 @@
1
+ export { default as PwcFormInput } from './form-input.vue';
2
+ export * from './use-form-input';
@@ -0,0 +1,88 @@
1
+ import { VueEmit, VueProps } from '../../../vue-utils';
2
+ /**
3
+ * <form-input> 实例
4
+ */
5
+ export interface FormInputInstance {
6
+ /** 强制更新 */
7
+ forceUpdate(): void;
8
+ /** 聚焦输入框 */
9
+ focusInput(): void;
10
+ /** 失焦输入框 */
11
+ blurInput(): void;
12
+ }
13
+ export type InputValueType = string | number;
14
+ export declare const formInputProps: () => {
15
+ /** 绑定值 */
16
+ value: import('vue-types').VueTypeDef<InputValueType> & {
17
+ default: InputValueType;
18
+ };
19
+ /** 只读 */
20
+ readonly: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
21
+ default: boolean;
22
+ };
23
+ /** 禁用输入 */
24
+ disabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
25
+ default: boolean;
26
+ };
27
+ /** 输入框原生类型 */
28
+ type: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
29
+ default: string;
30
+ };
31
+ /** 输入框占位 */
32
+ placeholder: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
33
+ default: string;
34
+ };
35
+ /** 最大长度 */
36
+ maxlength: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
37
+ default: number;
38
+ };
39
+ /** 显示字数限制,默认:false */
40
+ showWordLimit: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
41
+ default: boolean;
42
+ };
43
+ /** 尾部文字 */
44
+ suffixText: import('vue-types').VueTypeValidableDef<string, import('vue-types/dist/types').ValidatorFunction<string>> & {
45
+ default: string;
46
+ };
47
+ /** 清空,PC 端默认 true,移动端默认 false */
48
+ clearabled: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
49
+ default: boolean;
50
+ };
51
+ /** 使用 textarea */
52
+ useTextarea: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
53
+ default: boolean;
54
+ };
55
+ /** 行数 */
56
+ rows: import('vue-types').VueTypeValidableDef<number, import('vue-types/dist/types').ValidatorFunction<number>> & {
57
+ default: number;
58
+ };
59
+ size: import('vue-types').VueTypeValidableDef<import('..').FormSize, import('vue-types/dist/types').ValidatorFunction<import('..').FormSize>>;
60
+ validateForm: import('vue-types').VueTypeValidableDef<boolean, import('vue-types/dist/types').ValidatorFunction<boolean>> & {
61
+ default: boolean;
62
+ };
63
+ };
64
+ export declare const formInputEmits: () => {
65
+ /** 失焦 */
66
+ blur: import('../../../vue-utils').EmitFuncType<InputValueType>;
67
+ /** 聚焦 */
68
+ focus: import('../../../vue-utils').EmitFuncType<InputValueType>;
69
+ /** 回车事件 */
70
+ enter: import('../../../vue-utils').EmitFuncType<InputValueType>;
71
+ };
72
+ export declare const useFormInput: (options: {
73
+ props: VueProps<typeof formInputProps>;
74
+ emit: VueEmit<typeof formInputEmits>;
75
+ classPrefix: string;
76
+ }) => {
77
+ modelValue: import('vue').ComputedRef<InputValueType>;
78
+ inputRef: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | undefined>;
79
+ inputClassNames: import('vue').ComputedRef<string[]>;
80
+ isFocus: import('vue').Ref<boolean>;
81
+ onInputChanged: (event: Event) => void;
82
+ onInputBlur: () => void;
83
+ onInputFocus: () => void;
84
+ onInputEnter: () => void;
85
+ clearValue: () => void;
86
+ formInstance: FormInputInstance;
87
+ wordLimitText: import('vue').ComputedRef<string>;
88
+ };