dsh-plugin-core-demo 0.15.0 → 0.16.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 +69 -13
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -3297,6 +3297,14 @@ var SEGMENTED_CSS = `
|
|
|
3297
3297
|
.dshpc-seg__item{appearance:none;display:inline-flex;align-items:center;gap:4px;box-sizing:border-box;height:calc(var(--dshpc-control-h-sm) - 6px);padding:0 12px;border:0;border-radius:var(--dshpc-radius-sm);background:transparent;color:var(--dshpc-fg-2);font-family:inherit;font-size:var(--dshpc-font-xs);font-weight:500;white-space:nowrap;cursor:pointer;flex:none;transition:color var(--dshpc-dur-fast) var(--dshpc-ease),background-color var(--dshpc-dur-fast) var(--dshpc-ease),box-shadow var(--dshpc-dur-fast) var(--dshpc-ease);}
|
|
3298
3298
|
.dshpc-seg--md .dshpc-seg__item{height:calc(var(--dshpc-control-h-md) - 6px);}
|
|
3299
3299
|
.dshpc-seg--lg .dshpc-seg__item{height:calc(var(--dshpc-control-h-lg) - 6px);}
|
|
3300
|
+
/* \u6BB5\u5185\u56FE\u6807\uFF08\u524D\u7F6E\uFF09\uFF1A\u4E0E Button \u540C\u53E3\u5F84 \u2014\u2014 inline-flex \u5403\u6389\u884C\u9AD8\u57FA\u7EBF\uFF0Csvg \u6309\u5757\u7EA7\u3002 */
|
|
3301
|
+
.dshpc-seg__icon{display:inline-flex;align-items:center;justify-content:center;flex:none;line-height:0;}
|
|
3302
|
+
.dshpc-seg__icon svg{display:block;margin:0;}
|
|
3303
|
+
/* \u53EA\u6709\u56FE\u6807\uFF08\u65E0\u6587\u5B57 / \u8BA1\u6570 / \u89D2\u6807\uFF09\uFF1A\u6BB5\u5FC5\u987B\u662F\u6B63\u65B9\u5F62 \u21D2 \u5BBD = \u6BB5\u9AD8\u3001\u5DE6\u53F3\u5185\u8DDD\u5F52\u96F6\u3001\u5185\u5BB9\u5C45\u4E2D\uFF1B
|
|
3304
|
+
\u5426\u5219\u57FA\u7840\u89C4\u5219\u7684 0 12px \u4F1A\u628A\u5B83\u62C9\u6210\u957F\u65B9\u5F62\u3002\u653E\u5728\u4E09\u6863\u4E4B\u540E\uFF1A\u540C\u540D\u7279\u5F02\u6027\u4E0B\u540E\u5199\u8005\u80DC\u3002 */
|
|
3305
|
+
.dshpc-seg__item--icon-only{width:calc(var(--dshpc-control-h-sm) - 6px);padding:0;justify-content:center;}
|
|
3306
|
+
.dshpc-seg--md .dshpc-seg__item--icon-only{width:calc(var(--dshpc-control-h-md) - 6px);}
|
|
3307
|
+
.dshpc-seg--lg .dshpc-seg__item--icon-only{width:calc(var(--dshpc-control-h-lg) - 6px);}
|
|
3300
3308
|
.dshpc-seg__item:hover:not([aria-pressed='true']):not(:disabled){color:var(--dshpc-fg);}
|
|
3301
3309
|
.dshpc-seg__item[aria-pressed='true']{background:var(--seg-thumb);box-shadow:var(--dshpc-shadow-raised);color:var(--seg-on);font-weight:600;}
|
|
3302
3310
|
.dshpc-seg__item:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:-2px;}
|
|
@@ -6981,15 +6989,19 @@ function Segmented(props) {
|
|
|
6981
6989
|
};
|
|
6982
6990
|
const count3 = countText(item.count);
|
|
6983
6991
|
const badge = countText(item.badge);
|
|
6992
|
+
const hasLabel = item.label !== void 0 && item.label !== null && item.label !== "";
|
|
6993
|
+
const hasIcon = item.icon !== void 0 && item.icon !== null;
|
|
6994
|
+
const iconOnly = hasIcon && !hasLabel && count3 === null && badge === null;
|
|
6984
6995
|
const itemButton = (0, import_react27.createElement)("button", {
|
|
6985
6996
|
key: item.value,
|
|
6986
6997
|
type: "button",
|
|
6987
|
-
className: "dshpc-seg__item"
|
|
6998
|
+
className: `dshpc-seg__item${iconOnly ? " dshpc-seg__item--icon-only" : ""}`,
|
|
6988
6999
|
// 选中态用 aria-pressed 表达 ⇒ 读屏可读,皮肤也只认这一个选择器
|
|
6989
7000
|
"aria-pressed": on,
|
|
7001
|
+
"aria-label": item.ariaLabel ?? (iconOnly ? item.tooltip : void 0),
|
|
6990
7002
|
disabled,
|
|
6991
7003
|
onClick: handle
|
|
6992
|
-
}, item.label, count3 === null ? null : (0, import_react27.createElement)("span", { className: "dshpc-seg__count" }, count3), badge === null ? null : (0, import_react27.createElement)("span", { className: "dshpc-seg__badge" }, badge));
|
|
7004
|
+
}, hasIcon ? (0, import_react27.createElement)("span", { className: "dshpc-seg__icon" }, item.icon) : null, hasLabel ? item.label : null, count3 === null ? null : (0, import_react27.createElement)("span", { className: "dshpc-seg__count" }, count3), badge === null ? null : (0, import_react27.createElement)("span", { className: "dshpc-seg__badge" }, badge));
|
|
6993
7005
|
if (item.tooltip !== void 0 && renderer2 !== void 0) {
|
|
6994
7006
|
return renderer2({ label: item.tooltip, side: "top", children: itemButton });
|
|
6995
7007
|
}
|
|
@@ -7366,6 +7378,8 @@ function QuickToolbar(props) {
|
|
|
7366
7378
|
return id3 === void 0 ? null : document.getElementById(id3);
|
|
7367
7379
|
};
|
|
7368
7380
|
let observed = null;
|
|
7381
|
+
let lastRight = null;
|
|
7382
|
+
let lastViewport = -1;
|
|
7369
7383
|
const ro = new ResizeObserver(update);
|
|
7370
7384
|
function update() {
|
|
7371
7385
|
const anchorEl = resolveAnchor();
|
|
@@ -7377,11 +7391,19 @@ function QuickToolbar(props) {
|
|
|
7377
7391
|
observed = anchorEl;
|
|
7378
7392
|
}
|
|
7379
7393
|
const viewportWidth = document.documentElement.clientWidth;
|
|
7380
|
-
|
|
7394
|
+
const rect = anchorEl === null ? null : anchorEl.getBoundingClientRect();
|
|
7395
|
+
const anchorRight = rect === null || rect.width === 0 && rect.height === 0 ? null : rect.right;
|
|
7396
|
+
if (viewportWidth === lastViewport && anchorRight === lastRight)
|
|
7397
|
+
return;
|
|
7398
|
+
lastViewport = viewportWidth;
|
|
7399
|
+
lastRight = anchorRight;
|
|
7400
|
+
setLeft(resolveToolbarLeft({ viewportWidth, offset: offset4, size: size4 }, anchorRight));
|
|
7381
7401
|
}
|
|
7382
7402
|
update();
|
|
7403
|
+
const poll = setInterval(update, 100);
|
|
7383
7404
|
window.addEventListener("resize", update);
|
|
7384
7405
|
return () => {
|
|
7406
|
+
clearInterval(poll);
|
|
7385
7407
|
window.removeEventListener("resize", update);
|
|
7386
7408
|
ro.disconnect();
|
|
7387
7409
|
};
|
|
@@ -56429,7 +56451,7 @@ var DICT2 = {
|
|
|
56429
56451
|
demoInputFamily: "Input \u5BB6\u65CF",
|
|
56430
56452
|
inputHint: "Input / PrefixedInput / NumberInput / Textarea\uFF0C\u90FD\u652F\u6301 error \u63CF\u7EA2\uFF1B\u4F20 hint \u53C2\u6570\u5373\u81EA\u52A8\u5728\u884C\u5C3E\u6302\u6807\u51C6\u95EE\u53F7\u63D0\u793A\uFF08FieldHint \u672C\u4F53\u4ECD\u53EF\u5355\u72EC\u7528\uFF09\uFF1BInput \u4F20 icon \u5373\u5728\u5DE6\u4FA7\u52A0\u56FE\u6807\u69FD",
|
|
56431
56453
|
switchTip: "\u5B98\u65B9 Switch\uFF08\u542F\u7528\u8BED\u4E49\uFF0C\u4E0D\u662F\u52FE\u9009\uFF09+ Checkbox + Segmented",
|
|
56432
|
-
checkboxHint: "\u5916\u89C2\u5BF9\u9F50\u771F\u5B9E\u63D2\u4EF6\uFF1A\u7070\u5E95\u8F68\u9053 + \u767D\u8272\u9009\u4E2D\u7247\uFF1Bbordered \u662F\u5916\u6846\u6B3E\uFF08\u6700\u53F3\uFF0C\u53EF\u70B9\u7740\u73A9\uFF09\uFF1B\u661F\u671F\u65B9\u5757\u662F\u591A\u9009\u3002\u6587\u6848\u968F\u8BED\u8A00\u5207\u6362",
|
|
56454
|
+
checkboxHint: "\u5916\u89C2\u5BF9\u9F50\u771F\u5B9E\u63D2\u4EF6\uFF1A\u7070\u5E95\u8F68\u9053 + \u767D\u8272\u9009\u4E2D\u7247\uFF1Bbordered \u662F\u5916\u6846\u6B3E\uFF08\u6700\u53F3\uFF0C\u53EF\u70B9\u7740\u73A9\uFF09\uFF1B\u661F\u671F\u65B9\u5757\u662F\u591A\u9009\u3002icon \u5728\u524D\u3001\u53EA\u6709\u56FE\u6807\u65F6\u81EA\u52A8\u6B63\u65B9\u5F62\u3002\u6587\u6848\u968F\u8BED\u8A00\u5207\u6362",
|
|
56433
56455
|
segToneTitle: "Segmented \u9009\u4E2D\u7247\u914D\u8272\uFF08tone\uFF09",
|
|
56434
56456
|
segToneHint: "\u4E0D\u4F20 = \u4E3B\u9898\u4EAE\u7247\uFF08\u767D\u7247 + \u6B63\u6587\u8272\uFF09\u3002\u4F20\u5185\u7F6E\u8272\u540D\uFF08\u4E0E Chip \u540C\u540D\uFF09\u65F6\u5E95\u4E0E\u5B57\u7531\u6838\u5FC3\u5B9A\u3001\u6DF1\u6D45\u4E24\u4E2A\u4E3B\u9898\u5404\u81EA\u6210\u7ACB\uFF08\u9EC4\u5E95\u81EA\u52A8\u914D\u6DF1\u5B57\uFF09\uFF1B\u4F20 { bg, fg } \u65F6\u4E24\u4E2A\u4E3B\u9898\u90FD\u7528\u8FD9\u4E00\u5BF9\u989C\u8272\uFF0C\u5BF9\u6BD4\u5EA6\u7531\u8C03\u7528\u65B9\u8D1F\u8D23\uFF1Btone \u4E5F\u538B\u8FC7 weekday \u7684\u9ED8\u8BA4\u84DD",
|
|
56435
56457
|
pickerHint: '\u5355\u9009 / \u591A\u9009 / \u4E0A\u9650 / \u641C\u7D22\uFF08searchable \u5F00\u5173\uFF09/ \u5206\u7EC4 / \u7A7A\u6001 / \u964D\u7EA7\uFF1B\u89E6\u53D1\u5668\u4E0E\u9009\u9879\u90FD\u652F\u6301\u524D\u7F6E icon\uFF1B\u6587\u5B57\u9ED8\u8BA4\u5C45\u5DE6\uFF08align="center" \u624D\u5C45\u4E2D\uFF09\uFF1B\u591A\u9009\u5230\u4E0A\u9650\u540E\u5DF2\u9009\u9879\u4ECD\u53EF\u70B9\u9009\u53D6\u6D88',
|
|
@@ -56680,7 +56702,7 @@ var DICT2 = {
|
|
|
56680
56702
|
demoInputFamily: "Input family",
|
|
56681
56703
|
inputHint: "Input / PrefixedInput / NumberInput / Textarea, all support error highlighting; pass a hint string and the standard FieldHint is attached automatically (FieldHint still works standalone); pass icon to Input to get a leading icon slot",
|
|
56682
56704
|
switchTip: "Official Switch (enable semantics, not a tick) + Checkbox + Segmented",
|
|
56683
|
-
checkboxHint: "Looks match the real plugin: grey track with a white selected pill; bordered adds an outer frame (rightmost, clickable); the weekday squares are multi-select. Labels follow the locale",
|
|
56705
|
+
checkboxHint: "Looks match the real plugin: grey track with a white selected pill; bordered adds an outer frame (rightmost, clickable); the weekday squares are multi-select; icons lead the label and icon-only segments square themselves. Labels follow the locale",
|
|
56684
56706
|
segToneTitle: "Segmented selected-pill colors (tone)",
|
|
56685
56707
|
segToneHint: "Omitted = theme pill (white on body text). A built-in color name (same names as Chip) lets the core pick background and text per theme (yellow gets dark text); { bg, fg } uses that pair in both themes, contrast is the caller\u2019s call; tone also overrides weekday\u2019s default blue",
|
|
56686
56708
|
pickerHint: 'Single / multi / max / search (searchable switch) / grouped / empty / degraded; trigger and options both take a leading icon; label is left-aligned by default (align="center" to center); multi-select at max still allows deselecting picked items',
|
|
@@ -58101,8 +58123,8 @@ var docData = {
|
|
|
58101
58123
|
"en": "IconButton: variant plain|outline|danger (default plain), size (default lg), icon (required), label (required, doubles as a11y name and title)."
|
|
58102
58124
|
},
|
|
58103
58125
|
{
|
|
58104
|
-
"zh": "Segmented\uFF1A`items`\uFF08\u5FC5\u586B\uFF09\u652F\u6301\u5355\u9009 / \u591A\u9009\uFF0C`size`\uFF08\u9ED8\u8BA4 lg\uFF1B\u4E09\u6863\u603B\u9AD8 24 / 28 / 32\uFF09\u3001`bordered`\uFF081px \u5916\u6846\uFF0C\u603B\u9AD8\u4E0D\u53D8\uFF09\u3001`multiple`\uFF08\u591A\u9009\uFF09\u3002\u5916\u89C2\u53EA\u6709\u4E00\u5957\uFF1A\u7070\u5E95\u8F68\u9053 + \u767D\u8272\u9009\u4E2D\u7247\uFF0C\u9009\u4E2D\u7247\u7684\u63CF\u8FB9\u73AF\u4E0E\u9634\u5F71\u7531\u5BBF\u4E3B elevation token \u63D0\u4F9B\uFF08\u79BB\u7EBF\u515C\u5E95\u503C\u6CA1\u6709\u90A3\u5708\u73AF\uFF09\u3002\u9009\u4E2D\u7247\u914D\u8272\u53EA\u7ECF `tone`\uFF1A\u4F20\u5185\u7F6E\u8272\u540D\uFF08\u4E0E Chip \u540C\u540D\u7684 business / success / warning / danger / purple / pink / cyan / teal / orange / indigo / rose / slate\uFF09\u65F6\u5E95\u4E0E\u5B57\u7531\u6838\u5FC3\u5B9A\u3001\u6DF1\u6D45\u4E24\u4E3B\u9898\u5404\u81EA\u6210\u7ACB\uFF1B\u4F20 `{ bg, fg }` \u65F6\u4E24\u4E2A\u4E3B\u9898\u90FD\u7528\u8C03\u7528\u65B9\u8FD9\u4E00\u5BF9\u989C\u8272\uFF08\u5BF9\u6BD4\u5EA6\u7531\u8C03\u7528\u65B9\u8D1F\u8D23\uFF09\u3002\u6BB5\u5185 `count`\uFF08\u5F31\u5316\u7070\u5B57\uFF0C\u9009\u4E2D\u6BB5\u5185\u81EA\u52A8\u8DDF\u7740\u9009\u4E2D\u7247\u5B57\u8272\u63D0\u4EAE\uFF09/ `badge`\uFF08\u7EA2\u89D2\u6807\uFF09\u63A5\u53D7 `number | string`\uFF1A\u6570\u5B57 \u22640 \u4E0D\u663E\u793A\uFF0C\u5B57\u7B26\u4E32\u539F\u6837\u663E\u793A\uFF08\u5982 `1K` / `99+`\uFF09\u3002",
|
|
58105
|
-
"en": "Segmented: `items` (required) supports single or multiple selection; `size` (default lg; totals 24 / 28 / 32), `bordered` (1px outer frame, same total height), `multiple` (multi-select). One look only: grey track + white selected pill; its stroke ring and shadow come from the host elevation token (the offline fallback has no ring). The selected pill\u2019s colors go through `tone` only: a built-in color name (business / success / warning / danger / purple / pink / cyan / teal / orange / indigo / rose / slate, same names as Chip) lets the core pick background and text per theme; `{ bg, fg }` uses that pair verbatim in both themes (contrast is the caller\u2019s call). An item\u2019s `count` (muted text; auto-lightened to follow the selected pill\u2019s text color while selected) and `badge` (red pill) take `number | string`: numbers \u22640 render nothing, strings render as given (e.g. `'1K'` / `'99+'`)."
|
|
58126
|
+
"zh": "Segmented\uFF1A`items`\uFF08\u5FC5\u586B\uFF09\u652F\u6301\u5355\u9009 / \u591A\u9009\uFF0C`size`\uFF08\u9ED8\u8BA4 lg\uFF1B\u4E09\u6863\u603B\u9AD8 24 / 28 / 32\uFF09\u3001`bordered`\uFF081px \u5916\u6846\uFF0C\u603B\u9AD8\u4E0D\u53D8\uFF09\u3001`multiple`\uFF08\u591A\u9009\uFF09\u3002\u5916\u89C2\u53EA\u6709\u4E00\u5957\uFF1A\u7070\u5E95\u8F68\u9053 + \u767D\u8272\u9009\u4E2D\u7247\uFF0C\u9009\u4E2D\u7247\u7684\u63CF\u8FB9\u73AF\u4E0E\u9634\u5F71\u7531\u5BBF\u4E3B elevation token \u63D0\u4F9B\uFF08\u79BB\u7EBF\u515C\u5E95\u503C\u6CA1\u6709\u90A3\u5708\u73AF\uFF09\u3002\u9009\u4E2D\u7247\u914D\u8272\u53EA\u7ECF `tone`\uFF1A\u4F20\u5185\u7F6E\u8272\u540D\uFF08\u4E0E Chip \u540C\u540D\u7684 business / success / warning / danger / purple / pink / cyan / teal / orange / indigo / rose / slate\uFF09\u65F6\u5E95\u4E0E\u5B57\u7531\u6838\u5FC3\u5B9A\u3001\u6DF1\u6D45\u4E24\u4E3B\u9898\u5404\u81EA\u6210\u7ACB\uFF1B\u4F20 `{ bg, fg }` \u65F6\u4E24\u4E2A\u4E3B\u9898\u90FD\u7528\u8C03\u7528\u65B9\u8FD9\u4E00\u5BF9\u989C\u8272\uFF08\u5BF9\u6BD4\u5EA6\u7531\u8C03\u7528\u65B9\u8D1F\u8D23\uFF09\u3002\u6BB5\u5185 `icon` \u662F\u524D\u7F6E\u56FE\u6807\u69FD\uFF08\u5B98\u65B9\u56FE\u6807\u7EC4\u4EF6 / \u6570\u7EC4 / \u81EA\u7ED8\u8282\u70B9\u5747\u53EF\uFF09\uFF0C`label` \u4E5F\u53EF\u4F20\u8282\u70B9\uFF1B\u987A\u5E8F\u56FA\u5B9A\u4E3A icon \u2192 label \u2192 count\u3002\u53EA\u6709\u56FE\u6807\uFF08\u65E0\u6587\u5B57 / \u8BA1\u6570 / \u89D2\u6807\uFF09\u65F6\u8BE5\u6BB5\u81EA\u52A8\u53D8\u6B63\u65B9\u5F62\uFF08\u5BBD = \u6BB5\u9AD8\uFF09\uFF0C\u8BFB\u5C4F\u540D\u7528 `ariaLabel`\uFF0C\u7F3A\u7701\u9000\u56DE `tooltip`\u3002\u6BB5\u5185 `count`\uFF08\u5F31\u5316\u7070\u5B57\uFF0C\u9009\u4E2D\u6BB5\u5185\u81EA\u52A8\u8DDF\u7740\u9009\u4E2D\u7247\u5B57\u8272\u63D0\u4EAE\uFF09/ `badge`\uFF08\u7EA2\u89D2\u6807\uFF09\u63A5\u53D7 `number | string`\uFF1A\u6570\u5B57 \u22640 \u4E0D\u663E\u793A\uFF0C\u5B57\u7B26\u4E32\u539F\u6837\u663E\u793A\uFF08\u5982 `1K` / `99+`\uFF09\u3002",
|
|
58127
|
+
"en": "Segmented: `items` (required) supports single or multiple selection; `size` (default lg; totals 24 / 28 / 32), `bordered` (1px outer frame, same total height), `multiple` (multi-select). One look only: grey track + white selected pill; its stroke ring and shadow come from the host elevation token (the offline fallback has no ring). The selected pill\u2019s colors go through `tone` only: a built-in color name (business / success / warning / danger / purple / pink / cyan / teal / orange / indigo / rose / slate, same names as Chip) lets the core pick background and text per theme; `{ bg, fg }` uses that pair verbatim in both themes (contrast is the caller\u2019s call). An item\u2019s leading `icon` takes any node (official icon component, array, or custom); `label` also accepts a node; order is always icon \u2192 label \u2192 count. With only an icon (no label / count / badge) the segment squares itself (width = segment height), and the accessible name comes from `ariaLabel`, falling back to `tooltip`. An item\u2019s `count` (muted text; auto-lightened to follow the selected pill\u2019s text color while selected) and `badge` (red pill) take `number | string`: numbers \u22640 render nothing, strings render as given (e.g. `'1K'` / `'99+'`)."
|
|
58106
58128
|
}
|
|
58107
58129
|
],
|
|
58108
58130
|
"api": [
|
|
@@ -60734,6 +60756,19 @@ var CODE_SWITCH_SEG = `// \u5F00\u5173\u8BED\u4E49\u7528\u5B98\u65B9 Switch\uFF1
|
|
|
60734
60756
|
onChange={setFilter}
|
|
60735
60757
|
/>
|
|
60736
60758
|
|
|
60759
|
+
// \u6BB5\u5185\u56FE\u6807\uFF1Aicon \u5728\u524D\u3001\u6587\u5B57\u5C45\u4E2D\u3001count \u5728\u540E
|
|
60760
|
+
<Segmented
|
|
60761
|
+
items={[{ value: 'all', icon: h(IconSearchOutlineRegular, { size: 14 }), label: '\u5168\u90E8', count: 11 }]}
|
|
60762
|
+
value={filter}
|
|
60763
|
+
onChange={setFilter}
|
|
60764
|
+
/>
|
|
60765
|
+
// \u53EA\u6709\u56FE\u6807\uFF08\u65E0\u6587\u5B57 / \u8BA1\u6570\uFF09\uFF1A\u6BB5\u81EA\u52A8\u53D8\u6210\u6B63\u65B9\u5F62\uFF0C\u8BFB\u5C4F\u540D\u8D70 ariaLabel
|
|
60766
|
+
<Segmented
|
|
60767
|
+
items={[{ value: 'search', icon: h(IconSearchOutlineRegular, { size: 14 }), ariaLabel: '\u641C\u7D22' }]}
|
|
60768
|
+
value={iconSeg}
|
|
60769
|
+
onChange={setIconSeg}
|
|
60770
|
+
/>
|
|
60771
|
+
|
|
60737
60772
|
// \u661F\u671F\u591A\u9009\uFF1Amultiple + value \u662F\u6570\u7EC4
|
|
60738
60773
|
<Segmented
|
|
60739
60774
|
multiple
|
|
@@ -60764,6 +60799,8 @@ function InputPage() {
|
|
|
60764
60799
|
const [seg, setSeg] = (0, import_react65.useState)("week");
|
|
60765
60800
|
const [filter2, setFilter] = (0, import_react65.useState)("all");
|
|
60766
60801
|
const [multi, setMulti] = (0, import_react65.useState)(["1"]);
|
|
60802
|
+
const [iconSeg, setIconSeg] = (0, import_react65.useState)("search");
|
|
60803
|
+
const [iconSeg2, setIconSeg2] = (0, import_react65.useState)("all");
|
|
60767
60804
|
const [kw, setKw] = (0, import_react65.useState)("");
|
|
60768
60805
|
return (0, import_react65.createElement)(
|
|
60769
60806
|
"div",
|
|
@@ -60942,6 +60979,25 @@ function InputPage() {
|
|
|
60942
60979
|
})),
|
|
60943
60980
|
value: multi,
|
|
60944
60981
|
onChange: setMulti
|
|
60982
|
+
}),
|
|
60983
|
+
// 段内图标:icon 在前、文字居中、count 在后;只有图标(无文字 / 计数)时自动正方形
|
|
60984
|
+
(0, import_react65.createElement)(Segmented, {
|
|
60985
|
+
items: [
|
|
60986
|
+
{ value: "search", icon: (0, import_react65.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), ariaLabel: "\u641C\u7D22" },
|
|
60987
|
+
{ value: "clock", icon: (0, import_react65.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 14 }), ariaLabel: "\u65F6\u95F4" },
|
|
60988
|
+
{ value: "play", icon: (0, import_react65.createElement)(import_dsh_client_ui_primitives2.IconPlayOutlineRegular, { size: 14 }), ariaLabel: "\u8FD0\u884C" }
|
|
60989
|
+
],
|
|
60990
|
+
value: iconSeg,
|
|
60991
|
+
onChange: setIconSeg
|
|
60992
|
+
}),
|
|
60993
|
+
(0, import_react65.createElement)(Segmented, {
|
|
60994
|
+
items: [
|
|
60995
|
+
{ value: "all", icon: (0, import_react65.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, { size: 14 }), label: t3("segAll"), count: 11 },
|
|
60996
|
+
{ value: "doing", icon: (0, import_react65.createElement)(import_dsh_client_ui_primitives2.IconClockOutlineRegular, { size: 14 }), label: t3("segDoing"), count: 5 },
|
|
60997
|
+
{ value: "done", icon: (0, import_react65.createElement)(import_dsh_client_ui_primitives2.IconCheckOutlineRegular, { size: 14 }), label: t3("segClaimed"), count: 11 }
|
|
60998
|
+
],
|
|
60999
|
+
value: iconSeg2,
|
|
61000
|
+
onChange: setIconSeg2
|
|
60945
61001
|
})
|
|
60946
61002
|
)
|
|
60947
61003
|
),
|
|
@@ -64940,9 +64996,9 @@ function ReferencePage() {
|
|
|
64940
64996
|
"tbody",
|
|
64941
64997
|
null,
|
|
64942
64998
|
[
|
|
64943
|
-
[t3("buildCore"), `v${"0.
|
|
64944
|
-
[t3("buildDemo"), `v${"0.
|
|
64945
|
-
[t3("buildStamp"), "
|
|
64999
|
+
[t3("buildCore"), `v${"0.16.0"}`],
|
|
65000
|
+
[t3("buildDemo"), `v${"0.16.0"}`],
|
|
65001
|
+
[t3("buildStamp"), "261101-100218-854"]
|
|
64946
65002
|
].map(
|
|
64947
65003
|
([label, value]) => (0, import_react77.createElement)(
|
|
64948
65004
|
"tr",
|
|
@@ -65266,9 +65322,9 @@ function DemoPage() {
|
|
|
65266
65322
|
lineHeight: "14px"
|
|
65267
65323
|
}
|
|
65268
65324
|
},
|
|
65269
|
-
(0, import_react79.createElement)("span", null, `core v${"0.
|
|
65270
|
-
(0, import_react79.createElement)("span", null, `demo v${"0.
|
|
65271
|
-
(0, import_react79.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "
|
|
65325
|
+
(0, import_react79.createElement)("span", null, `core v${"0.16.0"}`),
|
|
65326
|
+
(0, import_react79.createElement)("span", null, `demo v${"0.16.0"}`),
|
|
65327
|
+
(0, import_react79.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261101-100218-854")
|
|
65272
65328
|
)
|
|
65273
65329
|
)
|
|
65274
65330
|
),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-core-demo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
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": [
|