yc-design-vue 2.2.2 → 2.2.3

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 (208) hide show
  1. package/dist/index.umd.js +1 -1
  2. package/dist/lang-es/zh-cn.js +26 -26
  3. package/dist/style.css +1 -1
  4. package/es/Anchor/hooks/useContext.d.ts +1 -1
  5. package/es/Anchor/hooks/useContext.js +5 -9
  6. package/es/Carousel/hooks/useContext.d.ts +11 -2
  7. package/es/Carousel/hooks/useContext.js +4 -4
  8. package/es/Cascader/hooks/useContext.d.ts +69 -8
  9. package/es/Cascader/hooks/useContext.js +5 -13
  10. package/es/Cascader/index.css +1 -1
  11. package/es/ColorPicker/hooks/useContext.d.ts +12 -1
  12. package/es/ColorPicker/hooks/useContext.js +5 -5
  13. package/es/DatePicker/PickerRange.vue.d.ts +2 -0
  14. package/es/DatePicker/PickerRange.vue.js +15 -0
  15. package/es/DatePicker/PickerRange.vue2.js +4 -0
  16. package/es/DatePicker/YcDatePicker.vue.d.ts +2 -0
  17. package/es/DatePicker/YcDatePicker.vue.js +15 -0
  18. package/es/DatePicker/YcDatePicker.vue2.js +4 -0
  19. package/es/DatePicker/YcMonthPicker.vue.d.ts +64 -0
  20. package/es/DatePicker/YcMonthPicker.vue.js +234 -0
  21. package/es/DatePicker/YcMonthPicker.vue3.js +5 -0
  22. package/es/DatePicker/YcWeekPicker.vue.d.ts +65 -0
  23. package/es/DatePicker/YcWeekPicker.vue.js +7 -0
  24. package/es/DatePicker/YcWeekPicker.vue2.js +319 -0
  25. package/es/DatePicker/YcYearPicker.vue.d.ts +63 -0
  26. package/es/DatePicker/YcYearPicker.vue.js +200 -0
  27. package/es/DatePicker/YcYearPicker.vue3.js +5 -0
  28. package/es/DatePicker/component/PickerCell.vue.d.ts +36 -0
  29. package/es/DatePicker/component/PickerCell.vue.js +7 -0
  30. package/es/DatePicker/component/PickerCell.vue2.js +41 -0
  31. package/es/DatePicker/component/PickerInput.vue.d.ts +297 -0
  32. package/es/DatePicker/component/PickerInput.vue.js +7 -0
  33. package/es/DatePicker/component/PickerInput.vue2.js +125 -0
  34. package/es/DatePicker/component/PickerPanel.vue.d.ts +33 -0
  35. package/es/DatePicker/component/PickerPanel.vue.js +108 -0
  36. package/es/DatePicker/component/PickerPanel.vue3.js +5 -0
  37. package/es/DatePicker/hooks/useContext.d.ts +19 -0
  38. package/es/DatePicker/hooks/useContext.js +37 -0
  39. package/es/DatePicker/hooks/userPicker.d.ts +44 -0
  40. package/es/DatePicker/hooks/userPicker.js +221 -0
  41. package/es/DatePicker/index.css +3 -0
  42. package/es/DatePicker/index.d.ts +38 -0
  43. package/es/DatePicker/index.js +23 -0
  44. package/es/DatePicker/type.d.ts +104 -0
  45. package/es/Drawer/DrawerService.vue.js +1 -1
  46. package/es/Grid/hooks/useContext.d.ts +6 -2
  47. package/es/Grid/hooks/useContext.js +5 -7
  48. package/es/Menu/hooks/useContext.d.ts +17 -2
  49. package/es/Menu/hooks/useContext.js +5 -7
  50. package/es/Message/Message.vue.js +1 -1
  51. package/es/Modal/ModalService.vue.js +2 -2
  52. package/es/Notification/Notification.vue.js +2 -2
  53. package/es/Select/hooks/useContext.d.ts +2 -2
  54. package/es/Select/hooks/useSelectOptions.d.ts +2 -2
  55. package/es/Slider/hooks/useContext.d.ts +12 -6
  56. package/es/Slider/hooks/useContext.js +5 -12
  57. package/es/Statistic/Statistic.vue.js +3 -3
  58. package/es/Steps/hooks/useContext.d.ts +9 -1
  59. package/es/Steps/hooks/useContext.js +3 -6
  60. package/es/Tabs/hooks/useContext.d.ts +9 -2
  61. package/es/Tabs/hooks/useContext.js +5 -9
  62. package/es/TimePicker/TimePicker.vue.js +1 -1
  63. package/es/TimePicker/hooks/useContext.d.ts +17 -7
  64. package/es/TimePicker/hooks/useContext.js +4 -9
  65. package/es/Timeline/hooks/useContext.d.ts +4 -2
  66. package/es/Timeline/hooks/useContext.js +3 -6
  67. package/es/Transfer/TransferPanel.vue.js +1 -1
  68. package/es/Transfer/hooks/useContext.d.ts +1 -6
  69. package/es/Transfer/hooks/useContext.js +3 -7
  70. package/es/Typography/TypographyBase.vue.js +2 -2
  71. package/es/Upload/Upload.vue.js +6 -4
  72. package/es/Upload/UploadFileList.vue.js +129 -5
  73. package/es/Upload/UploadFileList.vue3.js +5 -0
  74. package/es/Upload/UploadPictureCard.vue.js +135 -5
  75. package/es/Upload/UploadPictureCard.vue3.js +5 -0
  76. package/es/_shared/icons/IconCalendar.vue.d.ts +2 -0
  77. package/es/_shared/icons/IconCalendar.vue.js +4 -0
  78. package/es/_shared/icons/IconCalendar.vue2.js +31 -0
  79. package/es/_shared/icons/IconCopy.vue.js +1 -28
  80. package/es/_shared/icons/IconCopy.vue2.js +28 -1
  81. package/es/_shared/icons/IconDelete.vue.js +1 -28
  82. package/es/_shared/icons/IconDelete.vue2.js +28 -1
  83. package/es/_shared/icons/IconDoubleLeft.vue.d.ts +2 -0
  84. package/es/_shared/icons/IconDoubleLeft.vue.js +31 -0
  85. package/es/_shared/icons/IconDoubleLeft.vue2.js +4 -0
  86. package/es/_shared/icons/IconDoubleRight.vue.d.ts +2 -0
  87. package/es/_shared/icons/IconDoubleRight.vue.js +31 -0
  88. package/es/_shared/icons/IconDoubleRight.vue2.js +4 -0
  89. package/es/_shared/icons/IconEdit.vue.js +1 -28
  90. package/es/_shared/icons/IconEdit.vue2.js +28 -1
  91. package/es/_shared/icons/index.d.ts +3 -0
  92. package/es/_shared/type/index.d.ts +1 -1
  93. package/es/_shared/utils/hooks.js +1 -1
  94. package/es/_shared/utils/time.d.ts +0 -1
  95. package/es/_shared/utils/time.js +0 -4
  96. package/es/_shared/utils/vue-utils.d.ts +1 -1
  97. package/es/_virtual/isoWeek.js +4 -0
  98. package/es/index.d.ts +295 -1
  99. package/es/index.js +42 -33
  100. package/es/lang-es/zh-cn.js +26 -26
  101. package/es/node_modules/dayjs/plugin/isoWeek.js +33 -0
  102. package/es/src/lang/lang-es/zh-cn.js +26 -26
  103. package/es/style.css +1 -1
  104. package/lib/Anchor/hooks/useContext.d.ts +1 -1
  105. package/lib/Anchor/hooks/useContext.js +1 -1
  106. package/lib/Carousel/hooks/useContext.d.ts +11 -2
  107. package/lib/Carousel/hooks/useContext.js +1 -1
  108. package/lib/Cascader/hooks/useContext.d.ts +69 -8
  109. package/lib/Cascader/hooks/useContext.js +1 -1
  110. package/lib/Cascader/index.css +1 -1
  111. package/lib/ColorPicker/hooks/useContext.d.ts +12 -1
  112. package/lib/ColorPicker/hooks/useContext.js +1 -1
  113. package/lib/DatePicker/PickerRange.vue.d.ts +2 -0
  114. package/lib/DatePicker/PickerRange.vue.js +1 -0
  115. package/lib/DatePicker/PickerRange.vue2.js +1 -0
  116. package/lib/DatePicker/YcDatePicker.vue.d.ts +2 -0
  117. package/lib/DatePicker/YcDatePicker.vue.js +1 -0
  118. package/lib/DatePicker/YcDatePicker.vue2.js +1 -0
  119. package/lib/DatePicker/YcMonthPicker.vue.d.ts +64 -0
  120. package/lib/DatePicker/YcMonthPicker.vue.js +1 -0
  121. package/lib/DatePicker/YcMonthPicker.vue3.js +1 -0
  122. package/lib/DatePicker/YcWeekPicker.vue.d.ts +65 -0
  123. package/lib/DatePicker/YcWeekPicker.vue.js +1 -0
  124. package/lib/DatePicker/YcWeekPicker.vue2.js +1 -0
  125. package/lib/DatePicker/YcYearPicker.vue.d.ts +63 -0
  126. package/lib/DatePicker/YcYearPicker.vue.js +1 -0
  127. package/lib/DatePicker/YcYearPicker.vue3.js +1 -0
  128. package/lib/DatePicker/component/PickerCell.vue.d.ts +36 -0
  129. package/lib/DatePicker/component/PickerCell.vue.js +1 -0
  130. package/lib/DatePicker/component/PickerCell.vue2.js +1 -0
  131. package/lib/DatePicker/component/PickerInput.vue.d.ts +297 -0
  132. package/lib/DatePicker/component/PickerInput.vue.js +1 -0
  133. package/lib/DatePicker/component/PickerInput.vue2.js +1 -0
  134. package/lib/DatePicker/component/PickerPanel.vue.d.ts +33 -0
  135. package/lib/DatePicker/component/PickerPanel.vue.js +1 -0
  136. package/lib/DatePicker/component/PickerPanel.vue3.js +1 -0
  137. package/lib/DatePicker/hooks/useContext.d.ts +19 -0
  138. package/lib/DatePicker/hooks/useContext.js +1 -0
  139. package/lib/DatePicker/hooks/userPicker.d.ts +44 -0
  140. package/lib/DatePicker/hooks/userPicker.js +1 -0
  141. package/lib/DatePicker/index.css +3 -0
  142. package/lib/DatePicker/index.d.ts +38 -0
  143. package/lib/DatePicker/index.js +1 -0
  144. package/lib/DatePicker/type.d.ts +104 -0
  145. package/lib/Drawer/DrawerService.vue.js +1 -1
  146. package/lib/Grid/hooks/useContext.d.ts +6 -2
  147. package/lib/Grid/hooks/useContext.js +1 -1
  148. package/lib/Menu/hooks/useContext.d.ts +17 -2
  149. package/lib/Menu/hooks/useContext.js +1 -1
  150. package/lib/Message/Message.vue.js +1 -1
  151. package/lib/Modal/ModalService.vue.js +1 -1
  152. package/lib/Notification/Notification.vue.js +1 -1
  153. package/lib/Select/hooks/useContext.d.ts +2 -2
  154. package/lib/Select/hooks/useSelectOptions.d.ts +2 -2
  155. package/lib/Slider/hooks/useContext.d.ts +12 -6
  156. package/lib/Slider/hooks/useContext.js +1 -1
  157. package/lib/Statistic/Statistic.vue.js +1 -1
  158. package/lib/Steps/hooks/useContext.d.ts +9 -1
  159. package/lib/Steps/hooks/useContext.js +1 -1
  160. package/lib/Tabs/hooks/useContext.d.ts +9 -2
  161. package/lib/Tabs/hooks/useContext.js +1 -1
  162. package/lib/TimePicker/TimePicker.vue.js +1 -1
  163. package/lib/TimePicker/hooks/useContext.d.ts +17 -7
  164. package/lib/TimePicker/hooks/useContext.js +1 -1
  165. package/lib/Timeline/hooks/useContext.d.ts +4 -2
  166. package/lib/Timeline/hooks/useContext.js +1 -1
  167. package/lib/Transfer/TransferPanel.vue.js +1 -1
  168. package/lib/Transfer/hooks/useContext.d.ts +1 -6
  169. package/lib/Transfer/hooks/useContext.js +1 -1
  170. package/lib/Typography/TypographyBase.vue.js +1 -1
  171. package/lib/Upload/Upload.vue.js +1 -1
  172. package/lib/Upload/UploadFileList.vue.js +1 -1
  173. package/lib/Upload/UploadFileList.vue3.js +1 -0
  174. package/lib/Upload/UploadPictureCard.vue.js +1 -1
  175. package/lib/Upload/UploadPictureCard.vue3.js +1 -0
  176. package/lib/_shared/icons/IconCalendar.vue.d.ts +2 -0
  177. package/lib/_shared/icons/IconCalendar.vue.js +1 -0
  178. package/lib/_shared/icons/IconCalendar.vue2.js +1 -0
  179. package/lib/_shared/icons/IconCopy.vue.js +1 -1
  180. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  181. package/lib/_shared/icons/IconDelete.vue.js +1 -1
  182. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  183. package/lib/_shared/icons/IconDoubleLeft.vue.d.ts +2 -0
  184. package/lib/_shared/icons/IconDoubleLeft.vue.js +1 -0
  185. package/lib/_shared/icons/IconDoubleLeft.vue2.js +1 -0
  186. package/lib/_shared/icons/IconDoubleRight.vue.d.ts +2 -0
  187. package/lib/_shared/icons/IconDoubleRight.vue.js +1 -0
  188. package/lib/_shared/icons/IconDoubleRight.vue2.js +1 -0
  189. package/lib/_shared/icons/IconEdit.vue.js +1 -1
  190. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  191. package/lib/_shared/icons/index.d.ts +3 -0
  192. package/lib/_shared/type/index.d.ts +1 -1
  193. package/lib/_shared/utils/hooks.js +1 -1
  194. package/lib/_shared/utils/time.d.ts +0 -1
  195. package/lib/_shared/utils/time.js +1 -1
  196. package/lib/_shared/utils/vue-utils.d.ts +1 -1
  197. package/lib/_virtual/isoWeek.js +1 -0
  198. package/lib/index.d.ts +295 -1
  199. package/lib/index.js +1 -1
  200. package/lib/lang-es/zh-cn.js +26 -26
  201. package/lib/node_modules/dayjs/plugin/isoWeek.js +1 -0
  202. package/lib/src/lang/lang-es/zh-cn.js +1 -1
  203. package/lib/style.css +1 -1
  204. package/package.json +1 -1
  205. package/es/Upload/UploadFileList.vue2.js +0 -131
  206. package/es/Upload/UploadPictureCard.vue2.js +0 -137
  207. package/lib/Upload/UploadFileList.vue2.js +0 -1
  208. package/lib/Upload/UploadPictureCard.vue2.js +0 -1
@@ -0,0 +1,297 @@
1
+ import { nextTick } from 'vue';
2
+ type __VLS_Props = {
3
+ type?: 'year' | 'month' | 'week' | 'time' | 'date';
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ prefix?(_: {}): any;
9
+ 'suffix-icon'?(_: {}): any;
10
+ content?(_: {}): any;
11
+ };
12
+ refs: {
13
+ inputRef: ({
14
+ $: import('vue').ComponentInternalInstance;
15
+ $data: {};
16
+ $props: {
17
+ readonly modelValue?: string | undefined;
18
+ readonly defaultValue?: string | undefined;
19
+ readonly size?: import('../..').Size | undefined;
20
+ readonly allowClear?: boolean | undefined;
21
+ readonly disabled?: boolean | undefined;
22
+ readonly readonly?: boolean | undefined;
23
+ readonly error?: boolean | undefined;
24
+ readonly placeholder?: string | undefined;
25
+ readonly maxLength?: import('../../Input').MaxLength | undefined;
26
+ readonly wordLength?: import('../../Input').WordLength | undefined;
27
+ readonly wordSlice?: import('../../Input').WordSlice | undefined;
28
+ readonly showWordLimit?: boolean | undefined;
29
+ readonly inputAttrs?: import('../..').RecordType | undefined;
30
+ readonly showInput?: boolean | undefined;
31
+ readonly onChange?: ((value: string, ev: Event) => any) | undefined;
32
+ readonly onFocus?: ((ev: FocusEvent) => any) | undefined;
33
+ readonly onClear?: ((ev: MouseEvent) => any) | undefined;
34
+ readonly onBlur?: ((ev: FocusEvent) => any) | undefined;
35
+ readonly onInput?: ((value: string, ev: Event) => any) | undefined;
36
+ readonly onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
37
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
38
+ readonly onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
39
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
40
+ $attrs: {
41
+ [x: string]: unknown;
42
+ };
43
+ $refs: {
44
+ [x: string]: unknown;
45
+ } & {
46
+ inputRef: HTMLInputElement;
47
+ };
48
+ $slots: Readonly<{
49
+ [name: string]: import('vue').Slot<any> | undefined;
50
+ }>;
51
+ $root: import('vue').ComponentPublicInstance | null;
52
+ $parent: import('vue').ComponentPublicInstance | null;
53
+ $host: Element | null;
54
+ $emit: ((event: "change", value: string, ev: Event) => void) & ((event: "focus", ev: FocusEvent) => void) & ((event: "clear", ev: MouseEvent) => void) & ((event: "blur", ev: FocusEvent) => void) & ((event: "input", value: string, ev: Event) => void) & ((event: "keydown", ev: KeyboardEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "pressEnter", ev: KeyboardEvent) => void);
55
+ $el: HTMLDivElement;
56
+ $options: import('vue').ComponentOptionsBase<Readonly<import('../../Input').InputProps> & Readonly<{
57
+ onChange?: ((value: string, ev: Event) => any) | undefined;
58
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
59
+ onClear?: ((ev: MouseEvent) => any) | undefined;
60
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
61
+ onInput?: ((value: string, ev: Event) => any) | undefined;
62
+ onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
63
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
64
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
65
+ }>, {
66
+ focus(): void;
67
+ blur(): void;
68
+ getInputRef(): HTMLInputElement;
69
+ setCursor?: () => void;
70
+ recordCursor?: () => void;
71
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
72
+ change: (value: string, ev: Event) => any;
73
+ focus: (ev: FocusEvent) => any;
74
+ clear: (ev: MouseEvent) => any;
75
+ blur: (ev: FocusEvent) => any;
76
+ input: (value: string, ev: Event) => any;
77
+ keydown: (ev: KeyboardEvent) => any;
78
+ "update:modelValue": (value: string) => any;
79
+ pressEnter: (ev: KeyboardEvent) => any;
80
+ }, string, {
81
+ error: boolean;
82
+ size: import('../..').Size;
83
+ disabled: boolean;
84
+ placeholder: string;
85
+ modelValue: string;
86
+ defaultValue: string;
87
+ maxLength: import('../../Input').MaxLength;
88
+ showWordLimit: boolean;
89
+ allowClear: boolean;
90
+ readonly: boolean;
91
+ wordLength: import('../../Input').WordLength;
92
+ wordSlice: import('../../Input').WordSlice;
93
+ inputAttrs: import('../..').RecordType;
94
+ showInput: boolean;
95
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
96
+ beforeCreate?: (() => void) | (() => void)[];
97
+ created?: (() => void) | (() => void)[];
98
+ beforeMount?: (() => void) | (() => void)[];
99
+ mounted?: (() => void) | (() => void)[];
100
+ beforeUpdate?: (() => void) | (() => void)[];
101
+ updated?: (() => void) | (() => void)[];
102
+ activated?: (() => void) | (() => void)[];
103
+ deactivated?: (() => void) | (() => void)[];
104
+ beforeDestroy?: (() => void) | (() => void)[];
105
+ beforeUnmount?: (() => void) | (() => void)[];
106
+ destroyed?: (() => void) | (() => void)[];
107
+ unmounted?: (() => void) | (() => void)[];
108
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
109
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
110
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
111
+ };
112
+ $forceUpdate: () => void;
113
+ $nextTick: typeof nextTick;
114
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
115
+ } & Readonly<{
116
+ error: boolean;
117
+ size: import('../..').Size;
118
+ disabled: boolean;
119
+ placeholder: string;
120
+ modelValue: string;
121
+ defaultValue: string;
122
+ maxLength: import('../../Input').MaxLength;
123
+ showWordLimit: boolean;
124
+ allowClear: boolean;
125
+ readonly: boolean;
126
+ wordLength: import('../../Input').WordLength;
127
+ wordSlice: import('../../Input').WordSlice;
128
+ inputAttrs: import('../..').RecordType;
129
+ showInput: boolean;
130
+ }> & Omit<Readonly<import('../../Input').InputProps> & Readonly<{
131
+ onChange?: ((value: string, ev: Event) => any) | undefined;
132
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
133
+ onClear?: ((ev: MouseEvent) => any) | undefined;
134
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
135
+ onInput?: ((value: string, ev: Event) => any) | undefined;
136
+ onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
137
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
138
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
139
+ }>, "focus" | "blur" | "setCursor" | "recordCursor" | "getInputRef" | ("error" | "size" | "disabled" | "placeholder" | "modelValue" | "defaultValue" | "maxLength" | "showWordLimit" | "allowClear" | "readonly" | "wordLength" | "wordSlice" | "inputAttrs" | "showInput")> & import('vue').ShallowUnwrapRef<{
140
+ focus(): void;
141
+ blur(): void;
142
+ getInputRef(): HTMLInputElement;
143
+ setCursor?: () => void;
144
+ recordCursor?: () => void;
145
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
146
+ $slots: any;
147
+ }) | null;
148
+ };
149
+ rootEl: any;
150
+ };
151
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
152
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
153
+ type: "year" | "month" | "week" | "time" | "date";
154
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
155
+ inputRef: ({
156
+ $: import('vue').ComponentInternalInstance;
157
+ $data: {};
158
+ $props: {
159
+ readonly modelValue?: string | undefined;
160
+ readonly defaultValue?: string | undefined;
161
+ readonly size?: import('../..').Size | undefined;
162
+ readonly allowClear?: boolean | undefined;
163
+ readonly disabled?: boolean | undefined;
164
+ readonly readonly?: boolean | undefined;
165
+ readonly error?: boolean | undefined;
166
+ readonly placeholder?: string | undefined;
167
+ readonly maxLength?: import('../../Input').MaxLength | undefined;
168
+ readonly wordLength?: import('../../Input').WordLength | undefined;
169
+ readonly wordSlice?: import('../../Input').WordSlice | undefined;
170
+ readonly showWordLimit?: boolean | undefined;
171
+ readonly inputAttrs?: import('../..').RecordType | undefined;
172
+ readonly showInput?: boolean | undefined;
173
+ readonly onChange?: ((value: string, ev: Event) => any) | undefined;
174
+ readonly onFocus?: ((ev: FocusEvent) => any) | undefined;
175
+ readonly onClear?: ((ev: MouseEvent) => any) | undefined;
176
+ readonly onBlur?: ((ev: FocusEvent) => any) | undefined;
177
+ readonly onInput?: ((value: string, ev: Event) => any) | undefined;
178
+ readonly onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
179
+ readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
180
+ readonly onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
181
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
182
+ $attrs: {
183
+ [x: string]: unknown;
184
+ };
185
+ $refs: {
186
+ [x: string]: unknown;
187
+ } & {
188
+ inputRef: HTMLInputElement;
189
+ };
190
+ $slots: Readonly<{
191
+ [name: string]: import('vue').Slot<any> | undefined;
192
+ }>;
193
+ $root: import('vue').ComponentPublicInstance | null;
194
+ $parent: import('vue').ComponentPublicInstance | null;
195
+ $host: Element | null;
196
+ $emit: ((event: "change", value: string, ev: Event) => void) & ((event: "focus", ev: FocusEvent) => void) & ((event: "clear", ev: MouseEvent) => void) & ((event: "blur", ev: FocusEvent) => void) & ((event: "input", value: string, ev: Event) => void) & ((event: "keydown", ev: KeyboardEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "pressEnter", ev: KeyboardEvent) => void);
197
+ $el: HTMLDivElement;
198
+ $options: import('vue').ComponentOptionsBase<Readonly<import('../../Input').InputProps> & Readonly<{
199
+ onChange?: ((value: string, ev: Event) => any) | undefined;
200
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
201
+ onClear?: ((ev: MouseEvent) => any) | undefined;
202
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
203
+ onInput?: ((value: string, ev: Event) => any) | undefined;
204
+ onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
205
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
206
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
207
+ }>, {
208
+ focus(): void;
209
+ blur(): void;
210
+ getInputRef(): HTMLInputElement;
211
+ setCursor?: () => void;
212
+ recordCursor?: () => void;
213
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
214
+ change: (value: string, ev: Event) => any;
215
+ focus: (ev: FocusEvent) => any;
216
+ clear: (ev: MouseEvent) => any;
217
+ blur: (ev: FocusEvent) => any;
218
+ input: (value: string, ev: Event) => any;
219
+ keydown: (ev: KeyboardEvent) => any;
220
+ "update:modelValue": (value: string) => any;
221
+ pressEnter: (ev: KeyboardEvent) => any;
222
+ }, string, {
223
+ error: boolean;
224
+ size: import('../..').Size;
225
+ disabled: boolean;
226
+ placeholder: string;
227
+ modelValue: string;
228
+ defaultValue: string;
229
+ maxLength: import('../../Input').MaxLength;
230
+ showWordLimit: boolean;
231
+ allowClear: boolean;
232
+ readonly: boolean;
233
+ wordLength: import('../../Input').WordLength;
234
+ wordSlice: import('../../Input').WordSlice;
235
+ inputAttrs: import('../..').RecordType;
236
+ showInput: boolean;
237
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
238
+ beforeCreate?: (() => void) | (() => void)[];
239
+ created?: (() => void) | (() => void)[];
240
+ beforeMount?: (() => void) | (() => void)[];
241
+ mounted?: (() => void) | (() => void)[];
242
+ beforeUpdate?: (() => void) | (() => void)[];
243
+ updated?: (() => void) | (() => void)[];
244
+ activated?: (() => void) | (() => void)[];
245
+ deactivated?: (() => void) | (() => void)[];
246
+ beforeDestroy?: (() => void) | (() => void)[];
247
+ beforeUnmount?: (() => void) | (() => void)[];
248
+ destroyed?: (() => void) | (() => void)[];
249
+ unmounted?: (() => void) | (() => void)[];
250
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
251
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
252
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
253
+ };
254
+ $forceUpdate: () => void;
255
+ $nextTick: typeof nextTick;
256
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
257
+ } & Readonly<{
258
+ error: boolean;
259
+ size: import('../..').Size;
260
+ disabled: boolean;
261
+ placeholder: string;
262
+ modelValue: string;
263
+ defaultValue: string;
264
+ maxLength: import('../../Input').MaxLength;
265
+ showWordLimit: boolean;
266
+ allowClear: boolean;
267
+ readonly: boolean;
268
+ wordLength: import('../../Input').WordLength;
269
+ wordSlice: import('../../Input').WordSlice;
270
+ inputAttrs: import('../..').RecordType;
271
+ showInput: boolean;
272
+ }> & Omit<Readonly<import('../../Input').InputProps> & Readonly<{
273
+ onChange?: ((value: string, ev: Event) => any) | undefined;
274
+ onFocus?: ((ev: FocusEvent) => any) | undefined;
275
+ onClear?: ((ev: MouseEvent) => any) | undefined;
276
+ onBlur?: ((ev: FocusEvent) => any) | undefined;
277
+ onInput?: ((value: string, ev: Event) => any) | undefined;
278
+ onKeydown?: ((ev: KeyboardEvent) => any) | undefined;
279
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
280
+ onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
281
+ }>, "focus" | "blur" | "setCursor" | "recordCursor" | "getInputRef" | ("error" | "size" | "disabled" | "placeholder" | "modelValue" | "defaultValue" | "maxLength" | "showWordLimit" | "allowClear" | "readonly" | "wordLength" | "wordSlice" | "inputAttrs" | "showInput")> & import('vue').ShallowUnwrapRef<{
282
+ focus(): void;
283
+ blur(): void;
284
+ getInputRef(): HTMLInputElement;
285
+ setCursor?: () => void;
286
+ recordCursor?: () => void;
287
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
288
+ $slots: any;
289
+ }) | null;
290
+ }, any>;
291
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
292
+ export default _default;
293
+ type __VLS_WithTemplateSlots<T, S> = T & {
294
+ new (): {
295
+ $slots: S;
296
+ };
297
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=require("../../_virtual/_plugin-vue_export-helper.js").default(e.default,[["__scopeId","data-v-9f7eea5c"]]);exports.default=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=;/* empty css */,/* empty css */require("../../node_modules/b-tween/dist/b-tween.es.js"),require("../../node_modules/dayjs/dayjs.min.js"),require("../../node_modules/tinycolor2/esm/tinycolor.js"),require("../../node_modules/dayjs/plugin/duration.js"),require("../../node_modules/dayjs/plugin/toObject.js"),require("../../node_modules/dayjs/plugin/isSameOrAfter.js"),require("../../node_modules/dayjs/plugin/isSameOrBefore.js"),require("../../_shared/utils/dom.js");const o=require("../../_shared/utils/locale.js");require("../../_shared/utils/time.js"),/* empty css */;/* empty css */const n=,/* empty css */s=require("../hooks/useContext.js"),t=require("../../Input/index.js"),i=require("../../Trigger/index.js"),u={class:"yc-picker-suffix-icon"},l=e.defineComponent({inheritAttrs:!1,__name:"PickerInput",props:{type:{default:"date"}},setup(l){const a=l,{props:d,computedVisible:c,formatValue:p,showClearBtn:f,onClear:m}=s.default().inject(),{popupContainer:j,unmountOnClose:v,readonly:y,disabled:_,position:h,triggerProps:x,size:q,error:b,disabledInput:k,locale:g,placeholder:C}=e.toRefs(d),{t:w}=o.useI18n(),S=e.computed(()=>{var e;const r=`datePicker.placeholder.${a.type}`;return C.value||(null==(e=g.value)?void 0:e[r])||w(r)}),B=e.ref();return e.watch(()=>c.value,async r=>{var o;r||(await e.nextTick(),null==(o=B.value)||o.blur())}),(o,s)=>(e.openBlock(),e.createBlock(e.unref(i.default),e.mergeProps({"popup-visible":e.unref(c),"onUpdate:popupVisible":s[0]||(s[0]=r=>e.isRef(c)?c.value=r:null),"popup-offset":4,"popup-container":e.unref(j),"unmount-on-close":e.unref(v),disabled:e.unref(_)||e.unref(y),position:e.unref(h),"prevent-focus":"",trigger:"click","animation-name":"slide-dynamic-origin","need-transform-origin":""},e.unref(x)),{content:e.withCtx(()=>[e.renderSlot(o.$slots,"content",{},void 0,!0)]),default:e.withCtx(()=>[e.createVNode(e.unref(t.default),{"model-value":e.unref(p),placeholder:S.value,disabled:e.unref(_),error:e.unref(b),size:e.unref(q),readonly:e.unref(y)||e.unref(k)||!0,style:e.normalizeStyle(o.$attrs.style),class:e.normalizeClass([o.$attrs.class,{"yc-picker-allow-clear":e.unref(f)}]),ref_key:"inputRef",ref:B},e.createSlots({suffix:e.withCtx(()=>[e.createElementVNode("div",u,[e.renderSlot(o.$slots,"suffix-icon",{},()=>[e.createVNode(e.unref(n.default))],!0)]),e.unref(f)?(e.openBlock(),e.createBlock(e.unref(r.default),{key:0,onClick:e.withModifiers(e.unref(m),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0)]),_:2},[o.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"prefix",{},void 0,!0)]),key:"0"}:void 0]),1032,["model-value","placeholder","disabled","error","size","readonly","style","class"])]),_:3},16,["popup-visible","popup-container","unmount-on-close","disabled","position"]))}});exports.default=l;
@@ -0,0 +1,33 @@
1
+ import { ShortcutsPosition, ShortcutType } from '../type';
2
+ type __VLS_Props = {
3
+ locale: Record<string, any>;
4
+ shortcutsPosition: ShortcutsPosition;
5
+ shortcuts: ShortcutType[];
6
+ previewShortcut: boolean;
7
+ confirmBtnDisabled: boolean;
8
+ showConfirmBtn: boolean;
9
+ };
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: {
13
+ default?(_: {}): any;
14
+ extra?(_: {}): any;
15
+ };
16
+ refs: {};
17
+ rootEl: HTMLDivElement;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
21
+ confirm: (ev: MouseEvent) => any;
22
+ "shortcut-select": (shortcut: ShortcutType, hover: boolean) => any;
23
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
+ onConfirm?: ((ev: MouseEvent) => any) | undefined;
25
+ "onShortcut-select"?: ((shortcut: ShortcutType, hover: boolean) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
27
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
+ export default _default;
29
+ type __VLS_WithTemplateSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/b-tween/dist/b-tween.es.js"),require("../../node_modules/dayjs/dayjs.min.js"),require("../../node_modules/tinycolor2/esm/tinycolor.js"),require("../../node_modules/dayjs/plugin/duration.js"),require("../../node_modules/dayjs/plugin/toObject.js"),require("../../node_modules/dayjs/plugin/isSameOrAfter.js"),require("../../node_modules/dayjs/plugin/isSameOrBefore.js"),require("../../_shared/utils/dom.js");const o=require("../../_shared/utils/locale.js");require("../../_shared/utils/time.js");const r=require("../../_shared/utils/vue-utils.js"),s=require("../../Button/index.js"),n={class:"yc-picker-panel-wrapper"},l={class:"yc-picker-footer"},i={key:0,class:"yc-picker-footer-extra-wrapper"},c={key:1,class:"yc-picker-footer-btn-wrapper"},u=e.defineComponent({__name:"PickerPanel",props:{locale:{},shortcutsPosition:{},shortcuts:{},previewShortcut:{type:Boolean},confirmBtnDisabled:{type:Boolean},showConfirmBtn:{type:Boolean}},emits:["confirm","shortcut-select"],setup(u){const a=u,{define:d,reuse:m}=t.createReusableTemplate(),{t:p}=o.useI18n(),k=()=>{var e;const t="datePicker.ok";return(null==(e=a.locale)?void 0:e[t])||p(t)};return(t,o)=>{var u,a;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-picker-container",`yc-picker-container-shortcuts-${t.shortcutsPosition}`])},[e.createVNode(e.unref(d),null,{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["yc-picker-shortcuts",`yc-picker-shortcuts-${t.shortcutsPosition}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shortcuts,(o,n)=>(e.openBlock(),e.createBlock(e.unref(s.default),{key:n,size:"mini",onClick:e=>t.$emit("shortcut-select",o,!1),onMouseenter:e=>t.previewShortcut&&t.$emit("shortcut-select",o,!0)},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r.getSlotFunction)(o.label))))]),_:2},1032,["onClick","onMouseenter"]))),128))],2)]),_:1}),["left","right"].includes(t.shortcutsPosition)&&(null==(u=t.shortcuts)?void 0:u.length)?(e.openBlock(),e.createBlock(e.unref(m),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("div",n,[e.renderSlot(t.$slots,"default"),e.createElementVNode("div",l,[t.$slots.extra?(e.openBlock(),e.createElementBlock("div",i,[e.renderSlot(t.$slots,"extra")])):e.createCommentVNode("",!0),t.showConfirmBtn||"bottom"==t.shortcutsPosition&&(null==(a=t.shortcuts)?void 0:a.length)?(e.openBlock(),e.createElementBlock("div",c,["bottom"==t.shortcutsPosition?(e.openBlock(),e.createBlock(e.unref(m),{key:0})):e.createCommentVNode("",!0),t.showConfirmBtn?(e.openBlock(),e.createBlock(e.unref(s.default),{key:1,disabled:t.confirmBtnDisabled,type:"primary",size:"mini",onClick:o[0]||(o[0]=e=>t.$emit("confirm",e))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k()),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])],2)}}});exports.default=u;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./PickerPanel.vue.js");,/* empty css */exports.default=e.default;
@@ -0,0 +1,19 @@
1
+ import { Ref } from 'vue';
2
+ import { RecordType } from '../../_shared/type';
3
+ import { DatePickerValue } from '../type';
4
+ export interface PickerInputContext {
5
+ props: RecordType;
6
+ computedVisible: Ref<boolean>;
7
+ formatValue: Ref<string>;
8
+ showClearBtn: Ref<boolean>;
9
+ onClear: () => void;
10
+ }
11
+ export default function usePickerInputContext(): {
12
+ provide: (context: {
13
+ computedValue: Ref<DatePickerValue | DatePickerValue[]>;
14
+ computedVisible: Ref<boolean>;
15
+ formatValue: Ref<string>;
16
+ emits: (...args: any) => void;
17
+ }, props: RecordType) => void;
18
+ inject: () => PickerInputContext;
19
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o="picker--context";exports.default=function(){return{provide:(t,r)=>{const{computedVisible:l,computedValue:a,formatValue:u,emits:i}=t,{allowClear:s,disabled:c}=e.toRefs(r);e.provide(o,{computedVisible:l,formatValue:u,props:r,showClearBtn:e.computed(()=>!!a.value&&s.value&&!c.value),onClear:()=>{a.value="",i("clear")}})},inject:()=>e.inject(o,{computedVisible:e.ref(!1),formatValue:e.ref(""),showClearBtn:e.ref(!1),props:e.ref({}),onClear:()=>{}})}};
@@ -0,0 +1,44 @@
1
+ import { BasePickerEmits, DatePickerValue, DayStartOfWeek, ShortcutType } from '../type';
2
+ import { RecordType } from '../../_shared/type';
3
+ export type YearData = {
4
+ label: string;
5
+ value: Date;
6
+ };
7
+ export interface DayData {
8
+ label: string;
9
+ value: Date;
10
+ }
11
+ export interface WeekData {
12
+ label: number;
13
+ value: Date;
14
+ time: DayData[];
15
+ }
16
+ export default function usePicker(params: {
17
+ props: RecordType;
18
+ emits: BasePickerEmits;
19
+ }): {
20
+ formatValue: import('vue').ComputedRef<string>;
21
+ computedValue: import('vue').WritableComputedRef<DatePickerValue, DatePickerValue>;
22
+ computedVisible: import('vue').WritableComputedRef<boolean, boolean>;
23
+ computedPickerValue: import('vue').WritableComputedRef<DatePickerValue, DatePickerValue>;
24
+ dayStartOfWeek: import('vue').Ref<any, any>;
25
+ locale: import('vue').Ref<any, any>;
26
+ abbreviation: import('vue').Ref<any, any>;
27
+ showYearPicker: import('vue').Ref<boolean, boolean>;
28
+ showMonthPicker: import('vue').Ref<boolean, boolean>;
29
+ curMonth: import('vue').Ref<number, number>;
30
+ curYear: import('vue').Ref<number, number>;
31
+ DefinePanel: import('@vueuse/core').DefineTemplateComponent<Record<string, any>, Record<"default", undefined>>;
32
+ ReusePanel: import('@vueuse/core').ReuseTemplateComponent<Record<string, any>, Record<"default", undefined>>;
33
+ t: (key: string, ...args: any[]) => string;
34
+ getDateFromFormat: (val: DatePickerValue) => Date | "";
35
+ getFormatFromDate: (val: Date) => string | number | Date;
36
+ getRangeOfYear: (curYear: number) => {
37
+ range: YearData[][];
38
+ startYear: number;
39
+ };
40
+ getWeeksOfMonth: (year: number, month: number, startOfWeek?: DayStartOfWeek) => WeekData[];
41
+ handleSelect: (date: Date) => void;
42
+ handleConfirm: () => Promise<void>;
43
+ handleShortcut: (shortcut: ShortcutType, hover: boolean) => void;
44
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/b-tween/dist/b-tween.es.js");const a=require("../../node_modules/dayjs/dayjs.min.js");require("../../node_modules/tinycolor2/esm/tinycolor.js"),require("../../node_modules/dayjs/plugin/duration.js"),require("../../node_modules/dayjs/plugin/toObject.js"),require("../../node_modules/dayjs/plugin/isSameOrAfter.js"),require("../../node_modules/dayjs/plugin/isSameOrBefore.js");const u=require("../../_shared/utils/dom.js"),l=require("../../_shared/utils/is.js"),r=require("../../_shared/utils/hooks.js"),o=require("../../_shared/utils/locale.js");require("../../_shared/utils/time.js");const s=require("./useContext.js"),i=require("../../node_modules/dayjs/plugin/isoWeek.js");a.default.extend(i.default),exports.default=function(i){const{props:n,emits:d}=i,{modelValue:c,defaultValue:f,popupVisible:m,defaultPopupVisible:v,pickerValue:p,defaultPickerValue:h,format:j,valueFormat:g,dayStartOfWeek:V,showConfirmBtn:b,locale:y,abbreviation:q}=e.toRefs(n),D=r.useControlValue(c,f.value,(e,t)=>{const a=B(e);t.value=a,d("update:modelValue",a)}),_=r.useControlValue(m,v.value,e=>{d("popup-visible-change",e),d("update:popupVisible",e)}),k=r.useControlValue(p,h.value,e=>{d("update:pickerValue",e)}),Y=e.computed(()=>{const e=A(D.value);return e?j.value&&D.value?a.default(e).format(j.value):D.value:""}),{define:O,reuse:S}=t.createReusableTemplate(),{t:M}=o.useI18n();let w,P,C=!1;const W=e.ref(0),x=e.ref(0),F=e.ref(!1),R=e.ref(!1);e.watch(()=>_.value,e=>{if(e)C=!1,w=D.value?A(D.value):D.value;else{if(F.value=!1,R.value=!1,!b.value||C||l.isUndefined(w))return;D.value=w}},{immediate:!0});const A=e=>{if(!e)return"";let t;return t=["timestamp","Date"].includes(g.value)||!l.isString(e)?a.default(e):a.default(e,g.value),t.isValid()?t.toDate():""},B=e=>{if(!e||!a.default(e).isValid())return"";const t=e;return"timestamp"==g.value?a.default(t).valueOf():"Date"!=g.value?a.default(t).format(g.value):t};return s.default().provide({computedValue:D,computedVisible:_,formatValue:Y,emits:d},n),{formatValue:Y,computedValue:D,computedVisible:_,computedPickerValue:k,dayStartOfWeek:V,locale:y,abbreviation:q,showYearPicker:F,showMonthPicker:R,curMonth:x,curYear:W,DefinePanel:O,ReusePanel:S,t:M,getDateFromFormat:A,getFormatFromDate:B,getRangeOfYear:e=>{const t=10*Math.floor(e/10),u=t-1,l=Array.from({length:12},(e,t)=>{const l=u+t;return{label:l.toString(),value:a.default().year(l).startOf("year").toDate()}}),r=[];for(let a=0;a<l.length;a+=3){const e=l.slice(a,a+3);r.push(e)}return{range:r,startYear:t}},getWeeksOfMonth:(e,t,u=V.value)=>{const l=a.default(new Date(e,t,1)),r=[],o=(l.toDate().getDay()-u+7)%7;let s=l.subtract(o,"day");for(let a=0;a<6;a++){const e=[],t=s;for(let r=0;r<7;r++)e.push({label:String(s.date()),value:s.toDate()}),s=s.add(1,"day");const a=t.add(3,"day"),u=a.isoWeek(),l=a.startOf("isoWeek").toDate();r.push({label:u,value:l,time:e})}return r},handleSelect:e=>{D.value=e,P=e;const t=a.default(e).format("YYYY-MM-DD");d("select",D.value,e,t),b.value||d("change",D.value,e,t)},handleConfirm:async()=>{C=!0;const e=a.default(P).format("YYYY-MM-DD");d("change",D.value,P,e),d("ok",D.value,P,e),await u.sleep(0),_.value=!1},handleShortcut:(e,t)=>{t||d("select-shortcut",e),e.value&&(D.value=e.value),t||(C=!0,_.value=!1)}}};
@@ -0,0 +1,3 @@
1
+ .yc-panel-year,.yc-panel-month,.yc-panel-week{width:265px;display:flex;flex-direction:column}.yc-panel-year .yc-picker-header,.yc-panel-month .yc-picker-header,.yc-panel-week .yc-picker-header{padding:8px 16px;border-bottom:1px solid var(--color-neutral-3);display:flex}.yc-panel-year .yc-picker-header .yc-picker-header-icon,.yc-panel-month .yc-picker-header .yc-picker-header-icon,.yc-panel-week .yc-picker-header .yc-picker-header-icon{cursor:pointer;width:24px;height:24px;margin-right:2px;margin-left:2px;color:var(--color-text-2);font-size:12px;line-height:24px;text-align:center;background-color:var(--color-bg-popup);border-radius:50%;transition:all .1s cubic-bezier(0, 0, 1, 1);user-select:none}.yc-panel-year .yc-picker-header .yc-picker-header-icon:hover,.yc-panel-month .yc-picker-header .yc-picker-header-icon:hover,.yc-panel-week .yc-picker-header .yc-picker-header-icon:hover{background-color:var(--color-fill-3)}.yc-panel-year .yc-picker-header .yc-picker-header-title,.yc-panel-month .yc-picker-header .yc-picker-header-title,.yc-panel-week .yc-picker-header .yc-picker-header-title{flex:1;color:var(--color-text-1);font-size:14px;line-height:24px;display:flex;justify-content:center;align-items:center}.yc-panel-year .yc-picker-header .yc-picker-header-title .yc-picker-header-label,.yc-panel-month .yc-picker-header .yc-picker-header-title .yc-picker-header-label,.yc-panel-week .yc-picker-header .yc-picker-header-title .yc-picker-header-label{cursor:pointer;padding:2px;border-radius:2px;transition:all .1s}.yc-panel-year .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover,.yc-panel-month .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover,.yc-panel-week .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover{background-color:var(--color-fill-3)}.yc-panel-year .yc-picker-body,.yc-panel-month .yc-picker-body,.yc-panel-week .yc-picker-body{padding:14px 16px}.yc-panel-year .yc-picker-body .yc-picker-row,.yc-panel-month .yc-picker-body .yc-picker-row,.yc-panel-week .yc-picker-body .yc-picker-row{padding:2px 0;display:flex}.yc-panel-week{width:298px}.yc-panel-week .yc-picker-week-list{width:100%;padding:14px 16px 0 16px;display:flex}.yc-panel-week .yc-picker-week-list .yc-picker-week-list-item{flex:1;height:32px;padding:0;color:#7d7d7f;font-weight:400;display:flex;justify-content:center;align-items:center}.yc-panel-week .yc-picker-body .yc-picker-week-row:not(.yc-picker-week-row-selected):not(
2
+ .yc-picker-week-row-disabled
3
+ ):hover .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:var(--color-fill-3)}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-picker-cell .yc-picker-date{padding-left:0;padding-right:0}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-picker-cell .yc-picker-date .yc-picker-date-value{border-radius:0}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-first .yc-picker-date{border-top-left-radius:24px;border-bottom-left-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-first .yc-picker-date .yc-picker-date-value{border-top-left-radius:24px;border-bottom-left-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-last .yc-picker-date{border-top-right-radius:24px;border-bottom-right-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-last .yc-picker-date .yc-picker-date-value{border-top-right-radius:24px;border-bottom-right-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row-selected .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:rgb(var(--primary-6));color:var(--color-white);transition:background-color .1s cubic-bezier(0, 0, 1, 1)}.yc-panel-week .yc-picker-body .yc-picker-week-row-selected.yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:var(--color-link-light-3);color:var(--color-white)}.yc-panel-week .yc-picker-body .yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date{cursor:not-allowed;background-color:var(--color-fill-1)}.yc-panel-week .yc-picker-body .yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{cursor:not-allowed;background-color:transparent;color:var(--color-text-4)}.yc-picker-container{overflow:hidden;min-height:60px;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:var(--border-radius-medium);box-shadow:0 2px 5px #0000001a;display:flex}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer{width:min-content;min-width:100%}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-extra-wrapper{padding:8px 24px;border-top:1px solid var(--color-neutral-3);color:var(--color-text-1);font-size:12px}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-btn-wrapper{padding:8px;border-top:1px solid var(--color-neutral-3);display:flex;align-items:center;justify-content:flex-end;gap:10px}.yc-picker-container .yc-picker-shortcuts{overflow-y:auto;padding:10px 8px;flex:1;display:flex;flex-direction:column;gap:5px}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-left{border-right:1px solid var(--color-neutral-3)}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-right{border-left:1px solid var(--color-neutral-3)}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-bottom{padding:0;overflow:hidden;flex-direction:row;flex-wrap:wrap;gap:5px 10px}.yc-picker-container-shortcuts-right{flex-direction:row-reverse}.yc-picker-container-shortcuts-bottom{flex-direction:row-reverse}.yc-picker-container-shortcuts-bottom .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-btn-wrapper{justify-content:space-between}.yc-picker-cell{flex:1}.yc-picker-cell .yc-picker-date{cursor:pointer;width:100%;height:100%;padding:4px;display:flex;justify-content:center}.yc-picker-cell .yc-picker-date .yc-picker-date-value{cursor:pointer;height:24px;width:100%;border-radius:24px;color:var(--color-text-4);font-size:14px;line-height:24px;text-align:center}.yc-picker-cell-in-view .yc-picker-date .yc-picker-date-value{color:var(--color-text-1);font-weight:500}.yc-picker-cell-today{position:relative}.yc-picker-cell-today:after{position:absolute;bottom:-2px;left:50%;display:block;width:4px;height:4px;margin-left:-2px;background-color:rgb(var(--primary-6));border-radius:50%;content:''}.yc-picker-cell-selected .yc-picker-date .yc-picker-date-value{color:var(--color-white);background-color:rgb(var(--primary-6));transition:background-color .1s cubic-bezier(0, 0, 1, 1)}.yc-picker-cell-disabled .yc-picker-date{background-color:var(--color-fill-1);cursor:not-allowed}.yc-picker-cell-disabled .yc-picker-date .yc-picker-date-value{color:var(--color-text-4);background-color:transparent;cursor:not-allowed}.yc-picker-cell-hoverable.yc-picker-cell-in-view:not(.yc-picker-cell-selected):not(.yc-picker-cell-disabled) .yc-picker-date .yc-picker-date-value:hover{color:var(--color-text-1);background-color:var(--color-fill-3)}.yc-picker-allow-clear:not(.yc-input-disabled):hover .yc-icon-button{display:flex}.yc-picker-allow-clear:not(.yc-input-disabled):hover .yc-picker-suffix-icon{display:none}.yc-picker-allow-clear .yc-icon-button{font-size:16px;display:none}.yc-picker-allow-clear .yc-picker-suffix-icon{font-size:16px;height:100%;display:flex;justify-content:center;align-items:center}
@@ -0,0 +1,38 @@
1
+ import { App } from 'vue';
2
+ import { default as _DatePicker } from './YcDatePicker.vue';
3
+ import { default as _RangePicker } from './PickerRange.vue';
4
+ import { default as _YearPicker } from './YcYearPicker.vue';
5
+ import { default as _MonthPicker } from './YcMonthPicker.vue';
6
+ import { default as _WeekPicker } from './YcWeekPicker.vue';
7
+ export type DatePickerInstance = InstanceType<typeof _DatePicker>;
8
+ export type RangePickerInstance = InstanceType<typeof _RangePicker>;
9
+ export type YearPickerInstance = InstanceType<typeof _YearPicker>;
10
+ export type MonthPickerInstance = InstanceType<typeof _MonthPicker>;
11
+ export type WeekPickerInstance = InstanceType<typeof _WeekPicker>;
12
+ export * from './type';
13
+ declare const DatePicker: {
14
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
15
+ P: {};
16
+ B: {};
17
+ D: {};
18
+ C: {};
19
+ M: {};
20
+ Defaults: {};
21
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
22
+ __isFragment?: never;
23
+ __isTeleport?: never;
24
+ __isSuspense?: never;
25
+ } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
26
+ install: (app: App) => void;
27
+ };
28
+ export { _RangePicker as RangePicker, _YearPicker as YearPicker, _MonthPicker as MonthPicker, _WeekPicker as WeekPicker, };
29
+ declare module 'vue' {
30
+ interface GlobalComponents {
31
+ YcDatePicker: typeof DatePicker;
32
+ YcRangePicker: typeof _RangePicker;
33
+ YcYearPicker: typeof _YearPicker;
34
+ YcMonthPicker: typeof _MonthPicker;
35
+ YcWeekPicker: typeof _WeekPicker;
36
+ }
37
+ }
38
+ export default DatePicker;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./YcDatePicker.vue.js"),t=require("./PickerRange.vue.js"),r=require("./YcYearPicker.vue.js");;/* empty css */const u=require("./YcMonthPicker.vue.js");;/* empty css */const c=require("./YcWeekPicker.vue.js"),a=Object.assign(e.default,{install:a=>{a.component("Yc"+e.default.name,e.default),a.component("Yc"+t.default.name,t.default),a.component("Yc"+r.default.name,r.default),a.component("Yc"+u.default.name,u.default),a.component("Yc"+c.default.name,c.default)}});exports.RangePicker=t.default,exports.YearPicker=r.default,exports.MonthPicker=u.default,exports.WeekPicker=c.default,exports.default=a;
@@ -0,0 +1,104 @@
1
+ import { VNode } from 'vue';
2
+ import { PopupContainer, Position, Size } from '../_shared/type';
3
+ import { TriggerProps } from '../Trigger';
4
+ import { TimePickerProps } from '../TimePicker';
5
+ export interface BasePickerProps {
6
+ locale?: Record<string, any>;
7
+ hideTrigger?: boolean;
8
+ allowClear?: boolean;
9
+ readonly?: boolean;
10
+ error?: boolean;
11
+ size?: Size;
12
+ shortcuts?: ShortcutType[];
13
+ shortcutsPosition?: ShortcutsPosition;
14
+ position?: DatePickerPosition;
15
+ popupVisible?: boolean;
16
+ defaultPopupVisible?: boolean;
17
+ triggerProps?: TriggerProps;
18
+ unmountOnClose?: boolean;
19
+ placeholder?: string;
20
+ disabled?: boolean;
21
+ disabledDate?: DisabledDate;
22
+ disabledTime?: DisabledTime;
23
+ pickerValue?: DatePickerValue;
24
+ defaultPickerValue?: DatePickerValue;
25
+ popupContainer?: PopupContainer;
26
+ valueFormat?: ValueFormat;
27
+ format?: string;
28
+ previewShortcut?: boolean;
29
+ showConfirmBtn?: boolean;
30
+ disabledInput?: boolean;
31
+ abbreviation?: boolean;
32
+ }
33
+ export interface BasePickerEmits {
34
+ (e: 'update:popupVisible', value: boolean): void;
35
+ (e: 'update:pickerValue', value: DatePickerValue): void;
36
+ (e: 'change', value: DatePickerValue, date: Date, dateString: string): void;
37
+ (e: 'select', value: DatePickerValue, date: Date, dateString: string): void;
38
+ (e: 'ok', value: DatePickerValue, date: Date, dateString: string): void;
39
+ (e: 'picker-value-change', value: DatePickerValue, date: Date, dateString: string): void;
40
+ (e: 'popup-visible-change', visible: boolean): void;
41
+ (e: 'clear'): void;
42
+ (e: 'select-shortcut', shortcut: ShortcutType): void;
43
+ }
44
+ export interface BasePickerSlots {
45
+ prefix?: () => VNode[];
46
+ 'suffix-icon'?: () => VNode[];
47
+ 'icon-next-double'?: () => VNode[];
48
+ 'icon-prev-double'?: () => VNode[];
49
+ 'icon-next'?: () => VNode[];
50
+ 'icon-prev'?: () => VNode[];
51
+ cell?: (scope: {
52
+ date: Date;
53
+ }) => VNode[];
54
+ extra?: () => VNode[];
55
+ }
56
+ export interface YearPickerProps extends BasePickerProps {
57
+ modelValue?: DatePickerValue;
58
+ defaultValue?: DatePickerValue;
59
+ }
60
+ export interface YearPickerEmits extends BasePickerEmits {
61
+ (e: 'update:modelValue', value: DatePickerValue): void;
62
+ }
63
+ export interface MonthPickerProps extends BasePickerProps {
64
+ modelValue?: DatePickerValue;
65
+ defaultValue?: DatePickerValue;
66
+ }
67
+ export interface MonthPickerEmits extends BasePickerEmits {
68
+ (e: 'update:modelValue', value: DatePickerValue): void;
69
+ }
70
+ export interface WeekPickerProps extends BasePickerProps {
71
+ modelValue?: DatePickerValue;
72
+ defaultValue?: DatePickerValue;
73
+ dayStartOfWeek?: DayStartOfWeek;
74
+ }
75
+ export interface WeekPickerEmits extends BasePickerEmits {
76
+ (e: 'update:modelValue', value: DatePickerValue): void;
77
+ }
78
+ export interface DatePickerProps extends BasePickerProps {
79
+ modelValue?: DatePickerValue;
80
+ defaultValue?: DatePickerValue;
81
+ dayStartOfWeek?: DayStartOfWeek;
82
+ showTime?: boolean;
83
+ timePickerProps?: TimePickerProps;
84
+ showNowBtn?: boolean;
85
+ }
86
+ export interface DatePickerEmits extends BasePickerEmits {
87
+ (e: 'update:modelValue', value: DatePickerValue): void;
88
+ }
89
+ export type DatePickerValue = Date | string | number;
90
+ export type DatePickerPosition = 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br';
91
+ export type DayStartOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
92
+ export type ValueFormat = 'timestamp' | 'Date' | string;
93
+ export type ShortcutsPosition = Exclude<Position, 'top'>;
94
+ export type DisabledDate = (current: Date) => boolean;
95
+ export type DisabledTime = (current: Date) => {
96
+ disabledHours?: () => number[];
97
+ disabledMinutes?: () => number[];
98
+ disabledSeconds?: () => number[];
99
+ };
100
+ export type ShortcutType = {
101
+ label: string | number | (() => VNode);
102
+ value: Date | Date[] | (() => Date | Date[]);
103
+ format: string;
104
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../node_modules/b-tween/dist/b-tween.es.js"),require("../node_modules/dayjs/dayjs.min.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../node_modules/dayjs/plugin/duration.js"),require("../node_modules/dayjs/plugin/toObject.js"),require("../node_modules/dayjs/plugin/isSameOrAfter.js"),require("../node_modules/dayjs/plugin/isSameOrBefore.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/locale.js"),require("../_shared/utils/time.js");const o=require("../_shared/utils/vue-utils.js"),l=require("./Drawer.vue.js");;/* empty css */const n={class:"yc-drawer-body-content"},t=e.defineComponent({__name:"DrawerService",props:{placement:{default:"right"},title:{type:[String,Array,Function],default:""},mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},okText:{default:""},cancelText:{default:""},okLoading:{type:Boolean,default:!1},okButtonProps:{default:()=>({})},cancelButtonProps:{default:()=>({})},unmountOnClose:{type:Boolean,default:!1},width:{default:250},height:{default:250},drawerStyle:{default:()=>({})},escToClose:{type:Boolean,default:!0},renderToBody:{type:Boolean,default:!1},header:{type:Boolean,default:!0},footer:{type:Boolean,default:!0},hideCancel:{type:Boolean,default:!1},onBeforeCancel:{type:Function,default:()=>!0},onBeforeOk:{type:Function,default:()=>!0},content:{},onOk:{},onCancel:{},onOpen:{},onClose:{},onBeforeOpen:{},onBeforeClose:{},serviceClose:{}},setup(t){const r=t,{onClose:a,serviceClose:u}=r,s=e.ref(!1),d=()=>{null==u||u(),null==a||a()};return e.onMounted(()=>{s.value=!0}),(t,a)=>(e.openBlock(),e.createBlock(l.default,e.mergeProps(r,{visible:s.value,"onUpdate:visible":a[0]||(a[0]=e=>s.value=e),style:{position:"fixed"},"popup-container":".yc-overlay-drawer",onOk:a[1]||(a[1]=e=>{var o;return null==(o=t.onOk)?void 0:o.call(t)}),onCancel:a[2]||(a[2]=e=>{var o;return null==(o=t.onCancel)?void 0:o.call(t)}),onBeforeOpen:a[3]||(a[3]=e=>{var o;return null==(o=t.onBeforeOpen)?void 0:o.call(t)}),onBeforeClose:a[4]||(a[4]=e=>{var o;return null==(o=t.onBeforeClose)?void 0:o.call(t)}),onOpen:a[5]||(a[5]=e=>{var o;return null==(o=t.onOpen)?void 0:o.call(t)}),onClose:d}),{title:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o.getSlotFunction)(t.title))))]),default:e.withCtx(()=>[e.createElementVNode("div",n,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o.getSlotFunction)(t.content))))])]),_:1},16,["visible"]))}});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../node_modules/b-tween/dist/b-tween.es.js"),require("../node_modules/dayjs/dayjs.min.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../node_modules/dayjs/plugin/duration.js"),require("../node_modules/dayjs/plugin/toObject.js"),require("../node_modules/dayjs/plugin/isSameOrAfter.js"),require("../node_modules/dayjs/plugin/isSameOrBefore.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/locale.js"),require("../_shared/utils/time.js");const o=require("../_shared/utils/vue-utils.js"),l=require("./Drawer.vue.js");;/* empty css */const n={class:"yc-drawer-body-content"},t=e.defineComponent({__name:"DrawerService",props:{placement:{default:"right"},title:{type:[String,Number,Array,Function],default:""},mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},okText:{default:""},cancelText:{default:""},okLoading:{type:Boolean,default:!1},okButtonProps:{default:()=>({})},cancelButtonProps:{default:()=>({})},unmountOnClose:{type:Boolean,default:!1},width:{default:250},height:{default:250},drawerStyle:{default:()=>({})},escToClose:{type:Boolean,default:!0},renderToBody:{type:Boolean,default:!1},header:{type:Boolean,default:!0},footer:{type:Boolean,default:!0},hideCancel:{type:Boolean,default:!1},onBeforeCancel:{type:Function,default:()=>!0},onBeforeOk:{type:Function,default:()=>!0},content:{},onOk:{},onCancel:{},onOpen:{},onClose:{},onBeforeOpen:{},onBeforeClose:{},serviceClose:{}},setup(t){const r=t,{onClose:a,serviceClose:u}=r,s=e.ref(!1),d=()=>{null==u||u(),null==a||a()};return e.onMounted(()=>{s.value=!0}),(t,a)=>(e.openBlock(),e.createBlock(l.default,e.mergeProps(r,{visible:s.value,"onUpdate:visible":a[0]||(a[0]=e=>s.value=e),style:{position:"fixed"},"popup-container":".yc-overlay-drawer",onOk:a[1]||(a[1]=e=>{var o;return null==(o=t.onOk)?void 0:o.call(t)}),onCancel:a[2]||(a[2]=e=>{var o;return null==(o=t.onCancel)?void 0:o.call(t)}),onBeforeOpen:a[3]||(a[3]=e=>{var o;return null==(o=t.onBeforeOpen)?void 0:o.call(t)}),onBeforeClose:a[4]||(a[4]=e=>{var o;return null==(o=t.onBeforeClose)?void 0:o.call(t)}),onOpen:a[5]||(a[5]=e=>{var o;return null==(o=t.onOpen)?void 0:o.call(t)}),onClose:d}),{title:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o.getSlotFunction)(t.title))))]),default:e.withCtx(()=>[e.createElementVNode("div",n,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o.getSlotFunction)(t.content))))])]),_:1},16,["visible"]))}});exports.default=t;