mdui 2.0.4 → 2.0.5

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 (98) hide show
  1. package/components/avatar/index.js +7 -2
  2. package/components/avatar/style.js +31 -1
  3. package/components/badge/style.js +25 -1
  4. package/components/bottom-app-bar/style.js +92 -1
  5. package/components/button/button-base-style.js +28 -1
  6. package/components/button/button-base.js +8 -1
  7. package/components/button/index.js +18 -8
  8. package/components/button/style.js +111 -2
  9. package/components/button-icon/index.js +22 -5
  10. package/components/button-icon/style.js +103 -2
  11. package/components/card/index.js +5 -1
  12. package/components/card/style.js +72 -1
  13. package/components/checkbox/index.js +50 -7
  14. package/components/checkbox/style.js +131 -1
  15. package/components/chip/index.js +33 -9
  16. package/components/chip/style.js +205 -2
  17. package/components/circular-progress/index.js +39 -5
  18. package/components/circular-progress/style.js +136 -1
  19. package/components/collapse/collapse-item-style.js +21 -1
  20. package/components/collapse/collapse-item.js +10 -2
  21. package/components/collapse/collapse-style.js +5 -1
  22. package/components/collapse/collapse.js +4 -1
  23. package/components/dialog/index.js +35 -7
  24. package/components/dialog/style.js +116 -1
  25. package/components/divider/style.js +18 -1
  26. package/components/dropdown/index.js +8 -1
  27. package/components/dropdown/style.js +11 -1
  28. package/components/fab/index.js +13 -5
  29. package/components/fab/style.js +153 -4
  30. package/components/icon/index.js +5 -1
  31. package/components/icon/style.js +29 -1
  32. package/components/layout/layout-item-style.js +6 -1
  33. package/components/layout/layout-main-style.js +7 -1
  34. package/components/layout/layout-style.js +11 -1
  35. package/components/linear-progress/index.js +6 -2
  36. package/components/linear-progress/style.js +73 -1
  37. package/components/list/list-item-style.js +153 -2
  38. package/components/list/list-item.js +27 -8
  39. package/components/list/list-style.js +10 -1
  40. package/components/list/list-subheader-style.js +19 -1
  41. package/components/menu/menu-item-style.js +125 -1
  42. package/components/menu/menu-item.js +55 -13
  43. package/components/menu/menu-style.js +19 -1
  44. package/components/menu/menu.js +5 -1
  45. package/components/navigation-bar/navigation-bar-item-style.js +132 -1
  46. package/components/navigation-bar/navigation-bar-item.js +23 -7
  47. package/components/navigation-bar/navigation-bar-style.js +28 -1
  48. package/components/navigation-bar/navigation-bar.js +4 -1
  49. package/components/navigation-drawer/index.js +12 -1
  50. package/components/navigation-drawer/style.js +66 -1
  51. package/components/navigation-rail/navigation-rail-item-style.js +122 -1
  52. package/components/navigation-rail/navigation-rail-item.js +26 -7
  53. package/components/navigation-rail/navigation-rail-style.js +79 -1
  54. package/components/navigation-rail/navigation-rail.js +10 -1
  55. package/components/radio/radio-group-style.js +20 -1
  56. package/components/radio/radio-group.js +19 -1
  57. package/components/radio/radio-style.js +107 -1
  58. package/components/radio/radio.js +23 -5
  59. package/components/range-slider/index.d.ts +1 -1
  60. package/components/range-slider/index.js +53 -5
  61. package/components/ripple/index.js +5 -2
  62. package/components/ripple/style.js +96 -1
  63. package/components/segmented-button/segmented-button-group-style.js +28 -1
  64. package/components/segmented-button/segmented-button-group.js +21 -1
  65. package/components/segmented-button/segmented-button-style.js +81 -2
  66. package/components/segmented-button/segmented-button.js +27 -11
  67. package/components/select/index.js +87 -6
  68. package/components/select/style.js +27 -1
  69. package/components/slider/index.js +33 -2
  70. package/components/slider/slider-base-style.js +173 -1
  71. package/components/slider/slider-base.js +6 -1
  72. package/components/slider/style.js +7 -1
  73. package/components/snackbar/index.js +32 -5
  74. package/components/snackbar/style.js +100 -1
  75. package/components/switch/index.js +40 -6
  76. package/components/switch/style.js +202 -1
  77. package/components/tabs/tab-panel-style.js +10 -1
  78. package/components/tabs/tab-style.js +85 -1
  79. package/components/tabs/tab.js +24 -4
  80. package/components/tabs/tabs-style.js +138 -1
  81. package/components/tabs/tabs.js +9 -1
  82. package/components/text-field/index.js +160 -32
  83. package/components/text-field/style.js +362 -1
  84. package/components/tooltip/index.js +10 -1
  85. package/components/tooltip/style.js +57 -1
  86. package/components/top-app-bar/top-app-bar-style.js +78 -1
  87. package/components/top-app-bar/top-app-bar-title-style.js +81 -1
  88. package/components/top-app-bar/top-app-bar-title.js +17 -3
  89. package/custom-elements.json +1144 -1101
  90. package/html-data.en.json +15 -6
  91. package/html-data.zh-cn.json +15 -6
  92. package/jsx.en.d.ts +2 -2
  93. package/jsx.zh-cn.d.ts +2 -2
  94. package/package.json +2 -2
  95. package/web-types.en.json +20 -4
  96. package/web-types.zh-cn.json +20 -4
  97. package/mdui.esm.js +0 -22
  98. package/mdui.global.js +0 -22
@@ -273,12 +273,16 @@
273
273
  "kind": "field",
274
274
  "name": "scrollBehavior",
275
275
  "type": {
276
- "text": "'hide' | undefined"
276
+ "text": "'hide' | 'shrink' | 'elevate' | undefined"
277
277
  },
278
278
  "privacy": "public",
279
279
  "description": "滚动行为。可选值为:\n\n* `hide`:滚动时隐藏",
280
280
  "attribute": "scroll-behavior",
281
- "reflects": true
281
+ "reflects": true,
282
+ "inheritedFrom": {
283
+ "name": "ScrollBehaviorMixin",
284
+ "module": "packages/shared/src/mixins/scrollBehavior.ts"
285
+ }
282
286
  },
283
287
  {
284
288
  "kind": "field",
@@ -705,10 +709,14 @@
705
709
  {
706
710
  "name": "scroll-behavior",
707
711
  "type": {
708
- "text": "'hide' | undefined"
712
+ "text": "'hide' | 'shrink' | 'elevate' | undefined"
709
713
  },
710
714
  "description": "滚动行为。可选值为:\n\n* `hide`:滚动时隐藏",
711
- "fieldName": "scrollBehavior"
715
+ "fieldName": "scrollBehavior",
716
+ "inheritedFrom": {
717
+ "name": "ScrollBehaviorMixin",
718
+ "module": "packages/shared/src/mixins/scrollBehavior.ts"
719
+ }
712
720
  },
713
721
  {
714
722
  "name": "scroll-target",
@@ -783,356 +791,214 @@
783
791
  },
784
792
  {
785
793
  "kind": "javascript-module",
786
- "path": "packages/mdui/src/components/button/button-base.ts",
794
+ "path": "packages/mdui/src/components/button-icon/index.ts",
787
795
  "declarations": [
788
796
  {
789
797
  "kind": "class",
790
798
  "description": "",
791
- "name": "ButtonBase",
792
- "members": [
799
+ "name": "ButtonIcon",
800
+ "cssProperties": [
793
801
  {
794
- "kind": "field",
795
- "name": "disabled",
796
- "type": {
797
- "text": "boolean"
798
- },
799
- "privacy": "public",
800
- "default": "false",
801
- "description": "是否禁用",
802
- "attribute": "disabled",
803
- "reflects": true
804
- },
802
+ "description": "组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)",
803
+ "name": "--shape-corner"
804
+ }
805
+ ],
806
+ "cssParts": [
805
807
  {
806
- "kind": "field",
807
- "name": "loading",
808
- "type": {
809
- "text": "boolean"
810
- },
811
- "privacy": "public",
812
- "default": "false",
813
- "description": "是否处于加载中状态",
814
- "attribute": "loading",
815
- "reflects": true
808
+ "description": "内部的 `<button>` 或 `<a>` 元素",
809
+ "name": "button"
816
810
  },
817
811
  {
818
- "kind": "field",
819
- "name": "name",
820
- "type": {
821
- "text": "string"
822
- },
823
- "privacy": "public",
824
- "default": "''",
825
- "description": "按钮的名称,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
826
- "attribute": "name",
827
- "reflects": true
812
+ "description": "未选中状态的图标",
813
+ "name": "icon"
828
814
  },
829
815
  {
830
- "kind": "field",
831
- "name": "value",
832
- "type": {
833
- "text": "string"
834
- },
835
- "privacy": "public",
836
- "default": "''",
837
- "description": "按钮的初始值,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
838
- "attribute": "value",
839
- "reflects": true
816
+ "description": "选中状态的图标",
817
+ "name": "selected-icon"
840
818
  },
841
819
  {
842
- "kind": "field",
843
- "name": "type",
844
- "type": {
845
- "text": "| /*此按钮将表单数据提交给服务器*/ 'submit'\n | /*此按钮重置所有组件为初始值*/ 'reset'\n | /*此按钮没有默认行为*/ 'button'"
846
- },
847
- "privacy": "public",
848
- "default": "'button'",
849
- "description": "按钮的类型。默认类型为 `button`。可选类型包括:\n\n* `submit`:点击按钮会提交表单数据到服务器\n* `reset`:点击按钮会将表单中的所有字段重置为初始值\n* `button`:此类型的按钮没有默认行为\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
850
- "attribute": "type",
851
- "reflects": true
820
+ "description": "加载中状态的 `<mdui-circular-progress>` 元素",
821
+ "name": "loading"
822
+ }
823
+ ],
824
+ "slots": [
825
+ {
826
+ "description": "图标组件",
827
+ "name": ""
852
828
  },
829
+ {
830
+ "description": "选中状态显示的图标元素",
831
+ "name": "selected-icon"
832
+ }
833
+ ],
834
+ "members": [
853
835
  {
854
836
  "kind": "field",
855
- "name": "form",
837
+ "name": "variant",
856
838
  "type": {
857
- "text": "string | undefined"
839
+ "text": "| /*适用于最低优先级的操作*/ 'standard'\n | /*视觉效果强烈,适用于高优先级的操作*/ 'filled'\n | /*视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作*/ 'tonal'\n | /*适用于中等优先级的操作*/ 'outlined'"
858
840
  },
859
841
  "privacy": "public",
860
- "description": "关联的 `<form>` 元素。此属性值应为同一页面中的一个 `<form>` 元素的 `id`。\n\n如果未指定此属性,则该元素必须是 `<form>` 元素的子元素。通过此属性,你可以将元素放置在页面的任何位置,而不仅仅是 `<form>` 元素的子元素。\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
861
- "attribute": "form",
842
+ "default": "'standard'",
843
+ "description": "图标按钮的形状。可选值包括:\n\n* `standard`:适用于最低优先级的操作\n* `filled`:视觉效果强烈,适用于高优先级的操作\n* `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作\n* `outlined`:适用于中等优先级的操作",
844
+ "attribute": "variant",
862
845
  "reflects": true
863
846
  },
864
847
  {
865
848
  "kind": "field",
866
- "name": "formAction",
849
+ "name": "icon",
867
850
  "type": {
868
851
  "text": "string | undefined"
869
852
  },
870
853
  "privacy": "public",
871
- "description": "指定提交表单的 URL。\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `action` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
872
- "attribute": "formaction",
854
+ "description": "Material Icons 图标名。也可以通过 default slot 设置",
855
+ "attribute": "icon",
873
856
  "reflects": true
874
857
  },
875
858
  {
876
859
  "kind": "field",
877
- "name": "formEnctype",
860
+ "name": "selectedIcon",
878
861
  "type": {
879
- "text": "| /*未指定该属性时的默认值*/ 'application/x-www-form-urlencoded'\n | /*当表单包含 `<input type=\"file\">` 元素时使用*/ 'multipart/form-data'\n | /*HTML5 新增,用于调试*/ 'text/plain' | undefined"
862
+ "text": "string | undefined"
880
863
  },
881
864
  "privacy": "public",
882
- "description": "指定提交表单到服务器的内容类型。可选值包括:\n\n* `application/x-www-form-urlencoded`:未指定该属性时的默认值\n* `multipart/form-data`:当表单包含 `<input type=\"file\">` 元素时使用\n* `text/plain`:HTML5 新增,用于调试\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `enctype` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
883
- "attribute": "formenctype",
865
+ "description": "选中状态的 Material Icons 图标名。也可以通过 `slot=\"selected-icon\"` 设置",
866
+ "attribute": "selected-icon",
884
867
  "reflects": true
885
868
  },
886
869
  {
887
870
  "kind": "field",
888
- "name": "formMethod",
871
+ "name": "selectable",
889
872
  "type": {
890
- "text": "| /*表单数据包含在表单内容中,发送到服务器*/ 'post'\n | /*表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法*/ 'get' | undefined"
873
+ "text": "boolean"
891
874
  },
892
875
  "privacy": "public",
893
- "description": "指定提交表单时使用的 HTTP 方法。可选值包括:\n\n* `post`:表单数据包含在表单内容中,发送到服务器\n* `get`:表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `method` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
894
- "attribute": "formmethod",
876
+ "default": "false",
877
+ "description": "是否可选中",
878
+ "attribute": "selectable",
895
879
  "reflects": true
896
880
  },
897
881
  {
898
882
  "kind": "field",
899
- "name": "formNoValidate",
883
+ "name": "selected",
900
884
  "type": {
901
885
  "text": "boolean"
902
886
  },
903
887
  "privacy": "public",
904
888
  "default": "false",
905
- "description": "如果设置了此属性,表单提交时将不执行表单验证。\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
906
- "attribute": "formnovalidate",
889
+ "description": "是否已被选中",
890
+ "attribute": "selected",
907
891
  "reflects": true
908
892
  },
909
893
  {
910
894
  "kind": "field",
911
- "name": "formTarget",
895
+ "name": "rippleRef",
912
896
  "type": {
913
- "text": "| /*默认选项,在当前框架中打开*/ '_self'\n | /*在新窗口中打开*/ '_blank'\n | /*在父框架中打开*/ '_parent'\n | /*在整个窗口中打开*/ '_top' | undefined"
897
+ "text": "Ref<Ripple>"
914
898
  },
915
- "privacy": "public",
916
- "description": "提交表单后接收到的响应应显示在何处。可选值包括:\n\n* `_self`:默认选项,在当前框架中打开\n* `_blank`:在新窗口中打开\n* `_parent`:在父框架中打开\n* `_top`:在整个窗口中打开\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `target` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
917
- "attribute": "formtarget",
918
- "reflects": true
899
+ "privacy": "private",
900
+ "readonly": true
919
901
  },
920
902
  {
921
903
  "kind": "field",
922
- "name": "formController",
904
+ "name": "hasSlotController",
923
905
  "privacy": "private",
924
906
  "readonly": true,
925
- "default": "new FormController(this)"
907
+ "default": "new HasSlotController(\n this,\n '[default]',\n 'selected-icon',\n )"
926
908
  },
927
909
  {
928
910
  "kind": "field",
929
- "name": "validity",
930
- "type": {
931
- "text": "ValidityState | undefined"
932
- },
933
- "privacy": "public",
934
- "description": "表单验证状态对象,具体参见 [`ValidityState`](https://developer.mozilla.org/zh-CN/docs/Web/API/ValidityState)",
911
+ "name": "rippleElement",
912
+ "privacy": "protected",
935
913
  "readonly": true
936
914
  },
937
915
  {
938
- "kind": "field",
939
- "name": "validationMessage",
940
- "type": {
941
- "text": "string | undefined"
942
- },
943
- "privacy": "public",
944
- "description": "如果表单验证未通过,此属性将包含提示信息。如果验证通过,此属性将为空字符串",
945
- "readonly": true
916
+ "kind": "method",
917
+ "name": "onSelectedChange",
918
+ "privacy": "private"
919
+ },
920
+ {
921
+ "kind": "method",
922
+ "name": "renderIcon",
923
+ "privacy": "private",
924
+ "return": {
925
+ "type": {
926
+ "text": "TemplateResult"
927
+ }
928
+ }
946
929
  },
947
930
  {
948
931
  "kind": "field",
949
- "name": "rippleDisabled",
932
+ "name": "href",
950
933
  "type": {
951
- "text": "boolean"
934
+ "text": "string"
952
935
  },
953
- "privacy": "protected",
954
- "readonly": true
936
+ "privacy": "public",
937
+ "description": "链接的目标 URL。\n\n如果设置了此属性,组件内部将渲染为 `<a>` 元素,并可以使用链接相关的属性。",
938
+ "attribute": "href",
939
+ "reflects": true,
940
+ "inheritedFrom": {
941
+ "name": "AnchorMixin",
942
+ "module": "packages/shared/src/mixins/anchor.ts"
943
+ }
955
944
  },
956
945
  {
957
946
  "kind": "field",
958
- "name": "focusElement",
947
+ "name": "download",
959
948
  "type": {
960
- "text": "HTMLElement | null | undefined"
949
+ "text": "string"
961
950
  },
962
- "privacy": "protected",
963
- "description": "最终获得焦点的元素",
964
- "readonly": true,
951
+ "privacy": "public",
952
+ "description": "下载链接的目标。\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
953
+ "attribute": "download",
954
+ "reflects": true,
965
955
  "inheritedFrom": {
966
- "name": "FocusableMixin",
967
- "module": "packages/shared/src/mixins/focusable.ts"
956
+ "name": "AnchorMixin",
957
+ "module": "packages/shared/src/mixins/anchor.ts"
968
958
  }
969
959
  },
970
960
  {
971
961
  "kind": "field",
972
- "name": "focusDisabled",
962
+ "name": "target",
973
963
  "type": {
974
- "text": "boolean"
964
+ "text": "| /*在新窗口中打开链接*/ '_blank'\n | /*在父框架中打开链接*/ '_parent'\n | /*默认。在当前框架中打开链接*/ '_self'\n | /*在整个窗口中打开链接*/ '_top'"
975
965
  },
976
- "privacy": "protected",
977
- "description": "父类要实现该属性,表示是否禁用 focus 状态",
978
- "readonly": true,
966
+ "privacy": "public",
967
+ "description": "链接的打开方式。可选值包括:\n\n* `_blank`:在新窗口中打开链接\n* `_parent`:在父框架中打开链接\n* `_self`:默认。在当前框架中打开链接\n* `_top`:在整个窗口中打开链接\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
968
+ "attribute": "target",
969
+ "reflects": true,
979
970
  "inheritedFrom": {
980
- "name": "FocusableMixin",
981
- "module": "packages/shared/src/mixins/focusable.ts"
971
+ "name": "AnchorMixin",
972
+ "module": "packages/shared/src/mixins/anchor.ts"
982
973
  }
983
974
  },
984
975
  {
985
- "kind": "method",
986
- "name": "checkValidity",
987
- "privacy": "public",
988
- "return": {
989
- "type": {
990
- "text": "boolean"
991
- }
976
+ "kind": "field",
977
+ "name": "rel",
978
+ "type": {
979
+ "text": "| /*当前文档的替代版本*/ 'alternate'\n | /*当前文档或文章的作者*/ 'author'\n | /*永久链接到最近的祖先章节*/ 'bookmark'\n | /*引用的文档与当前文档不在同一站点*/ 'external'\n | /*链接到相关的帮助文档*/ 'help'\n | /*当前文档的主要内容由被引用文件的版权许可覆盖*/ 'license'\n | /*当前文档代表链接内容的所有者*/ 'me'\n | /*当前文档是系列中的一部分,被引用的文档是系列的下一个文档*/ 'next'\n | /*当前文档的作者或发布者不认可被引用的文件*/ 'nofollow'\n | /*不包含 `Referer` 头。类似于 `noopener` 的效果*/ 'noreferrer'\n | /*如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文*/ 'opener'\n | /*当前文档是系列的一部分,被引用的文档是系列的上一个文档*/ 'prev'\n | /*提供一个资源链接,可用于搜索当前文件及其相关页面*/ 'search'\n | /*提供一个适用于当前文档的标签(由给定地址识别)*/ 'tag'"
992
980
  },
993
- "description": "检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`"
994
- },
995
- {
996
- "kind": "method",
997
- "name": "reportValidity",
998
981
  "privacy": "public",
999
- "return": {
1000
- "type": {
1001
- "text": "boolean"
1002
- }
1003
- },
1004
- "description": "检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`。\n\n如果验证未通过,还会在组件上显示验证失败的提示。"
982
+ "description": "当前文档与被链接文档之间的关系。可选值包括:\n\n* `alternate`:当前文档的替代版本\n* `author`:当前文档或文章的作者\n* `bookmark`:永久链接到最近的祖先章节\n* `external`:引用的文档与当前文档不在同一站点\n* `help`:链接到相关的帮助文档\n* `license`:当前文档的主要内容由被引用文件的版权许可覆盖\n* `me`:当前文档代表链接内容的所有者\n* `next`:当前文档是系列中的一部分,被引用的文档是系列的下一个文档\n* `nofollow`:当前文档的作者或发布者不认可被引用的文件\n* `noreferrer`:不包含 `Referer` 头。类似于 `noopener` 的效果\n* `opener`:如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文\n* `prev`:当前文档是系列的一部分,被引用的文档是系列的上一个文档\n* `search`:提供一个资源链接,可用于搜索当前文件及其相关页面\n* `tag`:提供一个适用于当前文档的标签(由给定地址识别)\n\n**Note**:仅在指定了 `href` 属性时可用。",
983
+ "attribute": "rel",
984
+ "reflects": true,
985
+ "inheritedFrom": {
986
+ "name": "AnchorMixin",
987
+ "module": "packages/shared/src/mixins/anchor.ts"
988
+ }
1005
989
  },
1006
990
  {
1007
991
  "kind": "method",
1008
- "name": "setCustomValidity",
1009
- "privacy": "public",
992
+ "name": "renderAnchor",
993
+ "privacy": "protected",
1010
994
  "return": {
1011
995
  "type": {
1012
- "text": "void"
996
+ "text": "TemplateResult"
1013
997
  }
1014
998
  },
1015
999
  "parameters": [
1016
1000
  {
1017
- "name": "message",
1018
- "type": {
1019
- "text": "string"
1020
- },
1021
- "description": "自定义的错误提示文本"
1022
- }
1023
- ],
1024
- "description": "设置自定义的错误提示文本。只要这个文本不为空,就表示字段未通过验证"
1025
- },
1026
- {
1027
- "kind": "method",
1028
- "name": "renderLoading",
1029
- "privacy": "protected",
1030
- "return": {
1031
- "type": {
1032
- "text": "TemplateResult"
1033
- }
1034
- }
1035
- },
1036
- {
1037
- "kind": "method",
1038
- "name": "renderButton",
1039
- "privacy": "protected",
1040
- "return": {
1041
- "type": {
1042
- "text": "TemplateResult"
1043
- }
1044
- },
1045
- "parameters": [
1046
- {
1047
- "name": "{\n id,\n className,\n part,\n content = html`<slot></slot>`,\n }",
1048
- "type": {
1049
- "text": "RenderButtonOptions"
1050
- }
1051
- }
1052
- ]
1053
- },
1054
- {
1055
- "kind": "method",
1056
- "name": "isButton",
1057
- "privacy": "protected",
1058
- "return": {
1059
- "type": {
1060
- "text": "boolean"
1061
- }
1062
- }
1063
- },
1064
- {
1065
- "kind": "field",
1066
- "name": "href",
1067
- "type": {
1068
- "text": "string"
1069
- },
1070
- "privacy": "public",
1071
- "description": "链接的目标 URL。\n\n如果设置了此属性,组件内部将渲染为 `<a>` 元素,并可以使用链接相关的属性。",
1072
- "attribute": "href",
1073
- "reflects": true,
1074
- "inheritedFrom": {
1075
- "name": "AnchorMixin",
1076
- "module": "packages/shared/src/mixins/anchor.ts"
1077
- }
1078
- },
1079
- {
1080
- "kind": "field",
1081
- "name": "download",
1082
- "type": {
1083
- "text": "string"
1084
- },
1085
- "privacy": "public",
1086
- "description": "下载链接的目标。\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
1087
- "attribute": "download",
1088
- "reflects": true,
1089
- "inheritedFrom": {
1090
- "name": "AnchorMixin",
1091
- "module": "packages/shared/src/mixins/anchor.ts"
1092
- }
1093
- },
1094
- {
1095
- "kind": "field",
1096
- "name": "target",
1097
- "type": {
1098
- "text": "| /*在新窗口中打开链接*/ '_blank'\n | /*在父框架中打开链接*/ '_parent'\n | /*默认。在当前框架中打开链接*/ '_self'\n | /*在整个窗口中打开链接*/ '_top'"
1099
- },
1100
- "privacy": "public",
1101
- "description": "链接的打开方式。可选值包括:\n\n* `_blank`:在新窗口中打开链接\n* `_parent`:在父框架中打开链接\n* `_self`:默认。在当前框架中打开链接\n* `_top`:在整个窗口中打开链接\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
1102
- "attribute": "target",
1103
- "reflects": true,
1104
- "inheritedFrom": {
1105
- "name": "AnchorMixin",
1106
- "module": "packages/shared/src/mixins/anchor.ts"
1107
- }
1108
- },
1109
- {
1110
- "kind": "field",
1111
- "name": "rel",
1112
- "type": {
1113
- "text": "| /*当前文档的替代版本*/ 'alternate'\n | /*当前文档或文章的作者*/ 'author'\n | /*永久链接到最近的祖先章节*/ 'bookmark'\n | /*引用的文档与当前文档不在同一站点*/ 'external'\n | /*链接到相关的帮助文档*/ 'help'\n | /*当前文档的主要内容由被引用文件的版权许可覆盖*/ 'license'\n | /*当前文档代表链接内容的所有者*/ 'me'\n | /*当前文档是系列中的一部分,被引用的文档是系列的下一个文档*/ 'next'\n | /*当前文档的作者或发布者不认可被引用的文件*/ 'nofollow'\n | /*不包含 `Referer` 头。类似于 `noopener` 的效果*/ 'noreferrer'\n | /*如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文*/ 'opener'\n | /*当前文档是系列的一部分,被引用的文档是系列的上一个文档*/ 'prev'\n | /*提供一个资源链接,可用于搜索当前文件及其相关页面*/ 'search'\n | /*提供一个适用于当前文档的标签(由给定地址识别)*/ 'tag'"
1114
- },
1115
- "privacy": "public",
1116
- "description": "当前文档与被链接文档之间的关系。可选值包括:\n\n* `alternate`:当前文档的替代版本\n* `author`:当前文档或文章的作者\n* `bookmark`:永久链接到最近的祖先章节\n* `external`:引用的文档与当前文档不在同一站点\n* `help`:链接到相关的帮助文档\n* `license`:当前文档的主要内容由被引用文件的版权许可覆盖\n* `me`:当前文档代表链接内容的所有者\n* `next`:当前文档是系列中的一部分,被引用的文档是系列的下一个文档\n* `nofollow`:当前文档的作者或发布者不认可被引用的文件\n* `noreferrer`:不包含 `Referer` 头。类似于 `noopener` 的效果\n* `opener`:如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文\n* `prev`:当前文档是系列的一部分,被引用的文档是系列的上一个文档\n* `search`:提供一个资源链接,可用于搜索当前文件及其相关页面\n* `tag`:提供一个适用于当前文档的标签(由给定地址识别)\n\n**Note**:仅在指定了 `href` 属性时可用。",
1117
- "attribute": "rel",
1118
- "reflects": true,
1119
- "inheritedFrom": {
1120
- "name": "AnchorMixin",
1121
- "module": "packages/shared/src/mixins/anchor.ts"
1122
- }
1123
- },
1124
- {
1125
- "kind": "method",
1126
- "name": "renderAnchor",
1127
- "privacy": "protected",
1128
- "return": {
1129
- "type": {
1130
- "text": "TemplateResult"
1131
- }
1132
- },
1133
- "parameters": [
1134
- {
1135
- "name": "{\n id,\n className,\n part,\n content = html`<slot></slot>`,\n refDirective,\n tabIndex,\n }",
1001
+ "name": "{\n id,\n className,\n part,\n content = html`<slot></slot>`,\n refDirective,\n tabIndex,\n }",
1136
1002
  "type": {
1137
1003
  "text": "RenderAnchorOptions"
1138
1004
  }
@@ -1256,6 +1122,34 @@
1256
1122
  "module": "packages/shared/src/mixins/focusable.ts"
1257
1123
  }
1258
1124
  },
1125
+ {
1126
+ "kind": "field",
1127
+ "name": "focusDisabled",
1128
+ "type": {
1129
+ "text": "boolean"
1130
+ },
1131
+ "privacy": "protected",
1132
+ "readonly": true,
1133
+ "description": "父类要实现该属性,表示是否禁用 focus 状态",
1134
+ "inheritedFrom": {
1135
+ "name": "ButtonBase",
1136
+ "module": "packages/mdui/src/components/button/button-base.ts"
1137
+ }
1138
+ },
1139
+ {
1140
+ "kind": "field",
1141
+ "name": "focusElement",
1142
+ "type": {
1143
+ "text": "HTMLElement | null"
1144
+ },
1145
+ "privacy": "protected",
1146
+ "readonly": true,
1147
+ "description": "最终获得焦点的元素",
1148
+ "inheritedFrom": {
1149
+ "name": "ButtonBase",
1150
+ "module": "packages/mdui/src/components/button/button-base.ts"
1151
+ }
1152
+ },
1259
1153
  {
1260
1154
  "kind": "method",
1261
1155
  "name": "click",
@@ -1411,107 +1305,411 @@
1411
1305
  "name": "FocusableMixin",
1412
1306
  "module": "packages/shared/src/mixins/focusable.ts"
1413
1307
  }
1414
- }
1415
- ],
1416
- "attributes": [
1308
+ },
1417
1309
  {
1310
+ "kind": "field",
1418
1311
  "name": "disabled",
1419
1312
  "type": {
1420
1313
  "text": "boolean"
1421
1314
  },
1315
+ "privacy": "public",
1422
1316
  "default": "false",
1423
1317
  "description": "是否禁用",
1424
- "fieldName": "disabled"
1318
+ "attribute": "disabled",
1319
+ "reflects": true,
1320
+ "inheritedFrom": {
1321
+ "name": "ButtonBase",
1322
+ "module": "packages/mdui/src/components/button/button-base.ts"
1323
+ }
1425
1324
  },
1426
1325
  {
1326
+ "kind": "field",
1427
1327
  "name": "loading",
1428
1328
  "type": {
1429
1329
  "text": "boolean"
1430
1330
  },
1331
+ "privacy": "public",
1431
1332
  "default": "false",
1432
1333
  "description": "是否处于加载中状态",
1433
- "fieldName": "loading"
1334
+ "attribute": "loading",
1335
+ "reflects": true,
1336
+ "inheritedFrom": {
1337
+ "name": "ButtonBase",
1338
+ "module": "packages/mdui/src/components/button/button-base.ts"
1339
+ }
1434
1340
  },
1435
1341
  {
1342
+ "kind": "field",
1436
1343
  "name": "name",
1437
1344
  "type": {
1438
1345
  "text": "string"
1439
1346
  },
1347
+ "privacy": "public",
1440
1348
  "default": "''",
1441
1349
  "description": "按钮的名称,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
1442
- "fieldName": "name"
1350
+ "attribute": "name",
1351
+ "reflects": true,
1352
+ "inheritedFrom": {
1353
+ "name": "ButtonBase",
1354
+ "module": "packages/mdui/src/components/button/button-base.ts"
1355
+ }
1443
1356
  },
1444
1357
  {
1358
+ "kind": "field",
1445
1359
  "name": "value",
1446
1360
  "type": {
1447
1361
  "text": "string"
1448
1362
  },
1363
+ "privacy": "public",
1449
1364
  "default": "''",
1450
1365
  "description": "按钮的初始值,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
1451
- "fieldName": "value"
1366
+ "attribute": "value",
1367
+ "reflects": true,
1368
+ "inheritedFrom": {
1369
+ "name": "ButtonBase",
1370
+ "module": "packages/mdui/src/components/button/button-base.ts"
1371
+ }
1452
1372
  },
1453
1373
  {
1374
+ "kind": "field",
1454
1375
  "name": "type",
1455
1376
  "type": {
1456
1377
  "text": "| /*此按钮将表单数据提交给服务器*/ 'submit'\n | /*此按钮重置所有组件为初始值*/ 'reset'\n | /*此按钮没有默认行为*/ 'button'"
1457
1378
  },
1379
+ "privacy": "public",
1458
1380
  "default": "'button'",
1459
1381
  "description": "按钮的类型。默认类型为 `button`。可选类型包括:\n\n* `submit`:点击按钮会提交表单数据到服务器\n* `reset`:点击按钮会将表单中的所有字段重置为初始值\n* `button`:此类型的按钮没有默认行为\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
1460
- "fieldName": "type"
1382
+ "attribute": "type",
1383
+ "reflects": true,
1384
+ "inheritedFrom": {
1385
+ "name": "ButtonBase",
1386
+ "module": "packages/mdui/src/components/button/button-base.ts"
1387
+ }
1461
1388
  },
1462
1389
  {
1390
+ "kind": "field",
1463
1391
  "name": "form",
1464
1392
  "type": {
1465
1393
  "text": "string | undefined"
1466
1394
  },
1395
+ "privacy": "public",
1467
1396
  "description": "关联的 `<form>` 元素。此属性值应为同一页面中的一个 `<form>` 元素的 `id`。\n\n如果未指定此属性,则该元素必须是 `<form>` 元素的子元素。通过此属性,你可以将元素放置在页面的任何位置,而不仅仅是 `<form>` 元素的子元素。\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
1468
- "fieldName": "form"
1397
+ "attribute": "form",
1398
+ "reflects": true,
1399
+ "inheritedFrom": {
1400
+ "name": "ButtonBase",
1401
+ "module": "packages/mdui/src/components/button/button-base.ts"
1402
+ }
1469
1403
  },
1470
1404
  {
1471
- "name": "formaction",
1405
+ "kind": "field",
1406
+ "name": "formAction",
1472
1407
  "type": {
1473
1408
  "text": "string | undefined"
1474
1409
  },
1410
+ "privacy": "public",
1475
1411
  "description": "指定提交表单的 URL。\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `action` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1476
- "fieldName": "formAction"
1412
+ "attribute": "formaction",
1413
+ "reflects": true,
1414
+ "inheritedFrom": {
1415
+ "name": "ButtonBase",
1416
+ "module": "packages/mdui/src/components/button/button-base.ts"
1417
+ }
1477
1418
  },
1478
1419
  {
1479
- "name": "formenctype",
1420
+ "kind": "field",
1421
+ "name": "formEnctype",
1480
1422
  "type": {
1481
1423
  "text": "| /*未指定该属性时的默认值*/ 'application/x-www-form-urlencoded'\n | /*当表单包含 `<input type=\"file\">` 元素时使用*/ 'multipart/form-data'\n | /*HTML5 新增,用于调试*/ 'text/plain' | undefined"
1482
1424
  },
1425
+ "privacy": "public",
1483
1426
  "description": "指定提交表单到服务器的内容类型。可选值包括:\n\n* `application/x-www-form-urlencoded`:未指定该属性时的默认值\n* `multipart/form-data`:当表单包含 `<input type=\"file\">` 元素时使用\n* `text/plain`:HTML5 新增,用于调试\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `enctype` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1484
- "fieldName": "formEnctype"
1427
+ "attribute": "formenctype",
1428
+ "reflects": true,
1429
+ "inheritedFrom": {
1430
+ "name": "ButtonBase",
1431
+ "module": "packages/mdui/src/components/button/button-base.ts"
1432
+ }
1485
1433
  },
1486
1434
  {
1487
- "name": "formmethod",
1435
+ "kind": "field",
1436
+ "name": "formMethod",
1488
1437
  "type": {
1489
1438
  "text": "| /*表单数据包含在表单内容中,发送到服务器*/ 'post'\n | /*表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法*/ 'get' | undefined"
1490
1439
  },
1440
+ "privacy": "public",
1491
1441
  "description": "指定提交表单时使用的 HTTP 方法。可选值包括:\n\n* `post`:表单数据包含在表单内容中,发送到服务器\n* `get`:表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `method` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1492
- "fieldName": "formMethod"
1442
+ "attribute": "formmethod",
1443
+ "reflects": true,
1444
+ "inheritedFrom": {
1445
+ "name": "ButtonBase",
1446
+ "module": "packages/mdui/src/components/button/button-base.ts"
1447
+ }
1493
1448
  },
1494
1449
  {
1495
- "name": "formnovalidate",
1450
+ "kind": "field",
1451
+ "name": "formNoValidate",
1496
1452
  "type": {
1497
1453
  "text": "boolean"
1498
1454
  },
1455
+ "privacy": "public",
1499
1456
  "default": "false",
1500
1457
  "description": "如果设置了此属性,表单提交时将不执行表单验证。\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1501
- "fieldName": "formNoValidate"
1458
+ "attribute": "formnovalidate",
1459
+ "reflects": true,
1460
+ "inheritedFrom": {
1461
+ "name": "ButtonBase",
1462
+ "module": "packages/mdui/src/components/button/button-base.ts"
1463
+ }
1502
1464
  },
1503
1465
  {
1504
- "name": "formtarget",
1466
+ "kind": "field",
1467
+ "name": "formTarget",
1505
1468
  "type": {
1506
1469
  "text": "| /*默认选项,在当前框架中打开*/ '_self'\n | /*在新窗口中打开*/ '_blank'\n | /*在父框架中打开*/ '_parent'\n | /*在整个窗口中打开*/ '_top' | undefined"
1507
1470
  },
1471
+ "privacy": "public",
1508
1472
  "description": "提交表单后接收到的响应应显示在何处。可选值包括:\n\n* `_self`:默认选项,在当前框架中打开\n* `_blank`:在新窗口中打开\n* `_parent`:在父框架中打开\n* `_top`:在整个窗口中打开\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `target` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1509
- "fieldName": "formTarget"
1510
- },
1511
- {
1512
- "name": "href",
1513
- "type": {
1514
- "text": "string"
1473
+ "attribute": "formtarget",
1474
+ "reflects": true,
1475
+ "inheritedFrom": {
1476
+ "name": "ButtonBase",
1477
+ "module": "packages/mdui/src/components/button/button-base.ts"
1478
+ }
1479
+ },
1480
+ {
1481
+ "kind": "field",
1482
+ "name": "formController",
1483
+ "privacy": "private",
1484
+ "readonly": true,
1485
+ "default": "new FormController(this)",
1486
+ "inheritedFrom": {
1487
+ "name": "ButtonBase",
1488
+ "module": "packages/mdui/src/components/button/button-base.ts"
1489
+ }
1490
+ },
1491
+ {
1492
+ "kind": "field",
1493
+ "name": "validity",
1494
+ "type": {
1495
+ "text": "ValidityState | undefined"
1496
+ },
1497
+ "privacy": "public",
1498
+ "description": "表单验证状态对象,具体参见 [`ValidityState`](https://developer.mozilla.org/zh-CN/docs/Web/API/ValidityState)",
1499
+ "readonly": true,
1500
+ "inheritedFrom": {
1501
+ "name": "ButtonBase",
1502
+ "module": "packages/mdui/src/components/button/button-base.ts"
1503
+ }
1504
+ },
1505
+ {
1506
+ "kind": "field",
1507
+ "name": "validationMessage",
1508
+ "type": {
1509
+ "text": "string | undefined"
1510
+ },
1511
+ "privacy": "public",
1512
+ "description": "如果表单验证未通过,此属性将包含提示信息。如果验证通过,此属性将为空字符串",
1513
+ "readonly": true,
1514
+ "inheritedFrom": {
1515
+ "name": "ButtonBase",
1516
+ "module": "packages/mdui/src/components/button/button-base.ts"
1517
+ }
1518
+ },
1519
+ {
1520
+ "kind": "field",
1521
+ "name": "rippleDisabled",
1522
+ "type": {
1523
+ "text": "boolean"
1524
+ },
1525
+ "privacy": "protected",
1526
+ "readonly": true,
1527
+ "inheritedFrom": {
1528
+ "name": "ButtonBase",
1529
+ "module": "packages/mdui/src/components/button/button-base.ts"
1530
+ }
1531
+ },
1532
+ {
1533
+ "kind": "method",
1534
+ "name": "checkValidity",
1535
+ "privacy": "public",
1536
+ "return": {
1537
+ "type": {
1538
+ "text": "boolean"
1539
+ }
1540
+ },
1541
+ "description": "检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`",
1542
+ "inheritedFrom": {
1543
+ "name": "ButtonBase",
1544
+ "module": "packages/mdui/src/components/button/button-base.ts"
1545
+ }
1546
+ },
1547
+ {
1548
+ "kind": "method",
1549
+ "name": "reportValidity",
1550
+ "privacy": "public",
1551
+ "return": {
1552
+ "type": {
1553
+ "text": "boolean"
1554
+ }
1555
+ },
1556
+ "description": "检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`。\n\n如果验证未通过,还会在组件上显示验证失败的提示。",
1557
+ "inheritedFrom": {
1558
+ "name": "ButtonBase",
1559
+ "module": "packages/mdui/src/components/button/button-base.ts"
1560
+ }
1561
+ },
1562
+ {
1563
+ "kind": "method",
1564
+ "name": "setCustomValidity",
1565
+ "privacy": "public",
1566
+ "return": {
1567
+ "type": {
1568
+ "text": "void"
1569
+ }
1570
+ },
1571
+ "parameters": [
1572
+ {
1573
+ "name": "message",
1574
+ "type": {
1575
+ "text": "string"
1576
+ },
1577
+ "description": "自定义的错误提示文本"
1578
+ }
1579
+ ],
1580
+ "description": "设置自定义的错误提示文本。只要这个文本不为空,就表示字段未通过验证",
1581
+ "inheritedFrom": {
1582
+ "name": "ButtonBase",
1583
+ "module": "packages/mdui/src/components/button/button-base.ts"
1584
+ }
1585
+ },
1586
+ {
1587
+ "kind": "method",
1588
+ "name": "renderLoading",
1589
+ "privacy": "protected",
1590
+ "return": {
1591
+ "type": {
1592
+ "text": "TemplateResult"
1593
+ }
1594
+ },
1595
+ "inheritedFrom": {
1596
+ "name": "ButtonBase",
1597
+ "module": "packages/mdui/src/components/button/button-base.ts"
1598
+ }
1599
+ },
1600
+ {
1601
+ "kind": "method",
1602
+ "name": "renderButton",
1603
+ "privacy": "protected",
1604
+ "return": {
1605
+ "type": {
1606
+ "text": "TemplateResult"
1607
+ }
1608
+ },
1609
+ "parameters": [
1610
+ {
1611
+ "name": "{\n id,\n className,\n part,\n content = html`<slot></slot>`,\n }",
1612
+ "type": {
1613
+ "text": "RenderButtonOptions"
1614
+ }
1615
+ }
1616
+ ],
1617
+ "inheritedFrom": {
1618
+ "name": "ButtonBase",
1619
+ "module": "packages/mdui/src/components/button/button-base.ts"
1620
+ }
1621
+ },
1622
+ {
1623
+ "kind": "method",
1624
+ "name": "isButton",
1625
+ "privacy": "protected",
1626
+ "return": {
1627
+ "type": {
1628
+ "text": "boolean"
1629
+ }
1630
+ },
1631
+ "inheritedFrom": {
1632
+ "name": "ButtonBase",
1633
+ "module": "packages/mdui/src/components/button/button-base.ts"
1634
+ }
1635
+ }
1636
+ ],
1637
+ "events": [
1638
+ {
1639
+ "description": "获得焦点时触发",
1640
+ "name": "focus"
1641
+ },
1642
+ {
1643
+ "description": "失去焦点时触发",
1644
+ "name": "blur"
1645
+ },
1646
+ {
1647
+ "description": "选中状态变更时触发",
1648
+ "name": "change"
1649
+ },
1650
+ {
1651
+ "description": "表单字段验证未通过时触发",
1652
+ "name": "invalid"
1653
+ },
1654
+ {
1655
+ "name": "keydown",
1656
+ "type": {
1657
+ "text": "KeyboardEvent"
1658
+ },
1659
+ "inheritedFrom": {
1660
+ "name": "FocusableMixin",
1661
+ "module": "packages/shared/src/mixins/focusable.ts"
1662
+ }
1663
+ }
1664
+ ],
1665
+ "attributes": [
1666
+ {
1667
+ "name": "variant",
1668
+ "type": {
1669
+ "text": "| /*适用于最低优先级的操作*/ 'standard'\n | /*视觉效果强烈,适用于高优先级的操作*/ 'filled'\n | /*视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作*/ 'tonal'\n | /*适用于中等优先级的操作*/ 'outlined'"
1670
+ },
1671
+ "default": "'standard'",
1672
+ "description": "图标按钮的形状。可选值包括:\n\n* `standard`:适用于最低优先级的操作\n* `filled`:视觉效果强烈,适用于高优先级的操作\n* `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作\n* `outlined`:适用于中等优先级的操作",
1673
+ "fieldName": "variant"
1674
+ },
1675
+ {
1676
+ "name": "icon",
1677
+ "type": {
1678
+ "text": "string | undefined"
1679
+ },
1680
+ "description": "Material Icons 图标名。也可以通过 default slot 设置",
1681
+ "fieldName": "icon"
1682
+ },
1683
+ {
1684
+ "name": "selected-icon",
1685
+ "type": {
1686
+ "text": "string | undefined"
1687
+ },
1688
+ "description": "选中状态的 Material Icons 图标名。也可以通过 `slot=\"selected-icon\"` 设置",
1689
+ "fieldName": "selectedIcon"
1690
+ },
1691
+ {
1692
+ "name": "selectable",
1693
+ "type": {
1694
+ "text": "boolean"
1695
+ },
1696
+ "default": "false",
1697
+ "description": "是否可选中",
1698
+ "fieldName": "selectable"
1699
+ },
1700
+ {
1701
+ "name": "selected",
1702
+ "type": {
1703
+ "text": "boolean"
1704
+ },
1705
+ "default": "false",
1706
+ "description": "是否已被选中",
1707
+ "fieldName": "selected"
1708
+ },
1709
+ {
1710
+ "name": "href",
1711
+ "type": {
1712
+ "text": "string"
1515
1713
  },
1516
1714
  "description": "链接的目标 URL。\n\n如果设置了此属性,组件内部将渲染为 `<a>` 元素,并可以使用链接相关的属性。",
1517
1715
  "fieldName": "href",
@@ -1606,411 +1804,345 @@
1606
1804
  "name": "FocusableMixin",
1607
1805
  "module": "packages/shared/src/mixins/focusable.ts"
1608
1806
  }
1609
- }
1610
- ],
1611
- "mixins": [
1612
- {
1613
- "name": "AnchorMixin",
1614
- "package": "@mdui/shared/mixins/anchor.js"
1615
- },
1616
- {
1617
- "name": "RippleMixin",
1618
- "module": "/packages/mdui/src/components/ripple/ripple-mixin.js"
1619
1807
  },
1620
1808
  {
1621
- "name": "FocusableMixin",
1622
- "package": "@mdui/shared/mixins/focusable.js"
1623
- }
1624
- ],
1625
- "superclass": {
1626
- "name": "MduiElement",
1627
- "package": "@mdui/shared/base/mdui-element.js"
1628
- },
1629
- "events": [
1630
- {
1631
- "name": "keydown",
1809
+ "name": "disabled",
1632
1810
  "type": {
1633
- "text": "KeyboardEvent"
1811
+ "text": "boolean"
1634
1812
  },
1813
+ "default": "false",
1814
+ "description": "是否禁用",
1815
+ "fieldName": "disabled",
1635
1816
  "inheritedFrom": {
1636
- "name": "FocusableMixin",
1637
- "module": "packages/shared/src/mixins/focusable.ts"
1817
+ "name": "ButtonBase",
1818
+ "module": "packages/mdui/src/components/button/button-base.ts"
1638
1819
  }
1639
- }
1640
- ]
1641
- }
1642
- ],
1643
- "exports": [
1644
- {
1645
- "kind": "js",
1646
- "name": "ButtonBase",
1647
- "declaration": {
1648
- "name": "ButtonBase",
1649
- "module": "packages/mdui/src/components/button/button-base.ts"
1650
- }
1651
- }
1652
- ]
1653
- },
1654
- {
1655
- "kind": "javascript-module",
1656
- "path": "packages/mdui/src/components/button/index.ts",
1657
- "declarations": [
1658
- {
1659
- "kind": "class",
1660
- "description": "",
1661
- "name": "Button",
1662
- "cssProperties": [
1663
- {
1664
- "description": "组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)",
1665
- "name": "--shape-corner"
1666
- }
1667
- ],
1668
- "cssParts": [
1669
- {
1670
- "description": "内部的 `<button>` 或 `<a>` 元素",
1671
- "name": "button"
1672
1820
  },
1673
1821
  {
1674
- "description": "按钮的文本",
1675
- "name": "label"
1676
- },
1677
- {
1678
- "description": "按钮左侧的图标",
1679
- "name": "icon"
1680
- },
1681
- {
1682
- "description": "按钮右侧的图标",
1683
- "name": "end-icon"
1684
- },
1685
- {
1686
- "description": "加载中状态的 `<mdui-circular-progress>` 元素",
1687
- "name": "loading"
1688
- }
1689
- ],
1690
- "slots": [
1691
- {
1692
- "description": "按钮的文本",
1693
- "name": ""
1694
- },
1695
- {
1696
- "description": "按钮左侧的元素",
1697
- "name": "icon"
1698
- },
1699
- {
1700
- "description": "按钮右侧的元素",
1701
- "name": "end-icon"
1702
- }
1703
- ],
1704
- "members": [
1705
- {
1706
- "kind": "field",
1707
- "name": "variant",
1708
- "type": {
1709
- "text": "| /*带阴影的按钮,适用于需要将按钮与背景视觉分离的场景*/ 'elevated'\n | /*视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等*/ 'filled'\n | /*视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”*/ 'tonal'\n | /*带边框的按钮,适用于中等优先级,且次要的操作,如“返回”*/ 'outlined'\n | /*文本按钮,适用于最低优先级的操作*/ 'text'"
1710
- },
1711
- "privacy": "public",
1712
- "default": "'filled'",
1713
- "description": "按钮的形状。可选值包括:\n\n* `elevated`:带阴影的按钮,适用于需要将按钮与背景视觉分离的场景\n* `filled`:视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等\n* `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”\n* `outlined`:带边框的按钮,适用于中等优先级,且次要的操作,如“返回”\n* `text`:文本按钮,适用于最低优先级的操作",
1714
- "attribute": "variant",
1715
- "reflects": true
1716
- },
1717
- {
1718
- "kind": "field",
1719
- "name": "fullWidth",
1822
+ "name": "loading",
1720
1823
  "type": {
1721
1824
  "text": "boolean"
1722
1825
  },
1723
- "privacy": "public",
1724
1826
  "default": "false",
1725
- "description": "是否填满父元素宽度",
1726
- "attribute": "full-width",
1727
- "reflects": true
1827
+ "description": "是否处于加载中状态",
1828
+ "fieldName": "loading",
1829
+ "inheritedFrom": {
1830
+ "name": "ButtonBase",
1831
+ "module": "packages/mdui/src/components/button/button-base.ts"
1832
+ }
1728
1833
  },
1729
1834
  {
1730
- "kind": "field",
1731
- "name": "icon",
1835
+ "name": "name",
1732
1836
  "type": {
1733
- "text": "string | undefined"
1837
+ "text": "string"
1734
1838
  },
1735
- "privacy": "public",
1736
- "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置",
1737
- "attribute": "icon",
1738
- "reflects": true
1839
+ "default": "''",
1840
+ "description": "按钮的名称,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
1841
+ "fieldName": "name",
1842
+ "inheritedFrom": {
1843
+ "name": "ButtonBase",
1844
+ "module": "packages/mdui/src/components/button/button-base.ts"
1845
+ }
1739
1846
  },
1740
1847
  {
1741
- "kind": "field",
1742
- "name": "endIcon",
1848
+ "name": "value",
1743
1849
  "type": {
1744
- "text": "string | undefined"
1850
+ "text": "string"
1745
1851
  },
1746
- "privacy": "public",
1747
- "description": "右侧的 Material Icons 图标名。也可以通过 `slot=\"end-icon\"` 设置",
1748
- "attribute": "end-icon",
1749
- "reflects": true
1852
+ "default": "''",
1853
+ "description": "按钮的初始值,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
1854
+ "fieldName": "value",
1855
+ "inheritedFrom": {
1856
+ "name": "ButtonBase",
1857
+ "module": "packages/mdui/src/components/button/button-base.ts"
1858
+ }
1750
1859
  },
1751
1860
  {
1752
- "kind": "field",
1753
- "name": "rippleRef",
1861
+ "name": "type",
1754
1862
  "type": {
1755
- "text": "Ref<Ripple>"
1863
+ "text": "| /*此按钮将表单数据提交给服务器*/ 'submit'\n | /*此按钮重置所有组件为初始值*/ 'reset'\n | /*此按钮没有默认行为*/ 'button'"
1756
1864
  },
1757
- "privacy": "private",
1758
- "readonly": true
1759
- },
1760
- {
1761
- "kind": "field",
1762
- "name": "rippleElement",
1763
- "privacy": "protected",
1764
- "readonly": true
1765
- },
1766
- {
1767
- "kind": "method",
1768
- "name": "renderIcon",
1769
- "privacy": "private",
1770
- "return": {
1771
- "type": {
1772
- "text": "TemplateResult"
1773
- }
1774
- }
1775
- },
1776
- {
1777
- "kind": "method",
1778
- "name": "renderLabel",
1779
- "privacy": "private",
1780
- "return": {
1781
- "type": {
1782
- "text": "TemplateResult"
1783
- }
1784
- }
1785
- },
1786
- {
1787
- "kind": "method",
1788
- "name": "renderEndIcon",
1789
- "privacy": "private",
1790
- "return": {
1791
- "type": {
1792
- "text": "TemplateResult"
1793
- }
1865
+ "default": "'button'",
1866
+ "description": "按钮的类型。默认类型为 `button`。可选类型包括:\n\n* `submit`:点击按钮会提交表单数据到服务器\n* `reset`:点击按钮会将表单中的所有字段重置为初始值\n* `button`:此类型的按钮没有默认行为\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
1867
+ "fieldName": "type",
1868
+ "inheritedFrom": {
1869
+ "name": "ButtonBase",
1870
+ "module": "packages/mdui/src/components/button/button-base.ts"
1794
1871
  }
1795
1872
  },
1796
1873
  {
1797
- "kind": "method",
1798
- "name": "renderInner",
1799
- "privacy": "private",
1800
- "return": {
1801
- "type": {
1802
- "text": "TemplateResult[]"
1803
- }
1874
+ "name": "form",
1875
+ "type": {
1876
+ "text": "string | undefined"
1877
+ },
1878
+ "description": "关联的 `<form>` 元素。此属性值应为同一页面中的一个 `<form>` 元素的 `id`。\n\n如果未指定此属性,则该元素必须是 `<form>` 元素的子元素。通过此属性,你可以将元素放置在页面的任何位置,而不仅仅是 `<form>` 元素的子元素。\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
1879
+ "fieldName": "form",
1880
+ "inheritedFrom": {
1881
+ "name": "ButtonBase",
1882
+ "module": "packages/mdui/src/components/button/button-base.ts"
1804
1883
  }
1805
1884
  },
1806
1885
  {
1807
- "kind": "field",
1808
- "name": "href",
1886
+ "name": "formaction",
1809
1887
  "type": {
1810
- "text": "string"
1888
+ "text": "string | undefined"
1811
1889
  },
1812
- "privacy": "public",
1813
- "description": "链接的目标 URL。\n\n如果设置了此属性,组件内部将渲染为 `<a>` 元素,并可以使用链接相关的属性。",
1814
- "attribute": "href",
1815
- "reflects": true,
1890
+ "description": "指定提交表单的 URL。\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `action` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1891
+ "fieldName": "formAction",
1816
1892
  "inheritedFrom": {
1817
1893
  "name": "ButtonBase",
1818
1894
  "module": "packages/mdui/src/components/button/button-base.ts"
1819
1895
  }
1820
1896
  },
1821
1897
  {
1822
- "kind": "field",
1823
- "name": "download",
1898
+ "name": "formenctype",
1824
1899
  "type": {
1825
- "text": "string"
1900
+ "text": "| /*未指定该属性时的默认值*/ 'application/x-www-form-urlencoded'\n | /*当表单包含 `<input type=\"file\">` 元素时使用*/ 'multipart/form-data'\n | /*HTML5 新增,用于调试*/ 'text/plain' | undefined"
1826
1901
  },
1827
- "privacy": "public",
1828
- "description": "下载链接的目标。\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
1829
- "attribute": "download",
1830
- "reflects": true,
1902
+ "description": "指定提交表单到服务器的内容类型。可选值包括:\n\n* `application/x-www-form-urlencoded`:未指定该属性时的默认值\n* `multipart/form-data`:当表单包含 `<input type=\"file\">` 元素时使用\n* `text/plain`:HTML5 新增,用于调试\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `enctype` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1903
+ "fieldName": "formEnctype",
1831
1904
  "inheritedFrom": {
1832
1905
  "name": "ButtonBase",
1833
1906
  "module": "packages/mdui/src/components/button/button-base.ts"
1834
1907
  }
1835
1908
  },
1836
1909
  {
1837
- "kind": "field",
1838
- "name": "target",
1910
+ "name": "formmethod",
1839
1911
  "type": {
1840
- "text": "| /*在新窗口中打开链接*/ '_blank'\n | /*在父框架中打开链接*/ '_parent'\n | /*默认。在当前框架中打开链接*/ '_self'\n | /*在整个窗口中打开链接*/ '_top'"
1912
+ "text": "| /*表单数据包含在表单内容中,发送到服务器*/ 'post'\n | /*表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法*/ 'get' | undefined"
1841
1913
  },
1842
- "privacy": "public",
1843
- "description": "链接的打开方式。可选值包括:\n\n* `_blank`:在新窗口中打开链接\n* `_parent`:在父框架中打开链接\n* `_self`:默认。在当前框架中打开链接\n* `_top`:在整个窗口中打开链接\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
1844
- "attribute": "target",
1845
- "reflects": true,
1914
+ "description": "指定提交表单时使用的 HTTP 方法。可选值包括:\n\n* `post`:表单数据包含在表单内容中,发送到服务器\n* `get`:表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `method` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1915
+ "fieldName": "formMethod",
1846
1916
  "inheritedFrom": {
1847
1917
  "name": "ButtonBase",
1848
1918
  "module": "packages/mdui/src/components/button/button-base.ts"
1849
1919
  }
1850
1920
  },
1851
1921
  {
1852
- "kind": "field",
1853
- "name": "rel",
1922
+ "name": "formnovalidate",
1854
1923
  "type": {
1855
- "text": "| /*当前文档的替代版本*/ 'alternate'\n | /*当前文档或文章的作者*/ 'author'\n | /*永久链接到最近的祖先章节*/ 'bookmark'\n | /*引用的文档与当前文档不在同一站点*/ 'external'\n | /*链接到相关的帮助文档*/ 'help'\n | /*当前文档的主要内容由被引用文件的版权许可覆盖*/ 'license'\n | /*当前文档代表链接内容的所有者*/ 'me'\n | /*当前文档是系列中的一部分,被引用的文档是系列的下一个文档*/ 'next'\n | /*当前文档的作者或发布者不认可被引用的文件*/ 'nofollow'\n | /*不包含 `Referer` 头。类似于 `noopener` 的效果*/ 'noreferrer'\n | /*如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文*/ 'opener'\n | /*当前文档是系列的一部分,被引用的文档是系列的上一个文档*/ 'prev'\n | /*提供一个资源链接,可用于搜索当前文件及其相关页面*/ 'search'\n | /*提供一个适用于当前文档的标签(由给定地址识别)*/ 'tag'"
1924
+ "text": "boolean"
1856
1925
  },
1857
- "privacy": "public",
1858
- "description": "当前文档与被链接文档之间的关系。可选值包括:\n\n* `alternate`:当前文档的替代版本\n* `author`:当前文档或文章的作者\n* `bookmark`:永久链接到最近的祖先章节\n* `external`:引用的文档与当前文档不在同一站点\n* `help`:链接到相关的帮助文档\n* `license`:当前文档的主要内容由被引用文件的版权许可覆盖\n* `me`:当前文档代表链接内容的所有者\n* `next`:当前文档是系列中的一部分,被引用的文档是系列的下一个文档\n* `nofollow`:当前文档的作者或发布者不认可被引用的文件\n* `noreferrer`:不包含 `Referer` 头。类似于 `noopener` 的效果\n* `opener`:如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文\n* `prev`:当前文档是系列的一部分,被引用的文档是系列的上一个文档\n* `search`:提供一个资源链接,可用于搜索当前文件及其相关页面\n* `tag`:提供一个适用于当前文档的标签(由给定地址识别)\n\n**Note**:仅在指定了 `href` 属性时可用。",
1859
- "attribute": "rel",
1860
- "reflects": true,
1926
+ "default": "false",
1927
+ "description": "如果设置了此属性,表单提交时将不执行表单验证。\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1928
+ "fieldName": "formNoValidate",
1861
1929
  "inheritedFrom": {
1862
1930
  "name": "ButtonBase",
1863
1931
  "module": "packages/mdui/src/components/button/button-base.ts"
1864
1932
  }
1865
1933
  },
1866
1934
  {
1867
- "kind": "method",
1868
- "name": "renderAnchor",
1869
- "privacy": "protected",
1870
- "return": {
1871
- "type": {
1872
- "text": "TemplateResult"
1873
- }
1935
+ "name": "formtarget",
1936
+ "type": {
1937
+ "text": "| /*默认选项,在当前框架中打开*/ '_self'\n | /*在新窗口中打开*/ '_blank'\n | /*在父框架中打开*/ '_parent'\n | /*在整个窗口中打开*/ '_top' | undefined"
1874
1938
  },
1875
- "parameters": [
1876
- {
1877
- "name": "{\n id,\n className,\n part,\n content = html`<slot></slot>`,\n refDirective,\n tabIndex,\n }",
1878
- "type": {
1879
- "text": "RenderAnchorOptions"
1880
- }
1881
- }
1882
- ],
1939
+ "description": "提交表单后接收到的响应应显示在何处。可选值包括:\n\n* `_self`:默认选项,在当前框架中打开\n* `_blank`:在新窗口中打开\n* `_parent`:在父框架中打开\n* `_top`:在整个窗口中打开\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `target` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
1940
+ "fieldName": "formTarget",
1883
1941
  "inheritedFrom": {
1884
1942
  "name": "ButtonBase",
1885
1943
  "module": "packages/mdui/src/components/button/button-base.ts"
1886
1944
  }
1887
- },
1945
+ }
1946
+ ],
1947
+ "superclass": {
1948
+ "name": "ButtonBase",
1949
+ "module": "/packages/mdui/src/components/button/button-base.js"
1950
+ },
1951
+ "summary": "图标按钮组件\n\n```html\n<mdui-button-icon icon=\"search\"></mdui-button-icon>\n```",
1952
+ "tagName": "mdui-button-icon",
1953
+ "customElement": true
1954
+ }
1955
+ ],
1956
+ "exports": [
1957
+ {
1958
+ "kind": "js",
1959
+ "name": "ButtonIcon",
1960
+ "declaration": {
1961
+ "name": "ButtonIcon",
1962
+ "module": "packages/mdui/src/components/button-icon/index.ts"
1963
+ }
1964
+ },
1965
+ {
1966
+ "kind": "custom-element-definition",
1967
+ "name": "mdui-button-icon",
1968
+ "declaration": {
1969
+ "name": "ButtonIcon",
1970
+ "module": "packages/mdui/src/components/button-icon/index.ts"
1971
+ }
1972
+ }
1973
+ ]
1974
+ },
1975
+ {
1976
+ "kind": "javascript-module",
1977
+ "path": "packages/mdui/src/components/button/button-base.ts",
1978
+ "declarations": [
1979
+ {
1980
+ "kind": "class",
1981
+ "description": "",
1982
+ "name": "ButtonBase",
1983
+ "members": [
1888
1984
  {
1889
1985
  "kind": "field",
1890
- "name": "autofocus",
1986
+ "name": "disabled",
1891
1987
  "type": {
1892
1988
  "text": "boolean"
1893
1989
  },
1894
1990
  "privacy": "public",
1895
1991
  "default": "false",
1896
- "description": "是否在页面加载完成后自动获取焦点",
1897
- "attribute": "autofocus",
1898
- "reflects": true,
1899
- "inheritedFrom": {
1900
- "name": "ButtonBase",
1901
- "module": "packages/mdui/src/components/button/button-base.ts"
1902
- }
1992
+ "description": "是否禁用",
1993
+ "attribute": "disabled",
1994
+ "reflects": true
1903
1995
  },
1904
1996
  {
1905
1997
  "kind": "field",
1906
- "name": "focused",
1998
+ "name": "loading",
1907
1999
  "type": {
1908
2000
  "text": "boolean"
1909
2001
  },
1910
- "privacy": "private",
2002
+ "privacy": "public",
1911
2003
  "default": "false",
1912
- "description": "是否获得了焦点,不管是鼠标点击,还是键盘切换获得的焦点,都会添加该属性\n添加到 :host 元素上,供 CSS 选择器添加样式",
1913
- "attribute": "focused",
1914
- "reflects": true,
1915
- "inheritedFrom": {
1916
- "name": "ButtonBase",
1917
- "module": "packages/mdui/src/components/button/button-base.ts"
1918
- }
2004
+ "description": "是否处于加载中状态",
2005
+ "attribute": "loading",
2006
+ "reflects": true
1919
2007
  },
1920
2008
  {
1921
2009
  "kind": "field",
1922
- "name": "focusVisible",
2010
+ "name": "name",
1923
2011
  "type": {
1924
- "text": "boolean"
2012
+ "text": "string"
1925
2013
  },
1926
- "privacy": "private",
1927
- "default": "false",
1928
- "description": "是否通过键盘切换获得了焦点\n添加到 :host 元素上,供 CSS 选择器添加样式",
1929
- "attribute": "focus-visible",
1930
- "reflects": true,
1931
- "inheritedFrom": {
1932
- "name": "ButtonBase",
1933
- "module": "packages/mdui/src/components/button/button-base.ts"
1934
- }
2014
+ "privacy": "public",
2015
+ "default": "''",
2016
+ "description": "按钮的名称,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
2017
+ "attribute": "name",
2018
+ "reflects": true
1935
2019
  },
1936
2020
  {
1937
2021
  "kind": "field",
1938
- "name": "focusableDefinedController",
2022
+ "name": "value",
1939
2023
  "type": {
1940
- "text": "DefinedController"
2024
+ "text": "string"
1941
2025
  },
1942
- "privacy": "protected",
1943
- "default": "new DefinedController(this, { relatedElements: [''] })",
1944
- "inheritedFrom": {
1945
- "name": "ButtonBase",
1946
- "module": "packages/mdui/src/components/button/button-base.ts"
1947
- }
2026
+ "privacy": "public",
2027
+ "default": "''",
2028
+ "description": "按钮的初始值,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
2029
+ "attribute": "value",
2030
+ "reflects": true
2031
+ },
2032
+ {
2033
+ "kind": "field",
2034
+ "name": "type",
2035
+ "type": {
2036
+ "text": "| /*此按钮将表单数据提交给服务器*/ 'submit'\n | /*此按钮重置所有组件为初始值*/ 'reset'\n | /*此按钮没有默认行为*/ 'button'"
2037
+ },
2038
+ "privacy": "public",
2039
+ "default": "'button'",
2040
+ "description": "按钮的类型。默认类型为 `button`。可选类型包括:\n\n* `submit`:点击按钮会提交表单数据到服务器\n* `reset`:点击按钮会将表单中的所有字段重置为初始值\n* `button`:此类型的按钮没有默认行为\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
2041
+ "attribute": "type",
2042
+ "reflects": true
2043
+ },
2044
+ {
2045
+ "kind": "field",
2046
+ "name": "form",
2047
+ "type": {
2048
+ "text": "string | undefined"
2049
+ },
2050
+ "privacy": "public",
2051
+ "description": "关联的 `<form>` 元素。此属性值应为同一页面中的一个 `<form>` 元素的 `id`。\n\n如果未指定此属性,则该元素必须是 `<form>` 元素的子元素。通过此属性,你可以将元素放置在页面的任何位置,而不仅仅是 `<form>` 元素的子元素。\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
2052
+ "attribute": "form",
2053
+ "reflects": true
2054
+ },
2055
+ {
2056
+ "kind": "field",
2057
+ "name": "formAction",
2058
+ "type": {
2059
+ "text": "string | undefined"
2060
+ },
2061
+ "privacy": "public",
2062
+ "description": "指定提交表单的 URL。\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `action` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2063
+ "attribute": "formaction",
2064
+ "reflects": true
2065
+ },
2066
+ {
2067
+ "kind": "field",
2068
+ "name": "formEnctype",
2069
+ "type": {
2070
+ "text": "| /*未指定该属性时的默认值*/ 'application/x-www-form-urlencoded'\n | /*当表单包含 `<input type=\"file\">` 元素时使用*/ 'multipart/form-data'\n | /*HTML5 新增,用于调试*/ 'text/plain' | undefined"
2071
+ },
2072
+ "privacy": "public",
2073
+ "description": "指定提交表单到服务器的内容类型。可选值包括:\n\n* `application/x-www-form-urlencoded`:未指定该属性时的默认值\n* `multipart/form-data`:当表单包含 `<input type=\"file\">` 元素时使用\n* `text/plain`:HTML5 新增,用于调试\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `enctype` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2074
+ "attribute": "formenctype",
2075
+ "reflects": true
2076
+ },
2077
+ {
2078
+ "kind": "field",
2079
+ "name": "formMethod",
2080
+ "type": {
2081
+ "text": "| /*表单数据包含在表单内容中,发送到服务器*/ 'post'\n | /*表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法*/ 'get' | undefined"
2082
+ },
2083
+ "privacy": "public",
2084
+ "description": "指定提交表单时使用的 HTTP 方法。可选值包括:\n\n* `post`:表单数据包含在表单内容中,发送到服务器\n* `get`:表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `method` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2085
+ "attribute": "formmethod",
2086
+ "reflects": true
2087
+ },
2088
+ {
2089
+ "kind": "field",
2090
+ "name": "formNoValidate",
2091
+ "type": {
2092
+ "text": "boolean"
2093
+ },
2094
+ "privacy": "public",
2095
+ "default": "false",
2096
+ "description": "如果设置了此属性,表单提交时将不执行表单验证。\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2097
+ "attribute": "formnovalidate",
2098
+ "reflects": true
1948
2099
  },
1949
2100
  {
1950
2101
  "kind": "field",
1951
- "name": "_manipulatingTabindex",
2102
+ "name": "formTarget",
1952
2103
  "type": {
1953
- "text": "boolean"
2104
+ "text": "| /*默认选项,在当前框架中打开*/ '_self'\n | /*在新窗口中打开*/ '_blank'\n | /*在父框架中打开*/ '_parent'\n | /*在整个窗口中打开*/ '_top' | undefined"
1954
2105
  },
1955
- "privacy": "private",
1956
- "default": "false",
1957
- "inheritedFrom": {
1958
- "name": "ButtonBase",
1959
- "module": "packages/mdui/src/components/button/button-base.ts"
1960
- }
2106
+ "privacy": "public",
2107
+ "description": "提交表单后接收到的响应应显示在何处。可选值包括:\n\n* `_self`:默认选项,在当前框架中打开\n* `_blank`:在新窗口中打开\n* `_parent`:在父框架中打开\n* `_top`:在整个窗口中打开\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `target` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2108
+ "attribute": "formtarget",
2109
+ "reflects": true
1961
2110
  },
1962
2111
  {
1963
2112
  "kind": "field",
1964
- "name": "_tabIndex",
1965
- "type": {
1966
- "text": "number"
1967
- },
2113
+ "name": "formController",
1968
2114
  "privacy": "private",
1969
- "default": "0",
1970
- "inheritedFrom": {
1971
- "name": "ButtonBase",
1972
- "module": "packages/mdui/src/components/button/button-base.ts"
1973
- }
2115
+ "readonly": true,
2116
+ "default": "new FormController(this)"
1974
2117
  },
1975
2118
  {
1976
2119
  "kind": "field",
1977
- "name": "_lastFocusDisabled",
2120
+ "name": "validity",
1978
2121
  "type": {
1979
- "text": "boolean | undefined"
2122
+ "text": "ValidityState | undefined"
1980
2123
  },
1981
- "privacy": "private",
1982
- "inheritedFrom": {
1983
- "name": "ButtonBase",
1984
- "module": "packages/mdui/src/components/button/button-base.ts"
1985
- }
2124
+ "privacy": "public",
2125
+ "description": "表单验证状态对象,具体参见 [`ValidityState`](https://developer.mozilla.org/zh-CN/docs/Web/API/ValidityState)",
2126
+ "readonly": true
1986
2127
  },
1987
2128
  {
1988
2129
  "kind": "field",
1989
- "name": "tabIndex",
2130
+ "name": "validationMessage",
1990
2131
  "type": {
1991
- "text": "number"
2132
+ "text": "string | undefined"
1992
2133
  },
1993
2134
  "privacy": "public",
1994
- "description": "元素在使用 Tab 键切换焦点时的顺序",
1995
- "attribute": "tabindex",
1996
- "inheritedFrom": {
1997
- "name": "ButtonBase",
1998
- "module": "packages/mdui/src/components/button/button-base.ts"
1999
- }
2135
+ "description": "如果表单验证未通过,此属性将包含提示信息。如果验证通过,此属性将为空字符串",
2136
+ "readonly": true
2000
2137
  },
2001
2138
  {
2002
2139
  "kind": "field",
2003
- "name": "focusDisabled",
2140
+ "name": "rippleDisabled",
2004
2141
  "type": {
2005
2142
  "text": "boolean"
2006
2143
  },
2007
2144
  "privacy": "protected",
2008
- "description": "父类要实现该属性,表示是否禁用 focus 状态",
2009
- "readonly": true,
2010
- "inheritedFrom": {
2011
- "name": "ButtonBase",
2012
- "module": "packages/mdui/src/components/button/button-base.ts"
2013
- }
2145
+ "readonly": true
2014
2146
  },
2015
2147
  {
2016
2148
  "kind": "field",
@@ -2022,68 +2154,50 @@
2022
2154
  "description": "最终获得焦点的元素",
2023
2155
  "readonly": true,
2024
2156
  "inheritedFrom": {
2025
- "name": "ButtonBase",
2026
- "module": "packages/mdui/src/components/button/button-base.ts"
2157
+ "name": "FocusableMixin",
2158
+ "module": "packages/shared/src/mixins/focusable.ts"
2027
2159
  }
2028
2160
  },
2029
2161
  {
2030
- "kind": "method",
2031
- "name": "click",
2032
- "privacy": "public",
2033
- "return": {
2034
- "type": {
2035
- "text": "void"
2036
- }
2162
+ "kind": "field",
2163
+ "name": "focusDisabled",
2164
+ "type": {
2165
+ "text": "boolean"
2037
2166
  },
2038
- "description": "模拟鼠标点击元素",
2167
+ "privacy": "protected",
2168
+ "description": "父类要实现该属性,表示是否禁用 focus 状态",
2169
+ "readonly": true,
2039
2170
  "inheritedFrom": {
2040
- "name": "ButtonBase",
2041
- "module": "packages/mdui/src/components/button/button-base.ts"
2171
+ "name": "FocusableMixin",
2172
+ "module": "packages/shared/src/mixins/focusable.ts"
2042
2173
  }
2043
2174
  },
2044
2175
  {
2045
2176
  "kind": "method",
2046
- "name": "focus",
2177
+ "name": "checkValidity",
2047
2178
  "privacy": "public",
2048
2179
  "return": {
2049
2180
  "type": {
2050
- "text": "void"
2181
+ "text": "boolean"
2051
2182
  }
2052
2183
  },
2053
- "parameters": [
2054
- {
2055
- "name": "options",
2056
- "optional": true,
2057
- "type": {
2058
- "text": "FocusOptions"
2059
- }
2060
- }
2061
- ],
2062
- "description": "将焦点设置到当前元素。\n\n可以传入一个对象作为参数,该对象的属性包括:\n\n* `preventScroll`:默认情况下,元素获取焦点后,页面会滚动以将该元素滚动到视图中。如果不希望页面滚动,可以将此属性设置为 `true`。",
2063
- "inheritedFrom": {
2064
- "name": "ButtonBase",
2065
- "module": "packages/mdui/src/components/button/button-base.ts"
2066
- }
2184
+ "description": "检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`"
2067
2185
  },
2068
2186
  {
2069
2187
  "kind": "method",
2070
- "name": "blur",
2188
+ "name": "reportValidity",
2071
2189
  "privacy": "public",
2072
2190
  "return": {
2073
2191
  "type": {
2074
- "text": "void"
2192
+ "text": "boolean"
2075
2193
  }
2076
2194
  },
2077
- "description": "移除当前元素的焦点",
2078
- "inheritedFrom": {
2079
- "name": "ButtonBase",
2080
- "module": "packages/mdui/src/components/button/button-base.ts"
2081
- }
2195
+ "description": "检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`。\n\n如果验证未通过,还会在组件上显示验证失败的提示。"
2082
2196
  },
2083
2197
  {
2084
2198
  "kind": "method",
2085
- "name": "firstUpdated",
2086
- "privacy": "protected",
2199
+ "name": "setCustomValidity",
2200
+ "privacy": "public",
2087
2201
  "return": {
2088
2202
  "type": {
2089
2203
  "text": "void"
@@ -2091,483 +2205,499 @@
2091
2205
  },
2092
2206
  "parameters": [
2093
2207
  {
2094
- "name": "changedProperties",
2208
+ "name": "message",
2095
2209
  "type": {
2096
- "text": "PropertyValues"
2097
- }
2210
+ "text": "string"
2211
+ },
2212
+ "description": "自定义的错误提示文本"
2098
2213
  }
2099
2214
  ],
2100
- "inheritedFrom": {
2101
- "name": "ButtonBase",
2102
- "module": "packages/mdui/src/components/button/button-base.ts"
2103
- }
2215
+ "description": "设置自定义的错误提示文本。只要这个文本不为空,就表示字段未通过验证"
2104
2216
  },
2105
2217
  {
2106
2218
  "kind": "method",
2107
- "name": "update",
2219
+ "name": "renderLoading",
2108
2220
  "privacy": "protected",
2109
2221
  "return": {
2110
2222
  "type": {
2111
- "text": "void"
2112
- }
2113
- },
2114
- "parameters": [
2115
- {
2116
- "name": "changedProperties",
2117
- "type": {
2118
- "text": "PropertyValues"
2119
- }
2223
+ "text": "TemplateResult"
2120
2224
  }
2121
- ],
2122
- "inheritedFrom": {
2123
- "name": "ButtonBase",
2124
- "module": "packages/mdui/src/components/button/button-base.ts"
2125
2225
  }
2126
2226
  },
2127
2227
  {
2128
2228
  "kind": "method",
2129
- "name": "updated",
2229
+ "name": "renderButton",
2130
2230
  "privacy": "protected",
2131
2231
  "return": {
2132
2232
  "type": {
2133
- "text": "void"
2134
- }
2135
- },
2136
- "parameters": [
2137
- {
2138
- "name": "changedProperties",
2139
- "type": {
2140
- "text": "PropertyValues"
2141
- }
2142
- }
2143
- ],
2144
- "inheritedFrom": {
2145
- "name": "ButtonBase",
2146
- "module": "packages/mdui/src/components/button/button-base.ts"
2147
- }
2148
- },
2149
- {
2150
- "kind": "method",
2151
- "name": "manageFocusElementTabindex",
2152
- "privacy": "private",
2153
- "return": {
2154
- "type": {
2155
- "text": "Promise<void>"
2233
+ "text": "TemplateResult"
2156
2234
  }
2157
2235
  },
2158
2236
  "parameters": [
2159
2237
  {
2160
- "name": "tabIndex",
2238
+ "name": "{\n id,\n className,\n part,\n content = html`<slot></slot>`,\n }",
2161
2239
  "type": {
2162
- "text": "number"
2240
+ "text": "RenderButtonOptions"
2163
2241
  }
2164
2242
  }
2165
- ],
2166
- "inheritedFrom": {
2167
- "name": "ButtonBase",
2168
- "module": "packages/mdui/src/components/button/button-base.ts"
2169
- }
2243
+ ]
2170
2244
  },
2171
2245
  {
2172
2246
  "kind": "method",
2173
- "name": "manageAutoFocus",
2174
- "privacy": "private",
2247
+ "name": "isButton",
2248
+ "privacy": "protected",
2175
2249
  "return": {
2176
2250
  "type": {
2177
- "text": "void"
2251
+ "text": "boolean"
2178
2252
  }
2179
- },
2180
- "inheritedFrom": {
2181
- "name": "ButtonBase",
2182
- "module": "packages/mdui/src/components/button/button-base.ts"
2183
- }
2184
- },
2185
- {
2186
- "kind": "field",
2187
- "name": "disabled",
2188
- "type": {
2189
- "text": "boolean"
2190
- },
2191
- "privacy": "public",
2192
- "default": "false",
2193
- "description": "是否禁用",
2194
- "attribute": "disabled",
2195
- "reflects": true,
2196
- "inheritedFrom": {
2197
- "name": "ButtonBase",
2198
- "module": "packages/mdui/src/components/button/button-base.ts"
2199
- }
2200
- },
2201
- {
2202
- "kind": "field",
2203
- "name": "loading",
2204
- "type": {
2205
- "text": "boolean"
2206
- },
2207
- "privacy": "public",
2208
- "default": "false",
2209
- "description": "是否处于加载中状态",
2210
- "attribute": "loading",
2211
- "reflects": true,
2212
- "inheritedFrom": {
2213
- "name": "ButtonBase",
2214
- "module": "packages/mdui/src/components/button/button-base.ts"
2215
2253
  }
2216
2254
  },
2217
2255
  {
2218
2256
  "kind": "field",
2219
- "name": "name",
2257
+ "name": "href",
2220
2258
  "type": {
2221
2259
  "text": "string"
2222
2260
  },
2223
2261
  "privacy": "public",
2224
- "default": "''",
2225
- "description": "按钮的名称,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
2226
- "attribute": "name",
2262
+ "description": "链接的目标 URL。\n\n如果设置了此属性,组件内部将渲染为 `<a>` 元素,并可以使用链接相关的属性。",
2263
+ "attribute": "href",
2227
2264
  "reflects": true,
2228
2265
  "inheritedFrom": {
2229
- "name": "ButtonBase",
2230
- "module": "packages/mdui/src/components/button/button-base.ts"
2266
+ "name": "AnchorMixin",
2267
+ "module": "packages/shared/src/mixins/anchor.ts"
2231
2268
  }
2232
2269
  },
2233
2270
  {
2234
2271
  "kind": "field",
2235
- "name": "value",
2272
+ "name": "download",
2236
2273
  "type": {
2237
2274
  "text": "string"
2238
2275
  },
2239
2276
  "privacy": "public",
2240
- "default": "''",
2241
- "description": "按钮的初始值,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
2242
- "attribute": "value",
2277
+ "description": "下载链接的目标。\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
2278
+ "attribute": "download",
2243
2279
  "reflects": true,
2244
2280
  "inheritedFrom": {
2245
- "name": "ButtonBase",
2246
- "module": "packages/mdui/src/components/button/button-base.ts"
2281
+ "name": "AnchorMixin",
2282
+ "module": "packages/shared/src/mixins/anchor.ts"
2247
2283
  }
2248
2284
  },
2249
2285
  {
2250
2286
  "kind": "field",
2251
- "name": "type",
2287
+ "name": "target",
2252
2288
  "type": {
2253
- "text": "| /*此按钮将表单数据提交给服务器*/ 'submit'\n | /*此按钮重置所有组件为初始值*/ 'reset'\n | /*此按钮没有默认行为*/ 'button'"
2289
+ "text": "| /*在新窗口中打开链接*/ '_blank'\n | /*在父框架中打开链接*/ '_parent'\n | /*默认。在当前框架中打开链接*/ '_self'\n | /*在整个窗口中打开链接*/ '_top'"
2254
2290
  },
2255
2291
  "privacy": "public",
2256
- "default": "'button'",
2257
- "description": "按钮的类型。默认类型为 `button`。可选类型包括:\n\n* `submit`:点击按钮会提交表单数据到服务器\n* `reset`:点击按钮会将表单中的所有字段重置为初始值\n* `button`:此类型的按钮没有默认行为\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
2258
- "attribute": "type",
2292
+ "description": "链接的打开方式。可选值包括:\n\n* `_blank`:在新窗口中打开链接\n* `_parent`:在父框架中打开链接\n* `_self`:默认。在当前框架中打开链接\n* `_top`:在整个窗口中打开链接\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
2293
+ "attribute": "target",
2259
2294
  "reflects": true,
2260
2295
  "inheritedFrom": {
2261
- "name": "ButtonBase",
2262
- "module": "packages/mdui/src/components/button/button-base.ts"
2296
+ "name": "AnchorMixin",
2297
+ "module": "packages/shared/src/mixins/anchor.ts"
2263
2298
  }
2264
2299
  },
2265
2300
  {
2266
2301
  "kind": "field",
2267
- "name": "form",
2302
+ "name": "rel",
2268
2303
  "type": {
2269
- "text": "string | undefined"
2304
+ "text": "| /*当前文档的替代版本*/ 'alternate'\n | /*当前文档或文章的作者*/ 'author'\n | /*永久链接到最近的祖先章节*/ 'bookmark'\n | /*引用的文档与当前文档不在同一站点*/ 'external'\n | /*链接到相关的帮助文档*/ 'help'\n | /*当前文档的主要内容由被引用文件的版权许可覆盖*/ 'license'\n | /*当前文档代表链接内容的所有者*/ 'me'\n | /*当前文档是系列中的一部分,被引用的文档是系列的下一个文档*/ 'next'\n | /*当前文档的作者或发布者不认可被引用的文件*/ 'nofollow'\n | /*不包含 `Referer` 头。类似于 `noopener` 的效果*/ 'noreferrer'\n | /*如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文*/ 'opener'\n | /*当前文档是系列的一部分,被引用的文档是系列的上一个文档*/ 'prev'\n | /*提供一个资源链接,可用于搜索当前文件及其相关页面*/ 'search'\n | /*提供一个适用于当前文档的标签(由给定地址识别)*/ 'tag'"
2270
2305
  },
2271
2306
  "privacy": "public",
2272
- "description": "关联的 `<form>` 元素。此属性值应为同一页面中的一个 `<form>` 元素的 `id`。\n\n如果未指定此属性,则该元素必须是 `<form>` 元素的子元素。通过此属性,你可以将元素放置在页面的任何位置,而不仅仅是 `<form>` 元素的子元素。\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
2273
- "attribute": "form",
2307
+ "description": "当前文档与被链接文档之间的关系。可选值包括:\n\n* `alternate`:当前文档的替代版本\n* `author`:当前文档或文章的作者\n* `bookmark`:永久链接到最近的祖先章节\n* `external`:引用的文档与当前文档不在同一站点\n* `help`:链接到相关的帮助文档\n* `license`:当前文档的主要内容由被引用文件的版权许可覆盖\n* `me`:当前文档代表链接内容的所有者\n* `next`:当前文档是系列中的一部分,被引用的文档是系列的下一个文档\n* `nofollow`:当前文档的作者或发布者不认可被引用的文件\n* `noreferrer`:不包含 `Referer` 头。类似于 `noopener` 的效果\n* `opener`:如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文\n* `prev`:当前文档是系列的一部分,被引用的文档是系列的上一个文档\n* `search`:提供一个资源链接,可用于搜索当前文件及其相关页面\n* `tag`:提供一个适用于当前文档的标签(由给定地址识别)\n\n**Note**:仅在指定了 `href` 属性时可用。",
2308
+ "attribute": "rel",
2274
2309
  "reflects": true,
2275
2310
  "inheritedFrom": {
2276
- "name": "ButtonBase",
2277
- "module": "packages/mdui/src/components/button/button-base.ts"
2311
+ "name": "AnchorMixin",
2312
+ "module": "packages/shared/src/mixins/anchor.ts"
2278
2313
  }
2279
2314
  },
2280
2315
  {
2281
- "kind": "field",
2282
- "name": "formAction",
2283
- "type": {
2284
- "text": "string | undefined"
2316
+ "kind": "method",
2317
+ "name": "renderAnchor",
2318
+ "privacy": "protected",
2319
+ "return": {
2320
+ "type": {
2321
+ "text": "TemplateResult"
2322
+ }
2285
2323
  },
2286
- "privacy": "public",
2287
- "description": "指定提交表单的 URL。\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `action` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2288
- "attribute": "formaction",
2289
- "reflects": true,
2324
+ "parameters": [
2325
+ {
2326
+ "name": "{\n id,\n className,\n part,\n content = html`<slot></slot>`,\n refDirective,\n tabIndex,\n }",
2327
+ "type": {
2328
+ "text": "RenderAnchorOptions"
2329
+ }
2330
+ }
2331
+ ],
2290
2332
  "inheritedFrom": {
2291
- "name": "ButtonBase",
2292
- "module": "packages/mdui/src/components/button/button-base.ts"
2333
+ "name": "AnchorMixin",
2334
+ "module": "packages/shared/src/mixins/anchor.ts"
2293
2335
  }
2294
2336
  },
2295
2337
  {
2296
2338
  "kind": "field",
2297
- "name": "formEnctype",
2339
+ "name": "autofocus",
2298
2340
  "type": {
2299
- "text": "| /*未指定该属性时的默认值*/ 'application/x-www-form-urlencoded'\n | /*当表单包含 `<input type=\"file\">` 元素时使用*/ 'multipart/form-data'\n | /*HTML5 新增,用于调试*/ 'text/plain' | undefined"
2341
+ "text": "boolean"
2300
2342
  },
2301
2343
  "privacy": "public",
2302
- "description": "指定提交表单到服务器的内容类型。可选值包括:\n\n* `application/x-www-form-urlencoded`:未指定该属性时的默认值\n* `multipart/form-data`:当表单包含 `<input type=\"file\">` 元素时使用\n* `text/plain`:HTML5 新增,用于调试\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `enctype` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2303
- "attribute": "formenctype",
2344
+ "default": "false",
2345
+ "description": "是否在页面加载完成后自动获取焦点",
2346
+ "attribute": "autofocus",
2304
2347
  "reflects": true,
2305
2348
  "inheritedFrom": {
2306
- "name": "ButtonBase",
2307
- "module": "packages/mdui/src/components/button/button-base.ts"
2349
+ "name": "FocusableMixin",
2350
+ "module": "packages/shared/src/mixins/focusable.ts"
2308
2351
  }
2309
2352
  },
2310
2353
  {
2311
2354
  "kind": "field",
2312
- "name": "formMethod",
2355
+ "name": "focused",
2313
2356
  "type": {
2314
- "text": "| /*表单数据包含在表单内容中,发送到服务器*/ 'post'\n | /*表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法*/ 'get' | undefined"
2357
+ "text": "boolean"
2315
2358
  },
2316
- "privacy": "public",
2317
- "description": "指定提交表单时使用的 HTTP 方法。可选值包括:\n\n* `post`:表单数据包含在表单内容中,发送到服务器\n* `get`:表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `method` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2318
- "attribute": "formmethod",
2359
+ "privacy": "private",
2360
+ "default": "false",
2361
+ "description": "是否获得了焦点,不管是鼠标点击,还是键盘切换获得的焦点,都会添加该属性\n添加到 :host 元素上,供 CSS 选择器添加样式",
2362
+ "attribute": "focused",
2319
2363
  "reflects": true,
2320
2364
  "inheritedFrom": {
2321
- "name": "ButtonBase",
2322
- "module": "packages/mdui/src/components/button/button-base.ts"
2365
+ "name": "FocusableMixin",
2366
+ "module": "packages/shared/src/mixins/focusable.ts"
2323
2367
  }
2324
2368
  },
2325
2369
  {
2326
2370
  "kind": "field",
2327
- "name": "formNoValidate",
2371
+ "name": "focusVisible",
2328
2372
  "type": {
2329
2373
  "text": "boolean"
2330
2374
  },
2331
- "privacy": "public",
2375
+ "privacy": "private",
2332
2376
  "default": "false",
2333
- "description": "如果设置了此属性,表单提交时将不执行表单验证。\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2334
- "attribute": "formnovalidate",
2377
+ "description": "是否通过键盘切换获得了焦点\n添加到 :host 元素上,供 CSS 选择器添加样式",
2378
+ "attribute": "focus-visible",
2335
2379
  "reflects": true,
2336
2380
  "inheritedFrom": {
2337
- "name": "ButtonBase",
2338
- "module": "packages/mdui/src/components/button/button-base.ts"
2381
+ "name": "FocusableMixin",
2382
+ "module": "packages/shared/src/mixins/focusable.ts"
2339
2383
  }
2340
2384
  },
2341
2385
  {
2342
2386
  "kind": "field",
2343
- "name": "formTarget",
2387
+ "name": "focusableDefinedController",
2344
2388
  "type": {
2345
- "text": "| /*默认选项,在当前框架中打开*/ '_self'\n | /*在新窗口中打开*/ '_blank'\n | /*在父框架中打开*/ '_parent'\n | /*在整个窗口中打开*/ '_top' | undefined"
2389
+ "text": "DefinedController"
2346
2390
  },
2347
- "privacy": "public",
2348
- "description": "提交表单后接收到的响应应显示在何处。可选值包括:\n\n* `_self`:默认选项,在当前框架中打开\n* `_blank`:在新窗口中打开\n* `_parent`:在父框架中打开\n* `_top`:在整个窗口中打开\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `target` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2349
- "attribute": "formtarget",
2350
- "reflects": true,
2391
+ "privacy": "protected",
2392
+ "default": "new DefinedController(this, { relatedElements: [''] })",
2351
2393
  "inheritedFrom": {
2352
- "name": "ButtonBase",
2353
- "module": "packages/mdui/src/components/button/button-base.ts"
2394
+ "name": "FocusableMixin",
2395
+ "module": "packages/shared/src/mixins/focusable.ts"
2354
2396
  }
2355
2397
  },
2356
2398
  {
2357
2399
  "kind": "field",
2358
- "name": "formController",
2400
+ "name": "_manipulatingTabindex",
2401
+ "type": {
2402
+ "text": "boolean"
2403
+ },
2359
2404
  "privacy": "private",
2360
- "readonly": true,
2361
- "default": "new FormController(this)",
2405
+ "default": "false",
2362
2406
  "inheritedFrom": {
2363
- "name": "ButtonBase",
2364
- "module": "packages/mdui/src/components/button/button-base.ts"
2407
+ "name": "FocusableMixin",
2408
+ "module": "packages/shared/src/mixins/focusable.ts"
2365
2409
  }
2366
2410
  },
2367
2411
  {
2368
2412
  "kind": "field",
2369
- "name": "validity",
2413
+ "name": "_tabIndex",
2370
2414
  "type": {
2371
- "text": "ValidityState | undefined"
2415
+ "text": "number"
2372
2416
  },
2373
- "privacy": "public",
2374
- "description": "表单验证状态对象,具体参见 [`ValidityState`](https://developer.mozilla.org/zh-CN/docs/Web/API/ValidityState)",
2375
- "readonly": true,
2417
+ "privacy": "private",
2418
+ "default": "0",
2376
2419
  "inheritedFrom": {
2377
- "name": "ButtonBase",
2378
- "module": "packages/mdui/src/components/button/button-base.ts"
2420
+ "name": "FocusableMixin",
2421
+ "module": "packages/shared/src/mixins/focusable.ts"
2379
2422
  }
2380
2423
  },
2381
2424
  {
2382
2425
  "kind": "field",
2383
- "name": "validationMessage",
2426
+ "name": "_lastFocusDisabled",
2384
2427
  "type": {
2385
- "text": "string | undefined"
2428
+ "text": "boolean | undefined"
2386
2429
  },
2387
- "privacy": "public",
2388
- "description": "如果表单验证未通过,此属性将包含提示信息。如果验证通过,此属性将为空字符串",
2389
- "readonly": true,
2430
+ "privacy": "private",
2390
2431
  "inheritedFrom": {
2391
- "name": "ButtonBase",
2392
- "module": "packages/mdui/src/components/button/button-base.ts"
2432
+ "name": "FocusableMixin",
2433
+ "module": "packages/shared/src/mixins/focusable.ts"
2393
2434
  }
2394
2435
  },
2395
2436
  {
2396
2437
  "kind": "field",
2397
- "name": "rippleDisabled",
2438
+ "name": "tabIndex",
2398
2439
  "type": {
2399
- "text": "boolean"
2440
+ "text": "number"
2400
2441
  },
2401
- "privacy": "protected",
2402
- "readonly": true,
2442
+ "privacy": "public",
2443
+ "description": "元素在使用 Tab 键切换焦点时的顺序",
2444
+ "attribute": "tabindex",
2403
2445
  "inheritedFrom": {
2404
- "name": "ButtonBase",
2405
- "module": "packages/mdui/src/components/button/button-base.ts"
2446
+ "name": "FocusableMixin",
2447
+ "module": "packages/shared/src/mixins/focusable.ts"
2406
2448
  }
2407
2449
  },
2408
2450
  {
2409
2451
  "kind": "method",
2410
- "name": "checkValidity",
2452
+ "name": "click",
2411
2453
  "privacy": "public",
2412
2454
  "return": {
2413
2455
  "type": {
2414
- "text": "boolean"
2456
+ "text": "void"
2415
2457
  }
2416
2458
  },
2417
- "description": "检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`",
2459
+ "description": "模拟鼠标点击元素",
2418
2460
  "inheritedFrom": {
2419
- "name": "ButtonBase",
2420
- "module": "packages/mdui/src/components/button/button-base.ts"
2461
+ "name": "FocusableMixin",
2462
+ "module": "packages/shared/src/mixins/focusable.ts"
2421
2463
  }
2422
2464
  },
2423
2465
  {
2424
2466
  "kind": "method",
2425
- "name": "reportValidity",
2467
+ "name": "focus",
2426
2468
  "privacy": "public",
2427
2469
  "return": {
2428
2470
  "type": {
2429
- "text": "boolean"
2471
+ "text": "void"
2430
2472
  }
2431
2473
  },
2432
- "description": "检查表单字段是否通过验证。如果未通过,返回 `false` 并触发 `invalid` 事件;如果通过,返回 `true`。\n\n如果验证未通过,还会在组件上显示验证失败的提示。",
2474
+ "parameters": [
2475
+ {
2476
+ "name": "options",
2477
+ "optional": true,
2478
+ "type": {
2479
+ "text": "FocusOptions"
2480
+ }
2481
+ }
2482
+ ],
2483
+ "description": "将焦点设置到当前元素。\n\n可以传入一个对象作为参数,该对象的属性包括:\n\n* `preventScroll`:默认情况下,元素获取焦点后,页面会滚动以将该元素滚动到视图中。如果不希望页面滚动,可以将此属性设置为 `true`。",
2433
2484
  "inheritedFrom": {
2434
- "name": "ButtonBase",
2435
- "module": "packages/mdui/src/components/button/button-base.ts"
2485
+ "name": "FocusableMixin",
2486
+ "module": "packages/shared/src/mixins/focusable.ts"
2436
2487
  }
2437
2488
  },
2438
2489
  {
2439
2490
  "kind": "method",
2440
- "name": "setCustomValidity",
2491
+ "name": "blur",
2441
2492
  "privacy": "public",
2442
2493
  "return": {
2443
2494
  "type": {
2444
2495
  "text": "void"
2445
2496
  }
2446
2497
  },
2498
+ "description": "移除当前元素的焦点",
2499
+ "inheritedFrom": {
2500
+ "name": "FocusableMixin",
2501
+ "module": "packages/shared/src/mixins/focusable.ts"
2502
+ }
2503
+ },
2504
+ {
2505
+ "kind": "method",
2506
+ "name": "firstUpdated",
2507
+ "privacy": "protected",
2508
+ "return": {
2509
+ "type": {
2510
+ "text": "void"
2511
+ }
2512
+ },
2447
2513
  "parameters": [
2448
2514
  {
2449
- "name": "message",
2515
+ "name": "changedProperties",
2450
2516
  "type": {
2451
- "text": "string"
2452
- },
2453
- "description": "自定义的错误提示文本"
2517
+ "text": "PropertyValues"
2518
+ }
2454
2519
  }
2455
2520
  ],
2456
- "description": "设置自定义的错误提示文本。只要这个文本不为空,就表示字段未通过验证",
2457
2521
  "inheritedFrom": {
2458
- "name": "ButtonBase",
2459
- "module": "packages/mdui/src/components/button/button-base.ts"
2522
+ "name": "FocusableMixin",
2523
+ "module": "packages/shared/src/mixins/focusable.ts"
2460
2524
  }
2461
2525
  },
2462
2526
  {
2463
2527
  "kind": "method",
2464
- "name": "renderLoading",
2528
+ "name": "update",
2465
2529
  "privacy": "protected",
2466
2530
  "return": {
2467
2531
  "type": {
2468
- "text": "TemplateResult"
2532
+ "text": "void"
2469
2533
  }
2470
2534
  },
2535
+ "parameters": [
2536
+ {
2537
+ "name": "changedProperties",
2538
+ "type": {
2539
+ "text": "PropertyValues"
2540
+ }
2541
+ }
2542
+ ],
2471
2543
  "inheritedFrom": {
2472
- "name": "ButtonBase",
2473
- "module": "packages/mdui/src/components/button/button-base.ts"
2544
+ "name": "FocusableMixin",
2545
+ "module": "packages/shared/src/mixins/focusable.ts"
2474
2546
  }
2475
2547
  },
2476
2548
  {
2477
2549
  "kind": "method",
2478
- "name": "renderButton",
2550
+ "name": "updated",
2479
2551
  "privacy": "protected",
2480
2552
  "return": {
2481
2553
  "type": {
2482
- "text": "TemplateResult"
2554
+ "text": "void"
2483
2555
  }
2484
2556
  },
2485
2557
  "parameters": [
2486
2558
  {
2487
- "name": "{\n id,\n className,\n part,\n content = html`<slot></slot>`,\n }",
2559
+ "name": "changedProperties",
2488
2560
  "type": {
2489
- "text": "RenderButtonOptions"
2561
+ "text": "PropertyValues"
2490
2562
  }
2491
2563
  }
2492
2564
  ],
2493
2565
  "inheritedFrom": {
2494
- "name": "ButtonBase",
2495
- "module": "packages/mdui/src/components/button/button-base.ts"
2566
+ "name": "FocusableMixin",
2567
+ "module": "packages/shared/src/mixins/focusable.ts"
2496
2568
  }
2497
2569
  },
2498
2570
  {
2499
2571
  "kind": "method",
2500
- "name": "isButton",
2501
- "privacy": "protected",
2572
+ "name": "manageFocusElementTabindex",
2573
+ "privacy": "private",
2502
2574
  "return": {
2503
2575
  "type": {
2504
- "text": "boolean"
2576
+ "text": "Promise<void>"
2577
+ }
2578
+ },
2579
+ "parameters": [
2580
+ {
2581
+ "name": "tabIndex",
2582
+ "type": {
2583
+ "text": "number"
2584
+ }
2585
+ }
2586
+ ],
2587
+ "inheritedFrom": {
2588
+ "name": "FocusableMixin",
2589
+ "module": "packages/shared/src/mixins/focusable.ts"
2590
+ }
2591
+ },
2592
+ {
2593
+ "kind": "method",
2594
+ "name": "manageAutoFocus",
2595
+ "privacy": "private",
2596
+ "return": {
2597
+ "type": {
2598
+ "text": "void"
2505
2599
  }
2506
2600
  },
2507
2601
  "inheritedFrom": {
2508
- "name": "ButtonBase",
2509
- "module": "packages/mdui/src/components/button/button-base.ts"
2602
+ "name": "FocusableMixin",
2603
+ "module": "packages/shared/src/mixins/focusable.ts"
2510
2604
  }
2511
2605
  }
2512
2606
  ],
2513
- "events": [
2607
+ "attributes": [
2514
2608
  {
2515
- "description": "获得焦点时触发",
2516
- "name": "focus"
2609
+ "name": "disabled",
2610
+ "type": {
2611
+ "text": "boolean"
2612
+ },
2613
+ "default": "false",
2614
+ "description": "是否禁用",
2615
+ "fieldName": "disabled"
2517
2616
  },
2518
2617
  {
2519
- "description": "失去焦点时触发",
2520
- "name": "blur"
2618
+ "name": "loading",
2619
+ "type": {
2620
+ "text": "boolean"
2621
+ },
2622
+ "default": "false",
2623
+ "description": "是否处于加载中状态",
2624
+ "fieldName": "loading"
2521
2625
  },
2522
2626
  {
2523
- "description": "表单字段验证未通过时触发",
2524
- "name": "invalid"
2627
+ "name": "name",
2628
+ "type": {
2629
+ "text": "string"
2630
+ },
2631
+ "default": "''",
2632
+ "description": "按钮的名称,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
2633
+ "fieldName": "name"
2525
2634
  },
2526
2635
  {
2527
- "name": "keydown",
2636
+ "name": "value",
2528
2637
  "type": {
2529
- "text": "KeyboardEvent"
2638
+ "text": "string"
2530
2639
  },
2531
- "inheritedFrom": {
2532
- "name": "ButtonBase",
2533
- "module": "packages/mdui/src/components/button/button-base.ts"
2534
- }
2535
- }
2536
- ],
2537
- "attributes": [
2640
+ "default": "''",
2641
+ "description": "按钮的初始值,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
2642
+ "fieldName": "value"
2643
+ },
2538
2644
  {
2539
- "name": "variant",
2645
+ "name": "type",
2540
2646
  "type": {
2541
- "text": "| /*带阴影的按钮,适用于需要将按钮与背景视觉分离的场景*/ 'elevated'\n | /*视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等*/ 'filled'\n | /*视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”*/ 'tonal'\n | /*带边框的按钮,适用于中等优先级,且次要的操作,如“返回”*/ 'outlined'\n | /*文本按钮,适用于最低优先级的操作*/ 'text'"
2647
+ "text": "| /*此按钮将表单数据提交给服务器*/ 'submit'\n | /*此按钮重置所有组件为初始值*/ 'reset'\n | /*此按钮没有默认行为*/ 'button'"
2542
2648
  },
2543
- "default": "'filled'",
2544
- "description": "按钮的形状。可选值包括:\n\n* `elevated`:带阴影的按钮,适用于需要将按钮与背景视觉分离的场景\n* `filled`:视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等\n* `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”\n* `outlined`:带边框的按钮,适用于中等优先级,且次要的操作,如“返回”\n* `text`:文本按钮,适用于最低优先级的操作",
2545
- "fieldName": "variant"
2649
+ "default": "'button'",
2650
+ "description": "按钮的类型。默认类型为 `button`。可选类型包括:\n\n* `submit`:点击按钮会提交表单数据到服务器\n* `reset`:点击按钮会将表单中的所有字段重置为初始值\n* `button`:此类型的按钮没有默认行为\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
2651
+ "fieldName": "type"
2546
2652
  },
2547
2653
  {
2548
- "name": "full-width",
2654
+ "name": "form",
2549
2655
  "type": {
2550
- "text": "boolean"
2656
+ "text": "string | undefined"
2551
2657
  },
2552
- "default": "false",
2553
- "description": "是否填满父元素宽度",
2554
- "fieldName": "fullWidth"
2658
+ "description": "关联的 `<form>` 元素。此属性值应为同一页面中的一个 `<form>` 元素的 `id`。\n\n如果未指定此属性,则该元素必须是 `<form>` 元素的子元素。通过此属性,你可以将元素放置在页面的任何位置,而不仅仅是 `<form>` 元素的子元素。\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
2659
+ "fieldName": "form"
2555
2660
  },
2556
2661
  {
2557
- "name": "icon",
2662
+ "name": "formaction",
2558
2663
  "type": {
2559
2664
  "text": "string | undefined"
2560
2665
  },
2561
- "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置",
2562
- "fieldName": "icon"
2666
+ "description": "指定提交表单的 URL。\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `action` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2667
+ "fieldName": "formAction"
2563
2668
  },
2564
2669
  {
2565
- "name": "end-icon",
2670
+ "name": "formenctype",
2566
2671
  "type": {
2567
- "text": "string | undefined"
2672
+ "text": "| /*未指定该属性时的默认值*/ 'application/x-www-form-urlencoded'\n | /*当表单包含 `<input type=\"file\">` 元素时使用*/ 'multipart/form-data'\n | /*HTML5 新增,用于调试*/ 'text/plain' | undefined"
2568
2673
  },
2569
- "description": "右侧的 Material Icons 图标名。也可以通过 `slot=\"end-icon\"` 设置",
2570
- "fieldName": "endIcon"
2674
+ "description": "指定提交表单到服务器的内容类型。可选值包括:\n\n* `application/x-www-form-urlencoded`:未指定该属性时的默认值\n* `multipart/form-data`:当表单包含 `<input type=\"file\">` 元素时使用\n* `text/plain`:HTML5 新增,用于调试\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `enctype` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2675
+ "fieldName": "formEnctype"
2676
+ },
2677
+ {
2678
+ "name": "formmethod",
2679
+ "type": {
2680
+ "text": "| /*表单数据包含在表单内容中,发送到服务器*/ 'post'\n | /*表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法*/ 'get' | undefined"
2681
+ },
2682
+ "description": "指定提交表单时使用的 HTTP 方法。可选值包括:\n\n* `post`:表单数据包含在表单内容中,发送到服务器\n* `get`:表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `method` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2683
+ "fieldName": "formMethod"
2684
+ },
2685
+ {
2686
+ "name": "formnovalidate",
2687
+ "type": {
2688
+ "text": "boolean"
2689
+ },
2690
+ "default": "false",
2691
+ "description": "如果设置了此属性,表单提交时将不执行表单验证。\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2692
+ "fieldName": "formNoValidate"
2693
+ },
2694
+ {
2695
+ "name": "formtarget",
2696
+ "type": {
2697
+ "text": "| /*默认选项,在当前框架中打开*/ '_self'\n | /*在新窗口中打开*/ '_blank'\n | /*在父框架中打开*/ '_parent'\n | /*在整个窗口中打开*/ '_top' | undefined"
2698
+ },
2699
+ "description": "提交表单后接收到的响应应显示在何处。可选值包括:\n\n* `_self`:默认选项,在当前框架中打开\n* `_blank`:在新窗口中打开\n* `_parent`:在父框架中打开\n* `_top`:在整个窗口中打开\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `target` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2700
+ "fieldName": "formTarget"
2571
2701
  },
2572
2702
  {
2573
2703
  "name": "href",
@@ -2577,8 +2707,8 @@
2577
2707
  "description": "链接的目标 URL。\n\n如果设置了此属性,组件内部将渲染为 `<a>` 元素,并可以使用链接相关的属性。",
2578
2708
  "fieldName": "href",
2579
2709
  "inheritedFrom": {
2580
- "name": "ButtonBase",
2581
- "module": "packages/mdui/src/components/button/button-base.ts"
2710
+ "name": "AnchorMixin",
2711
+ "module": "packages/shared/src/mixins/anchor.ts"
2582
2712
  }
2583
2713
  },
2584
2714
  {
@@ -2589,8 +2719,8 @@
2589
2719
  "description": "下载链接的目标。\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
2590
2720
  "fieldName": "download",
2591
2721
  "inheritedFrom": {
2592
- "name": "ButtonBase",
2593
- "module": "packages/mdui/src/components/button/button-base.ts"
2722
+ "name": "AnchorMixin",
2723
+ "module": "packages/shared/src/mixins/anchor.ts"
2594
2724
  }
2595
2725
  },
2596
2726
  {
@@ -2601,8 +2731,8 @@
2601
2731
  "description": "链接的打开方式。可选值包括:\n\n* `_blank`:在新窗口中打开链接\n* `_parent`:在父框架中打开链接\n* `_self`:默认。在当前框架中打开链接\n* `_top`:在整个窗口中打开链接\n\n**Note**:仅在设置了 `href` 属性时,此属性才有效。",
2602
2732
  "fieldName": "target",
2603
2733
  "inheritedFrom": {
2604
- "name": "ButtonBase",
2605
- "module": "packages/mdui/src/components/button/button-base.ts"
2734
+ "name": "AnchorMixin",
2735
+ "module": "packages/shared/src/mixins/anchor.ts"
2606
2736
  }
2607
2737
  },
2608
2738
  {
@@ -2613,8 +2743,8 @@
2613
2743
  "description": "当前文档与被链接文档之间的关系。可选值包括:\n\n* `alternate`:当前文档的替代版本\n* `author`:当前文档或文章的作者\n* `bookmark`:永久链接到最近的祖先章节\n* `external`:引用的文档与当前文档不在同一站点\n* `help`:链接到相关的帮助文档\n* `license`:当前文档的主要内容由被引用文件的版权许可覆盖\n* `me`:当前文档代表链接内容的所有者\n* `next`:当前文档是系列中的一部分,被引用的文档是系列的下一个文档\n* `nofollow`:当前文档的作者或发布者不认可被引用的文件\n* `noreferrer`:不包含 `Referer` 头。类似于 `noopener` 的效果\n* `opener`:如果超链接会创建一个顶级浏览上下文(即 `target` 属性值为 `_blank`),则创建一个辅助浏览上下文\n* `prev`:当前文档是系列的一部分,被引用的文档是系列的上一个文档\n* `search`:提供一个资源链接,可用于搜索当前文件及其相关页面\n* `tag`:提供一个适用于当前文档的标签(由给定地址识别)\n\n**Note**:仅在指定了 `href` 属性时可用。",
2614
2744
  "fieldName": "rel",
2615
2745
  "inheritedFrom": {
2616
- "name": "ButtonBase",
2617
- "module": "packages/mdui/src/components/button/button-base.ts"
2746
+ "name": "AnchorMixin",
2747
+ "module": "packages/shared/src/mixins/anchor.ts"
2618
2748
  }
2619
2749
  },
2620
2750
  {
@@ -2626,8 +2756,8 @@
2626
2756
  "description": "是否在页面加载完成后自动获取焦点",
2627
2757
  "fieldName": "autofocus",
2628
2758
  "inheritedFrom": {
2629
- "name": "ButtonBase",
2630
- "module": "packages/mdui/src/components/button/button-base.ts"
2759
+ "name": "FocusableMixin",
2760
+ "module": "packages/shared/src/mixins/focusable.ts"
2631
2761
  }
2632
2762
  },
2633
2763
  {
@@ -2639,8 +2769,8 @@
2639
2769
  "description": "是否获得了焦点,不管是鼠标点击,还是键盘切换获得的焦点,都会添加该属性\n添加到 :host 元素上,供 CSS 选择器添加样式",
2640
2770
  "fieldName": "focused",
2641
2771
  "inheritedFrom": {
2642
- "name": "ButtonBase",
2643
- "module": "packages/mdui/src/components/button/button-base.ts"
2772
+ "name": "FocusableMixin",
2773
+ "module": "packages/shared/src/mixins/focusable.ts"
2644
2774
  }
2645
2775
  },
2646
2776
  {
@@ -2652,8 +2782,8 @@
2652
2782
  "description": "是否通过键盘切换获得了焦点\n添加到 :host 元素上,供 CSS 选择器添加样式",
2653
2783
  "fieldName": "focusVisible",
2654
2784
  "inheritedFrom": {
2655
- "name": "ButtonBase",
2656
- "module": "packages/mdui/src/components/button/button-base.ts"
2785
+ "name": "FocusableMixin",
2786
+ "module": "packages/shared/src/mixins/focusable.ts"
2657
2787
  }
2658
2788
  },
2659
2789
  {
@@ -2664,185 +2794,62 @@
2664
2794
  "description": "元素在使用 Tab 键切换焦点时的顺序",
2665
2795
  "fieldName": "tabIndex",
2666
2796
  "inheritedFrom": {
2667
- "name": "ButtonBase",
2668
- "module": "packages/mdui/src/components/button/button-base.ts"
2669
- }
2670
- },
2671
- {
2672
- "name": "disabled",
2673
- "type": {
2674
- "text": "boolean"
2675
- },
2676
- "default": "false",
2677
- "description": "是否禁用",
2678
- "fieldName": "disabled",
2679
- "inheritedFrom": {
2680
- "name": "ButtonBase",
2681
- "module": "packages/mdui/src/components/button/button-base.ts"
2682
- }
2683
- },
2684
- {
2685
- "name": "loading",
2686
- "type": {
2687
- "text": "boolean"
2688
- },
2689
- "default": "false",
2690
- "description": "是否处于加载中状态",
2691
- "fieldName": "loading",
2692
- "inheritedFrom": {
2693
- "name": "ButtonBase",
2694
- "module": "packages/mdui/src/components/button/button-base.ts"
2695
- }
2696
- },
2697
- {
2698
- "name": "name",
2699
- "type": {
2700
- "text": "string"
2701
- },
2702
- "default": "''",
2703
- "description": "按钮的名称,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
2704
- "fieldName": "name",
2705
- "inheritedFrom": {
2706
- "name": "ButtonBase",
2707
- "module": "packages/mdui/src/components/button/button-base.ts"
2708
- }
2709
- },
2710
- {
2711
- "name": "value",
2712
- "type": {
2713
- "text": "string"
2714
- },
2715
- "default": "''",
2716
- "description": "按钮的初始值,将与表单数据一起提交。\n\n**Note**:仅在未设置 `href` 属性时,此属性才有效。",
2717
- "fieldName": "value",
2718
- "inheritedFrom": {
2719
- "name": "ButtonBase",
2720
- "module": "packages/mdui/src/components/button/button-base.ts"
2721
- }
2722
- },
2723
- {
2724
- "name": "type",
2725
- "type": {
2726
- "text": "| /*此按钮将表单数据提交给服务器*/ 'submit'\n | /*此按钮重置所有组件为初始值*/ 'reset'\n | /*此按钮没有默认行为*/ 'button'"
2727
- },
2728
- "default": "'button'",
2729
- "description": "按钮的类型。默认类型为 `button`。可选类型包括:\n\n* `submit`:点击按钮会提交表单数据到服务器\n* `reset`:点击按钮会将表单中的所有字段重置为初始值\n* `button`:此类型的按钮没有默认行为\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
2730
- "fieldName": "type",
2731
- "inheritedFrom": {
2732
- "name": "ButtonBase",
2733
- "module": "packages/mdui/src/components/button/button-base.ts"
2734
- }
2735
- },
2736
- {
2737
- "name": "form",
2738
- "type": {
2739
- "text": "string | undefined"
2740
- },
2741
- "description": "关联的 `<form>` 元素。此属性值应为同一页面中的一个 `<form>` 元素的 `id`。\n\n如果未指定此属性,则该元素必须是 `<form>` 元素的子元素。通过此属性,你可以将元素放置在页面的任何位置,而不仅仅是 `<form>` 元素的子元素。\n\n**Note**:仅在未指定 `href` 属性时,此属性才有效。",
2742
- "fieldName": "form",
2743
- "inheritedFrom": {
2744
- "name": "ButtonBase",
2745
- "module": "packages/mdui/src/components/button/button-base.ts"
2746
- }
2747
- },
2748
- {
2749
- "name": "formaction",
2750
- "type": {
2751
- "text": "string | undefined"
2752
- },
2753
- "description": "指定提交表单的 URL。\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `action` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2754
- "fieldName": "formAction",
2755
- "inheritedFrom": {
2756
- "name": "ButtonBase",
2757
- "module": "packages/mdui/src/components/button/button-base.ts"
2758
- }
2759
- },
2760
- {
2761
- "name": "formenctype",
2762
- "type": {
2763
- "text": "| /*未指定该属性时的默认值*/ 'application/x-www-form-urlencoded'\n | /*当表单包含 `<input type=\"file\">` 元素时使用*/ 'multipart/form-data'\n | /*HTML5 新增,用于调试*/ 'text/plain' | undefined"
2764
- },
2765
- "description": "指定提交表单到服务器的内容类型。可选值包括:\n\n* `application/x-www-form-urlencoded`:未指定该属性时的默认值\n* `multipart/form-data`:当表单包含 `<input type=\"file\">` 元素时使用\n* `text/plain`:HTML5 新增,用于调试\n\n如果指定了此属性,将覆盖 `<form>` 元素的 `enctype` 属性。\n\n**Note**:仅在未指定 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2766
- "fieldName": "formEnctype",
2767
- "inheritedFrom": {
2768
- "name": "ButtonBase",
2769
- "module": "packages/mdui/src/components/button/button-base.ts"
2797
+ "name": "FocusableMixin",
2798
+ "module": "packages/shared/src/mixins/focusable.ts"
2770
2799
  }
2771
- },
2800
+ }
2801
+ ],
2802
+ "mixins": [
2772
2803
  {
2773
- "name": "formmethod",
2774
- "type": {
2775
- "text": "| /*表单数据包含在表单内容中,发送到服务器*/ 'post'\n | /*表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法*/ 'get' | undefined"
2776
- },
2777
- "description": "指定提交表单时使用的 HTTP 方法。可选值包括:\n\n* `post`:表单数据包含在表单内容中,发送到服务器\n* `get`:表单数据以 `?` 作为分隔符附加到表单的 URI 属性中,生成的 URI 发送到服务器。当表单没有副作用,并且仅包含 ASCII 字符时,使用此方法\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `method` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2778
- "fieldName": "formMethod",
2779
- "inheritedFrom": {
2780
- "name": "ButtonBase",
2781
- "module": "packages/mdui/src/components/button/button-base.ts"
2782
- }
2804
+ "name": "AnchorMixin",
2805
+ "package": "@mdui/shared/mixins/anchor.js"
2783
2806
  },
2784
2807
  {
2785
- "name": "formnovalidate",
2786
- "type": {
2787
- "text": "boolean"
2788
- },
2789
- "default": "false",
2790
- "description": "如果设置了此属性,表单提交时将不执行表单验证。\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `novalidate` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2791
- "fieldName": "formNoValidate",
2792
- "inheritedFrom": {
2793
- "name": "ButtonBase",
2794
- "module": "packages/mdui/src/components/button/button-base.ts"
2795
- }
2808
+ "name": "RippleMixin",
2809
+ "module": "/packages/mdui/src/components/ripple/ripple-mixin.js"
2796
2810
  },
2797
2811
  {
2798
- "name": "formtarget",
2812
+ "name": "FocusableMixin",
2813
+ "package": "@mdui/shared/mixins/focusable.js"
2814
+ }
2815
+ ],
2816
+ "superclass": {
2817
+ "name": "MduiElement",
2818
+ "package": "@mdui/shared/base/mdui-element.js"
2819
+ },
2820
+ "events": [
2821
+ {
2822
+ "name": "keydown",
2799
2823
  "type": {
2800
- "text": "| /*默认选项,在当前框架中打开*/ '_self'\n | /*在新窗口中打开*/ '_blank'\n | /*在父框架中打开*/ '_parent'\n | /*在整个窗口中打开*/ '_top' | undefined"
2824
+ "text": "KeyboardEvent"
2801
2825
  },
2802
- "description": "提交表单后接收到的响应应显示在何处。可选值包括:\n\n* `_self`:默认选项,在当前框架中打开\n* `_blank`:在新窗口中打开\n* `_parent`:在父框架中打开\n* `_top`:在整个窗口中打开\n\n如果设置了此属性,将覆盖 `<form>` 元素的 `target` 属性。\n\n**Note**:仅在未设置 `href` 属性且 `type=\"submit\"` 时,此属性才有效。",
2803
- "fieldName": "formTarget",
2804
2826
  "inheritedFrom": {
2805
- "name": "ButtonBase",
2806
- "module": "packages/mdui/src/components/button/button-base.ts"
2827
+ "name": "FocusableMixin",
2828
+ "module": "packages/shared/src/mixins/focusable.ts"
2807
2829
  }
2808
2830
  }
2809
- ],
2810
- "superclass": {
2811
- "name": "ButtonBase",
2812
- "module": "/packages/mdui/src/components/button/button-base.js"
2813
- },
2814
- "summary": "按钮组件\n\n```html\n<mdui-button>Button</mdui-button>\n```",
2815
- "tagName": "mdui-button",
2816
- "customElement": true
2831
+ ]
2817
2832
  }
2818
2833
  ],
2819
2834
  "exports": [
2820
2835
  {
2821
2836
  "kind": "js",
2822
- "name": "Button",
2823
- "declaration": {
2824
- "name": "Button",
2825
- "module": "packages/mdui/src/components/button/index.ts"
2826
- }
2827
- },
2828
- {
2829
- "kind": "custom-element-definition",
2830
- "name": "mdui-button",
2837
+ "name": "ButtonBase",
2831
2838
  "declaration": {
2832
- "name": "Button",
2833
- "module": "packages/mdui/src/components/button/index.ts"
2839
+ "name": "ButtonBase",
2840
+ "module": "packages/mdui/src/components/button/button-base.ts"
2834
2841
  }
2835
2842
  }
2836
2843
  ]
2837
2844
  },
2838
2845
  {
2839
2846
  "kind": "javascript-module",
2840
- "path": "packages/mdui/src/components/button-icon/index.ts",
2847
+ "path": "packages/mdui/src/components/button/index.ts",
2841
2848
  "declarations": [
2842
2849
  {
2843
2850
  "kind": "class",
2844
2851
  "description": "",
2845
- "name": "ButtonIcon",
2852
+ "name": "Button",
2846
2853
  "cssProperties": [
2847
2854
  {
2848
2855
  "description": "组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)",
@@ -2855,12 +2862,16 @@
2855
2862
  "name": "button"
2856
2863
  },
2857
2864
  {
2858
- "description": "未选中状态的图标",
2865
+ "description": "按钮的文本",
2866
+ "name": "label"
2867
+ },
2868
+ {
2869
+ "description": "按钮左侧的图标",
2859
2870
  "name": "icon"
2860
2871
  },
2861
2872
  {
2862
- "description": "选中状态的图标",
2863
- "name": "selected-icon"
2873
+ "description": "按钮右侧的图标",
2874
+ "name": "end-icon"
2864
2875
  },
2865
2876
  {
2866
2877
  "description": "加载中状态的 `<mdui-circular-progress>` 元素",
@@ -2869,12 +2880,16 @@
2869
2880
  ],
2870
2881
  "slots": [
2871
2882
  {
2872
- "description": "图标组件",
2883
+ "description": "按钮的文本",
2873
2884
  "name": ""
2874
2885
  },
2875
2886
  {
2876
- "description": "选中状态显示的图标元素",
2877
- "name": "selected-icon"
2887
+ "description": "按钮左侧的元素",
2888
+ "name": "icon"
2889
+ },
2890
+ {
2891
+ "description": "按钮右侧的元素",
2892
+ "name": "end-icon"
2878
2893
  }
2879
2894
  ],
2880
2895
  "members": [
@@ -2882,58 +2897,46 @@
2882
2897
  "kind": "field",
2883
2898
  "name": "variant",
2884
2899
  "type": {
2885
- "text": "| /*适用于最低优先级的操作*/ 'standard'\n | /*视觉效果强烈,适用于高优先级的操作*/ 'filled'\n | /*视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作*/ 'tonal'\n | /*适用于中等优先级的操作*/ 'outlined'"
2900
+ "text": "| /*带阴影的按钮,适用于需要将按钮与背景视觉分离的场景*/ 'elevated'\n | /*视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等*/ 'filled'\n | /*视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”*/ 'tonal'\n | /*带边框的按钮,适用于中等优先级,且次要的操作,如“返回”*/ 'outlined'\n | /*文本按钮,适用于最低优先级的操作*/ 'text'"
2886
2901
  },
2887
2902
  "privacy": "public",
2888
- "default": "'standard'",
2889
- "description": "图标按钮的形状。可选值包括:\n\n* `standard`:适用于最低优先级的操作\n* `filled`:视觉效果强烈,适用于高优先级的操作\n* `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作\n* `outlined`:适用于中等优先级的操作",
2903
+ "default": "'filled'",
2904
+ "description": "按钮的形状。可选值包括:\n\n* `elevated`:带阴影的按钮,适用于需要将按钮与背景视觉分离的场景\n* `filled`:视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等\n* `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”\n* `outlined`:带边框的按钮,适用于中等优先级,且次要的操作,如“返回”\n* `text`:文本按钮,适用于最低优先级的操作",
2890
2905
  "attribute": "variant",
2891
2906
  "reflects": true
2892
2907
  },
2893
2908
  {
2894
2909
  "kind": "field",
2895
- "name": "icon",
2910
+ "name": "fullWidth",
2896
2911
  "type": {
2897
- "text": "string | undefined"
2912
+ "text": "boolean"
2898
2913
  },
2899
2914
  "privacy": "public",
2900
- "description": "Material Icons 图标名。也可以通过 default slot 设置",
2901
- "attribute": "icon",
2915
+ "default": "false",
2916
+ "description": "是否填满父元素宽度",
2917
+ "attribute": "full-width",
2902
2918
  "reflects": true
2903
2919
  },
2904
2920
  {
2905
2921
  "kind": "field",
2906
- "name": "selectedIcon",
2922
+ "name": "icon",
2907
2923
  "type": {
2908
2924
  "text": "string | undefined"
2909
2925
  },
2910
2926
  "privacy": "public",
2911
- "description": "选中状态的 Material Icons 图标名。也可以通过 `slot=\"selected-icon\"` 设置",
2912
- "attribute": "selected-icon",
2913
- "reflects": true
2914
- },
2915
- {
2916
- "kind": "field",
2917
- "name": "selectable",
2918
- "type": {
2919
- "text": "boolean"
2920
- },
2921
- "privacy": "public",
2922
- "default": "false",
2923
- "description": "是否可选中",
2924
- "attribute": "selectable",
2927
+ "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置",
2928
+ "attribute": "icon",
2925
2929
  "reflects": true
2926
2930
  },
2927
2931
  {
2928
2932
  "kind": "field",
2929
- "name": "selected",
2933
+ "name": "endIcon",
2930
2934
  "type": {
2931
- "text": "boolean"
2935
+ "text": "string | undefined"
2932
2936
  },
2933
2937
  "privacy": "public",
2934
- "default": "false",
2935
- "description": "是否已被选中",
2936
- "attribute": "selected",
2938
+ "description": "右侧的 Material Icons 图标名。也可以通过 `slot=\"end-icon\"` 设置",
2939
+ "attribute": "end-icon",
2937
2940
  "reflects": true
2938
2941
  },
2939
2942
  {
@@ -2945,13 +2948,6 @@
2945
2948
  "privacy": "private",
2946
2949
  "readonly": true
2947
2950
  },
2948
- {
2949
- "kind": "field",
2950
- "name": "hasSlotController",
2951
- "privacy": "private",
2952
- "readonly": true,
2953
- "default": "new HasSlotController(\n this,\n '[default]',\n 'selected-icon',\n )"
2954
- },
2955
2951
  {
2956
2952
  "kind": "field",
2957
2953
  "name": "rippleElement",
@@ -2960,12 +2956,27 @@
2960
2956
  },
2961
2957
  {
2962
2958
  "kind": "method",
2963
- "name": "onSelectedChange",
2964
- "privacy": "private"
2959
+ "name": "renderIcon",
2960
+ "privacy": "private",
2961
+ "return": {
2962
+ "type": {
2963
+ "text": "TemplateResult"
2964
+ }
2965
+ }
2965
2966
  },
2966
2967
  {
2967
2968
  "kind": "method",
2968
- "name": "renderIcon",
2969
+ "name": "renderLabel",
2970
+ "privacy": "private",
2971
+ "return": {
2972
+ "type": {
2973
+ "text": "TemplateResult"
2974
+ }
2975
+ }
2976
+ },
2977
+ {
2978
+ "kind": "method",
2979
+ "name": "renderEndIcon",
2969
2980
  "privacy": "private",
2970
2981
  "return": {
2971
2982
  "type": {
@@ -2973,6 +2984,16 @@
2973
2984
  }
2974
2985
  }
2975
2986
  },
2987
+ {
2988
+ "kind": "method",
2989
+ "name": "renderInner",
2990
+ "privacy": "private",
2991
+ "return": {
2992
+ "type": {
2993
+ "text": "TemplateResult[]"
2994
+ }
2995
+ }
2996
+ },
2976
2997
  {
2977
2998
  "kind": "field",
2978
2999
  "name": "href",
@@ -3689,10 +3710,6 @@
3689
3710
  "description": "失去焦点时触发",
3690
3711
  "name": "blur"
3691
3712
  },
3692
- {
3693
- "description": "选中状态变更时触发",
3694
- "name": "change"
3695
- },
3696
3713
  {
3697
3714
  "description": "表单字段验证未通过时触发",
3698
3715
  "name": "invalid"
@@ -3712,45 +3729,36 @@
3712
3729
  {
3713
3730
  "name": "variant",
3714
3731
  "type": {
3715
- "text": "| /*适用于最低优先级的操作*/ 'standard'\n | /*视觉效果强烈,适用于高优先级的操作*/ 'filled'\n | /*视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作*/ 'tonal'\n | /*适用于中等优先级的操作*/ 'outlined'"
3732
+ "text": "| /*带阴影的按钮,适用于需要将按钮与背景视觉分离的场景*/ 'elevated'\n | /*视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等*/ 'filled'\n | /*视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”*/ 'tonal'\n | /*带边框的按钮,适用于中等优先级,且次要的操作,如“返回”*/ 'outlined'\n | /*文本按钮,适用于最低优先级的操作*/ 'text'"
3716
3733
  },
3717
- "default": "'standard'",
3718
- "description": "图标按钮的形状。可选值包括:\n\n* `standard`:适用于最低优先级的操作\n* `filled`:视觉效果强烈,适用于高优先级的操作\n* `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作\n* `outlined`:适用于中等优先级的操作",
3734
+ "default": "'filled'",
3735
+ "description": "按钮的形状。可选值包括:\n\n* `elevated`:带阴影的按钮,适用于需要将按钮与背景视觉分离的场景\n* `filled`:视觉效果强烈,适用于重要流程的最终操作,如“保存”、“确认”等\n* `tonal`:视觉效果介于 `filled` 和 `outlined` 之间,适用于中高优先级的操作,如流程中的“下一步”\n* `outlined`:带边框的按钮,适用于中等优先级,且次要的操作,如“返回”\n* `text`:文本按钮,适用于最低优先级的操作",
3719
3736
  "fieldName": "variant"
3720
3737
  },
3721
3738
  {
3722
- "name": "icon",
3739
+ "name": "full-width",
3723
3740
  "type": {
3724
- "text": "string | undefined"
3741
+ "text": "boolean"
3725
3742
  },
3726
- "description": "Material Icons 图标名。也可以通过 default slot 设置",
3727
- "fieldName": "icon"
3743
+ "default": "false",
3744
+ "description": "是否填满父元素宽度",
3745
+ "fieldName": "fullWidth"
3728
3746
  },
3729
3747
  {
3730
- "name": "selected-icon",
3748
+ "name": "icon",
3731
3749
  "type": {
3732
3750
  "text": "string | undefined"
3733
3751
  },
3734
- "description": "选中状态的 Material Icons 图标名。也可以通过 `slot=\"selected-icon\"` 设置",
3735
- "fieldName": "selectedIcon"
3736
- },
3737
- {
3738
- "name": "selectable",
3739
- "type": {
3740
- "text": "boolean"
3741
- },
3742
- "default": "false",
3743
- "description": "是否可选中",
3744
- "fieldName": "selectable"
3752
+ "description": "左侧的 Material Icons 图标名。也可以通过 `slot=\"icon\"` 设置",
3753
+ "fieldName": "icon"
3745
3754
  },
3746
3755
  {
3747
- "name": "selected",
3756
+ "name": "end-icon",
3748
3757
  "type": {
3749
- "text": "boolean"
3758
+ "text": "string | undefined"
3750
3759
  },
3751
- "default": "false",
3752
- "description": "是否已被选中",
3753
- "fieldName": "selected"
3760
+ "description": "右侧的 Material Icons 图标名。也可以通过 `slot=\"end-icon\"` 设置",
3761
+ "fieldName": "endIcon"
3754
3762
  },
3755
3763
  {
3756
3764
  "name": "href",
@@ -3994,26 +4002,26 @@
3994
4002
  "name": "ButtonBase",
3995
4003
  "module": "/packages/mdui/src/components/button/button-base.js"
3996
4004
  },
3997
- "summary": "图标按钮组件\n\n```html\n<mdui-button-icon icon=\"search\"></mdui-button-icon>\n```",
3998
- "tagName": "mdui-button-icon",
4005
+ "summary": "按钮组件\n\n```html\n<mdui-button>Button</mdui-button>\n```",
4006
+ "tagName": "mdui-button",
3999
4007
  "customElement": true
4000
4008
  }
4001
4009
  ],
4002
4010
  "exports": [
4003
4011
  {
4004
4012
  "kind": "js",
4005
- "name": "ButtonIcon",
4013
+ "name": "Button",
4006
4014
  "declaration": {
4007
- "name": "ButtonIcon",
4008
- "module": "packages/mdui/src/components/button-icon/index.ts"
4015
+ "name": "Button",
4016
+ "module": "packages/mdui/src/components/button/index.ts"
4009
4017
  }
4010
4018
  },
4011
4019
  {
4012
4020
  "kind": "custom-element-definition",
4013
- "name": "mdui-button-icon",
4021
+ "name": "mdui-button",
4014
4022
  "declaration": {
4015
- "name": "ButtonIcon",
4016
- "module": "packages/mdui/src/components/button-icon/index.ts"
4023
+ "name": "Button",
4024
+ "module": "packages/mdui/src/components/button/index.ts"
4017
4025
  }
4018
4026
  }
4019
4027
  ]
@@ -13616,12 +13624,16 @@
13616
13624
  "kind": "field",
13617
13625
  "name": "scrollBehavior",
13618
13626
  "type": {
13619
- "text": "'hide' | undefined"
13627
+ "text": "'hide' | 'shrink' | 'elevate' | undefined"
13620
13628
  },
13621
13629
  "privacy": "public",
13622
13630
  "description": "滚动行为。可选值包括:\n\n* `hide`:滚动时隐藏",
13623
13631
  "attribute": "scroll-behavior",
13624
- "reflects": true
13632
+ "reflects": true,
13633
+ "inheritedFrom": {
13634
+ "name": "ScrollBehaviorMixin",
13635
+ "module": "packages/shared/src/mixins/scrollBehavior.ts"
13636
+ }
13625
13637
  },
13626
13638
  {
13627
13639
  "kind": "field",
@@ -14136,10 +14148,14 @@
14136
14148
  {
14137
14149
  "name": "scroll-behavior",
14138
14150
  "type": {
14139
- "text": "'hide' | undefined"
14151
+ "text": "'hide' | 'shrink' | 'elevate' | undefined"
14140
14152
  },
14141
14153
  "description": "滚动行为。可选值包括:\n\n* `hide`:滚动时隐藏",
14142
- "fieldName": "scrollBehavior"
14154
+ "fieldName": "scrollBehavior",
14155
+ "inheritedFrom": {
14156
+ "name": "ScrollBehaviorMixin",
14157
+ "module": "packages/shared/src/mixins/scrollBehavior.ts"
14158
+ }
14143
14159
  },
14144
14160
  {
14145
14161
  "name": "scroll-target",
@@ -26862,12 +26878,16 @@
26862
26878
  "kind": "field",
26863
26879
  "name": "scrollBehavior",
26864
26880
  "type": {
26865
- "text": "| /*滚动时隐藏*/ 'hide'\n | /*在中型、大型应用栏中可使用,滚动时缩小成小型应用栏的样式*/ 'shrink'\n | /*滚动时添加阴影*/ 'elevate' | undefined"
26881
+ "text": "'hide' | 'shrink' | 'elevate' | undefined"
26866
26882
  },
26867
26883
  "privacy": "public",
26868
26884
  "description": "滚动行为。可同时使用多个值,用空格分隔。可选值包括:\n\n* `hide`:滚动时隐藏\n* `shrink`:在中型、大型应用栏中可使用,滚动时缩小成小型应用栏的样式\n* `elevate`:滚动时添加阴影",
26869
26885
  "attribute": "scroll-behavior",
26870
- "reflects": true
26886
+ "reflects": true,
26887
+ "inheritedFrom": {
26888
+ "name": "ScrollBehaviorMixin",
26889
+ "module": "packages/shared/src/mixins/scrollBehavior.ts"
26890
+ }
26871
26891
  },
26872
26892
  {
26873
26893
  "kind": "field",
@@ -27338,10 +27358,14 @@
27338
27358
  {
27339
27359
  "name": "scroll-behavior",
27340
27360
  "type": {
27341
- "text": "| /*滚动时隐藏*/ 'hide'\n | /*在中型、大型应用栏中可使用,滚动时缩小成小型应用栏的样式*/ 'shrink'\n | /*滚动时添加阴影*/ 'elevate' | undefined"
27361
+ "text": "'hide' | 'shrink' | 'elevate' | undefined"
27342
27362
  },
27343
27363
  "description": "滚动行为。可同时使用多个值,用空格分隔。可选值包括:\n\n* `hide`:滚动时隐藏\n* `shrink`:在中型、大型应用栏中可使用,滚动时缩小成小型应用栏的样式\n* `elevate`:滚动时添加阴影",
27344
- "fieldName": "scrollBehavior"
27364
+ "fieldName": "scrollBehavior",
27365
+ "inheritedFrom": {
27366
+ "name": "ScrollBehaviorMixin",
27367
+ "module": "packages/shared/src/mixins/scrollBehavior.ts"
27368
+ }
27345
27369
  },
27346
27370
  {
27347
27371
  "name": "scrolling",
@@ -28090,6 +28114,17 @@
28090
28114
  "description": "需要监听其滚动事件的元素。值可以是 CSS 选择器、DOM 元素、或 [JQ 对象](/docs/2/functions/jq)。默认监听 `window` 的滚动事件",
28091
28115
  "attribute": "scroll-target"
28092
28116
  },
28117
+ {
28118
+ "kind": "field",
28119
+ "name": "scrollBehavior",
28120
+ "type": {
28121
+ "text": "'hide' | 'shrink' | 'elevate' | undefined"
28122
+ },
28123
+ "privacy": "public",
28124
+ "description": "滚动行为。可选值为:\n* `hide`:滚动时隐藏\n* `shrink`:滚动时缩小\n* `elevate`:滚动时增加阴影\n\ntodo: 生成 custom-elements.json 时,属性名的注释用了父类的,属性枚举值的类型和注释用了该类的。期望都使用父类的。",
28125
+ "attribute": "scroll-behavior",
28126
+ "reflects": true
28127
+ },
28093
28128
  {
28094
28129
  "kind": "field",
28095
28130
  "name": "scrollThreshold",
@@ -28360,6 +28395,14 @@
28360
28395
  "description": "需要监听其滚动事件的元素。值可以是 CSS 选择器、DOM 元素、或 [JQ 对象](/docs/2/functions/jq)。默认监听 `window` 的滚动事件",
28361
28396
  "fieldName": "scrollTarget"
28362
28397
  },
28398
+ {
28399
+ "name": "scroll-behavior",
28400
+ "type": {
28401
+ "text": "'hide' | 'shrink' | 'elevate' | undefined"
28402
+ },
28403
+ "description": "滚动行为。可选值为:\n* `hide`:滚动时隐藏\n* `shrink`:滚动时缩小\n* `elevate`:滚动时增加阴影\n\ntodo: 生成 custom-elements.json 时,属性名的注释用了父类的,属性枚举值的类型和注释用了该类的。期望都使用父类的。",
28404
+ "fieldName": "scrollBehavior"
28405
+ },
28363
28406
  {
28364
28407
  "name": "scroll-threshold",
28365
28408
  "type": {