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
@@ -34,7 +34,7 @@ export default function useSelectContext(): {
34
34
  isFallbackOption?: boolean;
35
35
  }[]>;
36
36
  createOptions: Ref<{
37
- render?: string | import('vue').RenderFunction | RecordType<any>[] | undefined;
37
+ render?: string | number | import('vue').RenderFunction | RecordType<any>[] | undefined;
38
38
  label?: string | undefined;
39
39
  value?: SelectOptionValue | undefined;
40
40
  disabled?: boolean | undefined;
@@ -54,7 +54,7 @@ export default function useSelectContext(): {
54
54
  id?: string | undefined;
55
55
  isFallbackOption?: boolean | undefined;
56
56
  }[], SelectOptionData[] | {
57
- render?: string | import('vue').RenderFunction | RecordType<any>[] | undefined;
57
+ render?: string | number | import('vue').RenderFunction | RecordType<any>[] | undefined;
58
58
  label?: string | undefined;
59
59
  value?: SelectOptionValue | undefined;
60
60
  disabled?: boolean | undefined;
@@ -12,7 +12,7 @@ declare const _default: (params: {
12
12
  }) => {
13
13
  options: import('vue').ComputedRef<RecordType[]>;
14
14
  createOptions: Ref<{
15
- render?: string | import('vue').RenderFunction | RecordType<any>[] | undefined;
15
+ render?: string | number | import('vue').RenderFunction | RecordType<any>[] | undefined;
16
16
  label?: string | undefined;
17
17
  value?: SelectOptionValue | undefined;
18
18
  disabled?: boolean | undefined;
@@ -32,7 +32,7 @@ declare const _default: (params: {
32
32
  id?: string | undefined;
33
33
  isFallbackOption?: boolean | undefined;
34
34
  }[], SelectOptionData[] | {
35
- render?: string | import('vue').RenderFunction | RecordType<any>[] | undefined;
35
+ render?: string | number | import('vue').RenderFunction | RecordType<any>[] | undefined;
36
36
  label?: string | undefined;
37
37
  value?: SelectOptionValue | undefined;
38
38
  disabled?: boolean | undefined;
@@ -21,12 +21,6 @@ type SliderContext = {
21
21
  export default function useSliderContext(): {
22
22
  inject: () => SliderContext;
23
23
  provide: (props: RecordType, emits: SliderEmits, trackRef: Ref<HTMLDivElement | undefined>) => {
24
- range: Ref<boolean, boolean>;
25
- direction: Ref<Direction, Direction>;
26
- startValue: import('vue').WritableComputedRef<number, number>;
27
- endValue: import('vue').WritableComputedRef<number, number>;
28
- tempStartValue: Ref<number, number>;
29
- tempEndValue: Ref<number, number>;
30
24
  computedValue: import('vue').WritableComputedRef<SliderValue, SliderValue>;
31
25
  ticks: import('vue').ComputedRef<{
32
26
  label: number;
@@ -36,9 +30,21 @@ export default function useSliderContext(): {
36
30
  value: number;
37
31
  label: string;
38
32
  }[]>;
33
+ startValue: import('vue').WritableComputedRef<number, number>;
34
+ endValue: import('vue').WritableComputedRef<number, number>;
35
+ tempStartValue: Ref<number, number>;
36
+ tempEndValue: Ref<number, number>;
37
+ range: Ref<boolean, boolean>;
39
38
  min: Ref<number, number>;
40
39
  max: Ref<number, number>;
40
+ step: Ref<number, number>;
41
+ showTooltip: Ref<boolean, boolean>;
42
+ disabled: Ref<boolean, boolean>;
43
+ direction: Ref<Direction, Direction>;
44
+ trackRef: Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
45
+ formatTooltip: import('../../_shared/type').Format<number>;
41
46
  normalizeValue: (value: number) => number;
47
+ denormalizeValue: (percent: number) => number;
42
48
  };
43
49
  };
44
50
  export {};
@@ -104,7 +104,7 @@ function useSliderContext() {
104
104
  const clampedValue = Math.max(min.value, Math.min(finalValue, max.value));
105
105
  return +clampedValue.toFixed(digit);
106
106
  }
107
- provide(SLIDER_CONTEXT_KEY, {
107
+ const context = {
108
108
  startValue,
109
109
  endValue,
110
110
  tempStartValue,
@@ -120,20 +120,13 @@ function useSliderContext() {
120
120
  formatTooltip,
121
121
  normalizeValue,
122
122
  denormalizeValue
123
- });
123
+ };
124
+ provide(SLIDER_CONTEXT_KEY, context);
124
125
  return {
125
- range,
126
- direction,
127
- startValue,
128
- endValue,
129
- tempStartValue,
130
- tempEndValue,
126
+ ...context,
131
127
  computedValue,
132
128
  ticks,
133
- marks,
134
- min,
135
- max,
136
- normalizeValue
129
+ marks
137
130
  };
138
131
  };
139
132
  const inject$1 = () => {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, useSlots, toRefs, ref, computed, watch, createElementBlock, openBlock, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, normalizeStyle } from "vue";
2
2
  import Tween from "../node_modules/b-tween/dist/b-tween.es.js";
3
- import "../node_modules/dayjs/dayjs.min.js";
3
+ import dayjs from "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../node_modules/dayjs/plugin/duration.js";
6
6
  import "../node_modules/dayjs/plugin/toObject.js";
@@ -9,7 +9,7 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
9
  import "../_shared/utils/dom.js";
10
10
  import { isUndefined, isNumber } from "../_shared/utils/is.js";
11
11
  import "../_shared/utils/locale.js";
12
- import { formatSeconds, formatDate } from "../_shared/utils/time.js";
12
+ import { formatSeconds } from "../_shared/utils/time.js";
13
13
  const _hoisted_1 = { class: "yc-statistic yc-statistic-countdown" };
14
14
  const _hoisted_2 = {
15
15
  key: 0,
@@ -115,7 +115,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
115
115
  if (isCountdown.value) {
116
116
  return formatSeconds(value2, format.value);
117
117
  }
118
- return formatDate(value2, format.value);
118
+ return dayjs(value2).format(format.value);
119
119
  }
120
120
  return (_ctx, _cache) => {
121
121
  return openBlock(), createElementBlock("div", _hoisted_1, [
@@ -3,9 +3,17 @@ import { StepsEmits, StepStatus, StepType } from '../type';
3
3
  import { Direction, RecordType } from '../../_shared/type';
4
4
  export default function useStepsContext(): {
5
5
  provide: (props: RecordType, emits: StepsEmits) => {
6
+ stepMap: Reactive<Map<string, string>>;
7
+ computedCurrent: import('vue').WritableComputedRef<number, number>;
8
+ lineLess: Ref<boolean, boolean>;
6
9
  direction: import('vue').ComputedRef<Direction>;
7
- labelPlacement: import('vue').ComputedRef<Direction>;
10
+ status: Ref<StepStatus, StepStatus>;
11
+ statusArr: Ref<Ref<StepStatus, StepStatus>[], Ref<StepStatus, StepStatus>[]>;
12
+ small: Ref<boolean, boolean>;
8
13
  type: Ref<StepType, StepType>;
14
+ changeable: Ref<boolean, boolean>;
15
+ labelPlacement: import('vue').ComputedRef<Direction>;
16
+ emits: StepsEmits;
9
17
  };
10
18
  inject: (props: RecordType) => {
11
19
  curStep: import('vue').ComputedRef<number>;
@@ -51,7 +51,7 @@ function useStepsContext() {
51
51
  });
52
52
  const stepMap = reactive(/* @__PURE__ */ new Map());
53
53
  const statusArr = ref([]);
54
- provide(STEPS_CONTEXT_KEY, {
54
+ const context = {
55
55
  stepMap,
56
56
  computedCurrent,
57
57
  lineLess,
@@ -63,12 +63,9 @@ function useStepsContext() {
63
63
  changeable,
64
64
  labelPlacement,
65
65
  emits
66
- });
67
- return {
68
- direction,
69
- labelPlacement,
70
- type
71
66
  };
67
+ provide(STEPS_CONTEXT_KEY, context);
68
+ return context;
72
69
  };
73
70
  const inject$1 = (props) => {
74
71
  const { status: _status } = toRefs(props);
@@ -22,13 +22,20 @@ export type PaneNode = {
22
22
  } & TabPaneProps;
23
23
  export default function useTabsContext(): {
24
24
  provide: (props: RecordType, emits: TabsEmits, listRef: Ref<HTMLDivElement | undefined>) => {
25
+ autoSwitch: Ref<boolean, boolean>;
25
26
  computedActiveKey: import('vue').WritableComputedRef<TabKey, TabKey>;
26
- size: import('vue').ComputedRef<any>;
27
+ editable: Ref<boolean, boolean>;
27
28
  direction: import('vue').ComputedRef<Direction>;
29
+ trigger: Ref<EventTrigger, EventTrigger>;
30
+ type: Ref<TabType, TabType>;
31
+ destoryOnHide: Ref<boolean, boolean>;
28
32
  position: Ref<Position, Position>;
29
- autoSwitch: Ref<boolean, boolean>;
33
+ headerPadding: Ref<boolean, boolean>;
34
+ size: import('vue').ComputedRef<any>;
35
+ listRef: Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
30
36
  titleRefs: Ref<HTMLSpanElement[], HTMLSpanElement[]>;
31
37
  tabRefs: Ref<HTMLDivElement[], HTMLDivElement[]>;
38
+ emits: TabsEmits;
32
39
  };
33
40
  inject: () => TabsContext;
34
41
  };
@@ -44,7 +44,7 @@ function useTabsContext() {
44
44
  }
45
45
  return _direction.value;
46
46
  });
47
- provide(TABS_CONTEXT_KEY, {
47
+ const context = {
48
48
  computedActiveKey,
49
49
  editable,
50
50
  direction,
@@ -58,15 +58,11 @@ function useTabsContext() {
58
58
  titleRefs,
59
59
  tabRefs,
60
60
  emits
61
- });
61
+ };
62
+ provide(TABS_CONTEXT_KEY, context);
62
63
  return {
63
- computedActiveKey,
64
- size,
65
- direction,
66
- position,
67
- autoSwitch,
68
- titleRefs,
69
- tabRefs
64
+ ...context,
65
+ autoSwitch
70
66
  };
71
67
  };
72
68
  const inject$1 = () => {
@@ -172,7 +172,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
172
172
  value: unref(isArray)(unref(computedValue)) ? unref(computedValue)[0] : unref(computedValue),
173
173
  placeholder: unref(isArray)(unref(placeholder)) ? unref(placeholder)[0] : unref(placeholder),
174
174
  disabled: unref(disabled),
175
- readonly: unref(readonly),
175
+ readonly: unref(readonly) || true,
176
176
  ref: (el) => unref(inputRefs)[0] = el,
177
177
  class: "yc-picker-start-time"
178
178
  }, null, 8, _hoisted_2)
@@ -26,17 +26,27 @@ type TimePickerCell = {
26
26
  };
27
27
  export default function useTimePickerContext(): {
28
28
  provide: (props: RecordType, emits: TimePickerEmits) => {
29
- computedValue: import('vue').WritableComputedRef<TimePickerValue, TimePickerValue>;
30
- computedVisible: import('vue').WritableComputedRef<boolean, boolean>;
31
29
  showClearBtn: import('vue').ComputedRef<boolean | "" | 0>;
32
- curValue: Ref<number[], number[]>;
33
30
  readonly: Ref<boolean, boolean>;
34
31
  disabled: Ref<boolean, boolean>;
35
- type: Ref<TimePickerType, TimePickerType>;
36
- curIndex: Ref<number, number>;
37
- inputRefs: Ref<HTMLInputElement[], HTMLInputElement[]>;
38
- format: Ref<string, string>;
39
32
  placeholder: import('vue').ComputedRef<string | string[]>;
33
+ type: Ref<TimePickerType>;
34
+ format: Ref<string>;
35
+ computedValue: Ref<TimePickerValue>;
36
+ computedVisible: Ref<boolean>;
37
+ curIndex: Ref<number>;
38
+ curValue: Ref<number[]>;
39
+ timeColumn: Ref<TimeUnit[]>;
40
+ timeColumnCells: Ref<{
41
+ unit: TimeUnit;
42
+ cells: TimePickerCell[];
43
+ }[]>;
44
+ inputRefs: Ref<HTMLInputElement[]>;
45
+ disableConfirm: Ref<boolean>;
46
+ hideDisabledOptions: Ref<boolean>;
47
+ disabledHours: DisabledHours;
48
+ disabledMinutes: DisabledMinutes;
49
+ disabledSeconds: DisabledSeconds;
40
50
  };
41
51
  inject: () => TimePickerContext;
42
52
  };
@@ -87,7 +87,7 @@ function useTimePickerContext() {
87
87
  );
88
88
  });
89
89
  const inputRefs = ref([]);
90
- provide(TIME_PICKER_CONTEXT_KEY, {
90
+ const context = {
91
91
  computedValue,
92
92
  computedVisible,
93
93
  timeColumn,
@@ -102,18 +102,13 @@ function useTimePickerContext() {
102
102
  disabledHours,
103
103
  disabledMinutes,
104
104
  disabledSeconds
105
- });
105
+ };
106
+ provide(TIME_PICKER_CONTEXT_KEY, context);
106
107
  return {
107
- computedValue,
108
- computedVisible,
108
+ ...context,
109
109
  showClearBtn,
110
- curValue,
111
110
  readonly,
112
111
  disabled,
113
- type,
114
- curIndex,
115
- inputRefs,
116
- format,
117
112
  placeholder
118
113
  };
119
114
  };
@@ -9,11 +9,13 @@ type TimelineContext = {
9
9
  };
10
10
  export default function useTimelineContext(): {
11
11
  provide: (props: RecordType) => {
12
- direction: Ref<Direction, Direction>;
13
- mode: import('vue').ComputedRef<TimelineMode>;
14
12
  timelineItems: import('vue').ComputedRef<(import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
15
13
  [key: string]: any;
16
14
  }> | RecordType)[]>;
15
+ direction: Ref<Direction, Direction>;
16
+ mode: import('vue').ComputedRef<TimelineMode>;
17
+ labelPosition: Ref<TimelineLabelPosition, TimelineLabelPosition>;
18
+ reverse: Ref<boolean, boolean>;
17
19
  };
18
20
  inject: () => TimelineContext;
19
21
  };
@@ -43,17 +43,14 @@ function useTimelineContext() {
43
43
  );
44
44
  return pending.value ? [...nodes, pendingNodes.value] : nodes;
45
45
  });
46
- provide(TIMELINE_CONTEXT_KEY, {
46
+ const context = {
47
47
  direction,
48
48
  mode,
49
49
  labelPosition,
50
50
  reverse
51
- });
52
- return {
53
- direction,
54
- mode,
55
- timelineItems
56
51
  };
52
+ provide(TIMELINE_CONTEXT_KEY, context);
53
+ return { ...context, timelineItems };
57
54
  };
58
55
  const inject$1 = () => {
59
56
  return inject(TIMELINE_CONTEXT_KEY, {
@@ -14,7 +14,7 @@ import "../_shared/utils/time.js";
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import _sfc_main$4 from "../_shared/icons/IconClose.vue.js";
17
- import _sfc_main$2 from "../_shared/icons/IconDelete.vue.js";
17
+ import _sfc_main$2 from "../_shared/icons/IconDelete.vue2.js";
18
18
  import _sfc_main$3 from "../_shared/icons/IconSearch.vue.js";
19
19
  import useTransferContext from "./hooks/useContext.js";
20
20
  import Checkbox from "../Checkbox/index.js";
@@ -20,12 +20,7 @@ type TransferContext = {
20
20
  emits: TransferEmits;
21
21
  };
22
22
  export default function useTransferContext(): {
23
- provide: (props: RecordType, emits: TransferEmits) => {
24
- computedValue: import('vue').WritableComputedRef<TransferItemValue[], TransferItemValue[]>;
25
- computedSelected: import('vue').WritableComputedRef<TransferItemValue[], TransferItemValue[]>;
26
- targetChecked: import('vue').ComputedRef<TransferItemValue[]>;
27
- sourceChecked: import('vue').ComputedRef<TransferItemValue[]>;
28
- };
23
+ provide: (props: RecordType, emits: TransferEmits) => TransferContext;
29
24
  inject: () => TransferContext;
30
25
  };
31
26
  export {};
@@ -73,7 +73,7 @@ function useTransferContext() {
73
73
  return computedValueMap.value.has(item);
74
74
  });
75
75
  });
76
- provide(TRANSFER_CONTEXT_KEY, {
76
+ const context = {
77
77
  computedValue,
78
78
  computedSelected,
79
79
  targetChecked,
@@ -89,13 +89,9 @@ function useTransferContext() {
89
89
  disabled,
90
90
  title,
91
91
  emits
92
- });
93
- return {
94
- computedValue,
95
- computedSelected,
96
- targetChecked,
97
- sourceChecked
98
92
  };
93
+ provide(TRANSFER_CONTEXT_KEY, context);
94
+ return context;
99
95
  };
100
96
  const inject$1 = () => {
101
97
  return inject(TRANSFER_CONTEXT_KEY, {
@@ -14,8 +14,8 @@ import "../_shared/utils/time.js";
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  /* empty css */
17
- import _sfc_main$3 from "../_shared/icons/IconCopy.vue.js";
18
- import _sfc_main$1 from "../_shared/icons/IconEdit.vue.js";
17
+ import _sfc_main$3 from "../_shared/icons/IconCopy.vue2.js";
18
+ import _sfc_main$1 from "../_shared/icons/IconEdit.vue2.js";
19
19
  import _sfc_main$2 from "../_shared/icons/IconInfo.vue.js";
20
20
  import Input from "../Input/index.js";
21
21
  import Tooltip from "../Tooltip/index.js";
@@ -4,8 +4,10 @@ import _sfc_main$2 from "./UploadButton.vue.js";
4
4
  /* empty css */
5
5
  import _sfc_main$1 from "./UploadDrag.vue.js";
6
6
  /* empty css */
7
- import UploadFileList from "./UploadFileList.vue.js";
8
- import UploadPictureCard from "./UploadPictureCard.vue.js";
7
+ import _sfc_main$3 from "./UploadFileList.vue.js";
8
+ /* empty css */
9
+ import _sfc_main$4 from "./UploadPictureCard.vue.js";
10
+ /* empty css */
9
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
12
  ...{
11
13
  name: "Upload"
@@ -100,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
100
102
  }, null, 8, ["is-over-drop-zone"])) : (openBlock(), createBlock(_sfc_main$2, { key: 1 }))
101
103
  ]) : createCommentVNode("", true)
102
104
  ], 2)) : createCommentVNode("", true),
103
- _ctx.showFileList && unref(computedFileList).length ? (openBlock(), createBlock(UploadFileList, { key: 1 }, createSlots({ _: 2 }, [
105
+ _ctx.showFileList && unref(computedFileList).length ? (openBlock(), createBlock(_sfc_main$3, { key: 1 }, createSlots({ _: 2 }, [
104
106
  $slots["extra-button"] ? {
105
107
  name: "extra-button",
106
108
  fn: withCtx((scope) => [
@@ -116,7 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
116
118
  key: "1"
117
119
  } : void 0
118
120
  ]), 1024)) : createCommentVNode("", true)
119
- ], 64)) : (openBlock(), createBlock(UploadPictureCard, { key: 1 }))
121
+ ], 64)) : (openBlock(), createBlock(_sfc_main$4, { key: 1 }))
120
122
  ], 2);
121
123
  };
122
124
  }
@@ -1,7 +1,131 @@
1
- import _sfc_main from "./UploadFileList.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const UploadFileList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2b2e07dc"]]);
1
+ import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, renderSlot, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent, createVNode, withCtx } from "vue";
2
+ import useUploadContext from "./hooks/useContext.js";
3
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
4
+ /* empty css */
5
+ import "../node_modules/b-tween/dist/b-tween.es.js";
6
+ import "../node_modules/dayjs/dayjs.min.js";
7
+ import "../node_modules/tinycolor2/esm/tinycolor.js";
8
+ import "../node_modules/dayjs/plugin/duration.js";
9
+ import "../node_modules/dayjs/plugin/toObject.js";
10
+ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
11
+ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
12
+ import "../_shared/utils/dom.js";
13
+ import "../_shared/utils/locale.js";
14
+ import "../_shared/utils/time.js";
15
+ /* empty css */
16
+ /* empty css */
17
+ import _sfc_main$3 from "../_shared/icons/IconDelete.vue2.js";
18
+ import _sfc_main$2 from "../_shared/icons/IconFile.vue2.js";
19
+ const _hoisted_1 = { class: "yc-upload-list-item-content" };
20
+ const _hoisted_2 = {
21
+ key: 0,
22
+ class: "yc-upload-list-item-thumbnail"
23
+ };
24
+ const _hoisted_3 = ["src", "alt", "loading"];
25
+ const _hoisted_4 = { class: "yc-upload-list-item-name" };
26
+ const _hoisted_5 = {
27
+ key: 0,
28
+ class: "yc-upload-list-item-file-icon"
29
+ };
30
+ const _hoisted_6 = { class: "yc-upload-list-item-name-text text-ellipsis" };
31
+ const _hoisted_7 = ["href", "download"];
32
+ const _hoisted_8 = {
33
+ key: 0,
34
+ class: "yc-upload-list-item-operation"
35
+ };
36
+ const _sfc_main = /* @__PURE__ */ defineComponent({
37
+ __name: "UploadFileList",
38
+ setup(__props) {
39
+ const {
40
+ computedFileList,
41
+ showRemoveButton,
42
+ listType,
43
+ imageLoading,
44
+ showLink,
45
+ download,
46
+ customIcon,
47
+ slots,
48
+ handleDelFile
49
+ } = useUploadContext().inject();
50
+ const renderFileIcon = (fileItem) => {
51
+ var _a, _b;
52
+ if (slots["file-icon"]) {
53
+ return slots["file-icon"]({
54
+ fileItem
55
+ });
56
+ }
57
+ return ((_b = (_a = customIcon.value).fileIcon) == null ? void 0 : _b.call(_a, fileItem)) || _sfc_main$2;
58
+ };
59
+ const renderName = (fileItem) => {
60
+ if (slots["file-name"]) {
61
+ return slots["file-name"]({
62
+ fileItem
63
+ });
64
+ }
65
+ return () => {
66
+ var _a, _b;
67
+ return ((_b = (_a = customIcon.value).fileName) == null ? void 0 : _b.call(_a, fileItem)) || fileItem.name;
68
+ };
69
+ };
70
+ const renderDelIcon = () => {
71
+ return slots["remove-icon"] ?? (customIcon.value.removeIcon || _sfc_main$3);
72
+ };
73
+ return (_ctx, _cache) => {
74
+ return openBlock(), createElementBlock("div", {
75
+ class: normalizeClass(["yc-upload-list", `yc-upload-list-type-${unref(listType)}`])
76
+ }, [
77
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(computedFileList), (item, i) => {
78
+ return openBlock(), createElementBlock("div", {
79
+ key: item.uid,
80
+ class: "yc-upload-list-item"
81
+ }, [
82
+ renderSlot(_ctx.$slots, "upload-item", {
83
+ fileItem: item,
84
+ index: i
85
+ }, () => [
86
+ createElementVNode("div", _hoisted_1, [
87
+ unref(listType) == "picture" ? (openBlock(), createElementBlock("span", _hoisted_2, [
88
+ createElementVNode("img", {
89
+ src: item.url,
90
+ alt: item.name,
91
+ loading: unref(imageLoading)
92
+ }, null, 8, _hoisted_3)
93
+ ])) : createCommentVNode("", true),
94
+ createElementVNode("div", _hoisted_4, [
95
+ unref(listType) == "text" ? (openBlock(), createElementBlock("span", _hoisted_5, [
96
+ (openBlock(), createBlock(resolveDynamicComponent(renderFileIcon(item))))
97
+ ])) : createCommentVNode("", true),
98
+ createElementVNode("span", _hoisted_6, [
99
+ unref(showLink) ? (openBlock(), createElementBlock("a", {
100
+ key: 0,
101
+ href: item.url,
102
+ download: unref(download) ? item.name : void 0,
103
+ class: "yc-upload-list-item-name-link",
104
+ target: "_blank"
105
+ }, [
106
+ (openBlock(), createBlock(resolveDynamicComponent(renderName(item))))
107
+ ], 8, _hoisted_7)) : (openBlock(), createBlock(resolveDynamicComponent(renderName(item)), { key: 1 }))
108
+ ])
109
+ ])
110
+ ])
111
+ ]),
112
+ _ctx.$slots["extra-button"] || unref(showRemoveButton) ? (openBlock(), createElementBlock("span", _hoisted_8, [
113
+ createVNode(unref(_sfc_main$1), {
114
+ onClick: ($event) => unref(handleDelFile)(item)
115
+ }, {
116
+ default: withCtx(() => [
117
+ (openBlock(), createBlock(resolveDynamicComponent(renderDelIcon())))
118
+ ]),
119
+ _: 1
120
+ }, 8, ["onClick"]),
121
+ renderSlot(_ctx.$slots, "extra-button", { fileItem: item })
122
+ ])) : createCommentVNode("", true)
123
+ ]);
124
+ }), 128))
125
+ ], 2);
126
+ };
127
+ }
128
+ });
5
129
  export {
6
- UploadFileList as default
130
+ _sfc_main as default
7
131
  };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./UploadFileList.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };