taro-react-uilib 1.4.6 → 1.4.7-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionSheet/index.js +1 -1
- package/dist/components/ActionSheet/index.js.map +1 -1
- package/dist/components/Dialog/Alert/index.js +1 -1
- package/dist/components/Dialog/Alert/index.js.map +1 -1
- package/dist/components/Dialog/Confirm/index.js +1 -1
- package/dist/components/Dialog/Confirm/index.js.map +1 -1
- package/dist/components/DialogRef/index.js +1 -1
- package/dist/components/DialogRef/index.js.map +1 -1
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/Progress/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/styles/components/actionsheet.scss +1 -1
- package/dist/styles/components/dialogref.scss +18 -0
- package/dist/styles/components/font/iconfont.ttf +0 -0
- package/dist/styles/components/font/iconfont.woff +0 -0
- package/dist/styles/components/font/iconfont.woff2 +0 -0
- package/dist/styles/components/icon.scss +4 -0
- package/dist/styles/components/progress.scss +27 -4
- package/lib/components/ActionSheet/index.js +3 -0
- package/lib/components/ActionSheet/index.js.map +1 -1
- package/lib/components/Dialog/Alert/index.js +1 -1
- package/lib/components/Dialog/Alert/index.js.map +1 -1
- package/lib/components/Dialog/Confirm/index.js +1 -1
- package/lib/components/Dialog/Confirm/index.js.map +1 -1
- package/lib/components/DialogRef/index.js +3 -2
- package/lib/components/DialogRef/index.js.map +1 -1
- package/lib/components/Icon/index.js.map +1 -1
- package/lib/components/Progress/index.js +7 -5
- package/lib/components/Progress/index.js.map +1 -1
- package/package.json +1 -1
- package/types/components/Dialog/Alert/index.d.ts +2 -1
- package/types/components/Dialog/Confirm/index.d.ts +2 -1
- package/types/components/DialogRef/index.d.ts +2 -0
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Progress/index.d.ts +6 -0
- package/types/components/Result/statusMap.d.ts +9 -0
- package/types/stories/Button.d.ts +29 -0
- package/types/stories/Header.d.ts +10 -0
- package/types/stories/Page.d.ts +10 -0
- package/CHANGELOG.md +0 -620
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__read as e}from"../node_modules/tslib/tslib.es6.js";import n,{useState as t,useEffect as a}from"react";import o from"classnames";import{View as i}from"@tarojs/components";import l from"../Popup/index.js";var c=function(c){var r=c.visible,s=void 0!==r&&r,m=c.title,u=c.description,h=c.data,d=void 0===h?[]:h,f=c.onConfirm,p=c.onCancel,v=c.className,E=c.children,x=c.style,N=c.mode,C=c.submitText,k=void 0===C?"提交":C,g=c.cancelText,y=void 0===g?"取消":g,b=c.showCancel,T=void 0!==b&&b,j=c.renderItem,P=c.ItemWrapper,V=c.onSubmit,_=c.onClick,w=c.showClose,A=void 0!==w&&w,I=c.justifyContent,O=void 0===I?"center":I,R=c.inline,F=void 0!==R&&R,M=c.defaultValue,S=void 0===M?"":M,W=e(t(s),2),q=W[0],z=W[1],B=e(t("string"==typeof S?S:null==S?void 0:S.value),2),D=B[0],G=B[1],H=function(e){null==p||p(e),null==_||_(!1),z(!1)};a((function(){z(s)}),[s]);var J=function(){null==V||V()},K=function(){return d.map((function(e,t){return j?j(e,t):n.createElement(i,{className:o("xh-action-sheet-main-panel-item",O,{active:"string"==typeof e?e===D:e.value===D}),key:t,onClick:function(){!function(e,n){null==f||f(e,n),z(!1);var t="string"==typeof e?e:e.value;G(t)}(e,t)}},"string"==typeof e?e:e.text)}))},L=A||"controlled"===N&&!T;return n.createElement(i,{className:o("xh-action-sheet",{inline:F}),onClick:function(){_?_(!s):d.length<=0||z(!0)}},n.createElement(l,{visible:q},n.createElement(i,{className:o("xh-action-sheet-main",v,N),style:x},m&&n.createElement(i,{className:"xh-action-sheet-main-header"},n.createElement(i,{className:"xh-action-sheet-main-header-title"},m),n.createElement(i,{className:"xh-action-sheet-main-header-desc"},u),L&&n.createElement(i,{className:"xh-action-sheet-main-header-close",onClick:function(){return H()}})),n.createElement(i,{className:o("xh-action-sheet-main-panel",{noTitle:!m}),onClick:function(e){return"h5"!==process.env.TARO_ENV&&e.stopPropagation()}},P?n.createElement(P,null,K()):n.createElement(n.Fragment,null,K())),n.createElement(i,{className:o("xh-action-sheet-main-action",{noMarinTop:"controlled"!==N&&L}),onClick:function(e){return"h5"!==process.env.TARO_ENV&&e.stopPropagation()}},"controlled"===N?n.createElement(i,null,n.createElement(i,{className:"xh-action-sheet-main-action-submit",onClick:J},k),T&&n.createElement(i,{className:"xh-action-sheet-main-action-cancel mode",onClick:function(){return H(!0)}},y)):L?n.createElement("div",null):n.createElement(i,{className:"xh-action-sheet-main-action-cancel",onClick:function(){return H(!0)}},y)))),E)};export{c as default};
|
|
1
|
+
import{__read as e}from"../node_modules/tslib/tslib.es6.js";import n,{useState as t,useEffect as a}from"react";import o from"classnames";import{View as i}from"@tarojs/components";import l from"../Popup/index.js";var c=function(c){var r=c.visible,s=void 0!==r&&r,m=c.title,u=c.description,h=c.data,d=void 0===h?[]:h,f=c.onConfirm,p=c.onCancel,v=c.className,E=c.children,x=c.style,N=c.mode,C=c.submitText,k=void 0===C?"提交":C,g=c.cancelText,y=void 0===g?"取消":g,b=c.showCancel,T=void 0!==b&&b,j=c.renderItem,P=c.ItemWrapper,V=c.onSubmit,_=c.onClick,w=c.showClose,A=void 0!==w&&w,I=c.justifyContent,O=void 0===I?"center":I,R=c.inline,F=void 0!==R&&R,M=c.defaultValue,S=void 0===M?"":M,W=e(t(s),2),q=W[0],z=W[1],B=e(t("string"==typeof S?S:null==S?void 0:S.value),2),D=B[0],G=B[1];a((function(){G("string"==typeof S?S:null==S?void 0:S.value)}),[S]);var H=function(e){null==p||p(e),null==_||_(!1),z(!1)};a((function(){z(s)}),[s]);var J=function(){null==V||V()},K=function(){return d.map((function(e,t){return j?j(e,t):n.createElement(i,{className:o("xh-action-sheet-main-panel-item",O,{active:"string"==typeof e?e===D:e.value===D}),key:t,onClick:function(){!function(e,n){null==f||f(e,n),z(!1);var t="string"==typeof e?e:e.value;G(t)}(e,t)}},"string"==typeof e?e:e.text)}))},L=A||"controlled"===N&&!T;return n.createElement(i,{className:o("xh-action-sheet",{inline:F}),onClick:function(){_?_(!s):d.length<=0||z(!0)}},n.createElement(l,{visible:q},n.createElement(i,{className:o("xh-action-sheet-main",v,N),style:x},m&&n.createElement(i,{className:"xh-action-sheet-main-header"},n.createElement(i,{className:"xh-action-sheet-main-header-title"},m),n.createElement(i,{className:"xh-action-sheet-main-header-desc"},u),L&&n.createElement(i,{className:"xh-action-sheet-main-header-close",onClick:function(){return H()}})),n.createElement(i,{className:o("xh-action-sheet-main-panel",{noTitle:!m}),onClick:function(e){return"h5"!==process.env.TARO_ENV&&e.stopPropagation()}},P?n.createElement(P,null,K()):n.createElement(n.Fragment,null,K())),n.createElement(i,{className:o("xh-action-sheet-main-action",{noMarinTop:"controlled"!==N&&L}),onClick:function(e){return"h5"!==process.env.TARO_ENV&&e.stopPropagation()}},"controlled"===N?n.createElement(i,null,n.createElement(i,{className:"xh-action-sheet-main-action-submit",onClick:J},k),T&&n.createElement(i,{className:"xh-action-sheet-main-action-cancel mode",onClick:function(){return H(!0)}},y)):L?n.createElement("div",null):n.createElement(i,{className:"xh-action-sheet-main-action-cancel",onClick:function(){return H(!0)}},y)))),E)};export{c as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/ActionSheet/index.tsx"],"sourcesContent":["import React, { useState, ReactNode, ReactElement, useEffect } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\n\nimport Popup from \"../Popup\";\nimport \"./index.scss\";\n\nexport interface ActionSheetOption {\n text: ReactNode;\n value: string | number;\n [key: string]: any;\n}\n\nexport type ActionValue = string | ActionSheetOption;\nexport interface ActionProps<T extends ActionValue = ActionValue> {\n visible?: boolean;\n title?: ReactNode;\n data: T[];\n defaultValue?: T;\n className?: string;\n style?: React.CSSProperties;\n onConfirm?: (selectedValue: T, index: number) => void;\n onCancel?: (bottom?: boolean) => void;\n onClose?: () => void;\n onClick?: (flag: boolean) => void;\n children?: ReactNode;\n description?: ReactNode;\n /**\n * @summary controlled模式下,组件为受控组件,需要外部来显示和隐藏\n * @description submit 模式下会显示提交按钮,可以自定义,也可以显示取消按钮但是得传进来一个Toggle事件用来显示隐藏\n */\n mode?: \"controlled\";\n cancelText?: ReactNode;\n /**\n * submit模式下,默认不展示取消按钮,可以设置\n */\n showCancel?: boolean;\n submitText?: string;\n renderItem?: (item: T, index: number) => ReactNode;\n ItemWrapper?: React.FC<{}>;\n onSubmit?: () => void;\n justifyContent?: \"start\" | \"end\";\n /**\n * 显示右上角的关闭、默认只有不显示下面的取消的时候才出现\n */\n showClose?: boolean;\n inline?: boolean;\n}\n\nconst ActionSheet = <T extends ActionValue>(\n props: ActionProps<T>\n): ReactElement => {\n const {\n visible = false,\n title,\n description,\n data = [],\n onConfirm,\n onCancel,\n className,\n children,\n style,\n mode,\n submitText = \"提交\",\n cancelText = \"取消\",\n showCancel = false,\n renderItem,\n ItemWrapper,\n onSubmit,\n onClick,\n showClose = false,\n justifyContent = \"center\",\n inline = false,\n defaultValue = \"\",\n } = props;\n\n const [innerVisible, setInnerVisible] = useState(visible);\n const [value, selectedValue] = useState(\n typeof defaultValue === \"string\" ? defaultValue : defaultValue?.value\n );\n\n const handleCancel = (bottom?: boolean) => {\n onCancel?.(bottom);\n onClick?.(false);\n setInnerVisible(false);\n };\n\n useEffect(() => {\n setInnerVisible(visible);\n }, [visible]);\n\n const handleClick = () => {\n if (onClick) {\n onClick(!visible);\n return;\n }\n if (data.length <= 0) return;\n setInnerVisible(true);\n };\n\n const handleConfirm = (item: T, index: number) => {\n onConfirm?.(item, index);\n setInnerVisible(false);\n const checkValue = typeof item === \"string\" ? item : item.value;\n selectedValue(checkValue);\n };\n\n const handleSubmit = () => {\n onSubmit?.();\n };\n\n const submitButton = () => {\n return (\n <View>\n <View\n className=\"xh-action-sheet-main-action-submit\"\n onClick={handleSubmit}\n >\n {submitText}\n </View>\n {showCancel && (\n <View\n className=\"xh-action-sheet-main-action-cancel mode\"\n onClick={() => handleCancel(true)}\n >\n {cancelText}\n </View>\n )}\n </View>\n );\n };\n\n const itemRender = () =>\n data.map((item, index) => {\n return renderItem ? (\n renderItem(item, index)\n ) : (\n <View\n className={classNames(\n \"xh-action-sheet-main-panel-item\",\n justifyContent,\n {\n active:\n typeof item === \"string\"\n ? item === value\n : item.value === value,\n }\n )}\n key={index}\n onClick={() => {\n handleConfirm(item, index);\n }}\n >\n {typeof item === \"string\" ? item : item.text}\n </View>\n );\n });\n\n const innerShowClose = showClose || (mode === \"controlled\" && !showCancel);\n\n return (\n <View\n className={classNames(\"xh-action-sheet\", { inline })}\n onClick={handleClick}\n >\n <Popup visible={innerVisible}>\n <View\n className={classNames(\"xh-action-sheet-main\", className, mode)}\n style={style}\n >\n {title && (\n <View className=\"xh-action-sheet-main-header\">\n <View className=\"xh-action-sheet-main-header-title\">{title}</View>\n <View className=\"xh-action-sheet-main-header-desc\">\n {description}\n </View>\n {innerShowClose && (\n <View\n className=\"xh-action-sheet-main-header-close\"\n onClick={() => handleCancel()}\n ></View>\n )}\n </View>\n )}\n <View\n className={classNames(\"xh-action-sheet-main-panel\", {\n noTitle: !title,\n })}\n onClick={e => process.env.TARO_ENV !== \"h5\" && e.stopPropagation()}\n >\n {ItemWrapper ? (\n <ItemWrapper>{itemRender()}</ItemWrapper>\n ) : (\n <React.Fragment>{itemRender()}</React.Fragment>\n )}\n </View>\n <View\n className={classNames(\"xh-action-sheet-main-action\", {\n noMarinTop: mode !== \"controlled\" && innerShowClose,\n })}\n onClick={e => process.env.TARO_ENV !== \"h5\" && e.stopPropagation()}\n >\n {mode === \"controlled\" ? (\n submitButton()\n ) : !innerShowClose ? (\n <View\n className=\"xh-action-sheet-main-action-cancel\"\n onClick={() => handleCancel(true)}\n >\n {cancelText}\n </View>\n ) : (\n <div></div>\n )}\n </View>\n </View>\n </Popup>\n {children}\n </View>\n );\n};\n\nexport default ActionSheet;\n"],"names":["ActionSheet","props","_a","visible","title","description","_b","data","onConfirm","onCancel","className","children","style","mode","_c","submitText","_d","cancelText","_e","showCancel","renderItem","ItemWrapper","onSubmit","onClick","_f","showClose","_g","justifyContent","_h","inline","_j","defaultValue","_k","__read","useState","innerVisible","setInnerVisible","_l","value","selectedValue","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/ActionSheet/index.tsx"],"sourcesContent":["import React, { useState, ReactNode, ReactElement, useEffect } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\n\nimport Popup from \"../Popup\";\nimport \"./index.scss\";\n\nexport interface ActionSheetOption {\n text: ReactNode;\n value: string | number;\n [key: string]: any;\n}\n\nexport type ActionValue = string | ActionSheetOption;\nexport interface ActionProps<T extends ActionValue = ActionValue> {\n visible?: boolean;\n title?: ReactNode;\n data: T[];\n defaultValue?: T;\n className?: string;\n style?: React.CSSProperties;\n onConfirm?: (selectedValue: T, index: number) => void;\n onCancel?: (bottom?: boolean) => void;\n onClose?: () => void;\n onClick?: (flag: boolean) => void;\n children?: ReactNode;\n description?: ReactNode;\n /**\n * @summary controlled模式下,组件为受控组件,需要外部来显示和隐藏\n * @description submit 模式下会显示提交按钮,可以自定义,也可以显示取消按钮但是得传进来一个Toggle事件用来显示隐藏\n */\n mode?: \"controlled\";\n cancelText?: ReactNode;\n /**\n * submit模式下,默认不展示取消按钮,可以设置\n */\n showCancel?: boolean;\n submitText?: string;\n renderItem?: (item: T, index: number) => ReactNode;\n ItemWrapper?: React.FC<{}>;\n onSubmit?: () => void;\n justifyContent?: \"start\" | \"end\";\n /**\n * 显示右上角的关闭、默认只有不显示下面的取消的时候才出现\n */\n showClose?: boolean;\n inline?: boolean;\n}\n\nconst ActionSheet = <T extends ActionValue>(\n props: ActionProps<T>\n): ReactElement => {\n const {\n visible = false,\n title,\n description,\n data = [],\n onConfirm,\n onCancel,\n className,\n children,\n style,\n mode,\n submitText = \"提交\",\n cancelText = \"取消\",\n showCancel = false,\n renderItem,\n ItemWrapper,\n onSubmit,\n onClick,\n showClose = false,\n justifyContent = \"center\",\n inline = false,\n defaultValue = \"\",\n } = props;\n\n const [innerVisible, setInnerVisible] = useState(visible);\n const [value, selectedValue] = useState(\n typeof defaultValue === \"string\" ? defaultValue : defaultValue?.value\n );\n\n useEffect(() => {\n selectedValue(\n typeof defaultValue === \"string\" ? defaultValue : defaultValue?.value\n );\n }, [defaultValue]);\n\n const handleCancel = (bottom?: boolean) => {\n onCancel?.(bottom);\n onClick?.(false);\n setInnerVisible(false);\n };\n\n useEffect(() => {\n setInnerVisible(visible);\n }, [visible]);\n\n const handleClick = () => {\n if (onClick) {\n onClick(!visible);\n return;\n }\n if (data.length <= 0) return;\n setInnerVisible(true);\n };\n\n const handleConfirm = (item: T, index: number) => {\n onConfirm?.(item, index);\n setInnerVisible(false);\n const checkValue = typeof item === \"string\" ? item : item.value;\n selectedValue(checkValue);\n };\n\n const handleSubmit = () => {\n onSubmit?.();\n };\n\n const submitButton = () => {\n return (\n <View>\n <View\n className=\"xh-action-sheet-main-action-submit\"\n onClick={handleSubmit}\n >\n {submitText}\n </View>\n {showCancel && (\n <View\n className=\"xh-action-sheet-main-action-cancel mode\"\n onClick={() => handleCancel(true)}\n >\n {cancelText}\n </View>\n )}\n </View>\n );\n };\n\n const itemRender = () =>\n data.map((item, index) => {\n return renderItem ? (\n renderItem(item, index)\n ) : (\n <View\n className={classNames(\n \"xh-action-sheet-main-panel-item\",\n justifyContent,\n {\n active:\n typeof item === \"string\"\n ? item === value\n : item.value === value,\n }\n )}\n key={index}\n onClick={() => {\n handleConfirm(item, index);\n }}\n >\n {typeof item === \"string\" ? item : item.text}\n </View>\n );\n });\n\n const innerShowClose = showClose || (mode === \"controlled\" && !showCancel);\n\n return (\n <View\n className={classNames(\"xh-action-sheet\", { inline })}\n onClick={handleClick}\n >\n <Popup visible={innerVisible}>\n <View\n className={classNames(\"xh-action-sheet-main\", className, mode)}\n style={style}\n >\n {title && (\n <View className=\"xh-action-sheet-main-header\">\n <View className=\"xh-action-sheet-main-header-title\">{title}</View>\n <View className=\"xh-action-sheet-main-header-desc\">\n {description}\n </View>\n {innerShowClose && (\n <View\n className=\"xh-action-sheet-main-header-close\"\n onClick={() => handleCancel()}\n ></View>\n )}\n </View>\n )}\n <View\n className={classNames(\"xh-action-sheet-main-panel\", {\n noTitle: !title,\n })}\n onClick={e => process.env.TARO_ENV !== \"h5\" && e.stopPropagation()}\n >\n {ItemWrapper ? (\n <ItemWrapper>{itemRender()}</ItemWrapper>\n ) : (\n <React.Fragment>{itemRender()}</React.Fragment>\n )}\n </View>\n <View\n className={classNames(\"xh-action-sheet-main-action\", {\n noMarinTop: mode !== \"controlled\" && innerShowClose,\n })}\n onClick={e => process.env.TARO_ENV !== \"h5\" && e.stopPropagation()}\n >\n {mode === \"controlled\" ? (\n submitButton()\n ) : !innerShowClose ? (\n <View\n className=\"xh-action-sheet-main-action-cancel\"\n onClick={() => handleCancel(true)}\n >\n {cancelText}\n </View>\n ) : (\n <div></div>\n )}\n </View>\n </View>\n </Popup>\n {children}\n </View>\n );\n};\n\nexport default ActionSheet;\n"],"names":["ActionSheet","props","_a","visible","title","description","_b","data","onConfirm","onCancel","className","children","style","mode","_c","submitText","_d","cancelText","_e","showCancel","renderItem","ItemWrapper","onSubmit","onClick","_f","showClose","_g","justifyContent","_h","inline","_j","defaultValue","_k","__read","useState","innerVisible","setInnerVisible","_l","value","selectedValue","useEffect","handleCancel","bottom","handleSubmit","itemRender","map","item","index","React","createElement","View","classNames","active","key","checkValue","handleConfirm","text","innerShowClose","length","Popup","noTitle","e","process","env","TARO_ENV","stopPropagation","Fragment","noMarinTop"],"mappings":"oNAiDM,IAAAA,EAAc,SAClBC,GAGE,IAAAC,EAqBED,EArBaE,QAAfA,OAAU,IAAAD,GAAKA,EACfE,EAoBEH,EA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,UAAqBH,EAAEI,iBAAiB,GAExD,eAATpD,EAzFPmC,gBAACE,EAAI,KACHF,EAACC,cAAAC,EACC,CAAAxC,UAAU,qCACVa,QAASoB,GAER5B,GAEFI,GACC6B,EAAAC,cAACC,EAAI,CACHxC,UAAU,0CACVa,QAAS,WAAM,OAAAkB,GAAa,EAAK,GAEhCxB,IA+EIwC,EAQHT,EAAAC,cAAA,MAAA,MAPAD,gBAACE,EAAI,CACHxC,UAAU,qCACVa,QAAS,WAAM,OAAAkB,GAAa,EAAK,GAEhCxB,MAQVN,EAGP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e,__assign as t}from"../../node_modules/tslib/tslib.es6.js";import o,{createRef as n}from"react";import r from"react-dom";import{showModal as i}from"@tarojs/taro";import m from"../../DialogComponent/index.js";import c from"../../Button/index.js";var a=function(a){var f=a.title,l=void 0===f?"":f,s=a.content,d=a.confirmText,u=void 0===d?"知道了":d,p=e(a,["title","content","confirmText"]);return new Promise((function(e){if("h5"===process.env.TARO_ENV){var a=document.createElement("div"),f=n(),d=o.createElement(c,{ghost:!0,type:"default",shape:"rectangle",className:"xh-alert-button",onClick:function(){r.unmountComponentAtNode(a),e()}},u);r.render(o.createElement(m,{header:l,footer:d,content:s,visible:!0,ref:f}),a)}else i(t({title:l,content:s,showCancel:!1,confirmColor:"#fe5e00",confirmText:u},p)).then((function(){return e()}))}))};export{a as default};
|
|
1
|
+
import{__rest as e,__assign as t}from"../../node_modules/tslib/tslib.es6.js";import o,{createRef as n}from"react";import r from"react-dom";import{showModal as i}from"@tarojs/taro";import m from"../../DialogComponent/index.js";import c from"../../Button/index.js";var a=function(a){var f=a.title,l=void 0===f?"":f,s=a.content,d=a.confirmText,u=void 0===d?"知道了":d,p=e(a,["title","content","confirmText"]);return new Promise((function(e){if("h5"===process.env.TARO_ENV){var a=document.createElement("div"),f=n(),d=o.createElement(c,{ghost:!0,type:"default",shape:"rectangle",className:"xh-alert-button",onClick:function(){r.unmountComponentAtNode(a),e()}},u);r.render(o.createElement(m,t({header:l,footer:d,content:s,visible:!0,ref:f},p)),a)}else i(t({title:l,content:s,showCancel:!1,confirmColor:"#fe5e00",confirmText:u},p)).then((function(){return e()}))}))};export{a as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Dialog/Alert/index.tsx"],"sourcesContent":["import React, { createRef, ReactNode } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { showModal } from \"@tarojs/taro\";\nimport Dialog, { DialogRef } from \"../../DialogComponent\";\nimport Button from \"../../../../src/components/Button\";\n\nexport type AlertProps = {\n title?: string | ReactNode;\n content?: string | ReactNode;\n confirmText?: string | ReactNode;\n} & {\n /** 取消按钮的文字,最多 4 个字符 */\n cancelText?: string;\n /** 接口调用结束的回调函数(调用成功、失败都会执行) */\n complete?: (res: TaroGeneral.CallbackResult) => void;\n /** 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 */\n confirmColor?: string;\n /** 确认按钮的文字,最多 4 个字符 */\n confirmText?: string;\n /** 提示的内容 */\n content?: string;\n /** 接口调用失败的回调函数 */\n fail?: (res: TaroGeneral.CallbackResult) => void;\n /** 接口调用成功的回调函数 */\n success?: () => void;\n /** 提示的标题 */\n title?: string;\n};\n\nconst Alert = (props: AlertProps): Promise<void> => {\n const { title = \"\", content, confirmText = \"知道了\", ...rest } = props;\n return new Promise(resolve => {\n if (process.env.TARO_ENV === \"h5\") {\n const div = document.createElement(\"div\");\n const dialogRef = createRef<DialogRef>();\n const alertFooter = (\n <Button\n ghost\n type=\"default\"\n shape=\"rectangle\"\n className=\"xh-alert-button\"\n onClick={() => {\n ReactDOM.unmountComponentAtNode(div);\n resolve();\n }}\n >\n {confirmText}\n </Button>\n );\n ReactDOM.render(\n <Dialog\n header={title}\n footer={alertFooter}\n content={content}\n visible\n ref={dialogRef}\n />,\n div\n );\n } else {\n showModal({\n title: title as string,\n content: content as string,\n showCancel: false,\n confirmColor: \"#fe5e00\",\n confirmText: confirmText as string,\n ...rest,\n }).then(() => resolve());\n }\n });\n};\n\nexport default Alert;\n"],"names":["Alert","props","_a","title","content","_b","confirmText","rest","__rest","Promise","resolve","process","env","TARO_ENV","div_1","document","createElement","dialogRef","createRef","alertFooter","React","Button","ghost","type","shape","className","onClick","ReactDOM","unmountComponentAtNode","render","Dialog","header","footer","visible","ref","showModal","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Dialog/Alert/index.tsx"],"sourcesContent":["import React, { createRef, ReactNode } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { showModal } from \"@tarojs/taro\";\nimport Dialog, { DialogRef } from \"../../DialogComponent\";\nimport Button from \"../../../../src/components/Button\";\nimport { XHComponentCommonProps } from \"../../../types\";\n\nexport type AlertProps = {\n title?: string | ReactNode;\n content?: string | ReactNode;\n confirmText?: string | ReactNode;\n} & {\n /** 取消按钮的文字,最多 4 个字符 */\n cancelText?: string;\n /** 接口调用结束的回调函数(调用成功、失败都会执行) */\n complete?: (res: TaroGeneral.CallbackResult) => void;\n /** 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 */\n confirmColor?: string;\n /** 确认按钮的文字,最多 4 个字符 */\n confirmText?: string;\n /** 提示的内容 */\n content?: string;\n /** 接口调用失败的回调函数 */\n fail?: (res: TaroGeneral.CallbackResult) => void;\n /** 接口调用成功的回调函数 */\n success?: () => void;\n /** 提示的标题 */\n title?: string;\n} & XHComponentCommonProps;\n\nconst Alert = (props: AlertProps): Promise<void> => {\n const { title = \"\", content, confirmText = \"知道了\", ...rest } = props;\n return new Promise(resolve => {\n if (process.env.TARO_ENV === \"h5\") {\n const div = document.createElement(\"div\");\n const dialogRef = createRef<DialogRef>();\n const alertFooter = (\n <Button\n ghost\n type=\"default\"\n shape=\"rectangle\"\n className=\"xh-alert-button\"\n onClick={() => {\n ReactDOM.unmountComponentAtNode(div);\n resolve();\n }}\n >\n {confirmText}\n </Button>\n );\n ReactDOM.render(\n <Dialog\n header={title}\n footer={alertFooter}\n content={content}\n visible\n ref={dialogRef}\n {...rest}\n />,\n div\n );\n } else {\n showModal({\n title: title as string,\n content: content as string,\n showCancel: false,\n confirmColor: \"#fe5e00\",\n confirmText: confirmText as string,\n ...rest,\n }).then(() => resolve());\n }\n });\n};\n\nexport default Alert;\n"],"names":["Alert","props","_a","title","content","_b","confirmText","rest","__rest","Promise","resolve","process","env","TARO_ENV","div_1","document","createElement","dialogRef","createRef","alertFooter","React","Button","ghost","type","shape","className","onClick","ReactDOM","unmountComponentAtNode","render","Dialog","__assign","header","footer","visible","ref","showModal","showCancel","confirmColor","then"],"mappings":"uQA8BM,IAAAA,EAAQ,SAACC,GACL,IAAAC,EAAsDD,EAA5CE,MAAVA,OAAK,IAAAD,EAAG,GAAEA,EAAEE,EAA0CH,EAAnCG,QAAEC,EAAiCJ,EAAdK,YAAnBA,OAAW,IAAAD,EAAG,MAAKA,EAAKE,EAASC,EAAAP,EAAxD,CAAA,QAAA,UAAA,gBACN,OAAO,IAAIQ,SAAQ,SAAAC,GACjB,GAA6B,OAAzBC,QAAQC,IAAIC,SAAmB,CACjC,IAAMC,EAAMC,SAASC,cAAc,OAC7BC,EAAYC,IACZC,EACJC,EAAAJ,cAACK,EACC,CAAAC,SACAC,KAAK,UACLC,MAAM,YACNC,UAAU,kBACVC,QAAS,WACPC,EAASC,uBAAuBd,GAChCJ,GACF,GAECJ,GAGLqB,EAASE,OACPT,EAAAJ,cAACc,EAAMC,EAAA,CACLC,OAAQ7B,EACR8B,OAAQd,EACRf,QAASA,EACT8B,SAAO,EACPC,IAAKlB,GACDV,IAENO,EAEH,MACCsB,EACEL,EAAA,CAAA5B,MAAOA,EACPC,QAASA,EACTiC,YAAY,EACZC,aAAc,UACdhC,YAAaA,GACVC,IACFgC,MAAK,WAAM,OAAA7B,GAAA,GAElB,GACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e,__assign as o}from"../../node_modules/tslib/tslib.es6.js";import t,{createRef as n}from"react";import r from"react-dom";import{showModal as c}from"@tarojs/taro";import i from"../../DialogComponent/index.js";import m from"../../Button/index.js";var a=function(a){var f=a.title,l=void 0===f?"":f,s=a.content,u=a.confirmText,d=void 0===u?"确定":u,p=a.cancelText,x=void 0===p?"取消":p,h=e(a,["title","content","confirmText","cancelText"]);return new Promise((function(e){if("h5"===process.env.TARO_ENV){var a=document.createElement("div"),f=n(),u=t.createElement("div",{className:"xh-confirm-footer"},t.createElement(m,{ghost:!0,type:"default",shape:"rectangle",className:"xh-confirm-footer-button xh-confirm-footer-cancel-button",onClick:function(){r.unmountComponentAtNode(a),e({errMsg:"ok",confirm:!1,cancel:!0})}},x),t.createElement(m,{ghost:!0,type:"primary",shape:"rectangle",className:"xh-confirm-footer-button xh-confirm-footer-confirm-button",onClick:function(){r.unmountComponentAtNode(a),e({errMsg:"ok",confirm:!0,cancel:!1})}},d));r.render(t.createElement(i,{header:l,footer:u,content:s,visible:!0,ref:f}),a)}else c(o({title:l,content:s,confirmColor:"#fe5e00",cancelText:x,cancelColor:"#666",confirmText:d},h)).then(e)}))};export{a as default};
|
|
1
|
+
import{__rest as e,__assign as o}from"../../node_modules/tslib/tslib.es6.js";import t,{createRef as n}from"react";import r from"react-dom";import{showModal as c}from"@tarojs/taro";import i from"../../DialogComponent/index.js";import m from"../../Button/index.js";var a=function(a){var f=a.title,l=void 0===f?"":f,s=a.content,u=a.confirmText,d=void 0===u?"确定":u,p=a.cancelText,x=void 0===p?"取消":p,h=e(a,["title","content","confirmText","cancelText"]);return new Promise((function(e){if("h5"===process.env.TARO_ENV){var a=document.createElement("div"),f=n(),u=t.createElement("div",{className:"xh-confirm-footer"},t.createElement(m,{ghost:!0,type:"default",shape:"rectangle",className:"xh-confirm-footer-button xh-confirm-footer-cancel-button",onClick:function(){r.unmountComponentAtNode(a),e({errMsg:"ok",confirm:!1,cancel:!0})}},x),t.createElement(m,{ghost:!0,type:"primary",shape:"rectangle",className:"xh-confirm-footer-button xh-confirm-footer-confirm-button",onClick:function(){r.unmountComponentAtNode(a),e({errMsg:"ok",confirm:!0,cancel:!1})}},d));r.render(t.createElement(i,o({header:l,footer:u,content:s,visible:!0,ref:f},h)),a)}else c(o({title:l,content:s,confirmColor:"#fe5e00",cancelText:x,cancelColor:"#666",confirmText:d},h)).then(e)}))};export{a as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Dialog/Confirm/index.tsx"],"sourcesContent":["import React, { createRef } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { showModal } from \"@tarojs/taro\";\nimport DialogComponent, { DialogRef } from \"../../DialogComponent\";\nimport Button from \"../../Button\";\n\nexport type ConfirmProps = {\n title?: string;\n header?: string;\n content: string;\n cancelText?: string;\n confirmText?: string;\n} & {\n /** 取消按钮的文字颜色,必须是 16 进制格式的颜色字符串 */\n cancelColor?: string;\n /** 取消按钮的文字,最多 4 个字符 */\n cancelText?: string;\n /** 接口调用结束的回调函数(调用成功、失败都会执行) */\n complete?: (res: TaroGeneral.CallbackResult) => void;\n /** 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 */\n confirmColor?: string;\n /** 确认按钮的文字,最多 4 个字符 */\n confirmText?: string;\n /** 提示的内容 */\n content?: string;\n /** 接口调用失败的回调函数 */\n fail?: (res: TaroGeneral.CallbackResult) => void;\n /** 接口调用成功的回调函数 */\n success?: (result: ConfirmPropsResult) => void;\n /** 提示的标题 */\n title?: string;\n};\n\nexport type ConfirmPropsResult = {\n /** 为 true 时,表示用户点击了取消(用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭) */\n cancel: boolean;\n /** 为 true 时,表示用户点击了确定按钮 */\n confirm: boolean;\n /** 调用结果 */\n errMsg: string;\n};\nconst Comfirm = (props: ConfirmProps): Promise<ConfirmPropsResult> => {\n const {\n title = \"\",\n content,\n confirmText = \"确定\",\n cancelText = \"取消\",\n ...rest\n } = props;\n return new Promise(resolve => {\n if (process.env.TARO_ENV === \"h5\") {\n const div = document.createElement(\"div\");\n\n const dialogRef = createRef<DialogRef>();\n const alertFooter = (\n <div className=\"xh-confirm-footer\">\n <Button\n ghost\n type=\"default\"\n shape=\"rectangle\"\n className=\"xh-confirm-footer-button xh-confirm-footer-cancel-button\"\n onClick={() => {\n ReactDOM.unmountComponentAtNode(div);\n resolve({ errMsg: \"ok\", confirm: false, cancel: true });\n }}\n >\n {cancelText}\n </Button>\n <Button\n ghost\n type=\"primary\"\n shape=\"rectangle\"\n className=\"xh-confirm-footer-button xh-confirm-footer-confirm-button\"\n onClick={() => {\n ReactDOM.unmountComponentAtNode(div);\n resolve({ errMsg: \"ok\", confirm: true, cancel: false });\n }}\n >\n {confirmText}\n </Button>\n </div>\n );\n ReactDOM.render(\n <DialogComponent\n header={title}\n footer={alertFooter}\n content={content}\n visible\n ref={dialogRef}\n />,\n div\n );\n } else {\n showModal({\n title,\n content,\n confirmColor: \"#fe5e00\",\n cancelText,\n cancelColor: \"#666\",\n confirmText,\n ...rest,\n }).then(resolve);\n }\n });\n};\n\nexport default Comfirm;\n"],"names":["Comfirm","props","_a","title","content","_b","confirmText","_c","cancelText","rest","__rest","Promise","resolve","process","env","TARO_ENV","div_1","document","createElement","dialogRef","createRef","alertFooter","React","className","Button","ghost","type","shape","onClick","ReactDOM","unmountComponentAtNode","errMsg","confirm","cancel","render","DialogComponent","header","footer","visible","ref","showModal","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Dialog/Confirm/index.tsx"],"sourcesContent":["import React, { createRef } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { showModal } from \"@tarojs/taro\";\nimport DialogComponent, { DialogRef } from \"../../DialogComponent\";\nimport Button from \"../../Button\";\nimport { XHComponentCommonProps } from \"../../../types\";\n\nexport type ConfirmProps = {\n title?: string;\n header?: string;\n content: string;\n cancelText?: string;\n confirmText?: string;\n} & {\n /** 取消按钮的文字颜色,必须是 16 进制格式的颜色字符串 */\n cancelColor?: string;\n /** 取消按钮的文字,最多 4 个字符 */\n cancelText?: string;\n /** 接口调用结束的回调函数(调用成功、失败都会执行) */\n complete?: (res: TaroGeneral.CallbackResult) => void;\n /** 确认按钮的文字颜色,必须是 16 进制格式的颜色字符串 */\n confirmColor?: string;\n /** 确认按钮的文字,最多 4 个字符 */\n confirmText?: string;\n /** 提示的内容 */\n content?: string;\n /** 接口调用失败的回调函数 */\n fail?: (res: TaroGeneral.CallbackResult) => void;\n /** 接口调用成功的回调函数 */\n success?: (result: ConfirmPropsResult) => void;\n /** 提示的标题 */\n title?: string;\n} & XHComponentCommonProps;\n\nexport type ConfirmPropsResult = {\n /** 为 true 时,表示用户点击了取消(用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭) */\n cancel: boolean;\n /** 为 true 时,表示用户点击了确定按钮 */\n confirm: boolean;\n /** 调用结果 */\n errMsg: string;\n};\nconst Comfirm = (props: ConfirmProps): Promise<ConfirmPropsResult> => {\n const {\n title = \"\",\n content,\n confirmText = \"确定\",\n cancelText = \"取消\",\n ...rest\n } = props;\n return new Promise(resolve => {\n if (process.env.TARO_ENV === \"h5\") {\n const div = document.createElement(\"div\");\n\n const dialogRef = createRef<DialogRef>();\n const alertFooter = (\n <div className=\"xh-confirm-footer\">\n <Button\n ghost\n type=\"default\"\n shape=\"rectangle\"\n className=\"xh-confirm-footer-button xh-confirm-footer-cancel-button\"\n onClick={() => {\n ReactDOM.unmountComponentAtNode(div);\n resolve({ errMsg: \"ok\", confirm: false, cancel: true });\n }}\n >\n {cancelText}\n </Button>\n <Button\n ghost\n type=\"primary\"\n shape=\"rectangle\"\n className=\"xh-confirm-footer-button xh-confirm-footer-confirm-button\"\n onClick={() => {\n ReactDOM.unmountComponentAtNode(div);\n resolve({ errMsg: \"ok\", confirm: true, cancel: false });\n }}\n >\n {confirmText}\n </Button>\n </div>\n );\n ReactDOM.render(\n <DialogComponent\n header={title}\n footer={alertFooter}\n content={content}\n visible\n ref={dialogRef}\n {...rest}\n />,\n div\n );\n } else {\n showModal({\n title,\n content,\n confirmColor: \"#fe5e00\",\n cancelText,\n cancelColor: \"#666\",\n confirmText,\n ...rest,\n }).then(resolve);\n }\n });\n};\n\nexport default Comfirm;\n"],"names":["Comfirm","props","_a","title","content","_b","confirmText","_c","cancelText","rest","__rest","Promise","resolve","process","env","TARO_ENV","div_1","document","createElement","dialogRef","createRef","alertFooter","React","className","Button","ghost","type","shape","onClick","ReactDOM","unmountComponentAtNode","errMsg","confirm","cancel","render","DialogComponent","__assign","header","footer","visible","ref","showModal","confirmColor","cancelColor","then"],"mappings":"uQA0CM,IAAAA,EAAU,SAACC,GAEb,IAAAC,EAKED,EAAKE,MALPA,aAAQ,GAAED,EACVE,EAIEH,EAAKG,QAHPC,EAGEJ,cAHFK,OAAc,IAAAD,EAAA,OACdE,EAEEN,EAAKO,WAFPA,OAAU,IAAAD,EAAG,KAAIA,EACdE,EAAIC,EACLT,EANE,CAAA,QAAA,UAAA,cAAA,eAON,OAAO,IAAIU,SAAQ,SAAAC,GACjB,GAA6B,OAAzBC,QAAQC,IAAIC,SAAmB,CACjC,IAAMC,EAAMC,SAASC,cAAc,OAE7BC,EAAYC,IACZC,EACJC,EAAKJ,cAAA,MAAA,CAAAK,UAAU,qBACbD,EAAAJ,cAACM,EACC,CAAAC,OACA,EAAAC,KAAK,UACLC,MAAM,YACNJ,UAAU,2DACVK,QAAS,WACPC,EAASC,uBAAuBd,GAChCJ,EAAQ,CAAEmB,OAAQ,KAAMC,SAAS,EAAOC,QAAQ,GACjD,GAEAzB,GAEHc,EAAAJ,cAACM,EACC,CAAAC,OACA,EAAAC,KAAK,UACLC,MAAM,YACNJ,UAAU,4DACVK,QAAS,WACPC,EAASC,uBAAuBd,GAChCJ,EAAQ,CAAEmB,OAAQ,KAAMC,SAAS,EAAMC,QAAQ,GACjD,GAEC3B,IAIPuB,EAASK,OACPZ,EAAAJ,cAACiB,EAAeC,EAAA,CACdC,OAAQlC,EACRmC,OAAQjB,EACRjB,QAASA,EACTmC,SAAO,EACPC,IAAKrB,GACDV,IAENO,EAEH,MACCyB,EACEL,EAAA,CAAAjC,MAAKA,EACLC,QAAOA,EACPsC,aAAc,UACdlC,WAAUA,EACVmC,YAAa,OACbrC,YAAWA,GACRG,IACFmC,KAAKhC,EAEZ,GACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__read as e}from"../node_modules/tslib/tslib.es6.js";import t,{forwardRef as o,useState as n,useImperativeHandle as
|
|
1
|
+
import{__read as e}from"../node_modules/tslib/tslib.es6.js";import t,{forwardRef as o,useState as n,useImperativeHandle as a,useEffect as r}from"react";import c from"classnames";import{View as s}from"@tarojs/components";import i from"../Button/index.js";import l from"../Mask/index.js";import m from"../node_modules/react-transition-group/esm/CSSTransition.js";var f=o((function(o,f){var d=o.header,p=o.content,u=o.className,h=void 0===u?"":u,v=o.visible,g=o.showCancel,x=void 0===g||g,E=o.confirmText,N=void 0===E?"确定":E,C=o.cancelText,b=void 0===C?"取消":C,j=o.footer,T=void 0!==j&&j,y=o.onConfirm,k=o.onCancel,w=o.onClose,z=o.portrait,S=void 0!==z&&z,_=o.tranparent,B=void 0!==_&&_,M=o.fancy,q=void 0!==M&&M,A=e(n(!1),2),D=A[0],F=A[1];a(f,(function(){return{close:G,open:H}}));var G=function(){w&&w(),F(!1)},H=function(){F(!0)};r((function(){v||w&&w(),F(v)}),[v]);var I=c("xh-dialog-ref",h,{show:D}),J=t.createElement(s,{className:c("xh-dialog-ref-content-footer-buttons",{portrait:S,fancy:q})},x&&t.createElement(i,{ghost:!0,size:"full",shape:"rectangle",preventTime:0,onClick:function(){k&&k(),G()},className:"xh-dialog-ref-content-footer-buttons-cancel"},b),t.createElement(i,{type:"primary",shape:"rectangle",size:"full",ghost:!q,className:"xh-dialog-ref-content-footer-buttons-confirm",onClick:function(){y&&y()},preventTime:0},N));return t.createElement(s,{className:I},t.createElement(l,null),t.createElement(m,{in:D,timeout:200,classNames:"scale"},t.createElement(s,{className:c("xh-dialog-ref-content",{tranparent:B})},d&&t.createElement(s,{className:"xh-dialog-ref-content-header"},d),t.createElement(s,{className:"xh-dialog-ref-content-content"},p),T||t.createElement(s,{className:"xh-dialog-ref-content-footer"},J))))}));export{f as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/DialogRef/index.tsx"],"sourcesContent":["import React, {\n ReactNode,\n useState,\n useImperativeHandle,\n forwardRef,\n useEffect,\n} from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport { CSSTransition } from \"react-transition-group\";\nimport Button from \"../Button\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport Mask from \"../Mask\";\nimport \"./index.scss\";\n\nexport type DialogProps = {\n header?: string | ReactNode;\n content: string | ReactNode;\n footer?: ReactNode;\n cancelText?: string;\n confirmText?: string;\n showCancel?: boolean;\n visible: boolean;\n onConfirm?: () => void;\n onCancel?: () => void;\n onClose?: () => void;\n tranparent?: boolean;\n portrait?: boolean;\n} & XHComponentCommonProps;\n\nexport type IDialogRef = {\n close: () => void;\n open: () => void;\n};\nconst DialogCom = forwardRef<IDialogRef, DialogProps>((props, fromRef) => {\n const {\n header,\n content,\n className = \"\",\n visible,\n showCancel = true,\n confirmText = \"确定\",\n cancelText = \"取消\",\n footer = false,\n onConfirm,\n onCancel,\n onClose,\n portrait = false,\n tranparent = false,\n } = props;\n const [selfVisible, setSelfVisible] = useState(false);\n\n useImperativeHandle(fromRef, () => ({\n close,\n open,\n }));\n\n const close = () => {\n onClose && onClose();\n setSelfVisible(false);\n };\n\n const open = () => {\n setSelfVisible(true);\n };\n\n const handleConfirm = () => {\n onConfirm && onConfirm();\n // close();\n };\n const handleCancel = () => {\n onCancel && onCancel();\n close();\n };\n\n useEffect(() => {\n if (!visible) {\n onClose && onClose();\n }\n setSelfVisible(visible);\n }, [visible]);\n\n const dialogcls = classNames(\"xh-dialog-ref\", className, {\n show: selfVisible,\n });\n\n const dialogFooter = (\n <View\n className={classNames(\"xh-dialog-ref-content-footer-buttons\", {\n portrait,\n })}\n >\n {showCancel && (\n <Button\n ghost\n size=\"full\"\n shape=\"rectangle\"\n preventTime={0}\n onClick={handleCancel}\n className=\"xh-dialog-ref-content-footer-buttons-cancel\"\n >\n {cancelText}\n </Button>\n )}\n <Button\n type=\"primary\"\n shape=\"rectangle\"\n size=\"full\"\n ghost\n className=\"xh-dialog-ref-content-footer-buttons
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/DialogRef/index.tsx"],"sourcesContent":["import React, {\n ReactNode,\n useState,\n useImperativeHandle,\n forwardRef,\n useEffect,\n} from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport { CSSTransition } from \"react-transition-group\";\nimport Button from \"../Button\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport Mask from \"../Mask\";\nimport \"./index.scss\";\n\nexport type DialogProps = {\n header?: string | ReactNode;\n content: string | ReactNode;\n footer?: ReactNode;\n cancelText?: string;\n confirmText?: string;\n showCancel?: boolean;\n visible: boolean;\n onConfirm?: () => void;\n onCancel?: () => void;\n onClose?: () => void;\n tranparent?: boolean;\n portrait?: boolean;\n fancy?: boolean;\n} & XHComponentCommonProps;\n\nexport type IDialogRef = {\n close: () => void;\n open: () => void;\n};\nconst DialogCom = forwardRef<IDialogRef, DialogProps>((props, fromRef) => {\n const {\n header,\n content,\n className = \"\",\n visible,\n showCancel = true,\n confirmText = \"确定\",\n cancelText = \"取消\",\n footer = false,\n onConfirm,\n onCancel,\n onClose,\n portrait = false,\n tranparent = false,\n fancy = false,\n } = props;\n const [selfVisible, setSelfVisible] = useState(false);\n\n useImperativeHandle(fromRef, () => ({\n close,\n open,\n }));\n\n const close = () => {\n onClose && onClose();\n setSelfVisible(false);\n };\n\n const open = () => {\n setSelfVisible(true);\n };\n\n const handleConfirm = () => {\n onConfirm && onConfirm();\n // close();\n };\n const handleCancel = () => {\n onCancel && onCancel();\n close();\n };\n\n useEffect(() => {\n if (!visible) {\n onClose && onClose();\n }\n setSelfVisible(visible);\n }, [visible]);\n\n const dialogcls = classNames(\"xh-dialog-ref\", className, {\n show: selfVisible,\n });\n\n const dialogFooter = (\n <View\n className={classNames(\"xh-dialog-ref-content-footer-buttons\", {\n portrait,\n fancy,\n })}\n >\n {showCancel && (\n <Button\n ghost\n size=\"full\"\n shape=\"rectangle\"\n preventTime={0}\n onClick={handleCancel}\n className=\"xh-dialog-ref-content-footer-buttons-cancel\"\n >\n {cancelText}\n </Button>\n )}\n <Button\n type=\"primary\"\n shape=\"rectangle\"\n size=\"full\"\n ghost={!fancy}\n className=\"xh-dialog-ref-content-footer-buttons-confirm\"\n onClick={handleConfirm}\n preventTime={0}\n >\n {confirmText}\n </Button>\n </View>\n );\n\n const DialogMain = (\n <View className={dialogcls}>\n <Mask />\n <CSSTransition in={selfVisible} timeout={200} classNames=\"scale\">\n <View className={classNames(\"xh-dialog-ref-content\", { tranparent })}>\n {header && (\n <View className=\"xh-dialog-ref-content-header\">{header}</View>\n )}\n <View className=\"xh-dialog-ref-content-content\">{content}</View>\n {footer || (\n <View className=\"xh-dialog-ref-content-footer\">{dialogFooter}</View>\n )}\n </View>\n </CSSTransition>\n </View>\n );\n return DialogMain;\n});\n\nexport default DialogCom;\n"],"names":["DialogCom","forwardRef","props","fromRef","header","content","_a","className","visible","_b","showCancel","_c","confirmText","_d","cancelText","_e","footer","onConfirm","onCancel","onClose","_f","portrait","_g","tranparent","_h","fancy","_j","__read","useState","selfVisible","setSelfVisible","useImperativeHandle","close","open","useEffect","dialogcls","classNames","show","dialogFooter","React","createElement","View","Button","ghost","size","shape","preventTime","onClick","type","Mask","CSSTransition","in","timeout"],"mappings":"yWAmCA,IAAMA,EAAYC,GAAoC,SAACC,EAAOC,GAE1D,IAAAC,EAcEF,EAAKE,OAbPC,EAaEH,EAAKG,QAZPC,EAYE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ACS,EAAO,MACRV,EAAAC,cAACU,EAAa,CAACC,GAAItB,EAAauB,QAAS,IAAKhB,WAAW,SACvDG,EAAAC,cAACC,EAAI,CAAClC,UAAW6B,EAAW,wBAAyB,CAAEb,WAAUA,KAC9DnB,GACCmC,EAAAC,cAACC,EAAI,CAAClC,UAAU,gCAAgCH,GAElDmC,EAAAC,cAACC,EAAK,CAAAlC,UAAU,iCAAiCF,GAChDW,GACCuB,EAAAC,cAACC,EAAI,CAAClC,UAAU,gCAAgC+B,KAO5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Icon/index.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { pxTransform } from \"@/utils\";\nimport type { StandardLonghandProperties } from \"csstype\";\nimport { XHComponentCommonProps } from \"../../types\";\n\nimport \"./index.scss\";\n\nexport type XHIcon =\n | \"prompt\"\n | \"score\"\n | \"info\"\n | \"failure\"\n | \"success\"\n | \"loading\"\n | \"back\"\n | \"notice\"\n | \"scan\"\n | \"light\"\n | \"faceScan\"\n | \"delete\"\n | \"radioFull\"\n | \"checkboxFull\"\n | \"checkedSquare\"\n | \"checked2\"\n | \"arrowTop\"\n | \"notice2\"\n | \"position\"\n | \"contacts\"\n | \"billFull\"\n | \"bill2\"\n | \"bill3\"\n | \"bill4\"\n | \"edit\"\n | \"editFull\"\n | \"camera\"\n | \"close\"\n | \"gift\"\n | \"message\"\n | \"user\"\n | \"wenhao\"\n | \"kefu\"\n | \"play\"\n | \"arrowLeft\"\n | \"arrowRight\"\n | \"keyboardClose\"\n | \"add\"\n | \"tongxunlu\"\n | \"zhuyi\"\n | \"duigou\"\n | \"edit2\"\n | \"alipay\"\n | \"wechat\"\n | \"friendPay\"\n | \"pen\";\n\nexport type XHIconProps = {\n icon: XHIcon;\n size?: number;\n color?: StandardLonghandProperties[\"color\"];\n style?: React.CSSProperties;\n onClick?: () => void;\n} & XHComponentCommonProps;\n\nconst Icon: React.FC<XHIconProps> = props => {\n const { icon = \"\", size = 0, className, color, style, ...rest } = props;\n\n const fixIcon = icon && `xh-icon-${icon}`;\n const iconCls = classNames(\"xh-icon\", fixIcon, className);\n\n const finalStyle: React.CSSProperties = {\n ...style,\n fontSize: pxTransform(size),\n color,\n };\n\n return <span className={iconCls} {...{ style: finalStyle }} {...rest} />;\n};\n\nexport default Icon;\n"],"names":["Icon","props","_a","icon","_b","size","className","color","style","rest","__rest","fixIcon","concat","iconCls","classNames","finalStyle","__assign","fontSize","pxTransform","React","createElement"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Icon/index.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { pxTransform } from \"@/utils\";\nimport type { StandardLonghandProperties } from \"csstype\";\nimport { XHComponentCommonProps } from \"../../types\";\n\nimport \"./index.scss\";\n\nexport type XHIcon =\n | \"prompt\"\n | \"score\"\n | \"info\"\n | \"failure\"\n | \"success\"\n | \"loading\"\n | \"back\"\n | \"notice\"\n | \"scan\"\n | \"light\"\n | \"faceScan\"\n | \"delete\"\n | \"radioFull\"\n | \"checkboxFull\"\n | \"checkedSquare\"\n | \"checked2\"\n | \"arrowTop\"\n | \"notice2\"\n | \"position\"\n | \"contacts\"\n | \"billFull\"\n | \"bill2\"\n | \"bill3\"\n | \"bill4\"\n | \"edit\"\n | \"editFull\"\n | \"camera\"\n | \"close\"\n | \"gift\"\n | \"message\"\n | \"user\"\n | \"wenhao\"\n | \"kefu\"\n | \"play\"\n | \"arrowLeft\"\n | \"arrowRight\"\n | \"keyboardClose\"\n | \"add\"\n | \"tongxunlu\"\n | \"zhuyi\"\n | \"duigou\"\n | \"edit2\"\n | \"alipay\"\n | \"wechat\"\n | \"friendPay\"\n | \"pen\"\n | \"location\";\n\nexport type XHIconProps = {\n icon: XHIcon;\n size?: number;\n color?: StandardLonghandProperties[\"color\"];\n style?: React.CSSProperties;\n onClick?: () => void;\n} & XHComponentCommonProps;\n\nconst Icon: React.FC<XHIconProps> = props => {\n const { icon = \"\", size = 0, className, color, style, ...rest } = props;\n\n const fixIcon = icon && `xh-icon-${icon}`;\n const iconCls = classNames(\"xh-icon\", fixIcon, className);\n\n const finalStyle: React.CSSProperties = {\n ...style,\n fontSize: pxTransform(size),\n color,\n };\n\n return <span className={iconCls} {...{ style: finalStyle }} {...rest} />;\n};\n\nexport default Icon;\n"],"names":["Icon","props","_a","icon","_b","size","className","color","style","rest","__rest","fixIcon","concat","iconCls","classNames","finalStyle","__assign","fontSize","pxTransform","React","createElement"],"mappings":"6KAiEM,IAAAA,EAA8B,SAAAC,GAC1B,IAAAC,EAA0DD,EAAKE,KAA/DA,aAAO,GAAED,EAAEE,EAA+CH,EAAvCI,KAARA,OAAO,IAAAD,EAAA,IAAGE,EAAqCL,YAA1BM,EAA0BN,EAAKM,MAAxBC,EAAmBP,EAAKO,MAAdC,EAAIC,EAAKT,EAA5D,CAAA,OAAA,OAAA,YAAA,QAAA,UAEAU,EAAUR,GAAQ,WAAWS,OAAAT,GAC7BU,EAAUC,EAAW,UAAWH,EAASL,GAEzCS,EAAUC,EAAAA,EAAA,CAAA,EACXR,GAAK,CACRS,SAAUC,EAAYb,GACtBE,MAAKA,IAGP,OAAOY,EAAMC,cAAA,OAAAJ,EAAA,CAAAV,UAAWO,GAAa,CAAEL,MAAOO,GAAkBN,GAClE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import
|
|
1
|
+
import e from"react";import o from"classnames";import{View as r}from"@tarojs/components";import{pxTransform as t}from"@tarojs/taro";var s=function(s){var a=s.percent,c=void 0===a?88:a,l=s.className,n=s.showPercent,m=void 0!==n&&n,d=s.doneColor,i=void 0===d?"":d,p=s.percentColor,g=void 0===p?"":p,h=s.height,v=void 0===h?28:h,E=s.dots,N=void 0===E?[]:E,u=s.solid,f=void 0!==u&&u,b=s.backgroundColor,y=void 0===b?"":b,C=o("xh-progress",l,{dots:N.length>0}),k=o("progress-bar",{dots:N.length>0},{solid:f},{h5:"h5"===process.env.TARO_ENV}),w=o("progress-bar-percent",{solid:f});return e.createElement(r,{className:C,style:{height:v&&t(v)}},e.createElement(r,{className:o("progress",{solid:f}),style:{backgroundColor:y}},N.length>0?e.createElement(e.Fragment,null,N.map((function(o){return e.createElement(r,{style:{width:"".concat(o,"%")},key:o,"data-progress":o,className:k},"h5"!==process.env.TARO_ENV&&e.createElement(r,{className:"progress-bar-text"},o,"%"))})),e.createElement(r,{className:"progress-cover",style:{width:"".concat(c,"%")}})):e.createElement(r,{style:{width:"".concat(c,"%"),backgroundColor:i,color:g},className:k},m&&e.createElement(r,{className:w},"".concat(c,"%")))))};export{s as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Progress/index.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport { pxTransform } from \"@tarojs/taro\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport \"./index.scss\";\n\nexport type ProgressProps = {\n percent: number;\n showPercent?: boolean;\n doneColor?: string;\n percentColor?: string;\n height?: number;\n /**\n * @description 百分比,不要百分号\n */\n dots?: number[];\n} & XHComponentCommonProps;\n\nconst Progress: React.FC<ProgressProps> = props => {\n const {\n percent = 88,\n className,\n showPercent = false,\n doneColor = \"\",\n percentColor = \"\",\n height,\n dots = [],\n } = props;\n const progresslcs = classNames(\"xh-progress\", className, {\n dots: dots.length > 0,\n });\n\n const showPercentcls = classNames(\n \"progress-bar\",\n { dots: dots.length > 0 },\n { h5: process.env.TARO_ENV === \"h5\" }\n );\n const showbarPercentcls = classNames(\"progress-bar-percent\");\n return (\n <View
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Progress/index.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport { pxTransform } from \"@tarojs/taro\";\nimport type { StandardLonghandProperties } from \"csstype\";\n\nimport { XHComponentCommonProps } from \"../../types\";\n\nimport \"./index.scss\";\n\nexport type ProgressProps = {\n percent: number;\n showPercent?: boolean;\n doneColor?: string;\n percentColor?: string;\n height?: number;\n /**\n * @description 百分比,不要百分号\n */\n dots?: number[];\n /**\n * 苗条模式\n */\n solid?: boolean;\n backgroundColor?: StandardLonghandProperties[\"color\"];\n} & XHComponentCommonProps;\n\nconst Progress: React.FC<ProgressProps> = props => {\n const {\n percent = 88,\n className,\n showPercent = false,\n doneColor = \"\",\n percentColor = \"\",\n height = 28,\n dots = [],\n solid = false,\n backgroundColor = \"\",\n } = props;\n const progresslcs = classNames(\"xh-progress\", className, {\n dots: dots.length > 0,\n });\n\n const showPercentcls = classNames(\n \"progress-bar\",\n { dots: dots.length > 0 },\n { solid },\n { h5: process.env.TARO_ENV === \"h5\" }\n );\n const showbarPercentcls = classNames(\"progress-bar-percent\", { solid });\n return (\n <View\n className={progresslcs}\n style={{\n height: height && pxTransform(height),\n }}\n >\n <View\n className={classNames(\"progress\", { solid })}\n style={{ backgroundColor }}\n >\n {dots.length > 0 ? (\n <React.Fragment>\n {dots.map(item => (\n <View\n style={{\n width: `${item}%`,\n }}\n key={item}\n data-progress={item}\n className={showPercentcls}\n >\n {process.env.TARO_ENV !== \"h5\" && (\n <View className=\"progress-bar-text\">{item}%</View>\n )}\n </View>\n ))}\n <View className=\"progress-cover\" style={{ width: `${percent}%` }} />\n </React.Fragment>\n ) : (\n <View\n style={{\n width: `${percent}%`,\n backgroundColor: doneColor,\n color: percentColor,\n }}\n className={showPercentcls}\n >\n {showPercent && (\n <View className={showbarPercentcls}>{`${percent}%`}</View>\n )}\n </View>\n )}\n </View>\n </View>\n );\n};\n\nexport default Progress;\n"],"names":["Progress","props","_a","percent","className","_b","showPercent","_c","doneColor","_d","percentColor","_e","height","_f","dots","_g","solid","_h","backgroundColor","progresslcs","classNames","length","showPercentcls","h5","process","env","TARO_ENV","showbarPercentcls","React","View","style","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