@fle-ui/next 1.0.0-alpha.12 → 1.0.0-alpha.13

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 (164) hide show
  1. package/.history/package_20211011190148.json +141 -0
  2. package/.history/package_20211011193053.json +141 -0
  3. package/dist/@fle-ui/next.css +2 -2
  4. package/dist/@fle-ui/next.css.map +1 -1
  5. package/dist/@fle-ui/next.js +1 -1
  6. package/dist/@fle-ui/next.min.css +2 -2
  7. package/dist/@fle-ui/next.min.css.map +1 -1
  8. package/dist/@fle-ui/next.min.js +1 -1
  9. package/docs-dist/components__affix__affix.md.js +701 -1
  10. package/docs-dist/components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~components__au~00d1741d.js +22482 -1
  11. package/docs-dist/components__alert__alert.md.js +942 -1
  12. package/docs-dist/components__anchor__anchor.md.js +789 -1
  13. package/docs-dist/components__auto-complete__autoComplete.md.js +1145 -1
  14. package/docs-dist/components__avatar__avatar.md.js +854 -1
  15. package/docs-dist/components__back-top__backTop.md.js +581 -1
  16. package/docs-dist/components__badge__badge.md.js +972 -1
  17. package/docs-dist/components__breadcrumb__breadcrumb.md.js +914 -1
  18. package/docs-dist/components__button__button.md.js +1037 -1
  19. package/docs-dist/components__calendar__calendar.md.js +897 -1
  20. package/docs-dist/components__card__card.md.js +1106 -1
  21. package/docs-dist/components__carousel__carousel.md.js +770 -1
  22. package/docs-dist/components__cascader__cascader.md.js +1378 -1
  23. package/docs-dist/components__checkbox__checkbox.md.js +876 -1
  24. package/docs-dist/components__collapse__collapse.md.js +959 -1
  25. package/docs-dist/components__comment__comment.md.js +586 -1
  26. package/docs-dist/components__config-provider__configProvider.md.js +1055 -1
  27. package/docs-dist/components__date-picker__date-picker.md.js +2622 -1
  28. package/docs-dist/components__descriptions__descriptions.md.js +863 -1
  29. package/docs-dist/components__divider__divider.md.js +681 -1
  30. package/docs-dist/components__drawer__drawer.md.js +997 -1
  31. package/docs-dist/components__dropdown__dropdown.md.js +1170 -1
  32. package/docs-dist/components__empty__empty.md.js +692 -1
  33. package/docs-dist/components__form__form.md.js +4099 -1
  34. package/docs-dist/components__grid__grid.md.js +999 -1
  35. package/docs-dist/components__icon__icon.md.js +739 -1
  36. package/docs-dist/components__image__image.md.js +745 -1
  37. package/docs-dist/components__input-number__inputNumber.md.js +1006 -1
  38. package/docs-dist/components__input__input.md.js +1579 -1
  39. package/docs-dist/components__layout__layout.md.js +1220 -1
  40. package/docs-dist/components__list__list.md.js +1255 -1
  41. package/docs-dist/components__mentions__mentions.md.js +943 -1
  42. package/docs-dist/components__menu__menu.md.js +1370 -1
  43. package/docs-dist/components__message__message.md.js +1223 -1
  44. package/docs-dist/components__modal__modal.md.js +1808 -1
  45. package/docs-dist/components__notification__notification.md.js +1192 -1
  46. package/docs-dist/components__page-header__page-header.md.js +781 -1
  47. package/docs-dist/components__pagination__pagination.md.js +954 -1
  48. package/docs-dist/components__popconfirm__popconfirm.md.js +792 -1
  49. package/docs-dist/components__popover__popover.md.js +665 -1
  50. package/docs-dist/components__progress__progress.md.js +1139 -1
  51. package/docs-dist/components__radio__radio.md.js +999 -1
  52. package/docs-dist/components__rate__rate.md.js +851 -1
  53. package/docs-dist/components__result__result.md.js +681 -1
  54. package/docs-dist/components__select__select.md.js +2081 -1
  55. package/docs-dist/components__slider__slider.md.js +1053 -1
  56. package/docs-dist/components__space__space.md.js +746 -1
  57. package/docs-dist/components__spin__spin.md.js +730 -1
  58. package/docs-dist/components__statistic__statistic.md.js +827 -1
  59. package/docs-dist/components__steps__steps.md.js +1097 -1
  60. package/docs-dist/components__switch__switch.md.js +763 -1
  61. package/docs-dist/components__table__table.md.js +3692 -1
  62. package/docs-dist/components__tabs__tabs.md.js +1213 -1
  63. package/docs-dist/components__tag__tag.md.js +779 -1
  64. package/docs-dist/components__time-picker__time-picker.md.js +1232 -1
  65. package/docs-dist/components__timeline__timeline.md.js +799 -1
  66. package/docs-dist/components__tooltip__tooltip.md.js +888 -1
  67. package/docs-dist/components__transfer__transfer.md.js +1226 -1
  68. package/docs-dist/components__tree-select__tree-select.md.js +1042 -1
  69. package/docs-dist/components__typography__typography.md.js +1793 -1
  70. package/docs-dist/components__upload__upload.md.js +1798 -1
  71. package/docs-dist/demos_bmurcdaerb.js +603 -1
  72. package/docs-dist/demos_bmurcdaerb~demos_citsitats~demos_dirg~demos_drac~demos_ecaps~demos_egami~demos_egassem~demos_e~57973d2f.chunk.css +1 -1
  73. package/docs-dist/demos_bmurcdaerb~demos_citsitats~demos_dirg~demos_drac~demos_ecaps~demos_egami~demos_egassem~demos_e~57973d2f.js +21570 -1
  74. package/docs-dist/demos_citsitats.js +549 -1
  75. package/docs-dist/demos_daolpu.chunk.css +1 -1
  76. package/docs-dist/demos_daolpu.js +22680 -1
  77. package/docs-dist/demos_dirg.js +47 -1
  78. package/docs-dist/demos_drac.js +748 -1
  79. package/docs-dist/demos_ecaps.js +529 -1
  80. package/docs-dist/demos_egami.js +153 -1
  81. package/docs-dist/demos_egassem.js +187 -1
  82. package/docs-dist/demos_egdab.js +872 -1
  83. package/docs-dist/demos_elbat.chunk.css +1 -1
  84. package/docs-dist/demos_elbat.js +27626 -1
  85. package/docs-dist/demos_enilemit.js +627 -1
  86. package/docs-dist/demos_espalloc.js +705 -1
  87. package/docs-dist/demos_etar.js +547 -1
  88. package/docs-dist/demos_etelpmoc-otua.js +613 -1
  89. package/docs-dist/demos_gat.js +487 -1
  90. package/docs-dist/demos_hctiws.js +439 -1
  91. package/docs-dist/demos_ladom.js +791 -1
  92. package/docs-dist/demos_lesuorac.js +193 -1
  93. package/docs-dist/demos_mrifnocpop.js +671 -1
  94. package/docs-dist/demos_mrof.js +3082 -1
  95. package/docs-dist/demos_nips.js +461 -1
  96. package/docs-dist/demos_noitacifiton.js +765 -1
  97. package/docs-dist/demos_noitanigap.js +233 -1
  98. package/docs-dist/demos_nottub.js +847 -1
  99. package/docs-dist/demos_nwodpord.js +965 -1
  100. package/docs-dist/demos_oidar.js +340 -1
  101. package/docs-dist/demos_pitloot.js +204 -1
  102. package/docs-dist/demos_pot-kcab.js +62 -1
  103. package/docs-dist/demos_radnelac.js +285 -1
  104. package/docs-dist/demos_ratava.js +647 -1
  105. package/docs-dist/demos_rebmun-tupni.js +209 -1
  106. package/docs-dist/demos_redacsac.js +576 -1
  107. package/docs-dist/demos_redaeh-egap.js +761 -1
  108. package/docs-dist/demos_redils.js +659 -1
  109. package/docs-dist/demos_redivid.js +167 -1
  110. package/docs-dist/demos_redivorp-gifnoc.js +2154 -1
  111. package/docs-dist/demos_refsnart.js +774 -1
  112. package/docs-dist/demos_rekcip-emit.js +183 -1
  113. package/docs-dist/demos_rekcip-etad.js +469 -1
  114. package/docs-dist/demos_revopop.js +335 -1
  115. package/docs-dist/demos_reward.js +484 -1
  116. package/docs-dist/demos_rohcna.js +194 -1
  117. package/docs-dist/demos_sbat.chunk.css +1 -1
  118. package/docs-dist/demos_sbat.js +22358 -1
  119. package/docs-dist/demos_snoitnem.js +202 -1
  120. package/docs-dist/demos_snoitpircsed.js +351 -1
  121. package/docs-dist/demos_spets.js +910 -1
  122. package/docs-dist/demos_ssergorp.js +698 -1
  123. package/docs-dist/demos_tceles.js +1416 -1
  124. package/docs-dist/demos_tluser.js +530 -1
  125. package/docs-dist/demos_tnemmoc.js +560 -1
  126. package/docs-dist/demos_trela.js +341 -1
  127. package/docs-dist/demos_tsil.js +603 -1
  128. package/docs-dist/demos_tuoyal.js +872 -1
  129. package/docs-dist/demos_tupni.js +1245 -1
  130. package/docs-dist/demos_unem.js +1012 -1
  131. package/docs-dist/demos_xiffa.js +93 -1
  132. package/docs-dist/demos_xobkcehc.js +186 -1
  133. package/docs-dist/demos_yhpargopyt.js +798 -1
  134. package/docs-dist/demos_ytpme.js +433 -1
  135. package/docs-dist/docs__document__getting-started.md.js +193 -1
  136. package/docs-dist/docs__document__introduce.md.js +441 -1
  137. package/docs-dist/docs__document__practical-projects.md.js +117 -1
  138. package/docs-dist/docs__index.md.js +27 -1
  139. package/docs-dist/docs__story__index.md.js +89 -1
  140. package/docs-dist/dumi_demos.js +456 -1
  141. package/docs-dist/umi.js +28727 -1
  142. package/docs-dist/vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~3ba4f4a1.js +2590 -1
  143. package/docs-dist/vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~ac3aca9a.js +8970 -1
  144. package/docs-dist/vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~e29e5a37.js +2619 -1
  145. package/docs-dist/vendors~demos_bmurcdaerb~demos_citsitats~demos_daolpu~demos_dirg~demos_drac~demos_ecaps~demos_egami~~4cc402e9.js +57323 -1
  146. package/docs-dist/vendors~demos_daolpu~demos_elbat.js +1649 -1
  147. package/docs-dist/vendors~demos_daolpu~demos_elbat~demos_sbat.js +4169 -1
  148. package/docs-dist/vendors~demos_gat.js +4673 -1
  149. package/docs-dist/vendors~demos_ladom.js +1855 -1
  150. package/docs-dist/vendors~demos_redivorp-gifnoc.js +9666 -1
  151. package/docs-dist/vendors~demos_sbat.js +1601 -1
  152. package/docs-dist/vendors~demos_trela.js +1722 -1
  153. package/docs-dist/vendors~demos_tsil.js +4970 -1
  154. package/docs-dist/vendors~demos_tuoyal.js +748 -1
  155. package/docs-dist/vendors~wrappers.js +1360 -1
  156. package/docs-dist/wrappers.js +21 -1
  157. package/es/drawer/style/drawer.less +8 -4
  158. package/es/drawer/style/index.css +1 -1
  159. package/es/style/themes/default.less +57 -29
  160. package/lib/drawer/style/drawer.less +8 -4
  161. package/lib/drawer/style/index.css +1 -1
  162. package/lib/style/themes/default.less +57 -29
  163. package/package.json +1 -1
  164. package/report.html +1 -1
@@ -1 +1,779 @@
1
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[61],{GjIZ:function(e,t,a){"use strict";a.r(t);var n=a("q1tI"),l=a.n(n),r=a("dEAq"),c=a("Zxc8"),o=a("JjdP"),i=l.a.memo(o["default"]["tag-basic"].component),m=l.a.memo(o["default"]["tag-colourful"].component),d=l.a.memo(o["default"]["tag-dynamic"].component),u=l.a.memo(o["default"]["tag-choice"].component),s=l.a.memo(o["default"]["tag-control"].component),E=l.a.memo(o["default"]["tag-animation"].component),f=l.a.memo(o["default"]["tag-icon"].component),p=l.a.memo(o["default"]["tag-preset"].component);t["default"]=e=>(l.a.useEffect((()=>{var t;null!==e&&void 0!==e&&null!==(t=e.location)&&void 0!==t&&t.hash&&r["AnchorLink"].scrollToAnchor(decodeURIComponent(e.location.hash.slice(1)))}),[]),l.a.createElement(l.a.Fragment,null,l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:"markdown"},l.a.createElement("h1",{id:"tag-\u6807\u7b7e"},l.a.createElement(r["AnchorLink"],{to:"#tag-\u6807\u7b7e","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"Tag \u6807\u7b7e"),l.a.createElement("p",null,"\u8fdb\u884c\u6807\u8bb0\u548c\u5206\u7c7b\u7684\u5c0f\u6807\u7b7e\u3002"),l.a.createElement("h2",{id:"\u4f55\u65f6\u4f7f\u7528"},l.a.createElement(r["AnchorLink"],{to:"#\u4f55\u65f6\u4f7f\u7528","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u4f55\u65f6\u4f7f\u7528"),l.a.createElement("ul",null,l.a.createElement("li",null,"\u7528\u4e8e\u6807\u8bb0\u4e8b\u7269\u7684\u5c5e\u6027\u548c\u7ef4\u5ea6\u3002"),l.a.createElement("li",null,"\u8fdb\u884c\u5206\u7c7b\u3002")),l.a.createElement("h3",{id:"\u57fa\u672c"},l.a.createElement(r["AnchorLink"],{to:"#\u57fa\u672c","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u57fa\u672c")),l.a.createElement(c["default"],o["default"]["tag-basic"].previewerProps,l.a.createElement(i,null)),l.a.createElement("div",{className:"markdown"},l.a.createElement("h3",{id:"\u591a\u5f69\u6807\u7b7e"},l.a.createElement(r["AnchorLink"],{to:"#\u591a\u5f69\u6807\u7b7e","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u591a\u5f69\u6807\u7b7e")),l.a.createElement(c["default"],o["default"]["tag-colourful"].previewerProps,l.a.createElement(m,null)),l.a.createElement("div",{className:"markdown"},l.a.createElement("h3",{id:"\u52a8\u6001\u6dfb\u52a0\u548c\u5220\u9664"},l.a.createElement(r["AnchorLink"],{to:"#\u52a8\u6001\u6dfb\u52a0\u548c\u5220\u9664","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u52a8\u6001\u6dfb\u52a0\u548c\u5220\u9664")),l.a.createElement(c["default"],o["default"]["tag-dynamic"].previewerProps,l.a.createElement(d,null)),l.a.createElement("div",{className:"markdown"},l.a.createElement("h3",{id:"\u53ef\u9009\u62e9\u6807\u7b7e"},l.a.createElement(r["AnchorLink"],{to:"#\u53ef\u9009\u62e9\u6807\u7b7e","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u53ef\u9009\u62e9\u6807\u7b7e")),l.a.createElement(c["default"],o["default"]["tag-choice"].previewerProps,l.a.createElement(u,null)),l.a.createElement("div",{className:"markdown"},l.a.createElement("h3",{id:"\u63a7\u5236\u5173\u95ed\u72b6\u6001"},l.a.createElement(r["AnchorLink"],{to:"#\u63a7\u5236\u5173\u95ed\u72b6\u6001","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u63a7\u5236\u5173\u95ed\u72b6\u6001")),l.a.createElement(c["default"],o["default"]["tag-control"].previewerProps,l.a.createElement(s,null)),l.a.createElement("div",{className:"markdown"},l.a.createElement("h3",{id:"\u6dfb\u52a0\u52a8\u753b"},l.a.createElement(r["AnchorLink"],{to:"#\u6dfb\u52a0\u52a8\u753b","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u6dfb\u52a0\u52a8\u753b")),l.a.createElement(c["default"],o["default"]["tag-animation"].previewerProps,l.a.createElement(E,null)),l.a.createElement("div",{className:"markdown"},l.a.createElement("h3",{id:"\u56fe\u6807\u6309\u94ae"},l.a.createElement(r["AnchorLink"],{to:"#\u56fe\u6807\u6309\u94ae","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u56fe\u6807\u6309\u94ae")),l.a.createElement(c["default"],o["default"]["tag-icon"].previewerProps,l.a.createElement(f,null)),l.a.createElement("div",{className:"markdown"},l.a.createElement("h3",{id:"\u9884\u8bbe\u72b6\u6001\u7684\u6807\u7b7e"},l.a.createElement(r["AnchorLink"],{to:"#\u9884\u8bbe\u72b6\u6001\u7684\u6807\u7b7e","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"\u9884\u8bbe\u72b6\u6001\u7684\u6807\u7b7e")),l.a.createElement(c["default"],o["default"]["tag-preset"].previewerProps,l.a.createElement(p,null)),l.a.createElement("div",{className:"markdown"},l.a.createElement("h2",{id:"api"},l.a.createElement(r["AnchorLink"],{to:"#api","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"API"),l.a.createElement("h3",{id:"tag"},l.a.createElement(r["AnchorLink"],{to:"#tag","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"Tag"),l.a.createElement("table",null,l.a.createElement("thead",null,l.a.createElement("tr",null,l.a.createElement("th",null,"\u53c2\u6570"),l.a.createElement("th",null,"\u8bf4\u660e"),l.a.createElement("th",null,"\u7c7b\u578b"),l.a.createElement("th",null,"\u9ed8\u8ba4\u503c"),l.a.createElement("th",null,"\u7248\u672c"))),l.a.createElement("tbody",null,l.a.createElement("tr",null,l.a.createElement("td",null,"closable"),l.a.createElement("td",null,"\u6807\u7b7e\u662f\u5426\u53ef\u4ee5\u5173\u95ed\uff08\u70b9\u51fb\u9ed8\u8ba4\u5173\u95ed\uff09"),l.a.createElement("td",null,"boolean"),l.a.createElement("td",null,"false"),l.a.createElement("td",null)),l.a.createElement("tr",null,l.a.createElement("td",null,"closeIcon"),l.a.createElement("td",null,"\u81ea\u5b9a\u4e49\u5173\u95ed\u6309\u94ae"),l.a.createElement("td",null,"ReactNode"),l.a.createElement("td",null,"-"),l.a.createElement("td",null,"4.4.0")),l.a.createElement("tr",null,l.a.createElement("td",null,"color"),l.a.createElement("td",null,"\u6807\u7b7e\u8272"),l.a.createElement("td",null,"string"),l.a.createElement("td",null,"-"),l.a.createElement("td",null)),l.a.createElement("tr",null,l.a.createElement("td",null,"icon"),l.a.createElement("td",null,"\u8bbe\u7f6e\u56fe\u6807"),l.a.createElement("td",null,"ReactNode"),l.a.createElement("td",null,"-"),l.a.createElement("td",null)),l.a.createElement("tr",null,l.a.createElement("td",null,"visible"),l.a.createElement("td",null,"\u662f\u5426\u663e\u793a\u6807\u7b7e"),l.a.createElement("td",null,"boolean"),l.a.createElement("td",null,"true"),l.a.createElement("td",null)),l.a.createElement("tr",null,l.a.createElement("td",null,"onClose"),l.a.createElement("td",null,"\u5173\u95ed\u65f6\u7684\u56de\u8c03\uff08\u53ef\u901a\u8fc7 ",l.a.createElement("code",null,"e.preventDefault()")," \u6765\u963b\u6b62\u9ed8\u8ba4\u884c\u4e3a\uff09"),l.a.createElement("td",null,"(e) => void"),l.a.createElement("td",null,"-"),l.a.createElement("td",null)))),l.a.createElement("h3",{id:"tagcheckabletag"},l.a.createElement(r["AnchorLink"],{to:"#tagcheckabletag","aria-hidden":"true",tabIndex:-1},l.a.createElement("span",{className:"icon icon-link"})),"Tag.CheckableTag"),l.a.createElement("table",null,l.a.createElement("thead",null,l.a.createElement("tr",null,l.a.createElement("th",null,"\u53c2\u6570"),l.a.createElement("th",null,"\u8bf4\u660e"),l.a.createElement("th",null,"\u7c7b\u578b"),l.a.createElement("th",null,"\u9ed8\u8ba4\u503c"))),l.a.createElement("tbody",null,l.a.createElement("tr",null,l.a.createElement("td",null,"checked"),l.a.createElement("td",null,"\u8bbe\u7f6e\u6807\u7b7e\u7684\u9009\u4e2d\u72b6\u6001"),l.a.createElement("td",null,"boolean"),l.a.createElement("td",null,"false")),l.a.createElement("tr",null,l.a.createElement("td",null,"onChange"),l.a.createElement("td",null,"\u70b9\u51fb\u6807\u7b7e\u65f6\u89e6\u53d1\u7684\u56de\u8c03"),l.a.createElement("td",null,"(checked) => void"),l.a.createElement("td",null,"-")))),l.a.createElement("style",{dangerouslySetInnerHTML:{__html:"\n .site-tag-plus {\n background: #fff;\n border-style: dashed;\n }\n .edit-tag {\n user-select: none;\n }\n .tag-input {\n width: 78px;\n margin-right: 8px;\n vertical-align: top;\n }\n"}})))))},MZF8:function(e,t,a){"use strict";var n=a("ogwx");a.d(t,"a",(function(){return n["b"]}));a("VCU9")},RZMt:function(e,t,a){},Zxc8:function(e,t,a){"use strict";a.r(t);var n=a("q1tI"),l=a.n(n),r=a("k3GJ"),c=a("MZF8"),o=a("dEAq"),i=a("H1Ra");a("RZMt");function m(e,t){return f(e)||E(e,t)||u(e,t)||d()}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"===typeof e)return s(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function E(e,t){var a=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,l,r=[],c=!0,o=!1;try{for(a=a.call(e);!(c=(n=a.next()).done);c=!0)if(r.push(n.value),t&&r.length===t)break}catch(i){o=!0,l=i}finally{try{c||null==a["return"]||a["return"]()}finally{if(o)throw l}}return r}}function f(e){if(Array.isArray(e))return e}function p(e,t){var a,n=null===(a=e.match(/\.(\w+)$/))||void 0===a?void 0:a[1];return n||(n=t.tsx?"tsx":"jsx"),n}var h=function(e){var t,a,d,u=Object(n["useRef"])(),s=Object(n["useContext"])(o["context"]),E=s.locale,f=Object(o["useLocaleProps"])(E,e),h=Object(o["useDemoUrl"])(f.identifier),b=f.demoUrl||h,v=(null===c["a"]||void 0===c["a"]?void 0:c["a"].location.hash)==="#".concat(f.identifier),g=1===Object.keys(f.sources).length,k=Object(o["useCodeSandbox"])((null===(t=f.hideActions)||void 0===t?void 0:t.includes("CSB"))?null:f),_=Object(o["useRiddle"])((null===(a=f.hideActions)||void 0===a?void 0:a.includes("RIDDLE"))?null:f),w=Object(o["useMotions"])(f.motions||[],u.current),y=m(w,2),N=y[0],x=y[1],A=Object(o["useCopy"])(),I=m(A,2),j=I[0],C=I[1],O=Object(n["useState"])("_"),L=m(O,2),S=L[0],P=L[1],R=Object(n["useState"])(p(S,f.sources[S])),T=m(R,2),M=T[0],Z=T[1],U=Object(n["useState"])(Boolean(f.defaultShowCode)),J=m(U,2),q=J[0],D=J[1],F=Object(n["useState"])(Math.random()),$=m(F,2),B=$[0],G=$[1],H=f.sources[S][M]||f.sources[S].content,X=Object(o["useTSPlaygroundUrl"])(E,H),K=Object(n["useRef"])(),V=Object(o["usePrefersColor"])(),z=m(V,1),Q=z[0];function W(e){P(e),Z(p(e,f.sources[e]))}return Object(n["useEffect"])((function(){G(Math.random())}),[Q]),l.a.createElement("div",{style:f.style,className:[f.className,"__dumi-default-previewer",v?"__dumi-default-previewer-target":""].filter(Boolean).join(" "),id:f.identifier,"data-debug":f.debug||void 0,"data-iframe":f.iframe||void 0},f.iframe&&l.a.createElement("div",{className:"__dumi-default-previewer-browser-nav"}),l.a.createElement("div",{ref:u,className:"__dumi-default-previewer-demo",style:{transform:f.transform?"translate(0, 0)":void 0,padding:f.compact||f.iframe&&!1!==f.compact?"0":void 0,background:f.background}},f.iframe?l.a.createElement("iframe",{title:"dumi-previewer",style:{height:String(f.iframe).replace(/(\d)$/,"$1px")},key:B,src:b,ref:K}):f.children),l.a.createElement("div",{className:"__dumi-default-previewer-desc","data-title":f.title},f.title&&l.a.createElement(o["AnchorLink"],{to:"#".concat(f.identifier)},f.title),f.description&&l.a.createElement("div",{dangerouslySetInnerHTML:{__html:f.description}})),l.a.createElement("div",{className:"__dumi-default-previewer-actions"},k&&l.a.createElement("button",{title:"Open demo on CodeSandbox.io",className:"__dumi-default-icon",role:"codesandbox",onClick:k}),_&&l.a.createElement("button",{title:"Open demo on Riddle",className:"__dumi-default-icon",role:"riddle",onClick:_}),f.motions&&l.a.createElement("button",{title:"Execute motions",className:"__dumi-default-icon",role:"motions",disabled:x,onClick:function(){return N()}}),f.iframe&&l.a.createElement("button",{title:"Reload demo iframe page",className:"__dumi-default-icon",role:"refresh",onClick:function(){return G(Math.random())}}),!(null===(d=f.hideActions)||void 0===d?void 0:d.includes("EXTERNAL"))&&l.a.createElement(o["Link"],{target:"_blank",to:b},l.a.createElement("button",{title:"Open demo in new tab",className:"__dumi-default-icon",role:"open-demo",type:"button"})),l.a.createElement("span",null),l.a.createElement("button",{title:"Copy source code",className:"__dumi-default-icon",role:"copy","data-status":C,onClick:function(){return j(H)}}),"tsx"===M&&q&&l.a.createElement(o["Link"],{target:"_blank",to:X},l.a.createElement("button",{title:"Get JSX via TypeScript Playground",className:"__dumi-default-icon",role:"change-tsx",type:"button"})),l.a.createElement("button",{title:"Toggle source code panel",className:"__dumi-default-icon".concat(q?" __dumi-default-btn-expand":""),role:"source",type:"button",onClick:function(){return D(!q)}})),q&&l.a.createElement("div",{className:"__dumi-default-previewer-source-wrapper"},!g&&l.a.createElement(r["b"],{className:"__dumi-default-previewer-source-tab",prefixCls:"__dumi-default-tabs",moreIcon:"\xb7\xb7\xb7",defaultActiveKey:S,onChange:W},Object.keys(f.sources).map((function(e){return l.a.createElement(r["a"],{tab:"_"===e?"index.".concat(p(e,f.sources[e])):e,key:e})}))),l.a.createElement("div",{className:"__dumi-default-previewer-source"},l.a.createElement(i["a"],{code:H,lang:M,showCopy:!1}))))};t["default"]=h}}]);
1
+ (window['webpackJsonp'] = window['webpackJsonp'] || []).push([
2
+ [61],
3
+ {
4
+ GjIZ: function (e, t, a) {
5
+ 'use strict';
6
+ a.r(t);
7
+ var n = a('q1tI'),
8
+ l = a.n(n),
9
+ r = a('dEAq'),
10
+ c = a('Zxc8'),
11
+ o = a('JjdP'),
12
+ i = l.a.memo(o['default']['tag-basic'].component),
13
+ m = l.a.memo(o['default']['tag-colourful'].component),
14
+ d = l.a.memo(o['default']['tag-dynamic'].component),
15
+ u = l.a.memo(o['default']['tag-choice'].component),
16
+ s = l.a.memo(o['default']['tag-control'].component),
17
+ E = l.a.memo(o['default']['tag-animation'].component),
18
+ f = l.a.memo(o['default']['tag-icon'].component),
19
+ p = l.a.memo(o['default']['tag-preset'].component);
20
+ t['default'] = (e) => (
21
+ l.a.useEffect(() => {
22
+ var t;
23
+ null !== e &&
24
+ void 0 !== e &&
25
+ null !== (t = e.location) &&
26
+ void 0 !== t &&
27
+ t.hash &&
28
+ r['AnchorLink'].scrollToAnchor(
29
+ decodeURIComponent(e.location.hash.slice(1)),
30
+ );
31
+ }, []),
32
+ l.a.createElement(
33
+ l.a.Fragment,
34
+ null,
35
+ l.a.createElement(
36
+ l.a.Fragment,
37
+ null,
38
+ l.a.createElement(
39
+ 'div',
40
+ { className: 'markdown' },
41
+ l.a.createElement(
42
+ 'h1',
43
+ { id: 'tag-\u6807\u7b7e' },
44
+ l.a.createElement(
45
+ r['AnchorLink'],
46
+ {
47
+ to: '#tag-\u6807\u7b7e',
48
+ 'aria-hidden': 'true',
49
+ tabIndex: -1,
50
+ },
51
+ l.a.createElement('span', { className: 'icon icon-link' }),
52
+ ),
53
+ 'Tag \u6807\u7b7e',
54
+ ),
55
+ l.a.createElement(
56
+ 'p',
57
+ null,
58
+ '\u8fdb\u884c\u6807\u8bb0\u548c\u5206\u7c7b\u7684\u5c0f\u6807\u7b7e\u3002',
59
+ ),
60
+ l.a.createElement(
61
+ 'h2',
62
+ { id: '\u4f55\u65f6\u4f7f\u7528' },
63
+ l.a.createElement(
64
+ r['AnchorLink'],
65
+ {
66
+ to: '#\u4f55\u65f6\u4f7f\u7528',
67
+ 'aria-hidden': 'true',
68
+ tabIndex: -1,
69
+ },
70
+ l.a.createElement('span', { className: 'icon icon-link' }),
71
+ ),
72
+ '\u4f55\u65f6\u4f7f\u7528',
73
+ ),
74
+ l.a.createElement(
75
+ 'ul',
76
+ null,
77
+ l.a.createElement(
78
+ 'li',
79
+ null,
80
+ '\u7528\u4e8e\u6807\u8bb0\u4e8b\u7269\u7684\u5c5e\u6027\u548c\u7ef4\u5ea6\u3002',
81
+ ),
82
+ l.a.createElement('li', null, '\u8fdb\u884c\u5206\u7c7b\u3002'),
83
+ ),
84
+ l.a.createElement(
85
+ 'h3',
86
+ { id: '\u57fa\u672c' },
87
+ l.a.createElement(
88
+ r['AnchorLink'],
89
+ { to: '#\u57fa\u672c', 'aria-hidden': 'true', tabIndex: -1 },
90
+ l.a.createElement('span', { className: 'icon icon-link' }),
91
+ ),
92
+ '\u57fa\u672c',
93
+ ),
94
+ ),
95
+ l.a.createElement(
96
+ c['default'],
97
+ o['default']['tag-basic'].previewerProps,
98
+ l.a.createElement(i, null),
99
+ ),
100
+ l.a.createElement(
101
+ 'div',
102
+ { className: 'markdown' },
103
+ l.a.createElement(
104
+ 'h3',
105
+ { id: '\u591a\u5f69\u6807\u7b7e' },
106
+ l.a.createElement(
107
+ r['AnchorLink'],
108
+ {
109
+ to: '#\u591a\u5f69\u6807\u7b7e',
110
+ 'aria-hidden': 'true',
111
+ tabIndex: -1,
112
+ },
113
+ l.a.createElement('span', { className: 'icon icon-link' }),
114
+ ),
115
+ '\u591a\u5f69\u6807\u7b7e',
116
+ ),
117
+ ),
118
+ l.a.createElement(
119
+ c['default'],
120
+ o['default']['tag-colourful'].previewerProps,
121
+ l.a.createElement(m, null),
122
+ ),
123
+ l.a.createElement(
124
+ 'div',
125
+ { className: 'markdown' },
126
+ l.a.createElement(
127
+ 'h3',
128
+ { id: '\u52a8\u6001\u6dfb\u52a0\u548c\u5220\u9664' },
129
+ l.a.createElement(
130
+ r['AnchorLink'],
131
+ {
132
+ to: '#\u52a8\u6001\u6dfb\u52a0\u548c\u5220\u9664',
133
+ 'aria-hidden': 'true',
134
+ tabIndex: -1,
135
+ },
136
+ l.a.createElement('span', { className: 'icon icon-link' }),
137
+ ),
138
+ '\u52a8\u6001\u6dfb\u52a0\u548c\u5220\u9664',
139
+ ),
140
+ ),
141
+ l.a.createElement(
142
+ c['default'],
143
+ o['default']['tag-dynamic'].previewerProps,
144
+ l.a.createElement(d, null),
145
+ ),
146
+ l.a.createElement(
147
+ 'div',
148
+ { className: 'markdown' },
149
+ l.a.createElement(
150
+ 'h3',
151
+ { id: '\u53ef\u9009\u62e9\u6807\u7b7e' },
152
+ l.a.createElement(
153
+ r['AnchorLink'],
154
+ {
155
+ to: '#\u53ef\u9009\u62e9\u6807\u7b7e',
156
+ 'aria-hidden': 'true',
157
+ tabIndex: -1,
158
+ },
159
+ l.a.createElement('span', { className: 'icon icon-link' }),
160
+ ),
161
+ '\u53ef\u9009\u62e9\u6807\u7b7e',
162
+ ),
163
+ ),
164
+ l.a.createElement(
165
+ c['default'],
166
+ o['default']['tag-choice'].previewerProps,
167
+ l.a.createElement(u, null),
168
+ ),
169
+ l.a.createElement(
170
+ 'div',
171
+ { className: 'markdown' },
172
+ l.a.createElement(
173
+ 'h3',
174
+ { id: '\u63a7\u5236\u5173\u95ed\u72b6\u6001' },
175
+ l.a.createElement(
176
+ r['AnchorLink'],
177
+ {
178
+ to: '#\u63a7\u5236\u5173\u95ed\u72b6\u6001',
179
+ 'aria-hidden': 'true',
180
+ tabIndex: -1,
181
+ },
182
+ l.a.createElement('span', { className: 'icon icon-link' }),
183
+ ),
184
+ '\u63a7\u5236\u5173\u95ed\u72b6\u6001',
185
+ ),
186
+ ),
187
+ l.a.createElement(
188
+ c['default'],
189
+ o['default']['tag-control'].previewerProps,
190
+ l.a.createElement(s, null),
191
+ ),
192
+ l.a.createElement(
193
+ 'div',
194
+ { className: 'markdown' },
195
+ l.a.createElement(
196
+ 'h3',
197
+ { id: '\u6dfb\u52a0\u52a8\u753b' },
198
+ l.a.createElement(
199
+ r['AnchorLink'],
200
+ {
201
+ to: '#\u6dfb\u52a0\u52a8\u753b',
202
+ 'aria-hidden': 'true',
203
+ tabIndex: -1,
204
+ },
205
+ l.a.createElement('span', { className: 'icon icon-link' }),
206
+ ),
207
+ '\u6dfb\u52a0\u52a8\u753b',
208
+ ),
209
+ ),
210
+ l.a.createElement(
211
+ c['default'],
212
+ o['default']['tag-animation'].previewerProps,
213
+ l.a.createElement(E, null),
214
+ ),
215
+ l.a.createElement(
216
+ 'div',
217
+ { className: 'markdown' },
218
+ l.a.createElement(
219
+ 'h3',
220
+ { id: '\u56fe\u6807\u6309\u94ae' },
221
+ l.a.createElement(
222
+ r['AnchorLink'],
223
+ {
224
+ to: '#\u56fe\u6807\u6309\u94ae',
225
+ 'aria-hidden': 'true',
226
+ tabIndex: -1,
227
+ },
228
+ l.a.createElement('span', { className: 'icon icon-link' }),
229
+ ),
230
+ '\u56fe\u6807\u6309\u94ae',
231
+ ),
232
+ ),
233
+ l.a.createElement(
234
+ c['default'],
235
+ o['default']['tag-icon'].previewerProps,
236
+ l.a.createElement(f, null),
237
+ ),
238
+ l.a.createElement(
239
+ 'div',
240
+ { className: 'markdown' },
241
+ l.a.createElement(
242
+ 'h3',
243
+ { id: '\u9884\u8bbe\u72b6\u6001\u7684\u6807\u7b7e' },
244
+ l.a.createElement(
245
+ r['AnchorLink'],
246
+ {
247
+ to: '#\u9884\u8bbe\u72b6\u6001\u7684\u6807\u7b7e',
248
+ 'aria-hidden': 'true',
249
+ tabIndex: -1,
250
+ },
251
+ l.a.createElement('span', { className: 'icon icon-link' }),
252
+ ),
253
+ '\u9884\u8bbe\u72b6\u6001\u7684\u6807\u7b7e',
254
+ ),
255
+ ),
256
+ l.a.createElement(
257
+ c['default'],
258
+ o['default']['tag-preset'].previewerProps,
259
+ l.a.createElement(p, null),
260
+ ),
261
+ l.a.createElement(
262
+ 'div',
263
+ { className: 'markdown' },
264
+ l.a.createElement(
265
+ 'h2',
266
+ { id: 'api' },
267
+ l.a.createElement(
268
+ r['AnchorLink'],
269
+ { to: '#api', 'aria-hidden': 'true', tabIndex: -1 },
270
+ l.a.createElement('span', { className: 'icon icon-link' }),
271
+ ),
272
+ 'API',
273
+ ),
274
+ l.a.createElement(
275
+ 'h3',
276
+ { id: 'tag' },
277
+ l.a.createElement(
278
+ r['AnchorLink'],
279
+ { to: '#tag', 'aria-hidden': 'true', tabIndex: -1 },
280
+ l.a.createElement('span', { className: 'icon icon-link' }),
281
+ ),
282
+ 'Tag',
283
+ ),
284
+ l.a.createElement(
285
+ 'table',
286
+ null,
287
+ l.a.createElement(
288
+ 'thead',
289
+ null,
290
+ l.a.createElement(
291
+ 'tr',
292
+ null,
293
+ l.a.createElement('th', null, '\u53c2\u6570'),
294
+ l.a.createElement('th', null, '\u8bf4\u660e'),
295
+ l.a.createElement('th', null, '\u7c7b\u578b'),
296
+ l.a.createElement('th', null, '\u9ed8\u8ba4\u503c'),
297
+ l.a.createElement('th', null, '\u7248\u672c'),
298
+ ),
299
+ ),
300
+ l.a.createElement(
301
+ 'tbody',
302
+ null,
303
+ l.a.createElement(
304
+ 'tr',
305
+ null,
306
+ l.a.createElement('td', null, 'closable'),
307
+ l.a.createElement(
308
+ 'td',
309
+ null,
310
+ '\u6807\u7b7e\u662f\u5426\u53ef\u4ee5\u5173\u95ed\uff08\u70b9\u51fb\u9ed8\u8ba4\u5173\u95ed\uff09',
311
+ ),
312
+ l.a.createElement('td', null, 'boolean'),
313
+ l.a.createElement('td', null, 'false'),
314
+ l.a.createElement('td', null),
315
+ ),
316
+ l.a.createElement(
317
+ 'tr',
318
+ null,
319
+ l.a.createElement('td', null, 'closeIcon'),
320
+ l.a.createElement(
321
+ 'td',
322
+ null,
323
+ '\u81ea\u5b9a\u4e49\u5173\u95ed\u6309\u94ae',
324
+ ),
325
+ l.a.createElement('td', null, 'ReactNode'),
326
+ l.a.createElement('td', null, '-'),
327
+ l.a.createElement('td', null, '4.4.0'),
328
+ ),
329
+ l.a.createElement(
330
+ 'tr',
331
+ null,
332
+ l.a.createElement('td', null, 'color'),
333
+ l.a.createElement('td', null, '\u6807\u7b7e\u8272'),
334
+ l.a.createElement('td', null, 'string'),
335
+ l.a.createElement('td', null, '-'),
336
+ l.a.createElement('td', null),
337
+ ),
338
+ l.a.createElement(
339
+ 'tr',
340
+ null,
341
+ l.a.createElement('td', null, 'icon'),
342
+ l.a.createElement('td', null, '\u8bbe\u7f6e\u56fe\u6807'),
343
+ l.a.createElement('td', null, 'ReactNode'),
344
+ l.a.createElement('td', null, '-'),
345
+ l.a.createElement('td', null),
346
+ ),
347
+ l.a.createElement(
348
+ 'tr',
349
+ null,
350
+ l.a.createElement('td', null, 'visible'),
351
+ l.a.createElement(
352
+ 'td',
353
+ null,
354
+ '\u662f\u5426\u663e\u793a\u6807\u7b7e',
355
+ ),
356
+ l.a.createElement('td', null, 'boolean'),
357
+ l.a.createElement('td', null, 'true'),
358
+ l.a.createElement('td', null),
359
+ ),
360
+ l.a.createElement(
361
+ 'tr',
362
+ null,
363
+ l.a.createElement('td', null, 'onClose'),
364
+ l.a.createElement(
365
+ 'td',
366
+ null,
367
+ '\u5173\u95ed\u65f6\u7684\u56de\u8c03\uff08\u53ef\u901a\u8fc7 ',
368
+ l.a.createElement('code', null, 'e.preventDefault()'),
369
+ ' \u6765\u963b\u6b62\u9ed8\u8ba4\u884c\u4e3a\uff09',
370
+ ),
371
+ l.a.createElement('td', null, '(e) => void'),
372
+ l.a.createElement('td', null, '-'),
373
+ l.a.createElement('td', null),
374
+ ),
375
+ ),
376
+ ),
377
+ l.a.createElement(
378
+ 'h3',
379
+ { id: 'tagcheckabletag' },
380
+ l.a.createElement(
381
+ r['AnchorLink'],
382
+ {
383
+ to: '#tagcheckabletag',
384
+ 'aria-hidden': 'true',
385
+ tabIndex: -1,
386
+ },
387
+ l.a.createElement('span', { className: 'icon icon-link' }),
388
+ ),
389
+ 'Tag.CheckableTag',
390
+ ),
391
+ l.a.createElement(
392
+ 'table',
393
+ null,
394
+ l.a.createElement(
395
+ 'thead',
396
+ null,
397
+ l.a.createElement(
398
+ 'tr',
399
+ null,
400
+ l.a.createElement('th', null, '\u53c2\u6570'),
401
+ l.a.createElement('th', null, '\u8bf4\u660e'),
402
+ l.a.createElement('th', null, '\u7c7b\u578b'),
403
+ l.a.createElement('th', null, '\u9ed8\u8ba4\u503c'),
404
+ ),
405
+ ),
406
+ l.a.createElement(
407
+ 'tbody',
408
+ null,
409
+ l.a.createElement(
410
+ 'tr',
411
+ null,
412
+ l.a.createElement('td', null, 'checked'),
413
+ l.a.createElement(
414
+ 'td',
415
+ null,
416
+ '\u8bbe\u7f6e\u6807\u7b7e\u7684\u9009\u4e2d\u72b6\u6001',
417
+ ),
418
+ l.a.createElement('td', null, 'boolean'),
419
+ l.a.createElement('td', null, 'false'),
420
+ ),
421
+ l.a.createElement(
422
+ 'tr',
423
+ null,
424
+ l.a.createElement('td', null, 'onChange'),
425
+ l.a.createElement(
426
+ 'td',
427
+ null,
428
+ '\u70b9\u51fb\u6807\u7b7e\u65f6\u89e6\u53d1\u7684\u56de\u8c03',
429
+ ),
430
+ l.a.createElement('td', null, '(checked) => void'),
431
+ l.a.createElement('td', null, '-'),
432
+ ),
433
+ ),
434
+ ),
435
+ l.a.createElement('style', {
436
+ dangerouslySetInnerHTML: {
437
+ __html:
438
+ '\n .site-tag-plus {\n background: #fff;\n border-style: dashed;\n }\n .edit-tag {\n user-select: none;\n }\n .tag-input {\n width: 78px;\n margin-right: 8px;\n vertical-align: top;\n }\n',
439
+ },
440
+ }),
441
+ ),
442
+ ),
443
+ )
444
+ );
445
+ },
446
+ MZF8: function (e, t, a) {
447
+ 'use strict';
448
+ var n = a('ogwx');
449
+ a.d(t, 'a', function () {
450
+ return n['b'];
451
+ });
452
+ a('VCU9');
453
+ },
454
+ RZMt: function (e, t, a) {},
455
+ Zxc8: function (e, t, a) {
456
+ 'use strict';
457
+ a.r(t);
458
+ var n = a('q1tI'),
459
+ l = a.n(n),
460
+ r = a('k3GJ'),
461
+ c = a('MZF8'),
462
+ o = a('dEAq'),
463
+ i = a('H1Ra');
464
+ a('RZMt');
465
+ function m(e, t) {
466
+ return f(e) || E(e, t) || u(e, t) || d();
467
+ }
468
+ function d() {
469
+ throw new TypeError(
470
+ 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.',
471
+ );
472
+ }
473
+ function u(e, t) {
474
+ if (e) {
475
+ if ('string' === typeof e) return s(e, t);
476
+ var a = Object.prototype.toString.call(e).slice(8, -1);
477
+ return (
478
+ 'Object' === a && e.constructor && (a = e.constructor.name),
479
+ 'Map' === a || 'Set' === a
480
+ ? Array.from(e)
481
+ : 'Arguments' === a ||
482
+ /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)
483
+ ? s(e, t)
484
+ : void 0
485
+ );
486
+ }
487
+ }
488
+ function s(e, t) {
489
+ (null == t || t > e.length) && (t = e.length);
490
+ for (var a = 0, n = new Array(t); a < t; a++) n[a] = e[a];
491
+ return n;
492
+ }
493
+ function E(e, t) {
494
+ var a =
495
+ null == e
496
+ ? null
497
+ : ('undefined' !== typeof Symbol && e[Symbol.iterator]) ||
498
+ e['@@iterator'];
499
+ if (null != a) {
500
+ var n,
501
+ l,
502
+ r = [],
503
+ c = !0,
504
+ o = !1;
505
+ try {
506
+ for (a = a.call(e); !(c = (n = a.next()).done); c = !0)
507
+ if ((r.push(n.value), t && r.length === t)) break;
508
+ } catch (i) {
509
+ (o = !0), (l = i);
510
+ } finally {
511
+ try {
512
+ c || null == a['return'] || a['return']();
513
+ } finally {
514
+ if (o) throw l;
515
+ }
516
+ }
517
+ return r;
518
+ }
519
+ }
520
+ function f(e) {
521
+ if (Array.isArray(e)) return e;
522
+ }
523
+ function p(e, t) {
524
+ var a,
525
+ n =
526
+ null === (a = e.match(/\.(\w+)$/)) || void 0 === a ? void 0 : a[1];
527
+ return n || (n = t.tsx ? 'tsx' : 'jsx'), n;
528
+ }
529
+ var h = function (e) {
530
+ var t,
531
+ a,
532
+ d,
533
+ u = Object(n['useRef'])(),
534
+ s = Object(n['useContext'])(o['context']),
535
+ E = s.locale,
536
+ f = Object(o['useLocaleProps'])(E, e),
537
+ h = Object(o['useDemoUrl'])(f.identifier),
538
+ b = f.demoUrl || h,
539
+ v =
540
+ (null === c['a'] || void 0 === c['a']
541
+ ? void 0
542
+ : c['a'].location.hash) === '#'.concat(f.identifier),
543
+ g = 1 === Object.keys(f.sources).length,
544
+ k = Object(o['useCodeSandbox'])(
545
+ (
546
+ null === (t = f.hideActions) || void 0 === t
547
+ ? void 0
548
+ : t.includes('CSB')
549
+ )
550
+ ? null
551
+ : f,
552
+ ),
553
+ _ = Object(o['useRiddle'])(
554
+ (
555
+ null === (a = f.hideActions) || void 0 === a
556
+ ? void 0
557
+ : a.includes('RIDDLE')
558
+ )
559
+ ? null
560
+ : f,
561
+ ),
562
+ w = Object(o['useMotions'])(f.motions || [], u.current),
563
+ y = m(w, 2),
564
+ N = y[0],
565
+ x = y[1],
566
+ A = Object(o['useCopy'])(),
567
+ I = m(A, 2),
568
+ j = I[0],
569
+ C = I[1],
570
+ O = Object(n['useState'])('_'),
571
+ L = m(O, 2),
572
+ S = L[0],
573
+ P = L[1],
574
+ R = Object(n['useState'])(p(S, f.sources[S])),
575
+ T = m(R, 2),
576
+ M = T[0],
577
+ Z = T[1],
578
+ U = Object(n['useState'])(Boolean(f.defaultShowCode)),
579
+ J = m(U, 2),
580
+ q = J[0],
581
+ D = J[1],
582
+ F = Object(n['useState'])(Math.random()),
583
+ $ = m(F, 2),
584
+ B = $[0],
585
+ G = $[1],
586
+ H = f.sources[S][M] || f.sources[S].content,
587
+ X = Object(o['useTSPlaygroundUrl'])(E, H),
588
+ K = Object(n['useRef'])(),
589
+ V = Object(o['usePrefersColor'])(),
590
+ z = m(V, 1),
591
+ Q = z[0];
592
+ function W(e) {
593
+ P(e), Z(p(e, f.sources[e]));
594
+ }
595
+ return (
596
+ Object(n['useEffect'])(
597
+ function () {
598
+ G(Math.random());
599
+ },
600
+ [Q],
601
+ ),
602
+ l.a.createElement(
603
+ 'div',
604
+ {
605
+ style: f.style,
606
+ className: [
607
+ f.className,
608
+ '__dumi-default-previewer',
609
+ v ? '__dumi-default-previewer-target' : '',
610
+ ]
611
+ .filter(Boolean)
612
+ .join(' '),
613
+ id: f.identifier,
614
+ 'data-debug': f.debug || void 0,
615
+ 'data-iframe': f.iframe || void 0,
616
+ },
617
+ f.iframe &&
618
+ l.a.createElement('div', {
619
+ className: '__dumi-default-previewer-browser-nav',
620
+ }),
621
+ l.a.createElement(
622
+ 'div',
623
+ {
624
+ ref: u,
625
+ className: '__dumi-default-previewer-demo',
626
+ style: {
627
+ transform: f.transform ? 'translate(0, 0)' : void 0,
628
+ padding:
629
+ f.compact || (f.iframe && !1 !== f.compact) ? '0' : void 0,
630
+ background: f.background,
631
+ },
632
+ },
633
+ f.iframe
634
+ ? l.a.createElement('iframe', {
635
+ title: 'dumi-previewer',
636
+ style: {
637
+ height: String(f.iframe).replace(/(\d)$/, '$1px'),
638
+ },
639
+ key: B,
640
+ src: b,
641
+ ref: K,
642
+ })
643
+ : f.children,
644
+ ),
645
+ l.a.createElement(
646
+ 'div',
647
+ {
648
+ className: '__dumi-default-previewer-desc',
649
+ 'data-title': f.title,
650
+ },
651
+ f.title &&
652
+ l.a.createElement(
653
+ o['AnchorLink'],
654
+ { to: '#'.concat(f.identifier) },
655
+ f.title,
656
+ ),
657
+ f.description &&
658
+ l.a.createElement('div', {
659
+ dangerouslySetInnerHTML: { __html: f.description },
660
+ }),
661
+ ),
662
+ l.a.createElement(
663
+ 'div',
664
+ { className: '__dumi-default-previewer-actions' },
665
+ k &&
666
+ l.a.createElement('button', {
667
+ title: 'Open demo on CodeSandbox.io',
668
+ className: '__dumi-default-icon',
669
+ role: 'codesandbox',
670
+ onClick: k,
671
+ }),
672
+ _ &&
673
+ l.a.createElement('button', {
674
+ title: 'Open demo on Riddle',
675
+ className: '__dumi-default-icon',
676
+ role: 'riddle',
677
+ onClick: _,
678
+ }),
679
+ f.motions &&
680
+ l.a.createElement('button', {
681
+ title: 'Execute motions',
682
+ className: '__dumi-default-icon',
683
+ role: 'motions',
684
+ disabled: x,
685
+ onClick: function () {
686
+ return N();
687
+ },
688
+ }),
689
+ f.iframe &&
690
+ l.a.createElement('button', {
691
+ title: 'Reload demo iframe page',
692
+ className: '__dumi-default-icon',
693
+ role: 'refresh',
694
+ onClick: function () {
695
+ return G(Math.random());
696
+ },
697
+ }),
698
+ !(null === (d = f.hideActions) || void 0 === d
699
+ ? void 0
700
+ : d.includes('EXTERNAL')) &&
701
+ l.a.createElement(
702
+ o['Link'],
703
+ { target: '_blank', to: b },
704
+ l.a.createElement('button', {
705
+ title: 'Open demo in new tab',
706
+ className: '__dumi-default-icon',
707
+ role: 'open-demo',
708
+ type: 'button',
709
+ }),
710
+ ),
711
+ l.a.createElement('span', null),
712
+ l.a.createElement('button', {
713
+ title: 'Copy source code',
714
+ className: '__dumi-default-icon',
715
+ role: 'copy',
716
+ 'data-status': C,
717
+ onClick: function () {
718
+ return j(H);
719
+ },
720
+ }),
721
+ 'tsx' === M &&
722
+ q &&
723
+ l.a.createElement(
724
+ o['Link'],
725
+ { target: '_blank', to: X },
726
+ l.a.createElement('button', {
727
+ title: 'Get JSX via TypeScript Playground',
728
+ className: '__dumi-default-icon',
729
+ role: 'change-tsx',
730
+ type: 'button',
731
+ }),
732
+ ),
733
+ l.a.createElement('button', {
734
+ title: 'Toggle source code panel',
735
+ className: '__dumi-default-icon'.concat(
736
+ q ? ' __dumi-default-btn-expand' : '',
737
+ ),
738
+ role: 'source',
739
+ type: 'button',
740
+ onClick: function () {
741
+ return D(!q);
742
+ },
743
+ }),
744
+ ),
745
+ q &&
746
+ l.a.createElement(
747
+ 'div',
748
+ { className: '__dumi-default-previewer-source-wrapper' },
749
+ !g &&
750
+ l.a.createElement(
751
+ r['b'],
752
+ {
753
+ className: '__dumi-default-previewer-source-tab',
754
+ prefixCls: '__dumi-default-tabs',
755
+ moreIcon: '\xb7\xb7\xb7',
756
+ defaultActiveKey: S,
757
+ onChange: W,
758
+ },
759
+ Object.keys(f.sources).map(function (e) {
760
+ return l.a.createElement(r['a'], {
761
+ tab:
762
+ '_' === e ? 'index.'.concat(p(e, f.sources[e])) : e,
763
+ key: e,
764
+ });
765
+ }),
766
+ ),
767
+ l.a.createElement(
768
+ 'div',
769
+ { className: '__dumi-default-previewer-source' },
770
+ l.a.createElement(i['a'], { code: H, lang: M, showCopy: !1 }),
771
+ ),
772
+ ),
773
+ )
774
+ );
775
+ };
776
+ t['default'] = h;
777
+ },
778
+ },
779
+ ]);