diff --git a/iframe.html b/iframe.html index 40ec1df..0c15926 100644 --- a/iframe.html +++ b/iframe.html @@ -338,7 +338,7 @@ /* eslint-enable object-shorthand */ }) ); - };

No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file + window['STORIES'] = [{"titlePrefix":"","directory":"./src/components","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src\\/components(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src/components","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src\\/components(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}]; \ No newline at end of file diff --git a/main.d51aaf11.iframe.bundle.js b/main.7f23103e.iframe.bundle.js similarity index 58% rename from main.d51aaf11.iframe.bundle.js rename to main.7f23103e.iframe.bundle.js index a8f8b3c..d11210e 100644 --- a/main.d51aaf11.iframe.bundle.js +++ b/main.7f23103e.iframe.bundle.js @@ -1 +1 @@ -(self.webpackChunkjadedui=self.webpackChunkjadedui||[]).push([[179],{"./node_modules/nested-object-assign/lib sync recursive ^\\.\\/.*$":function(module,__unused_webpack_exports,__webpack_require__){var map={"./nestedObjectAssign":"./node_modules/nested-object-assign/lib/nestedObjectAssign.js","./nestedObjectAssign.js":"./node_modules/nested-object-assign/lib/nestedObjectAssign.js"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./node_modules/nested-object-assign/lib sync recursive ^\\.\\/.*$"},"./src/components/Alert/alert.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),defineProperty=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),objectWithoutProperties=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["type","closable","onClose","description","closeText","message","className"],Alert=function Alert(props){var _props$type=props.type,type=void 0===_props$type?"success":_props$type,_props$closable=props.closable,closable=void 0!==_props$closable&&_props$closable,_props$onClose=props.onClose,onClose=void 0===_props$onClose?function(){return{}}:_props$onClose,description=props.description,_props$closeText=props.closeText,closeText=void 0===_props$closeText?"x":_props$closeText,message=props.message,cusClassname=props.className,restprops=(0,objectWithoutProperties.Z)(props,_excluded),_React$useState=react.useState(classnames_default()(cusClassname,"dui-alert",(0,defineProperty.Z)({},"dui-alert-".concat(type),!0))),_React$useState2=(0,slicedToArray.Z)(_React$useState,2),classNames=_React$useState2[0],setClassNames=_React$useState2[1],messageClassNames=classnames_default()((0,defineProperty.Z)({},"dui-alert-message-with-description",description&&message));return(0,jsx_runtime.jsxs)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({className:classNames},restprops),{},{children:[(0,jsx_runtime.jsxs)("div",{className:"dui-alert-content",children:[(0,jsx_runtime.jsx)("div",{className:"".concat(messageClassNames," dui-alert-message"),children:message}),(0,jsx_runtime.jsx)("div",{className:"dui-alert-description",children:description})]}),closable&&(0,jsx_runtime.jsx)("div",{className:"dui-alert-close",onClick:function onClick(){return function onCloseHandle(){onClose(),setClassNames(classnames_default()(classNames,"dui-alert-close-transition")),setTimeout((function(){setClassNames(classnames_default()(classNames,"dui-alert-transition-end"))}),500)}()},children:closeText})]}))},components_Alert=Alert;try{Alert.displayName="Alert",Alert.__docgenInfo={description:"警告提示,展现需要关注的信息\n### 引用方法\n\n~~~js\nimport { Alert } from 'jadedui'\n~~~",displayName:"Alert",props:{type:{defaultValue:null,description:"alert类型",name:"type",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"info"'},{value:'"warning"'},{value:'"error"'}]}},closable:{defaultValue:null,description:"",name:"closable",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"是否禁用",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},message:{defaultValue:null,description:"alert文案",name:"message",required:!1,type:{name:"ReactNode"}},description:{defaultValue:null,description:"alert相关描述",name:"description",required:!1,type:{name:"ReactNode"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}},closeText:{defaultValue:null,description:"alert关闭节点",name:"closeText",required:!1,type:{name:"ReactNode"}},onClose:{defaultValue:null,description:"alert关闭回调",name:"onClose",required:!1,type:{name:"(() => void)"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Alert/index.tsx#Alert"]={docgenInfo:Alert.__docgenInfo,name:"Alert",path:"src/components/Alert/index.tsx#Alert"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Alert警告提示",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\n\nimport Alert from "./index";\n\nconst defaultAlert = () => ;\n\nconst alertWithType = () => (\n <>\n \n \n \n \n);\n\nconst alertWithDesc = () => (\n \n);\n\nstoriesOf("Alert警告提示", module)\n .add("Alert", defaultAlert)\n .add("不同类型的Alert", alertWithType)\n .add("带有描述和关闭的Alert", alertWithDesc);\n',locationsMap:{"带有描述和关闭的alert":{startLoc:{col:7,line:30},endLoc:{col:37,line:30},startBody:{col:24,line:30},endBody:{col:37,line:30}},"不同类型的alert":{startLoc:{col:7,line:29},endLoc:{col:34,line:29},startBody:{col:21,line:29},endBody:{col:34,line:29}},alert:{startLoc:{col:7,line:28},endLoc:{col:28,line:28},startBody:{col:16,line:28},endBody:{col:28,line:28}}}}}).add("Alert",(function defaultAlert(){return(0,jsx_runtime.jsx)(components_Alert,{message:"哈哈哈哈"})})).add("不同类型的Alert",(function alertWithType(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_Alert,{type:"info",message:"info"}),(0,jsx_runtime.jsx)(components_Alert,{type:"warning",message:"warning"}),(0,jsx_runtime.jsx)(components_Alert,{type:"error",message:"error"})]})})).add("带有描述和关闭的Alert",(function alertWithDesc(){return(0,jsx_runtime.jsx)(components_Alert,{type:"error",message:"description",description:"我是一段描述~~~",closable:!0,closeText:"关闭"})}))},"./src/components/AutoComplete/autoComplete.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),objectWithoutProperties=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),Input=__webpack_require__("./src/components/Input/index.tsx"),CSSTransition=__webpack_require__("./node_modules/react-transition-group/esm/CSSTransition.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["children","className","animation"],Transition=function Transition(props){var children=props.children,className=props.className,animation=props.animation,restProps=(0,objectWithoutProperties.Z)(props,_excluded);return(0,jsx_runtime.jsx)(CSSTransition.Z,(0,objectSpread2.Z)((0,objectSpread2.Z)({classNames:className||animation},restProps),{},{children:(0,jsx_runtime.jsx)("div",{children:children})}))};Transition.defaultProps={unmountOnExit:!0,appear:!0};var components_Transition=Transition;try{Transition.displayName="Transition",Transition.__docgenInfo={description:"",displayName:"Transition",props:{classNames:{defaultValue:null,description:"The animation `classNames` applied to the component as it enters or exits.\nA single name can be provided and it will be suffixed for each stage: e.g.\n\n`classNames=\"fade\"` applies `fade-enter`, `fade-enter-active`,\n`fade-exit`, `fade-exit-active`, `fade-appear`, and `fade-appear-active`.\n\nEach individual classNames can also be specified independently like:\n\n```js\nclassNames={{\n appear: 'my-appear',\n appearActive: 'my-appear-active',\n appearDone: 'my-appear-done',\n enter: 'my-enter',\n enterActive: 'my-enter-active',\n enterDone: 'my-enter-done',\n exit: 'my-exit',\n exitActive: 'my-exit-active',\n exitDone: 'my-exit-done'\n}}\n```",name:"classNames",required:!1,type:{name:"string | CSSTransitionClassNames"}},animation:{defaultValue:null,description:"",name:"animation",required:!1,type:{name:"enum",value:[{value:'"zoom-in-top"'},{value:'"zoom-in-left"'},{value:'"zoom-in-bottom"'},{value:'"zoom-in-right"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Transition/index.tsx#Transition"]={docgenInfo:Transition.__docgenInfo,name:"Transition",path:"src/components/Transition/index.tsx#Transition"})}catch(__react_docgen_typescript_loader_error){}var hooks_useDebounce=function useDebounce(value){var delay=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,_useState=(0,react.useState)(value),_useState2=(0,slicedToArray.Z)(_useState,2),debouncedValue=_useState2[0],setDebouncedValue=_useState2[1];return(0,react.useEffect)((function(){var handler=window.setTimeout((function(){setDebouncedValue(value)}),delay);return function(){clearTimeout(handler)}}),[value,delay]),debouncedValue};var hooks_useClickOutside=function useClickOutside(ref,handler){(0,react.useEffect)((function(){var listener=function listener(event){ref.current&&!ref.current.contains(event.target)&&handler(event)};return document.addEventListener("click",listener),function(){document.removeEventListener("click",listener)}}),[ref,handler])},IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),autoComplete_excluded=["fetchSuggestions","onSelect","value","renderOption"],AutoComplete_autoComplete=function AutoComplete(props){var fetchSuggestions=props.fetchSuggestions,onSelect=props.onSelect,value=props.value,renderOption=props.renderOption,restProps=(0,objectWithoutProperties.Z)(props,autoComplete_excluded),_useState=(0,react.useState)(value),_useState2=(0,slicedToArray.Z)(_useState,2),inputValue=_useState2[0],setInputValue=_useState2[1],_useState3=(0,react.useState)([]),_useState4=(0,slicedToArray.Z)(_useState3,2),suggestions=_useState4[0],setSugestions=_useState4[1],_useState5=(0,react.useState)(!1),_useState6=(0,slicedToArray.Z)(_useState5,2),showDropdown=_useState6[0],setShowDropdown=_useState6[1],triggerSearch=(0,react.useRef)(!1),_useState7=(0,react.useState)(!1),_useState8=(0,slicedToArray.Z)(_useState7,2),loading=_useState8[0],setLoading=_useState8[1],_useState9=(0,react.useState)(-1),_useState10=(0,slicedToArray.Z)(_useState9,2),highlightIndex=_useState10[0],setHighlightIndex=_useState10[1],componentRef=(0,react.useRef)(null),debouncedValue=hooks_useDebounce(inputValue,300);hooks_useClickOutside(componentRef,(function(){setShowDropdown(!1),setSugestions([])})),(0,react.useEffect)((function(){if(debouncedValue&&triggerSearch.current){setSugestions([]);var results=fetchSuggestions(debouncedValue);results instanceof Promise?(setLoading(!0),results.then((function(data){setLoading(!1),setSugestions(data),data.length>0&&setShowDropdown(!0)}))):(setSugestions(results),setShowDropdown(!0),results.length>0&&setShowDropdown(!0))}else setShowDropdown(!1);setHighlightIndex(-1)}),[debouncedValue,fetchSuggestions]);var handleSelect=function handleSelect(item){setInputValue(item.value),setShowDropdown(!1),onSelect&&onSelect(item),triggerSearch.current=!1},renderTemplate=function renderTemplate(item){return renderOption?renderOption(item):item.value},highlight=function highlight(index){index<0&&(index=0),index>=suggestions.length&&(index=suggestions.length-1),setHighlightIndex(index)};return(0,jsx_runtime.jsxs)("div",{className:"dui-auto-complete",ref:componentRef,children:[(0,jsx_runtime.jsx)(Input.Z,(0,objectSpread2.Z)({value:inputValue,onChange:function handleChange(e){var value=e.target.value.trim();setInputValue(value),triggerSearch.current=!0},onKeyDown:function handleKeyDown(e){switch(e.keyCode){case 13:suggestions[highlightIndex]&&handleSelect(suggestions[highlightIndex]);break;case 38:highlight(highlightIndex-1);break;case 40:highlight(highlightIndex+1);break;case 27:setShowDropdown(!1)}}},restProps)),function generateDropdown(){return(0,jsx_runtime.jsx)(components_Transition,{in:showDropdown||loading,animation:"zoom-in-top",timeout:300,onExited:function onExited(){setSugestions([])},children:(0,jsx_runtime.jsxs)("ul",{className:"dui-suggestion-list",children:[loading&&(0,jsx_runtime.jsx)("div",{className:"suggstions-loading-icon",children:(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-loading",spin:!0})}),null==suggestions?void 0:suggestions.map((function(item,index){var cnames=classnames_default()("suggestion-item",{"is-active":index===highlightIndex});return(0,jsx_runtime.jsx)("li",{className:cnames,onClick:function onClick(){return handleSelect(item)},children:renderTemplate(item)},index)}))]})})}()]})};try{autoComplete.displayName="autoComplete",autoComplete.__docgenInfo={description:"",displayName:"autoComplete",props:{fetchSuggestions:{defaultValue:null,description:"",name:"fetchSuggestions",required:!0,type:{name:"(str: string) => DataSourceType>[] | Promise>[]>"}},onSelect:{defaultValue:null,description:"",name:"onSelect",required:!1,type:{name:"((item: DataSourceType>) => void)"}},renderOption:{defaultValue:null,description:"",name:"renderOption",required:!1,type:{name:"((item: DataSourceType>) => ReactElement>)"}},disabled:{defaultValue:null,description:"是否禁用 Input",name:"disabled",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"设置 input 大小,支持 lg 或者是 sm",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"sm"'}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((e: ChangeEvent) => void)"}},icon:{defaultValue:null,description:"添加图标,在右侧悬浮添加一个图标,用于提示",name:"icon",required:!1,type:{name:"ReactNode"}},prepend:{defaultValue:null,description:"添加前缀 用于配置一些固定组合",name:"prepend",required:!1,type:{name:"string | ReactElement>"}},append:{defaultValue:null,description:"添加后缀 用于配置一些固定组合",name:"append",required:!1,type:{name:"string | ReactElement>"}},allowClear:{defaultValue:null,description:"是否允许清除",name:"allowClear",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/AutoComplete/autoComplete.tsx#autoComplete"]={docgenInfo:autoComplete.__docgenInfo,name:"autoComplete",path:"src/components/AutoComplete/autoComplete.tsx#autoComplete"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("AutoComplete自动完成",module).addParameters({storySource:{source:"import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport { action } from \"@storybook/addon-actions\";\nimport AutoComplete from \"./autoComplete\";\n// interface LakerPlayerProps {\n// value: string;\n// number: number;\n// }\n// interface GithubUserProps {\n// login: string;\n// url: string;\n// avatar_url: string;\n// }\nconst SimpleComplete = () => {\n // const lakers = ['bradley', 'pope', 'caruso', 'cook', 'cousins',\n // 'james', 'AD', 'green', 'howard', 'kuzma', 'McGee', 'rando']\n // const lakersWithNumber = [\n // {value: 'bradley', number: 11},\n // {value: 'pope', number: 1},\n // {value: 'caruso', number: 4},\n // {value: 'cook', number: 2},\n // {value: 'cousins', number: 15},\n // {value: 'james', number: 23},\n // {value: 'AD', number: 3},\n // {value: 'green', number: 14},\n // {value: 'howard', number: 39},\n // {value: 'kuzma', number: 0},\n // ]\n // const handleFetch = (query: string) => {\n // return lakers.filter(name => name.includes(query)).map(name => ({value: name}))\n // }\n // const handleFetch = (query: string) => {\n // return lakersWithNumber.filter(player => player.value.includes(query))\n // }\n const handleFetch = (query: string) => {\n return fetch(`https://api.github.com/search/users?q=${query}`)\n .then((res) => res.json())\n .then(({ items }) => {\n console.log(items);\n return items\n .slice(0, 10)\n .map((item: any) => ({ value: item.login, ...item }));\n });\n };\n\n // const renderOption = (item: DataSourceType) => {\n // const itemWithGithub = item as DataSourceType\n // return (\n // <>\n //

Name: {itemWithGithub.value}

\n //

url: {itemWithGithub.url}

\n // \n // )\n // }\n return (\n \n );\n};\n\nstoriesOf(\"AutoComplete自动完成\", module).add(\"AutoComplete\", SimpleComplete);\n",locationsMap:{autocomplete:{startLoc:{col:42,line:64},endLoc:{col:72,line:64},startBody:{col:58,line:64},endBody:{col:72,line:64}}}}}).add("AutoComplete",(function SimpleComplete(){return(0,jsx_runtime.jsx)(AutoComplete_autoComplete,{fetchSuggestions:function handleFetch(query){return fetch("https://api.github.com/search/users?q=".concat(query)).then((function(res){return res.json()})).then((function(_ref){var items=_ref.items;return console.log(items),items.slice(0,10).map((function(item){return(0,objectSpread2.Z)({value:item.login},item)}))}))},onSelect:(0,esm.action)("selected")})}))},"./src/components/BackTop/backtop.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),BackTop=function BackTop(props){var children=props.children,_props$duration=props.duration,duration=void 0===_props$duration?450:_props$duration,onClick=props.onClick,_props$visibilityHeig=props.visibilityHeight,visibilityHeight=void 0===_props$visibilityHeig?400:_props$visibilityHeig,_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),visibile=_useState2[0],setVisibile=_useState2[1],classNames=classnames_default()("dui-back-top",{"dui-back-top-show":visibile});if(children&&!react.isValidElement(children))throw new TypeError("BackTop's Children must be a valid element");var handleScroll=function handleScroll(){var top=getTopScroll();setVisibile(top>visibilityHeight)},getTopScroll=function getTopScroll(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},removeScorllListener=function removeScorllListener(){return window.removeEventListener("scroll",handleScroll)},easeInOutQuad=function easeInOutQuad(t){return t<.5?2*t*t:(4-2*t)*t-1};return(0,react.useEffect)((function(){return function addScorllListener(){window.addEventListener("scroll",handleScroll)}(),removeScorllListener}),[]),(0,jsx_runtime.jsx)("div",{className:classNames,onClick:function backTopHandle(){onClick&&onClick(),function scrollToTop(duration){var start,startingY=getTopScroll(),diff=-1*startingY;window.requestAnimationFrame((function step(timestamp){start||(start=timestamp);var time=timestamp-start,percent=Math.min(time/duration,1),eased=easeInOutQuad(percent);window.scrollTo(0,startingY+diff*eased),time void)"}},style:{defaultValue:null,description:"自定义样式",name:"style",required:!1,type:{name:"CSSProperties"}},className:{defaultValue:null,description:"自定义类名",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/BackTop/index.tsx#BackTop"]={docgenInfo:BackTop.__docgenInfo,name:"BackTop",path:"src/components/BackTop/index.tsx#BackTop"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("BackTop 回到顶部",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport BackTop from "./index";\n\n\nconst defaultBackTop = () => {\n return
\n
滑动试试
\n
滑动试试
\n \n
\n}\n\nstoriesOf("BackTop 回到顶部", module)\n .add("BackTop", defaultBackTop)\n',locationsMap:{backtop:{startLoc:{col:7,line:15},endLoc:{col:32,line:15},startBody:{col:18,line:15},endBody:{col:32,line:15}}}}}).add("BackTop",(function defaultBackTop(){return(0,jsx_runtime.jsxs)("div",{style:{height:"50vh"},children:[(0,jsx_runtime.jsx)("div",{children:"滑动试试"}),(0,jsx_runtime.jsx)("div",{children:"滑动试试"}),(0,jsx_runtime.jsx)(components_BackTop,{})]})}))},"./src/components/Button/button.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var _storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_index__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Button/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Button按钮",module).addParameters({storySource:{source:'// import React from "react";\n// import { ComponentStory, ComponentMeta } from "@storybook/react";\n\n// import Button from "./index";\n\n// // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export\n// export default {\n// title: "Example/Button",\n// component: Button,\n// // More on argTypes: https://storybook.js.org/docs/react/api/argtypes\n// // argTypes: {\n// // backgroundColor: { control: "color" },\n// // },\n// } as ComponentMeta;\n\n// // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args\n// const Template: ComponentStory = (args) => \n);\n\n// const buttonWithSize = () => ;\nconst buttonWithSize = () => (\n <>\n \n \n \n);\n\nconst buttonWithType = () => (\n <>\n \n \n \n \n);\n\nstoriesOf("Button按钮", module)\n // .addDecorator(withInfo)\n // .addParameters({\n // info:{\n // inline: true\n // }\n // })\n .add("Button", defaultButton)\n .add("不同尺寸的Button", buttonWithSize)\n .add("不同类型的Button", buttonWithType);\n',locationsMap:{"不同类型的button":{startLoc:{col:7,line:72},endLoc:{col:36,line:72},startBody:{col:22,line:72},endBody:{col:36,line:72}},"不同尺寸的button":{startLoc:{col:7,line:71},endLoc:{col:36,line:71},startBody:{col:22,line:71},endBody:{col:36,line:71}},button:{startLoc:{col:7,line:70},endLoc:{col:30,line:70},startBody:{col:17,line:70},endBody:{col:30,line:70}}}}}).add("Button",(function defaultButton(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{onClick:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__.action)("clicked"),children:" default button "})})).add("不同尺寸的Button",(function buttonWithSize(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{size:"small",children:" small button "}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{size:"large",children:" large button "})]})})).add("不同类型的Button",(function buttonWithType(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",children:" primary button "}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{danger:!0,children:" danger button "}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"link",children:" link button "})]})}))},"./src/components/Carousel/carousel.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),image1=__webpack_require__("./src/assets/image1.webp"),image2_namespaceObject=__webpack_require__.p+"58fba7e86cc2750f7f6a.webp",image3_namespaceObject=__webpack_require__.p+"81147bba5443662412b3.webp",slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Carousel=react.forwardRef((function(props,ref){var children=props.children,autoplay=props.autoplay,_props$easing=props.easing,easing=void 0===_props$easing?"linear":_props$easing,_props$dots=props.dots,dots=void 0===_props$dots||_props$dots,_props$arrows=props.arrows,arrows=void 0!==_props$arrows&&_props$arrows,_useState=(0,react.useState)(0),_useState2=(0,slicedToArray.Z)(_useState,2),active=_useState2[0],setActive=_useState2[1],activeRef=(0,react.useRef)(active);(0,react.useImperativeHandle)(ref,(function(){return{next:onNextHandle,prev:onPrevHandle,moveTo:moveTo}}));var renderChildren=react.Children.map(react.Children.map(children,(function(child){return child})),(function(child){var newChild=child;return react.cloneElement(newChild,{className:"dui-carousel-item"})}));(0,react.useEffect)((function(){activeRef.current=active}),[active]),(0,react.useEffect)((function(){if(react.Children.count(renderChildren)>1&&autoplay){var timer=setInterval((function(){onNextHandle()}),5e3);return function(){return clearInterval(timer)}}}),[]);var classes=classnames_default()("dui-carousel"),moveTo=function moveTo(index){var element=document.querySelector(".dui-carousel-container"),elementItem=document.querySelectorAll(".dui-carousel-item");element.style.transform="translate(-".concat(index,"00%)"),element.style.transition="all .5s ".concat(easing),setTimeout((function(){elementItem[elementItem.length-1].style.transform="none",elementItem[0].style.transform="none"}),500),setActive(index)},changeStyleHandle=function changeStyleHandle(type){var element=document.querySelector(".dui-carousel-container"),elementItem=document.querySelectorAll(".dui-carousel-item");("prev"===type?elementItem[0]:elementItem[elementItem.length-1]).style.transform="prev"===type?"translate(".concat(elementItem.length,"00%)"):"translate(-".concat(elementItem.length,"00%)"),element.style.transform="prev"===type?"translate(-".concat(elementItem.length,"00%)"):"translate(".concat(elementItem.length-activeRef.current,"00%)"),element.style.transition="none",element.clientHeight,moveTo("prev"===type?elementItem.length-1:0)},onPrevHandle=function onPrevHandle(){0===active?changeStyleHandle("prev"):moveTo(active-1)},onNextHandle=function onNextHandle(){var elementItem=document.querySelectorAll(".dui-carousel-item");activeRef.current===elementItem.length-1?changeStyleHandle("next"):moveTo(activeRef.current+1)};return(0,jsx_runtime.jsxs)("div",{className:classes,children:[(0,jsx_runtime.jsx)("div",{className:"dui-carousel-container",children:renderChildren}),react.Children.count(renderChildren)>1?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[dots?(0,jsx_runtime.jsx)("div",{className:"dui-carousel-indicator",children:function renderIndicator(){return null==renderChildren?void 0:renderChildren.map((function(_indicator,index){return(0,jsx_runtime.jsx)("span",{className:classnames_default()({"dui-carousel-indicator-active":active===index}),onClick:function onClick(){return moveTo(index)}},index)}))}()}):null,arrows?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"dui-carousel-prev",onClick:onPrevHandle,children:"<"}),(0,jsx_runtime.jsx)("div",{className:"dui-carousel-next",onClick:onNextHandle,children:">"})]}):null]}):null]})})),components_Carousel=Carousel;try{Carousel.displayName="Carousel",Carousel.__docgenInfo={description:"",displayName:"Carousel",props:{autoplay:{defaultValue:null,description:"是否自动播放",name:"autoplay",required:!1,type:{name:"boolean"}},easing:{defaultValue:null,description:"播放速率",name:"easing",required:!1,type:{name:"enum",value:[{value:'"linear"'},{value:'"ease"'},{value:'"ease-in"'},{value:'"ease-in-out"'},{value:'"ease-out"'}]}},dots:{defaultValue:null,description:"是否显示指示点 子节点为1时不生效",name:"dots",required:!1,type:{name:"boolean"}},arrows:{defaultValue:null,description:"是否显示左右箭头",name:"arrows",required:!1,type:{name:"boolean"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"Ref"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Carousel/index.tsx#Carousel"]={docgenInfo:Carousel.__docgenInfo,name:"Carousel",path:"src/components/Carousel/index.tsx#Carousel"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Carousel轮播",module).addParameters({storySource:{source:'import React, { useRef } from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\nimport image1 from "../../assets/image1.webp";\nimport image2 from "../../assets/image2.webp";\nimport image3 from "../../assets/image3.webp";\n\nimport Carousel from "./index";\nimport { CarouselRefProps } from "./index";\n\nconst defaultCarousel = () => (\n
\n \n image1\n image2\n image3\n \n
\n);\n\nconst autoWithArrowsCarousel = () => (\n
\n \n image1\n image2\n image3\n \n
\n);\n\nconst refsWithCarousel = () => {\n const myref = useRef(null);\n const handle = () => {\n console.log("myref", myref);\n if (myref && myref.current) {\n myref?.current?.moveTo(1);\n }\n };\n return (\n
\n \n {/* SDASD */}\n {/**SDASD */}\n \n image1\n image2\n image3\n {null}\n {undefined}\n \n
\n );\n};\n\nstoriesOf("Carousel轮播", module)\n .add("Carousel", defaultCarousel)\n .add("带箭头和autoplay的Carousel", autoWithArrowsCarousel)\n .add("通过ref控制Carousel", refsWithCarousel);\n',locationsMap:{"通过ref控制carousel":{startLoc:{col:7,line:58},endLoc:{col:42,line:58},startBody:{col:26,line:58},endBody:{col:42,line:58}},"带箭头和autoplay的carousel":{startLoc:{col:7,line:57},endLoc:{col:54,line:57},startBody:{col:32,line:57},endBody:{col:54,line:57}},carousel:{startLoc:{col:7,line:56},endLoc:{col:34,line:56},startBody:{col:19,line:56},endBody:{col:34,line:56}}}}}).add("Carousel",(function defaultCarousel(){return(0,jsx_runtime.jsx)("div",{style:{width:"50%"},children:(0,jsx_runtime.jsxs)(components_Carousel,{children:[(0,jsx_runtime.jsx)("img",{src:image1,alt:"image1"}),(0,jsx_runtime.jsx)("img",{src:image2_namespaceObject,alt:"image2"}),(0,jsx_runtime.jsx)("img",{src:image3_namespaceObject,alt:"image3"})]})})})).add("带箭头和autoplay的Carousel",(function autoWithArrowsCarousel(){return(0,jsx_runtime.jsx)("div",{style:{width:"50%"},children:(0,jsx_runtime.jsxs)(components_Carousel,{autoplay:!0,arrows:!0,children:[(0,jsx_runtime.jsx)("img",{src:image1,alt:"image1"}),(0,jsx_runtime.jsx)("img",{src:image2_namespaceObject,alt:"image2"}),(0,jsx_runtime.jsx)("img",{src:image3_namespaceObject,alt:"image3"})]})})})).add("通过ref控制Carousel",(function refsWithCarousel(){var myref=(0,react.useRef)(null);return(0,jsx_runtime.jsxs)("div",{style:{width:"50%"},children:[(0,jsx_runtime.jsx)("button",{onClick:function handle(){var _myref$current;(console.log("myref",myref),myref&&myref.current)&&(null==myref||null===(_myref$current=myref.current)||void 0===_myref$current||_myref$current.moveTo(1))},children:"移动到第二张图片"}),(0,jsx_runtime.jsxs)(components_Carousel,{ref:myref,arrows:!0,children:[(0,jsx_runtime.jsx)("img",{src:image1,alt:"image1"}),(0,jsx_runtime.jsx)("img",{src:image2_namespaceObject,alt:"image2"}),(0,jsx_runtime.jsx)("img",{src:image3_namespaceObject,alt:"image3"}),null,void 0]})]})}))},"./src/components/Divider/divider.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),defineProperty=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Divider=function Divider(props){var _props$type=props.type,type=void 0===_props$type?"horizontal":_props$type,children=props.children,dashed=props.dashed,plain=props.plain,orientation=props.orientation,classNames=classnames_default()("dui-divider","dui-divider-".concat(type),(0,defineProperty.Z)({},"ant-divider-with-text-".concat(orientation),"horizontal"==type),{"dui-divider-dashed":dashed&&"horizontal"==type},{"dui-divider-plain":plain&&"horizontal"==type});return"vertical"===type&&children&&console.warn("children not working in vertical mode"),(0,jsx_runtime.jsx)("div",{className:classNames,children:"vertical"===type?null:children?(0,jsx_runtime.jsx)("span",{className:"ant-divider-inner-text",children:children}):null})};Divider.defaultProps={plain:!1,orientation:"center",type:"horizontal",dashed:!1};var components_Divider=Divider;try{Divider.displayName="Divider",Divider.__docgenInfo={description:"Divider 分割线\n区隔内容的分割线。\n### 引用方法\n\n~~~js\nimport { Divider } from 'jadedui'\n~~~",displayName:"Divider",props:{className:{defaultValue:null,description:"分割线样式类",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"分割线样式对象",name:"style",required:!1,type:{name:"CSSProperties"}},plain:{defaultValue:{value:"false"},description:"文字是否显示为普通正文样式",name:"plain",required:!1,type:{name:"boolean"}},dashed:{defaultValue:{value:"false"},description:"是否虚线",name:"dashed",required:!1,type:{name:"boolean"}},orientation:{defaultValue:{value:"center"},description:"分割线标题的位置",name:"orientation",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"right"'},{value:'"center"'}]}},type:{defaultValue:{value:"horizontal"},description:"水平还是垂直类型",name:"type",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Divider/index.tsx#Divider"]={docgenInfo:Divider.__docgenInfo,name:"Divider",path:"src/components/Divider/index.tsx#Divider"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Divider 分割线",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n\nimport Divider from "./index";\n\nconst defaultDivider = () => (\n <>\n Text\n 我是一段文本\n \n 我是一段文本\n \n);\n\nconst plainTextDivider = () => Text;\n\nconst textOrientation = () => (\n <>\n \n Text\n \n 我是一段文本\n \n Text\n \n \n);\n\nconst verticalDivider = () => (\n <>\n Text\n \n Link\n \n Link\n \n);\n\nstoriesOf("Divider 分割线", module)\n .add("默认分割线", defaultDivider)\n .add("普通文本", plainTextDivider)\n .add("文字对齐", textOrientation)\n .add("垂直方向", verticalDivider);\n',locationsMap:{"垂直方向":{startLoc:{col:7,line:43},endLoc:{col:30,line:43},startBody:{col:15,line:43},endBody:{col:30,line:43}},"文字对齐":{startLoc:{col:7,line:42},endLoc:{col:30,line:42},startBody:{col:15,line:42},endBody:{col:30,line:42}},"普通文本":{startLoc:{col:7,line:41},endLoc:{col:31,line:41},startBody:{col:15,line:41},endBody:{col:31,line:41}},"默认分割线":{startLoc:{col:7,line:40},endLoc:{col:30,line:40},startBody:{col:16,line:40},endBody:{col:30,line:40}}}}}).add("默认分割线",(function defaultDivider(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_Divider,{children:"Text"}),(0,jsx_runtime.jsx)("span",{children:"我是一段文本"}),(0,jsx_runtime.jsx)(components_Divider,{}),(0,jsx_runtime.jsx)("span",{children:"我是一段文本"})]})})).add("普通文本",(function plainTextDivider(){return(0,jsx_runtime.jsx)(components_Divider,{plain:!0,children:"Text"})})).add("文字对齐",(function textOrientation(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_Divider,{plain:!0,orientation:"left",children:"Text"}),(0,jsx_runtime.jsx)("span",{children:"我是一段文本"}),(0,jsx_runtime.jsx)(components_Divider,{plain:!0,orientation:"right",children:"Text"})]})})).add("垂直方向",(function verticalDivider(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Text",(0,jsx_runtime.jsx)(components_Divider,{type:"vertical"}),(0,jsx_runtime.jsx)("a",{href:"#",children:"Link"}),(0,jsx_runtime.jsx)(components_Divider,{type:"vertical"}),(0,jsx_runtime.jsx)("a",{href:"#",children:"Link"})]})}))},"./src/components/Empty/empty.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),image1=__webpack_require__("./src/assets/image1.webp"),IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Empty=function Empty(props){var _props$description=props.description,description=void 0===_props$description?"暂无数据":_props$description,image=props.image,imageStyle=props.imageStyle;return(0,jsx_runtime.jsxs)("div",{className:"dui-empty",style:imageStyle,children:[(0,jsx_runtime.jsx)("div",{className:"dui-empty-image",children:function renderEmptImage(){return image?"string"==typeof image?(0,jsx_runtime.jsx)("img",{src:image,alt:"No data"}):image:(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-zanwushuju1",style:{fontSize:"xxx-large"}})}()}),(0,jsx_runtime.jsx)("div",{className:"ant-empty-description",children:description})]})};Empty.defaultProps={description:"暂无数据"};var components_Empty=Empty;try{Empty.displayName="Empty",Empty.__docgenInfo={description:"Empty 空状态时的展示占位图\n\n当目前没有数据时,用于显式的用户提示\n初始化场景时的引导创建流程\n\n~~~js\n// 这样引用\nimport { Empty } from 'jadedui'\n~~~",displayName:"Empty",props:{description:{defaultValue:{value:"暂无数据"},description:"自定义描述内容",name:"description",required:!1,type:{name:"string"}},image:{defaultValue:null,description:"设置显示图片,为 string 时表示自定义图片地址。",name:"image",required:!1,type:{name:"ReactNode"}},imageStyle:{defaultValue:null,description:"图片样式",name:"imageStyle",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Empty/index.tsx#Empty"]={docgenInfo:Empty.__docgenInfo,name:"Empty",path:"src/components/Empty/index.tsx#Empty"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Empty空状态",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport image from "../../assets/image1.webp";\nimport Empty from "./index";\n\nconst EmptyComp = () => ;\n\nconst EmptyWithImage = () => ;\n\n\nstoriesOf("Empty空状态", module)\n .add("Empty", EmptyComp)\n .add("Empty自定义image", EmptyWithImage)\n',locationsMap:{"empty自定义image":{startLoc:{col:7,line:13},endLoc:{col:38,line:13},startBody:{col:24,line:13},endBody:{col:38,line:13}},empty:{startLoc:{col:7,line:12},endLoc:{col:25,line:12},startBody:{col:16,line:12},endBody:{col:25,line:12}}}}}).add("Empty",(function EmptyComp(){return(0,jsx_runtime.jsx)(components_Empty,{})})).add("Empty自定义image",(function EmptyWithImage(){return(0,jsx_runtime.jsx)(components_Empty,{image:image1})}))},"./src/components/IconFont/icon.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var _storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),_index__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/IconFont/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Icon图标",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\n// import { withInfo } from \'@storybook/addon-info\'\n\nimport Icon from "./index";\n\nconst IconFontComp = () => (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n);\n\nconst SpinIconFont = () => ;\n\nstoriesOf("Icon图标", module)\n .add("IconFont", IconFontComp)\n .add("旋转Icon", SpinIconFont);\n',locationsMap:{"旋转icon":{startLoc:{col:7,line:36},endLoc:{col:29,line:36},startBody:{col:17,line:36},endBody:{col:29,line:36}},iconfont:{startLoc:{col:7,line:35},endLoc:{col:31,line:35},startBody:{col:19,line:35},endBody:{col:31,line:35}}}}}).add("IconFont",(function IconFontComp(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{style:{width:500,display:"flex",justifyContent:"space-evenly"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-closefill",color:"red"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-propertysafety-fill",color:"red"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-mobile"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-folder-add"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-wifi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-tag"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-arrowright"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-arrowup"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-arrowleft"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-arrowdown"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-YUAN"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-edit-square"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-deleteteam"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-transaction"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-folder-open-fill"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-dashboard-fill"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-customerservice-fill"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-small-dash"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-fullscreen"})]})})).add("旋转Icon",(function SpinIconFont(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-loading",spin:!0})}))},"./src/components/Input/input.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_index__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Input/index.tsx"),_IconFont_index__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/IconFont/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);var ControlledInput=function ControlledInput(){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),_useState2=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_useState,2),value=_useState2[0],setValue=_useState2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{value:value,defaultValue:value,onChange:function onChange(e){setValue(e.target.value)}})};(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Input 输入框",module).addParameters({storySource:{source:'import React, { useState } from "react";\nimport { storiesOf } from "@storybook/react";\nimport { action } from "@storybook/addon-actions";\nimport Input from "./index";\nimport IconFont from "../IconFont/index";\nconst ControlledInput = () => {\n const [value, setValue] = useState();\n return (\n {\n setValue(e.target.value as any);\n }}\n />\n );\n};\nconst defaultInput = () => (\n <>\n \n \n \n);\nconst disabledInput = () => (\n \n);\n\nconst iconInput = () => (\n }\n />\n);\n\nconst sizeInput = () => (\n <>\n \n \n \n);\n\nconst pandInput = () => (\n <>\n \n \n \n);\n\nstoriesOf("Input 输入框", module)\n .add("Input", defaultInput)\n .add("被禁用的 Input", disabledInput)\n .add("带图标的 Input", iconInput)\n .add("大小不同的 Input", sizeInput)\n .add("带前后缀的 Input", pandInput);\n',locationsMap:{"带前后缀的-input":{startLoc:{col:7,line:59},endLoc:{col:31,line:59},startBody:{col:22,line:59},endBody:{col:31,line:59}},"大小不同的-input":{startLoc:{col:7,line:58},endLoc:{col:31,line:58},startBody:{col:22,line:58},endBody:{col:31,line:58}},"带图标的-input":{startLoc:{col:7,line:57},endLoc:{col:30,line:57},startBody:{col:21,line:57},endBody:{col:30,line:57}},"被禁用的-input":{startLoc:{col:7,line:56},endLoc:{col:34,line:56},startBody:{col:21,line:56},endBody:{col:34,line:56}},input:{startLoc:{col:7,line:55},endLoc:{col:28,line:55},startBody:{col:16,line:55},endBody:{col:28,line:55}}}}}).add("Input",(function defaultInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},placeholder:"placeholder",onChange:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__.action)("changed")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(ControlledInput,{})]})})).add("被禁用的 Input",(function disabledInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},placeholder:"disabled input",disabled:!0})})).add("带图标的 Input",(function iconInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},placeholder:"input with icon",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont_index__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-closefill"})})})).add("大小不同的 Input",(function sizeInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},value:"large size",size:"lg"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},placeholder:"small size",size:"sm"})]})})).add("带前后缀的 Input",(function pandInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},value:"prepend text",prepend:"https://"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},value:"google",append:".com"})]})}))},"./src/components/Menu/menu.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),menuContext=(0,react.createContext)({}),Menu=function Menu(props){var className=props.className,style=props.style,children=props.children,mode=props.mode,defaultSelectedKey=props.defaultSelectedKey,onSelect=props.onSelect,_useState=(0,react.useState)(defaultSelectedKey||""),_useState2=(0,slicedToArray.Z)(_useState,2),activeKey=_useState2[0],setActiveKey=_useState2[1],passonContext={activeKey:activeKey,mode:mode,onSelect:function onHandleSelect(key){setActiveKey(key),onSelect&&onSelect(key)}},classes=classnames_default()("dui-menu",className,{"dui-menu-horizontal":"horizontal"===mode,"dui-menu-vertical":"vertical"===mode});return(0,jsx_runtime.jsx)("ul",{style:style,className:classes,children:(0,jsx_runtime.jsx)(menuContext.Provider,{value:passonContext,children:function renderChildren(){return react.Children.map(children,(function(child,index){var newChildren=child,displayName=newChildren.type.displayName;if("MenuItem"===displayName||"SubMenu"===displayName)return react.cloneElement(newChildren,{index:index.toString(),eventKey:newChildren.key});console.warn("Warning: Menu has a child which is not a MenuItem component")}))}()})})},Menu_Menu=Menu;Menu.defaultProps={mode:"horizontal"};try{Menu.displayName="Menu",Menu.__docgenInfo={description:"为页面和功能提供导航的菜单列表\n### 引用方法\n\n~~~js\nimport { Menu } from 'jadedui'\n~~~",displayName:"Menu",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}},defaultSelectedKey:{defaultValue:null,description:"默认选中的menu",name:"defaultSelectedKey",required:!1,type:{name:"string"}},onSelect:{defaultValue:null,description:"选中时的回调函数",name:"onSelect",required:!1,type:{name:"((key: string) => void)"}},mode:{defaultValue:{value:"horizontal"},description:"menu模式",name:"mode",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Menu/Menu.tsx#Menu"]={docgenInfo:Menu.__docgenInfo,name:"Menu",path:"src/components/Menu/Menu.tsx#Menu"})}catch(__react_docgen_typescript_loader_error){}var MenuItem=function MenuItem(props){var className=props.className,children=props.children,eventKey=props.eventKey,index=props.index,disabled=props.disabled,_useState=(0,react.useState)(""),_useState2=(0,slicedToArray.Z)(_useState,2),currentHover=_useState2[0],setCurrentHover=_useState2[1],context=(0,react.useContext)(menuContext),classes=classnames_default()("dui-menu-item",className,currentHover,{"dui-menu-item-active":function shouldActive(){var _context$activeKey;return(!eventKey||"string"==typeof eventKey)&&(context.activeKey===(eventKey||index)||0===(null===(_context$activeKey=context.activeKey)||void 0===_context$activeKey?void 0:_context$activeKey.indexOf(eventKey||index)))}(),"dui-menu-item-disabled":disabled});return(0,jsx_runtime.jsx)("li",{className:classes,onClick:function handleClick(){context.onSelect&&!disabled&&(index&&context.onSelect(index),eventKey&&context.onSelect(eventKey))},onMouseEnter:function onMouseEnter(){disabled||setCurrentHover("dui-menu-item-hover")},onMouseLeave:function onMouseLeave(){setCurrentHover("")},children:(0,jsx_runtime.jsx)("span",{className:"ant-menu-title-content",children:children})})};MenuItem.displayName="MenuItem";var Menu_MenuItem=MenuItem;try{MenuItem.displayName="MenuItem",MenuItem.__docgenInfo={description:"",displayName:"MenuItem",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},eventKey:{defaultValue:null,description:"",name:"eventKey",required:!1,type:{name:"string"}},index:{defaultValue:null,description:"",name:"index",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"是否禁用",name:"disabled",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Menu/MenuItem.tsx#MenuItem"]={docgenInfo:MenuItem.__docgenInfo,name:"MenuItem",path:"src/components/Menu/MenuItem.tsx#MenuItem"})}catch(__react_docgen_typescript_loader_error){}var SubMenu=function SubMenu(props){var title=props.title,children=props.children,index=props.index,eventKey=props.eventKey,disabled=props.disabled,_useState=(0,react.useState)(""),_useState2=(0,slicedToArray.Z)(_useState,2),currentHover=_useState2[0],setCurrentHover=_useState2[1],_useState3=(0,react.useState)(!1),_useState4=(0,slicedToArray.Z)(_useState3,2),collapse=_useState4[0],setCollapse=_useState4[1],context=(0,react.useContext)(menuContext),classes=classnames_default()("dui-menu-submenu",currentHover,{"dui-menu-submenu-active":function shouldActive(){var _context$activeKey,_context$activeKey2;return"vertical"!==context.mode&&((!eventKey||"string"==typeof eventKey)&&((null===(_context$activeKey=context.activeKey)||void 0===_context$activeKey?void 0:_context$activeKey.includes(eventKey))||(null===(_context$activeKey2=context.activeKey)||void 0===_context$activeKey2?void 0:_context$activeKey2.includes(index))))}(),"dui-menu-submenu-disabled":disabled}),renderSubMenuChildren=function renderSubMenuChildren(){var newChildren=children;return react.Children.map(newChildren,(function(child,subIndex){if("MenuItem"===child.type.displayName)return react.cloneElement(child,{index:eventKey?"".concat(eventKey,"-").concat(subIndex):"".concat(index,"-").concat(subIndex),eventKey:child.key});console.warn("Warning: SubMenu has a child which is not a MenuItem component")}))},handleClick=function handleClick(){disabled||setCollapse(!collapse)};return(0,jsx_runtime.jsx)("li",{className:classes,onMouseEnter:function onMouseEnter(){disabled||setCurrentHover("dui-menu-submenu-hover")},onMouseLeave:function onMouseLeave(){setCurrentHover("")},children:function renderMode(){return"vertical"===context.mode?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("span",{className:"ant-menu-title-content",onClick:handleClick,children:[title,(0,jsx_runtime.jsx)("span",{className:classnames_default()("dui-menu-submenu-icon",{"dui-menu-submenu-icon-switch":collapse}),children:">"})]}),(0,jsx_runtime.jsx)("ul",{className:classnames_default()("dui-menu-submenu-item",{"dui-menu-submenu-collapse-open":collapse}),children:renderSubMenuChildren()})]}):(0,jsx_runtime.jsxs)("span",{className:"ant-menu-title-content",children:[title,(0,jsx_runtime.jsx)("ul",{className:"dui-menu-submenu-item",children:renderSubMenuChildren()})]})}()})};SubMenu.displayName="SubMenu";var Menu_SubMenu=SubMenu;try{SubMenu.displayName="SubMenu",SubMenu.__docgenInfo={description:"",displayName:"SubMenu",props:{eventKey:{defaultValue:null,description:"",name:"eventKey",required:!1,type:{name:"string"}},index:{defaultValue:null,description:"",name:"index",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Menu/SubMenu.tsx#SubMenu"]={docgenInfo:SubMenu.__docgenInfo,name:"SubMenu",path:"src/components/Menu/SubMenu.tsx#SubMenu"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Menu菜单",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport { action } from "@storybook/addon-actions";\n\nimport Menu from "./Menu";\nimport MenuItem from "./MenuItem";\nimport SubMenu from "./SubMenu";\n\nconst defaultMenu = () => (\n \n 吃饭\n 碎觉\n 打豆豆\n \n);\nconst menuWithMenuItem = () => (\n \n 吃饭\n 碎觉\n 打豆豆\n \n 我是submenu1\n 我是submenu2\n \n \n);\n\nconst menuWithMode = () => (\n \n 我是vertical MenuItem1\n 我是vertical MenuItem2\n 我是vertical MenuItem3\n \n 我是vertical submenu1\n 我是vertical submenu2\n \n \n);\n\nstoriesOf("Menu菜单", module)\n .add("Menu", defaultMenu)\n .add("有子菜单的Menu", menuWithMenuItem)\n .add("不同方向的Menu", menuWithMode);\n',locationsMap:{"不同方向的menu":{startLoc:{col:7,line:43},endLoc:{col:32,line:43},startBody:{col:20,line:43},endBody:{col:32,line:43}},"有子菜单的menu":{startLoc:{col:7,line:42},endLoc:{col:36,line:42},startBody:{col:20,line:42},endBody:{col:36,line:42}},menu:{startLoc:{col:7,line:41},endLoc:{col:26,line:41},startBody:{col:15,line:41},endBody:{col:26,line:41}}}}}).add("Menu",(function defaultMenu(){return(0,jsx_runtime.jsxs)(Menu_Menu,{onSelect:(0,esm.action)("selected"),children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"吃饭"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"碎觉"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"打豆豆"})]})})).add("有子菜单的Menu",(function menuWithMenuItem(){return(0,jsx_runtime.jsxs)(Menu_Menu,{onSelect:(0,esm.action)("selected"),defaultSelectedKey:"1",children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"吃饭"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"碎觉"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"打豆豆"}),(0,jsx_runtime.jsxs)(Menu_SubMenu,{title:"我是SubMenu",children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是submenu1"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是submenu2"})]})]})})).add("不同方向的Menu",(function menuWithMode(){return(0,jsx_runtime.jsxs)(Menu_Menu,{style:{width:250},mode:"vertical",defaultSelectedKey:"1",children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{disabled:!0,children:"我是vertical MenuItem1"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是vertical MenuItem2"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是vertical MenuItem3"}),(0,jsx_runtime.jsxs)(Menu_SubMenu,{title:"我是vertical",children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是vertical submenu1"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是vertical submenu2"})]})]})}))},"./src/components/Progress/progress.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),_index__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Progress/index.tsx"),_Button__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Button/index.tsx"),_IconFont__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/IconFont/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Progress 进度条",module).addParameters({storySource:{source:'import React, { useState } from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\nimport Progress from "./index";\nimport Button from "../Button";\nimport Icon from "../IconFont";\n\nconst defaultProgress = () => ;\n\nconst controllProgress = () => {\n const [value, setValue] = useState(0);\n return (\n <>\n \n
\n {\n setValue((pre) => {\n return pre >= 100 ? 100 : pre + 10;\n });\n }}\n >\n \n 增加\n \n\n {\n setValue((pre) => {\n return pre <= 0 ? 0 : pre - 10;\n });\n }}\n >\n \n 减少\n \n
\n \n );\n};\n\nconst customColorProgress = () => ;\n\nconst circleProgress = () => {\n const [value, setValue] = useState(20);\n return (\n <>\n \n
\n {\n setValue((pre) => {\n return pre + 10;\n });\n }}\n >\n \n 增加\n \n\n {\n setValue((pre) => {\n return pre - 10;\n });\n }}\n >\n \n 减少\n \n
\n \n );\n};\n\nstoriesOf("Progress 进度条", module)\n .add("默认 Progress", defaultProgress)\n .add("受控 Progress", controllProgress)\n .add("自定义颜色 Progress", customColorProgress)\n .add("进度圈 Progress", circleProgress);\n',locationsMap:{"进度圈-progress":{startLoc:{col:7,line:88},endLoc:{col:37,line:88},startBody:{col:23,line:88},endBody:{col:37,line:88}},"自定义颜色-progress":{startLoc:{col:7,line:87},endLoc:{col:44,line:87},startBody:{col:25,line:87},endBody:{col:44,line:87}},"受控-progress":{startLoc:{col:7,line:86},endLoc:{col:38,line:86},startBody:{col:22,line:86},endBody:{col:38,line:86}},"默认-progress":{startLoc:{col:7,line:85},endLoc:{col:37,line:85},startBody:{col:22,line:85},endBody:{col:37,line:85}}}}}).add("默认 Progress",(function defaultProgress(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{})})).add("受控 Progress",(function controllProgress(){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),_useState2=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_useState,2),value=_useState2[0],setValue=_useState2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{percent:value}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{style:{display:"flex"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_Button__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",style:{display:"flex",alignItems:"center"},onClick:function onClick(){setValue((function(pre){return pre>=100?100:pre+10}))},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-plus"}),"增加"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_Button__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",style:{display:"flex",alignItems:"center"},onClick:function onClick(){setValue((function(pre){return pre<=0?0:pre-10}))},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-minus"}),"减少"]})]})]})})).add("自定义颜色 Progress",(function customColorProgress(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{color:"#ff8235",percent:80})})).add("进度圈 Progress",(function circleProgress(){var _useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(20),_useState4=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_useState3,2),value=_useState4[0],setValue=_useState4[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{color:"#ff8235",type:"circle",percent:value}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{style:{display:"flex"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_Button__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",style:{display:"flex",alignItems:"center"},onClick:function onClick(){setValue((function(pre){return pre+10}))},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-plus"}),"增加"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_Button__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",style:{display:"flex",alignItems:"center"},onClick:function onClick(){setValue((function(pre){return pre-10}))},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-minus"}),"减少"]})]})]})}))},"./src/components/Rate/rate.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),toConsumableArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Rate=function Rate(props){var className=props.className,value=props.value,defaultValue=props.defaultValue,character=props.character,disabled=props.disabled,onChange=props.onChange,_useState=(0,react.useState)([0,1,2,3,4]),_useState2=(0,slicedToArray.Z)(_useState,2),ids=_useState2[0],_useState3=(_useState2[1],(0,react.useState)([-1,-1])),_useState4=(0,slicedToArray.Z)(_useState3,2),rateValue=_useState4[0],setRateValue=_useState4[1],_useState5=(0,react.useState)({curIndexLi:-1,curIndexStar:-1,isFocus:!1}),_useState6=(0,slicedToArray.Z)(_useState5,2),pos=_useState6[0],setPos=_useState6[1],cls=["ant-rate-star-half","ant-rate-star-full"];if(value&&"number"!=typeof value||defaultValue&&"number"!=typeof defaultValue)throw new Error("value or defaultValue must be a number!");(0,react.useEffect)((function(){!function initRate(){if(value||defaultValue){var transValue=String(value||defaultValue).split("."),curIndexLi=Number(transValue[0]),curIndexStar=transValue[1]&&Number(transValue[1])>=5?0:-1;console.log("curIndexLi: ",curIndexLi),console.log("curIndexStar: ",curIndexStar),setRateValue([curIndexLi,curIndexStar]),setPos({curIndexLi:curIndexLi,curIndexStar:curIndexStar,isFocus:!0})}}()}),[value]);var onMouseFirstEnter=function onMouseFirstEnter(d,curStar){if(!disabled){var curIndex=ids.findIndex((function(id){return id==d}));setPos((0,objectSpread2.Z)((0,objectSpread2.Z)({},pos),{},{curIndexLi:curIndex,curIndexStar:curStar}))}},renderClassNames=function renderClassNames(key){var classNames="dui-rate-star";if(disabled&&(classNames+=" dui-rate-star-disabled"),-1===pos.curIndexLi)classNames+=" dui-rate-star-zero";else{if(keypos.curIndexLi&&(classNames+=" dui-rate-star-zero")}return classNames},rateClickHandle=function rateClickHandle(type,key){value||disabled||(onMouseFirstEnter(key,"first"===type?0:1),setRateValue([key,"first"===type?0:1]),setPos((0,objectSpread2.Z)((0,objectSpread2.Z)({},pos),{},{isFocus:!0})),onChange&&onChange("first"===type?key+.5:key+1))},renderNode=function renderNode(key){return"function"==typeof character?character(key):character};return(0,jsx_runtime.jsx)("ul",{className:classnames_default()("dui-rate",className),onMouseLeave:function onMouseLeave(){disabled||(pos.isFocus?onMouseFirstEnter.apply(void 0,(0,toConsumableArray.Z)(rateValue)):onMouseFirstEnter(-1,-1))},children:ids.map((function(key){return(0,jsx_runtime.jsxs)("li",{className:renderClassNames(key),children:[(0,jsx_runtime.jsx)("div",{className:"dui-rate-star-first",onMouseEnter:function onMouseEnter(){return onMouseFirstEnter(key,0)},onClick:function onClick(){return rateClickHandle("first",key)},children:renderNode(key)}),(0,jsx_runtime.jsx)("div",{className:"dui-rate-star-second",onMouseEnter:function onMouseEnter(){return onMouseFirstEnter(key,1)},onClick:function onClick(){return rateClickHandle("second",key)},children:renderNode(key)})]},key)}))})};Rate.defaultProps={character:(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-star"}),disabled:!1};var components_Rate=Rate;try{Rate.displayName="Rate",Rate.__docgenInfo={description:"Rate 评分\n对评价进行展示\n对事物进行快速的评级操作\n### 引用方法\n\n~~~js\nimport { Rate } from 'jadedui'\n~~~",displayName:"Rate",props:{className:{defaultValue:null,description:"自定义样式类名",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"自定义样式对象",name:"style",required:!1,type:{name:"CSSProperties"}},value:{defaultValue:null,description:"当前数,受控值",name:"value",required:!1,type:{name:"number"}},defaultValue:{defaultValue:null,description:"默认值",name:"defaultValue",required:!1,type:{name:"number"}},disabled:{defaultValue:{value:"false"},description:"只读,无法进行交互",name:"disabled",required:!1,type:{name:"boolean"}},character:{defaultValue:{value:''},description:"自定义字符",name:"character",required:!1,type:{name:"ReactNode | ((index: number) => ReactNode)"}},onChange:{defaultValue:null,description:"选择时的回调",name:"onChange",required:!1,type:{name:"((value: number) => void)"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Rate/index.tsx#Rate"]={docgenInfo:Rate.__docgenInfo,name:"Rate",path:"src/components/Rate/index.tsx#Rate"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Rate 评分",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\n// import { withInfo } from \'@storybook/addon-info\'\n\nimport Rate from "./index";\n\nconst defaultRate = () => {\n const onChange = (v: any) => {\n console.log("v: ", v);\n };\n return ;\n};\n\nconst characterRate = () => (\n <>\n \n \n } />\n \n);\n\nconst disableRate = () => ;\n\nstoriesOf("Rate 评分", module)\n .add("Rate", defaultRate)\n .add("只读 Rate", disableRate)\n .add("自定义字符 Rate", characterRate);\n',locationsMap:{"自定义字符-rate":{startLoc:{col:7,line:28},endLoc:{col:34,line:28},startBody:{col:21,line:28},endBody:{col:34,line:28}},"只读-rate":{startLoc:{col:7,line:27},endLoc:{col:29,line:27},startBody:{col:18,line:27},endBody:{col:29,line:27}},rate:{startLoc:{col:7,line:26},endLoc:{col:26,line:26},startBody:{col:15,line:26},endBody:{col:26,line:26}}}}}).add("Rate",(function defaultRate(){return(0,jsx_runtime.jsx)(components_Rate,{onChange:function onChange(v){console.log("v: ",v)}})})).add("只读 Rate",(function disableRate(){return(0,jsx_runtime.jsx)(components_Rate,{defaultValue:2.7,disabled:!0})})).add("自定义字符 Rate",(function characterRate(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_Rate,{character:"好"}),(0,jsx_runtime.jsx)(components_Rate,{character:"A"}),(0,jsx_runtime.jsx)(components_Rate,{character:function character(){return(0,jsx_runtime.jsx)("span",{children:"星"})}})]})}))},"./src/components/Upload/upload.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),toConsumableArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),objectWithoutProperties=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),axios=__webpack_require__("./node_modules/axios/index.js"),IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),Progress=__webpack_require__("./src/components/Progress/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),UploadList=function UploadList(props){var fileList=props.fileList,onRemove=props.onRemove;return console.log("fileList======>",fileList),(0,jsx_runtime.jsx)("ul",{className:"dui-upload-list",children:fileList.map((function(item){return(0,jsx_runtime.jsxs)("li",{className:"dui-upload-list-item",children:[(0,jsx_runtime.jsxs)("span",{className:"file-name file-name-".concat(item.status),children:[(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-file-image"}),item.name]}),(0,jsx_runtime.jsxs)("span",{className:"file-status",children:[("uploading"===item.status||"ready"===item.status)&&(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-loading",spin:!0,color:"#3683f7"}),"success"===item.status&&(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-check-circle-fill",color:"#52c41a"}),"error"===item.status&&(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-close-circle-fill",color:"red"})]}),(0,jsx_runtime.jsx)("span",{className:"file-actions",children:(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-closefill",onClick:function onClick(){onRemove(item)}})}),"uploading"===item.status&&(0,jsx_runtime.jsx)(Progress.Z,{percent:item.percent||0})]},item.uid)}))})},Upload_UploadList=UploadList;try{UploadList.displayName="UploadList",UploadList.__docgenInfo={description:"",displayName:"UploadList",props:{fileList:{defaultValue:null,description:"",name:"fileList",required:!0,type:{name:"UploadFile[]"}},onRemove:{defaultValue:null,description:"",name:"onRemove",required:!0,type:{name:"(_file: UploadFile) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/UploadList.tsx#UploadList"]={docgenInfo:UploadList.__docgenInfo,name:"UploadList",path:"src/components/Upload/UploadList.tsx#UploadList"})}catch(__react_docgen_typescript_loader_error){}var classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),Dragger=function Dragger(props){var onFile=props.onFile,children=props.children,_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),dragOver=_useState2[0],setDragOver=_useState2[1],klass=classnames_default()("dui-uploader-dragger",{"is-dragover":dragOver}),handleDrag=function handleDrag(e,over){e.preventDefault(),setDragOver(over)};return(0,jsx_runtime.jsx)("div",{className:klass,onDragOver:function onDragOver(e){handleDrag(e,!0)},onDragLeave:function onDragLeave(e){handleDrag(e,!1)},onDrop:function handleDrop(e){e.preventDefault(),setDragOver(!1),onFile(e.dataTransfer.files)},children:children})},Upload_dragger=Dragger;try{Dragger.displayName="Dragger",Dragger.__docgenInfo={description:"",displayName:"Dragger",props:{onFile:{defaultValue:null,description:"",name:"onFile",required:!0,type:{name:"(files: FileList) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/dragger.tsx#Dragger"]={docgenInfo:Dragger.__docgenInfo,name:"Dragger",path:"src/components/Upload/dragger.tsx#Dragger"})}catch(__react_docgen_typescript_loader_error){}try{dragger.displayName="dragger",dragger.__docgenInfo={description:"",displayName:"dragger",props:{onFile:{defaultValue:null,description:"",name:"onFile",required:!0,type:{name:"(files: FileList) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/dragger.tsx#dragger"]={docgenInfo:dragger.__docgenInfo,name:"dragger",path:"src/components/Upload/dragger.tsx#dragger"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Button/index.tsx"),_excluded=["action","defaultFileList","beforeUpload","onProgress","onSuccess","onError","onChange","onRemove","name","headers","data","withCredentials","accept","multiple","children","drag"],Upload=function Upload(props){var action=props.action,defaultFileList=props.defaultFileList,beforeUpload=props.beforeUpload,onProgress=props.onProgress,onSuccess=props.onSuccess,onError=props.onError,onChange=props.onChange,onRemove=props.onRemove,name=props.name,headers=props.headers,data=props.data,withCredentials=props.withCredentials,accept=props.accept,multiple=props.multiple,children=props.children,drag=props.drag,resetsProps=(0,objectWithoutProperties.Z)(props,_excluded),fileInput=(0,react.useRef)(null),_useState=(0,react.useState)(defaultFileList||[]),_useState2=(0,slicedToArray.Z)(_useState,2),fileList=_useState2[0],setFileList=_useState2[1],updateFileList=function updateFileList(updateFile,updateObj){setFileList((function(prevList){return prevList.map((function(file){return file.uid===updateFile.uid?(0,objectSpread2.Z)((0,objectSpread2.Z)({},file),updateObj):file}))}))},uploadFiles=function uploadFiles(files){var postFiles=Array.from(files);console.log("postFiles: ",postFiles),postFiles.forEach((function(file){if(beforeUpload){var result=beforeUpload(file);result&&result instanceof Promise?result.then((function(processedFile){post(processedFile)})):!1!==result&&post(file)}else post(file)}))},post=function post(file){var _file={uid:Date.now()+"upload-file",status:"ready",name:file.name,size:file.size,percent:0,raw:file};setFileList((function(prevList){return[_file].concat((0,toConsumableArray.Z)(prevList))}));var formData=new FormData;formData.append(name||"file",file),data&&Object.keys(data).forEach((function(key){formData.append(key,data[key])})),axios.ZP.post(action,formData,{headers:(0,objectSpread2.Z)((0,objectSpread2.Z)({},headers),{},{"Content-Type":"multipart/form-data"}),withCredentials:withCredentials,onUploadProgress:function onUploadProgress(progressEvent){var percentage=Math.round(100*progressEvent.loaded/progressEvent.total);percentage<100&&(updateFileList(_file,{percent:percentage,status:"uploading"}),onProgress&&onProgress(percentage,file))}}).then((function(resp){updateFileList(_file,{status:"success",response:resp.data}),onSuccess&&onSuccess(resp.data,file),onChange&&onChange(file)})).catch((function(err){updateFileList(_file,{status:"error",error:err}),onError&&onError(err,file),onChange&&onChange(file)}))};return(0,jsx_runtime.jsxs)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({className:"dui-upload-component"},resetsProps),{},{children:[(0,jsx_runtime.jsxs)("div",{className:"dui-upload-input",style:{display:"inline-block"},onClick:function handleClick(){fileInput.current&&fileInput.current.click()},children:[drag?(0,jsx_runtime.jsx)(Upload_dragger,{onFile:function onFile(files){uploadFiles(files)},children:children||(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-upload",style:{fontSize:100}}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("p",{children:"Drag file over to upload"})]})}):children||(0,jsx_runtime.jsxs)(Button.Z,{type:"primary",style:{display:"flex",alignItems:"center"},children:[(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-plus"}),"上传"]}),(0,jsx_runtime.jsx)("input",{className:"dui-file-input",style:{display:"none"},ref:fileInput,onChange:function handleFileChange(e){var files=e.target.files;files&&(uploadFiles(files),fileInput.current&&(fileInput.current.value=""))},type:"file",accept:accept,multiple:multiple})]}),(0,jsx_runtime.jsx)(Upload_UploadList,{fileList:fileList,onRemove:function handleRemove(file){setFileList((function(prevList){return prevList.filter((function(item){return item.uid!==file.uid}))})),onRemove&&onRemove(file)}})]}))};Upload.defaultProps={name:"file"};var Upload_upload=Upload;try{Upload.displayName="Upload",Upload.__docgenInfo={description:"",displayName:"Upload",props:{action:{defaultValue:null,description:"",name:"action",required:!0,type:{name:"string"}},defaultFileList:{defaultValue:null,description:"",name:"defaultFileList",required:!1,type:{name:"UploadFile[]"}},beforeUpload:{defaultValue:null,description:"",name:"beforeUpload",required:!1,type:{name:"((file: File) => boolean | Promise)"}},onProgress:{defaultValue:null,description:"",name:"onProgress",required:!1,type:{name:"((percentage: number, file: File) => void)"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((data: any, file: File) => void)"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((err: any, file: File) => void)"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((file: File) => void)"}},onRemove:{defaultValue:null,description:"",name:"onRemove",required:!1,type:{name:"((file: UploadFile) => void)"}},headers:{defaultValue:null,description:"",name:"headers",required:!1,type:{name:"{ [key: string]: any; }"}},name:{defaultValue:{value:"file"},description:"",name:"name",required:!1,type:{name:"string"}},data:{defaultValue:null,description:"",name:"data",required:!1,type:{name:"{ [key: string]: any; }"}},withCredentials:{defaultValue:null,description:"",name:"withCredentials",required:!1,type:{name:"boolean"}},accept:{defaultValue:null,description:"",name:"accept",required:!1,type:{name:"string"}},multiple:{defaultValue:null,description:"",name:"multiple",required:!1,type:{name:"boolean"}},drag:{defaultValue:null,description:"",name:"drag",required:!1,type:{name:"boolean"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/upload.tsx#Upload"]={docgenInfo:Upload.__docgenInfo,name:"Upload",path:"src/components/Upload/upload.tsx#Upload"})}catch(__react_docgen_typescript_loader_error){}try{upload.displayName="upload",upload.__docgenInfo={description:"",displayName:"upload",props:{action:{defaultValue:null,description:"",name:"action",required:!0,type:{name:"string"}},defaultFileList:{defaultValue:null,description:"",name:"defaultFileList",required:!1,type:{name:"UploadFile[]"}},beforeUpload:{defaultValue:null,description:"",name:"beforeUpload",required:!1,type:{name:"((file: File) => boolean | Promise)"}},onProgress:{defaultValue:null,description:"",name:"onProgress",required:!1,type:{name:"((percentage: number, file: File) => void)"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((data: any, file: File) => void)"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((err: any, file: File) => void)"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((file: File) => void)"}},onRemove:{defaultValue:null,description:"",name:"onRemove",required:!1,type:{name:"((file: UploadFile) => void)"}},headers:{defaultValue:null,description:"",name:"headers",required:!1,type:{name:"{ [key: string]: any; }"}},name:{defaultValue:{value:"file"},description:"",name:"name",required:!1,type:{name:"string"}},data:{defaultValue:null,description:"",name:"data",required:!1,type:{name:"{ [key: string]: any; }"}},withCredentials:{defaultValue:null,description:"",name:"withCredentials",required:!1,type:{name:"boolean"}},accept:{defaultValue:null,description:"",name:"accept",required:!1,type:{name:"string"}},multiple:{defaultValue:null,description:"",name:"multiple",required:!1,type:{name:"boolean"}},drag:{defaultValue:null,description:"",name:"drag",required:!1,type:{name:"boolean"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/upload.tsx#upload"]={docgenInfo:upload.__docgenInfo,name:"upload",path:"src/components/Upload/upload.tsx#upload"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);var checkFileSize=function checkFileSize(file){return!(Math.round(file.size/1024)>50)||(alert("file too big"),!1)};(0,client.storiesOf)("Upload 上传",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport { action } from "@storybook/addon-actions";\nimport Upload from "./upload";\nimport Icon from "../IconFont/index";\n// const defaultFileList: UploadFile[] = [\n// { uid: \'123\', size: 1234, name: \'hello.md\', status: \'uploading\', percent: 30 },\n// { uid: \'122\', size: 1234, name: \'xyz.md\', status: \'success\', percent: 30 },\n// { uid: \'121\', size: 1234, name: \'eyiha.md\', status: \'error\', percent: 30 }\n// ]\nconst checkFileSize = (file: File) => {\n if (Math.round(file.size / 1024) > 50) {\n alert("file too big");\n return false;\n }\n return true;\n};\n// const filePromise = (file: File) => {\n// const newFile = new File([file], \'new_name.docx\', {type: file.type})\n// return Promise.resolve(newFile)\n// }\nconst SimpleUpload = () => {\n return (\n \n );\n};\n\nconst CheckFileSize = () => {\n return (\n \n );\n};\n\nconst DragUpload = () => {\n return (\n \n \n
\n

Drag file over to upload

\n \n );\n};\n\nstoriesOf("Upload 上传", module)\n .add("普通Upload", SimpleUpload)\n .add("上传前检查文件大小", CheckFileSize)\n .add("拖拽上传", DragUpload);\n',locationsMap:{"拖拽上传":{startLoc:{col:7,line:69},endLoc:{col:25,line:69},startBody:{col:15,line:69},endBody:{col:25,line:69}},"上传前检查文件大小":{startLoc:{col:7,line:68},endLoc:{col:33,line:68},startBody:{col:20,line:68},endBody:{col:33,line:68}},"普通upload":{startLoc:{col:7,line:67},endLoc:{col:31,line:67},startBody:{col:19,line:67},endBody:{col:31,line:67}}}}}).add("普通Upload",(function SimpleUpload(){return(0,jsx_runtime.jsx)(Upload_upload,{action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",onChange:(0,esm.action)("changed"),onRemove:(0,esm.action)("removed"),name:"fileName",multiple:!0,style:{width:300}})})).add("上传前检查文件大小",(function CheckFileSize(){return(0,jsx_runtime.jsx)(Upload_upload,{action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",onChange:(0,esm.action)("changed"),onRemove:(0,esm.action)("removed"),name:"fileName",multiple:!0,style:{width:300},beforeUpload:checkFileSize})})).add("拖拽上传",(function DragUpload(){return(0,jsx_runtime.jsxs)(Upload_upload,{action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",onChange:(0,esm.action)("changed"),onRemove:(0,esm.action)("removed"),name:"fileName",multiple:!0,drag:!0,children:[(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-upload",style:{fontSize:100}}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("p",{children:"Drag file over to upload"})]})}))},"./src/components/WaterMark/waterMark.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),WaterMark=function WaterMark(props){var _useState=(0,react.useState)(""),_useState2=(0,slicedToArray.Z)(_useState,2),waterImg=_useState2[0],setWaterImg=_useState2[1],style=props.style,className=props.className;return(0,react.useEffect)((function(){(function imgToWaterMark(props){var url=props.url,type=props.type,bgColor=props.bgColor,quality=props.quality,text=props.text,_props$density=props.density,density=void 0===_props$density?.6:_props$density;return new Promise((function(resolve,reject){var qualityImg=["jpeg","webp"],image=new Image;image.setAttribute("crossOrigin","anonymous"),image.src=url+"?"+(new Date).getTime(),image.onload=function(){var canvas=document.createElement("canvas"),ctx=canvas.getContext("2d",{alpha:!1});canvas.width=image.width,canvas.height=image.height,ctx.fillStyle=bgColor||"white",ctx.fillRect(0,0,canvas.width,canvas.height),ctx.drawImage(image,0,0),ctx.textAlign="center",ctx.textBaseline="middle",ctx.font="20px microsoft yahei",ctx.fillStyle="rgba(184, 184, 184, 0.8)";for(var space=[ctx.measureText(text||"请勿外传").width/density,40/density],xCount=Math.round(image.width/space[0]),yCount=Math.round(image.height/space[1]),x=0;x<=xCount;x++)for(var y=0;y<=yCount;y++)null==ctx||ctx.save(),ctx.translate(space[0]*x,space[1]*y),ctx.rotate(45*Math.PI/180),ctx.fillText(text||"请勿外传",0,0),null==ctx||ctx.restore();var result=qualityImg.includes(type)?canvas.toDataURL("image/"+type,quality||.96):canvas.toDataURL("image/"+type);resolve(result)},image.onerror=function(){reject(new Error("urlToBase64 error"))}}))})((0,objectSpread2.Z)({text:"请勿外传"},props)).then((function(res){setWaterImg(res)}))}),[]),(0,jsx_runtime.jsx)("img",{src:waterImg,alt:"waterMark",style:style,className:className})},components_WaterMark=WaterMark;try{WaterMark.displayName="WaterMark",WaterMark.__docgenInfo={description:"",displayName:"WaterMark",props:{text:{defaultValue:null,description:"水印文本",name:"text",required:!1,type:{name:"string"}},url:{defaultValue:null,description:"图片",name:"url",required:!0,type:{name:"string"}},type:{defaultValue:null,description:"图片类型 jpeg、webp 支持高质量图片",name:"type",required:!1,type:{name:"string"}},bgColor:{defaultValue:null,description:"",name:"bgColor",required:!1,type:{name:"string"}},quality:{defaultValue:null,description:"图片质量 仅在jpeg、webp支持 取值0 到 1 默认0.96",name:"quality",required:!1,type:{name:"number"}},density:{defaultValue:null,description:"文字密集度 默认0.6",name:"density",required:!1,type:{name:"number"}},style:{defaultValue:null,description:"样式",name:"style",required:!1,type:{name:"CSSProperties"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/WaterMark/index.tsx#WaterMark"]={docgenInfo:WaterMark.__docgenInfo,name:"WaterMark",path:"src/components/WaterMark/index.tsx#WaterMark"})}catch(__react_docgen_typescript_loader_error){}var test_namespaceObject=__webpack_require__.p+"0fb7259a2f4284be3d9f.png";module=__webpack_require__.hmd(module);(0,client.storiesOf)("WaterMark 水印",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport WaterMark from "./index";\nimport Img from "../../assets/test.png";\n\nconst defaultWaterMark = () => {\n return (\n <>\n \n \n );\n};\n\nconst textWithWaterMark = () => ;\nconst qualityWithWaterMark = () => (\n \n);\n\nconst densityWithWaterMark = () => {\n return (\n <>\n

低密度

\n \n

高密度

\n \n \n );\n};\n\nstoriesOf("WaterMark 水印", module)\n .add("默认 WaterMark", defaultWaterMark)\n .add("修改文字 WaterMark", textWithWaterMark)\n .add("高质量 WaterMark", qualityWithWaterMark)\n .add("密集度 WaterMark", densityWithWaterMark);\n',locationsMap:{"密集度-watermark":{startLoc:{col:7,line:34},endLoc:{col:44,line:34},startBody:{col:24,line:34},endBody:{col:44,line:34}},"高质量-watermark":{startLoc:{col:7,line:33},endLoc:{col:44,line:33},startBody:{col:24,line:33},endBody:{col:44,line:33}},"修改文字-watermark":{startLoc:{col:7,line:32},endLoc:{col:42,line:32},startBody:{col:25,line:32},endBody:{col:42,line:32}},"默认-watermark":{startLoc:{col:7,line:31},endLoc:{col:39,line:31},startBody:{col:23,line:31},endBody:{col:39,line:31}}}}}).add("默认 WaterMark",(function defaultWaterMark(){return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject})})})).add("修改文字 WaterMark",(function textWithWaterMark(){return(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject,text:"我是水印~"})})).add("高质量 WaterMark",(function qualityWithWaterMark(){return(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject,text:"我是水印~",type:"webp",quality:1})})).add("密集度 WaterMark",(function densityWithWaterMark(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("h4",{children:"低密度"}),(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject,text:"我是水印~",density:.4}),(0,jsx_runtime.jsx)("h4",{children:"高密度"}),(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject,text:"我是水印~",density:.9})]})}))},"./src/welcome.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var _storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Welcome page",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n\nstoriesOf("Welcome page", module).add(\n "welcome",\n () => {\n return (\n <>\n

欢迎来到 jadedui 组件库

\n

组件亮点

\n
    \n
  • 🔥typescript with React Hooks
  • \n
  • 📚 使用 storybook 本地调试和生成文档页面
  • \n
  • 📚 使用 react-doc-gen 自动生成文档
  • \n
  • 📦 使用 rollup 作为构建工具,构建ESmodule,支持tree-shaking
  • \n
  • 📦 使用第三方库扩充组件-(react-transition-group 等)
  • \n
  • 🌹 样式(Sass)文件从零开始,掌握大型应用的 CSS 组织方法
  • \n
  • \n 🎉 涉及全部流程,包括最后的 npm publish,husky\n 提交发布前验证,github actions CI/CD 集成,发布文档站点等\n
  • \n
\n\n

安装试试

\n npm install jadedui --save\n
\n

使用

\n
加载样式
\n {`import "jadedui/dist/index.css";`}\n
引入组件
\n {`import { Button } from "jadedui";`}\n \n );\n },\n { info: { disable: true } }\n);\n',locationsMap:{welcome:{startLoc:{col:2,line:5},endLoc:{col:29,line:35},startBody:{col:2,line:6},endBody:{col:3,line:34}}}}}).add("welcome",(function(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{children:"欢迎来到 jadedui 组件库"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2",{children:"组件亮点"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("ul",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"🔥typescript with React Hooks"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"📚 使用 storybook 本地调试和生成文档页面"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"📚 使用 react-doc-gen 自动生成文档"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"📦 使用 rollup 作为构建工具,构建ESmodule,支持tree-shaking"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"📦 使用第三方库扩充组件-(react-transition-group 等)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"🌹 样式(Sass)文件从零开始,掌握大型应用的 CSS 组织方法"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"🎉 涉及全部流程,包括最后的 npm publish,husky 提交发布前验证,github actions CI/CD 集成,发布文档站点等"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"安装试试"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"npm install jadedui --save"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"使用"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{children:"加载样式"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:'import "jadedui/dist/index.css";'}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{children:"引入组件"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:'import { Button } from "jadedui";'})]})}),{info:{disable:!0}})},"./.storybook/preview.tsx-generated-config-entry.js":function(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__){"use strict";var _home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),_home_runner_work_dui_dui_storybook_preview_tsx__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./.storybook/preview.tsx");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.keys(_home_runner_work_dui_dui_storybook_preview_tsx__WEBPACK_IMPORTED_MODULE_0__).forEach((function(key){var value=_home_runner_work_dui_dui_storybook_preview_tsx__WEBPACK_IMPORTED_MODULE_0__[key];switch(key){case"args":return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.uc)(value);case"argTypes":return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.v9)(value);case"decorators":return value.forEach((function(decorator){return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.$9)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.HZ)(loader,!1)}));case"parameters":return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.h1)(function _objectSpread(target){for(var i=1;i void) | (MouseEventHandler & MouseEventHandler & (() => void))"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Button/index.tsx#Button"]={docgenInfo:Button.__docgenInfo,name:"Button",path:"src/components/Button/index.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/IconFont/index.tsx":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var _home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/react/jsx-runtime.js")),_excluded=["type","color","spin"];__webpack_exports__.Z=function Icon(props){var type=props.type,color=props.color,_props$spin=props.spin,spin=void 0!==_props$spin&&_props$spin,restProps=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2__.Z)(props,_excluded);return function createScript(){if(!document.getElementById("dui-iconfont")){var script=document.createElement("script");script.type="text/javascript",script.src="//at.alicdn.com/t/c/font_3672057_9x8gvk6a2ho.js",script.id="dui-iconfont",document.body.appendChild(script)}}(),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg",(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({width:"1em",height:"1em",fill:color||"currentColor","aria-hidden":"true",focusable:"false",className:spin?"dui-icon-spin":""},restProps),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("use",{xlinkHref:"#".concat(type)})}))};try{IconFont.displayName="IconFont",IconFont.__docgenInfo={description:"IconFont 图标组件库 支持所有svg属性\n支持ant design所有图标\n通过 iconfont.cn 链接方式生成icon\n\n~~~js\nimport { Icon } from 'jadedui'\n~~~",displayName:"IconFont",props:{type:{defaultValue:null,description:"图标类型",name:"type",required:!0,type:{name:"string"}},spin:{defaultValue:null,description:"是否旋转",name:"spin",required:!1,type:{name:"boolean"}},color:{defaultValue:null,description:"图标颜色",name:"color",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/IconFont/index.tsx#IconFont"]={docgenInfo:IconFont.__docgenInfo,name:"IconFont",path:"src/components/IconFont/index.tsx#IconFont"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Input/index.tsx":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var _home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),_IconFont_index__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/IconFont/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["disabled","size","icon","prepend","append","style","allowClear"],Input=function Input(props){var _classNames,disabled=props.disabled,size=props.size,icon=props.icon,prepend=props.prepend,append=props.append,style=props.style,allowClear=props.allowClear,restProps=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(props,_excluded),_useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(restProps.value||""),_useState2=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState,2),value=_useState2[0],setValue=_useState2[1],eRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(""),cnames=classnames__WEBPACK_IMPORTED_MODULE_1___default()("dui-input-wrapper",(_classNames={},(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"input-size-".concat(size),size),(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"is-disabled",disabled),(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"input-group",prepend||append),(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"input-group-append",!!append),(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"input-group-prepend",!!prepend),_classNames));"value"in props&&(delete restProps.defaultValue,restProps.value=function fixControlledValue(value){return null==value?"":value}(props.value)),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){setValue(restProps.value)}),[restProps.value]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{className:cnames,style:style,children:[prepend&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"dui-input-group-prepend",children:prepend}),icon?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"icon-wrapper",children:icon}):value&&allowClear?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"icon-wrapper",onClick:function clearHandle(){setValue(""),console.log("eRef===>",eRef),eRef.current.target.value="",(null==props?void 0:props.onChange)&&(null==props||props.onChange(eRef.current))},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_IconFont_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-closefill"})}):null,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("input",(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)((0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({className:"dui-input-inner",disabled:disabled,placeholder:"请输入"},restProps),{},{value:value,onChange:function onChange(e){console.log("dsadasd"),setValue(e.target.value),eRef.current=e,(null==props?void 0:props.onChange)&&(null==props||props.onChange(e))}})),append&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"dui-input-group-append",children:append})]})};Input.defaultProps={allowClear:!1},__webpack_exports__.Z=Input;try{Input.displayName="Input",Input.__docgenInfo={description:"Input 输入框 通过鼠标或键盘输入内容,是最基础的表单域的包装。\n\n~~~js\n// 这样引用\nimport { Input } from 'jadedui'\n~~~\n支持 HTMLInput 的所有基本属性",displayName:"Input",props:{disabled:{defaultValue:null,description:"是否禁用 Input",name:"disabled",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"设置 input 大小,支持 lg 或者是 sm",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"sm"'}]}},icon:{defaultValue:null,description:"添加图标,在右侧悬浮添加一个图标,用于提示",name:"icon",required:!1,type:{name:"ReactNode"}},prepend:{defaultValue:null,description:"添加前缀 用于配置一些固定组合",name:"prepend",required:!1,type:{name:"string | ReactElement>"}},append:{defaultValue:null,description:"添加后缀 用于配置一些固定组合",name:"append",required:!1,type:{name:"string | ReactElement>"}},allowClear:{defaultValue:{value:"false"},description:"是否允许清除",name:"allowClear",required:!1,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((e: ChangeEvent) => void)"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Input/index.tsx#Input"]={docgenInfo:Input.__docgenInfo,name:"Input",path:"src/components/Input/index.tsx#Input"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Progress/index.tsx":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__("./node_modules/react/index.js");var classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react/jsx-runtime.js"),Progress=function Progress(props){var _props$color=props.color,color=void 0===_props$color?"#3683F7":_props$color,_props$type=props.type,type=void 0===_props$type?"Line":_props$type,_props$radius=props.radius,radius=void 0===_props$radius?60:_props$radius,className=props.className,_props$percent=props.percent,percent=void 0===_props$percent?0:_props$percent;if(percent=percent>100?100:percent<0?0:percent,radius<=20&&console.error("Radius is less than 20, are you sure"),"circle"===type){var pathLen=2*radius*Math.PI;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:classnames__WEBPACK_IMPORTED_MODULE_1___default()("circle-progress",className),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span",{children:[percent,"%"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("svg",{width:2*radius+8,height:2*radius+8,viewBox:"0 0 ".concat(2*radius+8," ").concat(2*radius+8),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("circle",{fill:"transparent",className:"pie-bg",strokeWidth:"4",cx:radius+4,cy:radius+4,r:radius}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("circle",{fill:"transparent",strokeWidth:"4",cx:radius+4,cy:radius+4,r:radius,style:{strokeDasharray:"".concat(pathLen*percent/100,",").concat(pathLen),stroke:color}})]})]})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:classnames__WEBPACK_IMPORTED_MODULE_1___default()("groove",className),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"progress",style:{backgroundColor:color,width:percent+"%"}})})};__webpack_exports__.Z=Progress;try{Progress.displayName="Progress",Progress.__docgenInfo={description:"",displayName:"Progress",props:{type:{defaultValue:null,description:"进度条类型 默认线形,circle圆环",name:"type",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"进度条颜色",name:"color",required:!1,type:{name:"string"}},percent:{defaultValue:null,description:"进度值",name:"percent",required:!1,type:{name:"number"}},radius:{defaultValue:null,description:"圆环半径",name:"radius",required:!1,type:{name:"number"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Progress/index.tsx#Progress"]={docgenInfo:Progress.__docgenInfo,name:"Progress",path:"src/components/Progress/index.tsx#Progress"})}catch(__react_docgen_typescript_loader_error){}},"./src/components sync recursive \\.stories\\.tsx$":function(module,__unused_webpack_exports,__webpack_require__){var map={"./Alert/alert.stories.tsx":"./src/components/Alert/alert.stories.tsx","./AutoComplete/autoComplete.stories.tsx":"./src/components/AutoComplete/autoComplete.stories.tsx","./BackTop/backtop.stories.tsx":"./src/components/BackTop/backtop.stories.tsx","./Button/button.stories.tsx":"./src/components/Button/button.stories.tsx","./Carousel/carousel.stories.tsx":"./src/components/Carousel/carousel.stories.tsx","./Divider/divider.stories.tsx":"./src/components/Divider/divider.stories.tsx","./Empty/empty.stories.tsx":"./src/components/Empty/empty.stories.tsx","./IconFont/icon.stories.tsx":"./src/components/IconFont/icon.stories.tsx","./Input/input.stories.tsx":"./src/components/Input/input.stories.tsx","./Menu/menu.stories.tsx":"./src/components/Menu/menu.stories.tsx","./Progress/progress.stories.tsx":"./src/components/Progress/progress.stories.tsx","./Rate/rate.stories.tsx":"./src/components/Rate/rate.stories.tsx","./Upload/upload.stories.tsx":"./src/components/Upload/upload.stories.tsx","./WaterMark/waterMark.stories.tsx":"./src/components/WaterMark/waterMark.stories.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src/components sync recursive \\.stories\\.tsx$"},"./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx))$":function(module,__unused_webpack_exports,__webpack_require__){var map={"./Alert/alert.stories.tsx":"./src/components/Alert/alert.stories.tsx","./AutoComplete/autoComplete.stories.tsx":"./src/components/AutoComplete/autoComplete.stories.tsx","./BackTop/backtop.stories.tsx":"./src/components/BackTop/backtop.stories.tsx","./Button/button.stories.tsx":"./src/components/Button/button.stories.tsx","./Carousel/carousel.stories.tsx":"./src/components/Carousel/carousel.stories.tsx","./Divider/divider.stories.tsx":"./src/components/Divider/divider.stories.tsx","./Empty/empty.stories.tsx":"./src/components/Empty/empty.stories.tsx","./IconFont/icon.stories.tsx":"./src/components/IconFont/icon.stories.tsx","./Input/input.stories.tsx":"./src/components/Input/input.stories.tsx","./Menu/menu.stories.tsx":"./src/components/Menu/menu.stories.tsx","./Progress/progress.stories.tsx":"./src/components/Progress/progress.stories.tsx","./Rate/rate.stories.tsx":"./src/components/Rate/rate.stories.tsx","./Upload/upload.stories.tsx":"./src/components/Upload/upload.stories.tsx","./WaterMark/waterMark.stories.tsx":"./src/components/WaterMark/waterMark.stories.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx))$"},"./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.mdx)$":function(module){function webpackEmptyContext(req){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=function(){return[]},webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.mdx)$",module.exports=webpackEmptyContext},"./storybook-init-framework-entry.js":function(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__){"use strict";__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js")},"./src/assets/image1.webp":function(module,__unused_webpack_exports,__webpack_require__){"use strict";module.exports=__webpack_require__.p+"440b0c61f6d8896f6fb5.webp"},"?4f7e":function(){},"./generated-stories-entry.cjs":function(module,__unused_webpack_exports,__webpack_require__){"use strict";module=__webpack_require__.nmd(module),(0,__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js").configure)([__webpack_require__("./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.mdx)$"),__webpack_require__("./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx))$")],module,!1)}},function(__webpack_require__){var __webpack_exec__=function(moduleId){return __webpack_require__(__webpack_require__.s=moduleId)};__webpack_require__.O(0,[88],(function(){return __webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js"),__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/globals.js"),__webpack_exec__("./storybook-init-framework-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/docs/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-links/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-docs/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-actions/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-measure/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-outline/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-interactions/preview.js-generated-config-entry.js"),__webpack_exec__("./.storybook/preview.tsx-generated-config-entry.js"),__webpack_exec__("./generated-stories-entry.cjs")}));__webpack_require__.O()}]); \ No newline at end of file +(self.webpackChunkjadedui=self.webpackChunkjadedui||[]).push([[179],{"./node_modules/nested-object-assign/lib sync recursive ^\\.\\/.*$":function(module,__unused_webpack_exports,__webpack_require__){var map={"./nestedObjectAssign":"./node_modules/nested-object-assign/lib/nestedObjectAssign.js","./nestedObjectAssign.js":"./node_modules/nested-object-assign/lib/nestedObjectAssign.js"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./node_modules/nested-object-assign/lib sync recursive ^\\.\\/.*$"},"./src/components/Alert/alert.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),defineProperty=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),objectWithoutProperties=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["type","closable","onClose","description","closeText","message","className"],Alert=function Alert(props){var _props$type=props.type,type=void 0===_props$type?"success":_props$type,_props$closable=props.closable,closable=void 0!==_props$closable&&_props$closable,_props$onClose=props.onClose,onClose=void 0===_props$onClose?function(){return{}}:_props$onClose,description=props.description,_props$closeText=props.closeText,closeText=void 0===_props$closeText?"x":_props$closeText,message=props.message,cusClassname=props.className,restprops=(0,objectWithoutProperties.Z)(props,_excluded),_React$useState=react.useState(classnames_default()(cusClassname,"dui-alert",(0,defineProperty.Z)({},"dui-alert-".concat(type),!0))),_React$useState2=(0,slicedToArray.Z)(_React$useState,2),classNames=_React$useState2[0],setClassNames=_React$useState2[1],messageClassNames=classnames_default()((0,defineProperty.Z)({},"dui-alert-message-with-description",description&&message));return(0,jsx_runtime.jsxs)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({className:classNames},restprops),{},{children:[(0,jsx_runtime.jsxs)("div",{className:"dui-alert-content",children:[(0,jsx_runtime.jsx)("div",{className:"".concat(messageClassNames," dui-alert-message"),children:message}),(0,jsx_runtime.jsx)("div",{className:"dui-alert-description",children:description})]}),closable&&(0,jsx_runtime.jsx)("div",{className:"dui-alert-close",onClick:function onClick(){return function onCloseHandle(){onClose(),setClassNames(classnames_default()(classNames,"dui-alert-close-transition")),setTimeout((function(){setClassNames(classnames_default()(classNames,"dui-alert-transition-end"))}),500)}()},children:closeText})]}))},components_Alert=Alert;try{Alert.displayName="Alert",Alert.__docgenInfo={description:"警告提示,展现需要关注的信息\n### 引用方法\n\n~~~js\nimport { Alert } from 'jadedui'\n~~~",displayName:"Alert",props:{type:{defaultValue:null,description:"alert类型",name:"type",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"info"'},{value:'"warning"'},{value:'"error"'}]}},closable:{defaultValue:null,description:"",name:"closable",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"是否禁用",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},message:{defaultValue:null,description:"alert文案",name:"message",required:!1,type:{name:"ReactNode"}},description:{defaultValue:null,description:"alert相关描述",name:"description",required:!1,type:{name:"ReactNode"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}},closeText:{defaultValue:null,description:"alert关闭节点",name:"closeText",required:!1,type:{name:"ReactNode"}},onClose:{defaultValue:null,description:"alert关闭回调",name:"onClose",required:!1,type:{name:"(() => void)"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Alert/index.tsx#Alert"]={docgenInfo:Alert.__docgenInfo,name:"Alert",path:"src/components/Alert/index.tsx#Alert"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Alert警告提示",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\n\nimport Alert from "./index";\n\nconst defaultAlert = () => ;\n\nconst alertWithType = () => (\n <>\n \n \n \n \n);\n\nconst alertWithDesc = () => (\n \n);\n\nstoriesOf("Alert警告提示", module)\n .add("Alert", defaultAlert)\n .add("不同类型的Alert", alertWithType)\n .add("带有描述和关闭的Alert", alertWithDesc);\n',locationsMap:{"带有描述和关闭的alert":{startLoc:{col:7,line:30},endLoc:{col:37,line:30},startBody:{col:24,line:30},endBody:{col:37,line:30}},"不同类型的alert":{startLoc:{col:7,line:29},endLoc:{col:34,line:29},startBody:{col:21,line:29},endBody:{col:34,line:29}},alert:{startLoc:{col:7,line:28},endLoc:{col:28,line:28},startBody:{col:16,line:28},endBody:{col:28,line:28}}}}}).add("Alert",(function defaultAlert(){return(0,jsx_runtime.jsx)(components_Alert,{message:"哈哈哈哈"})})).add("不同类型的Alert",(function alertWithType(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_Alert,{type:"info",message:"info"}),(0,jsx_runtime.jsx)(components_Alert,{type:"warning",message:"warning"}),(0,jsx_runtime.jsx)(components_Alert,{type:"error",message:"error"})]})})).add("带有描述和关闭的Alert",(function alertWithDesc(){return(0,jsx_runtime.jsx)(components_Alert,{type:"error",message:"description",description:"我是一段描述~~~",closable:!0,closeText:"关闭"})}))},"./src/components/AutoComplete/autoComplete.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),objectWithoutProperties=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),Input=__webpack_require__("./src/components/Input/index.tsx"),CSSTransition=__webpack_require__("./node_modules/react-transition-group/esm/CSSTransition.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["children","className","animation"],Transition=function Transition(props){var children=props.children,className=props.className,animation=props.animation,restProps=(0,objectWithoutProperties.Z)(props,_excluded);return(0,jsx_runtime.jsx)(CSSTransition.Z,(0,objectSpread2.Z)((0,objectSpread2.Z)({classNames:className||animation},restProps),{},{children:(0,jsx_runtime.jsx)("div",{children:children})}))};Transition.defaultProps={unmountOnExit:!0,appear:!0};var components_Transition=Transition;try{Transition.displayName="Transition",Transition.__docgenInfo={description:"",displayName:"Transition",props:{classNames:{defaultValue:null,description:"The animation `classNames` applied to the component as it enters or exits.\nA single name can be provided and it will be suffixed for each stage: e.g.\n\n`classNames=\"fade\"` applies `fade-enter`, `fade-enter-active`,\n`fade-exit`, `fade-exit-active`, `fade-appear`, and `fade-appear-active`.\n\nEach individual classNames can also be specified independently like:\n\n```js\nclassNames={{\n appear: 'my-appear',\n appearActive: 'my-appear-active',\n appearDone: 'my-appear-done',\n enter: 'my-enter',\n enterActive: 'my-enter-active',\n enterDone: 'my-enter-done',\n exit: 'my-exit',\n exitActive: 'my-exit-active',\n exitDone: 'my-exit-done'\n}}\n```",name:"classNames",required:!1,type:{name:"string | CSSTransitionClassNames"}},animation:{defaultValue:null,description:"",name:"animation",required:!1,type:{name:"enum",value:[{value:'"zoom-in-top"'},{value:'"zoom-in-left"'},{value:'"zoom-in-bottom"'},{value:'"zoom-in-right"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Transition/index.tsx#Transition"]={docgenInfo:Transition.__docgenInfo,name:"Transition",path:"src/components/Transition/index.tsx#Transition"})}catch(__react_docgen_typescript_loader_error){}var hooks_useDebounce=function useDebounce(value){var delay=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,_useState=(0,react.useState)(value),_useState2=(0,slicedToArray.Z)(_useState,2),debouncedValue=_useState2[0],setDebouncedValue=_useState2[1];return(0,react.useEffect)((function(){var handler=window.setTimeout((function(){setDebouncedValue(value)}),delay);return function(){clearTimeout(handler)}}),[value,delay]),debouncedValue};var hooks_useClickOutside=function useClickOutside(ref,handler){(0,react.useEffect)((function(){var listener=function listener(event){ref.current&&!ref.current.contains(event.target)&&handler(event)};return document.addEventListener("click",listener),function(){document.removeEventListener("click",listener)}}),[ref,handler])},IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),autoComplete_excluded=["fetchSuggestions","onSelect","value","renderOption"],AutoComplete_autoComplete=function AutoComplete(props){var fetchSuggestions=props.fetchSuggestions,onSelect=props.onSelect,value=props.value,renderOption=props.renderOption,restProps=(0,objectWithoutProperties.Z)(props,autoComplete_excluded),_useState=(0,react.useState)(value),_useState2=(0,slicedToArray.Z)(_useState,2),inputValue=_useState2[0],setInputValue=_useState2[1],_useState3=(0,react.useState)([]),_useState4=(0,slicedToArray.Z)(_useState3,2),suggestions=_useState4[0],setSugestions=_useState4[1],_useState5=(0,react.useState)(!1),_useState6=(0,slicedToArray.Z)(_useState5,2),showDropdown=_useState6[0],setShowDropdown=_useState6[1],triggerSearch=(0,react.useRef)(!1),_useState7=(0,react.useState)(!1),_useState8=(0,slicedToArray.Z)(_useState7,2),loading=_useState8[0],setLoading=_useState8[1],_useState9=(0,react.useState)(-1),_useState10=(0,slicedToArray.Z)(_useState9,2),highlightIndex=_useState10[0],setHighlightIndex=_useState10[1],componentRef=(0,react.useRef)(null),debouncedValue=hooks_useDebounce(inputValue,300);hooks_useClickOutside(componentRef,(function(){setShowDropdown(!1),setSugestions([])})),(0,react.useEffect)((function(){if(debouncedValue&&triggerSearch.current){setSugestions([]);var results=fetchSuggestions(debouncedValue);results instanceof Promise?(setLoading(!0),results.then((function(data){setLoading(!1),setSugestions(data),data.length>0&&setShowDropdown(!0)}))):(setSugestions(results),setShowDropdown(!0),results.length>0&&setShowDropdown(!0))}else setShowDropdown(!1);setHighlightIndex(-1)}),[debouncedValue,fetchSuggestions]);var handleSelect=function handleSelect(item){setInputValue(item.value),setShowDropdown(!1),onSelect&&onSelect(item),triggerSearch.current=!1},renderTemplate=function renderTemplate(item){return renderOption?renderOption(item):item.value},highlight=function highlight(index){index<0&&(index=0),index>=suggestions.length&&(index=suggestions.length-1),setHighlightIndex(index)};return(0,jsx_runtime.jsxs)("div",{className:"dui-auto-complete",ref:componentRef,children:[(0,jsx_runtime.jsx)(Input.Z,(0,objectSpread2.Z)({value:inputValue,onChange:function handleChange(e){var value=e.target.value.trim();setInputValue(value),triggerSearch.current=!0},onKeyDown:function handleKeyDown(e){switch(e.keyCode){case 13:suggestions[highlightIndex]&&handleSelect(suggestions[highlightIndex]);break;case 38:highlight(highlightIndex-1);break;case 40:highlight(highlightIndex+1);break;case 27:setShowDropdown(!1)}}},restProps)),function generateDropdown(){return(0,jsx_runtime.jsx)(components_Transition,{in:showDropdown||loading,animation:"zoom-in-top",timeout:300,onExited:function onExited(){setSugestions([])},children:(0,jsx_runtime.jsxs)("ul",{className:"dui-suggestion-list",children:[loading&&(0,jsx_runtime.jsx)("div",{className:"suggstions-loading-icon",children:(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-loading",spin:!0})}),null==suggestions?void 0:suggestions.map((function(item,index){var cnames=classnames_default()("suggestion-item",{"is-active":index===highlightIndex});return(0,jsx_runtime.jsx)("li",{className:cnames,onClick:function onClick(){return handleSelect(item)},children:renderTemplate(item)},index)}))]})})}()]})};try{autoComplete.displayName="autoComplete",autoComplete.__docgenInfo={description:"",displayName:"autoComplete",props:{fetchSuggestions:{defaultValue:null,description:"",name:"fetchSuggestions",required:!0,type:{name:"(str: string) => DataSourceType>[] | Promise>[]>"}},onSelect:{defaultValue:null,description:"",name:"onSelect",required:!1,type:{name:"((item: DataSourceType>) => void)"}},renderOption:{defaultValue:null,description:"",name:"renderOption",required:!1,type:{name:"((item: DataSourceType>) => ReactElement>)"}},disabled:{defaultValue:null,description:"是否禁用 Input",name:"disabled",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"设置 input 大小,支持 lg 或者是 sm",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"sm"'}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((e: ChangeEvent) => void)"}},icon:{defaultValue:null,description:"添加图标,在右侧悬浮添加一个图标,用于提示",name:"icon",required:!1,type:{name:"ReactNode"}},prepend:{defaultValue:null,description:"添加前缀 用于配置一些固定组合",name:"prepend",required:!1,type:{name:"string | ReactElement>"}},append:{defaultValue:null,description:"添加后缀 用于配置一些固定组合",name:"append",required:!1,type:{name:"string | ReactElement>"}},allowClear:{defaultValue:null,description:"是否允许清除",name:"allowClear",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/AutoComplete/autoComplete.tsx#autoComplete"]={docgenInfo:autoComplete.__docgenInfo,name:"autoComplete",path:"src/components/AutoComplete/autoComplete.tsx#autoComplete"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("AutoComplete自动完成",module).addParameters({storySource:{source:"import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport { action } from \"@storybook/addon-actions\";\nimport AutoComplete from \"./autoComplete\";\n// interface LakerPlayerProps {\n// value: string;\n// number: number;\n// }\n// interface GithubUserProps {\n// login: string;\n// url: string;\n// avatar_url: string;\n// }\nconst SimpleComplete = () => {\n // const lakers = ['bradley', 'pope', 'caruso', 'cook', 'cousins',\n // 'james', 'AD', 'green', 'howard', 'kuzma', 'McGee', 'rando']\n // const lakersWithNumber = [\n // {value: 'bradley', number: 11},\n // {value: 'pope', number: 1},\n // {value: 'caruso', number: 4},\n // {value: 'cook', number: 2},\n // {value: 'cousins', number: 15},\n // {value: 'james', number: 23},\n // {value: 'AD', number: 3},\n // {value: 'green', number: 14},\n // {value: 'howard', number: 39},\n // {value: 'kuzma', number: 0},\n // ]\n // const handleFetch = (query: string) => {\n // return lakers.filter(name => name.includes(query)).map(name => ({value: name}))\n // }\n // const handleFetch = (query: string) => {\n // return lakersWithNumber.filter(player => player.value.includes(query))\n // }\n const handleFetch = (query: string) => {\n return fetch(`https://api.github.com/search/users?q=${query}`)\n .then((res) => res.json())\n .then(({ items }) => {\n console.log(items);\n return items\n .slice(0, 10)\n .map((item: any) => ({ value: item.login, ...item }));\n });\n };\n\n // const renderOption = (item: DataSourceType) => {\n // const itemWithGithub = item as DataSourceType\n // return (\n // <>\n //

Name: {itemWithGithub.value}

\n //

url: {itemWithGithub.url}

\n // \n // )\n // }\n return (\n \n );\n};\n\nstoriesOf(\"AutoComplete自动完成\", module).add(\"AutoComplete\", SimpleComplete);\n",locationsMap:{autocomplete:{startLoc:{col:42,line:64},endLoc:{col:72,line:64},startBody:{col:58,line:64},endBody:{col:72,line:64}}}}}).add("AutoComplete",(function SimpleComplete(){return(0,jsx_runtime.jsx)(AutoComplete_autoComplete,{fetchSuggestions:function handleFetch(query){return fetch("https://api.github.com/search/users?q=".concat(query)).then((function(res){return res.json()})).then((function(_ref){var items=_ref.items;return console.log(items),items.slice(0,10).map((function(item){return(0,objectSpread2.Z)({value:item.login},item)}))}))},onSelect:(0,esm.action)("selected")})}))},"./src/components/BackTop/backtop.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),BackTop=function BackTop(props){var children=props.children,_props$duration=props.duration,duration=void 0===_props$duration?450:_props$duration,onClick=props.onClick,_props$visibilityHeig=props.visibilityHeight,visibilityHeight=void 0===_props$visibilityHeig?400:_props$visibilityHeig,_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),visibile=_useState2[0],setVisibile=_useState2[1],classNames=classnames_default()("dui-back-top",{"dui-back-top-show":visibile});if(children&&!react.isValidElement(children))throw new TypeError("BackTop's Children must be a valid element");var handleScroll=function handleScroll(){var top=getTopScroll();setVisibile(top>visibilityHeight)},getTopScroll=function getTopScroll(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},removeScorllListener=function removeScorllListener(){return window.removeEventListener("scroll",handleScroll)},easeInOutQuad=function easeInOutQuad(t){return t<.5?2*t*t:(4-2*t)*t-1};return(0,react.useEffect)((function(){return function addScorllListener(){window.addEventListener("scroll",handleScroll)}(),removeScorllListener}),[]),(0,jsx_runtime.jsx)("div",{className:classNames,onClick:function backTopHandle(){onClick&&onClick(),function scrollToTop(duration){var start,startingY=getTopScroll(),diff=-1*startingY;window.requestAnimationFrame((function step(timestamp){start||(start=timestamp);var time=timestamp-start,percent=Math.min(time/duration,1),eased=easeInOutQuad(percent);window.scrollTo(0,startingY+diff*eased),time void)"}},style:{defaultValue:null,description:"自定义样式",name:"style",required:!1,type:{name:"CSSProperties"}},className:{defaultValue:null,description:"自定义类名",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/BackTop/index.tsx#BackTop"]={docgenInfo:BackTop.__docgenInfo,name:"BackTop",path:"src/components/BackTop/index.tsx#BackTop"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("BackTop 回到顶部",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport BackTop from "./index";\n\n\nconst defaultBackTop = () => {\n return
\n
滑动试试
\n
滑动试试
\n \n
\n}\n\nstoriesOf("BackTop 回到顶部", module)\n .add("BackTop", defaultBackTop)\n',locationsMap:{backtop:{startLoc:{col:7,line:15},endLoc:{col:32,line:15},startBody:{col:18,line:15},endBody:{col:32,line:15}}}}}).add("BackTop",(function defaultBackTop(){return(0,jsx_runtime.jsxs)("div",{style:{height:"50vh"},children:[(0,jsx_runtime.jsx)("div",{children:"滑动试试"}),(0,jsx_runtime.jsx)("div",{children:"滑动试试"}),(0,jsx_runtime.jsx)(components_BackTop,{})]})}))},"./src/components/Button/button.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var _storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_index__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Button/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Button按钮",module).addParameters({storySource:{source:'// import React from "react";\n// import { ComponentStory, ComponentMeta } from "@storybook/react";\n\n// import Button from "./index";\n\n// // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export\n// export default {\n// title: "Example/Button",\n// component: Button,\n// // More on argTypes: https://storybook.js.org/docs/react/api/argtypes\n// // argTypes: {\n// // backgroundColor: { control: "color" },\n// // },\n// } as ComponentMeta;\n\n// // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args\n// const Template: ComponentStory = (args) => \n);\n\n// const buttonWithSize = () => ;\nconst buttonWithSize = () => (\n <>\n \n \n \n);\n\nconst buttonWithType = () => (\n <>\n \n \n \n \n);\n\nstoriesOf("Button按钮", module)\n // .addDecorator(withInfo)\n // .addParameters({\n // info:{\n // inline: true\n // }\n // })\n .add("Button", defaultButton)\n .add("不同尺寸的Button", buttonWithSize)\n .add("不同类型的Button", buttonWithType);\n',locationsMap:{"不同类型的button":{startLoc:{col:7,line:72},endLoc:{col:36,line:72},startBody:{col:22,line:72},endBody:{col:36,line:72}},"不同尺寸的button":{startLoc:{col:7,line:71},endLoc:{col:36,line:71},startBody:{col:22,line:71},endBody:{col:36,line:71}},button:{startLoc:{col:7,line:70},endLoc:{col:30,line:70},startBody:{col:17,line:70},endBody:{col:30,line:70}}}}}).add("Button",(function defaultButton(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{onClick:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__.action)("clicked"),children:" default button "})})).add("不同尺寸的Button",(function buttonWithSize(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{size:"small",children:" small button "}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{size:"large",children:" large button "})]})})).add("不同类型的Button",(function buttonWithType(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",children:" primary button "}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{danger:!0,children:" danger button "}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"link",children:" link button "})]})}))},"./src/components/Carousel/carousel.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),image1=__webpack_require__("./src/assets/image1.webp"),image2_namespaceObject=__webpack_require__.p+"58fba7e86cc2750f7f6a.webp",image3_namespaceObject=__webpack_require__.p+"81147bba5443662412b3.webp",slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Carousel=react.forwardRef((function(props,ref){var children=props.children,autoplay=props.autoplay,_props$easing=props.easing,easing=void 0===_props$easing?"linear":_props$easing,_props$dots=props.dots,dots=void 0===_props$dots||_props$dots,_props$arrows=props.arrows,arrows=void 0!==_props$arrows&&_props$arrows,_useState=(0,react.useState)(0),_useState2=(0,slicedToArray.Z)(_useState,2),active=_useState2[0],setActive=_useState2[1],activeRef=(0,react.useRef)(active);(0,react.useImperativeHandle)(ref,(function(){return{next:onNextHandle,prev:onPrevHandle,moveTo:moveTo}}));var renderChildren=react.Children.map(react.Children.map(children,(function(child){return child})),(function(child){var newChild=child;return react.cloneElement(newChild,{className:"dui-carousel-item"})}));(0,react.useEffect)((function(){activeRef.current=active}),[active]),(0,react.useEffect)((function(){if(react.Children.count(renderChildren)>1&&autoplay){var timer=setInterval((function(){onNextHandle()}),5e3);return function(){return clearInterval(timer)}}}),[]);var classes=classnames_default()("dui-carousel"),moveTo=function moveTo(index){var element=document.querySelector(".dui-carousel-container"),elementItem=document.querySelectorAll(".dui-carousel-item");element.style.transform="translate(-".concat(index,"00%)"),element.style.transition="all .5s ".concat(easing),setTimeout((function(){elementItem[elementItem.length-1].style.transform="none",elementItem[0].style.transform="none"}),500),setActive(index)},changeStyleHandle=function changeStyleHandle(type){var element=document.querySelector(".dui-carousel-container"),elementItem=document.querySelectorAll(".dui-carousel-item");("prev"===type?elementItem[0]:elementItem[elementItem.length-1]).style.transform="prev"===type?"translate(".concat(elementItem.length,"00%)"):"translate(-".concat(elementItem.length,"00%)"),element.style.transform="prev"===type?"translate(-".concat(elementItem.length,"00%)"):"translate(".concat(elementItem.length-activeRef.current,"00%)"),element.style.transition="none",element.clientHeight,moveTo("prev"===type?elementItem.length-1:0)},onPrevHandle=function onPrevHandle(){0===active?changeStyleHandle("prev"):moveTo(active-1)},onNextHandle=function onNextHandle(){var elementItem=document.querySelectorAll(".dui-carousel-item");activeRef.current===elementItem.length-1?changeStyleHandle("next"):moveTo(activeRef.current+1)};return(0,jsx_runtime.jsxs)("div",{className:classes,children:[(0,jsx_runtime.jsx)("div",{className:"dui-carousel-container",children:renderChildren}),react.Children.count(renderChildren)>1?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[dots?(0,jsx_runtime.jsx)("div",{className:"dui-carousel-indicator",children:function renderIndicator(){return null==renderChildren?void 0:renderChildren.map((function(_indicator,index){return(0,jsx_runtime.jsx)("span",{className:classnames_default()({"dui-carousel-indicator-active":active===index}),onClick:function onClick(){return moveTo(index)}},index)}))}()}):null,arrows?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"dui-carousel-prev",onClick:onPrevHandle,children:"<"}),(0,jsx_runtime.jsx)("div",{className:"dui-carousel-next",onClick:onNextHandle,children:">"})]}):null]}):null]})})),components_Carousel=Carousel;try{Carousel.displayName="Carousel",Carousel.__docgenInfo={description:"",displayName:"Carousel",props:{autoplay:{defaultValue:null,description:"是否自动播放",name:"autoplay",required:!1,type:{name:"boolean"}},easing:{defaultValue:null,description:"播放速率",name:"easing",required:!1,type:{name:"enum",value:[{value:'"linear"'},{value:'"ease"'},{value:'"ease-in"'},{value:'"ease-in-out"'},{value:'"ease-out"'}]}},dots:{defaultValue:null,description:"是否显示指示点 子节点为1时不生效",name:"dots",required:!1,type:{name:"boolean"}},arrows:{defaultValue:null,description:"是否显示左右箭头",name:"arrows",required:!1,type:{name:"boolean"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"Ref"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Carousel/index.tsx#Carousel"]={docgenInfo:Carousel.__docgenInfo,name:"Carousel",path:"src/components/Carousel/index.tsx#Carousel"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Carousel轮播",module).addParameters({storySource:{source:'import React, { useRef } from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\nimport image1 from "../../assets/image1.webp";\nimport image2 from "../../assets/image2.webp";\nimport image3 from "../../assets/image3.webp";\n\nimport Carousel from "./index";\nimport { CarouselRefProps } from "./index";\n\nconst defaultCarousel = () => (\n
\n \n image1\n image2\n image3\n \n
\n);\n\nconst autoWithArrowsCarousel = () => (\n
\n \n image1\n image2\n image3\n \n
\n);\n\nconst refsWithCarousel = () => {\n const myref = useRef(null);\n const handle = () => {\n console.log("myref", myref);\n if (myref && myref.current) {\n myref?.current?.moveTo(1);\n }\n };\n return (\n
\n \n {/* SDASD */}\n {/**SDASD */}\n \n image1\n image2\n image3\n {null}\n {undefined}\n \n
\n );\n};\n\nstoriesOf("Carousel轮播", module)\n .add("Carousel", defaultCarousel)\n .add("带箭头和autoplay的Carousel", autoWithArrowsCarousel)\n .add("通过ref控制Carousel", refsWithCarousel);\n',locationsMap:{"通过ref控制carousel":{startLoc:{col:7,line:58},endLoc:{col:42,line:58},startBody:{col:26,line:58},endBody:{col:42,line:58}},"带箭头和autoplay的carousel":{startLoc:{col:7,line:57},endLoc:{col:54,line:57},startBody:{col:32,line:57},endBody:{col:54,line:57}},carousel:{startLoc:{col:7,line:56},endLoc:{col:34,line:56},startBody:{col:19,line:56},endBody:{col:34,line:56}}}}}).add("Carousel",(function defaultCarousel(){return(0,jsx_runtime.jsx)("div",{style:{width:"50%"},children:(0,jsx_runtime.jsxs)(components_Carousel,{children:[(0,jsx_runtime.jsx)("img",{src:image1,alt:"image1"}),(0,jsx_runtime.jsx)("img",{src:image2_namespaceObject,alt:"image2"}),(0,jsx_runtime.jsx)("img",{src:image3_namespaceObject,alt:"image3"})]})})})).add("带箭头和autoplay的Carousel",(function autoWithArrowsCarousel(){return(0,jsx_runtime.jsx)("div",{style:{width:"50%"},children:(0,jsx_runtime.jsxs)(components_Carousel,{autoplay:!0,arrows:!0,children:[(0,jsx_runtime.jsx)("img",{src:image1,alt:"image1"}),(0,jsx_runtime.jsx)("img",{src:image2_namespaceObject,alt:"image2"}),(0,jsx_runtime.jsx)("img",{src:image3_namespaceObject,alt:"image3"})]})})})).add("通过ref控制Carousel",(function refsWithCarousel(){var myref=(0,react.useRef)(null);return(0,jsx_runtime.jsxs)("div",{style:{width:"50%"},children:[(0,jsx_runtime.jsx)("button",{onClick:function handle(){var _myref$current;(console.log("myref",myref),myref&&myref.current)&&(null==myref||null===(_myref$current=myref.current)||void 0===_myref$current||_myref$current.moveTo(1))},children:"移动到第二张图片"}),(0,jsx_runtime.jsxs)(components_Carousel,{ref:myref,arrows:!0,children:[(0,jsx_runtime.jsx)("img",{src:image1,alt:"image1"}),(0,jsx_runtime.jsx)("img",{src:image2_namespaceObject,alt:"image2"}),(0,jsx_runtime.jsx)("img",{src:image3_namespaceObject,alt:"image3"}),null,void 0]})]})}))},"./src/components/Divider/divider.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),defineProperty=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Divider=function Divider(props){var _props$type=props.type,type=void 0===_props$type?"horizontal":_props$type,children=props.children,dashed=props.dashed,plain=props.plain,orientation=props.orientation,classNames=classnames_default()("dui-divider","dui-divider-".concat(type),(0,defineProperty.Z)({},"ant-divider-with-text-".concat(orientation),"horizontal"==type),{"dui-divider-dashed":dashed&&"horizontal"==type},{"dui-divider-plain":plain&&"horizontal"==type});return"vertical"===type&&children&&console.warn("children not working in vertical mode"),(0,jsx_runtime.jsx)("div",{className:classNames,children:"vertical"===type?null:children?(0,jsx_runtime.jsx)("span",{className:"ant-divider-inner-text",children:children}):null})};Divider.defaultProps={plain:!1,orientation:"center",type:"horizontal",dashed:!1};var components_Divider=Divider;try{Divider.displayName="Divider",Divider.__docgenInfo={description:"Divider 分割线\n区隔内容的分割线。\n### 引用方法\n\n~~~js\nimport { Divider } from 'jadedui'\n~~~",displayName:"Divider",props:{className:{defaultValue:null,description:"分割线样式类",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"分割线样式对象",name:"style",required:!1,type:{name:"CSSProperties"}},plain:{defaultValue:{value:"false"},description:"文字是否显示为普通正文样式",name:"plain",required:!1,type:{name:"boolean"}},dashed:{defaultValue:{value:"false"},description:"是否虚线",name:"dashed",required:!1,type:{name:"boolean"}},orientation:{defaultValue:{value:"center"},description:"分割线标题的位置",name:"orientation",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"right"'},{value:'"center"'}]}},type:{defaultValue:{value:"horizontal"},description:"水平还是垂直类型",name:"type",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Divider/index.tsx#Divider"]={docgenInfo:Divider.__docgenInfo,name:"Divider",path:"src/components/Divider/index.tsx#Divider"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Divider 分割线",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n\nimport Divider from "./index";\n\nconst defaultDivider = () => (\n <>\n Text\n 我是一段文本\n \n 我是一段文本\n \n);\n\nconst plainTextDivider = () => Text;\n\nconst textOrientation = () => (\n <>\n \n Text\n \n 我是一段文本\n \n Text\n \n \n);\n\nconst verticalDivider = () => (\n <>\n Text\n \n Link\n \n Link\n \n);\n\nstoriesOf("Divider 分割线", module)\n .add("默认分割线", defaultDivider)\n .add("普通文本", plainTextDivider)\n .add("文字对齐", textOrientation)\n .add("垂直方向", verticalDivider);\n',locationsMap:{"垂直方向":{startLoc:{col:7,line:43},endLoc:{col:30,line:43},startBody:{col:15,line:43},endBody:{col:30,line:43}},"文字对齐":{startLoc:{col:7,line:42},endLoc:{col:30,line:42},startBody:{col:15,line:42},endBody:{col:30,line:42}},"普通文本":{startLoc:{col:7,line:41},endLoc:{col:31,line:41},startBody:{col:15,line:41},endBody:{col:31,line:41}},"默认分割线":{startLoc:{col:7,line:40},endLoc:{col:30,line:40},startBody:{col:16,line:40},endBody:{col:30,line:40}}}}}).add("默认分割线",(function defaultDivider(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_Divider,{children:"Text"}),(0,jsx_runtime.jsx)("span",{children:"我是一段文本"}),(0,jsx_runtime.jsx)(components_Divider,{}),(0,jsx_runtime.jsx)("span",{children:"我是一段文本"})]})})).add("普通文本",(function plainTextDivider(){return(0,jsx_runtime.jsx)(components_Divider,{plain:!0,children:"Text"})})).add("文字对齐",(function textOrientation(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_Divider,{plain:!0,orientation:"left",children:"Text"}),(0,jsx_runtime.jsx)("span",{children:"我是一段文本"}),(0,jsx_runtime.jsx)(components_Divider,{plain:!0,orientation:"right",children:"Text"})]})})).add("垂直方向",(function verticalDivider(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:["Text",(0,jsx_runtime.jsx)(components_Divider,{type:"vertical"}),(0,jsx_runtime.jsx)("a",{href:"#",children:"Link"}),(0,jsx_runtime.jsx)(components_Divider,{type:"vertical"}),(0,jsx_runtime.jsx)("a",{href:"#",children:"Link"})]})}))},"./src/components/Empty/empty.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),image1=__webpack_require__("./src/assets/image1.webp"),IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Empty=function Empty(props){var _props$description=props.description,description=void 0===_props$description?"暂无数据":_props$description,image=props.image,imageStyle=props.imageStyle;return(0,jsx_runtime.jsxs)("div",{className:"dui-empty",style:imageStyle,children:[(0,jsx_runtime.jsx)("div",{className:"dui-empty-image",children:function renderEmptImage(){return image?"string"==typeof image?(0,jsx_runtime.jsx)("img",{src:image,alt:"No data"}):image:(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-zanwushuju1",style:{fontSize:"xxx-large"}})}()}),(0,jsx_runtime.jsx)("div",{className:"ant-empty-description",children:description})]})};Empty.defaultProps={description:"暂无数据"};var components_Empty=Empty;try{Empty.displayName="Empty",Empty.__docgenInfo={description:"Empty 空状态时的展示占位图\n\n当目前没有数据时,用于显式的用户提示\n初始化场景时的引导创建流程\n\n~~~js\n// 这样引用\nimport { Empty } from 'jadedui'\n~~~",displayName:"Empty",props:{description:{defaultValue:{value:"暂无数据"},description:"自定义描述内容",name:"description",required:!1,type:{name:"string"}},image:{defaultValue:null,description:"设置显示图片,为 string 时表示自定义图片地址。",name:"image",required:!1,type:{name:"ReactNode"}},imageStyle:{defaultValue:null,description:"图片样式",name:"imageStyle",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Empty/index.tsx#Empty"]={docgenInfo:Empty.__docgenInfo,name:"Empty",path:"src/components/Empty/index.tsx#Empty"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Empty空状态",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport image from "../../assets/image1.webp";\nimport Empty from "./index";\n\nconst EmptyComp = () => ;\n\nconst EmptyWithImage = () => ;\n\n\nstoriesOf("Empty空状态", module)\n .add("Empty", EmptyComp)\n .add("Empty自定义image", EmptyWithImage)\n',locationsMap:{"empty自定义image":{startLoc:{col:7,line:13},endLoc:{col:38,line:13},startBody:{col:24,line:13},endBody:{col:38,line:13}},empty:{startLoc:{col:7,line:12},endLoc:{col:25,line:12},startBody:{col:16,line:12},endBody:{col:25,line:12}}}}}).add("Empty",(function EmptyComp(){return(0,jsx_runtime.jsx)(components_Empty,{})})).add("Empty自定义image",(function EmptyWithImage(){return(0,jsx_runtime.jsx)(components_Empty,{image:image1})}))},"./src/components/IconFont/icon.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var _storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),_index__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/IconFont/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Icon图标",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\n// import { withInfo } from \'@storybook/addon-info\'\n\nimport Icon from "./index";\n\nconst IconFontComp = () => (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n);\n\nconst SpinIconFont = () => ;\n\nstoriesOf("Icon图标", module)\n .add("IconFont", IconFontComp)\n .add("旋转Icon", SpinIconFont);\n',locationsMap:{"旋转icon":{startLoc:{col:7,line:36},endLoc:{col:29,line:36},startBody:{col:17,line:36},endBody:{col:29,line:36}},iconfont:{startLoc:{col:7,line:35},endLoc:{col:31,line:35},startBody:{col:19,line:35},endBody:{col:31,line:35}}}}}).add("IconFont",(function IconFontComp(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{style:{width:500,display:"flex",justifyContent:"space-evenly"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-closefill",color:"red"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-propertysafety-fill",color:"red"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-mobile"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-folder-add"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-wifi"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-tag"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-arrowright"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-arrowup"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-arrowleft"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-arrowdown"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-YUAN"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-edit-square"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-deleteteam"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-transaction"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-folder-open-fill"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-dashboard-fill"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-customerservice-fill"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-small-dash"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-fullscreen"})]})})).add("旋转Icon",(function SpinIconFont(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-loading",spin:!0})}))},"./src/components/Input/input.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),_index__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Input/index.tsx"),_IconFont_index__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/IconFont/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);var ControlledInput=function ControlledInput(){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),_useState2=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_useState,2),value=_useState2[0],setValue=_useState2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{value:value,defaultValue:value,onChange:function onChange(e){setValue(e.target.value)}})};(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Input 输入框",module).addParameters({storySource:{source:'import React, { useState } from "react";\nimport { storiesOf } from "@storybook/react";\nimport { action } from "@storybook/addon-actions";\nimport Input from "./index";\nimport IconFont from "../IconFont/index";\nconst ControlledInput = () => {\n const [value, setValue] = useState();\n return (\n {\n setValue(e.target.value as any);\n }}\n />\n );\n};\nconst defaultInput = () => (\n <>\n \n \n \n);\nconst disabledInput = () => (\n \n);\n\nconst iconInput = () => (\n }\n />\n);\n\nconst sizeInput = () => (\n <>\n \n \n \n);\n\nconst pandInput = () => (\n <>\n \n \n \n);\n\nstoriesOf("Input 输入框", module)\n .add("Input", defaultInput)\n .add("被禁用的 Input", disabledInput)\n .add("带图标的 Input", iconInput)\n .add("大小不同的 Input", sizeInput)\n .add("带前后缀的 Input", pandInput);\n',locationsMap:{"带前后缀的-input":{startLoc:{col:7,line:59},endLoc:{col:31,line:59},startBody:{col:22,line:59},endBody:{col:31,line:59}},"大小不同的-input":{startLoc:{col:7,line:58},endLoc:{col:31,line:58},startBody:{col:22,line:58},endBody:{col:31,line:58}},"带图标的-input":{startLoc:{col:7,line:57},endLoc:{col:30,line:57},startBody:{col:21,line:57},endBody:{col:30,line:57}},"被禁用的-input":{startLoc:{col:7,line:56},endLoc:{col:34,line:56},startBody:{col:21,line:56},endBody:{col:34,line:56}},input:{startLoc:{col:7,line:55},endLoc:{col:28,line:55},startBody:{col:16,line:55},endBody:{col:28,line:55}}}}}).add("Input",(function defaultInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},placeholder:"placeholder",onChange:(0,_storybook_addon_actions__WEBPACK_IMPORTED_MODULE_2__.action)("changed")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(ControlledInput,{})]})})).add("被禁用的 Input",(function disabledInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},placeholder:"disabled input",disabled:!0})})).add("带图标的 Input",(function iconInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},placeholder:"input with icon",icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont_index__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-closefill"})})})).add("大小不同的 Input",(function sizeInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},value:"large size",size:"lg"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},placeholder:"small size",size:"sm"})]})})).add("带前后缀的 Input",(function pandInput(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},value:"prepend text",prepend:"https://"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_3__.Z,{style:{width:"300px"},value:"google",append:".com"})]})}))},"./src/components/Menu/menu.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),menuContext=(0,react.createContext)({}),Menu=function Menu(props){var className=props.className,style=props.style,children=props.children,mode=props.mode,defaultSelectedKey=props.defaultSelectedKey,onSelect=props.onSelect,_useState=(0,react.useState)(defaultSelectedKey||""),_useState2=(0,slicedToArray.Z)(_useState,2),activeKey=_useState2[0],setActiveKey=_useState2[1],passonContext={activeKey:activeKey,mode:mode,onSelect:function onHandleSelect(key){setActiveKey(key),onSelect&&onSelect(key)}},classes=classnames_default()("dui-menu",className,{"dui-menu-horizontal":"horizontal"===mode,"dui-menu-vertical":"vertical"===mode});return(0,jsx_runtime.jsx)("ul",{style:style,className:classes,children:(0,jsx_runtime.jsx)(menuContext.Provider,{value:passonContext,children:function renderChildren(){return react.Children.map(children,(function(child,index){var newChildren=child,displayName=newChildren.type.displayName;if("MenuItem"===displayName||"SubMenu"===displayName)return react.cloneElement(newChildren,{index:index.toString(),eventKey:newChildren.key});console.warn("Warning: Menu has a child which is not a MenuItem component")}))}()})})},Menu_Menu=Menu;Menu.defaultProps={mode:"horizontal"};try{Menu.displayName="Menu",Menu.__docgenInfo={description:"为页面和功能提供导航的菜单列表\n### 引用方法\n\n~~~js\nimport { Menu } from 'jadedui'\n~~~",displayName:"Menu",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}},defaultSelectedKey:{defaultValue:null,description:"默认选中的menu",name:"defaultSelectedKey",required:!1,type:{name:"string"}},onSelect:{defaultValue:null,description:"选中时的回调函数",name:"onSelect",required:!1,type:{name:"((key: string) => void)"}},mode:{defaultValue:{value:"horizontal"},description:"menu模式",name:"mode",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Menu/Menu.tsx#Menu"]={docgenInfo:Menu.__docgenInfo,name:"Menu",path:"src/components/Menu/Menu.tsx#Menu"})}catch(__react_docgen_typescript_loader_error){}var MenuItem=function MenuItem(props){var className=props.className,children=props.children,eventKey=props.eventKey,index=props.index,disabled=props.disabled,_useState=(0,react.useState)(""),_useState2=(0,slicedToArray.Z)(_useState,2),currentHover=_useState2[0],setCurrentHover=_useState2[1],context=(0,react.useContext)(menuContext),classes=classnames_default()("dui-menu-item",className,currentHover,{"dui-menu-item-active":function shouldActive(){var _context$activeKey;return(!eventKey||"string"==typeof eventKey)&&(context.activeKey===(eventKey||index)||0===(null===(_context$activeKey=context.activeKey)||void 0===_context$activeKey?void 0:_context$activeKey.indexOf(eventKey||index)))}(),"dui-menu-item-disabled":disabled});return(0,jsx_runtime.jsx)("li",{className:classes,onClick:function handleClick(){context.onSelect&&!disabled&&(index&&context.onSelect(index),eventKey&&context.onSelect(eventKey))},onMouseEnter:function onMouseEnter(){disabled||setCurrentHover("dui-menu-item-hover")},onMouseLeave:function onMouseLeave(){setCurrentHover("")},children:(0,jsx_runtime.jsx)("span",{className:"ant-menu-title-content",children:children})})};MenuItem.displayName="MenuItem";var Menu_MenuItem=MenuItem;try{MenuItem.displayName="MenuItem",MenuItem.__docgenInfo={description:"",displayName:"MenuItem",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},eventKey:{defaultValue:null,description:"",name:"eventKey",required:!1,type:{name:"string"}},index:{defaultValue:null,description:"",name:"index",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"是否禁用",name:"disabled",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Menu/MenuItem.tsx#MenuItem"]={docgenInfo:MenuItem.__docgenInfo,name:"MenuItem",path:"src/components/Menu/MenuItem.tsx#MenuItem"})}catch(__react_docgen_typescript_loader_error){}var SubMenu=function SubMenu(props){var title=props.title,children=props.children,index=props.index,eventKey=props.eventKey,disabled=props.disabled,_useState=(0,react.useState)(""),_useState2=(0,slicedToArray.Z)(_useState,2),currentHover=_useState2[0],setCurrentHover=_useState2[1],_useState3=(0,react.useState)(!1),_useState4=(0,slicedToArray.Z)(_useState3,2),collapse=_useState4[0],setCollapse=_useState4[1],context=(0,react.useContext)(menuContext),classes=classnames_default()("dui-menu-submenu",currentHover,{"dui-menu-submenu-active":function shouldActive(){var _context$activeKey,_context$activeKey2;return"vertical"!==context.mode&&((!eventKey||"string"==typeof eventKey)&&((null===(_context$activeKey=context.activeKey)||void 0===_context$activeKey?void 0:_context$activeKey.includes(eventKey))||(null===(_context$activeKey2=context.activeKey)||void 0===_context$activeKey2?void 0:_context$activeKey2.includes(index))))}(),"dui-menu-submenu-disabled":disabled}),renderSubMenuChildren=function renderSubMenuChildren(){var newChildren=children;return react.Children.map(newChildren,(function(child,subIndex){if("MenuItem"===child.type.displayName)return react.cloneElement(child,{index:eventKey?"".concat(eventKey,"-").concat(subIndex):"".concat(index,"-").concat(subIndex),eventKey:child.key});console.warn("Warning: SubMenu has a child which is not a MenuItem component")}))},handleClick=function handleClick(){disabled||setCollapse(!collapse)};return(0,jsx_runtime.jsx)("li",{className:classes,onMouseEnter:function onMouseEnter(){disabled||setCurrentHover("dui-menu-submenu-hover")},onMouseLeave:function onMouseLeave(){setCurrentHover("")},children:function renderMode(){return"vertical"===context.mode?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("span",{className:"ant-menu-title-content",onClick:handleClick,children:[title,(0,jsx_runtime.jsx)("span",{className:classnames_default()("dui-menu-submenu-icon",{"dui-menu-submenu-icon-switch":collapse}),children:">"})]}),(0,jsx_runtime.jsx)("ul",{className:classnames_default()("dui-menu-submenu-item",{"dui-menu-submenu-collapse-open":collapse}),children:renderSubMenuChildren()})]}):(0,jsx_runtime.jsxs)("span",{className:"ant-menu-title-content",children:[title,(0,jsx_runtime.jsx)("ul",{className:"dui-menu-submenu-item",children:renderSubMenuChildren()})]})}()})};SubMenu.displayName="SubMenu";var Menu_SubMenu=SubMenu;try{SubMenu.displayName="SubMenu",SubMenu.__docgenInfo={description:"",displayName:"SubMenu",props:{eventKey:{defaultValue:null,description:"",name:"eventKey",required:!1,type:{name:"string"}},index:{defaultValue:null,description:"",name:"index",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Menu/SubMenu.tsx#SubMenu"]={docgenInfo:SubMenu.__docgenInfo,name:"SubMenu",path:"src/components/Menu/SubMenu.tsx#SubMenu"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Menu菜单",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport { action } from "@storybook/addon-actions";\n\nimport Menu from "./Menu";\nimport MenuItem from "./MenuItem";\nimport SubMenu from "./SubMenu";\n\nconst defaultMenu = () => (\n \n 吃饭\n 碎觉\n 打豆豆\n \n);\nconst menuWithMenuItem = () => (\n \n 吃饭\n 碎觉\n 打豆豆\n \n 我是submenu1\n 我是submenu2\n \n \n);\n\nconst menuWithMode = () => (\n \n 我是vertical MenuItem1\n 我是vertical MenuItem2\n 我是vertical MenuItem3\n \n 我是vertical submenu1\n 我是vertical submenu2\n \n \n);\n\nstoriesOf("Menu菜单", module)\n .add("Menu", defaultMenu)\n .add("有子菜单的Menu", menuWithMenuItem)\n .add("不同方向的Menu", menuWithMode);\n',locationsMap:{"不同方向的menu":{startLoc:{col:7,line:43},endLoc:{col:32,line:43},startBody:{col:20,line:43},endBody:{col:32,line:43}},"有子菜单的menu":{startLoc:{col:7,line:42},endLoc:{col:36,line:42},startBody:{col:20,line:42},endBody:{col:36,line:42}},menu:{startLoc:{col:7,line:41},endLoc:{col:26,line:41},startBody:{col:15,line:41},endBody:{col:26,line:41}}}}}).add("Menu",(function defaultMenu(){return(0,jsx_runtime.jsxs)(Menu_Menu,{onSelect:(0,esm.action)("selected"),children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"吃饭"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"碎觉"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"打豆豆"})]})})).add("有子菜单的Menu",(function menuWithMenuItem(){return(0,jsx_runtime.jsxs)(Menu_Menu,{onSelect:(0,esm.action)("selected"),defaultSelectedKey:"1",children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"吃饭"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"碎觉"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"打豆豆"}),(0,jsx_runtime.jsxs)(Menu_SubMenu,{title:"我是SubMenu",children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是submenu1"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是submenu2"})]})]})})).add("不同方向的Menu",(function menuWithMode(){return(0,jsx_runtime.jsxs)(Menu_Menu,{style:{width:250},mode:"vertical",defaultSelectedKey:"1",children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{disabled:!0,children:"我是vertical MenuItem1"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是vertical MenuItem2"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是vertical MenuItem3"}),(0,jsx_runtime.jsxs)(Menu_SubMenu,{title:"我是vertical",children:[(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是vertical submenu1"}),(0,jsx_runtime.jsx)(Menu_MenuItem,{children:"我是vertical submenu2"})]})]})}))},"./src/components/Progress/progress.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var _home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),_index__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Progress/index.tsx"),_Button__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Button/index.tsx"),_IconFont__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/IconFont/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Progress 进度条",module).addParameters({storySource:{source:'import React, { useState } from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\nimport Progress from "./index";\nimport Button from "../Button";\nimport Icon from "../IconFont";\n\nconst defaultProgress = () => ;\n\nconst controllProgress = () => {\n const [value, setValue] = useState(0);\n return (\n <>\n \n
\n {\n setValue((pre) => {\n return pre >= 100 ? 100 : pre + 10;\n });\n }}\n >\n \n 增加\n \n\n {\n setValue((pre) => {\n return pre <= 0 ? 0 : pre - 10;\n });\n }}\n >\n \n 减少\n \n
\n \n );\n};\n\nconst customColorProgress = () => ;\n\nconst circleProgress = () => {\n const [value, setValue] = useState(20);\n return (\n <>\n \n
\n {\n setValue((pre) => {\n return pre + 10;\n });\n }}\n >\n \n 增加\n \n\n {\n setValue((pre) => {\n return pre - 10;\n });\n }}\n >\n \n 减少\n \n
\n \n );\n};\n\nstoriesOf("Progress 进度条", module)\n .add("默认 Progress", defaultProgress)\n .add("受控 Progress", controllProgress)\n .add("自定义颜色 Progress", customColorProgress)\n .add("进度圈 Progress", circleProgress);\n',locationsMap:{"进度圈-progress":{startLoc:{col:7,line:88},endLoc:{col:37,line:88},startBody:{col:23,line:88},endBody:{col:37,line:88}},"自定义颜色-progress":{startLoc:{col:7,line:87},endLoc:{col:44,line:87},startBody:{col:25,line:87},endBody:{col:44,line:87}},"受控-progress":{startLoc:{col:7,line:86},endLoc:{col:38,line:86},startBody:{col:22,line:86},endBody:{col:38,line:86}},"默认-progress":{startLoc:{col:7,line:85},endLoc:{col:37,line:85},startBody:{col:22,line:85},endBody:{col:37,line:85}}}}}).add("默认 Progress",(function defaultProgress(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{})})).add("受控 Progress",(function controllProgress(){var _useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),_useState2=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_useState,2),value=_useState2[0],setValue=_useState2[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{percent:value}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{style:{display:"flex"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_Button__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",style:{display:"flex",alignItems:"center"},onClick:function onClick(){setValue((function(pre){return pre>=100?100:pre+10}))},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-plus"}),"增加"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_Button__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",style:{display:"flex",alignItems:"center"},onClick:function onClick(){setValue((function(pre){return pre<=0?0:pre-10}))},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-minus"}),"减少"]})]})]})})).add("自定义颜色 Progress",(function customColorProgress(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{color:"#ff8235",percent:80})})).add("进度圈 Progress",(function circleProgress(){var _useState3=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(20),_useState4=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_useState3,2),value=_useState4[0],setValue=_useState4[1];return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__.Z,{color:"#ff8235",type:"circle",percent:value}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("div",{style:{display:"flex"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_Button__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",style:{display:"flex",alignItems:"center"},onClick:function onClick(){setValue((function(pre){return pre+10}))},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-plus"}),"增加"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_Button__WEBPACK_IMPORTED_MODULE_3__.Z,{type:"primary",style:{display:"flex",alignItems:"center"},onClick:function onClick(){setValue((function(pre){return pre-10}))},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_IconFont__WEBPACK_IMPORTED_MODULE_4__.Z,{type:"icon-minus"}),"减少"]})]})]})}))},"./src/components/Rate/rate.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),toConsumableArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Rate=function Rate(props){var className=props.className,value=props.value,defaultValue=props.defaultValue,character=props.character,disabled=props.disabled,onChange=props.onChange,_useState=(0,react.useState)([0,1,2,3,4]),_useState2=(0,slicedToArray.Z)(_useState,2),ids=_useState2[0],_useState3=(_useState2[1],(0,react.useState)([-1,-1])),_useState4=(0,slicedToArray.Z)(_useState3,2),rateValue=_useState4[0],setRateValue=_useState4[1],_useState5=(0,react.useState)({curIndexLi:-1,curIndexStar:-1,isFocus:!1}),_useState6=(0,slicedToArray.Z)(_useState5,2),pos=_useState6[0],setPos=_useState6[1],cls=["ant-rate-star-half","ant-rate-star-full"];if(value&&"number"!=typeof value||defaultValue&&"number"!=typeof defaultValue)throw new Error("value or defaultValue must be a number!");(0,react.useEffect)((function(){!function initRate(){if(value||defaultValue){var transValue=String(value||defaultValue).split("."),curIndexLi=Number(transValue[0]),curIndexStar=transValue[1]&&Number(transValue[1])>=5?0:-1;console.log("curIndexLi: ",curIndexLi),console.log("curIndexStar: ",curIndexStar),setRateValue([curIndexLi,curIndexStar]),setPos({curIndexLi:curIndexLi,curIndexStar:curIndexStar,isFocus:!0})}}()}),[value]);var onMouseFirstEnter=function onMouseFirstEnter(d,curStar){if(!disabled){var curIndex=ids.findIndex((function(id){return id==d}));setPos((0,objectSpread2.Z)((0,objectSpread2.Z)({},pos),{},{curIndexLi:curIndex,curIndexStar:curStar}))}},renderClassNames=function renderClassNames(key){var classNames="dui-rate-star";if(disabled&&(classNames+=" dui-rate-star-disabled"),-1===pos.curIndexLi)classNames+=" dui-rate-star-zero";else{if(keypos.curIndexLi&&(classNames+=" dui-rate-star-zero")}return classNames},rateClickHandle=function rateClickHandle(type,key){value||disabled||(onMouseFirstEnter(key,"first"===type?0:1),setRateValue([key,"first"===type?0:1]),setPos((0,objectSpread2.Z)((0,objectSpread2.Z)({},pos),{},{isFocus:!0})),onChange&&onChange("first"===type?key+.5:key+1))},renderNode=function renderNode(key){return"function"==typeof character?character(key):character};return(0,jsx_runtime.jsx)("ul",{className:classnames_default()("dui-rate",className),onMouseLeave:function onMouseLeave(){disabled||(pos.isFocus?onMouseFirstEnter.apply(void 0,(0,toConsumableArray.Z)(rateValue)):onMouseFirstEnter(-1,-1))},children:ids.map((function(key){return(0,jsx_runtime.jsxs)("li",{className:renderClassNames(key),children:[(0,jsx_runtime.jsx)("div",{className:"dui-rate-star-first",onMouseEnter:function onMouseEnter(){return onMouseFirstEnter(key,0)},onClick:function onClick(){return rateClickHandle("first",key)},children:renderNode(key)}),(0,jsx_runtime.jsx)("div",{className:"dui-rate-star-second",onMouseEnter:function onMouseEnter(){return onMouseFirstEnter(key,1)},onClick:function onClick(){return rateClickHandle("second",key)},children:renderNode(key)})]},key)}))})};Rate.defaultProps={character:(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-star"}),disabled:!1};var components_Rate=Rate;try{Rate.displayName="Rate",Rate.__docgenInfo={description:"Rate 评分\n对评价进行展示\n对事物进行快速的评级操作\n### 引用方法\n\n~~~js\nimport { Rate } from 'jadedui'\n~~~",displayName:"Rate",props:{className:{defaultValue:null,description:"自定义样式类名",name:"className",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"自定义样式对象",name:"style",required:!1,type:{name:"CSSProperties"}},value:{defaultValue:null,description:"当前数,受控值",name:"value",required:!1,type:{name:"number"}},defaultValue:{defaultValue:null,description:"默认值",name:"defaultValue",required:!1,type:{name:"number"}},disabled:{defaultValue:{value:"false"},description:"只读,无法进行交互",name:"disabled",required:!1,type:{name:"boolean"}},character:{defaultValue:{value:''},description:"自定义字符",name:"character",required:!1,type:{name:"ReactNode | ((index: number) => ReactNode)"}},onChange:{defaultValue:null,description:"选择时的回调",name:"onChange",required:!1,type:{name:"((value: number) => void)"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Rate/index.tsx#Rate"]={docgenInfo:Rate.__docgenInfo,name:"Rate",path:"src/components/Rate/index.tsx#Rate"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Rate 评分",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n// import { action } from "@storybook/addon-actions";\n// import { withInfo } from \'@storybook/addon-info\'\n\nimport Rate from "./index";\n\nconst defaultRate = () => {\n const onChange = (v: any) => {\n console.log("v: ", v);\n };\n return ;\n};\n\nconst characterRate = () => (\n <>\n \n \n } />\n \n);\n\nconst disableRate = () => ;\n\nstoriesOf("Rate 评分", module)\n .add("Rate", defaultRate)\n .add("只读 Rate", disableRate)\n .add("自定义字符 Rate", characterRate);\n',locationsMap:{"自定义字符-rate":{startLoc:{col:7,line:28},endLoc:{col:34,line:28},startBody:{col:21,line:28},endBody:{col:34,line:28}},"只读-rate":{startLoc:{col:7,line:27},endLoc:{col:29,line:27},startBody:{col:18,line:27},endBody:{col:29,line:27}},rate:{startLoc:{col:7,line:26},endLoc:{col:26,line:26},startBody:{col:15,line:26},endBody:{col:26,line:26}}}}}).add("Rate",(function defaultRate(){return(0,jsx_runtime.jsx)(components_Rate,{onChange:function onChange(v){console.log("v: ",v)}})})).add("只读 Rate",(function disableRate(){return(0,jsx_runtime.jsx)(components_Rate,{defaultValue:2.7,disabled:!0})})).add("自定义字符 Rate",(function characterRate(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_Rate,{character:"好"}),(0,jsx_runtime.jsx)(components_Rate,{character:"A"}),(0,jsx_runtime.jsx)(components_Rate,{character:function character(){return(0,jsx_runtime.jsx)("span",{children:"星"})}})]})}))},"./src/components/Space/space.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),Button=__webpack_require__("./src/components/Button/index.tsx"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),defineProperty=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),Space=function Space(props){var _gapMap$size,_props$size=props.size,size=void 0===_props$size?"small":_props$size,wrap=props.wrap,split=props.split,align=props.align,direction=props.direction,children=props.children,style=props.style,classNames=classnames_default()("dui-space",(0,defineProperty.Z)({},"dui-space-align-".concat(align),!0),(0,defineProperty.Z)({},"dui-space-".concat(direction),!0)),gap="number"==typeof size?size:null!==(_gapMap$size={small:8,middle:16,large:24}[size])&&void 0!==_gapMap$size?_gapMap$size:8,child=react.Children.toArray(children);return(0,jsx_runtime.jsx)("div",{className:classNames,style:(0,objectSpread2.Z)({gap:gap,flexWrap:wrap?"wrap":void 0},style),children:child.map((function(ch,index){return(0,jsx_runtime.jsxs)(react.Fragment,{children:[(0,jsx_runtime.jsx)("div",{className:"dui-space-item",children:ch}),index!==child.length-1&&split?(0,jsx_runtime.jsx)("span",{className:"dui-space-item-split",children:split}):null]},index)}))})};Space.defaultProps={size:"small",align:"center",direction:"horizontal",wrap:!1};var components_Space=Space;try{Space.displayName="Space",Space.__docgenInfo={description:"设置组件之间的间距,避免组件紧贴在一起,拉开统一的空间\n### 引用方法\n\n~~~js\nimport { Space } from 'jadedui'\n~~~",displayName:"Space",props:{align:{defaultValue:{value:"center"},description:"对齐方式",name:"align",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"end"'},{value:'"baseline"'},{value:'"start"'}]}},direction:{defaultValue:{value:"horizontal"},description:"间距方向",name:"direction",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}},size:{defaultValue:{value:"small"},description:"间距大小",name:"size",required:!1,type:{name:"SpaceSize"}},split:{defaultValue:null,description:"设置拆分",name:"split",required:!1,type:{name:"ReactNode"}},wrap:{defaultValue:{value:"false"},description:"是否自动换行,仅在 horizontal 时有效",name:"wrap",required:!1,type:{name:"boolean"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Space/index.tsx#Space"]={docgenInfo:Space.__docgenInfo,name:"Space",path:"src/components/Space/index.tsx#Space"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);(0,client.storiesOf)("Space 间距",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport Button from "../Button";\nimport Space from "./index";\n\nconst defaultSpace = () => (\n \n Space\n \n \n
Text
\n {null}\n {undefined}\n
\n);\n\nconst sizeSpace = () => (\n <>\n \n Space\n \n \n
Text
\n
\n
\n
\n \n Space\n \n \n
Text
\n
\n \n);\n\nconst wrapSpace = () => (\n
\n \n Space\n \n \n
Text
\n
\n
\n);\n\nconst splitSpace = () => (\n \n Space\n \n \n
Text
\n
\n);\n\nconst verticalSpace = () => (\n \n Space\n \n \n
Text
\n
\n);\n\nstoriesOf("Space 间距", module)\n .add("Space", defaultSpace)\n .add("Space 大小", sizeSpace)\n .add("Space 换行", wrapSpace)\n .add("Space 分隔符", splitSpace)\n .add("Space 垂直间距", verticalSpace);\n',locationsMap:{"space-垂直间距":{startLoc:{col:7,line:70},endLoc:{col:34,line:70},startBody:{col:21,line:70},endBody:{col:34,line:70}},"space-分隔符":{startLoc:{col:7,line:69},endLoc:{col:30,line:69},startBody:{col:20,line:69},endBody:{col:30,line:69}},"space-换行":{startLoc:{col:7,line:68},endLoc:{col:28,line:68},startBody:{col:19,line:68},endBody:{col:28,line:68}},"space-大小":{startLoc:{col:7,line:67},endLoc:{col:28,line:67},startBody:{col:19,line:67},endBody:{col:28,line:67}},space:{startLoc:{col:7,line:66},endLoc:{col:28,line:66},startBody:{col:16,line:66},endBody:{col:28,line:66}}}}}).add("Space",(function defaultSpace(){return(0,jsx_runtime.jsxs)(components_Space,{children:["Space",(0,jsx_runtime.jsx)(Button.Z,{type:"primary",children:" primary button "}),(0,jsx_runtime.jsx)(Button.Z,{danger:!0,children:" danger button "}),(0,jsx_runtime.jsx)("div",{children:"Text"}),null,void 0]})})).add("Space 大小",(function sizeSpace(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(components_Space,{size:"large",children:["Space",(0,jsx_runtime.jsx)(Button.Z,{type:"primary",children:" primary button "}),(0,jsx_runtime.jsx)(Button.Z,{danger:!0,children:" danger button "}),(0,jsx_runtime.jsx)("div",{children:"Text"})]}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsxs)(components_Space,{size:50,children:["Space",(0,jsx_runtime.jsx)(Button.Z,{type:"primary",children:" primary button "}),(0,jsx_runtime.jsx)(Button.Z,{danger:!0,children:" danger button "}),(0,jsx_runtime.jsx)("div",{children:"Text"})]})]})})).add("Space 换行",(function wrapSpace(){return(0,jsx_runtime.jsx)("div",{style:{width:300},children:(0,jsx_runtime.jsxs)(components_Space,{wrap:!0,children:["Space",(0,jsx_runtime.jsx)(Button.Z,{type:"primary",children:" primary button "}),(0,jsx_runtime.jsx)(Button.Z,{danger:!0,children:" danger button "}),(0,jsx_runtime.jsx)("div",{children:"Text"})]})})})).add("Space 分隔符",(function splitSpace(){return(0,jsx_runtime.jsxs)(components_Space,{split:"|",children:["Space",(0,jsx_runtime.jsx)(Button.Z,{type:"primary",children:" primary button "}),(0,jsx_runtime.jsx)(Button.Z,{danger:!0,children:" danger button "}),(0,jsx_runtime.jsx)("div",{children:"Text"})]})})).add("Space 垂直间距",(function verticalSpace(){return(0,jsx_runtime.jsxs)(components_Space,{direction:"vertical",size:"middle",children:["Space",(0,jsx_runtime.jsx)(Button.Z,{type:"primary",children:" primary button "}),(0,jsx_runtime.jsx)(Button.Z,{danger:!0,children:" danger button "}),(0,jsx_runtime.jsx)("div",{children:"Text"})]})}))},"./src/components/Upload/upload.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),toConsumableArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),objectWithoutProperties=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),axios=__webpack_require__("./node_modules/axios/index.js"),IconFont=__webpack_require__("./src/components/IconFont/index.tsx"),Progress=__webpack_require__("./src/components/Progress/index.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),UploadList=function UploadList(props){var fileList=props.fileList,onRemove=props.onRemove;return console.log("fileList======>",fileList),(0,jsx_runtime.jsx)("ul",{className:"dui-upload-list",children:fileList.map((function(item){return(0,jsx_runtime.jsxs)("li",{className:"dui-upload-list-item",children:[(0,jsx_runtime.jsxs)("span",{className:"file-name file-name-".concat(item.status),children:[(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-file-image"}),item.name]}),(0,jsx_runtime.jsxs)("span",{className:"file-status",children:[("uploading"===item.status||"ready"===item.status)&&(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-loading",spin:!0,color:"#3683f7"}),"success"===item.status&&(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-check-circle-fill",color:"#52c41a"}),"error"===item.status&&(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-close-circle-fill",color:"red"})]}),(0,jsx_runtime.jsx)("span",{className:"file-actions",children:(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-closefill",onClick:function onClick(){onRemove(item)}})}),"uploading"===item.status&&(0,jsx_runtime.jsx)(Progress.Z,{percent:item.percent||0})]},item.uid)}))})},Upload_UploadList=UploadList;try{UploadList.displayName="UploadList",UploadList.__docgenInfo={description:"",displayName:"UploadList",props:{fileList:{defaultValue:null,description:"",name:"fileList",required:!0,type:{name:"UploadFile[]"}},onRemove:{defaultValue:null,description:"",name:"onRemove",required:!0,type:{name:"(_file: UploadFile) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/UploadList.tsx#UploadList"]={docgenInfo:UploadList.__docgenInfo,name:"UploadList",path:"src/components/Upload/UploadList.tsx#UploadList"})}catch(__react_docgen_typescript_loader_error){}var classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),Dragger=function Dragger(props){var onFile=props.onFile,children=props.children,_useState=(0,react.useState)(!1),_useState2=(0,slicedToArray.Z)(_useState,2),dragOver=_useState2[0],setDragOver=_useState2[1],klass=classnames_default()("dui-uploader-dragger",{"is-dragover":dragOver}),handleDrag=function handleDrag(e,over){e.preventDefault(),setDragOver(over)};return(0,jsx_runtime.jsx)("div",{className:klass,onDragOver:function onDragOver(e){handleDrag(e,!0)},onDragLeave:function onDragLeave(e){handleDrag(e,!1)},onDrop:function handleDrop(e){e.preventDefault(),setDragOver(!1),onFile(e.dataTransfer.files)},children:children})},Upload_dragger=Dragger;try{Dragger.displayName="Dragger",Dragger.__docgenInfo={description:"",displayName:"Dragger",props:{onFile:{defaultValue:null,description:"",name:"onFile",required:!0,type:{name:"(files: FileList) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/dragger.tsx#Dragger"]={docgenInfo:Dragger.__docgenInfo,name:"Dragger",path:"src/components/Upload/dragger.tsx#Dragger"})}catch(__react_docgen_typescript_loader_error){}try{dragger.displayName="dragger",dragger.__docgenInfo={description:"",displayName:"dragger",props:{onFile:{defaultValue:null,description:"",name:"onFile",required:!0,type:{name:"(files: FileList) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/dragger.tsx#dragger"]={docgenInfo:dragger.__docgenInfo,name:"dragger",path:"src/components/Upload/dragger.tsx#dragger"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Button/index.tsx"),_excluded=["action","defaultFileList","beforeUpload","onProgress","onSuccess","onError","onChange","onRemove","name","headers","data","withCredentials","accept","multiple","children","drag"],Upload=function Upload(props){var action=props.action,defaultFileList=props.defaultFileList,beforeUpload=props.beforeUpload,onProgress=props.onProgress,onSuccess=props.onSuccess,onError=props.onError,onChange=props.onChange,onRemove=props.onRemove,name=props.name,headers=props.headers,data=props.data,withCredentials=props.withCredentials,accept=props.accept,multiple=props.multiple,children=props.children,drag=props.drag,resetsProps=(0,objectWithoutProperties.Z)(props,_excluded),fileInput=(0,react.useRef)(null),_useState=(0,react.useState)(defaultFileList||[]),_useState2=(0,slicedToArray.Z)(_useState,2),fileList=_useState2[0],setFileList=_useState2[1],updateFileList=function updateFileList(updateFile,updateObj){setFileList((function(prevList){return prevList.map((function(file){return file.uid===updateFile.uid?(0,objectSpread2.Z)((0,objectSpread2.Z)({},file),updateObj):file}))}))},uploadFiles=function uploadFiles(files){var postFiles=Array.from(files);console.log("postFiles: ",postFiles),postFiles.forEach((function(file){if(beforeUpload){var result=beforeUpload(file);result&&result instanceof Promise?result.then((function(processedFile){post(processedFile)})):!1!==result&&post(file)}else post(file)}))},post=function post(file){var _file={uid:Date.now()+"upload-file",status:"ready",name:file.name,size:file.size,percent:0,raw:file};setFileList((function(prevList){return[_file].concat((0,toConsumableArray.Z)(prevList))}));var formData=new FormData;formData.append(name||"file",file),data&&Object.keys(data).forEach((function(key){formData.append(key,data[key])})),axios.ZP.post(action,formData,{headers:(0,objectSpread2.Z)((0,objectSpread2.Z)({},headers),{},{"Content-Type":"multipart/form-data"}),withCredentials:withCredentials,onUploadProgress:function onUploadProgress(progressEvent){var percentage=Math.round(100*progressEvent.loaded/progressEvent.total);percentage<100&&(updateFileList(_file,{percent:percentage,status:"uploading"}),onProgress&&onProgress(percentage,file))}}).then((function(resp){updateFileList(_file,{status:"success",response:resp.data}),onSuccess&&onSuccess(resp.data,file),onChange&&onChange(file)})).catch((function(err){updateFileList(_file,{status:"error",error:err}),onError&&onError(err,file),onChange&&onChange(file)}))};return(0,jsx_runtime.jsxs)("div",(0,objectSpread2.Z)((0,objectSpread2.Z)({className:"dui-upload-component"},resetsProps),{},{children:[(0,jsx_runtime.jsxs)("div",{className:"dui-upload-input",style:{display:"inline-block"},onClick:function handleClick(){fileInput.current&&fileInput.current.click()},children:[drag?(0,jsx_runtime.jsx)(Upload_dragger,{onFile:function onFile(files){uploadFiles(files)},children:children||(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-upload",style:{fontSize:100}}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("p",{children:"Drag file over to upload"})]})}):children||(0,jsx_runtime.jsxs)(Button.Z,{type:"primary",style:{display:"flex",alignItems:"center"},children:[(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-plus"}),"上传"]}),(0,jsx_runtime.jsx)("input",{className:"dui-file-input",style:{display:"none"},ref:fileInput,onChange:function handleFileChange(e){var files=e.target.files;files&&(uploadFiles(files),fileInput.current&&(fileInput.current.value=""))},type:"file",accept:accept,multiple:multiple})]}),(0,jsx_runtime.jsx)(Upload_UploadList,{fileList:fileList,onRemove:function handleRemove(file){setFileList((function(prevList){return prevList.filter((function(item){return item.uid!==file.uid}))})),onRemove&&onRemove(file)}})]}))};Upload.defaultProps={name:"file"};var Upload_upload=Upload;try{Upload.displayName="Upload",Upload.__docgenInfo={description:"",displayName:"Upload",props:{action:{defaultValue:null,description:"",name:"action",required:!0,type:{name:"string"}},defaultFileList:{defaultValue:null,description:"",name:"defaultFileList",required:!1,type:{name:"UploadFile[]"}},beforeUpload:{defaultValue:null,description:"",name:"beforeUpload",required:!1,type:{name:"((file: File) => boolean | Promise)"}},onProgress:{defaultValue:null,description:"",name:"onProgress",required:!1,type:{name:"((percentage: number, file: File) => void)"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((data: any, file: File) => void)"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((err: any, file: File) => void)"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((file: File) => void)"}},onRemove:{defaultValue:null,description:"",name:"onRemove",required:!1,type:{name:"((file: UploadFile) => void)"}},headers:{defaultValue:null,description:"",name:"headers",required:!1,type:{name:"{ [key: string]: any; }"}},name:{defaultValue:{value:"file"},description:"",name:"name",required:!1,type:{name:"string"}},data:{defaultValue:null,description:"",name:"data",required:!1,type:{name:"{ [key: string]: any; }"}},withCredentials:{defaultValue:null,description:"",name:"withCredentials",required:!1,type:{name:"boolean"}},accept:{defaultValue:null,description:"",name:"accept",required:!1,type:{name:"string"}},multiple:{defaultValue:null,description:"",name:"multiple",required:!1,type:{name:"boolean"}},drag:{defaultValue:null,description:"",name:"drag",required:!1,type:{name:"boolean"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/upload.tsx#Upload"]={docgenInfo:Upload.__docgenInfo,name:"Upload",path:"src/components/Upload/upload.tsx#Upload"})}catch(__react_docgen_typescript_loader_error){}try{upload.displayName="upload",upload.__docgenInfo={description:"",displayName:"upload",props:{action:{defaultValue:null,description:"",name:"action",required:!0,type:{name:"string"}},defaultFileList:{defaultValue:null,description:"",name:"defaultFileList",required:!1,type:{name:"UploadFile[]"}},beforeUpload:{defaultValue:null,description:"",name:"beforeUpload",required:!1,type:{name:"((file: File) => boolean | Promise)"}},onProgress:{defaultValue:null,description:"",name:"onProgress",required:!1,type:{name:"((percentage: number, file: File) => void)"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((data: any, file: File) => void)"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((err: any, file: File) => void)"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((file: File) => void)"}},onRemove:{defaultValue:null,description:"",name:"onRemove",required:!1,type:{name:"((file: UploadFile) => void)"}},headers:{defaultValue:null,description:"",name:"headers",required:!1,type:{name:"{ [key: string]: any; }"}},name:{defaultValue:{value:"file"},description:"",name:"name",required:!1,type:{name:"string"}},data:{defaultValue:null,description:"",name:"data",required:!1,type:{name:"{ [key: string]: any; }"}},withCredentials:{defaultValue:null,description:"",name:"withCredentials",required:!1,type:{name:"boolean"}},accept:{defaultValue:null,description:"",name:"accept",required:!1,type:{name:"string"}},multiple:{defaultValue:null,description:"",name:"multiple",required:!1,type:{name:"boolean"}},drag:{defaultValue:null,description:"",name:"drag",required:!1,type:{name:"boolean"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Upload/upload.tsx#upload"]={docgenInfo:upload.__docgenInfo,name:"upload",path:"src/components/Upload/upload.tsx#upload"})}catch(__react_docgen_typescript_loader_error){}module=__webpack_require__.hmd(module);var checkFileSize=function checkFileSize(file){return!(Math.round(file.size/1024)>50)||(alert("file too big"),!1)};(0,client.storiesOf)("Upload 上传",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport { action } from "@storybook/addon-actions";\nimport Upload from "./upload";\nimport Icon from "../IconFont/index";\n// const defaultFileList: UploadFile[] = [\n// { uid: \'123\', size: 1234, name: \'hello.md\', status: \'uploading\', percent: 30 },\n// { uid: \'122\', size: 1234, name: \'xyz.md\', status: \'success\', percent: 30 },\n// { uid: \'121\', size: 1234, name: \'eyiha.md\', status: \'error\', percent: 30 }\n// ]\nconst checkFileSize = (file: File) => {\n if (Math.round(file.size / 1024) > 50) {\n alert("file too big");\n return false;\n }\n return true;\n};\n// const filePromise = (file: File) => {\n// const newFile = new File([file], \'new_name.docx\', {type: file.type})\n// return Promise.resolve(newFile)\n// }\nconst SimpleUpload = () => {\n return (\n \n );\n};\n\nconst CheckFileSize = () => {\n return (\n \n );\n};\n\nconst DragUpload = () => {\n return (\n \n \n
\n

Drag file over to upload

\n \n );\n};\n\nstoriesOf("Upload 上传", module)\n .add("普通Upload", SimpleUpload)\n .add("上传前检查文件大小", CheckFileSize)\n .add("拖拽上传", DragUpload);\n',locationsMap:{"拖拽上传":{startLoc:{col:7,line:69},endLoc:{col:25,line:69},startBody:{col:15,line:69},endBody:{col:25,line:69}},"上传前检查文件大小":{startLoc:{col:7,line:68},endLoc:{col:33,line:68},startBody:{col:20,line:68},endBody:{col:33,line:68}},"普通upload":{startLoc:{col:7,line:67},endLoc:{col:31,line:67},startBody:{col:19,line:67},endBody:{col:31,line:67}}}}}).add("普通Upload",(function SimpleUpload(){return(0,jsx_runtime.jsx)(Upload_upload,{action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",onChange:(0,esm.action)("changed"),onRemove:(0,esm.action)("removed"),name:"fileName",multiple:!0,style:{width:300}})})).add("上传前检查文件大小",(function CheckFileSize(){return(0,jsx_runtime.jsx)(Upload_upload,{action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",onChange:(0,esm.action)("changed"),onRemove:(0,esm.action)("removed"),name:"fileName",multiple:!0,style:{width:300},beforeUpload:checkFileSize})})).add("拖拽上传",(function DragUpload(){return(0,jsx_runtime.jsxs)(Upload_upload,{action:"https://www.mocky.io/v2/5cc8019d300000980a055e76",onChange:(0,esm.action)("changed"),onRemove:(0,esm.action)("removed"),name:"fileName",multiple:!0,drag:!0,children:[(0,jsx_runtime.jsx)(IconFont.Z,{type:"icon-upload",style:{fontSize:100}}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("p",{children:"Drag file over to upload"})]})}))},"./src/components/WaterMark/waterMark.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react=__webpack_require__("./node_modules/react/index.js"),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),objectSpread2=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),slicedToArray=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),WaterMark=function WaterMark(props){var _useState=(0,react.useState)(""),_useState2=(0,slicedToArray.Z)(_useState,2),waterImg=_useState2[0],setWaterImg=_useState2[1],style=props.style,className=props.className;return(0,react.useEffect)((function(){(function imgToWaterMark(props){var url=props.url,type=props.type,bgColor=props.bgColor,quality=props.quality,text=props.text,_props$density=props.density,density=void 0===_props$density?.6:_props$density;return new Promise((function(resolve,reject){var qualityImg=["jpeg","webp"],image=new Image;image.setAttribute("crossOrigin","anonymous"),image.src=url+"?"+(new Date).getTime(),image.onload=function(){var canvas=document.createElement("canvas"),ctx=canvas.getContext("2d",{alpha:!1});canvas.width=image.width,canvas.height=image.height,ctx.fillStyle=bgColor||"white",ctx.fillRect(0,0,canvas.width,canvas.height),ctx.drawImage(image,0,0),ctx.textAlign="center",ctx.textBaseline="middle",ctx.font="20px microsoft yahei",ctx.fillStyle="rgba(184, 184, 184, 0.8)";for(var space=[ctx.measureText(text||"请勿外传").width/density,40/density],xCount=Math.round(image.width/space[0]),yCount=Math.round(image.height/space[1]),x=0;x<=xCount;x++)for(var y=0;y<=yCount;y++)null==ctx||ctx.save(),ctx.translate(space[0]*x,space[1]*y),ctx.rotate(45*Math.PI/180),ctx.fillText(text||"请勿外传",0,0),null==ctx||ctx.restore();var result=qualityImg.includes(type)?canvas.toDataURL("image/"+type,quality||.96):canvas.toDataURL("image/"+type);resolve(result)},image.onerror=function(){reject(new Error("urlToBase64 error"))}}))})((0,objectSpread2.Z)({text:"请勿外传"},props)).then((function(res){setWaterImg(res)}))}),[]),(0,jsx_runtime.jsx)("img",{src:waterImg,alt:"waterMark",style:style,className:className})},components_WaterMark=WaterMark;try{WaterMark.displayName="WaterMark",WaterMark.__docgenInfo={description:"",displayName:"WaterMark",props:{text:{defaultValue:null,description:"水印文本",name:"text",required:!1,type:{name:"string"}},url:{defaultValue:null,description:"图片",name:"url",required:!0,type:{name:"string"}},type:{defaultValue:null,description:"图片类型 jpeg、webp 支持高质量图片",name:"type",required:!1,type:{name:"string"}},bgColor:{defaultValue:null,description:"",name:"bgColor",required:!1,type:{name:"string"}},quality:{defaultValue:null,description:"图片质量 仅在jpeg、webp支持 取值0 到 1 默认0.96",name:"quality",required:!1,type:{name:"number"}},density:{defaultValue:null,description:"文字密集度 默认0.6",name:"density",required:!1,type:{name:"number"}},style:{defaultValue:null,description:"样式",name:"style",required:!1,type:{name:"CSSProperties"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/WaterMark/index.tsx#WaterMark"]={docgenInfo:WaterMark.__docgenInfo,name:"WaterMark",path:"src/components/WaterMark/index.tsx#WaterMark"})}catch(__react_docgen_typescript_loader_error){}var test_namespaceObject=__webpack_require__.p+"0fb7259a2f4284be3d9f.png";module=__webpack_require__.hmd(module);(0,client.storiesOf)("WaterMark 水印",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\nimport WaterMark from "./index";\nimport Img from "../../assets/test.png";\n\nconst defaultWaterMark = () => {\n return (\n <>\n \n \n );\n};\n\nconst textWithWaterMark = () => ;\nconst qualityWithWaterMark = () => (\n \n);\n\nconst densityWithWaterMark = () => {\n return (\n <>\n

低密度

\n \n

高密度

\n \n \n );\n};\n\nstoriesOf("WaterMark 水印", module)\n .add("默认 WaterMark", defaultWaterMark)\n .add("修改文字 WaterMark", textWithWaterMark)\n .add("高质量 WaterMark", qualityWithWaterMark)\n .add("密集度 WaterMark", densityWithWaterMark);\n',locationsMap:{"密集度-watermark":{startLoc:{col:7,line:34},endLoc:{col:44,line:34},startBody:{col:24,line:34},endBody:{col:44,line:34}},"高质量-watermark":{startLoc:{col:7,line:33},endLoc:{col:44,line:33},startBody:{col:24,line:33},endBody:{col:44,line:33}},"修改文字-watermark":{startLoc:{col:7,line:32},endLoc:{col:42,line:32},startBody:{col:25,line:32},endBody:{col:42,line:32}},"默认-watermark":{startLoc:{col:7,line:31},endLoc:{col:39,line:31},startBody:{col:23,line:31},endBody:{col:39,line:31}}}}}).add("默认 WaterMark",(function defaultWaterMark(){return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject})})})).add("修改文字 WaterMark",(function textWithWaterMark(){return(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject,text:"我是水印~"})})).add("高质量 WaterMark",(function qualityWithWaterMark(){return(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject,text:"我是水印~",type:"webp",quality:1})})).add("密集度 WaterMark",(function densityWithWaterMark(){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)("h4",{children:"低密度"}),(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject,text:"我是水印~",density:.4}),(0,jsx_runtime.jsx)("h4",{children:"高密度"}),(0,jsx_runtime.jsx)(components_WaterMark,{url:test_namespaceObject,text:"我是水印~",density:.9})]})}))},"./src/welcome.stories.tsx":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/react/index.js");var _storybook_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react/jsx-runtime.js");module=__webpack_require__.hmd(module);(0,_storybook_react__WEBPACK_IMPORTED_MODULE_1__.storiesOf)("Welcome page",module).addParameters({storySource:{source:'import React from "react";\nimport { storiesOf } from "@storybook/react";\n\nstoriesOf("Welcome page", module).add(\n "welcome",\n () => {\n return (\n <>\n

欢迎来到 jadedui 组件库

\n

组件亮点

\n
    \n
  • 🔥typescript with React Hooks
  • \n
  • 📚 使用 storybook 本地调试和生成文档页面
  • \n
  • 📚 使用 react-doc-gen 自动生成文档
  • \n
  • 📦 使用 rollup 作为构建工具,构建ESmodule,支持tree-shaking
  • \n
  • 📦 使用第三方库扩充组件-(react-transition-group 等)
  • \n
  • 🌹 样式(Sass)文件从零开始,掌握大型应用的 CSS 组织方法
  • \n
  • \n 🎉 涉及全部流程,包括最后的 npm publish,husky\n 提交发布前验证,github actions CI/CD 集成,发布文档站点等\n
  • \n
\n\n

安装试试

\n npm install jadedui --save\n
\n

使用

\n
加载样式
\n {`import "jadedui/dist/index.css";`}\n
引入组件
\n {`import { Button } from "jadedui";`}\n \n );\n },\n { info: { disable: true } }\n);\n',locationsMap:{welcome:{startLoc:{col:2,line:5},endLoc:{col:29,line:35},startBody:{col:2,line:6},endBody:{col:3,line:34}}}}}).add("welcome",(function(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h1",{children:"欢迎来到 jadedui 组件库"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2",{children:"组件亮点"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("ul",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"🔥typescript with React Hooks"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"📚 使用 storybook 本地调试和生成文档页面"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"📚 使用 react-doc-gen 自动生成文档"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"📦 使用 rollup 作为构建工具,构建ESmodule,支持tree-shaking"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"📦 使用第三方库扩充组件-(react-transition-group 等)"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"🌹 样式(Sass)文件从零开始,掌握大型应用的 CSS 组织方法"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("li",{children:"🎉 涉及全部流程,包括最后的 npm publish,husky 提交发布前验证,github actions CI/CD 集成,发布文档站点等"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"安装试试"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:"npm install jadedui --save"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h3",{children:"使用"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{children:"加载样式"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:'import "jadedui/dist/index.css";'}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{children:"引入组件"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("code",{children:'import { Button } from "jadedui";'})]})}),{info:{disable:!0}})},"./.storybook/preview.tsx-generated-config-entry.js":function(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__){"use strict";var _home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),_home_runner_work_dui_dui_storybook_preview_tsx__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./.storybook/preview.tsx");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.keys(_home_runner_work_dui_dui_storybook_preview_tsx__WEBPACK_IMPORTED_MODULE_0__).forEach((function(key){var value=_home_runner_work_dui_dui_storybook_preview_tsx__WEBPACK_IMPORTED_MODULE_0__[key];switch(key){case"args":return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.uc)(value);case"argTypes":return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.v9)(value);case"decorators":return value.forEach((function(decorator){return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.$9)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.HZ)(loader,!1)}));case"parameters":return(0,_home_runner_work_dui_dui_node_modules_storybook_client_api__WEBPACK_IMPORTED_MODULE_1__.h1)(function _objectSpread(target){for(var i=1;i void) | (MouseEventHandler & MouseEventHandler & (() => void))"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Button/index.tsx#Button"]={docgenInfo:Button.__docgenInfo,name:"Button",path:"src/components/Button/index.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/IconFont/index.tsx":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var _home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/react/jsx-runtime.js")),_excluded=["type","color","spin"];__webpack_exports__.Z=function Icon(props){var type=props.type,color=props.color,_props$spin=props.spin,spin=void 0!==_props$spin&&_props$spin,restProps=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_2__.Z)(props,_excluded);return function createScript(){if(!document.getElementById("dui-iconfont")){var script=document.createElement("script");script.type="text/javascript",script.src="//at.alicdn.com/t/c/font_3672057_9x8gvk6a2ho.js",script.id="dui-iconfont",document.body.appendChild(script)}}(),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg",(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)((0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.Z)({width:"1em",height:"1em",fill:color||"currentColor","aria-hidden":"true",focusable:"false",className:spin?"dui-icon-spin":""},restProps),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("use",{xlinkHref:"#".concat(type)})}))};try{IconFont.displayName="IconFont",IconFont.__docgenInfo={description:"IconFont 图标组件库 支持所有svg属性\n支持ant design所有图标\n通过 iconfont.cn 链接方式生成icon\n\n~~~js\nimport { Icon } from 'jadedui'\n~~~",displayName:"IconFont",props:{type:{defaultValue:null,description:"图标类型",name:"type",required:!0,type:{name:"string"}},spin:{defaultValue:null,description:"是否旋转",name:"spin",required:!1,type:{name:"boolean"}},color:{defaultValue:null,description:"图标颜色",name:"color",required:!1,type:{name:"string"}},style:{defaultValue:null,description:"",name:"style",required:!1,type:{name:"CSSProperties"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/IconFont/index.tsx#IconFont"]={docgenInfo:IconFont.__docgenInfo,name:"IconFont",path:"src/components/IconFont/index.tsx#IconFont"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Input/index.tsx":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var _home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),_IconFont_index__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/IconFont/index.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["disabled","size","icon","prepend","append","style","allowClear"],Input=function Input(props){var _classNames,disabled=props.disabled,size=props.size,icon=props.icon,prepend=props.prepend,append=props.append,style=props.style,allowClear=props.allowClear,restProps=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(props,_excluded),_useState=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(restProps.value||""),_useState2=(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__.Z)(_useState,2),value=_useState2[0],setValue=_useState2[1],eRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(""),cnames=classnames__WEBPACK_IMPORTED_MODULE_1___default()("dui-input-wrapper",(_classNames={},(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"input-size-".concat(size),size),(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"is-disabled",disabled),(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"input-group",prepend||append),(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"input-group-append",!!append),(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__.Z)(_classNames,"input-group-prepend",!!prepend),_classNames));"value"in props&&(delete restProps.defaultValue,restProps.value=function fixControlledValue(value){return null==value?"":value}(props.value)),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){setValue(restProps.value)}),[restProps.value]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div",{className:cnames,style:style,children:[prepend&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"dui-input-group-prepend",children:prepend}),icon?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"icon-wrapper",children:icon}):value&&allowClear?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"icon-wrapper",onClick:function clearHandle(){setValue(""),console.log("eRef===>",eRef),eRef.current.target.value="",(null==props?void 0:props.onChange)&&(null==props||props.onChange(eRef.current))},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_IconFont_index__WEBPACK_IMPORTED_MODULE_2__.Z,{type:"icon-closefill"})}):null,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("input",(0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)((0,_home_runner_work_dui_dui_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__.Z)({className:"dui-input-inner",disabled:disabled,placeholder:"请输入"},restProps),{},{value:value,onChange:function onChange(e){console.log("dsadasd"),setValue(e.target.value),eRef.current=e,(null==props?void 0:props.onChange)&&(null==props||props.onChange(e))}})),append&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div",{className:"dui-input-group-append",children:append})]})};Input.defaultProps={allowClear:!1},__webpack_exports__.Z=Input;try{Input.displayName="Input",Input.__docgenInfo={description:"Input 输入框 通过鼠标或键盘输入内容,是最基础的表单域的包装。\n\n~~~js\n// 这样引用\nimport { Input } from 'jadedui'\n~~~\n支持 HTMLInput 的所有基本属性",displayName:"Input",props:{disabled:{defaultValue:null,description:"是否禁用 Input",name:"disabled",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"设置 input 大小,支持 lg 或者是 sm",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"sm"'}]}},icon:{defaultValue:null,description:"添加图标,在右侧悬浮添加一个图标,用于提示",name:"icon",required:!1,type:{name:"ReactNode"}},prepend:{defaultValue:null,description:"添加前缀 用于配置一些固定组合",name:"prepend",required:!1,type:{name:"string | ReactElement>"}},append:{defaultValue:null,description:"添加后缀 用于配置一些固定组合",name:"append",required:!1,type:{name:"string | ReactElement>"}},allowClear:{defaultValue:{value:"false"},description:"是否允许清除",name:"allowClear",required:!1,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((e: ChangeEvent) => void)"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Input/index.tsx#Input"]={docgenInfo:Input.__docgenInfo,name:"Input",path:"src/components/Input/index.tsx#Input"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Progress/index.tsx":function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__("./node_modules/react/index.js");var classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react/jsx-runtime.js"),Progress=function Progress(props){var _props$color=props.color,color=void 0===_props$color?"#3683F7":_props$color,_props$type=props.type,type=void 0===_props$type?"Line":_props$type,_props$radius=props.radius,radius=void 0===_props$radius?60:_props$radius,className=props.className,_props$percent=props.percent,percent=void 0===_props$percent?0:_props$percent;if(percent=percent>100?100:percent<0?0:percent,radius<=20&&console.error("Radius is less than 20, are you sure"),"circle"===type){var pathLen=2*radius*Math.PI;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{className:classnames__WEBPACK_IMPORTED_MODULE_1___default()("circle-progress",className),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("span",{children:[percent,"%"]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("svg",{width:2*radius+8,height:2*radius+8,viewBox:"0 0 ".concat(2*radius+8," ").concat(2*radius+8),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("circle",{fill:"transparent",className:"pie-bg",strokeWidth:"4",cx:radius+4,cy:radius+4,r:radius}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("circle",{fill:"transparent",strokeWidth:"4",cx:radius+4,cy:radius+4,r:radius,style:{strokeDasharray:"".concat(pathLen*percent/100,",").concat(pathLen),stroke:color}})]})]})}return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:classnames__WEBPACK_IMPORTED_MODULE_1___default()("groove",className),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{className:"progress",style:{backgroundColor:color,width:percent+"%"}})})};__webpack_exports__.Z=Progress;try{Progress.displayName="Progress",Progress.__docgenInfo={description:"",displayName:"Progress",props:{type:{defaultValue:null,description:"进度条类型 默认线形,circle圆环",name:"type",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"进度条颜色",name:"color",required:!1,type:{name:"string"}},percent:{defaultValue:null,description:"进度值",name:"percent",required:!1,type:{name:"number"}},radius:{defaultValue:null,description:"圆环半径",name:"radius",required:!1,type:{name:"number"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Progress/index.tsx#Progress"]={docgenInfo:Progress.__docgenInfo,name:"Progress",path:"src/components/Progress/index.tsx#Progress"})}catch(__react_docgen_typescript_loader_error){}},"./src/components sync recursive \\.stories\\.tsx$":function(module,__unused_webpack_exports,__webpack_require__){var map={"./Alert/alert.stories.tsx":"./src/components/Alert/alert.stories.tsx","./AutoComplete/autoComplete.stories.tsx":"./src/components/AutoComplete/autoComplete.stories.tsx","./BackTop/backtop.stories.tsx":"./src/components/BackTop/backtop.stories.tsx","./Button/button.stories.tsx":"./src/components/Button/button.stories.tsx","./Carousel/carousel.stories.tsx":"./src/components/Carousel/carousel.stories.tsx","./Divider/divider.stories.tsx":"./src/components/Divider/divider.stories.tsx","./Empty/empty.stories.tsx":"./src/components/Empty/empty.stories.tsx","./IconFont/icon.stories.tsx":"./src/components/IconFont/icon.stories.tsx","./Input/input.stories.tsx":"./src/components/Input/input.stories.tsx","./Menu/menu.stories.tsx":"./src/components/Menu/menu.stories.tsx","./Progress/progress.stories.tsx":"./src/components/Progress/progress.stories.tsx","./Rate/rate.stories.tsx":"./src/components/Rate/rate.stories.tsx","./Space/space.stories.tsx":"./src/components/Space/space.stories.tsx","./Upload/upload.stories.tsx":"./src/components/Upload/upload.stories.tsx","./WaterMark/waterMark.stories.tsx":"./src/components/WaterMark/waterMark.stories.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src/components sync recursive \\.stories\\.tsx$"},"./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx))$":function(module,__unused_webpack_exports,__webpack_require__){var map={"./Alert/alert.stories.tsx":"./src/components/Alert/alert.stories.tsx","./AutoComplete/autoComplete.stories.tsx":"./src/components/AutoComplete/autoComplete.stories.tsx","./BackTop/backtop.stories.tsx":"./src/components/BackTop/backtop.stories.tsx","./Button/button.stories.tsx":"./src/components/Button/button.stories.tsx","./Carousel/carousel.stories.tsx":"./src/components/Carousel/carousel.stories.tsx","./Divider/divider.stories.tsx":"./src/components/Divider/divider.stories.tsx","./Empty/empty.stories.tsx":"./src/components/Empty/empty.stories.tsx","./IconFont/icon.stories.tsx":"./src/components/IconFont/icon.stories.tsx","./Input/input.stories.tsx":"./src/components/Input/input.stories.tsx","./Menu/menu.stories.tsx":"./src/components/Menu/menu.stories.tsx","./Progress/progress.stories.tsx":"./src/components/Progress/progress.stories.tsx","./Rate/rate.stories.tsx":"./src/components/Rate/rate.stories.tsx","./Space/space.stories.tsx":"./src/components/Space/space.stories.tsx","./Upload/upload.stories.tsx":"./src/components/Upload/upload.stories.tsx","./WaterMark/waterMark.stories.tsx":"./src/components/WaterMark/waterMark.stories.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx))$"},"./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.mdx)$":function(module){function webpackEmptyContext(req){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=function(){return[]},webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.mdx)$",module.exports=webpackEmptyContext},"./storybook-init-framework-entry.js":function(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__){"use strict";__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js")},"./src/assets/image1.webp":function(module,__unused_webpack_exports,__webpack_require__){"use strict";module.exports=__webpack_require__.p+"440b0c61f6d8896f6fb5.webp"},"?4f7e":function(){},"./generated-stories-entry.cjs":function(module,__unused_webpack_exports,__webpack_require__){"use strict";module=__webpack_require__.nmd(module),(0,__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js").configure)([__webpack_require__("./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.mdx)$"),__webpack_require__("./src/components sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.(js%7Cjsx%7Cts%7Ctsx))$")],module,!1)}},function(__webpack_require__){var __webpack_exec__=function(moduleId){return __webpack_require__(__webpack_require__.s=moduleId)};__webpack_require__.O(0,[88],(function(){return __webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js"),__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/globals.js"),__webpack_exec__("./storybook-init-framework-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/docs/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-links/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-docs/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-actions/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-measure/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-outline/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-interactions/preview.js-generated-config-entry.js"),__webpack_exec__("./.storybook/preview.tsx-generated-config-entry.js"),__webpack_exec__("./generated-stories-entry.cjs")}));__webpack_require__.O()}]); \ No newline at end of file diff --git a/project.json b/project.json index e02d585..1f8b32f 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1679826804025,"builder":{"name":"@storybook/builder-webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"metaFramework":{"name":"CRA","packageName":"react-scripts","version":"5.0.0"},"packageManager":{"type":"yarn","version":"1.22.19"},"storybookVersion":"6.5.13","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"6.5.13"},"@storybook/addon-info":{"version":"5.3.21"},"@storybook/builder-webpack5":{"version":"6.5.13"},"@storybook/manager-webpack5":{"version":"6.5.13"},"@storybook/node-logger":{"version":"6.5.13"},"@storybook/react":{"version":"6.5.13"},"@storybook/testing-library":{"version":"0.0.13"},"@types/storybook__addon-info":{"version":"5.2.5"}},"framework":{"name":"react"},"addons":{"@storybook/addon-links":{"version":"6.5.13"},"@storybook/addon-essentials":{"version":"6.5.13"},"@storybook/addon-interactions":{"version":"6.5.13"},"@storybook/preset-create-react-app":{"version":"4.1.2"}}} +{"generatedAt":1684924354720,"builder":{"name":"@storybook/builder-webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"metaFramework":{"name":"CRA","packageName":"react-scripts","version":"5.0.0"},"packageManager":{"type":"yarn","version":"1.22.19"},"storybookVersion":"6.5.13","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"6.5.13"},"@storybook/addon-info":{"version":"5.3.21"},"@storybook/builder-webpack5":{"version":"6.5.13"},"@storybook/manager-webpack5":{"version":"6.5.13"},"@storybook/node-logger":{"version":"6.5.13"},"@storybook/react":{"version":"6.5.13"},"@storybook/testing-library":{"version":"0.0.13"},"@types/storybook__addon-info":{"version":"5.2.5"}},"framework":{"name":"react"},"addons":{"@storybook/addon-links":{"version":"6.5.13"},"@storybook/addon-essentials":{"version":"6.5.13"},"@storybook/addon-interactions":{"version":"6.5.13"},"@storybook/preset-create-react-app":{"version":"4.1.2"}}} diff --git a/static/css/main.3c2d3211.css.map b/static/css/main.3c2d3211.css.map deleted file mode 100644 index 692e6f0..0000000 --- a/static/css/main.3c2d3211.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.3c2d3211.css","mappings":"AAcA","sources":["webpack://jadedui/./src/styles/_reboot.scss","webpack://jadedui/./src/styles/_variables.scss","webpack://jadedui/./src/styles/_mixin.scss","webpack://jadedui/./src/styles/_animation.scss","webpack://jadedui/./src/components/Button/_style.scss","webpack://jadedui/./src/components/Alert/_style.scss","webpack://jadedui/./src/components/Menu/_style.scss","webpack://jadedui/./src/components/Carousel/_style.scss","webpack://jadedui/./src/components/IconFont/_style.scss","webpack://jadedui/./src/components/Input/_style.scss","webpack://jadedui/./src/components/AutoComplete/_style.scss","webpack://jadedui/./src/components/Progress/_style.scss","webpack://jadedui/./src/components/Upload/_style.scss","webpack://jadedui/./src/components/Divider/_style.scss","webpack://jadedui/./src/components/Rate/_style.scss","webpack://jadedui/./src/components/BackTop/_style.scss","webpack://jadedui/./src/components/Empty/_style.scss"],"sourcesContent":["/* stylelint-disable CssSyntaxError */\n/* stylelint-disable no-descending-specificity */\n/* stylelint-disable-next-line scss/comment-no-empty */\n/* stylelint-disable-next-line max-line-length */\n// stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix\n\n// Reboot\n\n// Normalization of HTML elements, manually forked from Normalize.css to remove\n// styles targeting irrelevant browsers while applying new styles.\n// Normalize is licensed MIT. https://github.com/necolas/normalize.css\n\n// Document\n// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n// Body\n// 1. Remove the margin in all browsers.\n// 2. As a best practice, apply a default `background-color`.\n// 3. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.\n// 4. Change the default tap highlight to be completely transparent in iOS.\nbody {\n margin: 0;\n font-family: $font-family-base;\n font-size: $font-size-base;\n font-weight: $font-weight-base;\n line-height: $line-height-base;\n color: $body-color;\n text-align: $body-text-align;\n background-color: $body-bg; // 2\n -webkit-text-size-adjust: 100%; // 3\n -webkit-tap-highlight-color: rgba($black, 0); // 4\n}\n\n// Future-proof rule: in browsers that support :focus-visible, suppress the focus outline\n// on elements that programmatically receive focus but wouldn't normally show a visible\n// focus outline. In general, this would mean that the outline is only applied if the\n// interaction that led to the element receiving programmatic focus was a keyboard interaction,\n// or the browser has somehow determined that the user is primarily a keyboard user and/or\n// wants focus outlines to always be presented.\n// See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible\n// and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/\n\n[tabindex=\"-1\"]:focus:not(:focus-visible) {\n outline: 0 !important;\n}\n\n// Content grouping\n// 1. Reset Firefox's gray color\n// 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field\n// See https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_hr_size\n\nhr {\n margin: $hr-margin-y 0;\n color: $hr-color; // 1\n background-color: currentcolor;\n border: 0;\n opacity: $hr-opacity;\n}\n\nhr:not([size]) {\n height: $hr-height; // 2\n}\n\n// Typography\n// 1. Remove top margins from headings\n// By default, `

`-`

` all receive top and bottom margins. We nuke the top\n// margin for easier control within type scales as it avoids margin collapsing.\n\n%heading {\n margin-top: 0; // 1\n margin-bottom: $headings-margin-bottom;\n font-family: $headings-font-family;\n font-style: $headings-font-style;\n font-weight: $headings-font-weight;\n line-height: $headings-line-height;\n color: $headings-color;\n}\n\nh1 {\n @extend %heading;\n\n font-size: $h1-font-size;\n}\n\nh2 {\n @extend %heading;\n\n font-size: $h2-font-size;\n}\n\nh3 {\n @extend %heading;\n\n font-size: $h3-font-size;\n}\n\nh4 {\n @extend %heading;\n\n font-size: $h4-font-size;\n}\n\nh5 {\n @extend %heading;\n\n font-size: $h5-font-size;\n}\n\nh6 {\n @extend %heading;\n\n font-size: $h6-font-size;\n}\n\n// Reset margins on paragraphs\n// Similarly, the top margin on `

`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\n\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n// Abbreviations\n// 1. Duplicate behavior to the data-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-original-title] {\n // 1\n text-decoration: underline; // 2\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n text-decoration-skip-ink: none; // 4\n}\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\nol,\nul {\n padding-left: 2rem;\n list-style: none;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\n// 1. Undo browser default\n\ndd {\n margin-bottom: 0.5rem;\n margin-left: 0; // 1\n}\n\nblockquote {\n margin: 0 0 1rem;\n}\n\n// Add the correct font weight in Chrome, Edge, and Safari\n\nb,\nstrong {\n font-weight: $font-weight-bolder;\n}\n\n// Add the correct font size in all browsers\n\nsmall {\n font-size: $small-font-size;\n}\n\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n\nsub,\nsup {\n position: relative;\n font-size: $sub-sup-font-size;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n// Links\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n\n &:hover {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\n// a:not([href]) {\n// &,\n// &:hover {\n// color: inherit;\n// text-decoration: none;\n// }\n// }\n\n// Code\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-monospace;\n font-size: 1em; // Correct the odd `em` font sizing in all browsers.\n}\n\n// 1. Remove browser default top margin\n// 2. Reset browser default of `1em` to use `rem`s\n// 3. Don't allow content to break outside\n\npre {\n display: block;\n margin-top: 0; // 1\n margin-bottom: 1rem; // 2\n overflow: auto; // 3\n font-size: $code-font-size;\n color: $pre-color;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n font-size: inherit;\n color: inherit;\n word-break: normal;\n }\n}\n\ncode {\n font-size: $code-font-size;\n color: $code-color;\n word-wrap: break-word;\n\n // Streamline the style when inside anchors to avoid broken underline and more\n a > & {\n color: inherit;\n }\n}\n\n// Figures\n\n// Apply a consistent margin strategy (matches our type styles).\n\nfigure {\n margin: 0 0 1rem;\n}\n\n// Images and content\n\nimg {\n vertical-align: middle;\n}\n\n// 1. Workaround for the SVG overflow bug in IE 11 is still required.\n// See https://github.com/twbs/bootstrap/issues/26878\n\nsvg {\n overflow: hidden; // 1\n vertical-align: middle;\n}\n\n// Tables\n\n// Prevent double borders\n\ntable {\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n color: $text-muted;\n text-align: left;\n caption-side: bottom;\n}\n\n// Matches default `` alignment by inheriting from the ``, or the\n// closest parent with a set `text-align`.\n\nth {\n text-align: inherit;\n}\n\n// Forms\n\n// 1. Allow labels to use `margin` for spacing.\n\nlabel {\n display: inline-block; // 1\n margin-bottom: 0.5rem;\n}\n\n// Remove the default `border-radius` that macOS Chrome adds.\n// Details at https://github.com/twbs/bootstrap/issues/24093\n\nbutton {\n // stylelint-disable-next-line property-blacklist\n border-radius: 0;\n}\n\n// Work around a Firefox/IE bug where the transparent `button` background\n// results in a loss of the default `button` focus styles.\n// Credit: https://github.com/suitcss/base/\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\n// 1. Remove the margin in Firefox and Safari\n\ninput,\n/* stylelint-disable-next-line no-descending-specificity */\n/* stylelint-disable-next-line no-descending-specificity */\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n// Show the overflow in Edge\n\nbutton,\ninput {\n overflow: visible;\n}\n\n// Remove the inheritance of text transform in Firefox\n\nbutton,\nselect {\n text-transform: none;\n}\n\n// Remove the inheritance of word-wrap in Safari.\n// Details at https://github.com/twbs/bootstrap/issues/24990\n\nselect {\n word-wrap: normal;\n}\n\n// Remove the dropdown arrow in Chrome from inputs built with datalists.\n// Source: https://stackoverflow.com/a/54997118\n\n[list]::-webkit-calendar-picker-indicator {\n display: none;\n}\n\n// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`\n// controls in Android 4.\n// 2. Correct the inability to style clickable types in iOS and Safari.\n// 3. Opinionated: add \"hand\" cursor to non-disabled button elements.\n\nbutton,\n[type=\"button\"], // 1\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button; // 2\n\n @if $enable-pointer-cursor-for-buttons {\n &:not(:disabled) {\n cursor: pointer; // 3\n }\n }\n}\n\n// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.\n\n::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\n// Remove the default appearance of temporal inputs to avoid a Mobile Safari\n// bug where setting a custom line-height prevents text from being vertically\n// centered within the input.\n// See https://bugs.webkit.org/show_bug.cgi?id=139848\n// and https://github.com/twbs/bootstrap/issues/11266\n\ninput[type=\"date\"],\ninput[type=\"time\"],\ninput[type=\"datetime-local\"],\ninput[type=\"month\"] {\n -webkit-appearance: textfield;\n}\n\n// 1. Remove the default vertical scrollbar in IE.\n// 2. Textareas should really only resize vertically so they don't break their (horizontal) containers.\n\ntextarea {\n overflow: auto; // 1\n resize: vertical; // 2\n}\n\n// 1. Browsers set a default `min-width: min-content;` on fieldsets,\n// unlike e.g. `

`s, which have `min-width: 0;` by default.\n// So we reset that to ensure fieldsets behave more like a standard block element.\n// See https://github.com/twbs/bootstrap/issues/12359\n// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements\n// 2. Reset the default outline behavior of fieldsets so they don't affect page layout.\n\nfieldset {\n min-width: 0; // 1\n padding: 0; // 2\n margin: 0; // 2\n border: 0; // 2\n}\n\n// 1. By using `float: left`, the legend will behave like a block element\n// 2. Correct the color inheritance from `fieldset` elements in IE.\n// 3. Correct the text wrapping in Edge and IE.\n\nlegend {\n float: left; // 1\n width: 100%;\n padding: 0;\n margin-bottom: $legend-margin-bottom;\n font-size: $legend-font-size;\n font-weight: $legend-font-weight;\n line-height: inherit;\n color: inherit; // 2\n white-space: normal; // 3\n}\n\nmark {\n padding: $mark-padding;\n background-color: $mark-bg;\n}\n\n// Add the correct vertical alignment in Chrome, Firefox, and Opera.\n\nprogress {\n vertical-align: baseline;\n}\n\n// Fix height of inputs with a type of datetime-local, date, month, week, or time\n// See https://github.com/twbs/bootstrap/issues/18842\n\n::-webkit-datetime-edit {\n overflow: visible;\n line-height: 0;\n}\n\n// 1. Correct the outline style in Safari.\n// 2. This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\n[type=\"search\"] {\n outline-offset: -2px; // 1\n -webkit-appearance: textfield; // 2\n}\n\n// Remove the inner padding in Chrome and Safari on macOS.\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n// Remove padding around color pickers in webkit browsers\n\n::-webkit-color-swatch-wrapper {\n padding: 0;\n}\n\n// 1. Change font properties to `inherit` in Safari.\n// 2. Correct the inability to style clickable types in iOS and Safari.\n\n::-webkit-file-upload-button {\n font: inherit; // 1\n -webkit-appearance: button; // 2\n}\n\n// Correct element displays\n\noutput {\n display: inline-block;\n}\n\n// 1. Add the correct display in all browsers\n\nsummary {\n display: list-item; // 1\n cursor: pointer;\n}\n\n// Add the correct display for template & main in IE 11\n\ntemplate {\n display: none;\n}\n\nmain {\n display: block;\n}\n\n// Always hide an element with the `hidden` HTML attribute.\n\n[hidden] {\n display: none !important;\n}\n","/* stylelint-disable scss/no-global-function-names */\n$white: #fff !default;\n$gray-100: #f8f9fa !default;\n$gray-200: #e9ecef !default;\n$gray-300: #dee2e6 !default;\n$gray-400: #ced4da !default;\n$gray-500: #adb5bd !default;\n$gray-600: #6c757d !default;\n$gray-700: #495057 !default;\n$gray-800: #343a40 !default;\n$gray-900: #212529 !default;\n$black: #000 !default;\n$blue: #0d6efd !default;\n$indigo: #6610f2 !default;\n$purple: #6f42c1 !default;\n$pink: #d63384 !default;\n$red: #dc3545 !default;\n$orange: #fd7e14 !default;\n$yellow: #fadb14 !default;\n$green: #52c41a !default;\n$teal: #20c997 !default;\n$cyan: #17a2b8 !default;\n$primary: $blue !default;\n$secondary: $gray-600 !default;\n$success: $green !default;\n$info: $cyan !default;\n$warning: $yellow !default;\n$danger: $red !default;\n$error: $red !default;\n$light: $gray-100 !default;\n$dark: $gray-800 !default;\n$theme-colors: (\n \"primary\": $primary,\n \"secondary\": $secondary,\n \"success\": $success,\n \"info\": $info,\n \"warning\": $warning,\n \"danger\": $danger,\n \"error\": $error,\n \"light\": $light,\n \"dark\": $dark,\n);\n$font-family-sans-serif: -apple-system, blinkmacsystemfont, \"Segoe UI\", roboto,\n \"Helvetica Neue\", arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\" !default;\n$font-family-monospace: sfmono-regular, menlo, monaco, consolas,\n \"Liberation Mono\", \"Courier New\", monospace !default;\n$font-family-base: $font-family-sans-serif !default;\n\n// 字体大小\n$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`\n$font-size-lg: $font-size-base * 1.25 !default;\n$font-size-sm: $font-size-base * 0.875 !default;\n$font-size-root: null !default;\n\n// 字重\n$font-weight-lighter: lighter !default;\n$font-weight-light: 300 !default;\n$font-weight-normal: 400 !default;\n$font-weight-bold: 700 !default;\n$font-weight-bolder: bolder !default;\n$font-weight-base: $font-weight-normal !default;\n\n// 行高\n$line-height-base: 1.5 !default;\n$line-height-lg: 2 !default;\n$line-height-sm: 1.25 !default;\n\n// 标题大小\n$h1-font-size: $font-size-base * 2.5 !default;\n$h2-font-size: $font-size-base * 2 !default;\n$h3-font-size: $font-size-base * 1.75 !default;\n$h4-font-size: $font-size-base * 1.5 !default;\n$h5-font-size: $font-size-base * 1.25 !default;\n$h6-font-size: $font-size-base !default;\n\n// 链接\n$link-color: $primary !default;\n$link-decoration: none !default;\n/* stylelint-disable-next-line function-no-unknown */\n$link-hover-color: darken($link-color, 15%) !default;\n$link-hover-decoration: underline !default;\n\n// body\n$body-bg: $white !default;\n$body-color: $gray-900 !default;\n$body-text-align: null !default;\n\n// Spacing\n$spacer: 1rem !default;\n$headings-margin-bottom: calc($spacer / 2) !default;\n$headings-font-family: null !default;\n$headings-font-style: null !default;\n$headings-font-weight: 500 !default;\n$headings-line-height: 1.2 !default;\n$headings-color: null !default;\n\n// Paragraphs\n\n$paragraph-margin-bottom: 1rem !default;\n\n// 字体其他部分 heading list hr 等等\n$headings-margin-bottom: calc($spacer / 2) !default;\n$headings-font-family: null !default;\n$headings-font-style: null !default;\n$headings-font-weight: 500 !default;\n$headings-line-height: 1.2 !default;\n$headings-color: null !default;\n$display1-size: 6rem !default;\n$display2-size: 5.5rem !default;\n$display3-size: 4.5rem !default;\n$display4-size: 3.5rem !default;\n$display1-weight: 300 !default;\n$display2-weight: 300 !default;\n$display3-weight: 300 !default;\n$display4-weight: 300 !default;\n$display-line-height: $headings-line-height !default;\n$lead-font-size: $font-size-base * 1.25 !default;\n$lead-font-weight: 300 !default;\n$small-font-size: 0.875em !default;\n$sub-sup-font-size: 0.75em !default;\n$text-muted: $gray-600 !default;\n$initialism-font-size: $small-font-size !default;\n$blockquote-small-color: $gray-600 !default;\n$blockquote-small-font-size: $small-font-size !default;\n$blockquote-font-size: $font-size-base * 1.25 !default;\n$hr-color: inherit !default;\n$hr-height: 1px !default;\n$hr-opacity: 0.25 !default;\n$legend-margin-bottom: 0.5rem !default;\n$legend-font-size: 1.5rem !default;\n$legend-font-weight: null !default;\n$mark-padding: 0.2em !default;\n$dt-font-weight: $font-weight-bold !default;\n$nested-kbd-font-weight: $font-weight-bold !default;\n$list-inline-padding: 0.5rem !default;\n$mark-bg: #fcf8e3 !default;\n$hr-margin-y: $spacer !default;\n\n// Code\n\n$code-font-size: $small-font-size !default;\n$code-color: $pink !default;\n$pre-color: null !default;\n\n// options 可配置选项\n$enable-pointer-cursor-for-buttons: true !default;\n\n// 边框 和 border radius\n\n$border-width: 1px !default;\n$border-color: $gray-300 !default;\n$border-radius: 0.25rem !default;\n$border-radius-lg: 0.3rem !default;\n$border-radius-sm: 0.2rem !default;\n\n// 不同类型的 box shadow\n$box-shadow-sm: 0 0.125rem 0.25rem rgba($black, 0.075) !default;\n$box-shadow: 0 0.5rem 1rem rgba($black, 0.15) !default;\n$box-shadow-lg: 0 1rem 3rem rgba($black, 0.175) !default;\n$box-shadow-inset: inset 0 1px 2px rgba($black, 0.075) !default;\n\n// 按钮\n// 按钮基本属性\n$btn-font-weight: 400;\n$btn-padding-y: 0.375rem !default;\n$btn-padding-x: 0.75rem !default;\n$btn-font-family: $font-family-base !default;\n$btn-font-size: $font-size-base !default;\n$btn-line-height: $line-height-base !default;\n\n/* stylelint-disable-next-line scss/double-slash-comment-whitespace-inside */\n//不同大小按钮的 padding 和 font size\n$btn-padding-y-sm: 0.25rem !default;\n$btn-padding-x-sm: 0.5rem !default;\n$btn-font-size-sm: $font-size-sm !default;\n$btn-padding-y-lg: 0.5rem !default;\n$btn-padding-x-lg: 1rem !default;\n$btn-font-size-lg: $font-size-lg !default;\n\n// 按钮边框\n$btn-border-width: $border-width !default;\n\n// 按钮其他\n$btn-box-shadow: inset 0 1px 0 rgba($white, 0.15), 0 1px 1px rgba($black, 0.075) !default;\n$btn-disabled-opacity: 0.65 !default;\n$btn-disabled-background: darken($gray-600, 0.5);\n\n// 链接按钮\n$btn-link-color: $link-color !default;\n$btn-link-hover-color: $link-hover-color !default;\n$btn-link-disabled-color: $gray-600 !default;\n\n// 按钮 radius\n$btn-border-radius: $border-radius !default;\n$btn-border-radius-lg: $border-radius-lg !default;\n$btn-border-radius-sm: $border-radius-sm !default;\n$btn-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !default;\n\n// menu\n$menu-border-width: $border-width !default;\n$menu-border-color: $border-color !default;\n$menu-box-shadow: inset 0 1px 0 rgba($white, 0.15),\n 0 1px 1px rgba($black, 0.075) !default;\n$menu-transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out !default;\n\n// menu-item\n$menu-item-padding-y: 0.5rem !default;\n$menu-item-padding-x: 1rem !default;\n$menu-item-active-color: $primary !default;\n$menu-item-active-border-width: 2px !default;\n$menu-item-disabled-color: $gray-600 !default;\n\n/* stylelint-disable-next-line scss/double-slash-comment-whitespace-inside */\n//sub-menu\n/* stylelint-disable-next-line scss/double-slash-comment-whitespace-inside */\n//submenu\n$submenu-box-shadow: 0 2px 4px 0 rgb(0 0 0 / 12%), 0 0 6px 0 rgb(0 0 0 / 14%);\n\n/* stylelint-disable-next-line scss/double-slash-comment-whitespace-inside */\n//input\n$input-padding-y: $btn-padding-y !default;\n$input-padding-x: $btn-padding-x !default;\n$input-font-family: $btn-font-family !default;\n$input-font-size: $btn-font-size !default;\n$input-font-weight: $font-weight-base !default;\n$input-line-height: $btn-line-height !default;\n$input-padding-y-sm: $btn-padding-y-sm !default;\n$input-padding-x-sm: $btn-padding-x-sm !default;\n$input-font-size-sm: $btn-font-size-sm !default;\n$input-padding-y-lg: $btn-padding-y-lg !default;\n$input-padding-x-lg: $btn-padding-x-lg !default;\n$input-font-size-lg: $btn-font-size-lg !default;\n$input-bg: $white !default;\n$input-disabled-bg: $gray-200 !default;\n$input-disabled-border-color: null !default;\n$input-color: $gray-700 !default;\n$input-border-color: $gray-400 !default;\n$input-border-width: $border-width !default;\n$input-box-shadow: $box-shadow-inset !default;\n$input-border-radius: $border-radius !default;\n$input-border-radius-lg: $border-radius-lg !default;\n$input-border-radius-sm: $border-radius-sm !default;\n$input-focus-bg: $input-bg !default;\n/* stylelint-disable-next-line function-no-unknown */\n$input-focus-border-color: lighten($primary, 25%) !default;\n$input-focus-width: 0.1rem !default;\n$input-focus-color: $input-color !default;\n$input-focus-shadow-color: rgba($primary, 0.25) !default;\n$input-focus-box-shadow: 0 0 0 $input-focus-width $input-focus-shadow-color !default;\n$input-placeholder-color: $gray-400 !default;\n$input-plaintext-color: $body-color !default;\n$input-height-border: $input-border-width * 2 !default;\n\n/* stylelint-disable-next-line scss/dollar-variable-empty-line-before */\n$input-transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out !default;\n$input-group-addon-color: $input-color !default;\n$input-group-addon-bg: $gray-200 !default;\n$input-group-addon-border-color: $input-border-color !default;\n\n// Progress bars\n\n$progress-font-size: $font-size-base * 0.75 !default;\n$progress-bg: $gray-200 !default;\n$progress-border-radius: $border-radius !default;\n$progress-bar-color: $white !default;\n$progress-bar-transition: all 0.6s ease !default;\n\n// alert\n$alert-padding-y: 0.35rem !default;\n$alert-padding-x-left: 1rem !default;\n$alert-padding-x-right: 1rem !default;\n$alert-font-color: #000000d9;\n$alert-message-font-size: $font-size-base * 1.1 !default;\n$alert-description-font-size: $font-size-base * 0.8 !default;\n\n// Rate\n$rate-color: $yellow !default;\n$rate-color-default: $gray-200 !default;\n","@mixin button-style(\n $background,\n $border,\n $color,\n $hover-background: lighten($background, 7.5%),\n $hover-border: lighten($border, 10%),\n $hover-color: $color,\n) {\n color: $color;\n background: $background;\n border-color: $border;\n\n &:hover {\n color: $hover-color;\n background: $hover-background;\n border-color: $hover-border;\n }\n\n &:focus,\n &.focus {\n outline: none;\n color: $hover-color;\n background: $hover-background;\n border-color: $hover-border;\n }\n\n &:disabled,\n &.disabled {\n color: lighten($color, 50%);\n background: darken($background, 20%);\n border-color: darken($border, 8%);\n }\n}\n\n@mixin button-size($btn-padding-y,$btn-padding-x,$btn-font-size,$btn-border-raduis) {\n padding: $btn-padding-y $btn-padding-x;\n font-size: $btn-font-size;\n border-radius: $btn-border-raduis;\n}\n\n@mixin zoom-animation(\n $direction: \"top\",\n $scaleStart: scaleY(0),\n $scaleEnd: scaleY(1),\n $origin: center top,\n) {\n .zoom-in-#{$direction}-enter {\n opacity: 0;\n transform: $scaleStart;\n }\n .zoom-in-#{$direction}-enter-active {\n opacity: 1;\n transform: $scaleEnd;\n transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1) 100ms, opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) 100ms;\n transform-origin: $origin;\n }\n .zoom-in-#{$direction}-exit {\n opacity: 1;\n }\n .zoom-in-#{$direction}-exit-active {\n opacity: 0;\n transform: $scaleStart;\n transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1) 100ms, opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) 100ms;\n transform-origin: $origin;\n }\n}\n\n@mixin border-right-radius($raduis) {\n border-top-right-radius: $raduis;\n border-bottom-right-radius: $raduis;\n}\n\n@mixin border-left-radius($raduis) {\n border-top-left-radius: $raduis;\n border-bottom-left-radius: $raduis;\n}\n","@include zoom-animation(\"top\", scaleY(0), scaleY(1), center top);\n@include zoom-animation(\"left\", scale(0.45, 0.45), scale(1, 1), top left);\n@include zoom-animation(\"right\", scale(0.45, 0.45), scale(1, 1), top right);\n@include zoom-animation(\"bottom\", scaleY(0), scaleY(1), center bottom);\n",".dui-btn {\n position: relative;\n display: inline-block;\n font-weight: $font-weight-normal;\n white-space: nowrap; // 不换行\n text-align: center;\n vertical-align: middle;\n cursor: pointer;\n border: $btn-border-width solid $border-color;\n\n @include button-size($btn-padding-y,$btn-padding-x,$btn-font-size,$btn-border-radius);\n\n user-select: none;\n transition: $btn-transition;\n box-shadow: $btn-box-shadow;\n\n &[disabled] {\n cursor: not-allowed;\n box-shadow: none;\n\n > * {\n pointer-events: none;\n }\n }\n}\n\n.dui-btn-large {\n @include button-size($btn-padding-y-lg,$btn-padding-x-lg,$btn-font-size-lg,$btn-border-radius-lg);\n}\n\n.dui-btn-small {\n @include button-size($btn-padding-y-sm,$btn-padding-x-sm,$btn-font-size-sm,$btn-border-radius-sm);\n}\n\n.dui-btn-default {\n @include button-style($white, $gray-400, $body-color, $white, $primary, $primary);\n}\n\n.dui-btn-primary {\n @include button-style($primary, $primary, $white);\n}\n\n.dui-btn-danger {\n @include button-style($danger,$danger,$white);\n}\n\n.dui-btn-link {\n font-weight: $font-weight-normal;\n color: $btn-link-color;\n text-decoration: none;\n box-shadow: none;\n border: none;\n\n &:hover {\n color: $btn-link-hover-color;\n text-decoration: none;\n }\n\n &:focus,\n &.focus {\n text-decoration: none;\n box-shadow: none;\n }\n\n &:disabled,\n &.dui-btn-disabled {\n color: darken($btn-link-disabled-color, $amount: 2%);\n pointer-events: none;\n cursor: none;\n }\n}\n",".dui-alert {\n padding: $alert-padding-y $alert-padding-x-right $alert-padding-y $alert-padding-x-left;\n font-size: $font-size-base;\n display: inline-block;\n\n .dui-alert-message {\n font-size: $alert-message-font-size;\n }\n\n .dui-alert-description {\n font-size: $alert-description-font-size;\n }\n\n .dui-alert-message-with-description {\n margin-bottom: 10px;\n color: lighten($black, 10%);\n }\n}\n\n@each $key, $val in $theme-colors {\n .dui-alert-#{$key} {\n background-color: transparentize($val, 0.9);\n color: transparentize($alert-font-color, 0.1);\n border: 1px solid transparentize($val, 0.8);\n display: flex;\n justify-content: space-between;\n opacity: 1;\n }\n}\n\n.dui-alert-close {\n cursor: pointer;\n user-select: none;\n font-size: $font-size-sm;\n\n &:focus {\n color: red;\n }\n}\n\n.dui-alert-close-transition {\n animation: pyss 0.5s ease-in-out forwards;\n}\n\n.dui-alert-transition-end {\n display: none;\n}\n\n@keyframes pyss {\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n\n // height: 0;\n // padding: 0;\n // border: none;\n }\n}\n",".dui-menu {\n font-size: $font-size-base;\n margin: 0;\n padding: 0;\n outline: none;\n list-style: none;\n color: $black;\n border-bottom: $menu-border-color solid $menu-border-width;\n\n ul {\n list-style: none;\n }\n\n .dui-menu-item,\n .dui-menu-submenu {\n white-space: nowrap;\n padding: 10px;\n flex: 1;\n text-align: center;\n position: relative;\n transition: color 0.3s ease-in-out;\n color: $black;\n display: inherit;\n justify-content: center;\n\n .ant-menu-title-content {\n position: relative;\n width: 100%;\n\n &::after {\n position: absolute;\n right: 10px;\n bottom: 0;\n left: 0;\n width: 100%;\n top: 32px;\n border-bottom: $menu-item-active-border-width solid transparent;\n transition: border-color 0.3s ease-in-out;\n content: \"\";\n }\n }\n }\n\n .dui-menu-item-hover {\n .ant-menu-title-content {\n cursor: pointer;\n color: $menu-item-active-color;\n\n &::after {\n border-bottom: $menu-item-active-border-width solid $menu-item-active-color;\n }\n }\n }\n\n .dui-menu-item-active {\n .ant-menu-title-content {\n &::after {\n border-bottom: $menu-item-active-border-width solid $menu-item-active-color;\n }\n\n color: $menu-item-active-color;\n }\n }\n\n .dui-menu-item-disabled {\n color: #00000040 !important;\n background: 0 0;\n cursor: not-allowed;\n\n &::after {\n border-bottom: $menu-item-active-border-width solid transparent;\n }\n }\n\n .dui-menu-submenu-disabled {\n color: #00000040 !important;\n background: 0 0;\n cursor: not-allowed;\n }\n\n .dui-menu-submenu-hover,\n .dui-menu-submenu-active {\n > .ant-menu-title-content {\n cursor: pointer;\n color: $menu-item-active-color;\n\n &::after {\n border-bottom: $menu-item-active-border-width solid $menu-item-active-color;\n }\n }\n\n .dui-menu-submenu-item {\n max-height: 100vh !important;\n }\n }\n}\n\n.dui-menu-horizontal {\n display: flex;\n\n .dui-menu-submenu {\n position: relative;\n\n .dui-menu-submenu-item {\n position: absolute;\n z-index: 1050;\n background-color: $white;\n top: 36px;\n left: 0;\n padding-left: 0;\n box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d;\n max-height: 0;\n overflow: hidden;\n transition: all 0.3s ease-in-out;\n width: 100%;\n\n .ant-menu-title-content {\n &::after {\n border-bottom: $menu-item-active-border-width solid transparent;\n }\n }\n\n .dui-menu-item-hover {\n .ant-menu-title-content {\n color: $menu-item-active-color;\n transition: all 0.3s ease-in-out;\n }\n }\n }\n }\n}\n\n.dui-menu-vertical {\n display: flex;\n flex-direction: column;\n border-right: 1px solid #f4f4f4;\n border-bottom: none;\n\n .dui-menu-item,\n .dui-menu-submenu {\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n text-align: left;\n\n // cursor: pointer;\n .dui-menu-submenu-item {\n padding-left: 10%;\n transition: all 0.3s ease-in-out;\n max-height: 0 !important;\n overflow: hidden;\n }\n\n .dui-menu-submenu-collapse-open {\n max-height: 100vh !important;\n }\n\n .ant-menu-title-content {\n display: flex;\n justify-content: space-between;\n\n &::after {\n content: \"\";\n border-bottom: none;\n }\n\n .dui-menu-submenu-icon {\n transition: all 0.3s ease-in-out;\n }\n\n .dui-menu-submenu-icon-switch {\n transform: rotate(90deg);\n }\n }\n }\n\n .dui-menu-item-hover {\n .ant-menu-title-content {\n color: $menu-item-active-color;\n transition: all 0.3s ease-in-out;\n\n &::after {\n content: \"\";\n border-bottom: none;\n }\n }\n }\n\n .dui-menu-submenu-hover {\n .dui-menu-submenu-icon {\n color: $menu-item-active-color;\n }\n }\n}\n",".dui-carousel-container,\n.dui-carousel {\n width: 100%;\n display: flex;\n aspect-ratio: 2 / 1;\n}\n\n.dui-carousel-container {\n img {\n width: 100%;\n aspect-ratio: 2 / 1;\n }\n\n position: relative;\n transition: all 0.3s;\n}\n\n.dui-carousel-item {\n aspect-ratio: 2 / 1;\n}\n\n.dui-carousel {\n position: relative;\n overflow: hidden;\n}\n\n.dui-carousel-indicator {\n position: absolute;\n\n // background-color: red;\n display: flex !important;\n left: 50%;\n top: 95%;\n transform: translateX(-50%);\n\n > span {\n margin: 0 5px;\n display: block;\n width: 16px;\n height: 3px;\n padding: 0;\n color: transparent;\n font-size: 0;\n background: #fff;\n border: 0;\n border-radius: 1px;\n outline: none;\n cursor: pointer;\n opacity: 0.3;\n transition: all 0.5s;\n }\n\n .dui-carousel-indicator-active {\n width: 24px;\n opacity: 1;\n }\n}\n\n.dui-carousel-prev {\n user-select: none;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1000;\n background: #fff;\n opacity: 0.5;\n color: black;\n font-size: 30px;\n padding: 10px 5px;\n transition: all 0.2s;\n cursor: pointer;\n\n &:hover {\n opacity: 0.8;\n }\n}\n\n.dui-carousel-next {\n user-select: none;\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n z-index: 1000;\n background: #fff;\n opacity: 0.5;\n color: black;\n font-size: 30px;\n padding: 10px 5px;\n transition: all 0.2s;\n cursor: pointer;\n\n &:hover {\n opacity: 0.8;\n }\n}\n",".dui-icon-spin {\n animation: spin 1s infinite;\n}\n\n@keyframes spin {\n\n from { transform: rotate(0deg); }\n\n to { transform: rotate(360deg); }\n}\n",".dui-input-wrapper {\n display: flex;\n width: 100%;\n margin-bottom: 30px;\n position: relative;\n\n .icon-wrapper {\n position: absolute;\n height: 100%;\n width: 35px;\n justify-content: center;\n color: $input-color;\n right: 0;\n top: 0;\n display: flex;\n align-items: center;\n\n svg {\n color: $input-placeholder-color;\n transition: all 0.2s;\n }\n\n svg:hover {\n cursor: pointer;\n color: $input-color;\n }\n }\n}\n\n.icon-wrapper + .dui-input-inner {\n padding-right: 35px;\n}\n\n.dui-input-inner {\n width: 100%;\n padding: $input-padding-y $input-padding-x;\n font-family: $input-font-family;\n font-size: $input-font-size;\n font-weight: $input-font-weight;\n line-height: $input-line-height;\n color: $input-color;\n background-color: $input-bg;\n background-clip: padding-box;\n border: $input-border-width solid $input-border-color;\n\n // Note: This has no effect on `s in CSS.\n border-radius: $input-border-radius;\n box-shadow: $input-box-shadow;\n transition: $input-transition;\n\n &:focus {\n color: $input-focus-color;\n background-color: $input-focus-bg;\n border-color: $input-focus-border-color;\n outline: 0;\n box-shadow: $input-focus-box-shadow;\n\n // Avoid using mixin so we can pass custom focus shadow properly\n }\n\n &::placeholder {\n color: $input-placeholder-color;\n\n // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.\n opacity: 1;\n }\n\n &:disabled,\n &[readonly] {\n background-color: $input-disabled-bg;\n border-color: $input-disabled-border-color;\n\n // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.\n opacity: 1;\n }\n}\n\n.dui-input-group-prepend,\n.dui-input-group-append {\n display: flex;\n align-items: center;\n padding: $input-padding-y $input-padding-x;\n margin-bottom: 0; // Allow use of