@unicom-cloud/ui 0.8.96 → 0.8.98

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 (302) hide show
  1. package/Affix.js +1 -1
  2. package/Carousel.js +1 -1
  3. package/LiquidFill.js +4 -0
  4. package/OverflowEllipsis.js +1 -1
  5. package/PageHeader.js +1 -1
  6. package/QrCode.js +57 -0
  7. package/Tour.js +63 -0
  8. package/Trigger.js +1 -1
  9. package/_virtual/_commonjsHelpers.js +6 -0
  10. package/_virtual/index.js +7 -0
  11. package/_virtual/index2.js +4 -0
  12. package/affix/index.js +70 -72
  13. package/alert/index.js +56 -56
  14. package/anchor/Anchor.js +55 -55
  15. package/anchor/Link.js +34 -34
  16. package/anchor/util.js +5 -5
  17. package/auto-complete/index.js +116 -122
  18. package/avatar/Avatar.js +33 -33
  19. package/avatar/Group.js +26 -26
  20. package/back-top/index.js +58 -61
  21. package/badge/index.js +46 -46
  22. package/breadcrumb/Item.js +42 -43
  23. package/breadcrumb/index.js +47 -47
  24. package/button/Group.js +6 -6
  25. package/button/index.js +91 -91
  26. package/calendar/Month.js +75 -75
  27. package/calendar/Year.js +35 -35
  28. package/calendar/header/index.js +25 -25
  29. package/calendar/index.js +103 -103
  30. package/card/Grid.js +8 -8
  31. package/card/Meta.js +16 -16
  32. package/card/index.js +49 -49
  33. package/carousel/Arrow.js +19 -19
  34. package/carousel/Indicator.js +26 -26
  35. package/carousel/index.js +108 -108
  36. package/cascader/Cascader.js +178 -191
  37. package/cascader/base/node.js +133 -136
  38. package/cascader/base/store.js +82 -85
  39. package/cascader/panel/List.js +125 -129
  40. package/cascader/panel/Search.js +79 -81
  41. package/cascader/util.js +13 -13
  42. package/checkbox/Checkbox.js +94 -96
  43. package/checkbox/Group.js +54 -56
  44. package/checkbox/GroupBlock.js +28 -29
  45. package/collapse/Collapse.js +45 -45
  46. package/collapse/Item.js +53 -55
  47. package/color-picker/ControlBar.js +43 -43
  48. package/color-picker/InputAlpha.js +12 -12
  49. package/color-picker/InputHex.js +30 -31
  50. package/color-picker/InputRgb.js +24 -24
  51. package/color-picker/Palette.js +18 -18
  52. package/color-picker/Panel.js +122 -125
  53. package/color-picker/hooks/useColorPicker.js +85 -88
  54. package/color-picker/hooks/useControlBlock.js +38 -40
  55. package/color-picker/index.js +47 -47
  56. package/comment/index.js +29 -29
  57. package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
  58. package/components/common/hooks/useId.js +8 -8
  59. package/components/common/hooks/useInView.js +16 -16
  60. package/components/common/hooks/useIntersectionObserver.js +1 -1
  61. package/components/common/hooks/useKeyboardEvent.js +9 -10
  62. package/components/common/hooks/useOverflowHidden.js +1 -4
  63. package/components/common/hooks/usePersistCallback.js +7 -7
  64. package/components/common/hooks/useStateCallback.js +9 -10
  65. package/components/common/hooks/useWindowSize.js +8 -8
  66. package/components/common/space/index.js +9 -7
  67. package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  68. package/components/common/utils/dom.js +27 -29
  69. package/components/common/utils/findScrollParent.js +17 -0
  70. package/components/common/utils/intersectionObserver.js +21 -0
  71. package/components/common/utils/is.js +99 -109
  72. package/components/common/utils/mutationObserver.js +19 -0
  73. package/components/common/utils/reactDOM.js +34 -34
  74. package/components/common/utils/resizeObserver.js +21 -0
  75. package/copy/index.js +38 -40
  76. package/date-picker/Picker.js +290 -295
  77. package/date-picker/RangePicker.js +367 -372
  78. package/date-picker/index.js +33 -35
  79. package/date-picker/panel/Body.js +46 -47
  80. package/date-picker/panel/Header.js +33 -33
  81. package/date-picker/panel/Shortcut.js +31 -31
  82. package/date-picker/panel/date/index.js +85 -85
  83. package/date-picker/panel/month/index.js +59 -59
  84. package/date-picker/panel/quarter/index.js +67 -70
  85. package/date-picker/panel/range/index.js +101 -101
  86. package/date-picker/panel/year/index.js +39 -39
  87. package/date-picker/util.js +17 -18
  88. package/descriptions/index.js +62 -62
  89. package/details/index.js +53 -55
  90. package/development/index.js +9 -9
  91. package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
  92. package/dist/validate/src/index.js +5 -5
  93. package/dist/validate/src/util.js +1 -1
  94. package/divider/index.js +21 -21
  95. package/draggable/Item.js +35 -35
  96. package/draggable/index.js +22 -22
  97. package/drawer/Drawer.js +142 -147
  98. package/dropdown/Button.js +48 -48
  99. package/dropdown/index.js +88 -92
  100. package/empty/index.js +16 -16
  101. package/form/Control.js +211 -225
  102. package/form/Form.js +109 -113
  103. package/form/FormItem.js +118 -120
  104. package/form/FormList.js +60 -66
  105. package/form/FormProvider.js +31 -34
  106. package/form/hook/useContext.js +17 -19
  107. package/form/hook/useState.js +22 -23
  108. package/form/hook/useWatch.js +26 -27
  109. package/form/promisify.js +14 -18
  110. package/form/store.js +304 -316
  111. package/form/util.js +14 -15
  112. package/grid/Col.js +64 -64
  113. package/grid/Grid.js +51 -51
  114. package/grid/GridItem.js +48 -48
  115. package/grid/Row.js +39 -39
  116. package/hooks/useVerificationCode.js +41 -43
  117. package/hooks/useWatermark.js +89 -92
  118. package/icon/index.js +23 -24
  119. package/icon-hover/index.js +16 -16
  120. package/icons/file.js +11 -11
  121. package/image/Image.js +140 -141
  122. package/image/ImagePreview.js +252 -255
  123. package/image/ImagePreviewArrow.js +25 -25
  124. package/image/ImagePreviewGroup.js +62 -62
  125. package/image/util/getScale.js +25 -28
  126. package/index.js +684 -675
  127. package/input/Button.js +48 -50
  128. package/input/Group.js +9 -9
  129. package/input/Input.js +145 -154
  130. package/input/InputElement.js +108 -115
  131. package/input/Password.js +38 -38
  132. package/input/Search.js +51 -55
  133. package/input/Textarea.js +80 -81
  134. package/input/useComposition.js +23 -23
  135. package/input-number/decimal.js +59 -62
  136. package/input-number/index.js +139 -141
  137. package/input-tag/InputTag.js +222 -230
  138. package/layout/Content.js +6 -6
  139. package/layout/Footer.js +8 -8
  140. package/layout/Header.js +7 -7
  141. package/layout/Sider.js +88 -90
  142. package/layout/index.js +30 -30
  143. package/link/index.js +45 -46
  144. package/liquid-fill/LiquidFill.js +226 -0
  145. package/liquid-fill/LiquidFill2.js +3 -0
  146. package/liquid-fill/index.js +4 -0
  147. package/list/Item.js +28 -28
  148. package/list/Meta.js +12 -12
  149. package/list/index.js +146 -148
  150. package/mentions/index.js +75 -76
  151. package/menu/Item.js +58 -58
  152. package/menu/Menu.js +125 -127
  153. package/menu/OverflowWrap.js +39 -40
  154. package/menu/sub-menu/Inline.js +45 -45
  155. package/menu/util.js +26 -28
  156. package/message/index.js +96 -99
  157. package/message/useMessage.js +26 -27
  158. package/modal/Confirm.js +47 -49
  159. package/modal/Modal.js +250 -257
  160. package/modal/use-modal/Hook.js +26 -28
  161. package/modal/use-modal/index.js +46 -49
  162. package/notice/index.js +89 -90
  163. package/notification/index.js +60 -65
  164. package/notification/withNotification.js +35 -35
  165. package/overflow-ellipsis/OverflowItem.js +19 -20
  166. package/overflow-ellipsis/index.js +45 -46
  167. package/package.json +1 -1
  168. package/page-header/index.js +45 -45
  169. package/pagination/PageItem.js +87 -91
  170. package/pagination/PageJumper.js +40 -41
  171. package/pagination/PageOption.js +31 -35
  172. package/pagination/Pagination.js +162 -163
  173. package/picker/Input.js +90 -96
  174. package/picker/InputRange.js +115 -122
  175. package/popconfirm/index.js +98 -100
  176. package/popover/index.js +28 -28
  177. package/portal/Portal.js +10 -11
  178. package/progress/index.js +36 -36
  179. package/qr-code/index.js +99 -0
  180. package/qr-code/interface.js +1 -0
  181. package/radio/Group.js +48 -48
  182. package/radio/GroupBlock.js +32 -33
  183. package/radio/Radio.js +62 -64
  184. package/rate/index.js +88 -88
  185. package/resize-box/ResizeTrigger.js +39 -39
  186. package/resize-box/Split.js +92 -96
  187. package/resize-box/SplitGroup.js +116 -122
  188. package/resize-box/index.js +112 -115
  189. package/result/index.js +44 -44
  190. package/select/Option.js +53 -56
  191. package/select/Select.js +365 -381
  192. package/select/util.js +95 -99
  193. package/select-view/Core.js +159 -160
  194. package/skeleton/index.js +23 -23
  195. package/slider/Button.js +84 -92
  196. package/slider/Input.js +47 -49
  197. package/slider/Tick.js +28 -31
  198. package/slider/index.js +107 -107
  199. package/space/index.js +26 -26
  200. package/space-/index.js +51 -51
  201. package/spin/DotLoading.js +8 -8
  202. package/spin/index.js +47 -47
  203. package/statistic/Countdown.js +37 -37
  204. package/statistic/index.js +58 -58
  205. package/steps/Step.js +42 -42
  206. package/steps/index.js +54 -54
  207. package/style.css +1 -1
  208. package/switch/index.js +77 -78
  209. package/table/ColGroup.js +36 -37
  210. package/table/Table.js +447 -450
  211. package/table/hook/useExpand.js +24 -24
  212. package/table/hook/useRowSelection.js +62 -62
  213. package/table/summary/Row.js +16 -17
  214. package/table/tbody/Td.js +119 -118
  215. package/table/tbody/Tr.js +119 -121
  216. package/table/tbody/index.js +62 -63
  217. package/table/th-resizable/index.js +30 -30
  218. package/table/thead/Column.js +148 -148
  219. package/table/thead/index.js +87 -88
  220. package/tabs/Tab.js +55 -55
  221. package/tabs/TabContent.js +8 -8
  222. package/tabs/TabPane.js +15 -15
  223. package/tabs/hook/useHeaderScroll.js +36 -36
  224. package/tabs/tab-header/TabInk.js +31 -33
  225. package/tabs/tab-header/TabNavIcon.js +34 -35
  226. package/tabs/tab-header/index.js +192 -195
  227. package/tag/index.js +94 -97
  228. package/time-picker/Picker.js +167 -172
  229. package/time-picker/RangePicker.js +28 -28
  230. package/time-picker/TimePicker.js +146 -146
  231. package/timeline/Item.js +46 -46
  232. package/timeline/Timeline.js +52 -52
  233. package/tooltip/index.js +89 -95
  234. package/tour/index.js +289 -0
  235. package/transfer/Item.js +54 -54
  236. package/transfer/List.js +134 -136
  237. package/transfer/index.js +91 -91
  238. package/tree/Animation.js +49 -52
  239. package/tree/Node.js +114 -122
  240. package/tree/NodeList.js +51 -51
  241. package/tree/Tree.js +386 -393
  242. package/tree-select/List.js +71 -72
  243. package/tree-select/Select.js +135 -143
  244. package/tree-select/hook/useKeyCache.js +39 -39
  245. package/tree-select/hook/useStateValue.js +12 -12
  246. package/trigger/getPopupStyle.js +60 -61
  247. package/trigger/index.js +337 -346
  248. package/types/common/space/interface.d.ts +1 -1
  249. package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  250. package/types/common/utils/findScrollParent.d.ts +2 -0
  251. package/types/common/utils/index.d.ts +5 -0
  252. package/types/common/utils/intersectionObserver.d.ts +2 -0
  253. package/types/common/utils/mutationObserver.d.ts +2 -0
  254. package/types/common/utils/resizeObserver.d.ts +2 -0
  255. package/types/pc/config-provider/interface.d.ts +6 -0
  256. package/types/pc/index.d.ts +3 -0
  257. package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
  258. package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
  259. package/types/pc/liquid-fill/index.d.ts +2 -0
  260. package/types/pc/qr-code/index.d.ts +34 -0
  261. package/types/pc/qr-code/interface.d.ts +39 -0
  262. package/types/pc/table/interface.d.ts +2 -2
  263. package/types/pc/tour/index.d.ts +42 -0
  264. package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
  265. package/types/pc/utils/findScrollParent.d.ts +2 -0
  266. package/types/pc/utils/index.d.ts +5 -0
  267. package/types/pc/utils/intersectionObserver.d.ts +2 -0
  268. package/types/pc/utils/mutationObserver.d.ts +2 -0
  269. package/types/pc/utils/names.d.ts +18 -0
  270. package/types/pc/utils/resizeObserver.d.ts +2 -0
  271. package/typography/Base.js +79 -81
  272. package/typography/EditContent.js +30 -33
  273. package/typography/Ellipsis.js +77 -73
  274. package/typography/Operations.js +50 -52
  275. package/typography/Paragraph.js +7 -7
  276. package/typography/Typography.js +7 -7
  277. package/typography/useEllipsis.js +105 -106
  278. package/upload/TriggerNode.js +69 -76
  279. package/upload/Upload.js +84 -87
  280. package/upload/Uploader.js +115 -118
  281. package/upload/list/PictureItem.js +61 -71
  282. package/upload/list/TextItem.js +61 -67
  283. package/upload/list/UploadProgress.js +42 -49
  284. package/upload/list/index.js +48 -49
  285. package/upload/request_.js +37 -38
  286. package/upload/util.js +39 -39
  287. package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
  288. package/utils/findScrollParent.js +4 -0
  289. package/utils/index.js +281 -278
  290. package/utils/intersectionObserver.js +4 -0
  291. package/utils/mutationObserver.js +4 -0
  292. package/utils/names.js +12 -0
  293. package/utils/resizeObserver.js +4 -0
  294. package/verification-code/VerificationCode.js +50 -51
  295. package/version/index.js +1 -1
  296. package/virtual-list/VirtualList.js +243 -244
  297. package/virtual-list/util/item.js +3 -4
  298. package/watermark/Watermark.js +27 -31
  299. package/components/common/utils/resizeObserverEffect.js +0 -23
  300. package/types/common/utils/resizeObserverEffect.d.ts +0 -2
  301. package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
  302. package/utils/resizeObserverEffect.js +0 -4
@@ -1,4 +1,4 @@
1
- import { jsx as m, jsxs as R } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as R } from "react/jsx-runtime";
2
2
  import E from "lodash/isPlainObject";
3
3
  import me from "lodash/merge";
4
4
  import { useContext as I, useMemo as ce } from "react";
@@ -11,63 +11,63 @@ import ue from "../year/index.js";
11
11
  import ye from "../../../time-picker/TimePicker.js";
12
12
  import ke from "@unicom-cloud/utils/class-name";
13
13
  import { newArray as V } from "../../../utils/constant.js";
14
- import { getTimeFormat as he, getDayjsValue as we, methods as D } from "../../../components/common/utils/dayjs.js";
15
- import { omit as Pe } from "../../../components/common/utils/omit.js";
16
- import Se from "../../../config-provider/context.js";
17
- const W = 6 * 7, O = (t) => ({
14
+ import { getTimeFormat as Pe, getDayjsValue as he, methods as x } from "../../../components/common/utils/dayjs.js";
15
+ import { omit as we } from "../../../components/common/utils/omit.js";
16
+ import Ce from "../../../config-provider/context.js";
17
+ const W = 6 * 7, v = (t) => ({
18
18
  year: t.year(),
19
19
  month: t.month() + 1,
20
20
  day: t.day(),
21
21
  name: t.date(),
22
22
  time: t
23
- }), Te = (t) => ({
24
- ...O(D.startOf(t, "month")),
23
+ }), Se = (t) => ({
24
+ ...v(x.startOf(t, "month")),
25
25
  days: t.daysInMonth()
26
26
  });
27
- function ve(t, l) {
28
- const { dayStartOfWeek: d, isWeek: f } = t, o = Te(l), r = V(W).map((e, p, u) => ({})), n = o.day - d < 0 ? 7 + (o.day - d) : o.day - d;
29
- r[n] = {
27
+ function ge(t, c) {
28
+ const { dayStartOfWeek: l, isWeek: d } = t, o = Se(c), r = V(W).map((e, f, p) => ({})), a = o.day - l < 0 ? 7 + (o.day - l) : o.day - l;
29
+ r[a] = {
30
30
  ...o
31
31
  };
32
- for (let e = 0; e < n; e++)
33
- r[n - e - 1] = {
34
- ...O(D.subtract(o.time, e + 1, "day")),
32
+ for (let e = 0; e < a; e++)
33
+ r[a - e - 1] = {
34
+ ...v(x.subtract(o.time, e + 1, "day")),
35
35
  isPrev: !0
36
36
  };
37
- for (let e = 0; e < W - n - 1; e++)
38
- r[n + e + 1] = {
39
- ...O(D.add(o.time, e + 1, "day")),
37
+ for (let e = 0; e < W - a - 1; e++)
38
+ r[a + e + 1] = {
39
+ ...v(x.add(o.time, e + 1, "day")),
40
40
  isNext: e >= o.days - 1
41
41
  };
42
- const i = V(6).map((e, p, u) => []);
42
+ const i = V(6).map((e, f, p) => []);
43
43
  for (let e = 0; e < 6; e++)
44
- if (i[e] = r.slice(e * 7, 7 * (e + 1)), f) {
45
- const p = i[e][0].time, u = [...i[e]];
44
+ if (i[e] = r.slice(e * 7, 7 * (e + 1)), d) {
45
+ const f = i[e][0].time, p = [...i[e]];
46
46
  i[e].unshift({
47
- weekRows: u,
48
- weekOfYear: p.week()
47
+ weekRows: p,
48
+ weekOfYear: f.week()
49
49
  });
50
50
  }
51
51
  return i;
52
52
  }
53
53
  function _e(t) {
54
54
  const {
55
- isWeek: l,
56
- popupVisible: d,
57
- format: f,
55
+ isWeek: c,
56
+ popupVisible: l,
57
+ format: d,
58
58
  pageShowDate: o,
59
59
  showTime: r,
60
- style: n,
60
+ style: a,
61
61
  timePickerProps: i,
62
62
  onMouseEnterCell: e,
63
- onMouseLeaveCell: p,
64
- dateRender: u,
65
- disabledDate: P,
66
- disabledTime: k,
67
- value: g,
68
- rangeValues: N,
63
+ onMouseLeaveCell: f,
64
+ dateRender: p,
65
+ disabledDate: h,
66
+ disabledTime: y,
67
+ value: D,
68
+ rangeValues: O,
69
69
  locale: _,
70
- isRangePicker: b,
70
+ isRangePicker: N,
71
71
  onSelect: F,
72
72
  onTimePickerSelect: $,
73
73
  onPrev: B,
@@ -75,112 +75,112 @@ function _e(t) {
75
75
  onSuperPrev: Y,
76
76
  onSuperNext: z,
77
77
  isSameTime: K,
78
- index: L,
79
- getHeaderOperations: S,
80
- setPageShowDate: T,
78
+ index: b,
79
+ getHeaderOperations: w,
80
+ setPageShowDate: C,
81
81
  timeValue: q,
82
82
  hideNotInViewDates: G,
83
83
  icons: J,
84
84
  isTimePanel: Q,
85
- panelMode: c,
86
- setPanelMode: h,
85
+ panelMode: m,
86
+ setPanelMode: k,
87
87
  ...U
88
- } = t, { locale: x, getPrefixCls: a, rtl: X } = I(Se), { utcOffset: Z, timezone: ee, weekStart: j } = I(le), v = me(x.DatePicker, _), w = a == null ? void 0 : a(l ? "panel-week" : "panel-date"), te = ke(w), oe = b ? { rangeValues: N } : { value: g }, A = E(r) && r.format || he(f), M = x.dayjsLocale, re = ce(() => ve(
88
+ } = t, { locale: L, getPrefixCls: S, rtl: X } = I(Ce), { utcOffset: Z, timezone: ee, weekStart: j } = I(le), g = me(L.DatePicker, _), P = S?.(c ? "panel-week" : "panel-date"), te = ke(P), oe = N ? { rangeValues: O } : { value: D }, A = E(r) && r.format || Pe(d), M = L.dayjsLocale, re = ce(() => ge(
89
89
  { ...t, dayStartOfWeek: j },
90
90
  o.locale(M)
91
91
  ), [o.toString(), j, M]);
92
- let C;
93
- b ? C = typeof k == "function" ? k(
94
- N[L],
95
- L === 0 ? "start" : "end"
96
- ) : {} : C = typeof k == "function" ? k(we(g, f)) : {};
92
+ let T;
93
+ N ? T = typeof y == "function" ? y(
94
+ O[b],
95
+ b === 0 ? "start" : "end"
96
+ ) : {} : T = typeof y == "function" ? y(he(D, d)) : {};
97
97
  function ae() {
98
- return /* @__PURE__ */ m(
98
+ return /* @__PURE__ */ s(
99
99
  de,
100
100
  {
101
101
  ...U,
102
102
  ...oe,
103
103
  showWeekList: !0,
104
- isWeek: l,
105
- prefixCls: a == null ? void 0 : a("picker"),
104
+ isWeek: c,
105
+ prefixCls: S?.("picker"),
106
106
  rows: re,
107
- isSameTime: K || ((s, y) => s.isSame(y, "day")),
107
+ isSameTime: K || ((n, u) => n.isSame(u, "day")),
108
108
  onSelectDate: F,
109
109
  onMouseEnterCell: e,
110
- onMouseLeaveCell: p,
111
- dateRender: u,
112
- disabledDate: P,
113
- CALENDAR_LOCALE: v.Calendar,
114
- mode: l ? "week" : "date",
115
- format: f,
110
+ onMouseLeaveCell: f,
111
+ dateRender: p,
112
+ disabledDate: h,
113
+ CALENDAR_LOCALE: g.Calendar,
114
+ mode: c ? "week" : "date",
115
+ format: d,
116
116
  hideNotInViewDates: G
117
117
  }
118
118
  );
119
119
  }
120
- function ne() {
121
- const s = E(r) ? r : {};
122
- return /* @__PURE__ */ R("div", { className: `${w}-time-picker`, children: [
123
- /* @__PURE__ */ m("header", { className: `${w}-time-picker-title`, children: v.selectTime }),
124
- /* @__PURE__ */ m(
120
+ function ie() {
121
+ const n = E(r) ? r : {};
122
+ return /* @__PURE__ */ R("div", { className: `${P}-time-picker`, children: [
123
+ /* @__PURE__ */ s("header", { className: `${P}-time-picker-title`, children: g.selectTime }),
124
+ /* @__PURE__ */ s(
125
125
  ye,
126
126
  {
127
- ...Pe(i, ["disableConfirm"]),
128
- ...s,
129
- ...C,
127
+ ...we(i, ["disableConfirm"]),
128
+ ...n,
129
+ ...T,
130
130
  hideFooter: !0,
131
131
  format: A,
132
132
  valueShow: q.format(A),
133
133
  onSelect: $,
134
- popupVisible: d,
134
+ popupVisible: l,
135
135
  utcOffset: Z,
136
136
  timezone: ee
137
137
  }
138
138
  )
139
139
  ] });
140
140
  }
141
- const ie = {
141
+ const ne = {
142
142
  onPrev: B,
143
143
  onSuperPrev: Y,
144
144
  onNext: H,
145
145
  onSuperNext: z,
146
- DATEPICKER_LOCALE: v
146
+ DATEPICKER_LOCALE: g
147
147
  };
148
- function se(s) {
149
- h(s);
148
+ function se(n) {
149
+ k(n);
150
150
  }
151
- return c === "year" ? /* @__PURE__ */ m(
151
+ return m === "year" ? /* @__PURE__ */ s(
152
152
  ue,
153
153
  {
154
- ...S(c),
154
+ ...w(m),
155
155
  pageShowDate: o,
156
- onSelect: (s, y) => {
157
- h("month"), T(y);
156
+ onSelect: (n, u) => {
157
+ k("month"), C(u);
158
158
  },
159
- disabledDate: P
159
+ disabledDate: h
160
160
  }
161
- ) : c === "month" ? /* @__PURE__ */ m(
161
+ ) : m === "month" ? /* @__PURE__ */ s(
162
162
  pe,
163
163
  {
164
- ...S(c),
165
- setPageShowDate: T,
164
+ ...w(m),
165
+ setPageShowDate: C,
166
166
  pageShowDate: o,
167
- panelMode: c,
168
- getHeaderOperations: S,
169
- onSelect: (s, y) => {
170
- h("date"), T(y);
167
+ panelMode: m,
168
+ getHeaderOperations: w,
169
+ onSelect: (n, u) => {
170
+ k("date"), C(u);
171
171
  },
172
- disabledDate: P,
173
- setPanelMode: h
172
+ disabledDate: h,
173
+ setPanelMode: k
174
174
  }
175
- ) : /* @__PURE__ */ m("div", { className: te, style: n, children: r && Q ? ne() : /* @__PURE__ */ R("div", { className: `${w}-inner`, children: [
176
- /* @__PURE__ */ m(
175
+ ) : /* @__PURE__ */ s("div", { className: te, style: a, children: r && Q ? ie() : /* @__PURE__ */ R("div", { className: `${P}-inner`, children: [
176
+ /* @__PURE__ */ s(
177
177
  fe,
178
178
  {
179
- ...ie,
179
+ ...ne,
180
180
  icons: J,
181
- prefixCls: a == null ? void 0 : a("picker"),
181
+ prefixCls: S?.("picker"),
182
182
  value: o,
183
- mode: c,
183
+ mode: m,
184
184
  onChangePanel: se,
185
185
  rtl: X
186
186
  }
@@ -1,4 +1,4 @@
1
- import { jsx as s, jsxs as _ } from "react/jsx-runtime";
1
+ import { jsx as m, jsxs as _ } from "react/jsx-runtime";
2
2
  import $ from "lodash/merge";
3
3
  import { useContext as B, useMemo as F } from "react";
4
4
  import "../../../config-provider/ConfigProvider.js";
@@ -9,30 +9,30 @@ import V from "@unicom-cloud/utils/class-name";
9
9
  import { dayjs as q } from "../../../components/common/utils/dayjs.js";
10
10
  import { padStart as z } from "../../../components/common/utils/pad.js";
11
11
  import Q from "../../../config-provider/context.js";
12
- function se(u) {
12
+ function me(u) {
13
13
  const {
14
- pageShowDate: n,
15
- style: d,
16
- onMouseEnterCell: f,
14
+ pageShowDate: t,
15
+ style: f,
16
+ onMouseEnterCell: d,
17
17
  onMouseLeaveCell: h,
18
- dateRender: S,
19
- disabledDate: c,
20
- value: y,
21
- locale: M,
22
- isRangePicker: C,
23
- onSelect: b,
24
- rangeValues: A,
25
- onSuperPrev: D,
26
- onSuperNext: L,
27
- format: N,
28
- getHeaderOperations: O,
29
- setPageShowDate: k,
30
- icons: v,
31
- panelMode: a,
32
- setPanelMode: i,
33
- ...E
34
- } = u, { locale: Y, getPrefixCls: e, rtl: g } = B(Q), l = $(Y.DatePicker, M), m = l.Calendar, P = e == null ? void 0 : e("panel-month"), w = V(P), x = C ? { rangeValues: A } : { value: y }, p = n.year(), R = F(() => {
35
- const r = [
18
+ dateRender: C,
19
+ disabledDate: i,
20
+ value: S,
21
+ locale: g,
22
+ isRangePicker: y,
23
+ onSelect: M,
24
+ rangeValues: P,
25
+ onSuperPrev: x,
26
+ onSuperNext: b,
27
+ format: A,
28
+ getHeaderOperations: D,
29
+ setPageShowDate: L,
30
+ icons: N,
31
+ panelMode: n,
32
+ setPanelMode: l,
33
+ ...O
34
+ } = u, { locale: k, getPrefixCls: a, rtl: v } = B(Q), c = $(k.DatePicker, g), s = c.Calendar, E = a?.("panel-month"), Y = V(E), w = y ? { rangeValues: P } : { value: S }, p = t.year(), R = F(() => {
35
+ const o = [
36
36
  "January",
37
37
  "February",
38
38
  "March",
@@ -45,68 +45,68 @@ function se(u) {
45
45
  "October",
46
46
  "November",
47
47
  "December"
48
- ].map((o, T) => ({
49
- name: m.month.short[o],
48
+ ].map((e, T) => ({
49
+ name: s.month.short[e],
50
50
  time: q(
51
51
  `${p}-${z(T + 1, 2, "0")}`,
52
52
  "YYYY-MM"
53
53
  ).endOf("month")
54
- })), t = Array(4);
55
- for (let o = 0; o < 4; o++)
56
- t[o] = r.slice(o * 3, 3 * (o + 1));
57
- return t;
58
- }, [p, m]);
54
+ })), r = Array(4);
55
+ for (let e = 0; e < 4; e++)
56
+ r[e] = o.slice(e * 3, 3 * (e + 1));
57
+ return r;
58
+ }, [p, s]);
59
59
  function j() {
60
- return /* @__PURE__ */ s(
60
+ return /* @__PURE__ */ m(
61
61
  G,
62
62
  {
63
- ...E,
64
- ...x,
65
- prefixCls: e == null ? void 0 : e("picker"),
63
+ ...O,
64
+ ...w,
65
+ prefixCls: a?.("picker"),
66
66
  rows: R,
67
- onSelectDate: b,
68
- isSameTime: (r, t) => r.isSame(t, "month"),
69
- onMouseEnterCell: f,
67
+ onSelectDate: M,
68
+ isSameTime: (o, r) => o.isSame(r, "month"),
69
+ onMouseEnterCell: d,
70
70
  onMouseLeaveCell: h,
71
- dateRender: S,
72
- disabledDate: c,
73
- CALENDAR_LOCALE: m,
71
+ dateRender: C,
72
+ disabledDate: i,
73
+ CALENDAR_LOCALE: s,
74
74
  mode: "month",
75
- format: N
75
+ format: A
76
76
  }
77
77
  );
78
78
  }
79
- const H = { onSuperPrev: D, onSuperNext: L };
80
- function J(r) {
81
- i(r);
79
+ const H = { onSuperPrev: x, onSuperNext: b };
80
+ function J(o) {
81
+ l(o);
82
82
  }
83
- return a === "year" ? /* @__PURE__ */ s(
83
+ return n === "year" ? /* @__PURE__ */ m(
84
84
  K,
85
85
  {
86
- ...O(a),
87
- pageShowDate: n,
88
- onSelect: (r, t) => {
89
- i("month"), k(t);
86
+ ...D(n),
87
+ pageShowDate: t,
88
+ onSelect: (o, r) => {
89
+ l("month"), L(r);
90
90
  },
91
- disabledDate: c
91
+ disabledDate: i
92
92
  }
93
- ) : /* @__PURE__ */ _("div", { className: w, style: d, children: [
94
- /* @__PURE__ */ s(
93
+ ) : /* @__PURE__ */ _("div", { className: Y, style: f, children: [
94
+ /* @__PURE__ */ m(
95
95
  I,
96
96
  {
97
97
  ...H,
98
- DATEPICKER_LOCALE: l,
99
- icons: v,
100
- prefixCls: e == null ? void 0 : e("picker"),
101
- value: n,
102
- mode: a,
98
+ DATEPICKER_LOCALE: c,
99
+ icons: N,
100
+ prefixCls: a?.("picker"),
101
+ value: t,
102
+ mode: n,
103
103
  onChangePanel: J,
104
- rtl: g
104
+ rtl: v
105
105
  }
106
106
  ),
107
107
  j()
108
108
  ] });
109
109
  }
110
110
  export {
111
- se as default
111
+ me as default
112
112
  };
@@ -1,97 +1,94 @@
1
- import { jsx as a, jsxs as H } from "react/jsx-runtime";
2
- import Q from "lodash/merge";
3
- import { useContext as T } from "react";
1
+ import { jsx as o, jsxs as _ } from "react/jsx-runtime";
2
+ import H from "lodash/merge";
3
+ import { useContext as Q } from "react";
4
4
  import "../../../config-provider/ConfigProvider.js";
5
- import Y from "../Body.js";
6
- import B from "../Header.js";
7
- import I from "../year/index.js";
8
- import K from "@unicom-cloud/utils/class-name";
9
- import { dayjs as V } from "../../../components/common/utils/dayjs.js";
10
- import { padStart as z } from "../../../components/common/utils/pad.js";
11
- import F from "../../../config-provider/context.js";
12
- function se(d) {
5
+ import T from "../Body.js";
6
+ import Y from "../Header.js";
7
+ import B from "../year/index.js";
8
+ import I from "@unicom-cloud/utils/class-name";
9
+ import { dayjs as K } from "../../../components/common/utils/dayjs.js";
10
+ import { padStart as V } from "../../../components/common/utils/pad.js";
11
+ import z from "../../../config-provider/context.js";
12
+ function ne(p) {
13
13
  const {
14
14
  pageShowDate: t,
15
- style: u,
15
+ style: d,
16
16
  onMouseEnterCell: f,
17
- onMouseLeaveCell: C,
18
- dateRender: S,
17
+ onMouseLeaveCell: u,
18
+ dateRender: C,
19
19
  disabledDate: s,
20
- value: h,
21
- locale: D,
22
- isRangePicker: L,
23
- onSelect: k,
24
- rangeValues: v,
25
- onSuperPrev: y,
26
- onSuperNext: E,
27
- format: N,
28
- getHeaderOperations: w,
29
- setPageShowDate: A,
30
- icons: P,
31
- panelMode: n,
32
- setPanelMode: m,
33
- ...$
34
- } = d, { locale: g, getPrefixCls: e, rtl: x } = T(F), i = Q(g.DatePicker, D), c = i.Calendar, l = e == null ? void 0 : e("panel-quarter"), M = K(l), O = L ? { rangeValues: v } : { value: h }, R = t.year(), b = [
35
- [1, 2, 3, 4].map((r, o, G) => {
36
- var p;
37
- return {
38
- name: ((p = c.quarter) == null ? void 0 : p[`q${r}`]) || `Q${r}`,
39
- // 潘启宝修改 2024年12月23日 星期一 15时21分14秒 CST
40
- time: V(`${R}-${z((r - 1) * 3 + 1, 2, "0")}-01`)
41
- };
42
- })
20
+ value: P,
21
+ locale: g,
22
+ isRangePicker: x,
23
+ onSelect: S,
24
+ rangeValues: h,
25
+ onSuperPrev: D,
26
+ onSuperNext: L,
27
+ format: k,
28
+ getHeaderOperations: v,
29
+ setPageShowDate: y,
30
+ icons: E,
31
+ panelMode: a,
32
+ setPanelMode: i,
33
+ ...N
34
+ } = p, { locale: w, getPrefixCls: n, rtl: A } = Q(z), l = H(w.DatePicker, g), m = l.Calendar, c = n?.("panel-quarter"), $ = I(c), M = x ? { rangeValues: h } : { value: P }, O = t.year(), R = [
35
+ [1, 2, 3, 4].map((e, r, F) => ({
36
+ name: m.quarter?.[`q${e}`] || `Q${e}`,
37
+ // 潘启宝修改 2024年12月23日 星期一 15时21分14秒 CST
38
+ time: K(`${O}-${V((e - 1) * 3 + 1, 2, "0")}-01`)
39
+ }))
43
40
  ];
44
- function j() {
45
- return /* @__PURE__ */ a(
46
- Y,
41
+ function b() {
42
+ return /* @__PURE__ */ o(
43
+ T,
47
44
  {
48
- ...$,
49
- ...O,
50
- prefixCls: e == null ? void 0 : e("picker"),
51
- rows: b,
52
- onSelectDate: k,
53
- isSameTime: (r, o) => r.isSame(o, "month"),
45
+ ...N,
46
+ ...M,
47
+ prefixCls: n?.("picker"),
48
+ rows: R,
49
+ onSelectDate: S,
50
+ isSameTime: (e, r) => e.isSame(r, "month"),
54
51
  onMouseEnterCell: f,
55
- onMouseLeaveCell: C,
56
- dateRender: S,
52
+ onMouseLeaveCell: u,
53
+ dateRender: C,
57
54
  disabledDate: s,
58
- CALENDAR_LOCALE: c,
55
+ CALENDAR_LOCALE: m,
59
56
  mode: "quarter",
60
- format: N
57
+ format: k
61
58
  }
62
59
  );
63
60
  }
64
- const q = { onSuperPrev: y, onSuperNext: E };
65
- function _(r) {
66
- m(r);
61
+ const j = { onSuperPrev: D, onSuperNext: L };
62
+ function q(e) {
63
+ i(e);
67
64
  }
68
- return n === "year" ? /* @__PURE__ */ a(
69
- I,
65
+ return a === "year" ? /* @__PURE__ */ o(
66
+ B,
70
67
  {
71
- ...w(n),
68
+ ...v(a),
72
69
  pageShowDate: t,
73
- onSelect: (r, o) => {
74
- m("quarter"), A(o);
70
+ onSelect: (e, r) => {
71
+ i("quarter"), y(r);
75
72
  },
76
73
  disabledDate: s
77
74
  }
78
- ) : /* @__PURE__ */ H("div", { className: M, style: u, children: [
79
- /* @__PURE__ */ a(
80
- B,
75
+ ) : /* @__PURE__ */ _("div", { className: $, style: d, children: [
76
+ /* @__PURE__ */ o(
77
+ Y,
81
78
  {
82
- ...q,
83
- icons: P,
84
- prefixCls: e == null ? void 0 : e("picker"),
79
+ ...j,
80
+ icons: E,
81
+ prefixCls: n?.("picker"),
85
82
  value: t,
86
- mode: n,
87
- onChangePanel: _,
88
- DATEPICKER_LOCALE: i,
89
- rtl: x
83
+ mode: a,
84
+ onChangePanel: q,
85
+ DATEPICKER_LOCALE: l,
86
+ rtl: A
90
87
  }
91
88
  ),
92
- /* @__PURE__ */ a("div", { className: `${l}-wrapper`, children: j() })
89
+ /* @__PURE__ */ o("div", { className: `${c}-wrapper`, children: b() })
93
90
  ] });
94
91
  }
95
92
  export {
96
- se as default
93
+ ne as default
97
94
  };