dsh-plugin-core-demo 0.20.9 → 0.21.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 +962 -927
- 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
|
|
@@ -4022,10 +4022,10 @@ function formatDurationHms(ms) {
|
|
|
4022
4022
|
if (!Number.isFinite(ms) || ms < 0)
|
|
4023
4023
|
return "-";
|
|
4024
4024
|
const totalSec = Math.round(ms / 1e3);
|
|
4025
|
-
const
|
|
4025
|
+
const h78 = Math.floor(totalSec / 3600);
|
|
4026
4026
|
const m = Math.floor(totalSec % 3600 / 60);
|
|
4027
4027
|
const s = totalSec % 60;
|
|
4028
|
-
return
|
|
4028
|
+
return h78 > 0 ? `${h78}:${pad2(m)}:${pad2(s)}` : `${pad2(m)}:${pad2(s)}`;
|
|
4029
4029
|
}
|
|
4030
4030
|
function sameCalendarDay(a, b) {
|
|
4031
4031
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
@@ -5112,9 +5112,10 @@ function AlertModal(props) {
|
|
|
5112
5112
|
size: props.size ?? "sm",
|
|
5113
5113
|
hideHeader: props.title === void 0,
|
|
5114
5114
|
closable: false,
|
|
5115
|
-
closeOnMask: props.closeOnMask,
|
|
5116
|
-
onClose
|
|
5117
|
-
|
|
5115
|
+
closeOnMask: props.confirmLoading === true ? false : props.closeOnMask,
|
|
5116
|
+
// 加载中锁死关闭路径(遮罩 / Esc 都走 onClose)。
|
|
5117
|
+
onClose: props.confirmLoading === true ? void 0 : props.onConfirm,
|
|
5118
|
+
footer: (0, import_react19.createElement)(Button, { variant: "primary", loading: props.confirmLoading === true, onClick: () => props.onConfirm?.() }, props.confirmText ?? tt("dialogOk"))
|
|
5118
5119
|
}, props.message ?? null);
|
|
5119
5120
|
}
|
|
5120
5121
|
|
|
@@ -5124,14 +5125,15 @@ function ConfirmModal(props) {
|
|
|
5124
5125
|
const tt = props.translate ?? t;
|
|
5125
5126
|
const tone = props.tone ?? "primary";
|
|
5126
5127
|
const confirmVariant = tone === "danger" ? "danger" : tone === "warning" ? "warning" : "primary";
|
|
5128
|
+
const busy = props.confirmLoading === true || props.cancelLoading === true;
|
|
5127
5129
|
return (0, import_react20.createElement)(Modal, {
|
|
5128
5130
|
title: props.title,
|
|
5129
5131
|
size: props.size ?? "sm",
|
|
5130
5132
|
hideHeader: props.title === void 0,
|
|
5131
5133
|
closable: false,
|
|
5132
|
-
closeOnMask: props.closeOnMask,
|
|
5133
|
-
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")))
|
|
5134
|
+
closeOnMask: busy ? false : props.closeOnMask,
|
|
5135
|
+
onClose: busy ? void 0 : props.onCancel,
|
|
5136
|
+
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, onClick: () => props.onCancel?.() }, props.cancelText ?? tt("cancel")), (0, import_react20.createElement)(Button, { variant: confirmVariant, loading: props.confirmLoading === true, onClick: () => props.onConfirm?.() }, props.confirmText ?? tt("confirm")))
|
|
5135
5137
|
}, props.message ?? null);
|
|
5136
5138
|
}
|
|
5137
5139
|
|
|
@@ -5175,6 +5177,11 @@ var hostHandlers = null;
|
|
|
5175
5177
|
function registerHostDialog(handlers2) {
|
|
5176
5178
|
hostHandlers = handlers2;
|
|
5177
5179
|
}
|
|
5180
|
+
function isThenable(value) {
|
|
5181
|
+
if (value === null || value === void 0)
|
|
5182
|
+
return false;
|
|
5183
|
+
return typeof value.then === "function";
|
|
5184
|
+
}
|
|
5178
5185
|
function confirmModal(opts) {
|
|
5179
5186
|
if (opts.skin === "host") {
|
|
5180
5187
|
if (hostHandlers !== null) {
|
|
@@ -5188,19 +5195,51 @@ function confirmModal(opts) {
|
|
|
5188
5195
|
}
|
|
5189
5196
|
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
5197
|
}
|
|
5191
|
-
const { skin: _skin, ...core } = opts;
|
|
5198
|
+
const { skin: _skin, onConfirm, onCancel, ...core } = opts;
|
|
5192
5199
|
void _skin;
|
|
5193
5200
|
return new Promise((resolve) => {
|
|
5194
5201
|
const id3 = ++idSeq;
|
|
5202
|
+
const entry = { id: id3, node: null };
|
|
5203
|
+
let busy = null;
|
|
5204
|
+
let closed = false;
|
|
5205
|
+
const draw = () => {
|
|
5206
|
+
entry.node = (0, import_react21.createElement)(ConfirmModal, {
|
|
5207
|
+
...core,
|
|
5208
|
+
confirmLoading: busy === "confirm",
|
|
5209
|
+
cancelLoading: busy === "cancel",
|
|
5210
|
+
onConfirm: () => void run("confirm"),
|
|
5211
|
+
onCancel: () => void run("cancel")
|
|
5212
|
+
});
|
|
5213
|
+
flush();
|
|
5214
|
+
};
|
|
5195
5215
|
const close = (result) => {
|
|
5216
|
+
closed = true;
|
|
5196
5217
|
dismiss(id3);
|
|
5197
5218
|
resolve(result);
|
|
5198
5219
|
};
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5220
|
+
const run = async (which) => {
|
|
5221
|
+
if (closed || busy !== null)
|
|
5222
|
+
return;
|
|
5223
|
+
const out = (which === "confirm" ? onConfirm : onCancel)?.();
|
|
5224
|
+
if (!isThenable(out)) {
|
|
5225
|
+
close(which === "confirm");
|
|
5226
|
+
return;
|
|
5227
|
+
}
|
|
5228
|
+
busy = which;
|
|
5229
|
+
draw();
|
|
5230
|
+
try {
|
|
5231
|
+
await out;
|
|
5232
|
+
} catch (err) {
|
|
5233
|
+
busy = null;
|
|
5234
|
+
draw();
|
|
5235
|
+
console.error("[dsh-plugin-core] confirmModal \u56DE\u8C03\u5931\u8D25\uFF0C\u5F39\u7A97\u5DF2\u6062\u590D\u53EF\u64CD\u4F5C\uFF1A", err);
|
|
5236
|
+
return;
|
|
5237
|
+
}
|
|
5238
|
+
busy = null;
|
|
5239
|
+
close(which === "confirm");
|
|
5240
|
+
};
|
|
5241
|
+
entries.push(entry);
|
|
5242
|
+
draw();
|
|
5204
5243
|
});
|
|
5205
5244
|
}
|
|
5206
5245
|
function alertModal(opts) {
|
|
@@ -5214,16 +5253,43 @@ function alertModal(opts) {
|
|
|
5214
5253
|
}
|
|
5215
5254
|
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
5255
|
}
|
|
5217
|
-
const { skin: _skin, ...core } = opts;
|
|
5256
|
+
const { skin: _skin, onConfirm, ...core } = opts;
|
|
5218
5257
|
void _skin;
|
|
5219
5258
|
return new Promise((resolve) => {
|
|
5220
5259
|
const id3 = ++idSeq;
|
|
5260
|
+
const entry = { id: id3, node: null };
|
|
5261
|
+
let busy = false;
|
|
5262
|
+
const draw = () => {
|
|
5263
|
+
entry.node = (0, import_react21.createElement)(AlertModal, { ...core, confirmLoading: busy, onConfirm: () => void run() });
|
|
5264
|
+
flush();
|
|
5265
|
+
};
|
|
5221
5266
|
const close = () => {
|
|
5222
5267
|
dismiss(id3);
|
|
5223
5268
|
resolve();
|
|
5224
5269
|
};
|
|
5225
|
-
|
|
5226
|
-
|
|
5270
|
+
const run = async () => {
|
|
5271
|
+
if (busy)
|
|
5272
|
+
return;
|
|
5273
|
+
const out = onConfirm?.();
|
|
5274
|
+
if (!isThenable(out)) {
|
|
5275
|
+
close();
|
|
5276
|
+
return;
|
|
5277
|
+
}
|
|
5278
|
+
busy = true;
|
|
5279
|
+
draw();
|
|
5280
|
+
try {
|
|
5281
|
+
await out;
|
|
5282
|
+
} catch (err) {
|
|
5283
|
+
busy = false;
|
|
5284
|
+
draw();
|
|
5285
|
+
console.error("[dsh-plugin-core] alertModal \u56DE\u8C03\u5931\u8D25\uFF0C\u5F39\u7A97\u5DF2\u6062\u590D\u53EF\u64CD\u4F5C\uFF1A", err);
|
|
5286
|
+
return;
|
|
5287
|
+
}
|
|
5288
|
+
busy = false;
|
|
5289
|
+
close();
|
|
5290
|
+
};
|
|
5291
|
+
entries.push(entry);
|
|
5292
|
+
draw();
|
|
5227
5293
|
});
|
|
5228
5294
|
}
|
|
5229
5295
|
|
|
@@ -6371,15 +6437,15 @@ var Toast = (props) => {
|
|
|
6371
6437
|
if (toastNode) {
|
|
6372
6438
|
const height = toastNode.getBoundingClientRect().height;
|
|
6373
6439
|
setInitialHeight(height);
|
|
6374
|
-
setHeights((
|
|
6440
|
+
setHeights((h78) => [
|
|
6375
6441
|
{
|
|
6376
6442
|
toastId: toast2.id,
|
|
6377
6443
|
height,
|
|
6378
6444
|
position: toast2.position
|
|
6379
6445
|
},
|
|
6380
|
-
...
|
|
6446
|
+
...h78
|
|
6381
6447
|
]);
|
|
6382
|
-
return () => setHeights((
|
|
6448
|
+
return () => setHeights((h78) => h78.filter((height2) => height2.toastId !== toast2.id));
|
|
6383
6449
|
}
|
|
6384
6450
|
}, [
|
|
6385
6451
|
setHeights,
|
|
@@ -6424,7 +6490,7 @@ var Toast = (props) => {
|
|
|
6424
6490
|
const deleteToast = import_react29.default.useCallback(() => {
|
|
6425
6491
|
setRemoved(true);
|
|
6426
6492
|
setOffsetBeforeRemove(offset4.current);
|
|
6427
|
-
setHeights((
|
|
6493
|
+
setHeights((h78) => h78.filter((height) => height.toastId !== toast2.id));
|
|
6428
6494
|
setTimeout(() => {
|
|
6429
6495
|
removeToast(toast2);
|
|
6430
6496
|
}, TIME_BEFORE_UNMOUNT);
|
|
@@ -6951,7 +7017,7 @@ var Toaster = /* @__PURE__ */ import_react29.default.forwardRef(function Toaster
|
|
|
6951
7017
|
closeButtonAriaLabel: toastOptions == null ? void 0 : toastOptions.closeButtonAriaLabel,
|
|
6952
7018
|
removeToast,
|
|
6953
7019
|
toasts: filteredToasts.filter((t4) => t4.position == toast2.position),
|
|
6954
|
-
heights: heights.filter((
|
|
7020
|
+
heights: heights.filter((h78) => h78.position == toast2.position),
|
|
6955
7021
|
setHeights,
|
|
6956
7022
|
expandByDefault: expand,
|
|
6957
7023
|
gap,
|
|
@@ -7116,23 +7182,6 @@ function createToasterHost() {
|
|
|
7116
7182
|
}
|
|
7117
7183
|
};
|
|
7118
7184
|
}
|
|
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
7185
|
function notifyPalette(variant, theme2) {
|
|
7137
7186
|
switch (variant) {
|
|
7138
7187
|
case "success":
|
|
@@ -16629,7 +16678,7 @@ function applyDOMChangeInner(view, change, newSel, lastKey = -1) {
|
|
|
16629
16678
|
view.inputState.composing++;
|
|
16630
16679
|
let defaultTr;
|
|
16631
16680
|
let defaultInsert = () => defaultTr || (defaultTr = applyDefaultInsert(view, change, newSel));
|
|
16632
|
-
if (!view.state.facet(inputHandler).some((
|
|
16681
|
+
if (!view.state.facet(inputHandler).some((h78) => h78(view, change.from, change.to, text2, defaultInsert)))
|
|
16633
16682
|
view.dispatch(defaultInsert());
|
|
16634
16683
|
return true;
|
|
16635
16684
|
}
|
|
@@ -17567,12 +17616,12 @@ var HeightOracle = class {
|
|
|
17567
17616
|
mustRefreshForHeights(lineHeights) {
|
|
17568
17617
|
let newHeight = false;
|
|
17569
17618
|
for (let i2 = 0; i2 < lineHeights.length; i2++) {
|
|
17570
|
-
let
|
|
17571
|
-
if (
|
|
17619
|
+
let h78 = lineHeights[i2];
|
|
17620
|
+
if (h78 < 0) {
|
|
17572
17621
|
i2++;
|
|
17573
|
-
} else if (!this.heightSamples[Math.floor(
|
|
17622
|
+
} else if (!this.heightSamples[Math.floor(h78 * 10)]) {
|
|
17574
17623
|
newHeight = true;
|
|
17575
|
-
this.heightSamples[Math.floor(
|
|
17624
|
+
this.heightSamples[Math.floor(h78 * 10)] = true;
|
|
17576
17625
|
}
|
|
17577
17626
|
}
|
|
17578
17627
|
return newHeight;
|
|
@@ -17588,11 +17637,11 @@ var HeightOracle = class {
|
|
|
17588
17637
|
if (changed) {
|
|
17589
17638
|
this.heightSamples = {};
|
|
17590
17639
|
for (let i2 = 0; i2 < knownHeights.length; i2++) {
|
|
17591
|
-
let
|
|
17592
|
-
if (
|
|
17640
|
+
let h78 = knownHeights[i2];
|
|
17641
|
+
if (h78 < 0)
|
|
17593
17642
|
i2++;
|
|
17594
17643
|
else
|
|
17595
|
-
this.heightSamples[Math.floor(
|
|
17644
|
+
this.heightSamples[Math.floor(h78 * 10)] = true;
|
|
17596
17645
|
}
|
|
17597
17646
|
}
|
|
17598
17647
|
return changed;
|
|
@@ -25639,7 +25688,7 @@ var HighlightBuilder = class {
|
|
|
25639
25688
|
if (start >= to || end <= from2)
|
|
25640
25689
|
return;
|
|
25641
25690
|
if (type3.isTop)
|
|
25642
|
-
highlighters = this.highlighters.filter((
|
|
25691
|
+
highlighters = this.highlighters.filter((h78) => !h78.scope || h78.scope(type3));
|
|
25643
25692
|
let cls = inheritedClass;
|
|
25644
25693
|
let rule = getStyleTags(cursor2) || Rule.empty;
|
|
25645
25694
|
let tagCls = highlightTags(highlighters, rule.tags);
|
|
@@ -25656,7 +25705,7 @@ var HighlightBuilder = class {
|
|
|
25656
25705
|
let mounted = cursor2.tree && cursor2.tree.prop(NodeProp.mounted);
|
|
25657
25706
|
if (mounted && mounted.overlay) {
|
|
25658
25707
|
let inner = cursor2.node.enter(mounted.overlay[0].from + start, 1);
|
|
25659
|
-
let innerHighlighters = this.highlighters.filter((
|
|
25708
|
+
let innerHighlighters = this.highlighters.filter((h78) => !h78.scope || h78.scope(mounted.tree.type));
|
|
25660
25709
|
let hasChild2 = cursor2.firstChild();
|
|
25661
25710
|
for (let i2 = 0, pos = start; ; i2++) {
|
|
25662
25711
|
let next = i2 < mounted.overlay.length ? mounted.overlay[i2] : null;
|
|
@@ -58412,7 +58461,7 @@ var DICT2 = {
|
|
|
58412
58461
|
marqueeTitle: "MarqueeText \u8DD1\u9A6C\u706F",
|
|
58413
58462
|
liveTitle: "LiveText \u5B9E\u65F6\u6587\u672C",
|
|
58414
58463
|
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
|
|
58464
|
+
feedbackToastHint: "\u547D\u4EE4\u5F0F notify\uFF0C\u4E0D\u8981\u6C42\u6302\u7EC4\u4EF6",
|
|
58416
58465
|
explorerDataTitle: "\u6570\u636E\u6765\u6E90\uFF08\u771F\u6570\u636E\uFF0C\u65E0 mock\uFF09",
|
|
58417
58466
|
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
58467
|
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 +58498,7 @@ var DICT2 = {
|
|
|
58449
58498
|
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
58499
|
exLiveHint: "\u8BA2\u9605\u5185\u90E8\u8282\u62CD\u5668\uFF0C\u8D70\u65F6 Ui \u7531\u8C03\u7528\u65B9\u6E32\u67D3",
|
|
58451
58500
|
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",
|
|
58501
|
+
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
58502
|
exLargeModalTitle: "\u5927\u578B\u5F39\u7A97\uFF08\u81EA\u5B9A\u4E49\uFF09",
|
|
58454
58503
|
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
58504
|
exSideSheetTitle: "\u4FA7\u8FB9\u62BD\u5C49\uFF08\u8986\u76D6\u5F0F\uFF09",
|
|
@@ -58458,14 +58507,10 @@ var DICT2 = {
|
|
|
58458
58507
|
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
58508
|
exToastNotifyTitle: "Toast \xB7 \u6211\u4EEC\u5C01\u88C5 notify",
|
|
58460
58509
|
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
58510
|
exLoaderTitle: "\u52A0\u8F7D\u56FE\u6807 \xB7 Loader",
|
|
58464
58511
|
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
58512
|
exLoadingTitle: "\u52A0\u8F7D\u63D0\u793A \xB7 \u4E24\u79CD\u6837\u5F0F",
|
|
58466
58513
|
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
58514
|
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
58515
|
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
58516
|
sessionListEmpty: "\u5BBF\u4E3B\u5F53\u524D\u6CA1\u6709\u53EF\u663E\u793A\u7684\u4F1A\u8BDD",
|
|
@@ -58671,7 +58716,7 @@ var DICT2 = {
|
|
|
58671
58716
|
marqueeTitle: "MarqueeText",
|
|
58672
58717
|
liveTitle: "LiveText",
|
|
58673
58718
|
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
|
|
58719
|
+
feedbackToastHint: "Imperative notify \u2014 no component mounting required",
|
|
58675
58720
|
explorerDataTitle: "Where the data comes from (real data, no mocks)",
|
|
58676
58721
|
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
58722
|
explorerFilesNone: "Not ready: the host has not exposed remote.workspaceFiles yet (no preview, no picking \u2014 no fake data either)",
|
|
@@ -58708,7 +58753,7 @@ var DICT2 = {
|
|
|
58708
58753
|
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
58754
|
exLiveHint: "Subscribes to an internal ticker; the running clock UI is rendered by the caller",
|
|
58710
58755
|
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.",
|
|
58756
|
+
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
58757
|
exLargeModalTitle: "Large dialogs (custom)",
|
|
58713
58758
|
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
58759
|
exSideSheetTitle: "Side drawer (overlay)",
|
|
@@ -58717,14 +58762,10 @@ var DICT2 = {
|
|
|
58717
58762
|
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
58763
|
exToastNotifyTitle: "Toast \xB7 our notify wrapper",
|
|
58719
58764
|
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
58765
|
exLoaderTitle: "Loader \xB7 icon only",
|
|
58723
58766
|
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
58767
|
exLoadingTitle: "Loading \xB7 two styles",
|
|
58725
58768
|
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
58769
|
sessionRealHint: "Host sessions.list snapshot (cold-safe, no Agent activation) \u2192 click for a real preview; fork and navigation are official APIs",
|
|
58729
58770
|
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
58771
|
sessionListEmpty: "The host has no visible sessions right now",
|
|
@@ -58865,7 +58906,7 @@ function demoPanels() {
|
|
|
58865
58906
|
var pageRow = { element: null };
|
|
58866
58907
|
|
|
58867
58908
|
// packages/demo/src/sections/index.tsx
|
|
58868
|
-
var
|
|
58909
|
+
var import_react86 = require("react");
|
|
58869
58910
|
|
|
58870
58911
|
// packages/demo/src/sections/start.tsx
|
|
58871
58912
|
var import_react78 = require("react");
|
|
@@ -61558,8 +61599,8 @@ var docData = {
|
|
|
61558
61599
|
"type": "",
|
|
61559
61600
|
"def": "",
|
|
61560
61601
|
"desc": {
|
|
61561
|
-
"zh": "\u5B98\u65B9 Sonner \u539F\
|
|
61562
|
-
"en": "Raw official Sonner (
|
|
61602
|
+
"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",
|
|
61603
|
+
"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
61604
|
}
|
|
61564
61605
|
},
|
|
61565
61606
|
{
|
|
@@ -62645,34 +62686,7 @@ ensureControls()`
|
|
|
62645
62686
|
}
|
|
62646
62687
|
|
|
62647
62688
|
// packages/demo/src/sections/controls.tsx
|
|
62648
|
-
var import_react81 = require("react");
|
|
62649
|
-
|
|
62650
|
-
// dist/ui/host-toast.js
|
|
62651
62689
|
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
62690
|
var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
62677
62691
|
var BUTTON_ICONS = [
|
|
62678
62692
|
{ name: "plus", Icon: import_dsh_client_ui_primitives2.IconPlusOutlineRegular },
|
|
@@ -62690,13 +62704,13 @@ var BUTTON_ICONS = [
|
|
|
62690
62704
|
];
|
|
62691
62705
|
function iconOf(name2, size4 = 14) {
|
|
62692
62706
|
const found = BUTTON_ICONS.find((item) => item.name === name2);
|
|
62693
|
-
return found === void 0 ? null : (0,
|
|
62707
|
+
return found === void 0 ? null : (0, import_react80.createElement)(found.Icon, { size: size4 });
|
|
62694
62708
|
}
|
|
62695
62709
|
function StarSvg() {
|
|
62696
|
-
return (0,
|
|
62710
|
+
return (0, import_react80.createElement)(
|
|
62697
62711
|
"svg",
|
|
62698
62712
|
{ width: 14, height: 14, viewBox: "0 0 16 16", fill: "none", "aria-hidden": true },
|
|
62699
|
-
(0,
|
|
62713
|
+
(0, import_react80.createElement)("path", {
|
|
62700
62714
|
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
62715
|
stroke: "currentColor",
|
|
62702
62716
|
strokeWidth: 1.2,
|
|
@@ -62736,7 +62750,7 @@ var CUSTOM_COLORS = ["#7c3aed", "#0ea5e9", "#f97316", "#16a34a"];
|
|
|
62736
62750
|
function tipAnchor(text2, side, align) {
|
|
62737
62751
|
const props = { label: text2, side };
|
|
62738
62752
|
if (align !== void 0) props.align = align;
|
|
62739
|
-
return (0,
|
|
62753
|
+
return (0, import_react80.createElement)(import_dsh_client_ui_primitives2.Tooltip, props, (0, import_react80.createElement)("button", {
|
|
62740
62754
|
type: "button",
|
|
62741
62755
|
style: {
|
|
62742
62756
|
padding: "4px 10px",
|
|
@@ -62750,13 +62764,13 @@ function tipAnchor(text2, side, align) {
|
|
|
62750
62764
|
}, text2));
|
|
62751
62765
|
}
|
|
62752
62766
|
function Row(props) {
|
|
62753
|
-
return (0,
|
|
62767
|
+
return (0, import_react80.createElement)("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "center" } }, props.children);
|
|
62754
62768
|
}
|
|
62755
62769
|
function Labeled(props) {
|
|
62756
|
-
return (0,
|
|
62770
|
+
return (0, import_react80.createElement)(
|
|
62757
62771
|
"div",
|
|
62758
62772
|
{ style: { display: "flex", gap: "10px", alignItems: "center", flexWrap: "wrap" } },
|
|
62759
|
-
(0,
|
|
62773
|
+
(0, import_react80.createElement)("span", { style: { width: "auto", minWidth: "64px", flex: "none", whiteSpace: "normal", color: "var(--dshpc-fg-3)", fontSize: "12px" } }, props.label),
|
|
62760
62774
|
props.children
|
|
62761
62775
|
);
|
|
62762
62776
|
}
|
|
@@ -62818,200 +62832,200 @@ var CODE_BTN_WIDTH = `// \u56FA\u5B9A\u5BBD\uFF1A\u5199\u6B7B\u5BBD\u5EA6
|
|
|
62818
62832
|
// \u4E09\u8005\u540C\u8BBE \u21D2 \u56FA\u5B9A\u5BBD\u4F18\u5148\uFF0C\u6700\u5C0F\u5BBD / \u6700\u5927\u5BBD\u81EA\u52A8\u5931\u6548
|
|
62819
62833
|
<Button variant="outline" width={120} minWidth={200} maxWidth={160}>\u56FA\u5B9A\u5BBD\u4F18\u5148</Button>`;
|
|
62820
62834
|
function ButtonPage() {
|
|
62821
|
-
return (0,
|
|
62835
|
+
return (0, import_react80.createElement)(
|
|
62822
62836
|
"div",
|
|
62823
62837
|
null,
|
|
62824
|
-
(0,
|
|
62838
|
+
(0, import_react80.createElement)(DocProse, { id: "button" }),
|
|
62825
62839
|
// 文案与语言
|
|
62826
|
-
(0,
|
|
62840
|
+
(0, import_react80.createElement)(
|
|
62827
62841
|
Example,
|
|
62828
62842
|
{ title: t3("btnTextTitle"), hint: t3("btnTextHint"), code: CODE_BTN_TEXT },
|
|
62829
|
-
(0,
|
|
62843
|
+
(0, import_react80.createElement)(
|
|
62830
62844
|
"div",
|
|
62831
62845
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62832
|
-
(0,
|
|
62846
|
+
(0, import_react80.createElement)(
|
|
62833
62847
|
Labeled,
|
|
62834
62848
|
{ label: "locale" },
|
|
62835
|
-
(0,
|
|
62836
|
-
(0,
|
|
62837
|
-
(0,
|
|
62849
|
+
(0, import_react80.createElement)(Button, { variant: "primary", icon: iconOf("check", ICON_SIZE.lg) }, t3("btnLabelSave")),
|
|
62850
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, t3("btnLabelCancel")),
|
|
62851
|
+
(0, import_react80.createElement)(Button, { variant: "danger", icon: iconOf("close", ICON_SIZE.lg) }, t3("btnLabelDelete"))
|
|
62838
62852
|
),
|
|
62839
|
-
(0,
|
|
62853
|
+
(0, import_react80.createElement)(
|
|
62840
62854
|
Labeled,
|
|
62841
62855
|
{ label: "en" },
|
|
62842
|
-
(0,
|
|
62843
|
-
(0,
|
|
62844
|
-
(0,
|
|
62856
|
+
(0, import_react80.createElement)(Button, { variant: "primary" }, "Save"),
|
|
62857
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, "Cancel"),
|
|
62858
|
+
(0, import_react80.createElement)(Button, { variant: "ghost" }, "Learn more")
|
|
62845
62859
|
),
|
|
62846
|
-
(0,
|
|
62860
|
+
(0, import_react80.createElement)(
|
|
62847
62861
|
Labeled,
|
|
62848
62862
|
{ label: "zh" },
|
|
62849
|
-
(0,
|
|
62850
|
-
(0,
|
|
62851
|
-
(0,
|
|
62863
|
+
(0, import_react80.createElement)(Button, { variant: "primary" }, "\u4FDD\u5B58"),
|
|
62864
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, "\u53D6\u6D88"),
|
|
62865
|
+
(0, import_react80.createElement)(Button, { variant: "ghost" }, "\u4E86\u89E3\u66F4\u591A")
|
|
62852
62866
|
),
|
|
62853
|
-
(0,
|
|
62867
|
+
(0, import_react80.createElement)(
|
|
62854
62868
|
Labeled,
|
|
62855
62869
|
{ label: "zh + en" },
|
|
62856
|
-
(0,
|
|
62857
|
-
(0,
|
|
62858
|
-
(0,
|
|
62870
|
+
(0, import_react80.createElement)(Button, { variant: "primary", icon: iconOf("sparkle", ICON_SIZE.lg) }, t3("btnLabelMixed")),
|
|
62871
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, "\u590D\u5236 Copy"),
|
|
62872
|
+
(0, import_react80.createElement)(Button, { variant: "secondary" }, "\u91CD\u8BD5 Retry")
|
|
62859
62873
|
)
|
|
62860
62874
|
)
|
|
62861
62875
|
),
|
|
62862
62876
|
// 10 档外观
|
|
62863
|
-
(0,
|
|
62877
|
+
(0, import_react80.createElement)(
|
|
62864
62878
|
Example,
|
|
62865
62879
|
{ title: t3("btnVariantTitle"), hint: t3("btnVariantHint"), code: CODE_BTN_VARIANT },
|
|
62866
|
-
(0,
|
|
62880
|
+
(0, import_react80.createElement)(
|
|
62867
62881
|
"div",
|
|
62868
62882
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62869
|
-
VARIANT_GROUPS.map((group) => (0,
|
|
62883
|
+
VARIANT_GROUPS.map((group) => (0, import_react80.createElement)(
|
|
62870
62884
|
Labeled,
|
|
62871
62885
|
{ key: group.label, label: group.label },
|
|
62872
|
-
(0,
|
|
62886
|
+
(0, import_react80.createElement)(
|
|
62873
62887
|
"div",
|
|
62874
62888
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", alignItems: "flex-start" } },
|
|
62875
|
-
(0,
|
|
62876
|
-
(0,
|
|
62889
|
+
(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))),
|
|
62890
|
+
(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
62891
|
)
|
|
62878
62892
|
))
|
|
62879
62893
|
)
|
|
62880
62894
|
),
|
|
62881
62895
|
// 尺寸 / 图标位置 / block
|
|
62882
|
-
(0,
|
|
62896
|
+
(0, import_react80.createElement)(
|
|
62883
62897
|
Example,
|
|
62884
62898
|
{ title: t3("btnSizeTitle"), hint: t3("btnSizeHint"), code: CODE_BTN_SIZE },
|
|
62885
|
-
(0,
|
|
62899
|
+
(0, import_react80.createElement)(
|
|
62886
62900
|
"div",
|
|
62887
62901
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62888
|
-
(0,
|
|
62902
|
+
(0, import_react80.createElement)(
|
|
62889
62903
|
Labeled,
|
|
62890
62904
|
{ label: "size" },
|
|
62891
|
-
["sm", "md", "lg"].map((size4) => (0,
|
|
62905
|
+
["sm", "md", "lg"].map((size4) => (0, import_react80.createElement)(Button, { key: size4, size: size4, variant: "outline", icon: iconOf("plus", ICON_SIZE[size4]) }, size4))
|
|
62892
62906
|
),
|
|
62893
62907
|
// icon 收的是 ReactNode:官方图标组件 / 自绘 SVG / 一个字符,三种来源各一颗
|
|
62894
|
-
(0,
|
|
62908
|
+
(0, import_react80.createElement)(
|
|
62895
62909
|
Labeled,
|
|
62896
62910
|
{ label: "icon" },
|
|
62897
|
-
(0,
|
|
62898
|
-
(0,
|
|
62899
|
-
(0,
|
|
62911
|
+
(0, import_react80.createElement)(Button, { variant: "primary", icon: iconOf("send", ICON_SIZE.lg) }, "\u5B98\u65B9\u56FE\u6807"),
|
|
62912
|
+
(0, import_react80.createElement)(Button, { variant: "outline", icon: (0, import_react80.createElement)(StarSvg, null) }, "\u81EA\u7ED8 SVG"),
|
|
62913
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", icon: "+" }, "\u4E00\u4E2A\u5B57\u7B26")
|
|
62900
62914
|
),
|
|
62901
|
-
(0,
|
|
62915
|
+
(0, import_react80.createElement)(
|
|
62902
62916
|
Labeled,
|
|
62903
62917
|
{ label: "iconRight" },
|
|
62904
|
-
(0,
|
|
62905
|
-
(0,
|
|
62918
|
+
(0, import_react80.createElement)(Button, { variant: "outline", iconRight: iconOf("chevron", ICON_SIZE.lg) }, "\u66F4\u591A"),
|
|
62919
|
+
(0, import_react80.createElement)(Button, { variant: "primary" }, "\u4E0B\u4E00\u6B65")
|
|
62906
62920
|
),
|
|
62907
62921
|
// block + 前置图标:文字要在视觉中心,不能整组内容居中(那样文字会被图标推右)
|
|
62908
|
-
(0,
|
|
62922
|
+
(0, import_react80.createElement)(
|
|
62909
62923
|
Labeled,
|
|
62910
62924
|
{ label: "block" },
|
|
62911
|
-
(0,
|
|
62925
|
+
(0, import_react80.createElement)(
|
|
62912
62926
|
"div",
|
|
62913
62927
|
{ style: { width: "260px" } },
|
|
62914
|
-
(0,
|
|
62915
|
-
(0,
|
|
62916
|
-
(0,
|
|
62928
|
+
(0, import_react80.createElement)(Button, { variant: "primary", block: true, icon: iconOf("check", ICON_SIZE.lg) }, "\u6491\u6EE1\u7236\u5BBD"),
|
|
62929
|
+
(0, import_react80.createElement)("div", { style: { height: "8px" } }),
|
|
62930
|
+
(0, import_react80.createElement)(Button, { variant: "outline", block: true }, "\u65E0\u56FE\u6807\u5BF9\u7167")
|
|
62917
62931
|
)
|
|
62918
62932
|
),
|
|
62919
|
-
(0,
|
|
62933
|
+
(0, import_react80.createElement)(
|
|
62920
62934
|
Labeled,
|
|
62921
62935
|
{ label: t3("btnIconOnly") },
|
|
62922
|
-
BUTTON_ICONS.slice(0, 6).map((item) => (0,
|
|
62936
|
+
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
62937
|
),
|
|
62924
62938
|
// 纯图标钮的配色轴:默认无底色;color 改图标色,background 给底色(用户 2026-11-02)
|
|
62925
|
-
(0,
|
|
62939
|
+
(0, import_react80.createElement)(
|
|
62926
62940
|
Labeled,
|
|
62927
62941
|
{ label: "IconButton \xB7 color / background" },
|
|
62928
|
-
(0,
|
|
62929
|
-
(0,
|
|
62930
|
-
(0,
|
|
62942
|
+
(0, import_react80.createElement)(IconButton, { icon: (0, import_react80.createElement)(BUTTON_ICONS[0].Icon, { size: 16 }), label: "\u9ED8\u8BA4\u65E0\u5E95\u8272" }),
|
|
62943
|
+
(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" }),
|
|
62944
|
+
(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" })
|
|
62931
62945
|
)
|
|
62932
62946
|
)
|
|
62933
62947
|
),
|
|
62934
62948
|
// 状态
|
|
62935
|
-
(0,
|
|
62949
|
+
(0, import_react80.createElement)(
|
|
62936
62950
|
Example,
|
|
62937
62951
|
{ title: t3("btnStateTitle"), hint: t3("btnStateHint"), code: CODE_BTN_STATE },
|
|
62938
|
-
(0,
|
|
62952
|
+
(0, import_react80.createElement)(
|
|
62939
62953
|
"div",
|
|
62940
62954
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62941
|
-
(0,
|
|
62955
|
+
(0, import_react80.createElement)(
|
|
62942
62956
|
Labeled,
|
|
62943
62957
|
{ label: "\u7981\u7528" },
|
|
62944
|
-
(0,
|
|
62945
|
-
(0,
|
|
62946
|
-
(0,
|
|
62958
|
+
(0, import_react80.createElement)(Button, { variant: "primary" }, "\u9ED8\u8BA4"),
|
|
62959
|
+
(0, import_react80.createElement)(Button, { variant: "primary", disabled: true }, "\u7981\u7528"),
|
|
62960
|
+
(0, import_react80.createElement)(Button, { variant: "danger", disabled: true, icon: iconOf("close", ICON_SIZE.lg) }, "\u7981\u7528")
|
|
62947
62961
|
),
|
|
62948
|
-
(0,
|
|
62962
|
+
(0, import_react80.createElement)(
|
|
62949
62963
|
Labeled,
|
|
62950
62964
|
{ label: "loading" },
|
|
62951
|
-
(0,
|
|
62952
|
-
(0,
|
|
62965
|
+
(0, import_react80.createElement)(Button, { variant: "outline", loading: true }, "\u52A0\u8F7D\u4E2D"),
|
|
62966
|
+
(0, import_react80.createElement)(Button, { variant: "primary", loading: true, icon: iconOf("refresh", ICON_SIZE.lg) }, "\u63D0\u4EA4\u4E2D")
|
|
62953
62967
|
)
|
|
62954
62968
|
)
|
|
62955
62969
|
),
|
|
62956
62970
|
// 自定义颜色
|
|
62957
|
-
(0,
|
|
62971
|
+
(0, import_react80.createElement)(
|
|
62958
62972
|
Example,
|
|
62959
62973
|
{ title: t3("btnColorTitle"), hint: t3("btnColorHint"), code: CODE_BTN_COLOR },
|
|
62960
|
-
(0,
|
|
62974
|
+
(0, import_react80.createElement)(
|
|
62961
62975
|
"div",
|
|
62962
62976
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62963
|
-
(0,
|
|
62977
|
+
(0, import_react80.createElement)(
|
|
62964
62978
|
Labeled,
|
|
62965
62979
|
{ label: "\u5B9E\u5FC3" },
|
|
62966
|
-
(0,
|
|
62980
|
+
(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
62981
|
),
|
|
62968
|
-
(0,
|
|
62982
|
+
(0, import_react80.createElement)(
|
|
62969
62983
|
Labeled,
|
|
62970
62984
|
{ label: "\u63CF\u8FB9" },
|
|
62971
|
-
(0,
|
|
62985
|
+
(0, import_react80.createElement)(Row, null, CUSTOM_COLORS.map((color) => (0, import_react80.createElement)(Button, { key: color, variant: "outline", color }, color)))
|
|
62972
62986
|
)
|
|
62973
62987
|
)
|
|
62974
62988
|
),
|
|
62975
62989
|
// 宽度三轴
|
|
62976
|
-
(0,
|
|
62990
|
+
(0, import_react80.createElement)(
|
|
62977
62991
|
Example,
|
|
62978
62992
|
{ title: t3("btnWidthTitle"), hint: t3("btnWidthHint"), code: CODE_BTN_WIDTH },
|
|
62979
|
-
(0,
|
|
62993
|
+
(0, import_react80.createElement)(
|
|
62980
62994
|
"div",
|
|
62981
62995
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62982
|
-
(0,
|
|
62996
|
+
(0, import_react80.createElement)(
|
|
62983
62997
|
Labeled,
|
|
62984
62998
|
{ label: "width\uFF08\u56FA\u5B9A\u5BBD\uFF09" },
|
|
62985
|
-
(0,
|
|
62999
|
+
(0, import_react80.createElement)(Button, { variant: "outline", width: 120 }, "120px \u56FA\u5B9A\u5BBD")
|
|
62986
63000
|
),
|
|
62987
|
-
(0,
|
|
63001
|
+
(0, import_react80.createElement)(
|
|
62988
63002
|
Labeled,
|
|
62989
63003
|
{ label: "minWidth\uFF08\u6700\u5C0F\u5BBD\uFF1A\u77ED / \u957F\u540C\u5BBD\uFF09" },
|
|
62990
|
-
(0,
|
|
63004
|
+
(0, import_react80.createElement)(
|
|
62991
63005
|
"div",
|
|
62992
63006
|
{ style: { display: "flex", gap: "8px" } },
|
|
62993
|
-
(0,
|
|
62994
|
-
(0,
|
|
63007
|
+
(0, import_react80.createElement)(Button, { variant: "outline", minWidth: 120 }, "\u77ED"),
|
|
63008
|
+
(0, import_react80.createElement)(Button, { variant: "outline", minWidth: 120 }, "\u5F88\u957F\u5F88\u957F\u5F88\u957F")
|
|
62995
63009
|
)
|
|
62996
63010
|
),
|
|
62997
|
-
(0,
|
|
63011
|
+
(0, import_react80.createElement)(
|
|
62998
63012
|
Labeled,
|
|
62999
63013
|
{ label: "maxWidth\uFF08\u6700\u5927\u5BBD\uFF1A\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\uFF09" },
|
|
63000
|
-
(0,
|
|
63014
|
+
(0, import_react80.createElement)(
|
|
63001
63015
|
"div",
|
|
63002
63016
|
{ style: { width: "320px" } },
|
|
63003
|
-
(0,
|
|
63017
|
+
(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
63018
|
)
|
|
63005
63019
|
),
|
|
63006
|
-
(0,
|
|
63020
|
+
(0, import_react80.createElement)(
|
|
63007
63021
|
Labeled,
|
|
63008
63022
|
{ label: "\u4E09\u8005\u540C\u8BBE \u21D2 width \u4F18\u5148" },
|
|
63009
|
-
(0,
|
|
63023
|
+
(0, import_react80.createElement)(Button, { variant: "outline", width: 120, minWidth: 200, maxWidth: 160 }, "\u56FA\u5B9A\u5BBD\u4F18\u5148")
|
|
63010
63024
|
)
|
|
63011
63025
|
)
|
|
63012
63026
|
),
|
|
63013
|
-
(0,
|
|
63014
|
-
(0,
|
|
63027
|
+
(0, import_react80.createElement)(DocCode, { id: "button" }),
|
|
63028
|
+
(0, import_react80.createElement)(DocApi, { id: "button" })
|
|
63015
63029
|
);
|
|
63016
63030
|
}
|
|
63017
63031
|
var CODE_INPUT_FAMILY = `const [text, setText] = useState('')
|
|
@@ -63122,57 +63136,57 @@ var PERIODS = [
|
|
|
63122
63136
|
{ value: "month", label: "\u6708" }
|
|
63123
63137
|
];
|
|
63124
63138
|
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,
|
|
63139
|
+
const [text2, setText] = (0, import_react80.useState)("");
|
|
63140
|
+
const [num, setNum] = (0, import_react80.useState)(3);
|
|
63141
|
+
const [checked, setChecked] = (0, import_react80.useState)(true);
|
|
63142
|
+
const [seg, setSeg] = (0, import_react80.useState)("week");
|
|
63143
|
+
const [filter2, setFilter] = (0, import_react80.useState)("all");
|
|
63144
|
+
const [multi, setMulti] = (0, import_react80.useState)(["1"]);
|
|
63145
|
+
const [iconSeg, setIconSeg] = (0, import_react80.useState)("search");
|
|
63146
|
+
const [iconSeg2, setIconSeg2] = (0, import_react80.useState)("all");
|
|
63147
|
+
const [kw, setKw] = (0, import_react80.useState)("");
|
|
63148
|
+
const [igValue, setIgValue] = (0, import_react80.useState)("");
|
|
63149
|
+
return (0, import_react80.createElement)(
|
|
63136
63150
|
"div",
|
|
63137
63151
|
null,
|
|
63138
|
-
(0,
|
|
63152
|
+
(0, import_react80.createElement)(DocProse, { id: "input" }),
|
|
63139
63153
|
// Input 家族
|
|
63140
|
-
(0,
|
|
63154
|
+
(0, import_react80.createElement)(
|
|
63141
63155
|
Example,
|
|
63142
63156
|
{ title: t3("demoInputFamily"), hint: t3("inputHint"), code: CODE_INPUT_FAMILY },
|
|
63143
|
-
(0,
|
|
63157
|
+
(0, import_react80.createElement)(
|
|
63144
63158
|
"div",
|
|
63145
63159
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", maxWidth: "380px" } },
|
|
63146
|
-
(0,
|
|
63160
|
+
(0, import_react80.createElement)(
|
|
63147
63161
|
"div",
|
|
63148
63162
|
{ style: { display: "flex", alignItems: "center", gap: "6px" } },
|
|
63149
|
-
(0,
|
|
63163
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-fg-2)", fontSize: "13px", flex: "none" } }, "\u7528\u6237\u540D"),
|
|
63150
63164
|
// hint 参数版:问号提示由组件自己挂(不再手动拼 FieldHint)
|
|
63151
|
-
(0,
|
|
63165
|
+
(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
63166
|
),
|
|
63153
|
-
(0,
|
|
63167
|
+
(0, import_react80.createElement)(
|
|
63154
63168
|
"div",
|
|
63155
63169
|
{ style: { display: "flex", alignItems: "center", gap: "6px" } },
|
|
63156
|
-
(0,
|
|
63170
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-fg-2)", fontSize: "13px", flex: "none" } }, "\u641C\u7D22"),
|
|
63157
63171
|
// 左侧图标槽(icon)+ 聚焦且有内容才出的清空钮(type="search")
|
|
63158
|
-
(0,
|
|
63172
|
+
(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
63173
|
),
|
|
63160
|
-
(0,
|
|
63174
|
+
(0, import_react80.createElement)(Input, { value: "bad value", onChange: () => {
|
|
63161
63175
|
}, error: true, placeholder: "\u6821\u9A8C\u5931\u8D25\u6001" }),
|
|
63162
63176
|
// ⚠️ 外层是 flex column(默认 align-items:stretch)会把 .dshpc-num 拉到全宽;
|
|
63163
63177
|
// 组件本身是内容自适应宽(inline-flex 无 width),演示区还原成它本来的短宽。
|
|
63164
|
-
(0,
|
|
63165
|
-
(0,
|
|
63178
|
+
(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" }),
|
|
63179
|
+
(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
63180
|
)
|
|
63167
63181
|
),
|
|
63168
63182
|
// 组合输入框:输入框 + 按钮组焊成一体(前置标题 / 撤销 / 图标按钮 / 自定义高度)
|
|
63169
|
-
(0,
|
|
63183
|
+
(0, import_react80.createElement)(
|
|
63170
63184
|
Example,
|
|
63171
63185
|
{ title: t3("inputGroupTitle"), hint: t3("inputGroupHint"), code: CODE_INPUT_GROUP },
|
|
63172
|
-
(0,
|
|
63186
|
+
(0, import_react80.createElement)(
|
|
63173
63187
|
"div",
|
|
63174
63188
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", maxWidth: "460px" } },
|
|
63175
|
-
(0,
|
|
63189
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63176
63190
|
label: "\u4EFB\u52A1\u540D",
|
|
63177
63191
|
value: igValue,
|
|
63178
63192
|
onChange: setIgValue,
|
|
@@ -63186,22 +63200,22 @@ function InputPage() {
|
|
|
63186
63200
|
} }
|
|
63187
63201
|
]
|
|
63188
63202
|
}),
|
|
63189
|
-
(0,
|
|
63203
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63190
63204
|
size: "md",
|
|
63191
63205
|
value: igValue,
|
|
63192
63206
|
onChange: setIgValue,
|
|
63193
63207
|
placeholder: "\u7EAF\u56FE\u6807 / \u56FE\u6807 + \u6587\u5B57 / \u7EAF\u6587\u5B57",
|
|
63194
63208
|
actions: [
|
|
63195
|
-
{ icon: (0,
|
|
63209
|
+
{ icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconRefreshOutlineRegular, { size: 14 }), ariaLabel: "\u91CD\u7F6E", onClick: () => {
|
|
63196
63210
|
setIgValue("");
|
|
63197
63211
|
} },
|
|
63198
|
-
{ icon: (0,
|
|
63212
|
+
{ icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), label: "\u641C\u7D22", onClick: () => {
|
|
63199
63213
|
} },
|
|
63200
63214
|
{ label: "\u63D0\u4EA4", onClick: () => {
|
|
63201
63215
|
} }
|
|
63202
63216
|
]
|
|
63203
63217
|
}),
|
|
63204
|
-
(0,
|
|
63218
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63205
63219
|
value: igValue,
|
|
63206
63220
|
onChange: setIgValue,
|
|
63207
63221
|
height: 44,
|
|
@@ -63213,62 +63227,62 @@ function InputPage() {
|
|
|
63213
63227
|
)
|
|
63214
63228
|
),
|
|
63215
63229
|
// 问号提示:证明它不属于 Input 家族,随处可挂
|
|
63216
|
-
(0,
|
|
63230
|
+
(0, import_react80.createElement)(
|
|
63217
63231
|
Example,
|
|
63218
63232
|
{ title: t3("btnHintTitle"), hint: t3("btnHintHint"), code: CODE_FIELD_HINT },
|
|
63219
|
-
(0,
|
|
63233
|
+
(0, import_react80.createElement)(
|
|
63220
63234
|
"div",
|
|
63221
63235
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
63222
|
-
(0,
|
|
63236
|
+
(0, import_react80.createElement)(
|
|
63223
63237
|
Row,
|
|
63224
63238
|
null,
|
|
63225
|
-
(0,
|
|
63226
|
-
(0,
|
|
63239
|
+
(0, import_react80.createElement)("b", { style: { fontSize: "13px" } }, "\u4E00\u4E2A\u6807\u9898"),
|
|
63240
|
+
(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
63241
|
),
|
|
63228
|
-
(0,
|
|
63242
|
+
(0, import_react80.createElement)(
|
|
63229
63243
|
Row,
|
|
63230
63244
|
null,
|
|
63231
|
-
(0,
|
|
63232
|
-
(0,
|
|
63245
|
+
(0, import_react80.createElement)(Button, { variant: "outline" }, "\u4E00\u4E2A\u6309\u94AE"),
|
|
63246
|
+
(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
63247
|
),
|
|
63234
|
-
(0,
|
|
63248
|
+
(0, import_react80.createElement)(
|
|
63235
63249
|
Row,
|
|
63236
63250
|
null,
|
|
63237
|
-
(0,
|
|
63238
|
-
(0,
|
|
63251
|
+
(0, import_react80.createElement)("span", { style: { fontSize: "13px" } }, "\u4E00\u6BB5\u666E\u901A\u6587\u5B57"),
|
|
63252
|
+
(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
63253
|
)
|
|
63240
63254
|
)
|
|
63241
63255
|
),
|
|
63242
63256
|
// Switch / Checkbox / Segmented
|
|
63243
|
-
(0,
|
|
63257
|
+
(0, import_react80.createElement)(
|
|
63244
63258
|
Example,
|
|
63245
63259
|
{ title: t3("switchTip"), hint: t3("checkboxHint"), code: CODE_SWITCH_SEG },
|
|
63246
|
-
(0,
|
|
63260
|
+
(0, import_react80.createElement)(
|
|
63247
63261
|
"div",
|
|
63248
63262
|
{ style: { display: "flex", flexDirection: "column", gap: "14px", alignItems: "flex-start" } },
|
|
63249
|
-
(0,
|
|
63263
|
+
(0, import_react80.createElement)(
|
|
63250
63264
|
"div",
|
|
63251
63265
|
{ style: { display: "flex", gap: "20px", alignItems: "center", flexWrap: "wrap" } },
|
|
63252
63266
|
// 「启用」是开关语义,用官方 Switch(用户 2026-10-20:不要用勾去启用)。
|
|
63253
63267
|
// 官方 Switch 只画胶囊本体,label 是 aria-label,可见文案由调用方自己画在旁边 ——
|
|
63254
63268
|
// 文案单独挂 onClick 使其可点(不能挂外层:点胶囊会冒泡触发两次翻转)。
|
|
63255
|
-
(0,
|
|
63269
|
+
(0, import_react80.createElement)(
|
|
63256
63270
|
"span",
|
|
63257
63271
|
{ style: { display: "inline-flex", alignItems: "center", gap: "8px" } },
|
|
63258
|
-
(0,
|
|
63259
|
-
(0,
|
|
63272
|
+
(0, import_react80.createElement)(import_dsh_client_ui_primitives2.Switch, { checked, onChange: setChecked, label: "\u542F\u7528" }),
|
|
63273
|
+
(0, import_react80.createElement)("span", {
|
|
63260
63274
|
style: { fontSize: "13px", cursor: "pointer", userSelect: "none" },
|
|
63261
63275
|
onClick: () => {
|
|
63262
63276
|
setChecked(!checked);
|
|
63263
63277
|
}
|
|
63264
63278
|
}, "\u542F\u7528")
|
|
63265
63279
|
),
|
|
63266
|
-
(0,
|
|
63280
|
+
(0, import_react80.createElement)(Checkbox, { checked, onChange: setChecked, label: "\u591A\u9009" })
|
|
63267
63281
|
),
|
|
63268
|
-
(0,
|
|
63282
|
+
(0, import_react80.createElement)(
|
|
63269
63283
|
"div",
|
|
63270
63284
|
{ style: { display: "flex", gap: "20px", alignItems: "center", flexWrap: "wrap" } },
|
|
63271
|
-
(0,
|
|
63285
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63272
63286
|
items: [
|
|
63273
63287
|
{ value: "day", label: "\u65E5" },
|
|
63274
63288
|
{ value: "week", label: "\u5468" },
|
|
@@ -63277,7 +63291,7 @@ function InputPage() {
|
|
|
63277
63291
|
value: seg,
|
|
63278
63292
|
onChange: setSeg
|
|
63279
63293
|
}),
|
|
63280
|
-
(0,
|
|
63294
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63281
63295
|
bordered: true,
|
|
63282
63296
|
items: [
|
|
63283
63297
|
{ value: "day", label: "\u65E5" },
|
|
@@ -63287,7 +63301,7 @@ function InputPage() {
|
|
|
63287
63301
|
value: seg,
|
|
63288
63302
|
onChange: setSeg
|
|
63289
63303
|
}),
|
|
63290
|
-
(0,
|
|
63304
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63291
63305
|
size: "sm",
|
|
63292
63306
|
items: [
|
|
63293
63307
|
{ value: "day", label: "\u65E5" },
|
|
@@ -63297,7 +63311,7 @@ function InputPage() {
|
|
|
63297
63311
|
value: seg,
|
|
63298
63312
|
onChange: setSeg
|
|
63299
63313
|
}),
|
|
63300
|
-
(0,
|
|
63314
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63301
63315
|
size: "sm",
|
|
63302
63316
|
bordered: true,
|
|
63303
63317
|
items: [
|
|
@@ -63310,7 +63324,7 @@ function InputPage() {
|
|
|
63310
63324
|
})
|
|
63311
63325
|
),
|
|
63312
63326
|
// 筛选条形态(真实插件同款):中性计数 + 灰底轨道
|
|
63313
|
-
(0,
|
|
63327
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63314
63328
|
items: [
|
|
63315
63329
|
{ value: "all", label: t3("segAll"), count: 11 },
|
|
63316
63330
|
{ value: "doing", label: t3("segDoing"), count: 5 },
|
|
@@ -63321,7 +63335,7 @@ function InputPage() {
|
|
|
63321
63335
|
value: filter2,
|
|
63322
63336
|
onChange: setFilter
|
|
63323
63337
|
}),
|
|
63324
|
-
(0,
|
|
63338
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63325
63339
|
bordered: true,
|
|
63326
63340
|
items: [
|
|
63327
63341
|
{ value: "all", label: t3("segAll"), count: 11 },
|
|
@@ -63334,7 +63348,7 @@ function InputPage() {
|
|
|
63334
63348
|
onChange: setFilter
|
|
63335
63349
|
}),
|
|
63336
63350
|
// 星期多选方块(蓝底选中、近似方形)
|
|
63337
|
-
(0,
|
|
63351
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63338
63352
|
multiple: true,
|
|
63339
63353
|
className: "dshpc-seg--weekday",
|
|
63340
63354
|
label: "\u661F\u671F",
|
|
@@ -63345,7 +63359,7 @@ function InputPage() {
|
|
|
63345
63359
|
value: multi,
|
|
63346
63360
|
onChange: setMulti
|
|
63347
63361
|
}),
|
|
63348
|
-
(0,
|
|
63362
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63349
63363
|
multiple: true,
|
|
63350
63364
|
className: "dshpc-seg--weekday",
|
|
63351
63365
|
bordered: true,
|
|
@@ -63358,20 +63372,20 @@ function InputPage() {
|
|
|
63358
63372
|
onChange: setMulti
|
|
63359
63373
|
}),
|
|
63360
63374
|
// 段内图标:icon 在前、文字居中、count 在后;只有图标(无文字 / 计数)时自动正方形
|
|
63361
|
-
(0,
|
|
63375
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63362
63376
|
items: [
|
|
63363
|
-
{ value: "search", icon: (0,
|
|
63364
|
-
{ value: "clock", icon: (0,
|
|
63365
|
-
{ value: "play", icon: (0,
|
|
63377
|
+
{ value: "search", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), ariaLabel: "\u641C\u7D22" },
|
|
63378
|
+
{ value: "clock", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 14 }), ariaLabel: "\u65F6\u95F4" },
|
|
63379
|
+
{ value: "play", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconPlayOutlineRegular, { size: 14 }), ariaLabel: "\u8FD0\u884C" }
|
|
63366
63380
|
],
|
|
63367
63381
|
value: iconSeg,
|
|
63368
63382
|
onChange: setIconSeg
|
|
63369
63383
|
}),
|
|
63370
|
-
(0,
|
|
63384
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63371
63385
|
items: [
|
|
63372
|
-
{ value: "all", icon: (0,
|
|
63373
|
-
{ value: "doing", icon: (0,
|
|
63374
|
-
{ value: "done", icon: (0,
|
|
63386
|
+
{ value: "all", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), label: t3("segAll"), count: 11 },
|
|
63387
|
+
{ value: "doing", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 14 }), label: t3("segDoing"), count: 5 },
|
|
63388
|
+
{ value: "done", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconCheckOutlineRegular, { size: 14 }), label: t3("segClaimed"), count: 11 }
|
|
63375
63389
|
],
|
|
63376
63390
|
value: iconSeg2,
|
|
63377
63391
|
onChange: setIconSeg2
|
|
@@ -63379,36 +63393,36 @@ function InputPage() {
|
|
|
63379
63393
|
)
|
|
63380
63394
|
),
|
|
63381
63395
|
// 选中片配色(tone,2026-10-29):内置色名 / 自定义一对颜色
|
|
63382
|
-
(0,
|
|
63396
|
+
(0, import_react80.createElement)(
|
|
63383
63397
|
Example,
|
|
63384
63398
|
{ title: t3("segToneTitle"), hint: t3("segToneHint"), code: CODE_SEG_TONE },
|
|
63385
|
-
(0,
|
|
63399
|
+
(0, import_react80.createElement)(
|
|
63386
63400
|
"div",
|
|
63387
63401
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", alignItems: "flex-start" } },
|
|
63388
|
-
(0,
|
|
63402
|
+
(0, import_react80.createElement)(
|
|
63389
63403
|
Labeled,
|
|
63390
63404
|
{ label: 'tone="teal"' },
|
|
63391
|
-
(0,
|
|
63405
|
+
(0, import_react80.createElement)(Segmented, { tone: "teal", items: PERIODS, value: seg, onChange: setSeg })
|
|
63392
63406
|
),
|
|
63393
|
-
(0,
|
|
63407
|
+
(0, import_react80.createElement)(
|
|
63394
63408
|
Labeled,
|
|
63395
63409
|
{ label: 'tone="danger"' },
|
|
63396
|
-
(0,
|
|
63410
|
+
(0, import_react80.createElement)(Segmented, { tone: "danger", items: PERIODS, value: seg, onChange: setSeg })
|
|
63397
63411
|
),
|
|
63398
|
-
(0,
|
|
63412
|
+
(0, import_react80.createElement)(
|
|
63399
63413
|
Labeled,
|
|
63400
63414
|
{ label: "{ bg, fg }" },
|
|
63401
|
-
(0,
|
|
63415
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63402
63416
|
tone: { bg: "#0b3d2e", fg: "#d1fae5" },
|
|
63403
63417
|
items: PERIODS,
|
|
63404
63418
|
value: seg,
|
|
63405
63419
|
onChange: setSeg
|
|
63406
63420
|
})
|
|
63407
63421
|
),
|
|
63408
|
-
(0,
|
|
63422
|
+
(0, import_react80.createElement)(
|
|
63409
63423
|
Labeled,
|
|
63410
63424
|
{ label: "tone + weekday" },
|
|
63411
|
-
(0,
|
|
63425
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63412
63426
|
multiple: true,
|
|
63413
63427
|
tone: "purple",
|
|
63414
63428
|
className: "dshpc-seg--weekday",
|
|
@@ -63423,16 +63437,16 @@ function InputPage() {
|
|
|
63423
63437
|
)
|
|
63424
63438
|
)
|
|
63425
63439
|
),
|
|
63426
|
-
(0,
|
|
63427
|
-
(0,
|
|
63428
|
-
(0,
|
|
63429
|
-
(0,
|
|
63440
|
+
(0, import_react80.createElement)(DocCode, { id: "input" }),
|
|
63441
|
+
(0, import_react80.createElement)(DocApi, { id: "input" }),
|
|
63442
|
+
(0, import_react80.createElement)(DocApi, { id: "input-group" }),
|
|
63443
|
+
(0, import_react80.createElement)(Placeholder2, { descKey: "inputMissingDesc" })
|
|
63430
63444
|
);
|
|
63431
63445
|
}
|
|
63432
63446
|
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,
|
|
63447
|
+
{ value: "a", label: "\u9009\u9879 A", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSparkleRegular, { size: 14 }) },
|
|
63448
|
+
{ value: "b", label: "\u9009\u9879 B", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 14 }) },
|
|
63449
|
+
{ value: "c", label: "\u9009\u9879 C", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconPlayOutlineRegular, { size: 14 }) }
|
|
63436
63450
|
];
|
|
63437
63451
|
var CODE_PICKER = `// \u5355\u9009\uFF1Aicon + \u53EF\u641C\u7D22 / \u53EF\u6E05\u9664
|
|
63438
63452
|
<Picker
|
|
@@ -63508,51 +63522,51 @@ var SPLIT_MEMBERS = {
|
|
|
63508
63522
|
]
|
|
63509
63523
|
};
|
|
63510
63524
|
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,
|
|
63525
|
+
const [single, setSingle] = (0, import_react80.useState)(void 0);
|
|
63526
|
+
const [multi, setMulti] = (0, import_react80.useState)([]);
|
|
63527
|
+
const [model, setModel] = (0, import_react80.useState)("");
|
|
63528
|
+
const [model2, setModel2] = (0, import_react80.useState)("");
|
|
63529
|
+
const [ws, setWs] = (0, import_react80.useState)(void 0);
|
|
63530
|
+
const [period2, setPeriod] = (0, import_react80.useState)("formal");
|
|
63531
|
+
const [bucket, setBucket] = (0, import_react80.useState)("");
|
|
63532
|
+
const [scope, setScope] = (0, import_react80.useState)("project");
|
|
63533
|
+
const [member, setMember] = (0, import_react80.useState)("");
|
|
63534
|
+
const [groups, setGroups] = (0, import_react80.useState)(["a"]);
|
|
63535
|
+
const [groupValue, setGroupValue] = (0, import_react80.useState)("");
|
|
63536
|
+
return (0, import_react80.createElement)(
|
|
63523
63537
|
"div",
|
|
63524
63538
|
null,
|
|
63525
|
-
(0,
|
|
63526
|
-
(0,
|
|
63539
|
+
(0, import_react80.createElement)(DocProse, { id: "picker" }),
|
|
63540
|
+
(0, import_react80.createElement)(
|
|
63527
63541
|
Example,
|
|
63528
63542
|
{ title: "Picker", hint: t3("pickerHint"), code: CODE_PICKER },
|
|
63529
|
-
(0,
|
|
63543
|
+
(0, import_react80.createElement)(
|
|
63530
63544
|
"div",
|
|
63531
63545
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
63532
|
-
(0,
|
|
63546
|
+
(0, import_react80.createElement)(Picker, {
|
|
63533
63547
|
options: ICON_OPTIONS,
|
|
63534
|
-
icon: (0,
|
|
63548
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSparkleRegular, { size: 14 }),
|
|
63535
63549
|
value: single,
|
|
63536
63550
|
onChange: (v) => setSingle(v),
|
|
63537
63551
|
searchable: true,
|
|
63538
63552
|
clearable: true,
|
|
63539
63553
|
placeholder: "\u5355\u9009\uFF08icon + \u53EF\u641C\u7D22/\u53EF\u6E05\u9664\uFF09"
|
|
63540
63554
|
}),
|
|
63541
|
-
(0,
|
|
63555
|
+
(0, import_react80.createElement)(Picker, {
|
|
63542
63556
|
options: ICON_OPTIONS,
|
|
63543
63557
|
value: single,
|
|
63544
63558
|
onChange: (v) => setSingle(v),
|
|
63545
63559
|
placeholder: "\u5355\u9009\uFF08\u65E0\u641C\u7D22\u6846\uFF09"
|
|
63546
63560
|
}),
|
|
63547
|
-
(0,
|
|
63561
|
+
(0, import_react80.createElement)(Picker, {
|
|
63548
63562
|
groups: [
|
|
63549
63563
|
{ value: "g1", label: "\u7EC4\u4E00", options: ICON_OPTIONS },
|
|
63550
63564
|
{
|
|
63551
63565
|
value: "g2",
|
|
63552
63566
|
label: "\u7EC4\u4E8C",
|
|
63553
63567
|
options: [
|
|
63554
|
-
{ value: "d", label: "\u9009\u9879 D", icon: (0,
|
|
63555
|
-
{ value: "e", label: "\u9009\u9879 E", icon: (0,
|
|
63568
|
+
{ value: "d", label: "\u9009\u9879 D", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconRefreshOutlineRegular, { size: 14 }) },
|
|
63569
|
+
{ value: "e", label: "\u9009\u9879 E", icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconPlusOutlineRegular, { size: 14 }) }
|
|
63556
63570
|
]
|
|
63557
63571
|
}
|
|
63558
63572
|
],
|
|
@@ -63563,13 +63577,13 @@ function PickerPage() {
|
|
|
63563
63577
|
searchable: true,
|
|
63564
63578
|
placeholder: "\u591A\u9009\uFF08\u4E0A\u9650 2\uFF0C\u53EF\u53CD\u9009\uFF09"
|
|
63565
63579
|
}),
|
|
63566
|
-
(0,
|
|
63580
|
+
(0, import_react80.createElement)(Picker, {
|
|
63567
63581
|
options: [{ value: "x", label: "\u964D\u7EA7\u793A\u4F8B" }],
|
|
63568
63582
|
degraded: true,
|
|
63569
63583
|
disabled: true,
|
|
63570
63584
|
placeholder: "\u964D\u7EA7 + \u7981\u7528"
|
|
63571
63585
|
}),
|
|
63572
|
-
(0,
|
|
63586
|
+
(0, import_react80.createElement)(Picker, {
|
|
63573
63587
|
options: ICON_OPTIONS,
|
|
63574
63588
|
value: single,
|
|
63575
63589
|
onChange: (v) => setSingle(v),
|
|
@@ -63578,16 +63592,16 @@ function PickerPage() {
|
|
|
63578
63592
|
})
|
|
63579
63593
|
)
|
|
63580
63594
|
),
|
|
63581
|
-
(0,
|
|
63595
|
+
(0, import_react80.createElement)(
|
|
63582
63596
|
Example,
|
|
63583
63597
|
{ title: t3("exModelPickerTitle"), hint: t3("modelPickerHint"), code: CODE_MODEL_PICKER },
|
|
63584
|
-
(0,
|
|
63598
|
+
(0, import_react80.createElement)(
|
|
63585
63599
|
"div",
|
|
63586
63600
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap" } },
|
|
63587
63601
|
// ① 分组形态:一个下拉、完全独立,供应商做组头(带「默认模型」选项)
|
|
63588
|
-
(0,
|
|
63602
|
+
(0, import_react80.createElement)(ModelPicker, { value: model, onChange: setModel, variant: "grouped" }),
|
|
63589
63603
|
// ② 联动形态:两个下拉联动,先选供应商、模型列表跟着筛
|
|
63590
|
-
(0,
|
|
63604
|
+
(0, import_react80.createElement)(ModelPicker, {
|
|
63591
63605
|
value: model2,
|
|
63592
63606
|
onChange: setModel2,
|
|
63593
63607
|
variant: "cascade",
|
|
@@ -63595,14 +63609,14 @@ function PickerPage() {
|
|
|
63595
63609
|
})
|
|
63596
63610
|
)
|
|
63597
63611
|
),
|
|
63598
|
-
(0,
|
|
63612
|
+
(0, import_react80.createElement)(
|
|
63599
63613
|
Example,
|
|
63600
63614
|
{ title: t3("exWorkspacePickerTitle"), hint: t3("workspacePickerHint"), code: CODE_WORKSPACE_PICKER },
|
|
63601
|
-
(0,
|
|
63615
|
+
(0, import_react80.createElement)(
|
|
63602
63616
|
"div",
|
|
63603
63617
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap" } },
|
|
63604
63618
|
// 默认即我们给的名字(「工作区」)和文件夹图标;自定义文案 / 图标是可选能力,不在演示里铺
|
|
63605
|
-
(0,
|
|
63619
|
+
(0, import_react80.createElement)(WorkspacePicker, {
|
|
63606
63620
|
value: ws,
|
|
63607
63621
|
onChange: (v) => setWs(v),
|
|
63608
63622
|
clearable: true,
|
|
@@ -63610,18 +63624,18 @@ function PickerPage() {
|
|
|
63610
63624
|
})
|
|
63611
63625
|
)
|
|
63612
63626
|
),
|
|
63613
|
-
(0,
|
|
63627
|
+
(0, import_react80.createElement)(
|
|
63614
63628
|
Example,
|
|
63615
63629
|
{ title: t3("exSplitGroupTitle"), hint: t3("splitGroupHint"), code: CODE_SPLIT_GROUP },
|
|
63616
63630
|
// 形态一(单选滑块 + 下拉):左滑块选「正式组 / 测试组」,右格下拉联动换源、且略长;sm/md/lg 三档
|
|
63617
|
-
(0,
|
|
63631
|
+
(0, import_react80.createElement)(
|
|
63618
63632
|
"div",
|
|
63619
63633
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
63620
63634
|
["sm", "md", "lg"].map(
|
|
63621
|
-
(sz) => (0,
|
|
63635
|
+
(sz) => (0, import_react80.createElement)(
|
|
63622
63636
|
SplitGroup,
|
|
63623
63637
|
{ key: sz, label: `\u5355\u9009 \xB7 ${sz}` },
|
|
63624
|
-
(0,
|
|
63638
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63625
63639
|
size: sz,
|
|
63626
63640
|
items: SPLIT_SINGLE_OPTS,
|
|
63627
63641
|
value: period2,
|
|
@@ -63630,7 +63644,7 @@ function PickerPage() {
|
|
|
63630
63644
|
setBucket("");
|
|
63631
63645
|
}
|
|
63632
63646
|
}),
|
|
63633
|
-
(0,
|
|
63647
|
+
(0, import_react80.createElement)(Picker, {
|
|
63634
63648
|
size: sz,
|
|
63635
63649
|
options: SPLIT_TARGETS[period2] ?? [],
|
|
63636
63650
|
value: bucket,
|
|
@@ -63643,14 +63657,14 @@ function PickerPage() {
|
|
|
63643
63657
|
)
|
|
63644
63658
|
),
|
|
63645
63659
|
// 形态二(下拉 + 下拉):左格「范围」、右格「值」,三个尺寸各来一个
|
|
63646
|
-
(0,
|
|
63660
|
+
(0, import_react80.createElement)(
|
|
63647
63661
|
"div",
|
|
63648
63662
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start", marginTop: "12px" } },
|
|
63649
63663
|
["sm", "md", "lg"].map(
|
|
63650
|
-
(sz) => (0,
|
|
63664
|
+
(sz) => (0, import_react80.createElement)(
|
|
63651
63665
|
SplitGroup,
|
|
63652
63666
|
{ key: sz, label: `\u4E0B\u62C9 \xB7 ${sz}` },
|
|
63653
|
-
(0,
|
|
63667
|
+
(0, import_react80.createElement)(Picker, {
|
|
63654
63668
|
size: sz,
|
|
63655
63669
|
options: SPLIT_SCOPES,
|
|
63656
63670
|
value: scope,
|
|
@@ -63660,7 +63674,7 @@ function PickerPage() {
|
|
|
63660
63674
|
},
|
|
63661
63675
|
minWidth: 110
|
|
63662
63676
|
}),
|
|
63663
|
-
(0,
|
|
63677
|
+
(0, import_react80.createElement)(Picker, {
|
|
63664
63678
|
size: sz,
|
|
63665
63679
|
options: SPLIT_MEMBERS[scope] ?? [],
|
|
63666
63680
|
value: member,
|
|
@@ -63673,20 +63687,20 @@ function PickerPage() {
|
|
|
63673
63687
|
)
|
|
63674
63688
|
),
|
|
63675
63689
|
// 多选:左滑块 A/B/C 三组可多选,右格一个下拉
|
|
63676
|
-
(0,
|
|
63690
|
+
(0, import_react80.createElement)(
|
|
63677
63691
|
"div",
|
|
63678
63692
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start", marginTop: "12px" } },
|
|
63679
|
-
(0,
|
|
63693
|
+
(0, import_react80.createElement)(
|
|
63680
63694
|
SplitGroup,
|
|
63681
63695
|
{ label: "\u591A\u9009" },
|
|
63682
|
-
(0,
|
|
63696
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63683
63697
|
size: "lg",
|
|
63684
63698
|
multiple: true,
|
|
63685
63699
|
items: SPLIT_GROUPS,
|
|
63686
63700
|
value: groups,
|
|
63687
63701
|
onChange: setGroups
|
|
63688
63702
|
}),
|
|
63689
|
-
(0,
|
|
63703
|
+
(0, import_react80.createElement)(Picker, {
|
|
63690
63704
|
size: "lg",
|
|
63691
63705
|
options: SPLIT_FIXED,
|
|
63692
63706
|
value: groupValue,
|
|
@@ -63697,10 +63711,10 @@ function PickerPage() {
|
|
|
63697
63711
|
)
|
|
63698
63712
|
)
|
|
63699
63713
|
),
|
|
63700
|
-
(0,
|
|
63701
|
-
(0,
|
|
63702
|
-
(0,
|
|
63703
|
-
(0,
|
|
63714
|
+
(0, import_react80.createElement)(DocApi, { id: "split-group" }),
|
|
63715
|
+
(0, import_react80.createElement)(DocCode, { id: "picker" }),
|
|
63716
|
+
(0, import_react80.createElement)(DocApi, { id: "picker" }),
|
|
63717
|
+
(0, import_react80.createElement)(Placeholder2, { descKey: "pickerLogicDesc" })
|
|
63704
63718
|
);
|
|
63705
63719
|
}
|
|
63706
63720
|
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 +63738,17 @@ var CODE_TOOLTIP = `// label + side / align\uFF1Bchildren \u5FC5\u987B\u662F\u80
|
|
|
63724
63738
|
content={<div style={{ color: 'var(--dsw-static-neutral-bluish-00,#fff)' }}>\u2026</div>}
|
|
63725
63739
|
/>`;
|
|
63726
63740
|
function TooltipPage() {
|
|
63727
|
-
return (0,
|
|
63741
|
+
return (0, import_react80.createElement)(
|
|
63728
63742
|
"div",
|
|
63729
63743
|
null,
|
|
63730
|
-
(0,
|
|
63731
|
-
(0,
|
|
63744
|
+
(0, import_react80.createElement)(DocProse, { id: "tooltip" }),
|
|
63745
|
+
(0, import_react80.createElement)(
|
|
63732
63746
|
Example,
|
|
63733
63747
|
{ title: t3("tooltipTitle"), hint: t3("tooltipHint"), code: CODE_TOOLTIP },
|
|
63734
|
-
(0,
|
|
63748
|
+
(0, import_react80.createElement)(
|
|
63735
63749
|
"div",
|
|
63736
63750
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
63737
|
-
(0,
|
|
63751
|
+
(0, import_react80.createElement)(
|
|
63738
63752
|
Labeled,
|
|
63739
63753
|
{ label: t3("tooltipAnchorButton") },
|
|
63740
63754
|
tipAnchor("top \xB7 center", "top", "center"),
|
|
@@ -63743,52 +63757,52 @@ function TooltipPage() {
|
|
|
63743
63757
|
tipAnchor("bottom \xB7 end", "bottom", "end"),
|
|
63744
63758
|
tipAnchor("right", "right")
|
|
63745
63759
|
),
|
|
63746
|
-
(0,
|
|
63760
|
+
(0, import_react80.createElement)(
|
|
63747
63761
|
Labeled,
|
|
63748
63762
|
{ label: t3("tooltipAnchorText") },
|
|
63749
|
-
(0,
|
|
63763
|
+
(0, import_react80.createElement)(
|
|
63750
63764
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63751
63765
|
{ label: t3("tooltipHint"), side: "top" },
|
|
63752
|
-
(0,
|
|
63766
|
+
(0, import_react80.createElement)("span", {
|
|
63753
63767
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63754
63768
|
}, t3("tooltipAnchorText"))
|
|
63755
63769
|
),
|
|
63756
|
-
(0,
|
|
63770
|
+
(0, import_react80.createElement)(
|
|
63757
63771
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63758
63772
|
{ label: t3("tooltipLongText"), side: "bottom", maxWidth: 240 },
|
|
63759
|
-
(0,
|
|
63773
|
+
(0, import_react80.createElement)("span", {
|
|
63760
63774
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63761
63775
|
}, t3("tooltipLong"))
|
|
63762
63776
|
)
|
|
63763
63777
|
),
|
|
63764
63778
|
// 两段式:第一行名字(短)、\n 真实换行、第二行正文(长,受 maxWidth 折行)
|
|
63765
|
-
(0,
|
|
63779
|
+
(0, import_react80.createElement)(
|
|
63766
63780
|
Labeled,
|
|
63767
63781
|
{ label: t3("tooltipMultiline") },
|
|
63768
|
-
(0,
|
|
63782
|
+
(0, import_react80.createElement)(
|
|
63769
63783
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63770
63784
|
{ label: `${t3("tooltipName")}
|
|
63771
63785
|
${t3("tooltipLongText")}`, side: "top", maxWidth: 260 },
|
|
63772
|
-
(0,
|
|
63786
|
+
(0, import_react80.createElement)("span", {
|
|
63773
63787
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63774
63788
|
}, t3("tooltipName"))
|
|
63775
63789
|
)
|
|
63776
63790
|
),
|
|
63777
63791
|
// 富卡片:官方 HoverCard(宿主工作区列表那种「标题 + 正文」卡就是它);content 收任意 ReactNode
|
|
63778
|
-
(0,
|
|
63792
|
+
(0, import_react80.createElement)(
|
|
63779
63793
|
Labeled,
|
|
63780
63794
|
{ label: t3("tooltipRich") },
|
|
63781
|
-
(0,
|
|
63795
|
+
(0, import_react80.createElement)(import_dsh_client_ui_primitives2.HoverCard, {
|
|
63782
63796
|
variant: "compact",
|
|
63783
63797
|
openDelayMs: 200,
|
|
63784
|
-
anchor: (0,
|
|
63798
|
+
anchor: (0, import_react80.createElement)("span", {
|
|
63785
63799
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63786
63800
|
}, t3("tooltipName")),
|
|
63787
63801
|
// ⚠️ 官方 HoverCard 的 compact 变体(.card)背景是硬编码 `#2C2C2E` 且**不设 color**
|
|
63788
63802
|
// (来源见 docs/design/external/dsh-host.md §10),卡片又被 portal 到 document.body,
|
|
63789
63803
|
// 文字色因此退化成继承:亮色下继承到近黑 ⇒ 黑字压深底。背景恒深 ⇒ 内容色必须由调用方给,
|
|
63790
63804
|
// 这里取官方 Tooltip 在同一个深底场景用的常量 `--dsw-static-neutral-bluish-00`(#fff)。
|
|
63791
|
-
content: (0,
|
|
63805
|
+
content: (0, import_react80.createElement)(
|
|
63792
63806
|
"div",
|
|
63793
63807
|
{
|
|
63794
63808
|
style: {
|
|
@@ -63797,15 +63811,15 @@ ${t3("tooltipLongText")}`, side: "top", maxWidth: 260 },
|
|
|
63797
63811
|
color: "var(--dsw-static-neutral-bluish-00,#fff)"
|
|
63798
63812
|
}
|
|
63799
63813
|
},
|
|
63800
|
-
(0,
|
|
63801
|
-
(0,
|
|
63814
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600, fontSize: "14px", marginBottom: "4px" } }, t3("tooltipName")),
|
|
63815
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", lineHeight: 1.6, whiteSpace: "pre-line", opacity: 0.78 } }, t3("tooltipLongText"))
|
|
63802
63816
|
)
|
|
63803
63817
|
})
|
|
63804
63818
|
)
|
|
63805
63819
|
)
|
|
63806
63820
|
),
|
|
63807
|
-
(0,
|
|
63808
|
-
(0,
|
|
63821
|
+
(0, import_react80.createElement)(DocCode, { id: "tooltip" }),
|
|
63822
|
+
(0, import_react80.createElement)(DocApi, { id: "tooltip" })
|
|
63809
63823
|
);
|
|
63810
63824
|
}
|
|
63811
63825
|
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 +63866,162 @@ var CODE_SECTION_HEAD = `// \u5206\u533A\u6807\u9898\uFF1A\u6807\u7B7E\uFF08\u53
|
|
|
63852
63866
|
]}
|
|
63853
63867
|
/>`;
|
|
63854
63868
|
function CardPage() {
|
|
63855
|
-
const [seg, setSeg] = (0,
|
|
63856
|
-
const [kw, setKw] = (0,
|
|
63857
|
-
return (0,
|
|
63869
|
+
const [seg, setSeg] = (0, import_react80.useState)("all");
|
|
63870
|
+
const [kw, setKw] = (0, import_react80.useState)("");
|
|
63871
|
+
return (0, import_react80.createElement)(
|
|
63858
63872
|
"div",
|
|
63859
63873
|
null,
|
|
63860
|
-
(0,
|
|
63861
|
-
(0,
|
|
63874
|
+
(0, import_react80.createElement)(DocProse, { id: "surface" }),
|
|
63875
|
+
(0, import_react80.createElement)(
|
|
63862
63876
|
Example,
|
|
63863
63877
|
{ title: t3("demoSurfaceTitle"), hint: t3("surfaceHint"), code: CODE_SURFACE },
|
|
63864
|
-
(0,
|
|
63878
|
+
(0, import_react80.createElement)(
|
|
63865
63879
|
"div",
|
|
63866
63880
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap", maxWidth: "640px" } },
|
|
63867
63881
|
["plain", "raised", "sunken", "subtle"].map(
|
|
63868
|
-
(tone) => (0,
|
|
63882
|
+
(tone) => (0, import_react80.createElement)(
|
|
63869
63883
|
Surface,
|
|
63870
63884
|
{ key: tone, tone, padding: "md", style: { flex: "1 1 140px" } },
|
|
63871
|
-
(0,
|
|
63872
|
-
(0,
|
|
63885
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-sm)", color: "var(--dshpc-fg-2)" } }, `tone="${tone}"`),
|
|
63886
|
+
(0, import_react80.createElement)("div", { style: { marginTop: "6px" } }, (0, import_react80.createElement)(Button, { size: "sm", variant: "outline" }, "Button"))
|
|
63873
63887
|
)
|
|
63874
63888
|
)
|
|
63875
63889
|
)
|
|
63876
63890
|
),
|
|
63877
|
-
(0,
|
|
63878
|
-
(0,
|
|
63891
|
+
(0, import_react80.createElement)(DocProse, { id: "card" }),
|
|
63892
|
+
(0, import_react80.createElement)(
|
|
63879
63893
|
Example,
|
|
63880
63894
|
{ title: t3("demoCardTitle"), hint: t3("cardHint"), code: CODE_CARD },
|
|
63881
|
-
(0,
|
|
63895
|
+
(0, import_react80.createElement)(
|
|
63882
63896
|
"div",
|
|
63883
63897
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", maxWidth: "640px" } },
|
|
63884
63898
|
// 真实形态示例(任务卡同款排版):右侧元信息走 action 槽 ⇒ 外壳自动垂直居中
|
|
63885
|
-
(0,
|
|
63899
|
+
(0, import_react80.createElement)(
|
|
63886
63900
|
Card,
|
|
63887
63901
|
{
|
|
63888
63902
|
accent: "business",
|
|
63889
|
-
action: (0,
|
|
63903
|
+
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
63904
|
},
|
|
63891
|
-
(0,
|
|
63905
|
+
(0, import_react80.createElement)(
|
|
63892
63906
|
"div",
|
|
63893
63907
|
{ style: { fontWeight: 600, flex: "1 1 auto", minWidth: 0, fontSize: "var(--dshpc-font-md)" } },
|
|
63894
63908
|
"\u5C06 OpenSSH \u4E0A\u6240\u6709 NPM \u5B89\u88C5\u8FC1\u79FB\u5230 PNPM"
|
|
63895
63909
|
),
|
|
63896
|
-
(0,
|
|
63910
|
+
(0, import_react80.createElement)(
|
|
63897
63911
|
"div",
|
|
63898
63912
|
{ style: { display: "flex", alignItems: "center", gap: "6px", marginTop: "6px", flexWrap: "wrap" } },
|
|
63899
|
-
(0,
|
|
63900
|
-
(0,
|
|
63901
|
-
(0,
|
|
63902
|
-
(0,
|
|
63903
|
-
(0,
|
|
63913
|
+
(0, import_react80.createElement)(Chip, null, "NAS-Docker"),
|
|
63914
|
+
(0, import_react80.createElement)(Chip, null, "#npm"),
|
|
63915
|
+
(0, import_react80.createElement)(Chip, null, "#pnpm"),
|
|
63916
|
+
(0, import_react80.createElement)(Chip, null, "#OpenSSH"),
|
|
63917
|
+
(0, import_react80.createElement)(Chip, null, "#\u8FC1\u79FB")
|
|
63904
63918
|
)
|
|
63905
63919
|
),
|
|
63906
63920
|
// action 里裸放一个 button:不套容器也垂直居中;框内排版由调用方自定
|
|
63907
|
-
(0,
|
|
63921
|
+
(0, import_react80.createElement)(
|
|
63908
63922
|
Card,
|
|
63909
63923
|
{
|
|
63910
63924
|
accent: "business",
|
|
63911
|
-
action: (0,
|
|
63925
|
+
action: (0, import_react80.createElement)(Button, { size: "sm", variant: "ghost" }, "\u67E5\u770B\u4F1A\u8BDD")
|
|
63912
63926
|
},
|
|
63913
|
-
(0,
|
|
63914
|
-
(0,
|
|
63927
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600, fontSize: "var(--dshpc-font-md)" } }, "DAY:1 - Docker \u955C\u50CF\u7248\u672C\u68C0\u67E5\u5668"),
|
|
63928
|
+
(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
63929
|
),
|
|
63916
63930
|
// accent 速览:单行紧凑卡,只看色条档位
|
|
63917
|
-
(0,
|
|
63931
|
+
(0, import_react80.createElement)(
|
|
63918
63932
|
"div",
|
|
63919
63933
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", marginTop: "4px" } },
|
|
63920
63934
|
["business", "success", "warning", "danger", "neutral", "purple", "pink", "cyan", "teal", "orange", "indigo", "rose", "slate"].map(
|
|
63921
|
-
(a) => (0,
|
|
63935
|
+
(a) => (0, import_react80.createElement)(
|
|
63922
63936
|
Card,
|
|
63923
63937
|
{ key: a, accent: a, style: { padding: "8px 12px" } },
|
|
63924
|
-
(0,
|
|
63938
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-sm)", color: "var(--dshpc-fg-2)" } }, `accent="${a}"`)
|
|
63925
63939
|
)
|
|
63926
63940
|
)
|
|
63927
63941
|
)
|
|
63928
63942
|
)
|
|
63929
63943
|
),
|
|
63930
|
-
(0,
|
|
63944
|
+
(0, import_react80.createElement)(
|
|
63931
63945
|
Example,
|
|
63932
63946
|
{ title: t3("demoBarTitle"), hint: t3("barHint"), code: CODE_BAR },
|
|
63933
|
-
(0,
|
|
63947
|
+
(0, import_react80.createElement)(
|
|
63934
63948
|
"div",
|
|
63935
63949
|
{ style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "8px", maxWidth: "640px" } },
|
|
63936
63950
|
["left", "right", "top", "bottom"].map(
|
|
63937
|
-
(side) => (0,
|
|
63951
|
+
(side) => (0, import_react80.createElement)(
|
|
63938
63952
|
Card,
|
|
63939
63953
|
{ key: side, accent: "business", bar: { side } },
|
|
63940
|
-
(0,
|
|
63941
|
-
(0,
|
|
63954
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-md)", fontWeight: 600 } }, `bar.side="${side}"`),
|
|
63955
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)", marginTop: "4px" } }, "inset 12 \xB7 gap 12")
|
|
63942
63956
|
)
|
|
63943
63957
|
)
|
|
63944
63958
|
)
|
|
63945
63959
|
),
|
|
63946
|
-
(0,
|
|
63960
|
+
(0, import_react80.createElement)(
|
|
63947
63961
|
Example,
|
|
63948
63962
|
{ title: t3("demoStripTitle"), hint: t3("stripHint"), code: CODE_STRIP_CARD },
|
|
63949
|
-
(0,
|
|
63963
|
+
(0, import_react80.createElement)(
|
|
63950
63964
|
"div",
|
|
63951
63965
|
{ style: { display: "flex", flexDirection: "column", gap: "4px", maxWidth: "640px" } },
|
|
63952
|
-
(0,
|
|
63966
|
+
(0, import_react80.createElement)(
|
|
63953
63967
|
StripCard,
|
|
63954
63968
|
{
|
|
63955
63969
|
accent: "business",
|
|
63956
|
-
action: (0,
|
|
63970
|
+
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
63971
|
},
|
|
63958
|
-
(0,
|
|
63959
|
-
(0,
|
|
63972
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600, fontSize: "var(--dshpc-font-md)" } }, "DAY:1 - Docker \u955C\u50CF\u7248\u672C\u68C0\u67E5\u5668"),
|
|
63973
|
+
(0, import_react80.createElement)(
|
|
63960
63974
|
"div",
|
|
63961
63975
|
{ style: { display: "flex", alignItems: "center", gap: "6px", marginTop: "4px", flexWrap: "wrap" } },
|
|
63962
|
-
(0,
|
|
63963
|
-
(0,
|
|
63976
|
+
(0, import_react80.createElement)(Chip, null, "NAS-Docker"),
|
|
63977
|
+
(0, import_react80.createElement)(
|
|
63964
63978
|
"span",
|
|
63965
63979
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)" } },
|
|
63966
63980
|
"\u8BA1\u5212 02:00 \xB7 \u5B9E\u9645 02:00 \xB7 \u65F6\u957F 04:02 \xB7 2.4M"
|
|
63967
63981
|
)
|
|
63968
63982
|
)
|
|
63969
63983
|
),
|
|
63970
|
-
(0,
|
|
63984
|
+
(0, import_react80.createElement)(
|
|
63971
63985
|
StripCard,
|
|
63972
63986
|
{
|
|
63973
63987
|
accent: "success",
|
|
63974
63988
|
// 右侧裸放一个描边钮(outline, sm=24px):不套容器也垂直居中
|
|
63975
|
-
action: (0,
|
|
63989
|
+
action: (0, import_react80.createElement)(Button, { size: "sm", variant: "outline" }, "Cancel")
|
|
63976
63990
|
},
|
|
63977
|
-
(0,
|
|
63978
|
-
(0,
|
|
63991
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600, fontSize: "var(--dshpc-font-md)" } }, "\u6267\u884C\u6210\u529F"),
|
|
63992
|
+
(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
63993
|
),
|
|
63980
63994
|
// accent 速览:单行紧凑卡,只看色条档位(与 Card 节同款)
|
|
63981
|
-
(0,
|
|
63995
|
+
(0, import_react80.createElement)(
|
|
63982
63996
|
"div",
|
|
63983
63997
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", marginTop: "4px" } },
|
|
63984
63998
|
["business", "success", "warning", "danger", "neutral", "purple", "pink", "cyan", "teal", "orange", "indigo", "rose", "slate"].map(
|
|
63985
|
-
(a) => (0,
|
|
63999
|
+
(a) => (0, import_react80.createElement)(
|
|
63986
64000
|
StripCard,
|
|
63987
64001
|
{ key: a, accent: a, style: { padding: "8px 12px 8px 20px" } },
|
|
63988
|
-
(0,
|
|
64002
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-sm)", color: "var(--dshpc-fg-2)" } }, `accent="${a}"`)
|
|
63989
64003
|
)
|
|
63990
64004
|
)
|
|
63991
64005
|
)
|
|
63992
64006
|
)
|
|
63993
64007
|
),
|
|
63994
|
-
(0,
|
|
64008
|
+
(0, import_react80.createElement)(
|
|
63995
64009
|
Example,
|
|
63996
64010
|
{ title: t3("sectionHeadTitle"), hint: t3("exSectionHeadHint"), code: CODE_SECTION_HEAD },
|
|
63997
|
-
(0,
|
|
64011
|
+
(0, import_react80.createElement)(
|
|
63998
64012
|
"div",
|
|
63999
64013
|
{ style: { display: "flex", flexDirection: "column", gap: "8px" } },
|
|
64000
64014
|
// A:sparkle 图标 + “全部待办”后缀计数 + 右侧过滤组(滑轨 + 搜索框)
|
|
64001
|
-
(0,
|
|
64002
|
-
icon: (0,
|
|
64003
|
-
title: (0,
|
|
64015
|
+
(0, import_react80.createElement)(SectionHead, {
|
|
64016
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSparkleRegular, { size: 16 }),
|
|
64017
|
+
title: (0, import_react80.createElement)(
|
|
64004
64018
|
"span",
|
|
64005
64019
|
{ style: { display: "inline-flex", alignItems: "baseline", gap: "6px" } },
|
|
64006
64020
|
"\u5168\u90E8\u5F85\u529E",
|
|
64007
|
-
(0,
|
|
64021
|
+
(0, import_react80.createElement)("span", { style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)", fontWeight: 400 } }, "22")
|
|
64008
64022
|
),
|
|
64009
64023
|
right: [
|
|
64010
|
-
(0,
|
|
64024
|
+
(0, import_react80.createElement)(Segmented, {
|
|
64011
64025
|
items: [
|
|
64012
64026
|
{ value: "all", label: t3("segAll"), count: 22 },
|
|
64013
64027
|
{ value: "doing", label: t3("segDoing"), count: 11 },
|
|
@@ -64017,40 +64031,40 @@ function CardPage() {
|
|
|
64017
64031
|
onChange: setSeg
|
|
64018
64032
|
}),
|
|
64019
64033
|
// 搜索框 140px 定宽(兄弟项目 SEARCH_WIDTH 同款),外面套 div 控宽
|
|
64020
|
-
(0,
|
|
64034
|
+
(0, import_react80.createElement)(
|
|
64021
64035
|
"div",
|
|
64022
64036
|
{ style: { width: "140px", flex: "none" } },
|
|
64023
|
-
(0,
|
|
64037
|
+
(0, import_react80.createElement)(Input, { value: kw, onChange: setKw, placeholder: "\u641C\u7D22" })
|
|
64024
64038
|
)
|
|
64025
64039
|
]
|
|
64026
64040
|
}),
|
|
64027
64041
|
// B:clock 图标 + “我的待办” + 彩色标签 + 右侧单个操作钮
|
|
64028
|
-
(0,
|
|
64029
|
-
icon: (0,
|
|
64030
|
-
title: (0,
|
|
64042
|
+
(0, import_react80.createElement)(SectionHead, {
|
|
64043
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 16 }),
|
|
64044
|
+
title: (0, import_react80.createElement)(
|
|
64031
64045
|
"span",
|
|
64032
64046
|
{ style: { display: "inline-flex", alignItems: "center", gap: "6px" } },
|
|
64033
64047
|
"\u6211\u7684\u5F85\u529E",
|
|
64034
|
-
(0,
|
|
64048
|
+
(0, import_react80.createElement)(Chip, { tone: "success", size: "xs" }, "\u6700\u65B0")
|
|
64035
64049
|
),
|
|
64036
|
-
right: (0,
|
|
64050
|
+
right: (0, import_react80.createElement)(Button, { size: "sm", variant: "ghost" }, "\u5237\u65B0")
|
|
64037
64051
|
}),
|
|
64038
64052
|
// C:refresh 图标 + “已归档” + 小字说明 + 右侧操作组(两个钮)
|
|
64039
|
-
(0,
|
|
64040
|
-
icon: (0,
|
|
64041
|
-
title: (0,
|
|
64053
|
+
(0, import_react80.createElement)(SectionHead, {
|
|
64054
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconRefreshOutlineRegular, { size: 16 }),
|
|
64055
|
+
title: (0, import_react80.createElement)(
|
|
64042
64056
|
"span",
|
|
64043
64057
|
{ style: { display: "inline-flex", alignItems: "baseline", gap: "6px" } },
|
|
64044
64058
|
"\u5DF2\u5F52\u6863",
|
|
64045
|
-
(0,
|
|
64059
|
+
(0, import_react80.createElement)("span", { style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)", fontWeight: 400 } }, "\u5171 8 \u6761")
|
|
64046
64060
|
),
|
|
64047
64061
|
right: [
|
|
64048
|
-
(0,
|
|
64049
|
-
(0,
|
|
64062
|
+
(0, import_react80.createElement)(Button, { size: "sm", variant: "ghost" }, "\u64CD\u4F5C"),
|
|
64063
|
+
(0, import_react80.createElement)(Button, { size: "sm", variant: "secondary" }, "\u8BBE\u7F6E")
|
|
64050
64064
|
]
|
|
64051
64065
|
}),
|
|
64052
64066
|
// D:固定标签颜色速览 —— accent 内置色名 / 任意色值 / default / false
|
|
64053
|
-
(0,
|
|
64067
|
+
(0, import_react80.createElement)(
|
|
64054
64068
|
"div",
|
|
64055
64069
|
{ style: { display: "flex", flexDirection: "column", gap: "4px" } },
|
|
64056
64070
|
[
|
|
@@ -64059,12 +64073,12 @@ function CardPage() {
|
|
|
64059
64073
|
["success", "success"],
|
|
64060
64074
|
["#7c3aed", "#7c3aed"],
|
|
64061
64075
|
[false, "false\uFF08\u4E0D\u753B\uFF09"]
|
|
64062
|
-
].map(([accent, label]) => (0,
|
|
64076
|
+
].map(([accent, label]) => (0, import_react80.createElement)(SectionHead, { key: String(accent), accent, title: label, flush: true }))
|
|
64063
64077
|
)
|
|
64064
64078
|
)
|
|
64065
64079
|
),
|
|
64066
|
-
(0,
|
|
64067
|
-
(0,
|
|
64080
|
+
(0, import_react80.createElement)(DocCode, { id: "card" }),
|
|
64081
|
+
(0, import_react80.createElement)(DocApi, { id: "card" })
|
|
64068
64082
|
);
|
|
64069
64083
|
}
|
|
64070
64084
|
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 +64088,7 @@ var CODE_CHIP = `// tone \u4E94\u6863 + size \u4E09\u6863\uFF1B\u5C3A\u5BF8\u884
|
|
|
64074
64088
|
|
|
64075
64089
|
// \u4E2D\u6027 # \u6807\u7B7E\uFF08\u8BED\u8A00\u65E0\u5173\uFF09\uFF1B\u4F20 onClick \u624D\u6E32\u67D3\u6210 button
|
|
64076
64090
|
<Chip>#npm</Chip>
|
|
64077
|
-
<Chip onClick={() =>
|
|
64091
|
+
<Chip onClick={() => notify('\u70B9\u4E86 chip')}>#\u53EF\u70B9</Chip>`;
|
|
64078
64092
|
var CODE_CHIP_WIDTH = `// \u56FA\u5B9A\u5BBD\uFF1A\u5199\u6B7B\u5BBD\u5EA6
|
|
64079
64093
|
<Chip width={90}>90px \u56FA\u5B9A\u5BBD</Chip>
|
|
64080
64094
|
|
|
@@ -64101,100 +64115,100 @@ var CODE_MARQUEE = `// \u5B9A\u5BBD\u5C0F\u5BB9\u5668\uFF1A\u653E\u4E0D\u4E0B\u6
|
|
|
64101
64115
|
var CODE_LIVE = `// \u8BA2\u9605\u5185\u90E8\u8282\u62CD\u5668\uFF0C\u8D70\u65F6\u5185\u5BB9\u8C03\u7528\u65B9\u6E32\u67D3
|
|
64102
64116
|
<LiveText render={(nowMs) => new Date(nowMs).toLocaleTimeString()} />`;
|
|
64103
64117
|
function ChipPage() {
|
|
64104
|
-
return (0,
|
|
64118
|
+
return (0, import_react80.createElement)(
|
|
64105
64119
|
"div",
|
|
64106
64120
|
null,
|
|
64107
|
-
(0,
|
|
64108
|
-
(0,
|
|
64121
|
+
(0, import_react80.createElement)(DocProse, { id: "chip" }),
|
|
64122
|
+
(0, import_react80.createElement)(
|
|
64109
64123
|
Example,
|
|
64110
64124
|
{ title: "Chip", hint: t3("chipHint"), code: CODE_CHIP },
|
|
64111
|
-
(0,
|
|
64125
|
+
(0, import_react80.createElement)(
|
|
64112
64126
|
"div",
|
|
64113
64127
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64114
64128
|
...["md", "sm", "xs"].map(
|
|
64115
|
-
(sz) => (0,
|
|
64129
|
+
(sz) => (0, import_react80.createElement)(
|
|
64116
64130
|
"div",
|
|
64117
64131
|
{ key: sz, style: { display: "flex", gap: "6px", flexWrap: "wrap", alignItems: "center" } },
|
|
64118
|
-
(0,
|
|
64119
|
-
(0,
|
|
64120
|
-
(0,
|
|
64121
|
-
(0,
|
|
64122
|
-
(0,
|
|
64132
|
+
(0, import_react80.createElement)(Chip, { size: sz, tone: "warning" }, t3("chipOverdue")),
|
|
64133
|
+
(0, import_react80.createElement)(Chip, { size: sz, tone: "danger" }, t3("chipStalled")),
|
|
64134
|
+
(0, import_react80.createElement)(Chip, { size: sz, tone: "success" }, t3("chipDone")),
|
|
64135
|
+
(0, import_react80.createElement)(Chip, { size: sz, tone: "business" }, t3("chipDoing")),
|
|
64136
|
+
(0, import_react80.createElement)(Chip, { size: sz }, `Tag ${sz.toUpperCase()}`)
|
|
64123
64137
|
)
|
|
64124
64138
|
),
|
|
64125
64139
|
// 中性 # 标签(语言无关)+ 长文字回归样
|
|
64126
|
-
(0,
|
|
64140
|
+
(0, import_react80.createElement)(
|
|
64127
64141
|
"div",
|
|
64128
64142
|
{ style: { display: "flex", gap: "6px", flexWrap: "wrap", alignItems: "center" } },
|
|
64129
|
-
(0,
|
|
64130
|
-
(0,
|
|
64131
|
-
(0,
|
|
64132
|
-
(0,
|
|
64143
|
+
(0, import_react80.createElement)(Chip, null, "#npm"),
|
|
64144
|
+
(0, import_react80.createElement)(Chip, null, "#\u6784\u5EFA"),
|
|
64145
|
+
(0, import_react80.createElement)(Chip, { onClick: () => notify("\u70B9\u4E86 chip") }, "#\u53EF\u70B9"),
|
|
64146
|
+
(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
64147
|
)
|
|
64134
64148
|
)
|
|
64135
64149
|
),
|
|
64136
|
-
(0,
|
|
64150
|
+
(0, import_react80.createElement)(
|
|
64137
64151
|
Example,
|
|
64138
64152
|
{ title: t3("chipWidthTitle"), hint: t3("chipWidthHint"), code: CODE_CHIP_WIDTH },
|
|
64139
|
-
(0,
|
|
64153
|
+
(0, import_react80.createElement)(
|
|
64140
64154
|
"div",
|
|
64141
64155
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64142
|
-
(0,
|
|
64156
|
+
(0, import_react80.createElement)(
|
|
64143
64157
|
Labeled,
|
|
64144
64158
|
{ label: "width\uFF08\u56FA\u5B9A\u5BBD\uFF09" },
|
|
64145
|
-
(0,
|
|
64159
|
+
(0, import_react80.createElement)(Chip, { width: 90 }, "90px \u56FA\u5B9A\u5BBD")
|
|
64146
64160
|
),
|
|
64147
|
-
(0,
|
|
64161
|
+
(0, import_react80.createElement)(
|
|
64148
64162
|
Labeled,
|
|
64149
64163
|
{ label: "minWidth\uFF08\u6700\u5C0F\u5BBD\uFF1A\u77ED / \u957F\u540C\u5BBD\uFF09" },
|
|
64150
|
-
(0,
|
|
64164
|
+
(0, import_react80.createElement)(
|
|
64151
64165
|
"div",
|
|
64152
64166
|
{ style: { display: "flex", gap: "8px" } },
|
|
64153
|
-
(0,
|
|
64154
|
-
(0,
|
|
64167
|
+
(0, import_react80.createElement)(Chip, { minWidth: 90 }, "\u77ED"),
|
|
64168
|
+
(0, import_react80.createElement)(Chip, { minWidth: 90 }, "\u5F88\u957F\u5F88\u957F\u5F88\u957F")
|
|
64155
64169
|
)
|
|
64156
64170
|
),
|
|
64157
|
-
(0,
|
|
64171
|
+
(0, import_react80.createElement)(
|
|
64158
64172
|
Labeled,
|
|
64159
64173
|
{ label: "maxWidth\uFF08\u6700\u5927\u5BBD\uFF1A\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\uFF09" },
|
|
64160
|
-
(0,
|
|
64174
|
+
(0, import_react80.createElement)(
|
|
64161
64175
|
"div",
|
|
64162
64176
|
{ style: { width: "260px" } },
|
|
64163
|
-
(0,
|
|
64177
|
+
(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
64178
|
)
|
|
64165
64179
|
),
|
|
64166
|
-
(0,
|
|
64180
|
+
(0, import_react80.createElement)(
|
|
64167
64181
|
Labeled,
|
|
64168
64182
|
{ label: "\u4E09\u8005\u540C\u8BBE \u21D2 width \u4F18\u5148" },
|
|
64169
|
-
(0,
|
|
64183
|
+
(0, import_react80.createElement)(Chip, { width: 90, minWidth: 160, maxWidth: 120 }, "\u56FA\u5B9A\u5BBD\u4F18\u5148")
|
|
64170
64184
|
)
|
|
64171
64185
|
)
|
|
64172
64186
|
),
|
|
64173
|
-
(0,
|
|
64187
|
+
(0, import_react80.createElement)(
|
|
64174
64188
|
Example,
|
|
64175
64189
|
{ title: t3("marqueeTitle"), hint: t3("exMarqueeHint"), code: CODE_MARQUEE },
|
|
64176
|
-
(0,
|
|
64190
|
+
(0, import_react80.createElement)(
|
|
64177
64191
|
"div",
|
|
64178
64192
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", alignItems: "flex-start" } },
|
|
64179
|
-
(0,
|
|
64193
|
+
(0, import_react80.createElement)(
|
|
64180
64194
|
"div",
|
|
64181
64195
|
{ style: { maxWidth: "148px" } },
|
|
64182
|
-
(0,
|
|
64196
|
+
(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
64197
|
),
|
|
64184
|
-
(0,
|
|
64198
|
+
(0, import_react80.createElement)(
|
|
64185
64199
|
Chip,
|
|
64186
64200
|
{ tone: "business", size: "md", maxWidth: 148 },
|
|
64187
64201
|
"\u6807\u7B7E\u91CC\u6EDA\u52A8\uFF1A\u4E00\u6761\u5F88\u957F\u7684\u4EFB\u52A1\u6807\u9898\uFF0Chover \u8DD1\u9A6C\u706F"
|
|
64188
64202
|
)
|
|
64189
64203
|
)
|
|
64190
64204
|
),
|
|
64191
|
-
(0,
|
|
64205
|
+
(0, import_react80.createElement)(
|
|
64192
64206
|
Example,
|
|
64193
64207
|
{ title: t3("liveTitle"), hint: t3("exLiveHint"), code: CODE_LIVE },
|
|
64194
|
-
(0,
|
|
64208
|
+
(0, import_react80.createElement)(LiveText, { render: (nowMs) => new Date(nowMs).toLocaleTimeString() })
|
|
64195
64209
|
),
|
|
64196
|
-
(0,
|
|
64197
|
-
(0,
|
|
64210
|
+
(0, import_react80.createElement)(DocCode, { id: "chip" }),
|
|
64211
|
+
(0, import_react80.createElement)(DocApi, { id: "chip" })
|
|
64198
64212
|
);
|
|
64199
64213
|
}
|
|
64200
64214
|
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 +64236,9 @@ const ok = await confirmModal({
|
|
|
64222
64236
|
tone: 'danger', confirmText: '\u5220\u9664', cancelText: '\u518D\u60F3\u60F3', skin: 'host',
|
|
64223
64237
|
})
|
|
64224
64238
|
await alertModal({ title: '\u5BBF\u4E3B\u63D0\u793A', message: '\u5173\u95ED\u5373\u786E\u8BA4', skin: 'host' })`;
|
|
64239
|
+
var demoWait = (ms = 1400) => new Promise((r2) => {
|
|
64240
|
+
setTimeout(r2, ms);
|
|
64241
|
+
});
|
|
64225
64242
|
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
64243
|
<AlertModal
|
|
64227
64244
|
severity="warning"
|
|
@@ -64243,7 +64260,23 @@ var CODE_SMALL_MODAL = `// \u6211\u4EEC\u7684\u6807\u51C6\u5C0F\u6846\uFF1A\u540
|
|
|
64243
64260
|
if (await confirmModal({ title: '\u786E\u8BA4\u63D0\u4EA4', message: '\u63D0\u4EA4\u540E\u4E0D\u53EF\u64A4\u9500', tone: 'danger' })) {
|
|
64244
64261
|
// \u7528\u6237\u70B9\u4E86\u786E\u8BA4
|
|
64245
64262
|
}
|
|
64246
|
-
await alertModal({ title: '\u63D0\u793A', message: '\u8FD9\u662F\u547D\u4EE4\u5F0F alert\uFF0C\u5173\u95ED\u5373\u786E\u8BA4' })
|
|
64263
|
+
await alertModal({ title: '\u63D0\u793A', message: '\u8FD9\u662F\u547D\u4EE4\u5F0F alert\uFF0C\u5173\u95ED\u5373\u786E\u8BA4' })
|
|
64264
|
+
|
|
64265
|
+
// \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
|
|
64266
|
+
await alertModal({
|
|
64267
|
+
title: '\u6B63\u5728\u4FDD\u5B58',
|
|
64268
|
+
message: '\u70B9\u300C\u786E\u5B9A\u300D\u624D\u5F00\u59CB\u8DD1\uFF0C\u8DD1\u5B8C\u81EA\u5DF1\u5173',
|
|
64269
|
+
onConfirm: async () => { await save() },
|
|
64270
|
+
})
|
|
64271
|
+
const ok = await confirmModal({
|
|
64272
|
+
title: '\u5220\u9664\u4EFB\u52A1',
|
|
64273
|
+
message: '\u5904\u7406\u671F\u95F4\u5F39\u7A97\u4E0D\u53EF\u5173\u95ED',
|
|
64274
|
+
tone: 'danger',
|
|
64275
|
+
onConfirm: async () => { await remove() }, // \u786E\u8BA4\u94AE\u8F6C\u5708
|
|
64276
|
+
onCancel: async () => { await check() }, // \u53D6\u6D88\u94AE\u4E5F\u80FD\u8F6C\u5708
|
|
64277
|
+
})
|
|
64278
|
+
// \u7EC4\u4EF6\u5F62\u6001\u81EA\u5DF1\u63A7\uFF1AconfirmLoading / cancelLoading
|
|
64279
|
+
<ConfirmModal message="\u2026" confirmLoading={saving} onConfirm={\u2026} />`;
|
|
64247
64280
|
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
64281
|
<Modal title="\u4EFB\u52A1\u8BE6\u60C5" onClose={close} footer={<Button variant="primary">\u77E5\u9053\u4E86</Button>}>
|
|
64249
64282
|
<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 +64312,6 @@ var CODE_SIDE_SHEET = `// \u8986\u76D6\u5F0F\u4FA7\u8FB9\u62BD\u5C49\uFF1A\u76AE
|
|
|
64279
64312
|
footer={<Button variant="primary">\u5E94\u7528</Button>}>
|
|
64280
64313
|
<FilterForm />
|
|
64281
64314
|
</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
64315
|
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
64316
|
notify('\u5DF2\u4FDD\u5B58\u8349\u7A3F')
|
|
64295
64317
|
notify('\u4FDD\u5B58\u6210\u529F', { variant: 'success' })
|
|
@@ -64343,72 +64365,72 @@ blocked.close()
|
|
|
64343
64365
|
<LoadingToast text="\u6B63\u5728\u52A0\u8F7D" />
|
|
64344
64366
|
<LoadingBlock text="\u5904\u7406\u4E2D" />`;
|
|
64345
64367
|
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 [sheetCfg, setSheetCfg] = (0,
|
|
64354
|
-
const [sheetOpen, setSheetOpen] = (0,
|
|
64355
|
-
const [nativeText, setNativeText] = (0,
|
|
64368
|
+
const [open, setOpen] = (0, import_react80.useState)(false);
|
|
64369
|
+
const [openNative, setOpenNative] = (0, import_react80.useState)(false);
|
|
64370
|
+
const [alertState, setAlertState] = (0, import_react80.useState)(null);
|
|
64371
|
+
const [confirmCfg, setConfirmCfg] = (0, import_react80.useState)(null);
|
|
64372
|
+
const [confirmResult, setConfirmResult] = (0, import_react80.useState)("");
|
|
64373
|
+
const [largeOpen, setLargeOpen] = (0, import_react80.useState)(false);
|
|
64374
|
+
const [largeOpenB, setLargeOpenB] = (0, import_react80.useState)(false);
|
|
64375
|
+
const [sheetCfg, setSheetCfg] = (0, import_react80.useState)({ side: "left", footer: false });
|
|
64376
|
+
const [sheetOpen, setSheetOpen] = (0, import_react80.useState)(false);
|
|
64377
|
+
const [nativeText, setNativeText] = (0, import_react80.useState)("");
|
|
64356
64378
|
const flash = (opts) => {
|
|
64357
64379
|
const handle = showLoading(opts);
|
|
64358
64380
|
window.setTimeout(() => handle.close(), 1200);
|
|
64359
64381
|
};
|
|
64360
|
-
return (0,
|
|
64382
|
+
return (0, import_react80.createElement)(
|
|
64361
64383
|
"div",
|
|
64362
64384
|
null,
|
|
64363
|
-
(0,
|
|
64364
|
-
(0,
|
|
64385
|
+
(0, import_react80.createElement)(DocProse, { id: "feedback" }),
|
|
64386
|
+
(0, import_react80.createElement)(
|
|
64365
64387
|
Example,
|
|
64366
64388
|
{ title: t3("exSmallModalTitle"), hint: t3("exSmallModalHint"), code: CODE_SMALL_MODAL },
|
|
64367
|
-
(0,
|
|
64389
|
+
(0, import_react80.createElement)(
|
|
64368
64390
|
"div",
|
|
64369
64391
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64370
|
-
(0,
|
|
64392
|
+
(0, import_react80.createElement)(
|
|
64371
64393
|
"div",
|
|
64372
64394
|
null,
|
|
64373
|
-
(0,
|
|
64374
|
-
(0,
|
|
64395
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "AlertModal\uFF08\u7EC4\u4EF6\uFF09"),
|
|
64396
|
+
(0, import_react80.createElement)(
|
|
64375
64397
|
"div",
|
|
64376
64398
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64377
|
-
(0,
|
|
64378
|
-
(0,
|
|
64379
|
-
(0,
|
|
64380
|
-
(0,
|
|
64381
|
-
(0,
|
|
64399
|
+
(0, import_react80.createElement)(Button, { onClick: () => setAlertState({ sev: "info", titled: true }) }, "info"),
|
|
64400
|
+
(0, import_react80.createElement)(Button, { onClick: () => setAlertState({ sev: "success", titled: true }) }, "success"),
|
|
64401
|
+
(0, import_react80.createElement)(Button, { onClick: () => setAlertState({ sev: "warning", titled: true }) }, "warning"),
|
|
64402
|
+
(0, import_react80.createElement)(Button, { onClick: () => setAlertState({ sev: "error", titled: true }) }, "error"),
|
|
64403
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setAlertState({ sev: "warning", titled: false }) }, "\u65E0\u6807\u9898")
|
|
64382
64404
|
),
|
|
64383
|
-
alertState !== null ? (0,
|
|
64405
|
+
alertState !== null ? (0, import_react80.createElement)(AlertModal, {
|
|
64384
64406
|
severity: alertState.sev,
|
|
64385
64407
|
title: alertState.titled ? "\u64CD\u4F5C\u7ED3\u679C" : void 0,
|
|
64386
64408
|
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
64409
|
onConfirm: () => setAlertState(null)
|
|
64388
64410
|
}) : null
|
|
64389
64411
|
),
|
|
64390
|
-
(0,
|
|
64412
|
+
(0, import_react80.createElement)(
|
|
64391
64413
|
"div",
|
|
64392
64414
|
null,
|
|
64393
|
-
(0,
|
|
64394
|
-
(0,
|
|
64415
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "ConfirmModal\uFF08\u7EC4\u4EF6\uFF09"),
|
|
64416
|
+
(0, import_react80.createElement)(
|
|
64395
64417
|
"div",
|
|
64396
64418
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" } },
|
|
64397
|
-
(0,
|
|
64419
|
+
(0, import_react80.createElement)(Button, { onClick: () => {
|
|
64398
64420
|
setConfirmCfg({ tone: "primary", confirmText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" });
|
|
64399
64421
|
setConfirmResult("");
|
|
64400
64422
|
} }, "\u9ED8\u8BA4\uFF08primary\uFF09"),
|
|
64401
|
-
(0,
|
|
64423
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => {
|
|
64402
64424
|
setConfirmCfg({ tone: "danger", confirmText: "\u5220\u9664", cancelText: "\u518D\u60F3\u60F3" });
|
|
64403
64425
|
setConfirmResult("");
|
|
64404
64426
|
} }, "danger \u53D8\u4F53"),
|
|
64405
|
-
(0,
|
|
64427
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => {
|
|
64406
64428
|
setConfirmCfg({ tone: "warning", confirmText: "\u6211\u5DF2\u77E5\u6653", cancelText: "\u8FD4\u56DE" });
|
|
64407
64429
|
setConfirmResult("");
|
|
64408
64430
|
} }, "\u6539\u6587\u6848"),
|
|
64409
|
-
confirmResult ? (0,
|
|
64431
|
+
confirmResult ? (0, import_react80.createElement)("span", { style: { fontSize: "13px", color: "var(--dshpc-fg-3)" } }, confirmResult) : null
|
|
64410
64432
|
),
|
|
64411
|
-
confirmCfg !== null ? (0,
|
|
64433
|
+
confirmCfg !== null ? (0, import_react80.createElement)(ConfirmModal, {
|
|
64412
64434
|
title: "\u5220\u9664\u4EFB\u52A1",
|
|
64413
64435
|
message: "\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",
|
|
64414
64436
|
tone: confirmCfg.tone,
|
|
@@ -64424,156 +64446,220 @@ function FeedbackPage() {
|
|
|
64424
64446
|
}
|
|
64425
64447
|
}) : null
|
|
64426
64448
|
),
|
|
64427
|
-
(0,
|
|
64449
|
+
(0, import_react80.createElement)(
|
|
64428
64450
|
"div",
|
|
64429
64451
|
null,
|
|
64430
|
-
(0,
|
|
64431
|
-
(0,
|
|
64452
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "\u547D\u4EE4\u5F0F\uFF08Promise\uFF09"),
|
|
64453
|
+
(0, import_react80.createElement)(
|
|
64432
64454
|
"div",
|
|
64433
64455
|
{ 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(() =>
|
|
64456
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => {
|
|
64457
|
+
alertModal({ title: "\u63D0\u793A", message: "\u8FD9\u662F\u547D\u4EE4\u5F0F alert\uFF0C\u5173\u95ED\u5373\u786E\u8BA4" }).then(() => notify("alert \u5DF2\u5173\u95ED"));
|
|
64436
64458
|
} }, "alertModal()"),
|
|
64437
|
-
(0,
|
|
64459
|
+
(0, import_react80.createElement)(Button, { onClick: async () => {
|
|
64438
64460
|
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
|
-
|
|
64461
|
+
notify(ok ? "\u4F60\u70B9\u4E86\uFF1A\u63D0\u4EA4" : "\u4F60\u70B9\u4E86\uFF1A\u53D6\u6D88");
|
|
64440
64462
|
} }, "confirmModal()")
|
|
64463
|
+
),
|
|
64464
|
+
// 异步回调 ⇒ 对应按钮自动转圈、整框锁死,settle 后才关(1.4 秒演示)
|
|
64465
|
+
(0, import_react80.createElement)(
|
|
64466
|
+
"div",
|
|
64467
|
+
{ style: { display: "flex", flexWrap: "wrap", gap: "8px", marginTop: "8px", alignItems: "center" } },
|
|
64468
|
+
(0, import_react80.createElement)(Button, {
|
|
64469
|
+
variant: "outline",
|
|
64470
|
+
onClick: () => {
|
|
64471
|
+
void alertModal({
|
|
64472
|
+
title: "\u6B63\u5728\u4FDD\u5B58",
|
|
64473
|
+
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",
|
|
64474
|
+
confirmText: "\u4FDD\u5B58",
|
|
64475
|
+
onConfirm: async () => {
|
|
64476
|
+
await demoWait();
|
|
64477
|
+
}
|
|
64478
|
+
}).then(() => notify("\u4FDD\u5B58\u5B8C\u6210\uFF0Calert \u5DF2\u5173\u95ED"));
|
|
64479
|
+
}
|
|
64480
|
+
}, "alertModal() \xB7 \u5F02\u6B65\u786E\u8BA4"),
|
|
64481
|
+
(0, import_react80.createElement)(Button, {
|
|
64482
|
+
onClick: async () => {
|
|
64483
|
+
const ok = await confirmModal({
|
|
64484
|
+
title: "\u5220\u9664\u4EFB\u52A1",
|
|
64485
|
+
message: "\u786E\u8BA4\u94AE\u8F6C\u5708\u671F\u95F4\u6574\u6846\u4E0D\u53EF\u5173\uFF1B\u53D6\u6D88\u94AE\u7167\u5E38\u53EF\u70B9\u3002",
|
|
64486
|
+
tone: "danger",
|
|
64487
|
+
confirmText: "\u5220\u9664",
|
|
64488
|
+
cancelText: "\u53D6\u6D88",
|
|
64489
|
+
onConfirm: async () => {
|
|
64490
|
+
await demoWait();
|
|
64491
|
+
}
|
|
64492
|
+
});
|
|
64493
|
+
notify(ok ? "\u5220\u9664\u5B8C\u6210\uFF08\u786E\u8BA4\u4E3A true\uFF09" : "\u5DF2\u53D6\u6D88\uFF08false\uFF09");
|
|
64494
|
+
}
|
|
64495
|
+
}, "confirmModal() \xB7 \u5F02\u6B65\u786E\u8BA4"),
|
|
64496
|
+
(0, import_react80.createElement)(Button, {
|
|
64497
|
+
variant: "outline",
|
|
64498
|
+
onClick: async () => {
|
|
64499
|
+
const ok = await confirmModal({
|
|
64500
|
+
title: "\u79BB\u5F00\u524D\u68C0\u67E5",
|
|
64501
|
+
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",
|
|
64502
|
+
confirmText: "\u7559\u5728\u9875\u9762",
|
|
64503
|
+
cancelText: "\u68C0\u67E5\u5E76\u79BB\u5F00",
|
|
64504
|
+
onCancel: async () => {
|
|
64505
|
+
await demoWait();
|
|
64506
|
+
}
|
|
64507
|
+
});
|
|
64508
|
+
notify(ok ? "\u4F60\u70B9\u4E86\uFF1A\u7559\u5728\u9875\u9762" : "\u68C0\u67E5\u5B8C\u6210\uFF0C\u5DF2\u79BB\u5F00\uFF08false\uFF09");
|
|
64509
|
+
}
|
|
64510
|
+
}, "confirmModal() \xB7 \u5F02\u6B65\u53D6\u6D88"),
|
|
64511
|
+
(0, import_react80.createElement)(Button, {
|
|
64512
|
+
variant: "ghost",
|
|
64513
|
+
onClick: async () => {
|
|
64514
|
+
const ok = await confirmModal({
|
|
64515
|
+
title: "\u53EF\u80FD\u5931\u8D25",
|
|
64516
|
+
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",
|
|
64517
|
+
confirmText: "\u6267\u884C",
|
|
64518
|
+
cancelText: "\u7B97\u4E86",
|
|
64519
|
+
onConfirm: async () => {
|
|
64520
|
+
await demoWait();
|
|
64521
|
+
throw new Error("\u6F14\u793A\uFF1A\u5F02\u6B65\u5904\u7406\u5931\u8D25");
|
|
64522
|
+
}
|
|
64523
|
+
});
|
|
64524
|
+
notify(ok ? "\u610F\u5916\u6210\u529F" : "\u5DF2\u53D6\u6D88\uFF08false\uFF09");
|
|
64525
|
+
}
|
|
64526
|
+
}, "confirmModal() \xB7 \u5F02\u6B65\u5931\u8D25")
|
|
64441
64527
|
)
|
|
64442
64528
|
)
|
|
64443
64529
|
)
|
|
64444
64530
|
),
|
|
64445
|
-
(0,
|
|
64531
|
+
(0, import_react80.createElement)(
|
|
64446
64532
|
Example,
|
|
64447
64533
|
{ title: t3("exLargeModalTitle"), hint: t3("exLargeModalHint"), code: CODE_LARGE_MODAL },
|
|
64448
|
-
(0,
|
|
64534
|
+
(0, import_react80.createElement)(
|
|
64449
64535
|
"div",
|
|
64450
64536
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64451
|
-
(0,
|
|
64537
|
+
(0, import_react80.createElement)(
|
|
64452
64538
|
"div",
|
|
64453
64539
|
null,
|
|
64454
|
-
(0,
|
|
64455
|
-
(0,
|
|
64456
|
-
open ? (0,
|
|
64540
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "\u9ED8\u8BA4\uFF08md\uFF09"),
|
|
64541
|
+
(0, import_react80.createElement)(Button, { onClick: () => setOpen(true) }, "\u6253\u5F00\u5927\u5F39\u7A97\uFF08md \u9ED8\u8BA4\uFF09"),
|
|
64542
|
+
open ? (0, import_react80.createElement)(Modal, {
|
|
64457
64543
|
title: "\u4EFB\u52A1\u8BE6\u60C5",
|
|
64458
64544
|
onClose: () => setOpen(false),
|
|
64459
|
-
footer: (0,
|
|
64460
|
-
}, (0,
|
|
64545
|
+
footer: (0, import_react80.createElement)(Button, { variant: "primary", onClick: () => setOpen(false) }, "\u77E5\u9053\u4E86")
|
|
64546
|
+
}, (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
64547
|
),
|
|
64462
|
-
(0,
|
|
64548
|
+
(0, import_react80.createElement)(
|
|
64463
64549
|
"div",
|
|
64464
64550
|
null,
|
|
64465
|
-
(0,
|
|
64466
|
-
(0,
|
|
64467
|
-
largeOpen ? (0,
|
|
64551
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "\u5E26 footer\uFF08lg\uFF09"),
|
|
64552
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setLargeOpen(true) }, "\u6253\u5F00\u5927\u5F39\u7A97\uFF08\u5E26 footer\uFF09"),
|
|
64553
|
+
largeOpen ? (0, import_react80.createElement)(
|
|
64468
64554
|
Modal,
|
|
64469
64555
|
{
|
|
64470
64556
|
size: "lg",
|
|
64471
64557
|
title: "\u4F1A\u8BDD\u8BB0\u5F55",
|
|
64472
|
-
headerActions: (0,
|
|
64558
|
+
headerActions: (0, import_react80.createElement)(
|
|
64473
64559
|
Button,
|
|
64474
64560
|
{ variant: "outline", size: "sm", icon: iconOf("chevron", 14) },
|
|
64475
64561
|
"\u66F4\u591A"
|
|
64476
64562
|
),
|
|
64477
64563
|
onClose: () => setLargeOpen(false),
|
|
64478
|
-
footer: (0,
|
|
64564
|
+
footer: (0, import_react80.createElement)(
|
|
64479
64565
|
"div",
|
|
64480
64566
|
{ style: { display: "flex", justifyContent: "flex-end", gap: "8px" } },
|
|
64481
|
-
(0,
|
|
64482
|
-
(0,
|
|
64567
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setLargeOpen(false) }, "\u5173\u95ED"),
|
|
64568
|
+
(0, import_react80.createElement)(Button, { variant: "primary", onClick: () => setLargeOpen(false) }, "\u5B8C\u6210")
|
|
64483
64569
|
)
|
|
64484
64570
|
},
|
|
64485
|
-
(0,
|
|
64571
|
+
(0, import_react80.createElement)(
|
|
64486
64572
|
"div",
|
|
64487
64573
|
null,
|
|
64488
64574
|
Array.from(
|
|
64489
64575
|
{ length: 40 },
|
|
64490
|
-
(_, i2) => (0,
|
|
64576
|
+
(_, 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
64577
|
),
|
|
64492
|
-
(0,
|
|
64578
|
+
(0, import_react80.createElement)("div", { className: "dshpc-overlay-head__sid" }, "\u5171 128 \u6761 \xB7 \u6700\u8FD1\u66F4\u65B0 2 \u5206\u949F\u524D")
|
|
64493
64579
|
)
|
|
64494
64580
|
) : null
|
|
64495
64581
|
),
|
|
64496
|
-
(0,
|
|
64582
|
+
(0, import_react80.createElement)(
|
|
64497
64583
|
"div",
|
|
64498
64584
|
null,
|
|
64499
|
-
(0,
|
|
64500
|
-
(0,
|
|
64501
|
-
largeOpenB ? (0,
|
|
64585
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "12px", color: "var(--dshpc-fg-3)", marginBottom: "6px" } }, "\u65E0 footer\uFF08\u5185\u5BB9\u81EA\u5B9A\u4E49\uFF09"),
|
|
64586
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setLargeOpenB(true) }, "\u6253\u5F00\u5927\u5F39\u7A97\uFF08\u65E0 footer\uFF09"),
|
|
64587
|
+
largeOpenB ? (0, import_react80.createElement)(
|
|
64502
64588
|
Modal,
|
|
64503
64589
|
{
|
|
64504
64590
|
size: "lg",
|
|
64505
|
-
title: (0,
|
|
64591
|
+
title: (0, import_react80.createElement)(
|
|
64506
64592
|
"div",
|
|
64507
64593
|
null,
|
|
64508
|
-
(0,
|
|
64509
|
-
(0,
|
|
64594
|
+
(0, import_react80.createElement)("div", { style: { fontWeight: 600 } }, "\u4EFB\u52A1\u8BE6\u60C5"),
|
|
64595
|
+
(0, import_react80.createElement)("div", { className: "dshpc-overlay-head__sid" }, "sid-2026-1020-7f3a \xB7 5 \u4E2A\u6B65\u9AA4")
|
|
64510
64596
|
),
|
|
64511
64597
|
onClose: () => setLargeOpenB(false)
|
|
64512
64598
|
},
|
|
64513
|
-
(0,
|
|
64599
|
+
(0, import_react80.createElement)(
|
|
64514
64600
|
"div",
|
|
64515
64601
|
null,
|
|
64516
|
-
(0,
|
|
64517
|
-
(0,
|
|
64602
|
+
(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"),
|
|
64603
|
+
(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
64604
|
)
|
|
64519
64605
|
) : null
|
|
64520
64606
|
)
|
|
64521
64607
|
)
|
|
64522
64608
|
),
|
|
64523
|
-
(0,
|
|
64609
|
+
(0, import_react80.createElement)(
|
|
64524
64610
|
Example,
|
|
64525
64611
|
{ title: t3("exSideSheetTitle"), hint: t3("exSideSheetHint"), code: CODE_SIDE_SHEET },
|
|
64526
|
-
(0,
|
|
64612
|
+
(0, import_react80.createElement)(
|
|
64527
64613
|
"div",
|
|
64528
64614
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64529
|
-
(0,
|
|
64615
|
+
(0, import_react80.createElement)(Button, { onClick: () => {
|
|
64530
64616
|
setSheetCfg({ side: "left", footer: false });
|
|
64531
64617
|
setSheetOpen(true);
|
|
64532
64618
|
} }, "\u4ECE\u5DE6\u4FA7\u6ED1\u51FA"),
|
|
64533
|
-
(0,
|
|
64619
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => {
|
|
64534
64620
|
setSheetCfg({ side: "right", footer: false });
|
|
64535
64621
|
setSheetOpen(true);
|
|
64536
64622
|
} }, "\u4ECE\u53F3\u4FA7\u6ED1\u51FA"),
|
|
64537
|
-
(0,
|
|
64623
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => {
|
|
64538
64624
|
setSheetCfg({ side: "left", footer: true });
|
|
64539
64625
|
setSheetOpen(true);
|
|
64540
64626
|
} }, "\u5E26\u5E95\u680F"),
|
|
64541
64627
|
// 常驻渲染 + open 布尔:关闭时才有收回去的动效(条件渲染会一卸载就没影)。
|
|
64542
|
-
(0,
|
|
64628
|
+
(0, import_react80.createElement)(
|
|
64543
64629
|
SideSheet,
|
|
64544
64630
|
{
|
|
64545
64631
|
open: sheetOpen,
|
|
64546
64632
|
side: sheetCfg.side,
|
|
64547
64633
|
title: "\u6587\u4EF6\u8BE6\u60C5",
|
|
64548
|
-
extra: (0,
|
|
64634
|
+
extra: (0, import_react80.createElement)(Chip, null, "\u53EA\u8BFB"),
|
|
64549
64635
|
onClose: () => setSheetOpen(false),
|
|
64550
|
-
footer: sheetCfg.footer ? (0,
|
|
64636
|
+
footer: sheetCfg.footer ? (0, import_react80.createElement)(Button, { variant: "primary", onClick: () => setSheetOpen(false) }, "\u77E5\u9053\u4E86") : void 0
|
|
64551
64637
|
},
|
|
64552
|
-
(0,
|
|
64638
|
+
(0, import_react80.createElement)(
|
|
64553
64639
|
"div",
|
|
64554
64640
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", fontSize: "13px", lineHeight: "1.7" } },
|
|
64555
|
-
(0,
|
|
64556
|
-
(0,
|
|
64557
|
-
(0,
|
|
64641
|
+
(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"),
|
|
64642
|
+
(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"),
|
|
64643
|
+
(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
64644
|
)
|
|
64559
64645
|
)
|
|
64560
64646
|
)
|
|
64561
64647
|
),
|
|
64562
|
-
(0,
|
|
64648
|
+
(0, import_react80.createElement)(
|
|
64563
64649
|
Example,
|
|
64564
64650
|
{ title: t3("exHostModalTitle"), hint: t3("exHostModalHint"), code: CODE_HOST_MODAL },
|
|
64565
|
-
(0,
|
|
64651
|
+
(0, import_react80.createElement)(
|
|
64566
64652
|
"div",
|
|
64567
64653
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64568
|
-
(0,
|
|
64569
|
-
(0,
|
|
64654
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setOpenNative(true) }, "\u6253\u5F00\u5BBF\u4E3B\u539F\u751F\u5F39\u7A97\uFF08\u7EC4\u4EF6\uFF09"),
|
|
64655
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => {
|
|
64570
64656
|
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
64657
|
} }, 'alertModal({skin:"host"})'),
|
|
64572
|
-
(0,
|
|
64658
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: async () => {
|
|
64573
64659
|
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
|
-
|
|
64660
|
+
notify(ok ? "\u5BBF\u4E3B confirm\uFF1A\u4F60\u70B9\u4E86\u5220\u9664" : "\u5BBF\u4E3B confirm\uFF1A\u4F60\u70B9\u4E86\u53D6\u6D88");
|
|
64575
64661
|
} }, 'confirmModal({skin:"host"})'),
|
|
64576
|
-
openNative ? (0,
|
|
64662
|
+
openNative ? (0, import_react80.createElement)(
|
|
64577
64663
|
Official.Modal,
|
|
64578
64664
|
{
|
|
64579
64665
|
open: openNative,
|
|
@@ -64582,22 +64668,22 @@ function FeedbackPage() {
|
|
|
64582
64668
|
closeLabel: "\u5173\u95ED",
|
|
64583
64669
|
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
64670
|
contentClassName: "dshpc-native-demo-content",
|
|
64585
|
-
footer: (0,
|
|
64671
|
+
footer: (0, import_react80.createElement)(
|
|
64586
64672
|
"div",
|
|
64587
64673
|
{ style: { display: "flex", justifyContent: "flex-end", gap: "8px" } },
|
|
64588
|
-
(0,
|
|
64589
|
-
(0,
|
|
64590
|
-
(0,
|
|
64674
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => setOpenNative(false) }, "\u53D6\u6D88"),
|
|
64675
|
+
(0, import_react80.createElement)(Button, { variant: "danger", onClick: () => setOpenNative(false) }, "\u5220\u9664"),
|
|
64676
|
+
(0, import_react80.createElement)(Button, { variant: "primary", onClick: () => setOpenNative(false) }, "\u786E\u8BA4")
|
|
64591
64677
|
)
|
|
64592
64678
|
},
|
|
64593
|
-
(0,
|
|
64679
|
+
(0, import_react80.createElement)(
|
|
64594
64680
|
"div",
|
|
64595
64681
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64596
|
-
(0,
|
|
64597
|
-
(0,
|
|
64682
|
+
(0, import_react80.createElement)(Input, { value: nativeText, onChange: setNativeText, placeholder: "\u81EA\u5B9A\u4E49\u8F93\u5165\u6846\uFF08\u6765\u81EA core \u63A7\u4EF6\uFF09" }),
|
|
64683
|
+
(0, import_react80.createElement)(
|
|
64598
64684
|
"label",
|
|
64599
64685
|
{ style: { display: "flex", gap: "8px", alignItems: "center", fontSize: "13px" } },
|
|
64600
|
-
(0,
|
|
64686
|
+
(0, import_react80.createElement)(Checkbox, { checked: false, onChange: () => {
|
|
64601
64687
|
} }),
|
|
64602
64688
|
"\u81EA\u5B9A\u4E49\u52FE\u9009\u9879"
|
|
64603
64689
|
)
|
|
@@ -64605,17 +64691,17 @@ function FeedbackPage() {
|
|
|
64605
64691
|
) : null
|
|
64606
64692
|
)
|
|
64607
64693
|
),
|
|
64608
|
-
(0,
|
|
64694
|
+
(0, import_react80.createElement)(
|
|
64609
64695
|
Example,
|
|
64610
64696
|
{ title: t3("exToastNotifyTitle"), hint: t3("exToastNotifyHint"), code: CODE_TOAST_NOTIFY },
|
|
64611
|
-
(0,
|
|
64697
|
+
(0, import_react80.createElement)(
|
|
64612
64698
|
"div",
|
|
64613
64699
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64614
|
-
(0,
|
|
64615
|
-
(0,
|
|
64616
|
-
(0,
|
|
64617
|
-
(0,
|
|
64618
|
-
(0,
|
|
64700
|
+
(0, import_react80.createElement)(Button, { onClick: () => notify("\u5DF2\u4FDD\u5B58\u8349\u7A3F") }, "\u666E\u901A(info)"),
|
|
64701
|
+
(0, import_react80.createElement)(Button, { onClick: () => notify("\u4FDD\u5B58\u6210\u529F", { variant: "success" }) }, "\u6210\u529F"),
|
|
64702
|
+
(0, import_react80.createElement)(Button, { onClick: () => notify("\u4FDD\u5B58\u5931\u8D25", { variant: "error" }) }, "\u5931\u8D25"),
|
|
64703
|
+
(0, import_react80.createElement)(Button, { onClick: () => notify("\u78C1\u76D8\u7A7A\u95F4\u4E0D\u8DB3", { variant: "warning" }) }, "\u8B66\u544A"),
|
|
64704
|
+
(0, import_react80.createElement)(
|
|
64619
64705
|
Button,
|
|
64620
64706
|
{
|
|
64621
64707
|
onClick: () => notify("\u5DF2\u5220\u9664\u8BE5\u6587\u4EF6", {
|
|
@@ -64626,7 +64712,7 @@ function FeedbackPage() {
|
|
|
64626
64712
|
},
|
|
64627
64713
|
"\u5355\u6309\u94AE+\u63CF\u8FF0"
|
|
64628
64714
|
),
|
|
64629
|
-
(0,
|
|
64715
|
+
(0, import_react80.createElement)(
|
|
64630
64716
|
Button,
|
|
64631
64717
|
{
|
|
64632
64718
|
onClick: () => notify("\u786E\u8BA4\u63D0\u4EA4\u5417\uFF1F", {
|
|
@@ -64641,80 +64727,29 @@ function FeedbackPage() {
|
|
|
64641
64727
|
)
|
|
64642
64728
|
)
|
|
64643
64729
|
),
|
|
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)(
|
|
64730
|
+
(0, import_react80.createElement)(
|
|
64696
64731
|
Example,
|
|
64697
64732
|
{ title: t3("exLoaderTitle"), hint: t3("exLoaderHint"), code: CODE_LOADER },
|
|
64698
|
-
(0,
|
|
64733
|
+
(0, import_react80.createElement)(
|
|
64699
64734
|
"div",
|
|
64700
64735
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64701
64736
|
...LOADER_VARIANTS.map(
|
|
64702
|
-
(variant) => (0,
|
|
64737
|
+
(variant) => (0, import_react80.createElement)(
|
|
64703
64738
|
"div",
|
|
64704
64739
|
{ key: variant, style: { display: "flex", alignItems: "center", gap: "20px", flexWrap: "wrap" } },
|
|
64705
|
-
(0,
|
|
64740
|
+
(0, import_react80.createElement)(
|
|
64706
64741
|
"span",
|
|
64707
64742
|
{ style: { width: "56px", color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)" } },
|
|
64708
64743
|
variant
|
|
64709
64744
|
),
|
|
64710
|
-
...LOADER_SIZES.map((size4) => (0,
|
|
64745
|
+
...LOADER_SIZES.map((size4) => (0, import_react80.createElement)(Loader, { key: size4, variant, size: size4 }))
|
|
64711
64746
|
)
|
|
64712
64747
|
),
|
|
64713
64748
|
// 背景 / 定位 / 颜色都由调用方配:组件本身只是裸图标
|
|
64714
|
-
(0,
|
|
64749
|
+
(0, import_react80.createElement)(
|
|
64715
64750
|
"div",
|
|
64716
64751
|
{ style: { display: "flex", alignItems: "center", gap: "16px", flexWrap: "wrap" } },
|
|
64717
|
-
(0,
|
|
64752
|
+
(0, import_react80.createElement)(
|
|
64718
64753
|
"span",
|
|
64719
64754
|
{
|
|
64720
64755
|
style: {
|
|
@@ -64724,9 +64759,9 @@ function FeedbackPage() {
|
|
|
64724
64759
|
background: "var(--dshpc-surface-sunken)"
|
|
64725
64760
|
}
|
|
64726
64761
|
},
|
|
64727
|
-
(0,
|
|
64762
|
+
(0, import_react80.createElement)(Loader, { size: "sm" })
|
|
64728
64763
|
),
|
|
64729
|
-
(0,
|
|
64764
|
+
(0, import_react80.createElement)(
|
|
64730
64765
|
Surface,
|
|
64731
64766
|
{
|
|
64732
64767
|
padding: null,
|
|
@@ -64739,56 +64774,56 @@ function FeedbackPage() {
|
|
|
64739
64774
|
fontSize: "var(--dshpc-font-xs)"
|
|
64740
64775
|
}
|
|
64741
64776
|
},
|
|
64742
|
-
(0,
|
|
64777
|
+
(0, import_react80.createElement)(Loader, { variant: "blocks", size: "sm" }),
|
|
64743
64778
|
"\u6B63\u5728\u540C\u6B65"
|
|
64744
64779
|
),
|
|
64745
|
-
(0,
|
|
64780
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-business)" } }, (0, import_react80.createElement)(Loader, { size: "lg" }))
|
|
64746
64781
|
),
|
|
64747
64782
|
// 同族的胶囊不定进度:三档尺寸
|
|
64748
|
-
(0,
|
|
64783
|
+
(0, import_react80.createElement)(
|
|
64749
64784
|
"div",
|
|
64750
64785
|
{ style: { display: "flex", alignItems: "center", gap: "20px", flexWrap: "wrap" } },
|
|
64751
|
-
(0,
|
|
64752
|
-
(0,
|
|
64753
|
-
(0,
|
|
64786
|
+
(0, import_react80.createElement)(LoaderBar, { size: "sm" }),
|
|
64787
|
+
(0, import_react80.createElement)(LoaderBar, { size: "md" }),
|
|
64788
|
+
(0, import_react80.createElement)(LoaderBar, { size: "lg" })
|
|
64754
64789
|
)
|
|
64755
64790
|
)
|
|
64756
64791
|
),
|
|
64757
|
-
(0,
|
|
64792
|
+
(0, import_react80.createElement)(
|
|
64758
64793
|
Example,
|
|
64759
64794
|
{ title: t3("exLoadingTitle"), hint: t3("exLoadingHint"), code: CODE_LOADING },
|
|
64760
|
-
(0,
|
|
64795
|
+
(0, import_react80.createElement)(
|
|
64761
64796
|
"div",
|
|
64762
64797
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64763
|
-
(0,
|
|
64798
|
+
(0, import_react80.createElement)(
|
|
64764
64799
|
"div",
|
|
64765
64800
|
{ style: { display: "flex", alignItems: "center", gap: "16px", flexWrap: "wrap" } },
|
|
64766
|
-
(0,
|
|
64767
|
-
(0,
|
|
64801
|
+
(0, import_react80.createElement)(LoadingToast, null),
|
|
64802
|
+
(0, import_react80.createElement)(LoadingBlock, { text: "\u5904\u7406\u4E2D" })
|
|
64768
64803
|
),
|
|
64769
|
-
(0,
|
|
64804
|
+
(0, import_react80.createElement)(
|
|
64770
64805
|
"div",
|
|
64771
64806
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64772
|
-
(0,
|
|
64773
|
-
(0,
|
|
64774
|
-
(0,
|
|
64775
|
-
(0,
|
|
64807
|
+
(0, import_react80.createElement)(Button, { onClick: () => flash() }, "\u5168\u5C40 toast\uFF081.2s\uFF09"),
|
|
64808
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => flash({ variant: "block", text: "\u5904\u7406\u4E2D\u2026" }) }, "\u5168\u5C40 block\uFF081.2s\uFF09"),
|
|
64809
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ text: "\u906E\u7F69 0.3", mask: true, maskOpacity: 0.3 }) }, "\u906E\u7F69 0.3"),
|
|
64810
|
+
(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
64811
|
),
|
|
64777
|
-
(0,
|
|
64812
|
+
(0, import_react80.createElement)(
|
|
64778
64813
|
"div",
|
|
64779
64814
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64780
|
-
(0,
|
|
64781
|
-
(0,
|
|
64782
|
-
(0,
|
|
64783
|
-
(0,
|
|
64784
|
-
(0,
|
|
64785
|
-
(0,
|
|
64786
|
-
(0,
|
|
64815
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "top-left", text: "top-left" }) }, "top-left"),
|
|
64816
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "top-center", text: "top-center" }) }, "top-center"),
|
|
64817
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "top-right", text: "top-right" }) }, "top-right"),
|
|
64818
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "center", text: "center" }) }, "center"),
|
|
64819
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "bottom-left", text: "bottom-left" }) }, "bottom-left"),
|
|
64820
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "bottom-center", text: "bottom-center\uFF08\u9ED8\u8BA4\uFF09" }) }, "bottom-center"),
|
|
64821
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => flash({ position: "bottom-right", text: "bottom-right" }) }, "bottom-right")
|
|
64787
64822
|
)
|
|
64788
64823
|
)
|
|
64789
64824
|
),
|
|
64790
|
-
(0,
|
|
64791
|
-
(0,
|
|
64825
|
+
(0, import_react80.createElement)(DocCode, { id: "feedback" }),
|
|
64826
|
+
(0, import_react80.createElement)(DocApi, { id: "feedback" })
|
|
64792
64827
|
);
|
|
64793
64828
|
}
|
|
64794
64829
|
var CODE_DOCK = `// 1) \u5EFA\u4E00\u4E2A dock \u63A7\u5236\u5668\uFF08\u5E94\u7528\u7EA7\u5355\u4F8B\uFF1BmaxPanels \u9ED8\u8BA4 3\uFF09
|
|
@@ -64809,7 +64844,7 @@ const dock = createPanelDock({ maxPanels: 3 })
|
|
|
64809
64844
|
|
|
64810
64845
|
// 3) \u663E\u9690\u5F52\u72B6\u6001\uFF1A\u53EA\u4F20 id\uFF0C\u4E0D\u4F20\u5185\u5BB9
|
|
64811
64846
|
const result = dock.open('files') // { ok, reason }\uFF1B\u5230\u4E0A\u9650\u65F6 ok=false
|
|
64812
|
-
if (!result.ok)
|
|
64847
|
+
if (!result.ok) notify('\u6700\u591A\u540C\u65F6\u5F00 3 \u680F')
|
|
64813
64848
|
dock.close('files')
|
|
64814
64849
|
dock.toggle('preview')
|
|
64815
64850
|
dock.isOpen('files')
|
|
@@ -64820,8 +64855,8 @@ dock.isCollapsed('files')
|
|
|
64820
64855
|
// 4) \u8BA2\u9605\u72B6\u6001\u9A71\u52A8 UI\uFF08React\uFF09
|
|
64821
64856
|
const state = useSyncExternalStore(dock.subscribe, dock.getSnapshot, dock.getSnapshot)`;
|
|
64822
64857
|
function LayoutPage() {
|
|
64823
|
-
const state = (0,
|
|
64824
|
-
const [notice, setNotice] = (0,
|
|
64858
|
+
const state = (0, import_react80.useSyncExternalStore)(demoDock.subscribe, demoDock.getSnapshot, demoDock.getSnapshot);
|
|
64859
|
+
const [notice, setNotice] = (0, import_react80.useState)(null);
|
|
64825
64860
|
const open = (id3) => {
|
|
64826
64861
|
const result = demoDock.open(id3);
|
|
64827
64862
|
setNotice(result.ok ? null : t3("dockLimitWarn"));
|
|
@@ -64836,24 +64871,24 @@ function LayoutPage() {
|
|
|
64836
64871
|
};
|
|
64837
64872
|
const opened = state.ids;
|
|
64838
64873
|
const collapsedIds = state.collapsed;
|
|
64839
|
-
return (0,
|
|
64874
|
+
return (0, import_react80.createElement)(
|
|
64840
64875
|
"div",
|
|
64841
64876
|
null,
|
|
64842
|
-
(0,
|
|
64843
|
-
(0,
|
|
64877
|
+
(0, import_react80.createElement)(DocProse, { id: "layout" }),
|
|
64878
|
+
(0, import_react80.createElement)(
|
|
64844
64879
|
Example,
|
|
64845
64880
|
{ title: "PanelDock", hint: t3("dockHint"), code: CODE_DOCK },
|
|
64846
|
-
(0,
|
|
64881
|
+
(0, import_react80.createElement)(
|
|
64847
64882
|
"div",
|
|
64848
64883
|
{ 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,
|
|
64884
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => open("A") }, t3("dockBtnOpenA")),
|
|
64885
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => open("B") }, t3("dockBtnOpenB")),
|
|
64886
|
+
(0, import_react80.createElement)(Button, { size: "sm", variant: "primary", onClick: () => open("A") }, t3("dockBtnOpenA2")),
|
|
64887
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => close("A") }, t3("dockBtnCloseA")),
|
|
64888
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => collapse("A") }, t3("dockBtnCollapseA")),
|
|
64889
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => open("default") }, t3("dockBtnDefault")),
|
|
64890
|
+
(0, import_react80.createElement)(Button, { size: "sm", onClick: () => open("C") }, t3("dockBtnOpenC")),
|
|
64891
|
+
(0, import_react80.createElement)(
|
|
64857
64892
|
Button,
|
|
64858
64893
|
{
|
|
64859
64894
|
size: "sm",
|
|
@@ -64866,21 +64901,21 @@ function LayoutPage() {
|
|
|
64866
64901
|
t3("dockBtnReset")
|
|
64867
64902
|
)
|
|
64868
64903
|
),
|
|
64869
|
-
(0,
|
|
64904
|
+
(0, import_react80.createElement)(
|
|
64870
64905
|
"div",
|
|
64871
64906
|
{ style: { fontSize: "12px", color: "var(--dshpc-fg-3)" } },
|
|
64872
64907
|
`${t3("dockOpened")}${opened.length === 0 ? "\u2014" : opened.join(", ")}`,
|
|
64873
64908
|
collapsedIds.length === 0 ? "" : `\u3000${t3("dockCollapsed")}${collapsedIds.join(", ")}`,
|
|
64874
64909
|
notice === null ? "" : `\u3000${notice}`
|
|
64875
64910
|
),
|
|
64876
|
-
(0,
|
|
64911
|
+
(0, import_react80.createElement)(
|
|
64877
64912
|
"div",
|
|
64878
64913
|
{ style: { marginTop: "10px", fontSize: "12px", color: "var(--dshpc-fg-3)", lineHeight: "1.9" } },
|
|
64879
64914
|
t3("dockMainText")
|
|
64880
64915
|
)
|
|
64881
64916
|
),
|
|
64882
|
-
(0,
|
|
64883
|
-
(0,
|
|
64917
|
+
(0, import_react80.createElement)(DocCode, { id: "layout" }),
|
|
64918
|
+
(0, import_react80.createElement)(DocApi, { id: "layout" })
|
|
64884
64919
|
);
|
|
64885
64920
|
}
|
|
64886
64921
|
var CODE_DATETIME = `// \u5355\u4E2A\u65F6\u523B\uFF1Aprecision \u63A7\u5236\u7CBE\u5EA6\uFF08day / hour / minute / second\uFF09
|
|
@@ -64889,43 +64924,43 @@ h(DateTimePicker, { precision: 'minute', value: at, onChange: setAt })
|
|
|
64889
64924
|
// \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
64925
|
h(DateTimePicker, { mode: 'range', precision: 'day', value: range, onChange: setRange })`;
|
|
64891
64926
|
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,
|
|
64927
|
+
const [singleDay, setSingleDay] = (0, import_react80.useState)(null);
|
|
64928
|
+
const [singleMinute, setSingleMinute] = (0, import_react80.useState)(null);
|
|
64929
|
+
const [rangeDay, setRangeDay] = (0, import_react80.useState)(null);
|
|
64930
|
+
const [rangeSecond, setRangeSecond] = (0, import_react80.useState)(null);
|
|
64931
|
+
return (0, import_react80.createElement)(
|
|
64897
64932
|
"div",
|
|
64898
64933
|
null,
|
|
64899
|
-
(0,
|
|
64900
|
-
(0,
|
|
64934
|
+
(0, import_react80.createElement)(DocProse, { id: "datetime-picker" }),
|
|
64935
|
+
(0, import_react80.createElement)(
|
|
64901
64936
|
Example,
|
|
64902
64937
|
{ title: "DateTimePicker", hint: t3("dateTimePickerHint"), code: CODE_DATETIME },
|
|
64903
|
-
(0,
|
|
64938
|
+
(0, import_react80.createElement)(
|
|
64904
64939
|
"div",
|
|
64905
64940
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
64906
|
-
(0,
|
|
64941
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64907
64942
|
precision: "day",
|
|
64908
64943
|
value: singleDay,
|
|
64909
64944
|
onChange: (v) => setSingleDay(v)
|
|
64910
64945
|
}),
|
|
64911
|
-
(0,
|
|
64946
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64912
64947
|
precision: "minute",
|
|
64913
64948
|
value: singleMinute,
|
|
64914
64949
|
onChange: (v) => setSingleMinute(v)
|
|
64915
64950
|
}),
|
|
64916
|
-
(0,
|
|
64951
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64917
64952
|
mode: "range",
|
|
64918
64953
|
precision: "day",
|
|
64919
64954
|
value: rangeDay,
|
|
64920
64955
|
onChange: (v) => setRangeDay(v)
|
|
64921
64956
|
}),
|
|
64922
|
-
(0,
|
|
64957
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64923
64958
|
mode: "range",
|
|
64924
64959
|
precision: "second",
|
|
64925
64960
|
value: rangeSecond,
|
|
64926
64961
|
onChange: (v) => setRangeSecond(v)
|
|
64927
64962
|
}),
|
|
64928
|
-
(0,
|
|
64963
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64929
64964
|
precision: "minute",
|
|
64930
64965
|
value: singleMinute,
|
|
64931
64966
|
onChange: (v) => setSingleMinute(v),
|
|
@@ -64933,13 +64968,13 @@ function DateTimePage() {
|
|
|
64933
64968
|
})
|
|
64934
64969
|
)
|
|
64935
64970
|
),
|
|
64936
|
-
(0,
|
|
64937
|
-
(0,
|
|
64971
|
+
(0, import_react80.createElement)(DocCode, { id: "datetime-picker" }),
|
|
64972
|
+
(0, import_react80.createElement)(DocApi, { id: "datetime-picker" })
|
|
64938
64973
|
);
|
|
64939
64974
|
}
|
|
64940
64975
|
|
|
64941
64976
|
// packages/demo/src/sections/blocks.tsx
|
|
64942
|
-
var
|
|
64977
|
+
var import_react81 = require("react");
|
|
64943
64978
|
var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
64944
64979
|
|
|
64945
64980
|
// packages/demo/src/samples.ts
|
|
@@ -65040,13 +65075,13 @@ var CODE_BLOCKS_USAGE = `pnpm add dsh-plugin-core
|
|
|
65040
65075
|
import { openFilePreview, pickWorkspaceFile } from 'dsh-plugin-core/explorer'
|
|
65041
65076
|
import { openSessionView, SessionViewModal } from 'dsh-plugin-core/session'`;
|
|
65042
65077
|
function useExplorerHost() {
|
|
65043
|
-
const { workspaceFiles: workspaceFiles2, officeToPdf } = (0,
|
|
65044
|
-
const wsItems = (0,
|
|
65078
|
+
const { workspaceFiles: workspaceFiles2, officeToPdf } = (0, import_react81.useSyncExternalStore)(fileServices.subscribe, fileServices.getSnapshot);
|
|
65079
|
+
const wsItems = (0, import_react81.useSyncExternalStore)(workspaceList.subscribe, workspaceList.getSnapshot);
|
|
65045
65080
|
const anchor = pickWorkspaceAnchor(wsItems);
|
|
65046
65081
|
return { workspaceFiles: workspaceFiles2, officeToPdf, anchor, workspaceNames: wsItems.map((w) => w.title) };
|
|
65047
65082
|
}
|
|
65048
65083
|
function NotReady(props) {
|
|
65049
|
-
return (0,
|
|
65084
|
+
return (0, import_react81.createElement)(
|
|
65050
65085
|
"div",
|
|
65051
65086
|
{ style: { fontSize: "13px", color: "var(--dshpc-fg-3)" } },
|
|
65052
65087
|
t3(props.which === "files" ? "explorerFilesNone" : "explorerAnchorNone")
|
|
@@ -65054,12 +65089,12 @@ function NotReady(props) {
|
|
|
65054
65089
|
}
|
|
65055
65090
|
function OpenPreviewDemo() {
|
|
65056
65091
|
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,
|
|
65092
|
+
const [samples, setSamples] = (0, import_react81.useState)(null);
|
|
65093
|
+
const [phase, setPhase] = (0, import_react81.useState)("idle");
|
|
65094
|
+
const [last2, setLast] = (0, import_react81.useState)(null);
|
|
65095
|
+
const pending = (0, import_react81.useRef)(null);
|
|
65061
65096
|
const sessionId = anchor === null ? null : anchor.sessionId;
|
|
65062
|
-
(0,
|
|
65097
|
+
(0, import_react81.useEffect)(() => {
|
|
65063
65098
|
if (workspaceFiles2 === null || sessionId === null) return;
|
|
65064
65099
|
if (pending.current !== null) return;
|
|
65065
65100
|
setPhase("probing");
|
|
@@ -65069,8 +65104,8 @@ function OpenPreviewDemo() {
|
|
|
65069
65104
|
return s;
|
|
65070
65105
|
});
|
|
65071
65106
|
}, [workspaceFiles2, sessionId]);
|
|
65072
|
-
if (workspaceFiles2 === null) return (0,
|
|
65073
|
-
if (anchor === null) return (0,
|
|
65107
|
+
if (workspaceFiles2 === null) return (0, import_react81.createElement)(NotReady, { which: "files" });
|
|
65108
|
+
if (anchor === null) return (0, import_react81.createElement)(NotReady, { which: "anchor" });
|
|
65074
65109
|
const open = (path, rootName, workspaces) => {
|
|
65075
65110
|
const mount = pageRow.element;
|
|
65076
65111
|
if (mount === null) {
|
|
@@ -65086,14 +65121,14 @@ function OpenPreviewDemo() {
|
|
|
65086
65121
|
if (s !== null) open(pick2(s), anchor.title);
|
|
65087
65122
|
});
|
|
65088
65123
|
};
|
|
65089
|
-
return (0,
|
|
65124
|
+
return (0, import_react81.createElement)(
|
|
65090
65125
|
"div",
|
|
65091
65126
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "center" } },
|
|
65092
|
-
(0,
|
|
65093
|
-
(0,
|
|
65094
|
-
(0,
|
|
65095
|
-
last2 === null ? null : (0,
|
|
65096
|
-
(0,
|
|
65127
|
+
(0, import_react81.createElement)(Button, { variant: "primary", onClick: () => open("", anchor.title, workspaceNames) }, t3("openRootPreview")),
|
|
65128
|
+
(0, import_react81.createElement)(Button, { variant: "secondary", onClick: () => openSamples((s) => s.dir) }, sampleLabel("openSamplesDir")),
|
|
65129
|
+
(0, import_react81.createElement)(Button, { variant: "ghost", onClick: () => openSamples((s) => s.js) }, sampleLabel("sampleJs")),
|
|
65130
|
+
last2 === null ? null : (0, import_react81.createElement)("code", { style: { fontSize: "12px" } }, `\u5DF2\u6253\u5F00\uFF1A${last2}`),
|
|
65131
|
+
(0, import_react81.createElement)(
|
|
65097
65132
|
"div",
|
|
65098
65133
|
{ style: { fontSize: "12px", color: "var(--dshpc-fg-3)", width: "100%" } },
|
|
65099
65134
|
`${t3("explorerAnchorLabel")}${anchor.title} \xB7 ${t3("explorerSessionLabel")}${anchor.sessionId} \xB7 ${t3("explorerWorkspaces")}${String(workspaceNames.length)}`
|
|
@@ -65102,9 +65137,9 @@ function OpenPreviewDemo() {
|
|
|
65102
65137
|
}
|
|
65103
65138
|
function PickFileDemo() {
|
|
65104
65139
|
const { workspaceFiles: workspaceFiles2, anchor } = useExplorerHost();
|
|
65105
|
-
const [picked, setPicked] = (0,
|
|
65106
|
-
if (workspaceFiles2 === null) return (0,
|
|
65107
|
-
if (anchor === null) return (0,
|
|
65140
|
+
const [picked, setPicked] = (0, import_react81.useState)(null);
|
|
65141
|
+
if (workspaceFiles2 === null) return (0, import_react81.createElement)(NotReady, { which: "files" });
|
|
65142
|
+
if (anchor === null) return (0, import_react81.createElement)(NotReady, { which: "anchor" });
|
|
65108
65143
|
const pick2 = (anchorBtn, filter2) => {
|
|
65109
65144
|
void pickWorkspaceFile({
|
|
65110
65145
|
anchor: anchorBtn,
|
|
@@ -65113,10 +65148,10 @@ function PickFileDemo() {
|
|
|
65113
65148
|
// 目录补尾斜杠只补一次:根 `/`、盘符 `C:/` 自己就带着,再补就成了 `//` / `C://`。
|
|
65114
65149
|
}).then((r2) => setPicked(r2 === null ? null : r2.path + (r2.isDir && !r2.path.endsWith("/") ? "/" : "")));
|
|
65115
65150
|
};
|
|
65116
|
-
return (0,
|
|
65151
|
+
return (0, import_react81.createElement)(
|
|
65117
65152
|
"div",
|
|
65118
65153
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "center" } },
|
|
65119
|
-
(0,
|
|
65154
|
+
(0, import_react81.createElement)(
|
|
65120
65155
|
Button,
|
|
65121
65156
|
{
|
|
65122
65157
|
variant: "primary",
|
|
@@ -65124,7 +65159,7 @@ function PickFileDemo() {
|
|
|
65124
65159
|
},
|
|
65125
65160
|
t3("pickAny")
|
|
65126
65161
|
),
|
|
65127
|
-
(0,
|
|
65162
|
+
(0, import_react81.createElement)(
|
|
65128
65163
|
Button,
|
|
65129
65164
|
{
|
|
65130
65165
|
variant: "secondary",
|
|
@@ -65133,7 +65168,7 @@ function PickFileDemo() {
|
|
|
65133
65168
|
t3("pickJsMd")
|
|
65134
65169
|
),
|
|
65135
65170
|
// 需求一(2026-11-03):只选文件夹 —— 文件不渲染,目录行尾「选择」+ 面包屑行「选择此文件夹」。
|
|
65136
|
-
(0,
|
|
65171
|
+
(0, import_react81.createElement)(
|
|
65137
65172
|
Button,
|
|
65138
65173
|
{
|
|
65139
65174
|
variant: "outline",
|
|
@@ -65141,16 +65176,16 @@ function PickFileDemo() {
|
|
|
65141
65176
|
},
|
|
65142
65177
|
t3("pickDir")
|
|
65143
65178
|
),
|
|
65144
|
-
(0,
|
|
65179
|
+
(0, import_react81.createElement)("code", { style: { fontSize: "12px" } }, picked === null ? t3("pickNone") : `${t3("pickResult")}${picked}`)
|
|
65145
65180
|
);
|
|
65146
65181
|
}
|
|
65147
65182
|
function RealSessionListDemo() {
|
|
65148
|
-
const state = (0,
|
|
65149
|
-
const files = (0,
|
|
65150
|
-
const wsItems = (0,
|
|
65183
|
+
const state = (0, import_react81.useSyncExternalStore)(realSessions.subscribe, realSessions.getSnapshot);
|
|
65184
|
+
const files = (0, import_react81.useSyncExternalStore)(fileServices.subscribe, fileServices.getSnapshot);
|
|
65185
|
+
const wsItems = (0, import_react81.useSyncExternalStore)(workspaceList.subscribe, workspaceList.getSnapshot);
|
|
65151
65186
|
const anchor = pickWorkspaceAnchor(wsItems);
|
|
65152
|
-
const [openId, setOpenId] = (0,
|
|
65153
|
-
const view = (0,
|
|
65187
|
+
const [openId, setOpenId] = (0, import_react81.useState)(null);
|
|
65188
|
+
const view = (0, import_react81.useMemo)(() => openId === null ? null : openRealSessionView(openId), [openId]);
|
|
65154
65189
|
const workspaceFiles2 = files.workspaceFiles;
|
|
65155
65190
|
const canOpenFile = workspaceFiles2 !== null && anchor !== null;
|
|
65156
65191
|
const openLinkedFile = (path, sessionId) => {
|
|
@@ -65176,7 +65211,7 @@ function RealSessionListDemo() {
|
|
|
65176
65211
|
mount,
|
|
65177
65212
|
sessionId: loc.sessionId,
|
|
65178
65213
|
path: "",
|
|
65179
|
-
content: () => (0,
|
|
65214
|
+
content: () => (0, import_react81.createElement)(ChangedFileDiff, {
|
|
65180
65215
|
sessionId: loc.sessionId,
|
|
65181
65216
|
seq: loc.seq,
|
|
65182
65217
|
index: loc.index,
|
|
@@ -65189,16 +65224,16 @@ function RealSessionListDemo() {
|
|
|
65189
65224
|
});
|
|
65190
65225
|
};
|
|
65191
65226
|
if (state.status !== "ready") {
|
|
65192
|
-
return (0,
|
|
65227
|
+
return (0, import_react81.createElement)("p", { style: { fontSize: "13px", opacity: 0.8 } }, t3("sessionListUnavailable"));
|
|
65193
65228
|
}
|
|
65194
65229
|
if (state.rows.length === 0) {
|
|
65195
|
-
return (0,
|
|
65230
|
+
return (0, import_react81.createElement)("p", { style: { fontSize: "13px", opacity: 0.8 } }, t3("sessionListEmpty"));
|
|
65196
65231
|
}
|
|
65197
|
-
return (0,
|
|
65232
|
+
return (0, import_react81.createElement)(
|
|
65198
65233
|
"div",
|
|
65199
65234
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", maxWidth: "720px" } },
|
|
65200
65235
|
...state.rows.map(
|
|
65201
|
-
(row) => (0,
|
|
65236
|
+
(row) => (0, import_react81.createElement)(
|
|
65202
65237
|
"button",
|
|
65203
65238
|
{
|
|
65204
65239
|
key: row.sessionId,
|
|
@@ -65221,22 +65256,22 @@ function RealSessionListDemo() {
|
|
|
65221
65256
|
cursor: "pointer"
|
|
65222
65257
|
}
|
|
65223
65258
|
},
|
|
65224
|
-
(0,
|
|
65225
|
-
row.running ? (0,
|
|
65226
|
-
row.archived ? (0,
|
|
65259
|
+
(0, import_react81.createElement)("span", { style: { flex: "1", minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, row.displayTitle),
|
|
65260
|
+
row.running ? (0, import_react81.createElement)(Chip, { size: "xs", tone: "warning" }, t3("sessionListRunning")) : null,
|
|
65261
|
+
row.archived ? (0, import_react81.createElement)(
|
|
65227
65262
|
Chip,
|
|
65228
65263
|
{ size: "xs" },
|
|
65229
|
-
(0,
|
|
65264
|
+
(0, import_react81.createElement)(
|
|
65230
65265
|
"span",
|
|
65231
65266
|
{ style: { display: "inline-flex", alignItems: "center", gap: "4px" } },
|
|
65232
|
-
(0,
|
|
65267
|
+
(0, import_react81.createElement)(import_dsh_client_ui_primitives3.IconArchiveOutlineRegular, { size: 12 }),
|
|
65233
65268
|
t3("sessionListArchived")
|
|
65234
65269
|
)
|
|
65235
65270
|
) : null,
|
|
65236
|
-
(0,
|
|
65271
|
+
(0, import_react81.createElement)("span", { style: { flex: "none", fontSize: "12px", color: "var(--dshpc-fg-3)" } }, formatDateTime(new Date(row.updatedAt).toISOString()))
|
|
65237
65272
|
)
|
|
65238
65273
|
),
|
|
65239
|
-
openId !== null && view !== null ? (0,
|
|
65274
|
+
openId !== null && view !== null ? (0, import_react81.createElement)(SessionViewModal, {
|
|
65240
65275
|
sessionId: openId,
|
|
65241
65276
|
view,
|
|
65242
65277
|
// 标题 = 会话自己的标题;归档态分化「继续对话」行为(开分支确认 vs 直跳官方)。
|
|
@@ -65262,40 +65297,40 @@ function RealSessionListDemo() {
|
|
|
65262
65297
|
);
|
|
65263
65298
|
}
|
|
65264
65299
|
function ExplorerPage() {
|
|
65265
|
-
return (0,
|
|
65300
|
+
return (0, import_react81.createElement)(
|
|
65266
65301
|
"div",
|
|
65267
65302
|
null,
|
|
65268
|
-
(0,
|
|
65269
|
-
(0,
|
|
65303
|
+
(0, import_react81.createElement)(DocProse, { id: "explorer" }),
|
|
65304
|
+
(0, import_react81.createElement)(
|
|
65270
65305
|
Example,
|
|
65271
65306
|
{ title: t3("methodATitle"), hint: t3("methodAHint"), code: CODE_OPEN },
|
|
65272
|
-
(0,
|
|
65307
|
+
(0, import_react81.createElement)(OpenPreviewDemo, null)
|
|
65273
65308
|
),
|
|
65274
|
-
(0,
|
|
65309
|
+
(0, import_react81.createElement)(
|
|
65275
65310
|
Example,
|
|
65276
65311
|
{ title: t3("methodBTitle"), hint: t3("methodBHint"), code: CODE_PICK },
|
|
65277
|
-
(0,
|
|
65312
|
+
(0, import_react81.createElement)(PickFileDemo, null)
|
|
65278
65313
|
),
|
|
65279
|
-
(0,
|
|
65280
|
-
(0,
|
|
65314
|
+
(0, import_react81.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_BLOCKS_USAGE }),
|
|
65315
|
+
(0, import_react81.createElement)(DocApi, { id: "explorer" })
|
|
65281
65316
|
);
|
|
65282
65317
|
}
|
|
65283
65318
|
function SessionPage() {
|
|
65284
|
-
return (0,
|
|
65319
|
+
return (0, import_react81.createElement)(
|
|
65285
65320
|
"div",
|
|
65286
65321
|
null,
|
|
65287
|
-
(0,
|
|
65288
|
-
(0,
|
|
65322
|
+
(0, import_react81.createElement)(DocProse, { id: "session" }),
|
|
65323
|
+
(0, import_react81.createElement)(
|
|
65289
65324
|
Example,
|
|
65290
65325
|
{ title: t3("sessionRealTitle"), hint: t3("sessionRealHint"), code: CODE_SESSION_REAL },
|
|
65291
|
-
(0,
|
|
65326
|
+
(0, import_react81.createElement)(RealSessionListDemo, null)
|
|
65292
65327
|
),
|
|
65293
|
-
(0,
|
|
65328
|
+
(0, import_react81.createElement)(DocApi, { id: "session" })
|
|
65294
65329
|
);
|
|
65295
65330
|
}
|
|
65296
65331
|
|
|
65297
65332
|
// packages/demo/src/sections/tables.tsx
|
|
65298
|
-
var
|
|
65333
|
+
var import_react82 = require("react");
|
|
65299
65334
|
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
65300
65335
|
var H_SCROLL = { overflowX: "auto", borderBottom: "1px solid transparent" };
|
|
65301
65336
|
var COLUMNS = [
|
|
@@ -65340,10 +65375,10 @@ var PEOPLE = [
|
|
|
65340
65375
|
{ id: "S-2429", name: "Deng, Qian", mrn: "MRN-61248", age: "33 / F", date: "2026-10-19", modality: "US", flags: [], tone: "success", state: "Reviewed" }
|
|
65341
65376
|
];
|
|
65342
65377
|
function personCell(person) {
|
|
65343
|
-
return (0,
|
|
65378
|
+
return (0, import_react82.createElement)(
|
|
65344
65379
|
"div",
|
|
65345
65380
|
{ style: { display: "flex", alignItems: "center", gap: "8px", minWidth: 0 } },
|
|
65346
|
-
(0,
|
|
65381
|
+
(0, import_react82.createElement)(
|
|
65347
65382
|
"div",
|
|
65348
65383
|
{
|
|
65349
65384
|
style: {
|
|
@@ -65362,11 +65397,11 @@ function personCell(person) {
|
|
|
65362
65397
|
},
|
|
65363
65398
|
person.name.slice(0, 1)
|
|
65364
65399
|
),
|
|
65365
|
-
(0,
|
|
65400
|
+
(0, import_react82.createElement)(
|
|
65366
65401
|
"div",
|
|
65367
65402
|
{ style: { display: "flex", flexDirection: "column", minWidth: 0 } },
|
|
65368
|
-
(0,
|
|
65369
|
-
(0,
|
|
65403
|
+
(0, import_react82.createElement)("span", null, person.name),
|
|
65404
|
+
(0, import_react82.createElement)(
|
|
65370
65405
|
"span",
|
|
65371
65406
|
{ style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)" } },
|
|
65372
65407
|
person.mrn
|
|
@@ -65375,8 +65410,8 @@ function personCell(person) {
|
|
|
65375
65410
|
);
|
|
65376
65411
|
}
|
|
65377
65412
|
function rowsOf() {
|
|
65378
|
-
const actions2 = (0,
|
|
65379
|
-
icon: (0,
|
|
65413
|
+
const actions2 = (0, import_react82.createElement)(IconButton, {
|
|
65414
|
+
icon: (0, import_react82.createElement)(import_dsh_client_ui_primitives4.IconChevronDownOutlineRegular, { size: 16 }),
|
|
65380
65415
|
label: "Open study"
|
|
65381
65416
|
});
|
|
65382
65417
|
return PEOPLE.map((person) => ({
|
|
@@ -65386,13 +65421,13 @@ function rowsOf() {
|
|
|
65386
65421
|
name: personCell(person),
|
|
65387
65422
|
age: person.age,
|
|
65388
65423
|
date: person.date,
|
|
65389
|
-
modality: (0,
|
|
65424
|
+
modality: (0, import_react82.createElement)(Chip, { tone: MODALITY_TONE[person.modality], size: "xs" }, person.modality),
|
|
65390
65425
|
// 多标签:标签之间的间距由调用方布局控制(这里 4px),列内距走列级 padding:8
|
|
65391
|
-
flags: person.flags.length === 0 ? null : (0,
|
|
65426
|
+
flags: person.flags.length === 0 ? null : (0, import_react82.createElement)(
|
|
65392
65427
|
"div",
|
|
65393
65428
|
{ style: { display: "flex", gap: "4px", flexWrap: "wrap" } },
|
|
65394
65429
|
...person.flags.map(
|
|
65395
|
-
(flag) => (0,
|
|
65430
|
+
(flag) => (0, import_react82.createElement)(
|
|
65396
65431
|
Chip,
|
|
65397
65432
|
{
|
|
65398
65433
|
key: flag,
|
|
@@ -65403,7 +65438,7 @@ function rowsOf() {
|
|
|
65403
65438
|
)
|
|
65404
65439
|
)
|
|
65405
65440
|
),
|
|
65406
|
-
status: (0,
|
|
65441
|
+
status: (0, import_react82.createElement)(Chip, { tone: person.tone, size: "xs" }, person.state),
|
|
65407
65442
|
actions: actions2
|
|
65408
65443
|
}
|
|
65409
65444
|
}));
|
|
@@ -65468,24 +65503,24 @@ var GROUPS = WORKSPACES.map((workspace) => ({
|
|
|
65468
65503
|
cells: {
|
|
65469
65504
|
task: task.title,
|
|
65470
65505
|
owner: task.owner,
|
|
65471
|
-
state: (0,
|
|
65506
|
+
state: (0, import_react82.createElement)(Chip, { tone: task.tone, size: "xs" }, task.state),
|
|
65472
65507
|
updated: task.updated
|
|
65473
65508
|
}
|
|
65474
65509
|
}))
|
|
65475
65510
|
}));
|
|
65476
65511
|
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,
|
|
65512
|
+
const [selected, setSelected] = (0, import_react82.useState)("S-2418");
|
|
65513
|
+
const [spanSelected, setSpanSelected] = (0, import_react82.useState)("c");
|
|
65514
|
+
const [groupSelected, setGroupSelected] = (0, import_react82.useState)("a2");
|
|
65515
|
+
const [groupAccentOn, setGroupAccentOn] = (0, import_react82.useState)(true);
|
|
65516
|
+
const [groupAccent, setGroupAccent] = (0, import_react82.useState)("default");
|
|
65517
|
+
const [pagerPage, setPagerPage] = (0, import_react82.useState)(1);
|
|
65518
|
+
const [pagerSize, setPagerSize] = (0, import_react82.useState)(10);
|
|
65519
|
+
const [demoPage, setDemoPage] = (0, import_react82.useState)(2);
|
|
65520
|
+
const [demoSize, setDemoSize] = (0, import_react82.useState)(10);
|
|
65521
|
+
const [demoAlign, setDemoAlign] = (0, import_react82.useState)("right");
|
|
65522
|
+
const [demoShowTotal, setDemoShowTotal] = (0, import_react82.useState)(true);
|
|
65523
|
+
const [loadState, setLoadState] = (0, import_react82.useState)("idle");
|
|
65489
65524
|
const loadColumns = [
|
|
65490
65525
|
{ key: "name", title: "Patient", width: 240 },
|
|
65491
65526
|
{ key: "date", title: "Date", width: 120 },
|
|
@@ -65496,7 +65531,7 @@ function TablePage() {
|
|
|
65496
65531
|
cells: {
|
|
65497
65532
|
name: personCell(person),
|
|
65498
65533
|
date: person.date,
|
|
65499
|
-
modality: (0,
|
|
65534
|
+
modality: (0, import_react82.createElement)(Chip, { tone: MODALITY_TONE[person.modality], size: "xs" }, person.modality)
|
|
65500
65535
|
}
|
|
65501
65536
|
}));
|
|
65502
65537
|
const pagerOnChange = (page, size4) => {
|
|
@@ -65507,7 +65542,7 @@ function TablePage() {
|
|
|
65507
65542
|
setDemoPage(page);
|
|
65508
65543
|
setDemoSize(size4);
|
|
65509
65544
|
};
|
|
65510
|
-
const renderLoadTable = (borders) => (0,
|
|
65545
|
+
const renderLoadTable = (borders) => (0, import_react82.createElement)(Table, {
|
|
65511
65546
|
columns: loadColumns,
|
|
65512
65547
|
rows: loadState === "loading" ? [] : loadRows,
|
|
65513
65548
|
borders,
|
|
@@ -65521,19 +65556,19 @@ function TablePage() {
|
|
|
65521
65556
|
ariaLabel: "Patients loaded incrementally",
|
|
65522
65557
|
style: { maxWidth: "640px" }
|
|
65523
65558
|
});
|
|
65524
|
-
return (0,
|
|
65559
|
+
return (0, import_react82.createElement)(
|
|
65525
65560
|
"div",
|
|
65526
65561
|
null,
|
|
65527
|
-
(0,
|
|
65562
|
+
(0, import_react82.createElement)(DocProse, { id: "table" }),
|
|
65528
65563
|
// 表格较宽:示例区占满整栏(代码放页面底部),并在窄屏时横向滚动。
|
|
65529
65564
|
// 空态不放成第二个示例 —— 直接接在主表下方,同一区块里展示「有数据 / 没数据」。
|
|
65530
|
-
(0,
|
|
65565
|
+
(0, import_react82.createElement)(
|
|
65531
65566
|
Example,
|
|
65532
65567
|
{ title: "Table", hint: t3("tableHint") },
|
|
65533
|
-
(0,
|
|
65568
|
+
(0, import_react82.createElement)(
|
|
65534
65569
|
"div",
|
|
65535
65570
|
{ style: H_SCROLL },
|
|
65536
|
-
(0,
|
|
65571
|
+
(0, import_react82.createElement)(Table, {
|
|
65537
65572
|
columns: COLUMNS,
|
|
65538
65573
|
rows: rowsOf(),
|
|
65539
65574
|
striped: true,
|
|
@@ -65545,10 +65580,10 @@ function TablePage() {
|
|
|
65545
65580
|
style: { minWidth: 960 }
|
|
65546
65581
|
})
|
|
65547
65582
|
),
|
|
65548
|
-
(0,
|
|
65583
|
+
(0, import_react82.createElement)(
|
|
65549
65584
|
"div",
|
|
65550
65585
|
{ style: { ...H_SCROLL, marginTop: "16px" } },
|
|
65551
|
-
(0,
|
|
65586
|
+
(0, import_react82.createElement)(Table, {
|
|
65552
65587
|
columns: COLUMNS,
|
|
65553
65588
|
rows: [],
|
|
65554
65589
|
borders: "all",
|
|
@@ -65557,13 +65592,13 @@ function TablePage() {
|
|
|
65557
65592
|
})
|
|
65558
65593
|
)
|
|
65559
65594
|
),
|
|
65560
|
-
(0,
|
|
65595
|
+
(0, import_react82.createElement)(
|
|
65561
65596
|
Example,
|
|
65562
65597
|
{ title: "Density \xB7 borders \xB7 spans", hint: t3("tableSpanHint") },
|
|
65563
|
-
(0,
|
|
65598
|
+
(0, import_react82.createElement)(
|
|
65564
65599
|
"div",
|
|
65565
65600
|
{ style: H_SCROLL },
|
|
65566
|
-
(0,
|
|
65601
|
+
(0, import_react82.createElement)(Table, {
|
|
65567
65602
|
columns: SPAN_COLUMNS,
|
|
65568
65603
|
rows: SPAN_ROWS,
|
|
65569
65604
|
density: "compact",
|
|
@@ -65575,13 +65610,13 @@ function TablePage() {
|
|
|
65575
65610
|
})
|
|
65576
65611
|
)
|
|
65577
65612
|
),
|
|
65578
|
-
(0,
|
|
65613
|
+
(0, import_react82.createElement)(
|
|
65579
65614
|
Example,
|
|
65580
65615
|
{ title: "Groups \xB7 \u901A\u680F", hint: t3("tableGroupHint") },
|
|
65581
|
-
(0,
|
|
65616
|
+
(0, import_react82.createElement)(
|
|
65582
65617
|
"div",
|
|
65583
65618
|
{ style: { display: "flex", gap: "12px", alignItems: "center", flexWrap: "wrap" } },
|
|
65584
|
-
(0,
|
|
65619
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65585
65620
|
size: "sm",
|
|
65586
65621
|
items: [
|
|
65587
65622
|
{ value: "default", label: "\u9ED8\u8BA4" },
|
|
@@ -65592,12 +65627,12 @@ function TablePage() {
|
|
|
65592
65627
|
value: groupAccent,
|
|
65593
65628
|
onChange: setGroupAccent
|
|
65594
65629
|
}),
|
|
65595
|
-
(0,
|
|
65630
|
+
(0, import_react82.createElement)(Checkbox, { checked: groupAccentOn, onChange: setGroupAccentOn, label: "groupAccent" })
|
|
65596
65631
|
),
|
|
65597
|
-
(0,
|
|
65632
|
+
(0, import_react82.createElement)(
|
|
65598
65633
|
"div",
|
|
65599
65634
|
{ style: { ...H_SCROLL, marginTop: "12px" } },
|
|
65600
|
-
(0,
|
|
65635
|
+
(0, import_react82.createElement)(Table, {
|
|
65601
65636
|
columns: GROUP_COLUMNS,
|
|
65602
65637
|
groups: GROUPS,
|
|
65603
65638
|
groupAccent: groupAccentOn ? groupAccent : false,
|
|
@@ -65608,13 +65643,13 @@ function TablePage() {
|
|
|
65608
65643
|
})
|
|
65609
65644
|
)
|
|
65610
65645
|
),
|
|
65611
|
-
(0,
|
|
65646
|
+
(0, import_react82.createElement)(
|
|
65612
65647
|
Example,
|
|
65613
65648
|
{ title: "Pagination", hint: t3("paginationHint") },
|
|
65614
|
-
(0,
|
|
65649
|
+
(0, import_react82.createElement)(
|
|
65615
65650
|
"div",
|
|
65616
65651
|
{ style: { display: "flex", gap: "12px", alignItems: "center", flexWrap: "wrap" } },
|
|
65617
|
-
(0,
|
|
65652
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65618
65653
|
size: "sm",
|
|
65619
65654
|
items: [
|
|
65620
65655
|
{ value: "left", label: "\u5DE6" },
|
|
@@ -65624,12 +65659,12 @@ function TablePage() {
|
|
|
65624
65659
|
value: demoAlign,
|
|
65625
65660
|
onChange: setDemoAlign
|
|
65626
65661
|
}),
|
|
65627
|
-
(0,
|
|
65662
|
+
(0, import_react82.createElement)(Checkbox, { checked: demoShowTotal, onChange: setDemoShowTotal, label: "showTotal" })
|
|
65628
65663
|
),
|
|
65629
|
-
(0,
|
|
65664
|
+
(0, import_react82.createElement)(
|
|
65630
65665
|
"div",
|
|
65631
65666
|
{ style: { marginTop: "12px" } },
|
|
65632
|
-
(0,
|
|
65667
|
+
(0, import_react82.createElement)(Pagination, {
|
|
65633
65668
|
page: demoPage,
|
|
65634
65669
|
pageSize: demoSize,
|
|
65635
65670
|
total: 86,
|
|
@@ -65641,10 +65676,10 @@ function TablePage() {
|
|
|
65641
65676
|
ariaLabel: "Demo pagination"
|
|
65642
65677
|
})
|
|
65643
65678
|
),
|
|
65644
|
-
(0,
|
|
65679
|
+
(0, import_react82.createElement)(
|
|
65645
65680
|
"div",
|
|
65646
65681
|
{ style: { marginTop: "12px" } },
|
|
65647
|
-
(0,
|
|
65682
|
+
(0, import_react82.createElement)(Pagination, {
|
|
65648
65683
|
page: demoPage,
|
|
65649
65684
|
pageSize: demoSize,
|
|
65650
65685
|
total: 86,
|
|
@@ -65655,13 +65690,13 @@ function TablePage() {
|
|
|
65655
65690
|
})
|
|
65656
65691
|
)
|
|
65657
65692
|
),
|
|
65658
|
-
(0,
|
|
65693
|
+
(0, import_react82.createElement)(
|
|
65659
65694
|
Example,
|
|
65660
65695
|
{ title: "Table \xB7 \u5206\u9875", hint: t3("tablePagerHint") },
|
|
65661
|
-
(0,
|
|
65696
|
+
(0, import_react82.createElement)(
|
|
65662
65697
|
"div",
|
|
65663
65698
|
{ style: H_SCROLL },
|
|
65664
|
-
(0,
|
|
65699
|
+
(0, import_react82.createElement)(Table, {
|
|
65665
65700
|
columns: COLUMNS,
|
|
65666
65701
|
// 不传 pagination.total ⇒ 本地分页:这里是全量 12 行,Table 自己按当前页切片
|
|
65667
65702
|
rows: rowsOf(),
|
|
@@ -65678,10 +65713,10 @@ function TablePage() {
|
|
|
65678
65713
|
})
|
|
65679
65714
|
)
|
|
65680
65715
|
),
|
|
65681
|
-
(0,
|
|
65716
|
+
(0, import_react82.createElement)(
|
|
65682
65717
|
Example,
|
|
65683
65718
|
{ title: "Loading \xB7 \u52A0\u8F7D\u66F4\u591A", hint: t3("tableLoadingHint") },
|
|
65684
|
-
(0,
|
|
65719
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65685
65720
|
size: "sm",
|
|
65686
65721
|
items: [
|
|
65687
65722
|
{ value: "idle", label: "\u6B63\u5E38" },
|
|
@@ -65692,7 +65727,7 @@ function TablePage() {
|
|
|
65692
65727
|
value: loadState,
|
|
65693
65728
|
onChange: setLoadState
|
|
65694
65729
|
}),
|
|
65695
|
-
(0,
|
|
65730
|
+
(0, import_react82.createElement)(
|
|
65696
65731
|
"div",
|
|
65697
65732
|
{
|
|
65698
65733
|
style: {
|
|
@@ -65707,13 +65742,13 @@ function TablePage() {
|
|
|
65707
65742
|
renderLoadTable("y")
|
|
65708
65743
|
)
|
|
65709
65744
|
),
|
|
65710
|
-
(0,
|
|
65711
|
-
(0,
|
|
65745
|
+
(0, import_react82.createElement)(DocApi, { id: "table" }),
|
|
65746
|
+
(0, import_react82.createElement)(DocCode, { id: "table" })
|
|
65712
65747
|
);
|
|
65713
65748
|
}
|
|
65714
65749
|
|
|
65715
65750
|
// packages/demo/src/sections/toolbar.tsx
|
|
65716
|
-
var
|
|
65751
|
+
var import_react83 = require("react");
|
|
65717
65752
|
var import_dsh_client_ui_primitives5 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
65718
65753
|
var ANCHOR_ID = "dshpc-demo-quick-toolbar-anchor";
|
|
65719
65754
|
var CODE_TOOLBAR = `import { QuickToolbar } from 'dsh-plugin-core/ui'
|
|
@@ -65728,23 +65763,23 @@ h(QuickToolbar, {
|
|
|
65728
65763
|
backToTop: { threshold: 320 }, // \u9ED8\u8BA4\u5373\u662F 320\uFF1Bfalse \u53EF\u5173\u6389
|
|
65729
65764
|
})`;
|
|
65730
65765
|
function ToolbarPage() {
|
|
65731
|
-
const [mode, setMode] = (0,
|
|
65732
|
-
const [last2, setLast] = (0,
|
|
65733
|
-
return (0,
|
|
65766
|
+
const [mode, setMode] = (0, import_react83.useState)("box");
|
|
65767
|
+
const [last2, setLast] = (0, import_react83.useState)("\u2014");
|
|
65768
|
+
return (0, import_react83.createElement)(
|
|
65734
65769
|
"div",
|
|
65735
65770
|
null,
|
|
65736
|
-
(0,
|
|
65737
|
-
(0,
|
|
65771
|
+
(0, import_react83.createElement)(DocProse, { id: "quick-toolbar" }),
|
|
65772
|
+
(0, import_react83.createElement)(
|
|
65738
65773
|
Example,
|
|
65739
65774
|
{
|
|
65740
65775
|
title: "QuickToolbar\uFF08\u53F3\u4FA7\u6D6E\u52A8\uFF09",
|
|
65741
65776
|
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
65777
|
code: CODE_TOOLBAR
|
|
65743
65778
|
},
|
|
65744
|
-
(0,
|
|
65779
|
+
(0, import_react83.createElement)(
|
|
65745
65780
|
"div",
|
|
65746
65781
|
{ style: { display: "flex", flexDirection: "column", gap: "14px" } },
|
|
65747
|
-
(0,
|
|
65782
|
+
(0, import_react83.createElement)(Segmented, {
|
|
65748
65783
|
items: [
|
|
65749
65784
|
{ value: "box", label: "\u8DDF\u968F\u63A7\u4EF6" },
|
|
65750
65785
|
{ value: "window", label: "\u8DDF\u968F\u7A97\u53E3" }
|
|
@@ -65753,10 +65788,10 @@ function ToolbarPage() {
|
|
|
65753
65788
|
onChange: setMode,
|
|
65754
65789
|
label: "\u6A2A\u5411\u951A\u70B9"
|
|
65755
65790
|
}),
|
|
65756
|
-
(0,
|
|
65791
|
+
(0, import_react83.createElement)(
|
|
65757
65792
|
"div",
|
|
65758
65793
|
{ id: ANCHOR_ID },
|
|
65759
|
-
(0,
|
|
65794
|
+
(0, import_react83.createElement)(
|
|
65760
65795
|
Surface,
|
|
65761
65796
|
{
|
|
65762
65797
|
tone: "sunken",
|
|
@@ -65764,15 +65799,15 @@ function ToolbarPage() {
|
|
|
65764
65799
|
padding: "lg",
|
|
65765
65800
|
style: { width: "min(560px, 100%)" }
|
|
65766
65801
|
},
|
|
65767
|
-
(0,
|
|
65768
|
-
(0,
|
|
65802
|
+
(0, import_react83.createElement)("div", { style: { fontWeight: 600, fontSize: "13px" } }, "\u951A\u5B9A\u63A7\u4EF6"),
|
|
65803
|
+
(0, import_react83.createElement)(
|
|
65769
65804
|
"div",
|
|
65770
65805
|
{ style: { marginTop: "6px", color: "var(--dshpc-fg-3)", fontSize: "12px", lineHeight: "1.8" } },
|
|
65771
65806
|
"\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
65807
|
)
|
|
65773
65808
|
)
|
|
65774
65809
|
),
|
|
65775
|
-
(0,
|
|
65810
|
+
(0, import_react83.createElement)(
|
|
65776
65811
|
Surface,
|
|
65777
65812
|
{
|
|
65778
65813
|
border: "dashed",
|
|
@@ -65788,19 +65823,19 @@ function ToolbarPage() {
|
|
|
65788
65823
|
},
|
|
65789
65824
|
"\u5411\u4E0B\u6EDA\u52A8\uFF0C\u56DE\u9876\u90E8\u6309\u94AE\u4F1A\u51FA\u73B0"
|
|
65790
65825
|
),
|
|
65791
|
-
(0,
|
|
65826
|
+
(0, import_react83.createElement)("div", { style: { color: "var(--dshpc-fg-3)", fontSize: "12px" } }, `\u6700\u8FD1\u4E00\u6B21\u70B9\u51FB\uFF1A${last2}`)
|
|
65792
65827
|
)
|
|
65793
65828
|
),
|
|
65794
|
-
(0,
|
|
65795
|
-
(0,
|
|
65829
|
+
(0, import_react83.createElement)(DocApi, { id: "quick-toolbar" }),
|
|
65830
|
+
(0, import_react83.createElement)(QuickToolbar, {
|
|
65796
65831
|
anchorId: mode === "box" ? ANCHOR_ID : void 0,
|
|
65797
65832
|
onAction: (id3) => setLast(id3),
|
|
65798
65833
|
items: [
|
|
65799
|
-
{ id: "search", icon: (0,
|
|
65800
|
-
{ id: "copy", icon: (0,
|
|
65834
|
+
{ id: "search", icon: (0, import_react83.createElement)(import_dsh_client_ui_primitives5.IconSearchOutlineRegular, { size: 18 }), label: "\u641C\u7D22" },
|
|
65835
|
+
{ id: "copy", icon: (0, import_react83.createElement)(import_dsh_client_ui_primitives5.IconCopyOutlineRegular, { size: 18 }), label: "\u590D\u5236" },
|
|
65801
65836
|
{
|
|
65802
65837
|
id: "sparkle",
|
|
65803
|
-
icon: (0,
|
|
65838
|
+
icon: (0, import_react83.createElement)(import_dsh_client_ui_primitives5.IconSparkleRegular, { size: 18 }),
|
|
65804
65839
|
label: "AI \u52A9\u624B",
|
|
65805
65840
|
color: "var(--dshpc-business)",
|
|
65806
65841
|
fgColor: "#fff"
|
|
@@ -65811,7 +65846,7 @@ function ToolbarPage() {
|
|
|
65811
65846
|
}
|
|
65812
65847
|
|
|
65813
65848
|
// packages/demo/src/sections/utils.tsx
|
|
65814
|
-
var
|
|
65849
|
+
var import_react84 = require("react");
|
|
65815
65850
|
var CODE_DATE = `// \u65E5\u671F\u65F6\u95F4\u683C\u5F0F\u5316\uFF08\u5168\u90E8\u8D70\u5F53\u524D locale\uFF09
|
|
65816
65851
|
formatDateTime('2026-10-18T09:30:05.000Z', { seconds: true }) // 2026-10-18 09:30:05
|
|
65817
65852
|
formatYmd('2026-10-18T09:30:05.000Z') // 2026-10-18
|
|
@@ -65846,28 +65881,28 @@ var NUMBER_ROWS = [
|
|
|
65846
65881
|
["formatBytes", formatBytes(125829)]
|
|
65847
65882
|
];
|
|
65848
65883
|
function FnTable(props) {
|
|
65849
|
-
return (0,
|
|
65884
|
+
return (0, import_react84.createElement)(
|
|
65850
65885
|
"table",
|
|
65851
65886
|
{ style: { borderCollapse: "collapse", fontSize: "13px" } },
|
|
65852
|
-
(0,
|
|
65887
|
+
(0, import_react84.createElement)(
|
|
65853
65888
|
"thead",
|
|
65854
65889
|
null,
|
|
65855
|
-
(0,
|
|
65890
|
+
(0, import_react84.createElement)(
|
|
65856
65891
|
"tr",
|
|
65857
65892
|
null,
|
|
65858
|
-
(0,
|
|
65859
|
-
(0,
|
|
65893
|
+
(0, import_react84.createElement)("th", { style: th }, "\u51FD\u6570"),
|
|
65894
|
+
(0, import_react84.createElement)("th", { style: th }, "\u8FD4\u56DE\u503C")
|
|
65860
65895
|
)
|
|
65861
65896
|
),
|
|
65862
|
-
(0,
|
|
65897
|
+
(0, import_react84.createElement)(
|
|
65863
65898
|
"tbody",
|
|
65864
65899
|
null,
|
|
65865
65900
|
props.rows.map(
|
|
65866
|
-
([fn, out]) => (0,
|
|
65901
|
+
([fn, out]) => (0, import_react84.createElement)(
|
|
65867
65902
|
"tr",
|
|
65868
65903
|
{ key: fn },
|
|
65869
|
-
(0,
|
|
65870
|
-
(0,
|
|
65904
|
+
(0, import_react84.createElement)("td", { style: td }, fn),
|
|
65905
|
+
(0, import_react84.createElement)("td", { style: td }, out)
|
|
65871
65906
|
)
|
|
65872
65907
|
)
|
|
65873
65908
|
)
|
|
@@ -65876,44 +65911,44 @@ function FnTable(props) {
|
|
|
65876
65911
|
var th = { textAlign: "left", padding: "6px 14px 6px 0", color: "var(--dshpc-fg-3)" };
|
|
65877
65912
|
var td = { padding: "5px 14px 5px 0", borderTop: "1px solid var(--dshpc-border-faint)" };
|
|
65878
65913
|
function DatePage() {
|
|
65879
|
-
return (0,
|
|
65914
|
+
return (0, import_react84.createElement)(
|
|
65880
65915
|
"div",
|
|
65881
65916
|
null,
|
|
65882
|
-
(0,
|
|
65883
|
-
(0,
|
|
65884
|
-
(0,
|
|
65885
|
-
(0,
|
|
65917
|
+
(0, import_react84.createElement)(DocProse, { id: "date" }),
|
|
65918
|
+
(0, import_react84.createElement)(Example, { title: "date / time", code: CODE_DATE }, (0, import_react84.createElement)(FnTable, { rows: DATE_ROWS })),
|
|
65919
|
+
(0, import_react84.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_UTILS_USAGE }),
|
|
65920
|
+
(0, import_react84.createElement)(DocApi, { id: "date" })
|
|
65886
65921
|
);
|
|
65887
65922
|
}
|
|
65888
65923
|
function NumberPage() {
|
|
65889
|
-
return (0,
|
|
65924
|
+
return (0, import_react84.createElement)(
|
|
65890
65925
|
"div",
|
|
65891
65926
|
null,
|
|
65892
|
-
(0,
|
|
65893
|
-
(0,
|
|
65894
|
-
(0,
|
|
65895
|
-
(0,
|
|
65927
|
+
(0, import_react84.createElement)(DocProse, { id: "number" }),
|
|
65928
|
+
(0, import_react84.createElement)(Example, { title: "number / bytes", code: CODE_NUMBER }, (0, import_react84.createElement)(FnTable, { rows: NUMBER_ROWS })),
|
|
65929
|
+
(0, import_react84.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_UTILS_USAGE }),
|
|
65930
|
+
(0, import_react84.createElement)(DocApi, { id: "number" })
|
|
65896
65931
|
);
|
|
65897
65932
|
}
|
|
65898
65933
|
function TextPage() {
|
|
65899
|
-
return (0,
|
|
65934
|
+
return (0, import_react84.createElement)(DocContent, { id: "text" });
|
|
65900
65935
|
}
|
|
65901
65936
|
function HttpPage() {
|
|
65902
|
-
return (0,
|
|
65937
|
+
return (0, import_react84.createElement)(DocContent, { id: "http" });
|
|
65903
65938
|
}
|
|
65904
65939
|
function I18nPage() {
|
|
65905
|
-
return (0,
|
|
65940
|
+
return (0, import_react84.createElement)(
|
|
65906
65941
|
"div",
|
|
65907
65942
|
null,
|
|
65908
|
-
(0,
|
|
65909
|
-
(0,
|
|
65943
|
+
(0, import_react84.createElement)(DocProse, { id: "i18n" }),
|
|
65944
|
+
(0, import_react84.createElement)(
|
|
65910
65945
|
Example,
|
|
65911
65946
|
{ title: "getLocale / setLocale", code: CODE_I18N },
|
|
65912
|
-
(0,
|
|
65947
|
+
(0, import_react84.createElement)(
|
|
65913
65948
|
"div",
|
|
65914
65949
|
{ style: { display: "flex", alignItems: "center", gap: "10px" } },
|
|
65915
|
-
(0,
|
|
65916
|
-
(0,
|
|
65950
|
+
(0, import_react84.createElement)("span", { style: { fontFamily: "var(--dshpc-font-mono)", fontSize: "12px", color: "var(--dshpc-fg-3)" } }, t3("i18nNow")),
|
|
65951
|
+
(0, import_react84.createElement)("code", {
|
|
65917
65952
|
style: {
|
|
65918
65953
|
fontFamily: "var(--dshpc-font-mono)",
|
|
65919
65954
|
fontSize: "13px",
|
|
@@ -65925,60 +65960,60 @@ function I18nPage() {
|
|
|
65925
65960
|
}, getLocale())
|
|
65926
65961
|
)
|
|
65927
65962
|
),
|
|
65928
|
-
(0,
|
|
65929
|
-
(0,
|
|
65963
|
+
(0, import_react84.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_UTILS_USAGE }),
|
|
65964
|
+
(0, import_react84.createElement)(DocApi, { id: "i18n" })
|
|
65930
65965
|
);
|
|
65931
65966
|
}
|
|
65932
65967
|
|
|
65933
65968
|
// packages/demo/src/sections/reference.tsx
|
|
65934
|
-
var
|
|
65969
|
+
var import_react85 = require("react");
|
|
65935
65970
|
var OUT_OF_SCOPE = ["roadmapOut", "roadmapMirror", "roadmapPreview", "roadmapSkeleton"];
|
|
65936
65971
|
function ReferencePage() {
|
|
65937
|
-
return (0,
|
|
65972
|
+
return (0, import_react85.createElement)(
|
|
65938
65973
|
"div",
|
|
65939
65974
|
null,
|
|
65940
|
-
(0,
|
|
65941
|
-
(0,
|
|
65942
|
-
(0,
|
|
65975
|
+
(0, import_react85.createElement)(Note, { text: t3("referenceNote") }),
|
|
65976
|
+
(0, import_react85.createElement)(Example, { title: t3("secA11y") }, (0, import_react85.createElement)(Placeholder2, { descKey: "a11yDesc" })),
|
|
65977
|
+
(0, import_react85.createElement)(
|
|
65943
65978
|
Example,
|
|
65944
65979
|
{ title: t3("secRoadmap"), hint: t3("roadmapHint") },
|
|
65945
|
-
(0,
|
|
65980
|
+
(0, import_react85.createElement)(
|
|
65946
65981
|
"div",
|
|
65947
65982
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
65948
65983
|
OUT_OF_SCOPE.map(
|
|
65949
|
-
(key) => (0,
|
|
65984
|
+
(key) => (0, import_react85.createElement)(
|
|
65950
65985
|
"div",
|
|
65951
65986
|
{ key, style: { display: "flex", gap: "8px", alignItems: "flex-start", fontSize: "13px" } },
|
|
65952
|
-
(0,
|
|
65953
|
-
(0,
|
|
65987
|
+
(0, import_react85.createElement)("span", { style: { color: "var(--dshpc-fg-4)", flex: "none", lineHeight: "1.7" } }, "\xB7"),
|
|
65988
|
+
(0, import_react85.createElement)("span", { style: { color: "var(--dshpc-fg-2)", lineHeight: "1.7" } }, t3(key))
|
|
65954
65989
|
)
|
|
65955
65990
|
),
|
|
65956
|
-
(0,
|
|
65991
|
+
(0, import_react85.createElement)(
|
|
65957
65992
|
"div",
|
|
65958
65993
|
{ style: { marginTop: "2px", fontSize: "12px", color: "var(--dshpc-fg-3)" } },
|
|
65959
65994
|
t3("roadmapLayout")
|
|
65960
65995
|
)
|
|
65961
65996
|
)
|
|
65962
65997
|
),
|
|
65963
|
-
(0,
|
|
65998
|
+
(0, import_react85.createElement)(
|
|
65964
65999
|
Example,
|
|
65965
66000
|
{ title: t3("secBuild"), hint: t3("buildDesc") },
|
|
65966
|
-
(0,
|
|
66001
|
+
(0, import_react85.createElement)(
|
|
65967
66002
|
"table",
|
|
65968
66003
|
{ style: { borderCollapse: "collapse", fontSize: "13px" } },
|
|
65969
|
-
(0,
|
|
66004
|
+
(0, import_react85.createElement)(
|
|
65970
66005
|
"tbody",
|
|
65971
66006
|
null,
|
|
65972
66007
|
[
|
|
65973
|
-
[t3("buildCore"), `v${"0.
|
|
65974
|
-
[t3("buildDemo"), `v${"0.
|
|
65975
|
-
[t3("buildStamp"), "261103-
|
|
66008
|
+
[t3("buildCore"), `v${"0.21.0"}`],
|
|
66009
|
+
[t3("buildDemo"), `v${"0.21.0"}`],
|
|
66010
|
+
[t3("buildStamp"), "261103-090039-142"]
|
|
65976
66011
|
].map(
|
|
65977
|
-
([label, value]) => (0,
|
|
66012
|
+
([label, value]) => (0, import_react85.createElement)(
|
|
65978
66013
|
"tr",
|
|
65979
66014
|
{ key: label },
|
|
65980
|
-
(0,
|
|
65981
|
-
(0,
|
|
66015
|
+
(0, import_react85.createElement)("td", { style: { padding: "5px 18px 5px 0", color: "var(--dshpc-fg-3)", whiteSpace: "nowrap" } }, label),
|
|
66016
|
+
(0, import_react85.createElement)("td", {
|
|
65982
66017
|
style: {
|
|
65983
66018
|
padding: "5px 14px 5px 0",
|
|
65984
66019
|
fontFamily: "var(--dshpc-font-mono)",
|
|
@@ -66004,32 +66039,32 @@ var SECTION_GROUPS = [
|
|
|
66004
66039
|
];
|
|
66005
66040
|
var ALL_SECTIONS = [
|
|
66006
66041
|
// 入门:帮助索引(读哪一份)在前,然后是快速开始与设计基础
|
|
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,
|
|
66042
|
+
{ id: "help-index", group: "start", titleKey: "secHelpIndex", render: () => (0, import_react86.createElement)(HelpIndexPage, null) },
|
|
66043
|
+
{ id: "quickstart", group: "start", titleKey: "secQuickstart", render: () => (0, import_react86.createElement)(QuickstartPage, null) },
|
|
66044
|
+
{ id: "foundation", group: "start", titleKey: "secFoundation", render: () => (0, import_react86.createElement)(FoundationPage, null) },
|
|
66045
|
+
{ id: "button", group: "components", titleKey: "secButton", render: () => (0, import_react86.createElement)(ButtonPage, null) },
|
|
66046
|
+
{ id: "input", group: "components", titleKey: "secInput", render: () => (0, import_react86.createElement)(InputPage, null) },
|
|
66047
|
+
{ id: "picker", group: "components", titleKey: "secPicker", render: () => (0, import_react86.createElement)(PickerPage, null) },
|
|
66048
|
+
{ id: "datetime", group: "components", titleKey: "secDateTime", render: () => (0, import_react86.createElement)(DateTimePage, null) },
|
|
66049
|
+
{ id: "tooltip", group: "components", titleKey: "secTooltip", render: () => (0, import_react86.createElement)(TooltipPage, null) },
|
|
66050
|
+
{ id: "card", group: "components", titleKey: "secCard", render: () => (0, import_react86.createElement)(CardPage, null) },
|
|
66051
|
+
{ id: "chip", group: "components", titleKey: "secChip", render: () => (0, import_react86.createElement)(ChipPage, null) },
|
|
66052
|
+
{ id: "table", group: "components", titleKey: "secTable", render: () => (0, import_react86.createElement)(TablePage, null) },
|
|
66053
|
+
{ id: "feedback", group: "components", titleKey: "secFeedback", render: () => (0, import_react86.createElement)(FeedbackPage, null) },
|
|
66054
|
+
{ id: "layout", group: "components", titleKey: "secLayout", render: () => (0, import_react86.createElement)(LayoutPage, null) },
|
|
66055
|
+
{ id: "toolbar", group: "components", titleKey: "secToolbar", render: () => (0, import_react86.createElement)(ToolbarPage, null) },
|
|
66056
|
+
{ id: "explorer", group: "blocks", titleKey: "secExplorer", render: () => (0, import_react86.createElement)(ExplorerPage, null) },
|
|
66057
|
+
{ id: "session", group: "blocks", titleKey: "secSession", render: () => (0, import_react86.createElement)(SessionPage, null) },
|
|
66058
|
+
{ id: "date", group: "utils", titleKey: "secDate", render: () => (0, import_react86.createElement)(DatePage, null) },
|
|
66059
|
+
{ id: "text", group: "utils", titleKey: "secText", render: () => (0, import_react86.createElement)(TextPage, null) },
|
|
66060
|
+
{ id: "number", group: "utils", titleKey: "secNumber", render: () => (0, import_react86.createElement)(NumberPage, null) },
|
|
66061
|
+
{ id: "http", group: "utils", titleKey: "secHttp", render: () => (0, import_react86.createElement)(HttpPage, null) },
|
|
66062
|
+
{ id: "i18n", group: "utils", titleKey: "secI18n", render: () => (0, import_react86.createElement)(I18nPage, null) },
|
|
66028
66063
|
// 参考:无障碍 / 路线图 / 版本构建三条并成一页
|
|
66029
|
-
{ id: "reference", group: "reference", titleKey: "secReference", render: () => (0,
|
|
66064
|
+
{ id: "reference", group: "reference", titleKey: "secReference", render: () => (0, import_react86.createElement)(ReferencePage, null) }
|
|
66030
66065
|
];
|
|
66031
66066
|
function Placeholder2(props) {
|
|
66032
|
-
return (0,
|
|
66067
|
+
return (0, import_react86.createElement)(
|
|
66033
66068
|
Surface,
|
|
66034
66069
|
{
|
|
66035
66070
|
tone: "sunken",
|
|
@@ -66037,7 +66072,7 @@ function Placeholder2(props) {
|
|
|
66037
66072
|
padding: "lg",
|
|
66038
66073
|
style: { marginTop: "4px", color: "var(--dshpc-fg-3)" }
|
|
66039
66074
|
},
|
|
66040
|
-
(0,
|
|
66075
|
+
(0, import_react86.createElement)("div", {
|
|
66041
66076
|
style: {
|
|
66042
66077
|
fontSize: "11px",
|
|
66043
66078
|
fontWeight: 600,
|
|
@@ -66047,23 +66082,23 @@ function Placeholder2(props) {
|
|
|
66047
66082
|
marginBottom: "10px"
|
|
66048
66083
|
}
|
|
66049
66084
|
}, t3("phTodo")),
|
|
66050
|
-
(0,
|
|
66085
|
+
(0, import_react86.createElement)("div", { style: { fontSize: "13px", lineHeight: "1.9", whiteSpace: "pre-line" } }, t3(props.descKey))
|
|
66051
66086
|
);
|
|
66052
66087
|
}
|
|
66053
66088
|
function SectionHead2(props) {
|
|
66054
|
-
return (0,
|
|
66089
|
+
return (0, import_react86.createElement)(
|
|
66055
66090
|
"div",
|
|
66056
66091
|
{ id: `sec-${props.id}`, style: { margin: "28px 0 14px" } },
|
|
66057
|
-
(0,
|
|
66058
|
-
(0,
|
|
66092
|
+
(0, import_react86.createElement)("h2", { style: { margin: 0, fontSize: "20px" } }, props.title),
|
|
66093
|
+
(0, import_react86.createElement)("div", { style: { height: "3px", width: "36px", background: "var(--dshpc-business)", borderRadius: "var(--dshpc-radius-xs)", marginTop: "6px" } })
|
|
66059
66094
|
);
|
|
66060
66095
|
}
|
|
66061
66096
|
function Sections(props) {
|
|
66062
66097
|
const current4 = ALL_SECTIONS.find((s) => s.id === props.active) ?? ALL_SECTIONS[0];
|
|
66063
|
-
return (0,
|
|
66098
|
+
return (0, import_react86.createElement)(
|
|
66064
66099
|
"div",
|
|
66065
66100
|
null,
|
|
66066
|
-
(0,
|
|
66101
|
+
(0, import_react86.createElement)(SectionHead2, { id: current4.id, title: t3(current4.titleKey) }),
|
|
66067
66102
|
current4.render()
|
|
66068
66103
|
);
|
|
66069
66104
|
}
|
|
@@ -66123,10 +66158,10 @@ function applySidebarEntry() {
|
|
|
66123
66158
|
}
|
|
66124
66159
|
}
|
|
66125
66160
|
function MoreMenuRow(props) {
|
|
66126
|
-
return (0,
|
|
66161
|
+
return (0, import_react87.createElement)(
|
|
66127
66162
|
import_dsh_client_ui_primitives6.MenuItemButton,
|
|
66128
66163
|
{
|
|
66129
|
-
icon: (0,
|
|
66164
|
+
icon: (0, import_react87.createElement)(PanelIcon, { size: 16 }),
|
|
66130
66165
|
onSelect: () => {
|
|
66131
66166
|
props.onDismiss();
|
|
66132
66167
|
jump(PANEL_ID);
|
|
@@ -66137,8 +66172,8 @@ function MoreMenuRow(props) {
|
|
|
66137
66172
|
}
|
|
66138
66173
|
var localeRuntime;
|
|
66139
66174
|
function useLocaleTick() {
|
|
66140
|
-
const [, setTick] = (0,
|
|
66141
|
-
(0,
|
|
66175
|
+
const [, setTick] = (0, import_react87.useState)(0);
|
|
66176
|
+
(0, import_react87.useEffect)(() => {
|
|
66142
66177
|
const rt = localeRuntime;
|
|
66143
66178
|
if (rt === void 0) return;
|
|
66144
66179
|
return rt.subscribe(() => {
|
|
@@ -66148,8 +66183,8 @@ function useLocaleTick() {
|
|
|
66148
66183
|
}
|
|
66149
66184
|
function useHostDark() {
|
|
66150
66185
|
const read = () => document.body.hasAttribute("data-ds-dark-theme");
|
|
66151
|
-
const [dark, setDark] = (0,
|
|
66152
|
-
(0,
|
|
66186
|
+
const [dark, setDark] = (0, import_react87.useState)(read);
|
|
66187
|
+
(0, import_react87.useEffect)(() => {
|
|
66153
66188
|
const obs = new MutationObserver(() => {
|
|
66154
66189
|
setDark(read());
|
|
66155
66190
|
});
|
|
@@ -66169,11 +66204,11 @@ function useHostDark() {
|
|
|
66169
66204
|
function DemoPage() {
|
|
66170
66205
|
useLocaleTick();
|
|
66171
66206
|
const { dark, toggle } = useHostDark();
|
|
66172
|
-
const [active, setActive2] = (0,
|
|
66207
|
+
const [active, setActive2] = (0, import_react87.useState)(ALL_SECTIONS[0].id);
|
|
66173
66208
|
const nav2 = [];
|
|
66174
66209
|
SECTION_GROUPS.forEach((group, gi) => {
|
|
66175
66210
|
nav2.push(
|
|
66176
|
-
(0,
|
|
66211
|
+
(0, import_react87.createElement)(
|
|
66177
66212
|
"div",
|
|
66178
66213
|
{
|
|
66179
66214
|
key: `group-${group.id}`,
|
|
@@ -66191,7 +66226,7 @@ function DemoPage() {
|
|
|
66191
66226
|
);
|
|
66192
66227
|
for (const section of ALL_SECTIONS.filter((s) => s.group === group.id)) {
|
|
66193
66228
|
nav2.push(
|
|
66194
|
-
(0,
|
|
66229
|
+
(0, import_react87.createElement)(
|
|
66195
66230
|
"button",
|
|
66196
66231
|
{
|
|
66197
66232
|
key: section.id,
|
|
@@ -66218,7 +66253,7 @@ function DemoPage() {
|
|
|
66218
66253
|
);
|
|
66219
66254
|
}
|
|
66220
66255
|
});
|
|
66221
|
-
return (0,
|
|
66256
|
+
return (0, import_react87.createElement)(
|
|
66222
66257
|
"div",
|
|
66223
66258
|
{
|
|
66224
66259
|
// 分栏挂载点:explorer 的 openFilePreview 要把 dock 塞进这一行,主区才被挤窄。
|
|
@@ -66235,7 +66270,7 @@ function DemoPage() {
|
|
|
66235
66270
|
["--dshpc-dock-h"]: "100%"
|
|
66236
66271
|
}
|
|
66237
66272
|
},
|
|
66238
|
-
(0,
|
|
66273
|
+
(0, import_react87.createElement)(
|
|
66239
66274
|
"aside",
|
|
66240
66275
|
{
|
|
66241
66276
|
style: {
|
|
@@ -66251,9 +66286,9 @@ function DemoPage() {
|
|
|
66251
66286
|
},
|
|
66252
66287
|
// 导航区:唯一滚动容器;底部操作/版本区固定不动
|
|
66253
66288
|
// 透明右边框 = 滚动条与右缘隔 1px(口径见 docs/design/style.md §滚动条让位)
|
|
66254
|
-
(0,
|
|
66289
|
+
(0, import_react87.createElement)("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", padding: "14px 10px", borderRight: "1px solid transparent" } }, nav2),
|
|
66255
66290
|
// 固定底栏:明暗切换 + 版本号 + 编译码(时间戳,一眼看出编译时刻)
|
|
66256
|
-
(0,
|
|
66291
|
+
(0, import_react87.createElement)(
|
|
66257
66292
|
"div",
|
|
66258
66293
|
{
|
|
66259
66294
|
style: {
|
|
@@ -66266,7 +66301,7 @@ function DemoPage() {
|
|
|
66266
66301
|
}
|
|
66267
66302
|
},
|
|
66268
66303
|
// 明暗切换:核心 Segmented 滑动分段(左亮右暗,图标进 label),不手写按钮
|
|
66269
|
-
(0,
|
|
66304
|
+
(0, import_react87.createElement)(Segmented, {
|
|
66270
66305
|
items: [
|
|
66271
66306
|
{ value: "light", label: `\u2600 ${t3("themeLight")}` },
|
|
66272
66307
|
{ value: "dark", label: `\u263E ${t3("themeDark")}` }
|
|
@@ -66280,7 +66315,7 @@ function DemoPage() {
|
|
|
66280
66315
|
label: t3("themeToggle")
|
|
66281
66316
|
}),
|
|
66282
66317
|
// 版本号 + 编译码:180px 侧栏放不下一行 ⇒ core / demo 各一行;编译码小一号、与上面隔开
|
|
66283
|
-
(0,
|
|
66318
|
+
(0, import_react87.createElement)(
|
|
66284
66319
|
"div",
|
|
66285
66320
|
{
|
|
66286
66321
|
style: {
|
|
@@ -66294,46 +66329,46 @@ function DemoPage() {
|
|
|
66294
66329
|
lineHeight: "14px"
|
|
66295
66330
|
}
|
|
66296
66331
|
},
|
|
66297
|
-
(0,
|
|
66298
|
-
(0,
|
|
66299
|
-
(0,
|
|
66332
|
+
(0, import_react87.createElement)("span", null, `core v${"0.21.0"}`),
|
|
66333
|
+
(0, import_react87.createElement)("span", null, `demo v${"0.21.0"}`),
|
|
66334
|
+
(0, import_react87.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261103-090039-142")
|
|
66300
66335
|
)
|
|
66301
66336
|
)
|
|
66302
66337
|
),
|
|
66303
|
-
(0,
|
|
66338
|
+
(0, import_react87.createElement)(
|
|
66304
66339
|
"main",
|
|
66305
66340
|
// 透明右边框 = 滚动条与右缘隔 1px(口径见 docs/design/style.md §滚动条让位):
|
|
66306
66341
|
// dock 不再让 margin,靠这里让,滚动条与分栏分隔线之间才是 1px。
|
|
66307
66342
|
{ style: { flex: 1, minWidth: 0, minHeight: 0, height: "100%", boxSizing: "border-box", overflowY: "auto", padding: "12px 22px 60px", borderRight: "1px solid transparent" } },
|
|
66308
|
-
(0,
|
|
66343
|
+
(0, import_react87.createElement)(Sections, { active })
|
|
66309
66344
|
),
|
|
66310
66345
|
// 分栏挂在**整页**右侧(真实用法),不是塞进某一节里:任何一页点开都挤窄 main。
|
|
66311
66346
|
// 内容与头部在 demoPanels() 里声明(DockPanel),这里只管显隐。
|
|
66312
|
-
(0,
|
|
66347
|
+
(0, import_react87.createElement)(PanelDock, { dock: demoDock }, ...demoPanels())
|
|
66313
66348
|
);
|
|
66314
66349
|
}
|
|
66315
66350
|
function ConfigPanel(props) {
|
|
66316
66351
|
const form = props.form;
|
|
66317
|
-
const [, rerender] = (0,
|
|
66318
|
-
(0,
|
|
66352
|
+
const [, rerender] = (0, import_react87.useState)(0);
|
|
66353
|
+
(0, import_react87.useEffect)(() => form.subscribe(() => {
|
|
66319
66354
|
rerender((n) => n + 1);
|
|
66320
66355
|
}), [form]);
|
|
66321
|
-
if (props.view !== "page") return (0,
|
|
66356
|
+
if (props.view !== "page") return (0, import_react87.createElement)("div", { style: { display: "none" } });
|
|
66322
66357
|
const snap = form.getSnapshot();
|
|
66323
66358
|
const storedMode = snap.value?.entryMode;
|
|
66324
66359
|
const mode = storedMode === "off" || storedMode === "first" || storedMode === "more" ? storedMode : "more";
|
|
66325
66360
|
const ready = snap.status === "ready";
|
|
66326
|
-
return (0,
|
|
66361
|
+
return (0, import_react87.createElement)(
|
|
66327
66362
|
"div",
|
|
66328
66363
|
{ style: { display: "flex", flexDirection: "column", gap: "14px" } },
|
|
66329
66364
|
// 一句话说明「这个插件是干嘛的」——标题由详情页自己画,这里只补定位
|
|
66330
|
-
(0,
|
|
66365
|
+
(0, import_react87.createElement)("div", { style: { color: "var(--dshpc-fg-3)", fontSize: "12px", lineHeight: "18px" } }, t3("settingsIntro")),
|
|
66331
66366
|
// 设置行:滑动栏在右、说明在左;左缘圆角短条有入口=绿 / 关闭=灰(核心 Card 框式)
|
|
66332
|
-
ready ? (0,
|
|
66367
|
+
ready ? (0, import_react87.createElement)(
|
|
66333
66368
|
Card,
|
|
66334
66369
|
{
|
|
66335
66370
|
accent: mode === "off" ? "neutral" : "success",
|
|
66336
|
-
action: (0,
|
|
66371
|
+
action: (0, import_react87.createElement)(Segmented, {
|
|
66337
66372
|
size: "sm",
|
|
66338
66373
|
value: mode,
|
|
66339
66374
|
disabled: !snap.writable,
|
|
@@ -66350,35 +66385,35 @@ function ConfigPanel(props) {
|
|
|
66350
66385
|
]
|
|
66351
66386
|
})
|
|
66352
66387
|
},
|
|
66353
|
-
(0,
|
|
66388
|
+
(0, import_react87.createElement)(
|
|
66354
66389
|
"div",
|
|
66355
66390
|
null,
|
|
66356
|
-
(0,
|
|
66357
|
-
(0,
|
|
66391
|
+
(0, import_react87.createElement)("div", { style: { fontSize: "13px", fontWeight: 500 } }, t3("settingsEntryTitle")),
|
|
66392
|
+
(0, import_react87.createElement)(
|
|
66358
66393
|
"div",
|
|
66359
66394
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "12px", marginTop: "2px" } },
|
|
66360
66395
|
t3("settingsEntryHint")
|
|
66361
66396
|
)
|
|
66362
66397
|
)
|
|
66363
|
-
) : (0,
|
|
66398
|
+
) : (0, import_react87.createElement)(
|
|
66364
66399
|
"div",
|
|
66365
66400
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "12px" } },
|
|
66366
66401
|
t3(snap.status === "loading" ? "settingsLoading" : "settingsUnavailable")
|
|
66367
66402
|
),
|
|
66368
|
-
(0,
|
|
66403
|
+
(0, import_react87.createElement)(
|
|
66369
66404
|
"div",
|
|
66370
66405
|
{ style: { display: "flex", gap: "8px" } },
|
|
66371
|
-
(0,
|
|
66406
|
+
(0, import_react87.createElement)(
|
|
66372
66407
|
Button,
|
|
66373
|
-
{ size: "md", variant: "primary", icon: (0,
|
|
66408
|
+
{ size: "md", variant: "primary", icon: (0, import_react87.createElement)(import_dsh_client_ui_primitives6.IconPlayOutlineRegular, { size: 16 }), onClick: props.openDemo },
|
|
66374
66409
|
t3("settingsOpenDemo")
|
|
66375
66410
|
),
|
|
66376
|
-
(0,
|
|
66411
|
+
(0, import_react87.createElement)(
|
|
66377
66412
|
Button,
|
|
66378
66413
|
{
|
|
66379
66414
|
size: "md",
|
|
66380
66415
|
variant: "outline",
|
|
66381
|
-
icon: (0,
|
|
66416
|
+
icon: (0, import_react87.createElement)(import_dsh_client_ui_primitives6.IconLinkOutlineRegular, { size: 16 }),
|
|
66382
66417
|
onClick: () => {
|
|
66383
66418
|
window.open("https://github.com/cq-guojia/dsh-plugin-core", "_blank", "noopener");
|
|
66384
66419
|
}
|
|
@@ -66390,14 +66425,14 @@ function ConfigPanel(props) {
|
|
|
66390
66425
|
}
|
|
66391
66426
|
function PanelIcon(props) {
|
|
66392
66427
|
const size4 = props.size ?? 18;
|
|
66393
|
-
return (0,
|
|
66428
|
+
return (0, import_react87.createElement)(
|
|
66394
66429
|
"svg",
|
|
66395
66430
|
{ width: size4, height: size4, viewBox: "0 0 1024 1024", "aria-hidden": true },
|
|
66396
|
-
(0,
|
|
66397
|
-
(0,
|
|
66398
|
-
(0,
|
|
66399
|
-
(0,
|
|
66400
|
-
(0,
|
|
66431
|
+
(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" }),
|
|
66432
|
+
(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 }),
|
|
66433
|
+
(0, import_react87.createElement)("path", { d: "M640 268.8h192v96h-192z", fill: "currentColor" }),
|
|
66434
|
+
(0, import_react87.createElement)("path", { d: "M832 563.2h-192V460.8h192v102.4z", fill: "currentColor", opacity: 0.38 }),
|
|
66435
|
+
(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
66436
|
);
|
|
66402
66437
|
}
|
|
66403
66438
|
function apply(ctx) {
|
|
@@ -66406,7 +66441,7 @@ function apply(ctx) {
|
|
|
66406
66441
|
ensureControls(kit);
|
|
66407
66442
|
kit.registerStyle("demo", DEMO_CSS);
|
|
66408
66443
|
kit.ensureStyles();
|
|
66409
|
-
setTooltipRenderer((props) => (0,
|
|
66444
|
+
setTooltipRenderer((props) => (0, import_react87.createElement)(import_dsh_client_ui_primitives6.Tooltip, props));
|
|
66410
66445
|
ctx.inject(["layout"], (sub) => {
|
|
66411
66446
|
const layout = sub?.layout;
|
|
66412
66447
|
if (layout?.selectPanel === void 0) return;
|