dsh-plugin-core-demo 0.35.23 → 0.35.24

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.
Files changed (2) hide show
  1. package/dist/client.js +29 -8
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -62363,6 +62363,8 @@ var DICT2 = {
62363
62363
  btnHintHint: "\u72EC\u7ACB\u7EC4\u4EF6\uFF0C\u653E\u54EA\u90FD\u884C\uFF0C\u60AC\u505C\u6216\u805A\u7126\u6D6E\u51FA",
62364
62364
  demoInputFamily: "Input \u5BB6\u65CF",
62365
62365
  inputHint: "\u56DB\u79CD\u8F93\u5165\u4EF6\uFF0C\u90FD\u652F\u6301 error \u4E0E\u884C\u5C3E\u95EE\u53F7\u63D0\u793A",
62366
+ demoSearchClear: "\u641C\u7D22\u6846\u6E05\u9664\u94AE",
62367
+ demoSearchClearHint: 'type="search" \u4E14\u6709\u5185\u5BB9\u65F6\uFF0C\u9F20\u6807\u79FB\u4E0A\u53BB\u6216\u805A\u7126\u90FD\u4F1A\u663E\u793A\u5C3E\u90E8 \xD7\uFF0C\u70B9\u4E00\u4E0B\u5373\u6E05\u7A7A\u2014\u2014\u4E0D\u5FC5\u5148\u70B9\u8F93\u5165\u6846\u805A\u7126\u3002',
62366
62368
  inputGroupTitle: "InputGroup\uFF08\u7EC4\u5408\u8F93\u5165\u6846\uFF09",
62367
62369
  inputGroupHint: "\u8F93\u5165\u6846 + \u540E\u7F6E\u6309\u94AE\u7EC4\u710A\u6210\u4E00\u4F53",
62368
62370
  switchTip: "\u5B98\u65B9 Switch\uFF08\u542F\u7528\u8BED\u4E49\uFF0C\u4E0D\u662F\u52FE\u9009\uFF09+ Checkbox + Segmented",
@@ -62631,6 +62633,8 @@ var DICT2 = {
62631
62633
  btnHintHint: "Standalone; hover or focus to reveal",
62632
62634
  demoInputFamily: "Input family",
62633
62635
  inputHint: "Four field types, all with error and hint",
62636
+ demoSearchClear: "Search clear button",
62637
+ demoSearchClearHint: 'A type="search" field with content shows a trailing \xD7 on hover or focus; click it to clear \u2014 no need to focus the field first.',
62634
62638
  inputGroupTitle: "InputGroup (input with actions)",
62635
62639
  inputGroupHint: "Input plus trailing actions as one unit",
62636
62640
  switchTip: "Official Switch (enable semantics, not a tick) + Checkbox + Segmented",
@@ -68079,7 +68083,7 @@ const [kw, setKw] = useState('')
68079
68083
 
68080
68084
  // hint \u53C2\u6570\u7248\uFF1A\u95EE\u53F7\u63D0\u793A\u7531\u7EC4\u4EF6\u81EA\u5DF1\u6302\uFF0C\u4E0D\u7528\u624B\u52A8\u62FC FieldHint
68081
68085
  <Input value={text} 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" />
68082
- // \u641C\u7D22\u6846\uFF1Atype="search" \u21D2 \u805A\u7126\u4E14\u6709\u5185\u5BB9\u65F6\u53F3\u4FA7\u624D\u51FA\u6E05\u7A7A\u94AE\uFF08\u6570\u5B57\u6846\u52A0\u51CF\u53F7\u540C\u6B3E\u7684 plain IconButton\uFF0C\u539F\u751F\u90A3\u679A\u5DF2\u9690\u6389\uFF09
68086
+ // \u641C\u7D22\u6846\uFF1Atype="search" \u21D2 \u6709\u5185\u5BB9\u65F6\uFF0C\u9F20\u6807\u79FB\u4E0A\u53BB\u6216\u805A\u7126\u90FD\u4F1A\u663E\u793A\u53F3\u4FA7\u6E05\u9664\u94AE\uFF08\u6570\u5B57\u6846\u52A0\u51CF\u53F7\u540C\u6B3E plain IconButton\uFF0C\u539F\u751F\u90A3\u679A\u5DF2\u9690\u6389\uFF09
68083
68087
  // icon \u662F\u5DE6\u4FA7\u56FE\u6807\u69FD\uFF08\u4E0D\u5403\u70B9\u51FB\uFF0C\u70B9\u5728\u56FE\u6807\u4E0A\u7167\u6837\u805A\u7126\uFF09\uFF1B\u56FE\u6807\u5C3A\u5BF8\u6309\u6863\u53D6 fieldMetricsOf(size).icon
68084
68088
  <Input type="search" icon={<IconSearchOutlineRegular />} value={kw} onChange={setKw} placeholder="\u641C\u7D22" />
68085
68089
  // \u6821\u9A8C\u5931\u8D25\u6001\uFF1A\u63CF\u7EA2
@@ -68088,6 +68092,11 @@ const [kw, setKw] = useState('')
68088
68092
  <NumberInput value={num} onChange={setNum} min={0} max={10} suffix="\u6B21" hint="\u8D85\u51FA\u8303\u56F4\u4F1A\u81EA\u52A8\u6536\u56DE\u5230 min / max\u3002" />
68089
68093
  // \u591A\u884C\u8F93\u5165\uFF1A\u95EE\u53F7\u7F6E\u53F3\u4E0B\u89D2
68090
68094
  <Textarea value={text} onChange={setText} placeholder="\u591A\u884C\u8F93\u5165" hint="\u591A\u884C\u8F93\u5165\u4E5F\u652F\u6301 hint \u53C2\u6570\u3002" />`;
68095
+ var CODE_SEARCH_CLEAR = `const [kw, setKw] = useState('\u793A\u4F8B\u6587\u672C')
68096
+
68097
+ // type="search" \u21D2 \u6709\u5185\u5BB9\u65F6\uFF0C\u9F20\u6807\u79FB\u4E0A\u53BB\u6216\u805A\u7126\u90FD\u4F1A\u663E\u793A\u5C3E\u90E8\u6E05\u9664\u94AE\uFF08\xD7\uFF09
68098
+ <Input type="search" icon={<IconSearchOutlineRegular />} value={kw} onChange={setKw} placeholder="\u641C\u7D22" />
68099
+ // \u79FB\u4E0A\u53BB / \u805A\u7126 \u2192 \u53F3\u4FA7 \xD7 \u51FA\u73B0\uFF0C\u70B9\u51FB\u5373\u6E05\u7A7A\uFF08\u4E0D\u5FC5\u5148\u70B9\u8F93\u5165\u6846\u805A\u7126\uFF09`;
68091
68100
  var CODE_INPUT_GROUP = `// \u8F93\u5165\u6846 + \u6309\u94AE\u7EC4\u710A\u6210\u4E00\u4F53\uFF1Blabel \u662F\u524D\u7F6E\u6807\u9898\uFF08\u540C\u683C\u7070\u5E95\uFF09\uFF0Cundoable \u5728\u6700\u524D\u9762\u52A0\u64A4\u9500\u94AE
68092
68101
  <InputGroup
68093
68102
  label="\u4EFB\u52A1\u540D"
@@ -68193,6 +68202,7 @@ function InputPage() {
68193
68202
  const [iconSeg, setIconSeg] = (0, import_react93.useState)("search");
68194
68203
  const [iconSeg2, setIconSeg2] = (0, import_react93.useState)("all");
68195
68204
  const [kw, setKw] = (0, import_react93.useState)("");
68205
+ const [kwClear, setKwClear] = (0, import_react93.useState)("\u793A\u4F8B\u6587\u672C");
68196
68206
  const [igValue, setIgValue] = (0, import_react93.useState)("");
68197
68207
  return (0, import_react93.createElement)(
68198
68208
  "div",
@@ -68215,7 +68225,7 @@ function InputPage() {
68215
68225
  "div",
68216
68226
  { style: { display: "flex", alignItems: "center", gap: "6px" } },
68217
68227
  (0, import_react93.createElement)("span", { style: { color: "var(--dshpc-fg-2)", fontSize: "13px", flex: "none" } }, "\u641C\u7D22"),
68218
- // 左侧图标槽(icon)+ 聚焦且有内容才出的清空钮(type="search")
68228
+ // 左侧图标槽(icon)+ 有内容时移上去或聚焦即出清除钮(type="search")
68219
68229
  (0, import_react93.createElement)(Input, { type: "search", icon: (0, import_react93.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, null), value: kw, onChange: setKw, placeholder: "\u641C\u7D22" })
68220
68230
  ),
68221
68231
  (0, import_react93.createElement)(Input, { value: "bad value", onChange: () => {
@@ -68226,6 +68236,17 @@ function InputPage() {
68226
68236
  (0, import_react93.createElement)(Textarea, { value: text2, onChange: setText, placeholder: "\u591A\u884C\u8F93\u5165", hint: "\u591A\u884C\u8F93\u5165\u4E5F\u652F\u6301 hint \u53C2\u6570\u3002" })
68227
68237
  )
68228
68238
  ),
68239
+ // 搜索框清除钮:有内容时,鼠标移上去或聚焦都会显示尾部 ×,点一下即清空(不必先聚焦)
68240
+ (0, import_react93.createElement)(
68241
+ Example,
68242
+ { title: t3("demoSearchClear"), hint: t3("demoSearchClearHint"), code: CODE_SEARCH_CLEAR },
68243
+ (0, import_react93.createElement)(
68244
+ "div",
68245
+ { style: { display: "flex", flexDirection: "column", gap: "10px", maxWidth: "380px" } },
68246
+ (0, import_react93.createElement)(Input, { type: "search", icon: (0, import_react93.createElement)(import_dsh_client_ui_primitives2.IconSearchOutlineRegular, null), value: kwClear, onChange: setKwClear, placeholder: "\u641C\u7D22" }),
68247
+ (0, import_react93.createElement)("span", { style: { color: "var(--dshpc-fg-2)", fontSize: "13px" } }, "\u4E0A\u9762\u5DF2\u9884\u586B\u5185\u5BB9\uFF1A\u9F20\u6807\u79FB\u5230\u6846\u4E0A\uFF0C\u5C3E\u90E8 \xD7 \u5373\u51FA\u73B0\uFF0C\u53EF\u76F4\u63A5\u6E05\u9664\u3002")
68248
+ )
68249
+ ),
68229
68250
  // 组合输入框:输入框 + 按钮组焊成一体(前置标题 / 撤销 / 图标按钮 / 自定义高度)
68230
68251
  (0, import_react93.createElement)(
68231
68252
  Example,
@@ -71499,9 +71520,9 @@ function ReferencePage() {
71499
71520
  "tbody",
71500
71521
  null,
71501
71522
  [
71502
- [t3("buildCore"), `v${"0.35.23"}`],
71503
- [t3("buildDemo"), `v${"0.35.23"}`],
71504
- [t3("buildStamp"), "261111-095143-712"]
71523
+ [t3("buildCore"), `v${"0.35.24"}`],
71524
+ [t3("buildDemo"), `v${"0.35.24"}`],
71525
+ [t3("buildStamp"), "261111-115642-456"]
71505
71526
  ].map(
71506
71527
  ([label, value]) => (0, import_react99.createElement)(
71507
71528
  "tr",
@@ -71817,9 +71838,9 @@ function DemoPage() {
71817
71838
  lineHeight: "14px"
71818
71839
  }
71819
71840
  },
71820
- (0, import_react101.createElement)("span", null, `core v${"0.35.23"}`),
71821
- (0, import_react101.createElement)("span", null, `demo v${"0.35.23"}`),
71822
- (0, import_react101.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261111-095143-712")
71841
+ (0, import_react101.createElement)("span", null, `core v${"0.35.24"}`),
71842
+ (0, import_react101.createElement)("span", null, `demo v${"0.35.24"}`),
71843
+ (0, import_react101.createElement)("span", { style: { marginTop: "4px", fontSize: "9px" } }, "261111-115642-456")
71823
71844
  )
71824
71845
  )
71825
71846
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-core-demo",
3
- "version": "0.35.23",
3
+ "version": "0.35.24",
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": [