@fangxinyan/lumina 0.6.13 → 0.6.15
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.
- package/dist/Alert.cjs +3 -3
- package/dist/Alert.js +2 -2
- package/dist/AppShell.cjs +5 -5
- package/dist/AppShell.js +1 -1
- package/dist/AutoComplete.cjs +5 -5
- package/dist/AutoComplete.js +4 -4
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.js +1 -1
- package/dist/Badge.cjs +2 -2
- package/dist/Badge.js +1 -1
- package/dist/Button.cjs +4 -4
- package/dist/Button.js +2 -2
- package/dist/{Calendar-RUTPKREW.css → Calendar-I6NHCXIB.css} +65 -0
- package/dist/Calendar.cjs +3 -3
- package/dist/Calendar.d.cts +2 -0
- package/dist/Calendar.d.ts +2 -0
- package/dist/Calendar.js +2 -2
- package/dist/Card.cjs +3 -3
- package/dist/Card.js +2 -2
- package/dist/Cascader.cjs +5 -5
- package/dist/Cascader.js +4 -4
- package/dist/Checkbox.cjs +3 -3
- package/dist/Checkbox.js +2 -2
- package/dist/Collapse.cjs +3 -3
- package/dist/Collapse.js +2 -2
- package/dist/ColorPicker.cjs +2 -2
- package/dist/ColorPicker.js +1 -1
- package/dist/CommandPalette.cjs +5 -5
- package/dist/CommandPalette.js +4 -4
- package/dist/ContextMenu.cjs +2 -2
- package/dist/ContextMenu.js +1 -1
- package/dist/DatePicker-VDVSIARF.css +60 -0
- package/dist/DatePicker.cjs +16 -0
- package/dist/DatePicker.d.cts +49 -0
- package/dist/DatePicker.d.ts +49 -0
- package/dist/DatePicker.js +7 -0
- package/dist/DateTimePicker-77ZLZIWO.css +224 -0
- package/dist/DateTimePicker.cjs +16 -0
- package/dist/DateTimePicker.d.cts +61 -0
- package/dist/DateTimePicker.d.ts +61 -0
- package/dist/DateTimePicker.js +7 -0
- package/dist/Divider.cjs +2 -2
- package/dist/Divider.js +1 -1
- package/dist/{Drawer-7N3URAJ6.css → Drawer-7KICRM4L.css} +1 -1
- package/dist/Drawer.cjs +3 -3
- package/dist/Drawer.d.cts +4 -0
- package/dist/Drawer.d.ts +4 -0
- package/dist/Drawer.js +2 -2
- package/dist/Empty.cjs +2 -2
- package/dist/Empty.js +1 -1
- package/dist/Form.cjs +4 -4
- package/dist/Form.js +1 -1
- package/dist/Icon.cjs +49 -49
- package/dist/Icon.js +1 -1
- package/dist/{Image-SGSRTHQX.css → Image-TDCXJISG.css} +1 -1
- package/dist/Image.cjs +6 -6
- package/dist/Image.d.cts +4 -0
- package/dist/Image.d.ts +4 -0
- package/dist/Image.js +2 -2
- package/dist/Input.cjs +5 -5
- package/dist/Input.js +3 -3
- package/dist/InputNumber.cjs +5 -5
- package/dist/InputNumber.js +4 -4
- package/dist/List.cjs +2 -2
- package/dist/List.js +1 -1
- package/dist/Message.cjs +6 -6
- package/dist/Message.js +2 -2
- package/dist/{Modal-MCFDYVUQ.css → Modal-ZFWNFEA5.css} +1 -1
- package/dist/Modal.cjs +4 -4
- package/dist/Modal.d.cts +4 -0
- package/dist/Modal.d.ts +4 -0
- package/dist/Modal.js +3 -3
- package/dist/Pagination.cjs +7 -7
- package/dist/Pagination.js +6 -6
- package/dist/Popover.cjs +2 -2
- package/dist/Popover.js +1 -1
- package/dist/Progress.cjs +2 -2
- package/dist/Progress.js +1 -1
- package/dist/Radio.cjs +3 -3
- package/dist/Radio.js +1 -1
- package/dist/Select.cjs +6 -6
- package/dist/Select.js +5 -5
- package/dist/Skeleton.cjs +2 -2
- package/dist/Skeleton.js +1 -1
- package/dist/Slider.cjs +2 -2
- package/dist/Slider.js +1 -1
- package/dist/Spin.cjs +2 -2
- package/dist/Spin.js +1 -1
- package/dist/Splitter.cjs +2 -2
- package/dist/Splitter.js +1 -1
- package/dist/StatusBar.cjs +3 -3
- package/dist/StatusBar.js +1 -1
- package/dist/Surface.cjs +4 -4
- package/dist/Surface.js +2 -2
- package/dist/Switch.cjs +2 -2
- package/dist/Switch.js +1 -1
- package/dist/Table.cjs +9 -9
- package/dist/Table.js +8 -8
- package/dist/TablePro.cjs +10 -10
- package/dist/TablePro.js +9 -9
- package/dist/Tabs.cjs +2 -2
- package/dist/Tabs.js +1 -1
- package/dist/Tag.cjs +3 -3
- package/dist/Tag.js +2 -2
- package/dist/Textarea.cjs +4 -4
- package/dist/Textarea.js +2 -2
- package/dist/Theme.cjs +11 -11
- package/dist/Theme.js +1 -1
- package/dist/ThemePanel.cjs +13 -13
- package/dist/ThemePanel.js +10 -10
- package/dist/TimePicker-6URACYEH.css +151 -0
- package/dist/TimePicker.cjs +15 -0
- package/dist/TimePicker.d.cts +63 -0
- package/dist/TimePicker.d.ts +63 -0
- package/dist/TimePicker.js +6 -0
- package/dist/Timeline.cjs +3 -3
- package/dist/Timeline.js +2 -2
- package/dist/Tooltip.cjs +2 -2
- package/dist/Tooltip.js +1 -1
- package/dist/Typography.cjs +7 -7
- package/dist/Typography.js +2 -2
- package/dist/{chunk-J7VYTDFN.cjs → chunk-262ED6WQ.cjs} +3 -3
- package/dist/chunk-26AJ7OY3.cjs +505 -0
- package/dist/{chunk-BX45WJRT.js → chunk-3VSHGM54.js} +9 -9
- package/dist/{chunk-KRVWQKTZ.js → chunk-3VXGZ3SJ.js} +3 -3
- package/dist/{chunk-VJVXXCNL.js → chunk-4HJBF4GY.js} +3 -3
- package/dist/chunk-4KDABJSY.cjs +241 -0
- package/dist/{chunk-ONHYDQFP.cjs → chunk-4TTRHEGM.cjs} +3 -3
- package/dist/{chunk-GVULVTWO.js → chunk-4YSGGZDB.js} +4 -4
- package/dist/{chunk-HNP7KEQP.cjs → chunk-5A6KSYWA.cjs} +1 -1
- package/dist/{chunk-RFFP6J6O.cjs → chunk-5ERD3W24.cjs} +4 -4
- package/dist/{chunk-TTXYZDQ3.js → chunk-5MOYKVB7.js} +2 -2
- package/dist/{chunk-X2NY3YQS.cjs → chunk-5QEI7GGA.cjs} +6 -6
- package/dist/{chunk-O7OPFKAM.js → chunk-6HF6UF73.js} +2 -2
- package/dist/{chunk-DCATZUT3.js → chunk-6K5YI4ZE.js} +2 -2
- package/dist/{chunk-EVKLGNVR.js → chunk-6LC4QROE.js} +3 -3
- package/dist/{chunk-6Z4PZWND.js → chunk-6LN4VVX7.js} +2 -2
- package/dist/{chunk-7RNT6KN4.js → chunk-6MEOLYNQ.js} +1 -1
- package/dist/{chunk-UMLRSKBE.js → chunk-6PHPRZTT.js} +4 -4
- package/dist/{chunk-4VPRY4EM.cjs → chunk-6Q76VLCE.cjs} +3 -3
- package/dist/{chunk-SWMQ2GKT.cjs → chunk-7IO3EOHN.cjs} +3 -3
- package/dist/{chunk-B55XILNY.cjs → chunk-7QXP6DXC.cjs} +4 -4
- package/dist/{chunk-56GNNOOT.cjs → chunk-7YJV45U6.cjs} +11 -11
- package/dist/{chunk-AJ44ZLJY.cjs → chunk-A4Z7PLHV.cjs} +59 -59
- package/dist/{chunk-RUE3QE6T.js → chunk-A6O25EP2.js} +2 -2
- package/dist/{chunk-ZNR6LWTQ.js → chunk-AAPZLBHQ.js} +1 -1
- package/dist/{chunk-Q4IAUKAW.js → chunk-ARUPS7JH.js} +2 -2
- package/dist/{chunk-VAOAAWGI.cjs → chunk-ATUPFAPZ.cjs} +3 -3
- package/dist/{chunk-GKBCXYDF.cjs → chunk-BNY2NVTL.cjs} +3 -3
- package/dist/{chunk-7J26GI3T.cjs → chunk-BT2RXFT4.cjs} +15 -13
- package/dist/{chunk-WY6AEPFW.js → chunk-BVQOJKRX.js} +8 -6
- package/dist/{chunk-QPZCDZWI.cjs → chunk-BW76ENTW.cjs} +1 -1
- package/dist/{chunk-EKNDL2XB.js → chunk-CFZVWY5N.js} +2 -2
- package/dist/chunk-CUBKHQ63.js +483 -0
- package/dist/chunk-CYBBUXUK.cjs +415 -0
- package/dist/{chunk-JST4HJ3I.js → chunk-D7GK6H6V.js} +1 -1
- package/dist/{chunk-T7RV2UMU.js → chunk-DSLYWX4O.js} +1 -1
- package/dist/{chunk-JKFGLYMM.js → chunk-EQ4FPOQQ.js} +14 -4
- package/dist/{chunk-ZZH4UIPN.cjs → chunk-ES7AWMNH.cjs} +1 -1
- package/dist/{chunk-ZLMJVSBO.cjs → chunk-FDUQPAQE.cjs} +1 -1
- package/dist/{chunk-HHBXCBZP.js → chunk-FDZG27IG.js} +1 -1
- package/dist/chunk-FKP5D5IS.js +271 -0
- package/dist/{chunk-EEHZRPPF.cjs → chunk-FQJY4D3T.cjs} +1 -1
- package/dist/{chunk-LA62SD2F.js → chunk-FYSXJXNW.js} +1 -1
- package/dist/{chunk-DEXYWDHF.js → chunk-GNV6W4BN.js} +1 -1
- package/dist/{chunk-NZBOHEQA.js → chunk-HBO7ZDEQ.js} +1 -1
- package/dist/{chunk-BAWP2QVY.js → chunk-I777JTTG.js} +1 -1
- package/dist/chunk-I7TOBKJO.js +219 -0
- package/dist/{chunk-IZGHMMX7.js → chunk-IOAOG5L7.js} +3 -3
- package/dist/{chunk-QQROR2RU.cjs → chunk-IOUAZYK2.cjs} +1 -1
- package/dist/{chunk-CQKQ7KS2.js → chunk-IPSNC5VZ.js} +2 -2
- package/dist/{chunk-7X7FXV5E.cjs → chunk-IVFVLRWJ.cjs} +14 -14
- package/dist/{chunk-LM5XXSGE.js → chunk-IZHH6CVY.js} +1 -1
- package/dist/{chunk-GGNBMIZ2.js → chunk-JFL2WMJZ.js} +2 -2
- package/dist/{chunk-XRIXQM3Z.cjs → chunk-JMFHL7GN.cjs} +1 -1
- package/dist/chunk-KHRYPNUV.cjs +293 -0
- package/dist/{chunk-LFPFFSN2.js → chunk-KMPFESEV.js} +1 -1
- package/dist/{chunk-TAHZH6DJ.js → chunk-KYV75JPQ.js} +1 -1
- package/dist/{chunk-2A2XM7D5.cjs → chunk-LEMMFFEY.cjs} +4 -4
- package/dist/{chunk-MZIZGYA4.cjs → chunk-M4NJTJKV.cjs} +1 -1
- package/dist/{chunk-HYXA7S43.js → chunk-MOZ52KN6.js} +1 -1
- package/dist/{chunk-E5MSFY5H.cjs → chunk-MPOO5VPW.cjs} +1 -1
- package/dist/{chunk-MPJLGYFV.cjs → chunk-MYW7LNB2.cjs} +1 -1
- package/dist/chunk-N7CHFKRS.js +393 -0
- package/dist/{chunk-VBTASJ3Y.cjs → chunk-N7OQNSII.cjs} +1 -1
- package/dist/{chunk-VGERRI4S.js → chunk-OTSDPQPV.js} +2 -2
- package/dist/{chunk-7NAN7OVX.cjs → chunk-P2OQTJZP.cjs} +1 -1
- package/dist/{chunk-HAA5C5YW.js → chunk-P64NPZBG.js} +2 -2
- package/dist/{chunk-QP6RNHGR.cjs → chunk-PBT4UKPL.cjs} +3 -3
- package/dist/{chunk-FUR5SDP7.cjs → chunk-PKNRTFNE.cjs} +1 -1
- package/dist/{chunk-FPXBY2MY.cjs → chunk-POU3W5J3.cjs} +1 -1
- package/dist/{chunk-SOY3LB7W.cjs → chunk-PSQ3HNZP.cjs} +1 -1
- package/dist/{chunk-BK4XKZUO.js → chunk-PU7VXDAS.js} +1 -1
- package/dist/{chunk-OCQC2ZSV.cjs → chunk-QMX67CVT.cjs} +1 -1
- package/dist/{chunk-R3JCW3ES.js → chunk-QNN3YV2P.js} +2 -2
- package/dist/{chunk-V5HMQGFD.js → chunk-R3DTXVP2.js} +1 -1
- package/dist/{chunk-EQGNKCBY.cjs → chunk-RFI5R42I.cjs} +4 -4
- package/dist/{chunk-FROWMHDP.cjs → chunk-RMFSX7DO.cjs} +18 -8
- package/dist/{chunk-TCWGIRAW.js → chunk-RR2BKV65.js} +1 -1
- package/dist/{chunk-YHFGMI7T.cjs → chunk-RSSOX4RQ.cjs} +8 -8
- package/dist/{chunk-3XV4LGQ7.cjs → chunk-RZEFKXL3.cjs} +3 -3
- package/dist/{chunk-GDWAQGOH.cjs → chunk-S2ZGXBUH.cjs} +1 -1
- package/dist/{chunk-M63HWVOS.js → chunk-S7IHWY24.js} +2 -2
- package/dist/{chunk-NLX2RB4L.cjs → chunk-SOQ56ZI2.cjs} +1 -1
- package/dist/{chunk-RV37BGW3.cjs → chunk-SW2HMNCA.cjs} +4 -4
- package/dist/{chunk-UVL5SIAQ.cjs → chunk-TBNPJPYG.cjs} +1 -1
- package/dist/{chunk-QVWCUKEY.js → chunk-TJECLLN4.js} +1 -1
- package/dist/{chunk-E2OC4CUE.js → chunk-TYLDISRK.js} +1 -1
- package/dist/{chunk-23HN42SP.cjs → chunk-ULUD3FED.cjs} +9 -6
- package/dist/{chunk-LINUXKS7.cjs → chunk-V5KUC5VH.cjs} +1 -1
- package/dist/{chunk-U2543OZS.cjs → chunk-VA2I7ZAL.cjs} +1 -1
- package/dist/{chunk-7TWL3SJ5.cjs → chunk-VS3I5OKA.cjs} +8 -8
- package/dist/{chunk-A7BI7YWZ.js → chunk-WMGMIE2D.js} +8 -5
- package/dist/{chunk-CCBEHIRU.cjs → chunk-X5MYHDEQ.cjs} +6 -6
- package/dist/{chunk-QSGH4FCS.cjs → chunk-X7XP6GEI.cjs} +1 -1
- package/dist/{chunk-UROQO2HR.js → chunk-XCXUGHDF.js} +1 -1
- package/dist/{chunk-2M5WJENK.js → chunk-YAFDVNXT.js} +1 -1
- package/dist/{chunk-PDYM26IC.cjs → chunk-ZBWUIR2J.cjs} +6 -6
- package/dist/{chunk-5GKALAMP.js → chunk-ZD3L4V3H.js} +2 -2
- package/dist/{chunk-XJTDCWKP.js → chunk-ZR4IMROK.js} +1 -1
- package/dist/{chunk-5MCFW2HC.js → chunk-ZTCRD2FL.js} +1 -1
- package/dist/index.cjs +214 -199
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +51 -48
- package/dist/styles.css +445 -3
- package/dist/{tokens-OJLK3XMZ.css → tokens-RYJ3DFTU.css} +3 -0
- package/dist/tokens.css +3 -0
- package/docs/llms/calendar.md +2 -1
- package/docs/llms/datepicker.md +69 -0
- package/docs/llms/datetimepicker.md +83 -0
- package/docs/llms/drawer.md +13 -0
- package/docs/llms/image.md +14 -0
- package/docs/llms/modal.md +13 -0
- package/docs/llms/timepicker.md +81 -0
- package/docs/llms.md +5 -2
- package/package.json +7 -3
- package/dist/chunk-56U4P7QA.cjs +0 -112
- package/dist/chunk-J3LUTXVO.js +0 -90
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { useFloating } from './chunk-DUFRASGO.js';
|
|
2
|
+
import { Input } from './chunk-IOAOG5L7.js';
|
|
3
|
+
import { Button } from './chunk-IPSNC5VZ.js';
|
|
4
|
+
import './tokens-RYJ3DFTU.css';
|
|
5
|
+
import './shared-NJHRNLRH.css';
|
|
6
|
+
import './TimePicker-6URACYEH.css';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
9
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var clampStep = (value) => {
|
|
12
|
+
if (!Number.isFinite(value) || !value || value < 1) return 1;
|
|
13
|
+
return Math.floor(value);
|
|
14
|
+
};
|
|
15
|
+
var pad = (value) => String(value).padStart(2, "0");
|
|
16
|
+
var parseTime = (value) => {
|
|
17
|
+
if (!value) return null;
|
|
18
|
+
const match = value.trim().match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);
|
|
19
|
+
if (!match) return null;
|
|
20
|
+
const hour = Number(match[1]);
|
|
21
|
+
const minute = Number(match[2]);
|
|
22
|
+
const second = match[3] == null ? 0 : Number(match[3]);
|
|
23
|
+
if (hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return { hour, minute, second };
|
|
27
|
+
};
|
|
28
|
+
var formatTime = (time, includeSecond) => {
|
|
29
|
+
const base = `${pad(time.hour)}:${pad(time.minute)}`;
|
|
30
|
+
return includeSecond ? `${base}:${pad(time.second)}` : base;
|
|
31
|
+
};
|
|
32
|
+
var normalizeTime = (value, includeSecond) => {
|
|
33
|
+
const parsed = parseTime(value);
|
|
34
|
+
return parsed ? formatTime(parsed, includeSecond) : null;
|
|
35
|
+
};
|
|
36
|
+
var toSeconds = (time) => time.hour * 3600 + time.minute * 60 + time.second;
|
|
37
|
+
var getNow = () => {
|
|
38
|
+
const now = /* @__PURE__ */ new Date();
|
|
39
|
+
return {
|
|
40
|
+
hour: now.getHours(),
|
|
41
|
+
minute: now.getMinutes(),
|
|
42
|
+
second: now.getSeconds()
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
var buildOptions = (max, step, selected) => {
|
|
46
|
+
const safeStep = clampStep(step);
|
|
47
|
+
const values = [];
|
|
48
|
+
for (let value = 0; value <= max; value += safeStep) {
|
|
49
|
+
values.push(value);
|
|
50
|
+
}
|
|
51
|
+
if (selected != null && !values.includes(selected)) {
|
|
52
|
+
values.push(selected);
|
|
53
|
+
values.sort((a, b) => a - b);
|
|
54
|
+
}
|
|
55
|
+
return values;
|
|
56
|
+
};
|
|
57
|
+
var compose = (base, key, value) => ({
|
|
58
|
+
hour: key === "hour" ? value : base.hour,
|
|
59
|
+
minute: key === "minute" ? value : base.minute,
|
|
60
|
+
second: key === "second" ? value : base.second
|
|
61
|
+
});
|
|
62
|
+
var byDistanceFrom = (preferred) => (a, b) => Math.abs(a - preferred) - Math.abs(b - preferred) || a - b;
|
|
63
|
+
var TimePicker = React.forwardRef(
|
|
64
|
+
({
|
|
65
|
+
value,
|
|
66
|
+
defaultValue = null,
|
|
67
|
+
onChange,
|
|
68
|
+
format = "HH:mm",
|
|
69
|
+
showSecond,
|
|
70
|
+
placeholder = "\u8BF7\u9009\u62E9\u65F6\u95F4",
|
|
71
|
+
disabled,
|
|
72
|
+
readOnly,
|
|
73
|
+
invalid,
|
|
74
|
+
size = "md",
|
|
75
|
+
allowClear,
|
|
76
|
+
hourStep = 1,
|
|
77
|
+
minuteStep = 1,
|
|
78
|
+
secondStep = 1,
|
|
79
|
+
min,
|
|
80
|
+
max,
|
|
81
|
+
disabledTime,
|
|
82
|
+
placement = "bottom",
|
|
83
|
+
open: openProp,
|
|
84
|
+
defaultOpen = false,
|
|
85
|
+
onOpenChange,
|
|
86
|
+
popupClassName = "",
|
|
87
|
+
dropdownClassName = "",
|
|
88
|
+
className = "",
|
|
89
|
+
onKeyDown,
|
|
90
|
+
...rest
|
|
91
|
+
}, ref) => {
|
|
92
|
+
const includeSecond = showSecond ?? format === "HH:mm:ss";
|
|
93
|
+
const controlled = value !== void 0;
|
|
94
|
+
const initial = normalizeTime(defaultValue, includeSecond);
|
|
95
|
+
const [inner, setInner] = React.useState(initial);
|
|
96
|
+
const current = controlled ? normalizeTime(value, includeSecond) : inner;
|
|
97
|
+
const scrollSignature = current ?? "";
|
|
98
|
+
const currentParts = parseTime(current);
|
|
99
|
+
const [draft, setDraft] = React.useState(current ?? "");
|
|
100
|
+
React.useEffect(() => {
|
|
101
|
+
setDraft(current ?? "");
|
|
102
|
+
}, [current]);
|
|
103
|
+
const openControlled = openProp !== void 0;
|
|
104
|
+
const [innerOpen, setInnerOpen] = React.useState(defaultOpen);
|
|
105
|
+
const open = openControlled ? !!openProp : innerOpen;
|
|
106
|
+
const wasOpenRef = React.useRef(false);
|
|
107
|
+
const scrollSignatureRef = React.useRef(null);
|
|
108
|
+
const scrollFramesRef = React.useRef(/* @__PURE__ */ new Map());
|
|
109
|
+
const setOpen = React.useCallback(
|
|
110
|
+
(next) => {
|
|
111
|
+
if (disabled || readOnly) return;
|
|
112
|
+
if (!openControlled) setInnerOpen(next);
|
|
113
|
+
onOpenChange?.(next);
|
|
114
|
+
},
|
|
115
|
+
[disabled, onOpenChange, openControlled, readOnly]
|
|
116
|
+
);
|
|
117
|
+
const rootRef = React.useRef(null);
|
|
118
|
+
const panelRef = React.useRef(null);
|
|
119
|
+
const { triggerRef, floatingStyle } = useFloating({
|
|
120
|
+
open,
|
|
121
|
+
placement,
|
|
122
|
+
panelWidth: includeSecond ? 312 : 236,
|
|
123
|
+
panelHeight: 330
|
|
124
|
+
});
|
|
125
|
+
const setRootRef = React.useCallback(
|
|
126
|
+
(node) => {
|
|
127
|
+
rootRef.current = node;
|
|
128
|
+
triggerRef.current = node;
|
|
129
|
+
if (typeof ref === "function") ref(node);
|
|
130
|
+
else if (ref) ref.current = node;
|
|
131
|
+
},
|
|
132
|
+
[ref, triggerRef]
|
|
133
|
+
);
|
|
134
|
+
const minParts = React.useMemo(() => parseTime(min), [min]);
|
|
135
|
+
const maxParts = React.useMemo(() => parseTime(max), [max]);
|
|
136
|
+
const minSeconds = minParts ? toSeconds(minParts) : null;
|
|
137
|
+
const maxSeconds = maxParts ? toSeconds(maxParts) : null;
|
|
138
|
+
const isDisabledTime = React.useCallback(
|
|
139
|
+
(time) => {
|
|
140
|
+
const seconds = toSeconds(time);
|
|
141
|
+
if (minSeconds != null && seconds < minSeconds) return true;
|
|
142
|
+
if (maxSeconds != null && seconds > maxSeconds) return true;
|
|
143
|
+
return disabledTime?.(time) ?? false;
|
|
144
|
+
},
|
|
145
|
+
[disabledTime, maxSeconds, minSeconds]
|
|
146
|
+
);
|
|
147
|
+
const commit = React.useCallback(
|
|
148
|
+
(next) => {
|
|
149
|
+
if (!next) {
|
|
150
|
+
if (!controlled) setInner(null);
|
|
151
|
+
setDraft("");
|
|
152
|
+
onChange?.(null, null);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (isDisabledTime(next)) return;
|
|
156
|
+
const nextValue = formatTime(next, includeSecond);
|
|
157
|
+
if (!controlled) setInner(nextValue);
|
|
158
|
+
setDraft(nextValue);
|
|
159
|
+
onChange?.(nextValue, next);
|
|
160
|
+
},
|
|
161
|
+
[controlled, includeSecond, isDisabledTime, onChange]
|
|
162
|
+
);
|
|
163
|
+
React.useEffect(() => {
|
|
164
|
+
if (!open) return;
|
|
165
|
+
const onDown = (event) => {
|
|
166
|
+
const target = event.target;
|
|
167
|
+
if (rootRef.current?.contains(target)) return;
|
|
168
|
+
if (panelRef.current?.contains(target)) return;
|
|
169
|
+
setOpen(false);
|
|
170
|
+
};
|
|
171
|
+
const onDocKey = (event) => {
|
|
172
|
+
if (event.key === "Escape") setOpen(false);
|
|
173
|
+
};
|
|
174
|
+
document.addEventListener("mousedown", onDown);
|
|
175
|
+
document.addEventListener("keydown", onDocKey);
|
|
176
|
+
return () => {
|
|
177
|
+
document.removeEventListener("mousedown", onDown);
|
|
178
|
+
document.removeEventListener("keydown", onDocKey);
|
|
179
|
+
};
|
|
180
|
+
}, [open, setOpen]);
|
|
181
|
+
const scrollListTo = React.useCallback(
|
|
182
|
+
(list, top, animate) => {
|
|
183
|
+
const frame = scrollFramesRef.current.get(list);
|
|
184
|
+
if (frame != null) cancelAnimationFrame(frame);
|
|
185
|
+
if (!animate) {
|
|
186
|
+
list.scrollTop = top;
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const start = list.scrollTop;
|
|
190
|
+
const distance = top - start;
|
|
191
|
+
if (Math.abs(distance) < 1) {
|
|
192
|
+
list.scrollTop = top;
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const startedAt = performance.now();
|
|
196
|
+
const duration = 180;
|
|
197
|
+
const tick = (now2) => {
|
|
198
|
+
const progress = Math.min((now2 - startedAt) / duration, 1);
|
|
199
|
+
const eased = 1 - Math.pow(1 - progress, 3);
|
|
200
|
+
list.scrollTop = start + distance * eased;
|
|
201
|
+
if (progress < 1) {
|
|
202
|
+
scrollFramesRef.current.set(list, requestAnimationFrame(tick));
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
scrollFramesRef.current.delete(list);
|
|
206
|
+
list.scrollTop = top;
|
|
207
|
+
};
|
|
208
|
+
scrollFramesRef.current.set(list, requestAnimationFrame(tick));
|
|
209
|
+
},
|
|
210
|
+
[]
|
|
211
|
+
);
|
|
212
|
+
React.useEffect(() => {
|
|
213
|
+
if (!open) return;
|
|
214
|
+
const shouldAnimate = wasOpenRef.current && scrollSignatureRef.current != null && scrollSignatureRef.current !== scrollSignature;
|
|
215
|
+
requestAnimationFrame(() => {
|
|
216
|
+
panelRef.current?.querySelectorAll(".time-picker-list").forEach((list) => {
|
|
217
|
+
const selected = list.querySelector(".time-picker-option.selected");
|
|
218
|
+
if (!selected) return;
|
|
219
|
+
const top = selected.offsetTop - list.offsetTop - list.clientHeight / 2 + selected.offsetHeight / 2;
|
|
220
|
+
scrollListTo(list, top, shouldAnimate);
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
wasOpenRef.current = open;
|
|
224
|
+
scrollSignatureRef.current = scrollSignature;
|
|
225
|
+
}, [open, scrollListTo, scrollSignature]);
|
|
226
|
+
React.useEffect(() => {
|
|
227
|
+
if (open) return;
|
|
228
|
+
wasOpenRef.current = false;
|
|
229
|
+
scrollSignatureRef.current = null;
|
|
230
|
+
}, [open]);
|
|
231
|
+
React.useEffect(
|
|
232
|
+
() => () => {
|
|
233
|
+
scrollFramesRef.current.forEach((frame) => cancelAnimationFrame(frame));
|
|
234
|
+
scrollFramesRef.current.clear();
|
|
235
|
+
},
|
|
236
|
+
[]
|
|
237
|
+
);
|
|
238
|
+
const panelBase = currentParts ?? getNow();
|
|
239
|
+
const hourOptions = buildOptions(23, hourStep, currentParts?.hour);
|
|
240
|
+
const minuteOptions = buildOptions(59, minuteStep, currentParts?.minute);
|
|
241
|
+
const secondOptions = buildOptions(59, secondStep, currentParts?.second);
|
|
242
|
+
const findAvailableTime = (key, value2) => {
|
|
243
|
+
const preferred = compose(panelBase, key, value2);
|
|
244
|
+
if (!isDisabledTime(preferred)) return preferred;
|
|
245
|
+
const hours = key === "hour" ? [value2] : [...hourOptions].sort(byDistanceFrom(panelBase.hour));
|
|
246
|
+
const minutes = key === "minute" ? [value2] : [...minuteOptions].sort(byDistanceFrom(panelBase.minute));
|
|
247
|
+
const seconds = key === "second" ? [value2] : includeSecond ? [...secondOptions].sort(byDistanceFrom(panelBase.second)) : [0];
|
|
248
|
+
for (const hour of hours) {
|
|
249
|
+
for (const minute of minutes) {
|
|
250
|
+
for (const second of seconds) {
|
|
251
|
+
const candidate = { hour, minute, second };
|
|
252
|
+
if (!isDisabledTime(candidate)) return candidate;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
return null;
|
|
257
|
+
};
|
|
258
|
+
const pick = (key, nextValue) => {
|
|
259
|
+
const next = findAvailableTime(key, nextValue);
|
|
260
|
+
if (next) commit(next);
|
|
261
|
+
};
|
|
262
|
+
const handleInputChange = (next) => {
|
|
263
|
+
setDraft(next);
|
|
264
|
+
if (next.trim() === "") commit(null);
|
|
265
|
+
};
|
|
266
|
+
const handleInputBlur = () => {
|
|
267
|
+
if (!draft.trim()) {
|
|
268
|
+
setDraft(current ?? "");
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
const parsed = parseTime(draft);
|
|
272
|
+
if (!parsed || isDisabledTime(parsed)) {
|
|
273
|
+
setDraft(current ?? "");
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
commit(parsed);
|
|
277
|
+
};
|
|
278
|
+
const handleRootKeyDown = (event) => {
|
|
279
|
+
onKeyDown?.(event);
|
|
280
|
+
if (event.defaultPrevented) return;
|
|
281
|
+
if ((event.key === "ArrowDown" || event.key === "Enter") && !open) {
|
|
282
|
+
event.preventDefault();
|
|
283
|
+
setOpen(true);
|
|
284
|
+
}
|
|
285
|
+
if (event.key === "Escape" && open) {
|
|
286
|
+
event.preventDefault();
|
|
287
|
+
setOpen(false);
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
const renderColumn = (label, key, options) => /* @__PURE__ */ jsxs("div", { className: "time-picker-column", children: [
|
|
291
|
+
/* @__PURE__ */ jsx("div", { className: "time-picker-column-label", children: label }),
|
|
292
|
+
/* @__PURE__ */ jsx("div", { className: "time-picker-list", role: "listbox", "aria-label": label, children: options.map((option) => {
|
|
293
|
+
const selected = currentParts?.[key] === option;
|
|
294
|
+
const optionDisabled = findAvailableTime(key, option) == null;
|
|
295
|
+
return /* @__PURE__ */ jsx(
|
|
296
|
+
"button",
|
|
297
|
+
{
|
|
298
|
+
type: "button",
|
|
299
|
+
role: "option",
|
|
300
|
+
"aria-selected": selected,
|
|
301
|
+
disabled: optionDisabled,
|
|
302
|
+
className: `time-picker-option ${selected ? "selected" : ""}`,
|
|
303
|
+
onClick: () => pick(key, option),
|
|
304
|
+
children: pad(option)
|
|
305
|
+
},
|
|
306
|
+
option
|
|
307
|
+
);
|
|
308
|
+
}) })
|
|
309
|
+
] });
|
|
310
|
+
const mergedPanelClassName = [popupClassName, dropdownClassName].filter(Boolean).join(" ");
|
|
311
|
+
const now = getNow();
|
|
312
|
+
const nowDisabled = isDisabledTime(now);
|
|
313
|
+
const rootClassName = [
|
|
314
|
+
"time-picker",
|
|
315
|
+
size,
|
|
316
|
+
open && "open",
|
|
317
|
+
disabled && "disabled",
|
|
318
|
+
readOnly && "readonly",
|
|
319
|
+
invalid && "invalid",
|
|
320
|
+
className
|
|
321
|
+
].filter(Boolean).join(" ");
|
|
322
|
+
return /* @__PURE__ */ jsxs("div", { ref: setRootRef, className: rootClassName, onKeyDown: handleRootKeyDown, ...rest, children: [
|
|
323
|
+
/* @__PURE__ */ jsx(
|
|
324
|
+
Input,
|
|
325
|
+
{
|
|
326
|
+
value: draft,
|
|
327
|
+
size,
|
|
328
|
+
placeholder,
|
|
329
|
+
disabled,
|
|
330
|
+
readOnly,
|
|
331
|
+
invalid,
|
|
332
|
+
allowClear,
|
|
333
|
+
leadingIcon: "clock",
|
|
334
|
+
onFocus: () => setOpen(true),
|
|
335
|
+
onClick: () => setOpen(true),
|
|
336
|
+
onValueChange: handleInputChange,
|
|
337
|
+
onBlur: handleInputBlur,
|
|
338
|
+
inputMode: "numeric",
|
|
339
|
+
"aria-expanded": open,
|
|
340
|
+
"aria-haspopup": "dialog"
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
open && !disabled && !readOnly && typeof document !== "undefined" && createPortal(
|
|
344
|
+
/* @__PURE__ */ jsxs(
|
|
345
|
+
"div",
|
|
346
|
+
{
|
|
347
|
+
ref: panelRef,
|
|
348
|
+
className: `time-picker-panel ${includeSecond ? "with-second" : "without-second"} ${mergedPanelClassName}`,
|
|
349
|
+
role: "dialog",
|
|
350
|
+
style: floatingStyle,
|
|
351
|
+
children: [
|
|
352
|
+
/* @__PURE__ */ jsxs("div", { className: "time-picker-columns", children: [
|
|
353
|
+
renderColumn("\u65F6", "hour", hourOptions),
|
|
354
|
+
renderColumn("\u5206", "minute", minuteOptions),
|
|
355
|
+
includeSecond && renderColumn("\u79D2", "second", secondOptions)
|
|
356
|
+
] }),
|
|
357
|
+
/* @__PURE__ */ jsxs("div", { className: "time-picker-footer", children: [
|
|
358
|
+
/* @__PURE__ */ jsx(
|
|
359
|
+
Button,
|
|
360
|
+
{
|
|
361
|
+
size: "sm",
|
|
362
|
+
variant: "ghost",
|
|
363
|
+
disabled: nowDisabled,
|
|
364
|
+
onClick: () => commit(now),
|
|
365
|
+
children: "\u73B0\u5728"
|
|
366
|
+
}
|
|
367
|
+
),
|
|
368
|
+
/* @__PURE__ */ jsx("span", { className: "time-picker-footer-spacer" }),
|
|
369
|
+
allowClear && /* @__PURE__ */ jsx(
|
|
370
|
+
Button,
|
|
371
|
+
{
|
|
372
|
+
size: "sm",
|
|
373
|
+
variant: "ghost",
|
|
374
|
+
onClick: () => {
|
|
375
|
+
commit(null);
|
|
376
|
+
setOpen(false);
|
|
377
|
+
},
|
|
378
|
+
children: "\u6E05\u7A7A"
|
|
379
|
+
}
|
|
380
|
+
),
|
|
381
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: "primary", onClick: () => setOpen(false), children: "\u786E\u5B9A" })
|
|
382
|
+
] })
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
),
|
|
386
|
+
document.body
|
|
387
|
+
)
|
|
388
|
+
] });
|
|
389
|
+
}
|
|
390
|
+
);
|
|
391
|
+
TimePicker.displayName = "TimePicker";
|
|
392
|
+
|
|
393
|
+
export { TimePicker };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./tokens-
|
|
3
|
+
var chunk7YJV45U6_cjs = require('./chunk-7YJV45U6.cjs');
|
|
4
|
+
require('./tokens-RYJ3DFTU.css');
|
|
5
5
|
require('./shared-NJHRNLRH.css');
|
|
6
6
|
require('./TablePro-3NGWERWT.css');
|
|
7
7
|
var React = require('react');
|
|
@@ -71,7 +71,7 @@ var TableProInner = ({
|
|
|
71
71
|
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "table-toolbar-actions", children: actions })
|
|
72
72
|
] }),
|
|
73
73
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
74
|
-
|
|
74
|
+
chunk7YJV45U6_cjs.Table,
|
|
75
75
|
{
|
|
76
76
|
columns,
|
|
77
77
|
data,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./tokens-
|
|
3
|
+
var chunkQMX67CVT_cjs = require('./chunk-QMX67CVT.cjs');
|
|
4
|
+
require('./tokens-RYJ3DFTU.css');
|
|
5
5
|
require('./shared-NJHRNLRH.css');
|
|
6
6
|
require('./Message-H222YGR6.css');
|
|
7
7
|
var React = require('react');
|
|
@@ -117,12 +117,12 @@ var MessageContainer = React__namespace.forwardRef(({ placement = "top-right", c
|
|
|
117
117
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: `message-container ${placement} ${className}`, ...rest, children: list.map((t) => {
|
|
118
118
|
const iconName = t.type === "success" ? "check2" : t.type === "warning" || t.type === "error" ? "alert" : "info";
|
|
119
119
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `message ${t.type}`, role: "status", children: [
|
|
120
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: iconName, size: 18, className: "message-icon" }),
|
|
121
121
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "message-body", children: [
|
|
122
122
|
t.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "message-title", children: t.title }),
|
|
123
123
|
t.content && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "message-content", children: t.content })
|
|
124
124
|
] }),
|
|
125
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "message-close", onClick: () => message.dismiss(t.key ?? t.id), "aria-label": "Dismiss", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
125
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "message-close", onClick: () => message.dismiss(t.key ?? t.id), "aria-label": "Dismiss", children: /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "x", size: 14 }) })
|
|
126
126
|
] }, t.id);
|
|
127
127
|
}) }),
|
|
128
128
|
document.body
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./tokens-
|
|
3
|
+
var chunkQMX67CVT_cjs = require('./chunk-QMX67CVT.cjs');
|
|
4
|
+
require('./tokens-RYJ3DFTU.css');
|
|
5
5
|
require('./shared-NJHRNLRH.css');
|
|
6
|
-
require('./Image-
|
|
6
|
+
require('./Image-TDCXJISG.css');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var ReactDOM = require('react-dom');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -42,6 +42,8 @@ var Image = React__namespace.forwardRef(({
|
|
|
42
42
|
objectFit,
|
|
43
43
|
objectPosition,
|
|
44
44
|
preview,
|
|
45
|
+
previewClassName = "",
|
|
46
|
+
previewStyle,
|
|
45
47
|
hover = true,
|
|
46
48
|
placeholder,
|
|
47
49
|
imgProps,
|
|
@@ -97,10 +99,10 @@ var Image = React__namespace.forwardRef(({
|
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
),
|
|
100
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `n-image-placeholder ${loaded && !err ? "loaded" : ""}`, children: placeholder ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
102
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `n-image-placeholder ${loaded && !err ? "loaded" : ""}`, children: placeholder ?? /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "image", size: 28 }) }),
|
|
101
103
|
canPreview && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
102
104
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "image-hint", children: [
|
|
103
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "eye", size: 14 }),
|
|
104
106
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "\u70B9\u51FB\u67E5\u770B" })
|
|
105
107
|
] }),
|
|
106
108
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "image-actions", onClick: (e) => e.stopPropagation(), children: [
|
|
@@ -111,17 +113,25 @@ var Image = React__namespace.forwardRef(({
|
|
|
111
113
|
className: "ia-btn",
|
|
112
114
|
onClick: () => setOpen(true),
|
|
113
115
|
"aria-label": "\u9884\u89C8",
|
|
114
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
116
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "eye", size: 13 })
|
|
115
117
|
}
|
|
116
118
|
),
|
|
117
|
-
src && /* @__PURE__ */ jsxRuntime.jsx("a", { className: "ia-btn", href: src, download: true, "aria-label": "\u4E0B\u8F7D", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
+
src && /* @__PURE__ */ jsxRuntime.jsx("a", { className: "ia-btn", href: src, download: true, "aria-label": "\u4E0B\u8F7D", children: /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "download", size: 13 }) })
|
|
118
120
|
] })
|
|
119
121
|
] })
|
|
120
122
|
] })
|
|
121
123
|
}
|
|
122
124
|
),
|
|
123
125
|
open && typeof document !== "undefined" && ReactDOM__default.default.createPortal(
|
|
124
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
126
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
className: ["image-preview-overlay", previewClassName].filter(Boolean).join(" "),
|
|
130
|
+
style: previewStyle,
|
|
131
|
+
onClick: () => setOpen(false),
|
|
132
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, onClick: (e) => e.stopPropagation() })
|
|
133
|
+
}
|
|
134
|
+
),
|
|
125
135
|
document.body
|
|
126
136
|
)
|
|
127
137
|
] });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkYB3IWIOJ_cjs = require('./chunk-YB3IWIOJ.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
require('./tokens-
|
|
4
|
+
var chunkVS3I5OKA_cjs = require('./chunk-VS3I5OKA.cjs');
|
|
5
|
+
var chunkQMX67CVT_cjs = require('./chunk-QMX67CVT.cjs');
|
|
6
|
+
require('./tokens-RYJ3DFTU.css');
|
|
7
7
|
require('./shared-NJHRNLRH.css');
|
|
8
8
|
require('./Cascader-ANEQUPMI.css');
|
|
9
9
|
var React = require('react');
|
|
@@ -179,17 +179,17 @@ var Cascader = React__namespace.forwardRef(({
|
|
|
179
179
|
role: "button",
|
|
180
180
|
"aria-label": "Clear",
|
|
181
181
|
onClick: clear,
|
|
182
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
182
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "x", size: 12 })
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "absolute", right: 12, color: "var(--fg-subtle)" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
185
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "absolute", right: 12, color: "var(--fg-subtle)" }, children: /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "chevDown", size: 14 }) })
|
|
186
186
|
]
|
|
187
187
|
}
|
|
188
188
|
),
|
|
189
189
|
open && typeof document !== "undefined" && reactDom.createPortal(
|
|
190
190
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { ref: panelRef, className: panelClassName, style: floatingStyle, children: [
|
|
191
191
|
searchable && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cascader-search", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
192
|
-
|
|
192
|
+
chunkVS3I5OKA_cjs.Input,
|
|
193
193
|
{
|
|
194
194
|
ref: searchRef,
|
|
195
195
|
size: "sm",
|
|
@@ -222,9 +222,9 @@ var Cascader = React__namespace.forwardRef(({
|
|
|
222
222
|
disabled: o.disabled,
|
|
223
223
|
onClick: () => pick(depth, o.value, hasChildren),
|
|
224
224
|
children: [
|
|
225
|
-
|
|
225
|
+
chunkQMX67CVT_cjs.renderIconSlot(o.icon, { size: 13, className: "cascader-icon" }),
|
|
226
226
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: o.label }),
|
|
227
|
-
hasChildren && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chev", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
227
|
+
hasChildren && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "chev", children: /* @__PURE__ */ jsxRuntime.jsx(chunkQMX67CVT_cjs.Icon, { name: "chevRight", size: 12 }) })
|
|
228
228
|
]
|
|
229
229
|
},
|
|
230
230
|
o.value
|