@unicom-cloud/ui 0.8.81 → 0.8.83

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 (280) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +2 -2
  4. package/BackTop.js +2 -2
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +2 -2
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +2 -2
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +5 -4
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +7 -7
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +1 -1
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/Input.js +11 -10
  28. package/InputNumber.js +1 -1
  29. package/Layout.js +1 -1
  30. package/Link.js +1 -1
  31. package/List.js +2 -2
  32. package/Mentions.js +2 -2
  33. package/Menu.js +1 -1
  34. package/Message.js +1 -1
  35. package/Modal.js +1 -1
  36. package/Notice.js +1 -1
  37. package/Notification.js +5 -5
  38. package/OverflowEllipsis.js +1 -1
  39. package/PageHeader.js +1 -1
  40. package/Pagination.js +1 -1
  41. package/Popconfirm.js +1 -1
  42. package/Popover.js +1 -1
  43. package/Progress.js +1 -1
  44. package/Radio.js +1 -1
  45. package/Rate.js +1 -1
  46. package/ResizeBox.js +1 -1
  47. package/Result.js +1 -1
  48. package/Select.js +1 -1
  49. package/Skeleton.js +1 -1
  50. package/Slider.js +1 -1
  51. package/Space.js +1 -1
  52. package/SpeechSynthesis.js +1 -1
  53. package/Spin.js +1 -1
  54. package/Statistic.js +2 -2
  55. package/Steps.js +1 -1
  56. package/Switch.js +1 -1
  57. package/Table.js +1 -1
  58. package/Tabs.js +1 -1
  59. package/Tag.js +1 -1
  60. package/Tooltip.js +1 -1
  61. package/Transfer.js +2 -2
  62. package/Tree.js +1 -1
  63. package/TreeSelect.js +1 -1
  64. package/Trigger.js +1 -1
  65. package/Typography.js +1 -1
  66. package/affix/index.js +60 -57
  67. package/alert/index.js +53 -53
  68. package/anchor/Anchor.js +72 -72
  69. package/anchor/Link.js +27 -27
  70. package/anchor/util.js +1 -1
  71. package/auto-complete/index.js +2 -2
  72. package/avatar/Avatar.js +31 -31
  73. package/avatar/Group.js +25 -25
  74. package/back-top/index.js +30 -30
  75. package/badge/index.js +37 -37
  76. package/breadcrumb/index.js +26 -26
  77. package/button/Group.js +7 -7
  78. package/button/index.js +29 -29
  79. package/calendar/index.js +2 -2
  80. package/card/Grid.js +12 -12
  81. package/card/Meta.js +17 -17
  82. package/card/index.js +44 -44
  83. package/carousel/Arrow.js +19 -19
  84. package/carousel/Indicator.js +25 -25
  85. package/carousel/index.js +77 -77
  86. package/cascader/Cascader.js +2 -2
  87. package/cascader/index.js +1 -1
  88. package/cascader/util.js +1 -1
  89. package/checkbox/Checkbox.js +2 -2
  90. package/checkbox/Group.js +2 -2
  91. package/checkbox/GroupBlock.js +2 -2
  92. package/checkbox/index.js +2 -2
  93. package/chunk/B6r8jPCd.js +6 -0
  94. package/chunk/{DLBfXSnU.js → BmulTYLW.js} +2880 -2878
  95. package/chunk/C9oo3EJI.js +692 -0
  96. package/chunk/{C5X4hOkx.js → CVSWh4ZZ.js} +80 -80
  97. package/chunk/DILUZgXW.js +1464 -0
  98. package/chunk/DSRHFFrc.js +53 -0
  99. package/chunk/{yLRv5RIK.js → DdJVL_4g.js} +181 -181
  100. package/chunk/{DYspELhF.js → DlHiTTJO.js} +223 -223
  101. package/chunk/{BG7YGUsx.js → R-uQJib2.js} +119 -119
  102. package/chunk/{DEiyXzBZ.js → ev6oHWqY.js} +63 -63
  103. package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
  104. package/collapse/Collapse.js +2 -2
  105. package/collapse/Item.js +2 -2
  106. package/collapse/index.js +1 -1
  107. package/color-picker/ControlBar.js +36 -36
  108. package/color-picker/InputAlpha.js +11 -11
  109. package/color-picker/InputHex.js +24 -24
  110. package/color-picker/InputRgb.js +23 -23
  111. package/color-picker/Palette.js +18 -18
  112. package/color-picker/Panel.js +2 -2
  113. package/color-picker/index.js +2 -2
  114. package/comment/index.js +31 -31
  115. package/config-provider/ConfigProvider.js +5 -3
  116. package/config-provider/context.js +2 -2
  117. package/config-provider/index.js +4 -3
  118. package/copy/index.js +28 -28
  119. package/date-picker/Picker.js +276 -276
  120. package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
  121. package/date-picker/index.js +26 -27
  122. package/descriptions/index.js +33 -33
  123. package/divider/index.js +12 -12
  124. package/draggable/index.js +23 -23
  125. package/drawer/Drawer.js +81 -81
  126. package/dropdown/Button.js +1 -1
  127. package/dropdown/index.js +56 -56
  128. package/empty/index.js +1 -1
  129. package/form/Form.js +76 -76
  130. package/form/FormItem.js +64 -64
  131. package/form/context.js +1 -1
  132. package/grid/Col.js +53 -53
  133. package/grid/Row.js +34 -34
  134. package/grid/grid-item.js +29 -29
  135. package/grid/grid.js +50 -50
  136. package/icon/index.js +20 -19
  137. package/icon-hover/index.js +1 -1
  138. package/image/Image.js +86 -86
  139. package/image/ImagePreview.js +2 -2
  140. package/image/ImagePreviewArrow.js +22 -22
  141. package/image/ImagePreviewGroup.js +1 -1
  142. package/image/index.js +1 -1
  143. package/index.js +498 -493
  144. package/input/Button.js +11 -0
  145. package/input/Group.js +8 -8
  146. package/input/Input.js +488 -434
  147. package/input/InputElement.js +1 -1
  148. package/input/Password.js +1 -1
  149. package/input/Search.js +1 -1
  150. package/input/Textarea.js +1 -1
  151. package/input/index.js +9 -8
  152. package/input-number/index.js +1 -1
  153. package/input-tag/InputTag.js +40 -40
  154. package/layout/Content.js +7 -7
  155. package/layout/Footer.js +9 -9
  156. package/layout/Header.js +7 -7
  157. package/layout/Sider.js +55 -55
  158. package/layout/index.js +32 -32
  159. package/link/index.js +35 -35
  160. package/list/Item.js +29 -29
  161. package/list/Meta.js +12 -12
  162. package/list/index.js +2 -2
  163. package/mentions/index.js +2 -2
  164. package/menu/Menu.js +2 -2
  165. package/menu/OverflowWrap.js +1 -1
  166. package/menu/index.js +2 -2
  167. package/message/index.js +1 -1
  168. package/message/useMessage.js +1 -1
  169. package/modal/Confirm.js +2 -2
  170. package/modal/Modal.js +2 -2
  171. package/modal/index.js +1 -1
  172. package/notice/index.js +1 -1
  173. package/notification/index.js +5 -5
  174. package/notification/useNotification.js +1 -1
  175. package/overflow-ellipsis/OverflowItem.js +12 -12
  176. package/overflow-ellipsis/index.js +24 -24
  177. package/package.json +1 -1
  178. package/page-header/index.js +38 -38
  179. package/pagination/PageItem.js +16 -16
  180. package/pagination/PageJumper.js +1 -1
  181. package/pagination/PageOption.js +2 -2
  182. package/pagination/Pagination.js +2 -2
  183. package/pagination/index.js +1 -1
  184. package/picker/Input.js +69 -69
  185. package/picker/InputRange.js +111 -111
  186. package/popconfirm/index.js +61 -61
  187. package/popover/index.js +35 -35
  188. package/progress/index.js +22 -22
  189. package/radio/Group.js +2 -2
  190. package/radio/GroupBlock.js +2 -2
  191. package/radio/Radio.js +2 -2
  192. package/radio/index.js +2 -2
  193. package/rate/index.js +49 -49
  194. package/resize-box/ResizeTrigger.js +34 -34
  195. package/resize-box/Split.js +56 -56
  196. package/resize-box/SplitGroup.js +55 -55
  197. package/resize-box/index.js +51 -51
  198. package/result/index.js +41 -41
  199. package/select/Option.js +1 -1
  200. package/select/Select.js +2 -2
  201. package/select/index.js +2 -2
  202. package/select/util.js +1 -1
  203. package/select-view/Core.js +125 -125
  204. package/skeleton/index.js +20 -20
  205. package/slider/Button.js +57 -57
  206. package/slider/index.js +116 -116
  207. package/space/index.js +46 -44
  208. package/speech-synthesis/index.js +1 -1
  209. package/spin/DotLoading.js +10 -10
  210. package/spin/index.js +44 -44
  211. package/statistic/Countdown.js +34 -34
  212. package/statistic/index.js +67 -67
  213. package/steps/index.js +55 -55
  214. package/style.css +1 -1
  215. package/switch/index.js +54 -54
  216. package/table/Table.js +3 -3
  217. package/table/index.js +1 -1
  218. package/tabs/Tab.js +2 -2
  219. package/tabs/TabContent.js +2 -2
  220. package/tabs/TabPane.js +12 -12
  221. package/tabs/index.js +2 -2
  222. package/tag/index.js +45 -45
  223. package/time-picker/Picker.js +76 -76
  224. package/time-picker/TimePicker.js +136 -136
  225. package/time-picker/index.js +8 -8
  226. package/time-picker/util.js +5 -5
  227. package/timeline/Item.js +47 -47
  228. package/timeline/Timeline.js +41 -41
  229. package/tooltip/index.js +29 -29
  230. package/transfer/Item.js +2 -2
  231. package/transfer/List.js +2 -2
  232. package/transfer/index.js +2 -2
  233. package/tree/Animation.js +2 -2
  234. package/tree/Node.js +2 -2
  235. package/tree/NodeList.js +1 -1
  236. package/tree/Tree.js +2 -2
  237. package/tree/index.js +1 -1
  238. package/tree-select/List.js +1 -1
  239. package/tree-select/Select.js +2 -2
  240. package/tree-select/index.js +2 -2
  241. package/trigger/index.js +60 -60
  242. package/types/config-provider/ConfigProvider.d.ts +2 -2
  243. package/types/config-provider/context.d.ts +1 -1
  244. package/types/date-picker/index.d.ts +8 -9
  245. package/types/date-picker/interface.d.ts +9 -9
  246. package/types/index.d.ts +2 -2
  247. package/types/input/Button.d.ts +5 -0
  248. package/types/input/Input.d.ts +4 -1
  249. package/types/input/interface.d.ts +7 -0
  250. package/types/picker/Input.d.ts +2 -2
  251. package/types/space/index.d.ts +2 -1
  252. package/types/utils/index.d.ts +1 -0
  253. package/types/utils/names.d.ts +1 -1
  254. package/types/utils/setTheme.d.ts +2 -0
  255. package/typography/Base.js +53 -53
  256. package/typography/Ellipsis.js +10 -8
  257. package/typography/Operations.js +28 -28
  258. package/typography/Paragraph.js +8 -8
  259. package/typography/Typography.js +7 -7
  260. package/typography/index.js +1 -1
  261. package/upload/TriggerNode.js +47 -47
  262. package/upload/Upload.js +184 -184
  263. package/upload/request.js +1 -1
  264. package/upload/request_.js +1 -1
  265. package/utils/constant.js +1 -1
  266. package/utils/contextHolder.js +3 -3
  267. package/utils/dom.js +1 -1
  268. package/utils/index.js +116 -114
  269. package/utils/names.js +1 -1
  270. package/utils/setDarkTheme.js +23 -22
  271. package/utils/setPrimaryColor.js +22 -16
  272. package/utils/setTheme.js +9 -0
  273. package/utils/tween.js +1 -1
  274. package/verification-code/VerificationCode.js +49 -49
  275. package/version/index.js +1 -1
  276. package/watermark/Watermark.js +24 -24
  277. package/chunk/CQvM33Vg.js +0 -724
  278. package/chunk/D0ZWT7db.js +0 -5
  279. package/chunk/yhU2zeeu.js +0 -1461
  280. /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
@@ -1,24 +1,24 @@
1
- import { jsx as P } from "react/jsx-runtime";
1
+ import { jsx as h } from "react/jsx-runtime";
2
2
  import De from "@unicom-cloud/icons/IconUiClockCircle";
3
3
  import { isDayjs as Se } from "dayjs";
4
4
  import l from "lodash/isArray";
5
5
  import Te, { useContext as je, useState as I, useRef as we } from "react";
6
- import { a as Ae } from "../chunk/CQvM33Vg.js";
6
+ import { a as Ae } from "../chunk/C9oo3EJI.js";
7
7
  import { u as Ee } from "../chunk/BFTV6myl.js";
8
- import { u as Y } from "../chunk/VSe_Wq1g.js";
8
+ import { u as Z } from "../chunk/VSe_Wq1g.js";
9
9
  import { u as He } from "../chunk/a3hR6zLw.js";
10
10
  import Ne from "../picker/Input.js";
11
11
  import ze from "../picker/InputRange.js";
12
12
  import Oe from "../trigger/index.js";
13
13
  import Fe from "@unicom-cloud/utils/class-name";
14
- import { g as S, j as f, k as Z, h as z, b as Re, i as Ue, f as $e } from "../chunk/tamGhTJp.js";
14
+ import { g as S, j as f, k as _, h as O, b as Re, i as Ue, f as $e } from "../chunk/tamGhTJp.js";
15
15
  import { a as Le } from "../chunk/ClqoGc3r.js";
16
16
  import Me from "./context.js";
17
17
  import { getFormatTime as qe } from "./util.js";
18
18
  function Be(T) {
19
19
  return T.format || "HH:mm:ss";
20
20
  }
21
- const _ = {
21
+ const ee = {
22
22
  allowClear: !0,
23
23
  position: "bl",
24
24
  format: "HH:mm:ss",
@@ -26,68 +26,68 @@ const _ = {
26
26
  order: !0,
27
27
  scrollSticky: !0
28
28
  }, Ge = { bottom: 4 }, lo = (T) => {
29
- var K, Q;
30
- const { locale: p, getPrefixCls: ee, componentConfig: j, rtl: oe } = je(Ae);
31
- oe && (_.position = "br");
29
+ var Q, W;
30
+ const { locale: p, getPrefixCls: j, componentConfig: w, rtl: oe } = je(Ae);
31
+ oe && (ee.position = "br");
32
32
  const t = Ee(
33
33
  T,
34
- _,
35
- j == null ? void 0 : j.TimePicker
34
+ ee,
35
+ w == null ? void 0 : w.TimePicker
36
36
  ), {
37
37
  allowClear: te = !0,
38
- className: O,
38
+ className: F,
39
39
  disableConfirm: ie,
40
- style: F,
41
- placeholder: w,
40
+ style: R,
41
+ placeholder: A,
42
42
  getPopupContainer: re,
43
- disabled: R,
43
+ disabled: U,
44
44
  position: ne,
45
45
  isRangePicker: m,
46
46
  picker: se,
47
47
  error: ae,
48
48
  status: ue,
49
- triggerElement: U,
49
+ triggerElement: $,
50
50
  triggerProps: le,
51
51
  value: ce,
52
52
  onChange: u,
53
- icons: $,
53
+ icons: L,
54
54
  size: fe,
55
55
  editable: pe,
56
56
  unmountOnExit: me,
57
57
  order: de,
58
58
  utcOffset: r,
59
59
  timezone: n
60
- } = t, s = Be(t), ge = ee("timepicker");
60
+ } = t, s = Be(t), ge = j == null ? void 0 : j("timepicker");
61
61
  function Ve() {
62
62
  let e;
63
63
  return t.value ? e = S(t.value, s, r, n) : t.defaultValue && (e = S(t.defaultValue, s, r, n)), e;
64
64
  }
65
- const [L, M] = I(!1), [d, q] = I(Ve()), [i, h] = I(), [v, g] = I(), [x, Pe] = I(0), c = "value" in t ? S(ce, s, r, n) : d, A = "popupVisible" in t ? t.popupVisible : L, y = Y(r), b = Y(n);
65
+ const [M, q] = I(!1), [d, B] = I(Ve()), [i, P] = I(), [v, g] = I(), [y, he] = I(0), c = "value" in t ? S(ce, s, r, n) : d, E = "popupVisible" in t ? t.popupVisible : M, b = Z(r), x = Z(n);
66
66
  He(() => {
67
- if (d && (y !== r || n !== b)) {
68
- const e = l(d) ? d.map((a) => f(a, y, b)) : f(d, y, b), o = l(e) ? e.map((a) => Z(a, r, n)) : Z(e, r, n);
69
- q(o);
67
+ if (d && (b !== r || n !== x)) {
68
+ const e = l(d) ? d.map((a) => f(a, b, x)) : f(d, b, x), o = l(e) ? e.map((a) => _(a, r, n)) : _(e, r, n);
69
+ B(o);
70
70
  }
71
- }, [r, y, n, b]);
72
- const E = we(null);
73
- function H(e) {
71
+ }, [r, b, n, x]);
72
+ const H = we(null);
73
+ function N(e) {
74
74
  var o, a;
75
- (a = (o = E.current) == null ? void 0 : o.focus) == null || a.call(o, e);
75
+ (a = (o = H.current) == null ? void 0 : o.focus) == null || a.call(o, e);
76
76
  }
77
- function N(e) {
78
- Pe(e), setTimeout(() => H(e));
77
+ function z(e) {
78
+ he(e), setTimeout(() => N(e));
79
79
  }
80
- function he(e) {
80
+ function Pe(e) {
81
81
  e ? C(e, () => {
82
- setTimeout(() => H());
82
+ setTimeout(() => N());
83
83
  }) : C(!1);
84
84
  }
85
85
  function C(e, o) {
86
- M(e), g(void 0), o == null || o(), e || h(void 0);
86
+ q(e), g(void 0), o == null || o(), e || P(void 0);
87
87
  }
88
88
  function k(e) {
89
89
  const o = m && de && l(e) ? Re(e.map((a) => qe(a))) : e;
90
- q(o), h(void 0), g(void 0), ve(o), ie || C(!1);
90
+ B(o), P(void 0), g(void 0), ve(o), ie || C(!1);
91
91
  }
92
92
  function ve(e) {
93
93
  l(e) && Ue(c, e) && (u == null || u(
@@ -98,117 +98,117 @@ const _ = {
98
98
  f(e, r, n)
99
99
  ));
100
100
  }
101
- function B(e) {
101
+ function G(e) {
102
102
  const o = m ? l(i) && i.length ? i : c : i || c;
103
- return /* @__PURE__ */ P(
103
+ return /* @__PURE__ */ h(
104
104
  "div",
105
105
  {
106
- className: Fe(`${ge}-container`, e ? O : ""),
107
- style: e ? F : {},
108
- onClick: () => H(),
106
+ className: Fe(`${ge}-container`, e ? F : ""),
107
+ style: e ? R : {},
108
+ onClick: () => N(),
109
109
  children: Te.cloneElement(se, {
110
110
  ...t,
111
111
  format: s,
112
112
  inputValue: v,
113
113
  setInputValue: g,
114
114
  onConfirmValue: k,
115
- setValueShow: h,
115
+ setValueShow: P,
116
116
  valueShow: o,
117
117
  value: c,
118
- popupVisible: A,
119
- focusedInputIndex: x,
120
- changeFocusedInputIndex: N
118
+ popupVisible: E,
119
+ focusedInputIndex: y,
120
+ changeFocusedInputIndex: z
121
121
  })
122
122
  }
123
123
  );
124
124
  }
125
- function G(e) {
125
+ function J(e) {
126
126
  const o = e.target.value;
127
- L || M(!0), g(o), Ce(o);
127
+ M || q(!0), g(o), Ce(o);
128
128
  }
129
129
  function Ce(e) {
130
- var a, W;
130
+ var a, X;
131
131
  const o = S(e, s);
132
132
  if (m) {
133
133
  const V = [
134
134
  ...l(i) ? i : d || []
135
135
  ];
136
- if (z(e, s)) {
137
- V[x] = o;
138
- const X = V.map(
136
+ if (O(e, s)) {
137
+ V[y] = o;
138
+ const Y = V.map(
139
139
  (D) => f(D, r, n)
140
140
  );
141
141
  (a = t.onSelect) == null || a.call(
142
142
  t,
143
- X.map((D) => D && D.format(s)),
144
- X
145
- ), h(V), g(void 0);
143
+ Y.map((D) => D && D.format(s)),
144
+ Y
145
+ ), P(V), g(void 0);
146
146
  }
147
- } else if (z(e, s)) {
147
+ } else if (O(e, s)) {
148
148
  const V = f(o, r, n);
149
- (W = t.onSelect) == null || W.call(t, V.format(s), V), h(o), g(void 0);
149
+ (X = t.onSelect) == null || X.call(t, V.format(s), V), P(o), g(void 0);
150
150
  }
151
151
  }
152
152
  function Ie() {
153
- m ? l(i) && i.length ? v && !z(v, s) ? C(!1) : i[0] === void 0 || i[1] === void 0 ? N(x === 0 ? 1 : 0) : i.length === 2 && k(i) : C(!1) : k(i || c);
153
+ m ? l(i) && i.length ? v && !O(v, s) ? C(!1) : i[0] === void 0 || i[1] === void 0 ? z(y === 0 ? 1 : 0) : i.length === 2 && k(i) : C(!1) : k(i || c);
154
154
  }
155
- function xe(e) {
155
+ function ye(e) {
156
156
  var o;
157
157
  e.stopPropagation(), k(void 0), u == null || u(void 0, void 0), (o = t.onClear) == null || o.call(t);
158
158
  }
159
- const ye = m && l(w) ? w : (K = p == null ? void 0 : p.TimePicker) == null ? void 0 : K.placeholders, be = w || ((Q = p == null ? void 0 : p.TimePicker) == null ? void 0 : Q.placeholder), ke = $ && $.inputSuffix || /* @__PURE__ */ P(De, {}), J = {
160
- style: F,
161
- className: O,
162
- popupVisible: A,
159
+ const be = m && l(A) ? A : (Q = p == null ? void 0 : p.TimePicker) == null ? void 0 : Q.placeholders, xe = A || ((W = p == null ? void 0 : p.TimePicker) == null ? void 0 : W.placeholder), ke = L && L.inputSuffix || /* @__PURE__ */ h(De, {}), K = {
160
+ style: R,
161
+ className: F,
162
+ popupVisible: E,
163
163
  format: s,
164
- disabled: R,
164
+ disabled: U,
165
165
  error: ae,
166
166
  status: ue,
167
167
  size: fe,
168
168
  onPressEnter: Ie,
169
- onClear: xe,
169
+ onClear: ye,
170
170
  suffixIcon: ke,
171
171
  editable: pe,
172
172
  allowClear: te,
173
173
  prefix: t.prefix,
174
174
  ...Le(t)
175
175
  };
176
- return /* @__PURE__ */ P(Me.Provider, { value: { utcOffset: r, timezone: n }, children: U === null ? B(!0) : /* @__PURE__ */ P(
176
+ return /* @__PURE__ */ h(Me.Provider, { value: { utcOffset: r, timezone: n }, children: $ === null ? G(!0) : /* @__PURE__ */ h(
177
177
  Oe,
178
178
  {
179
- popup: () => B(),
179
+ popup: () => G(),
180
180
  trigger: "click",
181
181
  clickToClose: !1,
182
182
  position: ne,
183
- disabled: R,
183
+ disabled: U,
184
184
  popupAlign: Ge,
185
185
  getPopupContainer: re,
186
- onVisibleChange: he,
187
- popupVisible: A,
186
+ onVisibleChange: Pe,
187
+ popupVisible: E,
188
188
  classNames: "slideDynamicOrigin",
189
189
  unmountOnExit: !!me,
190
190
  ...le,
191
- children: U || (m ? /* @__PURE__ */ P(
191
+ children: $ || (m ? /* @__PURE__ */ h(
192
192
  ze,
193
193
  {
194
- ...J,
195
- ref: E,
196
- placeholder: ye,
194
+ ...K,
195
+ ref: H,
196
+ placeholder: be,
197
197
  value: l(i) && i.length ? i : c,
198
- onChange: G,
198
+ onChange: J,
199
199
  inputValue: v,
200
- changeFocusedInputIndex: N,
201
- focusedInputIndex: x
200
+ changeFocusedInputIndex: z,
201
+ focusedInputIndex: y
202
202
  }
203
- ) : /* @__PURE__ */ P(
203
+ ) : /* @__PURE__ */ h(
204
204
  Ne,
205
205
  {
206
- ...J,
207
- ref: E,
208
- placeholder: be,
206
+ ...K,
207
+ ref: H,
208
+ placeholder: xe,
209
209
  value: i || c,
210
210
  inputValue: v,
211
- onChange: G
211
+ onChange: J
212
212
  }
213
213
  ))
214
214
  }
@@ -1,78 +1,78 @@
1
- import { jsxs as I, Fragment as pe, jsx as a } from "react/jsx-runtime";
2
- import { useContext as Q, useCallback as W } from "react";
3
- import X from "../button/index.js";
4
- import { a as he } from "../chunk/CQvM33Vg.js";
5
- import xe from "@unicom-cloud/utils/class-name";
6
- import { g as $e, a as Y, d as $, j as Z } from "../chunk/tamGhTJp.js";
1
+ import { jsxs as G, Fragment as hn, jsx as l } from "react/jsx-runtime";
2
+ import { useContext as W, useCallback as X } from "react";
3
+ import Y from "../button/index.js";
4
+ import { a as xn } from "../chunk/C9oo3EJI.js";
5
+ import $n from "@unicom-cloud/utils/class-name";
6
+ import { g as On, a as Z, d as $, j as V } from "../chunk/tamGhTJp.js";
7
7
  import { padStart as d } from "../utils/pad.js";
8
- import j from "./TimeColumn.js";
9
- import Oe from "./context.js";
10
- import { getColumnsFromFormat as D } from "./util.js";
11
- const Ce = ["am", "pm"];
12
- function ve(w) {
13
- return w.use12Hours ?? D(w.format).use12Hours;
8
+ import D from "./TimeColumn.js";
9
+ import vn from "./context.js";
10
+ import { getColumnsFromFormat as z } from "./util.js";
11
+ const bn = ["am", "pm"];
12
+ function Cn(S) {
13
+ return S.use12Hours ?? z(S.format).use12Hours;
14
14
  }
15
- function Me(w) {
15
+ function Tn(S) {
16
16
  const {
17
17
  format: O = "HH:mm:ss",
18
- onSelect: C,
19
- popupVisible: V,
20
- step: v = {},
18
+ onSelect: v,
19
+ popupVisible: nn,
20
+ step: b = {},
21
21
  disabledHours: p,
22
22
  disabledMinutes: c,
23
23
  disabledSeconds: r,
24
- hideDisabledOptions: z,
25
- onConfirmValue: S,
26
- isRangePicker: M,
27
- confirmBtnDisabled: ee,
28
- valueShow: ne,
29
- setValueShow: b,
30
- extra: q,
31
- disableConfirm: k,
32
- hideFooter: oe,
33
- showNowBtn: G = !0,
34
- scrollSticky: te
35
- } = w, { getPrefixCls: ie, locale: J } = Q(he), T = ie("timepicker"), { utcOffset: B, timezone: E } = Q(Oe), f = $e(ne, O), N = f && f.hour() >= 12 ? "pm" : "am", l = ve(w), L = W(
36
- (n) => {
37
- const o = v.hour || 1, e = v.minute || 1, P = v.second || 1, s = [];
38
- if (n === "hour") {
39
- for (let i = 0; i < (l ? 12 : 24); i += o)
24
+ hideDisabledOptions: B,
25
+ onConfirmValue: k,
26
+ isRangePicker: T,
27
+ confirmBtnDisabled: en,
28
+ valueShow: on,
29
+ setValueShow: C,
30
+ extra: J,
31
+ disableConfirm: N,
32
+ hideFooter: tn,
33
+ showNowBtn: K = !0,
34
+ scrollSticky: sn
35
+ } = S, { getPrefixCls: E, locale: H } = W(xn), A = E == null ? void 0 : E("timepicker"), { utcOffset: L, timezone: R } = W(vn), f = On(on, O), g = f && f.hour() >= 12 ? "pm" : "am", a = Cn(S), _ = X(
36
+ (e) => {
37
+ const o = b.hour || 1, n = b.minute || 1, M = b.second || 1, s = [];
38
+ if (e === "hour") {
39
+ for (let i = 0; i < (a ? 12 : 24); i += o)
40
40
  s.push(i);
41
- l && (s[0] = 12);
41
+ a && (s[0] = 12);
42
42
  }
43
- if (n === "minute")
44
- for (let i = 0; i < 60; i += e)
43
+ if (e === "minute")
44
+ for (let i = 0; i < 60; i += n)
45
45
  s.push(i);
46
- if (n === "second")
47
- for (let i = 0; i < 60; i += P)
46
+ if (e === "second")
47
+ for (let i = 0; i < 60; i += M)
48
48
  s.push(i);
49
49
  return s;
50
50
  },
51
- [v.hour, v.minute, v.second, l]
52
- ), g = L("hour"), H = L("minute"), h = L("second");
51
+ [b.hour, b.minute, b.second, a]
52
+ ), U = _("hour"), y = _("minute"), h = _("second");
53
53
  let t = f && f.hour();
54
- t = l && t > 12 ? t - 12 : t, l && t === 0 && N === "am" && (t += 12);
55
- const y = f && f.minute(), K = f && f.second(), R = W(
56
- (n) => {
57
- switch (n) {
54
+ t = a && t > 12 ? t - 12 : t, a && t === 0 && g === "am" && (t += 12);
55
+ const w = f && f.minute(), Q = f && f.second(), I = X(
56
+ (e) => {
57
+ switch (e) {
58
58
  case "hour":
59
59
  return typeof p == "function" ? d(
60
- g.find((o) => p().indexOf(o) === -1) || 0,
60
+ U.find((o) => p().indexOf(o) === -1) || 0,
61
61
  2,
62
62
  "0"
63
- ) : d(g[0], 2, "0");
63
+ ) : d(U[0], 2, "0");
64
64
  case "minute":
65
65
  return typeof c == "function" ? d(
66
- H.find(
66
+ y.find(
67
67
  (o) => c(t).indexOf(o) === -1
68
68
  ) || 0,
69
69
  2,
70
70
  "0"
71
- ) : d(H[0], 2, "0");
71
+ ) : d(y[0], 2, "0");
72
72
  case "second":
73
73
  return typeof r == "function" ? d(
74
74
  h.find(
75
- (o) => r(t, y).indexOf(o) === -1
75
+ (o) => r(t, w).indexOf(o) === -1
76
76
  ) || 0,
77
77
  2,
78
78
  "0"
@@ -82,159 +82,159 @@ function Me(w) {
82
82
  }
83
83
  },
84
84
  [
85
- g,
86
- H,
85
+ U,
86
+ y,
87
87
  h,
88
88
  p,
89
89
  c,
90
90
  r,
91
91
  t,
92
- y
92
+ w
93
93
  ]
94
94
  );
95
- function se(n, o) {
96
- const e = D(O).list.indexOf("A") !== -1, P = f || $(
97
- `${R("hour")}:${R("minute")}:${R(
95
+ function rn(e, o) {
96
+ const n = z(O).list.indexOf("A") !== -1, M = f || $(
97
+ `${I("hour")}:${I("minute")}:${I(
98
98
  "second"
99
99
  )}`,
100
100
  "HH:mm:ss"
101
101
  );
102
- let s = P.hour(), i = P.minute(), x = P.second();
103
- const _ = e ? N.toUpperCase() : N;
102
+ let s = M.hour(), i = M.minute(), x = M.second();
103
+ const q = n ? g.toUpperCase() : g;
104
104
  let m = "HH:mm:ss", u;
105
- l && (e ? m = `${m} A` : m = `${m} a`), l && (s = s > 12 ? s - 12 : s), o === "hour" && (typeof c == "function" && c(n).includes(i) && (i = H.find(
106
- (U) => c(n).indexOf(U) === -1
107
- ) ?? 0), typeof r == "function" && r(n, i).includes(x) && (x = h.find(
108
- (U) => r(n, i).indexOf(U) === -1
105
+ a && (n ? m = `${m} A` : m = `${m} a`), a && (s = s > 12 ? s - 12 : s), o === "hour" && (typeof c == "function" && c(e).includes(i) && (i = y.find(
106
+ (P) => c(e).indexOf(P) === -1
107
+ ) ?? 0), typeof r == "function" && r(e, i).includes(x) && (x = h.find(
108
+ (P) => r(e, i).indexOf(P) === -1
109
109
  ) ?? 0), u = $(
110
- `${n}:${i}:${x} ${_}`,
110
+ `${e}:${i}:${x} ${q}`,
111
111
  m,
112
112
  "en"
113
- )), o === "minute" && (typeof r == "function" && r(s, n).includes(x) && (x = h.find(
114
- (U) => r(s, n).indexOf(U) === -1
113
+ )), o === "minute" && (typeof r == "function" && r(s, e).includes(x) && (x = h.find(
114
+ (P) => r(s, e).indexOf(P) === -1
115
115
  ) ?? 0), u = $(
116
- `${s}:${n}:${x} ${_}`,
116
+ `${s}:${e}:${x} ${q}`,
117
117
  m,
118
118
  "en"
119
119
  )), o === "second" && (u = $(
120
- `${s}:${i}:${n} ${_}`,
120
+ `${s}:${i}:${e} ${q}`,
121
121
  m,
122
122
  "en"
123
123
  )), o === "ampm" && (u = $(
124
- `${s}:${i}:${x} ${e ? n.toUpperCase() : n}`,
124
+ `${s}:${i}:${x} ${n ? e.toUpperCase() : e}`,
125
125
  m,
126
126
  "en"
127
- )), u = $(u, m).locale($.locale()), C == null || C(
128
- Z(u, B, E).format(O),
129
- Z(u, B, E)
130
- ), M || (b == null || b(u), k && S(u));
127
+ )), u = $(u, m).locale($.locale()), v == null || v(
128
+ V(u, L, R).format(O),
129
+ V(u, L, R)
130
+ ), T || (C == null || C(u), N && k(u));
131
131
  }
132
- function re() {
133
- f && S(f);
132
+ function fn() {
133
+ f && k(f);
134
134
  }
135
- function fe() {
136
- const n = Y(), o = Y(B, E);
137
- C == null || C(n.format(O), n), k ? S == null || S(o) : b == null || b(o);
135
+ function cn() {
136
+ const e = Z(), o = Z(L, R);
137
+ v == null || v(e.format(O), e), N ? k == null || k(o) : C == null || C(o);
138
138
  }
139
- const A = {
140
- prefixCls: T,
141
- onHandleSelect: se,
142
- popupVisible: V,
143
- scrollSticky: te
139
+ const F = {
140
+ prefixCls: A,
141
+ onHandleSelect: rn,
142
+ popupVisible: nn,
143
+ scrollSticky: sn
144
144
  };
145
- function ce() {
146
- const o = (z && typeof p == "function" ? g.filter((e) => p().indexOf(e) === -1) : g).map((e) => ({
147
- label: d(`${e}`, 2, "0"),
148
- value: e,
149
- selected: t !== void 0 && t === e,
150
- disabled: typeof p == "function" && p().indexOf(e) !== -1
145
+ function un() {
146
+ const o = (B && typeof p == "function" ? U.filter((n) => p().indexOf(n) === -1) : U).map((n) => ({
147
+ label: d(`${n}`, 2, "0"),
148
+ value: n,
149
+ selected: t !== void 0 && t === n,
150
+ disabled: typeof p == "function" && p().indexOf(n) !== -1
151
151
  }));
152
- return /* @__PURE__ */ a(
153
- j,
152
+ return /* @__PURE__ */ l(
153
+ D,
154
154
  {
155
- ...A,
155
+ ...F,
156
156
  list: o,
157
157
  value: t,
158
158
  unit: "hour"
159
159
  }
160
160
  );
161
161
  }
162
- function ue() {
163
- const o = (z && typeof c == "function" ? H.filter((e) => c(t).indexOf(e) === -1) : H).map((e) => ({
164
- label: d(`${e}`, 2, "0"),
165
- value: e,
166
- selected: t !== void 0 && y === e,
167
- disabled: typeof c == "function" && c(t).indexOf(e) !== -1
162
+ function mn() {
163
+ const o = (B && typeof c == "function" ? y.filter((n) => c(t).indexOf(n) === -1) : y).map((n) => ({
164
+ label: d(`${n}`, 2, "0"),
165
+ value: n,
166
+ selected: t !== void 0 && w === n,
167
+ disabled: typeof c == "function" && c(t).indexOf(n) !== -1
168
168
  }));
169
- return /* @__PURE__ */ a(
170
- j,
169
+ return /* @__PURE__ */ l(
170
+ D,
171
171
  {
172
- ...A,
172
+ ...F,
173
173
  list: o,
174
- value: y,
174
+ value: w,
175
175
  unit: "minute"
176
176
  }
177
177
  );
178
178
  }
179
- function me() {
180
- const o = (z && typeof r == "function" ? h.filter(
181
- (e) => r(t, y).indexOf(e) === -1
182
- ) : h).map((e) => ({
183
- label: d(`${e}`, 2, "0"),
184
- value: e,
185
- selected: t !== void 0 && K === e,
186
- disabled: typeof r == "function" && r(t, y).indexOf(e) !== -1
179
+ function dn() {
180
+ const o = (B && typeof r == "function" ? h.filter(
181
+ (n) => r(t, w).indexOf(n) === -1
182
+ ) : h).map((n) => ({
183
+ label: d(`${n}`, 2, "0"),
184
+ value: n,
185
+ selected: t !== void 0 && Q === n,
186
+ disabled: typeof r == "function" && r(t, w).indexOf(n) !== -1
187
187
  }));
188
- return /* @__PURE__ */ a(
189
- j,
188
+ return /* @__PURE__ */ l(
189
+ D,
190
190
  {
191
- ...A,
191
+ ...F,
192
192
  list: o,
193
- value: K,
193
+ value: Q,
194
194
  unit: "second"
195
195
  }
196
196
  );
197
197
  }
198
- function de() {
199
- const n = D(O).list.indexOf("A") !== -1, o = Ce.map((e) => ({
200
- label: n ? e.toUpperCase() : e,
201
- value: e,
202
- selected: N === e
198
+ function an() {
199
+ const e = z(O).list.indexOf("A") !== -1, o = bn.map((n) => ({
200
+ label: e ? n.toUpperCase() : n,
201
+ value: n,
202
+ selected: g === n
203
203
  }));
204
- return /* @__PURE__ */ a(
205
- j,
204
+ return /* @__PURE__ */ l(
205
+ D,
206
206
  {
207
- ...A,
207
+ ...F,
208
208
  list: o,
209
- value: N,
209
+ value: g,
210
210
  unit: "ampm"
211
211
  }
212
212
  );
213
213
  }
214
- const { list: F } = D(O), le = xe(T), ae = oe || k && M || !M && k && !G;
215
- return /* @__PURE__ */ I(pe, { children: [
216
- /* @__PURE__ */ I("div", { className: le, children: [
217
- (F.indexOf("H") !== -1 || F.indexOf("h") !== -1) && ce(),
218
- F.indexOf("m") !== -1 && ue(),
219
- F.indexOf("s") !== -1 && me(),
220
- l && de()
214
+ const { list: j } = z(O), ln = $n(A), pn = tn || N && T || !T && N && !K;
215
+ return /* @__PURE__ */ G(hn, { children: [
216
+ /* @__PURE__ */ G("div", { className: ln, children: [
217
+ (j.indexOf("H") !== -1 || j.indexOf("h") !== -1) && un(),
218
+ j.indexOf("m") !== -1 && mn(),
219
+ j.indexOf("s") !== -1 && dn(),
220
+ a && an()
221
221
  ] }),
222
- q && /* @__PURE__ */ a("div", { className: `${T}-footer-extra-wrapper`, children: q }),
223
- !ae && /* @__PURE__ */ I("div", { className: `${T}-footer-btn-wrapper`, children: [
224
- !M && G ? /* @__PURE__ */ a(X, { size: "mini", onClick: fe, children: J.TimePicker.now }) : /* @__PURE__ */ a("div", {}),
225
- !k && /* @__PURE__ */ a(
226
- X,
222
+ J && /* @__PURE__ */ l("div", { className: `${A}-footer-extra-wrapper`, children: J }),
223
+ !pn && /* @__PURE__ */ G("div", { className: `${A}-footer-btn-wrapper`, children: [
224
+ !T && K ? /* @__PURE__ */ l(Y, { size: "mini", onClick: cn, children: H == null ? void 0 : H.TimePicker.now }) : /* @__PURE__ */ l("div", {}),
225
+ !N && /* @__PURE__ */ l(
226
+ Y,
227
227
  {
228
228
  type: "primary",
229
229
  size: "mini",
230
- onClick: re,
231
- disabled: ee || !f,
232
- children: J.TimePicker.ok
230
+ onClick: fn,
231
+ disabled: en || !f,
232
+ children: H == null ? void 0 : H.TimePicker.ok
233
233
  }
234
234
  )
235
235
  ] })
236
236
  ] });
237
237
  }
238
238
  export {
239
- Me as default
239
+ Tn as default
240
240
  };