dsh-plugin-core-demo 0.20.9 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +1097 -935
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -37,7 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
apply: () => apply
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(index_exports);
|
|
40
|
-
var
|
|
40
|
+
var import_react87 = require("react");
|
|
41
41
|
var import_dsh_client_ui_primitives6 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
42
42
|
|
|
43
43
|
// dist/design/tokens-css.generated.js
|
|
@@ -3893,6 +3893,15 @@ function Loader(props) {
|
|
|
3893
3893
|
|
|
3894
3894
|
// dist/ui/Button.js
|
|
3895
3895
|
var import_react9 = require("react");
|
|
3896
|
+
|
|
3897
|
+
// dist/ui/thenable.js
|
|
3898
|
+
function isThenable(value) {
|
|
3899
|
+
if (value === null || value === void 0)
|
|
3900
|
+
return false;
|
|
3901
|
+
return typeof value.then === "function";
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
// dist/ui/Button.js
|
|
3896
3905
|
var SOLID_VARIANTS = [
|
|
3897
3906
|
"primary",
|
|
3898
3907
|
"secondary",
|
|
@@ -3931,9 +3940,32 @@ function colorVars(variant, color) {
|
|
|
3931
3940
|
function buttonClass(variant, size4, block2, hasIcon, extra) {
|
|
3932
3941
|
return `dshpc-btn dshpc-btn--${variant} dshpc-btn--${size4}${block2 ? " dshpc-btn--block" : ""}${hasIcon ? " dshpc-btn--icon-start" : ""}${extra !== void 0 && extra !== "" ? ` ${extra}` : ""}`;
|
|
3933
3942
|
}
|
|
3943
|
+
function useAsyncClick(onClick, onBusyChange) {
|
|
3944
|
+
const [busy, setBusy] = (0, import_react9.useState)(false);
|
|
3945
|
+
const click = (event) => {
|
|
3946
|
+
if (onClick === void 0)
|
|
3947
|
+
return;
|
|
3948
|
+
const out = onClick(event);
|
|
3949
|
+
if (!isThenable(out))
|
|
3950
|
+
return;
|
|
3951
|
+
setBusy(true);
|
|
3952
|
+
onBusyChange?.(true);
|
|
3953
|
+
const done = () => {
|
|
3954
|
+
setBusy(false);
|
|
3955
|
+
onBusyChange?.(false);
|
|
3956
|
+
};
|
|
3957
|
+
void out.then(done, (err) => {
|
|
3958
|
+
done();
|
|
3959
|
+
console.error("[dsh-plugin-core] Button \u5F02\u6B65\u70B9\u51FB\u5931\u8D25\uFF0C\u5DF2\u6062\u590D\u53EF\u70B9\uFF1A", err);
|
|
3960
|
+
});
|
|
3961
|
+
};
|
|
3962
|
+
return { busy, click };
|
|
3963
|
+
}
|
|
3934
3964
|
function Button(props) {
|
|
3935
3965
|
ensureComponentStyles("button", BUTTON_CSS);
|
|
3936
|
-
const { variant = "outline", size: size4 = "lg", icon: icon2, iconRight, color, loading = false, block: block2 = false, width, minWidth, maxWidth, className: className2, style: style2, children, ...rest } = props;
|
|
3966
|
+
const { variant = "outline", size: size4 = "lg", icon: icon2, iconRight, color, loading: loadingProp = false, block: block2 = false, width, minWidth, maxWidth, className: className2, style: style2, children, onClick, onBusyChange, ...rest } = props;
|
|
3967
|
+
const asyncClick = useAsyncClick(onClick, onBusyChange);
|
|
3968
|
+
const loading = loadingProp || asyncClick.busy;
|
|
3937
3969
|
const widthStyle = {};
|
|
3938
3970
|
if (width !== void 0) {
|
|
3939
3971
|
widthStyle.width = width;
|
|
@@ -3948,14 +3980,24 @@ function Button(props) {
|
|
|
3948
3980
|
...rest,
|
|
3949
3981
|
type: rest.type ?? "button",
|
|
3950
3982
|
disabled: rest.disabled === true || loading,
|
|
3983
|
+
onClick: asyncClick.click,
|
|
3951
3984
|
className: buttonClass(variant, size4, block2, icon2 !== void 0 && icon2 !== null && !loading, className2),
|
|
3952
3985
|
style: { ...colorVars(variant, color), ...widthStyle, ...style2 }
|
|
3953
3986
|
};
|
|
3954
|
-
return (0, import_react9.createElement)(
|
|
3987
|
+
return (0, import_react9.createElement)(
|
|
3988
|
+
"button",
|
|
3989
|
+
attrs2,
|
|
3990
|
+
loading ? (0, import_react9.createElement)(Loader, { size: "xs" }) : icon2 !== void 0 && icon2 !== null ? (0, import_react9.createElement)("span", { className: "dshpc-btn__icon" }, icon2) : null,
|
|
3991
|
+
marqueeLabel ? (0, import_react9.createElement)(MarqueeText, { text: children, className: "dshpc-btn__label" }) : children,
|
|
3992
|
+
// 转圈期间所有图标位都让位:前置位被 Loader 顶替,后置位(展开 / 外链)留在禁用态里只会挤版面
|
|
3993
|
+
iconRight !== void 0 && iconRight !== null && !loading ? (0, import_react9.createElement)("span", { className: "dshpc-btn__icon-end" }, iconRight) : null
|
|
3994
|
+
);
|
|
3955
3995
|
}
|
|
3956
3996
|
function IconButton(props) {
|
|
3957
3997
|
ensureComponentStyles("button", BUTTON_CSS);
|
|
3958
|
-
const { variant = "plain", size: size4 = "lg", icon: icon2, label, color, background: background2, className: className2, style: style2, ...rest } = props;
|
|
3998
|
+
const { variant = "plain", size: size4 = "lg", icon: icon2, label, color, background: background2, loading: loadingProp = false, className: className2, style: style2, onClick, onBusyChange, ...rest } = props;
|
|
3999
|
+
const asyncClick = useAsyncClick(onClick, onBusyChange);
|
|
4000
|
+
const loading = loadingProp || asyncClick.busy;
|
|
3959
4001
|
const accent = {};
|
|
3960
4002
|
if (color !== void 0 && color !== "") {
|
|
3961
4003
|
accent["--icb-fg"] = color;
|
|
@@ -3971,10 +4013,14 @@ function IconButton(props) {
|
|
|
3971
4013
|
type: rest.type ?? "button",
|
|
3972
4014
|
title: rest.title ?? label,
|
|
3973
4015
|
"aria-label": rest["aria-label"] ?? label,
|
|
4016
|
+
// 无障碍名不变(仍是 label),只声明「正在忙」,读屏不会把圈读成内容
|
|
4017
|
+
"aria-busy": loading || void 0,
|
|
4018
|
+
disabled: rest.disabled === true || loading,
|
|
4019
|
+
onClick: asyncClick.click,
|
|
3974
4020
|
className: `dshpc-iconbtn dshpc-iconbtn--${variant} dshpc-iconbtn--${size4}${className2 !== void 0 && className2 !== "" ? ` ${className2}` : ""}`,
|
|
3975
4021
|
style: { ...accent, ...style2 }
|
|
3976
4022
|
};
|
|
3977
|
-
return (0, import_react9.createElement)("button", attrs2, icon2);
|
|
4023
|
+
return (0, import_react9.createElement)("button", attrs2, loading ? (0, import_react9.createElement)(Loader, { size: "xs" }) : icon2);
|
|
3978
4024
|
}
|
|
3979
4025
|
|
|
3980
4026
|
// dist/utils/date.js
|
|
@@ -4022,10 +4068,10 @@ function formatDurationHms(ms) {
|
|
|
4022
4068
|
if (!Number.isFinite(ms) || ms < 0)
|
|
4023
4069
|
return "-";
|
|
4024
4070
|
const totalSec = Math.round(ms / 1e3);
|
|
4025
|
-
const
|
|
4071
|
+
const h78 = Math.floor(totalSec / 3600);
|
|
4026
4072
|
const m = Math.floor(totalSec % 3600 / 60);
|
|
4027
4073
|
const s = totalSec % 60;
|
|
4028
|
-
return
|
|
4074
|
+
return h78 > 0 ? `${h78}:${pad2(m)}:${pad2(s)}` : `${pad2(m)}:${pad2(s)}`;
|
|
4029
4075
|
}
|
|
4030
4076
|
function sameCalendarDay(a, b) {
|
|
4031
4077
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
@@ -4909,19 +4955,20 @@ function OverlayHead(props) {
|
|
|
4909
4955
|
function Modal(props) {
|
|
4910
4956
|
ensureComponentStyles("feedback", FEEDBACK_CSS);
|
|
4911
4957
|
const tt = props.translate ?? t;
|
|
4912
|
-
const
|
|
4913
|
-
|
|
4958
|
+
const busy = props.busy === true;
|
|
4959
|
+
const closeOnMask = !busy && props.closeOnMask !== false;
|
|
4960
|
+
useEscapeClose(!busy && props.escClose !== false, busy ? void 0 : props.onClose);
|
|
4914
4961
|
const sizeStyle = {
|
|
4915
4962
|
sm: { width: "360px", maxWidth: "calc(100% - 48px)" },
|
|
4916
4963
|
md: { width: "min(720px, calc(100% - 32px))", maxHeight: "86vh" },
|
|
4917
4964
|
lg: { width: "min(1120px, calc(100% - 32px))", height: "calc(100% - 80px)" }
|
|
4918
4965
|
};
|
|
4919
4966
|
const s = sizeStyle[props.size ?? "md"];
|
|
4920
|
-
const showClose = props.closable !== false && props.onClose !== void 0;
|
|
4967
|
+
const showClose = props.closable !== false && props.onClose !== void 0 && !busy;
|
|
4921
4968
|
const showHeader = props.hideHeader !== true && (props.icon !== void 0 || props.title !== void 0 || props.subtitle !== void 0 || props.headerExtra !== void 0 || props.headerActions !== void 0 || showClose);
|
|
4922
4969
|
return (0, import_react17.createElement)(
|
|
4923
4970
|
OverlayMask,
|
|
4924
|
-
{ kind: "center", closeOnMask, onClose: props.onClose },
|
|
4971
|
+
{ kind: "center", closeOnMask, onClose: busy ? void 0 : props.onClose },
|
|
4925
4972
|
// 表面(底色/描边/圆角/阴影)来自 panel.css 的 modal 档;`.dshpc-modal` 只剩家族布局,
|
|
4926
4973
|
// 且继续作为既有类名别名存在(消费方写在它上面的覆盖不受影响)。
|
|
4927
4974
|
(0, import_react17.createElement)(
|
|
@@ -5014,8 +5061,9 @@ function SideSheet(props) {
|
|
|
5014
5061
|
ensureComponentStyles("side-sheet", SIDE_SHEET_CSS);
|
|
5015
5062
|
const tt = props.translate ?? t;
|
|
5016
5063
|
const side = props.side ?? "left";
|
|
5017
|
-
const
|
|
5018
|
-
|
|
5064
|
+
const busy = props.busy === true;
|
|
5065
|
+
const closeOnMask = !busy && props.closeOnMask !== false;
|
|
5066
|
+
useEscapeClose(!busy && props.escClose !== false, busy ? void 0 : props.onClose);
|
|
5019
5067
|
const [width, setWidth] = (0, import_react18.useState)(props.width ?? 460);
|
|
5020
5068
|
const panelRef = (0, import_react18.useRef)(null);
|
|
5021
5069
|
const leaving = props.open === false;
|
|
@@ -5026,7 +5074,7 @@ function SideSheet(props) {
|
|
|
5026
5074
|
}, [leaving]);
|
|
5027
5075
|
if (unmounted)
|
|
5028
5076
|
return null;
|
|
5029
|
-
const showClose = props.closable !== false && props.onClose !== void 0;
|
|
5077
|
+
const showClose = props.closable !== false && props.onClose !== void 0 && !busy;
|
|
5030
5078
|
const hasHeader = props.header !== null;
|
|
5031
5079
|
const beginResize = (event) => {
|
|
5032
5080
|
const element = panelRef.current;
|
|
@@ -5069,7 +5117,7 @@ function SideSheet(props) {
|
|
|
5069
5117
|
}
|
|
5070
5118
|
return (0, import_react18.createElement)("div", { className: "dshpc-dock__head" }, props.icon === void 0 ? null : (0, import_react18.createElement)("div", { className: "dshpc-dock__lead" }, props.icon), (0, import_react18.createElement)("div", { className: "dshpc-dock__title" }, props.title), props.extra === void 0 ? null : (0, import_react18.createElement)("div", { className: "dshpc-dock__extra" }, props.extra));
|
|
5071
5119
|
};
|
|
5072
|
-
return (0, import_react18.createElement)(OverlayMask, { kind: "side", closeOnMask, onClose: props.onClose }, (0, import_react18.createElement)("section", {
|
|
5120
|
+
return (0, import_react18.createElement)(OverlayMask, { kind: "side", closeOnMask, onClose: busy ? void 0 : props.onClose }, (0, import_react18.createElement)("section", {
|
|
5073
5121
|
ref: (element) => {
|
|
5074
5122
|
panelRef.current = element;
|
|
5075
5123
|
},
|
|
@@ -5106,6 +5154,8 @@ function AlertModal(props) {
|
|
|
5106
5154
|
ensureComponentStyles("feedback", FEEDBACK_CSS);
|
|
5107
5155
|
const tt = props.translate ?? t;
|
|
5108
5156
|
const severity = props.severity ?? "info";
|
|
5157
|
+
const [running, setRunning] = (0, import_react19.useState)(false);
|
|
5158
|
+
const busy = running || props.confirmLoading === true;
|
|
5109
5159
|
return (0, import_react19.createElement)(Modal, {
|
|
5110
5160
|
icon: (0, import_react19.createElement)("span", { className: `dshpc-alert-sev dshpc-alert-sev--${severity}` }, SEVERITY_GLYPH[severity]),
|
|
5111
5161
|
title: props.title,
|
|
@@ -5113,8 +5163,9 @@ function AlertModal(props) {
|
|
|
5113
5163
|
hideHeader: props.title === void 0,
|
|
5114
5164
|
closable: false,
|
|
5115
5165
|
closeOnMask: props.closeOnMask,
|
|
5166
|
+
busy,
|
|
5116
5167
|
onClose: props.onConfirm,
|
|
5117
|
-
footer: (0, import_react19.createElement)(Button, { variant: "primary", onClick: () => props.onConfirm?.() }, props.confirmText ?? tt("dialogOk"))
|
|
5168
|
+
footer: (0, import_react19.createElement)(Button, { variant: "primary", loading: props.confirmLoading === true, onBusyChange: setRunning, onClick: () => props.onConfirm?.() }, props.confirmText ?? tt("dialogOk"))
|
|
5118
5169
|
}, props.message ?? null);
|
|
5119
5170
|
}
|
|
5120
5171
|
|
|
@@ -5124,14 +5175,18 @@ function ConfirmModal(props) {
|
|
|
5124
5175
|
const tt = props.translate ?? t;
|
|
5125
5176
|
const tone = props.tone ?? "primary";
|
|
5126
5177
|
const confirmVariant = tone === "danger" ? "danger" : tone === "warning" ? "warning" : "primary";
|
|
5178
|
+
const [confirmBusy, setConfirmBusy] = (0, import_react20.useState)(false);
|
|
5179
|
+
const [cancelBusy, setCancelBusy] = (0, import_react20.useState)(false);
|
|
5180
|
+
const busy = confirmBusy || cancelBusy || props.confirmLoading === true || props.cancelLoading === true;
|
|
5127
5181
|
return (0, import_react20.createElement)(Modal, {
|
|
5128
5182
|
title: props.title,
|
|
5129
5183
|
size: props.size ?? "sm",
|
|
5130
5184
|
hideHeader: props.title === void 0,
|
|
5131
5185
|
closable: false,
|
|
5132
5186
|
closeOnMask: props.closeOnMask,
|
|
5187
|
+
busy,
|
|
5133
5188
|
onClose: props.onCancel,
|
|
5134
|
-
footer: (0, import_react20.createElement)("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end" } }, (0, import_react20.createElement)(Button, { variant: "outline", onClick: () => props.onCancel?.() }, props.cancelText ?? tt("cancel")), (0, import_react20.createElement)(Button, { variant: confirmVariant, onClick: () => props.onConfirm?.() }, props.confirmText ?? tt("confirm")))
|
|
5189
|
+
footer: (0, import_react20.createElement)("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end" } }, (0, import_react20.createElement)(Button, { variant: "outline", loading: props.cancelLoading === true, onBusyChange: setCancelBusy, onClick: () => props.onCancel?.() }, props.cancelText ?? tt("cancel")), (0, import_react20.createElement)(Button, { variant: confirmVariant, loading: props.confirmLoading === true, onBusyChange: setConfirmBusy, onClick: () => props.onConfirm?.() }, props.confirmText ?? tt("confirm")))
|
|
5135
5190
|
}, props.message ?? null);
|
|
5136
5191
|
}
|
|
5137
5192
|
|
|
@@ -5188,17 +5243,33 @@ function confirmModal(opts) {
|
|
|
5188
5243
|
}
|
|
5189
5244
|
console.warn('[dsh-plugin-core] confirmModal skin:"host" \u9700\u5148\u5F15\u5165\u5B98\u65B9\u9002\u914D\u5C42 official.js\uFF0C\u5DF2\u56DE\u843D\u5230 core \u76AE\u80A4');
|
|
5190
5245
|
}
|
|
5191
|
-
const { skin: _skin, ...core } = opts;
|
|
5246
|
+
const { skin: _skin, onConfirm, onCancel, ...core } = opts;
|
|
5192
5247
|
void _skin;
|
|
5193
5248
|
return new Promise((resolve) => {
|
|
5194
5249
|
const id3 = ++idSeq;
|
|
5250
|
+
let closed = false;
|
|
5195
5251
|
const close = (result) => {
|
|
5252
|
+
if (closed)
|
|
5253
|
+
return;
|
|
5254
|
+
closed = true;
|
|
5196
5255
|
dismiss(id3);
|
|
5197
5256
|
resolve(result);
|
|
5198
5257
|
};
|
|
5258
|
+
const run = (which) => {
|
|
5259
|
+
if (closed)
|
|
5260
|
+
return void 0;
|
|
5261
|
+
const out = (which === "confirm" ? onConfirm : onCancel)?.();
|
|
5262
|
+
if (!isThenable(out)) {
|
|
5263
|
+
close(which === "confirm");
|
|
5264
|
+
return void 0;
|
|
5265
|
+
}
|
|
5266
|
+
void out.then(() => close(which === "confirm"), () => {
|
|
5267
|
+
});
|
|
5268
|
+
return out;
|
|
5269
|
+
};
|
|
5199
5270
|
entries.push({
|
|
5200
5271
|
id: id3,
|
|
5201
|
-
node: (0, import_react21.createElement)(ConfirmModal, { ...core, onConfirm: () =>
|
|
5272
|
+
node: (0, import_react21.createElement)(ConfirmModal, { ...core, onConfirm: () => run("confirm"), onCancel: () => run("cancel") })
|
|
5202
5273
|
});
|
|
5203
5274
|
flush();
|
|
5204
5275
|
});
|
|
@@ -5214,15 +5285,31 @@ function alertModal(opts) {
|
|
|
5214
5285
|
}
|
|
5215
5286
|
console.warn('[dsh-plugin-core] alertModal skin:"host" \u9700\u5148\u5F15\u5165\u5B98\u65B9\u9002\u914D\u5C42 official.js\uFF0C\u5DF2\u56DE\u843D\u5230 core \u76AE\u80A4');
|
|
5216
5287
|
}
|
|
5217
|
-
const { skin: _skin, ...core } = opts;
|
|
5288
|
+
const { skin: _skin, onConfirm, ...core } = opts;
|
|
5218
5289
|
void _skin;
|
|
5219
5290
|
return new Promise((resolve) => {
|
|
5220
5291
|
const id3 = ++idSeq;
|
|
5292
|
+
let closed = false;
|
|
5221
5293
|
const close = () => {
|
|
5294
|
+
if (closed)
|
|
5295
|
+
return;
|
|
5296
|
+
closed = true;
|
|
5222
5297
|
dismiss(id3);
|
|
5223
5298
|
resolve();
|
|
5224
5299
|
};
|
|
5225
|
-
|
|
5300
|
+
const run = () => {
|
|
5301
|
+
if (closed)
|
|
5302
|
+
return void 0;
|
|
5303
|
+
const out = onConfirm?.();
|
|
5304
|
+
if (!isThenable(out)) {
|
|
5305
|
+
close();
|
|
5306
|
+
return void 0;
|
|
5307
|
+
}
|
|
5308
|
+
void out.then(close, () => {
|
|
5309
|
+
});
|
|
5310
|
+
return out;
|
|
5311
|
+
};
|
|
5312
|
+
entries.push({ id: id3, node: (0, import_react21.createElement)(AlertModal, { ...core, onConfirm: () => run() }) });
|
|
5226
5313
|
flush();
|
|
5227
5314
|
});
|
|
5228
5315
|
}
|
|
@@ -6371,15 +6458,15 @@ var Toast = (props) => {
|
|
|
6371
6458
|
if (toastNode) {
|
|
6372
6459
|
const height = toastNode.getBoundingClientRect().height;
|
|
6373
6460
|
setInitialHeight(height);
|
|
6374
|
-
setHeights((
|
|
6461
|
+
setHeights((h78) => [
|
|
6375
6462
|
{
|
|
6376
6463
|
toastId: toast2.id,
|
|
6377
6464
|
height,
|
|
6378
6465
|
position: toast2.position
|
|
6379
6466
|
},
|
|
6380
|
-
...
|
|
6467
|
+
...h78
|
|
6381
6468
|
]);
|
|
6382
|
-
return () => setHeights((
|
|
6469
|
+
return () => setHeights((h78) => h78.filter((height2) => height2.toastId !== toast2.id));
|
|
6383
6470
|
}
|
|
6384
6471
|
}, [
|
|
6385
6472
|
setHeights,
|
|
@@ -6424,7 +6511,7 @@ var Toast = (props) => {
|
|
|
6424
6511
|
const deleteToast = import_react29.default.useCallback(() => {
|
|
6425
6512
|
setRemoved(true);
|
|
6426
6513
|
setOffsetBeforeRemove(offset4.current);
|
|
6427
|
-
setHeights((
|
|
6514
|
+
setHeights((h78) => h78.filter((height) => height.toastId !== toast2.id));
|
|
6428
6515
|
setTimeout(() => {
|
|
6429
6516
|
removeToast(toast2);
|
|
6430
6517
|
}, TIME_BEFORE_UNMOUNT);
|
|
@@ -6951,7 +7038,7 @@ var Toaster = /* @__PURE__ */ import_react29.default.forwardRef(function Toaster
|
|
|
6951
7038
|
closeButtonAriaLabel: toastOptions == null ? void 0 : toastOptions.closeButtonAriaLabel,
|
|
6952
7039
|
removeToast,
|
|
6953
7040
|
toasts: filteredToasts.filter((t4) => t4.position == toast2.position),
|
|
6954
|
-
heights: heights.filter((
|
|
7041
|
+
heights: heights.filter((h78) => h78.position == toast2.position),
|
|
6955
7042
|
setHeights,
|
|
6956
7043
|
expandByDefault: expand,
|
|
6957
7044
|
gap,
|
|
@@ -7116,23 +7203,6 @@ function createToasterHost() {
|
|
|
7116
7203
|
}
|
|
7117
7204
|
};
|
|
7118
7205
|
}
|
|
7119
|
-
function showToast(message, opts) {
|
|
7120
|
-
if (typeof document === "undefined")
|
|
7121
|
-
return;
|
|
7122
|
-
const host = toasterHost();
|
|
7123
|
-
if (host === null)
|
|
7124
|
-
return;
|
|
7125
|
-
if (opts?.position !== void 0)
|
|
7126
|
-
host.setPosition(opts.position);
|
|
7127
|
-
host.show({
|
|
7128
|
-
message,
|
|
7129
|
-
variant: opts?.variant ?? "info",
|
|
7130
|
-
style: "native",
|
|
7131
|
-
durationMs: opts?.durationMs ?? DEFAULT_MS,
|
|
7132
|
-
color: opts?.color,
|
|
7133
|
-
onDismiss: opts?.onDismiss
|
|
7134
|
-
});
|
|
7135
|
-
}
|
|
7136
7206
|
function notifyPalette(variant, theme2) {
|
|
7137
7207
|
switch (variant) {
|
|
7138
7208
|
case "success":
|
|
@@ -16629,7 +16699,7 @@ function applyDOMChangeInner(view, change, newSel, lastKey = -1) {
|
|
|
16629
16699
|
view.inputState.composing++;
|
|
16630
16700
|
let defaultTr;
|
|
16631
16701
|
let defaultInsert = () => defaultTr || (defaultTr = applyDefaultInsert(view, change, newSel));
|
|
16632
|
-
if (!view.state.facet(inputHandler).some((
|
|
16702
|
+
if (!view.state.facet(inputHandler).some((h78) => h78(view, change.from, change.to, text2, defaultInsert)))
|
|
16633
16703
|
view.dispatch(defaultInsert());
|
|
16634
16704
|
return true;
|
|
16635
16705
|
}
|
|
@@ -17567,12 +17637,12 @@ var HeightOracle = class {
|
|
|
17567
17637
|
mustRefreshForHeights(lineHeights) {
|
|
17568
17638
|
let newHeight = false;
|
|
17569
17639
|
for (let i2 = 0; i2 < lineHeights.length; i2++) {
|
|
17570
|
-
let
|
|
17571
|
-
if (
|
|
17640
|
+
let h78 = lineHeights[i2];
|
|
17641
|
+
if (h78 < 0) {
|
|
17572
17642
|
i2++;
|
|
17573
|
-
} else if (!this.heightSamples[Math.floor(
|
|
17643
|
+
} else if (!this.heightSamples[Math.floor(h78 * 10)]) {
|
|
17574
17644
|
newHeight = true;
|
|
17575
|
-
this.heightSamples[Math.floor(
|
|
17645
|
+
this.heightSamples[Math.floor(h78 * 10)] = true;
|
|
17576
17646
|
}
|
|
17577
17647
|
}
|
|
17578
17648
|
return newHeight;
|
|
@@ -17588,11 +17658,11 @@ var HeightOracle = class {
|
|
|
17588
17658
|
if (changed) {
|
|
17589
17659
|
this.heightSamples = {};
|
|
17590
17660
|
for (let i2 = 0; i2 < knownHeights.length; i2++) {
|
|
17591
|
-
let
|
|
17592
|
-
if (
|
|
17661
|
+
let h78 = knownHeights[i2];
|
|
17662
|
+
if (h78 < 0)
|
|
17593
17663
|
i2++;
|
|
17594
17664
|
else
|
|
17595
|
-
this.heightSamples[Math.floor(
|
|
17665
|
+
this.heightSamples[Math.floor(h78 * 10)] = true;
|
|
17596
17666
|
}
|
|
17597
17667
|
}
|
|
17598
17668
|
return changed;
|
|
@@ -25639,7 +25709,7 @@ var HighlightBuilder = class {
|
|
|
25639
25709
|
if (start >= to || end <= from2)
|
|
25640
25710
|
return;
|
|
25641
25711
|
if (type3.isTop)
|
|
25642
|
-
highlighters = this.highlighters.filter((
|
|
25712
|
+
highlighters = this.highlighters.filter((h78) => !h78.scope || h78.scope(type3));
|
|
25643
25713
|
let cls = inheritedClass;
|
|
25644
25714
|
let rule = getStyleTags(cursor2) || Rule.empty;
|
|
25645
25715
|
let tagCls = highlightTags(highlighters, rule.tags);
|
|
@@ -25656,7 +25726,7 @@ var HighlightBuilder = class {
|
|
|
25656
25726
|
let mounted = cursor2.tree && cursor2.tree.prop(NodeProp.mounted);
|
|
25657
25727
|
if (mounted && mounted.overlay) {
|
|
25658
25728
|
let inner = cursor2.node.enter(mounted.overlay[0].from + start, 1);
|
|
25659
|
-
let innerHighlighters = this.highlighters.filter((
|
|
25729
|
+
let innerHighlighters = this.highlighters.filter((h78) => !h78.scope || h78.scope(mounted.tree.type));
|
|
25660
25730
|
let hasChild2 = cursor2.firstChild();
|
|
25661
25731
|
for (let i2 = 0, pos = start; ; i2++) {
|
|
25662
25732
|
let next = i2 < mounted.overlay.length ? mounted.overlay[i2] : null;
|
|
@@ -58412,7 +58482,7 @@ var DICT2 = {
|
|
|
58412
58482
|
marqueeTitle: "MarqueeText \u8DD1\u9A6C\u706F",
|
|
58413
58483
|
liveTitle: "LiveText \u5B9E\u65F6\u6587\u672C",
|
|
58414
58484
|
feedbackModalHint: "\u81EA\u7ED8 overlay\uFF08\u4E0D\u7528 portal\uFF09\uFF1B\u70B9\u906E\u7F69 / Esc / \u2715 \u90FD\u80FD\u5173\u3002\u6807\u9898\u680F\u7684 \u2715 \u662F 24\xD724 \u56FE\u6807\u4F4D\uFF0C\u4E0D\u8BE5\u51FA\u73B0\u8FB9\u6846\u6216 120px \u5BBD\u7684\u5E95\u8272\u5757",
|
|
58415
|
-
feedbackToastHint: "\u547D\u4EE4\u5F0F
|
|
58485
|
+
feedbackToastHint: "\u547D\u4EE4\u5F0F notify\uFF0C\u4E0D\u8981\u6C42\u6302\u7EC4\u4EF6",
|
|
58416
58486
|
explorerDataTitle: "\u6570\u636E\u6765\u6E90\uFF08\u771F\u6570\u636E\uFF0C\u65E0 mock\uFF09",
|
|
58417
58487
|
explorerDataHint: "\u6587\u4EF6\u670D\u52A1\u53D6\u5BBF\u4E3B\u7684 remote.workspaceFiles\uFF08dotted \u6CE8\u5165\uFF09\uFF0C\u5DE5\u4F5C\u533A\u6E05\u5355\u53D6\u5B98\u65B9 workspaces \u670D\u52A1\u5FEB\u7167\uFF1B\u300C\u6700\u8FD1\u4F1A\u8BDD\u6240\u5C5E\u5DE5\u4F5C\u533A\u300D= \u66F4\u65B0\u8FC7\u7684\u6700\u65B0\u4E14\u5E26\u4F1A\u8BDD\u7684\u90A3\u4E2A\u5DE5\u4F5C\u533A\uFF08pickWorkspaceAnchor\uFF09\u2014\u2014list / read \u90FD\u8981 sessionId\uFF0C\u951A\u70B9\u5FC5\u987B\u5148\u843D\u5230\u4E00\u4E2A\u771F\u4F1A\u8BDD\u4E0A\u3002",
|
|
58418
58488
|
explorerFilesNone: "\u672A\u5C31\u4F4D\uFF1A\u5BBF\u4E3B\u8FD8\u6CA1\u7ED9\u51FA remote.workspaceFiles\uFF08\u6587\u4EF6\u9884\u89C8 / \u9009\u62E9\u90FD\u4E0D\u53EF\u7528\uFF0C\u4E0D\u9020\u5047\u6570\u636E\uFF09",
|
|
@@ -58449,7 +58519,7 @@ var DICT2 = {
|
|
|
58449
58519
|
exMarqueeHint: "\u53CC\u5C42\u7ED3\u6784\uFF1A\u5916\u5C42\u88C1\u526A\u3001\u5185\u5C42\u6EDA\u52A8\uFF1B\u8DD1\u4E00\u904D\u505C\u5728\u5C3E\u5B57\uFF0C\u9F20\u6807\u79FB\u5F00\u590D\u4F4D\u6210\u7701\u7565\u53F7",
|
|
58450
58520
|
exLiveHint: "\u8BA2\u9605\u5185\u90E8\u8282\u62CD\u5668\uFF0C\u8D70\u65F6 Ui \u7531\u8C03\u7528\u65B9\u6E32\u67D3",
|
|
58451
58521
|
exSmallModalTitle: "\u5C0F\u578B\u5F39\u7A97\uFF08\u81EA\u5B9A\u4E49\uFF09",
|
|
58452
|
-
exSmallModalHint: "\u6211\u4EEC\u7684\u6807\u51C6\u5C0F\u6846\uFF1AAlertModal\uFF08\u5355\u6309\u94AE + severity \u56FE\u6807\uFF09/ ConfirmModal\uFF08\u53CC\u6309\u94AE + \u8BED\u4E49\u6863\uFF09\uFF0C\u4EE5\u53CA\u547D\u4EE4\u5F0F alertModal()/confirmModal()\uFF08Promise\uFF09\u3002\u540D\u5B57\u5E26 Modal \u540E\u7F00\uFF0C\u4E0D\u8986\u76D6\u5BBF\u4E3B\u539F\u751F\u3002",
|
|
58522
|
+
exSmallModalHint: "\u6211\u4EEC\u7684\u6807\u51C6\u5C0F\u6846\uFF1AAlertModal\uFF08\u5355\u6309\u94AE + severity \u56FE\u6807\uFF09/ ConfirmModal\uFF08\u53CC\u6309\u94AE + \u8BED\u4E49\u6863\uFF09\uFF0C\u4EE5\u53CA\u547D\u4EE4\u5F0F alertModal()/confirmModal()\uFF08Promise\uFF09\u3002\u540D\u5B57\u5E26 Modal \u540E\u7F00\uFF0C\u4E0D\u8986\u76D6\u5BBF\u4E3B\u539F\u751F\u3002\u56DE\u8C03\u8FD4\u56DE Promise \u65F6\uFF08\u6D88\u8D39\u65B9\u5728\u505A\u5F02\u6B65\uFF09\uFF0C\u5BF9\u5E94\u6309\u94AE\u81EA\u5DF1\u8F6C\u5708\u3001\u6574\u6846\u9501\u6B7B\uFF08\u906E\u7F69 / Esc \u90FD\u5173\u4E0D\u6389\uFF09\uFF0Cresolve \u624D\u5173\u95ED\u3001reject \u5219\u64A4\u56DE loading \u7559\u7740\u91CD\u8BD5\uFF1B\u7EC4\u4EF6\u5F62\u6001\u4E5F\u53EF\u4EE5\u81EA\u5DF1\u4F20 confirmLoading / cancelLoading\u3002",
|
|
58453
58523
|
exLargeModalTitle: "\u5927\u578B\u5F39\u7A97\uFF08\u81EA\u5B9A\u4E49\uFF09",
|
|
58454
58524
|
exLargeModalHint: "\u6211\u4EEC\u7684\u5185\u5BB9\u5F39\u7A97\uFF1AModal\uFF08size md/lg\uFF09\uFF0C\u627F\u8F7D\u4EFB\u610F\u5185\u5BB9\uFF0C\u4E0D\u662F\u300C\u786E\u5B9A/\u53D6\u6D88\u300D\u547D\u4EE4\u5F0F\u3002\u4E09\u5F20\u793A\u4F8B\uFF1A\u9ED8\u8BA4 md / \u5E26 footer / \u65E0 footer\uFF08\u5185\u5BB9\u81EA\u5B9A\u4E49\uFF09\uFF0C\u5934\u90E8\u6392\u6CD5\u53EF\u4E0D\u540C\u3002",
|
|
58455
58525
|
exSideSheetTitle: "\u4FA7\u8FB9\u62BD\u5C49\uFF08\u8986\u76D6\u5F0F\uFF09",
|
|
@@ -58458,14 +58528,10 @@ var DICT2 = {
|
|
|
58458
58528
|
exHostModalHint: '\u5BBF\u4E3B\u5185\u6838\u5B98\u65B9 Modal\uFF1A\u906E\u7F69/\u5934\u90E8/\u5173\u95ED\u53C9\u5168\u5F52\u5BBF\u4E3B\u7BA1\uFF1B\u6B63\u6587\u533A\u585E\u4EFB\u610F\u5185\u5BB9\uFF0Cfooter \u4EFB\u610F\u6309\u94AE\u7EC4\u5408\u3002\u547D\u4EE4\u5F0F\u7528 confirmModal/alertModal \u52A0 skin:"host"\uFF0C\u4E0E core \u4E92\u4E0D\u8986\u76D6\u3002',
|
|
58459
58529
|
exToastNotifyTitle: "Toast \xB7 \u6211\u4EEC\u5C01\u88C5 notify",
|
|
58460
58530
|
exToastNotifyHint: "notify()\uFF1A\u7EDF\u4E00\u7070/\u7EFF/\u7EA2/\u9EC4 + \u53F3\u4FA7\u6211\u4EEC\u81EA\u5DF1\u7684\u6309\u94AE",
|
|
58461
|
-
exToastHostTitle: "Toast \xB7 \u5BBF\u4E3B\u539F\u751F",
|
|
58462
|
-
exToastHostHint: "showHostToast()\uFF1A\u76F4\u63A5\u5305 @deepseek-ai \u5B98\u65B9 Toast\uFF08\u9876\u90E8\u6A2A\u5E45\uFF09",
|
|
58463
58531
|
exLoaderTitle: "\u52A0\u8F7D\u56FE\u6807 \xB7 Loader",
|
|
58464
58532
|
exLoaderHint: "\u53EA\u753B\u56FE\u6807\uFF1A\u65E0\u80CC\u666F\u3001\u65E0\u5185\u8DDD\u3001\u65E0\u5B9A\u4F4D \u2014\u2014 \u80CC\u666F\u4E0E\u4F4D\u7F6E\u5F52\u4F60\uFF08\u5957 Chip\u3001\u5957 Card\uFF0C\u6216\u81EA\u5DF1\u5305\u4E00\u5C42 fixed \u5BB9\u5668\uFF09\u3002variant \u4E24\u79CD\uFF08ring / blocks\uFF09\xD7 size \u4E94\u6863\uFF08xs 12 / sm 16 / md 24 / lg 32 / xl 48\uFF09\uFF0C\u51E0\u4F55\u7B49\u6BD4\u7F29\u653E\u3002\u989C\u8272\u8D70 currentColor\uFF0C\u8DDF\u7740\u6240\u5728\u6587\u5B57\u81EA\u52A8\u53D8\u8272\u3002\u5012\u6570\u7B2C\u4E8C\u884C\u662F\u300C\u81EA\u5DF1\u914D\u80CC\u666F + \u81EA\u5DF1\u5B9A\u4F4D\u300D\u7684\u5199\u6CD5\uFF0C\u6700\u540E\u4E00\u884C\u662F\u540C\u65CF\u7684 LoaderBar\uFF08\u80F6\u56CA\u4E0D\u5B9A\u8FDB\u5EA6\uFF09\u2014\u2014 \u8FB9\u754C\u4E00\u81F4\uFF0C\u90FD\u53EA\u753B\u56FE\u5F62\u3002",
|
|
58465
58533
|
exLoadingTitle: "\u52A0\u8F7D\u63D0\u793A \xB7 \u4E24\u79CD\u6837\u5F0F",
|
|
58466
58534
|
exLoadingHint: "showLoading() \u4E0D\u81EA\u52A8\u6D88\u5931\uFF0C\u53EA\u80FD\u81EA\u5DF1\u62FF\u53E5\u67C4 close()\uFF1B\u5C4F\u5E55\u4E0A\u6C38\u8FDC\u53EA\u6709\u4E00\u5F20\u5361\u2014\u2014\u540E\u4E00\u6B21\u8C03\u7528\u76F4\u63A5\u9876\u6389\u524D\u4E00\u6B21\uFF08\u8FDE\u70B9\u4E5F\u53EA\u6709\u4E00\u5F20\uFF09\u3002\u9ED8\u8BA4\u5C4F\u4F4D\u4E0B\u65B9\u5C45\u4E2D\uFF08\u4E0E Toast \u540C\u5C4F\u4F4D\uFF09\uFF0Cposition \u53EF\u9009\u516D\u5411 + center\uFF1B\u4E0D\u7ED9\u906E\u7F69\u65F6\u540E\u9762\u7167\u5E38\u53EF\u70B9\u3002\u8981\u653E\u8FDB\u81EA\u5DF1\u7684\u7A7A\u95F4\u5C31\u76F4\u63A5\u6E32\u67D3 LoadingToast / LoadingBlock\u3002",
|
|
58467
|
-
exToastSonnerTitle: "Toast \xB7 \u5B98\u65B9 Sonner",
|
|
58468
|
-
exToastSonnerHint: "showToast()\uFF1A\u7B2C\u4E09\u65B9\u5E93\u539F\u5473\uFF0C\u5BF9\u6BD4\u7528",
|
|
58469
58535
|
sessionRealHint: "\u5BBF\u4E3B sessions.list \u5FEB\u7167\uFF08\u51B7\u5B89\u5168\uFF0C\u4E0D\u6FC0\u6D3B Agent\uFF09\u2192 \u70B9\u5F00\u771F\u9884\u89C8\uFF1Bfork \u4E0E\u8DF3\u8F6C\u90FD\u662F\u5B98\u65B9\u53E3\u5B50",
|
|
58470
58536
|
sessionListUnavailable: "\u5BBF\u4E3B\u4F1A\u8BDD\u670D\u52A1\u672A\u5C31\u4F4D\uFF08sessions / uiConversation / uiWorkspace \u7F3A\u5E2D\uFF09\u2014\u2014\u5728\u771F\u5B9E dsh profile \u91CC\u5B89\u88C5\u672C\u63D2\u4EF6\u5373\u53EF\u8BFB\u5230\u672C\u673A\u4F1A\u8BDD",
|
|
58471
58537
|
sessionListEmpty: "\u5BBF\u4E3B\u5F53\u524D\u6CA1\u6709\u53EF\u663E\u793A\u7684\u4F1A\u8BDD",
|
|
@@ -58671,7 +58737,7 @@ var DICT2 = {
|
|
|
58671
58737
|
marqueeTitle: "MarqueeText",
|
|
58672
58738
|
liveTitle: "LiveText",
|
|
58673
58739
|
feedbackModalHint: "Hand-rolled overlay (no portal); click backdrop / Esc / \u2715 all close it. The header \u2715 is a 24\xD724 icon slot \u2014 no border or 120px-wide color block should appear",
|
|
58674
|
-
feedbackToastHint: "Imperative
|
|
58740
|
+
feedbackToastHint: "Imperative notify \u2014 no component mounting required",
|
|
58675
58741
|
explorerDataTitle: "Where the data comes from (real data, no mocks)",
|
|
58676
58742
|
explorerDataHint: 'File services come from the host remote.workspaceFiles (dotted injection); the workspace list is the official workspaces snapshot. The "most recent workspace" is the newest updated one that owns a session (pickWorkspaceAnchor) \u2014 list / read all need a sessionId, so browsing must land on a real session first.',
|
|
58677
58743
|
explorerFilesNone: "Not ready: the host has not exposed remote.workspaceFiles yet (no preview, no picking \u2014 no fake data either)",
|
|
@@ -58708,7 +58774,7 @@ var DICT2 = {
|
|
|
58708
58774
|
exMarqueeHint: "Two layers: the outer clips, the inner scrolls; one pass stops at the last character, and on mouse-out it resets to an ellipsis",
|
|
58709
58775
|
exLiveHint: "Subscribes to an internal ticker; the running clock UI is rendered by the caller",
|
|
58710
58776
|
exSmallModalTitle: "Small dialogs (custom)",
|
|
58711
|
-
exSmallModalHint: "Our standard small dialogs: AlertModal (single button + severity icon) / ConfirmModal (two buttons + tone), plus the imperative alertModal()/confirmModal() (Promise-based). The Modal suffix keeps them from shadowing the host\u2019s own.",
|
|
58777
|
+
exSmallModalHint: "Our standard small dialogs: AlertModal (single button + severity icon) / ConfirmModal (two buttons + tone), plus the imperative alertModal()/confirmModal() (Promise-based). The Modal suffix keeps them from shadowing the host\u2019s own. When a callback returns a Promise (the caller is doing async work), that button spins and the whole dialog locks (mask and Esc stop working); it closes on resolve, and on reject the spinner is withdrawn and the dialog stays open for a retry. Component form takes confirmLoading / cancelLoading directly.",
|
|
58712
58778
|
exLargeModalTitle: "Large dialogs (custom)",
|
|
58713
58779
|
exLargeModalHint: "Our content dialog: Modal (size md/lg) carrying arbitrary content \u2014 not a confirm/cancel primitive. Three samples: default md / with footer / without footer (custom content); the header layout may differ.",
|
|
58714
58780
|
exSideSheetTitle: "Side drawer (overlay)",
|
|
@@ -58717,14 +58783,10 @@ var DICT2 = {
|
|
|
58717
58783
|
exHostModalHint: 'The host kernel\u2019s own Modal: mask, header and close button all belong to the host; the body takes arbitrary content and the footer any button set. Imperative use goes through confirmModal/alertModal with skin:"host"; neither shadows the other.',
|
|
58718
58784
|
exToastNotifyTitle: "Toast \xB7 our notify wrapper",
|
|
58719
58785
|
exToastNotifyHint: "notify(): uniform grey/green/red/yellow plus our own button on the right",
|
|
58720
|
-
exToastHostTitle: "Toast \xB7 host native",
|
|
58721
|
-
exToastHostHint: "showHostToast(): wraps the official @deepseek-ai Toast (top banner)",
|
|
58722
58786
|
exLoaderTitle: "Loader \xB7 icon only",
|
|
58723
58787
|
exLoaderHint: "Draws the icon and nothing else: no background, no padding, no positioning \u2014 those belong to you (wrap it in a Chip, a Card, or your own fixed container). Two variants (ring / blocks) \xD7 five sizes (xs 12 / sm 16 / md 24 / lg 32 / xl 48), geometry scales proportionally. Colour follows currentColor, so it inherits the surrounding text colour. The second-to-last row is the \u201Cbring your own background and position\u201D pattern; the last row shows the same-family LoaderBar \u2014 same boundary, graphics only.",
|
|
58724
58788
|
exLoadingTitle: "Loading \xB7 two styles",
|
|
58725
58789
|
exLoadingHint: "showLoading() never dismisses itself \u2014 you call close() on the handle. Only one card ever exists: a later call replaces the previous one (rapid clicks still show one). It sits bottom-centre by default (the Toast slot); position takes the six directions plus center. Without a mask the page stays clickable. To keep it inside your own area, render LoadingToast / LoadingBlock in place.",
|
|
58726
|
-
exToastSonnerTitle: "Toast \xB7 Sonner",
|
|
58727
|
-
exToastSonnerHint: "showToast(): the third-party library as-is, for comparison",
|
|
58728
58790
|
sessionRealHint: "Host sessions.list snapshot (cold-safe, no Agent activation) \u2192 click for a real preview; fork and navigation are official APIs",
|
|
58729
58791
|
sessionListUnavailable: "Host session services not ready (sessions / uiConversation / uiWorkspace absent) \u2014 install this plugin into a real dsh profile to list and preview your sessions",
|
|
58730
58792
|
sessionListEmpty: "The host has no visible sessions right now",
|
|
@@ -58865,7 +58927,7 @@ function demoPanels() {
|
|
|
58865
58927
|
var pageRow = { element: null };
|
|
58866
58928
|
|
|
58867
58929
|
// packages/demo/src/sections/index.tsx
|
|
58868
|
-
var
|
|
58930
|
+
var import_react86 = require("react");
|
|
58869
58931
|
|
|
58870
58932
|
// packages/demo/src/sections/start.tsx
|
|
58871
58933
|
var import_react78 = require("react");
|
|
@@ -60061,6 +60123,10 @@ var docData = {
|
|
|
60061
60123
|
"zh": "IconButton\uFF1Avariant: plain|outline|danger\uFF08\u9ED8\u8BA4 plain\uFF0C**\u65E0\u5E95\u8272**\uFF09\u3001size\uFF08\u9ED8\u8BA4 lg\uFF09\u3001icon\uFF08\u5FC5\u586B\uFF09\u3001label\uFF08\u5FC5\u586B\uFF0C\u65E0\u969C\u788D\u540D\u517C title\uFF09\u3001color\uFF08\u56FE\u6807\u8272\uFF09\u3001background\uFF08\u5E95\u8272\uFF0C\u4E0D\u4F20\u5373\u65E0\u5E95\u8272\uFF09\u3002",
|
|
60062
60124
|
"en": "IconButton: variant plain|outline|danger (default plain, **no background**), size (default lg), icon (required), label (required, doubles as a11y name and title), color (icon colour), background (fill; omitted = no fill)."
|
|
60063
60125
|
},
|
|
60126
|
+
{
|
|
60127
|
+
"zh": "\u4E24\u8005\u7684 loading \u8BED\u4E49\u4E00\u81F4\uFF1A`onClick` \u8FD4\u56DE Promise \u5C31\u8F6C\u5708\uFF08\u7EAF\u56FE\u6807\u94AE\u628A\u56FE\u6807\u4F4D\u6362\u6210\u5C0F\u5708\uFF0C`aria-label` \u4E0D\u53D8\u3001\u8865 `aria-busy`\uFF09\uFF0C`onBusyChange` \u628A\u300C\u5728\u8DD1\u300D\u62A5\u51FA\u53BB\uFF1B\u53D7\u63A7 `loading` \u4E0E\u5B83\u53D6\u6216 \u2014\u2014 \u522B\u5904\u5237\u65B0\u4E5F\u80FD\u70B9\u4EAE\u540C\u4E00\u9897\u6309\u94AE\u3002\u8F6C\u5708\u671F\u95F4\u6309\u94AE\u81EA\u5DF1\u7684\u56FE\u6807\u4F4D\uFF08`icon` / `iconRight`\uFF09\u5168\u90E8\u8BA9\u4F4D\uFF0C\u53EA\u7559\u8F6C\u5708 + \u6587\u5B57\u3002",
|
|
60128
|
+
"en": 'Both share one loading semantics: a Promise-returning `onClick` spins (an icon button swaps its icon for the spinner, keeps `aria-label` and adds `aria-busy`), `onBusyChange` reports "running", and the controlled `loading` prop is OR-ed in \u2014 an external refresh lights the same button too. While spinning, the button\u2019s own icon slots (`icon` / `iconRight`) all step aside: spinner plus label only.'
|
|
60129
|
+
},
|
|
60064
60130
|
{
|
|
60065
60131
|
"zh": "Segmented\uFF1A`items`\uFF08\u5FC5\u586B\uFF09\u652F\u6301\u5355\u9009 / \u591A\u9009\uFF0C`size`\uFF08\u9ED8\u8BA4 lg\uFF1B\u4E09\u6863\u603B\u9AD8 24 / 28 / 32\uFF09\u3001`bordered`\uFF081px \u5916\u6846\uFF0C\u603B\u9AD8\u4E0D\u53D8\uFF09\u3001`multiple`\uFF08\u591A\u9009\uFF09\u3002\u5916\u89C2\u53EA\u6709\u4E00\u5957\uFF1A\u7070\u5E95\u8F68\u9053 + \u767D\u8272\u9009\u4E2D\u7247\uFF0C\u9009\u4E2D\u7247\u7684\u63CF\u8FB9\u73AF\u4E0E\u9634\u5F71\u7531\u5BBF\u4E3B elevation token \u63D0\u4F9B\uFF08\u79BB\u7EBF\u515C\u5E95\u503C\u6CA1\u6709\u90A3\u5708\u73AF\uFF09\u3002\u9009\u4E2D\u7247\u914D\u8272\u53EA\u7ECF `tone`\uFF1A\u4F20\u5185\u7F6E\u8272\u540D\uFF08\u4E0E Chip \u540C\u540D\u7684 business / success / warning / danger / purple / pink / cyan / teal / orange / indigo / rose / slate\uFF09\u65F6\u5E95\u4E0E\u5B57\u7531\u6838\u5FC3\u5B9A\u3001\u6DF1\u6D45\u4E24\u4E3B\u9898\u5404\u81EA\u6210\u7ACB\uFF1B\u4F20 `{ bg, fg }` \u65F6\u4E24\u4E2A\u4E3B\u9898\u90FD\u7528\u8C03\u7528\u65B9\u8FD9\u4E00\u5BF9\u989C\u8272\uFF08\u5BF9\u6BD4\u5EA6\u7531\u8C03\u7528\u65B9\u8D1F\u8D23\uFF09\u3002\u6BB5\u5185 `icon` \u662F\u524D\u7F6E\u56FE\u6807\u69FD\uFF08\u5B98\u65B9\u56FE\u6807\u7EC4\u4EF6 / \u6570\u7EC4 / \u81EA\u7ED8\u8282\u70B9\u5747\u53EF\uFF09\uFF0C`label` \u4E5F\u53EF\u4F20\u8282\u70B9\uFF1B\u987A\u5E8F\u56FA\u5B9A\u4E3A icon \u2192 label \u2192 count\u3002\u53EA\u6709\u56FE\u6807\uFF08\u65E0\u6587\u5B57 / \u8BA1\u6570 / \u89D2\u6807\uFF09\u65F6\u8BE5\u6BB5\u81EA\u52A8\u53D8\u6B63\u65B9\u5F62\uFF08\u5BBD = \u6BB5\u9AD8\uFF09\uFF0C\u8BFB\u5C4F\u540D\u7528 `ariaLabel`\uFF0C\u7F3A\u7701\u9000\u56DE `tooltip`\u3002\u6BB5\u5185 `count`\uFF08\u5F31\u5316\u7070\u5B57\uFF0C\u9009\u4E2D\u6BB5\u5185\u81EA\u52A8\u8DDF\u7740\u9009\u4E2D\u7247\u5B57\u8272\u63D0\u4EAE\uFF09/ `badge`\uFF08\u7EA2\u89D2\u6807\uFF09\u63A5\u53D7 `number | string`\uFF1A\u6570\u5B57 \u22640 \u4E0D\u663E\u793A\uFF0C\u5B57\u7B26\u4E32\u539F\u6837\u663E\u793A\uFF08\u5982 `1K` / `99+`\uFF09\u3002",
|
|
60066
60132
|
"en": "Segmented: `items` (required) supports single or multiple selection; `size` (default lg; totals 24 / 28 / 32), `bordered` (1px outer frame, same total height), `multiple` (multi-select). One look only: grey track + white selected pill; its stroke ring and shadow come from the host elevation token (the offline fallback has no ring). The selected pill\u2019s colors go through `tone` only: a built-in color name (business / success / warning / danger / purple / pink / cyan / teal / orange / indigo / rose / slate, same names as Chip) lets the core pick background and text per theme; `{ bg, fg }` uses that pair verbatim in both themes (contrast is the caller\u2019s call). An item\u2019s leading `icon` takes any node (official icon component, array, or custom); `label` also accepts a node; order is always icon \u2192 label \u2192 count. With only an icon (no label / count / badge) the segment squares itself (width = segment height), and the accessible name comes from `ariaLabel`, falling back to `tooltip`. An item\u2019s `count` (muted text; auto-lightened to follow the selected pill\u2019s text color while selected) and `badge` (red pill) take `number | string`: numbers \u22640 render nothing, strings render as given (e.g. `'1K'` / `'99+'`)."
|
|
@@ -60120,8 +60186,26 @@ var docData = {
|
|
|
60120
60186
|
"type": "boolean",
|
|
60121
60187
|
"def": "'false'",
|
|
60122
60188
|
"desc": {
|
|
60123
|
-
"zh": "\u6587\u6848\u524D\u663E\u793A\u540C\u8272\u5C0F\u5708\
|
|
60124
|
-
"en": "
|
|
60189
|
+
"zh": "\u53D7\u63A7 loading\uFF1A\u6587\u6848\u524D\u663E\u793A\u540C\u8272\u5C0F\u5708\u5E76\u81EA\u52A8 disabled\uFF08\u522B\u5904\u5237\u65B0\u4E5F\u80FD\u70B9\u4EAE\u5B83\uFF09\uFF1B\u4E0E\u300C\u70B9\u51FB\u81EA\u52A8 loading\u300D\u53D6\u6216",
|
|
60190
|
+
"en": "Controlled loading: same-color spinner before the label plus auto-disable (an external refresh can light it up too); OR-ed with automatic click loading"
|
|
60191
|
+
}
|
|
60192
|
+
},
|
|
60193
|
+
{
|
|
60194
|
+
"name": "onClick",
|
|
60195
|
+
"type": "(...) => unknown",
|
|
60196
|
+
"def": "\u2014",
|
|
60197
|
+
"desc": {
|
|
60198
|
+
"zh": "**\u8FD4\u56DE Promise \u5373\u81EA\u52A8 loading**\uFF1A\u8F6C\u5708 + \u7981\u7528 + \u9632\u8FDE\u70B9\uFF0Csettle \u540E\u81EA\u5DF1\u6062\u590D\uFF1Breject \u4E5F\u6062\u590D\u5E76\u628A\u9519\u8BEF\u6253\u5230\u63A7\u5236\u53F0\u3002\u540C\u6B65\u8FD4\u56DE\u503C = \u8001\u884C\u4E3A",
|
|
60199
|
+
"en": "**Returning a Promise enables loading automatically**: spinner, disabled, no double-clicks, restored on settle; a rejection also restores and logs the error. Sync return values behave as before"
|
|
60200
|
+
}
|
|
60201
|
+
},
|
|
60202
|
+
{
|
|
60203
|
+
"name": "onBusyChange",
|
|
60204
|
+
"type": "(busy: boolean) => void",
|
|
60205
|
+
"def": "\u2014",
|
|
60206
|
+
"desc": {
|
|
60207
|
+
"zh": "\u628A\u300C\u8FD9\u4E2A\u6309\u94AE\u6B63\u5728\u8DD1\u300D\u62A5\u51FA\u53BB\uFF08\u914D\u5408 `Modal` / `SideSheet` \u7684 `busy` \u9501\u6B7B\u5173\u95ED\uFF09\uFF0C\u4E0D\u6539\u53D8\u6309\u94AE\u81EA\u8EAB\u884C\u4E3A",
|
|
60208
|
+
"en": 'Reports "this button is running" outward (pair with `busy` on `Modal` / `SideSheet` to lock closing); does not change the button itself'
|
|
60125
60209
|
}
|
|
60126
60210
|
},
|
|
60127
60211
|
{
|
|
@@ -60174,8 +60258,8 @@ var docData = {
|
|
|
60174
60258
|
"type": "\u539F\u751F button \u5C5E\u6027",
|
|
60175
60259
|
"def": "\u2014",
|
|
60176
60260
|
"desc": {
|
|
60177
|
-
"zh": "type / disabled / title / aria-*
|
|
60178
|
-
"en": "type / disabled / title / aria-*
|
|
60261
|
+
"zh": "type / disabled / title / aria-* \u7B49\u539F\u6837\u900F\u4F20\uFF08onClick \u89C1\u4E0A\u9762\u90A3\u884C\uFF09",
|
|
60262
|
+
"en": "type / disabled / title / aria-* and friends pass through (onClick is documented above)"
|
|
60179
60263
|
}
|
|
60180
60264
|
}
|
|
60181
60265
|
]
|
|
@@ -61558,8 +61642,8 @@ var docData = {
|
|
|
61558
61642
|
"type": "",
|
|
61559
61643
|
"def": "",
|
|
61560
61644
|
"desc": {
|
|
61561
|
-
"zh": "\u5B98\u65B9 Sonner \u539F\
|
|
61562
|
-
"en": "Raw official Sonner (
|
|
61645
|
+
"zh": "\u5B98\u65B9 Sonner \u539F\u5473\uFF08\u8F7B\u91CF\u539F\u751F\u89C2\u611F\uFF1Bdemo \u7EDF\u4E00\u7528 notify\uFF09\u3002opts: `{ variant?, durationMs?, color?, onDismiss?, position? }`\uFF0C6 \u5411\u5B9A\u4F4D\uFF0C\u660E\u6697\u8DDF\u968F\u5BBF\u4E3B",
|
|
61646
|
+
"en": "Raw official Sonner flavour (lightweight, native look; the demo standardises on notify). opts `{ variant?, durationMs?, color?, onDismiss?, position? }`, 6-way placement, theme follows host"
|
|
61563
61647
|
}
|
|
61564
61648
|
},
|
|
61565
61649
|
{
|
|
@@ -61747,6 +61831,15 @@ var docData = {
|
|
|
61747
61831
|
"en": "Close on Esc"
|
|
61748
61832
|
}
|
|
61749
61833
|
},
|
|
61834
|
+
{
|
|
61835
|
+
"name": "busy",
|
|
61836
|
+
"type": "boolean",
|
|
61837
|
+
"def": "false",
|
|
61838
|
+
"desc": {
|
|
61839
|
+
"zh": "\u6709\u5F02\u6B65\u5728\u8DD1\uFF08footer \u91CC\u7684 `Button` \u6B63\u5728 loading\uFF09\uFF1A\u906E\u7F69 / Esc / \u2715 \u4E09\u6761\u5173\u95ED\u8DEF\u5F84\u4E00\u8D77\u5931\u6548\uFF0C\u5185\u5BB9\u7167\u5E38\u3002\u5426\u51B3\u9879\uFF0C\u4E0D\u66FF\u4EE3 closeOnMask / escClose",
|
|
61840
|
+
"en": "Async work in flight (a footer `Button` is loading): mask / Esc / \u2715 all stop closing while content keeps rendering. A veto, not a replacement for closeOnMask / escClose"
|
|
61841
|
+
}
|
|
61842
|
+
},
|
|
61750
61843
|
{
|
|
61751
61844
|
"name": "maxWidth",
|
|
61752
61845
|
"type": "string",
|
|
@@ -61887,6 +61980,15 @@ var docData = {
|
|
|
61887
61980
|
"en": "Close on mask click / on Esc"
|
|
61888
61981
|
}
|
|
61889
61982
|
},
|
|
61983
|
+
{
|
|
61984
|
+
"name": "busy",
|
|
61985
|
+
"type": "boolean",
|
|
61986
|
+
"def": "false",
|
|
61987
|
+
"desc": {
|
|
61988
|
+
"zh": "\u6709\u5F02\u6B65\u5728\u8DD1\uFF08footer \u91CC\u7684 `Button` \u6B63\u5728 loading\uFF09\uFF1A\u906E\u7F69 / Esc / \u2715 \u4E09\u6761\u5173\u95ED\u8DEF\u5F84\u4E00\u8D77\u5931\u6548\uFF0C\u5185\u5BB9\u7167\u5E38\u3002\u5426\u51B3\u9879\uFF0C\u4E0D\u66FF\u4EE3 closeOnMask / escClose",
|
|
61989
|
+
"en": "Async work in flight (a footer `Button` is loading): mask / Esc / \u2715 all stop closing while content keeps rendering. A veto, not a replacement for closeOnMask / escClose"
|
|
61990
|
+
}
|
|
61991
|
+
},
|
|
61890
61992
|
{
|
|
61891
61993
|
"name": "width / minWidth / maxWidth",
|
|
61892
61994
|
"type": "number / number / number",
|
|
@@ -62645,34 +62747,7 @@ ensureControls()`
|
|
|
62645
62747
|
}
|
|
62646
62748
|
|
|
62647
62749
|
// packages/demo/src/sections/controls.tsx
|
|
62648
|
-
var import_react81 = require("react");
|
|
62649
|
-
|
|
62650
|
-
// dist/ui/host-toast.js
|
|
62651
62750
|
var import_react80 = require("react");
|
|
62652
|
-
var import_client6 = require("react-dom/client");
|
|
62653
|
-
function showHostToast(message, opts) {
|
|
62654
|
-
if (typeof document === "undefined")
|
|
62655
|
-
return;
|
|
62656
|
-
const container = document.createElement("div");
|
|
62657
|
-
document.body.appendChild(container);
|
|
62658
|
-
const root = (0, import_client6.createRoot)(container);
|
|
62659
|
-
const close = () => {
|
|
62660
|
-
root.unmount();
|
|
62661
|
-
container.remove();
|
|
62662
|
-
};
|
|
62663
|
-
root.render((0, import_react80.createElement)(Official.Toast, {
|
|
62664
|
-
text: message,
|
|
62665
|
-
tone: opts?.tone,
|
|
62666
|
-
holdMs: opts?.holdMs ?? 3e3,
|
|
62667
|
-
actions: opts?.actions !== void 0 ? opts.actions.map((a) => ({ label: a.text, onClick: a.onClick })) : void 0,
|
|
62668
|
-
onDone: () => {
|
|
62669
|
-
close();
|
|
62670
|
-
opts?.onDismiss?.();
|
|
62671
|
-
}
|
|
62672
|
-
}));
|
|
62673
|
-
}
|
|
62674
|
-
|
|
62675
|
-
// packages/demo/src/sections/controls.tsx
|
|
62676
62751
|
var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
62677
62752
|
var BUTTON_ICONS = [
|
|
62678
62753
|
{ name: "plus", Icon: import_dsh_client_ui_primitives2.IconPlusOutlineRegular },
|
|
@@ -62690,13 +62765,13 @@ var BUTTON_ICONS = [
|
|
|
62690
62765
|
];
|
|
62691
62766
|
function iconOf(name2, size4 = 14) {
|
|
62692
62767
|
const found = BUTTON_ICONS.find((item) => item.name === name2);
|
|
62693
|
-
return found === void 0 ? null : (0,
|
|
62768
|
+
return found === void 0 ? null : (0, import_react80.createElement)(found.Icon, { size: size4 });
|
|
62694
62769
|
}
|
|
62695
62770
|
function StarSvg() {
|
|
62696
|
-
return (0,
|
|
62771
|
+
return (0, import_react80.createElement)(
|
|
62697
62772
|
"svg",
|
|
62698
62773
|
{ width: 14, height: 14, viewBox: "0 0 16 16", fill: "none", "aria-hidden": true },
|
|
62699
|
-
(0,
|
|
62774
|
+
(0, import_react80.createElement)("path", {
|
|
62700
62775
|
d: "M8 1.6l1.9 4 4.4.6-3.2 3 .8 4.3L8 11.4l-3.9 2.1.8-4.3-3.2-3 4.4-.6z",
|
|
62701
62776
|
stroke: "currentColor",
|
|
62702
62777
|
strokeWidth: 1.2,
|
|
@@ -62736,7 +62811,7 @@ var CUSTOM_COLORS = ["#7c3aed", "#0ea5e9", "#f97316", "#16a34a"];
|
|
|
62736
62811
|
function tipAnchor(text2, side, align) {
|
|
62737
62812
|
const props = { label: text2, side };
|
|
62738
62813
|
if (align !== void 0) props.align = align;
|
|
62739
|
-
return (0,
|
|
62814
|
+
return (0, import_react80.createElement)(import_dsh_client_ui_primitives2.Tooltip, props, (0, import_react80.createElement)("button", {
|
|
62740
62815
|
type: "button",
|
|
62741
62816
|
style: {
|
|
62742
62817
|
padding: "4px 10px",
|
|
@@ -62750,13 +62825,13 @@ function tipAnchor(text2, side, align) {
|
|
|
62750
62825
|
}, text2));
|
|
62751
62826
|
}
|
|
62752
62827
|
function Row(props) {
|
|
62753
|
-
return (0,
|
|
62828
|
+
return (0, import_react80.createElement)("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "center" } }, props.children);
|
|
62754
62829
|
}
|
|
62755
62830
|
function Labeled(props) {
|
|
62756
|
-
return (0,
|
|
62831
|
+
return (0, import_react80.createElement)(
|
|
62757
62832
|
"div",
|
|
62758
62833
|
{ style: { display: "flex", gap: "10px", alignItems: "center", flexWrap: "wrap" } },
|
|
62759
|
-
(0,
|
|
62834
|
+
(0, import_react80.createElement)("span", { style: { width: "auto", minWidth: "64px", flex: "none", whiteSpace: "normal", color: "var(--dshpc-fg-3)", fontSize: "12px" } }, props.label),
|
|
62760
62835
|
props.children
|
|
62761
62836
|
);
|
|
62762
62837
|
}
|
|
@@ -62802,7 +62877,16 @@ var CODE_BTN_STATE = `<Button variant="primary">\u9ED8\u8BA4</Button>
|
|
|
62802
62877
|
<Button variant="primary" disabled>\u7981\u7528</Button>
|
|
62803
62878
|
<Button variant="danger" disabled icon={<IconCloseOutlineRegular size={16} />}>\u7981\u7528</Button>
|
|
62804
62879
|
<Button variant="outline" loading>\u52A0\u8F7D\u4E2D</Button>
|
|
62805
|
-
<Button variant="primary" loading icon={<IconRefreshOutlineRegular size={16} />}>\u63D0\u4EA4\u4E2D</Button
|
|
62880
|
+
<Button variant="primary" loading icon={<IconRefreshOutlineRegular size={16} />}>\u63D0\u4EA4\u4E2D</Button>
|
|
62881
|
+
|
|
62882
|
+
// \u5F02\u6B65\uFF1AonClick \u8FD4\u56DE Promise \u21D2 \u81EA\u5DF1\u8F6C\u5708 + \u7981\u7528\uFF0Csettle \u540E\u6062\u590D\uFF08reject \u4E5F\u6062\u590D\uFF09
|
|
62883
|
+
<Button variant="primary" onClick={async () => { await save() }}>\u4FDD\u5B58</Button>
|
|
62884
|
+
|
|
62885
|
+
// \u5916\u90E8\u4E5F\u80FD\u70B9\u4EAE\u540C\u4E00\u4E2A\u6309\u94AE\uFF08\u6BD4\u5982\u522B\u5904\u6B63\u5728\u5237\u65B0\uFF09
|
|
62886
|
+
<Button variant="outline" loading={refreshing}>\u4FDD\u5B58</Button>
|
|
62887
|
+
|
|
62888
|
+
// \u628A\u300C\u5728\u8DD1\u300D\u62A5\u51FA\u53BB\uFF0C\u9501\u6B7B\u6240\u5728\u5F39\u7A97\uFF08\u5F39\u7A97\u4F20 busy\uFF09
|
|
62889
|
+
<Button onBusyChange={setBusy} onClick={async () => { await save() }}>\u4FDD\u5B58</Button>`;
|
|
62806
62890
|
var CODE_BTN_COLOR = `<Button variant="primary" color="#7c3aed">#7c3aed</Button>
|
|
62807
62891
|
<Button variant="outline" color="#0ea5e9">#0ea5e9</Button>`;
|
|
62808
62892
|
var CODE_BTN_WIDTH = `// \u56FA\u5B9A\u5BBD\uFF1A\u5199\u6B7B\u5BBD\u5EA6
|
|
@@ -62818,200 +62902,220 @@ var CODE_BTN_WIDTH = `// \u56FA\u5B9A\u5BBD\uFF1A\u5199\u6B7B\u5BBD\u5EA6
|
|
|
62818
62902
|
// \u4E09\u8005\u540C\u8BBE \u21D2 \u56FA\u5B9A\u5BBD\u4F18\u5148\uFF0C\u6700\u5C0F\u5BBD / \u6700\u5927\u5BBD\u81EA\u52A8\u5931\u6548
|
|
62819
62903
|
<Button variant="outline" width={120} minWidth={200} maxWidth={160}>\u56FA\u5B9A\u5BBD\u4F18\u5148</Button>`;
|
|
62820
62904
|
function ButtonPage() {
|
|
62821
|
-
|
|
62905
|
+
const [extLoading, setExtLoading] = (0, import_react80.useState)(false);
|
|
62906
|
+
return (0, import_react80.createElement)(
|
|
62822
62907
|
"div",
|
|
62823
62908
|
null,
|
|
62824
|
-
(0,
|
|
62909
|
+
(0, import_react80.createElement)(DocProse, { id: "button" }),
|
|
62825
62910
|
// 文案与语言
|
|
62826
|
-
(0,
|
|
62911
|
+
(0, import_react80.createElement)(
|
|
62827
62912
|
Example,
|
|
62828
62913
|
{ title: t3("btnTextTitle"), hint: t3("btnTextHint"), code: CODE_BTN_TEXT },
|
|
62829
|
-
(0,
|
|
62914
|
+
(0, import_react80.createElement)(
|
|
62830
62915
|
"div",
|
|
62831
62916
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62832
|
-
(0,
|
|
62917
|
+
(0, import_react80.createElement)(
|
|
62833
62918
|
Labeled,
|
|
62834
62919
|
{ label: "locale" },
|
|
62835
|
-
(0,
|
|
62836
|
-
(0,
|
|
62837
|
-
(0,
|
|
62920
|
+
(0, import_react80.createElement)(Button, { variant: "primary", icon: iconOf("check", ICON_SIZE.lg) }, t3("btnLabelSave")),
|
|
62921
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, t3("btnLabelCancel")),
|
|
62922
|
+
(0, import_react80.createElement)(Button, { variant: "danger", icon: iconOf("close", ICON_SIZE.lg) }, t3("btnLabelDelete"))
|
|
62838
62923
|
),
|
|
62839
|
-
(0,
|
|
62924
|
+
(0, import_react80.createElement)(
|
|
62840
62925
|
Labeled,
|
|
62841
62926
|
{ label: "en" },
|
|
62842
|
-
(0,
|
|
62843
|
-
(0,
|
|
62844
|
-
(0,
|
|
62927
|
+
(0, import_react80.createElement)(Button, { variant: "primary" }, "Save"),
|
|
62928
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, "Cancel"),
|
|
62929
|
+
(0, import_react80.createElement)(Button, { variant: "ghost" }, "Learn more")
|
|
62845
62930
|
),
|
|
62846
|
-
(0,
|
|
62931
|
+
(0, import_react80.createElement)(
|
|
62847
62932
|
Labeled,
|
|
62848
62933
|
{ label: "zh" },
|
|
62849
|
-
(0,
|
|
62850
|
-
(0,
|
|
62851
|
-
(0,
|
|
62934
|
+
(0, import_react80.createElement)(Button, { variant: "primary" }, "\u4FDD\u5B58"),
|
|
62935
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, "\u53D6\u6D88"),
|
|
62936
|
+
(0, import_react80.createElement)(Button, { variant: "ghost" }, "\u4E86\u89E3\u66F4\u591A")
|
|
62852
62937
|
),
|
|
62853
|
-
(0,
|
|
62938
|
+
(0, import_react80.createElement)(
|
|
62854
62939
|
Labeled,
|
|
62855
62940
|
{ label: "zh + en" },
|
|
62856
|
-
(0,
|
|
62857
|
-
(0,
|
|
62858
|
-
(0,
|
|
62941
|
+
(0, import_react80.createElement)(Button, { variant: "primary", icon: iconOf("sparkle", ICON_SIZE.lg) }, t3("btnLabelMixed")),
|
|
62942
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, "\u590D\u5236 Copy"),
|
|
62943
|
+
(0, import_react80.createElement)(Button, { variant: "secondary" }, "\u91CD\u8BD5 Retry")
|
|
62859
62944
|
)
|
|
62860
62945
|
)
|
|
62861
62946
|
),
|
|
62862
62947
|
// 10 档外观
|
|
62863
|
-
(0,
|
|
62948
|
+
(0, import_react80.createElement)(
|
|
62864
62949
|
Example,
|
|
62865
62950
|
{ title: t3("btnVariantTitle"), hint: t3("btnVariantHint"), code: CODE_BTN_VARIANT },
|
|
62866
|
-
(0,
|
|
62951
|
+
(0, import_react80.createElement)(
|
|
62867
62952
|
"div",
|
|
62868
62953
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62869
|
-
VARIANT_GROUPS.map((group) => (0,
|
|
62954
|
+
VARIANT_GROUPS.map((group) => (0, import_react80.createElement)(
|
|
62870
62955
|
Labeled,
|
|
62871
62956
|
{ key: group.label, label: group.label },
|
|
62872
|
-
(0,
|
|
62957
|
+
(0, import_react80.createElement)(
|
|
62873
62958
|
"div",
|
|
62874
62959
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", alignItems: "flex-start" } },
|
|
62875
|
-
(0,
|
|
62876
|
-
(0,
|
|
62960
|
+
(0, import_react80.createElement)(Row, null, group.items.map((variant) => (0, import_react80.createElement)(Button, { key: variant, variant, icon: iconOf(VARIANT_ICON[variant], ICON_SIZE.lg) }, variant))),
|
|
62961
|
+
(0, import_react80.createElement)(Row, null, group.items.map((variant) => (0, import_react80.createElement)(Button, { key: variant, variant, size: "sm", icon: iconOf(VARIANT_ICON[variant], ICON_SIZE.sm) }, variant)))
|
|
62877
62962
|
)
|
|
62878
62963
|
))
|
|
62879
62964
|
)
|
|
62880
62965
|
),
|
|
62881
62966
|
// 尺寸 / 图标位置 / block
|
|
62882
|
-
(0,
|
|
62967
|
+
(0, import_react80.createElement)(
|
|
62883
62968
|
Example,
|
|
62884
62969
|
{ title: t3("btnSizeTitle"), hint: t3("btnSizeHint"), code: CODE_BTN_SIZE },
|
|
62885
|
-
(0,
|
|
62970
|
+
(0, import_react80.createElement)(
|
|
62886
62971
|
"div",
|
|
62887
62972
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62888
|
-
(0,
|
|
62973
|
+
(0, import_react80.createElement)(
|
|
62889
62974
|
Labeled,
|
|
62890
62975
|
{ label: "size" },
|
|
62891
|
-
["sm", "md", "lg"].map((size4) => (0,
|
|
62976
|
+
["sm", "md", "lg"].map((size4) => (0, import_react80.createElement)(Button, { key: size4, size: size4, variant: "outline", icon: iconOf("plus", ICON_SIZE[size4]) }, size4))
|
|
62892
62977
|
),
|
|
62893
62978
|
// icon 收的是 ReactNode:官方图标组件 / 自绘 SVG / 一个字符,三种来源各一颗
|
|
62894
|
-
(0,
|
|
62979
|
+
(0, import_react80.createElement)(
|
|
62895
62980
|
Labeled,
|
|
62896
62981
|
{ label: "icon" },
|
|
62897
|
-
(0,
|
|
62898
|
-
(0,
|
|
62899
|
-
(0,
|
|
62982
|
+
(0, import_react80.createElement)(Button, { variant: "primary", icon: iconOf("send", ICON_SIZE.lg) }, "\u5B98\u65B9\u56FE\u6807"),
|
|
62983
|
+
(0, import_react80.createElement)(Button, { variant: "outline", icon: (0, import_react80.createElement)(StarSvg, null) }, "\u81EA\u7ED8 SVG"),
|
|
62984
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", icon: "+" }, "\u4E00\u4E2A\u5B57\u7B26")
|
|
62900
62985
|
),
|
|
62901
|
-
(0,
|
|
62986
|
+
(0, import_react80.createElement)(
|
|
62902
62987
|
Labeled,
|
|
62903
62988
|
{ label: "iconRight" },
|
|
62904
|
-
(0,
|
|
62905
|
-
(0,
|
|
62989
|
+
(0, import_react80.createElement)(Button, { variant: "outline", iconRight: iconOf("chevron", ICON_SIZE.lg) }, "\u66F4\u591A"),
|
|
62990
|
+
(0, import_react80.createElement)(Button, { variant: "primary" }, "\u4E0B\u4E00\u6B65")
|
|
62906
62991
|
),
|
|
62907
62992
|
// block + 前置图标:文字要在视觉中心,不能整组内容居中(那样文字会被图标推右)
|
|
62908
|
-
(0,
|
|
62993
|
+
(0, import_react80.createElement)(
|
|
62909
62994
|
Labeled,
|
|
62910
62995
|
{ label: "block" },
|
|
62911
|
-
(0,
|
|
62996
|
+
(0, import_react80.createElement)(
|
|
62912
62997
|
"div",
|
|
62913
62998
|
{ style: { width: "260px" } },
|
|
62914
|
-
(0,
|
|
62915
|
-
(0,
|
|
62916
|
-
(0,
|
|
62999
|
+
(0, import_react80.createElement)(Button, { variant: "primary", block: true, icon: iconOf("check", ICON_SIZE.lg) }, "\u6491\u6EE1\u7236\u5BBD"),
|
|
63000
|
+
(0, import_react80.createElement)("div", { style: { height: "8px" } }),
|
|
63001
|
+
(0, import_react80.createElement)(Button, { variant: "outline", block: true }, "\u65E0\u56FE\u6807\u5BF9\u7167")
|
|
62917
63002
|
)
|
|
62918
63003
|
),
|
|
62919
|
-
(0,
|
|
63004
|
+
(0, import_react80.createElement)(
|
|
62920
63005
|
Labeled,
|
|
62921
63006
|
{ label: t3("btnIconOnly") },
|
|
62922
|
-
BUTTON_ICONS.slice(0, 6).map((item) => (0,
|
|
63007
|
+
BUTTON_ICONS.slice(0, 6).map((item) => (0, import_react80.createElement)(IconButton, { key: item.name, icon: (0, import_react80.createElement)(item.Icon, { size: 16 }), label: item.name }))
|
|
62923
63008
|
),
|
|
62924
63009
|
// 纯图标钮的配色轴:默认无底色;color 改图标色,background 给底色(用户 2026-11-02)
|
|
62925
|
-
(0,
|
|
63010
|
+
(0, import_react80.createElement)(
|
|
62926
63011
|
Labeled,
|
|
62927
63012
|
{ label: "IconButton \xB7 color / background" },
|
|
62928
|
-
(0,
|
|
62929
|
-
(0,
|
|
62930
|
-
(0,
|
|
63013
|
+
(0, import_react80.createElement)(IconButton, { icon: (0, import_react80.createElement)(BUTTON_ICONS[0].Icon, { size: 16 }), label: "\u9ED8\u8BA4\u65E0\u5E95\u8272" }),
|
|
63014
|
+
(0, import_react80.createElement)(IconButton, { icon: (0, import_react80.createElement)(BUTTON_ICONS[1].Icon, { size: 16 }), label: "\u81EA\u5B9A\u4E49\u56FE\u6807\u8272", color: "#7c3aed" }),
|
|
63015
|
+
(0, import_react80.createElement)(IconButton, { icon: (0, import_react80.createElement)(BUTTON_ICONS[2].Icon, { size: 16 }), label: "\u81EA\u5B9A\u4E49\u5E95\u8272", color: "#fff", background: "#7c3aed" })
|
|
63016
|
+
),
|
|
63017
|
+
// 纯图标钮也吃同一套 loading:图标位换成小圈,文字本来就没有
|
|
63018
|
+
(0, import_react80.createElement)(
|
|
63019
|
+
Labeled,
|
|
63020
|
+
{ label: "IconButton \xB7 loading" },
|
|
63021
|
+
(0, import_react80.createElement)(IconButton, { icon: (0, import_react80.createElement)(BUTTON_ICONS[0].Icon, { size: 16 }), label: "\u5237\u65B0", onClick: async () => {
|
|
63022
|
+
await demoWait();
|
|
63023
|
+
} }),
|
|
63024
|
+
(0, import_react80.createElement)(IconButton, { variant: "outline", icon: (0, import_react80.createElement)(BUTTON_ICONS[0].Icon, { size: 16 }), label: "\u52A0\u8F7D\u4E2D", loading: true })
|
|
62931
63025
|
)
|
|
62932
63026
|
)
|
|
62933
63027
|
),
|
|
62934
63028
|
// 状态
|
|
62935
|
-
(0,
|
|
63029
|
+
(0, import_react80.createElement)(
|
|
62936
63030
|
Example,
|
|
62937
63031
|
{ title: t3("btnStateTitle"), hint: t3("btnStateHint"), code: CODE_BTN_STATE },
|
|
62938
|
-
(0,
|
|
63032
|
+
(0, import_react80.createElement)(
|
|
62939
63033
|
"div",
|
|
62940
63034
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62941
|
-
(0,
|
|
63035
|
+
(0, import_react80.createElement)(
|
|
62942
63036
|
Labeled,
|
|
62943
63037
|
{ label: "\u7981\u7528" },
|
|
62944
|
-
(0,
|
|
62945
|
-
(0,
|
|
62946
|
-
(0,
|
|
63038
|
+
(0, import_react80.createElement)(Button, { variant: "primary" }, "\u9ED8\u8BA4"),
|
|
63039
|
+
(0, import_react80.createElement)(Button, { variant: "primary", disabled: true }, "\u7981\u7528"),
|
|
63040
|
+
(0, import_react80.createElement)(Button, { variant: "danger", disabled: true, icon: iconOf("close", ICON_SIZE.lg) }, "\u7981\u7528")
|
|
62947
63041
|
),
|
|
62948
|
-
(0,
|
|
63042
|
+
(0, import_react80.createElement)(
|
|
62949
63043
|
Labeled,
|
|
62950
63044
|
{ label: "loading" },
|
|
62951
|
-
(0,
|
|
62952
|
-
(0,
|
|
63045
|
+
(0, import_react80.createElement)(Button, { variant: "outline", loading: true }, "\u52A0\u8F7D\u4E2D"),
|
|
63046
|
+
(0, import_react80.createElement)(Button, { variant: "primary", loading: true, icon: iconOf("refresh", ICON_SIZE.lg) }, "\u63D0\u4EA4\u4E2D")
|
|
63047
|
+
),
|
|
63048
|
+
// 异步:onClick 返回 Promise 就自己转圈;外部 loading 与它取或(别处刷新也能点亮同一颗按钮)
|
|
63049
|
+
(0, import_react80.createElement)(
|
|
63050
|
+
Labeled,
|
|
63051
|
+
{ label: "\u5F02\u6B65 / \u5916\u90E8 loading" },
|
|
63052
|
+
(0, import_react80.createElement)(Button, { variant: "primary", onClick: async () => {
|
|
63053
|
+
await demoWait();
|
|
63054
|
+
} }, "\u70B9\u4E86\u81EA\u5DF1\u8F6C\u5708\uFF081.4s\uFF09"),
|
|
63055
|
+
(0, import_react80.createElement)(Button, { variant: "outline", loading: extLoading, onClick: () => setExtLoading((v) => !v) }, extLoading ? "\u5916\u90E8\u5237\u65B0\u4E2D\u2026" : "\u70B9\u6211\u70B9\u4EAE\u53F3\u8FB9"),
|
|
63056
|
+
(0, import_react80.createElement)(Button, { variant: "outline", loading: extLoading }, "\u88AB\u522B\u5904\u5237\u65B0\u5E26\u6210 loading")
|
|
62953
63057
|
)
|
|
62954
63058
|
)
|
|
62955
63059
|
),
|
|
62956
63060
|
// 自定义颜色
|
|
62957
|
-
(0,
|
|
63061
|
+
(0, import_react80.createElement)(
|
|
62958
63062
|
Example,
|
|
62959
63063
|
{ title: t3("btnColorTitle"), hint: t3("btnColorHint"), code: CODE_BTN_COLOR },
|
|
62960
|
-
(0,
|
|
63064
|
+
(0, import_react80.createElement)(
|
|
62961
63065
|
"div",
|
|
62962
63066
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62963
|
-
(0,
|
|
63067
|
+
(0, import_react80.createElement)(
|
|
62964
63068
|
Labeled,
|
|
62965
63069
|
{ label: "\u5B9E\u5FC3" },
|
|
62966
|
-
(0,
|
|
63070
|
+
(0, import_react80.createElement)(Row, null, CUSTOM_COLORS.map((color) => (0, import_react80.createElement)(Button, { key: color, variant: "primary", color, icon: iconOf("sparkle", ICON_SIZE.lg) }, color)))
|
|
62967
63071
|
),
|
|
62968
|
-
(0,
|
|
63072
|
+
(0, import_react80.createElement)(
|
|
62969
63073
|
Labeled,
|
|
62970
63074
|
{ label: "\u63CF\u8FB9" },
|
|
62971
|
-
(0,
|
|
63075
|
+
(0, import_react80.createElement)(Row, null, CUSTOM_COLORS.map((color) => (0, import_react80.createElement)(Button, { key: color, variant: "outline", color }, color)))
|
|
62972
63076
|
)
|
|
62973
63077
|
)
|
|
62974
63078
|
),
|
|
62975
63079
|
// 宽度三轴
|
|
62976
|
-
(0,
|
|
63080
|
+
(0, import_react80.createElement)(
|
|
62977
63081
|
Example,
|
|
62978
63082
|
{ title: t3("btnWidthTitle"), hint: t3("btnWidthHint"), code: CODE_BTN_WIDTH },
|
|
62979
|
-
(0,
|
|
63083
|
+
(0, import_react80.createElement)(
|
|
62980
63084
|
"div",
|
|
62981
63085
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62982
|
-
(0,
|
|
63086
|
+
(0, import_react80.createElement)(
|
|
62983
63087
|
Labeled,
|
|
62984
63088
|
{ label: "width\uFF08\u56FA\u5B9A\u5BBD\uFF09" },
|
|
62985
|
-
(0,
|
|
63089
|
+
(0, import_react80.createElement)(Button, { variant: "outline", width: 120 }, "120px \u56FA\u5B9A\u5BBD")
|
|
62986
63090
|
),
|
|
62987
|
-
(0,
|
|
63091
|
+
(0, import_react80.createElement)(
|
|
62988
63092
|
Labeled,
|
|
62989
63093
|
{ label: "minWidth\uFF08\u6700\u5C0F\u5BBD\uFF1A\u77ED / \u957F\u540C\u5BBD\uFF09" },
|
|
62990
|
-
(0,
|
|
63094
|
+
(0, import_react80.createElement)(
|
|
62991
63095
|
"div",
|
|
62992
63096
|
{ style: { display: "flex", gap: "8px" } },
|
|
62993
|
-
(0,
|
|
62994
|
-
(0,
|
|
63097
|
+
(0, import_react80.createElement)(Button, { variant: "outline", minWidth: 120 }, "\u77ED"),
|
|
63098
|
+
(0, import_react80.createElement)(Button, { variant: "outline", minWidth: 120 }, "\u5F88\u957F\u5F88\u957F\u5F88\u957F")
|
|
62995
63099
|
)
|
|
62996
63100
|
),
|
|
62997
|
-
(0,
|
|
63101
|
+
(0, import_react80.createElement)(
|
|
62998
63102
|
Labeled,
|
|
62999
63103
|
{ label: "maxWidth\uFF08\u6700\u5927\u5BBD\uFF1A\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\uFF09" },
|
|
63000
|
-
(0,
|
|
63104
|
+
(0, import_react80.createElement)(
|
|
63001
63105
|
"div",
|
|
63002
63106
|
{ style: { width: "320px" } },
|
|
63003
|
-
(0,
|
|
63107
|
+
(0, import_react80.createElement)(Button, { variant: "outline", maxWidth: 160 }, "\u8FD9\u662F\u4E00\u6BB5\u4F1A\u88AB\u6298\u53E0\u6210\u7701\u7565\u53F7\u7684\u8D85\u957F\u6309\u94AE\u6587\u5B57\u6807\u7B7E")
|
|
63004
63108
|
)
|
|
63005
63109
|
),
|
|
63006
|
-
(0,
|
|
63110
|
+
(0, import_react80.createElement)(
|
|
63007
63111
|
Labeled,
|
|
63008
63112
|
{ label: "\u4E09\u8005\u540C\u8BBE \u21D2 width \u4F18\u5148" },
|
|
63009
|
-
(0,
|
|
63113
|
+
(0, import_react80.createElement)(Button, { variant: "outline", width: 120, minWidth: 200, maxWidth: 160 }, "\u56FA\u5B9A\u5BBD\u4F18\u5148")
|
|
63010
63114
|
)
|
|
63011
63115
|
)
|
|
63012
63116
|
),
|
|
63013
|
-
(0,
|
|
63014
|
-
(0,
|
|
63117
|
+
(0, import_react80.createElement)(DocCode, { id: "button" }),
|
|
63118
|
+
(0, import_react80.createElement)(DocApi, { id: "button" })
|
|
63015
63119
|
);
|
|
63016
63120
|
}
|
|
63017
63121
|
var CODE_INPUT_FAMILY = `const [text, setText] = useState('')
|
|
@@ -63122,57 +63226,57 @@ var PERIODS = [
|
|
|
63122
63226
|
{ value: "month", label: "\u6708" }
|
|
63123
63227
|
];
|
|
63124
63228
|
function InputPage() {
|
|
63125
|
-
const [text2, setText] = (0,
|
|
63126
|
-
const [num, setNum] = (0,
|
|
63127
|
-
const [checked, setChecked] = (0,
|
|
63128
|
-
const [seg, setSeg] = (0,
|
|
63129
|
-
const [filter2, setFilter] = (0,
|
|
63130
|
-
const [multi, setMulti] = (0,
|
|
63131
|
-
const [iconSeg, setIconSeg] = (0,
|
|
63132
|
-
const [iconSeg2, setIconSeg2] = (0,
|
|
63133
|
-
const [kw, setKw] = (0,
|
|
63134
|
-
const [igValue, setIgValue] = (0,
|
|
63135
|
-
return (0,
|
|
63229
|
+
const [text2, setText] = (0, import_react80.useState)("");
|
|
63230
|
+
const [num, setNum] = (0, import_react80.useState)(3);
|
|
63231
|
+
const [checked, setChecked] = (0, import_react80.useState)(true);
|
|
63232
|
+
const [seg, setSeg] = (0, import_react80.useState)("week");
|
|
63233
|
+
const [filter2, setFilter] = (0, import_react80.useState)("all");
|
|
63234
|
+
const [multi, setMulti] = (0, import_react80.useState)(["1"]);
|
|
63235
|
+
const [iconSeg, setIconSeg] = (0, import_react80.useState)("search");
|
|
63236
|
+
const [iconSeg2, setIconSeg2] = (0, import_react80.useState)("all");
|
|
63237
|
+
const [kw, setKw] = (0, import_react80.useState)("");
|
|
63238
|
+
const [igValue, setIgValue] = (0, import_react80.useState)("");
|
|
63239
|
+
return (0, import_react80.createElement)(
|
|
63136
63240
|
"div",
|
|
63137
63241
|
null,
|
|
63138
|
-
(0,
|
|
63242
|
+
(0, import_react80.createElement)(DocProse, { id: "input" }),
|
|
63139
63243
|
// Input 家族
|
|
63140
|
-
(0,
|
|
63244
|
+
(0, import_react80.createElement)(
|
|
63141
63245
|
Example,
|
|
63142
63246
|
{ title: t3("demoInputFamily"), hint: t3("inputHint"), code: CODE_INPUT_FAMILY },
|
|
63143
|
-
(0,
|
|
63247
|
+
(0, import_react80.createElement)(
|
|
63144
63248
|
"div",
|
|
63145
63249
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", maxWidth: "380px" } },
|
|
63146
|
-
(0,
|
|
63250
|
+
(0, import_react80.createElement)(
|
|
63147
63251
|
"div",
|
|
63148
63252
|
{ style: { display: "flex", alignItems: "center", gap: "6px" } },
|
|
63149
|
-
(0,
|
|
63253
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-fg-2)", fontSize: "13px", flex: "none" } }, "\u7528\u6237\u540D"),
|
|
63150
63254
|
// hint 参数版:问号提示由组件自己挂(不再手动拼 FieldHint)
|
|
63151
|
-
(0,
|
|
63255
|
+
(0, import_react80.createElement)(Input, { value: text2, onChange: setText, placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D", hint: "\u7528\u6237\u540D\u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u4E0E\u8FDE\u5B57\u7B26\u3002" })
|
|
63152
63256
|
),
|
|
63153
|
-
(0,
|
|
63257
|
+
(0, import_react80.createElement)(
|
|
63154
63258
|
"div",
|
|
63155
63259
|
{ style: { display: "flex", alignItems: "center", gap: "6px" } },
|
|
63156
|
-
(0,
|
|
63260
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-fg-2)", fontSize: "13px", flex: "none" } }, "\u641C\u7D22"),
|
|
63157
63261
|
// 左侧图标槽(icon)+ 聚焦且有内容才出的清空钮(type="search")
|
|
63158
|
-
(0,
|
|
63262
|
+
(0, import_react80.createElement)(Input, { type: "search", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 16 }), value: kw, onChange: setKw, placeholder: "\u641C\u7D22" })
|
|
63159
63263
|
),
|
|
63160
|
-
(0,
|
|
63264
|
+
(0, import_react80.createElement)(Input, { value: "bad value", onChange: () => {
|
|
63161
63265
|
}, error: true, placeholder: "\u6821\u9A8C\u5931\u8D25\u6001" }),
|
|
63162
63266
|
// ⚠️ 外层是 flex column(默认 align-items:stretch)会把 .dshpc-num 拉到全宽;
|
|
63163
63267
|
// 组件本身是内容自适应宽(inline-flex 无 width),演示区还原成它本来的短宽。
|
|
63164
|
-
(0,
|
|
63165
|
-
(0,
|
|
63268
|
+
(0, import_react80.createElement)(NumberInput, { value: num, onChange: setNum, min: 0, max: 10, suffix: "\u6B21", style: { alignSelf: "flex-start" }, hint: "\u8D85\u51FA\u8303\u56F4\u4F1A\u81EA\u52A8\u6536\u56DE\u5230 min / max\u3002" }),
|
|
63269
|
+
(0, import_react80.createElement)(Textarea, { value: text2, onChange: setText, placeholder: "\u591A\u884C\u8F93\u5165", hint: "\u591A\u884C\u8F93\u5165\u4E5F\u652F\u6301 hint \u53C2\u6570\u3002" })
|
|
63166
63270
|
)
|
|
63167
63271
|
),
|
|
63168
63272
|
// 组合输入框:输入框 + 按钮组焊成一体(前置标题 / 撤销 / 图标按钮 / 自定义高度)
|
|
63169
|
-
(0,
|
|
63273
|
+
(0, import_react80.createElement)(
|
|
63170
63274
|
Example,
|
|
63171
63275
|
{ title: t3("inputGroupTitle"), hint: t3("inputGroupHint"), code: CODE_INPUT_GROUP },
|
|
63172
|
-
(0,
|
|
63276
|
+
(0, import_react80.createElement)(
|
|
63173
63277
|
"div",
|
|
63174
63278
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", maxWidth: "460px" } },
|
|
63175
|
-
(0,
|
|
63279
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63176
63280
|
label: "\u4EFB\u52A1\u540D",
|
|
63177
63281
|
value: igValue,
|
|
63178
63282
|
onChange: setIgValue,
|
|
@@ -63186,22 +63290,22 @@ function InputPage() {
|
|
|
63186
63290
|
} }
|
|
63187
63291
|
]
|
|
63188
63292
|
}),
|
|
63189
|
-
(0,
|
|
63293
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63190
63294
|
size: "md",
|
|
63191
63295
|
value: igValue,
|
|
63192
63296
|
onChange: setIgValue,
|
|
63193
63297
|
placeholder: "\u7EAF\u56FE\u6807 / \u56FE\u6807 + \u6587\u5B57 / \u7EAF\u6587\u5B57",
|
|
63194
63298
|
actions: [
|
|
63195
|
-
{ icon: (0,
|
|
63299
|
+
{ icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconRefreshOutlineRegular, { size: 14 }), ariaLabel: "\u91CD\u7F6E", onClick: () => {
|
|
63196
63300
|
setIgValue("");
|
|
63197
63301
|
} },
|
|
63198
|
-
{ icon: (0,
|
|
63302
|
+
{ icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), label: "\u641C\u7D22", onClick: () => {
|
|
63199
63303
|
} },
|
|
63200
63304
|
{ label: "\u63D0\u4EA4", onClick: () => {
|
|
63201
63305
|
} }
|
|
63202
63306
|
]
|
|
63203
63307
|
}),
|
|
63204
|
-
(0,
|
|
63308
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63205
63309
|
value: igValue,
|
|
63206
63310
|
onChange: setIgValue,
|
|
63207
63311
|
height: 44,
|
|
@@ -63213,62 +63317,62 @@ function InputPage() {
|
|
|
63213
63317
|
)
|
|
63214
63318
|
),
|
|
63215
63319
|
// 问号提示:证明它不属于 Input 家族,随处可挂
|
|
63216
|
-
(0,
|
|
63320
|
+
(0, import_react80.createElement)(
|
|
63217
63321
|
Example,
|
|
63218
63322
|
{ title: t3("btnHintTitle"), hint: t3("btnHintHint"), code: CODE_FIELD_HINT },
|
|
63219
|
-
(0,
|
|
63323
|
+
(0, import_react80.createElement)(
|
|
63220
63324
|
"div",
|
|
63221
63325
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
63222
|
-
(0,
|
|
63326
|
+
(0, import_react80.createElement)(
|
|
63223
63327
|
Row,
|
|
63224
63328
|
null,
|
|
63225
|
-
(0,
|
|
63226
|
-
(0,
|
|
63329
|
+
(0, import_react80.createElement)("b", { style: { fontSize: "13px" } }, "\u4E00\u4E2A\u6807\u9898"),
|
|
63330
|
+
(0, import_react80.createElement)(FieldHint, { text: "\u6302\u5728\u6807\u9898\u540E\u9762\uFF1A\u8BF4\u660E\u8FD9\u4E00\u5757\u662F\u5E72\u4EC0\u4E48\u7684\u3002" })
|
|
63227
63331
|
),
|
|
63228
|
-
(0,
|
|
63332
|
+
(0, import_react80.createElement)(
|
|
63229
63333
|
Row,
|
|
63230
63334
|
null,
|
|
63231
|
-
(0,
|
|
63232
|
-
(0,
|
|
63335
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, "\u4E00\u4E2A\u6309\u94AE"),
|
|
63336
|
+
(0, import_react80.createElement)(FieldHint, { text: "\u6302\u5728\u6309\u94AE\u540E\u9762\uFF1A\u89E3\u91CA\u8FD9\u4E2A\u64CD\u4F5C\u4F1A\u53D1\u751F\u4EC0\u4E48\u3002" })
|
|
63233
63337
|
),
|
|
63234
|
-
(0,
|
|
63338
|
+
(0, import_react80.createElement)(
|
|
63235
63339
|
Row,
|
|
63236
63340
|
null,
|
|
63237
|
-
(0,
|
|
63238
|
-
(0,
|
|
63341
|
+
(0, import_react80.createElement)("span", { style: { fontSize: "13px" } }, "\u4E00\u6BB5\u666E\u901A\u6587\u5B57"),
|
|
63342
|
+
(0, import_react80.createElement)(FieldHint, { text: "\u6302\u5728\u4EFB\u4F55\u6587\u5B57\u540E\u9762\u90FD\u884C\uFF0C\u5B83\u53EA\u662F\u4E00\u4E2A 14px \u7684\u5185\u8054\u5143\u7D20\u3002" })
|
|
63239
63343
|
)
|
|
63240
63344
|
)
|
|
63241
63345
|
),
|
|
63242
63346
|
// Switch / Checkbox / Segmented
|
|
63243
|
-
(0,
|
|
63347
|
+
(0, import_react80.createElement)(
|
|
63244
63348
|
Example,
|
|
63245
63349
|
{ title: t3("switchTip"), hint: t3("checkboxHint"), code: CODE_SWITCH_SEG },
|
|
63246
|
-
(0,
|
|
63350
|
+
(0, import_react80.createElement)(
|
|
63247
63351
|
"div",
|
|
63248
63352
|
{ style: { display: "flex", flexDirection: "column", gap: "14px", alignItems: "flex-start" } },
|
|
63249
|
-
(0,
|
|
63353
|
+
(0, import_react80.createElement)(
|
|
63250
63354
|
"div",
|
|
63251
63355
|
{ style: { display: "flex", gap: "20px", alignItems: "center", flexWrap: "wrap" } },
|
|
63252
63356
|
// 「启用」是开关语义,用官方 Switch(用户 2026-10-20:不要用勾去启用)。
|
|
63253
63357
|
// 官方 Switch 只画胶囊本体,label 是 aria-label,可见文案由调用方自己画在旁边 ——
|
|
63254
63358
|
// 文案单独挂 onClick 使其可点(不能挂外层:点胶囊会冒泡触发两次翻转)。
|
|
63255
|
-
(0,
|
|
63359
|
+
(0, import_react80.createElement)(
|
|
63256
63360
|
"span",
|
|
63257
63361
|
{ style: { display: "inline-flex", alignItems: "center", gap: "8px" } },
|
|
63258
|
-
(0,
|
|
63259
|
-
(0,
|
|
63362
|
+
(0, import_react80.createElement)(import_dsh_client_ui_primitives2.Switch, { checked, onChange: setChecked, label: "\u542F\u7528" }),
|
|
63363
|
+
(0, import_react80.createElement)("span", {
|
|
63260
63364
|
style: { fontSize: "13px", cursor: "pointer", userSelect: "none" },
|
|
63261
63365
|
onClick: () => {
|
|
63262
63366
|
setChecked(!checked);
|
|
63263
63367
|
}
|
|
63264
63368
|
}, "\u542F\u7528")
|
|
63265
63369
|
),
|
|
63266
|
-
(0,
|
|
63370
|
+
(0, import_react80.createElement)(Checkbox, { checked, onChange: setChecked, label: "\u591A\u9009" })
|
|
63267
63371
|
),
|
|
63268
|
-
(0,
|
|
63372
|
+
(0, import_react80.createElement)(
|
|
63269
63373
|
"div",
|
|
63270
63374
|
{ style: { display: "flex", gap: "20px", alignItems: "center", flexWrap: "wrap" } },
|
|
63271
|
-
(0,
|
|
63375
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63272
63376
|
items: [
|
|
63273
63377
|
{ value: "day", label: "\u65E5" },
|
|
63274
63378
|
{ value: "week", label: "\u5468" },
|
|
@@ -63277,7 +63381,7 @@ function InputPage() {
|
|
|
63277
63381
|
value: seg,
|
|
63278
63382
|
onChange: setSeg
|
|
63279
63383
|
}),
|
|
63280
|
-
(0,
|
|
63384
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63281
63385
|
bordered: true,
|
|
63282
63386
|
items: [
|
|
63283
63387
|
{ value: "day", label: "\u65E5" },
|
|
@@ -63287,7 +63391,7 @@ function InputPage() {
|
|
|
63287
63391
|
value: seg,
|
|
63288
63392
|
onChange: setSeg
|
|
63289
63393
|
}),
|
|
63290
|
-
(0,
|
|
63394
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63291
63395
|
size: "sm",
|
|
63292
63396
|
items: [
|
|
63293
63397
|
{ value: "day", label: "\u65E5" },
|
|
@@ -63297,7 +63401,7 @@ function InputPage() {
|
|
|
63297
63401
|
value: seg,
|
|
63298
63402
|
onChange: setSeg
|
|
63299
63403
|
}),
|
|
63300
|
-
(0,
|
|
63404
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63301
63405
|
size: "sm",
|
|
63302
63406
|
bordered: true,
|
|
63303
63407
|
items: [
|
|
@@ -63310,7 +63414,7 @@ function InputPage() {
|
|
|
63310
63414
|
})
|
|
63311
63415
|
),
|
|
63312
63416
|
// 筛选条形态(真实插件同款):中性计数 + 灰底轨道
|
|
63313
|
-
(0,
|
|
63417
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63314
63418
|
items: [
|
|
63315
63419
|
{ value: "all", label: t3("segAll"), count: 11 },
|
|
63316
63420
|
{ value: "doing", label: t3("segDoing"), count: 5 },
|
|
@@ -63321,7 +63425,7 @@ function InputPage() {
|
|
|
63321
63425
|
value: filter2,
|
|
63322
63426
|
onChange: setFilter
|
|
63323
63427
|
}),
|
|
63324
|
-
(0,
|
|
63428
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63325
63429
|
bordered: true,
|
|
63326
63430
|
items: [
|
|
63327
63431
|
{ value: "all", label: t3("segAll"), count: 11 },
|
|
@@ -63334,7 +63438,7 @@ function InputPage() {
|
|
|
63334
63438
|
onChange: setFilter
|
|
63335
63439
|
}),
|
|
63336
63440
|
// 星期多选方块(蓝底选中、近似方形)
|
|
63337
|
-
(0,
|
|
63441
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63338
63442
|
multiple: true,
|
|
63339
63443
|
className: "dshpc-seg--weekday",
|
|
63340
63444
|
label: "\u661F\u671F",
|
|
@@ -63345,7 +63449,7 @@ function InputPage() {
|
|
|
63345
63449
|
value: multi,
|
|
63346
63450
|
onChange: setMulti
|
|
63347
63451
|
}),
|
|
63348
|
-
(0,
|
|
63452
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63349
63453
|
multiple: true,
|
|
63350
63454
|
className: "dshpc-seg--weekday",
|
|
63351
63455
|
bordered: true,
|
|
@@ -63358,20 +63462,20 @@ function InputPage() {
|
|
|
63358
63462
|
onChange: setMulti
|
|
63359
63463
|
}),
|
|
63360
63464
|
// 段内图标:icon 在前、文字居中、count 在后;只有图标(无文字 / 计数)时自动正方形
|
|
63361
|
-
(0,
|
|
63465
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63362
63466
|
items: [
|
|
63363
|
-
{ value: "search", icon: (0,
|
|
63364
|
-
{ value: "clock", icon: (0,
|
|
63365
|
-
{ value: "play", icon: (0,
|
|
63467
|
+
{ value: "search", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), ariaLabel: "\u641C\u7D22" },
|
|
63468
|
+
{ value: "clock", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 14 }), ariaLabel: "\u65F6\u95F4" },
|
|
63469
|
+
{ value: "play", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconPlayOutlineRegular, { size: 14 }), ariaLabel: "\u8FD0\u884C" }
|
|
63366
63470
|
],
|
|
63367
63471
|
value: iconSeg,
|
|
63368
63472
|
onChange: setIconSeg
|
|
63369
63473
|
}),
|
|
63370
|
-
(0,
|
|
63474
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63371
63475
|
items: [
|
|
63372
|
-
{ value: "all", icon: (0,
|
|
63373
|
-
{ value: "doing", icon: (0,
|
|
63374
|
-
{ value: "done", icon: (0,
|
|
63476
|
+
{ value: "all", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), label: t3("segAll"), count: 11 },
|
|
63477
|
+
{ value: "doing", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 14 }), label: t3("segDoing"), count: 5 },
|
|
63478
|
+
{ value: "done", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconCheckOutlineRegular, { size: 14 }), label: t3("segClaimed"), count: 11 }
|
|
63375
63479
|
],
|
|
63376
63480
|
value: iconSeg2,
|
|
63377
63481
|
onChange: setIconSeg2
|
|
@@ -63379,36 +63483,36 @@ function InputPage() {
|
|
|
63379
63483
|
)
|
|
63380
63484
|
),
|
|
63381
63485
|
// 选中片配色(tone,2026-10-29):内置色名 / 自定义一对颜色
|
|
63382
|
-
(0,
|
|
63486
|
+
(0, import_react80.createElement)(
|
|
63383
63487
|
Example,
|
|
63384
63488
|
{ title: t3("segToneTitle"), hint: t3("segToneHint"), code: CODE_SEG_TONE },
|
|
63385
|
-
(0,
|
|
63489
|
+
(0, import_react80.createElement)(
|
|
63386
63490
|
"div",
|
|
63387
63491
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", alignItems: "flex-start" } },
|
|
63388
|
-
(0,
|
|
63492
|
+
(0, import_react80.createElement)(
|
|
63389
63493
|
Labeled,
|
|
63390
63494
|
{ label: 'tone="teal"' },
|
|
63391
|
-
(0,
|
|
63495
|
+
(0, import_react80.createElement)(Segmented, { tone: "teal", items: PERIODS, value: seg, onChange: setSeg })
|
|
63392
63496
|
),
|
|
63393
|
-
(0,
|
|
63497
|
+
(0, import_react80.createElement)(
|
|
63394
63498
|
Labeled,
|
|
63395
63499
|
{ label: 'tone="danger"' },
|
|
63396
|
-
(0,
|
|
63500
|
+
(0, import_react80.createElement)(Segmented, { tone: "danger", items: PERIODS, value: seg, onChange: setSeg })
|
|
63397
63501
|
),
|
|
63398
|
-
(0,
|
|
63502
|
+
(0, import_react80.createElement)(
|
|
63399
63503
|
Labeled,
|
|
63400
63504
|
{ label: "{ bg, fg }" },
|
|
63401
|
-
(0,
|
|
63505
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63402
63506
|
tone: { bg: "#0b3d2e", fg: "#d1fae5" },
|
|
63403
63507
|
items: PERIODS,
|
|
63404
63508
|
value: seg,
|
|
63405
63509
|
onChange: setSeg
|
|
63406
63510
|
})
|
|
63407
63511
|
),
|
|
63408
|
-
(0,
|
|
63512
|
+
(0, import_react80.createElement)(
|
|
63409
63513
|
Labeled,
|
|
63410
63514
|
{ label: "tone + weekday" },
|
|
63411
|
-
(0,
|
|
63515
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63412
63516
|
multiple: true,
|
|
63413
63517
|
tone: "purple",
|
|
63414
63518
|
className: "dshpc-seg--weekday",
|
|
@@ -63423,16 +63527,16 @@ function InputPage() {
|
|
|
63423
63527
|
)
|
|
63424
63528
|
)
|
|
63425
63529
|
),
|
|
63426
|
-
(0,
|
|
63427
|
-
(0,
|
|
63428
|
-
(0,
|
|
63429
|
-
(0,
|
|
63530
|
+
(0, import_react80.createElement)(DocCode, { id: "input" }),
|
|
63531
|
+
(0, import_react80.createElement)(DocApi, { id: "input" }),
|
|
63532
|
+
(0, import_react80.createElement)(DocApi, { id: "input-group" }),
|
|
63533
|
+
(0, import_react80.createElement)(Placeholder2, { descKey: "inputMissingDesc" })
|
|
63430
63534
|
);
|
|
63431
63535
|
}
|
|
63432
63536
|
var ICON_OPTIONS = [
|
|
63433
|
-
{ value: "a", label: "\u9009\u9879 A", icon: (0,
|
|
63434
|
-
{ value: "b", label: "\u9009\u9879 B", icon: (0,
|
|
63435
|
-
{ value: "c", label: "\u9009\u9879 C", icon: (0,
|
|
63537
|
+
{ value: "a", label: "\u9009\u9879 A", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSparkleRegular, { size: 14 }) },
|
|
63538
|
+
{ value: "b", label: "\u9009\u9879 B", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 14 }) },
|
|
63539
|
+
{ value: "c", label: "\u9009\u9879 C", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconPlayOutlineRegular, { size: 14 }) }
|
|
63436
63540
|
];
|
|
63437
63541
|
var CODE_PICKER = `// \u5355\u9009\uFF1Aicon + \u53EF\u641C\u7D22 / \u53EF\u6E05\u9664
|
|
63438
63542
|
<Picker
|
|
@@ -63508,51 +63612,51 @@ var SPLIT_MEMBERS = {
|
|
|
63508
63612
|
]
|
|
63509
63613
|
};
|
|
63510
63614
|
function PickerPage() {
|
|
63511
|
-
const [single, setSingle] = (0,
|
|
63512
|
-
const [multi, setMulti] = (0,
|
|
63513
|
-
const [model, setModel] = (0,
|
|
63514
|
-
const [model2, setModel2] = (0,
|
|
63515
|
-
const [ws, setWs] = (0,
|
|
63516
|
-
const [period2, setPeriod] = (0,
|
|
63517
|
-
const [bucket, setBucket] = (0,
|
|
63518
|
-
const [scope, setScope] = (0,
|
|
63519
|
-
const [member, setMember] = (0,
|
|
63520
|
-
const [groups, setGroups] = (0,
|
|
63521
|
-
const [groupValue, setGroupValue] = (0,
|
|
63522
|
-
return (0,
|
|
63615
|
+
const [single, setSingle] = (0, import_react80.useState)(void 0);
|
|
63616
|
+
const [multi, setMulti] = (0, import_react80.useState)([]);
|
|
63617
|
+
const [model, setModel] = (0, import_react80.useState)("");
|
|
63618
|
+
const [model2, setModel2] = (0, import_react80.useState)("");
|
|
63619
|
+
const [ws, setWs] = (0, import_react80.useState)(void 0);
|
|
63620
|
+
const [period2, setPeriod] = (0, import_react80.useState)("formal");
|
|
63621
|
+
const [bucket, setBucket] = (0, import_react80.useState)("");
|
|
63622
|
+
const [scope, setScope] = (0, import_react80.useState)("project");
|
|
63623
|
+
const [member, setMember] = (0, import_react80.useState)("");
|
|
63624
|
+
const [groups, setGroups] = (0, import_react80.useState)(["a"]);
|
|
63625
|
+
const [groupValue, setGroupValue] = (0, import_react80.useState)("");
|
|
63626
|
+
return (0, import_react80.createElement)(
|
|
63523
63627
|
"div",
|
|
63524
63628
|
null,
|
|
63525
|
-
(0,
|
|
63526
|
-
(0,
|
|
63629
|
+
(0, import_react80.createElement)(DocProse, { id: "picker" }),
|
|
63630
|
+
(0, import_react80.createElement)(
|
|
63527
63631
|
Example,
|
|
63528
63632
|
{ title: "Picker", hint: t3("pickerHint"), code: CODE_PICKER },
|
|
63529
|
-
(0,
|
|
63633
|
+
(0, import_react80.createElement)(
|
|
63530
63634
|
"div",
|
|
63531
63635
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
63532
|
-
(0,
|
|
63636
|
+
(0, import_react80.createElement)(Picker, {
|
|
63533
63637
|
options: ICON_OPTIONS,
|
|
63534
|
-
icon: (0,
|
|
63638
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSparkleRegular, { size: 14 }),
|
|
63535
63639
|
value: single,
|
|
63536
63640
|
onChange: (v) => setSingle(v),
|
|
63537
63641
|
searchable: true,
|
|
63538
63642
|
clearable: true,
|
|
63539
63643
|
placeholder: "\u5355\u9009\uFF08icon + \u53EF\u641C\u7D22/\u53EF\u6E05\u9664\uFF09"
|
|
63540
63644
|
}),
|
|
63541
|
-
(0,
|
|
63645
|
+
(0, import_react80.createElement)(Picker, {
|
|
63542
63646
|
options: ICON_OPTIONS,
|
|
63543
63647
|
value: single,
|
|
63544
63648
|
onChange: (v) => setSingle(v),
|
|
63545
63649
|
placeholder: "\u5355\u9009\uFF08\u65E0\u641C\u7D22\u6846\uFF09"
|
|
63546
63650
|
}),
|
|
63547
|
-
(0,
|
|
63651
|
+
(0, import_react80.createElement)(Picker, {
|
|
63548
63652
|
groups: [
|
|
63549
63653
|
{ value: "g1", label: "\u7EC4\u4E00", options: ICON_OPTIONS },
|
|
63550
63654
|
{
|
|
63551
63655
|
value: "g2",
|
|
63552
63656
|
label: "\u7EC4\u4E8C",
|
|
63553
63657
|
options: [
|
|
63554
|
-
{ value: "d", label: "\u9009\u9879 D", icon: (0,
|
|
63555
|
-
{ value: "e", label: "\u9009\u9879 E", icon: (0,
|
|
63658
|
+
{ value: "d", label: "\u9009\u9879 D", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconRefreshOutlineRegular, { size: 14 }) },
|
|
63659
|
+
{ value: "e", label: "\u9009\u9879 E", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconPlusOutlineRegular, { size: 14 }) }
|
|
63556
63660
|
]
|
|
63557
63661
|
}
|
|
63558
63662
|
],
|
|
@@ -63563,13 +63667,13 @@ function PickerPage() {
|
|
|
63563
63667
|
searchable: true,
|
|
63564
63668
|
placeholder: "\u591A\u9009\uFF08\u4E0A\u9650 2\uFF0C\u53EF\u53CD\u9009\uFF09"
|
|
63565
63669
|
}),
|
|
63566
|
-
(0,
|
|
63670
|
+
(0, import_react80.createElement)(Picker, {
|
|
63567
63671
|
options: [{ value: "x", label: "\u964D\u7EA7\u793A\u4F8B" }],
|
|
63568
63672
|
degraded: true,
|
|
63569
63673
|
disabled: true,
|
|
63570
63674
|
placeholder: "\u964D\u7EA7 + \u7981\u7528"
|
|
63571
63675
|
}),
|
|
63572
|
-
(0,
|
|
63676
|
+
(0, import_react80.createElement)(Picker, {
|
|
63573
63677
|
options: ICON_OPTIONS,
|
|
63574
63678
|
value: single,
|
|
63575
63679
|
onChange: (v) => setSingle(v),
|
|
@@ -63578,16 +63682,16 @@ function PickerPage() {
|
|
|
63578
63682
|
})
|
|
63579
63683
|
)
|
|
63580
63684
|
),
|
|
63581
|
-
(0,
|
|
63685
|
+
(0, import_react80.createElement)(
|
|
63582
63686
|
Example,
|
|
63583
63687
|
{ title: t3("exModelPickerTitle"), hint: t3("modelPickerHint"), code: CODE_MODEL_PICKER },
|
|
63584
|
-
(0,
|
|
63688
|
+
(0, import_react80.createElement)(
|
|
63585
63689
|
"div",
|
|
63586
63690
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap" } },
|
|
63587
63691
|
// ① 分组形态:一个下拉、完全独立,供应商做组头(带「默认模型」选项)
|
|
63588
|
-
(0,
|
|
63692
|
+
(0, import_react80.createElement)(ModelPicker, { value: model, onChange: setModel, variant: "grouped" }),
|
|
63589
63693
|
// ② 联动形态:两个下拉联动,先选供应商、模型列表跟着筛
|
|
63590
|
-
(0,
|
|
63694
|
+
(0, import_react80.createElement)(ModelPicker, {
|
|
63591
63695
|
value: model2,
|
|
63592
63696
|
onChange: setModel2,
|
|
63593
63697
|
variant: "cascade",
|
|
@@ -63595,14 +63699,14 @@ function PickerPage() {
|
|
|
63595
63699
|
})
|
|
63596
63700
|
)
|
|
63597
63701
|
),
|
|
63598
|
-
(0,
|
|
63702
|
+
(0, import_react80.createElement)(
|
|
63599
63703
|
Example,
|
|
63600
63704
|
{ title: t3("exWorkspacePickerTitle"), hint: t3("workspacePickerHint"), code: CODE_WORKSPACE_PICKER },
|
|
63601
|
-
(0,
|
|
63705
|
+
(0, import_react80.createElement)(
|
|
63602
63706
|
"div",
|
|
63603
63707
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap" } },
|
|
63604
63708
|
// 默认即我们给的名字(「工作区」)和文件夹图标;自定义文案 / 图标是可选能力,不在演示里铺
|
|
63605
|
-
(0,
|
|
63709
|
+
(0, import_react80.createElement)(WorkspacePicker, {
|
|
63606
63710
|
value: ws,
|
|
63607
63711
|
onChange: (v) => setWs(v),
|
|
63608
63712
|
clearable: true,
|
|
@@ -63610,18 +63714,18 @@ function PickerPage() {
|
|
|
63610
63714
|
})
|
|
63611
63715
|
)
|
|
63612
63716
|
),
|
|
63613
|
-
(0,
|
|
63717
|
+
(0, import_react80.createElement)(
|
|
63614
63718
|
Example,
|
|
63615
63719
|
{ title: t3("exSplitGroupTitle"), hint: t3("splitGroupHint"), code: CODE_SPLIT_GROUP },
|
|
63616
63720
|
// 形态一(单选滑块 + 下拉):左滑块选「正式组 / 测试组」,右格下拉联动换源、且略长;sm/md/lg 三档
|
|
63617
|
-
(0,
|
|
63721
|
+
(0, import_react80.createElement)(
|
|
63618
63722
|
"div",
|
|
63619
63723
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
63620
63724
|
["sm", "md", "lg"].map(
|
|
63621
|
-
(sz) => (0,
|
|
63725
|
+
(sz) => (0, import_react80.createElement)(
|
|
63622
63726
|
SplitGroup,
|
|
63623
63727
|
{ key: sz, label: `\u5355\u9009 \xB7 ${sz}` },
|
|
63624
|
-
(0,
|
|
63728
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63625
63729
|
size: sz,
|
|
63626
63730
|
items: SPLIT_SINGLE_OPTS,
|
|
63627
63731
|
value: period2,
|
|
@@ -63630,7 +63734,7 @@ function PickerPage() {
|
|
|
63630
63734
|
setBucket("");
|
|
63631
63735
|
}
|
|
63632
63736
|
}),
|
|
63633
|
-
(0,
|
|
63737
|
+
(0, import_react80.createElement)(Picker, {
|
|
63634
63738
|
size: sz,
|
|
63635
63739
|
options: SPLIT_TARGETS[period2] ?? [],
|
|
63636
63740
|
value: bucket,
|
|
@@ -63643,14 +63747,14 @@ function PickerPage() {
|
|
|
63643
63747
|
)
|
|
63644
63748
|
),
|
|
63645
63749
|
// 形态二(下拉 + 下拉):左格「范围」、右格「值」,三个尺寸各来一个
|
|
63646
|
-
(0,
|
|
63750
|
+
(0, import_react80.createElement)(
|
|
63647
63751
|
"div",
|
|
63648
63752
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start", marginTop: "12px" } },
|
|
63649
63753
|
["sm", "md", "lg"].map(
|
|
63650
|
-
(sz) => (0,
|
|
63754
|
+
(sz) => (0, import_react80.createElement)(
|
|
63651
63755
|
SplitGroup,
|
|
63652
63756
|
{ key: sz, label: `\u4E0B\u62C9 \xB7 ${sz}` },
|
|
63653
|
-
(0,
|
|
63757
|
+
(0, import_react80.createElement)(Picker, {
|
|
63654
63758
|
size: sz,
|
|
63655
63759
|
options: SPLIT_SCOPES,
|
|
63656
63760
|
value: scope,
|
|
@@ -63660,7 +63764,7 @@ function PickerPage() {
|
|
|
63660
63764
|
},
|
|
63661
63765
|
minWidth: 110
|
|
63662
63766
|
}),
|
|
63663
|
-
(0,
|
|
63767
|
+
(0, import_react80.createElement)(Picker, {
|
|
63664
63768
|
size: sz,
|
|
63665
63769
|
options: SPLIT_MEMBERS[scope] ?? [],
|
|
63666
63770
|
value: member,
|
|
@@ -63673,20 +63777,20 @@ function PickerPage() {
|
|
|
63673
63777
|
)
|
|
63674
63778
|
),
|
|
63675
63779
|
// 多选:左滑块 A/B/C 三组可多选,右格一个下拉
|
|
63676
|
-
(0,
|
|
63780
|
+
(0, import_react80.createElement)(
|
|
63677
63781
|
"div",
|
|
63678
63782
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start", marginTop: "12px" } },
|
|
63679
|
-
(0,
|
|
63783
|
+
(0, import_react80.createElement)(
|
|
63680
63784
|
SplitGroup,
|
|
63681
63785
|
{ label: "\u591A\u9009" },
|
|
63682
|
-
(0,
|
|
63786
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63683
63787
|
size: "lg",
|
|
63684
63788
|
multiple: true,
|
|
63685
63789
|
items: SPLIT_GROUPS,
|
|
63686
63790
|
value: groups,
|
|
63687
63791
|
onChange: setGroups
|
|
63688
63792
|
}),
|
|
63689
|
-
(0,
|
|
63793
|
+
(0, import_react80.createElement)(Picker, {
|
|
63690
63794
|
size: "lg",
|
|
63691
63795
|
options: SPLIT_FIXED,
|
|
63692
63796
|
value: groupValue,
|
|
@@ -63697,10 +63801,10 @@ function PickerPage() {
|
|
|
63697
63801
|
)
|
|
63698
63802
|
)
|
|
63699
63803
|
),
|
|
63700
|
-
(0,
|
|
63701
|
-
(0,
|
|
63702
|
-
(0,
|
|
63703
|
-
(0,
|
|
63804
|
+
(0, import_react80.createElement)(DocApi, { id: "split-group" }),
|
|
63805
|
+
(0, import_react80.createElement)(DocCode, { id: "picker" }),
|
|
63806
|
+
(0, import_react80.createElement)(DocApi, { id: "picker" }),
|
|
63807
|
+
(0, import_react80.createElement)(Placeholder2, { descKey: "pickerLogicDesc" })
|
|
63704
63808
|
);
|
|
63705
63809
|
}
|
|
63706
63810
|
var CODE_TOOLTIP = `// label + side / align\uFF1Bchildren \u5FC5\u987B\u662F\u80FD\u6302 ref \u7684\u771F\u5B9E DOM\uFF08\u51FD\u6570\u7EC4\u4EF6\u6302\u4E0D\u4E0A \u21D2 \u65E0\u6C14\u6CE1\uFF09
|
|
@@ -63724,17 +63828,17 @@ var CODE_TOOLTIP = `// label + side / align\uFF1Bchildren \u5FC5\u987B\u662F\u80
|
|
|
63724
63828
|
content={<div style={{ color: 'var(--dsw-static-neutral-bluish-00,#fff)' }}>\u2026</div>}
|
|
63725
63829
|
/>`;
|
|
63726
63830
|
function TooltipPage() {
|
|
63727
|
-
return (0,
|
|
63831
|
+
return (0, import_react80.createElement)(
|
|
63728
63832
|
"div",
|
|
63729
63833
|
null,
|
|
63730
|
-
(0,
|
|
63731
|
-
(0,
|
|
63834
|
+
(0, import_react80.createElement)(DocProse, { id: "tooltip" }),
|
|
63835
|
+
(0, import_react80.createElement)(
|
|
63732
63836
|
Example,
|
|
63733
63837
|
{ title: t3("tooltipTitle"), hint: t3("tooltipHint"), code: CODE_TOOLTIP },
|
|
63734
|
-
(0,
|
|
63838
|
+
(0, import_react80.createElement)(
|
|
63735
63839
|
"div",
|
|
63736
63840
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
63737
|
-
(0,
|
|
63841
|
+
(0, import_react80.createElement)(
|
|
63738
63842
|
Labeled,
|
|
63739
63843
|
{ label: t3("tooltipAnchorButton") },
|
|
63740
63844
|
tipAnchor("top \xB7 center", "top", "center"),
|
|
@@ -63743,52 +63847,52 @@ function TooltipPage() {
|
|
|
63743
63847
|
tipAnchor("bottom \xB7 end", "bottom", "end"),
|
|
63744
63848
|
tipAnchor("right", "right")
|
|
63745
63849
|
),
|
|
63746
|
-
(0,
|
|
63850
|
+
(0, import_react80.createElement)(
|
|
63747
63851
|
Labeled,
|
|
63748
63852
|
{ label: t3("tooltipAnchorText") },
|
|
63749
|
-
(0,
|
|
63853
|
+
(0, import_react80.createElement)(
|
|
63750
63854
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63751
63855
|
{ label: t3("tooltipHint"), side: "top" },
|
|
63752
|
-
(0,
|
|
63856
|
+
(0, import_react80.createElement)("span", {
|
|
63753
63857
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63754
63858
|
}, t3("tooltipAnchorText"))
|
|
63755
63859
|
),
|
|
63756
|
-
(0,
|
|
63860
|
+
(0, import_react80.createElement)(
|
|
63757
63861
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63758
63862
|
{ label: t3("tooltipLongText"), side: "bottom", maxWidth: 240 },
|
|
63759
|
-
(0,
|
|
63863
|
+
(0, import_react80.createElement)("span", {
|
|
63760
63864
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63761
63865
|
}, t3("tooltipLong"))
|
|
63762
63866
|
)
|
|
63763
63867
|
),
|
|
63764
63868
|
// 两段式:第一行名字(短)、\n 真实换行、第二行正文(长,受 maxWidth 折行)
|
|
63765
|
-
(0,
|
|
63869
|
+
(0, import_react80.createElement)(
|
|
63766
63870
|
Labeled,
|
|
63767
63871
|
{ label: t3("tooltipMultiline") },
|
|
63768
|
-
(0,
|
|
63872
|
+
(0, import_react80.createElement)(
|
|
63769
63873
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63770
63874
|
{ label: `${t3("tooltipName")}
|
|
63771
63875
|
${t3("tooltipLongText")}`, side: "top", maxWidth: 260 },
|
|
63772
|
-
(0,
|
|
63876
|
+
(0, import_react80.createElement)("span", {
|
|
63773
63877
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63774
63878
|
}, t3("tooltipName"))
|
|
63775
63879
|
)
|
|
63776
63880
|
),
|
|
63777
63881
|
// 富卡片:官方 HoverCard(宿主工作区列表那种「标题 + 正文」卡就是它);content 收任意 ReactNode
|
|
63778
|
-
(0,
|
|
63882
|
+
(0, import_react80.createElement)(
|
|
63779
63883
|
Labeled,
|
|
63780
63884
|
{ label: t3("tooltipRich") },
|
|
63781
|
-
(0,
|
|
63885
|
+
(0, import_react80.createElement)(import_dsh_client_ui_primitives2.HoverCard, {
|
|
63782
63886
|
variant: "compact",
|
|
63783
63887
|
openDelayMs: 200,
|
|
63784
|
-
anchor: (0,
|
|
63888
|
+
anchor: (0, import_react80.createElement)("span", {
|
|
63785
63889
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63786
63890
|
}, t3("tooltipName")),
|
|
63787
63891
|
// ⚠️ 官方 HoverCard 的 compact 变体(.card)背景是硬编码 `#2C2C2E` 且**不设 color**
|
|
63788
63892
|
// (来源见 docs/design/external/dsh-host.md §10),卡片又被 portal 到 document.body,
|
|
63789
63893
|
// 文字色因此退化成继承:亮色下继承到近黑 ⇒ 黑字压深底。背景恒深 ⇒ 内容色必须由调用方给,
|
|
63790
63894
|
// 这里取官方 Tooltip 在同一个深底场景用的常量 `--dsw-static-neutral-bluish-00`(#fff)。
|
|
63791
|
-
content: (0,
|
|
63895
|
+
content: (0, import_react80.createElement)(
|
|
63792
63896
|
"div",
|
|
63793
63897
|
{
|
|
63794
63898
|
style: {
|
|
@@ -63797,15 +63901,15 @@ ${t3("tooltipLongText")}`, side: "top", maxWidth: 260 },
|
|
|
63797
63901
|
color: "var(--dsw-static-neutral-bluish-00,#fff)"
|
|
63798
63902
|
}
|
|
63799
63903
|
},
|
|
63800
|
-
(0,
|
|
63801
|
-
(0,
|
|
63904
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600, fontSize: "14px", marginBottom: "4px" } }, t3("tooltipName")),
|
|
63905
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", lineHeight: 1.6, whiteSpace: "pre-line", opacity: 0.78 } }, t3("tooltipLongText"))
|
|
63802
63906
|
)
|
|
63803
63907
|
})
|
|
63804
63908
|
)
|
|
63805
63909
|
)
|
|
63806
63910
|
),
|
|
63807
|
-
(0,
|
|
63808
|
-
(0,
|
|
63911
|
+
(0, import_react80.createElement)(DocCode, { id: "tooltip" }),
|
|
63912
|
+
(0, import_react80.createElement)(DocApi, { id: "tooltip" })
|
|
63809
63913
|
);
|
|
63810
63914
|
}
|
|
63811
63915
|
var CODE_CARD = `// Card\uFF1A\u590D\u7528 Surface \u5916\u6846\uFF08\u5E95 + 1px \u8FB9\u6846 + \u5706\u89D2 12\uFF09\uFF1B\u8272\u6761\u65B9\u4F4D\u4E0E\u95F4\u8DDD\u90FD\u53EF\u914D
|
|
@@ -63852,162 +63956,162 @@ var CODE_SECTION_HEAD = `// \u5206\u533A\u6807\u9898\uFF1A\u6807\u7B7E\uFF08\u53
|
|
|
63852
63956
|
]}
|
|
63853
63957
|
/>`;
|
|
63854
63958
|
function CardPage() {
|
|
63855
|
-
const [seg, setSeg] = (0,
|
|
63856
|
-
const [kw, setKw] = (0,
|
|
63857
|
-
return (0,
|
|
63959
|
+
const [seg, setSeg] = (0, import_react80.useState)("all");
|
|
63960
|
+
const [kw, setKw] = (0, import_react80.useState)("");
|
|
63961
|
+
return (0, import_react80.createElement)(
|
|
63858
63962
|
"div",
|
|
63859
63963
|
null,
|
|
63860
|
-
(0,
|
|
63861
|
-
(0,
|
|
63964
|
+
(0, import_react80.createElement)(DocProse, { id: "surface" }),
|
|
63965
|
+
(0, import_react80.createElement)(
|
|
63862
63966
|
Example,
|
|
63863
63967
|
{ title: t3("demoSurfaceTitle"), hint: t3("surfaceHint"), code: CODE_SURFACE },
|
|
63864
|
-
(0,
|
|
63968
|
+
(0, import_react80.createElement)(
|
|
63865
63969
|
"div",
|
|
63866
63970
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap", maxWidth: "640px" } },
|
|
63867
63971
|
["plain", "raised", "sunken", "subtle"].map(
|
|
63868
|
-
(tone) => (0,
|
|
63972
|
+
(tone) => (0, import_react80.createElement)(
|
|
63869
63973
|
Surface,
|
|
63870
63974
|
{ key: tone, tone, padding: "md", style: { flex: "1 1 140px" } },
|
|
63871
|
-
(0,
|
|
63872
|
-
(0,
|
|
63975
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-sm)", color: "var(--dshpc-fg-2)" } }, `tone="${tone}"`),
|
|
63976
|
+
(0, import_react80.createElement)("div", { style: { marginTop: "6px" } }, (0, import_react80.createElement)(Button, { size: "sm", variant: "outline" }, "Button"))
|
|
63873
63977
|
)
|
|
63874
63978
|
)
|
|
63875
63979
|
)
|
|
63876
63980
|
),
|
|
63877
|
-
(0,
|
|
63878
|
-
(0,
|
|
63981
|
+
(0, import_react80.createElement)(DocProse, { id: "card" }),
|
|
63982
|
+
(0, import_react80.createElement)(
|
|
63879
63983
|
Example,
|
|
63880
63984
|
{ title: t3("demoCardTitle"), hint: t3("cardHint"), code: CODE_CARD },
|
|
63881
|
-
(0,
|
|
63985
|
+
(0, import_react80.createElement)(
|
|
63882
63986
|
"div",
|
|
63883
63987
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", maxWidth: "640px" } },
|
|
63884
63988
|
// 真实形态示例(任务卡同款排版):右侧元信息走 action 槽 ⇒ 外壳自动垂直居中
|
|
63885
|
-
(0,
|
|
63989
|
+
(0, import_react80.createElement)(
|
|
63886
63990
|
Card,
|
|
63887
63991
|
{
|
|
63888
63992
|
accent: "business",
|
|
63889
|
-
action: (0,
|
|
63993
|
+
action: (0, import_react80.createElement)("span", { style: { color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)", flex: "none" } }, "2026-10-18 \u521B\u5EFA")
|
|
63890
63994
|
},
|
|
63891
|
-
(0,
|
|
63995
|
+
(0, import_react80.createElement)(
|
|
63892
63996
|
"div",
|
|
63893
63997
|
{ style: { fontWeight: 600, flex: "1 1 auto", minWidth: 0, fontSize: "var(--dshpc-font-md)" } },
|
|
63894
63998
|
"\u5C06 OpenSSH \u4E0A\u6240\u6709 NPM \u5B89\u88C5\u8FC1\u79FB\u5230 PNPM"
|
|
63895
63999
|
),
|
|
63896
|
-
(0,
|
|
64000
|
+
(0, import_react80.createElement)(
|
|
63897
64001
|
"div",
|
|
63898
64002
|
{ style: { display: "flex", alignItems: "center", gap: "6px", marginTop: "6px", flexWrap: "wrap" } },
|
|
63899
|
-
(0,
|
|
63900
|
-
(0,
|
|
63901
|
-
(0,
|
|
63902
|
-
(0,
|
|
63903
|
-
(0,
|
|
64003
|
+
(0, import_react80.createElement)(Chip, null, "NAS-Docker"),
|
|
64004
|
+
(0, import_react80.createElement)(Chip, null, "#npm"),
|
|
64005
|
+
(0, import_react80.createElement)(Chip, null, "#pnpm"),
|
|
64006
|
+
(0, import_react80.createElement)(Chip, null, "#OpenSSH"),
|
|
64007
|
+
(0, import_react80.createElement)(Chip, null, "#\u8FC1\u79FB")
|
|
63904
64008
|
)
|
|
63905
64009
|
),
|
|
63906
64010
|
// action 里裸放一个 button:不套容器也垂直居中;框内排版由调用方自定
|
|
63907
|
-
(0,
|
|
64011
|
+
(0, import_react80.createElement)(
|
|
63908
64012
|
Card,
|
|
63909
64013
|
{
|
|
63910
64014
|
accent: "business",
|
|
63911
|
-
action: (0,
|
|
64015
|
+
action: (0, import_react80.createElement)(Button, { size: "sm", variant: "ghost" }, "\u67E5\u770B\u4F1A\u8BDD")
|
|
63912
64016
|
},
|
|
63913
|
-
(0,
|
|
63914
|
-
(0,
|
|
64017
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600, fontSize: "var(--dshpc-font-md)" } }, "DAY:1 - Docker \u955C\u50CF\u7248\u672C\u68C0\u67E5\u5668"),
|
|
64018
|
+
(0, import_react80.createElement)("div", { style: { color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)", marginTop: "4px" } }, "NAS-Docker \xB7 \u8BA1\u5212 02:00 \xB7 \u5B9E\u9645 02:00 \xB7 \u65F6\u957F 04:02")
|
|
63915
64019
|
),
|
|
63916
64020
|
// accent 速览:单行紧凑卡,只看色条档位
|
|
63917
|
-
(0,
|
|
64021
|
+
(0, import_react80.createElement)(
|
|
63918
64022
|
"div",
|
|
63919
64023
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", marginTop: "4px" } },
|
|
63920
64024
|
["business", "success", "warning", "danger", "neutral", "purple", "pink", "cyan", "teal", "orange", "indigo", "rose", "slate"].map(
|
|
63921
|
-
(a) => (0,
|
|
64025
|
+
(a) => (0, import_react80.createElement)(
|
|
63922
64026
|
Card,
|
|
63923
64027
|
{ key: a, accent: a, style: { padding: "8px 12px" } },
|
|
63924
|
-
(0,
|
|
64028
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-sm)", color: "var(--dshpc-fg-2)" } }, `accent="${a}"`)
|
|
63925
64029
|
)
|
|
63926
64030
|
)
|
|
63927
64031
|
)
|
|
63928
64032
|
)
|
|
63929
64033
|
),
|
|
63930
|
-
(0,
|
|
64034
|
+
(0, import_react80.createElement)(
|
|
63931
64035
|
Example,
|
|
63932
64036
|
{ title: t3("demoBarTitle"), hint: t3("barHint"), code: CODE_BAR },
|
|
63933
|
-
(0,
|
|
64037
|
+
(0, import_react80.createElement)(
|
|
63934
64038
|
"div",
|
|
63935
64039
|
{ style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "8px", maxWidth: "640px" } },
|
|
63936
64040
|
["left", "right", "top", "bottom"].map(
|
|
63937
|
-
(side) => (0,
|
|
64041
|
+
(side) => (0, import_react80.createElement)(
|
|
63938
64042
|
Card,
|
|
63939
64043
|
{ key: side, accent: "business", bar: { side } },
|
|
63940
|
-
(0,
|
|
63941
|
-
(0,
|
|
64044
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-md)", fontWeight: 600 } }, `bar.side="${side}"`),
|
|
64045
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)", marginTop: "4px" } }, "inset 12 \xB7 gap 12")
|
|
63942
64046
|
)
|
|
63943
64047
|
)
|
|
63944
64048
|
)
|
|
63945
64049
|
),
|
|
63946
|
-
(0,
|
|
64050
|
+
(0, import_react80.createElement)(
|
|
63947
64051
|
Example,
|
|
63948
64052
|
{ title: t3("demoStripTitle"), hint: t3("stripHint"), code: CODE_STRIP_CARD },
|
|
63949
|
-
(0,
|
|
64053
|
+
(0, import_react80.createElement)(
|
|
63950
64054
|
"div",
|
|
63951
64055
|
{ style: { display: "flex", flexDirection: "column", gap: "4px", maxWidth: "640px" } },
|
|
63952
|
-
(0,
|
|
64056
|
+
(0, import_react80.createElement)(
|
|
63953
64057
|
StripCard,
|
|
63954
64058
|
{
|
|
63955
64059
|
accent: "business",
|
|
63956
|
-
action: (0,
|
|
64060
|
+
action: (0, import_react80.createElement)("span", { style: { color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)", flex: "none" } }, "2026-10-18 \u5F00\u59CB \xB7 \u4ECA\u5929")
|
|
63957
64061
|
},
|
|
63958
|
-
(0,
|
|
63959
|
-
(0,
|
|
64062
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600, fontSize: "var(--dshpc-font-md)" } }, "DAY:1 - Docker \u955C\u50CF\u7248\u672C\u68C0\u67E5\u5668"),
|
|
64063
|
+
(0, import_react80.createElement)(
|
|
63960
64064
|
"div",
|
|
63961
64065
|
{ style: { display: "flex", alignItems: "center", gap: "6px", marginTop: "4px", flexWrap: "wrap" } },
|
|
63962
|
-
(0,
|
|
63963
|
-
(0,
|
|
64066
|
+
(0, import_react80.createElement)(Chip, null, "NAS-Docker"),
|
|
64067
|
+
(0, import_react80.createElement)(
|
|
63964
64068
|
"span",
|
|
63965
64069
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)" } },
|
|
63966
64070
|
"\u8BA1\u5212 02:00 \xB7 \u5B9E\u9645 02:00 \xB7 \u65F6\u957F 04:02 \xB7 2.4M"
|
|
63967
64071
|
)
|
|
63968
64072
|
)
|
|
63969
64073
|
),
|
|
63970
|
-
(0,
|
|
64074
|
+
(0, import_react80.createElement)(
|
|
63971
64075
|
StripCard,
|
|
63972
64076
|
{
|
|
63973
64077
|
accent: "success",
|
|
63974
64078
|
// 右侧裸放一个描边钮(outline, sm=24px):不套容器也垂直居中
|
|
63975
|
-
action: (0,
|
|
64079
|
+
action: (0, import_react80.createElement)(Button, { size: "sm", variant: "outline" }, "Cancel")
|
|
63976
64080
|
},
|
|
63977
|
-
(0,
|
|
63978
|
-
(0,
|
|
64081
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600, fontSize: "var(--dshpc-font-md)" } }, "\u6267\u884C\u6210\u529F"),
|
|
64082
|
+
(0, import_react80.createElement)("div", { style: { color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)", marginTop: "4px" } }, "\u8017\u65F6 12s \xB7 3 \u4E2A\u6587\u4EF6\u53D8\u66F4")
|
|
63979
64083
|
),
|
|
63980
64084
|
// accent 速览:单行紧凑卡,只看色条档位(与 Card 节同款)
|
|
63981
|
-
(0,
|
|
64085
|
+
(0, import_react80.createElement)(
|
|
63982
64086
|
"div",
|
|
63983
64087
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", marginTop: "4px" } },
|
|
63984
64088
|
["business", "success", "warning", "danger", "neutral", "purple", "pink", "cyan", "teal", "orange", "indigo", "rose", "slate"].map(
|
|
63985
|
-
(a) => (0,
|
|
64089
|
+
(a) => (0, import_react80.createElement)(
|
|
63986
64090
|
StripCard,
|
|
63987
64091
|
{ key: a, accent: a, style: { padding: "8px 12px 8px 20px" } },
|
|
63988
|
-
(0,
|
|
64092
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-sm)", color: "var(--dshpc-fg-2)" } }, `accent="${a}"`)
|
|
63989
64093
|
)
|
|
63990
64094
|
)
|
|
63991
64095
|
)
|
|
63992
64096
|
)
|
|
63993
64097
|
),
|
|
63994
|
-
(0,
|
|
64098
|
+
(0, import_react80.createElement)(
|
|
63995
64099
|
Example,
|
|
63996
64100
|
{ title: t3("sectionHeadTitle"), hint: t3("exSectionHeadHint"), code: CODE_SECTION_HEAD },
|
|
63997
|
-
(0,
|
|
64101
|
+
(0, import_react80.createElement)(
|
|
63998
64102
|
"div",
|
|
63999
64103
|
{ style: { display: "flex", flexDirection: "column", gap: "8px" } },
|
|
64000
64104
|
// A:sparkle 图标 + “全部待办”后缀计数 + 右侧过滤组(滑轨 + 搜索框)
|
|
64001
|
-
(0,
|
|
64002
|
-
icon: (0,
|
|
64003
|
-
title: (0,
|
|
64105
|
+
(0, import_react80.createElement)(SectionHead, {
|
|
64106
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSparkleRegular, { size: 16 }),
|
|
64107
|
+
title: (0, import_react80.createElement)(
|
|
64004
64108
|
"span",
|
|
64005
64109
|
{ style: { display: "inline-flex", alignItems: "baseline", gap: "6px" } },
|
|
64006
64110
|
"\u5168\u90E8\u5F85\u529E",
|
|
64007
|
-
(0,
|
|
64111
|
+
(0, import_react80.createElement)("span", { style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)", fontWeight: 400 } }, "22")
|
|
64008
64112
|
),
|
|
64009
64113
|
right: [
|
|
64010
|
-
(0,
|
|
64114
|
+
(0, import_react80.createElement)(Segmented, {
|
|
64011
64115
|
items: [
|
|
64012
64116
|
{ value: "all", label: t3("segAll"), count: 22 },
|
|
64013
64117
|
{ value: "doing", label: t3("segDoing"), count: 11 },
|
|
@@ -64017,40 +64121,40 @@ function CardPage() {
|
|
|
64017
64121
|
onChange: setSeg
|
|
64018
64122
|
}),
|
|
64019
64123
|
// 搜索框 140px 定宽(兄弟项目 SEARCH_WIDTH 同款),外面套 div 控宽
|
|
64020
|
-
(0,
|
|
64124
|
+
(0, import_react80.createElement)(
|
|
64021
64125
|
"div",
|
|
64022
64126
|
{ style: { width: "140px", flex: "none" } },
|
|
64023
|
-
(0,
|
|
64127
|
+
(0, import_react80.createElement)(Input, { value: kw, onChange: setKw, placeholder: "\u641C\u7D22" })
|
|
64024
64128
|
)
|
|
64025
64129
|
]
|
|
64026
64130
|
}),
|
|
64027
64131
|
// B:clock 图标 + “我的待办” + 彩色标签 + 右侧单个操作钮
|
|
64028
|
-
(0,
|
|
64029
|
-
icon: (0,
|
|
64030
|
-
title: (0,
|
|
64132
|
+
(0, import_react80.createElement)(SectionHead, {
|
|
64133
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 16 }),
|
|
64134
|
+
title: (0, import_react80.createElement)(
|
|
64031
64135
|
"span",
|
|
64032
64136
|
{ style: { display: "inline-flex", alignItems: "center", gap: "6px" } },
|
|
64033
64137
|
"\u6211\u7684\u5F85\u529E",
|
|
64034
|
-
(0,
|
|
64138
|
+
(0, import_react80.createElement)(Chip, { tone: "success", size: "xs" }, "\u6700\u65B0")
|
|
64035
64139
|
),
|
|
64036
|
-
right: (0,
|
|
64140
|
+
right: (0, import_react80.createElement)(Button, { size: "sm", variant: "ghost" }, "\u5237\u65B0")
|
|
64037
64141
|
}),
|
|
64038
64142
|
// C:refresh 图标 + “已归档” + 小字说明 + 右侧操作组(两个钮)
|
|
64039
|
-
(0,
|
|
64040
|
-
icon: (0,
|
|
64041
|
-
title: (0,
|
|
64143
|
+
(0, import_react80.createElement)(SectionHead, {
|
|
64144
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconRefreshOutlineRegular, { size: 16 }),
|
|
64145
|
+
title: (0, import_react80.createElement)(
|
|
64042
64146
|
"span",
|
|
64043
64147
|
{ style: { display: "inline-flex", alignItems: "baseline", gap: "6px" } },
|
|
64044
64148
|
"\u5DF2\u5F52\u6863",
|
|
64045
|
-
(0,
|
|
64149
|
+
(0, import_react80.createElement)("span", { style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)", fontWeight: 400 } }, "\u5171 8 \u6761")
|
|
64046
64150
|
),
|
|
64047
64151
|
right: [
|
|
64048
|
-
(0,
|
|
64049
|
-
(0,
|
|
64152
|
+
(0, import_react80.createElement)(Button, { size: "sm", variant: "ghost" }, "\u64CD\u4F5C"),
|
|
64153
|
+
(0, import_react80.createElement)(Button, { size: "sm", variant: "secondary" }, "\u8BBE\u7F6E")
|
|
64050
64154
|
]
|
|
64051
64155
|
}),
|
|
64052
64156
|
// D:固定标签颜色速览 —— accent 内置色名 / 任意色值 / default / false
|
|
64053
|
-
(0,
|
|
64157
|
+
(0, import_react80.createElement)(
|
|
64054
64158
|
"div",
|
|
64055
64159
|
{ style: { display: "flex", flexDirection: "column", gap: "4px" } },
|
|
64056
64160
|
[
|
|
@@ -64059,12 +64163,12 @@ function CardPage() {
|
|
|
64059
64163
|
["success", "success"],
|
|
64060
64164
|
["#7c3aed", "#7c3aed"],
|
|
64061
64165
|
[false, "false\uFF08\u4E0D\u753B\uFF09"]
|
|
64062
|
-
].map(([accent, label]) => (0,
|
|
64166
|
+
].map(([accent, label]) => (0, import_react80.createElement)(SectionHead, { key: String(accent), accent, title: label, flush: true }))
|
|
64063
64167
|
)
|
|
64064
64168
|
)
|
|
64065
64169
|
),
|
|
64066
|
-
(0,
|
|
64067
|
-
(0,
|
|
64170
|
+
(0, import_react80.createElement)(DocCode, { id: "card" }),
|
|
64171
|
+
(0, import_react80.createElement)(DocApi, { id: "card" })
|
|
64068
64172
|
);
|
|
64069
64173
|
}
|
|
64070
64174
|
var CODE_CHIP = `// tone \u4E94\u6863 + size \u4E09\u6863\uFF1B\u5C3A\u5BF8\u884C\u56FA\u5B9A\u7531\u5927\u5230\u5C0F\uFF08md \u2192 sm \u2192 xs\uFF09\uFF0C\u540C\u6863\u6587\u6848\u4E0D\u6DF7\u6392
|
|
@@ -64074,7 +64178,7 @@ var CODE_CHIP = `// tone \u4E94\u6863 + size \u4E09\u6863\uFF1B\u5C3A\u5BF8\u884
|
|
|
64074
64178
|
|
|
64075
64179
|
// \u4E2D\u6027 # \u6807\u7B7E\uFF08\u8BED\u8A00\u65E0\u5173\uFF09\uFF1B\u4F20 onClick \u624D\u6E32\u67D3\u6210 button
|
|
64076
64180
|
<Chip>#npm</Chip>
|
|
64077
|
-
<Chip onClick={() =>
|
|
64181
|
+
<Chip onClick={() => notify('\u70B9\u4E86 chip')}>#\u53EF\u70B9</Chip>`;
|
|
64078
64182
|
var CODE_CHIP_WIDTH = `// \u56FA\u5B9A\u5BBD\uFF1A\u5199\u6B7B\u5BBD\u5EA6
|
|
64079
64183
|
<Chip width={90}>90px \u56FA\u5B9A\u5BBD</Chip>
|
|
64080
64184
|
|
|
@@ -64101,100 +64205,100 @@ var CODE_MARQUEE = `// \u5B9A\u5BBD\u5C0F\u5BB9\u5668\uFF1A\u653E\u4E0D\u4E0B\u6
|
|
|
64101
64205
|
var CODE_LIVE = `// \u8BA2\u9605\u5185\u90E8\u8282\u62CD\u5668\uFF0C\u8D70\u65F6\u5185\u5BB9\u8C03\u7528\u65B9\u6E32\u67D3
|
|
64102
64206
|
<LiveText render={(nowMs) => new Date(nowMs).toLocaleTimeString()} />`;
|
|
64103
64207
|
function ChipPage() {
|
|
64104
|
-
return (0,
|
|
64208
|
+
return (0, import_react80.createElement)(
|
|
64105
64209
|
"div",
|
|
64106
64210
|
null,
|
|
64107
|
-
(0,
|
|
64108
|
-
(0,
|
|
64211
|
+
(0, import_react80.createElement)(DocProse, { id: "chip" }),
|
|
64212
|
+
(0, import_react80.createElement)(
|
|
64109
64213
|
Example,
|
|
64110
64214
|
{ title: "Chip", hint: t3("chipHint"), code: CODE_CHIP },
|
|
64111
|
-
(0,
|
|
64215
|
+
(0, import_react80.createElement)(
|
|
64112
64216
|
"div",
|
|
64113
64217
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64114
64218
|
...["md", "sm", "xs"].map(
|
|
64115
|
-
(sz) => (0,
|
|
64219
|
+
(sz) => (0, import_react80.createElement)(
|
|
64116
64220
|
"div",
|
|
64117
64221
|
{ key: sz, style: { display: "flex", gap: "6px", flexWrap: "wrap", alignItems: "center" } },
|
|
64118
|
-
(0,
|
|
64119
|
-
(0,
|
|
64120
|
-
(0,
|
|
64121
|
-
(0,
|
|
64122
|
-
(0,
|
|
64222
|
+
(0, import_react80.createElement)(Chip, { size: sz, tone: "warning" }, t3("chipOverdue")),
|
|
64223
|
+
(0, import_react80.createElement)(Chip, { size: sz, tone: "danger" }, t3("chipStalled")),
|
|
64224
|
+
(0, import_react80.createElement)(Chip, { size: sz, tone: "success" }, t3("chipDone")),
|
|
64225
|
+
(0, import_react80.createElement)(Chip, { size: sz, tone: "business" }, t3("chipDoing")),
|
|
64226
|
+
(0, import_react80.createElement)(Chip, { size: sz }, `Tag ${sz.toUpperCase()}`)
|
|
64123
64227
|
)
|
|
64124
64228
|
),
|
|
64125
64229
|
// 中性 # 标签(语言无关)+ 长文字回归样
|
|
64126
|
-
(0,
|
|
64230
|
+
(0, import_react80.createElement)(
|
|
64127
64231
|
"div",
|
|
64128
64232
|
{ style: { display: "flex", gap: "6px", flexWrap: "wrap", alignItems: "center" } },
|
|
64129
|
-
(0,
|
|
64130
|
-
(0,
|
|
64131
|
-
(0,
|
|
64132
|
-
(0,
|
|
64233
|
+
(0, import_react80.createElement)(Chip, null, "#npm"),
|
|
64234
|
+
(0, import_react80.createElement)(Chip, null, "#\u6784\u5EFA"),
|
|
64235
|
+
(0, import_react80.createElement)(Chip, { onClick: () => notify("\u70B9\u4E86 chip") }, "#\u53EF\u70B9"),
|
|
64236
|
+
(0, import_react80.createElement)(Chip, null, "\u4E00\u6574\u6BB5\u6BD4\u8F83\u957F\u7684\u6807\u7B7E\u6587\u5B57\uFF0C\u5BBD\u5EA6\u5E94\u8BE5\u8DDF\u7740\u6587\u5B57\u8D70")
|
|
64133
64237
|
)
|
|
64134
64238
|
)
|
|
64135
64239
|
),
|
|
64136
|
-
(0,
|
|
64240
|
+
(0, import_react80.createElement)(
|
|
64137
64241
|
Example,
|
|
64138
64242
|
{ title: t3("chipWidthTitle"), hint: t3("chipWidthHint"), code: CODE_CHIP_WIDTH },
|
|
64139
|
-
(0,
|
|
64243
|
+
(0, import_react80.createElement)(
|
|
64140
64244
|
"div",
|
|
64141
64245
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64142
|
-
(0,
|
|
64246
|
+
(0, import_react80.createElement)(
|
|
64143
64247
|
Labeled,
|
|
64144
64248
|
{ label: "width\uFF08\u56FA\u5B9A\u5BBD\uFF09" },
|
|
64145
|
-
(0,
|
|
64249
|
+
(0, import_react80.createElement)(Chip, { width: 90 }, "90px \u56FA\u5B9A\u5BBD")
|
|
64146
64250
|
),
|
|
64147
|
-
(0,
|
|
64251
|
+
(0, import_react80.createElement)(
|
|
64148
64252
|
Labeled,
|
|
64149
64253
|
{ label: "minWidth\uFF08\u6700\u5C0F\u5BBD\uFF1A\u77ED / \u957F\u540C\u5BBD\uFF09" },
|
|
64150
|
-
(0,
|
|
64254
|
+
(0, import_react80.createElement)(
|
|
64151
64255
|
"div",
|
|
64152
64256
|
{ style: { display: "flex", gap: "8px" } },
|
|
64153
|
-
(0,
|
|
64154
|
-
(0,
|
|
64257
|
+
(0, import_react80.createElement)(Chip, { minWidth: 90 }, "\u77ED"),
|
|
64258
|
+
(0, import_react80.createElement)(Chip, { minWidth: 90 }, "\u5F88\u957F\u5F88\u957F\u5F88\u957F")
|
|
64155
64259
|
)
|
|
64156
64260
|
),
|
|
64157
|
-
(0,
|
|
64261
|
+
(0, import_react80.createElement)(
|
|
64158
64262
|
Labeled,
|
|
64159
64263
|
{ label: "maxWidth\uFF08\u6700\u5927\u5BBD\uFF1A\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\uFF09" },
|
|
64160
|
-
(0,
|
|
64264
|
+
(0, import_react80.createElement)(
|
|
64161
64265
|
"div",
|
|
64162
64266
|
{ style: { width: "260px" } },
|
|
64163
|
-
(0,
|
|
64267
|
+
(0, import_react80.createElement)(Chip, { maxWidth: 120 }, "\u8FD9\u662F\u4E00\u6BB5\u4F1A\u88AB\u6298\u53E0\u6210\u7701\u7565\u53F7\u7684\u8D85\u957F\u6807\u7B7E\u6587\u5B57")
|
|
64164
64268
|
)
|
|
64165
64269
|
),
|
|
64166
|
-
(0,
|
|
64270
|
+
(0, import_react80.createElement)(
|
|
64167
64271
|
Labeled,
|
|
64168
64272
|
{ label: "\u4E09\u8005\u540C\u8BBE \u21D2 width \u4F18\u5148" },
|
|
64169
|
-
(0,
|
|
64273
|
+
(0, import_react80.createElement)(Chip, { width: 90, minWidth: 160, maxWidth: 120 }, "\u56FA\u5B9A\u5BBD\u4F18\u5148")
|
|
64170
64274
|
)
|
|
64171
64275
|
)
|
|
64172
64276
|
),
|
|
64173
|
-
(0,
|
|
64277
|
+
(0, import_react80.createElement)(
|
|
64174
64278
|
Example,
|
|
64175
64279
|
{ title: t3("marqueeTitle"), hint: t3("exMarqueeHint"), code: CODE_MARQUEE },
|
|
64176
|
-
(0,
|
|
64280
|
+
(0, import_react80.createElement)(
|
|
64177
64281
|
"div",
|
|
64178
64282
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", alignItems: "flex-start" } },
|
|
64179
|
-
(0,
|
|
64283
|
+
(0, import_react80.createElement)(
|
|
64180
64284
|
"div",
|
|
64181
64285
|
{ style: { maxWidth: "148px" } },
|
|
64182
|
-
(0,
|
|
64286
|
+
(0, import_react80.createElement)(MarqueeText, { text: "\u4E00\u6761\u5F88\u957F\u7684\u4EFB\u52A1\u6807\u9898\uFF1A\u5B9A\u5BBD\u663E\u793A\u4E0D\u4E0B\uFF0Chover \u5F00\u59CB\u8DD1\u9A6C\u706F" })
|
|
64183
64287
|
),
|
|
64184
|
-
(0,
|
|
64288
|
+
(0, import_react80.createElement)(
|
|
64185
64289
|
Chip,
|
|
64186
64290
|
{ tone: "business", size: "md", maxWidth: 148 },
|
|
64187
64291
|
"\u6807\u7B7E\u91CC\u6EDA\u52A8\uFF1A\u4E00\u6761\u5F88\u957F\u7684\u4EFB\u52A1\u6807\u9898\uFF0Chover \u8DD1\u9A6C\u706F"
|
|
64188
64292
|
)
|
|
64189
64293
|
)
|
|
64190
64294
|
),
|
|
64191
|
-
(0,
|
|
64295
|
+
(0, import_react80.createElement)(
|
|
64192
64296
|
Example,
|
|
64193
64297
|
{ title: t3("liveTitle"), hint: t3("exLiveHint"), code: CODE_LIVE },
|
|
64194
|
-
(0,
|
|
64298
|
+
(0, import_react80.createElement)(LiveText, { render: (nowMs) => new Date(nowMs).toLocaleTimeString() })
|
|
64195
64299
|
),
|
|
64196
|
-
(0,
|
|
64197
|
-
(0,
|
|
64300
|
+
(0, import_react80.createElement)(DocCode, { id: "chip" }),
|
|
64301
|
+
(0, import_react80.createElement)(DocApi, { id: "chip" })
|
|
64198
64302
|
);
|
|
64199
64303
|
}
|
|
64200
64304
|
var CODE_HOST_MODAL = `// \u5BBF\u4E3B\u539F\u751F\u5F39\u7A97\uFF1A\u7EC4\u4EF6\u76F4\u63A5\u7528\u5B98\u65B9 Modal\uFF08\u906E\u7F69/\u5934\u90E8/\u5173\u95ED\u53C9\u5168\u5F52\u5BBF\u4E3B\u7BA1\uFF09
|
|
@@ -64222,6 +64326,9 @@ const ok = await confirmModal({
|
|
|
64222
64326
|
tone: 'danger', confirmText: '\u5220\u9664', cancelText: '\u518D\u60F3\u60F3', skin: 'host',
|
|
64223
64327
|
})
|
|
64224
64328
|
await alertModal({ title: '\u5BBF\u4E3B\u63D0\u793A', message: '\u5173\u95ED\u5373\u786E\u8BA4', skin: 'host' })`;
|
|
64329
|
+
var demoWait = (ms = 1400) => new Promise((r2) => {
|
|
64330
|
+
setTimeout(r2, ms);
|
|
64331
|
+
});
|
|
64225
64332
|
var CODE_SMALL_MODAL = `// \u6211\u4EEC\u7684\u6807\u51C6\u5C0F\u6846\uFF1A\u540D\u5B57\u5E26 Modal \u540E\u7F00\uFF0C\u4E0D\u8986\u76D6\u5BBF\u4E3B\u539F\u751F
|
|
64226
64333
|
<AlertModal
|
|
64227
64334
|
severity="warning"
|
|
@@ -64243,7 +64350,23 @@ var CODE_SMALL_MODAL = `// \u6211\u4EEC\u7684\u6807\u51C6\u5C0F\u6846\uFF1A\u540
|
|
|
64243
64350
|
if (await confirmModal({ title: '\u786E\u8BA4\u63D0\u4EA4', message: '\u63D0\u4EA4\u540E\u4E0D\u53EF\u64A4\u9500', tone: 'danger' })) {
|
|
64244
64351
|
// \u7528\u6237\u70B9\u4E86\u786E\u8BA4
|
|
64245
64352
|
}
|
|
64246
|
-
await alertModal({ title: '\u63D0\u793A', message: '\u8FD9\u662F\u547D\u4EE4\u5F0F alert\uFF0C\u5173\u95ED\u5373\u786E\u8BA4' })
|
|
64353
|
+
await alertModal({ title: '\u63D0\u793A', message: '\u8FD9\u662F\u547D\u4EE4\u5F0F alert\uFF0C\u5173\u95ED\u5373\u786E\u8BA4' })
|
|
64354
|
+
|
|
64355
|
+
// \u5F02\u6B65\uFF1A\u56DE\u8C03\u8FD4\u56DE Promise \u21D2 \u5BF9\u5E94\u6309\u94AE\u81EA\u52A8\u8F6C\u5708\u3001\u6574\u6846\u9501\u6B7B\u4E0D\u53EF\u5173\uFF1Bresolve \u624D\u5173\u95ED\uFF0Creject \u5219\u6062\u590D\u53EF\u70B9
|
|
64356
|
+
await alertModal({
|
|
64357
|
+
title: '\u6B63\u5728\u4FDD\u5B58',
|
|
64358
|
+
message: '\u70B9\u300C\u786E\u5B9A\u300D\u624D\u5F00\u59CB\u8DD1\uFF0C\u8DD1\u5B8C\u81EA\u5DF1\u5173',
|
|
64359
|
+
onConfirm: async () => { await save() },
|
|
64360
|
+
})
|
|
64361
|
+
const ok = await confirmModal({
|
|
64362
|
+
title: '\u5220\u9664\u4EFB\u52A1',
|
|
64363
|
+
message: '\u5904\u7406\u671F\u95F4\u5F39\u7A97\u4E0D\u53EF\u5173\u95ED',
|
|
64364
|
+
tone: 'danger',
|
|
64365
|
+
onConfirm: async () => { await remove() }, // \u786E\u8BA4\u94AE\u8F6C\u5708
|
|
64366
|
+
onCancel: async () => { await check() }, // \u53D6\u6D88\u94AE\u4E5F\u80FD\u8F6C\u5708
|
|
64367
|
+
})
|
|
64368
|
+
// \u7EC4\u4EF6\u5F62\u6001\u81EA\u5DF1\u63A7\uFF1AconfirmLoading / cancelLoading
|
|
64369
|
+
<ConfirmModal message="\u2026" confirmLoading={saving} onConfirm={\u2026} />`;
|
|
64247
64370
|
var CODE_LARGE_MODAL = `// \u5185\u5BB9\u5F39\u7A97\uFF1Asize md / lg\uFF0C\u627F\u8F7D\u4EFB\u610F\u5185\u5BB9\uFF08\u4E0D\u662F\u300C\u786E\u5B9A/\u53D6\u6D88\u300D\u547D\u4EE4\u5F0F\uFF09
|
|
64248
64371
|
<Modal title="\u4EFB\u52A1\u8BE6\u60C5" onClose={close} footer={<Button variant="primary">\u77E5\u9053\u4E86</Button>}>
|
|
64249
64372
|
<div>\u5F39\u7A97\u4E3B\u4F53\u5185\u5BB9\u2014\u2014\u4F1A\u8BDD\u9884\u89C8\u8FD9\u7C7B\u529F\u80FD\u5C31\u7528\u5B83\u6765\u627F\u8F7D\u3002</div>
|
|
@@ -64279,17 +64402,6 @@ var CODE_SIDE_SHEET = `// \u8986\u76D6\u5F0F\u4FA7\u8FB9\u62BD\u5C49\uFF1A\u76AE
|
|
|
64279
64402
|
footer={<Button variant="primary">\u5E94\u7528</Button>}>
|
|
64280
64403
|
<FilterForm />
|
|
64281
64404
|
</SideSheet>`;
|
|
64282
|
-
var CODE_TOAST_NATIVE = `// showToast\uFF1ASonner \u539F\u5473\uFF08\u5BF9\u6BD4\u7528\uFF09
|
|
64283
|
-
showToast('\u5DF2\u4FDD\u5B58')
|
|
64284
|
-
showToast('\u4FDD\u5B58\u6210\u529F', { variant: 'success' })
|
|
64285
|
-
showToast('\u4FDD\u5B58\u5931\u8D25', { variant: 'error' })
|
|
64286
|
-
showToast('\u6574\u6761\u81EA\u5B9A\u4E49\u8272', { color: '#7c3aed' })
|
|
64287
|
-
showToast('\u6D88\u5931\u540E\u56DE\u8C03', { onDismiss: () => {} })
|
|
64288
|
-
showToast('\u9876\u90E8-\u5DE6', { position: 'top-left' })`;
|
|
64289
|
-
var CODE_TOAST_HOST = `// showHostToast\uFF1A\u76F4\u63A5\u5305\u5B98\u65B9 Toast\uFF08\u9876\u90E8\u6A2A\u5E45\uFF09
|
|
64290
|
-
showHostToast('\u8FD9\u662F\u5BBF\u4E3B\u539F\u751F\u63D0\u793A')
|
|
64291
|
-
showHostToast('\u64CD\u4F5C\u6210\u529F', { tone: 'success' })
|
|
64292
|
-
showHostToast('\u6709\u52A8\u4F5C\u7684\u539F\u751F\u63D0\u793A', { actions: [{ text: '\u67E5\u770B', onClick: () => {} }] })`;
|
|
64293
64405
|
var CODE_TOAST_NOTIFY = `// notify\uFF1A\u7EDF\u4E00\u7070/\u7EFF/\u7EA2/\u9EC4 + \u53F3\u4FA7\u6211\u4EEC\u81EA\u5DF1\u7684\u6309\u94AE\uFF08\u9879\u76EE\u5185\u63A8\u8350\uFF09
|
|
64294
64406
|
notify('\u5DF2\u4FDD\u5B58\u8349\u7A3F')
|
|
64295
64407
|
notify('\u4FDD\u5B58\u6210\u529F', { variant: 'success' })
|
|
@@ -64343,72 +64455,75 @@ blocked.close()
|
|
|
64343
64455
|
<LoadingToast text="\u6B63\u5728\u52A0\u8F7D" />
|
|
64344
64456
|
<LoadingBlock text="\u5904\u7406\u4E2D" />`;
|
|
64345
64457
|
function FeedbackPage() {
|
|
64346
|
-
const [open, setOpen] = (0,
|
|
64347
|
-
const [openNative, setOpenNative] = (0,
|
|
64348
|
-
const [alertState, setAlertState] = (0,
|
|
64349
|
-
const [confirmCfg, setConfirmCfg] = (0,
|
|
64350
|
-
const [confirmResult, setConfirmResult] = (0,
|
|
64351
|
-
const [largeOpen, setLargeOpen] = (0,
|
|
64352
|
-
const [largeOpenB, setLargeOpenB] = (0,
|
|
64353
|
-
const [
|
|
64354
|
-
const [
|
|
64355
|
-
const [
|
|
64458
|
+
const [open, setOpen] = (0, import_react80.useState)(false);
|
|
64459
|
+
const [openNative, setOpenNative] = (0, import_react80.useState)(false);
|
|
64460
|
+
const [alertState, setAlertState] = (0, import_react80.useState)(null);
|
|
64461
|
+
const [confirmCfg, setConfirmCfg] = (0, import_react80.useState)(null);
|
|
64462
|
+
const [confirmResult, setConfirmResult] = (0, import_react80.useState)("");
|
|
64463
|
+
const [largeOpen, setLargeOpen] = (0, import_react80.useState)(false);
|
|
64464
|
+
const [largeOpenB, setLargeOpenB] = (0, import_react80.useState)(false);
|
|
64465
|
+
const [asyncOpen, setAsyncOpen] = (0, import_react80.useState)(false);
|
|
64466
|
+
const [saving, setSaving] = (0, import_react80.useState)(false);
|
|
64467
|
+
const [sheetCfg, setSheetCfg] = (0, import_react80.useState)({ side: "left", footer: false });
|
|
64468
|
+
const [sheetOpen, setSheetOpen] = (0, import_react80.useState)(false);
|
|
64469
|
+
const [sheetSaving, setSheetSaving] = (0, import_react80.useState)(false);
|
|
64470
|
+
const [nativeText, setNativeText] = (0, import_react80.useState)("");
|
|
64356
64471
|
const flash = (opts) => {
|
|
64357
64472
|
const handle = showLoading(opts);
|
|
64358
64473
|
window.setTimeout(() => handle.close(), 1200);
|
|
64359
64474
|
};
|
|
64360
|
-
return (0,
|
|
64475
|
+
return (0, import_react80.createElement)(
|
|
64361
64476
|
"div",
|
|
64362
64477
|
null,
|
|
64363
|
-
(0,
|
|
64364
|
-
(0,
|
|
64478
|
+
(0, import_react80.createElement)(DocProse, { id: "feedback" }),
|
|
64479
|
+
(0, import_react80.createElement)(
|
|
64365
64480
|
Example,
|
|
64366
64481
|
{ title: t3("exSmallModalTitle"), hint: t3("exSmallModalHint"), code: CODE_SMALL_MODAL },
|
|
64367
|
-
(0,
|
|
64482
|
+
(0, import_react80.createElement)(
|
|
64368
64483
|
"div",
|
|
64369
64484
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64370
|
-
(0,
|
|
64485
|
+
(0, import_react80.createElement)(
|
|
64371
64486
|
"div",
|
|
64372
64487
|
null,
|
|
64373
|
-
(0,
|
|
64374
|
-
(0,
|
|
64488
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "AlertModal\uFF08\u7EC4\u4EF6\uFF09"),
|
|
64489
|
+
(0, import_react80.createElement)(
|
|
64375
64490
|
"div",
|
|
64376
64491
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64377
|
-
(0,
|
|
64378
|
-
(0,
|
|
64379
|
-
(0,
|
|
64380
|
-
(0,
|
|
64381
|
-
(0,
|
|
64492
|
+
(0, import_react80.createElement)(Button, { onClick: () => setAlertState({ sev: "info", titled: true }) }, "info"),
|
|
64493
|
+
(0, import_react80.createElement)(Button, { onClick: () => setAlertState({ sev: "success", titled: true }) }, "success"),
|
|
64494
|
+
(0, import_react80.createElement)(Button, { onClick: () => setAlertState({ sev: "warning", titled: true }) }, "warning"),
|
|
64495
|
+
(0, import_react80.createElement)(Button, { onClick: () => setAlertState({ sev: "error", titled: true }) }, "error"),
|
|
64496
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setAlertState({ sev: "warning", titled: false }) }, "\u65E0\u6807\u9898")
|
|
64382
64497
|
),
|
|
64383
|
-
alertState !== null ? (0,
|
|
64498
|
+
alertState !== null ? (0, import_react80.createElement)(AlertModal, {
|
|
64384
64499
|
severity: alertState.sev,
|
|
64385
64500
|
title: alertState.titled ? "\u64CD\u4F5C\u7ED3\u679C" : void 0,
|
|
64386
64501
|
message: "\u8FD9\u662F\u4E00\u6761\u8BF4\u660E\u6587\u5B57\uFF1AAlertModal \u7528\u4E8E\u53EA\u9700\u4E00\u4E2A\u786E\u8BA4\u52A8\u4F5C\u7684\u63D0\u793A\u573A\u666F\u3002",
|
|
64387
64502
|
onConfirm: () => setAlertState(null)
|
|
64388
64503
|
}) : null
|
|
64389
64504
|
),
|
|
64390
|
-
(0,
|
|
64505
|
+
(0, import_react80.createElement)(
|
|
64391
64506
|
"div",
|
|
64392
64507
|
null,
|
|
64393
|
-
(0,
|
|
64394
|
-
(0,
|
|
64508
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "ConfirmModal\uFF08\u7EC4\u4EF6\uFF09"),
|
|
64509
|
+
(0, import_react80.createElement)(
|
|
64395
64510
|
"div",
|
|
64396
64511
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" } },
|
|
64397
|
-
(0,
|
|
64512
|
+
(0, import_react80.createElement)(Button, { onClick: () => {
|
|
64398
64513
|
setConfirmCfg({ tone: "primary", confirmText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" });
|
|
64399
64514
|
setConfirmResult("");
|
|
64400
64515
|
} }, "\u9ED8\u8BA4\uFF08primary\uFF09"),
|
|
64401
|
-
(0,
|
|
64516
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => {
|
|
64402
64517
|
setConfirmCfg({ tone: "danger", confirmText: "\u5220\u9664", cancelText: "\u518D\u60F3\u60F3" });
|
|
64403
64518
|
setConfirmResult("");
|
|
64404
64519
|
} }, "danger \u53D8\u4F53"),
|
|
64405
|
-
(0,
|
|
64520
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => {
|
|
64406
64521
|
setConfirmCfg({ tone: "warning", confirmText: "\u6211\u5DF2\u77E5\u6653", cancelText: "\u8FD4\u56DE" });
|
|
64407
64522
|
setConfirmResult("");
|
|
64408
64523
|
} }, "\u6539\u6587\u6848"),
|
|
64409
|
-
confirmResult ? (0,
|
|
64524
|
+
confirmResult ? (0, import_react80.createElement)("span", { style: { fontSize: "13px", color: "var(--dshpc-fg-3)" } }, confirmResult) : null
|
|
64410
64525
|
),
|
|
64411
|
-
confirmCfg !== null ? (0,
|
|
64526
|
+
confirmCfg !== null ? (0, import_react80.createElement)(ConfirmModal, {
|
|
64412
64527
|
title: "\u5220\u9664\u4EFB\u52A1",
|
|
64413
64528
|
message: "\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",
|
|
64414
64529
|
tone: confirmCfg.tone,
|
|
@@ -64424,156 +64539,254 @@ function FeedbackPage() {
|
|
|
64424
64539
|
}
|
|
64425
64540
|
}) : null
|
|
64426
64541
|
),
|
|
64427
|
-
(0,
|
|
64542
|
+
(0, import_react80.createElement)(
|
|
64428
64543
|
"div",
|
|
64429
64544
|
null,
|
|
64430
|
-
(0,
|
|
64431
|
-
(0,
|
|
64545
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "\u547D\u4EE4\u5F0F\uFF08Promise\uFF09"),
|
|
64546
|
+
(0, import_react80.createElement)(
|
|
64432
64547
|
"div",
|
|
64433
64548
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64434
|
-
(0,
|
|
64435
|
-
alertModal({ title: "\u63D0\u793A", message: "\u8FD9\u662F\u547D\u4EE4\u5F0F alert\uFF0C\u5173\u95ED\u5373\u786E\u8BA4" }).then(() =>
|
|
64549
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => {
|
|
64550
|
+
alertModal({ title: "\u63D0\u793A", message: "\u8FD9\u662F\u547D\u4EE4\u5F0F alert\uFF0C\u5173\u95ED\u5373\u786E\u8BA4" }).then(() => notify("alert \u5DF2\u5173\u95ED"));
|
|
64436
64551
|
} }, "alertModal()"),
|
|
64437
|
-
(0,
|
|
64552
|
+
(0, import_react80.createElement)(Button, { onClick: async () => {
|
|
64438
64553
|
const ok = await confirmModal({ title: "\u786E\u8BA4\u63D0\u4EA4", message: "\u63D0\u4EA4\u540E\u4E0D\u53EF\u64A4\u9500", tone: "danger", confirmText: "\u63D0\u4EA4", cancelText: "\u53D6\u6D88" });
|
|
64439
|
-
|
|
64554
|
+
notify(ok ? "\u4F60\u70B9\u4E86\uFF1A\u63D0\u4EA4" : "\u4F60\u70B9\u4E86\uFF1A\u53D6\u6D88");
|
|
64440
64555
|
} }, "confirmModal()")
|
|
64556
|
+
),
|
|
64557
|
+
// 异步回调 ⇒ 对应按钮自动转圈、整框锁死,settle 后才关(1.4 秒演示)
|
|
64558
|
+
(0, import_react80.createElement)(
|
|
64559
|
+
"div",
|
|
64560
|
+
{ style: { display: "flex", flexWrap: "wrap", gap: "8px", marginTop: "8px", alignItems: "center" } },
|
|
64561
|
+
(0, import_react80.createElement)(Button, {
|
|
64562
|
+
variant: "outline",
|
|
64563
|
+
onClick: () => {
|
|
64564
|
+
void alertModal({
|
|
64565
|
+
title: "\u6B63\u5728\u4FDD\u5B58",
|
|
64566
|
+
message: "\u70B9\u300C\u4FDD\u5B58\u300D\u540E\uFF1A\u6309\u94AE\u8F6C\u5708\u3001\u906E\u7F69\u4E0E Esc \u90FD\u5173\u4E0D\u6389\uFF0C1.4 \u79D2\u540E\u81EA\u5DF1\u5173\u3002",
|
|
64567
|
+
confirmText: "\u4FDD\u5B58",
|
|
64568
|
+
onConfirm: async () => {
|
|
64569
|
+
await demoWait();
|
|
64570
|
+
}
|
|
64571
|
+
}).then(() => notify("\u4FDD\u5B58\u5B8C\u6210\uFF0Calert \u5DF2\u5173\u95ED"));
|
|
64572
|
+
}
|
|
64573
|
+
}, "alertModal() \xB7 \u5F02\u6B65\u786E\u8BA4"),
|
|
64574
|
+
(0, import_react80.createElement)(Button, {
|
|
64575
|
+
onClick: async () => {
|
|
64576
|
+
const ok = await confirmModal({
|
|
64577
|
+
title: "\u5220\u9664\u4EFB\u52A1",
|
|
64578
|
+
message: "\u786E\u8BA4\u94AE\u8F6C\u5708\u671F\u95F4\u6574\u6846\u4E0D\u53EF\u5173\uFF1B\u53D6\u6D88\u94AE\u7167\u5E38\u53EF\u70B9\u3002",
|
|
64579
|
+
tone: "danger",
|
|
64580
|
+
confirmText: "\u5220\u9664",
|
|
64581
|
+
cancelText: "\u53D6\u6D88",
|
|
64582
|
+
onConfirm: async () => {
|
|
64583
|
+
await demoWait();
|
|
64584
|
+
}
|
|
64585
|
+
});
|
|
64586
|
+
notify(ok ? "\u5220\u9664\u5B8C\u6210\uFF08\u786E\u8BA4\u4E3A true\uFF09" : "\u5DF2\u53D6\u6D88\uFF08false\uFF09");
|
|
64587
|
+
}
|
|
64588
|
+
}, "confirmModal() \xB7 \u5F02\u6B65\u786E\u8BA4"),
|
|
64589
|
+
(0, import_react80.createElement)(Button, {
|
|
64590
|
+
variant: "outline",
|
|
64591
|
+
onClick: async () => {
|
|
64592
|
+
const ok = await confirmModal({
|
|
64593
|
+
title: "\u79BB\u5F00\u524D\u68C0\u67E5",
|
|
64594
|
+
message: "\u8FD9\u6B21\u8F6C\u5708\u7684\u662F\u300C\u53D6\u6D88\u300D\u94AE\uFF1A\u70B9\u5B83\u8DD1 1.4 \u79D2\u68C0\u67E5\uFF0C\u671F\u95F4\u6574\u6846\u4E0D\u53EF\u5173\u3002",
|
|
64595
|
+
confirmText: "\u7559\u5728\u9875\u9762",
|
|
64596
|
+
cancelText: "\u68C0\u67E5\u5E76\u79BB\u5F00",
|
|
64597
|
+
onCancel: async () => {
|
|
64598
|
+
await demoWait();
|
|
64599
|
+
}
|
|
64600
|
+
});
|
|
64601
|
+
notify(ok ? "\u4F60\u70B9\u4E86\uFF1A\u7559\u5728\u9875\u9762" : "\u68C0\u67E5\u5B8C\u6210\uFF0C\u5DF2\u79BB\u5F00\uFF08false\uFF09");
|
|
64602
|
+
}
|
|
64603
|
+
}, "confirmModal() \xB7 \u5F02\u6B65\u53D6\u6D88"),
|
|
64604
|
+
(0, import_react80.createElement)(Button, {
|
|
64605
|
+
variant: "ghost",
|
|
64606
|
+
onClick: async () => {
|
|
64607
|
+
const ok = await confirmModal({
|
|
64608
|
+
title: "\u53EF\u80FD\u5931\u8D25",
|
|
64609
|
+
message: "\u786E\u8BA4\u540E 1.4 \u79D2\u629B\u9519\uFF1Aloading \u64A4\u56DE\u3001\u5F39\u7A97\u7559\u7740\u53EF\u91CD\u8BD5\uFF0C\u63A7\u5236\u53F0\u6709\u62A5\u9519\u3002",
|
|
64610
|
+
confirmText: "\u6267\u884C",
|
|
64611
|
+
cancelText: "\u7B97\u4E86",
|
|
64612
|
+
onConfirm: async () => {
|
|
64613
|
+
await demoWait();
|
|
64614
|
+
throw new Error("\u6F14\u793A\uFF1A\u5F02\u6B65\u5904\u7406\u5931\u8D25");
|
|
64615
|
+
}
|
|
64616
|
+
});
|
|
64617
|
+
notify(ok ? "\u610F\u5916\u6210\u529F" : "\u5DF2\u53D6\u6D88\uFF08false\uFF09");
|
|
64618
|
+
}
|
|
64619
|
+
}, "confirmModal() \xB7 \u5F02\u6B65\u5931\u8D25")
|
|
64441
64620
|
)
|
|
64442
64621
|
)
|
|
64443
64622
|
)
|
|
64444
64623
|
),
|
|
64445
|
-
(0,
|
|
64624
|
+
(0, import_react80.createElement)(
|
|
64446
64625
|
Example,
|
|
64447
64626
|
{ title: t3("exLargeModalTitle"), hint: t3("exLargeModalHint"), code: CODE_LARGE_MODAL },
|
|
64448
|
-
(0,
|
|
64627
|
+
(0, import_react80.createElement)(
|
|
64449
64628
|
"div",
|
|
64450
64629
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64451
|
-
(0,
|
|
64630
|
+
(0, import_react80.createElement)(
|
|
64452
64631
|
"div",
|
|
64453
64632
|
null,
|
|
64454
|
-
(0,
|
|
64455
|
-
(0,
|
|
64456
|
-
open ? (0,
|
|
64633
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "\u9ED8\u8BA4\uFF08md\uFF09"),
|
|
64634
|
+
(0, import_react80.createElement)(Button, { onClick: () => setOpen(true) }, "\u6253\u5F00\u5927\u5F39\u7A97\uFF08md \u9ED8\u8BA4\uFF09"),
|
|
64635
|
+
open ? (0, import_react80.createElement)(Modal, {
|
|
64457
64636
|
title: "\u4EFB\u52A1\u8BE6\u60C5",
|
|
64458
64637
|
onClose: () => setOpen(false),
|
|
64459
|
-
footer: (0,
|
|
64460
|
-
}, (0,
|
|
64638
|
+
footer: (0, import_react80.createElement)(Button, { variant: "primary", onClick: () => setOpen(false) }, "\u77E5\u9053\u4E86")
|
|
64639
|
+
}, (0, import_react80.createElement)("div", null, "\u5F39\u7A97\u4E3B\u4F53\u5185\u5BB9\u2014\u2014\u4F1A\u8BDD\u9884\u89C8\u8FD9\u7C7B\u529F\u80FD\u5C31\u7528\u5B83\u6765\u627F\u8F7D\u3002")) : null
|
|
64461
64640
|
),
|
|
64462
|
-
(0,
|
|
64641
|
+
(0, import_react80.createElement)(
|
|
64463
64642
|
"div",
|
|
64464
64643
|
null,
|
|
64465
|
-
(0,
|
|
64466
|
-
(0,
|
|
64467
|
-
largeOpen ? (0,
|
|
64644
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "\u5E26 footer\uFF08lg\uFF09"),
|
|
64645
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setLargeOpen(true) }, "\u6253\u5F00\u5927\u5F39\u7A97\uFF08\u5E26 footer\uFF09"),
|
|
64646
|
+
largeOpen ? (0, import_react80.createElement)(
|
|
64468
64647
|
Modal,
|
|
64469
64648
|
{
|
|
64470
64649
|
size: "lg",
|
|
64471
64650
|
title: "\u4F1A\u8BDD\u8BB0\u5F55",
|
|
64472
|
-
headerActions: (0,
|
|
64651
|
+
headerActions: (0, import_react80.createElement)(
|
|
64473
64652
|
Button,
|
|
64474
64653
|
{ variant: "outline", size: "sm", icon: iconOf("chevron", 14) },
|
|
64475
64654
|
"\u66F4\u591A"
|
|
64476
64655
|
),
|
|
64477
64656
|
onClose: () => setLargeOpen(false),
|
|
64478
|
-
footer: (0,
|
|
64657
|
+
footer: (0, import_react80.createElement)(
|
|
64479
64658
|
"div",
|
|
64480
64659
|
{ style: { display: "flex", justifyContent: "flex-end", gap: "8px" } },
|
|
64481
|
-
(0,
|
|
64482
|
-
(0,
|
|
64660
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setLargeOpen(false) }, "\u5173\u95ED"),
|
|
64661
|
+
(0, import_react80.createElement)(Button, { variant: "primary", onClick: () => setLargeOpen(false) }, "\u5B8C\u6210")
|
|
64483
64662
|
)
|
|
64484
64663
|
},
|
|
64485
|
-
(0,
|
|
64664
|
+
(0, import_react80.createElement)(
|
|
64486
64665
|
"div",
|
|
64487
64666
|
null,
|
|
64488
64667
|
Array.from(
|
|
64489
64668
|
{ length: 40 },
|
|
64490
|
-
(_, i2) => (0,
|
|
64669
|
+
(_, i2) => (0, import_react80.createElement)("div", { key: i2, style: { padding: "10px 0", borderBottom: "1px solid var(--dshpc-border-faint)", fontSize: "13px" } }, `\u5217\u8868\u9879 ${i2 + 1}\uFF1A\u8FD9\u662F\u4E00\u6BB5\u53EF\u6EDA\u52A8\u7684\u5185\u5BB9\u793A\u4F8B`)
|
|
64491
64670
|
),
|
|
64492
|
-
(0,
|
|
64671
|
+
(0, import_react80.createElement)("div", { className: "dshpc-overlay-head__sid" }, "\u5171 128 \u6761 \xB7 \u6700\u8FD1\u66F4\u65B0 2 \u5206\u949F\u524D")
|
|
64493
64672
|
)
|
|
64494
64673
|
) : null
|
|
64495
64674
|
),
|
|
64496
|
-
(0,
|
|
64675
|
+
(0, import_react80.createElement)(
|
|
64497
64676
|
"div",
|
|
64498
64677
|
null,
|
|
64499
|
-
(0,
|
|
64500
|
-
(0,
|
|
64501
|
-
largeOpenB ? (0,
|
|
64678
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "\u65E0 footer\uFF08\u5185\u5BB9\u81EA\u5B9A\u4E49\uFF09"),
|
|
64679
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setLargeOpenB(true) }, "\u6253\u5F00\u5927\u5F39\u7A97\uFF08\u65E0 footer\uFF09"),
|
|
64680
|
+
largeOpenB ? (0, import_react80.createElement)(
|
|
64502
64681
|
Modal,
|
|
64503
64682
|
{
|
|
64504
64683
|
size: "lg",
|
|
64505
|
-
title: (0,
|
|
64684
|
+
title: (0, import_react80.createElement)(
|
|
64506
64685
|
"div",
|
|
64507
64686
|
null,
|
|
64508
|
-
(0,
|
|
64509
|
-
(0,
|
|
64687
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600 } }, "\u4EFB\u52A1\u8BE6\u60C5"),
|
|
64688
|
+
(0, import_react80.createElement)("div", { className: "dshpc-overlay-head__sid" }, "sid-2026-1020-7f3a \xB7 5 \u4E2A\u6B65\u9AA4")
|
|
64510
64689
|
),
|
|
64511
64690
|
onClose: () => setLargeOpenB(false)
|
|
64512
64691
|
},
|
|
64513
|
-
(0,
|
|
64692
|
+
(0, import_react80.createElement)(
|
|
64514
64693
|
"div",
|
|
64515
64694
|
null,
|
|
64516
|
-
(0,
|
|
64517
|
-
(0,
|
|
64695
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "13px", lineHeight: "1.7" } }, "\u8FD9\u91CC\u6574\u4E2A\u5F39\u7A97\u90FD\u7531\u8C03\u7528\u65B9\u81EA\u5DF1\u5B9A\u4E49\uFF1A\u6CA1\u6709 footer\uFF0C\u5934\u90E8\u4E5F\u6362\u4E86\u4E00\u79CD\u6392\u6CD5\uFF08\u591A\u6392\u6807\u9898 + \u526F\u6807\u9898\u884C\uFF09\u3002\u5185\u5BB9\u533A\u53EF\u653E\u4EFB\u610F\u4E1A\u52A1\u7EC4\u4EF6\u3002"),
|
|
64696
|
+
(0, import_react80.createElement)(Surface, { border: "faint", padding: "md", style: { marginTop: "12px", fontSize: "13px" } }, "\u4EFB\u610F\u5185\u5BB9\uFF0C\u4F8B\u5982\u4E00\u6BB5\u8BF4\u660E\u6216\u4E00\u4E2A\u4E1A\u52A1\u5361\u7247\u3002")
|
|
64518
64697
|
)
|
|
64519
64698
|
) : null
|
|
64699
|
+
),
|
|
64700
|
+
// 异步按钮 + busy:按钮自己转圈,把「在跑」报给 Modal,三条关闭路径一起封死
|
|
64701
|
+
(0, import_react80.createElement)(
|
|
64702
|
+
"div",
|
|
64703
|
+
null,
|
|
64704
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "footer \u5F02\u6B65\uFF08\u4FDD\u5B58\u65F6\u6574\u6846\u9501\u6B7B\uFF09"),
|
|
64705
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setAsyncOpen(true) }, "\u6253\u5F00\u5927\u5F39\u7A97\uFF08\u5F02\u6B65\u4FDD\u5B58\uFF09"),
|
|
64706
|
+
asyncOpen ? (0, import_react80.createElement)(
|
|
64707
|
+
Modal,
|
|
64708
|
+
{
|
|
64709
|
+
title: "\u7F16\u8F91\u4EFB\u52A1",
|
|
64710
|
+
busy: saving,
|
|
64711
|
+
onClose: () => setAsyncOpen(false),
|
|
64712
|
+
footer: (0, import_react80.createElement)(
|
|
64713
|
+
"div",
|
|
64714
|
+
{ style: { display: "flex", justifyContent: "flex-end", gap: "8px" } },
|
|
64715
|
+
(0, import_react80.createElement)(Button, { variant: "outline", disabled: saving, onClick: () => setAsyncOpen(false) }, "\u53D6\u6D88"),
|
|
64716
|
+
(0, import_react80.createElement)(Button, {
|
|
64717
|
+
variant: "primary",
|
|
64718
|
+
onBusyChange: setSaving,
|
|
64719
|
+
onClick: async () => {
|
|
64720
|
+
await demoWait();
|
|
64721
|
+
setAsyncOpen(false);
|
|
64722
|
+
}
|
|
64723
|
+
}, "\u4FDD\u5B58")
|
|
64724
|
+
)
|
|
64725
|
+
},
|
|
64726
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "13px", lineHeight: "1.7" } }, "\u70B9\u300C\u4FDD\u5B58\u300D\uFF1A\u6309\u94AE\u81EA\u5DF1\u8F6C\u5708\uFF0C\u540C\u65F6\u628A busy \u62A5\u7ED9\u5F39\u7A97 \u2014\u2014 \u906E\u7F69 / Esc / \u2715 \u5168\u90E8\u5931\u6548\uFF0C1.4 \u79D2\u540E\u5173\u95ED\u3002footer \u90A3\u6761\u5206\u9694\u7EBF\u7167\u65E7\uFF0C\u4E0D\u56E0\u5F02\u6B65\u6539\u53D8\u3002")
|
|
64727
|
+
) : null
|
|
64520
64728
|
)
|
|
64521
64729
|
)
|
|
64522
64730
|
),
|
|
64523
|
-
(0,
|
|
64731
|
+
(0, import_react80.createElement)(
|
|
64524
64732
|
Example,
|
|
64525
64733
|
{ title: t3("exSideSheetTitle"), hint: t3("exSideSheetHint"), code: CODE_SIDE_SHEET },
|
|
64526
|
-
(0,
|
|
64734
|
+
(0, import_react80.createElement)(
|
|
64527
64735
|
"div",
|
|
64528
64736
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64529
|
-
(0,
|
|
64737
|
+
(0, import_react80.createElement)(Button, { onClick: () => {
|
|
64530
64738
|
setSheetCfg({ side: "left", footer: false });
|
|
64531
64739
|
setSheetOpen(true);
|
|
64532
64740
|
} }, "\u4ECE\u5DE6\u4FA7\u6ED1\u51FA"),
|
|
64533
|
-
(0,
|
|
64741
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => {
|
|
64534
64742
|
setSheetCfg({ side: "right", footer: false });
|
|
64535
64743
|
setSheetOpen(true);
|
|
64536
64744
|
} }, "\u4ECE\u53F3\u4FA7\u6ED1\u51FA"),
|
|
64537
|
-
(0,
|
|
64745
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => {
|
|
64538
64746
|
setSheetCfg({ side: "left", footer: true });
|
|
64539
64747
|
setSheetOpen(true);
|
|
64540
64748
|
} }, "\u5E26\u5E95\u680F"),
|
|
64541
64749
|
// 常驻渲染 + open 布尔:关闭时才有收回去的动效(条件渲染会一卸载就没影)。
|
|
64542
|
-
(0,
|
|
64750
|
+
(0, import_react80.createElement)(
|
|
64543
64751
|
SideSheet,
|
|
64544
64752
|
{
|
|
64545
64753
|
open: sheetOpen,
|
|
64546
64754
|
side: sheetCfg.side,
|
|
64547
64755
|
title: "\u6587\u4EF6\u8BE6\u60C5",
|
|
64548
|
-
extra: (0,
|
|
64756
|
+
extra: (0, import_react80.createElement)(Chip, null, "\u53EA\u8BFB"),
|
|
64549
64757
|
onClose: () => setSheetOpen(false),
|
|
64550
|
-
|
|
64758
|
+
// 底栏按钮异步:转圈期间抽屉也锁死(busy 由按钮报上来)
|
|
64759
|
+
busy: sheetSaving,
|
|
64760
|
+
footer: sheetCfg.footer ? (0, import_react80.createElement)(Button, { variant: "primary", onBusyChange: setSheetSaving, onClick: async () => {
|
|
64761
|
+
await demoWait(1e3);
|
|
64762
|
+
setSheetOpen(false);
|
|
64763
|
+
} }, "\u4FDD\u5B58\u5E76\u5173\u95ED") : void 0
|
|
64551
64764
|
},
|
|
64552
|
-
(0,
|
|
64765
|
+
(0, import_react80.createElement)(
|
|
64553
64766
|
"div",
|
|
64554
64767
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", fontSize: "13px", lineHeight: "1.7" } },
|
|
64555
|
-
(0,
|
|
64556
|
-
(0,
|
|
64557
|
-
(0,
|
|
64768
|
+
(0, import_react80.createElement)("div", null, "\u76AE\u80A4\u548C PanelDock \u5206\u680F\u4E00\u6A21\u4E00\u6837\uFF08\u5934\u90E8 / \u8FB9\u6846 / \u62D6\u62FD\u6761 / \u9634\u5F71\uFF09\uFF0C\u5BBD\u5EA6\u9ED8\u8BA4\u5C31\u80FD\u62D6 \u2014\u2014 \u4F46\u5B83\u76D6\u5728\u9875\u9762\u4E0A\uFF0C\u4E3B\u533A\u5BBD\u5EA6\u4E0D\u53D8\u3002"),
|
|
64769
|
+
(0, import_react80.createElement)("div", null, "\u6CA1\u6709\u6536\u8D77\uFF1A\u5173\u5C31\u662F\u5173\uFF08\u5206\u680F\u624D\u6709\u6536\u8D77\u94AE\u548C\u8D34\u8FB9\u7684\u8033\u6735\uFF09\u3002"),
|
|
64770
|
+
(0, import_react80.createElement)(Surface, { border: "faint", padding: "md", style: { fontSize: "13px" } }, "\u5185\u5BB9\u968F\u4FBF\u653E\uFF1A\u6587\u4EF6\u6811\u3001\u8BE6\u60C5\u3001\u7B5B\u9009\u8868\u5355\u90FD\u884C\u3002")
|
|
64558
64771
|
)
|
|
64559
64772
|
)
|
|
64560
64773
|
)
|
|
64561
64774
|
),
|
|
64562
|
-
(0,
|
|
64775
|
+
(0, import_react80.createElement)(
|
|
64563
64776
|
Example,
|
|
64564
64777
|
{ title: t3("exHostModalTitle"), hint: t3("exHostModalHint"), code: CODE_HOST_MODAL },
|
|
64565
|
-
(0,
|
|
64778
|
+
(0, import_react80.createElement)(
|
|
64566
64779
|
"div",
|
|
64567
64780
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64568
|
-
(0,
|
|
64569
|
-
(0,
|
|
64781
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setOpenNative(true) }, "\u6253\u5F00\u5BBF\u4E3B\u539F\u751F\u5F39\u7A97\uFF08\u7EC4\u4EF6\uFF09"),
|
|
64782
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => {
|
|
64570
64783
|
void alertModal({ title: "\u5BBF\u4E3B\u63D0\u793A", message: '\u8FD9\u662F\u5BBF\u4E3B\u6837\u5F0F\u7684\u547D\u4EE4\u5F0F alert\uFF08skin:"host"\uFF09\uFF0C\u5173\u95ED\u5373\u786E\u8BA4' });
|
|
64571
64784
|
} }, 'alertModal({skin:"host"})'),
|
|
64572
|
-
(0,
|
|
64785
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: async () => {
|
|
64573
64786
|
const ok = await confirmModal({ title: "\u5BBF\u4E3B\u786E\u8BA4\u6846", message: "\u5B98\u65B9 Modal \u5F39\u51FA\u7684\u786E\u8BA4\uFF08danger\uFF09", tone: "danger", confirmText: "\u5220\u9664", cancelText: "\u518D\u60F3\u60F3", skin: "host" });
|
|
64574
|
-
|
|
64787
|
+
notify(ok ? "\u5BBF\u4E3B confirm\uFF1A\u4F60\u70B9\u4E86\u5220\u9664" : "\u5BBF\u4E3B confirm\uFF1A\u4F60\u70B9\u4E86\u53D6\u6D88");
|
|
64575
64788
|
} }, 'confirmModal({skin:"host"})'),
|
|
64576
|
-
openNative ? (0,
|
|
64789
|
+
openNative ? (0, import_react80.createElement)(
|
|
64577
64790
|
Official.Modal,
|
|
64578
64791
|
{
|
|
64579
64792
|
open: openNative,
|
|
@@ -64582,22 +64795,22 @@ function FeedbackPage() {
|
|
|
64582
64795
|
closeLabel: "\u5173\u95ED",
|
|
64583
64796
|
description: "\u8FD9\u662F\u5BBF\u4E3B\u5185\u6838\u63D0\u4F9B\u7684 Modal\uFF0C\u4E0B\u9762\u4E00\u6BB5\u662F\u8C03\u7528\u65B9\u585E\u8FDB\u6765\u7684\u81EA\u5B9A\u4E49\u5185\u5BB9\uFF08\u8F93\u5165\u6846 + \u52FE\u9009\uFF09\u3002",
|
|
64584
64797
|
contentClassName: "dshpc-native-demo-content",
|
|
64585
|
-
footer: (0,
|
|
64798
|
+
footer: (0, import_react80.createElement)(
|
|
64586
64799
|
"div",
|
|
64587
64800
|
{ style: { display: "flex", justifyContent: "flex-end", gap: "8px" } },
|
|
64588
|
-
(0,
|
|
64589
|
-
(0,
|
|
64590
|
-
(0,
|
|
64801
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setOpenNative(false) }, "\u53D6\u6D88"),
|
|
64802
|
+
(0, import_react80.createElement)(Button, { variant: "danger", onClick: () => setOpenNative(false) }, "\u5220\u9664"),
|
|
64803
|
+
(0, import_react80.createElement)(Button, { variant: "primary", onClick: () => setOpenNative(false) }, "\u786E\u8BA4")
|
|
64591
64804
|
)
|
|
64592
64805
|
},
|
|
64593
|
-
(0,
|
|
64806
|
+
(0, import_react80.createElement)(
|
|
64594
64807
|
"div",
|
|
64595
64808
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64596
|
-
(0,
|
|
64597
|
-
(0,
|
|
64809
|
+
(0, import_react80.createElement)(Input, { value: nativeText, onChange: setNativeText, placeholder: "\u81EA\u5B9A\u4E49\u8F93\u5165\u6846\uFF08\u6765\u81EA core \u63A7\u4EF6\uFF09" }),
|
|
64810
|
+
(0, import_react80.createElement)(
|
|
64598
64811
|
"label",
|
|
64599
64812
|
{ style: { display: "flex", gap: "8px", alignItems: "center", fontSize: "13px" } },
|
|
64600
|
-
(0,
|
|
64813
|
+
(0, import_react80.createElement)(Checkbox, { checked: false, onChange: () => {
|
|
64601
64814
|
} }),
|
|
64602
64815
|
"\u81EA\u5B9A\u4E49\u52FE\u9009\u9879"
|
|
64603
64816
|
)
|
|
@@ -64605,17 +64818,17 @@ function FeedbackPage() {
|
|
|
64605
64818
|
) : null
|
|
64606
64819
|
)
|
|
64607
64820
|
),
|
|
64608
|
-
(0,
|
|
64821
|
+
(0, import_react80.createElement)(
|
|
64609
64822
|
Example,
|
|
64610
64823
|
{ title: t3("exToastNotifyTitle"), hint: t3("exToastNotifyHint"), code: CODE_TOAST_NOTIFY },
|
|
64611
|
-
(0,
|
|
64824
|
+
(0, import_react80.createElement)(
|
|
64612
64825
|
"div",
|
|
64613
64826
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64614
|
-
(0,
|
|
64615
|
-
(0,
|
|
64616
|
-
(0,
|
|
64617
|
-
(0,
|
|
64618
|
-
(0,
|
|
64827
|
+
(0, import_react80.createElement)(Button, { onClick: () => notify("\u5DF2\u4FDD\u5B58\u8349\u7A3F") }, "\u666E\u901A(info)"),
|
|
64828
|
+
(0, import_react80.createElement)(Button, { onClick: () => notify("\u4FDD\u5B58\u6210\u529F", { variant: "success" }) }, "\u6210\u529F"),
|
|
64829
|
+
(0, import_react80.createElement)(Button, { onClick: () => notify("\u4FDD\u5B58\u5931\u8D25", { variant: "error" }) }, "\u5931\u8D25"),
|
|
64830
|
+
(0, import_react80.createElement)(Button, { onClick: () => notify("\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3", { variant: "warning" }) }, "\u8B66\u544A"),
|
|
64831
|
+
(0, import_react80.createElement)(
|
|
64619
64832
|
Button,
|
|
64620
64833
|
{
|
|
64621
64834
|
onClick: () => notify("\u5DF2\u5220\u9664\u8BE5\u6587\u4EF6", {
|
|
@@ -64626,7 +64839,7 @@ function FeedbackPage() {
|
|
|
64626
64839
|
},
|
|
64627
64840
|
"\u5355\u6309\u94AE+\u63CF\u8FF0"
|
|
64628
64841
|
),
|
|
64629
|
-
(0,
|
|
64842
|
+
(0, import_react80.createElement)(
|
|
64630
64843
|
Button,
|
|
64631
64844
|
{
|
|
64632
64845
|
onClick: () => notify("\u786E\u8BA4\u63D0\u4EA4\u5417\uFF1F", {
|
|
@@ -64641,80 +64854,29 @@ function FeedbackPage() {
|
|
|
64641
64854
|
)
|
|
64642
64855
|
)
|
|
64643
64856
|
),
|
|
64644
|
-
(0,
|
|
64645
|
-
Example,
|
|
64646
|
-
{ title: t3("exToastHostTitle"), hint: t3("exToastHostHint"), code: CODE_TOAST_HOST },
|
|
64647
|
-
(0, import_react81.createElement)(
|
|
64648
|
-
"div",
|
|
64649
|
-
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64650
|
-
(0, import_react81.createElement)(Button, { onClick: () => showHostToast("\u8FD9\u662F\u5BBF\u4E3B\u539F\u751F\u63D0\u793A") }, "\u666E\u901A"),
|
|
64651
|
-
(0, import_react81.createElement)(Button, { onClick: () => showHostToast("\u64CD\u4F5C\u6210\u529F", { tone: "success" }) }, "\u6210\u529F(success)"),
|
|
64652
|
-
(0, import_react81.createElement)(
|
|
64653
|
-
Button,
|
|
64654
|
-
{
|
|
64655
|
-
onClick: () => showHostToast("\u6709\u52A8\u4F5C\u7684\u539F\u751F\u63D0\u793A", {
|
|
64656
|
-
actions: [{ text: "\u67E5\u770B", onClick: () => showToast("\u70B9\u4E86\u300C\u67E5\u770B\u300D") }]
|
|
64657
|
-
})
|
|
64658
|
-
},
|
|
64659
|
-
"\u5E26\u52A8\u4F5C"
|
|
64660
|
-
)
|
|
64661
|
-
)
|
|
64662
|
-
),
|
|
64663
|
-
(0, import_react81.createElement)(
|
|
64664
|
-
Example,
|
|
64665
|
-
{ title: t3("exToastSonnerTitle"), hint: t3("exToastSonnerHint"), code: CODE_TOAST_NATIVE },
|
|
64666
|
-
(0, import_react81.createElement)(
|
|
64667
|
-
"div",
|
|
64668
|
-
{ style: { display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "8px" } },
|
|
64669
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u5DF2\u4FDD\u5B58") }, "\u666E\u901A(info)"),
|
|
64670
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u4FDD\u5B58\u6210\u529F", { variant: "success" }) }, "\u6210\u529F"),
|
|
64671
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u4FDD\u5B58\u5931\u8D25", { variant: "error" }) }, "\u5931\u8D25"),
|
|
64672
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u6CE8\u610F\u4E00\u4E0B", { variant: "warning" }) }, "\u8B66\u544A"),
|
|
64673
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u6574\u6761\u81EA\u5B9A\u4E49\u8272", { color: "#7c3aed" }) }, "\u81EA\u5B9A\u4E49\u8272"),
|
|
64674
|
-
(0, import_react81.createElement)(
|
|
64675
|
-
Button,
|
|
64676
|
-
{
|
|
64677
|
-
onClick: () => showToast("\u6D88\u5931\u540E\u56DE\u8C03", {
|
|
64678
|
-
onDismiss: () => showToast("\u4E0A\u4E00\u6761\u6D88\u5931\u4E86")
|
|
64679
|
-
})
|
|
64680
|
-
},
|
|
64681
|
-
"\u5E26\u56DE\u8C03"
|
|
64682
|
-
)
|
|
64683
|
-
),
|
|
64684
|
-
(0, import_react81.createElement)(
|
|
64685
|
-
"div",
|
|
64686
|
-
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64687
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u9876\u90E8-\u5DE6", { position: "top-left" }) }, "top-left"),
|
|
64688
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u9876\u90E8-\u4E2D", { position: "top-center" }) }, "top-center"),
|
|
64689
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u9876\u90E8-\u53F3", { position: "top-right" }) }, "top-right"),
|
|
64690
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u5E95\u90E8-\u5DE6", { position: "bottom-left" }) }, "bottom-left"),
|
|
64691
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u5E95\u90E8-\u4E2D", { position: "bottom-center" }) }, "bottom-center"),
|
|
64692
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u5E95\u90E8-\u53F3", { position: "bottom-right" }) }, "bottom-right")
|
|
64693
|
-
)
|
|
64694
|
-
),
|
|
64695
|
-
(0, import_react81.createElement)(
|
|
64857
|
+
(0, import_react80.createElement)(
|
|
64696
64858
|
Example,
|
|
64697
64859
|
{ title: t3("exLoaderTitle"), hint: t3("exLoaderHint"), code: CODE_LOADER },
|
|
64698
|
-
(0,
|
|
64860
|
+
(0, import_react80.createElement)(
|
|
64699
64861
|
"div",
|
|
64700
64862
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64701
64863
|
...LOADER_VARIANTS.map(
|
|
64702
|
-
(variant) => (0,
|
|
64864
|
+
(variant) => (0, import_react80.createElement)(
|
|
64703
64865
|
"div",
|
|
64704
64866
|
{ key: variant, style: { display: "flex", alignItems: "center", gap: "20px", flexWrap: "wrap" } },
|
|
64705
|
-
(0,
|
|
64867
|
+
(0, import_react80.createElement)(
|
|
64706
64868
|
"span",
|
|
64707
64869
|
{ style: { width: "56px", color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)" } },
|
|
64708
64870
|
variant
|
|
64709
64871
|
),
|
|
64710
|
-
...LOADER_SIZES.map((size4) => (0,
|
|
64872
|
+
...LOADER_SIZES.map((size4) => (0, import_react80.createElement)(Loader, { key: size4, variant, size: size4 }))
|
|
64711
64873
|
)
|
|
64712
64874
|
),
|
|
64713
64875
|
// 背景 / 定位 / 颜色都由调用方配:组件本身只是裸图标
|
|
64714
|
-
(0,
|
|
64876
|
+
(0, import_react80.createElement)(
|
|
64715
64877
|
"div",
|
|
64716
64878
|
{ style: { display: "flex", alignItems: "center", gap: "16px", flexWrap: "wrap" } },
|
|
64717
|
-
(0,
|
|
64879
|
+
(0, import_react80.createElement)(
|
|
64718
64880
|
"span",
|
|
64719
64881
|
{
|
|
64720
64882
|
style: {
|
|
@@ -64724,9 +64886,9 @@ function FeedbackPage() {
|
|
|
64724
64886
|
background: "var(--dshpc-surface-sunken)"
|
|
64725
64887
|
}
|
|
64726
64888
|
},
|
|
64727
|
-
(0,
|
|
64889
|
+
(0, import_react80.createElement)(Loader, { size: "sm" })
|
|
64728
64890
|
),
|
|
64729
|
-
(0,
|
|
64891
|
+
(0, import_react80.createElement)(
|
|
64730
64892
|
Surface,
|
|
64731
64893
|
{
|
|
64732
64894
|
padding: null,
|
|
@@ -64739,56 +64901,56 @@ function FeedbackPage() {
|
|
|
64739
64901
|
fontSize: "var(--dshpc-font-xs)"
|
|
64740
64902
|
}
|
|
64741
64903
|
},
|
|
64742
|
-
(0,
|
|
64904
|
+
(0, import_react80.createElement)(Loader, { variant: "blocks", size: "sm" }),
|
|
64743
64905
|
"\u6B63\u5728\u540C\u6B65"
|
|
64744
64906
|
),
|
|
64745
|
-
(0,
|
|
64907
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-business)" } }, (0, import_react80.createElement)(Loader, { size: "lg" }))
|
|
64746
64908
|
),
|
|
64747
64909
|
// 同族的胶囊不定进度:三档尺寸
|
|
64748
|
-
(0,
|
|
64910
|
+
(0, import_react80.createElement)(
|
|
64749
64911
|
"div",
|
|
64750
64912
|
{ style: { display: "flex", alignItems: "center", gap: "20px", flexWrap: "wrap" } },
|
|
64751
|
-
(0,
|
|
64752
|
-
(0,
|
|
64753
|
-
(0,
|
|
64913
|
+
(0, import_react80.createElement)(LoaderBar, { size: "sm" }),
|
|
64914
|
+
(0, import_react80.createElement)(LoaderBar, { size: "md" }),
|
|
64915
|
+
(0, import_react80.createElement)(LoaderBar, { size: "lg" })
|
|
64754
64916
|
)
|
|
64755
64917
|
)
|
|
64756
64918
|
),
|
|
64757
|
-
(0,
|
|
64919
|
+
(0, import_react80.createElement)(
|
|
64758
64920
|
Example,
|
|
64759
64921
|
{ title: t3("exLoadingTitle"), hint: t3("exLoadingHint"), code: CODE_LOADING },
|
|
64760
|
-
(0,
|
|
64922
|
+
(0, import_react80.createElement)(
|
|
64761
64923
|
"div",
|
|
64762
64924
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64763
|
-
(0,
|
|
64925
|
+
(0, import_react80.createElement)(
|
|
64764
64926
|
"div",
|
|
64765
64927
|
{ style: { display: "flex", alignItems: "center", gap: "16px", flexWrap: "wrap" } },
|
|
64766
|
-
(0,
|
|
64767
|
-
(0,
|
|
64928
|
+
(0, import_react80.createElement)(LoadingToast, null),
|
|
64929
|
+
(0, import_react80.createElement)(LoadingBlock, { text: "\u5904\u7406\u4E2D" })
|
|
64768
64930
|
),
|
|
64769
|
-
(0,
|
|
64931
|
+
(0, import_react80.createElement)(
|
|
64770
64932
|
"div",
|
|
64771
64933
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64772
|
-
(0,
|
|
64773
|
-
(0,
|
|
64774
|
-
(0,
|
|
64775
|
-
(0,
|
|
64934
|
+
(0, import_react80.createElement)(Button, { onClick: () => flash() }, "\u5168\u5C40 toast\uFF081.2s\uFF09"),
|
|
64935
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => flash({ variant: "block", text: "\u5904\u7406\u4E2D\u2026" }) }, "\u5168\u5C40 block\uFF081.2s\uFF09"),
|
|
64936
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ text: "\u906E\u7F69 0.3", mask: true, maskOpacity: 0.3 }) }, "\u906E\u7F69 0.3"),
|
|
64937
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ text: "\u900F\u660E\u906E\u7F69", mask: true }) }, "\u906E\u7F69\u900F\u660E\uFF08\u4ECD\u6321\u4F4F\u70B9\u51FB\uFF09")
|
|
64776
64938
|
),
|
|
64777
|
-
(0,
|
|
64939
|
+
(0, import_react80.createElement)(
|
|
64778
64940
|
"div",
|
|
64779
64941
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64780
|
-
(0,
|
|
64781
|
-
(0,
|
|
64782
|
-
(0,
|
|
64783
|
-
(0,
|
|
64784
|
-
(0,
|
|
64785
|
-
(0,
|
|
64786
|
-
(0,
|
|
64942
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "top-left", text: "top-left" }) }, "top-left"),
|
|
64943
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "top-center", text: "top-center" }) }, "top-center"),
|
|
64944
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "top-right", text: "top-right" }) }, "top-right"),
|
|
64945
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "center", text: "center" }) }, "center"),
|
|
64946
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "bottom-left", text: "bottom-left" }) }, "bottom-left"),
|
|
64947
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "bottom-center", text: "bottom-center\uFF08\u9ED8\u8BA4\uFF09" }) }, "bottom-center"),
|
|
64948
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "bottom-right", text: "bottom-right" }) }, "bottom-right")
|
|
64787
64949
|
)
|
|
64788
64950
|
)
|
|
64789
64951
|
),
|
|
64790
|
-
(0,
|
|
64791
|
-
(0,
|
|
64952
|
+
(0, import_react80.createElement)(DocCode, { id: "feedback" }),
|
|
64953
|
+
(0, import_react80.createElement)(DocApi, { id: "feedback" })
|
|
64792
64954
|
);
|
|
64793
64955
|
}
|
|
64794
64956
|
var CODE_DOCK = `// 1) \u5EFA\u4E00\u4E2A dock \u63A7\u5236\u5668\uFF08\u5E94\u7528\u7EA7\u5355\u4F8B\uFF1BmaxPanels \u9ED8\u8BA4 3\uFF09
|
|
@@ -64809,7 +64971,7 @@ const dock = createPanelDock({ maxPanels: 3 })
|
|
|
64809
64971
|
|
|
64810
64972
|
// 3) \u663E\u9690\u5F52\u72B6\u6001\uFF1A\u53EA\u4F20 id\uFF0C\u4E0D\u4F20\u5185\u5BB9
|
|
64811
64973
|
const result = dock.open('files') // { ok, reason }\uFF1B\u5230\u4E0A\u9650\u65F6 ok=false
|
|
64812
|
-
if (!result.ok)
|
|
64974
|
+
if (!result.ok) notify('\u6700\u591A\u540C\u65F6\u5F00 3 \u680F')
|
|
64813
64975
|
dock.close('files')
|
|
64814
64976
|
dock.toggle('preview')
|
|
64815
64977
|
dock.isOpen('files')
|
|
@@ -64820,8 +64982,8 @@ dock.isCollapsed('files')
|
|
|
64820
64982
|
// 4) \u8BA2\u9605\u72B6\u6001\u9A71\u52A8 UI\uFF08React\uFF09
|
|
64821
64983
|
const state = useSyncExternalStore(dock.subscribe, dock.getSnapshot, dock.getSnapshot)`;
|
|
64822
64984
|
function LayoutPage() {
|
|
64823
|
-
const state = (0,
|
|
64824
|
-
const [notice, setNotice] = (0,
|
|
64985
|
+
const state = (0, import_react80.useSyncExternalStore)(demoDock.subscribe, demoDock.getSnapshot, demoDock.getSnapshot);
|
|
64986
|
+
const [notice, setNotice] = (0, import_react80.useState)(null);
|
|
64825
64987
|
const open = (id3) => {
|
|
64826
64988
|
const result = demoDock.open(id3);
|
|
64827
64989
|
setNotice(result.ok ? null : t3("dockLimitWarn"));
|
|
@@ -64836,24 +64998,24 @@ function LayoutPage() {
|
|
|
64836
64998
|
};
|
|
64837
64999
|
const opened = state.ids;
|
|
64838
65000
|
const collapsedIds = state.collapsed;
|
|
64839
|
-
return (0,
|
|
65001
|
+
return (0, import_react80.createElement)(
|
|
64840
65002
|
"div",
|
|
64841
65003
|
null,
|
|
64842
|
-
(0,
|
|
64843
|
-
(0,
|
|
65004
|
+
(0, import_react80.createElement)(DocProse, { id: "layout" }),
|
|
65005
|
+
(0, import_react80.createElement)(
|
|
64844
65006
|
Example,
|
|
64845
65007
|
{ title: "PanelDock", hint: t3("dockHint"), code: CODE_DOCK },
|
|
64846
|
-
(0,
|
|
65008
|
+
(0, import_react80.createElement)(
|
|
64847
65009
|
"div",
|
|
64848
65010
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "12px" } },
|
|
64849
|
-
(0,
|
|
64850
|
-
(0,
|
|
64851
|
-
(0,
|
|
64852
|
-
(0,
|
|
64853
|
-
(0,
|
|
64854
|
-
(0,
|
|
64855
|
-
(0,
|
|
64856
|
-
(0,
|
|
65011
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => open("A") }, t3("dockBtnOpenA")),
|
|
65012
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => open("B") }, t3("dockBtnOpenB")),
|
|
65013
|
+
(0, import_react80.createElement)(Button, { size: "sm", variant: "primary", onClick: () => open("A") }, t3("dockBtnOpenA2")),
|
|
65014
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => close("A") }, t3("dockBtnCloseA")),
|
|
65015
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => collapse("A") }, t3("dockBtnCollapseA")),
|
|
65016
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => open("default") }, t3("dockBtnDefault")),
|
|
65017
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => open("C") }, t3("dockBtnOpenC")),
|
|
65018
|
+
(0, import_react80.createElement)(
|
|
64857
65019
|
Button,
|
|
64858
65020
|
{
|
|
64859
65021
|
size: "sm",
|
|
@@ -64866,21 +65028,21 @@ function LayoutPage() {
|
|
|
64866
65028
|
t3("dockBtnReset")
|
|
64867
65029
|
)
|
|
64868
65030
|
),
|
|
64869
|
-
(0,
|
|
65031
|
+
(0, import_react80.createElement)(
|
|
64870
65032
|
"div",
|
|
64871
65033
|
{ style: { fontSize: "12px", color: "var(--dshpc-fg-3)" } },
|
|
64872
65034
|
`${t3("dockOpened")}${opened.length === 0 ? "\u2014" : opened.join(", ")}`,
|
|
64873
65035
|
collapsedIds.length === 0 ? "" : `\u3000${t3("dockCollapsed")}${collapsedIds.join(", ")}`,
|
|
64874
65036
|
notice === null ? "" : `\u3000${notice}`
|
|
64875
65037
|
),
|
|
64876
|
-
(0,
|
|
65038
|
+
(0, import_react80.createElement)(
|
|
64877
65039
|
"div",
|
|
64878
65040
|
{ style: { marginTop: "10px", fontSize: "12px", color: "var(--dshpc-fg-3)", lineHeight: "1.9" } },
|
|
64879
65041
|
t3("dockMainText")
|
|
64880
65042
|
)
|
|
64881
65043
|
),
|
|
64882
|
-
(0,
|
|
64883
|
-
(0,
|
|
65044
|
+
(0, import_react80.createElement)(DocCode, { id: "layout" }),
|
|
65045
|
+
(0, import_react80.createElement)(DocApi, { id: "layout" })
|
|
64884
65046
|
);
|
|
64885
65047
|
}
|
|
64886
65048
|
var CODE_DATETIME = `// \u5355\u4E2A\u65F6\u523B\uFF1Aprecision \u63A7\u5236\u7CBE\u5EA6\uFF08day / hour / minute / second\uFF09
|
|
@@ -64889,43 +65051,43 @@ h(DateTimePicker, { precision: 'minute', value: at, onChange: setAt })
|
|
|
64889
65051
|
// \u65F6\u95F4\u6BB5\uFF1A\u8D77\u6B62\u4E24\u4E2A\u72EC\u7ACB\u6846\u3001\u540C\u65F6\u5C55\u5F00\uFF1Bday \u7CBE\u5EA6\u4E0B\u7ED3\u675F\u7AEF\u8865\u5230 23:59:59.999
|
|
64890
65052
|
h(DateTimePicker, { mode: 'range', precision: 'day', value: range, onChange: setRange })`;
|
|
64891
65053
|
function DateTimePage() {
|
|
64892
|
-
const [singleDay, setSingleDay] = (0,
|
|
64893
|
-
const [singleMinute, setSingleMinute] = (0,
|
|
64894
|
-
const [rangeDay, setRangeDay] = (0,
|
|
64895
|
-
const [rangeSecond, setRangeSecond] = (0,
|
|
64896
|
-
return (0,
|
|
65054
|
+
const [singleDay, setSingleDay] = (0, import_react80.useState)(null);
|
|
65055
|
+
const [singleMinute, setSingleMinute] = (0, import_react80.useState)(null);
|
|
65056
|
+
const [rangeDay, setRangeDay] = (0, import_react80.useState)(null);
|
|
65057
|
+
const [rangeSecond, setRangeSecond] = (0, import_react80.useState)(null);
|
|
65058
|
+
return (0, import_react80.createElement)(
|
|
64897
65059
|
"div",
|
|
64898
65060
|
null,
|
|
64899
|
-
(0,
|
|
64900
|
-
(0,
|
|
65061
|
+
(0, import_react80.createElement)(DocProse, { id: "datetime-picker" }),
|
|
65062
|
+
(0, import_react80.createElement)(
|
|
64901
65063
|
Example,
|
|
64902
65064
|
{ title: "DateTimePicker", hint: t3("dateTimePickerHint"), code: CODE_DATETIME },
|
|
64903
|
-
(0,
|
|
65065
|
+
(0, import_react80.createElement)(
|
|
64904
65066
|
"div",
|
|
64905
65067
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
64906
|
-
(0,
|
|
65068
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64907
65069
|
precision: "day",
|
|
64908
65070
|
value: singleDay,
|
|
64909
65071
|
onChange: (v) => setSingleDay(v)
|
|
64910
65072
|
}),
|
|
64911
|
-
(0,
|
|
65073
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64912
65074
|
precision: "minute",
|
|
64913
65075
|
value: singleMinute,
|
|
64914
65076
|
onChange: (v) => setSingleMinute(v)
|
|
64915
65077
|
}),
|
|
64916
|
-
(0,
|
|
65078
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64917
65079
|
mode: "range",
|
|
64918
65080
|
precision: "day",
|
|
64919
65081
|
value: rangeDay,
|
|
64920
65082
|
onChange: (v) => setRangeDay(v)
|
|
64921
65083
|
}),
|
|
64922
|
-
(0,
|
|
65084
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64923
65085
|
mode: "range",
|
|
64924
65086
|
precision: "second",
|
|
64925
65087
|
value: rangeSecond,
|
|
64926
65088
|
onChange: (v) => setRangeSecond(v)
|
|
64927
65089
|
}),
|
|
64928
|
-
(0,
|
|
65090
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64929
65091
|
precision: "minute",
|
|
64930
65092
|
value: singleMinute,
|
|
64931
65093
|
onChange: (v) => setSingleMinute(v),
|
|
@@ -64933,13 +65095,13 @@ function DateTimePage() {
|
|
|
64933
65095
|
})
|
|
64934
65096
|
)
|
|
64935
65097
|
),
|
|
64936
|
-
(0,
|
|
64937
|
-
(0,
|
|
65098
|
+
(0, import_react80.createElement)(DocCode, { id: "datetime-picker" }),
|
|
65099
|
+
(0, import_react80.createElement)(DocApi, { id: "datetime-picker" })
|
|
64938
65100
|
);
|
|
64939
65101
|
}
|
|
64940
65102
|
|
|
64941
65103
|
// packages/demo/src/sections/blocks.tsx
|
|
64942
|
-
var
|
|
65104
|
+
var import_react81 = require("react");
|
|
64943
65105
|
var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
64944
65106
|
|
|
64945
65107
|
// packages/demo/src/samples.ts
|
|
@@ -65040,13 +65202,13 @@ var CODE_BLOCKS_USAGE = `pnpm add dsh-plugin-core
|
|
|
65040
65202
|
import { openFilePreview, pickWorkspaceFile } from 'dsh-plugin-core/explorer'
|
|
65041
65203
|
import { openSessionView, SessionViewModal } from 'dsh-plugin-core/session'`;
|
|
65042
65204
|
function useExplorerHost() {
|
|
65043
|
-
const { workspaceFiles: workspaceFiles2, officeToPdf } = (0,
|
|
65044
|
-
const wsItems = (0,
|
|
65205
|
+
const { workspaceFiles: workspaceFiles2, officeToPdf } = (0, import_react81.useSyncExternalStore)(fileServices.subscribe, fileServices.getSnapshot);
|
|
65206
|
+
const wsItems = (0, import_react81.useSyncExternalStore)(workspaceList.subscribe, workspaceList.getSnapshot);
|
|
65045
65207
|
const anchor = pickWorkspaceAnchor(wsItems);
|
|
65046
65208
|
return { workspaceFiles: workspaceFiles2, officeToPdf, anchor, workspaceNames: wsItems.map((w) => w.title) };
|
|
65047
65209
|
}
|
|
65048
65210
|
function NotReady(props) {
|
|
65049
|
-
return (0,
|
|
65211
|
+
return (0, import_react81.createElement)(
|
|
65050
65212
|
"div",
|
|
65051
65213
|
{ style: { fontSize: "13px", color: "var(--dshpc-fg-3)" } },
|
|
65052
65214
|
t3(props.which === "files" ? "explorerFilesNone" : "explorerAnchorNone")
|
|
@@ -65054,12 +65216,12 @@ function NotReady(props) {
|
|
|
65054
65216
|
}
|
|
65055
65217
|
function OpenPreviewDemo() {
|
|
65056
65218
|
const { workspaceFiles: workspaceFiles2, anchor, workspaceNames } = useExplorerHost();
|
|
65057
|
-
const [samples, setSamples] = (0,
|
|
65058
|
-
const [phase, setPhase] = (0,
|
|
65059
|
-
const [last2, setLast] = (0,
|
|
65060
|
-
const pending = (0,
|
|
65219
|
+
const [samples, setSamples] = (0, import_react81.useState)(null);
|
|
65220
|
+
const [phase, setPhase] = (0, import_react81.useState)("idle");
|
|
65221
|
+
const [last2, setLast] = (0, import_react81.useState)(null);
|
|
65222
|
+
const pending = (0, import_react81.useRef)(null);
|
|
65061
65223
|
const sessionId = anchor === null ? null : anchor.sessionId;
|
|
65062
|
-
(0,
|
|
65224
|
+
(0, import_react81.useEffect)(() => {
|
|
65063
65225
|
if (workspaceFiles2 === null || sessionId === null) return;
|
|
65064
65226
|
if (pending.current !== null) return;
|
|
65065
65227
|
setPhase("probing");
|
|
@@ -65069,8 +65231,8 @@ function OpenPreviewDemo() {
|
|
|
65069
65231
|
return s;
|
|
65070
65232
|
});
|
|
65071
65233
|
}, [workspaceFiles2, sessionId]);
|
|
65072
|
-
if (workspaceFiles2 === null) return (0,
|
|
65073
|
-
if (anchor === null) return (0,
|
|
65234
|
+
if (workspaceFiles2 === null) return (0, import_react81.createElement)(NotReady, { which: "files" });
|
|
65235
|
+
if (anchor === null) return (0, import_react81.createElement)(NotReady, { which: "anchor" });
|
|
65074
65236
|
const open = (path, rootName, workspaces) => {
|
|
65075
65237
|
const mount = pageRow.element;
|
|
65076
65238
|
if (mount === null) {
|
|
@@ -65086,14 +65248,14 @@ function OpenPreviewDemo() {
|
|
|
65086
65248
|
if (s !== null) open(pick2(s), anchor.title);
|
|
65087
65249
|
});
|
|
65088
65250
|
};
|
|
65089
|
-
return (0,
|
|
65251
|
+
return (0, import_react81.createElement)(
|
|
65090
65252
|
"div",
|
|
65091
65253
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "center" } },
|
|
65092
|
-
(0,
|
|
65093
|
-
(0,
|
|
65094
|
-
(0,
|
|
65095
|
-
last2 === null ? null : (0,
|
|
65096
|
-
(0,
|
|
65254
|
+
(0, import_react81.createElement)(Button, { variant: "primary", onClick: () => open("", anchor.title, workspaceNames) }, t3("openRootPreview")),
|
|
65255
|
+
(0, import_react81.createElement)(Button, { variant: "secondary", onClick: () => openSamples((s) => s.dir) }, sampleLabel("openSamplesDir")),
|
|
65256
|
+
(0, import_react81.createElement)(Button, { variant: "ghost", onClick: () => openSamples((s) => s.js) }, sampleLabel("sampleJs")),
|
|
65257
|
+
last2 === null ? null : (0, import_react81.createElement)("code", { style: { fontSize: "12px" } }, `\u5DF2\u6253\u5F00\uFF1A${last2}`),
|
|
65258
|
+
(0, import_react81.createElement)(
|
|
65097
65259
|
"div",
|
|
65098
65260
|
{ style: { fontSize: "12px", color: "var(--dshpc-fg-3)", width: "100%" } },
|
|
65099
65261
|
`${t3("explorerAnchorLabel")}${anchor.title} \xB7 ${t3("explorerSessionLabel")}${anchor.sessionId} \xB7 ${t3("explorerWorkspaces")}${String(workspaceNames.length)}`
|
|
@@ -65102,9 +65264,9 @@ function OpenPreviewDemo() {
|
|
|
65102
65264
|
}
|
|
65103
65265
|
function PickFileDemo() {
|
|
65104
65266
|
const { workspaceFiles: workspaceFiles2, anchor } = useExplorerHost();
|
|
65105
|
-
const [picked, setPicked] = (0,
|
|
65106
|
-
if (workspaceFiles2 === null) return (0,
|
|
65107
|
-
if (anchor === null) return (0,
|
|
65267
|
+
const [picked, setPicked] = (0, import_react81.useState)(null);
|
|
65268
|
+
if (workspaceFiles2 === null) return (0, import_react81.createElement)(NotReady, { which: "files" });
|
|
65269
|
+
if (anchor === null) return (0, import_react81.createElement)(NotReady, { which: "anchor" });
|
|
65108
65270
|
const pick2 = (anchorBtn, filter2) => {
|
|
65109
65271
|
void pickWorkspaceFile({
|
|
65110
65272
|
anchor: anchorBtn,
|
|
@@ -65113,10 +65275,10 @@ function PickFileDemo() {
|
|
|
65113
65275
|
// 目录补尾斜杠只补一次:根 `/`、盘符 `C:/` 自己就带着,再补就成了 `//` / `C://`。
|
|
65114
65276
|
}).then((r2) => setPicked(r2 === null ? null : r2.path + (r2.isDir && !r2.path.endsWith("/") ? "/" : "")));
|
|
65115
65277
|
};
|
|
65116
|
-
return (0,
|
|
65278
|
+
return (0, import_react81.createElement)(
|
|
65117
65279
|
"div",
|
|
65118
65280
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "center" } },
|
|
65119
|
-
(0,
|
|
65281
|
+
(0, import_react81.createElement)(
|
|
65120
65282
|
Button,
|
|
65121
65283
|
{
|
|
65122
65284
|
variant: "primary",
|
|
@@ -65124,7 +65286,7 @@ function PickFileDemo() {
|
|
|
65124
65286
|
},
|
|
65125
65287
|
t3("pickAny")
|
|
65126
65288
|
),
|
|
65127
|
-
(0,
|
|
65289
|
+
(0, import_react81.createElement)(
|
|
65128
65290
|
Button,
|
|
65129
65291
|
{
|
|
65130
65292
|
variant: "secondary",
|
|
@@ -65133,7 +65295,7 @@ function PickFileDemo() {
|
|
|
65133
65295
|
t3("pickJsMd")
|
|
65134
65296
|
),
|
|
65135
65297
|
// 需求一(2026-11-03):只选文件夹 —— 文件不渲染,目录行尾「选择」+ 面包屑行「选择此文件夹」。
|
|
65136
|
-
(0,
|
|
65298
|
+
(0, import_react81.createElement)(
|
|
65137
65299
|
Button,
|
|
65138
65300
|
{
|
|
65139
65301
|
variant: "outline",
|
|
@@ -65141,16 +65303,16 @@ function PickFileDemo() {
|
|
|
65141
65303
|
},
|
|
65142
65304
|
t3("pickDir")
|
|
65143
65305
|
),
|
|
65144
|
-
(0,
|
|
65306
|
+
(0, import_react81.createElement)("code", { style: { fontSize: "12px" } }, picked === null ? t3("pickNone") : `${t3("pickResult")}${picked}`)
|
|
65145
65307
|
);
|
|
65146
65308
|
}
|
|
65147
65309
|
function RealSessionListDemo() {
|
|
65148
|
-
const state = (0,
|
|
65149
|
-
const files = (0,
|
|
65150
|
-
const wsItems = (0,
|
|
65310
|
+
const state = (0, import_react81.useSyncExternalStore)(realSessions.subscribe, realSessions.getSnapshot);
|
|
65311
|
+
const files = (0, import_react81.useSyncExternalStore)(fileServices.subscribe, fileServices.getSnapshot);
|
|
65312
|
+
const wsItems = (0, import_react81.useSyncExternalStore)(workspaceList.subscribe, workspaceList.getSnapshot);
|
|
65151
65313
|
const anchor = pickWorkspaceAnchor(wsItems);
|
|
65152
|
-
const [openId, setOpenId] = (0,
|
|
65153
|
-
const view = (0,
|
|
65314
|
+
const [openId, setOpenId] = (0, import_react81.useState)(null);
|
|
65315
|
+
const view = (0, import_react81.useMemo)(() => openId === null ? null : openRealSessionView(openId), [openId]);
|
|
65154
65316
|
const workspaceFiles2 = files.workspaceFiles;
|
|
65155
65317
|
const canOpenFile = workspaceFiles2 !== null && anchor !== null;
|
|
65156
65318
|
const openLinkedFile = (path, sessionId) => {
|
|
@@ -65176,7 +65338,7 @@ function RealSessionListDemo() {
|
|
|
65176
65338
|
mount,
|
|
65177
65339
|
sessionId: loc.sessionId,
|
|
65178
65340
|
path: "",
|
|
65179
|
-
content: () => (0,
|
|
65341
|
+
content: () => (0, import_react81.createElement)(ChangedFileDiff, {
|
|
65180
65342
|
sessionId: loc.sessionId,
|
|
65181
65343
|
seq: loc.seq,
|
|
65182
65344
|
index: loc.index,
|
|
@@ -65189,16 +65351,16 @@ function RealSessionListDemo() {
|
|
|
65189
65351
|
});
|
|
65190
65352
|
};
|
|
65191
65353
|
if (state.status !== "ready") {
|
|
65192
|
-
return (0,
|
|
65354
|
+
return (0, import_react81.createElement)("p", { style: { fontSize: "13px", opacity: 0.8 } }, t3("sessionListUnavailable"));
|
|
65193
65355
|
}
|
|
65194
65356
|
if (state.rows.length === 0) {
|
|
65195
|
-
return (0,
|
|
65357
|
+
return (0, import_react81.createElement)("p", { style: { fontSize: "13px", opacity: 0.8 } }, t3("sessionListEmpty"));
|
|
65196
65358
|
}
|
|
65197
|
-
return (0,
|
|
65359
|
+
return (0, import_react81.createElement)(
|
|
65198
65360
|
"div",
|
|
65199
65361
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", maxWidth: "720px" } },
|
|
65200
65362
|
...state.rows.map(
|
|
65201
|
-
(row) => (0,
|
|
65363
|
+
(row) => (0, import_react81.createElement)(
|
|
65202
65364
|
"button",
|
|
65203
65365
|
{
|
|
65204
65366
|
key: row.sessionId,
|
|
@@ -65221,22 +65383,22 @@ function RealSessionListDemo() {
|
|
|
65221
65383
|
cursor: "pointer"
|
|
65222
65384
|
}
|
|
65223
65385
|
},
|
|
65224
|
-
(0,
|
|
65225
|
-
row.running ? (0,
|
|
65226
|
-
row.archived ? (0,
|
|
65386
|
+
(0, import_react81.createElement)("span", { style: { flex: "1", minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, row.displayTitle),
|
|
65387
|
+
row.running ? (0, import_react81.createElement)(Chip, { size: "xs", tone: "warning" }, t3("sessionListRunning")) : null,
|
|
65388
|
+
row.archived ? (0, import_react81.createElement)(
|
|
65227
65389
|
Chip,
|
|
65228
65390
|
{ size: "xs" },
|
|
65229
|
-
(0,
|
|
65391
|
+
(0, import_react81.createElement)(
|
|
65230
65392
|
"span",
|
|
65231
65393
|
{ style: { display: "inline-flex", alignItems: "center", gap: "4px" } },
|
|
65232
|
-
(0,
|
|
65394
|
+
(0, import_react81.createElement)(import_dsh_client_ui_primitives3.IconArchiveOutlineRegular, { size: 12 }),
|
|
65233
65395
|
t3("sessionListArchived")
|
|
65234
65396
|
)
|
|
65235
65397
|
) : null,
|
|
65236
|
-
(0,
|
|
65398
|
+
(0, import_react81.createElement)("span", { style: { flex: "none", fontSize: "12px", color: "var(--dshpc-fg-3)" } }, formatDateTime(new Date(row.updatedAt).toISOString()))
|
|
65237
65399
|
)
|
|
65238
65400
|
),
|
|
65239
|
-
openId !== null && view !== null ? (0,
|
|
65401
|
+
openId !== null && view !== null ? (0, import_react81.createElement)(SessionViewModal, {
|
|
65240
65402
|
sessionId: openId,
|
|
65241
65403
|
view,
|
|
65242
65404
|
// 标题 = 会话自己的标题;归档态分化「继续对话」行为(开分支确认 vs 直跳官方)。
|
|
@@ -65262,40 +65424,40 @@ function RealSessionListDemo() {
|
|
|
65262
65424
|
);
|
|
65263
65425
|
}
|
|
65264
65426
|
function ExplorerPage() {
|
|
65265
|
-
return (0,
|
|
65427
|
+
return (0, import_react81.createElement)(
|
|
65266
65428
|
"div",
|
|
65267
65429
|
null,
|
|
65268
|
-
(0,
|
|
65269
|
-
(0,
|
|
65430
|
+
(0, import_react81.createElement)(DocProse, { id: "explorer" }),
|
|
65431
|
+
(0, import_react81.createElement)(
|
|
65270
65432
|
Example,
|
|
65271
65433
|
{ title: t3("methodATitle"), hint: t3("methodAHint"), code: CODE_OPEN },
|
|
65272
|
-
(0,
|
|
65434
|
+
(0, import_react81.createElement)(OpenPreviewDemo, null)
|
|
65273
65435
|
),
|
|
65274
|
-
(0,
|
|
65436
|
+
(0, import_react81.createElement)(
|
|
65275
65437
|
Example,
|
|
65276
65438
|
{ title: t3("methodBTitle"), hint: t3("methodBHint"), code: CODE_PICK },
|
|
65277
|
-
(0,
|
|
65439
|
+
(0, import_react81.createElement)(PickFileDemo, null)
|
|
65278
65440
|
),
|
|
65279
|
-
(0,
|
|
65280
|
-
(0,
|
|
65441
|
+
(0, import_react81.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_BLOCKS_USAGE }),
|
|
65442
|
+
(0, import_react81.createElement)(DocApi, { id: "explorer" })
|
|
65281
65443
|
);
|
|
65282
65444
|
}
|
|
65283
65445
|
function SessionPage() {
|
|
65284
|
-
return (0,
|
|
65446
|
+
return (0, import_react81.createElement)(
|
|
65285
65447
|
"div",
|
|
65286
65448
|
null,
|
|
65287
|
-
(0,
|
|
65288
|
-
(0,
|
|
65449
|
+
(0, import_react81.createElement)(DocProse, { id: "session" }),
|
|
65450
|
+
(0, import_react81.createElement)(
|
|
65289
65451
|
Example,
|
|
65290
65452
|
{ title: t3("sessionRealTitle"), hint: t3("sessionRealHint"), code: CODE_SESSION_REAL },
|
|
65291
|
-
(0,
|
|
65453
|
+
(0, import_react81.createElement)(RealSessionListDemo, null)
|
|
65292
65454
|
),
|
|
65293
|
-
(0,
|
|
65455
|
+
(0, import_react81.createElement)(DocApi, { id: "session" })
|
|
65294
65456
|
);
|
|
65295
65457
|
}
|
|
65296
65458
|
|
|
65297
65459
|
// packages/demo/src/sections/tables.tsx
|
|
65298
|
-
var
|
|
65460
|
+
var import_react82 = require("react");
|
|
65299
65461
|
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
65300
65462
|
var H_SCROLL = { overflowX: "auto", borderBottom: "1px solid transparent" };
|
|
65301
65463
|
var COLUMNS = [
|
|
@@ -65340,10 +65502,10 @@ var PEOPLE = [
|
|
|
65340
65502
|
{ id: "S-2429", name: "Deng, Qian", mrn: "MRN-61248", age: "33 / F", date: "2026-10-19", modality: "US", flags: [], tone: "success", state: "Reviewed" }
|
|
65341
65503
|
];
|
|
65342
65504
|
function personCell(person) {
|
|
65343
|
-
return (0,
|
|
65505
|
+
return (0, import_react82.createElement)(
|
|
65344
65506
|
"div",
|
|
65345
65507
|
{ style: { display: "flex", alignItems: "center", gap: "8px", minWidth: 0 } },
|
|
65346
|
-
(0,
|
|
65508
|
+
(0, import_react82.createElement)(
|
|
65347
65509
|
"div",
|
|
65348
65510
|
{
|
|
65349
65511
|
style: {
|
|
@@ -65362,11 +65524,11 @@ function personCell(person) {
|
|
|
65362
65524
|
},
|
|
65363
65525
|
person.name.slice(0, 1)
|
|
65364
65526
|
),
|
|
65365
|
-
(0,
|
|
65527
|
+
(0, import_react82.createElement)(
|
|
65366
65528
|
"div",
|
|
65367
65529
|
{ style: { display: "flex", flexDirection: "column", minWidth: 0 } },
|
|
65368
|
-
(0,
|
|
65369
|
-
(0,
|
|
65530
|
+
(0, import_react82.createElement)("span", null, person.name),
|
|
65531
|
+
(0, import_react82.createElement)(
|
|
65370
65532
|
"span",
|
|
65371
65533
|
{ style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)" } },
|
|
65372
65534
|
person.mrn
|
|
@@ -65375,8 +65537,8 @@ function personCell(person) {
|
|
|
65375
65537
|
);
|
|
65376
65538
|
}
|
|
65377
65539
|
function rowsOf() {
|
|
65378
|
-
const actions2 = (0,
|
|
65379
|
-
icon: (0,
|
|
65540
|
+
const actions2 = (0, import_react82.createElement)(IconButton, {
|
|
65541
|
+
icon: (0, import_react82.createElement)(import_dsh_client_ui_primitives4.IconChevronDownOutlineRegular, { size: 16 }),
|
|
65380
65542
|
label: "Open study"
|
|
65381
65543
|
});
|
|
65382
65544
|
return PEOPLE.map((person) => ({
|
|
@@ -65386,13 +65548,13 @@ function rowsOf() {
|
|
|
65386
65548
|
name: personCell(person),
|
|
65387
65549
|
age: person.age,
|
|
65388
65550
|
date: person.date,
|
|
65389
|
-
modality: (0,
|
|
65551
|
+
modality: (0, import_react82.createElement)(Chip, { tone: MODALITY_TONE[person.modality], size: "xs" }, person.modality),
|
|
65390
65552
|
// 多标签:标签之间的间距由调用方布局控制(这里 4px),列内距走列级 padding:8
|
|
65391
|
-
flags: person.flags.length === 0 ? null : (0,
|
|
65553
|
+
flags: person.flags.length === 0 ? null : (0, import_react82.createElement)(
|
|
65392
65554
|
"div",
|
|
65393
65555
|
{ style: { display: "flex", gap: "4px", flexWrap: "wrap" } },
|
|
65394
65556
|
...person.flags.map(
|
|
65395
|
-
(flag) => (0,
|
|
65557
|
+
(flag) => (0, import_react82.createElement)(
|
|
65396
65558
|
Chip,
|
|
65397
65559
|
{
|
|
65398
65560
|
key: flag,
|
|
@@ -65403,7 +65565,7 @@ function rowsOf() {
|
|
|
65403
65565
|
)
|
|
65404
65566
|
)
|
|
65405
65567
|
),
|
|
65406
|
-
status: (0,
|
|
65568
|
+
status: (0, import_react82.createElement)(Chip, { tone: person.tone, size: "xs" }, person.state),
|
|
65407
65569
|
actions: actions2
|
|
65408
65570
|
}
|
|
65409
65571
|
}));
|
|
@@ -65468,24 +65630,24 @@ var GROUPS = WORKSPACES.map((workspace) => ({
|
|
|
65468
65630
|
cells: {
|
|
65469
65631
|
task: task.title,
|
|
65470
65632
|
owner: task.owner,
|
|
65471
|
-
state: (0,
|
|
65633
|
+
state: (0, import_react82.createElement)(Chip, { tone: task.tone, size: "xs" }, task.state),
|
|
65472
65634
|
updated: task.updated
|
|
65473
65635
|
}
|
|
65474
65636
|
}))
|
|
65475
65637
|
}));
|
|
65476
65638
|
function TablePage() {
|
|
65477
|
-
const [selected, setSelected] = (0,
|
|
65478
|
-
const [spanSelected, setSpanSelected] = (0,
|
|
65479
|
-
const [groupSelected, setGroupSelected] = (0,
|
|
65480
|
-
const [groupAccentOn, setGroupAccentOn] = (0,
|
|
65481
|
-
const [groupAccent, setGroupAccent] = (0,
|
|
65482
|
-
const [pagerPage, setPagerPage] = (0,
|
|
65483
|
-
const [pagerSize, setPagerSize] = (0,
|
|
65484
|
-
const [demoPage, setDemoPage] = (0,
|
|
65485
|
-
const [demoSize, setDemoSize] = (0,
|
|
65486
|
-
const [demoAlign, setDemoAlign] = (0,
|
|
65487
|
-
const [demoShowTotal, setDemoShowTotal] = (0,
|
|
65488
|
-
const [loadState, setLoadState] = (0,
|
|
65639
|
+
const [selected, setSelected] = (0, import_react82.useState)("S-2418");
|
|
65640
|
+
const [spanSelected, setSpanSelected] = (0, import_react82.useState)("c");
|
|
65641
|
+
const [groupSelected, setGroupSelected] = (0, import_react82.useState)("a2");
|
|
65642
|
+
const [groupAccentOn, setGroupAccentOn] = (0, import_react82.useState)(true);
|
|
65643
|
+
const [groupAccent, setGroupAccent] = (0, import_react82.useState)("default");
|
|
65644
|
+
const [pagerPage, setPagerPage] = (0, import_react82.useState)(1);
|
|
65645
|
+
const [pagerSize, setPagerSize] = (0, import_react82.useState)(10);
|
|
65646
|
+
const [demoPage, setDemoPage] = (0, import_react82.useState)(2);
|
|
65647
|
+
const [demoSize, setDemoSize] = (0, import_react82.useState)(10);
|
|
65648
|
+
const [demoAlign, setDemoAlign] = (0, import_react82.useState)("right");
|
|
65649
|
+
const [demoShowTotal, setDemoShowTotal] = (0, import_react82.useState)(true);
|
|
65650
|
+
const [loadState, setLoadState] = (0, import_react82.useState)("idle");
|
|
65489
65651
|
const loadColumns = [
|
|
65490
65652
|
{ key: "name", title: "Patient", width: 240 },
|
|
65491
65653
|
{ key: "date", title: "Date", width: 120 },
|
|
@@ -65496,7 +65658,7 @@ function TablePage() {
|
|
|
65496
65658
|
cells: {
|
|
65497
65659
|
name: personCell(person),
|
|
65498
65660
|
date: person.date,
|
|
65499
|
-
modality: (0,
|
|
65661
|
+
modality: (0, import_react82.createElement)(Chip, { tone: MODALITY_TONE[person.modality], size: "xs" }, person.modality)
|
|
65500
65662
|
}
|
|
65501
65663
|
}));
|
|
65502
65664
|
const pagerOnChange = (page, size4) => {
|
|
@@ -65507,7 +65669,7 @@ function TablePage() {
|
|
|
65507
65669
|
setDemoPage(page);
|
|
65508
65670
|
setDemoSize(size4);
|
|
65509
65671
|
};
|
|
65510
|
-
const renderLoadTable = (borders) => (0,
|
|
65672
|
+
const renderLoadTable = (borders) => (0, import_react82.createElement)(Table, {
|
|
65511
65673
|
columns: loadColumns,
|
|
65512
65674
|
rows: loadState === "loading" ? [] : loadRows,
|
|
65513
65675
|
borders,
|
|
@@ -65521,19 +65683,19 @@ function TablePage() {
|
|
|
65521
65683
|
ariaLabel: "Patients loaded incrementally",
|
|
65522
65684
|
style: { maxWidth: "640px" }
|
|
65523
65685
|
});
|
|
65524
|
-
return (0,
|
|
65686
|
+
return (0, import_react82.createElement)(
|
|
65525
65687
|
"div",
|
|
65526
65688
|
null,
|
|
65527
|
-
(0,
|
|
65689
|
+
(0, import_react82.createElement)(DocProse, { id: "table" }),
|
|
65528
65690
|
// 表格较宽:示例区占满整栏(代码放页面底部),并在窄屏时横向滚动。
|
|
65529
65691
|
// 空态不放成第二个示例 —— 直接接在主表下方,同一区块里展示「有数据 / 没数据」。
|
|
65530
|
-
(0,
|
|
65692
|
+
(0, import_react82.createElement)(
|
|
65531
65693
|
Example,
|
|
65532
65694
|
{ title: "Table", hint: t3("tableHint") },
|
|
65533
|
-
(0,
|
|
65695
|
+
(0, import_react82.createElement)(
|
|
65534
65696
|
"div",
|
|
65535
65697
|
{ style: H_SCROLL },
|
|
65536
|
-
(0,
|
|
65698
|
+
(0, import_react82.createElement)(Table, {
|
|
65537
65699
|
columns: COLUMNS,
|
|
65538
65700
|
rows: rowsOf(),
|
|
65539
65701
|
striped: true,
|
|
@@ -65545,10 +65707,10 @@ function TablePage() {
|
|
|
65545
65707
|
style: { minWidth: 960 }
|
|
65546
65708
|
})
|
|
65547
65709
|
),
|
|
65548
|
-
(0,
|
|
65710
|
+
(0, import_react82.createElement)(
|
|
65549
65711
|
"div",
|
|
65550
65712
|
{ style: { ...H_SCROLL, marginTop: "16px" } },
|
|
65551
|
-
(0,
|
|
65713
|
+
(0, import_react82.createElement)(Table, {
|
|
65552
65714
|
columns: COLUMNS,
|
|
65553
65715
|
rows: [],
|
|
65554
65716
|
borders: "all",
|
|
@@ -65557,13 +65719,13 @@ function TablePage() {
|
|
|
65557
65719
|
})
|
|
65558
65720
|
)
|
|
65559
65721
|
),
|
|
65560
|
-
(0,
|
|
65722
|
+
(0, import_react82.createElement)(
|
|
65561
65723
|
Example,
|
|
65562
65724
|
{ title: "Density \xB7 borders \xB7 spans", hint: t3("tableSpanHint") },
|
|
65563
|
-
(0,
|
|
65725
|
+
(0, import_react82.createElement)(
|
|
65564
65726
|
"div",
|
|
65565
65727
|
{ style: H_SCROLL },
|
|
65566
|
-
(0,
|
|
65728
|
+
(0, import_react82.createElement)(Table, {
|
|
65567
65729
|
columns: SPAN_COLUMNS,
|
|
65568
65730
|
rows: SPAN_ROWS,
|
|
65569
65731
|
density: "compact",
|
|
@@ -65575,13 +65737,13 @@ function TablePage() {
|
|
|
65575
65737
|
})
|
|
65576
65738
|
)
|
|
65577
65739
|
),
|
|
65578
|
-
(0,
|
|
65740
|
+
(0, import_react82.createElement)(
|
|
65579
65741
|
Example,
|
|
65580
65742
|
{ title: "Groups \xB7 \u901A\u680F", hint: t3("tableGroupHint") },
|
|
65581
|
-
(0,
|
|
65743
|
+
(0, import_react82.createElement)(
|
|
65582
65744
|
"div",
|
|
65583
65745
|
{ style: { display: "flex", gap: "12px", alignItems: "center", flexWrap: "wrap" } },
|
|
65584
|
-
(0,
|
|
65746
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65585
65747
|
size: "sm",
|
|
65586
65748
|
items: [
|
|
65587
65749
|
{ value: "default", label: "\u9ED8\u8BA4" },
|
|
@@ -65592,12 +65754,12 @@ function TablePage() {
|
|
|
65592
65754
|
value: groupAccent,
|
|
65593
65755
|
onChange: setGroupAccent
|
|
65594
65756
|
}),
|
|
65595
|
-
(0,
|
|
65757
|
+
(0, import_react82.createElement)(Checkbox, { checked: groupAccentOn, onChange: setGroupAccentOn, label: "groupAccent" })
|
|
65596
65758
|
),
|
|
65597
|
-
(0,
|
|
65759
|
+
(0, import_react82.createElement)(
|
|
65598
65760
|
"div",
|
|
65599
65761
|
{ style: { ...H_SCROLL, marginTop: "12px" } },
|
|
65600
|
-
(0,
|
|
65762
|
+
(0, import_react82.createElement)(Table, {
|
|
65601
65763
|
columns: GROUP_COLUMNS,
|
|
65602
65764
|
groups: GROUPS,
|
|
65603
65765
|
groupAccent: groupAccentOn ? groupAccent : false,
|
|
@@ -65608,13 +65770,13 @@ function TablePage() {
|
|
|
65608
65770
|
})
|
|
65609
65771
|
)
|
|
65610
65772
|
),
|
|
65611
|
-
(0,
|
|
65773
|
+
(0, import_react82.createElement)(
|
|
65612
65774
|
Example,
|
|
65613
65775
|
{ title: "Pagination", hint: t3("paginationHint") },
|
|
65614
|
-
(0,
|
|
65776
|
+
(0, import_react82.createElement)(
|
|
65615
65777
|
"div",
|
|
65616
65778
|
{ style: { display: "flex", gap: "12px", alignItems: "center", flexWrap: "wrap" } },
|
|
65617
|
-
(0,
|
|
65779
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65618
65780
|
size: "sm",
|
|
65619
65781
|
items: [
|
|
65620
65782
|
{ value: "left", label: "\u5DE6" },
|
|
@@ -65624,12 +65786,12 @@ function TablePage() {
|
|
|
65624
65786
|
value: demoAlign,
|
|
65625
65787
|
onChange: setDemoAlign
|
|
65626
65788
|
}),
|
|
65627
|
-
(0,
|
|
65789
|
+
(0, import_react82.createElement)(Checkbox, { checked: demoShowTotal, onChange: setDemoShowTotal, label: "showTotal" })
|
|
65628
65790
|
),
|
|
65629
|
-
(0,
|
|
65791
|
+
(0, import_react82.createElement)(
|
|
65630
65792
|
"div",
|
|
65631
65793
|
{ style: { marginTop: "12px" } },
|
|
65632
|
-
(0,
|
|
65794
|
+
(0, import_react82.createElement)(Pagination, {
|
|
65633
65795
|
page: demoPage,
|
|
65634
65796
|
pageSize: demoSize,
|
|
65635
65797
|
total: 86,
|
|
@@ -65641,10 +65803,10 @@ function TablePage() {
|
|
|
65641
65803
|
ariaLabel: "Demo pagination"
|
|
65642
65804
|
})
|
|
65643
65805
|
),
|
|
65644
|
-
(0,
|
|
65806
|
+
(0, import_react82.createElement)(
|
|
65645
65807
|
"div",
|
|
65646
65808
|
{ style: { marginTop: "12px" } },
|
|
65647
|
-
(0,
|
|
65809
|
+
(0, import_react82.createElement)(Pagination, {
|
|
65648
65810
|
page: demoPage,
|
|
65649
65811
|
pageSize: demoSize,
|
|
65650
65812
|
total: 86,
|
|
@@ -65655,13 +65817,13 @@ function TablePage() {
|
|
|
65655
65817
|
})
|
|
65656
65818
|
)
|
|
65657
65819
|
),
|
|
65658
|
-
(0,
|
|
65820
|
+
(0, import_react82.createElement)(
|
|
65659
65821
|
Example,
|
|
65660
65822
|
{ title: "Table \xB7 \u5206\u9875", hint: t3("tablePagerHint") },
|
|
65661
|
-
(0,
|
|
65823
|
+
(0, import_react82.createElement)(
|
|
65662
65824
|
"div",
|
|
65663
65825
|
{ style: H_SCROLL },
|
|
65664
|
-
(0,
|
|
65826
|
+
(0, import_react82.createElement)(Table, {
|
|
65665
65827
|
columns: COLUMNS,
|
|
65666
65828
|
// 不传 pagination.total ⇒ 本地分页:这里是全量 12 行,Table 自己按当前页切片
|
|
65667
65829
|
rows: rowsOf(),
|
|
@@ -65678,10 +65840,10 @@ function TablePage() {
|
|
|
65678
65840
|
})
|
|
65679
65841
|
)
|
|
65680
65842
|
),
|
|
65681
|
-
(0,
|
|
65843
|
+
(0, import_react82.createElement)(
|
|
65682
65844
|
Example,
|
|
65683
65845
|
{ title: "Loading \xB7 \u52A0\u8F7D\u66F4\u591A", hint: t3("tableLoadingHint") },
|
|
65684
|
-
(0,
|
|
65846
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65685
65847
|
size: "sm",
|
|
65686
65848
|
items: [
|
|
65687
65849
|
{ value: "idle", label: "\u6B63\u5E38" },
|
|
@@ -65692,7 +65854,7 @@ function TablePage() {
|
|
|
65692
65854
|
value: loadState,
|
|
65693
65855
|
onChange: setLoadState
|
|
65694
65856
|
}),
|
|
65695
|
-
(0,
|
|
65857
|
+
(0, import_react82.createElement)(
|
|
65696
65858
|
"div",
|
|
65697
65859
|
{
|
|
65698
65860
|
style: {
|
|
@@ -65707,13 +65869,13 @@ function TablePage() {
|
|
|
65707
65869
|
renderLoadTable("y")
|
|
65708
65870
|
)
|
|
65709
65871
|
),
|
|
65710
|
-
(0,
|
|
65711
|
-
(0,
|
|
65872
|
+
(0, import_react82.createElement)(DocApi, { id: "table" }),
|
|
65873
|
+
(0, import_react82.createElement)(DocCode, { id: "table" })
|
|
65712
65874
|
);
|
|
65713
65875
|
}
|
|
65714
65876
|
|
|
65715
65877
|
// packages/demo/src/sections/toolbar.tsx
|
|
65716
|
-
var
|
|
65878
|
+
var import_react83 = require("react");
|
|
65717
65879
|
var import_dsh_client_ui_primitives5 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
65718
65880
|
var ANCHOR_ID = "dshpc-demo-quick-toolbar-anchor";
|
|
65719
65881
|
var CODE_TOOLBAR = `import { QuickToolbar } from 'dsh-plugin-core/ui'
|
|
@@ -65728,23 +65890,23 @@ h(QuickToolbar, {
|
|
|
65728
65890
|
backToTop: { threshold: 320 }, // \u9ED8\u8BA4\u5373\u662F 320\uFF1Bfalse \u53EF\u5173\u6389
|
|
65729
65891
|
})`;
|
|
65730
65892
|
function ToolbarPage() {
|
|
65731
|
-
const [mode, setMode] = (0,
|
|
65732
|
-
const [last2, setLast] = (0,
|
|
65733
|
-
return (0,
|
|
65893
|
+
const [mode, setMode] = (0, import_react83.useState)("box");
|
|
65894
|
+
const [last2, setLast] = (0, import_react83.useState)("\u2014");
|
|
65895
|
+
return (0, import_react83.createElement)(
|
|
65734
65896
|
"div",
|
|
65735
65897
|
null,
|
|
65736
|
-
(0,
|
|
65737
|
-
(0,
|
|
65898
|
+
(0, import_react83.createElement)(DocProse, { id: "quick-toolbar" }),
|
|
65899
|
+
(0, import_react83.createElement)(
|
|
65738
65900
|
Example,
|
|
65739
65901
|
{
|
|
65740
65902
|
title: "QuickToolbar\uFF08\u53F3\u4FA7\u6D6E\u52A8\uFF09",
|
|
65741
65903
|
hint: "\u7EB5\u5411\u6052\u8D34\u5C4F\u5E55\u5E95\u8FB9\uFF1B\u5207\u6362\u951A\u70B9\u53EF\u770B\u6A2A\u5411\u4F4D\u7F6E\u53D8\u5316\u3002\u5411\u4E0B\u6EDA\u52A8\uFF0C\u56DE\u9876\u90E8\u6309\u94AE\u4F1A\u51FA\u73B0\u3002",
|
|
65742
65904
|
code: CODE_TOOLBAR
|
|
65743
65905
|
},
|
|
65744
|
-
(0,
|
|
65906
|
+
(0, import_react83.createElement)(
|
|
65745
65907
|
"div",
|
|
65746
65908
|
{ style: { display: "flex", flexDirection: "column", gap: "14px" } },
|
|
65747
|
-
(0,
|
|
65909
|
+
(0, import_react83.createElement)(Segmented, {
|
|
65748
65910
|
items: [
|
|
65749
65911
|
{ value: "box", label: "\u8DDF\u968F\u63A7\u4EF6" },
|
|
65750
65912
|
{ value: "window", label: "\u8DDF\u968F\u7A97\u53E3" }
|
|
@@ -65753,10 +65915,10 @@ function ToolbarPage() {
|
|
|
65753
65915
|
onChange: setMode,
|
|
65754
65916
|
label: "\u6A2A\u5411\u951A\u70B9"
|
|
65755
65917
|
}),
|
|
65756
|
-
(0,
|
|
65918
|
+
(0, import_react83.createElement)(
|
|
65757
65919
|
"div",
|
|
65758
65920
|
{ id: ANCHOR_ID },
|
|
65759
|
-
(0,
|
|
65921
|
+
(0, import_react83.createElement)(
|
|
65760
65922
|
Surface,
|
|
65761
65923
|
{
|
|
65762
65924
|
tone: "sunken",
|
|
@@ -65764,15 +65926,15 @@ function ToolbarPage() {
|
|
|
65764
65926
|
padding: "lg",
|
|
65765
65927
|
style: { width: "min(560px, 100%)" }
|
|
65766
65928
|
},
|
|
65767
|
-
(0,
|
|
65768
|
-
(0,
|
|
65929
|
+
(0, import_react83.createElement)("div", { style: { fontWeight: 600, fontSize: "13px" } }, "\u951A\u5B9A\u63A7\u4EF6"),
|
|
65930
|
+
(0, import_react83.createElement)(
|
|
65769
65931
|
"div",
|
|
65770
65932
|
{ style: { marginTop: "6px", color: "var(--dshpc-fg-3)", fontSize: "12px", lineHeight: "1.8" } },
|
|
65771
65933
|
"\u5DE5\u5177\u680F\u4F1A\u8D34\u5728\u8FD9\u4E2A\u6846\u7684\u53F3\u7F18\u5916\u4FA7\uFF1B\u7A97\u53E3\u7A84\u5230\u653E\u4E0D\u4E0B\u65F6\u81EA\u52A8\u9000\u56DE\u5C4F\u5E55\u53F3\u7F18\u3002"
|
|
65772
65934
|
)
|
|
65773
65935
|
)
|
|
65774
65936
|
),
|
|
65775
|
-
(0,
|
|
65937
|
+
(0, import_react83.createElement)(
|
|
65776
65938
|
Surface,
|
|
65777
65939
|
{
|
|
65778
65940
|
border: "dashed",
|
|
@@ -65788,19 +65950,19 @@ function ToolbarPage() {
|
|
|
65788
65950
|
},
|
|
65789
65951
|
"\u5411\u4E0B\u6EDA\u52A8\uFF0C\u56DE\u9876\u90E8\u6309\u94AE\u4F1A\u51FA\u73B0"
|
|
65790
65952
|
),
|
|
65791
|
-
(0,
|
|
65953
|
+
(0, import_react83.createElement)("div", { style: { color: "var(--dshpc-fg-3)", fontSize: "12px" } }, `\u6700\u8FD1\u4E00\u6B21\u70B9\u51FB\uFF1A${last2}`)
|
|
65792
65954
|
)
|
|
65793
65955
|
),
|
|
65794
|
-
(0,
|
|
65795
|
-
(0,
|
|
65956
|
+
(0, import_react83.createElement)(DocApi, { id: "quick-toolbar" }),
|
|
65957
|
+
(0, import_react83.createElement)(QuickToolbar, {
|
|
65796
65958
|
anchorId: mode === "box" ? ANCHOR_ID : void 0,
|
|
65797
65959
|
onAction: (id3) => setLast(id3),
|
|
65798
65960
|
items: [
|
|
65799
|
-
{ id: "search", icon: (0,
|
|
65800
|
-
{ id: "copy", icon: (0,
|
|
65961
|
+
{ id: "search", icon: (0, import_react83.createElement)(import_dsh_client_ui_primitives5.IconSearchOutlineRegular, { size: 18 }), label: "\u641C\u7D22" },
|
|
65962
|
+
{ id: "copy", icon: (0, import_react83.createElement)(import_dsh_client_ui_primitives5.IconCopyOutlineRegular, { size: 18 }), label: "\u590D\u5236" },
|
|
65801
65963
|
{
|
|
65802
65964
|
id: "sparkle",
|
|
65803
|
-
icon: (0,
|
|
65965
|
+
icon: (0, import_react83.createElement)(import_dsh_client_ui_primitives5.IconSparkleRegular, { size: 18 }),
|
|
65804
65966
|
label: "AI \u52A9\u624B",
|
|
65805
65967
|
color: "var(--dshpc-business)",
|
|
65806
65968
|
fgColor: "#fff"
|
|
@@ -65811,7 +65973,7 @@ function ToolbarPage() {
|
|
|
65811
65973
|
}
|
|
65812
65974
|
|
|
65813
65975
|
// packages/demo/src/sections/utils.tsx
|
|
65814
|
-
var
|
|
65976
|
+
var import_react84 = require("react");
|
|
65815
65977
|
var CODE_DATE = `// \u65E5\u671F\u65F6\u95F4\u683C\u5F0F\u5316\uFF08\u5168\u90E8\u8D70\u5F53\u524D locale\uFF09
|
|
65816
65978
|
formatDateTime('2026-10-18T09:30:05.000Z', { seconds: true }) // 2026-10-18 09:30:05
|
|
65817
65979
|
formatYmd('2026-10-18T09:30:05.000Z') // 2026-10-18
|
|
@@ -65846,28 +66008,28 @@ var NUMBER_ROWS = [
|
|
|
65846
66008
|
["formatBytes", formatBytes(125829)]
|
|
65847
66009
|
];
|
|
65848
66010
|
function FnTable(props) {
|
|
65849
|
-
return (0,
|
|
66011
|
+
return (0, import_react84.createElement)(
|
|
65850
66012
|
"table",
|
|
65851
66013
|
{ style: { borderCollapse: "collapse", fontSize: "13px" } },
|
|
65852
|
-
(0,
|
|
66014
|
+
(0, import_react84.createElement)(
|
|
65853
66015
|
"thead",
|
|
65854
66016
|
null,
|
|
65855
|
-
(0,
|
|
66017
|
+
(0, import_react84.createElement)(
|
|
65856
66018
|
"tr",
|
|
65857
66019
|
null,
|
|
65858
|
-
(0,
|
|
65859
|
-
(0,
|
|
66020
|
+
(0, import_react84.createElement)("th", { style: th }, "\u51FD\u6570"),
|
|
66021
|
+
(0, import_react84.createElement)("th", { style: th }, "\u8FD4\u56DE\u503C")
|
|
65860
66022
|
)
|
|
65861
66023
|
),
|
|
65862
|
-
(0,
|
|
66024
|
+
(0, import_react84.createElement)(
|
|
65863
66025
|
"tbody",
|
|
65864
66026
|
null,
|
|
65865
66027
|
props.rows.map(
|
|
65866
|
-
([fn, out]) => (0,
|
|
66028
|
+
([fn, out]) => (0, import_react84.createElement)(
|
|
65867
66029
|
"tr",
|
|
65868
66030
|
{ key: fn },
|
|
65869
|
-
(0,
|
|
65870
|
-
(0,
|
|
66031
|
+
(0, import_react84.createElement)("td", { style: td }, fn),
|
|
66032
|
+
(0, import_react84.createElement)("td", { style: td }, out)
|
|
65871
66033
|
)
|
|
65872
66034
|
)
|
|
65873
66035
|
)
|
|
@@ -65876,44 +66038,44 @@ function FnTable(props) {
|
|
|
65876
66038
|
var th = { textAlign: "left", padding: "6px 14px 6px 0", color: "var(--dshpc-fg-3)" };
|
|
65877
66039
|
var td = { padding: "5px 14px 5px 0", borderTop: "1px solid var(--dshpc-border-faint)" };
|
|
65878
66040
|
function DatePage() {
|
|
65879
|
-
return (0,
|
|
66041
|
+
return (0, import_react84.createElement)(
|
|
65880
66042
|
"div",
|
|
65881
66043
|
null,
|
|
65882
|
-
(0,
|
|
65883
|
-
(0,
|
|
65884
|
-
(0,
|
|
65885
|
-
(0,
|
|
66044
|
+
(0, import_react84.createElement)(DocProse, { id: "date" }),
|
|
66045
|
+
(0, import_react84.createElement)(Example, { title: "date / time", code: CODE_DATE }, (0, import_react84.createElement)(FnTable, { rows: DATE_ROWS })),
|
|
66046
|
+
(0, import_react84.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_UTILS_USAGE }),
|
|
66047
|
+
(0, import_react84.createElement)(DocApi, { id: "date" })
|
|
65886
66048
|
);
|
|
65887
66049
|
}
|
|
65888
66050
|
function NumberPage() {
|
|
65889
|
-
return (0,
|
|
66051
|
+
return (0, import_react84.createElement)(
|
|
65890
66052
|
"div",
|
|
65891
66053
|
null,
|
|
65892
|
-
(0,
|
|
65893
|
-
(0,
|
|
65894
|
-
(0,
|
|
65895
|
-
(0,
|
|
66054
|
+
(0, import_react84.createElement)(DocProse, { id: "number" }),
|
|
66055
|
+
(0, import_react84.createElement)(Example, { title: "number / bytes", code: CODE_NUMBER }, (0, import_react84.createElement)(FnTable, { rows: NUMBER_ROWS })),
|
|
66056
|
+
(0, import_react84.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_UTILS_USAGE }),
|
|
66057
|
+
(0, import_react84.createElement)(DocApi, { id: "number" })
|
|
65896
66058
|
);
|
|
65897
66059
|
}
|
|
65898
66060
|
function TextPage() {
|
|
65899
|
-
return (0,
|
|
66061
|
+
return (0, import_react84.createElement)(DocContent, { id: "text" });
|
|
65900
66062
|
}
|
|
65901
66063
|
function HttpPage() {
|
|
65902
|
-
return (0,
|
|
66064
|
+
return (0, import_react84.createElement)(DocContent, { id: "http" });
|
|
65903
66065
|
}
|
|
65904
66066
|
function I18nPage() {
|
|
65905
|
-
return (0,
|
|
66067
|
+
return (0, import_react84.createElement)(
|
|
65906
66068
|
"div",
|
|
65907
66069
|
null,
|
|
65908
|
-
(0,
|
|
65909
|
-
(0,
|
|
66070
|
+
(0, import_react84.createElement)(DocProse, { id: "i18n" }),
|
|
66071
|
+
(0, import_react84.createElement)(
|
|
65910
66072
|
Example,
|
|
65911
66073
|
{ title: "getLocale / setLocale", code: CODE_I18N },
|
|
65912
|
-
(0,
|
|
66074
|
+
(0, import_react84.createElement)(
|
|
65913
66075
|
"div",
|
|
65914
66076
|
{ style: { display: "flex", alignItems: "center", gap: "10px" } },
|
|
65915
|
-
(0,
|
|
65916
|
-
(0,
|
|
66077
|
+
(0, import_react84.createElement)("span", { style: { fontFamily: "var(--dshpc-font-mono)", fontSize: "12px", color: "var(--dshpc-fg-3)" } }, t3("i18nNow")),
|
|
66078
|
+
(0, import_react84.createElement)("code", {
|
|
65917
66079
|
style: {
|
|
65918
66080
|
fontFamily: "var(--dshpc-font-mono)",
|
|
65919
66081
|
fontSize: "13px",
|
|
@@ -65925,60 +66087,60 @@ function I18nPage() {
|
|
|
65925
66087
|
}, getLocale())
|
|
65926
66088
|
)
|
|
65927
66089
|
),
|
|
65928
|
-
(0,
|
|
65929
|
-
(0,
|
|
66090
|
+
(0, import_react84.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_UTILS_USAGE }),
|
|
66091
|
+
(0, import_react84.createElement)(DocApi, { id: "i18n" })
|
|
65930
66092
|
);
|
|
65931
66093
|
}
|
|
65932
66094
|
|
|
65933
66095
|
// packages/demo/src/sections/reference.tsx
|
|
65934
|
-
var
|
|
66096
|
+
var import_react85 = require("react");
|
|
65935
66097
|
var OUT_OF_SCOPE = ["roadmapOut", "roadmapMirror", "roadmapPreview", "roadmapSkeleton"];
|
|
65936
66098
|
function ReferencePage() {
|
|
65937
|
-
return (0,
|
|
66099
|
+
return (0, import_react85.createElement)(
|
|
65938
66100
|
"div",
|
|
65939
66101
|
null,
|
|
65940
|
-
(0,
|
|
65941
|
-
(0,
|
|
65942
|
-
(0,
|
|
66102
|
+
(0, import_react85.createElement)(Note, { text: t3("referenceNote") }),
|
|
66103
|
+
(0, import_react85.createElement)(Example, { title: t3("secA11y") }, (0, import_react85.createElement)(Placeholder2, { descKey: "a11yDesc" })),
|
|
66104
|
+
(0, import_react85.createElement)(
|
|
65943
66105
|
Example,
|
|
65944
66106
|
{ title: t3("secRoadmap"), hint: t3("roadmapHint") },
|
|
65945
|
-
(0,
|
|
66107
|
+
(0, import_react85.createElement)(
|
|
65946
66108
|
"div",
|
|
65947
66109
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
65948
66110
|
OUT_OF_SCOPE.map(
|
|
65949
|
-
(key) => (0,
|
|
66111
|
+
(key) => (0, import_react85.createElement)(
|
|
65950
66112
|
"div",
|
|
65951
66113
|
{ key, style: { display: "flex", gap: "8px", alignItems: "flex-start", fontSize: "13px" } },
|
|
65952
|
-
(0,
|
|
65953
|
-
(0,
|
|
66114
|
+
(0, import_react85.createElement)("span", { style: { color: "var(--dshpc-fg-4)", flex: "none", lineHeight: "1.7" } }, "\xB7"),
|
|
66115
|
+
(0, import_react85.createElement)("span", { style: { color: "var(--dshpc-fg-2)", lineHeight: "1.7" } }, t3(key))
|
|
65954
66116
|
)
|
|
65955
66117
|
),
|
|
65956
|
-
(0,
|
|
66118
|
+
(0, import_react85.createElement)(
|
|
65957
66119
|
"div",
|
|
65958
66120
|
{ style: { marginTop: "2px", fontSize: "12px", color: "var(--dshpc-fg-3)" } },
|
|
65959
66121
|
t3("roadmapLayout")
|
|
65960
66122
|
)
|
|
65961
66123
|
)
|
|
65962
66124
|
),
|
|
65963
|
-
(0,
|
|
66125
|
+
(0, import_react85.createElement)(
|
|
65964
66126
|
Example,
|
|
65965
66127
|
{ title: t3("secBuild"), hint: t3("buildDesc") },
|
|
65966
|
-
(0,
|
|
66128
|
+
(0, import_react85.createElement)(
|
|
65967
66129
|
"table",
|
|
65968
66130
|
{ style: { borderCollapse: "collapse", fontSize: "13px" } },
|
|
65969
|
-
(0,
|
|
66131
|
+
(0, import_react85.createElement)(
|
|
65970
66132
|
"tbody",
|
|
65971
66133
|
null,
|
|
65972
66134
|
[
|
|
65973
|
-
[t3("buildCore"), `v${"0.
|
|
65974
|
-
[t3("buildDemo"), `v${"0.
|
|
65975
|
-
[t3("buildStamp"), "261103-
|
|
66135
|
+
[t3("buildCore"), `v${"0.22.0"}`],
|
|
66136
|
+
[t3("buildDemo"), `v${"0.22.0"}`],
|
|
66137
|
+
[t3("buildStamp"), "261103-114124-136"]
|
|
65976
66138
|
].map(
|
|
65977
|
-
([label, value]) => (0,
|
|
66139
|
+
([label, value]) => (0, import_react85.createElement)(
|
|
65978
66140
|
"tr",
|
|
65979
66141
|
{ key: label },
|
|
65980
|
-
(0,
|
|
65981
|
-
(0,
|
|
66142
|
+
(0, import_react85.createElement)("td", { style: { padding: "5px 18px 5px 0", color: "var(--dshpc-fg-3)", whiteSpace: "nowrap" } }, label),
|
|
66143
|
+
(0, import_react85.createElement)("td", {
|
|
65982
66144
|
style: {
|
|
65983
66145
|
padding: "5px 14px 5px 0",
|
|
65984
66146
|
fontFamily: "var(--dshpc-font-mono)",
|
|
@@ -66004,32 +66166,32 @@ var SECTION_GROUPS = [
|
|
|
66004
66166
|
];
|
|
66005
66167
|
var ALL_SECTIONS = [
|
|
66006
66168
|
// 入门:帮助索引(读哪一份)在前,然后是快速开始与设计基础
|
|
66007
|
-
{ id: "help-index", group: "start", titleKey: "secHelpIndex", render: () => (0,
|
|
66008
|
-
{ id: "quickstart", group: "start", titleKey: "secQuickstart", render: () => (0,
|
|
66009
|
-
{ id: "foundation", group: "start", titleKey: "secFoundation", render: () => (0,
|
|
66010
|
-
{ id: "button", group: "components", titleKey: "secButton", render: () => (0,
|
|
66011
|
-
{ id: "input", group: "components", titleKey: "secInput", render: () => (0,
|
|
66012
|
-
{ id: "picker", group: "components", titleKey: "secPicker", render: () => (0,
|
|
66013
|
-
{ id: "datetime", group: "components", titleKey: "secDateTime", render: () => (0,
|
|
66014
|
-
{ id: "tooltip", group: "components", titleKey: "secTooltip", render: () => (0,
|
|
66015
|
-
{ id: "card", group: "components", titleKey: "secCard", render: () => (0,
|
|
66016
|
-
{ id: "chip", group: "components", titleKey: "secChip", render: () => (0,
|
|
66017
|
-
{ id: "table", group: "components", titleKey: "secTable", render: () => (0,
|
|
66018
|
-
{ id: "feedback", group: "components", titleKey: "secFeedback", render: () => (0,
|
|
66019
|
-
{ id: "layout", group: "components", titleKey: "secLayout", render: () => (0,
|
|
66020
|
-
{ id: "toolbar", group: "components", titleKey: "secToolbar", render: () => (0,
|
|
66021
|
-
{ id: "explorer", group: "blocks", titleKey: "secExplorer", render: () => (0,
|
|
66022
|
-
{ id: "session", group: "blocks", titleKey: "secSession", render: () => (0,
|
|
66023
|
-
{ id: "date", group: "utils", titleKey: "secDate", render: () => (0,
|
|
66024
|
-
{ id: "text", group: "utils", titleKey: "secText", render: () => (0,
|
|
66025
|
-
{ id: "number", group: "utils", titleKey: "secNumber", render: () => (0,
|
|
66026
|
-
{ id: "http", group: "utils", titleKey: "secHttp", render: () => (0,
|
|
66027
|
-
{ id: "i18n", group: "utils", titleKey: "secI18n", render: () => (0,
|
|
66169
|
+
{ id: "help-index", group: "start", titleKey: "secHelpIndex", render: () => (0, import_react86.createElement)(HelpIndexPage, null) },
|
|
66170
|
+
{ id: "quickstart", group: "start", titleKey: "secQuickstart", render: () => (0, import_react86.createElement)(QuickstartPage, null) },
|
|
66171
|
+
{ id: "foundation", group: "start", titleKey: "secFoundation", render: () => (0, import_react86.createElement)(FoundationPage, null) },
|
|
66172
|
+
{ id: "button", group: "components", titleKey: "secButton", render: () => (0, import_react86.createElement)(ButtonPage, null) },
|
|
66173
|
+
{ id: "input", group: "components", titleKey: "secInput", render: () => (0, import_react86.createElement)(InputPage, null) },
|
|
66174
|
+
{ id: "picker", group: "components", titleKey: "secPicker", render: () => (0, import_react86.createElement)(PickerPage, null) },
|
|
66175
|
+
{ id: "datetime", group: "components", titleKey: "secDateTime", render: () => (0, import_react86.createElement)(DateTimePage, null) },
|
|
66176
|
+
{ id: "tooltip", group: "components", titleKey: "secTooltip", render: () => (0, import_react86.createElement)(TooltipPage, null) },
|
|
66177
|
+
{ id: "card", group: "components", titleKey: "secCard", render: () => (0, import_react86.createElement)(CardPage, null) },
|
|
66178
|
+
{ id: "chip", group: "components", titleKey: "secChip", render: () => (0, import_react86.createElement)(ChipPage, null) },
|
|
66179
|
+
{ id: "table", group: "components", titleKey: "secTable", render: () => (0, import_react86.createElement)(TablePage, null) },
|
|
66180
|
+
{ id: "feedback", group: "components", titleKey: "secFeedback", render: () => (0, import_react86.createElement)(FeedbackPage, null) },
|
|
66181
|
+
{ id: "layout", group: "components", titleKey: "secLayout", render: () => (0, import_react86.createElement)(LayoutPage, null) },
|
|
66182
|
+
{ id: "toolbar", group: "components", titleKey: "secToolbar", render: () => (0, import_react86.createElement)(ToolbarPage, null) },
|
|
66183
|
+
{ id: "explorer", group: "blocks", titleKey: "secExplorer", render: () => (0, import_react86.createElement)(ExplorerPage, null) },
|
|
66184
|
+
{ id: "session", group: "blocks", titleKey: "secSession", render: () => (0, import_react86.createElement)(SessionPage, null) },
|
|
66185
|
+
{ id: "date", group: "utils", titleKey: "secDate", render: () => (0, import_react86.createElement)(DatePage, null) },
|
|
66186
|
+
{ id: "text", group: "utils", titleKey: "secText", render: () => (0, import_react86.createElement)(TextPage, null) },
|
|
66187
|
+
{ id: "number", group: "utils", titleKey: "secNumber", render: () => (0, import_react86.createElement)(NumberPage, null) },
|
|
66188
|
+
{ id: "http", group: "utils", titleKey: "secHttp", render: () => (0, import_react86.createElement)(HttpPage, null) },
|
|
66189
|
+
{ id: "i18n", group: "utils", titleKey: "secI18n", render: () => (0, import_react86.createElement)(I18nPage, null) },
|
|
66028
66190
|
// 参考:无障碍 / 路线图 / 版本构建三条并成一页
|
|
66029
|
-
{ id: "reference", group: "reference", titleKey: "secReference", render: () => (0,
|
|
66191
|
+
{ id: "reference", group: "reference", titleKey: "secReference", render: () => (0, import_react86.createElement)(ReferencePage, null) }
|
|
66030
66192
|
];
|
|
66031
66193
|
function Placeholder2(props) {
|
|
66032
|
-
return (0,
|
|
66194
|
+
return (0, import_react86.createElement)(
|
|
66033
66195
|
Surface,
|
|
66034
66196
|
{
|
|
66035
66197
|
tone: "sunken",
|
|
@@ -66037,7 +66199,7 @@ function Placeholder2(props) {
|
|
|
66037
66199
|
padding: "lg",
|
|
66038
66200
|
style: { marginTop: "4px", color: "var(--dshpc-fg-3)" }
|
|
66039
66201
|
},
|
|
66040
|
-
(0,
|
|
66202
|
+
(0, import_react86.createElement)("div", {
|
|
66041
66203
|
style: {
|
|
66042
66204
|
fontSize: "11px",
|
|
66043
66205
|
fontWeight: 600,
|
|
@@ -66047,23 +66209,23 @@ function Placeholder2(props) {
|
|
|
66047
66209
|
marginBottom: "10px"
|
|
66048
66210
|
}
|
|
66049
66211
|
}, t3("phTodo")),
|
|
66050
|
-
(0,
|
|
66212
|
+
(0, import_react86.createElement)("div", { style: { fontSize: "13px", lineHeight: "1.9", whiteSpace: "pre-line" } }, t3(props.descKey))
|
|
66051
66213
|
);
|
|
66052
66214
|
}
|
|
66053
66215
|
function SectionHead2(props) {
|
|
66054
|
-
return (0,
|
|
66216
|
+
return (0, import_react86.createElement)(
|
|
66055
66217
|
"div",
|
|
66056
66218
|
{ id: `sec-${props.id}`, style: { margin: "28px 0 14px" } },
|
|
66057
|
-
(0,
|
|
66058
|
-
(0,
|
|
66219
|
+
(0, import_react86.createElement)("h2", { style: { margin: 0, fontSize: "20px" } }, props.title),
|
|
66220
|
+
(0, import_react86.createElement)("div", { style: { height: "3px", width: "36px", background: "var(--dshpc-business)", borderRadius: "var(--dshpc-radius-xs)", marginTop: "6px" } })
|
|
66059
66221
|
);
|
|
66060
66222
|
}
|
|
66061
66223
|
function Sections(props) {
|
|
66062
66224
|
const current4 = ALL_SECTIONS.find((s) => s.id === props.active) ?? ALL_SECTIONS[0];
|
|
66063
|
-
return (0,
|
|
66225
|
+
return (0, import_react86.createElement)(
|
|
66064
66226
|
"div",
|
|
66065
66227
|
null,
|
|
66066
|
-
(0,
|
|
66228
|
+
(0, import_react86.createElement)(SectionHead2, { id: current4.id, title: t3(current4.titleKey) }),
|
|
66067
66229
|
current4.render()
|
|
66068
66230
|
);
|
|
66069
66231
|
}
|
|
@@ -66123,10 +66285,10 @@ function applySidebarEntry() {
|
|
|
66123
66285
|
}
|
|
66124
66286
|
}
|
|
66125
66287
|
function MoreMenuRow(props) {
|
|
66126
|
-
return (0,
|
|
66288
|
+
return (0, import_react87.createElement)(
|
|
66127
66289
|
import_dsh_client_ui_primitives6.MenuItemButton,
|
|
66128
66290
|
{
|
|
66129
|
-
icon: (0,
|
|
66291
|
+
icon: (0, import_react87.createElement)(PanelIcon, { size: 16 }),
|
|
66130
66292
|
onSelect: () => {
|
|
66131
66293
|
props.onDismiss();
|
|
66132
66294
|
jump(PANEL_ID);
|
|
@@ -66137,8 +66299,8 @@ function MoreMenuRow(props) {
|
|
|
66137
66299
|
}
|
|
66138
66300
|
var localeRuntime;
|
|
66139
66301
|
function useLocaleTick() {
|
|
66140
|
-
const [, setTick] = (0,
|
|
66141
|
-
(0,
|
|
66302
|
+
const [, setTick] = (0, import_react87.useState)(0);
|
|
66303
|
+
(0, import_react87.useEffect)(() => {
|
|
66142
66304
|
const rt = localeRuntime;
|
|
66143
66305
|
if (rt === void 0) return;
|
|
66144
66306
|
return rt.subscribe(() => {
|
|
@@ -66148,8 +66310,8 @@ function useLocaleTick() {
|
|
|
66148
66310
|
}
|
|
66149
66311
|
function useHostDark() {
|
|
66150
66312
|
const read = () => document.body.hasAttribute("data-ds-dark-theme");
|
|
66151
|
-
const [dark, setDark] = (0,
|
|
66152
|
-
(0,
|
|
66313
|
+
const [dark, setDark] = (0, import_react87.useState)(read);
|
|
66314
|
+
(0, import_react87.useEffect)(() => {
|
|
66153
66315
|
const obs = new MutationObserver(() => {
|
|
66154
66316
|
setDark(read());
|
|
66155
66317
|
});
|
|
@@ -66169,11 +66331,11 @@ function useHostDark() {
|
|
|
66169
66331
|
function DemoPage() {
|
|
66170
66332
|
useLocaleTick();
|
|
66171
66333
|
const { dark, toggle } = useHostDark();
|
|
66172
|
-
const [active, setActive2] = (0,
|
|
66334
|
+
const [active, setActive2] = (0, import_react87.useState)(ALL_SECTIONS[0].id);
|
|
66173
66335
|
const nav2 = [];
|
|
66174
66336
|
SECTION_GROUPS.forEach((group, gi) => {
|
|
66175
66337
|
nav2.push(
|
|
66176
|
-
(0,
|
|
66338
|
+
(0, import_react87.createElement)(
|
|
66177
66339
|
"div",
|
|
66178
66340
|
{
|
|
66179
66341
|
key: `group-${group.id}`,
|
|
@@ -66191,7 +66353,7 @@ function DemoPage() {
|
|
|
66191
66353
|
);
|
|
66192
66354
|
for (const section of ALL_SECTIONS.filter((s) => s.group === group.id)) {
|
|
66193
66355
|
nav2.push(
|
|
66194
|
-
(0,
|
|
66356
|
+
(0, import_react87.createElement)(
|
|
66195
66357
|
"button",
|
|
66196
66358
|
{
|
|
66197
66359
|
key: section.id,
|
|
@@ -66218,7 +66380,7 @@ function DemoPage() {
|
|
|
66218
66380
|
);
|
|
66219
66381
|
}
|
|
66220
66382
|
});
|
|
66221
|
-
return (0,
|
|
66383
|
+
return (0, import_react87.createElement)(
|
|
66222
66384
|
"div",
|
|
66223
66385
|
{
|
|
66224
66386
|
// 分栏挂载点:explorer 的 openFilePreview 要把 dock 塞进这一行,主区才被挤窄。
|
|
@@ -66235,7 +66397,7 @@ function DemoPage() {
|
|
|
66235
66397
|
["--dshpc-dock-h"]: "100%"
|
|
66236
66398
|
}
|
|
66237
66399
|
},
|
|
66238
|
-
(0,
|
|
66400
|
+
(0, import_react87.createElement)(
|
|
66239
66401
|
"aside",
|
|
66240
66402
|
{
|
|
66241
66403
|
style: {
|
|
@@ -66251,9 +66413,9 @@ function DemoPage() {
|
|
|
66251
66413
|
},
|
|
66252
66414
|
// 导航区:唯一滚动容器;底部操作/版本区固定不动
|
|
66253
66415
|
// 透明右边框 = 滚动条与右缘隔 1px(口径见 docs/design/style.md §滚动条让位)
|
|
66254
|
-
(0,
|
|
66416
|
+
(0, import_react87.createElement)("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", padding: "14px 10px", borderRight: "1px solid transparent" } }, nav2),
|
|
66255
66417
|
// 固定底栏:明暗切换 + 版本号 + 编译码(时间戳,一眼看出编译时刻)
|
|
66256
|
-
(0,
|
|
66418
|
+
(0, import_react87.createElement)(
|
|
66257
66419
|
"div",
|
|
66258
66420
|
{
|
|
66259
66421
|
style: {
|
|
@@ -66266,7 +66428,7 @@ function DemoPage() {
|
|
|
66266
66428
|
}
|
|
66267
66429
|
},
|
|
66268
66430
|
// 明暗切换:核心 Segmented 滑动分段(左亮右暗,图标进 label),不手写按钮
|
|
66269
|
-
(0,
|
|
66431
|
+
(0, import_react87.createElement)(Segmented, {
|
|
66270
66432
|
items: [
|
|
66271
66433
|
{ value: "light", label: `\u2600 ${t3("themeLight")}` },
|
|
66272
66434
|
{ value: "dark", label: `\u263E ${t3("themeDark")}` }
|
|
@@ -66280,7 +66442,7 @@ function DemoPage() {
|
|
|
66280
66442
|
label: t3("themeToggle")
|
|
66281
66443
|
}),
|
|
66282
66444
|
// 版本号 + 编译码:180px 侧栏放不下一行 ⇒ core / demo 各一行;编译码小一号、与上面隔开
|
|
66283
|
-
(0,
|
|
66445
|
+
(0, import_react87.createElement)(
|
|
66284
66446
|
"div",
|
|
66285
66447
|
{
|
|
66286
66448
|
style: {
|
|
@@ -66294,46 +66456,46 @@ function DemoPage() {
|
|
|
66294
66456
|
lineHeight: "14px"
|
|
66295
66457
|
}
|
|
66296
66458
|
},
|
|
66297
|
-
(0,
|
|
66298
|
-
(0,
|
|
66299
|
-
(0,
|
|
66459
|
+
(0, import_react87.createElement)("span", null, `core v${"0.22.0"}`),
|
|
66460
|
+
(0, import_react87.createElement)("span", null, `demo v${"0.22.0"}`),
|
|
66461
|
+
(0, import_react87.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261103-114124-136")
|
|
66300
66462
|
)
|
|
66301
66463
|
)
|
|
66302
66464
|
),
|
|
66303
|
-
(0,
|
|
66465
|
+
(0, import_react87.createElement)(
|
|
66304
66466
|
"main",
|
|
66305
66467
|
// 透明右边框 = 滚动条与右缘隔 1px(口径见 docs/design/style.md §滚动条让位):
|
|
66306
66468
|
// dock 不再让 margin,靠这里让,滚动条与分栏分隔线之间才是 1px。
|
|
66307
66469
|
{ style: { flex: 1, minWidth: 0, minHeight: 0, height: "100%", boxSizing: "border-box", overflowY: "auto", padding: "12px 22px 60px", borderRight: "1px solid transparent" } },
|
|
66308
|
-
(0,
|
|
66470
|
+
(0, import_react87.createElement)(Sections, { active })
|
|
66309
66471
|
),
|
|
66310
66472
|
// 分栏挂在**整页**右侧(真实用法),不是塞进某一节里:任何一页点开都挤窄 main。
|
|
66311
66473
|
// 内容与头部在 demoPanels() 里声明(DockPanel),这里只管显隐。
|
|
66312
|
-
(0,
|
|
66474
|
+
(0, import_react87.createElement)(PanelDock, { dock: demoDock }, ...demoPanels())
|
|
66313
66475
|
);
|
|
66314
66476
|
}
|
|
66315
66477
|
function ConfigPanel(props) {
|
|
66316
66478
|
const form = props.form;
|
|
66317
|
-
const [, rerender] = (0,
|
|
66318
|
-
(0,
|
|
66479
|
+
const [, rerender] = (0, import_react87.useState)(0);
|
|
66480
|
+
(0, import_react87.useEffect)(() => form.subscribe(() => {
|
|
66319
66481
|
rerender((n) => n + 1);
|
|
66320
66482
|
}), [form]);
|
|
66321
|
-
if (props.view !== "page") return (0,
|
|
66483
|
+
if (props.view !== "page") return (0, import_react87.createElement)("div", { style: { display: "none" } });
|
|
66322
66484
|
const snap = form.getSnapshot();
|
|
66323
66485
|
const storedMode = snap.value?.entryMode;
|
|
66324
66486
|
const mode = storedMode === "off" || storedMode === "first" || storedMode === "more" ? storedMode : "more";
|
|
66325
66487
|
const ready = snap.status === "ready";
|
|
66326
|
-
return (0,
|
|
66488
|
+
return (0, import_react87.createElement)(
|
|
66327
66489
|
"div",
|
|
66328
66490
|
{ style: { display: "flex", flexDirection: "column", gap: "14px" } },
|
|
66329
66491
|
// 一句话说明「这个插件是干嘛的」——标题由详情页自己画,这里只补定位
|
|
66330
|
-
(0,
|
|
66492
|
+
(0, import_react87.createElement)("div", { style: { color: "var(--dshpc-fg-3)", fontSize: "12px", lineHeight: "18px" } }, t3("settingsIntro")),
|
|
66331
66493
|
// 设置行:滑动栏在右、说明在左;左缘圆角短条有入口=绿 / 关闭=灰(核心 Card 框式)
|
|
66332
|
-
ready ? (0,
|
|
66494
|
+
ready ? (0, import_react87.createElement)(
|
|
66333
66495
|
Card,
|
|
66334
66496
|
{
|
|
66335
66497
|
accent: mode === "off" ? "neutral" : "success",
|
|
66336
|
-
action: (0,
|
|
66498
|
+
action: (0, import_react87.createElement)(Segmented, {
|
|
66337
66499
|
size: "sm",
|
|
66338
66500
|
value: mode,
|
|
66339
66501
|
disabled: !snap.writable,
|
|
@@ -66350,35 +66512,35 @@ function ConfigPanel(props) {
|
|
|
66350
66512
|
]
|
|
66351
66513
|
})
|
|
66352
66514
|
},
|
|
66353
|
-
(0,
|
|
66515
|
+
(0, import_react87.createElement)(
|
|
66354
66516
|
"div",
|
|
66355
66517
|
null,
|
|
66356
|
-
(0,
|
|
66357
|
-
(0,
|
|
66518
|
+
(0, import_react87.createElement)("div", { style: { fontSize: "13px", fontWeight: 500 } }, t3("settingsEntryTitle")),
|
|
66519
|
+
(0, import_react87.createElement)(
|
|
66358
66520
|
"div",
|
|
66359
66521
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "12px", marginTop: "2px" } },
|
|
66360
66522
|
t3("settingsEntryHint")
|
|
66361
66523
|
)
|
|
66362
66524
|
)
|
|
66363
|
-
) : (0,
|
|
66525
|
+
) : (0, import_react87.createElement)(
|
|
66364
66526
|
"div",
|
|
66365
66527
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "12px" } },
|
|
66366
66528
|
t3(snap.status === "loading" ? "settingsLoading" : "settingsUnavailable")
|
|
66367
66529
|
),
|
|
66368
|
-
(0,
|
|
66530
|
+
(0, import_react87.createElement)(
|
|
66369
66531
|
"div",
|
|
66370
66532
|
{ style: { display: "flex", gap: "8px" } },
|
|
66371
|
-
(0,
|
|
66533
|
+
(0, import_react87.createElement)(
|
|
66372
66534
|
Button,
|
|
66373
|
-
{ size: "md", variant: "primary", icon: (0,
|
|
66535
|
+
{ size: "md", variant: "primary", icon: (0, import_react87.createElement)(import_dsh_client_ui_primitives6.IconPlayOutlineRegular, { size: 16 }), onClick: props.openDemo },
|
|
66374
66536
|
t3("settingsOpenDemo")
|
|
66375
66537
|
),
|
|
66376
|
-
(0,
|
|
66538
|
+
(0, import_react87.createElement)(
|
|
66377
66539
|
Button,
|
|
66378
66540
|
{
|
|
66379
66541
|
size: "md",
|
|
66380
66542
|
variant: "outline",
|
|
66381
|
-
icon: (0,
|
|
66543
|
+
icon: (0, import_react87.createElement)(import_dsh_client_ui_primitives6.IconLinkOutlineRegular, { size: 16 }),
|
|
66382
66544
|
onClick: () => {
|
|
66383
66545
|
window.open("https://github.com/cq-guojia/dsh-plugin-core", "_blank", "noopener");
|
|
66384
66546
|
}
|
|
@@ -66390,14 +66552,14 @@ function ConfigPanel(props) {
|
|
|
66390
66552
|
}
|
|
66391
66553
|
function PanelIcon(props) {
|
|
66392
66554
|
const size4 = props.size ?? 18;
|
|
66393
|
-
return (0,
|
|
66555
|
+
return (0, import_react87.createElement)(
|
|
66394
66556
|
"svg",
|
|
66395
66557
|
{ width: size4, height: size4, viewBox: "0 0 1024 1024", "aria-hidden": true },
|
|
66396
|
-
(0,
|
|
66397
|
-
(0,
|
|
66398
|
-
(0,
|
|
66399
|
-
(0,
|
|
66400
|
-
(0,
|
|
66558
|
+
(0, import_react87.createElement)("path", { d: "M960 896H64c-38.4 0-64-25.6-64-64V192c0-38.4 25.6-64 64-64h896c38.4 0 64 25.6 64 64v640c0 38.4-25.6 64-64 64zM96 800h832v-576h-832v576z", fill: "currentColor" }),
|
|
66559
|
+
(0, import_react87.createElement)("path", { d: "M64 64h256c38.4 0 64 25.6 64 64v768c0 38.4-25.6 64-64 64H64c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z", fill: "currentColor", opacity: 0.38 }),
|
|
66560
|
+
(0, import_react87.createElement)("path", { d: "M640 268.8h192v96h-192z", fill: "currentColor" }),
|
|
66561
|
+
(0, import_react87.createElement)("path", { d: "M832 563.2h-192V460.8h192v102.4z", fill: "currentColor", opacity: 0.38 }),
|
|
66562
|
+
(0, import_react87.createElement)("path", { d: "M640 652.8h192v96h-192zM512 883.2c-25.6 0-51.2-19.2-51.2-51.2V192c0-25.6 19.2-51.2 51.2-51.2s51.2 25.6 51.2 51.2v640c0 25.6-25.6 51.2-51.2 51.2zM128 268.8h128v96H128zM128 460.8h128v96H128zM128 652.8h128v96H128z", fill: "currentColor" })
|
|
66401
66563
|
);
|
|
66402
66564
|
}
|
|
66403
66565
|
function apply(ctx) {
|
|
@@ -66406,7 +66568,7 @@ function apply(ctx) {
|
|
|
66406
66568
|
ensureControls(kit);
|
|
66407
66569
|
kit.registerStyle("demo", DEMO_CSS);
|
|
66408
66570
|
kit.ensureStyles();
|
|
66409
|
-
setTooltipRenderer((props) => (0,
|
|
66571
|
+
setTooltipRenderer((props) => (0, import_react87.createElement)(import_dsh_client_ui_primitives6.Tooltip, props));
|
|
66410
66572
|
ctx.inject(["layout"], (sub) => {
|
|
66411
66573
|
const layout = sub?.layout;
|
|
66412
66574
|
if (layout?.selectPanel === void 0) return;
|