@qynpm/ui 1.0.23 → 1.0.24

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 (130) hide show
  1. package/README.md +222 -48
  2. package/dist/index.cjs +15 -5
  3. package/dist/index.mjs +50 -33
  4. package/dist/qy-action-bar/index.cjs +1 -1
  5. package/dist/qy-action-bar/index.mjs +1 -1
  6. package/dist/qy-button/index.cjs +1 -1
  7. package/dist/qy-button/index.mjs +1 -1
  8. package/dist/qy-checkbox/index.cjs +1 -1
  9. package/dist/qy-checkbox/index.mjs +4 -3
  10. package/dist/qy-checkbox-group/index.cjs +1 -0
  11. package/dist/qy-checkbox-group/index.mjs +7 -0
  12. package/dist/qy-date-picker/index.cjs +1 -1
  13. package/dist/qy-date-picker/index.mjs +4 -3
  14. package/dist/qy-dialog/index.cjs +1 -1
  15. package/dist/qy-dialog/index.mjs +2 -2
  16. package/dist/qy-dropdown/index.cjs +1 -1
  17. package/dist/qy-dropdown/index.mjs +1 -1
  18. package/dist/qy-file-picker/index.cjs +1 -0
  19. package/dist/qy-file-picker/index.mjs +7 -0
  20. package/dist/qy-form-section/index.cjs +1 -1
  21. package/dist/qy-form-section/index.mjs +1 -1
  22. package/dist/qy-image/index.cjs +1 -1
  23. package/dist/qy-image/index.mjs +1 -1
  24. package/dist/qy-image-upload/index.cjs +1 -1
  25. package/dist/qy-image-upload/index.mjs +1 -1
  26. package/dist/qy-input/index.cjs +2 -2
  27. package/dist/qy-input/index.mjs +6 -3
  28. package/dist/qy-input-number/index.cjs +1 -1
  29. package/dist/qy-input-number/index.mjs +4 -3
  30. package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
  31. package/dist/qy-legacy-selection-dialog/index.mjs +2 -2
  32. package/dist/qy-menu-actions/index.cjs +1 -1
  33. package/dist/qy-menu-actions/index.mjs +1 -1
  34. package/dist/qy-money-input/index.cjs +1 -1
  35. package/dist/qy-money-input/index.mjs +2 -2
  36. package/dist/qy-popover/index.cjs +2 -0
  37. package/dist/qy-popover/index.mjs +8 -0
  38. package/dist/qy-radio/index.cjs +1 -0
  39. package/dist/qy-radio/index.mjs +7 -0
  40. package/dist/qy-radio-group/index.cjs +1 -1
  41. package/dist/qy-radio-group/index.mjs +5 -2
  42. package/dist/qy-record-quote-search/index.cjs +1 -1
  43. package/dist/qy-record-quote-search/index.mjs +1 -1
  44. package/dist/qy-remark-image/index.cjs +1 -1
  45. package/dist/qy-remark-image/index.mjs +2 -2
  46. package/dist/qy-remote-select/index.cjs +1 -1
  47. package/dist/qy-remote-select/index.mjs +1 -1
  48. package/dist/qy-search-input/index.cjs +1 -1
  49. package/dist/qy-search-input/index.mjs +2 -2
  50. package/dist/qy-select/index.cjs +1 -1
  51. package/dist/qy-select/index.mjs +4 -3
  52. package/dist/qy-selection-dialog/index.cjs +1 -1
  53. package/dist/qy-selection-dialog/index.mjs +1 -1
  54. package/dist/qy-switch/index.cjs +1 -0
  55. package/dist/qy-switch/index.mjs +7 -0
  56. package/dist/qy-table-column-settings/index.cjs +1 -1
  57. package/dist/qy-table-column-settings/index.mjs +1 -1
  58. package/dist/qy-tag/index.cjs +1 -0
  59. package/dist/qy-tag/index.mjs +7 -0
  60. package/dist/qy-tooltip/index.cjs +2 -0
  61. package/dist/qy-tooltip/index.mjs +8 -0
  62. package/dist/qy-upload/index.cjs +1 -1
  63. package/dist/qy-upload/index.mjs +1 -1
  64. package/dist/shared/index-8u4DJZwd.mjs +90 -0
  65. package/dist/shared/index-9WJeVamR.cjs +1 -0
  66. package/dist/shared/index-BDFscU3G.mjs +72 -0
  67. package/dist/shared/index-BYme5QGm.cjs +1 -0
  68. package/dist/shared/index-B_mI-37S.cjs +1 -0
  69. package/dist/shared/index-BrV6CR4H.mjs +54 -0
  70. package/dist/shared/index-C8CA7nkO.cjs +1 -0
  71. package/dist/shared/index-CTtAQ1LD.cjs +1 -0
  72. package/dist/shared/index-CczrP1H7.mjs +149 -0
  73. package/dist/shared/index-ClmefDi6.cjs +1 -0
  74. package/dist/shared/{index-D7lMppIb.mjs → index-DJnmpqCc.mjs} +63 -63
  75. package/dist/shared/index-DYohs_aV.mjs +225 -0
  76. package/dist/shared/index-DixSXWJj.mjs +68 -0
  77. package/dist/shared/index-aiJ7R6G-.cjs +1 -0
  78. package/dist/shared/{index-ZLoAI88M.mjs → index-c7lnX4vT.mjs} +1327 -1389
  79. package/dist/shared/index-dEWJKTS-.cjs +1 -0
  80. package/dist/shared/index-fBuu4V3A.mjs +129 -0
  81. package/dist/shared/index-wIXCDvwC.cjs +1 -0
  82. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BF82tses.cjs +1 -0
  83. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BNjoxcAR.mjs +61 -0
  84. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DmmW8UUK.mjs +106 -0
  85. package/dist/shared/index.vue_vue_type_script_setup_true_lang-tyM4_aoa.cjs +1 -0
  86. package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +1 -0
  87. package/dist/shared/index.vue_vue_type_style_index_0_lang-BZQLyvw8.cjs +1 -0
  88. package/dist/shared/index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs +1 -0
  89. package/dist/shared/index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs +166 -0
  90. package/dist/shared/index.vue_vue_type_style_index_0_lang-DSur831A.mjs +68 -0
  91. package/dist/shared/index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs +132 -0
  92. package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +1 -0
  93. package/dist/shared/index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs +1 -0
  94. package/dist/shared/index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs +140 -0
  95. package/dist/shared/index.vue_vue_type_style_index_0_lang-ztD-It-2.mjs +121 -0
  96. package/index.d.ts +155 -17
  97. package/package.json +43 -1
  98. package/qy-checkbox/index.d.ts +42 -2
  99. package/qy-checkbox-group/index.d.ts +48 -0
  100. package/qy-date-picker/index.d.ts +140 -5
  101. package/qy-file-picker/index.d.ts +49 -0
  102. package/qy-input/index.d.ts +50 -5
  103. package/qy-input-number/index.d.ts +45 -5
  104. package/qy-popover/index.d.ts +63 -0
  105. package/qy-radio/index.d.ts +44 -0
  106. package/qy-radio-group/index.d.ts +60 -12
  107. package/qy-select/index.d.ts +67 -5
  108. package/qy-switch/index.d.ts +46 -0
  109. package/qy-tag/index.d.ts +44 -0
  110. package/qy-tooltip/index.d.ts +54 -0
  111. package/dist/shared/index-B3U7dqMt.cjs +0 -1
  112. package/dist/shared/index-BbpD7hM0.cjs +0 -1
  113. package/dist/shared/index-D3l7tLgw.cjs +0 -1
  114. package/dist/shared/index-NCpeoBUZ.mjs +0 -153
  115. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BJakDlgd.mjs +0 -70
  116. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CelW13DE.cjs +0 -1
  117. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DA1Nh7U1.mjs +0 -130
  118. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DEpXmMj5.mjs +0 -162
  119. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DNEVwqm7.cjs +0 -1
  120. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DfKTEci_.cjs +0 -1
  121. package/dist/shared/index.vue_vue_type_script_setup_true_lang-gTkP1LWg.mjs +0 -61
  122. package/dist/shared/index.vue_vue_type_script_setup_true_lang-svvSFv2K.cjs +0 -1
  123. package/dist/shared/index.vue_vue_type_style_index_0_lang-B_A4Nq6v.cjs +0 -1
  124. package/dist/shared/index.vue_vue_type_style_index_0_lang-DKFiK2fQ.mjs +0 -152
  125. /package/dist/shared/{index-CagHZ25z.mjs → index-BYLXkIxS.mjs} +0 -0
  126. /package/dist/shared/{index-CRZsiNVW.cjs → index-C1p86ezL.cjs} +0 -0
  127. /package/dist/shared/{index-BO5aWk3f.cjs → index-ClUqUsAv.cjs} +0 -0
  128. /package/dist/shared/{index-CSxCewXP.mjs → index-Cy_Glkc-.mjs} +0 -0
  129. /package/dist/shared/{index-BXlQSIWX.mjs → index-DMGXEAyl.mjs} +0 -0
  130. /package/dist/shared/{index-DyK6vf5h.cjs → index-M4vEHYZ_.cjs} +0 -0
@@ -1,5 +1,45 @@
1
- import type { DefineComponent, Plugin } from 'vue'
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin
5
+ } from 'vue'
2
6
 
3
- declare const QyCheckbox: DefineComponent<any, any, any> & Plugin
7
+ export type QyCheckboxValue = boolean | string | number
8
+ export type QyCheckboxSize = 'small' | 'default' | 'large'
4
9
 
10
+ export interface QyCheckboxProps {
11
+ modelValue?: QyCheckboxValue
12
+ value?: QyCheckboxValue
13
+ indeterminate?: boolean
14
+ disabled?: boolean
15
+ size?: QyCheckboxSize
16
+ trueValue?: QyCheckboxValue
17
+ falseValue?: QyCheckboxValue
18
+ name?: string
19
+ id?: string
20
+ tabindex?: string | number
21
+ ariaLabel?: string
22
+ ariaControls?: string
23
+ }
24
+
25
+ export type QyCheckboxEmits = {
26
+ 'update:modelValue': (value: QyCheckboxValue) => void
27
+ change: (value: QyCheckboxValue) => void
28
+ focus: (event: FocusEvent) => void
29
+ blur: (event: FocusEvent) => void
30
+ }
31
+
32
+ declare const QyCheckbox: DefineComponent<
33
+ QyCheckboxProps,
34
+ {},
35
+ {},
36
+ {},
37
+ {},
38
+ ComponentOptionsMixin,
39
+ ComponentOptionsMixin,
40
+ QyCheckboxEmits
41
+ > &
42
+ Plugin
43
+
44
+ export { QyCheckbox }
5
45
  export default QyCheckbox
@@ -0,0 +1,48 @@
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin
5
+ } from 'vue'
6
+ import type {
7
+ QyCheckboxSize,
8
+ QyCheckboxValue
9
+ } from '../qy-checkbox'
10
+
11
+ export type QyCheckboxGroupSize = QyCheckboxSize
12
+
13
+ export interface QyCheckboxGroupOption {
14
+ label: string
15
+ value: QyCheckboxValue
16
+ disabled?: boolean
17
+ }
18
+
19
+ export interface QyCheckboxGroupProps {
20
+ modelValue?: QyCheckboxValue[]
21
+ options?: QyCheckboxGroupOption[]
22
+ disabled?: boolean
23
+ min?: number
24
+ max?: number
25
+ size?: QyCheckboxGroupSize
26
+ ariaLabel?: string
27
+ }
28
+
29
+ export type QyCheckboxGroupEmits = {
30
+ 'update:modelValue': (value: QyCheckboxValue[]) => void
31
+ change: (value: QyCheckboxValue[]) => void
32
+ }
33
+
34
+ declare const QyCheckboxGroup: DefineComponent<
35
+ QyCheckboxGroupProps,
36
+ {},
37
+ {},
38
+ {},
39
+ {},
40
+ ComponentOptionsMixin,
41
+ ComponentOptionsMixin,
42
+ QyCheckboxGroupEmits
43
+ > &
44
+ Plugin
45
+
46
+ export { QyCheckboxGroup }
47
+ export type { QyCheckboxSize, QyCheckboxValue }
48
+ export default QyCheckboxGroup
@@ -1,5 +1,140 @@
1
- import type { DefineComponent, Plugin } from 'vue'
2
-
3
- declare const QyDatePicker: DefineComponent<any, any, any> & Plugin
4
-
5
- export default QyDatePicker
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin,
5
+ PublicProps,
6
+ SlotsType,
7
+ VNodeChild
8
+ } from 'vue'
9
+
10
+ export type QyDatePickerScalarValue = string | number | Date
11
+ export type QyDatePickerRangeValue = QyDatePickerScalarValue[]
12
+ export type QyDatePickerModelValue =
13
+ | QyDatePickerScalarValue
14
+ | QyDatePickerRangeValue
15
+ | null
16
+ | undefined
17
+
18
+ export type QyDatePickerType =
19
+ | 'year'
20
+ | 'month'
21
+ | 'date'
22
+ | 'dates'
23
+ | 'datetime'
24
+ | 'week'
25
+ | 'daterange'
26
+ | 'datetimerange'
27
+ | 'monthrange'
28
+
29
+ export type QyDatePickerSize = 'small' | 'default' | 'large'
30
+ export type QyDatePickerShortcutValue = Date | [Date, Date]
31
+
32
+ export interface QyDatePickerShortcut {
33
+ text: string
34
+ value:
35
+ | QyDatePickerShortcutValue
36
+ | (() => QyDatePickerShortcutValue)
37
+ }
38
+
39
+ export interface QyDatePickerDateCell {
40
+ date?: Date
41
+ text?: number
42
+ disabled?: boolean
43
+ inRange?: boolean
44
+ start?: boolean
45
+ end?: boolean
46
+ type?: 'normal' | 'today' | 'week' | 'next-month' | 'prev-month'
47
+ }
48
+
49
+ export interface QyDatePickerPanelSlotProps {
50
+ date?: Date
51
+ type?: QyDatePickerType
52
+ }
53
+
54
+ export interface QyDatePickerSlots {
55
+ default?: (props: QyDatePickerDateCell) => VNodeChild
56
+ 'range-separator'?: (props: QyDatePickerPanelSlotProps) => VNodeChild
57
+ 'prev-month'?: (props: QyDatePickerPanelSlotProps) => VNodeChild
58
+ 'next-month'?: (props: QyDatePickerPanelSlotProps) => VNodeChild
59
+ 'prev-year'?: (props: QyDatePickerPanelSlotProps) => VNodeChild
60
+ 'next-year'?: (props: QyDatePickerPanelSlotProps) => VNodeChild
61
+ }
62
+
63
+ export type QyDatePickerPanelMode = 'month' | 'year'
64
+ export type QyDatePickerPanelView = 'date' | 'month' | 'year'
65
+ export type QyDatePickerPanelDate = Date | [Date, Date]
66
+ export type QyDatePickerCalendarChangeValue = [Date, Date | null]
67
+
68
+ export interface QyDatePickerProps {
69
+ modelValue?: QyDatePickerModelValue
70
+ type?: QyDatePickerType
71
+ placeholder?: string
72
+ startPlaceholder?: string
73
+ endPlaceholder?: string
74
+ rangeSeparator?: string
75
+ format?: string
76
+ valueFormat?: string
77
+ defaultTime?: Date | [Date, Date]
78
+ disabledDate?: (date: Date) => boolean
79
+ shortcuts?: QyDatePickerShortcut[]
80
+ clearable?: boolean
81
+ disabled?: boolean
82
+ readonly?: boolean
83
+ size?: QyDatePickerSize
84
+ teleported?: boolean
85
+ appendTo?: string | HTMLElement
86
+ popperClass?: string
87
+ normalizeRangeEndTime?: boolean
88
+ }
89
+
90
+ export type QyDatePickerEmits = {
91
+ 'update:modelValue': (value: QyDatePickerModelValue) => void
92
+ change: (value: QyDatePickerModelValue) => void
93
+ clear: () => void
94
+ 'calendar-change': (value: QyDatePickerCalendarChangeValue) => void
95
+ 'panel-change': (
96
+ date: QyDatePickerPanelDate,
97
+ mode: QyDatePickerPanelMode,
98
+ view?: QyDatePickerPanelView
99
+ ) => void
100
+ 'visible-change': (visible: boolean) => void
101
+ focus: (event: FocusEvent) => void
102
+ blur: (event: FocusEvent) => void
103
+ }
104
+
105
+ export interface QyDatePickerExposed {
106
+ focus(): void
107
+ blur(): void
108
+ open(): void
109
+ close(): void
110
+ }
111
+
112
+ type QyDatePickerComponentProps = QyDatePickerProps & {
113
+ 'onUpdate:modelValue'?: QyDatePickerEmits['update:modelValue']
114
+ onChange?: QyDatePickerEmits['change']
115
+ onClear?: QyDatePickerEmits['clear']
116
+ 'onCalendar-change'?: QyDatePickerEmits['calendar-change']
117
+ 'onPanel-change'?: QyDatePickerEmits['panel-change']
118
+ 'onVisible-change'?: QyDatePickerEmits['visible-change']
119
+ onFocus?: QyDatePickerEmits['focus']
120
+ onBlur?: QyDatePickerEmits['blur']
121
+ }
122
+
123
+ declare const QyDatePicker: DefineComponent<
124
+ QyDatePickerProps,
125
+ QyDatePickerExposed,
126
+ {},
127
+ {},
128
+ {},
129
+ ComponentOptionsMixin,
130
+ ComponentOptionsMixin,
131
+ QyDatePickerEmits,
132
+ string,
133
+ PublicProps,
134
+ QyDatePickerComponentProps,
135
+ {},
136
+ SlotsType<QyDatePickerSlots>
137
+ > & Plugin
138
+
139
+ export { QyDatePicker }
140
+ export default QyDatePicker
@@ -0,0 +1,49 @@
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin
5
+ } from 'vue'
6
+
7
+ export type QyFilePickerInvalidCode = 'extension' | 'size'
8
+
9
+ export interface QyFilePickerInvalidDetail {
10
+ code: QyFilePickerInvalidCode
11
+ file: File
12
+ message: string
13
+ }
14
+
15
+ export interface QyFilePickerProps {
16
+ modelValue?: File | null
17
+ extensions?: string[]
18
+ maxSizeMb?: number
19
+ disabled?: boolean
20
+ drag?: boolean
21
+ placeholder?: string
22
+ }
23
+
24
+ export interface QyFilePickerExposed {
25
+ openFileDialog(): void
26
+ clear(): void
27
+ }
28
+
29
+ export type QyFilePickerEmits = {
30
+ 'update:modelValue': (file: File | null) => void
31
+ change: (file: File | null) => void
32
+ clear: () => void
33
+ invalid: (detail: QyFilePickerInvalidDetail) => void
34
+ }
35
+
36
+ declare const QyFilePicker: DefineComponent<
37
+ QyFilePickerProps,
38
+ QyFilePickerExposed,
39
+ {},
40
+ {},
41
+ {},
42
+ ComponentOptionsMixin,
43
+ ComponentOptionsMixin,
44
+ QyFilePickerEmits
45
+ > &
46
+ Plugin
47
+
48
+ export { QyFilePicker }
49
+ export default QyFilePicker
@@ -1,5 +1,50 @@
1
- import type { DefineComponent, Plugin } from 'vue'
2
-
3
- declare const QyInput: DefineComponent<any, any, any> & Plugin
4
-
5
- export default QyInput
1
+ import type { InputAutoSize, InputProps, InputType } from 'element-plus'
2
+ import type { DefineComponent, Plugin } from 'vue'
3
+
4
+ export type QyInputValue = string
5
+ export type QyInputModelValue = string | number | null | undefined
6
+ export type QyInputType = InputType
7
+ export type QyInputSize = 'small' | 'default' | 'large'
8
+ export type QyInputTrimMode = 'none' | 'blur' | 'change'
9
+
10
+ export interface QyInputProps
11
+ extends Omit<InputProps, 'modelValue' | 'type' | 'size' | 'autosize'> {
12
+ modelValue?: QyInputModelValue
13
+ type?: QyInputType
14
+ size?: QyInputSize
15
+ autosize?: InputAutoSize
16
+ removeSpace?: boolean
17
+ trimMode?: QyInputTrimMode
18
+ }
19
+
20
+ export type QyInputEmits = {
21
+ 'update:modelValue': (value: QyInputValue) => void
22
+ input: (value: QyInputValue) => void
23
+ change: (value: QyInputValue) => void
24
+ focus: (event: FocusEvent) => void
25
+ blur: (event: FocusEvent) => void
26
+ clear: () => void
27
+ enter: (event: KeyboardEvent) => void
28
+ }
29
+
30
+ export interface QyInputExposed {
31
+ focus(): void
32
+ blur(): void
33
+ select(): void
34
+ clear(): void
35
+ resizeTextarea(): void
36
+ }
37
+
38
+ declare const QyInput: DefineComponent<
39
+ QyInputProps,
40
+ QyInputExposed,
41
+ {},
42
+ {},
43
+ {},
44
+ {},
45
+ {},
46
+ QyInputEmits
47
+ > & Plugin
48
+
49
+ export { QyInput }
50
+ export default QyInput
@@ -1,5 +1,45 @@
1
- import type { DefineComponent, Plugin } from 'vue'
2
-
3
- declare const QyInputNumber: DefineComponent<any, any, any> & Plugin
4
-
5
- export default QyInputNumber
1
+ import type { InputNumberProps } from 'element-plus'
2
+ import type { DefineComponent, Plugin } from 'vue'
3
+
4
+ export type QyInputNumberValue = number | null | undefined
5
+ export type QyInputNumberClearValue = 'min' | 'max' | number | null
6
+ export type QyInputNumberControlsPosition = '' | 'right'
7
+ export type QyInputNumberSize = 'small' | 'default' | 'large'
8
+
9
+ export interface QyInputNumberProps
10
+ extends Omit<
11
+ InputNumberProps,
12
+ 'modelValue' | 'valueOnClear' | 'controlsPosition' | 'size'
13
+ > {
14
+ modelValue?: QyInputNumberValue
15
+ valueOnClear?: QyInputNumberClearValue
16
+ controlsPosition?: QyInputNumberControlsPosition
17
+ size?: QyInputNumberSize
18
+ }
19
+
20
+ export type QyInputNumberEmits = {
21
+ 'update:modelValue': (value: QyInputNumberValue) => void
22
+ input: (value: QyInputNumberValue) => void
23
+ change: (currentValue: QyInputNumberValue, oldValue: QyInputNumberValue) => void
24
+ focus: (event: FocusEvent) => void
25
+ blur: (event: FocusEvent) => void
26
+ }
27
+
28
+ export interface QyInputNumberExposed {
29
+ focus(): void
30
+ blur(): void
31
+ }
32
+
33
+ declare const QyInputNumber: DefineComponent<
34
+ QyInputNumberProps,
35
+ QyInputNumberExposed,
36
+ {},
37
+ {},
38
+ {},
39
+ {},
40
+ {},
41
+ QyInputNumberEmits
42
+ > & Plugin
43
+
44
+ export { QyInputNumber }
45
+ export default QyInputNumber
@@ -0,0 +1,63 @@
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin
5
+ } from 'vue'
6
+
7
+ export type QyPopoverTrigger = 'click' | 'hover' | 'focus' | 'contextmenu'
8
+ export type QyPopoverPlacement =
9
+ | 'top'
10
+ | 'top-start'
11
+ | 'top-end'
12
+ | 'bottom'
13
+ | 'bottom-start'
14
+ | 'bottom-end'
15
+ | 'left'
16
+ | 'left-start'
17
+ | 'left-end'
18
+ | 'right'
19
+ | 'right-start'
20
+ | 'right-end'
21
+ | 'auto'
22
+ | 'auto-start'
23
+ | 'auto-end'
24
+ export type QyPopoverEffect = 'light' | 'dark'
25
+
26
+ export interface QyPopoverProps {
27
+ trigger?: QyPopoverTrigger
28
+ placement?: QyPopoverPlacement
29
+ effect?: QyPopoverEffect
30
+ width?: number | string
31
+ offset?: number
32
+ showDelay?: number
33
+ hideDelay?: number
34
+ showArrow?: boolean
35
+ disabled?: boolean
36
+ open?: boolean
37
+ }
38
+
39
+ export type QyPopoverEmits = {
40
+ 'update:open': (value: boolean) => void
41
+ 'open-change': (value: boolean) => void
42
+ open: () => void
43
+ close: () => void
44
+ }
45
+
46
+ export interface QyPopoverExposed {
47
+ close: () => void
48
+ }
49
+
50
+ declare const QyPopover: DefineComponent<
51
+ QyPopoverProps,
52
+ QyPopoverExposed,
53
+ {},
54
+ {},
55
+ {},
56
+ ComponentOptionsMixin,
57
+ ComponentOptionsMixin,
58
+ QyPopoverEmits
59
+ > &
60
+ Plugin
61
+
62
+ export { QyPopover }
63
+ export default QyPopover
@@ -0,0 +1,44 @@
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin
5
+ } from 'vue'
6
+
7
+ export type QyRadioValue = boolean | string | number
8
+ export type QyRadioSize = 'small' | 'default' | 'large'
9
+
10
+ export interface QyRadioProps {
11
+ modelValue?: QyRadioValue
12
+ value?: QyRadioValue
13
+ label?: string
14
+ disabled?: boolean
15
+ size?: QyRadioSize
16
+ name?: string
17
+ border?: boolean
18
+ id?: string
19
+ tabindex?: string | number
20
+ ariaLabel?: string
21
+ ariaControls?: string
22
+ }
23
+
24
+ export type QyRadioEmits = {
25
+ 'update:modelValue': (value: QyRadioValue) => void
26
+ change: (value: QyRadioValue) => void
27
+ focus: (event: FocusEvent) => void
28
+ blur: (event: FocusEvent) => void
29
+ }
30
+
31
+ declare const QyRadio: DefineComponent<
32
+ QyRadioProps,
33
+ {},
34
+ {},
35
+ {},
36
+ {},
37
+ ComponentOptionsMixin,
38
+ ComponentOptionsMixin,
39
+ QyRadioEmits
40
+ > &
41
+ Plugin
42
+
43
+ export { QyRadio }
44
+ export default QyRadio
@@ -1,12 +1,60 @@
1
- import type { DefineComponent, Plugin } from 'vue'
2
-
3
- /**
4
- * QyRadioGroup 单组件入口类型声明。
5
- *
6
- * 这里同时声明 DefineComponent 和 Plugin:
7
- * - DefineComponent 用于模板、TSX 或局部 components 注册时获得组件类型。
8
- * - Plugin 用于 app.use(QyRadioGroup) 时通过 Vue 插件类型校验。
9
- */
10
- declare const QyRadioGroup: DefineComponent<any, any, any> & Plugin
11
-
12
- export default QyRadioGroup
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin
5
+ } from 'vue'
6
+ import type {
7
+ QyRadioSize,
8
+ QyRadioValue
9
+ } from '../qy-radio'
10
+
11
+ export type QyRadioGroupSize = QyRadioSize
12
+ export type QyRadioGroupType = 'radio' | 'button'
13
+
14
+ export interface QyRadioGroupOption {
15
+ [key: string]: unknown
16
+ label?: string
17
+ value?: QyRadioValue
18
+ disabled?: boolean
19
+ }
20
+
21
+ export interface QyRadioGroupProps {
22
+ modelValue?: QyRadioValue | null
23
+ options?: QyRadioGroupOption[]
24
+ labelKey?: string
25
+ valueKey?: string
26
+ disabledKey?: string
27
+ disabled?: boolean
28
+ size?: QyRadioGroupSize
29
+ name?: string
30
+ type?: QyRadioGroupType
31
+ border?: boolean
32
+ }
33
+
34
+ export type QyRadioGroupEmits = {
35
+ 'update:modelValue': (value: QyRadioValue) => void
36
+ change: (value: QyRadioValue) => void
37
+ }
38
+
39
+ export interface QyRadioGroupExposed {
40
+ /**
41
+ * @deprecated 仅为已发布兼容保留,不新增实例能力。
42
+ */
43
+ getRadioGroupInstance(): unknown
44
+ }
45
+
46
+ declare const QyRadioGroup: DefineComponent<
47
+ QyRadioGroupProps,
48
+ QyRadioGroupExposed,
49
+ {},
50
+ {},
51
+ {},
52
+ ComponentOptionsMixin,
53
+ ComponentOptionsMixin,
54
+ QyRadioGroupEmits
55
+ > &
56
+ Plugin
57
+
58
+ export { QyRadioGroup }
59
+ export type { QyRadioSize, QyRadioValue }
60
+ export default QyRadioGroup
@@ -1,5 +1,67 @@
1
- import type { DefineComponent, Plugin } from 'vue'
2
-
3
- declare const QySelect: DefineComponent<any, any, any> & Plugin
4
-
5
- export default QySelect
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin
5
+ } from 'vue'
6
+
7
+ export type QySelectPrimitive = string | number | boolean
8
+
9
+ export type QySelectObjectValue = object
10
+
11
+ export type QySelectValue = QySelectPrimitive | QySelectObjectValue
12
+ export type QySelectModelValue = QySelectValue | QySelectValue[] | null | undefined
13
+ export type QySelectSize = 'small' | 'default' | 'large'
14
+
15
+ export type QySelectOption = object
16
+
17
+ export interface QySelectProps {
18
+ modelValue?: QySelectModelValue
19
+ options?: QySelectOption[]
20
+ labelKey?: string
21
+ valueKey?: string
22
+ disabledKey?: string
23
+ objectIdentityKey?: string
24
+ placeholder?: string
25
+ disabled?: boolean
26
+ clearable?: boolean
27
+ filterable?: boolean
28
+ loading?: boolean
29
+ multiple?: boolean
30
+ collapseTags?: boolean
31
+ collapseTagsTooltip?: boolean
32
+ autoSelectSingle?: boolean
33
+ size?: QySelectSize
34
+ teleported?: boolean
35
+ appendTo?: string | HTMLElement
36
+ fitInputWidth?: boolean
37
+ popperClass?: string
38
+ }
39
+
40
+ export type QySelectEmits = {
41
+ 'update:modelValue': (value: QySelectModelValue) => void
42
+ change: (value: QySelectModelValue) => void
43
+ clear: () => void
44
+ 'visible-change': (visible: boolean) => void
45
+ focus: (event: FocusEvent) => void
46
+ blur: (event: FocusEvent) => void
47
+ }
48
+
49
+ export interface QySelectExposed {
50
+ focus(): void
51
+ blur(): void
52
+ }
53
+
54
+ declare const QySelect: DefineComponent<
55
+ QySelectProps,
56
+ QySelectExposed,
57
+ {},
58
+ {},
59
+ {},
60
+ ComponentOptionsMixin,
61
+ ComponentOptionsMixin,
62
+ QySelectEmits
63
+ > &
64
+ Plugin
65
+
66
+ export { QySelect }
67
+ export default QySelect
@@ -0,0 +1,46 @@
1
+ import type {
2
+ ComponentOptionsMixin,
3
+ DefineComponent,
4
+ Plugin
5
+ } from 'vue'
6
+
7
+ export type QySwitchValue = boolean | string | number
8
+ export type QySwitchSize = 'small' | 'default' | 'large'
9
+
10
+ export interface QySwitchProps {
11
+ modelValue?: QySwitchValue
12
+ activeValue?: QySwitchValue
13
+ inactiveValue?: QySwitchValue
14
+ disabled?: boolean
15
+ loading?: boolean
16
+ size?: QySwitchSize
17
+ activeText?: string
18
+ inactiveText?: string
19
+ inlinePrompt?: boolean
20
+ name?: string
21
+ id?: string
22
+ tabindex?: string | number
23
+ ariaLabel?: string
24
+ }
25
+
26
+ export type QySwitchEmits = {
27
+ 'update:modelValue': (value: QySwitchValue) => void
28
+ change: (value: QySwitchValue) => void
29
+ focus: (event: FocusEvent) => void
30
+ blur: (event: FocusEvent) => void
31
+ }
32
+
33
+ declare const QySwitch: DefineComponent<
34
+ QySwitchProps,
35
+ {},
36
+ {},
37
+ {},
38
+ {},
39
+ ComponentOptionsMixin,
40
+ ComponentOptionsMixin,
41
+ QySwitchEmits
42
+ > &
43
+ Plugin
44
+
45
+ export { QySwitch }
46
+ export default QySwitch