mdui 2.0.2 → 2.0.3

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 (107) hide show
  1. package/components/avatar/index.d.ts +4 -2
  2. package/components/avatar/index.js +3 -2
  3. package/components/badge/index.d.ts +4 -2
  4. package/components/badge/index.js +3 -2
  5. package/components/bottom-app-bar/index.d.ts +7 -1
  6. package/components/bottom-app-bar/index.js +5 -6
  7. package/components/button/button-base.d.ts +3 -3
  8. package/components/button/button-base.js +7 -5
  9. package/components/button/index.d.ts +6 -1
  10. package/components/button-icon/index.d.ts +7 -1
  11. package/components/button-icon/index.js +1 -2
  12. package/components/card/index.d.ts +7 -3
  13. package/components/card/index.js +3 -2
  14. package/components/checkbox/index.d.ts +10 -3
  15. package/components/checkbox/index.js +7 -7
  16. package/components/chip/index.d.ts +8 -1
  17. package/components/chip/index.js +3 -4
  18. package/components/circular-progress/index.d.ts +4 -2
  19. package/components/circular-progress/index.js +3 -2
  20. package/components/collapse/collapse-item.d.ts +13 -2
  21. package/components/collapse/collapse-item.js +5 -5
  22. package/components/collapse/collapse.d.ts +10 -2
  23. package/components/collapse/collapse.js +6 -6
  24. package/components/dialog/index.d.ts +9 -2
  25. package/components/dialog/index.js +10 -14
  26. package/components/divider/index.d.ts +4 -2
  27. package/components/divider/index.js +3 -2
  28. package/components/dropdown/index.d.ts +9 -2
  29. package/components/dropdown/index.js +17 -15
  30. package/components/fab/index.d.ts +6 -1
  31. package/components/icon/index.d.ts +4 -2
  32. package/components/icon/index.js +3 -2
  33. package/components/layout/layout-item-base.d.ts +3 -2
  34. package/components/layout/layout-item-base.js +2 -2
  35. package/components/layout/layout-item.d.ts +4 -3
  36. package/components/layout/layout-main.d.ts +4 -2
  37. package/components/layout/layout-main.js +3 -2
  38. package/components/layout/layout.d.ts +4 -2
  39. package/components/layout/layout.js +3 -2
  40. package/components/linear-progress/index.d.ts +4 -2
  41. package/components/linear-progress/index.js +3 -2
  42. package/components/list/list-item-style.js +1 -1
  43. package/components/list/list-item.d.ts +7 -3
  44. package/components/list/list-item.js +3 -2
  45. package/components/list/list-subheader.d.ts +4 -2
  46. package/components/list/list-subheader.js +3 -2
  47. package/components/list/list.d.ts +4 -2
  48. package/components/list/list.js +3 -2
  49. package/components/menu/menu-item.d.ts +11 -3
  50. package/components/menu/menu-item.js +9 -13
  51. package/components/menu/menu.d.ts +5 -2
  52. package/components/menu/menu.js +5 -5
  53. package/components/navigation-bar/navigation-bar-item.d.ts +7 -3
  54. package/components/navigation-bar/navigation-bar-item.js +3 -2
  55. package/components/navigation-bar/navigation-bar.d.ts +8 -1
  56. package/components/navigation-bar/navigation-bar.js +9 -7
  57. package/components/navigation-drawer/index.d.ts +8 -1
  58. package/components/navigation-drawer/index.js +7 -8
  59. package/components/navigation-drawer/style.js +1 -1
  60. package/components/navigation-rail/navigation-rail-item.d.ts +7 -3
  61. package/components/navigation-rail/navigation-rail-item.js +3 -2
  62. package/components/navigation-rail/navigation-rail.d.ts +4 -1
  63. package/components/navigation-rail/navigation-rail.js +4 -2
  64. package/components/radio/radio-group.d.ts +7 -2
  65. package/components/radio/radio-group.js +10 -13
  66. package/components/radio/radio.d.ts +8 -3
  67. package/components/radio/radio.js +4 -4
  68. package/components/range-slider/index.d.ts +9 -3
  69. package/components/range-slider/index.js +6 -2
  70. package/components/ripple/index.d.ts +4 -2
  71. package/components/ripple/index.js +3 -2
  72. package/components/ripple/ripple-mixin.d.ts +1 -1
  73. package/components/ripple/ripple-mixin.js +0 -1
  74. package/components/segmented-button/segmented-button-group-style.js +1 -1
  75. package/components/segmented-button/segmented-button-group.d.ts +6 -2
  76. package/components/segmented-button/segmented-button-group.js +9 -9
  77. package/components/segmented-button/segmented-button.d.ts +6 -1
  78. package/components/select/index.d.ts +11 -3
  79. package/components/select/index.js +5 -5
  80. package/components/slider/index.d.ts +8 -1
  81. package/components/slider/index.js +4 -9
  82. package/components/slider/slider-base.d.ts +7 -3
  83. package/components/slider/slider-base.js +27 -8
  84. package/components/snackbar/index.d.ts +9 -2
  85. package/components/snackbar/index.js +10 -10
  86. package/components/switch/index.d.ts +10 -3
  87. package/components/switch/index.js +7 -7
  88. package/components/tabs/tab-panel.d.ts +4 -2
  89. package/components/tabs/tab-panel.js +3 -2
  90. package/components/tabs/tab.d.ts +7 -3
  91. package/components/tabs/tab.js +3 -2
  92. package/components/tabs/tabs.d.ts +5 -2
  93. package/components/tabs/tabs.js +7 -4
  94. package/components/text-field/index.d.ts +11 -3
  95. package/components/text-field/index.js +12 -12
  96. package/components/tooltip/index.d.ts +9 -2
  97. package/components/tooltip/index.js +17 -15
  98. package/components/top-app-bar/top-app-bar-title.d.ts +4 -2
  99. package/components/top-app-bar/top-app-bar-title.js +3 -2
  100. package/components/top-app-bar/top-app-bar.d.ts +7 -1
  101. package/components/top-app-bar/top-app-bar.js +5 -6
  102. package/custom-elements.json +2954 -2891
  103. package/html-data.zh-cn.json +439 -439
  104. package/mdui.esm.js +8 -8
  105. package/mdui.global.js +8 -8
  106. package/package.json +3 -2
  107. package/web-types.zh-cn.json +765 -765
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "name": "mdui",
4
- "version": "2.0.2",
4
+ "version": "2.0.3",
5
5
  "js-types-syntax": "typescript",
6
6
  "description-markup": "markdown",
7
7
  "framework-config": {
@@ -450,12 +450,12 @@
450
450
  "doc-url": "https://www.mdui.org/docs/2/components/button#attributes-autofocus"
451
451
  },
452
452
  {
453
- "name": "tabIndex",
453
+ "name": "tabindex",
454
454
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
455
455
  "value": {
456
456
  "type": "number"
457
457
  },
458
- "doc-url": "https://www.mdui.org/docs/2/components/button#attributes-tabIndex"
458
+ "doc-url": "https://www.mdui.org/docs/2/components/button#attributes-tabindex"
459
459
  },
460
460
  {
461
461
  "name": "disabled",
@@ -975,12 +975,12 @@
975
975
  "doc-url": "https://www.mdui.org/docs/2/components/button-icon#attributes-autofocus"
976
976
  },
977
977
  {
978
- "name": "tabIndex",
978
+ "name": "tabindex",
979
979
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
980
980
  "value": {
981
981
  "type": "number"
982
982
  },
983
- "doc-url": "https://www.mdui.org/docs/2/components/button-icon#attributes-tabIndex"
983
+ "doc-url": "https://www.mdui.org/docs/2/components/button-icon#attributes-tabindex"
984
984
  },
985
985
  {
986
986
  "name": "disabled",
@@ -1485,12 +1485,12 @@
1485
1485
  "doc-url": "https://www.mdui.org/docs/2/components/card#attributes-autofocus"
1486
1486
  },
1487
1487
  {
1488
- "name": "tabIndex",
1488
+ "name": "tabindex",
1489
1489
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
1490
1490
  "value": {
1491
1491
  "type": "number"
1492
1492
  },
1493
- "doc-url": "https://www.mdui.org/docs/2/components/card#attributes-tabIndex"
1493
+ "doc-url": "https://www.mdui.org/docs/2/components/card#attributes-tabindex"
1494
1494
  }
1495
1495
  ],
1496
1496
  "priority": "highest",
@@ -1717,12 +1717,12 @@
1717
1717
  "doc-url": "https://www.mdui.org/docs/2/components/checkbox#attributes-autofocus"
1718
1718
  },
1719
1719
  {
1720
- "name": "tabIndex",
1720
+ "name": "tabindex",
1721
1721
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
1722
1722
  "value": {
1723
1723
  "type": "number"
1724
1724
  },
1725
- "doc-url": "https://www.mdui.org/docs/2/components/checkbox#attributes-tabIndex"
1725
+ "doc-url": "https://www.mdui.org/docs/2/components/checkbox#attributes-tabindex"
1726
1726
  }
1727
1727
  ],
1728
1728
  "priority": "highest",
@@ -2072,12 +2072,12 @@
2072
2072
  "doc-url": "https://www.mdui.org/docs/2/components/chip#attributes-autofocus"
2073
2073
  },
2074
2074
  {
2075
- "name": "tabIndex",
2075
+ "name": "tabindex",
2076
2076
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
2077
2077
  "value": {
2078
2078
  "type": "number"
2079
2079
  },
2080
- "doc-url": "https://www.mdui.org/docs/2/components/chip#attributes-tabIndex"
2080
+ "doc-url": "https://www.mdui.org/docs/2/components/chip#attributes-tabindex"
2081
2081
  },
2082
2082
  {
2083
2083
  "name": "disabled",
@@ -3127,6 +3127,243 @@
3127
3127
  ]
3128
3128
  }
3129
3129
  },
3130
+ {
3131
+ "name": "mdui-dropdown",
3132
+ "description": "下拉组件\n\n```html\n<mdui-dropdown>\n <mdui-button slot=\"trigger\">open dropdown</mdui-button>\n <mdui-menu>\n <mdui-menu-item>Item 1</mdui-menu-item>\n <mdui-menu-item>Item 2</mdui-menu-item>\n </mdui-menu>\n</mdui-dropdown>\n```",
3133
+ "attributes": [
3134
+ {
3135
+ "name": "open",
3136
+ "description": "dropdown 是否打开",
3137
+ "value": {
3138
+ "type": "boolean"
3139
+ },
3140
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-open"
3141
+ },
3142
+ {
3143
+ "name": "disabled",
3144
+ "description": "是否禁用 dropdown",
3145
+ "value": {
3146
+ "type": "boolean"
3147
+ },
3148
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-disabled"
3149
+ },
3150
+ {
3151
+ "name": "trigger",
3152
+ "description": "dropdown 的触发方式,支持传入多个值,用空格分隔。可选值为:\n\n* `click`:点击时触发\n* `hover`:鼠标悬浮触发\n* `focus`:聚焦时触发\n* `contextmenu`:鼠标右键点击、或触摸长按时触发\n* `manual`:使用了该值时,只能使用编程方式打开和关闭 dropdown,且不能再指定其他触发方式",
3153
+ "value": {
3154
+ "type": [
3155
+ "'click'",
3156
+ "'hover'",
3157
+ "'focus'",
3158
+ "'contextmenu'",
3159
+ "'manual'",
3160
+ "string"
3161
+ ]
3162
+ },
3163
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-trigger"
3164
+ },
3165
+ {
3166
+ "name": "placement",
3167
+ "description": "dropdown 内容的位置。可选值为:\n\n* `auto`:自动判断位置\n* `top-start`:位于上方,且左对齐\n* `top`:位于上方,且居中对齐\n* `top-end`:位于上方,且右对齐\n* `bottom-start`:位于下方,且左对齐\n* `bottom`:位于下方,且居中对齐\n* `bottom-end`:位于下方,且右对齐\n* `left-start`:位于左侧,且顶部对齐\n* `left`:位于左侧,且居中对齐\n* `left-end`:位于左侧,且底部对齐\n* `right-start`:位于右侧,且顶部对齐\n* `right`:位于右侧,且居中对齐\n* `right-end`:位于右侧,且底部对齐",
3168
+ "value": {
3169
+ "type": [
3170
+ "'auto'",
3171
+ "'top-start'",
3172
+ "'top'",
3173
+ "'top-end'",
3174
+ "'bottom-start'",
3175
+ "'bottom'",
3176
+ "'bottom-end'",
3177
+ "'left-start'",
3178
+ "'left'",
3179
+ "'left-end'",
3180
+ "'right-start'",
3181
+ "'right'",
3182
+ "'right-end'"
3183
+ ]
3184
+ },
3185
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-placement"
3186
+ },
3187
+ {
3188
+ "name": "stay-open-on-click",
3189
+ "description": "在点击 [`<mdui-menu-item>`](https://www.mdui.org/docs/2/components/menu#menu-item-api) 元素后,是否仍保持 dropdown 为打开状态",
3190
+ "value": {
3191
+ "type": "boolean"
3192
+ },
3193
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-stay-open-on-click"
3194
+ },
3195
+ {
3196
+ "name": "open-delay",
3197
+ "description": "通过 hover 触发 dropdown 打开时的延时,单位为毫秒",
3198
+ "value": {
3199
+ "type": "number"
3200
+ },
3201
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-open-delay"
3202
+ },
3203
+ {
3204
+ "name": "close-delay",
3205
+ "description": "通过 hover 触发 dropdown 关闭时的延时,单位为毫秒",
3206
+ "value": {
3207
+ "type": "number"
3208
+ },
3209
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-close-delay"
3210
+ },
3211
+ {
3212
+ "name": "open-on-pointer",
3213
+ "description": "是否在触发 dropdown 时的光标所在的位置打开 dropdown。通常用于在打开鼠标右键菜单时使用",
3214
+ "value": {
3215
+ "type": "boolean"
3216
+ },
3217
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-open-on-pointer"
3218
+ }
3219
+ ],
3220
+ "priority": "highest",
3221
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown",
3222
+ "slots": [
3223
+ {
3224
+ "name": "",
3225
+ "description": "dropdown 的内容",
3226
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#slot-"
3227
+ },
3228
+ {
3229
+ "name": "trigger",
3230
+ "description": "触发 dropdown 的元素,例如 [`<mdui-button>`](https://www.mdui.org/docs/2/components/button) 元素",
3231
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#slot-trigger"
3232
+ }
3233
+ ],
3234
+ "js": {
3235
+ "properties": [
3236
+ {
3237
+ "name": "open",
3238
+ "description": "dropdown 是否打开",
3239
+ "value": {
3240
+ "type": "boolean"
3241
+ },
3242
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-open"
3243
+ },
3244
+ {
3245
+ "name": "disabled",
3246
+ "description": "是否禁用 dropdown",
3247
+ "value": {
3248
+ "type": "boolean"
3249
+ },
3250
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-disabled"
3251
+ },
3252
+ {
3253
+ "name": "trigger",
3254
+ "description": "dropdown 的触发方式,支持传入多个值,用空格分隔。可选值为:\n\n* `click`:点击时触发\n* `hover`:鼠标悬浮触发\n* `focus`:聚焦时触发\n* `contextmenu`:鼠标右键点击、或触摸长按时触发\n* `manual`:使用了该值时,只能使用编程方式打开和关闭 dropdown,且不能再指定其他触发方式",
3255
+ "value": {
3256
+ "type": [
3257
+ "'click'",
3258
+ "'hover'",
3259
+ "'focus'",
3260
+ "'contextmenu'",
3261
+ "'manual'",
3262
+ "string"
3263
+ ]
3264
+ },
3265
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-trigger"
3266
+ },
3267
+ {
3268
+ "name": "placement",
3269
+ "description": "dropdown 内容的位置。可选值为:\n\n* `auto`:自动判断位置\n* `top-start`:位于上方,且左对齐\n* `top`:位于上方,且居中对齐\n* `top-end`:位于上方,且右对齐\n* `bottom-start`:位于下方,且左对齐\n* `bottom`:位于下方,且居中对齐\n* `bottom-end`:位于下方,且右对齐\n* `left-start`:位于左侧,且顶部对齐\n* `left`:位于左侧,且居中对齐\n* `left-end`:位于左侧,且底部对齐\n* `right-start`:位于右侧,且顶部对齐\n* `right`:位于右侧,且居中对齐\n* `right-end`:位于右侧,且底部对齐",
3270
+ "value": {
3271
+ "type": [
3272
+ "'auto'",
3273
+ "'top-start'",
3274
+ "'top'",
3275
+ "'top-end'",
3276
+ "'bottom-start'",
3277
+ "'bottom'",
3278
+ "'bottom-end'",
3279
+ "'left-start'",
3280
+ "'left'",
3281
+ "'left-end'",
3282
+ "'right-start'",
3283
+ "'right'",
3284
+ "'right-end'"
3285
+ ]
3286
+ },
3287
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-placement"
3288
+ },
3289
+ {
3290
+ "name": "stayOpenOnClick",
3291
+ "description": "在点击 [`<mdui-menu-item>`](https://www.mdui.org/docs/2/components/menu#menu-item-api) 元素后,是否仍保持 dropdown 为打开状态",
3292
+ "value": {
3293
+ "type": "boolean"
3294
+ },
3295
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-stayOpenOnClick"
3296
+ },
3297
+ {
3298
+ "name": "openDelay",
3299
+ "description": "通过 hover 触发 dropdown 打开时的延时,单位为毫秒",
3300
+ "value": {
3301
+ "type": "number"
3302
+ },
3303
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-openDelay"
3304
+ },
3305
+ {
3306
+ "name": "closeDelay",
3307
+ "description": "通过 hover 触发 dropdown 关闭时的延时,单位为毫秒",
3308
+ "value": {
3309
+ "type": "number"
3310
+ },
3311
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-closeDelay"
3312
+ },
3313
+ {
3314
+ "name": "openOnPointer",
3315
+ "description": "是否在触发 dropdown 时的光标所在的位置打开 dropdown。通常用于在打开鼠标右键菜单时使用",
3316
+ "value": {
3317
+ "type": "boolean"
3318
+ },
3319
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-openOnPointer"
3320
+ }
3321
+ ],
3322
+ "events": [
3323
+ {
3324
+ "name": "open",
3325
+ "description": "dropdown 开始打开时,事件被触发。可以通过调用 `event.preventDefault()` 阻止 dropdown 打开",
3326
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#event-open"
3327
+ },
3328
+ {
3329
+ "name": "opened",
3330
+ "description": "dropdown 打开动画完成时,事件被触发",
3331
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#event-opened"
3332
+ },
3333
+ {
3334
+ "name": "close",
3335
+ "description": "dropdown 开始关闭时,事件被触发。可以通过调用 `event.preventDefault()` 阻止 dropdown 关闭",
3336
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#event-close"
3337
+ },
3338
+ {
3339
+ "name": "closed",
3340
+ "description": "dropdown 关闭动画完成时,事件被触发",
3341
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#event-closed"
3342
+ }
3343
+ ]
3344
+ },
3345
+ "css": {
3346
+ "properties": [
3347
+ {
3348
+ "name": "--z-index",
3349
+ "description": "组件的 CSS 的 `z-index` 值",
3350
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#css-properties-z-index"
3351
+ }
3352
+ ],
3353
+ "parts": [
3354
+ {
3355
+ "name": "trigger",
3356
+ "description": "触发 dropdown 的元素的容器,即 `trigger` slot 的容器",
3357
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#css-parts-trigger"
3358
+ },
3359
+ {
3360
+ "name": "panel",
3361
+ "description": "dropdown 内容的容器",
3362
+ "doc-url": "https://www.mdui.org/docs/2/components/dropdown#css-parts-panel"
3363
+ }
3364
+ ]
3365
+ }
3366
+ },
3130
3367
  {
3131
3368
  "name": "mdui-fab",
3132
3369
  "description": "浮动操作按钮组件\n\n```html\n<mdui-fab icon=\"edit\"></mdui-fab>\n```",
@@ -3233,12 +3470,12 @@
3233
3470
  "doc-url": "https://www.mdui.org/docs/2/components/fab#attributes-autofocus"
3234
3471
  },
3235
3472
  {
3236
- "name": "tabIndex",
3473
+ "name": "tabindex",
3237
3474
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
3238
3475
  "value": {
3239
3476
  "type": "number"
3240
3477
  },
3241
- "doc-url": "https://www.mdui.org/docs/2/components/fab#attributes-tabIndex"
3478
+ "doc-url": "https://www.mdui.org/docs/2/components/fab#attributes-tabindex"
3242
3479
  },
3243
3480
  {
3244
3481
  "name": "disabled",
@@ -3812,32 +4049,116 @@
3812
4049
  }
3813
4050
  },
3814
4051
  {
3815
- "name": "mdui-menu-item",
3816
- "description": "菜单项组件\n\n```html\n<mdui-menu>\n <mdui-menu-item>Item 1</mdui-menu-item>\n <mdui-menu-item>Item 2</mdui-menu-item>\n</mdui-menu>\n```",
4052
+ "name": "mdui-linear-progress",
4053
+ "description": "线性进度指示器组件\n\n```html\n<mdui-linear-progress></mdui-linear-progress>\n```",
3817
4054
  "attributes": [
3818
4055
  {
3819
- "name": "value",
3820
- "description": "该菜单项的值",
4056
+ "name": "max",
4057
+ "description": "进度指示器的最大值,默认为 1",
3821
4058
  "value": {
3822
- "type": "string"
4059
+ "type": "number"
3823
4060
  },
3824
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-value"
4061
+ "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#attributes-max"
3825
4062
  },
3826
4063
  {
3827
- "name": "disabled",
3828
- "description": "是否禁用该菜单项",
4064
+ "name": "value",
4065
+ "description": "进度指示器的当前值。若未指定该值,则为不确定状态",
3829
4066
  "value": {
3830
- "type": "boolean"
4067
+ "type": "number"
3831
4068
  },
3832
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-disabled"
4069
+ "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#attributes-value"
4070
+ }
4071
+ ],
4072
+ "priority": "highest",
4073
+ "doc-url": "https://www.mdui.org/docs/2/components/linear-progress",
4074
+ "js": {
4075
+ "properties": [
4076
+ {
4077
+ "name": "max",
4078
+ "description": "进度指示器的最大值,默认为 1",
4079
+ "value": {
4080
+ "type": "number"
4081
+ },
4082
+ "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#attributes-max"
4083
+ },
4084
+ {
4085
+ "name": "value",
4086
+ "description": "进度指示器的当前值。若未指定该值,则为不确定状态",
4087
+ "value": {
4088
+ "type": "number"
4089
+ },
4090
+ "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#attributes-value"
4091
+ }
4092
+ ]
4093
+ },
4094
+ "css": {
4095
+ "properties": [
4096
+ {
4097
+ "name": "--shape-corner",
4098
+ "description": "组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](https://www.mdui.org/docs/2/styles/design-tokens#shape-corner)",
4099
+ "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#css-properties-shape-corner"
4100
+ }
4101
+ ],
4102
+ "parts": [
4103
+ {
4104
+ "name": "indicator",
4105
+ "description": "指示器",
4106
+ "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#css-parts-indicator"
4107
+ }
4108
+ ]
4109
+ }
4110
+ },
4111
+ {
4112
+ "name": "mdui-list-item",
4113
+ "description": "列表项组件。需与 `<mdui-list>` 组件配合使用\n\n```html\n<mdui-list>\n <mdui-list-subheader>Subheader</mdui-list-subheader>\n <mdui-list-item>Item 1</mdui-list-item>\n <mdui-list-item>Item 2</mdui-list-item>\n</mdui-list>\n```",
4114
+ "attributes": [
4115
+ {
4116
+ "name": "headline",
4117
+ "description": "主文本。也可以通过 default slot 设置",
4118
+ "value": {
4119
+ "type": "string"
4120
+ },
4121
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-headline"
4122
+ },
4123
+ {
4124
+ "name": "headline-line",
4125
+ "description": "主文本行数,超过行数限制后会截断显示。默认为没有行数限制。可选值为:\n\n* `1`:显示单行文本,超出后截断显示\n* `2`:显示两行文本,超出后截断显示\n* `3`:显示三行文本,超出后截断显示",
4126
+ "value": {
4127
+ "type": [
4128
+ "1",
4129
+ "2",
4130
+ "3"
4131
+ ]
4132
+ },
4133
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-headline-line"
4134
+ },
4135
+ {
4136
+ "name": "description",
4137
+ "description": "副文本。也可以通过 `slot=\"description\"` 设置",
4138
+ "value": {
4139
+ "type": "string"
4140
+ },
4141
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-description"
4142
+ },
4143
+ {
4144
+ "name": "description-line",
4145
+ "description": "副文本行数,超过行数限制后会截断显示。默认为没有行数限制。可选值为:\n\n* `1`:显示单行文本,超出后截断显示\n* `2`:显示两行文本,超出后截断显示\n* `3`:显示三行文本,超出后截断显示",
4146
+ "value": {
4147
+ "type": [
4148
+ "1",
4149
+ "2",
4150
+ "3"
4151
+ ]
4152
+ },
4153
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-description-line"
3833
4154
  },
3834
4155
  {
3835
4156
  "name": "icon",
3836
- "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置\n\n如果需要在左侧留出一个图标的位置,可以传入空字符串进行占位",
4157
+ "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置",
3837
4158
  "value": {
3838
4159
  "type": "string"
3839
4160
  },
3840
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-icon"
4161
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-icon"
3841
4162
  },
3842
4163
  {
3843
4164
  "name": "end-icon",
@@ -3845,31 +4166,51 @@
3845
4166
  "value": {
3846
4167
  "type": "string"
3847
4168
  },
3848
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-end-icon"
4169
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-end-icon"
3849
4170
  },
3850
4171
  {
3851
- "name": "end-text",
3852
- "description": "右侧的文本。也可以通过 `slot=\"end-text\"` 设置",
4172
+ "name": "disabled",
4173
+ "description": "是否禁用该列表项,列表项将置灰,且其中的 [`<mdui-checkbox>`](https://www.mdui.org/docs/2/components/checkbox)、[`<mdui-radio>`](/docs/2/components/radio)、[`<mdui-switch>`](/docs/2/components/switch) 等都将禁用",
3853
4174
  "value": {
3854
- "type": "string"
4175
+ "type": "boolean"
3855
4176
  },
3856
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-end-text"
4177
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-disabled"
3857
4178
  },
3858
4179
  {
3859
- "name": "selected-icon",
3860
- "description": "选中状态的 Material Icons 图标名。也可以通过 `slot=\"selected-icon\"` 设置",
4180
+ "name": "active",
4181
+ "description": "是否激活该列表项",
3861
4182
  "value": {
3862
- "type": "string"
4183
+ "type": "boolean"
3863
4184
  },
3864
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-selected-icon"
4185
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-active"
3865
4186
  },
3866
4187
  {
3867
- "name": "submenu-open",
3868
- "description": "是否打开子菜单",
4188
+ "name": "nonclickable",
4189
+ "description": "是否使列表项不可点击,但其中的 [`<mdui-checkbox>`](https://www.mdui.org/docs/2/components/checkbox)、[`<mdui-radio>`](/docs/2/components/radio)、[`<mdui-switch>`](/docs/2/components/switch) 等仍可进行交互",
3869
4190
  "value": {
3870
4191
  "type": "boolean"
3871
4192
  },
3872
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-submenu-open"
4193
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-nonclickable"
4194
+ },
4195
+ {
4196
+ "name": "rounded",
4197
+ "description": "使用圆角形状的列表项",
4198
+ "value": {
4199
+ "type": "boolean"
4200
+ },
4201
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-rounded"
4202
+ },
4203
+ {
4204
+ "name": "alignment",
4205
+ "description": "列表项的垂直对齐方式。可选值为:\n\n* `start`:顶部对齐\n* `center`:居中对齐\n* `end`:底部对齐",
4206
+ "value": {
4207
+ "type": [
4208
+ "'start'",
4209
+ "'center'",
4210
+ "'end'"
4211
+ ]
4212
+ },
4213
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-alignment"
3873
4214
  },
3874
4215
  {
3875
4216
  "name": "href",
@@ -3877,7 +4218,7 @@
3877
4218
  "value": {
3878
4219
  "type": "string"
3879
4220
  },
3880
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-href"
4221
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-href"
3881
4222
  },
3882
4223
  {
3883
4224
  "name": "download",
@@ -3885,7 +4226,7 @@
3885
4226
  "value": {
3886
4227
  "type": "string"
3887
4228
  },
3888
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-download"
4229
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-download"
3889
4230
  },
3890
4231
  {
3891
4232
  "name": "target",
@@ -3898,7 +4239,7 @@
3898
4239
  "'_top'"
3899
4240
  ]
3900
4241
  },
3901
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-target"
4242
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-target"
3902
4243
  },
3903
4244
  {
3904
4245
  "name": "rel",
@@ -3921,7 +4262,7 @@
3921
4262
  "'tag'"
3922
4263
  ]
3923
4264
  },
3924
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-rel"
4265
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-rel"
3925
4266
  },
3926
4267
  {
3927
4268
  "name": "autofocus",
@@ -3929,142 +4270,176 @@
3929
4270
  "value": {
3930
4271
  "type": "boolean"
3931
4272
  },
3932
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-autofocus"
4273
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-autofocus"
3933
4274
  },
3934
4275
  {
3935
- "name": "tabIndex",
4276
+ "name": "tabindex",
3936
4277
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
3937
4278
  "value": {
3938
4279
  "type": "number"
3939
4280
  },
3940
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-tabIndex"
4281
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-tabindex"
3941
4282
  }
3942
4283
  ],
3943
4284
  "priority": "highest",
3944
- "doc-url": "https://www.mdui.org/docs/2/components/menu",
4285
+ "doc-url": "https://www.mdui.org/docs/2/components/list",
3945
4286
  "slots": [
3946
4287
  {
3947
4288
  "name": "",
3948
- "description": "菜单项的文本",
3949
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-"
3950
- },
3951
- {
3952
- "name": "icon",
3953
- "description": "菜单项左侧图标",
3954
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-icon"
3955
- },
3956
- {
3957
- "name": "end-icon",
3958
- "description": "菜单项右侧图标",
3959
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-end-icon"
4289
+ "description": "主文本",
4290
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-"
3960
4291
  },
3961
4292
  {
3962
- "name": "end-text",
3963
- "description": "菜单右侧的文本",
3964
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-end-text"
4293
+ "name": "description",
4294
+ "description": "副文本",
4295
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-description"
3965
4296
  },
3966
4297
  {
3967
- "name": "selected-icon",
3968
- "description": "选中状态的图标",
3969
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-selected-icon"
4298
+ "name": "icon",
4299
+ "description": "列表项左侧的元素",
4300
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-icon"
3970
4301
  },
3971
4302
  {
3972
- "name": "submenu",
3973
- "description": "子菜单",
3974
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-submenu"
4303
+ "name": "end-icon",
4304
+ "description": "列表项右侧的元素",
4305
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-end-icon"
3975
4306
  },
3976
4307
  {
3977
4308
  "name": "custom",
3978
4309
  "description": "任意自定义内容",
3979
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-custom"
4310
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-custom"
3980
4311
  }
3981
4312
  ],
3982
4313
  "js": {
3983
4314
  "properties": [
3984
4315
  {
3985
- "name": "value",
3986
- "description": "该菜单项的值",
4316
+ "name": "headline",
4317
+ "description": "主文本。也可以通过 default slot 设置",
3987
4318
  "value": {
3988
4319
  "type": "string"
3989
4320
  },
3990
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-value"
4321
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-headline"
3991
4322
  },
3992
4323
  {
3993
- "name": "disabled",
3994
- "description": "是否禁用该菜单项",
4324
+ "name": "headlineLine",
4325
+ "description": "主文本行数,超过行数限制后会截断显示。默认为没有行数限制。可选值为:\n\n* `1`:显示单行文本,超出后截断显示\n* `2`:显示两行文本,超出后截断显示\n* `3`:显示三行文本,超出后截断显示",
3995
4326
  "value": {
3996
- "type": "boolean"
4327
+ "type": [
4328
+ "1",
4329
+ "2",
4330
+ "3"
4331
+ ]
3997
4332
  },
3998
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-disabled"
4333
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-headlineLine"
3999
4334
  },
4000
4335
  {
4001
- "name": "icon",
4002
- "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置\n\n如果需要在左侧留出一个图标的位置,可以传入空字符串进行占位",
4336
+ "name": "description",
4337
+ "description": "副文本。也可以通过 `slot=\"description\"` 设置",
4003
4338
  "value": {
4004
4339
  "type": "string"
4005
4340
  },
4006
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-icon"
4341
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-description"
4007
4342
  },
4008
4343
  {
4009
- "name": "endIcon",
4010
- "description": "右侧的 Material Icons 图标名。也可以通过 `slot=\"end-icon\"` 设置",
4344
+ "name": "descriptionLine",
4345
+ "description": "副文本行数,超过行数限制后会截断显示。默认为没有行数限制。可选值为:\n\n* `1`:显示单行文本,超出后截断显示\n* `2`:显示两行文本,超出后截断显示\n* `3`:显示三行文本,超出后截断显示",
4011
4346
  "value": {
4012
- "type": "string"
4347
+ "type": [
4348
+ "1",
4349
+ "2",
4350
+ "3"
4351
+ ]
4013
4352
  },
4014
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-endIcon"
4353
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-descriptionLine"
4015
4354
  },
4016
4355
  {
4017
- "name": "endText",
4018
- "description": "右侧的文本。也可以通过 `slot=\"end-text\"` 设置",
4356
+ "name": "icon",
4357
+ "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置",
4019
4358
  "value": {
4020
4359
  "type": "string"
4021
4360
  },
4022
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-endText"
4361
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-icon"
4023
4362
  },
4024
4363
  {
4025
- "name": "selectedIcon",
4026
- "description": "选中状态的 Material Icons 图标名。也可以通过 `slot=\"selected-icon\"` 设置",
4364
+ "name": "endIcon",
4365
+ "description": "右侧的 Material Icons 图标名。也可以通过 `slot=\"end-icon\"` 设置",
4027
4366
  "value": {
4028
4367
  "type": "string"
4029
4368
  },
4030
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-selectedIcon"
4369
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-endIcon"
4031
4370
  },
4032
4371
  {
4033
- "name": "submenuOpen",
4034
- "description": "是否打开子菜单",
4372
+ "name": "disabled",
4373
+ "description": "是否禁用该列表项,列表项将置灰,且其中的 [`<mdui-checkbox>`](https://www.mdui.org/docs/2/components/checkbox)、[`<mdui-radio>`](/docs/2/components/radio)、[`<mdui-switch>`](/docs/2/components/switch) 等都将禁用",
4035
4374
  "value": {
4036
4375
  "type": "boolean"
4037
4376
  },
4038
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-submenuOpen"
4377
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-disabled"
4039
4378
  },
4040
4379
  {
4041
- "name": "href",
4042
- "description": "链接指向的页面的 URL。\n\n若指定了该属性,则组件内部会渲染为 `<a>` 元素,并可以使用链接相关的属性",
4380
+ "name": "active",
4381
+ "description": "是否激活该列表项",
4043
4382
  "value": {
4044
- "type": "string"
4383
+ "type": "boolean"
4045
4384
  },
4046
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-href"
4385
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-active"
4047
4386
  },
4048
4387
  {
4049
- "name": "download",
4050
- "description": "被下载的超链接目标。\n\n**Note**:仅在指定了 `href` 属性时可用",
4388
+ "name": "nonclickable",
4389
+ "description": "是否使列表项不可点击,但其中的 [`<mdui-checkbox>`](https://www.mdui.org/docs/2/components/checkbox)、[`<mdui-radio>`](/docs/2/components/radio)、[`<mdui-switch>`](/docs/2/components/switch) 等仍可进行交互",
4051
4390
  "value": {
4052
- "type": "string"
4391
+ "type": "boolean"
4053
4392
  },
4054
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-download"
4393
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-nonclickable"
4055
4394
  },
4056
4395
  {
4057
- "name": "target",
4058
- "description": "在何处打开链接。可选值为:\n\n* `_blank`:在新窗口中打开链接\n* `_parent`:在父框架中打开链接\n* `_self`:默认。在相同的框架中打开链接\n* `_top`:在整个窗口中打开链接\n\n**Note**:仅在指定了 `href` 属性时可用",
4396
+ "name": "rounded",
4397
+ "description": "使用圆角形状的列表项",
4059
4398
  "value": {
4060
- "type": [
4061
- "'_blank'",
4062
- "'_parent'",
4399
+ "type": "boolean"
4400
+ },
4401
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-rounded"
4402
+ },
4403
+ {
4404
+ "name": "alignment",
4405
+ "description": "列表项的垂直对齐方式。可选值为:\n\n* `start`:顶部对齐\n* `center`:居中对齐\n* `end`:底部对齐",
4406
+ "value": {
4407
+ "type": [
4408
+ "'start'",
4409
+ "'center'",
4410
+ "'end'"
4411
+ ]
4412
+ },
4413
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-alignment"
4414
+ },
4415
+ {
4416
+ "name": "href",
4417
+ "description": "链接指向的页面的 URL。\n\n若指定了该属性,则组件内部会渲染为 `<a>` 元素,并可以使用链接相关的属性",
4418
+ "value": {
4419
+ "type": "string"
4420
+ },
4421
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-href"
4422
+ },
4423
+ {
4424
+ "name": "download",
4425
+ "description": "被下载的超链接目标。\n\n**Note**:仅在指定了 `href` 属性时可用",
4426
+ "value": {
4427
+ "type": "string"
4428
+ },
4429
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-download"
4430
+ },
4431
+ {
4432
+ "name": "target",
4433
+ "description": "在何处打开链接。可选值为:\n\n* `_blank`:在新窗口中打开链接\n* `_parent`:在父框架中打开链接\n* `_self`:默认。在相同的框架中打开链接\n* `_top`:在整个窗口中打开链接\n\n**Note**:仅在指定了 `href` 属性时可用",
4434
+ "value": {
4435
+ "type": [
4436
+ "'_blank'",
4437
+ "'_parent'",
4063
4438
  "'_self'",
4064
4439
  "'_top'"
4065
4440
  ]
4066
4441
  },
4067
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-target"
4442
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-target"
4068
4443
  },
4069
4444
  {
4070
4445
  "name": "rel",
@@ -4087,7 +4462,7 @@
4087
4462
  "'tag'"
4088
4463
  ]
4089
4464
  },
4090
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-rel"
4465
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-rel"
4091
4466
  },
4092
4467
  {
4093
4468
  "name": "autofocus",
@@ -4095,7 +4470,7 @@
4095
4470
  "value": {
4096
4471
  "type": "boolean"
4097
4472
  },
4098
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-autofocus"
4473
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-autofocus"
4099
4474
  },
4100
4475
  {
4101
4476
  "name": "tabIndex",
@@ -4103,408 +4478,162 @@
4103
4478
  "value": {
4104
4479
  "type": "number"
4105
4480
  },
4106
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-tabIndex"
4481
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-tabIndex"
4107
4482
  }
4108
4483
  ],
4109
4484
  "events": [
4110
4485
  {
4111
4486
  "name": "focus",
4112
4487
  "description": "获得焦点时触发",
4113
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-focus"
4488
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-event-focus"
4114
4489
  },
4115
4490
  {
4116
4491
  "name": "blur",
4117
4492
  "description": "失去焦点时触发",
4118
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-blur"
4119
- },
4120
- {
4121
- "name": "submenu-open",
4122
- "description": "子菜单开始打开时,事件被触发。可以通过调用 `event.preventDefault()` 阻止子菜单打开",
4123
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-submenu-open"
4124
- },
4125
- {
4126
- "name": "submenu-opened",
4127
- "description": "子菜单打开动画完成时,事件被触发",
4128
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-submenu-opened"
4129
- },
4130
- {
4131
- "name": "submenu-close",
4132
- "description": "子菜单开始关闭时,事件被触发。可以通过调用 `event.preventDefault()` 阻止子菜单关闭",
4133
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-submenu-close"
4134
- },
4135
- {
4136
- "name": "submenu-closed",
4137
- "description": "子菜单关闭动画完成时,事件被触发",
4138
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-submenu-closed"
4493
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-event-blur"
4139
4494
  }
4140
4495
  ]
4141
4496
  },
4142
4497
  "css": {
4498
+ "properties": [
4499
+ {
4500
+ "name": "--shape-corner",
4501
+ "description": "列表项的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](https://www.mdui.org/docs/2/styles/design-tokens#shape-corner)",
4502
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-properties-shape-corner"
4503
+ },
4504
+ {
4505
+ "name": "--shape-corner-rounded",
4506
+ "description": "指定了 `rounded` 时,列表项的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](https://www.mdui.org/docs/2/styles/design-tokens#shape-corner)",
4507
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-properties-shape-corner-rounded"
4508
+ }
4509
+ ],
4143
4510
  "parts": [
4144
4511
  {
4145
4512
  "name": "container",
4146
- "description": "菜单项的容器",
4147
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-container"
4513
+ "description": "列表项容器",
4514
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-container"
4148
4515
  },
4149
4516
  {
4150
4517
  "name": "icon",
4151
- "description": "左侧的图标",
4152
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-icon"
4153
- },
4154
- {
4155
- "name": "label",
4156
- "description": "文本内容",
4157
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-label"
4518
+ "description": "左侧图标",
4519
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-icon"
4158
4520
  },
4159
4521
  {
4160
4522
  "name": "end-icon",
4161
- "description": "右侧的图标",
4162
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-end-icon"
4523
+ "description": "右侧图标",
4524
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-end-icon"
4163
4525
  },
4164
4526
  {
4165
- "name": "end-text",
4166
- "description": "右侧的文本",
4167
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-end-text"
4527
+ "name": "body",
4528
+ "description": "中间部分",
4529
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-body"
4168
4530
  },
4169
4531
  {
4170
- "name": "selected-icon",
4171
- "description": "选中状态的图标",
4172
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-selected-icon"
4532
+ "name": "headline",
4533
+ "description": "主标题",
4534
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-headline"
4173
4535
  },
4174
4536
  {
4175
- "name": "submenu",
4176
- "description": "子菜单元素",
4177
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-submenu"
4537
+ "name": "description",
4538
+ "description": "副标题",
4539
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-description"
4178
4540
  }
4179
4541
  ]
4180
4542
  }
4181
4543
  },
4182
4544
  {
4183
- "name": "mdui-menu",
4184
- "description": "菜单组件。需与 `<mdui-menu-item>` 组件配合使用\n\n```html\n<mdui-menu>\n <mdui-menu-item>Item 1</mdui-menu-item>\n <mdui-menu-item>Item 2</mdui-menu-item>\n</mdui-menu>\n```",
4545
+ "name": "mdui-list-subheader",
4546
+ "description": "列表标题组件。需与 `<mdui-list>` 组件配合使用\n\n```html\n<mdui-list>\n <mdui-list-subheader>Subheader</mdui-list-subheader>\n <mdui-list-item>Item 1</mdui-list-item>\n <mdui-list-item>Item 2</mdui-list-item>\n</mdui-list>\n```",
4547
+ "priority": "highest",
4548
+ "doc-url": "https://www.mdui.org/docs/2/components/list",
4549
+ "slots": [
4550
+ {
4551
+ "name": "",
4552
+ "description": "文本",
4553
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-subheader-slot-"
4554
+ }
4555
+ ]
4556
+ },
4557
+ {
4558
+ "name": "mdui-list",
4559
+ "description": "列表组件。需与 `<mdui-list-item>` 组件配合使用\n\n```html\n<mdui-list>\n <mdui-list-subheader>Subheader</mdui-list-subheader>\n <mdui-list-item>Item 1</mdui-list-item>\n <mdui-list-item>Item 2</mdui-list-item>\n</mdui-list>\n```",
4560
+ "priority": "highest",
4561
+ "doc-url": "https://www.mdui.org/docs/2/components/list",
4562
+ "slots": [
4563
+ {
4564
+ "name": "",
4565
+ "description": "`<mdui-list-item>` 元素",
4566
+ "doc-url": "https://www.mdui.org/docs/2/components/list#list-slot-"
4567
+ }
4568
+ ]
4569
+ },
4570
+ {
4571
+ "name": "mdui-menu-item",
4572
+ "description": "菜单项组件\n\n```html\n<mdui-menu>\n <mdui-menu-item>Item 1</mdui-menu-item>\n <mdui-menu-item>Item 2</mdui-menu-item>\n</mdui-menu>\n```",
4185
4573
  "attributes": [
4186
4574
  {
4187
- "name": "selects",
4188
- "description": "菜单项的可选中状态。默认为不可选中。可选值为:\n\n* `single`:最多只能选中一个\n* `multiple`:可以选中多个",
4575
+ "name": "value",
4576
+ "description": "该菜单项的值",
4189
4577
  "value": {
4190
- "type": [
4191
- "'single'",
4192
- "'multiple'"
4193
- ]
4578
+ "type": "string"
4194
4579
  },
4195
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-selects"
4580
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-value"
4196
4581
  },
4197
4582
  {
4198
- "name": "value",
4199
- "description": "当前选中的 `<mdui-menu-item>` 的值\n\nNote:\n该属性的 HTML 属性始终为字符串,且仅在 `selects=\"single\"` 时可以通过 HTML 属性设置初始值;\n该属性的 JavaScript 属性值在 `selects=\"single\"` 时为字符串、在 `selects=\"multiple\"` 时为字符串数组。\n所以,在 `selects=\"multiple\"` 时,如果要修改该值,只能通过修改 JavaScript 属性值实现。",
4583
+ "name": "disabled",
4584
+ "description": "是否禁用该菜单项",
4200
4585
  "value": {
4201
- "type": [
4202
- "string",
4203
- "string[]"
4204
- ]
4586
+ "type": "boolean"
4205
4587
  },
4206
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-value"
4588
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-disabled"
4207
4589
  },
4208
4590
  {
4209
- "name": "dense",
4210
- "description": "菜单项是否使用更紧凑的布局",
4591
+ "name": "icon",
4592
+ "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置\n\n如果需要在左侧留出一个图标的位置,可以传入空字符串进行占位",
4211
4593
  "value": {
4212
- "type": "boolean"
4594
+ "type": "string"
4213
4595
  },
4214
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-dense"
4596
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-icon"
4215
4597
  },
4216
4598
  {
4217
- "name": "submenu-trigger",
4218
- "description": "子菜单的触发方式,支持传入多个值,用空格分隔。可选值为:\n\n* `click`:点击菜单项时打开子菜单\n* `hover`:鼠标悬浮到菜单项上时打开子菜单\n* `focus`:聚焦到菜单项上时打开子菜单\n* `manual`:使用了该值时,只能使用编程方式打开和关闭子菜单,且不能再指定其他触发方式",
4599
+ "name": "end-icon",
4600
+ "description": "右侧的 Material Icons 图标名。也可以通过 `slot=\"end-icon\"` 设置",
4219
4601
  "value": {
4220
- "type": [
4221
- "'click'",
4222
- "'hover'",
4223
- "'focus'",
4224
- "'manual'",
4225
- "string"
4226
- ]
4602
+ "type": "string"
4227
4603
  },
4228
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenu-trigger"
4604
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-end-icon"
4229
4605
  },
4230
4606
  {
4231
- "name": "submenu-open-delay",
4232
- "description": "通过 hover 触发子菜单打开时的延时,单位为毫秒",
4607
+ "name": "end-text",
4608
+ "description": "右侧的文本。也可以通过 `slot=\"end-text\"` 设置",
4233
4609
  "value": {
4234
- "type": "number"
4610
+ "type": "string"
4235
4611
  },
4236
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenu-open-delay"
4612
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-end-text"
4237
4613
  },
4238
4614
  {
4239
- "name": "submenu-close-delay",
4240
- "description": "通过 hover 触发子菜单关闭时的延时,单位为毫秒",
4615
+ "name": "selected-icon",
4616
+ "description": "选中状态的 Material Icons 图标名。也可以通过 `slot=\"selected-icon\"` 设置",
4241
4617
  "value": {
4242
- "type": "number"
4618
+ "type": "string"
4243
4619
  },
4244
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenu-close-delay"
4245
- }
4246
- ],
4247
- "priority": "highest",
4248
- "doc-url": "https://www.mdui.org/docs/2/components/menu",
4249
- "slots": [
4620
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-selected-icon"
4621
+ },
4250
4622
  {
4251
- "name": "",
4252
- "description": "子菜单项(`<mdui-menu-item>`)、分割线([`<mdui-divider>`](https://www.mdui.org/docs/2/components/divider))等元素",
4253
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-slot-"
4254
- }
4255
- ],
4256
- "js": {
4257
- "properties": [
4258
- {
4259
- "name": "selects",
4260
- "description": "菜单项的可选中状态。默认为不可选中。可选值为:\n\n* `single`:最多只能选中一个\n* `multiple`:可以选中多个",
4261
- "value": {
4262
- "type": [
4263
- "'single'",
4264
- "'multiple'"
4265
- ]
4266
- },
4267
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-selects"
4623
+ "name": "submenu-open",
4624
+ "description": "是否打开子菜单",
4625
+ "value": {
4626
+ "type": "boolean"
4268
4627
  },
4269
- {
4270
- "name": "value",
4271
- "description": "当前选中的 `<mdui-menu-item>` 的值\n\nNote:\n该属性的 HTML 属性始终为字符串,且仅在 `selects=\"single\"` 时可以通过 HTML 属性设置初始值;\n该属性的 JavaScript 属性值在 `selects=\"single\"` 时为字符串、在 `selects=\"multiple\"` 时为字符串数组。\n所以,在 `selects=\"multiple\"` 时,如果要修改该值,只能通过修改 JavaScript 属性值实现。",
4272
- "value": {
4273
- "type": [
4274
- "string",
4275
- "string[]"
4276
- ]
4277
- },
4278
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-value"
4628
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-submenu-open"
4629
+ },
4630
+ {
4631
+ "name": "href",
4632
+ "description": "链接指向的页面的 URL。\n\n若指定了该属性,则组件内部会渲染为 `<a>` 元素,并可以使用链接相关的属性",
4633
+ "value": {
4634
+ "type": "string"
4279
4635
  },
4280
- {
4281
- "name": "dense",
4282
- "description": "菜单项是否使用更紧凑的布局",
4283
- "value": {
4284
- "type": "boolean"
4285
- },
4286
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-dense"
4287
- },
4288
- {
4289
- "name": "submenuTrigger",
4290
- "description": "子菜单的触发方式,支持传入多个值,用空格分隔。可选值为:\n\n* `click`:点击菜单项时打开子菜单\n* `hover`:鼠标悬浮到菜单项上时打开子菜单\n* `focus`:聚焦到菜单项上时打开子菜单\n* `manual`:使用了该值时,只能使用编程方式打开和关闭子菜单,且不能再指定其他触发方式",
4291
- "value": {
4292
- "type": [
4293
- "'click'",
4294
- "'hover'",
4295
- "'focus'",
4296
- "'manual'",
4297
- "string"
4298
- ]
4299
- },
4300
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenuTrigger"
4301
- },
4302
- {
4303
- "name": "submenuOpenDelay",
4304
- "description": "通过 hover 触发子菜单打开时的延时,单位为毫秒",
4305
- "value": {
4306
- "type": "number"
4307
- },
4308
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenuOpenDelay"
4309
- },
4310
- {
4311
- "name": "submenuCloseDelay",
4312
- "description": "通过 hover 触发子菜单关闭时的延时,单位为毫秒",
4313
- "value": {
4314
- "type": "number"
4315
- },
4316
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenuCloseDelay"
4317
- }
4318
- ],
4319
- "events": [
4320
- {
4321
- "name": "change",
4322
- "description": "菜单项的选中状态变化时触发",
4323
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-event-change"
4324
- }
4325
- ]
4326
- },
4327
- "css": {
4328
- "properties": [
4329
- {
4330
- "name": "--shape-corner",
4331
- "description": "组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](https://www.mdui.org/docs/2/styles/design-tokens#shape-corner)",
4332
- "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-css-properties-shape-corner"
4333
- }
4334
- ]
4335
- }
4336
- },
4337
- {
4338
- "name": "mdui-linear-progress",
4339
- "description": "线性进度指示器组件\n\n```html\n<mdui-linear-progress></mdui-linear-progress>\n```",
4340
- "attributes": [
4341
- {
4342
- "name": "max",
4343
- "description": "进度指示器的最大值,默认为 1",
4344
- "value": {
4345
- "type": "number"
4346
- },
4347
- "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#attributes-max"
4348
- },
4349
- {
4350
- "name": "value",
4351
- "description": "进度指示器的当前值。若未指定该值,则为不确定状态",
4352
- "value": {
4353
- "type": "number"
4354
- },
4355
- "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#attributes-value"
4356
- }
4357
- ],
4358
- "priority": "highest",
4359
- "doc-url": "https://www.mdui.org/docs/2/components/linear-progress",
4360
- "js": {
4361
- "properties": [
4362
- {
4363
- "name": "max",
4364
- "description": "进度指示器的最大值,默认为 1",
4365
- "value": {
4366
- "type": "number"
4367
- },
4368
- "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#attributes-max"
4369
- },
4370
- {
4371
- "name": "value",
4372
- "description": "进度指示器的当前值。若未指定该值,则为不确定状态",
4373
- "value": {
4374
- "type": "number"
4375
- },
4376
- "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#attributes-value"
4377
- }
4378
- ]
4379
- },
4380
- "css": {
4381
- "properties": [
4382
- {
4383
- "name": "--shape-corner",
4384
- "description": "组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](https://www.mdui.org/docs/2/styles/design-tokens#shape-corner)",
4385
- "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#css-properties-shape-corner"
4386
- }
4387
- ],
4388
- "parts": [
4389
- {
4390
- "name": "indicator",
4391
- "description": "指示器",
4392
- "doc-url": "https://www.mdui.org/docs/2/components/linear-progress#css-parts-indicator"
4393
- }
4394
- ]
4395
- }
4396
- },
4397
- {
4398
- "name": "mdui-list-item",
4399
- "description": "列表项组件。需与 `<mdui-list>` 组件配合使用\n\n```html\n<mdui-list>\n <mdui-list-subheader>Subheader</mdui-list-subheader>\n <mdui-list-item>Item 1</mdui-list-item>\n <mdui-list-item>Item 2</mdui-list-item>\n</mdui-list>\n```",
4400
- "attributes": [
4401
- {
4402
- "name": "headline",
4403
- "description": "主文本。也可以通过 default slot 设置",
4404
- "value": {
4405
- "type": "string"
4406
- },
4407
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-headline"
4408
- },
4409
- {
4410
- "name": "headline-line",
4411
- "description": "主文本行数,超过行数限制后会截断显示。默认为没有行数限制。可选值为:\n\n* `1`:显示单行文本,超出后截断显示\n* `2`:显示两行文本,超出后截断显示\n* `3`:显示三行文本,超出后截断显示",
4412
- "value": {
4413
- "type": [
4414
- "1",
4415
- "2",
4416
- "3"
4417
- ]
4418
- },
4419
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-headline-line"
4420
- },
4421
- {
4422
- "name": "description",
4423
- "description": "副文本。也可以通过 `slot=\"description\"` 设置",
4424
- "value": {
4425
- "type": "string"
4426
- },
4427
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-description"
4428
- },
4429
- {
4430
- "name": "description-line",
4431
- "description": "副文本行数,超过行数限制后会截断显示。默认为没有行数限制。可选值为:\n\n* `1`:显示单行文本,超出后截断显示\n* `2`:显示两行文本,超出后截断显示\n* `3`:显示三行文本,超出后截断显示",
4432
- "value": {
4433
- "type": [
4434
- "1",
4435
- "2",
4436
- "3"
4437
- ]
4438
- },
4439
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-description-line"
4440
- },
4441
- {
4442
- "name": "icon",
4443
- "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置",
4444
- "value": {
4445
- "type": "string"
4446
- },
4447
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-icon"
4448
- },
4449
- {
4450
- "name": "end-icon",
4451
- "description": "右侧的 Material Icons 图标名。也可以通过 `slot=\"end-icon\"` 设置",
4452
- "value": {
4453
- "type": "string"
4454
- },
4455
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-end-icon"
4456
- },
4457
- {
4458
- "name": "disabled",
4459
- "description": "是否禁用该列表项,列表项将置灰,且其中的 [`<mdui-checkbox>`](https://www.mdui.org/docs/2/components/checkbox)、[`<mdui-radio>`](/docs/2/components/radio)、[`<mdui-switch>`](/docs/2/components/switch) 等都将禁用",
4460
- "value": {
4461
- "type": "boolean"
4462
- },
4463
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-disabled"
4464
- },
4465
- {
4466
- "name": "active",
4467
- "description": "是否激活该列表项",
4468
- "value": {
4469
- "type": "boolean"
4470
- },
4471
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-active"
4472
- },
4473
- {
4474
- "name": "nonclickable",
4475
- "description": "是否使列表项不可点击,但其中的 [`<mdui-checkbox>`](https://www.mdui.org/docs/2/components/checkbox)、[`<mdui-radio>`](/docs/2/components/radio)、[`<mdui-switch>`](/docs/2/components/switch) 等仍可进行交互",
4476
- "value": {
4477
- "type": "boolean"
4478
- },
4479
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-nonclickable"
4480
- },
4481
- {
4482
- "name": "rounded",
4483
- "description": "使用圆角形状的列表项",
4484
- "value": {
4485
- "type": "boolean"
4486
- },
4487
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-rounded"
4488
- },
4489
- {
4490
- "name": "alignment",
4491
- "description": "列表项的垂直对齐方式。可选值为:\n\n* `start`:顶部对齐\n* `center`:居中对齐\n* `end`:底部对齐",
4492
- "value": {
4493
- "type": [
4494
- "'start'",
4495
- "'center'",
4496
- "'end'"
4497
- ]
4498
- },
4499
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-alignment"
4500
- },
4501
- {
4502
- "name": "href",
4503
- "description": "链接指向的页面的 URL。\n\n若指定了该属性,则组件内部会渲染为 `<a>` 元素,并可以使用链接相关的属性",
4504
- "value": {
4505
- "type": "string"
4506
- },
4507
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-href"
4636
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-href"
4508
4637
  },
4509
4638
  {
4510
4639
  "name": "download",
@@ -4512,7 +4641,7 @@
4512
4641
  "value": {
4513
4642
  "type": "string"
4514
4643
  },
4515
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-download"
4644
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-download"
4516
4645
  },
4517
4646
  {
4518
4647
  "name": "target",
@@ -4525,7 +4654,7 @@
4525
4654
  "'_top'"
4526
4655
  ]
4527
4656
  },
4528
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-target"
4657
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-target"
4529
4658
  },
4530
4659
  {
4531
4660
  "name": "rel",
@@ -4548,7 +4677,7 @@
4548
4677
  "'tag'"
4549
4678
  ]
4550
4679
  },
4551
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-rel"
4680
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-rel"
4552
4681
  },
4553
4682
  {
4554
4683
  "name": "autofocus",
@@ -4556,95 +4685,81 @@
4556
4685
  "value": {
4557
4686
  "type": "boolean"
4558
4687
  },
4559
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-autofocus"
4688
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-autofocus"
4560
4689
  },
4561
4690
  {
4562
- "name": "tabIndex",
4691
+ "name": "tabindex",
4563
4692
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
4564
4693
  "value": {
4565
4694
  "type": "number"
4566
4695
  },
4567
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-tabIndex"
4696
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-tabindex"
4568
4697
  }
4569
4698
  ],
4570
4699
  "priority": "highest",
4571
- "doc-url": "https://www.mdui.org/docs/2/components/list",
4700
+ "doc-url": "https://www.mdui.org/docs/2/components/menu",
4572
4701
  "slots": [
4573
4702
  {
4574
4703
  "name": "",
4575
- "description": "主文本",
4576
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-"
4577
- },
4578
- {
4579
- "name": "description",
4580
- "description": "副文本",
4581
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-description"
4704
+ "description": "菜单项的文本",
4705
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-"
4582
4706
  },
4583
4707
  {
4584
4708
  "name": "icon",
4585
- "description": "列表项左侧的元素",
4586
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-icon"
4709
+ "description": "菜单项左侧图标",
4710
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-icon"
4587
4711
  },
4588
4712
  {
4589
4713
  "name": "end-icon",
4590
- "description": "列表项右侧的元素",
4591
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-end-icon"
4714
+ "description": "菜单项右侧图标",
4715
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-end-icon"
4716
+ },
4717
+ {
4718
+ "name": "end-text",
4719
+ "description": "菜单右侧的文本",
4720
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-end-text"
4721
+ },
4722
+ {
4723
+ "name": "selected-icon",
4724
+ "description": "选中状态的图标",
4725
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-selected-icon"
4726
+ },
4727
+ {
4728
+ "name": "submenu",
4729
+ "description": "子菜单",
4730
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-submenu"
4592
4731
  },
4593
4732
  {
4594
4733
  "name": "custom",
4595
4734
  "description": "任意自定义内容",
4596
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-slot-custom"
4735
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-slot-custom"
4597
4736
  }
4598
4737
  ],
4599
4738
  "js": {
4600
4739
  "properties": [
4601
4740
  {
4602
- "name": "headline",
4603
- "description": "主文本。也可以通过 default slot 设置",
4604
- "value": {
4605
- "type": "string"
4606
- },
4607
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-headline"
4608
- },
4609
- {
4610
- "name": "headlineLine",
4611
- "description": "主文本行数,超过行数限制后会截断显示。默认为没有行数限制。可选值为:\n\n* `1`:显示单行文本,超出后截断显示\n* `2`:显示两行文本,超出后截断显示\n* `3`:显示三行文本,超出后截断显示",
4612
- "value": {
4613
- "type": [
4614
- "1",
4615
- "2",
4616
- "3"
4617
- ]
4618
- },
4619
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-headlineLine"
4620
- },
4621
- {
4622
- "name": "description",
4623
- "description": "副文本。也可以通过 `slot=\"description\"` 设置",
4741
+ "name": "value",
4742
+ "description": "该菜单项的值",
4624
4743
  "value": {
4625
4744
  "type": "string"
4626
4745
  },
4627
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-description"
4746
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-value"
4628
4747
  },
4629
4748
  {
4630
- "name": "descriptionLine",
4631
- "description": "副文本行数,超过行数限制后会截断显示。默认为没有行数限制。可选值为:\n\n* `1`:显示单行文本,超出后截断显示\n* `2`:显示两行文本,超出后截断显示\n* `3`:显示三行文本,超出后截断显示",
4749
+ "name": "disabled",
4750
+ "description": "是否禁用该菜单项",
4632
4751
  "value": {
4633
- "type": [
4634
- "1",
4635
- "2",
4636
- "3"
4637
- ]
4752
+ "type": "boolean"
4638
4753
  },
4639
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-descriptionLine"
4754
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-disabled"
4640
4755
  },
4641
4756
  {
4642
4757
  "name": "icon",
4643
- "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置",
4758
+ "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置\n\n如果需要在左侧留出一个图标的位置,可以传入空字符串进行占位",
4644
4759
  "value": {
4645
4760
  "type": "string"
4646
4761
  },
4647
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-icon"
4762
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-icon"
4648
4763
  },
4649
4764
  {
4650
4765
  "name": "endIcon",
@@ -4652,51 +4767,31 @@
4652
4767
  "value": {
4653
4768
  "type": "string"
4654
4769
  },
4655
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-endIcon"
4656
- },
4657
- {
4658
- "name": "disabled",
4659
- "description": "是否禁用该列表项,列表项将置灰,且其中的 [`<mdui-checkbox>`](https://www.mdui.org/docs/2/components/checkbox)、[`<mdui-radio>`](/docs/2/components/radio)、[`<mdui-switch>`](/docs/2/components/switch) 等都将禁用",
4660
- "value": {
4661
- "type": "boolean"
4662
- },
4663
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-disabled"
4770
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-endIcon"
4664
4771
  },
4665
4772
  {
4666
- "name": "active",
4667
- "description": "是否激活该列表项",
4773
+ "name": "endText",
4774
+ "description": "右侧的文本。也可以通过 `slot=\"end-text\"` 设置",
4668
4775
  "value": {
4669
- "type": "boolean"
4776
+ "type": "string"
4670
4777
  },
4671
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-active"
4778
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-endText"
4672
4779
  },
4673
4780
  {
4674
- "name": "nonclickable",
4675
- "description": "是否使列表项不可点击,但其中的 [`<mdui-checkbox>`](https://www.mdui.org/docs/2/components/checkbox)、[`<mdui-radio>`](/docs/2/components/radio)、[`<mdui-switch>`](/docs/2/components/switch) 等仍可进行交互",
4781
+ "name": "selectedIcon",
4782
+ "description": "选中状态的 Material Icons 图标名。也可以通过 `slot=\"selected-icon\"` 设置",
4676
4783
  "value": {
4677
- "type": "boolean"
4784
+ "type": "string"
4678
4785
  },
4679
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-nonclickable"
4786
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-selectedIcon"
4680
4787
  },
4681
4788
  {
4682
- "name": "rounded",
4683
- "description": "使用圆角形状的列表项",
4789
+ "name": "submenuOpen",
4790
+ "description": "是否打开子菜单",
4684
4791
  "value": {
4685
4792
  "type": "boolean"
4686
4793
  },
4687
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-rounded"
4688
- },
4689
- {
4690
- "name": "alignment",
4691
- "description": "列表项的垂直对齐方式。可选值为:\n\n* `start`:顶部对齐\n* `center`:居中对齐\n* `end`:底部对齐",
4692
- "value": {
4693
- "type": [
4694
- "'start'",
4695
- "'center'",
4696
- "'end'"
4697
- ]
4698
- },
4699
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-alignment"
4794
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-submenuOpen"
4700
4795
  },
4701
4796
  {
4702
4797
  "name": "href",
@@ -4704,7 +4799,7 @@
4704
4799
  "value": {
4705
4800
  "type": "string"
4706
4801
  },
4707
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-href"
4802
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-href"
4708
4803
  },
4709
4804
  {
4710
4805
  "name": "download",
@@ -4712,7 +4807,7 @@
4712
4807
  "value": {
4713
4808
  "type": "string"
4714
4809
  },
4715
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-download"
4810
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-download"
4716
4811
  },
4717
4812
  {
4718
4813
  "name": "target",
@@ -4725,7 +4820,7 @@
4725
4820
  "'_top'"
4726
4821
  ]
4727
4822
  },
4728
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-target"
4823
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-target"
4729
4824
  },
4730
4825
  {
4731
4826
  "name": "rel",
@@ -4748,7 +4843,7 @@
4748
4843
  "'tag'"
4749
4844
  ]
4750
4845
  },
4751
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-rel"
4846
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-rel"
4752
4847
  },
4753
4848
  {
4754
4849
  "name": "autofocus",
@@ -4756,7 +4851,7 @@
4756
4851
  "value": {
4757
4852
  "type": "boolean"
4758
4853
  },
4759
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-autofocus"
4854
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-autofocus"
4760
4855
  },
4761
4856
  {
4762
4857
  "name": "tabIndex",
@@ -4764,328 +4859,233 @@
4764
4859
  "value": {
4765
4860
  "type": "number"
4766
4861
  },
4767
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-attributes-tabIndex"
4862
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-attributes-tabIndex"
4768
4863
  }
4769
4864
  ],
4770
4865
  "events": [
4771
4866
  {
4772
4867
  "name": "focus",
4773
4868
  "description": "获得焦点时触发",
4774
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-event-focus"
4869
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-focus"
4775
4870
  },
4776
4871
  {
4777
4872
  "name": "blur",
4778
4873
  "description": "失去焦点时触发",
4779
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-event-blur"
4780
- }
4781
- ]
4782
- },
4783
- "css": {
4784
- "properties": [
4874
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-blur"
4875
+ },
4785
4876
  {
4786
- "name": "--shape-corner",
4787
- "description": "列表项的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](https://www.mdui.org/docs/2/styles/design-tokens#shape-corner)",
4788
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-properties-shape-corner"
4877
+ "name": "submenu-open",
4878
+ "description": "子菜单开始打开时,事件被触发。可以通过调用 `event.preventDefault()` 阻止子菜单打开",
4879
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-submenu-open"
4789
4880
  },
4790
4881
  {
4791
- "name": "--shape-corner-rounded",
4792
- "description": "指定了 `rounded` 时,列表项的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](https://www.mdui.org/docs/2/styles/design-tokens#shape-corner)",
4793
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-properties-shape-corner-rounded"
4882
+ "name": "submenu-opened",
4883
+ "description": "子菜单打开动画完成时,事件被触发",
4884
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-submenu-opened"
4885
+ },
4886
+ {
4887
+ "name": "submenu-close",
4888
+ "description": "子菜单开始关闭时,事件被触发。可以通过调用 `event.preventDefault()` 阻止子菜单关闭",
4889
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-submenu-close"
4890
+ },
4891
+ {
4892
+ "name": "submenu-closed",
4893
+ "description": "子菜单关闭动画完成时,事件被触发",
4894
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-event-submenu-closed"
4794
4895
  }
4795
- ],
4896
+ ]
4897
+ },
4898
+ "css": {
4796
4899
  "parts": [
4797
4900
  {
4798
4901
  "name": "container",
4799
- "description": "列表项容器",
4800
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-container"
4902
+ "description": "菜单项的容器",
4903
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-container"
4801
4904
  },
4802
4905
  {
4803
4906
  "name": "icon",
4804
- "description": "左侧图标",
4805
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-icon"
4907
+ "description": "左侧的图标",
4908
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-icon"
4909
+ },
4910
+ {
4911
+ "name": "label",
4912
+ "description": "文本内容",
4913
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-label"
4806
4914
  },
4807
4915
  {
4808
4916
  "name": "end-icon",
4809
- "description": "右侧图标",
4810
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-end-icon"
4917
+ "description": "右侧的图标",
4918
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-end-icon"
4811
4919
  },
4812
4920
  {
4813
- "name": "body",
4814
- "description": "中间部分",
4815
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-body"
4921
+ "name": "end-text",
4922
+ "description": "右侧的文本",
4923
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-end-text"
4816
4924
  },
4817
4925
  {
4818
- "name": "headline",
4819
- "description": "主标题",
4820
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-headline"
4926
+ "name": "selected-icon",
4927
+ "description": "选中状态的图标",
4928
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-selected-icon"
4821
4929
  },
4822
4930
  {
4823
- "name": "description",
4824
- "description": "副标题",
4825
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-item-css-parts-description"
4931
+ "name": "submenu",
4932
+ "description": "子菜单元素",
4933
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-item-css-parts-submenu"
4826
4934
  }
4827
4935
  ]
4828
4936
  }
4829
4937
  },
4830
4938
  {
4831
- "name": "mdui-list-subheader",
4832
- "description": "列表标题组件。需与 `<mdui-list>` 组件配合使用\n\n```html\n<mdui-list>\n <mdui-list-subheader>Subheader</mdui-list-subheader>\n <mdui-list-item>Item 1</mdui-list-item>\n <mdui-list-item>Item 2</mdui-list-item>\n</mdui-list>\n```",
4833
- "priority": "highest",
4834
- "doc-url": "https://www.mdui.org/docs/2/components/list",
4835
- "slots": [
4836
- {
4837
- "name": "",
4838
- "description": "文本",
4839
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-subheader-slot-"
4840
- }
4841
- ]
4842
- },
4843
- {
4844
- "name": "mdui-list",
4845
- "description": "列表组件。需与 `<mdui-list-item>` 组件配合使用\n\n```html\n<mdui-list>\n <mdui-list-subheader>Subheader</mdui-list-subheader>\n <mdui-list-item>Item 1</mdui-list-item>\n <mdui-list-item>Item 2</mdui-list-item>\n</mdui-list>\n```",
4846
- "priority": "highest",
4847
- "doc-url": "https://www.mdui.org/docs/2/components/list",
4848
- "slots": [
4849
- {
4850
- "name": "",
4851
- "description": "`<mdui-list-item>` 元素",
4852
- "doc-url": "https://www.mdui.org/docs/2/components/list#list-slot-"
4853
- }
4854
- ]
4855
- },
4856
- {
4857
- "name": "mdui-dropdown",
4858
- "description": "下拉组件\n\n```html\n<mdui-dropdown>\n <mdui-button slot=\"trigger\">open dropdown</mdui-button>\n <mdui-menu>\n <mdui-menu-item>Item 1</mdui-menu-item>\n <mdui-menu-item>Item 2</mdui-menu-item>\n </mdui-menu>\n</mdui-dropdown>\n```",
4939
+ "name": "mdui-menu",
4940
+ "description": "菜单组件。需与 `<mdui-menu-item>` 组件配合使用\n\n```html\n<mdui-menu>\n <mdui-menu-item>Item 1</mdui-menu-item>\n <mdui-menu-item>Item 2</mdui-menu-item>\n</mdui-menu>\n```",
4859
4941
  "attributes": [
4860
4942
  {
4861
- "name": "open",
4862
- "description": "dropdown 是否打开",
4863
- "value": {
4864
- "type": "boolean"
4865
- },
4866
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-open"
4867
- },
4868
- {
4869
- "name": "disabled",
4870
- "description": "是否禁用 dropdown",
4871
- "value": {
4872
- "type": "boolean"
4873
- },
4874
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-disabled"
4875
- },
4876
- {
4877
- "name": "trigger",
4878
- "description": "dropdown 的触发方式,支持传入多个值,用空格分隔。可选值为:\n\n* `click`:点击时触发\n* `hover`:鼠标悬浮触发\n* `focus`:聚焦时触发\n* `contextmenu`:鼠标右键点击、或触摸长按时触发\n* `manual`:使用了该值时,只能使用编程方式打开和关闭 dropdown,且不能再指定其他触发方式",
4943
+ "name": "selects",
4944
+ "description": "菜单项的可选中状态。默认为不可选中。可选值为:\n\n* `single`:最多只能选中一个\n* `multiple`:可以选中多个",
4879
4945
  "value": {
4880
4946
  "type": [
4881
- "'click'",
4882
- "'hover'",
4883
- "'focus'",
4884
- "'contextmenu'",
4885
- "'manual'",
4886
- "string"
4947
+ "'single'",
4948
+ "'multiple'"
4887
4949
  ]
4888
4950
  },
4889
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-trigger"
4951
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-selects"
4890
4952
  },
4891
4953
  {
4892
- "name": "placement",
4893
- "description": "dropdown 内容的位置。可选值为:\n\n* `auto`:自动判断位置\n* `top-start`:位于上方,且左对齐\n* `top`:位于上方,且居中对齐\n* `top-end`:位于上方,且右对齐\n* `bottom-start`:位于下方,且左对齐\n* `bottom`:位于下方,且居中对齐\n* `bottom-end`:位于下方,且右对齐\n* `left-start`:位于左侧,且顶部对齐\n* `left`:位于左侧,且居中对齐\n* `left-end`:位于左侧,且底部对齐\n* `right-start`:位于右侧,且顶部对齐\n* `right`:位于右侧,且居中对齐\n* `right-end`:位于右侧,且底部对齐",
4954
+ "name": "value",
4955
+ "description": "当前选中的 `<mdui-menu-item>` 的值\n\nNote:\n该属性的 HTML 属性始终为字符串,且仅在 `selects=\"single\"` 时可以通过 HTML 属性设置初始值;\n该属性的 JavaScript 属性值在 `selects=\"single\"` 时为字符串、在 `selects=\"multiple\"` 时为字符串数组。\n所以,在 `selects=\"multiple\"` 时,如果要修改该值,只能通过修改 JavaScript 属性值实现。",
4894
4956
  "value": {
4895
4957
  "type": [
4896
- "'auto'",
4897
- "'top-start'",
4898
- "'top'",
4899
- "'top-end'",
4900
- "'bottom-start'",
4901
- "'bottom'",
4902
- "'bottom-end'",
4903
- "'left-start'",
4904
- "'left'",
4905
- "'left-end'",
4906
- "'right-start'",
4907
- "'right'",
4908
- "'right-end'"
4958
+ "string",
4959
+ "string[]"
4909
4960
  ]
4910
4961
  },
4911
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-placement"
4962
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-value"
4912
4963
  },
4913
4964
  {
4914
- "name": "stay-open-on-click",
4915
- "description": "在点击 [`<mdui-menu-item>`](https://www.mdui.org/docs/2/components/menu#menu-item-api) 元素后,是否仍保持 dropdown 为打开状态",
4965
+ "name": "dense",
4966
+ "description": "菜单项是否使用更紧凑的布局",
4916
4967
  "value": {
4917
4968
  "type": "boolean"
4918
4969
  },
4919
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-stay-open-on-click"
4970
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-dense"
4920
4971
  },
4921
4972
  {
4922
- "name": "open-delay",
4923
- "description": "通过 hover 触发 dropdown 打开时的延时,单位为毫秒",
4973
+ "name": "submenu-trigger",
4974
+ "description": "子菜单的触发方式,支持传入多个值,用空格分隔。可选值为:\n\n* `click`:点击菜单项时打开子菜单\n* `hover`:鼠标悬浮到菜单项上时打开子菜单\n* `focus`:聚焦到菜单项上时打开子菜单\n* `manual`:使用了该值时,只能使用编程方式打开和关闭子菜单,且不能再指定其他触发方式",
4924
4975
  "value": {
4925
- "type": "number"
4976
+ "type": [
4977
+ "'click'",
4978
+ "'hover'",
4979
+ "'focus'",
4980
+ "'manual'",
4981
+ "string"
4982
+ ]
4926
4983
  },
4927
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-open-delay"
4984
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenu-trigger"
4928
4985
  },
4929
4986
  {
4930
- "name": "close-delay",
4931
- "description": "通过 hover 触发 dropdown 关闭时的延时,单位为毫秒",
4987
+ "name": "submenu-open-delay",
4988
+ "description": "通过 hover 触发子菜单打开时的延时,单位为毫秒",
4932
4989
  "value": {
4933
4990
  "type": "number"
4934
4991
  },
4935
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-close-delay"
4992
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenu-open-delay"
4936
4993
  },
4937
4994
  {
4938
- "name": "open-on-pointer",
4939
- "description": "是否在触发 dropdown 时的光标所在的位置打开 dropdown。通常用于在打开鼠标右键菜单时使用",
4995
+ "name": "submenu-close-delay",
4996
+ "description": "通过 hover 触发子菜单关闭时的延时,单位为毫秒",
4940
4997
  "value": {
4941
- "type": "boolean"
4998
+ "type": "number"
4942
4999
  },
4943
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-open-on-pointer"
5000
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenu-close-delay"
4944
5001
  }
4945
5002
  ],
4946
5003
  "priority": "highest",
4947
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown",
5004
+ "doc-url": "https://www.mdui.org/docs/2/components/menu",
4948
5005
  "slots": [
4949
5006
  {
4950
5007
  "name": "",
4951
- "description": "dropdown 的内容",
4952
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#slot-"
4953
- },
4954
- {
4955
- "name": "trigger",
4956
- "description": "触发 dropdown 的元素,例如 [`<mdui-button>`](https://www.mdui.org/docs/2/components/button) 元素",
4957
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#slot-trigger"
5008
+ "description": "子菜单项(`<mdui-menu-item>`)、分割线([`<mdui-divider>`](https://www.mdui.org/docs/2/components/divider))等元素",
5009
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-slot-"
4958
5010
  }
4959
5011
  ],
4960
5012
  "js": {
4961
5013
  "properties": [
4962
5014
  {
4963
- "name": "open",
4964
- "description": "dropdown 是否打开",
4965
- "value": {
4966
- "type": "boolean"
4967
- },
4968
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-open"
4969
- },
4970
- {
4971
- "name": "disabled",
4972
- "description": "是否禁用 dropdown",
4973
- "value": {
4974
- "type": "boolean"
4975
- },
4976
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-disabled"
4977
- },
4978
- {
4979
- "name": "trigger",
4980
- "description": "dropdown 的触发方式,支持传入多个值,用空格分隔。可选值为:\n\n* `click`:点击时触发\n* `hover`:鼠标悬浮触发\n* `focus`:聚焦时触发\n* `contextmenu`:鼠标右键点击、或触摸长按时触发\n* `manual`:使用了该值时,只能使用编程方式打开和关闭 dropdown,且不能再指定其他触发方式",
5015
+ "name": "selects",
5016
+ "description": "菜单项的可选中状态。默认为不可选中。可选值为:\n\n* `single`:最多只能选中一个\n* `multiple`:可以选中多个",
4981
5017
  "value": {
4982
5018
  "type": [
4983
- "'click'",
4984
- "'hover'",
4985
- "'focus'",
4986
- "'contextmenu'",
4987
- "'manual'",
4988
- "string"
5019
+ "'single'",
5020
+ "'multiple'"
4989
5021
  ]
4990
5022
  },
4991
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-trigger"
5023
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-selects"
4992
5024
  },
4993
5025
  {
4994
- "name": "placement",
4995
- "description": "dropdown 内容的位置。可选值为:\n\n* `auto`:自动判断位置\n* `top-start`:位于上方,且左对齐\n* `top`:位于上方,且居中对齐\n* `top-end`:位于上方,且右对齐\n* `bottom-start`:位于下方,且左对齐\n* `bottom`:位于下方,且居中对齐\n* `bottom-end`:位于下方,且右对齐\n* `left-start`:位于左侧,且顶部对齐\n* `left`:位于左侧,且居中对齐\n* `left-end`:位于左侧,且底部对齐\n* `right-start`:位于右侧,且顶部对齐\n* `right`:位于右侧,且居中对齐\n* `right-end`:位于右侧,且底部对齐",
5026
+ "name": "value",
5027
+ "description": "当前选中的 `<mdui-menu-item>` 的值\n\nNote:\n该属性的 HTML 属性始终为字符串,且仅在 `selects=\"single\"` 时可以通过 HTML 属性设置初始值;\n该属性的 JavaScript 属性值在 `selects=\"single\"` 时为字符串、在 `selects=\"multiple\"` 时为字符串数组。\n所以,在 `selects=\"multiple\"` 时,如果要修改该值,只能通过修改 JavaScript 属性值实现。",
4996
5028
  "value": {
4997
5029
  "type": [
4998
- "'auto'",
4999
- "'top-start'",
5000
- "'top'",
5001
- "'top-end'",
5002
- "'bottom-start'",
5003
- "'bottom'",
5004
- "'bottom-end'",
5005
- "'left-start'",
5006
- "'left'",
5007
- "'left-end'",
5008
- "'right-start'",
5009
- "'right'",
5010
- "'right-end'"
5030
+ "string",
5031
+ "string[]"
5011
5032
  ]
5012
5033
  },
5013
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-placement"
5034
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-value"
5014
5035
  },
5015
5036
  {
5016
- "name": "stayOpenOnClick",
5017
- "description": "在点击 [`<mdui-menu-item>`](https://www.mdui.org/docs/2/components/menu#menu-item-api) 元素后,是否仍保持 dropdown 为打开状态",
5037
+ "name": "dense",
5038
+ "description": "菜单项是否使用更紧凑的布局",
5018
5039
  "value": {
5019
5040
  "type": "boolean"
5020
5041
  },
5021
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-stayOpenOnClick"
5042
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-dense"
5022
5043
  },
5023
5044
  {
5024
- "name": "openDelay",
5025
- "description": "通过 hover 触发 dropdown 打开时的延时,单位为毫秒",
5045
+ "name": "submenuTrigger",
5046
+ "description": "子菜单的触发方式,支持传入多个值,用空格分隔。可选值为:\n\n* `click`:点击菜单项时打开子菜单\n* `hover`:鼠标悬浮到菜单项上时打开子菜单\n* `focus`:聚焦到菜单项上时打开子菜单\n* `manual`:使用了该值时,只能使用编程方式打开和关闭子菜单,且不能再指定其他触发方式",
5026
5047
  "value": {
5027
- "type": "number"
5048
+ "type": [
5049
+ "'click'",
5050
+ "'hover'",
5051
+ "'focus'",
5052
+ "'manual'",
5053
+ "string"
5054
+ ]
5028
5055
  },
5029
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-openDelay"
5056
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenuTrigger"
5030
5057
  },
5031
5058
  {
5032
- "name": "closeDelay",
5033
- "description": "通过 hover 触发 dropdown 关闭时的延时,单位为毫秒",
5059
+ "name": "submenuOpenDelay",
5060
+ "description": "通过 hover 触发子菜单打开时的延时,单位为毫秒",
5034
5061
  "value": {
5035
5062
  "type": "number"
5036
5063
  },
5037
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-closeDelay"
5064
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenuOpenDelay"
5038
5065
  },
5039
5066
  {
5040
- "name": "openOnPointer",
5041
- "description": "是否在触发 dropdown 时的光标所在的位置打开 dropdown。通常用于在打开鼠标右键菜单时使用",
5067
+ "name": "submenuCloseDelay",
5068
+ "description": "通过 hover 触发子菜单关闭时的延时,单位为毫秒",
5042
5069
  "value": {
5043
- "type": "boolean"
5070
+ "type": "number"
5044
5071
  },
5045
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#attributes-openOnPointer"
5072
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-attributes-submenuCloseDelay"
5046
5073
  }
5047
5074
  ],
5048
5075
  "events": [
5049
5076
  {
5050
- "name": "open",
5051
- "description": "dropdown 开始打开时,事件被触发。可以通过调用 `event.preventDefault()` 阻止 dropdown 打开",
5052
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#event-open"
5053
- },
5054
- {
5055
- "name": "opened",
5056
- "description": "dropdown 打开动画完成时,事件被触发",
5057
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#event-opened"
5058
- },
5059
- {
5060
- "name": "close",
5061
- "description": "dropdown 开始关闭时,事件被触发。可以通过调用 `event.preventDefault()` 阻止 dropdown 关闭",
5062
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#event-close"
5063
- },
5064
- {
5065
- "name": "closed",
5066
- "description": "dropdown 关闭动画完成时,事件被触发",
5067
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#event-closed"
5077
+ "name": "change",
5078
+ "description": "菜单项的选中状态变化时触发",
5079
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-event-change"
5068
5080
  }
5069
5081
  ]
5070
5082
  },
5071
5083
  "css": {
5072
5084
  "properties": [
5073
5085
  {
5074
- "name": "--z-index",
5075
- "description": "组件的 CSS 的 `z-index` 值",
5076
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#css-properties-z-index"
5077
- }
5078
- ],
5079
- "parts": [
5080
- {
5081
- "name": "trigger",
5082
- "description": "触发 dropdown 的元素的容器,即 `trigger` slot 的容器",
5083
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#css-parts-trigger"
5084
- },
5085
- {
5086
- "name": "panel",
5087
- "description": "dropdown 内容的容器",
5088
- "doc-url": "https://www.mdui.org/docs/2/components/dropdown#css-parts-panel"
5086
+ "name": "--shape-corner",
5087
+ "description": "组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](https://www.mdui.org/docs/2/styles/design-tokens#shape-corner)",
5088
+ "doc-url": "https://www.mdui.org/docs/2/components/menu#menu-css-properties-shape-corner"
5089
5089
  }
5090
5090
  ]
5091
5091
  }
@@ -5179,12 +5179,12 @@
5179
5179
  "doc-url": "https://www.mdui.org/docs/2/components/navigation-bar#navigation-bar-item-attributes-autofocus"
5180
5180
  },
5181
5181
  {
5182
- "name": "tabIndex",
5182
+ "name": "tabindex",
5183
5183
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
5184
5184
  "value": {
5185
5185
  "type": "number"
5186
5186
  },
5187
- "doc-url": "https://www.mdui.org/docs/2/components/navigation-bar#navigation-bar-item-attributes-tabIndex"
5187
+ "doc-url": "https://www.mdui.org/docs/2/components/navigation-bar#navigation-bar-item-attributes-tabindex"
5188
5188
  }
5189
5189
  ],
5190
5190
  "priority": "highest",
@@ -5838,12 +5838,12 @@
5838
5838
  "doc-url": "https://www.mdui.org/docs/2/components/navigation-rail#navigation-rail-item-attributes-autofocus"
5839
5839
  },
5840
5840
  {
5841
- "name": "tabIndex",
5841
+ "name": "tabindex",
5842
5842
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
5843
5843
  "value": {
5844
5844
  "type": "number"
5845
5845
  },
5846
- "doc-url": "https://www.mdui.org/docs/2/components/navigation-rail#navigation-rail-item-attributes-tabIndex"
5846
+ "doc-url": "https://www.mdui.org/docs/2/components/navigation-rail#navigation-rail-item-attributes-tabindex"
5847
5847
  }
5848
5848
  ],
5849
5849
  "priority": "highest",
@@ -6390,12 +6390,12 @@
6390
6390
  "doc-url": "https://www.mdui.org/docs/2/components/radio#radio-attributes-autofocus"
6391
6391
  },
6392
6392
  {
6393
- "name": "tabIndex",
6393
+ "name": "tabindex",
6394
6394
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
6395
6395
  "value": {
6396
6396
  "type": "number"
6397
6397
  },
6398
- "doc-url": "https://www.mdui.org/docs/2/components/radio#radio-attributes-tabIndex"
6398
+ "doc-url": "https://www.mdui.org/docs/2/components/radio#radio-attributes-tabindex"
6399
6399
  }
6400
6400
  ],
6401
6401
  "priority": "highest",
@@ -6532,12 +6532,12 @@
6532
6532
  "doc-url": "https://www.mdui.org/docs/2/components/range-slider#attributes-autofocus"
6533
6533
  },
6534
6534
  {
6535
- "name": "tabIndex",
6535
+ "name": "tabindex",
6536
6536
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
6537
6537
  "value": {
6538
6538
  "type": "number"
6539
6539
  },
6540
- "doc-url": "https://www.mdui.org/docs/2/components/range-slider#attributes-tabIndex"
6540
+ "doc-url": "https://www.mdui.org/docs/2/components/range-slider#attributes-tabindex"
6541
6541
  },
6542
6542
  {
6543
6543
  "name": "min",
@@ -7067,12 +7067,12 @@
7067
7067
  "doc-url": "https://www.mdui.org/docs/2/components/segmented-button#segmented-button-attributes-autofocus"
7068
7068
  },
7069
7069
  {
7070
- "name": "tabIndex",
7070
+ "name": "tabindex",
7071
7071
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
7072
7072
  "value": {
7073
7073
  "type": "number"
7074
7074
  },
7075
- "doc-url": "https://www.mdui.org/docs/2/components/segmented-button#segmented-button-attributes-tabIndex"
7075
+ "doc-url": "https://www.mdui.org/docs/2/components/segmented-button#segmented-button-attributes-tabindex"
7076
7076
  },
7077
7077
  {
7078
7078
  "name": "disabled",
@@ -7654,12 +7654,12 @@
7654
7654
  "doc-url": "https://www.mdui.org/docs/2/components/select#attributes-autofocus"
7655
7655
  },
7656
7656
  {
7657
- "name": "tabIndex",
7657
+ "name": "tabindex",
7658
7658
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
7659
7659
  "value": {
7660
7660
  "type": "number"
7661
7661
  },
7662
- "doc-url": "https://www.mdui.org/docs/2/components/select#attributes-tabIndex"
7662
+ "doc-url": "https://www.mdui.org/docs/2/components/select#attributes-tabindex"
7663
7663
  }
7664
7664
  ],
7665
7665
  "priority": "highest",
@@ -7991,12 +7991,12 @@
7991
7991
  "doc-url": "https://www.mdui.org/docs/2/components/slider#attributes-autofocus"
7992
7992
  },
7993
7993
  {
7994
- "name": "tabIndex",
7994
+ "name": "tabindex",
7995
7995
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
7996
7996
  "value": {
7997
7997
  "type": "number"
7998
7998
  },
7999
- "doc-url": "https://www.mdui.org/docs/2/components/slider#attributes-tabIndex"
7999
+ "doc-url": "https://www.mdui.org/docs/2/components/slider#attributes-tabindex"
8000
8000
  },
8001
8001
  {
8002
8002
  "name": "min",
@@ -8584,12 +8584,12 @@
8584
8584
  "doc-url": "https://www.mdui.org/docs/2/components/switch#attributes-autofocus"
8585
8585
  },
8586
8586
  {
8587
- "name": "tabIndex",
8587
+ "name": "tabindex",
8588
8588
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
8589
8589
  "value": {
8590
8590
  "type": "number"
8591
8591
  },
8592
- "doc-url": "https://www.mdui.org/docs/2/components/switch#attributes-tabIndex"
8592
+ "doc-url": "https://www.mdui.org/docs/2/components/switch#attributes-tabindex"
8593
8593
  }
8594
8594
  ],
8595
8595
  "priority": "highest",
@@ -8850,12 +8850,12 @@
8850
8850
  "doc-url": "https://www.mdui.org/docs/2/components/tabs#tab-attributes-autofocus"
8851
8851
  },
8852
8852
  {
8853
- "name": "tabIndex",
8853
+ "name": "tabindex",
8854
8854
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
8855
8855
  "value": {
8856
8856
  "type": "number"
8857
8857
  },
8858
- "doc-url": "https://www.mdui.org/docs/2/components/tabs#tab-attributes-tabIndex"
8858
+ "doc-url": "https://www.mdui.org/docs/2/components/tabs#tab-attributes-tabindex"
8859
8859
  }
8860
8860
  ],
8861
8861
  "priority": "highest",
@@ -9474,12 +9474,12 @@
9474
9474
  "doc-url": "https://www.mdui.org/docs/2/components/text-field#attributes-autofocus"
9475
9475
  },
9476
9476
  {
9477
- "name": "tabIndex",
9477
+ "name": "tabindex",
9478
9478
  "description": "通过 Tab 键在元素之间切换焦点时,tabIndex 属性指定了元素获取焦点的顺序",
9479
9479
  "value": {
9480
9480
  "type": "number"
9481
9481
  },
9482
- "doc-url": "https://www.mdui.org/docs/2/components/text-field#attributes-tabIndex"
9482
+ "doc-url": "https://www.mdui.org/docs/2/components/text-field#attributes-tabindex"
9483
9483
  }
9484
9484
  ],
9485
9485
  "priority": "highest",