dsh-plugin-core-demo 0.6.0 → 0.6.1
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 +25 -16
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -186,6 +186,8 @@ var PICKER_CSS = `
|
|
|
186
186
|
.dshpc-picker__option:hover{background:var(--dshpc-surface-sunken)}
|
|
187
187
|
.dshpc-picker__option--active{background:var(--dshpc-open-bg);color:var(--dshpc-business)}
|
|
188
188
|
.dshpc-picker__option--disabled{color:var(--dshpc-fg-dim);cursor:not-allowed}
|
|
189
|
+
/* \u9009\u9879\u6587\u5B57\u5403\u6389\u5269\u4F59\u5BBD\u5EA6\uFF1A\u8D85\u957F\u7701\u7565\u53F7\uFF08\u914D\u5408 MarqueeText hover \u8DD1\u9A6C\u706F\uFF09\uFF0C\u4E0D\u6491\u5BBD\u83DC\u5355\u3002 */
|
|
190
|
+
.dshpc-picker__option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
189
191
|
.dshpc-picker__tick{width:12px;color:var(--dshpc-business)}
|
|
190
192
|
.dshpc-picker__empty{padding:8px;color:var(--dshpc-fg-3);text-align:center}
|
|
191
193
|
.dshpc-picker__degraded{
|
|
@@ -3589,15 +3591,22 @@ function Picker(props) {
|
|
|
3589
3591
|
blocked ? "dshpc-picker__option--disabled" : ""
|
|
3590
3592
|
].filter((s) => s !== "").join(" ");
|
|
3591
3593
|
const idx = flat.indexOf(o);
|
|
3592
|
-
return (0, import_react6.createElement)(
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3594
|
+
return (0, import_react6.createElement)(
|
|
3595
|
+
"div",
|
|
3596
|
+
{
|
|
3597
|
+
key: o.value,
|
|
3598
|
+
className: activeCls,
|
|
3599
|
+
"data-active": idx === active ? "true" : void 0,
|
|
3600
|
+
onClick: () => {
|
|
3601
|
+
if (!blocked)
|
|
3602
|
+
pick2(o.value);
|
|
3603
|
+
}
|
|
3604
|
+
},
|
|
3605
|
+
mode === "multiple" ? (0, import_react6.createElement)("span", { className: "dshpc-picker__tick" }, selected.includes(o.value) ? "\u2713" : "") : null,
|
|
3606
|
+
o.icon !== void 0 && o.icon !== null ? (0, import_react6.createElement)("span", { className: "dshpc-picker__option-icon" }, o.icon) : null,
|
|
3607
|
+
// 选项文字超长时省略号 + hover 跑马灯(与触发器同一套逻辑),不把菜单撑出横向滚动条。
|
|
3608
|
+
(0, import_react6.createElement)(MarqueeText, { text: o.label, className: "dshpc-picker__option-label" })
|
|
3609
|
+
);
|
|
3601
3610
|
})))
|
|
3602
3611
|
])) : null);
|
|
3603
3612
|
}
|
|
@@ -56862,7 +56871,7 @@ var docData = {
|
|
|
56862
56871
|
},
|
|
56863
56872
|
"prose": [
|
|
56864
56873
|
{
|
|
56865
|
-
"zh": "Picker\uFF1A\u5355 / \u591A\u9009\u3001\u4E0A\u9650\u3001\u641C\u7D22\u3001\u5206\u7EC4\u3001\u7A7A\u6001\uFF0C\u81EA\u7ED8\u3002\u952E\u76D8\uFF1AEsc \u5173\u3001\u2191\u2193 \u79FB\u6E38\u6807\u3001Enter \u9009\u3002\u7EAF\u903B\u8F91\u53EF\u5355\u7528\uFF1A`toGroups` / `filterGroups` / `toggleValue`\u3002\u89E6\u53D1\u5668\u652F\u6301 width / minWidth / maxWidth \u7EA6\u675F\u5BBD\u5EA6\uFF1A\u5B9A\u5BBD\u5FFD\u7565\u53E6\u4E24\u8005\uFF1B\u5185\u5BB9\u8D85\u957F\u5219\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\u3002",
|
|
56874
|
+
"zh": "Picker\uFF1A\u5355 / \u591A\u9009\u3001\u4E0A\u9650\u3001\u641C\u7D22\u3001\u5206\u7EC4\u3001\u7A7A\u6001\uFF0C\u81EA\u7ED8\u3002\u952E\u76D8\uFF1AEsc \u5173\u3001\u2191\u2193 \u79FB\u6E38\u6807\u3001Enter \u9009\u3002\u7EAF\u903B\u8F91\u53EF\u5355\u7528\uFF1A`toGroups` / `filterGroups` / `toggleValue`\u3002\u89E6\u53D1\u5668\u652F\u6301 width / minWidth / maxWidth \u7EA6\u675F\u5BBD\u5EA6\uFF1A\u5B9A\u5BBD\u5FFD\u7565\u53E6\u4E24\u8005\uFF1B\u5185\u5BB9\u8D85\u957F\u5219\u7701\u7565\u53F7 + hover \u8DD1\u9A6C\u706F\u3002\u83DC\u5355\u91CC\u7684\u9009\u9879\u8D85\u957F\u540C\u6837\u7701\u7565 + hover \u8DD1\u9A6C\u706F\uFF0C\u4E0D\u4F1A\u628A\u83DC\u5355\u6491\u51FA\u6A2A\u5411\u6EDA\u52A8\u6761\u3002",
|
|
56866
56875
|
"en": "Picker: single/multiple selection, cap, search, grouping, empty state \u2014 self-drawn. Keyboard: Esc closes, \u2191\u2193 move the cursor, Enter selects. Logic reusable standalone: `toGroups` / `filterGroups` / `toggleValue`."
|
|
56867
56876
|
},
|
|
56868
56877
|
{
|
|
@@ -61509,9 +61518,9 @@ function ReferencePage() {
|
|
|
61509
61518
|
"tbody",
|
|
61510
61519
|
null,
|
|
61511
61520
|
[
|
|
61512
|
-
[t3("buildCore"), `v${"0.6.
|
|
61513
|
-
[t3("buildDemo"), `v${"0.6.
|
|
61514
|
-
[t3("buildStamp"), "261028-
|
|
61521
|
+
[t3("buildCore"), `v${"0.6.1"}`],
|
|
61522
|
+
[t3("buildDemo"), `v${"0.6.1"}`],
|
|
61523
|
+
[t3("buildStamp"), "261028-041151-097"]
|
|
61515
61524
|
].map(
|
|
61516
61525
|
([label, value]) => (0, import_react67.createElement)(
|
|
61517
61526
|
"tr",
|
|
@@ -61833,9 +61842,9 @@ function DemoPage() {
|
|
|
61833
61842
|
lineHeight: "14px"
|
|
61834
61843
|
}
|
|
61835
61844
|
},
|
|
61836
|
-
(0, import_react69.createElement)("span", null, `core v${"0.6.
|
|
61837
|
-
(0, import_react69.createElement)("span", null, `demo v${"0.6.
|
|
61838
|
-
(0, import_react69.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261028-
|
|
61845
|
+
(0, import_react69.createElement)("span", null, `core v${"0.6.1"}`),
|
|
61846
|
+
(0, import_react69.createElement)("span", null, `demo v${"0.6.1"}`),
|
|
61847
|
+
(0, import_react69.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261028-041151-097")
|
|
61839
61848
|
)
|
|
61840
61849
|
)
|
|
61841
61850
|
),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-core-demo",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "The shared UI foundation for DSH plugins, with a live component preview: design tokens, common controls, workspace browsing and notifications maintained in one place — install it to preview every component in a real host.",
|
|
5
5
|
"icon": "./assets/icon-components.svg",
|
|
6
6
|
"keywords": [
|