dsh-plugin-core-demo 0.20.8 → 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 +980 -934
- 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;
|
|
@@ -54844,6 +54893,11 @@ var VIEWPORT_EDGE = 12;
|
|
|
54844
54893
|
function clamp2(value, low, high) {
|
|
54845
54894
|
return Math.min(Math.max(value, low), Math.max(low, high));
|
|
54846
54895
|
}
|
|
54896
|
+
function flipSide(preferred, own, other, min2) {
|
|
54897
|
+
if (own >= min2)
|
|
54898
|
+
return preferred;
|
|
54899
|
+
return other > own ? !preferred : preferred;
|
|
54900
|
+
}
|
|
54847
54901
|
function placePicker(anchor, viewport, placement = "auto") {
|
|
54848
54902
|
const vw = viewport.width;
|
|
54849
54903
|
const vh = viewport.height;
|
|
@@ -54853,7 +54907,7 @@ function placePicker(anchor, viewport, placement = "auto") {
|
|
|
54853
54907
|
if (placement === "auto") {
|
|
54854
54908
|
const availBelow = vh - EDGE - (anchor.bottom + GAP2);
|
|
54855
54909
|
const availAbove = anchor.top - GAP2 - EDGE;
|
|
54856
|
-
const below = availBelow
|
|
54910
|
+
const below = flipSide(true, availBelow, availAbove, PICKER_MIN_H);
|
|
54857
54911
|
const height2 = Math.max(Math.min(PICKER_MAX_H, below ? availBelow : availAbove), PICKER_MIN_FLOOR);
|
|
54858
54912
|
const left2 = clamp2(anchor.left, EDGE, vw - EDGE - fullWidth);
|
|
54859
54913
|
const top3 = below ? clamp2(Math.min(anchor.bottom + GAP2, vh - EDGE - height2), EDGE, vh - EDGE - height2) : clamp2(anchor.top - GAP2 - height2, EDGE, vh - EDGE - height2);
|
|
@@ -54861,9 +54915,12 @@ function placePicker(anchor, viewport, placement = "auto") {
|
|
|
54861
54915
|
}
|
|
54862
54916
|
const vertical = placement.startsWith("bottom") || placement.startsWith("top");
|
|
54863
54917
|
if (vertical) {
|
|
54864
|
-
const
|
|
54918
|
+
const belowAvail = vh - EDGE - (anchor.bottom + GAP2);
|
|
54919
|
+
const aboveAvail = anchor.top - GAP2 - EDGE;
|
|
54865
54920
|
const startAligned2 = placement.endsWith("start");
|
|
54866
|
-
const
|
|
54921
|
+
const prefersBelow = placement.startsWith("bottom");
|
|
54922
|
+
const below = flipSide(prefersBelow, prefersBelow ? belowAvail : aboveAvail, prefersBelow ? aboveAvail : belowAvail, PICKER_MIN_H);
|
|
54923
|
+
const avail = below ? belowAvail : aboveAvail;
|
|
54867
54924
|
const height2 = Math.max(Math.min(PICKER_MAX_H, avail), PICKER_MIN_FLOOR);
|
|
54868
54925
|
const rawLeft2 = startAligned2 ? anchor.left : anchor.right - fullWidth;
|
|
54869
54926
|
const left2 = clamp2(rawLeft2, EDGE, vw - EDGE - fullWidth);
|
|
@@ -54871,9 +54928,12 @@ function placePicker(anchor, viewport, placement = "auto") {
|
|
|
54871
54928
|
const top3 = clamp2(rawTop2, EDGE, vh - EDGE - height2);
|
|
54872
54929
|
return round2({ left: left2, top: top3, width: fullWidth, height: height2 });
|
|
54873
54930
|
}
|
|
54874
|
-
const toRight = placement.startsWith("right");
|
|
54875
54931
|
const startAligned = placement.endsWith("start");
|
|
54876
|
-
const
|
|
54932
|
+
const rightAvail = vw - EDGE - (anchor.right + GAP2);
|
|
54933
|
+
const leftAvail = anchor.left - GAP2 - EDGE;
|
|
54934
|
+
const prefersRight = placement.startsWith("right");
|
|
54935
|
+
const toRight = flipSide(prefersRight, prefersRight ? rightAvail : leftAvail, prefersRight ? leftAvail : rightAvail, PICKER_MIN_W);
|
|
54936
|
+
const availW = toRight ? rightAvail : leftAvail;
|
|
54877
54937
|
const width = Math.max(Math.min(PICKER_WIDTH, availW), Math.min(PICKER_MIN_W, Math.max(vw - 2 * EDGE, 0)));
|
|
54878
54938
|
const height = Math.min(PICKER_MAX_H, Math.max(vh - 2 * EDGE, 0));
|
|
54879
54939
|
const rawLeft = toRight ? anchor.right + GAP2 : anchor.left - GAP2 - width;
|
|
@@ -58401,7 +58461,7 @@ var DICT2 = {
|
|
|
58401
58461
|
marqueeTitle: "MarqueeText \u8DD1\u9A6C\u706F",
|
|
58402
58462
|
liveTitle: "LiveText \u5B9E\u65F6\u6587\u672C",
|
|
58403
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",
|
|
58404
|
-
feedbackToastHint: "\u547D\u4EE4\u5F0F
|
|
58464
|
+
feedbackToastHint: "\u547D\u4EE4\u5F0F notify\uFF0C\u4E0D\u8981\u6C42\u6302\u7EC4\u4EF6",
|
|
58405
58465
|
explorerDataTitle: "\u6570\u636E\u6765\u6E90\uFF08\u771F\u6570\u636E\uFF0C\u65E0 mock\uFF09",
|
|
58406
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",
|
|
58407
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",
|
|
@@ -58438,7 +58498,7 @@ var DICT2 = {
|
|
|
58438
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",
|
|
58439
58499
|
exLiveHint: "\u8BA2\u9605\u5185\u90E8\u8282\u62CD\u5668\uFF0C\u8D70\u65F6 Ui \u7531\u8C03\u7528\u65B9\u6E32\u67D3",
|
|
58440
58500
|
exSmallModalTitle: "\u5C0F\u578B\u5F39\u7A97\uFF08\u81EA\u5B9A\u4E49\uFF09",
|
|
58441
|
-
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",
|
|
58442
58502
|
exLargeModalTitle: "\u5927\u578B\u5F39\u7A97\uFF08\u81EA\u5B9A\u4E49\uFF09",
|
|
58443
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",
|
|
58444
58504
|
exSideSheetTitle: "\u4FA7\u8FB9\u62BD\u5C49\uFF08\u8986\u76D6\u5F0F\uFF09",
|
|
@@ -58447,14 +58507,10 @@ var DICT2 = {
|
|
|
58447
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',
|
|
58448
58508
|
exToastNotifyTitle: "Toast \xB7 \u6211\u4EEC\u5C01\u88C5 notify",
|
|
58449
58509
|
exToastNotifyHint: "notify()\uFF1A\u7EDF\u4E00\u7070/\u7EFF/\u7EA2/\u9EC4 + \u53F3\u4FA7\u6211\u4EEC\u81EA\u5DF1\u7684\u6309\u94AE",
|
|
58450
|
-
exToastHostTitle: "Toast \xB7 \u5BBF\u4E3B\u539F\u751F",
|
|
58451
|
-
exToastHostHint: "showHostToast()\uFF1A\u76F4\u63A5\u5305 @deepseek-ai \u5B98\u65B9 Toast\uFF08\u9876\u90E8\u6A2A\u5E45\uFF09",
|
|
58452
58510
|
exLoaderTitle: "\u52A0\u8F7D\u56FE\u6807 \xB7 Loader",
|
|
58453
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",
|
|
58454
58512
|
exLoadingTitle: "\u52A0\u8F7D\u63D0\u793A \xB7 \u4E24\u79CD\u6837\u5F0F",
|
|
58455
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",
|
|
58456
|
-
exToastSonnerTitle: "Toast \xB7 \u5B98\u65B9 Sonner",
|
|
58457
|
-
exToastSonnerHint: "showToast()\uFF1A\u7B2C\u4E09\u65B9\u5E93\u539F\u5473\uFF0C\u5BF9\u6BD4\u7528",
|
|
58458
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",
|
|
58459
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",
|
|
58460
58516
|
sessionListEmpty: "\u5BBF\u4E3B\u5F53\u524D\u6CA1\u6709\u53EF\u663E\u793A\u7684\u4F1A\u8BDD",
|
|
@@ -58660,7 +58716,7 @@ var DICT2 = {
|
|
|
58660
58716
|
marqueeTitle: "MarqueeText",
|
|
58661
58717
|
liveTitle: "LiveText",
|
|
58662
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",
|
|
58663
|
-
feedbackToastHint: "Imperative
|
|
58719
|
+
feedbackToastHint: "Imperative notify \u2014 no component mounting required",
|
|
58664
58720
|
explorerDataTitle: "Where the data comes from (real data, no mocks)",
|
|
58665
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.',
|
|
58666
58722
|
explorerFilesNone: "Not ready: the host has not exposed remote.workspaceFiles yet (no preview, no picking \u2014 no fake data either)",
|
|
@@ -58697,7 +58753,7 @@ var DICT2 = {
|
|
|
58697
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",
|
|
58698
58754
|
exLiveHint: "Subscribes to an internal ticker; the running clock UI is rendered by the caller",
|
|
58699
58755
|
exSmallModalTitle: "Small dialogs (custom)",
|
|
58700
|
-
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.",
|
|
58701
58757
|
exLargeModalTitle: "Large dialogs (custom)",
|
|
58702
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.",
|
|
58703
58759
|
exSideSheetTitle: "Side drawer (overlay)",
|
|
@@ -58706,14 +58762,10 @@ var DICT2 = {
|
|
|
58706
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.',
|
|
58707
58763
|
exToastNotifyTitle: "Toast \xB7 our notify wrapper",
|
|
58708
58764
|
exToastNotifyHint: "notify(): uniform grey/green/red/yellow plus our own button on the right",
|
|
58709
|
-
exToastHostTitle: "Toast \xB7 host native",
|
|
58710
|
-
exToastHostHint: "showHostToast(): wraps the official @deepseek-ai Toast (top banner)",
|
|
58711
58765
|
exLoaderTitle: "Loader \xB7 icon only",
|
|
58712
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.",
|
|
58713
58767
|
exLoadingTitle: "Loading \xB7 two styles",
|
|
58714
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.",
|
|
58715
|
-
exToastSonnerTitle: "Toast \xB7 Sonner",
|
|
58716
|
-
exToastSonnerHint: "showToast(): the third-party library as-is, for comparison",
|
|
58717
58769
|
sessionRealHint: "Host sessions.list snapshot (cold-safe, no Agent activation) \u2192 click for a real preview; fork and navigation are official APIs",
|
|
58718
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",
|
|
58719
58771
|
sessionListEmpty: "The host has no visible sessions right now",
|
|
@@ -58854,7 +58906,7 @@ function demoPanels() {
|
|
|
58854
58906
|
var pageRow = { element: null };
|
|
58855
58907
|
|
|
58856
58908
|
// packages/demo/src/sections/index.tsx
|
|
58857
|
-
var
|
|
58909
|
+
var import_react86 = require("react");
|
|
58858
58910
|
|
|
58859
58911
|
// packages/demo/src/sections/start.tsx
|
|
58860
58912
|
var import_react78 = require("react");
|
|
@@ -59126,8 +59178,8 @@ var docData = {
|
|
|
59126
59178
|
"type": "PickPlacement",
|
|
59127
59179
|
"def": "'auto'",
|
|
59128
59180
|
"desc": {
|
|
59129
|
-
"zh": "\u5C55\u5F00\u65B9\u4F4D\u516B\u6863\uFF1A`bottom-start` / `bottom-end`\uFF08\u4E0B\u65B9\uFF0C\u5DE6\u7F18 / \u53F3\u7F18\u5BF9\u9F50\uFF09\u3001`top-start` / `top-end`\uFF08\u4E0A\u65B9\uFF09\u3001`right-start` / `right-end`\uFF08\u53F3\u4FA7\uFF0C\u9876\u8FB9 / \u5E95\u8FB9\u9F50\u5E73\uFF09\u3001`left-start` / `left-end`\uFF08\u5DE6\u4FA7\uFF09\uFF1B`auto` = \u65E7\u884C\u4E3A\uFF08\u4E0B\u65B9\u4F18\u5148\u3001\u4E0B\u65B9\u4E0D\u591F\u7FFB\u4E0A\u65B9\u3001\u6A2A\u5411\u5939\u7D27\uFF09\u3002
|
|
59130
|
-
"en": "Expansion side, eight values: `bottom-start` / `bottom-end` (below, left / right edge aligned), `top-start` / `top-end` (above), `right-start` / `right-end` (right of the trigger, top / bottom edge aligned), `left-start` / `left-end` (left of the trigger); `auto` = old behaviour (below first, flip above when short, clamp horizontally).
|
|
59181
|
+
"zh": "\u5C55\u5F00\u65B9\u4F4D\u516B\u6863\uFF1A`bottom-start` / `bottom-end`\uFF08\u4E0B\u65B9\uFF0C\u5DE6\u7F18 / \u53F3\u7F18\u5BF9\u9F50\uFF09\u3001`top-start` / `top-end`\uFF08\u4E0A\u65B9\uFF09\u3001`right-start` / `right-end`\uFF08\u53F3\u4FA7\uFF0C\u9876\u8FB9 / \u5E95\u8FB9\u9F50\u5E73\uFF09\u3001`left-start` / `left-end`\uFF08\u5DE6\u4FA7\uFF09\uFF1B`auto` = \u65E7\u884C\u4E3A\uFF08\u4E0B\u65B9\u4F18\u5148\u3001\u4E0B\u65B9\u4E0D\u591F\u7FFB\u4E0A\u65B9\u3001\u6A2A\u5411\u5939\u7D27\uFF09\u3002\u65B9\u4F4D\u662F**\u4F18\u5148**\uFF1A\u8BE5\u4FA7\u653E\u5F97\u4E0B\u5C31\u7167\u5B83\uFF1B\u653E\u4E0D\u4E0B\u800C\u5BF9\u4FA7\u591F \u21D2 **\u81EA\u52A8\u7FFB\u8FB9**\uFF08bottom\u2194top\u3001left\u2194right\uFF0C\u5BF9\u9F50\u8F74\u4E0D\u53D8\uFF09\uFF1B\u4E24\u4FA7\u90FD\u4E0D\u591F\u624D\u5939\u7D27\u8FDB\u89C6\u53E3\u2014\u2014\u6309\u94AE\u8D34\u7740\u5B9A\u5BBD\u533A\u53F3\u8FB9\u754C\u65F6\u7528 `bottom-end` / `left-start`",
|
|
59182
|
+
"en": "Expansion side, eight values: `bottom-start` / `bottom-end` (below, left / right edge aligned), `top-start` / `top-end` (above), `right-start` / `right-end` (right of the trigger, top / bottom edge aligned), `left-start` / `left-end` (left of the trigger); `auto` = old behaviour (below first, flip above when short, clamp horizontally). The side is a **preference**: used when it fits; if it does not fit but the opposite side does, the panel **flips** (bottom\u2194top, left\u2194right, same start/end alignment); only when neither fits is it clamped into the viewport \u2014 use `bottom-end` / `left-start` when the trigger sits at the right edge of a fixed-width area"
|
|
59131
59183
|
}
|
|
59132
59184
|
}
|
|
59133
59185
|
]
|
|
@@ -61547,8 +61599,8 @@ var docData = {
|
|
|
61547
61599
|
"type": "",
|
|
61548
61600
|
"def": "",
|
|
61549
61601
|
"desc": {
|
|
61550
|
-
"zh": "\u5B98\u65B9 Sonner \u539F\
|
|
61551
|
-
"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"
|
|
61552
61604
|
}
|
|
61553
61605
|
},
|
|
61554
61606
|
{
|
|
@@ -62634,34 +62686,7 @@ ensureControls()`
|
|
|
62634
62686
|
}
|
|
62635
62687
|
|
|
62636
62688
|
// packages/demo/src/sections/controls.tsx
|
|
62637
|
-
var import_react81 = require("react");
|
|
62638
|
-
|
|
62639
|
-
// dist/ui/host-toast.js
|
|
62640
62689
|
var import_react80 = require("react");
|
|
62641
|
-
var import_client6 = require("react-dom/client");
|
|
62642
|
-
function showHostToast(message, opts) {
|
|
62643
|
-
if (typeof document === "undefined")
|
|
62644
|
-
return;
|
|
62645
|
-
const container = document.createElement("div");
|
|
62646
|
-
document.body.appendChild(container);
|
|
62647
|
-
const root = (0, import_client6.createRoot)(container);
|
|
62648
|
-
const close = () => {
|
|
62649
|
-
root.unmount();
|
|
62650
|
-
container.remove();
|
|
62651
|
-
};
|
|
62652
|
-
root.render((0, import_react80.createElement)(Official.Toast, {
|
|
62653
|
-
text: message,
|
|
62654
|
-
tone: opts?.tone,
|
|
62655
|
-
holdMs: opts?.holdMs ?? 3e3,
|
|
62656
|
-
actions: opts?.actions !== void 0 ? opts.actions.map((a) => ({ label: a.text, onClick: a.onClick })) : void 0,
|
|
62657
|
-
onDone: () => {
|
|
62658
|
-
close();
|
|
62659
|
-
opts?.onDismiss?.();
|
|
62660
|
-
}
|
|
62661
|
-
}));
|
|
62662
|
-
}
|
|
62663
|
-
|
|
62664
|
-
// packages/demo/src/sections/controls.tsx
|
|
62665
62690
|
var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
62666
62691
|
var BUTTON_ICONS = [
|
|
62667
62692
|
{ name: "plus", Icon: import_dsh_client_ui_primitives2.IconPlusOutlineRegular },
|
|
@@ -62679,13 +62704,13 @@ var BUTTON_ICONS = [
|
|
|
62679
62704
|
];
|
|
62680
62705
|
function iconOf(name2, size4 = 14) {
|
|
62681
62706
|
const found = BUTTON_ICONS.find((item) => item.name === name2);
|
|
62682
|
-
return found === void 0 ? null : (0,
|
|
62707
|
+
return found === void 0 ? null : (0, import_react80.createElement)(found.Icon, { size: size4 });
|
|
62683
62708
|
}
|
|
62684
62709
|
function StarSvg() {
|
|
62685
|
-
return (0,
|
|
62710
|
+
return (0, import_react80.createElement)(
|
|
62686
62711
|
"svg",
|
|
62687
62712
|
{ width: 14, height: 14, viewBox: "0 0 16 16", fill: "none", "aria-hidden": true },
|
|
62688
|
-
(0,
|
|
62713
|
+
(0, import_react80.createElement)("path", {
|
|
62689
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",
|
|
62690
62715
|
stroke: "currentColor",
|
|
62691
62716
|
strokeWidth: 1.2,
|
|
@@ -62725,7 +62750,7 @@ var CUSTOM_COLORS = ["#7c3aed", "#0ea5e9", "#f97316", "#16a34a"];
|
|
|
62725
62750
|
function tipAnchor(text2, side, align) {
|
|
62726
62751
|
const props = { label: text2, side };
|
|
62727
62752
|
if (align !== void 0) props.align = align;
|
|
62728
|
-
return (0,
|
|
62753
|
+
return (0, import_react80.createElement)(import_dsh_client_ui_primitives2.Tooltip, props, (0, import_react80.createElement)("button", {
|
|
62729
62754
|
type: "button",
|
|
62730
62755
|
style: {
|
|
62731
62756
|
padding: "4px 10px",
|
|
@@ -62739,13 +62764,13 @@ function tipAnchor(text2, side, align) {
|
|
|
62739
62764
|
}, text2));
|
|
62740
62765
|
}
|
|
62741
62766
|
function Row(props) {
|
|
62742
|
-
return (0,
|
|
62767
|
+
return (0, import_react80.createElement)("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "center" } }, props.children);
|
|
62743
62768
|
}
|
|
62744
62769
|
function Labeled(props) {
|
|
62745
|
-
return (0,
|
|
62770
|
+
return (0, import_react80.createElement)(
|
|
62746
62771
|
"div",
|
|
62747
62772
|
{ style: { display: "flex", gap: "10px", alignItems: "center", flexWrap: "wrap" } },
|
|
62748
|
-
(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),
|
|
62749
62774
|
props.children
|
|
62750
62775
|
);
|
|
62751
62776
|
}
|
|
@@ -62807,200 +62832,200 @@ var CODE_BTN_WIDTH = `// \u56FA\u5B9A\u5BBD\uFF1A\u5199\u6B7B\u5BBD\u5EA6
|
|
|
62807
62832
|
// \u4E09\u8005\u540C\u8BBE \u21D2 \u56FA\u5B9A\u5BBD\u4F18\u5148\uFF0C\u6700\u5C0F\u5BBD / \u6700\u5927\u5BBD\u81EA\u52A8\u5931\u6548
|
|
62808
62833
|
<Button variant="outline" width={120} minWidth={200} maxWidth={160}>\u56FA\u5B9A\u5BBD\u4F18\u5148</Button>`;
|
|
62809
62834
|
function ButtonPage() {
|
|
62810
|
-
return (0,
|
|
62835
|
+
return (0, import_react80.createElement)(
|
|
62811
62836
|
"div",
|
|
62812
62837
|
null,
|
|
62813
|
-
(0,
|
|
62838
|
+
(0, import_react80.createElement)(DocProse, { id: "button" }),
|
|
62814
62839
|
// 文案与语言
|
|
62815
|
-
(0,
|
|
62840
|
+
(0, import_react80.createElement)(
|
|
62816
62841
|
Example,
|
|
62817
62842
|
{ title: t3("btnTextTitle"), hint: t3("btnTextHint"), code: CODE_BTN_TEXT },
|
|
62818
|
-
(0,
|
|
62843
|
+
(0, import_react80.createElement)(
|
|
62819
62844
|
"div",
|
|
62820
62845
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62821
|
-
(0,
|
|
62846
|
+
(0, import_react80.createElement)(
|
|
62822
62847
|
Labeled,
|
|
62823
62848
|
{ label: "locale" },
|
|
62824
|
-
(0,
|
|
62825
|
-
(0,
|
|
62826
|
-
(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"))
|
|
62827
62852
|
),
|
|
62828
|
-
(0,
|
|
62853
|
+
(0, import_react80.createElement)(
|
|
62829
62854
|
Labeled,
|
|
62830
62855
|
{ label: "en" },
|
|
62831
|
-
(0,
|
|
62832
|
-
(0,
|
|
62833
|
-
(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")
|
|
62834
62859
|
),
|
|
62835
|
-
(0,
|
|
62860
|
+
(0, import_react80.createElement)(
|
|
62836
62861
|
Labeled,
|
|
62837
62862
|
{ label: "zh" },
|
|
62838
|
-
(0,
|
|
62839
|
-
(0,
|
|
62840
|
-
(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")
|
|
62841
62866
|
),
|
|
62842
|
-
(0,
|
|
62867
|
+
(0, import_react80.createElement)(
|
|
62843
62868
|
Labeled,
|
|
62844
62869
|
{ label: "zh + en" },
|
|
62845
|
-
(0,
|
|
62846
|
-
(0,
|
|
62847
|
-
(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")
|
|
62848
62873
|
)
|
|
62849
62874
|
)
|
|
62850
62875
|
),
|
|
62851
62876
|
// 10 档外观
|
|
62852
|
-
(0,
|
|
62877
|
+
(0, import_react80.createElement)(
|
|
62853
62878
|
Example,
|
|
62854
62879
|
{ title: t3("btnVariantTitle"), hint: t3("btnVariantHint"), code: CODE_BTN_VARIANT },
|
|
62855
|
-
(0,
|
|
62880
|
+
(0, import_react80.createElement)(
|
|
62856
62881
|
"div",
|
|
62857
62882
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62858
|
-
VARIANT_GROUPS.map((group) => (0,
|
|
62883
|
+
VARIANT_GROUPS.map((group) => (0, import_react80.createElement)(
|
|
62859
62884
|
Labeled,
|
|
62860
62885
|
{ key: group.label, label: group.label },
|
|
62861
|
-
(0,
|
|
62886
|
+
(0, import_react80.createElement)(
|
|
62862
62887
|
"div",
|
|
62863
62888
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", alignItems: "flex-start" } },
|
|
62864
|
-
(0,
|
|
62865
|
-
(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)))
|
|
62866
62891
|
)
|
|
62867
62892
|
))
|
|
62868
62893
|
)
|
|
62869
62894
|
),
|
|
62870
62895
|
// 尺寸 / 图标位置 / block
|
|
62871
|
-
(0,
|
|
62896
|
+
(0, import_react80.createElement)(
|
|
62872
62897
|
Example,
|
|
62873
62898
|
{ title: t3("btnSizeTitle"), hint: t3("btnSizeHint"), code: CODE_BTN_SIZE },
|
|
62874
|
-
(0,
|
|
62899
|
+
(0, import_react80.createElement)(
|
|
62875
62900
|
"div",
|
|
62876
62901
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62877
|
-
(0,
|
|
62902
|
+
(0, import_react80.createElement)(
|
|
62878
62903
|
Labeled,
|
|
62879
62904
|
{ label: "size" },
|
|
62880
|
-
["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))
|
|
62881
62906
|
),
|
|
62882
62907
|
// icon 收的是 ReactNode:官方图标组件 / 自绘 SVG / 一个字符,三种来源各一颗
|
|
62883
|
-
(0,
|
|
62908
|
+
(0, import_react80.createElement)(
|
|
62884
62909
|
Labeled,
|
|
62885
62910
|
{ label: "icon" },
|
|
62886
|
-
(0,
|
|
62887
|
-
(0,
|
|
62888
|
-
(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")
|
|
62889
62914
|
),
|
|
62890
|
-
(0,
|
|
62915
|
+
(0, import_react80.createElement)(
|
|
62891
62916
|
Labeled,
|
|
62892
62917
|
{ label: "iconRight" },
|
|
62893
|
-
(0,
|
|
62894
|
-
(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")
|
|
62895
62920
|
),
|
|
62896
62921
|
// block + 前置图标:文字要在视觉中心,不能整组内容居中(那样文字会被图标推右)
|
|
62897
|
-
(0,
|
|
62922
|
+
(0, import_react80.createElement)(
|
|
62898
62923
|
Labeled,
|
|
62899
62924
|
{ label: "block" },
|
|
62900
|
-
(0,
|
|
62925
|
+
(0, import_react80.createElement)(
|
|
62901
62926
|
"div",
|
|
62902
62927
|
{ style: { width: "260px" } },
|
|
62903
|
-
(0,
|
|
62904
|
-
(0,
|
|
62905
|
-
(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")
|
|
62906
62931
|
)
|
|
62907
62932
|
),
|
|
62908
|
-
(0,
|
|
62933
|
+
(0, import_react80.createElement)(
|
|
62909
62934
|
Labeled,
|
|
62910
62935
|
{ label: t3("btnIconOnly") },
|
|
62911
|
-
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 }))
|
|
62912
62937
|
),
|
|
62913
62938
|
// 纯图标钮的配色轴:默认无底色;color 改图标色,background 给底色(用户 2026-11-02)
|
|
62914
|
-
(0,
|
|
62939
|
+
(0, import_react80.createElement)(
|
|
62915
62940
|
Labeled,
|
|
62916
62941
|
{ label: "IconButton \xB7 color / background" },
|
|
62917
|
-
(0,
|
|
62918
|
-
(0,
|
|
62919
|
-
(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" })
|
|
62920
62945
|
)
|
|
62921
62946
|
)
|
|
62922
62947
|
),
|
|
62923
62948
|
// 状态
|
|
62924
|
-
(0,
|
|
62949
|
+
(0, import_react80.createElement)(
|
|
62925
62950
|
Example,
|
|
62926
62951
|
{ title: t3("btnStateTitle"), hint: t3("btnStateHint"), code: CODE_BTN_STATE },
|
|
62927
|
-
(0,
|
|
62952
|
+
(0, import_react80.createElement)(
|
|
62928
62953
|
"div",
|
|
62929
62954
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62930
|
-
(0,
|
|
62955
|
+
(0, import_react80.createElement)(
|
|
62931
62956
|
Labeled,
|
|
62932
62957
|
{ label: "\u7981\u7528" },
|
|
62933
|
-
(0,
|
|
62934
|
-
(0,
|
|
62935
|
-
(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")
|
|
62936
62961
|
),
|
|
62937
|
-
(0,
|
|
62962
|
+
(0, import_react80.createElement)(
|
|
62938
62963
|
Labeled,
|
|
62939
62964
|
{ label: "loading" },
|
|
62940
|
-
(0,
|
|
62941
|
-
(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")
|
|
62942
62967
|
)
|
|
62943
62968
|
)
|
|
62944
62969
|
),
|
|
62945
62970
|
// 自定义颜色
|
|
62946
|
-
(0,
|
|
62971
|
+
(0, import_react80.createElement)(
|
|
62947
62972
|
Example,
|
|
62948
62973
|
{ title: t3("btnColorTitle"), hint: t3("btnColorHint"), code: CODE_BTN_COLOR },
|
|
62949
|
-
(0,
|
|
62974
|
+
(0, import_react80.createElement)(
|
|
62950
62975
|
"div",
|
|
62951
62976
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
62952
|
-
(0,
|
|
62977
|
+
(0, import_react80.createElement)(
|
|
62953
62978
|
Labeled,
|
|
62954
62979
|
{ label: "\u5B9E\u5FC3" },
|
|
62955
|
-
(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)))
|
|
62956
62981
|
),
|
|
62957
|
-
(0,
|
|
62982
|
+
(0, import_react80.createElement)(
|
|
62958
62983
|
Labeled,
|
|
62959
62984
|
{ label: "\u63CF\u8FB9" },
|
|
62960
|
-
(0,
|
|
62985
|
+
(0, import_react80.createElement)(Row, null, CUSTOM_COLORS.map((color) => (0, import_react80.createElement)(Button, { key: color, variant: "outline", color }, color)))
|
|
62961
62986
|
)
|
|
62962
62987
|
)
|
|
62963
62988
|
),
|
|
62964
62989
|
// 宽度三轴
|
|
62965
|
-
(0,
|
|
62990
|
+
(0, import_react80.createElement)(
|
|
62966
62991
|
Example,
|
|
62967
62992
|
{ title: t3("btnWidthTitle"), hint: t3("btnWidthHint"), code: CODE_BTN_WIDTH },
|
|
62968
|
-
(0,
|
|
62993
|
+
(0, import_react80.createElement)(
|
|
62969
62994
|
"div",
|
|
62970
62995
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
62971
|
-
(0,
|
|
62996
|
+
(0, import_react80.createElement)(
|
|
62972
62997
|
Labeled,
|
|
62973
62998
|
{ label: "width\uFF08\u56FA\u5B9A\u5BBD\uFF09" },
|
|
62974
|
-
(0,
|
|
62999
|
+
(0, import_react80.createElement)(Button, { variant: "outline", width: 120 }, "120px \u56FA\u5B9A\u5BBD")
|
|
62975
63000
|
),
|
|
62976
|
-
(0,
|
|
63001
|
+
(0, import_react80.createElement)(
|
|
62977
63002
|
Labeled,
|
|
62978
63003
|
{ label: "minWidth\uFF08\u6700\u5C0F\u5BBD\uFF1A\u77ED / \u957F\u540C\u5BBD\uFF09" },
|
|
62979
|
-
(0,
|
|
63004
|
+
(0, import_react80.createElement)(
|
|
62980
63005
|
"div",
|
|
62981
63006
|
{ style: { display: "flex", gap: "8px" } },
|
|
62982
|
-
(0,
|
|
62983
|
-
(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")
|
|
62984
63009
|
)
|
|
62985
63010
|
),
|
|
62986
|
-
(0,
|
|
63011
|
+
(0, import_react80.createElement)(
|
|
62987
63012
|
Labeled,
|
|
62988
63013
|
{ label: "maxWidth\uFF08\u6700\u5927\u5BBD\uFF1A\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\uFF09" },
|
|
62989
|
-
(0,
|
|
63014
|
+
(0, import_react80.createElement)(
|
|
62990
63015
|
"div",
|
|
62991
63016
|
{ style: { width: "320px" } },
|
|
62992
|
-
(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")
|
|
62993
63018
|
)
|
|
62994
63019
|
),
|
|
62995
|
-
(0,
|
|
63020
|
+
(0, import_react80.createElement)(
|
|
62996
63021
|
Labeled,
|
|
62997
63022
|
{ label: "\u4E09\u8005\u540C\u8BBE \u21D2 width \u4F18\u5148" },
|
|
62998
|
-
(0,
|
|
63023
|
+
(0, import_react80.createElement)(Button, { variant: "outline", width: 120, minWidth: 200, maxWidth: 160 }, "\u56FA\u5B9A\u5BBD\u4F18\u5148")
|
|
62999
63024
|
)
|
|
63000
63025
|
)
|
|
63001
63026
|
),
|
|
63002
|
-
(0,
|
|
63003
|
-
(0,
|
|
63027
|
+
(0, import_react80.createElement)(DocCode, { id: "button" }),
|
|
63028
|
+
(0, import_react80.createElement)(DocApi, { id: "button" })
|
|
63004
63029
|
);
|
|
63005
63030
|
}
|
|
63006
63031
|
var CODE_INPUT_FAMILY = `const [text, setText] = useState('')
|
|
@@ -63111,57 +63136,57 @@ var PERIODS = [
|
|
|
63111
63136
|
{ value: "month", label: "\u6708" }
|
|
63112
63137
|
];
|
|
63113
63138
|
function InputPage() {
|
|
63114
|
-
const [text2, setText] = (0,
|
|
63115
|
-
const [num, setNum] = (0,
|
|
63116
|
-
const [checked, setChecked] = (0,
|
|
63117
|
-
const [seg, setSeg] = (0,
|
|
63118
|
-
const [filter2, setFilter] = (0,
|
|
63119
|
-
const [multi, setMulti] = (0,
|
|
63120
|
-
const [iconSeg, setIconSeg] = (0,
|
|
63121
|
-
const [iconSeg2, setIconSeg2] = (0,
|
|
63122
|
-
const [kw, setKw] = (0,
|
|
63123
|
-
const [igValue, setIgValue] = (0,
|
|
63124
|
-
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)(
|
|
63125
63150
|
"div",
|
|
63126
63151
|
null,
|
|
63127
|
-
(0,
|
|
63152
|
+
(0, import_react80.createElement)(DocProse, { id: "input" }),
|
|
63128
63153
|
// Input 家族
|
|
63129
|
-
(0,
|
|
63154
|
+
(0, import_react80.createElement)(
|
|
63130
63155
|
Example,
|
|
63131
63156
|
{ title: t3("demoInputFamily"), hint: t3("inputHint"), code: CODE_INPUT_FAMILY },
|
|
63132
|
-
(0,
|
|
63157
|
+
(0, import_react80.createElement)(
|
|
63133
63158
|
"div",
|
|
63134
63159
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", maxWidth: "380px" } },
|
|
63135
|
-
(0,
|
|
63160
|
+
(0, import_react80.createElement)(
|
|
63136
63161
|
"div",
|
|
63137
63162
|
{ style: { display: "flex", alignItems: "center", gap: "6px" } },
|
|
63138
|
-
(0,
|
|
63163
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-fg-2)", fontSize: "13px", flex: "none" } }, "\u7528\u6237\u540D"),
|
|
63139
63164
|
// hint 参数版:问号提示由组件自己挂(不再手动拼 FieldHint)
|
|
63140
|
-
(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" })
|
|
63141
63166
|
),
|
|
63142
|
-
(0,
|
|
63167
|
+
(0, import_react80.createElement)(
|
|
63143
63168
|
"div",
|
|
63144
63169
|
{ style: { display: "flex", alignItems: "center", gap: "6px" } },
|
|
63145
|
-
(0,
|
|
63170
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-fg-2)", fontSize: "13px", flex: "none" } }, "\u641C\u7D22"),
|
|
63146
63171
|
// 左侧图标槽(icon)+ 聚焦且有内容才出的清空钮(type="search")
|
|
63147
|
-
(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" })
|
|
63148
63173
|
),
|
|
63149
|
-
(0,
|
|
63174
|
+
(0, import_react80.createElement)(Input, { value: "bad value", onChange: () => {
|
|
63150
63175
|
}, error: true, placeholder: "\u6821\u9A8C\u5931\u8D25\u6001" }),
|
|
63151
63176
|
// ⚠️ 外层是 flex column(默认 align-items:stretch)会把 .dshpc-num 拉到全宽;
|
|
63152
63177
|
// 组件本身是内容自适应宽(inline-flex 无 width),演示区还原成它本来的短宽。
|
|
63153
|
-
(0,
|
|
63154
|
-
(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" })
|
|
63155
63180
|
)
|
|
63156
63181
|
),
|
|
63157
63182
|
// 组合输入框:输入框 + 按钮组焊成一体(前置标题 / 撤销 / 图标按钮 / 自定义高度)
|
|
63158
|
-
(0,
|
|
63183
|
+
(0, import_react80.createElement)(
|
|
63159
63184
|
Example,
|
|
63160
63185
|
{ title: t3("inputGroupTitle"), hint: t3("inputGroupHint"), code: CODE_INPUT_GROUP },
|
|
63161
|
-
(0,
|
|
63186
|
+
(0, import_react80.createElement)(
|
|
63162
63187
|
"div",
|
|
63163
63188
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", maxWidth: "460px" } },
|
|
63164
|
-
(0,
|
|
63189
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63165
63190
|
label: "\u4EFB\u52A1\u540D",
|
|
63166
63191
|
value: igValue,
|
|
63167
63192
|
onChange: setIgValue,
|
|
@@ -63175,22 +63200,22 @@ function InputPage() {
|
|
|
63175
63200
|
} }
|
|
63176
63201
|
]
|
|
63177
63202
|
}),
|
|
63178
|
-
(0,
|
|
63203
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63179
63204
|
size: "md",
|
|
63180
63205
|
value: igValue,
|
|
63181
63206
|
onChange: setIgValue,
|
|
63182
63207
|
placeholder: "\u7EAF\u56FE\u6807 / \u56FE\u6807 + \u6587\u5B57 / \u7EAF\u6587\u5B57",
|
|
63183
63208
|
actions: [
|
|
63184
|
-
{ icon: (0,
|
|
63209
|
+
{ icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconRefreshOutlineRegular, { size: 14 }), ariaLabel: "\u91CD\u7F6E", onClick: () => {
|
|
63185
63210
|
setIgValue("");
|
|
63186
63211
|
} },
|
|
63187
|
-
{ icon: (0,
|
|
63212
|
+
{ icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), label: "\u641C\u7D22", onClick: () => {
|
|
63188
63213
|
} },
|
|
63189
63214
|
{ label: "\u63D0\u4EA4", onClick: () => {
|
|
63190
63215
|
} }
|
|
63191
63216
|
]
|
|
63192
63217
|
}),
|
|
63193
|
-
(0,
|
|
63218
|
+
(0, import_react80.createElement)(InputGroup, {
|
|
63194
63219
|
value: igValue,
|
|
63195
63220
|
onChange: setIgValue,
|
|
63196
63221
|
height: 44,
|
|
@@ -63202,62 +63227,62 @@ function InputPage() {
|
|
|
63202
63227
|
)
|
|
63203
63228
|
),
|
|
63204
63229
|
// 问号提示:证明它不属于 Input 家族,随处可挂
|
|
63205
|
-
(0,
|
|
63230
|
+
(0, import_react80.createElement)(
|
|
63206
63231
|
Example,
|
|
63207
63232
|
{ title: t3("btnHintTitle"), hint: t3("btnHintHint"), code: CODE_FIELD_HINT },
|
|
63208
|
-
(0,
|
|
63233
|
+
(0, import_react80.createElement)(
|
|
63209
63234
|
"div",
|
|
63210
63235
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
63211
|
-
(0,
|
|
63236
|
+
(0, import_react80.createElement)(
|
|
63212
63237
|
Row,
|
|
63213
63238
|
null,
|
|
63214
|
-
(0,
|
|
63215
|
-
(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" })
|
|
63216
63241
|
),
|
|
63217
|
-
(0,
|
|
63242
|
+
(0, import_react80.createElement)(
|
|
63218
63243
|
Row,
|
|
63219
63244
|
null,
|
|
63220
|
-
(0,
|
|
63221
|
-
(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" })
|
|
63222
63247
|
),
|
|
63223
|
-
(0,
|
|
63248
|
+
(0, import_react80.createElement)(
|
|
63224
63249
|
Row,
|
|
63225
63250
|
null,
|
|
63226
|
-
(0,
|
|
63227
|
-
(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" })
|
|
63228
63253
|
)
|
|
63229
63254
|
)
|
|
63230
63255
|
),
|
|
63231
63256
|
// Switch / Checkbox / Segmented
|
|
63232
|
-
(0,
|
|
63257
|
+
(0, import_react80.createElement)(
|
|
63233
63258
|
Example,
|
|
63234
63259
|
{ title: t3("switchTip"), hint: t3("checkboxHint"), code: CODE_SWITCH_SEG },
|
|
63235
|
-
(0,
|
|
63260
|
+
(0, import_react80.createElement)(
|
|
63236
63261
|
"div",
|
|
63237
63262
|
{ style: { display: "flex", flexDirection: "column", gap: "14px", alignItems: "flex-start" } },
|
|
63238
|
-
(0,
|
|
63263
|
+
(0, import_react80.createElement)(
|
|
63239
63264
|
"div",
|
|
63240
63265
|
{ style: { display: "flex", gap: "20px", alignItems: "center", flexWrap: "wrap" } },
|
|
63241
63266
|
// 「启用」是开关语义,用官方 Switch(用户 2026-10-20:不要用勾去启用)。
|
|
63242
63267
|
// 官方 Switch 只画胶囊本体,label 是 aria-label,可见文案由调用方自己画在旁边 ——
|
|
63243
63268
|
// 文案单独挂 onClick 使其可点(不能挂外层:点胶囊会冒泡触发两次翻转)。
|
|
63244
|
-
(0,
|
|
63269
|
+
(0, import_react80.createElement)(
|
|
63245
63270
|
"span",
|
|
63246
63271
|
{ style: { display: "inline-flex", alignItems: "center", gap: "8px" } },
|
|
63247
|
-
(0,
|
|
63248
|
-
(0,
|
|
63272
|
+
(0, import_react80.createElement)(import_dsh_client_ui_primitives2.Switch, { checked, onChange: setChecked, label: "\u542F\u7528" }),
|
|
63273
|
+
(0, import_react80.createElement)("span", {
|
|
63249
63274
|
style: { fontSize: "13px", cursor: "pointer", userSelect: "none" },
|
|
63250
63275
|
onClick: () => {
|
|
63251
63276
|
setChecked(!checked);
|
|
63252
63277
|
}
|
|
63253
63278
|
}, "\u542F\u7528")
|
|
63254
63279
|
),
|
|
63255
|
-
(0,
|
|
63280
|
+
(0, import_react80.createElement)(Checkbox, { checked, onChange: setChecked, label: "\u591A\u9009" })
|
|
63256
63281
|
),
|
|
63257
|
-
(0,
|
|
63282
|
+
(0, import_react80.createElement)(
|
|
63258
63283
|
"div",
|
|
63259
63284
|
{ style: { display: "flex", gap: "20px", alignItems: "center", flexWrap: "wrap" } },
|
|
63260
|
-
(0,
|
|
63285
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63261
63286
|
items: [
|
|
63262
63287
|
{ value: "day", label: "\u65E5" },
|
|
63263
63288
|
{ value: "week", label: "\u5468" },
|
|
@@ -63266,7 +63291,7 @@ function InputPage() {
|
|
|
63266
63291
|
value: seg,
|
|
63267
63292
|
onChange: setSeg
|
|
63268
63293
|
}),
|
|
63269
|
-
(0,
|
|
63294
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63270
63295
|
bordered: true,
|
|
63271
63296
|
items: [
|
|
63272
63297
|
{ value: "day", label: "\u65E5" },
|
|
@@ -63276,7 +63301,7 @@ function InputPage() {
|
|
|
63276
63301
|
value: seg,
|
|
63277
63302
|
onChange: setSeg
|
|
63278
63303
|
}),
|
|
63279
|
-
(0,
|
|
63304
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63280
63305
|
size: "sm",
|
|
63281
63306
|
items: [
|
|
63282
63307
|
{ value: "day", label: "\u65E5" },
|
|
@@ -63286,7 +63311,7 @@ function InputPage() {
|
|
|
63286
63311
|
value: seg,
|
|
63287
63312
|
onChange: setSeg
|
|
63288
63313
|
}),
|
|
63289
|
-
(0,
|
|
63314
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63290
63315
|
size: "sm",
|
|
63291
63316
|
bordered: true,
|
|
63292
63317
|
items: [
|
|
@@ -63299,7 +63324,7 @@ function InputPage() {
|
|
|
63299
63324
|
})
|
|
63300
63325
|
),
|
|
63301
63326
|
// 筛选条形态(真实插件同款):中性计数 + 灰底轨道
|
|
63302
|
-
(0,
|
|
63327
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63303
63328
|
items: [
|
|
63304
63329
|
{ value: "all", label: t3("segAll"), count: 11 },
|
|
63305
63330
|
{ value: "doing", label: t3("segDoing"), count: 5 },
|
|
@@ -63310,7 +63335,7 @@ function InputPage() {
|
|
|
63310
63335
|
value: filter2,
|
|
63311
63336
|
onChange: setFilter
|
|
63312
63337
|
}),
|
|
63313
|
-
(0,
|
|
63338
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63314
63339
|
bordered: true,
|
|
63315
63340
|
items: [
|
|
63316
63341
|
{ value: "all", label: t3("segAll"), count: 11 },
|
|
@@ -63323,7 +63348,7 @@ function InputPage() {
|
|
|
63323
63348
|
onChange: setFilter
|
|
63324
63349
|
}),
|
|
63325
63350
|
// 星期多选方块(蓝底选中、近似方形)
|
|
63326
|
-
(0,
|
|
63351
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63327
63352
|
multiple: true,
|
|
63328
63353
|
className: "dshpc-seg--weekday",
|
|
63329
63354
|
label: "\u661F\u671F",
|
|
@@ -63334,7 +63359,7 @@ function InputPage() {
|
|
|
63334
63359
|
value: multi,
|
|
63335
63360
|
onChange: setMulti
|
|
63336
63361
|
}),
|
|
63337
|
-
(0,
|
|
63362
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63338
63363
|
multiple: true,
|
|
63339
63364
|
className: "dshpc-seg--weekday",
|
|
63340
63365
|
bordered: true,
|
|
@@ -63347,20 +63372,20 @@ function InputPage() {
|
|
|
63347
63372
|
onChange: setMulti
|
|
63348
63373
|
}),
|
|
63349
63374
|
// 段内图标:icon 在前、文字居中、count 在后;只有图标(无文字 / 计数)时自动正方形
|
|
63350
|
-
(0,
|
|
63375
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63351
63376
|
items: [
|
|
63352
|
-
{ value: "search", icon: (0,
|
|
63353
|
-
{ value: "clock", icon: (0,
|
|
63354
|
-
{ 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" }
|
|
63355
63380
|
],
|
|
63356
63381
|
value: iconSeg,
|
|
63357
63382
|
onChange: setIconSeg
|
|
63358
63383
|
}),
|
|
63359
|
-
(0,
|
|
63384
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63360
63385
|
items: [
|
|
63361
|
-
{ value: "all", icon: (0,
|
|
63362
|
-
{ value: "doing", icon: (0,
|
|
63363
|
-
{ 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 }
|
|
63364
63389
|
],
|
|
63365
63390
|
value: iconSeg2,
|
|
63366
63391
|
onChange: setIconSeg2
|
|
@@ -63368,36 +63393,36 @@ function InputPage() {
|
|
|
63368
63393
|
)
|
|
63369
63394
|
),
|
|
63370
63395
|
// 选中片配色(tone,2026-10-29):内置色名 / 自定义一对颜色
|
|
63371
|
-
(0,
|
|
63396
|
+
(0, import_react80.createElement)(
|
|
63372
63397
|
Example,
|
|
63373
63398
|
{ title: t3("segToneTitle"), hint: t3("segToneHint"), code: CODE_SEG_TONE },
|
|
63374
|
-
(0,
|
|
63399
|
+
(0, import_react80.createElement)(
|
|
63375
63400
|
"div",
|
|
63376
63401
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", alignItems: "flex-start" } },
|
|
63377
|
-
(0,
|
|
63402
|
+
(0, import_react80.createElement)(
|
|
63378
63403
|
Labeled,
|
|
63379
63404
|
{ label: 'tone="teal"' },
|
|
63380
|
-
(0,
|
|
63405
|
+
(0, import_react80.createElement)(Segmented, { tone: "teal", items: PERIODS, value: seg, onChange: setSeg })
|
|
63381
63406
|
),
|
|
63382
|
-
(0,
|
|
63407
|
+
(0, import_react80.createElement)(
|
|
63383
63408
|
Labeled,
|
|
63384
63409
|
{ label: 'tone="danger"' },
|
|
63385
|
-
(0,
|
|
63410
|
+
(0, import_react80.createElement)(Segmented, { tone: "danger", items: PERIODS, value: seg, onChange: setSeg })
|
|
63386
63411
|
),
|
|
63387
|
-
(0,
|
|
63412
|
+
(0, import_react80.createElement)(
|
|
63388
63413
|
Labeled,
|
|
63389
63414
|
{ label: "{ bg, fg }" },
|
|
63390
|
-
(0,
|
|
63415
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63391
63416
|
tone: { bg: "#0b3d2e", fg: "#d1fae5" },
|
|
63392
63417
|
items: PERIODS,
|
|
63393
63418
|
value: seg,
|
|
63394
63419
|
onChange: setSeg
|
|
63395
63420
|
})
|
|
63396
63421
|
),
|
|
63397
|
-
(0,
|
|
63422
|
+
(0, import_react80.createElement)(
|
|
63398
63423
|
Labeled,
|
|
63399
63424
|
{ label: "tone + weekday" },
|
|
63400
|
-
(0,
|
|
63425
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63401
63426
|
multiple: true,
|
|
63402
63427
|
tone: "purple",
|
|
63403
63428
|
className: "dshpc-seg--weekday",
|
|
@@ -63412,16 +63437,16 @@ function InputPage() {
|
|
|
63412
63437
|
)
|
|
63413
63438
|
)
|
|
63414
63439
|
),
|
|
63415
|
-
(0,
|
|
63416
|
-
(0,
|
|
63417
|
-
(0,
|
|
63418
|
-
(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" })
|
|
63419
63444
|
);
|
|
63420
63445
|
}
|
|
63421
63446
|
var ICON_OPTIONS = [
|
|
63422
|
-
{ value: "a", label: "\u9009\u9879 A", icon: (0,
|
|
63423
|
-
{ value: "b", label: "\u9009\u9879 B", icon: (0,
|
|
63424
|
-
{ 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 }) }
|
|
63425
63450
|
];
|
|
63426
63451
|
var CODE_PICKER = `// \u5355\u9009\uFF1Aicon + \u53EF\u641C\u7D22 / \u53EF\u6E05\u9664
|
|
63427
63452
|
<Picker
|
|
@@ -63497,51 +63522,51 @@ var SPLIT_MEMBERS = {
|
|
|
63497
63522
|
]
|
|
63498
63523
|
};
|
|
63499
63524
|
function PickerPage() {
|
|
63500
|
-
const [single, setSingle] = (0,
|
|
63501
|
-
const [multi, setMulti] = (0,
|
|
63502
|
-
const [model, setModel] = (0,
|
|
63503
|
-
const [model2, setModel2] = (0,
|
|
63504
|
-
const [ws, setWs] = (0,
|
|
63505
|
-
const [period2, setPeriod] = (0,
|
|
63506
|
-
const [bucket, setBucket] = (0,
|
|
63507
|
-
const [scope, setScope] = (0,
|
|
63508
|
-
const [member, setMember] = (0,
|
|
63509
|
-
const [groups, setGroups] = (0,
|
|
63510
|
-
const [groupValue, setGroupValue] = (0,
|
|
63511
|
-
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)(
|
|
63512
63537
|
"div",
|
|
63513
63538
|
null,
|
|
63514
|
-
(0,
|
|
63515
|
-
(0,
|
|
63539
|
+
(0, import_react80.createElement)(DocProse, { id: "picker" }),
|
|
63540
|
+
(0, import_react80.createElement)(
|
|
63516
63541
|
Example,
|
|
63517
63542
|
{ title: "Picker", hint: t3("pickerHint"), code: CODE_PICKER },
|
|
63518
|
-
(0,
|
|
63543
|
+
(0, import_react80.createElement)(
|
|
63519
63544
|
"div",
|
|
63520
63545
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
63521
|
-
(0,
|
|
63546
|
+
(0, import_react80.createElement)(Picker, {
|
|
63522
63547
|
options: ICON_OPTIONS,
|
|
63523
|
-
icon: (0,
|
|
63548
|
+
icon: (0, import_react80.createElement)(import_dsh_client_ui_primitives2.IconSparkleRegular, { size: 14 }),
|
|
63524
63549
|
value: single,
|
|
63525
63550
|
onChange: (v) => setSingle(v),
|
|
63526
63551
|
searchable: true,
|
|
63527
63552
|
clearable: true,
|
|
63528
63553
|
placeholder: "\u5355\u9009\uFF08icon + \u53EF\u641C\u7D22/\u53EF\u6E05\u9664\uFF09"
|
|
63529
63554
|
}),
|
|
63530
|
-
(0,
|
|
63555
|
+
(0, import_react80.createElement)(Picker, {
|
|
63531
63556
|
options: ICON_OPTIONS,
|
|
63532
63557
|
value: single,
|
|
63533
63558
|
onChange: (v) => setSingle(v),
|
|
63534
63559
|
placeholder: "\u5355\u9009\uFF08\u65E0\u641C\u7D22\u6846\uFF09"
|
|
63535
63560
|
}),
|
|
63536
|
-
(0,
|
|
63561
|
+
(0, import_react80.createElement)(Picker, {
|
|
63537
63562
|
groups: [
|
|
63538
63563
|
{ value: "g1", label: "\u7EC4\u4E00", options: ICON_OPTIONS },
|
|
63539
63564
|
{
|
|
63540
63565
|
value: "g2",
|
|
63541
63566
|
label: "\u7EC4\u4E8C",
|
|
63542
63567
|
options: [
|
|
63543
|
-
{ value: "d", label: "\u9009\u9879 D", icon: (0,
|
|
63544
|
-
{ 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 }) }
|
|
63545
63570
|
]
|
|
63546
63571
|
}
|
|
63547
63572
|
],
|
|
@@ -63552,13 +63577,13 @@ function PickerPage() {
|
|
|
63552
63577
|
searchable: true,
|
|
63553
63578
|
placeholder: "\u591A\u9009\uFF08\u4E0A\u9650 2\uFF0C\u53EF\u53CD\u9009\uFF09"
|
|
63554
63579
|
}),
|
|
63555
|
-
(0,
|
|
63580
|
+
(0, import_react80.createElement)(Picker, {
|
|
63556
63581
|
options: [{ value: "x", label: "\u964D\u7EA7\u793A\u4F8B" }],
|
|
63557
63582
|
degraded: true,
|
|
63558
63583
|
disabled: true,
|
|
63559
63584
|
placeholder: "\u964D\u7EA7 + \u7981\u7528"
|
|
63560
63585
|
}),
|
|
63561
|
-
(0,
|
|
63586
|
+
(0, import_react80.createElement)(Picker, {
|
|
63562
63587
|
options: ICON_OPTIONS,
|
|
63563
63588
|
value: single,
|
|
63564
63589
|
onChange: (v) => setSingle(v),
|
|
@@ -63567,16 +63592,16 @@ function PickerPage() {
|
|
|
63567
63592
|
})
|
|
63568
63593
|
)
|
|
63569
63594
|
),
|
|
63570
|
-
(0,
|
|
63595
|
+
(0, import_react80.createElement)(
|
|
63571
63596
|
Example,
|
|
63572
63597
|
{ title: t3("exModelPickerTitle"), hint: t3("modelPickerHint"), code: CODE_MODEL_PICKER },
|
|
63573
|
-
(0,
|
|
63598
|
+
(0, import_react80.createElement)(
|
|
63574
63599
|
"div",
|
|
63575
63600
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap" } },
|
|
63576
63601
|
// ① 分组形态:一个下拉、完全独立,供应商做组头(带「默认模型」选项)
|
|
63577
|
-
(0,
|
|
63602
|
+
(0, import_react80.createElement)(ModelPicker, { value: model, onChange: setModel, variant: "grouped" }),
|
|
63578
63603
|
// ② 联动形态:两个下拉联动,先选供应商、模型列表跟着筛
|
|
63579
|
-
(0,
|
|
63604
|
+
(0, import_react80.createElement)(ModelPicker, {
|
|
63580
63605
|
value: model2,
|
|
63581
63606
|
onChange: setModel2,
|
|
63582
63607
|
variant: "cascade",
|
|
@@ -63584,14 +63609,14 @@ function PickerPage() {
|
|
|
63584
63609
|
})
|
|
63585
63610
|
)
|
|
63586
63611
|
),
|
|
63587
|
-
(0,
|
|
63612
|
+
(0, import_react80.createElement)(
|
|
63588
63613
|
Example,
|
|
63589
63614
|
{ title: t3("exWorkspacePickerTitle"), hint: t3("workspacePickerHint"), code: CODE_WORKSPACE_PICKER },
|
|
63590
|
-
(0,
|
|
63615
|
+
(0, import_react80.createElement)(
|
|
63591
63616
|
"div",
|
|
63592
63617
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap" } },
|
|
63593
63618
|
// 默认即我们给的名字(「工作区」)和文件夹图标;自定义文案 / 图标是可选能力,不在演示里铺
|
|
63594
|
-
(0,
|
|
63619
|
+
(0, import_react80.createElement)(WorkspacePicker, {
|
|
63595
63620
|
value: ws,
|
|
63596
63621
|
onChange: (v) => setWs(v),
|
|
63597
63622
|
clearable: true,
|
|
@@ -63599,18 +63624,18 @@ function PickerPage() {
|
|
|
63599
63624
|
})
|
|
63600
63625
|
)
|
|
63601
63626
|
),
|
|
63602
|
-
(0,
|
|
63627
|
+
(0, import_react80.createElement)(
|
|
63603
63628
|
Example,
|
|
63604
63629
|
{ title: t3("exSplitGroupTitle"), hint: t3("splitGroupHint"), code: CODE_SPLIT_GROUP },
|
|
63605
63630
|
// 形态一(单选滑块 + 下拉):左滑块选「正式组 / 测试组」,右格下拉联动换源、且略长;sm/md/lg 三档
|
|
63606
|
-
(0,
|
|
63631
|
+
(0, import_react80.createElement)(
|
|
63607
63632
|
"div",
|
|
63608
63633
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
63609
63634
|
["sm", "md", "lg"].map(
|
|
63610
|
-
(sz) => (0,
|
|
63635
|
+
(sz) => (0, import_react80.createElement)(
|
|
63611
63636
|
SplitGroup,
|
|
63612
63637
|
{ key: sz, label: `\u5355\u9009 \xB7 ${sz}` },
|
|
63613
|
-
(0,
|
|
63638
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63614
63639
|
size: sz,
|
|
63615
63640
|
items: SPLIT_SINGLE_OPTS,
|
|
63616
63641
|
value: period2,
|
|
@@ -63619,7 +63644,7 @@ function PickerPage() {
|
|
|
63619
63644
|
setBucket("");
|
|
63620
63645
|
}
|
|
63621
63646
|
}),
|
|
63622
|
-
(0,
|
|
63647
|
+
(0, import_react80.createElement)(Picker, {
|
|
63623
63648
|
size: sz,
|
|
63624
63649
|
options: SPLIT_TARGETS[period2] ?? [],
|
|
63625
63650
|
value: bucket,
|
|
@@ -63632,14 +63657,14 @@ function PickerPage() {
|
|
|
63632
63657
|
)
|
|
63633
63658
|
),
|
|
63634
63659
|
// 形态二(下拉 + 下拉):左格「范围」、右格「值」,三个尺寸各来一个
|
|
63635
|
-
(0,
|
|
63660
|
+
(0, import_react80.createElement)(
|
|
63636
63661
|
"div",
|
|
63637
63662
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start", marginTop: "12px" } },
|
|
63638
63663
|
["sm", "md", "lg"].map(
|
|
63639
|
-
(sz) => (0,
|
|
63664
|
+
(sz) => (0, import_react80.createElement)(
|
|
63640
63665
|
SplitGroup,
|
|
63641
63666
|
{ key: sz, label: `\u4E0B\u62C9 \xB7 ${sz}` },
|
|
63642
|
-
(0,
|
|
63667
|
+
(0, import_react80.createElement)(Picker, {
|
|
63643
63668
|
size: sz,
|
|
63644
63669
|
options: SPLIT_SCOPES,
|
|
63645
63670
|
value: scope,
|
|
@@ -63649,7 +63674,7 @@ function PickerPage() {
|
|
|
63649
63674
|
},
|
|
63650
63675
|
minWidth: 110
|
|
63651
63676
|
}),
|
|
63652
|
-
(0,
|
|
63677
|
+
(0, import_react80.createElement)(Picker, {
|
|
63653
63678
|
size: sz,
|
|
63654
63679
|
options: SPLIT_MEMBERS[scope] ?? [],
|
|
63655
63680
|
value: member,
|
|
@@ -63662,20 +63687,20 @@ function PickerPage() {
|
|
|
63662
63687
|
)
|
|
63663
63688
|
),
|
|
63664
63689
|
// 多选:左滑块 A/B/C 三组可多选,右格一个下拉
|
|
63665
|
-
(0,
|
|
63690
|
+
(0, import_react80.createElement)(
|
|
63666
63691
|
"div",
|
|
63667
63692
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start", marginTop: "12px" } },
|
|
63668
|
-
(0,
|
|
63693
|
+
(0, import_react80.createElement)(
|
|
63669
63694
|
SplitGroup,
|
|
63670
63695
|
{ label: "\u591A\u9009" },
|
|
63671
|
-
(0,
|
|
63696
|
+
(0, import_react80.createElement)(Segmented, {
|
|
63672
63697
|
size: "lg",
|
|
63673
63698
|
multiple: true,
|
|
63674
63699
|
items: SPLIT_GROUPS,
|
|
63675
63700
|
value: groups,
|
|
63676
63701
|
onChange: setGroups
|
|
63677
63702
|
}),
|
|
63678
|
-
(0,
|
|
63703
|
+
(0, import_react80.createElement)(Picker, {
|
|
63679
63704
|
size: "lg",
|
|
63680
63705
|
options: SPLIT_FIXED,
|
|
63681
63706
|
value: groupValue,
|
|
@@ -63686,10 +63711,10 @@ function PickerPage() {
|
|
|
63686
63711
|
)
|
|
63687
63712
|
)
|
|
63688
63713
|
),
|
|
63689
|
-
(0,
|
|
63690
|
-
(0,
|
|
63691
|
-
(0,
|
|
63692
|
-
(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" })
|
|
63693
63718
|
);
|
|
63694
63719
|
}
|
|
63695
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
|
|
@@ -63713,17 +63738,17 @@ var CODE_TOOLTIP = `// label + side / align\uFF1Bchildren \u5FC5\u987B\u662F\u80
|
|
|
63713
63738
|
content={<div style={{ color: 'var(--dsw-static-neutral-bluish-00,#fff)' }}>\u2026</div>}
|
|
63714
63739
|
/>`;
|
|
63715
63740
|
function TooltipPage() {
|
|
63716
|
-
return (0,
|
|
63741
|
+
return (0, import_react80.createElement)(
|
|
63717
63742
|
"div",
|
|
63718
63743
|
null,
|
|
63719
|
-
(0,
|
|
63720
|
-
(0,
|
|
63744
|
+
(0, import_react80.createElement)(DocProse, { id: "tooltip" }),
|
|
63745
|
+
(0, import_react80.createElement)(
|
|
63721
63746
|
Example,
|
|
63722
63747
|
{ title: t3("tooltipTitle"), hint: t3("tooltipHint"), code: CODE_TOOLTIP },
|
|
63723
|
-
(0,
|
|
63748
|
+
(0, import_react80.createElement)(
|
|
63724
63749
|
"div",
|
|
63725
63750
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
63726
|
-
(0,
|
|
63751
|
+
(0, import_react80.createElement)(
|
|
63727
63752
|
Labeled,
|
|
63728
63753
|
{ label: t3("tooltipAnchorButton") },
|
|
63729
63754
|
tipAnchor("top \xB7 center", "top", "center"),
|
|
@@ -63732,52 +63757,52 @@ function TooltipPage() {
|
|
|
63732
63757
|
tipAnchor("bottom \xB7 end", "bottom", "end"),
|
|
63733
63758
|
tipAnchor("right", "right")
|
|
63734
63759
|
),
|
|
63735
|
-
(0,
|
|
63760
|
+
(0, import_react80.createElement)(
|
|
63736
63761
|
Labeled,
|
|
63737
63762
|
{ label: t3("tooltipAnchorText") },
|
|
63738
|
-
(0,
|
|
63763
|
+
(0, import_react80.createElement)(
|
|
63739
63764
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63740
63765
|
{ label: t3("tooltipHint"), side: "top" },
|
|
63741
|
-
(0,
|
|
63766
|
+
(0, import_react80.createElement)("span", {
|
|
63742
63767
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63743
63768
|
}, t3("tooltipAnchorText"))
|
|
63744
63769
|
),
|
|
63745
|
-
(0,
|
|
63770
|
+
(0, import_react80.createElement)(
|
|
63746
63771
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63747
63772
|
{ label: t3("tooltipLongText"), side: "bottom", maxWidth: 240 },
|
|
63748
|
-
(0,
|
|
63773
|
+
(0, import_react80.createElement)("span", {
|
|
63749
63774
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63750
63775
|
}, t3("tooltipLong"))
|
|
63751
63776
|
)
|
|
63752
63777
|
),
|
|
63753
63778
|
// 两段式:第一行名字(短)、\n 真实换行、第二行正文(长,受 maxWidth 折行)
|
|
63754
|
-
(0,
|
|
63779
|
+
(0, import_react80.createElement)(
|
|
63755
63780
|
Labeled,
|
|
63756
63781
|
{ label: t3("tooltipMultiline") },
|
|
63757
|
-
(0,
|
|
63782
|
+
(0, import_react80.createElement)(
|
|
63758
63783
|
import_dsh_client_ui_primitives2.Tooltip,
|
|
63759
63784
|
{ label: `${t3("tooltipName")}
|
|
63760
63785
|
${t3("tooltipLongText")}`, side: "top", maxWidth: 260 },
|
|
63761
|
-
(0,
|
|
63786
|
+
(0, import_react80.createElement)("span", {
|
|
63762
63787
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63763
63788
|
}, t3("tooltipName"))
|
|
63764
63789
|
)
|
|
63765
63790
|
),
|
|
63766
63791
|
// 富卡片:官方 HoverCard(宿主工作区列表那种「标题 + 正文」卡就是它);content 收任意 ReactNode
|
|
63767
|
-
(0,
|
|
63792
|
+
(0, import_react80.createElement)(
|
|
63768
63793
|
Labeled,
|
|
63769
63794
|
{ label: t3("tooltipRich") },
|
|
63770
|
-
(0,
|
|
63795
|
+
(0, import_react80.createElement)(import_dsh_client_ui_primitives2.HoverCard, {
|
|
63771
63796
|
variant: "compact",
|
|
63772
63797
|
openDelayMs: 200,
|
|
63773
|
-
anchor: (0,
|
|
63798
|
+
anchor: (0, import_react80.createElement)("span", {
|
|
63774
63799
|
style: { borderBottom: "1px dashed var(--dshpc-border-strong)", cursor: "pointer", fontSize: "13px" }
|
|
63775
63800
|
}, t3("tooltipName")),
|
|
63776
63801
|
// ⚠️ 官方 HoverCard 的 compact 变体(.card)背景是硬编码 `#2C2C2E` 且**不设 color**
|
|
63777
63802
|
// (来源见 docs/design/external/dsh-host.md §10),卡片又被 portal 到 document.body,
|
|
63778
63803
|
// 文字色因此退化成继承:亮色下继承到近黑 ⇒ 黑字压深底。背景恒深 ⇒ 内容色必须由调用方给,
|
|
63779
63804
|
// 这里取官方 Tooltip 在同一个深底场景用的常量 `--dsw-static-neutral-bluish-00`(#fff)。
|
|
63780
|
-
content: (0,
|
|
63805
|
+
content: (0, import_react80.createElement)(
|
|
63781
63806
|
"div",
|
|
63782
63807
|
{
|
|
63783
63808
|
style: {
|
|
@@ -63786,15 +63811,15 @@ ${t3("tooltipLongText")}`, side: "top", maxWidth: 260 },
|
|
|
63786
63811
|
color: "var(--dsw-static-neutral-bluish-00,#fff)"
|
|
63787
63812
|
}
|
|
63788
63813
|
},
|
|
63789
|
-
(0,
|
|
63790
|
-
(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"))
|
|
63791
63816
|
)
|
|
63792
63817
|
})
|
|
63793
63818
|
)
|
|
63794
63819
|
)
|
|
63795
63820
|
),
|
|
63796
|
-
(0,
|
|
63797
|
-
(0,
|
|
63821
|
+
(0, import_react80.createElement)(DocCode, { id: "tooltip" }),
|
|
63822
|
+
(0, import_react80.createElement)(DocApi, { id: "tooltip" })
|
|
63798
63823
|
);
|
|
63799
63824
|
}
|
|
63800
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
|
|
@@ -63841,162 +63866,162 @@ var CODE_SECTION_HEAD = `// \u5206\u533A\u6807\u9898\uFF1A\u6807\u7B7E\uFF08\u53
|
|
|
63841
63866
|
]}
|
|
63842
63867
|
/>`;
|
|
63843
63868
|
function CardPage() {
|
|
63844
|
-
const [seg, setSeg] = (0,
|
|
63845
|
-
const [kw, setKw] = (0,
|
|
63846
|
-
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)(
|
|
63847
63872
|
"div",
|
|
63848
63873
|
null,
|
|
63849
|
-
(0,
|
|
63850
|
-
(0,
|
|
63874
|
+
(0, import_react80.createElement)(DocProse, { id: "surface" }),
|
|
63875
|
+
(0, import_react80.createElement)(
|
|
63851
63876
|
Example,
|
|
63852
63877
|
{ title: t3("demoSurfaceTitle"), hint: t3("surfaceHint"), code: CODE_SURFACE },
|
|
63853
|
-
(0,
|
|
63878
|
+
(0, import_react80.createElement)(
|
|
63854
63879
|
"div",
|
|
63855
63880
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap", maxWidth: "640px" } },
|
|
63856
63881
|
["plain", "raised", "sunken", "subtle"].map(
|
|
63857
|
-
(tone) => (0,
|
|
63882
|
+
(tone) => (0, import_react80.createElement)(
|
|
63858
63883
|
Surface,
|
|
63859
63884
|
{ key: tone, tone, padding: "md", style: { flex: "1 1 140px" } },
|
|
63860
|
-
(0,
|
|
63861
|
-
(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"))
|
|
63862
63887
|
)
|
|
63863
63888
|
)
|
|
63864
63889
|
)
|
|
63865
63890
|
),
|
|
63866
|
-
(0,
|
|
63867
|
-
(0,
|
|
63891
|
+
(0, import_react80.createElement)(DocProse, { id: "card" }),
|
|
63892
|
+
(0, import_react80.createElement)(
|
|
63868
63893
|
Example,
|
|
63869
63894
|
{ title: t3("demoCardTitle"), hint: t3("cardHint"), code: CODE_CARD },
|
|
63870
|
-
(0,
|
|
63895
|
+
(0, import_react80.createElement)(
|
|
63871
63896
|
"div",
|
|
63872
63897
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", maxWidth: "640px" } },
|
|
63873
63898
|
// 真实形态示例(任务卡同款排版):右侧元信息走 action 槽 ⇒ 外壳自动垂直居中
|
|
63874
|
-
(0,
|
|
63899
|
+
(0, import_react80.createElement)(
|
|
63875
63900
|
Card,
|
|
63876
63901
|
{
|
|
63877
63902
|
accent: "business",
|
|
63878
|
-
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")
|
|
63879
63904
|
},
|
|
63880
|
-
(0,
|
|
63905
|
+
(0, import_react80.createElement)(
|
|
63881
63906
|
"div",
|
|
63882
63907
|
{ style: { fontWeight: 600, flex: "1 1 auto", minWidth: 0, fontSize: "var(--dshpc-font-md)" } },
|
|
63883
63908
|
"\u5C06 OpenSSH \u4E0A\u6240\u6709 NPM \u5B89\u88C5\u8FC1\u79FB\u5230 PNPM"
|
|
63884
63909
|
),
|
|
63885
|
-
(0,
|
|
63910
|
+
(0, import_react80.createElement)(
|
|
63886
63911
|
"div",
|
|
63887
63912
|
{ style: { display: "flex", alignItems: "center", gap: "6px", marginTop: "6px", flexWrap: "wrap" } },
|
|
63888
|
-
(0,
|
|
63889
|
-
(0,
|
|
63890
|
-
(0,
|
|
63891
|
-
(0,
|
|
63892
|
-
(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")
|
|
63893
63918
|
)
|
|
63894
63919
|
),
|
|
63895
63920
|
// action 里裸放一个 button:不套容器也垂直居中;框内排版由调用方自定
|
|
63896
|
-
(0,
|
|
63921
|
+
(0, import_react80.createElement)(
|
|
63897
63922
|
Card,
|
|
63898
63923
|
{
|
|
63899
63924
|
accent: "business",
|
|
63900
|
-
action: (0,
|
|
63925
|
+
action: (0, import_react80.createElement)(Button, { size: "sm", variant: "ghost" }, "\u67E5\u770B\u4F1A\u8BDD")
|
|
63901
63926
|
},
|
|
63902
|
-
(0,
|
|
63903
|
-
(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")
|
|
63904
63929
|
),
|
|
63905
63930
|
// accent 速览:单行紧凑卡,只看色条档位
|
|
63906
|
-
(0,
|
|
63931
|
+
(0, import_react80.createElement)(
|
|
63907
63932
|
"div",
|
|
63908
63933
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", marginTop: "4px" } },
|
|
63909
63934
|
["business", "success", "warning", "danger", "neutral", "purple", "pink", "cyan", "teal", "orange", "indigo", "rose", "slate"].map(
|
|
63910
|
-
(a) => (0,
|
|
63935
|
+
(a) => (0, import_react80.createElement)(
|
|
63911
63936
|
Card,
|
|
63912
63937
|
{ key: a, accent: a, style: { padding: "8px 12px" } },
|
|
63913
|
-
(0,
|
|
63938
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-sm)", color: "var(--dshpc-fg-2)" } }, `accent="${a}"`)
|
|
63914
63939
|
)
|
|
63915
63940
|
)
|
|
63916
63941
|
)
|
|
63917
63942
|
)
|
|
63918
63943
|
),
|
|
63919
|
-
(0,
|
|
63944
|
+
(0, import_react80.createElement)(
|
|
63920
63945
|
Example,
|
|
63921
63946
|
{ title: t3("demoBarTitle"), hint: t3("barHint"), code: CODE_BAR },
|
|
63922
|
-
(0,
|
|
63947
|
+
(0, import_react80.createElement)(
|
|
63923
63948
|
"div",
|
|
63924
63949
|
{ style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "8px", maxWidth: "640px" } },
|
|
63925
63950
|
["left", "right", "top", "bottom"].map(
|
|
63926
|
-
(side) => (0,
|
|
63951
|
+
(side) => (0, import_react80.createElement)(
|
|
63927
63952
|
Card,
|
|
63928
63953
|
{ key: side, accent: "business", bar: { side } },
|
|
63929
|
-
(0,
|
|
63930
|
-
(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")
|
|
63931
63956
|
)
|
|
63932
63957
|
)
|
|
63933
63958
|
)
|
|
63934
63959
|
),
|
|
63935
|
-
(0,
|
|
63960
|
+
(0, import_react80.createElement)(
|
|
63936
63961
|
Example,
|
|
63937
63962
|
{ title: t3("demoStripTitle"), hint: t3("stripHint"), code: CODE_STRIP_CARD },
|
|
63938
|
-
(0,
|
|
63963
|
+
(0, import_react80.createElement)(
|
|
63939
63964
|
"div",
|
|
63940
63965
|
{ style: { display: "flex", flexDirection: "column", gap: "4px", maxWidth: "640px" } },
|
|
63941
|
-
(0,
|
|
63966
|
+
(0, import_react80.createElement)(
|
|
63942
63967
|
StripCard,
|
|
63943
63968
|
{
|
|
63944
63969
|
accent: "business",
|
|
63945
|
-
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")
|
|
63946
63971
|
},
|
|
63947
|
-
(0,
|
|
63948
|
-
(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)(
|
|
63949
63974
|
"div",
|
|
63950
63975
|
{ style: { display: "flex", alignItems: "center", gap: "6px", marginTop: "4px", flexWrap: "wrap" } },
|
|
63951
|
-
(0,
|
|
63952
|
-
(0,
|
|
63976
|
+
(0, import_react80.createElement)(Chip, null, "NAS-Docker"),
|
|
63977
|
+
(0, import_react80.createElement)(
|
|
63953
63978
|
"span",
|
|
63954
63979
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)" } },
|
|
63955
63980
|
"\u8BA1\u5212 02:00 \xB7 \u5B9E\u9645 02:00 \xB7 \u65F6\u957F 04:02 \xB7 2.4M"
|
|
63956
63981
|
)
|
|
63957
63982
|
)
|
|
63958
63983
|
),
|
|
63959
|
-
(0,
|
|
63984
|
+
(0, import_react80.createElement)(
|
|
63960
63985
|
StripCard,
|
|
63961
63986
|
{
|
|
63962
63987
|
accent: "success",
|
|
63963
63988
|
// 右侧裸放一个描边钮(outline, sm=24px):不套容器也垂直居中
|
|
63964
|
-
action: (0,
|
|
63989
|
+
action: (0, import_react80.createElement)(Button, { size: "sm", variant: "outline" }, "Cancel")
|
|
63965
63990
|
},
|
|
63966
|
-
(0,
|
|
63967
|
-
(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")
|
|
63968
63993
|
),
|
|
63969
63994
|
// accent 速览:单行紧凑卡,只看色条档位(与 Card 节同款)
|
|
63970
|
-
(0,
|
|
63995
|
+
(0, import_react80.createElement)(
|
|
63971
63996
|
"div",
|
|
63972
63997
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", marginTop: "4px" } },
|
|
63973
63998
|
["business", "success", "warning", "danger", "neutral", "purple", "pink", "cyan", "teal", "orange", "indigo", "rose", "slate"].map(
|
|
63974
|
-
(a) => (0,
|
|
63999
|
+
(a) => (0, import_react80.createElement)(
|
|
63975
64000
|
StripCard,
|
|
63976
64001
|
{ key: a, accent: a, style: { padding: "8px 12px 8px 20px" } },
|
|
63977
|
-
(0,
|
|
64002
|
+
(0, import_react80.createElement)("div", { style: { fontSize: "var(--dshpc-font-sm)", color: "var(--dshpc-fg-2)" } }, `accent="${a}"`)
|
|
63978
64003
|
)
|
|
63979
64004
|
)
|
|
63980
64005
|
)
|
|
63981
64006
|
)
|
|
63982
64007
|
),
|
|
63983
|
-
(0,
|
|
64008
|
+
(0, import_react80.createElement)(
|
|
63984
64009
|
Example,
|
|
63985
64010
|
{ title: t3("sectionHeadTitle"), hint: t3("exSectionHeadHint"), code: CODE_SECTION_HEAD },
|
|
63986
|
-
(0,
|
|
64011
|
+
(0, import_react80.createElement)(
|
|
63987
64012
|
"div",
|
|
63988
64013
|
{ style: { display: "flex", flexDirection: "column", gap: "8px" } },
|
|
63989
64014
|
// A:sparkle 图标 + “全部待办”后缀计数 + 右侧过滤组(滑轨 + 搜索框)
|
|
63990
|
-
(0,
|
|
63991
|
-
icon: (0,
|
|
63992
|
-
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)(
|
|
63993
64018
|
"span",
|
|
63994
64019
|
{ style: { display: "inline-flex", alignItems: "baseline", gap: "6px" } },
|
|
63995
64020
|
"\u5168\u90E8\u5F85\u529E",
|
|
63996
|
-
(0,
|
|
64021
|
+
(0, import_react80.createElement)("span", { style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)", fontWeight: 400 } }, "22")
|
|
63997
64022
|
),
|
|
63998
64023
|
right: [
|
|
63999
|
-
(0,
|
|
64024
|
+
(0, import_react80.createElement)(Segmented, {
|
|
64000
64025
|
items: [
|
|
64001
64026
|
{ value: "all", label: t3("segAll"), count: 22 },
|
|
64002
64027
|
{ value: "doing", label: t3("segDoing"), count: 11 },
|
|
@@ -64006,40 +64031,40 @@ function CardPage() {
|
|
|
64006
64031
|
onChange: setSeg
|
|
64007
64032
|
}),
|
|
64008
64033
|
// 搜索框 140px 定宽(兄弟项目 SEARCH_WIDTH 同款),外面套 div 控宽
|
|
64009
|
-
(0,
|
|
64034
|
+
(0, import_react80.createElement)(
|
|
64010
64035
|
"div",
|
|
64011
64036
|
{ style: { width: "140px", flex: "none" } },
|
|
64012
|
-
(0,
|
|
64037
|
+
(0, import_react80.createElement)(Input, { value: kw, onChange: setKw, placeholder: "\u641C\u7D22" })
|
|
64013
64038
|
)
|
|
64014
64039
|
]
|
|
64015
64040
|
}),
|
|
64016
64041
|
// B:clock 图标 + “我的待办” + 彩色标签 + 右侧单个操作钮
|
|
64017
|
-
(0,
|
|
64018
|
-
icon: (0,
|
|
64019
|
-
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)(
|
|
64020
64045
|
"span",
|
|
64021
64046
|
{ style: { display: "inline-flex", alignItems: "center", gap: "6px" } },
|
|
64022
64047
|
"\u6211\u7684\u5F85\u529E",
|
|
64023
|
-
(0,
|
|
64048
|
+
(0, import_react80.createElement)(Chip, { tone: "success", size: "xs" }, "\u6700\u65B0")
|
|
64024
64049
|
),
|
|
64025
|
-
right: (0,
|
|
64050
|
+
right: (0, import_react80.createElement)(Button, { size: "sm", variant: "ghost" }, "\u5237\u65B0")
|
|
64026
64051
|
}),
|
|
64027
64052
|
// C:refresh 图标 + “已归档” + 小字说明 + 右侧操作组(两个钮)
|
|
64028
|
-
(0,
|
|
64029
|
-
icon: (0,
|
|
64030
|
-
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)(
|
|
64031
64056
|
"span",
|
|
64032
64057
|
{ style: { display: "inline-flex", alignItems: "baseline", gap: "6px" } },
|
|
64033
64058
|
"\u5DF2\u5F52\u6863",
|
|
64034
|
-
(0,
|
|
64059
|
+
(0, import_react80.createElement)("span", { style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)", fontWeight: 400 } }, "\u5171 8 \u6761")
|
|
64035
64060
|
),
|
|
64036
64061
|
right: [
|
|
64037
|
-
(0,
|
|
64038
|
-
(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")
|
|
64039
64064
|
]
|
|
64040
64065
|
}),
|
|
64041
64066
|
// D:固定标签颜色速览 —— accent 内置色名 / 任意色值 / default / false
|
|
64042
|
-
(0,
|
|
64067
|
+
(0, import_react80.createElement)(
|
|
64043
64068
|
"div",
|
|
64044
64069
|
{ style: { display: "flex", flexDirection: "column", gap: "4px" } },
|
|
64045
64070
|
[
|
|
@@ -64048,12 +64073,12 @@ function CardPage() {
|
|
|
64048
64073
|
["success", "success"],
|
|
64049
64074
|
["#7c3aed", "#7c3aed"],
|
|
64050
64075
|
[false, "false\uFF08\u4E0D\u753B\uFF09"]
|
|
64051
|
-
].map(([accent, label]) => (0,
|
|
64076
|
+
].map(([accent, label]) => (0, import_react80.createElement)(SectionHead, { key: String(accent), accent, title: label, flush: true }))
|
|
64052
64077
|
)
|
|
64053
64078
|
)
|
|
64054
64079
|
),
|
|
64055
|
-
(0,
|
|
64056
|
-
(0,
|
|
64080
|
+
(0, import_react80.createElement)(DocCode, { id: "card" }),
|
|
64081
|
+
(0, import_react80.createElement)(DocApi, { id: "card" })
|
|
64057
64082
|
);
|
|
64058
64083
|
}
|
|
64059
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
|
|
@@ -64063,7 +64088,7 @@ var CODE_CHIP = `// tone \u4E94\u6863 + size \u4E09\u6863\uFF1B\u5C3A\u5BF8\u884
|
|
|
64063
64088
|
|
|
64064
64089
|
// \u4E2D\u6027 # \u6807\u7B7E\uFF08\u8BED\u8A00\u65E0\u5173\uFF09\uFF1B\u4F20 onClick \u624D\u6E32\u67D3\u6210 button
|
|
64065
64090
|
<Chip>#npm</Chip>
|
|
64066
|
-
<Chip onClick={() =>
|
|
64091
|
+
<Chip onClick={() => notify('\u70B9\u4E86 chip')}>#\u53EF\u70B9</Chip>`;
|
|
64067
64092
|
var CODE_CHIP_WIDTH = `// \u56FA\u5B9A\u5BBD\uFF1A\u5199\u6B7B\u5BBD\u5EA6
|
|
64068
64093
|
<Chip width={90}>90px \u56FA\u5B9A\u5BBD</Chip>
|
|
64069
64094
|
|
|
@@ -64090,100 +64115,100 @@ var CODE_MARQUEE = `// \u5B9A\u5BBD\u5C0F\u5BB9\u5668\uFF1A\u653E\u4E0D\u4E0B\u6
|
|
|
64090
64115
|
var CODE_LIVE = `// \u8BA2\u9605\u5185\u90E8\u8282\u62CD\u5668\uFF0C\u8D70\u65F6\u5185\u5BB9\u8C03\u7528\u65B9\u6E32\u67D3
|
|
64091
64116
|
<LiveText render={(nowMs) => new Date(nowMs).toLocaleTimeString()} />`;
|
|
64092
64117
|
function ChipPage() {
|
|
64093
|
-
return (0,
|
|
64118
|
+
return (0, import_react80.createElement)(
|
|
64094
64119
|
"div",
|
|
64095
64120
|
null,
|
|
64096
|
-
(0,
|
|
64097
|
-
(0,
|
|
64121
|
+
(0, import_react80.createElement)(DocProse, { id: "chip" }),
|
|
64122
|
+
(0, import_react80.createElement)(
|
|
64098
64123
|
Example,
|
|
64099
64124
|
{ title: "Chip", hint: t3("chipHint"), code: CODE_CHIP },
|
|
64100
|
-
(0,
|
|
64125
|
+
(0, import_react80.createElement)(
|
|
64101
64126
|
"div",
|
|
64102
64127
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64103
64128
|
...["md", "sm", "xs"].map(
|
|
64104
|
-
(sz) => (0,
|
|
64129
|
+
(sz) => (0, import_react80.createElement)(
|
|
64105
64130
|
"div",
|
|
64106
64131
|
{ key: sz, style: { display: "flex", gap: "6px", flexWrap: "wrap", alignItems: "center" } },
|
|
64107
|
-
(0,
|
|
64108
|
-
(0,
|
|
64109
|
-
(0,
|
|
64110
|
-
(0,
|
|
64111
|
-
(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()}`)
|
|
64112
64137
|
)
|
|
64113
64138
|
),
|
|
64114
64139
|
// 中性 # 标签(语言无关)+ 长文字回归样
|
|
64115
|
-
(0,
|
|
64140
|
+
(0, import_react80.createElement)(
|
|
64116
64141
|
"div",
|
|
64117
64142
|
{ style: { display: "flex", gap: "6px", flexWrap: "wrap", alignItems: "center" } },
|
|
64118
|
-
(0,
|
|
64119
|
-
(0,
|
|
64120
|
-
(0,
|
|
64121
|
-
(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")
|
|
64122
64147
|
)
|
|
64123
64148
|
)
|
|
64124
64149
|
),
|
|
64125
|
-
(0,
|
|
64150
|
+
(0, import_react80.createElement)(
|
|
64126
64151
|
Example,
|
|
64127
64152
|
{ title: t3("chipWidthTitle"), hint: t3("chipWidthHint"), code: CODE_CHIP_WIDTH },
|
|
64128
|
-
(0,
|
|
64153
|
+
(0, import_react80.createElement)(
|
|
64129
64154
|
"div",
|
|
64130
64155
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64131
|
-
(0,
|
|
64156
|
+
(0, import_react80.createElement)(
|
|
64132
64157
|
Labeled,
|
|
64133
64158
|
{ label: "width\uFF08\u56FA\u5B9A\u5BBD\uFF09" },
|
|
64134
|
-
(0,
|
|
64159
|
+
(0, import_react80.createElement)(Chip, { width: 90 }, "90px \u56FA\u5B9A\u5BBD")
|
|
64135
64160
|
),
|
|
64136
|
-
(0,
|
|
64161
|
+
(0, import_react80.createElement)(
|
|
64137
64162
|
Labeled,
|
|
64138
64163
|
{ label: "minWidth\uFF08\u6700\u5C0F\u5BBD\uFF1A\u77ED / \u957F\u540C\u5BBD\uFF09" },
|
|
64139
|
-
(0,
|
|
64164
|
+
(0, import_react80.createElement)(
|
|
64140
64165
|
"div",
|
|
64141
64166
|
{ style: { display: "flex", gap: "8px" } },
|
|
64142
|
-
(0,
|
|
64143
|
-
(0,
|
|
64167
|
+
(0, import_react80.createElement)(Chip, { minWidth: 90 }, "\u77ED"),
|
|
64168
|
+
(0, import_react80.createElement)(Chip, { minWidth: 90 }, "\u5F88\u957F\u5F88\u957F\u5F88\u957F")
|
|
64144
64169
|
)
|
|
64145
64170
|
),
|
|
64146
|
-
(0,
|
|
64171
|
+
(0, import_react80.createElement)(
|
|
64147
64172
|
Labeled,
|
|
64148
64173
|
{ label: "maxWidth\uFF08\u6700\u5927\u5BBD\uFF1A\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\uFF09" },
|
|
64149
|
-
(0,
|
|
64174
|
+
(0, import_react80.createElement)(
|
|
64150
64175
|
"div",
|
|
64151
64176
|
{ style: { width: "260px" } },
|
|
64152
|
-
(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")
|
|
64153
64178
|
)
|
|
64154
64179
|
),
|
|
64155
|
-
(0,
|
|
64180
|
+
(0, import_react80.createElement)(
|
|
64156
64181
|
Labeled,
|
|
64157
64182
|
{ label: "\u4E09\u8005\u540C\u8BBE \u21D2 width \u4F18\u5148" },
|
|
64158
|
-
(0,
|
|
64183
|
+
(0, import_react80.createElement)(Chip, { width: 90, minWidth: 160, maxWidth: 120 }, "\u56FA\u5B9A\u5BBD\u4F18\u5148")
|
|
64159
64184
|
)
|
|
64160
64185
|
)
|
|
64161
64186
|
),
|
|
64162
|
-
(0,
|
|
64187
|
+
(0, import_react80.createElement)(
|
|
64163
64188
|
Example,
|
|
64164
64189
|
{ title: t3("marqueeTitle"), hint: t3("exMarqueeHint"), code: CODE_MARQUEE },
|
|
64165
|
-
(0,
|
|
64190
|
+
(0, import_react80.createElement)(
|
|
64166
64191
|
"div",
|
|
64167
64192
|
{ style: { display: "flex", flexDirection: "column", gap: "12px", alignItems: "flex-start" } },
|
|
64168
|
-
(0,
|
|
64193
|
+
(0, import_react80.createElement)(
|
|
64169
64194
|
"div",
|
|
64170
64195
|
{ style: { maxWidth: "148px" } },
|
|
64171
|
-
(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" })
|
|
64172
64197
|
),
|
|
64173
|
-
(0,
|
|
64198
|
+
(0, import_react80.createElement)(
|
|
64174
64199
|
Chip,
|
|
64175
64200
|
{ tone: "business", size: "md", maxWidth: 148 },
|
|
64176
64201
|
"\u6807\u7B7E\u91CC\u6EDA\u52A8\uFF1A\u4E00\u6761\u5F88\u957F\u7684\u4EFB\u52A1\u6807\u9898\uFF0Chover \u8DD1\u9A6C\u706F"
|
|
64177
64202
|
)
|
|
64178
64203
|
)
|
|
64179
64204
|
),
|
|
64180
|
-
(0,
|
|
64205
|
+
(0, import_react80.createElement)(
|
|
64181
64206
|
Example,
|
|
64182
64207
|
{ title: t3("liveTitle"), hint: t3("exLiveHint"), code: CODE_LIVE },
|
|
64183
|
-
(0,
|
|
64208
|
+
(0, import_react80.createElement)(LiveText, { render: (nowMs) => new Date(nowMs).toLocaleTimeString() })
|
|
64184
64209
|
),
|
|
64185
|
-
(0,
|
|
64186
|
-
(0,
|
|
64210
|
+
(0, import_react80.createElement)(DocCode, { id: "chip" }),
|
|
64211
|
+
(0, import_react80.createElement)(DocApi, { id: "chip" })
|
|
64187
64212
|
);
|
|
64188
64213
|
}
|
|
64189
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
|
|
@@ -64211,6 +64236,9 @@ const ok = await confirmModal({
|
|
|
64211
64236
|
tone: 'danger', confirmText: '\u5220\u9664', cancelText: '\u518D\u60F3\u60F3', skin: 'host',
|
|
64212
64237
|
})
|
|
64213
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
|
+
});
|
|
64214
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
|
|
64215
64243
|
<AlertModal
|
|
64216
64244
|
severity="warning"
|
|
@@ -64232,7 +64260,23 @@ var CODE_SMALL_MODAL = `// \u6211\u4EEC\u7684\u6807\u51C6\u5C0F\u6846\uFF1A\u540
|
|
|
64232
64260
|
if (await confirmModal({ title: '\u786E\u8BA4\u63D0\u4EA4', message: '\u63D0\u4EA4\u540E\u4E0D\u53EF\u64A4\u9500', tone: 'danger' })) {
|
|
64233
64261
|
// \u7528\u6237\u70B9\u4E86\u786E\u8BA4
|
|
64234
64262
|
}
|
|
64235
|
-
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} />`;
|
|
64236
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
|
|
64237
64281
|
<Modal title="\u4EFB\u52A1\u8BE6\u60C5" onClose={close} footer={<Button variant="primary">\u77E5\u9053\u4E86</Button>}>
|
|
64238
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>
|
|
@@ -64268,17 +64312,6 @@ var CODE_SIDE_SHEET = `// \u8986\u76D6\u5F0F\u4FA7\u8FB9\u62BD\u5C49\uFF1A\u76AE
|
|
|
64268
64312
|
footer={<Button variant="primary">\u5E94\u7528</Button>}>
|
|
64269
64313
|
<FilterForm />
|
|
64270
64314
|
</SideSheet>`;
|
|
64271
|
-
var CODE_TOAST_NATIVE = `// showToast\uFF1ASonner \u539F\u5473\uFF08\u5BF9\u6BD4\u7528\uFF09
|
|
64272
|
-
showToast('\u5DF2\u4FDD\u5B58')
|
|
64273
|
-
showToast('\u4FDD\u5B58\u6210\u529F', { variant: 'success' })
|
|
64274
|
-
showToast('\u4FDD\u5B58\u5931\u8D25', { variant: 'error' })
|
|
64275
|
-
showToast('\u6574\u6761\u81EA\u5B9A\u4E49\u8272', { color: '#7c3aed' })
|
|
64276
|
-
showToast('\u6D88\u5931\u540E\u56DE\u8C03', { onDismiss: () => {} })
|
|
64277
|
-
showToast('\u9876\u90E8-\u5DE6', { position: 'top-left' })`;
|
|
64278
|
-
var CODE_TOAST_HOST = `// showHostToast\uFF1A\u76F4\u63A5\u5305\u5B98\u65B9 Toast\uFF08\u9876\u90E8\u6A2A\u5E45\uFF09
|
|
64279
|
-
showHostToast('\u8FD9\u662F\u5BBF\u4E3B\u539F\u751F\u63D0\u793A')
|
|
64280
|
-
showHostToast('\u64CD\u4F5C\u6210\u529F', { tone: 'success' })
|
|
64281
|
-
showHostToast('\u6709\u52A8\u4F5C\u7684\u539F\u751F\u63D0\u793A', { actions: [{ text: '\u67E5\u770B', onClick: () => {} }] })`;
|
|
64282
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
|
|
64283
64316
|
notify('\u5DF2\u4FDD\u5B58\u8349\u7A3F')
|
|
64284
64317
|
notify('\u4FDD\u5B58\u6210\u529F', { variant: 'success' })
|
|
@@ -64332,72 +64365,72 @@ blocked.close()
|
|
|
64332
64365
|
<LoadingToast text="\u6B63\u5728\u52A0\u8F7D" />
|
|
64333
64366
|
<LoadingBlock text="\u5904\u7406\u4E2D" />`;
|
|
64334
64367
|
function FeedbackPage() {
|
|
64335
|
-
const [open, setOpen] = (0,
|
|
64336
|
-
const [openNative, setOpenNative] = (0,
|
|
64337
|
-
const [alertState, setAlertState] = (0,
|
|
64338
|
-
const [confirmCfg, setConfirmCfg] = (0,
|
|
64339
|
-
const [confirmResult, setConfirmResult] = (0,
|
|
64340
|
-
const [largeOpen, setLargeOpen] = (0,
|
|
64341
|
-
const [largeOpenB, setLargeOpenB] = (0,
|
|
64342
|
-
const [sheetCfg, setSheetCfg] = (0,
|
|
64343
|
-
const [sheetOpen, setSheetOpen] = (0,
|
|
64344
|
-
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)("");
|
|
64345
64378
|
const flash = (opts) => {
|
|
64346
64379
|
const handle = showLoading(opts);
|
|
64347
64380
|
window.setTimeout(() => handle.close(), 1200);
|
|
64348
64381
|
};
|
|
64349
|
-
return (0,
|
|
64382
|
+
return (0, import_react80.createElement)(
|
|
64350
64383
|
"div",
|
|
64351
64384
|
null,
|
|
64352
|
-
(0,
|
|
64353
|
-
(0,
|
|
64385
|
+
(0, import_react80.createElement)(DocProse, { id: "feedback" }),
|
|
64386
|
+
(0, import_react80.createElement)(
|
|
64354
64387
|
Example,
|
|
64355
64388
|
{ title: t3("exSmallModalTitle"), hint: t3("exSmallModalHint"), code: CODE_SMALL_MODAL },
|
|
64356
|
-
(0,
|
|
64389
|
+
(0, import_react80.createElement)(
|
|
64357
64390
|
"div",
|
|
64358
64391
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64359
|
-
(0,
|
|
64392
|
+
(0, import_react80.createElement)(
|
|
64360
64393
|
"div",
|
|
64361
64394
|
null,
|
|
64362
|
-
(0,
|
|
64363
|
-
(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)(
|
|
64364
64397
|
"div",
|
|
64365
64398
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64366
|
-
(0,
|
|
64367
|
-
(0,
|
|
64368
|
-
(0,
|
|
64369
|
-
(0,
|
|
64370
|
-
(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")
|
|
64371
64404
|
),
|
|
64372
|
-
alertState !== null ? (0,
|
|
64405
|
+
alertState !== null ? (0, import_react80.createElement)(AlertModal, {
|
|
64373
64406
|
severity: alertState.sev,
|
|
64374
64407
|
title: alertState.titled ? "\u64CD\u4F5C\u7ED3\u679C" : void 0,
|
|
64375
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",
|
|
64376
64409
|
onConfirm: () => setAlertState(null)
|
|
64377
64410
|
}) : null
|
|
64378
64411
|
),
|
|
64379
|
-
(0,
|
|
64412
|
+
(0, import_react80.createElement)(
|
|
64380
64413
|
"div",
|
|
64381
64414
|
null,
|
|
64382
|
-
(0,
|
|
64383
|
-
(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)(
|
|
64384
64417
|
"div",
|
|
64385
64418
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px", alignItems: "center" } },
|
|
64386
|
-
(0,
|
|
64419
|
+
(0, import_react80.createElement)(Button, { onClick: () => {
|
|
64387
64420
|
setConfirmCfg({ tone: "primary", confirmText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" });
|
|
64388
64421
|
setConfirmResult("");
|
|
64389
64422
|
} }, "\u9ED8\u8BA4\uFF08primary\uFF09"),
|
|
64390
|
-
(0,
|
|
64423
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => {
|
|
64391
64424
|
setConfirmCfg({ tone: "danger", confirmText: "\u5220\u9664", cancelText: "\u518D\u60F3\u60F3" });
|
|
64392
64425
|
setConfirmResult("");
|
|
64393
64426
|
} }, "danger \u53D8\u4F53"),
|
|
64394
|
-
(0,
|
|
64427
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => {
|
|
64395
64428
|
setConfirmCfg({ tone: "warning", confirmText: "\u6211\u5DF2\u77E5\u6653", cancelText: "\u8FD4\u56DE" });
|
|
64396
64429
|
setConfirmResult("");
|
|
64397
64430
|
} }, "\u6539\u6587\u6848"),
|
|
64398
|
-
confirmResult ? (0,
|
|
64431
|
+
confirmResult ? (0, import_react80.createElement)("span", { style: { fontSize: "13px", color: "var(--dshpc-fg-3)" } }, confirmResult) : null
|
|
64399
64432
|
),
|
|
64400
|
-
confirmCfg !== null ? (0,
|
|
64433
|
+
confirmCfg !== null ? (0, import_react80.createElement)(ConfirmModal, {
|
|
64401
64434
|
title: "\u5220\u9664\u4EFB\u52A1",
|
|
64402
64435
|
message: "\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F",
|
|
64403
64436
|
tone: confirmCfg.tone,
|
|
@@ -64413,156 +64446,220 @@ function FeedbackPage() {
|
|
|
64413
64446
|
}
|
|
64414
64447
|
}) : null
|
|
64415
64448
|
),
|
|
64416
|
-
(0,
|
|
64449
|
+
(0, import_react80.createElement)(
|
|
64417
64450
|
"div",
|
|
64418
64451
|
null,
|
|
64419
|
-
(0,
|
|
64420
|
-
(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)(
|
|
64421
64454
|
"div",
|
|
64422
64455
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64423
|
-
(0,
|
|
64424
|
-
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"));
|
|
64425
64458
|
} }, "alertModal()"),
|
|
64426
|
-
(0,
|
|
64459
|
+
(0, import_react80.createElement)(Button, { onClick: async () => {
|
|
64427
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" });
|
|
64428
|
-
|
|
64461
|
+
notify(ok ? "\u4F60\u70B9\u4E86\uFF1A\u63D0\u4EA4" : "\u4F60\u70B9\u4E86\uFF1A\u53D6\u6D88");
|
|
64429
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")
|
|
64430
64527
|
)
|
|
64431
64528
|
)
|
|
64432
64529
|
)
|
|
64433
64530
|
),
|
|
64434
|
-
(0,
|
|
64531
|
+
(0, import_react80.createElement)(
|
|
64435
64532
|
Example,
|
|
64436
64533
|
{ title: t3("exLargeModalTitle"), hint: t3("exLargeModalHint"), code: CODE_LARGE_MODAL },
|
|
64437
|
-
(0,
|
|
64534
|
+
(0, import_react80.createElement)(
|
|
64438
64535
|
"div",
|
|
64439
64536
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64440
|
-
(0,
|
|
64537
|
+
(0, import_react80.createElement)(
|
|
64441
64538
|
"div",
|
|
64442
64539
|
null,
|
|
64443
|
-
(0,
|
|
64444
|
-
(0,
|
|
64445
|
-
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, {
|
|
64446
64543
|
title: "\u4EFB\u52A1\u8BE6\u60C5",
|
|
64447
64544
|
onClose: () => setOpen(false),
|
|
64448
|
-
footer: (0,
|
|
64449
|
-
}, (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
|
|
64450
64547
|
),
|
|
64451
|
-
(0,
|
|
64548
|
+
(0, import_react80.createElement)(
|
|
64452
64549
|
"div",
|
|
64453
64550
|
null,
|
|
64454
|
-
(0,
|
|
64455
|
-
(0,
|
|
64456
|
-
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)(
|
|
64457
64554
|
Modal,
|
|
64458
64555
|
{
|
|
64459
64556
|
size: "lg",
|
|
64460
64557
|
title: "\u4F1A\u8BDD\u8BB0\u5F55",
|
|
64461
|
-
headerActions: (0,
|
|
64558
|
+
headerActions: (0, import_react80.createElement)(
|
|
64462
64559
|
Button,
|
|
64463
64560
|
{ variant: "outline", size: "sm", icon: iconOf("chevron", 14) },
|
|
64464
64561
|
"\u66F4\u591A"
|
|
64465
64562
|
),
|
|
64466
64563
|
onClose: () => setLargeOpen(false),
|
|
64467
|
-
footer: (0,
|
|
64564
|
+
footer: (0, import_react80.createElement)(
|
|
64468
64565
|
"div",
|
|
64469
64566
|
{ style: { display: "flex", justifyContent: "flex-end", gap: "8px" } },
|
|
64470
|
-
(0,
|
|
64471
|
-
(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")
|
|
64472
64569
|
)
|
|
64473
64570
|
},
|
|
64474
|
-
(0,
|
|
64571
|
+
(0, import_react80.createElement)(
|
|
64475
64572
|
"div",
|
|
64476
64573
|
null,
|
|
64477
64574
|
Array.from(
|
|
64478
64575
|
{ length: 40 },
|
|
64479
|
-
(_, 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`)
|
|
64480
64577
|
),
|
|
64481
|
-
(0,
|
|
64578
|
+
(0, import_react80.createElement)("div", { className: "dshpc-overlay-head__sid" }, "\u5171 128 \u6761 \xB7 \u6700\u8FD1\u66F4\u65B0 2 \u5206\u949F\u524D")
|
|
64482
64579
|
)
|
|
64483
64580
|
) : null
|
|
64484
64581
|
),
|
|
64485
|
-
(0,
|
|
64582
|
+
(0, import_react80.createElement)(
|
|
64486
64583
|
"div",
|
|
64487
64584
|
null,
|
|
64488
|
-
(0,
|
|
64489
|
-
(0,
|
|
64490
|
-
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)(
|
|
64491
64588
|
Modal,
|
|
64492
64589
|
{
|
|
64493
64590
|
size: "lg",
|
|
64494
|
-
title: (0,
|
|
64591
|
+
title: (0, import_react80.createElement)(
|
|
64495
64592
|
"div",
|
|
64496
64593
|
null,
|
|
64497
|
-
(0,
|
|
64498
|
-
(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")
|
|
64499
64596
|
),
|
|
64500
64597
|
onClose: () => setLargeOpenB(false)
|
|
64501
64598
|
},
|
|
64502
|
-
(0,
|
|
64599
|
+
(0, import_react80.createElement)(
|
|
64503
64600
|
"div",
|
|
64504
64601
|
null,
|
|
64505
|
-
(0,
|
|
64506
|
-
(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")
|
|
64507
64604
|
)
|
|
64508
64605
|
) : null
|
|
64509
64606
|
)
|
|
64510
64607
|
)
|
|
64511
64608
|
),
|
|
64512
|
-
(0,
|
|
64609
|
+
(0, import_react80.createElement)(
|
|
64513
64610
|
Example,
|
|
64514
64611
|
{ title: t3("exSideSheetTitle"), hint: t3("exSideSheetHint"), code: CODE_SIDE_SHEET },
|
|
64515
|
-
(0,
|
|
64612
|
+
(0, import_react80.createElement)(
|
|
64516
64613
|
"div",
|
|
64517
64614
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64518
|
-
(0,
|
|
64615
|
+
(0, import_react80.createElement)(Button, { onClick: () => {
|
|
64519
64616
|
setSheetCfg({ side: "left", footer: false });
|
|
64520
64617
|
setSheetOpen(true);
|
|
64521
64618
|
} }, "\u4ECE\u5DE6\u4FA7\u6ED1\u51FA"),
|
|
64522
|
-
(0,
|
|
64619
|
+
(0, import_react80.createElement)(Button, { variant: "outline", onClick: () => {
|
|
64523
64620
|
setSheetCfg({ side: "right", footer: false });
|
|
64524
64621
|
setSheetOpen(true);
|
|
64525
64622
|
} }, "\u4ECE\u53F3\u4FA7\u6ED1\u51FA"),
|
|
64526
|
-
(0,
|
|
64623
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: () => {
|
|
64527
64624
|
setSheetCfg({ side: "left", footer: true });
|
|
64528
64625
|
setSheetOpen(true);
|
|
64529
64626
|
} }, "\u5E26\u5E95\u680F"),
|
|
64530
64627
|
// 常驻渲染 + open 布尔:关闭时才有收回去的动效(条件渲染会一卸载就没影)。
|
|
64531
|
-
(0,
|
|
64628
|
+
(0, import_react80.createElement)(
|
|
64532
64629
|
SideSheet,
|
|
64533
64630
|
{
|
|
64534
64631
|
open: sheetOpen,
|
|
64535
64632
|
side: sheetCfg.side,
|
|
64536
64633
|
title: "\u6587\u4EF6\u8BE6\u60C5",
|
|
64537
|
-
extra: (0,
|
|
64634
|
+
extra: (0, import_react80.createElement)(Chip, null, "\u53EA\u8BFB"),
|
|
64538
64635
|
onClose: () => setSheetOpen(false),
|
|
64539
|
-
footer: sheetCfg.footer ? (0,
|
|
64636
|
+
footer: sheetCfg.footer ? (0, import_react80.createElement)(Button, { variant: "primary", onClick: () => setSheetOpen(false) }, "\u77E5\u9053\u4E86") : void 0
|
|
64540
64637
|
},
|
|
64541
|
-
(0,
|
|
64638
|
+
(0, import_react80.createElement)(
|
|
64542
64639
|
"div",
|
|
64543
64640
|
{ style: { display: "flex", flexDirection: "column", gap: "10px", fontSize: "13px", lineHeight: "1.7" } },
|
|
64544
|
-
(0,
|
|
64545
|
-
(0,
|
|
64546
|
-
(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")
|
|
64547
64644
|
)
|
|
64548
64645
|
)
|
|
64549
64646
|
)
|
|
64550
64647
|
),
|
|
64551
|
-
(0,
|
|
64648
|
+
(0, import_react80.createElement)(
|
|
64552
64649
|
Example,
|
|
64553
64650
|
{ title: t3("exHostModalTitle"), hint: t3("exHostModalHint"), code: CODE_HOST_MODAL },
|
|
64554
|
-
(0,
|
|
64651
|
+
(0, import_react80.createElement)(
|
|
64555
64652
|
"div",
|
|
64556
64653
|
{ style: { display: "flex", flexWrap: "wrap", gap: "8px" } },
|
|
64557
|
-
(0,
|
|
64558
|
-
(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: () => {
|
|
64559
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' });
|
|
64560
64657
|
} }, 'alertModal({skin:"host"})'),
|
|
64561
|
-
(0,
|
|
64658
|
+
(0, import_react80.createElement)(Button, { variant: "ghost", onClick: async () => {
|
|
64562
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" });
|
|
64563
|
-
|
|
64660
|
+
notify(ok ? "\u5BBF\u4E3B confirm\uFF1A\u4F60\u70B9\u4E86\u5220\u9664" : "\u5BBF\u4E3B confirm\uFF1A\u4F60\u70B9\u4E86\u53D6\u6D88");
|
|
64564
64661
|
} }, 'confirmModal({skin:"host"})'),
|
|
64565
|
-
openNative ? (0,
|
|
64662
|
+
openNative ? (0, import_react80.createElement)(
|
|
64566
64663
|
Official.Modal,
|
|
64567
64664
|
{
|
|
64568
64665
|
open: openNative,
|
|
@@ -64571,22 +64668,22 @@ function FeedbackPage() {
|
|
|
64571
64668
|
closeLabel: "\u5173\u95ED",
|
|
64572
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",
|
|
64573
64670
|
contentClassName: "dshpc-native-demo-content",
|
|
64574
|
-
footer: (0,
|
|
64671
|
+
footer: (0, import_react80.createElement)(
|
|
64575
64672
|
"div",
|
|
64576
64673
|
{ style: { display: "flex", justifyContent: "flex-end", gap: "8px" } },
|
|
64577
|
-
(0,
|
|
64578
|
-
(0,
|
|
64579
|
-
(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")
|
|
64580
64677
|
)
|
|
64581
64678
|
},
|
|
64582
|
-
(0,
|
|
64679
|
+
(0, import_react80.createElement)(
|
|
64583
64680
|
"div",
|
|
64584
64681
|
{ style: { display: "flex", flexDirection: "column", gap: "12px" } },
|
|
64585
|
-
(0,
|
|
64586
|
-
(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)(
|
|
64587
64684
|
"label",
|
|
64588
64685
|
{ style: { display: "flex", gap: "8px", alignItems: "center", fontSize: "13px" } },
|
|
64589
|
-
(0,
|
|
64686
|
+
(0, import_react80.createElement)(Checkbox, { checked: false, onChange: () => {
|
|
64590
64687
|
} }),
|
|
64591
64688
|
"\u81EA\u5B9A\u4E49\u52FE\u9009\u9879"
|
|
64592
64689
|
)
|
|
@@ -64594,17 +64691,17 @@ function FeedbackPage() {
|
|
|
64594
64691
|
) : null
|
|
64595
64692
|
)
|
|
64596
64693
|
),
|
|
64597
|
-
(0,
|
|
64694
|
+
(0, import_react80.createElement)(
|
|
64598
64695
|
Example,
|
|
64599
64696
|
{ title: t3("exToastNotifyTitle"), hint: t3("exToastNotifyHint"), code: CODE_TOAST_NOTIFY },
|
|
64600
|
-
(0,
|
|
64697
|
+
(0, import_react80.createElement)(
|
|
64601
64698
|
"div",
|
|
64602
64699
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64603
|
-
(0,
|
|
64604
|
-
(0,
|
|
64605
|
-
(0,
|
|
64606
|
-
(0,
|
|
64607
|
-
(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)(
|
|
64608
64705
|
Button,
|
|
64609
64706
|
{
|
|
64610
64707
|
onClick: () => notify("\u5DF2\u5220\u9664\u8BE5\u6587\u4EF6", {
|
|
@@ -64615,7 +64712,7 @@ function FeedbackPage() {
|
|
|
64615
64712
|
},
|
|
64616
64713
|
"\u5355\u6309\u94AE+\u63CF\u8FF0"
|
|
64617
64714
|
),
|
|
64618
|
-
(0,
|
|
64715
|
+
(0, import_react80.createElement)(
|
|
64619
64716
|
Button,
|
|
64620
64717
|
{
|
|
64621
64718
|
onClick: () => notify("\u786E\u8BA4\u63D0\u4EA4\u5417\uFF1F", {
|
|
@@ -64630,80 +64727,29 @@ function FeedbackPage() {
|
|
|
64630
64727
|
)
|
|
64631
64728
|
)
|
|
64632
64729
|
),
|
|
64633
|
-
(0,
|
|
64634
|
-
Example,
|
|
64635
|
-
{ title: t3("exToastHostTitle"), hint: t3("exToastHostHint"), code: CODE_TOAST_HOST },
|
|
64636
|
-
(0, import_react81.createElement)(
|
|
64637
|
-
"div",
|
|
64638
|
-
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64639
|
-
(0, import_react81.createElement)(Button, { onClick: () => showHostToast("\u8FD9\u662F\u5BBF\u4E3B\u539F\u751F\u63D0\u793A") }, "\u666E\u901A"),
|
|
64640
|
-
(0, import_react81.createElement)(Button, { onClick: () => showHostToast("\u64CD\u4F5C\u6210\u529F", { tone: "success" }) }, "\u6210\u529F(success)"),
|
|
64641
|
-
(0, import_react81.createElement)(
|
|
64642
|
-
Button,
|
|
64643
|
-
{
|
|
64644
|
-
onClick: () => showHostToast("\u6709\u52A8\u4F5C\u7684\u539F\u751F\u63D0\u793A", {
|
|
64645
|
-
actions: [{ text: "\u67E5\u770B", onClick: () => showToast("\u70B9\u4E86\u300C\u67E5\u770B\u300D") }]
|
|
64646
|
-
})
|
|
64647
|
-
},
|
|
64648
|
-
"\u5E26\u52A8\u4F5C"
|
|
64649
|
-
)
|
|
64650
|
-
)
|
|
64651
|
-
),
|
|
64652
|
-
(0, import_react81.createElement)(
|
|
64653
|
-
Example,
|
|
64654
|
-
{ title: t3("exToastSonnerTitle"), hint: t3("exToastSonnerHint"), code: CODE_TOAST_NATIVE },
|
|
64655
|
-
(0, import_react81.createElement)(
|
|
64656
|
-
"div",
|
|
64657
|
-
{ style: { display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "8px" } },
|
|
64658
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u5DF2\u4FDD\u5B58") }, "\u666E\u901A(info)"),
|
|
64659
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u4FDD\u5B58\u6210\u529F", { variant: "success" }) }, "\u6210\u529F"),
|
|
64660
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u4FDD\u5B58\u5931\u8D25", { variant: "error" }) }, "\u5931\u8D25"),
|
|
64661
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u6CE8\u610F\u4E00\u4E0B", { variant: "warning" }) }, "\u8B66\u544A"),
|
|
64662
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u6574\u6761\u81EA\u5B9A\u4E49\u8272", { color: "#7c3aed" }) }, "\u81EA\u5B9A\u4E49\u8272"),
|
|
64663
|
-
(0, import_react81.createElement)(
|
|
64664
|
-
Button,
|
|
64665
|
-
{
|
|
64666
|
-
onClick: () => showToast("\u6D88\u5931\u540E\u56DE\u8C03", {
|
|
64667
|
-
onDismiss: () => showToast("\u4E0A\u4E00\u6761\u6D88\u5931\u4E86")
|
|
64668
|
-
})
|
|
64669
|
-
},
|
|
64670
|
-
"\u5E26\u56DE\u8C03"
|
|
64671
|
-
)
|
|
64672
|
-
),
|
|
64673
|
-
(0, import_react81.createElement)(
|
|
64674
|
-
"div",
|
|
64675
|
-
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64676
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u9876\u90E8-\u5DE6", { position: "top-left" }) }, "top-left"),
|
|
64677
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u9876\u90E8-\u4E2D", { position: "top-center" }) }, "top-center"),
|
|
64678
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u9876\u90E8-\u53F3", { position: "top-right" }) }, "top-right"),
|
|
64679
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u5E95\u90E8-\u5DE6", { position: "bottom-left" }) }, "bottom-left"),
|
|
64680
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u5E95\u90E8-\u4E2D", { position: "bottom-center" }) }, "bottom-center"),
|
|
64681
|
-
(0, import_react81.createElement)(Button, { onClick: () => showToast("\u5E95\u90E8-\u53F3", { position: "bottom-right" }) }, "bottom-right")
|
|
64682
|
-
)
|
|
64683
|
-
),
|
|
64684
|
-
(0, import_react81.createElement)(
|
|
64730
|
+
(0, import_react80.createElement)(
|
|
64685
64731
|
Example,
|
|
64686
64732
|
{ title: t3("exLoaderTitle"), hint: t3("exLoaderHint"), code: CODE_LOADER },
|
|
64687
|
-
(0,
|
|
64733
|
+
(0, import_react80.createElement)(
|
|
64688
64734
|
"div",
|
|
64689
64735
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64690
64736
|
...LOADER_VARIANTS.map(
|
|
64691
|
-
(variant) => (0,
|
|
64737
|
+
(variant) => (0, import_react80.createElement)(
|
|
64692
64738
|
"div",
|
|
64693
64739
|
{ key: variant, style: { display: "flex", alignItems: "center", gap: "20px", flexWrap: "wrap" } },
|
|
64694
|
-
(0,
|
|
64740
|
+
(0, import_react80.createElement)(
|
|
64695
64741
|
"span",
|
|
64696
64742
|
{ style: { width: "56px", color: "var(--dshpc-fg-3)", fontSize: "var(--dshpc-font-xs)" } },
|
|
64697
64743
|
variant
|
|
64698
64744
|
),
|
|
64699
|
-
...LOADER_SIZES.map((size4) => (0,
|
|
64745
|
+
...LOADER_SIZES.map((size4) => (0, import_react80.createElement)(Loader, { key: size4, variant, size: size4 }))
|
|
64700
64746
|
)
|
|
64701
64747
|
),
|
|
64702
64748
|
// 背景 / 定位 / 颜色都由调用方配:组件本身只是裸图标
|
|
64703
|
-
(0,
|
|
64749
|
+
(0, import_react80.createElement)(
|
|
64704
64750
|
"div",
|
|
64705
64751
|
{ style: { display: "flex", alignItems: "center", gap: "16px", flexWrap: "wrap" } },
|
|
64706
|
-
(0,
|
|
64752
|
+
(0, import_react80.createElement)(
|
|
64707
64753
|
"span",
|
|
64708
64754
|
{
|
|
64709
64755
|
style: {
|
|
@@ -64713,9 +64759,9 @@ function FeedbackPage() {
|
|
|
64713
64759
|
background: "var(--dshpc-surface-sunken)"
|
|
64714
64760
|
}
|
|
64715
64761
|
},
|
|
64716
|
-
(0,
|
|
64762
|
+
(0, import_react80.createElement)(Loader, { size: "sm" })
|
|
64717
64763
|
),
|
|
64718
|
-
(0,
|
|
64764
|
+
(0, import_react80.createElement)(
|
|
64719
64765
|
Surface,
|
|
64720
64766
|
{
|
|
64721
64767
|
padding: null,
|
|
@@ -64728,56 +64774,56 @@ function FeedbackPage() {
|
|
|
64728
64774
|
fontSize: "var(--dshpc-font-xs)"
|
|
64729
64775
|
}
|
|
64730
64776
|
},
|
|
64731
|
-
(0,
|
|
64777
|
+
(0, import_react80.createElement)(Loader, { variant: "blocks", size: "sm" }),
|
|
64732
64778
|
"\u6B63\u5728\u540C\u6B65"
|
|
64733
64779
|
),
|
|
64734
|
-
(0,
|
|
64780
|
+
(0, import_react80.createElement)("span", { style: { color: "var(--dshpc-business)" } }, (0, import_react80.createElement)(Loader, { size: "lg" }))
|
|
64735
64781
|
),
|
|
64736
64782
|
// 同族的胶囊不定进度:三档尺寸
|
|
64737
|
-
(0,
|
|
64783
|
+
(0, import_react80.createElement)(
|
|
64738
64784
|
"div",
|
|
64739
64785
|
{ style: { display: "flex", alignItems: "center", gap: "20px", flexWrap: "wrap" } },
|
|
64740
|
-
(0,
|
|
64741
|
-
(0,
|
|
64742
|
-
(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" })
|
|
64743
64789
|
)
|
|
64744
64790
|
)
|
|
64745
64791
|
),
|
|
64746
|
-
(0,
|
|
64792
|
+
(0, import_react80.createElement)(
|
|
64747
64793
|
Example,
|
|
64748
64794
|
{ title: t3("exLoadingTitle"), hint: t3("exLoadingHint"), code: CODE_LOADING },
|
|
64749
|
-
(0,
|
|
64795
|
+
(0, import_react80.createElement)(
|
|
64750
64796
|
"div",
|
|
64751
64797
|
{ style: { display: "flex", flexDirection: "column", gap: "16px" } },
|
|
64752
|
-
(0,
|
|
64798
|
+
(0, import_react80.createElement)(
|
|
64753
64799
|
"div",
|
|
64754
64800
|
{ style: { display: "flex", alignItems: "center", gap: "16px", flexWrap: "wrap" } },
|
|
64755
|
-
(0,
|
|
64756
|
-
(0,
|
|
64801
|
+
(0, import_react80.createElement)(LoadingToast, null),
|
|
64802
|
+
(0, import_react80.createElement)(LoadingBlock, { text: "\u5904\u7406\u4E2D" })
|
|
64757
64803
|
),
|
|
64758
|
-
(0,
|
|
64804
|
+
(0, import_react80.createElement)(
|
|
64759
64805
|
"div",
|
|
64760
64806
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64761
|
-
(0,
|
|
64762
|
-
(0,
|
|
64763
|
-
(0,
|
|
64764
|
-
(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")
|
|
64765
64811
|
),
|
|
64766
|
-
(0,
|
|
64812
|
+
(0, import_react80.createElement)(
|
|
64767
64813
|
"div",
|
|
64768
64814
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap" } },
|
|
64769
|
-
(0,
|
|
64770
|
-
(0,
|
|
64771
|
-
(0,
|
|
64772
|
-
(0,
|
|
64773
|
-
(0,
|
|
64774
|
-
(0,
|
|
64775
|
-
(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")
|
|
64776
64822
|
)
|
|
64777
64823
|
)
|
|
64778
64824
|
),
|
|
64779
|
-
(0,
|
|
64780
|
-
(0,
|
|
64825
|
+
(0, import_react80.createElement)(DocCode, { id: "feedback" }),
|
|
64826
|
+
(0, import_react80.createElement)(DocApi, { id: "feedback" })
|
|
64781
64827
|
);
|
|
64782
64828
|
}
|
|
64783
64829
|
var CODE_DOCK = `// 1) \u5EFA\u4E00\u4E2A dock \u63A7\u5236\u5668\uFF08\u5E94\u7528\u7EA7\u5355\u4F8B\uFF1BmaxPanels \u9ED8\u8BA4 3\uFF09
|
|
@@ -64798,7 +64844,7 @@ const dock = createPanelDock({ maxPanels: 3 })
|
|
|
64798
64844
|
|
|
64799
64845
|
// 3) \u663E\u9690\u5F52\u72B6\u6001\uFF1A\u53EA\u4F20 id\uFF0C\u4E0D\u4F20\u5185\u5BB9
|
|
64800
64846
|
const result = dock.open('files') // { ok, reason }\uFF1B\u5230\u4E0A\u9650\u65F6 ok=false
|
|
64801
|
-
if (!result.ok)
|
|
64847
|
+
if (!result.ok) notify('\u6700\u591A\u540C\u65F6\u5F00 3 \u680F')
|
|
64802
64848
|
dock.close('files')
|
|
64803
64849
|
dock.toggle('preview')
|
|
64804
64850
|
dock.isOpen('files')
|
|
@@ -64809,8 +64855,8 @@ dock.isCollapsed('files')
|
|
|
64809
64855
|
// 4) \u8BA2\u9605\u72B6\u6001\u9A71\u52A8 UI\uFF08React\uFF09
|
|
64810
64856
|
const state = useSyncExternalStore(dock.subscribe, dock.getSnapshot, dock.getSnapshot)`;
|
|
64811
64857
|
function LayoutPage() {
|
|
64812
|
-
const state = (0,
|
|
64813
|
-
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);
|
|
64814
64860
|
const open = (id3) => {
|
|
64815
64861
|
const result = demoDock.open(id3);
|
|
64816
64862
|
setNotice(result.ok ? null : t3("dockLimitWarn"));
|
|
@@ -64825,24 +64871,24 @@ function LayoutPage() {
|
|
|
64825
64871
|
};
|
|
64826
64872
|
const opened = state.ids;
|
|
64827
64873
|
const collapsedIds = state.collapsed;
|
|
64828
|
-
return (0,
|
|
64874
|
+
return (0, import_react80.createElement)(
|
|
64829
64875
|
"div",
|
|
64830
64876
|
null,
|
|
64831
|
-
(0,
|
|
64832
|
-
(0,
|
|
64877
|
+
(0, import_react80.createElement)(DocProse, { id: "layout" }),
|
|
64878
|
+
(0, import_react80.createElement)(
|
|
64833
64879
|
Example,
|
|
64834
64880
|
{ title: "PanelDock", hint: t3("dockHint"), code: CODE_DOCK },
|
|
64835
|
-
(0,
|
|
64881
|
+
(0, import_react80.createElement)(
|
|
64836
64882
|
"div",
|
|
64837
64883
|
{ style: { display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "12px" } },
|
|
64838
|
-
(0,
|
|
64839
|
-
(0,
|
|
64840
|
-
(0,
|
|
64841
|
-
(0,
|
|
64842
|
-
(0,
|
|
64843
|
-
(0,
|
|
64844
|
-
(0,
|
|
64845
|
-
(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)(
|
|
64846
64892
|
Button,
|
|
64847
64893
|
{
|
|
64848
64894
|
size: "sm",
|
|
@@ -64855,21 +64901,21 @@ function LayoutPage() {
|
|
|
64855
64901
|
t3("dockBtnReset")
|
|
64856
64902
|
)
|
|
64857
64903
|
),
|
|
64858
|
-
(0,
|
|
64904
|
+
(0, import_react80.createElement)(
|
|
64859
64905
|
"div",
|
|
64860
64906
|
{ style: { fontSize: "12px", color: "var(--dshpc-fg-3)" } },
|
|
64861
64907
|
`${t3("dockOpened")}${opened.length === 0 ? "\u2014" : opened.join(", ")}`,
|
|
64862
64908
|
collapsedIds.length === 0 ? "" : `\u3000${t3("dockCollapsed")}${collapsedIds.join(", ")}`,
|
|
64863
64909
|
notice === null ? "" : `\u3000${notice}`
|
|
64864
64910
|
),
|
|
64865
|
-
(0,
|
|
64911
|
+
(0, import_react80.createElement)(
|
|
64866
64912
|
"div",
|
|
64867
64913
|
{ style: { marginTop: "10px", fontSize: "12px", color: "var(--dshpc-fg-3)", lineHeight: "1.9" } },
|
|
64868
64914
|
t3("dockMainText")
|
|
64869
64915
|
)
|
|
64870
64916
|
),
|
|
64871
|
-
(0,
|
|
64872
|
-
(0,
|
|
64917
|
+
(0, import_react80.createElement)(DocCode, { id: "layout" }),
|
|
64918
|
+
(0, import_react80.createElement)(DocApi, { id: "layout" })
|
|
64873
64919
|
);
|
|
64874
64920
|
}
|
|
64875
64921
|
var CODE_DATETIME = `// \u5355\u4E2A\u65F6\u523B\uFF1Aprecision \u63A7\u5236\u7CBE\u5EA6\uFF08day / hour / minute / second\uFF09
|
|
@@ -64878,43 +64924,43 @@ h(DateTimePicker, { precision: 'minute', value: at, onChange: setAt })
|
|
|
64878
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
|
|
64879
64925
|
h(DateTimePicker, { mode: 'range', precision: 'day', value: range, onChange: setRange })`;
|
|
64880
64926
|
function DateTimePage() {
|
|
64881
|
-
const [singleDay, setSingleDay] = (0,
|
|
64882
|
-
const [singleMinute, setSingleMinute] = (0,
|
|
64883
|
-
const [rangeDay, setRangeDay] = (0,
|
|
64884
|
-
const [rangeSecond, setRangeSecond] = (0,
|
|
64885
|
-
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)(
|
|
64886
64932
|
"div",
|
|
64887
64933
|
null,
|
|
64888
|
-
(0,
|
|
64889
|
-
(0,
|
|
64934
|
+
(0, import_react80.createElement)(DocProse, { id: "datetime-picker" }),
|
|
64935
|
+
(0, import_react80.createElement)(
|
|
64890
64936
|
Example,
|
|
64891
64937
|
{ title: "DateTimePicker", hint: t3("dateTimePickerHint"), code: CODE_DATETIME },
|
|
64892
|
-
(0,
|
|
64938
|
+
(0, import_react80.createElement)(
|
|
64893
64939
|
"div",
|
|
64894
64940
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "flex-start" } },
|
|
64895
|
-
(0,
|
|
64941
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64896
64942
|
precision: "day",
|
|
64897
64943
|
value: singleDay,
|
|
64898
64944
|
onChange: (v) => setSingleDay(v)
|
|
64899
64945
|
}),
|
|
64900
|
-
(0,
|
|
64946
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64901
64947
|
precision: "minute",
|
|
64902
64948
|
value: singleMinute,
|
|
64903
64949
|
onChange: (v) => setSingleMinute(v)
|
|
64904
64950
|
}),
|
|
64905
|
-
(0,
|
|
64951
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64906
64952
|
mode: "range",
|
|
64907
64953
|
precision: "day",
|
|
64908
64954
|
value: rangeDay,
|
|
64909
64955
|
onChange: (v) => setRangeDay(v)
|
|
64910
64956
|
}),
|
|
64911
|
-
(0,
|
|
64957
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64912
64958
|
mode: "range",
|
|
64913
64959
|
precision: "second",
|
|
64914
64960
|
value: rangeSecond,
|
|
64915
64961
|
onChange: (v) => setRangeSecond(v)
|
|
64916
64962
|
}),
|
|
64917
|
-
(0,
|
|
64963
|
+
(0, import_react80.createElement)(DateTimePicker, {
|
|
64918
64964
|
precision: "minute",
|
|
64919
64965
|
value: singleMinute,
|
|
64920
64966
|
onChange: (v) => setSingleMinute(v),
|
|
@@ -64922,13 +64968,13 @@ function DateTimePage() {
|
|
|
64922
64968
|
})
|
|
64923
64969
|
)
|
|
64924
64970
|
),
|
|
64925
|
-
(0,
|
|
64926
|
-
(0,
|
|
64971
|
+
(0, import_react80.createElement)(DocCode, { id: "datetime-picker" }),
|
|
64972
|
+
(0, import_react80.createElement)(DocApi, { id: "datetime-picker" })
|
|
64927
64973
|
);
|
|
64928
64974
|
}
|
|
64929
64975
|
|
|
64930
64976
|
// packages/demo/src/sections/blocks.tsx
|
|
64931
|
-
var
|
|
64977
|
+
var import_react81 = require("react");
|
|
64932
64978
|
var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
64933
64979
|
|
|
64934
64980
|
// packages/demo/src/samples.ts
|
|
@@ -65029,13 +65075,13 @@ var CODE_BLOCKS_USAGE = `pnpm add dsh-plugin-core
|
|
|
65029
65075
|
import { openFilePreview, pickWorkspaceFile } from 'dsh-plugin-core/explorer'
|
|
65030
65076
|
import { openSessionView, SessionViewModal } from 'dsh-plugin-core/session'`;
|
|
65031
65077
|
function useExplorerHost() {
|
|
65032
|
-
const { workspaceFiles: workspaceFiles2, officeToPdf } = (0,
|
|
65033
|
-
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);
|
|
65034
65080
|
const anchor = pickWorkspaceAnchor(wsItems);
|
|
65035
65081
|
return { workspaceFiles: workspaceFiles2, officeToPdf, anchor, workspaceNames: wsItems.map((w) => w.title) };
|
|
65036
65082
|
}
|
|
65037
65083
|
function NotReady(props) {
|
|
65038
|
-
return (0,
|
|
65084
|
+
return (0, import_react81.createElement)(
|
|
65039
65085
|
"div",
|
|
65040
65086
|
{ style: { fontSize: "13px", color: "var(--dshpc-fg-3)" } },
|
|
65041
65087
|
t3(props.which === "files" ? "explorerFilesNone" : "explorerAnchorNone")
|
|
@@ -65043,12 +65089,12 @@ function NotReady(props) {
|
|
|
65043
65089
|
}
|
|
65044
65090
|
function OpenPreviewDemo() {
|
|
65045
65091
|
const { workspaceFiles: workspaceFiles2, anchor, workspaceNames } = useExplorerHost();
|
|
65046
|
-
const [samples, setSamples] = (0,
|
|
65047
|
-
const [phase, setPhase] = (0,
|
|
65048
|
-
const [last2, setLast] = (0,
|
|
65049
|
-
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);
|
|
65050
65096
|
const sessionId = anchor === null ? null : anchor.sessionId;
|
|
65051
|
-
(0,
|
|
65097
|
+
(0, import_react81.useEffect)(() => {
|
|
65052
65098
|
if (workspaceFiles2 === null || sessionId === null) return;
|
|
65053
65099
|
if (pending.current !== null) return;
|
|
65054
65100
|
setPhase("probing");
|
|
@@ -65058,8 +65104,8 @@ function OpenPreviewDemo() {
|
|
|
65058
65104
|
return s;
|
|
65059
65105
|
});
|
|
65060
65106
|
}, [workspaceFiles2, sessionId]);
|
|
65061
|
-
if (workspaceFiles2 === null) return (0,
|
|
65062
|
-
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" });
|
|
65063
65109
|
const open = (path, rootName, workspaces) => {
|
|
65064
65110
|
const mount = pageRow.element;
|
|
65065
65111
|
if (mount === null) {
|
|
@@ -65075,14 +65121,14 @@ function OpenPreviewDemo() {
|
|
|
65075
65121
|
if (s !== null) open(pick2(s), anchor.title);
|
|
65076
65122
|
});
|
|
65077
65123
|
};
|
|
65078
|
-
return (0,
|
|
65124
|
+
return (0, import_react81.createElement)(
|
|
65079
65125
|
"div",
|
|
65080
65126
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "center" } },
|
|
65081
|
-
(0,
|
|
65082
|
-
(0,
|
|
65083
|
-
(0,
|
|
65084
|
-
last2 === null ? null : (0,
|
|
65085
|
-
(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)(
|
|
65086
65132
|
"div",
|
|
65087
65133
|
{ style: { fontSize: "12px", color: "var(--dshpc-fg-3)", width: "100%" } },
|
|
65088
65134
|
`${t3("explorerAnchorLabel")}${anchor.title} \xB7 ${t3("explorerSessionLabel")}${anchor.sessionId} \xB7 ${t3("explorerWorkspaces")}${String(workspaceNames.length)}`
|
|
@@ -65091,9 +65137,9 @@ function OpenPreviewDemo() {
|
|
|
65091
65137
|
}
|
|
65092
65138
|
function PickFileDemo() {
|
|
65093
65139
|
const { workspaceFiles: workspaceFiles2, anchor } = useExplorerHost();
|
|
65094
|
-
const [picked, setPicked] = (0,
|
|
65095
|
-
if (workspaceFiles2 === null) return (0,
|
|
65096
|
-
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" });
|
|
65097
65143
|
const pick2 = (anchorBtn, filter2) => {
|
|
65098
65144
|
void pickWorkspaceFile({
|
|
65099
65145
|
anchor: anchorBtn,
|
|
@@ -65102,10 +65148,10 @@ function PickFileDemo() {
|
|
|
65102
65148
|
// 目录补尾斜杠只补一次:根 `/`、盘符 `C:/` 自己就带着,再补就成了 `//` / `C://`。
|
|
65103
65149
|
}).then((r2) => setPicked(r2 === null ? null : r2.path + (r2.isDir && !r2.path.endsWith("/") ? "/" : "")));
|
|
65104
65150
|
};
|
|
65105
|
-
return (0,
|
|
65151
|
+
return (0, import_react81.createElement)(
|
|
65106
65152
|
"div",
|
|
65107
65153
|
{ style: { display: "flex", gap: "12px", flexWrap: "wrap", alignItems: "center" } },
|
|
65108
|
-
(0,
|
|
65154
|
+
(0, import_react81.createElement)(
|
|
65109
65155
|
Button,
|
|
65110
65156
|
{
|
|
65111
65157
|
variant: "primary",
|
|
@@ -65113,7 +65159,7 @@ function PickFileDemo() {
|
|
|
65113
65159
|
},
|
|
65114
65160
|
t3("pickAny")
|
|
65115
65161
|
),
|
|
65116
|
-
(0,
|
|
65162
|
+
(0, import_react81.createElement)(
|
|
65117
65163
|
Button,
|
|
65118
65164
|
{
|
|
65119
65165
|
variant: "secondary",
|
|
@@ -65122,7 +65168,7 @@ function PickFileDemo() {
|
|
|
65122
65168
|
t3("pickJsMd")
|
|
65123
65169
|
),
|
|
65124
65170
|
// 需求一(2026-11-03):只选文件夹 —— 文件不渲染,目录行尾「选择」+ 面包屑行「选择此文件夹」。
|
|
65125
|
-
(0,
|
|
65171
|
+
(0, import_react81.createElement)(
|
|
65126
65172
|
Button,
|
|
65127
65173
|
{
|
|
65128
65174
|
variant: "outline",
|
|
@@ -65130,16 +65176,16 @@ function PickFileDemo() {
|
|
|
65130
65176
|
},
|
|
65131
65177
|
t3("pickDir")
|
|
65132
65178
|
),
|
|
65133
|
-
(0,
|
|
65179
|
+
(0, import_react81.createElement)("code", { style: { fontSize: "12px" } }, picked === null ? t3("pickNone") : `${t3("pickResult")}${picked}`)
|
|
65134
65180
|
);
|
|
65135
65181
|
}
|
|
65136
65182
|
function RealSessionListDemo() {
|
|
65137
|
-
const state = (0,
|
|
65138
|
-
const files = (0,
|
|
65139
|
-
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);
|
|
65140
65186
|
const anchor = pickWorkspaceAnchor(wsItems);
|
|
65141
|
-
const [openId, setOpenId] = (0,
|
|
65142
|
-
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]);
|
|
65143
65189
|
const workspaceFiles2 = files.workspaceFiles;
|
|
65144
65190
|
const canOpenFile = workspaceFiles2 !== null && anchor !== null;
|
|
65145
65191
|
const openLinkedFile = (path, sessionId) => {
|
|
@@ -65165,7 +65211,7 @@ function RealSessionListDemo() {
|
|
|
65165
65211
|
mount,
|
|
65166
65212
|
sessionId: loc.sessionId,
|
|
65167
65213
|
path: "",
|
|
65168
|
-
content: () => (0,
|
|
65214
|
+
content: () => (0, import_react81.createElement)(ChangedFileDiff, {
|
|
65169
65215
|
sessionId: loc.sessionId,
|
|
65170
65216
|
seq: loc.seq,
|
|
65171
65217
|
index: loc.index,
|
|
@@ -65178,16 +65224,16 @@ function RealSessionListDemo() {
|
|
|
65178
65224
|
});
|
|
65179
65225
|
};
|
|
65180
65226
|
if (state.status !== "ready") {
|
|
65181
|
-
return (0,
|
|
65227
|
+
return (0, import_react81.createElement)("p", { style: { fontSize: "13px", opacity: 0.8 } }, t3("sessionListUnavailable"));
|
|
65182
65228
|
}
|
|
65183
65229
|
if (state.rows.length === 0) {
|
|
65184
|
-
return (0,
|
|
65230
|
+
return (0, import_react81.createElement)("p", { style: { fontSize: "13px", opacity: 0.8 } }, t3("sessionListEmpty"));
|
|
65185
65231
|
}
|
|
65186
|
-
return (0,
|
|
65232
|
+
return (0, import_react81.createElement)(
|
|
65187
65233
|
"div",
|
|
65188
65234
|
{ style: { display: "flex", flexDirection: "column", gap: "6px", maxWidth: "720px" } },
|
|
65189
65235
|
...state.rows.map(
|
|
65190
|
-
(row) => (0,
|
|
65236
|
+
(row) => (0, import_react81.createElement)(
|
|
65191
65237
|
"button",
|
|
65192
65238
|
{
|
|
65193
65239
|
key: row.sessionId,
|
|
@@ -65210,22 +65256,22 @@ function RealSessionListDemo() {
|
|
|
65210
65256
|
cursor: "pointer"
|
|
65211
65257
|
}
|
|
65212
65258
|
},
|
|
65213
|
-
(0,
|
|
65214
|
-
row.running ? (0,
|
|
65215
|
-
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)(
|
|
65216
65262
|
Chip,
|
|
65217
65263
|
{ size: "xs" },
|
|
65218
|
-
(0,
|
|
65264
|
+
(0, import_react81.createElement)(
|
|
65219
65265
|
"span",
|
|
65220
65266
|
{ style: { display: "inline-flex", alignItems: "center", gap: "4px" } },
|
|
65221
|
-
(0,
|
|
65267
|
+
(0, import_react81.createElement)(import_dsh_client_ui_primitives3.IconArchiveOutlineRegular, { size: 12 }),
|
|
65222
65268
|
t3("sessionListArchived")
|
|
65223
65269
|
)
|
|
65224
65270
|
) : null,
|
|
65225
|
-
(0,
|
|
65271
|
+
(0, import_react81.createElement)("span", { style: { flex: "none", fontSize: "12px", color: "var(--dshpc-fg-3)" } }, formatDateTime(new Date(row.updatedAt).toISOString()))
|
|
65226
65272
|
)
|
|
65227
65273
|
),
|
|
65228
|
-
openId !== null && view !== null ? (0,
|
|
65274
|
+
openId !== null && view !== null ? (0, import_react81.createElement)(SessionViewModal, {
|
|
65229
65275
|
sessionId: openId,
|
|
65230
65276
|
view,
|
|
65231
65277
|
// 标题 = 会话自己的标题;归档态分化「继续对话」行为(开分支确认 vs 直跳官方)。
|
|
@@ -65251,40 +65297,40 @@ function RealSessionListDemo() {
|
|
|
65251
65297
|
);
|
|
65252
65298
|
}
|
|
65253
65299
|
function ExplorerPage() {
|
|
65254
|
-
return (0,
|
|
65300
|
+
return (0, import_react81.createElement)(
|
|
65255
65301
|
"div",
|
|
65256
65302
|
null,
|
|
65257
|
-
(0,
|
|
65258
|
-
(0,
|
|
65303
|
+
(0, import_react81.createElement)(DocProse, { id: "explorer" }),
|
|
65304
|
+
(0, import_react81.createElement)(
|
|
65259
65305
|
Example,
|
|
65260
65306
|
{ title: t3("methodATitle"), hint: t3("methodAHint"), code: CODE_OPEN },
|
|
65261
|
-
(0,
|
|
65307
|
+
(0, import_react81.createElement)(OpenPreviewDemo, null)
|
|
65262
65308
|
),
|
|
65263
|
-
(0,
|
|
65309
|
+
(0, import_react81.createElement)(
|
|
65264
65310
|
Example,
|
|
65265
65311
|
{ title: t3("methodBTitle"), hint: t3("methodBHint"), code: CODE_PICK },
|
|
65266
|
-
(0,
|
|
65312
|
+
(0, import_react81.createElement)(PickFileDemo, null)
|
|
65267
65313
|
),
|
|
65268
|
-
(0,
|
|
65269
|
-
(0,
|
|
65314
|
+
(0, import_react81.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_BLOCKS_USAGE }),
|
|
65315
|
+
(0, import_react81.createElement)(DocApi, { id: "explorer" })
|
|
65270
65316
|
);
|
|
65271
65317
|
}
|
|
65272
65318
|
function SessionPage() {
|
|
65273
|
-
return (0,
|
|
65319
|
+
return (0, import_react81.createElement)(
|
|
65274
65320
|
"div",
|
|
65275
65321
|
null,
|
|
65276
|
-
(0,
|
|
65277
|
-
(0,
|
|
65322
|
+
(0, import_react81.createElement)(DocProse, { id: "session" }),
|
|
65323
|
+
(0, import_react81.createElement)(
|
|
65278
65324
|
Example,
|
|
65279
65325
|
{ title: t3("sessionRealTitle"), hint: t3("sessionRealHint"), code: CODE_SESSION_REAL },
|
|
65280
|
-
(0,
|
|
65326
|
+
(0, import_react81.createElement)(RealSessionListDemo, null)
|
|
65281
65327
|
),
|
|
65282
|
-
(0,
|
|
65328
|
+
(0, import_react81.createElement)(DocApi, { id: "session" })
|
|
65283
65329
|
);
|
|
65284
65330
|
}
|
|
65285
65331
|
|
|
65286
65332
|
// packages/demo/src/sections/tables.tsx
|
|
65287
|
-
var
|
|
65333
|
+
var import_react82 = require("react");
|
|
65288
65334
|
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
65289
65335
|
var H_SCROLL = { overflowX: "auto", borderBottom: "1px solid transparent" };
|
|
65290
65336
|
var COLUMNS = [
|
|
@@ -65329,10 +65375,10 @@ var PEOPLE = [
|
|
|
65329
65375
|
{ id: "S-2429", name: "Deng, Qian", mrn: "MRN-61248", age: "33 / F", date: "2026-10-19", modality: "US", flags: [], tone: "success", state: "Reviewed" }
|
|
65330
65376
|
];
|
|
65331
65377
|
function personCell(person) {
|
|
65332
|
-
return (0,
|
|
65378
|
+
return (0, import_react82.createElement)(
|
|
65333
65379
|
"div",
|
|
65334
65380
|
{ style: { display: "flex", alignItems: "center", gap: "8px", minWidth: 0 } },
|
|
65335
|
-
(0,
|
|
65381
|
+
(0, import_react82.createElement)(
|
|
65336
65382
|
"div",
|
|
65337
65383
|
{
|
|
65338
65384
|
style: {
|
|
@@ -65351,11 +65397,11 @@ function personCell(person) {
|
|
|
65351
65397
|
},
|
|
65352
65398
|
person.name.slice(0, 1)
|
|
65353
65399
|
),
|
|
65354
|
-
(0,
|
|
65400
|
+
(0, import_react82.createElement)(
|
|
65355
65401
|
"div",
|
|
65356
65402
|
{ style: { display: "flex", flexDirection: "column", minWidth: 0 } },
|
|
65357
|
-
(0,
|
|
65358
|
-
(0,
|
|
65403
|
+
(0, import_react82.createElement)("span", null, person.name),
|
|
65404
|
+
(0, import_react82.createElement)(
|
|
65359
65405
|
"span",
|
|
65360
65406
|
{ style: { fontSize: "var(--dshpc-font-xs)", color: "var(--dshpc-fg-3)" } },
|
|
65361
65407
|
person.mrn
|
|
@@ -65364,8 +65410,8 @@ function personCell(person) {
|
|
|
65364
65410
|
);
|
|
65365
65411
|
}
|
|
65366
65412
|
function rowsOf() {
|
|
65367
|
-
const actions2 = (0,
|
|
65368
|
-
icon: (0,
|
|
65413
|
+
const actions2 = (0, import_react82.createElement)(IconButton, {
|
|
65414
|
+
icon: (0, import_react82.createElement)(import_dsh_client_ui_primitives4.IconChevronDownOutlineRegular, { size: 16 }),
|
|
65369
65415
|
label: "Open study"
|
|
65370
65416
|
});
|
|
65371
65417
|
return PEOPLE.map((person) => ({
|
|
@@ -65375,13 +65421,13 @@ function rowsOf() {
|
|
|
65375
65421
|
name: personCell(person),
|
|
65376
65422
|
age: person.age,
|
|
65377
65423
|
date: person.date,
|
|
65378
|
-
modality: (0,
|
|
65424
|
+
modality: (0, import_react82.createElement)(Chip, { tone: MODALITY_TONE[person.modality], size: "xs" }, person.modality),
|
|
65379
65425
|
// 多标签:标签之间的间距由调用方布局控制(这里 4px),列内距走列级 padding:8
|
|
65380
|
-
flags: person.flags.length === 0 ? null : (0,
|
|
65426
|
+
flags: person.flags.length === 0 ? null : (0, import_react82.createElement)(
|
|
65381
65427
|
"div",
|
|
65382
65428
|
{ style: { display: "flex", gap: "4px", flexWrap: "wrap" } },
|
|
65383
65429
|
...person.flags.map(
|
|
65384
|
-
(flag) => (0,
|
|
65430
|
+
(flag) => (0, import_react82.createElement)(
|
|
65385
65431
|
Chip,
|
|
65386
65432
|
{
|
|
65387
65433
|
key: flag,
|
|
@@ -65392,7 +65438,7 @@ function rowsOf() {
|
|
|
65392
65438
|
)
|
|
65393
65439
|
)
|
|
65394
65440
|
),
|
|
65395
|
-
status: (0,
|
|
65441
|
+
status: (0, import_react82.createElement)(Chip, { tone: person.tone, size: "xs" }, person.state),
|
|
65396
65442
|
actions: actions2
|
|
65397
65443
|
}
|
|
65398
65444
|
}));
|
|
@@ -65457,24 +65503,24 @@ var GROUPS = WORKSPACES.map((workspace) => ({
|
|
|
65457
65503
|
cells: {
|
|
65458
65504
|
task: task.title,
|
|
65459
65505
|
owner: task.owner,
|
|
65460
|
-
state: (0,
|
|
65506
|
+
state: (0, import_react82.createElement)(Chip, { tone: task.tone, size: "xs" }, task.state),
|
|
65461
65507
|
updated: task.updated
|
|
65462
65508
|
}
|
|
65463
65509
|
}))
|
|
65464
65510
|
}));
|
|
65465
65511
|
function TablePage() {
|
|
65466
|
-
const [selected, setSelected] = (0,
|
|
65467
|
-
const [spanSelected, setSpanSelected] = (0,
|
|
65468
|
-
const [groupSelected, setGroupSelected] = (0,
|
|
65469
|
-
const [groupAccentOn, setGroupAccentOn] = (0,
|
|
65470
|
-
const [groupAccent, setGroupAccent] = (0,
|
|
65471
|
-
const [pagerPage, setPagerPage] = (0,
|
|
65472
|
-
const [pagerSize, setPagerSize] = (0,
|
|
65473
|
-
const [demoPage, setDemoPage] = (0,
|
|
65474
|
-
const [demoSize, setDemoSize] = (0,
|
|
65475
|
-
const [demoAlign, setDemoAlign] = (0,
|
|
65476
|
-
const [demoShowTotal, setDemoShowTotal] = (0,
|
|
65477
|
-
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");
|
|
65478
65524
|
const loadColumns = [
|
|
65479
65525
|
{ key: "name", title: "Patient", width: 240 },
|
|
65480
65526
|
{ key: "date", title: "Date", width: 120 },
|
|
@@ -65485,7 +65531,7 @@ function TablePage() {
|
|
|
65485
65531
|
cells: {
|
|
65486
65532
|
name: personCell(person),
|
|
65487
65533
|
date: person.date,
|
|
65488
|
-
modality: (0,
|
|
65534
|
+
modality: (0, import_react82.createElement)(Chip, { tone: MODALITY_TONE[person.modality], size: "xs" }, person.modality)
|
|
65489
65535
|
}
|
|
65490
65536
|
}));
|
|
65491
65537
|
const pagerOnChange = (page, size4) => {
|
|
@@ -65496,7 +65542,7 @@ function TablePage() {
|
|
|
65496
65542
|
setDemoPage(page);
|
|
65497
65543
|
setDemoSize(size4);
|
|
65498
65544
|
};
|
|
65499
|
-
const renderLoadTable = (borders) => (0,
|
|
65545
|
+
const renderLoadTable = (borders) => (0, import_react82.createElement)(Table, {
|
|
65500
65546
|
columns: loadColumns,
|
|
65501
65547
|
rows: loadState === "loading" ? [] : loadRows,
|
|
65502
65548
|
borders,
|
|
@@ -65510,19 +65556,19 @@ function TablePage() {
|
|
|
65510
65556
|
ariaLabel: "Patients loaded incrementally",
|
|
65511
65557
|
style: { maxWidth: "640px" }
|
|
65512
65558
|
});
|
|
65513
|
-
return (0,
|
|
65559
|
+
return (0, import_react82.createElement)(
|
|
65514
65560
|
"div",
|
|
65515
65561
|
null,
|
|
65516
|
-
(0,
|
|
65562
|
+
(0, import_react82.createElement)(DocProse, { id: "table" }),
|
|
65517
65563
|
// 表格较宽:示例区占满整栏(代码放页面底部),并在窄屏时横向滚动。
|
|
65518
65564
|
// 空态不放成第二个示例 —— 直接接在主表下方,同一区块里展示「有数据 / 没数据」。
|
|
65519
|
-
(0,
|
|
65565
|
+
(0, import_react82.createElement)(
|
|
65520
65566
|
Example,
|
|
65521
65567
|
{ title: "Table", hint: t3("tableHint") },
|
|
65522
|
-
(0,
|
|
65568
|
+
(0, import_react82.createElement)(
|
|
65523
65569
|
"div",
|
|
65524
65570
|
{ style: H_SCROLL },
|
|
65525
|
-
(0,
|
|
65571
|
+
(0, import_react82.createElement)(Table, {
|
|
65526
65572
|
columns: COLUMNS,
|
|
65527
65573
|
rows: rowsOf(),
|
|
65528
65574
|
striped: true,
|
|
@@ -65534,10 +65580,10 @@ function TablePage() {
|
|
|
65534
65580
|
style: { minWidth: 960 }
|
|
65535
65581
|
})
|
|
65536
65582
|
),
|
|
65537
|
-
(0,
|
|
65583
|
+
(0, import_react82.createElement)(
|
|
65538
65584
|
"div",
|
|
65539
65585
|
{ style: { ...H_SCROLL, marginTop: "16px" } },
|
|
65540
|
-
(0,
|
|
65586
|
+
(0, import_react82.createElement)(Table, {
|
|
65541
65587
|
columns: COLUMNS,
|
|
65542
65588
|
rows: [],
|
|
65543
65589
|
borders: "all",
|
|
@@ -65546,13 +65592,13 @@ function TablePage() {
|
|
|
65546
65592
|
})
|
|
65547
65593
|
)
|
|
65548
65594
|
),
|
|
65549
|
-
(0,
|
|
65595
|
+
(0, import_react82.createElement)(
|
|
65550
65596
|
Example,
|
|
65551
65597
|
{ title: "Density \xB7 borders \xB7 spans", hint: t3("tableSpanHint") },
|
|
65552
|
-
(0,
|
|
65598
|
+
(0, import_react82.createElement)(
|
|
65553
65599
|
"div",
|
|
65554
65600
|
{ style: H_SCROLL },
|
|
65555
|
-
(0,
|
|
65601
|
+
(0, import_react82.createElement)(Table, {
|
|
65556
65602
|
columns: SPAN_COLUMNS,
|
|
65557
65603
|
rows: SPAN_ROWS,
|
|
65558
65604
|
density: "compact",
|
|
@@ -65564,13 +65610,13 @@ function TablePage() {
|
|
|
65564
65610
|
})
|
|
65565
65611
|
)
|
|
65566
65612
|
),
|
|
65567
|
-
(0,
|
|
65613
|
+
(0, import_react82.createElement)(
|
|
65568
65614
|
Example,
|
|
65569
65615
|
{ title: "Groups \xB7 \u901A\u680F", hint: t3("tableGroupHint") },
|
|
65570
|
-
(0,
|
|
65616
|
+
(0, import_react82.createElement)(
|
|
65571
65617
|
"div",
|
|
65572
65618
|
{ style: { display: "flex", gap: "12px", alignItems: "center", flexWrap: "wrap" } },
|
|
65573
|
-
(0,
|
|
65619
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65574
65620
|
size: "sm",
|
|
65575
65621
|
items: [
|
|
65576
65622
|
{ value: "default", label: "\u9ED8\u8BA4" },
|
|
@@ -65581,12 +65627,12 @@ function TablePage() {
|
|
|
65581
65627
|
value: groupAccent,
|
|
65582
65628
|
onChange: setGroupAccent
|
|
65583
65629
|
}),
|
|
65584
|
-
(0,
|
|
65630
|
+
(0, import_react82.createElement)(Checkbox, { checked: groupAccentOn, onChange: setGroupAccentOn, label: "groupAccent" })
|
|
65585
65631
|
),
|
|
65586
|
-
(0,
|
|
65632
|
+
(0, import_react82.createElement)(
|
|
65587
65633
|
"div",
|
|
65588
65634
|
{ style: { ...H_SCROLL, marginTop: "12px" } },
|
|
65589
|
-
(0,
|
|
65635
|
+
(0, import_react82.createElement)(Table, {
|
|
65590
65636
|
columns: GROUP_COLUMNS,
|
|
65591
65637
|
groups: GROUPS,
|
|
65592
65638
|
groupAccent: groupAccentOn ? groupAccent : false,
|
|
@@ -65597,13 +65643,13 @@ function TablePage() {
|
|
|
65597
65643
|
})
|
|
65598
65644
|
)
|
|
65599
65645
|
),
|
|
65600
|
-
(0,
|
|
65646
|
+
(0, import_react82.createElement)(
|
|
65601
65647
|
Example,
|
|
65602
65648
|
{ title: "Pagination", hint: t3("paginationHint") },
|
|
65603
|
-
(0,
|
|
65649
|
+
(0, import_react82.createElement)(
|
|
65604
65650
|
"div",
|
|
65605
65651
|
{ style: { display: "flex", gap: "12px", alignItems: "center", flexWrap: "wrap" } },
|
|
65606
|
-
(0,
|
|
65652
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65607
65653
|
size: "sm",
|
|
65608
65654
|
items: [
|
|
65609
65655
|
{ value: "left", label: "\u5DE6" },
|
|
@@ -65613,12 +65659,12 @@ function TablePage() {
|
|
|
65613
65659
|
value: demoAlign,
|
|
65614
65660
|
onChange: setDemoAlign
|
|
65615
65661
|
}),
|
|
65616
|
-
(0,
|
|
65662
|
+
(0, import_react82.createElement)(Checkbox, { checked: demoShowTotal, onChange: setDemoShowTotal, label: "showTotal" })
|
|
65617
65663
|
),
|
|
65618
|
-
(0,
|
|
65664
|
+
(0, import_react82.createElement)(
|
|
65619
65665
|
"div",
|
|
65620
65666
|
{ style: { marginTop: "12px" } },
|
|
65621
|
-
(0,
|
|
65667
|
+
(0, import_react82.createElement)(Pagination, {
|
|
65622
65668
|
page: demoPage,
|
|
65623
65669
|
pageSize: demoSize,
|
|
65624
65670
|
total: 86,
|
|
@@ -65630,10 +65676,10 @@ function TablePage() {
|
|
|
65630
65676
|
ariaLabel: "Demo pagination"
|
|
65631
65677
|
})
|
|
65632
65678
|
),
|
|
65633
|
-
(0,
|
|
65679
|
+
(0, import_react82.createElement)(
|
|
65634
65680
|
"div",
|
|
65635
65681
|
{ style: { marginTop: "12px" } },
|
|
65636
|
-
(0,
|
|
65682
|
+
(0, import_react82.createElement)(Pagination, {
|
|
65637
65683
|
page: demoPage,
|
|
65638
65684
|
pageSize: demoSize,
|
|
65639
65685
|
total: 86,
|
|
@@ -65644,13 +65690,13 @@ function TablePage() {
|
|
|
65644
65690
|
})
|
|
65645
65691
|
)
|
|
65646
65692
|
),
|
|
65647
|
-
(0,
|
|
65693
|
+
(0, import_react82.createElement)(
|
|
65648
65694
|
Example,
|
|
65649
65695
|
{ title: "Table \xB7 \u5206\u9875", hint: t3("tablePagerHint") },
|
|
65650
|
-
(0,
|
|
65696
|
+
(0, import_react82.createElement)(
|
|
65651
65697
|
"div",
|
|
65652
65698
|
{ style: H_SCROLL },
|
|
65653
|
-
(0,
|
|
65699
|
+
(0, import_react82.createElement)(Table, {
|
|
65654
65700
|
columns: COLUMNS,
|
|
65655
65701
|
// 不传 pagination.total ⇒ 本地分页:这里是全量 12 行,Table 自己按当前页切片
|
|
65656
65702
|
rows: rowsOf(),
|
|
@@ -65667,10 +65713,10 @@ function TablePage() {
|
|
|
65667
65713
|
})
|
|
65668
65714
|
)
|
|
65669
65715
|
),
|
|
65670
|
-
(0,
|
|
65716
|
+
(0, import_react82.createElement)(
|
|
65671
65717
|
Example,
|
|
65672
65718
|
{ title: "Loading \xB7 \u52A0\u8F7D\u66F4\u591A", hint: t3("tableLoadingHint") },
|
|
65673
|
-
(0,
|
|
65719
|
+
(0, import_react82.createElement)(Segmented, {
|
|
65674
65720
|
size: "sm",
|
|
65675
65721
|
items: [
|
|
65676
65722
|
{ value: "idle", label: "\u6B63\u5E38" },
|
|
@@ -65681,7 +65727,7 @@ function TablePage() {
|
|
|
65681
65727
|
value: loadState,
|
|
65682
65728
|
onChange: setLoadState
|
|
65683
65729
|
}),
|
|
65684
|
-
(0,
|
|
65730
|
+
(0, import_react82.createElement)(
|
|
65685
65731
|
"div",
|
|
65686
65732
|
{
|
|
65687
65733
|
style: {
|
|
@@ -65696,13 +65742,13 @@ function TablePage() {
|
|
|
65696
65742
|
renderLoadTable("y")
|
|
65697
65743
|
)
|
|
65698
65744
|
),
|
|
65699
|
-
(0,
|
|
65700
|
-
(0,
|
|
65745
|
+
(0, import_react82.createElement)(DocApi, { id: "table" }),
|
|
65746
|
+
(0, import_react82.createElement)(DocCode, { id: "table" })
|
|
65701
65747
|
);
|
|
65702
65748
|
}
|
|
65703
65749
|
|
|
65704
65750
|
// packages/demo/src/sections/toolbar.tsx
|
|
65705
|
-
var
|
|
65751
|
+
var import_react83 = require("react");
|
|
65706
65752
|
var import_dsh_client_ui_primitives5 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
65707
65753
|
var ANCHOR_ID = "dshpc-demo-quick-toolbar-anchor";
|
|
65708
65754
|
var CODE_TOOLBAR = `import { QuickToolbar } from 'dsh-plugin-core/ui'
|
|
@@ -65717,23 +65763,23 @@ h(QuickToolbar, {
|
|
|
65717
65763
|
backToTop: { threshold: 320 }, // \u9ED8\u8BA4\u5373\u662F 320\uFF1Bfalse \u53EF\u5173\u6389
|
|
65718
65764
|
})`;
|
|
65719
65765
|
function ToolbarPage() {
|
|
65720
|
-
const [mode, setMode] = (0,
|
|
65721
|
-
const [last2, setLast] = (0,
|
|
65722
|
-
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)(
|
|
65723
65769
|
"div",
|
|
65724
65770
|
null,
|
|
65725
|
-
(0,
|
|
65726
|
-
(0,
|
|
65771
|
+
(0, import_react83.createElement)(DocProse, { id: "quick-toolbar" }),
|
|
65772
|
+
(0, import_react83.createElement)(
|
|
65727
65773
|
Example,
|
|
65728
65774
|
{
|
|
65729
65775
|
title: "QuickToolbar\uFF08\u53F3\u4FA7\u6D6E\u52A8\uFF09",
|
|
65730
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",
|
|
65731
65777
|
code: CODE_TOOLBAR
|
|
65732
65778
|
},
|
|
65733
|
-
(0,
|
|
65779
|
+
(0, import_react83.createElement)(
|
|
65734
65780
|
"div",
|
|
65735
65781
|
{ style: { display: "flex", flexDirection: "column", gap: "14px" } },
|
|
65736
|
-
(0,
|
|
65782
|
+
(0, import_react83.createElement)(Segmented, {
|
|
65737
65783
|
items: [
|
|
65738
65784
|
{ value: "box", label: "\u8DDF\u968F\u63A7\u4EF6" },
|
|
65739
65785
|
{ value: "window", label: "\u8DDF\u968F\u7A97\u53E3" }
|
|
@@ -65742,10 +65788,10 @@ function ToolbarPage() {
|
|
|
65742
65788
|
onChange: setMode,
|
|
65743
65789
|
label: "\u6A2A\u5411\u951A\u70B9"
|
|
65744
65790
|
}),
|
|
65745
|
-
(0,
|
|
65791
|
+
(0, import_react83.createElement)(
|
|
65746
65792
|
"div",
|
|
65747
65793
|
{ id: ANCHOR_ID },
|
|
65748
|
-
(0,
|
|
65794
|
+
(0, import_react83.createElement)(
|
|
65749
65795
|
Surface,
|
|
65750
65796
|
{
|
|
65751
65797
|
tone: "sunken",
|
|
@@ -65753,15 +65799,15 @@ function ToolbarPage() {
|
|
|
65753
65799
|
padding: "lg",
|
|
65754
65800
|
style: { width: "min(560px, 100%)" }
|
|
65755
65801
|
},
|
|
65756
|
-
(0,
|
|
65757
|
-
(0,
|
|
65802
|
+
(0, import_react83.createElement)("div", { style: { fontWeight: 600, fontSize: "13px" } }, "\u951A\u5B9A\u63A7\u4EF6"),
|
|
65803
|
+
(0, import_react83.createElement)(
|
|
65758
65804
|
"div",
|
|
65759
65805
|
{ style: { marginTop: "6px", color: "var(--dshpc-fg-3)", fontSize: "12px", lineHeight: "1.8" } },
|
|
65760
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"
|
|
65761
65807
|
)
|
|
65762
65808
|
)
|
|
65763
65809
|
),
|
|
65764
|
-
(0,
|
|
65810
|
+
(0, import_react83.createElement)(
|
|
65765
65811
|
Surface,
|
|
65766
65812
|
{
|
|
65767
65813
|
border: "dashed",
|
|
@@ -65777,19 +65823,19 @@ function ToolbarPage() {
|
|
|
65777
65823
|
},
|
|
65778
65824
|
"\u5411\u4E0B\u6EDA\u52A8\uFF0C\u56DE\u9876\u90E8\u6309\u94AE\u4F1A\u51FA\u73B0"
|
|
65779
65825
|
),
|
|
65780
|
-
(0,
|
|
65826
|
+
(0, import_react83.createElement)("div", { style: { color: "var(--dshpc-fg-3)", fontSize: "12px" } }, `\u6700\u8FD1\u4E00\u6B21\u70B9\u51FB\uFF1A${last2}`)
|
|
65781
65827
|
)
|
|
65782
65828
|
),
|
|
65783
|
-
(0,
|
|
65784
|
-
(0,
|
|
65829
|
+
(0, import_react83.createElement)(DocApi, { id: "quick-toolbar" }),
|
|
65830
|
+
(0, import_react83.createElement)(QuickToolbar, {
|
|
65785
65831
|
anchorId: mode === "box" ? ANCHOR_ID : void 0,
|
|
65786
65832
|
onAction: (id3) => setLast(id3),
|
|
65787
65833
|
items: [
|
|
65788
|
-
{ id: "search", icon: (0,
|
|
65789
|
-
{ 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" },
|
|
65790
65836
|
{
|
|
65791
65837
|
id: "sparkle",
|
|
65792
|
-
icon: (0,
|
|
65838
|
+
icon: (0, import_react83.createElement)(import_dsh_client_ui_primitives5.IconSparkleRegular, { size: 18 }),
|
|
65793
65839
|
label: "AI \u52A9\u624B",
|
|
65794
65840
|
color: "var(--dshpc-business)",
|
|
65795
65841
|
fgColor: "#fff"
|
|
@@ -65800,7 +65846,7 @@ function ToolbarPage() {
|
|
|
65800
65846
|
}
|
|
65801
65847
|
|
|
65802
65848
|
// packages/demo/src/sections/utils.tsx
|
|
65803
|
-
var
|
|
65849
|
+
var import_react84 = require("react");
|
|
65804
65850
|
var CODE_DATE = `// \u65E5\u671F\u65F6\u95F4\u683C\u5F0F\u5316\uFF08\u5168\u90E8\u8D70\u5F53\u524D locale\uFF09
|
|
65805
65851
|
formatDateTime('2026-10-18T09:30:05.000Z', { seconds: true }) // 2026-10-18 09:30:05
|
|
65806
65852
|
formatYmd('2026-10-18T09:30:05.000Z') // 2026-10-18
|
|
@@ -65835,28 +65881,28 @@ var NUMBER_ROWS = [
|
|
|
65835
65881
|
["formatBytes", formatBytes(125829)]
|
|
65836
65882
|
];
|
|
65837
65883
|
function FnTable(props) {
|
|
65838
|
-
return (0,
|
|
65884
|
+
return (0, import_react84.createElement)(
|
|
65839
65885
|
"table",
|
|
65840
65886
|
{ style: { borderCollapse: "collapse", fontSize: "13px" } },
|
|
65841
|
-
(0,
|
|
65887
|
+
(0, import_react84.createElement)(
|
|
65842
65888
|
"thead",
|
|
65843
65889
|
null,
|
|
65844
|
-
(0,
|
|
65890
|
+
(0, import_react84.createElement)(
|
|
65845
65891
|
"tr",
|
|
65846
65892
|
null,
|
|
65847
|
-
(0,
|
|
65848
|
-
(0,
|
|
65893
|
+
(0, import_react84.createElement)("th", { style: th }, "\u51FD\u6570"),
|
|
65894
|
+
(0, import_react84.createElement)("th", { style: th }, "\u8FD4\u56DE\u503C")
|
|
65849
65895
|
)
|
|
65850
65896
|
),
|
|
65851
|
-
(0,
|
|
65897
|
+
(0, import_react84.createElement)(
|
|
65852
65898
|
"tbody",
|
|
65853
65899
|
null,
|
|
65854
65900
|
props.rows.map(
|
|
65855
|
-
([fn, out]) => (0,
|
|
65901
|
+
([fn, out]) => (0, import_react84.createElement)(
|
|
65856
65902
|
"tr",
|
|
65857
65903
|
{ key: fn },
|
|
65858
|
-
(0,
|
|
65859
|
-
(0,
|
|
65904
|
+
(0, import_react84.createElement)("td", { style: td }, fn),
|
|
65905
|
+
(0, import_react84.createElement)("td", { style: td }, out)
|
|
65860
65906
|
)
|
|
65861
65907
|
)
|
|
65862
65908
|
)
|
|
@@ -65865,44 +65911,44 @@ function FnTable(props) {
|
|
|
65865
65911
|
var th = { textAlign: "left", padding: "6px 14px 6px 0", color: "var(--dshpc-fg-3)" };
|
|
65866
65912
|
var td = { padding: "5px 14px 5px 0", borderTop: "1px solid var(--dshpc-border-faint)" };
|
|
65867
65913
|
function DatePage() {
|
|
65868
|
-
return (0,
|
|
65914
|
+
return (0, import_react84.createElement)(
|
|
65869
65915
|
"div",
|
|
65870
65916
|
null,
|
|
65871
|
-
(0,
|
|
65872
|
-
(0,
|
|
65873
|
-
(0,
|
|
65874
|
-
(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" })
|
|
65875
65921
|
);
|
|
65876
65922
|
}
|
|
65877
65923
|
function NumberPage() {
|
|
65878
|
-
return (0,
|
|
65924
|
+
return (0, import_react84.createElement)(
|
|
65879
65925
|
"div",
|
|
65880
65926
|
null,
|
|
65881
|
-
(0,
|
|
65882
|
-
(0,
|
|
65883
|
-
(0,
|
|
65884
|
-
(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" })
|
|
65885
65931
|
);
|
|
65886
65932
|
}
|
|
65887
65933
|
function TextPage() {
|
|
65888
|
-
return (0,
|
|
65934
|
+
return (0, import_react84.createElement)(DocContent, { id: "text" });
|
|
65889
65935
|
}
|
|
65890
65936
|
function HttpPage() {
|
|
65891
|
-
return (0,
|
|
65937
|
+
return (0, import_react84.createElement)(DocContent, { id: "http" });
|
|
65892
65938
|
}
|
|
65893
65939
|
function I18nPage() {
|
|
65894
|
-
return (0,
|
|
65940
|
+
return (0, import_react84.createElement)(
|
|
65895
65941
|
"div",
|
|
65896
65942
|
null,
|
|
65897
|
-
(0,
|
|
65898
|
-
(0,
|
|
65943
|
+
(0, import_react84.createElement)(DocProse, { id: "i18n" }),
|
|
65944
|
+
(0, import_react84.createElement)(
|
|
65899
65945
|
Example,
|
|
65900
65946
|
{ title: "getLocale / setLocale", code: CODE_I18N },
|
|
65901
|
-
(0,
|
|
65947
|
+
(0, import_react84.createElement)(
|
|
65902
65948
|
"div",
|
|
65903
65949
|
{ style: { display: "flex", alignItems: "center", gap: "10px" } },
|
|
65904
|
-
(0,
|
|
65905
|
-
(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", {
|
|
65906
65952
|
style: {
|
|
65907
65953
|
fontFamily: "var(--dshpc-font-mono)",
|
|
65908
65954
|
fontSize: "13px",
|
|
@@ -65914,60 +65960,60 @@ function I18nPage() {
|
|
|
65914
65960
|
}, getLocale())
|
|
65915
65961
|
)
|
|
65916
65962
|
),
|
|
65917
|
-
(0,
|
|
65918
|
-
(0,
|
|
65963
|
+
(0, import_react84.createElement)(CodeOnly, { labelKey: "docUsage", code: CODE_UTILS_USAGE }),
|
|
65964
|
+
(0, import_react84.createElement)(DocApi, { id: "i18n" })
|
|
65919
65965
|
);
|
|
65920
65966
|
}
|
|
65921
65967
|
|
|
65922
65968
|
// packages/demo/src/sections/reference.tsx
|
|
65923
|
-
var
|
|
65969
|
+
var import_react85 = require("react");
|
|
65924
65970
|
var OUT_OF_SCOPE = ["roadmapOut", "roadmapMirror", "roadmapPreview", "roadmapSkeleton"];
|
|
65925
65971
|
function ReferencePage() {
|
|
65926
|
-
return (0,
|
|
65972
|
+
return (0, import_react85.createElement)(
|
|
65927
65973
|
"div",
|
|
65928
65974
|
null,
|
|
65929
|
-
(0,
|
|
65930
|
-
(0,
|
|
65931
|
-
(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)(
|
|
65932
65978
|
Example,
|
|
65933
65979
|
{ title: t3("secRoadmap"), hint: t3("roadmapHint") },
|
|
65934
|
-
(0,
|
|
65980
|
+
(0, import_react85.createElement)(
|
|
65935
65981
|
"div",
|
|
65936
65982
|
{ style: { display: "flex", flexDirection: "column", gap: "10px" } },
|
|
65937
65983
|
OUT_OF_SCOPE.map(
|
|
65938
|
-
(key) => (0,
|
|
65984
|
+
(key) => (0, import_react85.createElement)(
|
|
65939
65985
|
"div",
|
|
65940
65986
|
{ key, style: { display: "flex", gap: "8px", alignItems: "flex-start", fontSize: "13px" } },
|
|
65941
|
-
(0,
|
|
65942
|
-
(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))
|
|
65943
65989
|
)
|
|
65944
65990
|
),
|
|
65945
|
-
(0,
|
|
65991
|
+
(0, import_react85.createElement)(
|
|
65946
65992
|
"div",
|
|
65947
65993
|
{ style: { marginTop: "2px", fontSize: "12px", color: "var(--dshpc-fg-3)" } },
|
|
65948
65994
|
t3("roadmapLayout")
|
|
65949
65995
|
)
|
|
65950
65996
|
)
|
|
65951
65997
|
),
|
|
65952
|
-
(0,
|
|
65998
|
+
(0, import_react85.createElement)(
|
|
65953
65999
|
Example,
|
|
65954
66000
|
{ title: t3("secBuild"), hint: t3("buildDesc") },
|
|
65955
|
-
(0,
|
|
66001
|
+
(0, import_react85.createElement)(
|
|
65956
66002
|
"table",
|
|
65957
66003
|
{ style: { borderCollapse: "collapse", fontSize: "13px" } },
|
|
65958
|
-
(0,
|
|
66004
|
+
(0, import_react85.createElement)(
|
|
65959
66005
|
"tbody",
|
|
65960
66006
|
null,
|
|
65961
66007
|
[
|
|
65962
|
-
[t3("buildCore"), `v${"0.
|
|
65963
|
-
[t3("buildDemo"), `v${"0.
|
|
65964
|
-
[t3("buildStamp"), "261103-
|
|
66008
|
+
[t3("buildCore"), `v${"0.21.0"}`],
|
|
66009
|
+
[t3("buildDemo"), `v${"0.21.0"}`],
|
|
66010
|
+
[t3("buildStamp"), "261103-090039-142"]
|
|
65965
66011
|
].map(
|
|
65966
|
-
([label, value]) => (0,
|
|
66012
|
+
([label, value]) => (0, import_react85.createElement)(
|
|
65967
66013
|
"tr",
|
|
65968
66014
|
{ key: label },
|
|
65969
|
-
(0,
|
|
65970
|
-
(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", {
|
|
65971
66017
|
style: {
|
|
65972
66018
|
padding: "5px 14px 5px 0",
|
|
65973
66019
|
fontFamily: "var(--dshpc-font-mono)",
|
|
@@ -65993,32 +66039,32 @@ var SECTION_GROUPS = [
|
|
|
65993
66039
|
];
|
|
65994
66040
|
var ALL_SECTIONS = [
|
|
65995
66041
|
// 入门:帮助索引(读哪一份)在前,然后是快速开始与设计基础
|
|
65996
|
-
{ id: "help-index", group: "start", titleKey: "secHelpIndex", render: () => (0,
|
|
65997
|
-
{ id: "quickstart", group: "start", titleKey: "secQuickstart", render: () => (0,
|
|
65998
|
-
{ id: "foundation", group: "start", titleKey: "secFoundation", render: () => (0,
|
|
65999
|
-
{ id: "button", group: "components", titleKey: "secButton", render: () => (0,
|
|
66000
|
-
{ id: "input", group: "components", titleKey: "secInput", render: () => (0,
|
|
66001
|
-
{ id: "picker", group: "components", titleKey: "secPicker", render: () => (0,
|
|
66002
|
-
{ id: "datetime", group: "components", titleKey: "secDateTime", render: () => (0,
|
|
66003
|
-
{ id: "tooltip", group: "components", titleKey: "secTooltip", render: () => (0,
|
|
66004
|
-
{ id: "card", group: "components", titleKey: "secCard", render: () => (0,
|
|
66005
|
-
{ id: "chip", group: "components", titleKey: "secChip", render: () => (0,
|
|
66006
|
-
{ id: "table", group: "components", titleKey: "secTable", render: () => (0,
|
|
66007
|
-
{ id: "feedback", group: "components", titleKey: "secFeedback", render: () => (0,
|
|
66008
|
-
{ id: "layout", group: "components", titleKey: "secLayout", render: () => (0,
|
|
66009
|
-
{ id: "toolbar", group: "components", titleKey: "secToolbar", render: () => (0,
|
|
66010
|
-
{ id: "explorer", group: "blocks", titleKey: "secExplorer", render: () => (0,
|
|
66011
|
-
{ id: "session", group: "blocks", titleKey: "secSession", render: () => (0,
|
|
66012
|
-
{ id: "date", group: "utils", titleKey: "secDate", render: () => (0,
|
|
66013
|
-
{ id: "text", group: "utils", titleKey: "secText", render: () => (0,
|
|
66014
|
-
{ id: "number", group: "utils", titleKey: "secNumber", render: () => (0,
|
|
66015
|
-
{ id: "http", group: "utils", titleKey: "secHttp", render: () => (0,
|
|
66016
|
-
{ 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) },
|
|
66017
66063
|
// 参考:无障碍 / 路线图 / 版本构建三条并成一页
|
|
66018
|
-
{ id: "reference", group: "reference", titleKey: "secReference", render: () => (0,
|
|
66064
|
+
{ id: "reference", group: "reference", titleKey: "secReference", render: () => (0, import_react86.createElement)(ReferencePage, null) }
|
|
66019
66065
|
];
|
|
66020
66066
|
function Placeholder2(props) {
|
|
66021
|
-
return (0,
|
|
66067
|
+
return (0, import_react86.createElement)(
|
|
66022
66068
|
Surface,
|
|
66023
66069
|
{
|
|
66024
66070
|
tone: "sunken",
|
|
@@ -66026,7 +66072,7 @@ function Placeholder2(props) {
|
|
|
66026
66072
|
padding: "lg",
|
|
66027
66073
|
style: { marginTop: "4px", color: "var(--dshpc-fg-3)" }
|
|
66028
66074
|
},
|
|
66029
|
-
(0,
|
|
66075
|
+
(0, import_react86.createElement)("div", {
|
|
66030
66076
|
style: {
|
|
66031
66077
|
fontSize: "11px",
|
|
66032
66078
|
fontWeight: 600,
|
|
@@ -66036,23 +66082,23 @@ function Placeholder2(props) {
|
|
|
66036
66082
|
marginBottom: "10px"
|
|
66037
66083
|
}
|
|
66038
66084
|
}, t3("phTodo")),
|
|
66039
|
-
(0,
|
|
66085
|
+
(0, import_react86.createElement)("div", { style: { fontSize: "13px", lineHeight: "1.9", whiteSpace: "pre-line" } }, t3(props.descKey))
|
|
66040
66086
|
);
|
|
66041
66087
|
}
|
|
66042
66088
|
function SectionHead2(props) {
|
|
66043
|
-
return (0,
|
|
66089
|
+
return (0, import_react86.createElement)(
|
|
66044
66090
|
"div",
|
|
66045
66091
|
{ id: `sec-${props.id}`, style: { margin: "28px 0 14px" } },
|
|
66046
|
-
(0,
|
|
66047
|
-
(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" } })
|
|
66048
66094
|
);
|
|
66049
66095
|
}
|
|
66050
66096
|
function Sections(props) {
|
|
66051
66097
|
const current4 = ALL_SECTIONS.find((s) => s.id === props.active) ?? ALL_SECTIONS[0];
|
|
66052
|
-
return (0,
|
|
66098
|
+
return (0, import_react86.createElement)(
|
|
66053
66099
|
"div",
|
|
66054
66100
|
null,
|
|
66055
|
-
(0,
|
|
66101
|
+
(0, import_react86.createElement)(SectionHead2, { id: current4.id, title: t3(current4.titleKey) }),
|
|
66056
66102
|
current4.render()
|
|
66057
66103
|
);
|
|
66058
66104
|
}
|
|
@@ -66112,10 +66158,10 @@ function applySidebarEntry() {
|
|
|
66112
66158
|
}
|
|
66113
66159
|
}
|
|
66114
66160
|
function MoreMenuRow(props) {
|
|
66115
|
-
return (0,
|
|
66161
|
+
return (0, import_react87.createElement)(
|
|
66116
66162
|
import_dsh_client_ui_primitives6.MenuItemButton,
|
|
66117
66163
|
{
|
|
66118
|
-
icon: (0,
|
|
66164
|
+
icon: (0, import_react87.createElement)(PanelIcon, { size: 16 }),
|
|
66119
66165
|
onSelect: () => {
|
|
66120
66166
|
props.onDismiss();
|
|
66121
66167
|
jump(PANEL_ID);
|
|
@@ -66126,8 +66172,8 @@ function MoreMenuRow(props) {
|
|
|
66126
66172
|
}
|
|
66127
66173
|
var localeRuntime;
|
|
66128
66174
|
function useLocaleTick() {
|
|
66129
|
-
const [, setTick] = (0,
|
|
66130
|
-
(0,
|
|
66175
|
+
const [, setTick] = (0, import_react87.useState)(0);
|
|
66176
|
+
(0, import_react87.useEffect)(() => {
|
|
66131
66177
|
const rt = localeRuntime;
|
|
66132
66178
|
if (rt === void 0) return;
|
|
66133
66179
|
return rt.subscribe(() => {
|
|
@@ -66137,8 +66183,8 @@ function useLocaleTick() {
|
|
|
66137
66183
|
}
|
|
66138
66184
|
function useHostDark() {
|
|
66139
66185
|
const read = () => document.body.hasAttribute("data-ds-dark-theme");
|
|
66140
|
-
const [dark, setDark] = (0,
|
|
66141
|
-
(0,
|
|
66186
|
+
const [dark, setDark] = (0, import_react87.useState)(read);
|
|
66187
|
+
(0, import_react87.useEffect)(() => {
|
|
66142
66188
|
const obs = new MutationObserver(() => {
|
|
66143
66189
|
setDark(read());
|
|
66144
66190
|
});
|
|
@@ -66158,11 +66204,11 @@ function useHostDark() {
|
|
|
66158
66204
|
function DemoPage() {
|
|
66159
66205
|
useLocaleTick();
|
|
66160
66206
|
const { dark, toggle } = useHostDark();
|
|
66161
|
-
const [active, setActive2] = (0,
|
|
66207
|
+
const [active, setActive2] = (0, import_react87.useState)(ALL_SECTIONS[0].id);
|
|
66162
66208
|
const nav2 = [];
|
|
66163
66209
|
SECTION_GROUPS.forEach((group, gi) => {
|
|
66164
66210
|
nav2.push(
|
|
66165
|
-
(0,
|
|
66211
|
+
(0, import_react87.createElement)(
|
|
66166
66212
|
"div",
|
|
66167
66213
|
{
|
|
66168
66214
|
key: `group-${group.id}`,
|
|
@@ -66180,7 +66226,7 @@ function DemoPage() {
|
|
|
66180
66226
|
);
|
|
66181
66227
|
for (const section of ALL_SECTIONS.filter((s) => s.group === group.id)) {
|
|
66182
66228
|
nav2.push(
|
|
66183
|
-
(0,
|
|
66229
|
+
(0, import_react87.createElement)(
|
|
66184
66230
|
"button",
|
|
66185
66231
|
{
|
|
66186
66232
|
key: section.id,
|
|
@@ -66207,7 +66253,7 @@ function DemoPage() {
|
|
|
66207
66253
|
);
|
|
66208
66254
|
}
|
|
66209
66255
|
});
|
|
66210
|
-
return (0,
|
|
66256
|
+
return (0, import_react87.createElement)(
|
|
66211
66257
|
"div",
|
|
66212
66258
|
{
|
|
66213
66259
|
// 分栏挂载点:explorer 的 openFilePreview 要把 dock 塞进这一行,主区才被挤窄。
|
|
@@ -66224,7 +66270,7 @@ function DemoPage() {
|
|
|
66224
66270
|
["--dshpc-dock-h"]: "100%"
|
|
66225
66271
|
}
|
|
66226
66272
|
},
|
|
66227
|
-
(0,
|
|
66273
|
+
(0, import_react87.createElement)(
|
|
66228
66274
|
"aside",
|
|
66229
66275
|
{
|
|
66230
66276
|
style: {
|
|
@@ -66240,9 +66286,9 @@ function DemoPage() {
|
|
|
66240
66286
|
},
|
|
66241
66287
|
// 导航区:唯一滚动容器;底部操作/版本区固定不动
|
|
66242
66288
|
// 透明右边框 = 滚动条与右缘隔 1px(口径见 docs/design/style.md §滚动条让位)
|
|
66243
|
-
(0,
|
|
66289
|
+
(0, import_react87.createElement)("div", { style: { flex: 1, minHeight: 0, overflowY: "auto", padding: "14px 10px", borderRight: "1px solid transparent" } }, nav2),
|
|
66244
66290
|
// 固定底栏:明暗切换 + 版本号 + 编译码(时间戳,一眼看出编译时刻)
|
|
66245
|
-
(0,
|
|
66291
|
+
(0, import_react87.createElement)(
|
|
66246
66292
|
"div",
|
|
66247
66293
|
{
|
|
66248
66294
|
style: {
|
|
@@ -66255,7 +66301,7 @@ function DemoPage() {
|
|
|
66255
66301
|
}
|
|
66256
66302
|
},
|
|
66257
66303
|
// 明暗切换:核心 Segmented 滑动分段(左亮右暗,图标进 label),不手写按钮
|
|
66258
|
-
(0,
|
|
66304
|
+
(0, import_react87.createElement)(Segmented, {
|
|
66259
66305
|
items: [
|
|
66260
66306
|
{ value: "light", label: `\u2600 ${t3("themeLight")}` },
|
|
66261
66307
|
{ value: "dark", label: `\u263E ${t3("themeDark")}` }
|
|
@@ -66269,7 +66315,7 @@ function DemoPage() {
|
|
|
66269
66315
|
label: t3("themeToggle")
|
|
66270
66316
|
}),
|
|
66271
66317
|
// 版本号 + 编译码:180px 侧栏放不下一行 ⇒ core / demo 各一行;编译码小一号、与上面隔开
|
|
66272
|
-
(0,
|
|
66318
|
+
(0, import_react87.createElement)(
|
|
66273
66319
|
"div",
|
|
66274
66320
|
{
|
|
66275
66321
|
style: {
|
|
@@ -66283,46 +66329,46 @@ function DemoPage() {
|
|
|
66283
66329
|
lineHeight: "14px"
|
|
66284
66330
|
}
|
|
66285
66331
|
},
|
|
66286
|
-
(0,
|
|
66287
|
-
(0,
|
|
66288
|
-
(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")
|
|
66289
66335
|
)
|
|
66290
66336
|
)
|
|
66291
66337
|
),
|
|
66292
|
-
(0,
|
|
66338
|
+
(0, import_react87.createElement)(
|
|
66293
66339
|
"main",
|
|
66294
66340
|
// 透明右边框 = 滚动条与右缘隔 1px(口径见 docs/design/style.md §滚动条让位):
|
|
66295
66341
|
// dock 不再让 margin,靠这里让,滚动条与分栏分隔线之间才是 1px。
|
|
66296
66342
|
{ style: { flex: 1, minWidth: 0, minHeight: 0, height: "100%", boxSizing: "border-box", overflowY: "auto", padding: "12px 22px 60px", borderRight: "1px solid transparent" } },
|
|
66297
|
-
(0,
|
|
66343
|
+
(0, import_react87.createElement)(Sections, { active })
|
|
66298
66344
|
),
|
|
66299
66345
|
// 分栏挂在**整页**右侧(真实用法),不是塞进某一节里:任何一页点开都挤窄 main。
|
|
66300
66346
|
// 内容与头部在 demoPanels() 里声明(DockPanel),这里只管显隐。
|
|
66301
|
-
(0,
|
|
66347
|
+
(0, import_react87.createElement)(PanelDock, { dock: demoDock }, ...demoPanels())
|
|
66302
66348
|
);
|
|
66303
66349
|
}
|
|
66304
66350
|
function ConfigPanel(props) {
|
|
66305
66351
|
const form = props.form;
|
|
66306
|
-
const [, rerender] = (0,
|
|
66307
|
-
(0,
|
|
66352
|
+
const [, rerender] = (0, import_react87.useState)(0);
|
|
66353
|
+
(0, import_react87.useEffect)(() => form.subscribe(() => {
|
|
66308
66354
|
rerender((n) => n + 1);
|
|
66309
66355
|
}), [form]);
|
|
66310
|
-
if (props.view !== "page") return (0,
|
|
66356
|
+
if (props.view !== "page") return (0, import_react87.createElement)("div", { style: { display: "none" } });
|
|
66311
66357
|
const snap = form.getSnapshot();
|
|
66312
66358
|
const storedMode = snap.value?.entryMode;
|
|
66313
66359
|
const mode = storedMode === "off" || storedMode === "first" || storedMode === "more" ? storedMode : "more";
|
|
66314
66360
|
const ready = snap.status === "ready";
|
|
66315
|
-
return (0,
|
|
66361
|
+
return (0, import_react87.createElement)(
|
|
66316
66362
|
"div",
|
|
66317
66363
|
{ style: { display: "flex", flexDirection: "column", gap: "14px" } },
|
|
66318
66364
|
// 一句话说明「这个插件是干嘛的」——标题由详情页自己画,这里只补定位
|
|
66319
|
-
(0,
|
|
66365
|
+
(0, import_react87.createElement)("div", { style: { color: "var(--dshpc-fg-3)", fontSize: "12px", lineHeight: "18px" } }, t3("settingsIntro")),
|
|
66320
66366
|
// 设置行:滑动栏在右、说明在左;左缘圆角短条有入口=绿 / 关闭=灰(核心 Card 框式)
|
|
66321
|
-
ready ? (0,
|
|
66367
|
+
ready ? (0, import_react87.createElement)(
|
|
66322
66368
|
Card,
|
|
66323
66369
|
{
|
|
66324
66370
|
accent: mode === "off" ? "neutral" : "success",
|
|
66325
|
-
action: (0,
|
|
66371
|
+
action: (0, import_react87.createElement)(Segmented, {
|
|
66326
66372
|
size: "sm",
|
|
66327
66373
|
value: mode,
|
|
66328
66374
|
disabled: !snap.writable,
|
|
@@ -66339,35 +66385,35 @@ function ConfigPanel(props) {
|
|
|
66339
66385
|
]
|
|
66340
66386
|
})
|
|
66341
66387
|
},
|
|
66342
|
-
(0,
|
|
66388
|
+
(0, import_react87.createElement)(
|
|
66343
66389
|
"div",
|
|
66344
66390
|
null,
|
|
66345
|
-
(0,
|
|
66346
|
-
(0,
|
|
66391
|
+
(0, import_react87.createElement)("div", { style: { fontSize: "13px", fontWeight: 500 } }, t3("settingsEntryTitle")),
|
|
66392
|
+
(0, import_react87.createElement)(
|
|
66347
66393
|
"div",
|
|
66348
66394
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "12px", marginTop: "2px" } },
|
|
66349
66395
|
t3("settingsEntryHint")
|
|
66350
66396
|
)
|
|
66351
66397
|
)
|
|
66352
|
-
) : (0,
|
|
66398
|
+
) : (0, import_react87.createElement)(
|
|
66353
66399
|
"div",
|
|
66354
66400
|
{ style: { color: "var(--dshpc-fg-3)", fontSize: "12px" } },
|
|
66355
66401
|
t3(snap.status === "loading" ? "settingsLoading" : "settingsUnavailable")
|
|
66356
66402
|
),
|
|
66357
|
-
(0,
|
|
66403
|
+
(0, import_react87.createElement)(
|
|
66358
66404
|
"div",
|
|
66359
66405
|
{ style: { display: "flex", gap: "8px" } },
|
|
66360
|
-
(0,
|
|
66406
|
+
(0, import_react87.createElement)(
|
|
66361
66407
|
Button,
|
|
66362
|
-
{ 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 },
|
|
66363
66409
|
t3("settingsOpenDemo")
|
|
66364
66410
|
),
|
|
66365
|
-
(0,
|
|
66411
|
+
(0, import_react87.createElement)(
|
|
66366
66412
|
Button,
|
|
66367
66413
|
{
|
|
66368
66414
|
size: "md",
|
|
66369
66415
|
variant: "outline",
|
|
66370
|
-
icon: (0,
|
|
66416
|
+
icon: (0, import_react87.createElement)(import_dsh_client_ui_primitives6.IconLinkOutlineRegular, { size: 16 }),
|
|
66371
66417
|
onClick: () => {
|
|
66372
66418
|
window.open("https://github.com/cq-guojia/dsh-plugin-core", "_blank", "noopener");
|
|
66373
66419
|
}
|
|
@@ -66379,14 +66425,14 @@ function ConfigPanel(props) {
|
|
|
66379
66425
|
}
|
|
66380
66426
|
function PanelIcon(props) {
|
|
66381
66427
|
const size4 = props.size ?? 18;
|
|
66382
|
-
return (0,
|
|
66428
|
+
return (0, import_react87.createElement)(
|
|
66383
66429
|
"svg",
|
|
66384
66430
|
{ width: size4, height: size4, viewBox: "0 0 1024 1024", "aria-hidden": true },
|
|
66385
|
-
(0,
|
|
66386
|
-
(0,
|
|
66387
|
-
(0,
|
|
66388
|
-
(0,
|
|
66389
|
-
(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" })
|
|
66390
66436
|
);
|
|
66391
66437
|
}
|
|
66392
66438
|
function apply(ctx) {
|
|
@@ -66395,7 +66441,7 @@ function apply(ctx) {
|
|
|
66395
66441
|
ensureControls(kit);
|
|
66396
66442
|
kit.registerStyle("demo", DEMO_CSS);
|
|
66397
66443
|
kit.ensureStyles();
|
|
66398
|
-
setTooltipRenderer((props) => (0,
|
|
66444
|
+
setTooltipRenderer((props) => (0, import_react87.createElement)(import_dsh_client_ui_primitives6.Tooltip, props));
|
|
66399
66445
|
ctx.inject(["layout"], (sub) => {
|
|
66400
66446
|
const layout = sub?.layout;
|
|
66401
66447
|
if (layout?.selectPanel === void 0) return;
|