@sdata/web-vue 2.2.1 → 2.6.0

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 (205) hide show
  1. package/README.md +1 -1
  2. package/dist/sd.css +117 -191
  3. package/dist/sd.min.css +1 -1
  4. package/es/_components/picker/input-range.vue.d.ts +2 -2
  5. package/es/_components/transition/expand-transition.vue.d.ts +2 -2
  6. package/es/_hooks/use-responsive.d.ts +2 -2
  7. package/es/_hooks/use-theme-mode.d.ts +3 -0
  8. package/es/{calendar/hooks/use-calendar-theme.js → _hooks/use-theme-mode.js} +14 -10
  9. package/es/_utils/date.d.ts +10 -9
  10. package/es/_utils/date.js +23 -7
  11. package/es/_utils/responsive-observe.d.ts +5 -4
  12. package/es/_utils/responsive-observe.js +2 -1
  13. package/es/alert/index.d.ts +3 -3
  14. package/es/anchor/anchor.vue.d.ts +52 -2
  15. package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +75 -15
  16. package/es/anchor/index.d.ts +78 -3
  17. package/es/avatar/index.d.ts +20 -20
  18. package/es/border-beam/border-beam.js +5 -0
  19. package/es/border-beam/border-beam.vue.d.ts +52 -0
  20. package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +623 -0
  21. package/es/border-beam/index.d.ts +106 -0
  22. package/es/border-beam/index.js +10 -0
  23. package/es/border-beam/pulseDriver.d.ts +2 -0
  24. package/es/border-beam/pulseDriver.js +74 -0
  25. package/es/border-beam/style/css.js +2 -0
  26. package/es/border-beam/style/index.css +21 -0
  27. package/es/border-beam/style/index.d.ts +2 -0
  28. package/es/border-beam/style/index.js +2 -0
  29. package/es/border-beam/style/index.scss +12 -0
  30. package/es/border-beam/style/token.scss +12 -0
  31. package/es/border-beam/styles.d.ts +42 -0
  32. package/es/border-beam/styles.js +3545 -0
  33. package/es/border-beam/types.d.ts +27 -0
  34. package/es/button/button.vue.d.ts +16 -3
  35. package/es/button/button.vue_vue_type_script_setup_true_lang.js +39 -9
  36. package/es/button/index.d.ts +43 -24
  37. package/es/button/interface.d.ts +1 -0
  38. package/es/calendar/components/cell.vue.d.ts +26 -26
  39. package/es/calendar/components/index.vue.d.ts +1 -1
  40. package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +3 -2
  41. package/es/calendar/index.d.ts +5 -5
  42. package/es/carousel/index.d.ts +3 -3
  43. package/es/cascader/cascader.vue.d.ts +8 -8
  44. package/es/checkbox/checkbox.d.ts +3 -3
  45. package/es/collapse/collapse-item.d.ts +5 -5
  46. package/es/collapse/index.d.ts +3 -3
  47. package/es/components.d.ts +1 -0
  48. package/es/config-provider/config-provider.vue.d.ts +9 -0
  49. package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +10 -1
  50. package/es/config-provider/context.d.ts +1 -0
  51. package/es/config-provider/index.d.ts +36 -21
  52. package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +1 -0
  53. package/es/date-picker/hooks/use-cell-class-name.d.ts +1 -0
  54. package/es/date-picker/hooks/use-cell-class-name.js +3 -2
  55. package/es/date-picker/hooks/use-header-value.d.ts +2 -0
  56. package/es/date-picker/hooks/use-header-value.js +23 -19
  57. package/es/date-picker/hooks/use-picker-state.d.ts +2 -0
  58. package/es/date-picker/hooks/use-picker-state.js +3 -3
  59. package/es/date-picker/hooks/use-range-header-value.d.ts +2 -0
  60. package/es/date-picker/hooks/use-range-header-value.js +5 -1
  61. package/es/date-picker/hooks/use-range-picker-state.d.ts +2 -0
  62. package/es/date-picker/hooks/use-range-picker-state.js +3 -3
  63. package/es/date-picker/hooks/use-value-format.d.ts +5 -3
  64. package/es/date-picker/hooks/use-value-format.js +10 -8
  65. package/es/date-picker/index.d.ts +1373 -12
  66. package/es/date-picker/interface.d.ts +7 -0
  67. package/es/date-picker/panels/body.vue.d.ts +24 -6
  68. package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +13 -12
  69. package/es/date-picker/panels/date/index.vue.d.ts +26 -8
  70. package/es/date-picker/panels/date/index.vue_vue_type_script_setup_true_lang.js +18 -9
  71. package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +13 -20
  72. package/es/date-picker/panels/month/index.vue.d.ts +13 -8
  73. package/es/date-picker/panels/month/index.vue_vue_type_script_setup_true_lang.js +6 -6
  74. package/es/date-picker/panels/quarter/index.vue.d.ts +13 -8
  75. package/es/date-picker/panels/quarter/index.vue_vue_type_script_setup_true_lang.js +6 -6
  76. package/es/date-picker/panels/shortcuts.vue_vue_type_script_setup_true_lang.js +2 -6
  77. package/es/date-picker/panels/week/index.vue.d.ts +13 -1
  78. package/es/date-picker/panels/week/index.vue_vue_type_script_setup_true_lang.js +5 -2
  79. package/es/date-picker/panels/year/index.vue.d.ts +13 -8
  80. package/es/date-picker/panels/year/index.vue_vue_type_script_setup_true_lang.js +25 -15
  81. package/es/date-picker/picker-panel.vue.d.ts +56 -14
  82. package/es/date-picker/picker-panel.vue_vue_type_script_setup_true_lang.js +36 -19
  83. package/es/date-picker/picker.vue.d.ts +951 -3
  84. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +91 -29
  85. package/es/date-picker/range-picker-panel.vue.d.ts +77 -15
  86. package/es/date-picker/range-picker-panel.vue_vue_type_script_setup_true_lang.js +52 -28
  87. package/es/date-picker/range-picker.vue.d.ts +1348 -4
  88. package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +114 -34
  89. package/es/descriptions/index.d.ts +24 -24
  90. package/es/drawer/drawer.vue.d.ts +5 -5
  91. package/es/drawer/index.d.ts +15 -15
  92. package/es/dropdown/dropdown-button.vue.d.ts +4 -4
  93. package/es/dropdown/index.d.ts +15 -15
  94. package/es/ellipsis/ellipsis.vue.d.ts +7 -7
  95. package/es/ellipsis/performant-ellipsis.vue.d.ts +5 -5
  96. package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +3 -3
  97. package/es/form/index.d.ts +3 -3
  98. package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +2 -2
  99. package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +10 -10
  100. package/es/icon/icon-menu/icon-menu.js +5 -0
  101. package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +52 -0
  102. package/es/icon/icon-menu/index.js +9 -0
  103. package/es/image/preview-toolbar.vue.d.ts +2 -3
  104. package/es/image/preview-toolbar.vue_vue_type_script_setup_true_lang.js +2 -3
  105. package/es/image/preview.vue.d.ts +2 -2
  106. package/es/index.css +117 -191
  107. package/es/index.d.ts +3 -1
  108. package/es/index.js +3 -2
  109. package/es/index.scss +1 -0
  110. package/es/input/index.d.ts +7 -7
  111. package/es/input/input-password.vue.d.ts +3 -3
  112. package/es/json-form/index.d.ts +9 -9
  113. package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +1 -1
  114. package/es/json-form/json-form.vue.d.ts +3 -3
  115. package/es/layout/content.vue.d.ts +2 -2
  116. package/es/layout/content.vue_vue_type_script_setup_true_lang.js +8 -3
  117. package/es/layout/context.d.ts +12 -9
  118. package/es/layout/context.js +11 -3
  119. package/es/layout/footer.vue.d.ts +2 -2
  120. package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +8 -3
  121. package/es/layout/header.vue.d.ts +3 -30
  122. package/es/layout/header.vue_vue_type_script_setup_true_lang.js +9 -339
  123. package/es/layout/hooks/use-has-sider.d.ts +2 -0
  124. package/es/layout/hooks/use-has-sider.js +38 -0
  125. package/es/layout/index.d.ts +91 -380
  126. package/es/layout/index.js +2 -2
  127. package/es/layout/interface.d.ts +12 -46
  128. package/es/layout/layout.vue.d.ts +4 -2
  129. package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +38 -14
  130. package/es/layout/sider.vue.d.ts +47 -183
  131. package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +191 -370
  132. package/es/layout/style/index.css +112 -190
  133. package/es/layout/style/index.scss +127 -239
  134. package/es/layout/style/token.scss +46 -26
  135. package/es/link/index.d.ts +6 -6
  136. package/es/list/index.d.ts +18 -18
  137. package/es/locale/interface.d.ts +2 -0
  138. package/es/locale/lang/ar-eg.js +46 -0
  139. package/es/locale/lang/de-de.js +46 -0
  140. package/es/locale/lang/es-es.js +46 -0
  141. package/es/locale/lang/fr-fr.js +46 -0
  142. package/es/locale/lang/id-id.js +46 -0
  143. package/es/locale/lang/it-it.js +46 -0
  144. package/es/locale/lang/km-kh.js +46 -0
  145. package/es/locale/lang/ko-kr.js +46 -0
  146. package/es/locale/lang/ms-my.js +46 -0
  147. package/es/locale/lang/pt-pt.js +46 -0
  148. package/es/locale/lang/th-th.js +46 -0
  149. package/es/locale/lang/vi-vn.js +46 -0
  150. package/es/mention/mention.js +2 -0
  151. package/es/menu/base-menu.vue.d.ts +1 -1
  152. package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +14 -14
  153. package/es/menu/item.d.ts +1 -1
  154. package/es/menu/menu.d.ts +12 -12
  155. package/es/menu/menu.js +3 -3
  156. package/es/menu/sub-menu-pop.vue_vue_type_script_setup_true_lang.js +3 -4
  157. package/es/modal/index.d.ts +22 -20
  158. package/es/modal/index.js +47 -11
  159. package/es/modal/interface.d.ts +5 -0
  160. package/es/modal/modal.vue.d.ts +4 -4
  161. package/es/popconfirm/index.d.ts +12 -12
  162. package/es/popover/index.d.ts +12 -12
  163. package/es/progress/index.d.ts +6 -6
  164. package/es/qr-code/index.d.ts +3 -3
  165. package/es/radio/radio.d.ts +3 -3
  166. package/es/resize-box/resize-box.vue.d.ts +4 -4
  167. package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +7 -7
  168. package/es/result/index.d.ts +3 -3
  169. package/es/scrollbar/style/index.css +1 -1
  170. package/es/scrollbar/style/index.scss +4 -1
  171. package/es/sd-vue.js +3 -1
  172. package/es/select/select.d.ts +17 -17
  173. package/es/slider/index.d.ts +3 -3
  174. package/es/split/split.vue.d.ts +4 -4
  175. package/es/split/split.vue_vue_type_script_setup_true_lang.js +6 -6
  176. package/es/steps/index.d.ts +6 -6
  177. package/es/tabs/index.d.ts +6 -6
  178. package/es/tag/index.d.ts +6 -6
  179. package/es/tag/tag.vue.d.ts +2 -2
  180. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +4 -4
  181. package/es/theme-provider/index.d.ts +9 -9
  182. package/es/time-picker/index.d.ts +6 -6
  183. package/es/time-picker/time-picker.vue.d.ts +2 -2
  184. package/es/timeline/index.d.ts +3 -3
  185. package/es/timeline/timeline.d.ts +1 -1
  186. package/es/tooltip/index.d.ts +3 -3
  187. package/es/tour/index.d.ts +3 -3
  188. package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +6 -6
  189. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +6 -21
  190. package/es/tree/expand-transition.vue.d.ts +2 -2
  191. package/es/tree/node-switcher.vue.d.ts +1 -12
  192. package/es/tree/node-switcher.vue_vue_type_script_lang.js +1 -5
  193. package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +23 -23
  194. package/es/tree-select/tree-select.vue.d.ts +9 -9
  195. package/es/trigger/trigger.js +2 -1
  196. package/es/verification-code/verification-code.js +17 -7
  197. package/json/vetur-attributes.json +76 -156
  198. package/json/vetur-tags.json +26 -44
  199. package/json/web-types.json +150 -304
  200. package/package.json +5 -5
  201. package/es/_components/render-function.d.ts +0 -14
  202. package/es/_components/render-function.js +0 -14
  203. package/es/calendar/hooks/use-calendar-theme.d.ts +0 -4
  204. package/es/layout/utils.d.ts +0 -1
  205. package/es/layout/utils.js +0 -11
@@ -2,7 +2,7 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.133.0/
2
2
  import { useI18n } from "../../../locale/index.js";
3
3
  import { methods } from "../../../_utils/date.js";
4
4
  import date_default from "../date/index.js";
5
- import { createBlock, defineComponent, mergeProps, openBlock } from "vue";
5
+ import { createBlock, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, withCtx } from "vue";
6
6
  //#region components/date-picker/panels/week/index.vue?vue&type=script&setup=true&lang.ts
7
7
  var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "WeekPanel" }), {}, {
8
8
  __name: "index",
@@ -49,7 +49,10 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
49
49
  "is-same-time": isSameTime,
50
50
  onSelect,
51
51
  onCellMouseEnter
52
- }), null, 16, [
52
+ }), {
53
+ cell: withCtx((scope) => [renderSlot(_ctx.$slots, "cell", normalizeProps(guardReactiveProps(scope)))]),
54
+ _: 3
55
+ }, 16, [
53
56
  "header-value",
54
57
  "header-operations",
55
58
  "header-icons",
@@ -1,8 +1,13 @@
1
1
  import { PropType } from 'vue';
2
2
  import { Dayjs } from 'dayjs';
3
3
  import type { DisabledDate, HeaderIcons, HeaderOperations } from '../../interface';
4
- import { RenderFunc } from '../../../_components/render-function';
5
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ declare var __VLS_15: {
5
+ date: Date;
6
+ };
7
+ type __VLS_Slots = {} & {
8
+ cell?: (props: typeof __VLS_15) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
11
  headerValue: {
7
12
  type: PropType<Dayjs>;
8
13
  required: true;
@@ -24,9 +29,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
24
29
  rangeValues: {
25
30
  type: PropType<Array<Dayjs | undefined>>;
26
31
  };
27
- dateRender: {
28
- type: PropType<RenderFunc>;
29
- };
30
32
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
33
  select: (_value: Dayjs) => any;
32
34
  "cell-mouse-enter": (_value: Dayjs) => any;
@@ -52,9 +54,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
52
54
  rangeValues: {
53
55
  type: PropType<Array<Dayjs | undefined>>;
54
56
  };
55
- dateRender: {
56
- type: PropType<RenderFunc>;
57
- };
58
57
  }>> & Readonly<{
59
58
  onSelect?: ((_value: Dayjs) => any) | undefined;
60
59
  "onCell-mouse-enter"?: ((_value: Dayjs) => any) | undefined;
@@ -62,5 +61,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
62
61
  headerOperations: HeaderOperations;
63
62
  headerIcons: HeaderIcons;
64
63
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
64
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
65
65
  declare const _default: typeof __VLS_export;
66
66
  export default _default;
67
+ type __VLS_WithSlots<T, S> = T & {
68
+ new (): {
69
+ $slots: S;
70
+ };
71
+ };
@@ -4,11 +4,12 @@ import { dayjs } from "../../../_utils/date.js";
4
4
  import { newArray } from "../../utils/index.js";
5
5
  import body_default from "../body.js";
6
6
  import header_default from "../header.js";
7
- import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, toRefs, unref } from "vue";
7
+ import { computed, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, renderSlot, toRefs, unref, withCtx } from "vue";
8
8
  //#region components/date-picker/panels/year/index.vue?vue&type=script&setup=true&lang.ts
9
9
  var ROW_COUNT = 4;
10
10
  var COL_COUNT = 3;
11
11
  var SPAN = 10;
12
+ var MIN_YEAR = 0;
12
13
  var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "YearPanel" }), {}, {
13
14
  __name: "index",
14
15
  props: {
@@ -26,8 +27,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
26
27
  },
27
28
  value: { type: Object },
28
29
  disabledDate: { type: Function },
29
- rangeValues: { type: Array },
30
- dateRender: { type: Function }
30
+ rangeValues: { type: Array }
31
31
  },
32
32
  emits: ["select", "cell-mouse-enter"],
33
33
  setup(__props, { emit: __emit }) {
@@ -38,16 +38,25 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
38
38
  const prefixCls = computed(() => getPrefixCls("panel-year"));
39
39
  const pickerPrefixCls = getPrefixCls("picker");
40
40
  const rows = computed(() => {
41
- const startYear = Math.floor(headerValue.value.year() / SPAN) * SPAN - 1;
42
- const flatData = newArray(CELL_COUNT).map((_, index) => ({
43
- label: startYear + index,
44
- value: dayjs(`${startYear + index}`, "YYYY"),
45
- isPrev: index < 1,
46
- isNext: index > SPAN
47
- }));
41
+ const currentYear = Math.max(headerValue.value.year(), MIN_YEAR);
42
+ const baseYear = Math.floor(currentYear / SPAN) * SPAN;
43
+ const startYear = Math.max(baseYear - 1, MIN_YEAR);
44
+ const flatData = newArray(CELL_COUNT).map((_, index) => {
45
+ const year = startYear + index;
46
+ return {
47
+ label: year,
48
+ value: dayjs(`${year}`, "YYYY"),
49
+ isPrev: year < baseYear,
50
+ isNext: year > baseYear + SPAN - 1
51
+ };
52
+ });
48
53
  return newArray(ROW_COUNT).map((_, index) => flatData.slice(index * COL_COUNT, (index + 1) * COL_COUNT));
49
54
  });
50
- const headerTitle = computed(() => `${rows.value[0][1].label}-${rows.value[ROW_COUNT - 1][COL_COUNT - 1].label}`);
55
+ const headerTitle = computed(() => {
56
+ const currentYear = Math.max(headerValue.value.year(), MIN_YEAR);
57
+ const baseYear = Math.floor(currentYear / SPAN) * SPAN;
58
+ return `${baseYear}-${baseYear + SPAN - 1}`;
59
+ });
51
60
  const isSameTime = (current, target) => current.isSame(target, "year");
52
61
  function onCellClick(cellData) {
53
62
  emit("select", cellData.value);
@@ -67,16 +76,17 @@ var index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
67
76
  "range-values": __props.rangeValues,
68
77
  "disabled-date": __props.disabledDate,
69
78
  "is-same-time": isSameTime,
70
- "date-render": __props.dateRender,
71
79
  onCellClick,
72
80
  onCellMouseEnter
73
- }, null, 8, [
81
+ }, {
82
+ cell: withCtx((scope) => [renderSlot(_ctx.$slots, "cell", normalizeProps(guardReactiveProps(scope)))]),
83
+ _: 3
84
+ }, 8, [
74
85
  "prefix-cls",
75
86
  "rows",
76
87
  "value",
77
88
  "range-values",
78
- "disabled-date",
79
- "date-render"
89
+ "disabled-date"
80
90
  ])], 2)], 2);
81
91
  };
82
92
  }
@@ -1,9 +1,32 @@
1
1
  import { PropType } from 'vue';
2
2
  import { Dayjs } from 'dayjs';
3
- import { RenderFunc } from '../_components/render-function';
4
3
  import { TimePickerProps } from '../time-picker/interface';
5
4
  import { DisabledDate, DisabledTime, HeaderIcons, HeaderOperations, ShortcutType, WeekStart } from './interface';
6
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ declare var __VLS_27: {
6
+ date: Date;
7
+ }, __VLS_36: {
8
+ date: Date;
9
+ }, __VLS_45: {
10
+ date: Date;
11
+ }, __VLS_54: {
12
+ date: Date;
13
+ }, __VLS_65: {
14
+ date: Date;
15
+ }, __VLS_76: {};
16
+ type __VLS_Slots = {} & {
17
+ cell?: (props: typeof __VLS_27) => any;
18
+ } & {
19
+ cell?: (props: typeof __VLS_36) => any;
20
+ } & {
21
+ cell?: (props: typeof __VLS_45) => any;
22
+ } & {
23
+ cell?: (props: typeof __VLS_54) => any;
24
+ } & {
25
+ cell?: (props: typeof __VLS_65) => any;
26
+ } & {
27
+ extra?: (props: typeof __VLS_76) => any;
28
+ };
29
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
30
  mode: {
8
31
  type: StringConstructor;
9
32
  };
@@ -55,12 +78,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
55
78
  timePickerProps: {
56
79
  type: PropType<Partial<TimePickerProps>>;
57
80
  };
58
- extra: {
59
- type: PropType<RenderFunc>;
60
- };
61
- dateRender: {
62
- type: PropType<RenderFunc>;
63
- };
64
81
  hideTrigger: {
65
82
  type: BooleanConstructor;
66
83
  };
@@ -80,6 +97,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
80
97
  abbreviation: {
81
98
  type: BooleanConstructor;
82
99
  };
100
+ hideNotInViewDates: {
101
+ type: BooleanConstructor;
102
+ };
103
+ utcOffset: {
104
+ type: NumberConstructor;
105
+ };
106
+ timezone: {
107
+ type: StringConstructor;
108
+ };
109
+ now: {
110
+ type: PropType<Dayjs>;
111
+ };
83
112
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
84
113
  confirm: () => any;
85
114
  "cell-click": (_date: Dayjs) => any;
@@ -143,12 +172,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
143
172
  timePickerProps: {
144
173
  type: PropType<Partial<TimePickerProps>>;
145
174
  };
146
- extra: {
147
- type: PropType<RenderFunc>;
148
- };
149
- dateRender: {
150
- type: PropType<RenderFunc>;
151
- };
152
175
  hideTrigger: {
153
176
  type: BooleanConstructor;
154
177
  };
@@ -168,6 +191,18 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
168
191
  abbreviation: {
169
192
  type: BooleanConstructor;
170
193
  };
194
+ hideNotInViewDates: {
195
+ type: BooleanConstructor;
196
+ };
197
+ utcOffset: {
198
+ type: NumberConstructor;
199
+ };
200
+ timezone: {
201
+ type: StringConstructor;
202
+ };
203
+ now: {
204
+ type: PropType<Dayjs>;
205
+ };
171
206
  }>> & Readonly<{
172
207
  onConfirm?: (() => any) | undefined;
173
208
  "onCell-click"?: ((_date: Dayjs) => any) | undefined;
@@ -181,6 +216,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
181
216
  "onMonth-header-click"?: (() => any) | undefined;
182
217
  }>, {
183
218
  showTime: boolean;
219
+ hideNotInViewDates: boolean;
184
220
  headerIcons: HeaderIcons;
185
221
  dayStartOfWeek: WeekStart;
186
222
  showConfirmBtn: boolean;
@@ -191,5 +227,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
191
227
  shortcutsPosition: "bottom" | "left" | "right";
192
228
  hideTrigger: boolean;
193
229
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
230
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
194
231
  declare const _default: typeof __VLS_export;
195
232
  export default _default;
233
+ type __VLS_WithSlots<T, S> = T & {
234
+ new (): {
235
+ $slots: S;
236
+ };
237
+ };
@@ -2,7 +2,6 @@ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helper
2
2
  import { isFunction } from "../_utils/is.js";
3
3
  import { getDayjsValue, getNow } from "../_utils/date.js";
4
4
  import useHeaderValue from "./hooks/use-header-value.js";
5
- import render_function_default from "../_components/render-function.js";
6
5
  import date_default from "./panels/date/index.js";
7
6
  import footer_default from "./panels/footer.js";
8
7
  import month_default from "./panels/month/index.js";
@@ -10,7 +9,7 @@ import quarter_default from "./panels/quarter/index.js";
10
9
  import shortcuts_default from "./panels/shortcuts.js";
11
10
  import week_default from "./panels/week/index.js";
12
11
  import year_default from "./panels/year/index.js";
13
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, reactive, toRefs, unref, watch, withCtx } from "vue";
12
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, reactive, renderSlot, toRefs, unref, watch, withCtx } from "vue";
14
13
  //#region components/date-picker/picker-panel.vue?vue&type=script&setup=true&lang.ts
15
14
  var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "DatePikerPanel" }), {}, {
16
15
  __name: "picker-panel",
@@ -48,8 +47,6 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
48
47
  disabledDate: { type: Function },
49
48
  disabledTime: { type: Function },
50
49
  timePickerProps: { type: Object },
51
- extra: { type: Function },
52
- dateRender: { type: Function },
53
50
  hideTrigger: { type: Boolean },
54
51
  confirmBtnDisabled: { type: Boolean },
55
52
  showNowBtn: { type: Boolean },
@@ -58,7 +55,11 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
58
55
  default: () => ({})
59
56
  },
60
57
  headerOperations: { type: Object },
61
- abbreviation: { type: Boolean }
58
+ abbreviation: { type: Boolean },
59
+ hideNotInViewDates: { type: Boolean },
60
+ utcOffset: { type: Number },
61
+ timezone: { type: String },
62
+ now: { type: Object }
62
63
  },
63
64
  emits: [
64
65
  "cell-click",
@@ -75,7 +76,7 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
75
76
  setup(__props, { emit: __emit }) {
76
77
  const props = __props;
77
78
  const emit = __emit;
78
- const { prefixCls, shortcuts, shortcutsPosition, format, value, disabledDate, hideTrigger, showNowBtn, dateRender, showConfirmBtn, headerValue, headerIcons, headerOperations, headerMode } = toRefs(props);
79
+ const { prefixCls, shortcuts, shortcutsPosition, format, value, disabledDate, hideTrigger, showNowBtn, showConfirmBtn, headerValue, headerIcons, headerOperations, headerMode, utcOffset, timezone, now } = toRefs(props);
79
80
  const hasShortcuts = computed(() => Boolean(shortcuts.value && shortcuts.value.length));
80
81
  const showShortcutsNowBtn = computed(() => showNowBtn.value && showConfirmBtn.value && !hasShortcuts.value);
81
82
  const showShortcuts = computed(() => showShortcutsNowBtn.value || hasShortcuts.value);
@@ -87,7 +88,8 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
87
88
  [`${prefixCls.value}-container-shortcuts-placement-left`]: showShortcutsInLeft.value,
88
89
  [`${prefixCls.value}-container-shortcuts-placement-right`]: showShortcutsInRight.value
89
90
  }]);
90
- const footerValue = computed(() => (value === null || value === void 0 ? void 0 : value.value) || getNow());
91
+ const footerValue = computed(() => (value === null || value === void 0 ? void 0 : value.value) || getNow(utcOffset === null || utcOffset === void 0 ? void 0 : utcOffset.value, timezone === null || timezone === void 0 ? void 0 : timezone.value));
92
+ const mergedNow = computed(() => (now === null || now === void 0 ? void 0 : now.value) || getNow(utcOffset === null || utcOffset === void 0 ? void 0 : utcOffset.value, timezone === null || timezone === void 0 ? void 0 : timezone.value));
91
93
  const { headerValue: headerPanelHeaderValue, setHeaderValue: setHeaderPanelHeaderValue, headerOperations: headerPanelHeaderOperations } = useHeaderValue(reactive({
92
94
  mode: headerMode,
93
95
  format
@@ -97,7 +99,7 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
97
99
  });
98
100
  function getShortcutValue(shortcut) {
99
101
  const { value } = shortcut;
100
- return getDayjsValue(isFunction(value) ? value() : value, shortcut.format || format.value);
102
+ return getDayjsValue(isFunction(value) ? value() : value, shortcut.format || format.value, utcOffset === null || utcOffset === void 0 ? void 0 : utcOffset.value, timezone === null || timezone === void 0 ? void 0 : timezone.value);
101
103
  }
102
104
  function onShortcutClick(shortcut) {
103
105
  emit("shortcut-click", getShortcutValue(shortcut), shortcut);
@@ -115,7 +117,7 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
115
117
  emit("time-picker-select", time);
116
118
  }
117
119
  function onTodayBtnClick() {
118
- emit("today-btn-click", getNow());
120
+ emit("today-btn-click", mergedNow.value);
119
121
  }
120
122
  function onConfirmBtnClick() {
121
123
  emit("confirm");
@@ -144,7 +146,6 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
144
146
  headerIcons,
145
147
  headerOperations,
146
148
  disabledDate,
147
- dateRender,
148
149
  onSelect: onPanelSelect,
149
150
  onHeaderLabelClick: onPanelHeaderLabelClick
150
151
  });
@@ -178,25 +179,44 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
178
179
  "header-operations",
179
180
  "abbreviation",
180
181
  "disabled-date"
181
- ])) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [__props.mode === "week" ? (openBlock(), createBlock(week_default, mergeProps({ key: 0 }, commonPanelProps, { "day-start-of-week": __props.dayStartOfWeek }), null, 16, ["day-start-of-week"])) : __props.mode === "month" ? (openBlock(), createBlock(month_default, mergeProps({
182
+ ])) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [__props.mode === "week" ? (openBlock(), createBlock(week_default, mergeProps({ key: 0 }, commonPanelProps, { "day-start-of-week": __props.dayStartOfWeek }), {
183
+ cell: withCtx((scope) => [renderSlot(_ctx.$slots, "cell", normalizeProps(guardReactiveProps(scope)))]),
184
+ _: 3
185
+ }, 16, ["day-start-of-week"])) : __props.mode === "month" ? (openBlock(), createBlock(month_default, mergeProps({
182
186
  key: 1,
183
187
  abbreviation: __props.abbreviation
184
- }, commonPanelProps), null, 16, ["abbreviation"])) : __props.mode === "year" ? (openBlock(), createBlock(year_default, normalizeProps(mergeProps({ key: 2 }, commonPanelProps)), null, 16)) : __props.mode === "quarter" ? (openBlock(), createBlock(quarter_default, normalizeProps(mergeProps({ key: 3 }, commonPanelProps)), null, 16)) : (openBlock(), createBlock(date_default, mergeProps({ key: 4 }, commonPanelProps, {
188
+ }, commonPanelProps), {
189
+ cell: withCtx((scope) => [renderSlot(_ctx.$slots, "cell", normalizeProps(guardReactiveProps(scope)))]),
190
+ _: 3
191
+ }, 16, ["abbreviation"])) : __props.mode === "year" ? (openBlock(), createBlock(year_default, normalizeProps(mergeProps({ key: 2 }, commonPanelProps)), {
192
+ cell: withCtx((scope) => [renderSlot(_ctx.$slots, "cell", normalizeProps(guardReactiveProps(scope)))]),
193
+ _: 3
194
+ }, 16)) : __props.mode === "quarter" ? (openBlock(), createBlock(quarter_default, normalizeProps(mergeProps({ key: 3 }, commonPanelProps)), {
195
+ cell: withCtx((scope) => [renderSlot(_ctx.$slots, "cell", normalizeProps(guardReactiveProps(scope)))]),
196
+ _: 3
197
+ }, 16)) : (openBlock(), createBlock(date_default, mergeProps({ key: 4 }, commonPanelProps, {
185
198
  mode: "date",
186
199
  "show-time": __props.showTime,
200
+ "hide-not-in-view-dates": __props.hideNotInViewDates,
187
201
  "time-picker-props": __props.timePickerProps,
188
202
  "day-start-of-week": __props.dayStartOfWeek,
189
203
  "footer-value": footerValue.value,
190
204
  "time-picker-value": __props.timePickerValue,
191
205
  "disabled-time": __props.disabledTime,
206
+ now: mergedNow.value,
192
207
  onTimePickerSelect
193
- }), null, 16, [
208
+ }), {
209
+ cell: withCtx((scope) => [renderSlot(_ctx.$slots, "cell", normalizeProps(guardReactiveProps(scope)))]),
210
+ _: 3
211
+ }, 16, [
194
212
  "show-time",
213
+ "hide-not-in-view-dates",
195
214
  "time-picker-props",
196
215
  "day-start-of-week",
197
216
  "footer-value",
198
217
  "time-picker-value",
199
- "disabled-time"
218
+ "disabled-time",
219
+ "now"
200
220
  ])), createVNode(footer_default, {
201
221
  "prefix-cls": unref(prefixCls),
202
222
  "show-today-btn": unref(showNowBtn) && !(unref(showConfirmBtn) || showShortcutsInBottom.value),
@@ -204,12 +224,9 @@ var picker_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
204
224
  "confirm-btn-disabled": __props.confirmBtnDisabled,
205
225
  onTodayBtnClick,
206
226
  onConfirmBtnClick
207
- }, createSlots({ _: 2 }, [__props.extra ? {
227
+ }, createSlots({ _: 2 }, [_ctx.$slots.extra ? {
208
228
  name: "extra",
209
- fn: withCtx(() => [__props.extra ? (openBlock(), createBlock(unref(render_function_default), {
210
- key: 0,
211
- "render-func": __props.extra
212
- }, null, 8, ["render-func"])) : createCommentVNode("", true)]),
229
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "extra")]),
213
230
  key: "0"
214
231
  } : void 0, showShortcutsInBottom.value ? {
215
232
  name: "btn",