taro-react-uilib 1.3.4-2 → 1.3.4-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/components/ActivityIndicator/index.js +1 -1
- package/dist/components/ActivityIndicator/index.js.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Cell/index.js +1 -1
- package/dist/components/Cell/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/Icon/index.js.map +1 -1
- package/dist/components/List/index.js +1 -1
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/Loading/index.js +1 -1
- package/dist/components/Loading/index.js.map +1 -1
- package/dist/components/Page/index.js +1 -1
- package/dist/components/Page/index.js.map +1 -1
- package/dist/components/ProgressCircle/index.js +2 -0
- package/dist/components/ProgressCircle/index.js.map +1 -0
- package/dist/components/src/index.js +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/styles/components/activityindicator.scss +5 -2
- package/dist/styles/components/button.scss +19 -14
- package/dist/styles/components/cell.scss +1 -2
- 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/index.scss +1 -0
- package/dist/styles/components/list.scss +1 -2
- package/dist/styles/components/loading.scss +38 -31
- package/dist/styles/components/progresscircle.scss +71 -0
- package/dist/styles/components/step.scss +1 -1
- package/lib/components/ActivityIndicator/index.js +20 -4
- package/lib/components/ActivityIndicator/index.js.map +1 -1
- package/lib/components/Button/index.js +14 -14
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Cell/index.js +3 -1
- package/lib/components/Cell/index.js.map +1 -1
- package/lib/components/Dialog/Confirm/index.js +1 -1
- package/lib/components/Icon/index.js.map +1 -1
- package/lib/components/List/index.js +3 -1
- package/lib/components/List/index.js.map +1 -1
- package/lib/components/Loading/index.js +7 -4
- package/lib/components/Loading/index.js.map +1 -1
- package/lib/components/Page/index.js +1 -1
- package/lib/components/Page/index.js.map +1 -1
- package/lib/components/ProgressCircle/index.js +22 -0
- package/lib/components/ProgressCircle/index.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/types/components/ActivityIndicator/index.d.ts +7 -5
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Loading/index.d.ts +1 -0
- package/types/components/ProgressCircle/index.d.ts +13 -0
- package/types/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [1.3.4-3](https://code.xhdev.xyz/h5group/taro-uilib/compare/v1.3.4-2...v1.3.4-3) (2023-07-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* 修复button样式覆盖的问题、修改loading样式 ([ac96dba](https://code.xhdev.xyz/h5group/taro-uilib/commits/ac96dba99f76364009abd82e8c209ae730bb23df))
|
|
7
|
+
* 增加圆形进度条组件、Icon增加 ([0c637b5](https://code.xhdev.xyz/h5group/taro-uilib/commits/0c637b5d8b3ee3d1edc3126cffc855ad7fd2890a))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
## [1.3.4-2](https://code.xhdev.xyz/h5group/taro-uilib/compare/v1.3.4-1...v1.3.4-2) (2023-07-20)
|
|
2
12
|
|
|
3
13
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import a from"react";import
|
|
1
|
+
import{__rest as t,__assign as e}from"../node_modules/tslib/tslib.es6.js";import a from"react";import i from"classnames";import{View as s}from"@tarojs/components";import{pxTransform as m}from"../src/utils/index.js";var r=function(r){var c=r.className,o=r.style,l=r.size,n=void 0===l?36:l,d=t(r,["className","style","size"]),f=i("xh-activity-indicator",c),h=e(e({},o),d);return 36!==n&&(h=e(e({},h),{width:m(n),height:m(n)})),a.createElement(s,{className:f,style:h},a.createElement(s,{className:"xh-activity-indicator-main"}),a.createElement(s,{className:"xh-activity-indicator-main"}),a.createElement(s,{className:"xh-activity-indicator-main"}))};export{r as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/ActivityIndicator/index.tsx"],"sourcesContent":["import React, { CSSProperties, FC
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/ActivityIndicator/index.tsx"],"sourcesContent":["import React, { CSSProperties, FC } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport { pxTransform } from \"@/utils\";\nimport type { StandardLonghandProperties } from \"csstype\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport \"./index.scss\";\n\nexport type LoadingProps = {\n style?: CSSProperties & {\n \"--loading-border-color\"?: StandardLonghandProperties[\"color\"];\n \"--loading-border-width\"?: string;\n };\n size?: number;\n} & XHComponentCommonProps;\n\nconst Activityindicator: FC<LoadingProps> = ({\n className,\n style,\n size = 36,\n ...rest\n}) => {\n const cls = classNames(\"xh-activity-indicator\", className);\n\n let finalStyle = {\n ...style,\n ...rest,\n };\n if (size !== 36) {\n finalStyle = {\n ...finalStyle,\n width: pxTransform(size),\n height: pxTransform(size),\n };\n }\n\n return (\n <View className={cls} style={finalStyle}>\n <View className=\"xh-activity-indicator-main\"></View>\n <View className=\"xh-activity-indicator-main\"></View>\n <View className=\"xh-activity-indicator-main\"></View>\n </View>\n );\n};\n\nexport default Activityindicator;\n"],"names":["Activityindicator","_a","className","style","_b","size","rest","__rest","cls","classNames","finalStyle","__assign","width","pxTransform","height","React","createElement","View"],"mappings":"uNAgBM,IAAAA,EAAsC,SAACC,GAC3C,IAAAC,EAASD,EAAAC,UACTC,EAAKF,EAAAE,MACLC,EAASH,EAAAI,KAATA,OAAI,IAAAD,EAAG,GAAEA,EACNE,EAAIC,EAAAN,EAJoC,8BAMrCO,EAAMC,EAAW,wBAAyBP,GAE5CQ,EACCC,EAAAA,EAAA,CAAA,EAAAR,GACAG,GAUL,OARa,KAATD,IACFK,SACKA,GAAU,CACbE,MAAOC,EAAYR,GACnBS,OAAQD,EAAYR,MAKtBU,EAACC,cAAAC,EAAK,CAAAf,UAAWM,EAAKL,MAAOO,GAC3BK,EAAAC,cAACC,EAAI,CAACf,UAAU,+BAChBa,EAAAC,cAACC,EAAI,CAACf,UAAU,+BAChBa,EAACC,cAAAC,GAAKf,UAAU,+BAGtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__read as e}from"../node_modules/tslib/tslib.es6.js";import
|
|
1
|
+
import{__read as e}from"../node_modules/tslib/tslib.es6.js";import o,{useState as n,useRef as t,useEffect as r}from"react";import a from"classnames";import{Button as s}from"@tarojs/components";import{useTaroEnv as l}from"../src/hooks/index.js";import i from"./DotJump.js";var m=function(m){var d=m.disabled,p=void 0!==d&&d,c=m.type,u=void 0===c?"default":c,g=m.size,f=void 0===g?"normal":g,y=m.shape,h=void 0===y?"round":y,v=m.children,b=m.className,P=m.htmlType,T=m.formType,E=m.text,M=m.openType,w=m.lang,C=m.sessionFrom,I=m.sendMessageTitle,N=m.sendMessagePath,j=m.sendMessageImg,k=m.showMessageCard,x=m.appParameter,G=m.onGetUserInfo,S=m.onGetPhoneNumber,W=m.onOpenSetting,q=m.onError,A=m.onContact,D=m.onClick,F=m.preventTime,O=void 0===F?2500:F,U=m.style,z=m.loading,B=m.loadingStyle,J=m.loadingSpace,_=m.ghost,H=void 0!==_&&_,K=m.hollow,L=void 0!==K&&K,Q=l(),R=e(n(!1),2),V=R[0],X=R[1],Y=t(),Z=a("xh-button",{default:"default"===u,primary:"primary"===u,secondary:"secondary"===u,ghost:H,hollow:L,warn:"warn"===u,quare:"square"===h,round:"round"===h,rectangle:"rectangle"===h,normal:"normal"===f,small:"mini"===f,full:"full"===f,disabled:p,webutton:"WEAPP"===Q},b),$=function(e){"WEB"===Q&&e.nativeEvent.stopImmediatePropagation(),e.preventDefault(),V&&0!==O||(0!==O&&(Y.current=setTimeout((function(){X(!1),clearTimeout(Y.current)}),O)),0!==O&&X(!0),D&&D(e))};r((function(){return function(){clearTimeout(Y.current)}}),[]);var ee=o.createElement(s,{className:Z,formType:T,openType:M,lang:w,type:u,sessionFrom:C,sendMessageTitle:I,sendMessagePath:N,sendMessageImg:j,showMessageCard:k,appParameter:x,onGetUserInfo:G,onGetPhoneNumber:S,onOpenSetting:W,onError:q,onContact:A,onClick:$,disabled:p,style:U,loading:z},v);return"WEAPP"===Q?ee:o.createElement("button",{className:Z,disabled:p,type:P,onClick:p?void 0:$,style:U},v||E,z&&o.createElement(i,{style:B,space:J}))};export{m as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Button/index.tsx"],"sourcesContent":["import React, {\n FC,\n MouseEventHandler,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport classNames from \"classnames\";\nimport { Button } from \"@tarojs/components\";\nimport { ButtonProps } from \"@tarojs/components/types/Button\";\nimport {\n ITouchEvent,\n TouchEventFunction,\n} from \"@tarojs/components/types/common\";\n\nimport { useTaroEnv } from \"../../hooks\";\nimport \"./index.scss\";\nimport DotJump from \"./DotJump\";\n\nexport type ButtonType = \"default\" | \"secondary\" | \"primary\" | \"warn\";\n\nexport type ButtonShape = \"square\" | \"round\" | \"rectangle\";\n\nexport type ButtonSize = \"default\" | \"mini\" | \"full\";\n\nexport type WechatOpenType =\n | \"contact\"\n /** 触发用户转发,使用前建议先阅读使用指引\n * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%BC%95\n */\n | \"share\"\n /** 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息\n * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html\n */\n | \"getPhoneNumber\"\n /** 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 */\n | \"getUserInfo\"\n /** 用户实名信息授权,已经弃用 */\n | \"getRealnameAuthInfo\"\n /** 打开APP,可以通过app-parameter属性设定向APP传的参数\n * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/launchApp.html\n */\n | \"launchApp\"\n /** 打开授权设置页 */\n | \"openSetting\"\n /** 打开“意见反馈”页面,用户可提交反馈内容并上传日志,开发者可以登录小程序管理后台后进入左侧菜单“客服反馈”页面获取到反馈内容 */\n | \"feedback\";\nexport type XhButtonProps = {\n htmlType?: \"button\" | \"submit\" | \"reset\";\n type?: ButtonType;\n size?: ButtonSize;\n shape?: ButtonShape;\n disabled?: boolean;\n className?: string;\n styleName?: string;\n text?: string;\n preventTime?: number;\n onClick?: (e: ITouchEvent | MouseEvent) => void;\n style?: React.CSSProperties;\n loading?: boolean;\n loadingStyle?: React.CSSProperties;\n loadingSpace?: number;\n ghost?: boolean;\n /**\n * 镂空\n */\n hollow?: boolean;\n} & Omit<ButtonProps, \"type\" | \"size\">;\n\nconst XhButton: FC<XhButtonProps> = props => {\n const {\n disabled = false,\n type = \"default\",\n size = \"normal\",\n shape = \"round\",\n children,\n className,\n htmlType,\n formType,\n text,\n openType,\n lang,\n sessionFrom,\n sendMessageTitle,\n sendMessagePath,\n sendMessageImg,\n showMessageCard,\n appParameter,\n onGetUserInfo,\n onGetPhoneNumber,\n onOpenSetting,\n onError,\n onContact,\n onClick,\n preventTime = 2500,\n style,\n loading,\n loadingStyle,\n loadingSpace,\n ghost = false,\n hollow = false,\n } = props;\n const state = useTaroEnv();\n const [preventClick, setPreventClick] = useState(false);\n const timer = useRef<NodeJS.Timeout | undefined>();\n const classObj = classNames(\n \"xh-button\",\n {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Button/index.tsx"],"sourcesContent":["import React, {\n FC,\n MouseEventHandler,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport classNames from \"classnames\";\nimport { Button } from \"@tarojs/components\";\nimport { ButtonProps } from \"@tarojs/components/types/Button\";\nimport {\n ITouchEvent,\n TouchEventFunction,\n} from \"@tarojs/components/types/common\";\n\nimport { useTaroEnv } from \"../../hooks\";\nimport \"./index.scss\";\nimport DotJump from \"./DotJump\";\n\nexport type ButtonType = \"default\" | \"secondary\" | \"primary\" | \"warn\";\n\nexport type ButtonShape = \"square\" | \"round\" | \"rectangle\";\n\nexport type ButtonSize = \"default\" | \"mini\" | \"full\";\n\nexport type WechatOpenType =\n | \"contact\"\n /** 触发用户转发,使用前建议先阅读使用指引\n * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html#%E4%BD%BF%E7%94%A8%E6%8C%87%E5%BC%95\n */\n | \"share\"\n /** 获取用户手机号,可以从 bindgetphonenumber 回调中获取到用户信息\n * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html\n */\n | \"getPhoneNumber\"\n /** 获取用户信息,可以从 bindgetuserinfo 回调中获取到用户信息 */\n | \"getUserInfo\"\n /** 用户实名信息授权,已经弃用 */\n | \"getRealnameAuthInfo\"\n /** 打开APP,可以通过app-parameter属性设定向APP传的参数\n * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/launchApp.html\n */\n | \"launchApp\"\n /** 打开授权设置页 */\n | \"openSetting\"\n /** 打开“意见反馈”页面,用户可提交反馈内容并上传日志,开发者可以登录小程序管理后台后进入左侧菜单“客服反馈”页面获取到反馈内容 */\n | \"feedback\";\nexport type XhButtonProps = {\n htmlType?: \"button\" | \"submit\" | \"reset\";\n type?: ButtonType;\n size?: ButtonSize;\n shape?: ButtonShape;\n disabled?: boolean;\n className?: string;\n styleName?: string;\n text?: string;\n preventTime?: number;\n onClick?: (e: ITouchEvent | MouseEvent) => void;\n style?: React.CSSProperties;\n loading?: boolean;\n loadingStyle?: React.CSSProperties;\n loadingSpace?: number;\n ghost?: boolean;\n /**\n * 镂空\n */\n hollow?: boolean;\n} & Omit<ButtonProps, \"type\" | \"size\">;\n\nconst XhButton: FC<XhButtonProps> = props => {\n const {\n disabled = false,\n type = \"default\",\n size = \"normal\",\n shape = \"round\",\n children,\n className,\n htmlType,\n formType,\n text,\n openType,\n lang,\n sessionFrom,\n sendMessageTitle,\n sendMessagePath,\n sendMessageImg,\n showMessageCard,\n appParameter,\n onGetUserInfo,\n onGetPhoneNumber,\n onOpenSetting,\n onError,\n onContact,\n onClick,\n preventTime = 2500,\n style,\n loading,\n loadingStyle,\n loadingSpace,\n ghost = false,\n hollow = false,\n } = props;\n const state = useTaroEnv();\n const [preventClick, setPreventClick] = useState(false);\n const timer = useRef<NodeJS.Timeout | undefined>();\n const classObj = classNames(\n \"xh-button\",\n {\n default: type === \"default\",\n primary: type === \"primary\",\n secondary: type === \"secondary\",\n ghost: ghost,\n hollow: hollow,\n warn: type === \"warn\",\n quare: shape === \"square\",\n round: shape === \"round\",\n rectangle: shape === \"rectangle\",\n normal: size === \"normal\",\n small: size === \"mini\",\n full: size === \"full\",\n disabled: disabled,\n webutton: state === \"WEAPP\",\n },\n className\n );\n\n const handleClick: MouseEventHandler & TouchEventFunction = e => {\n state === \"WEB\" && e.nativeEvent.stopImmediatePropagation();\n e.preventDefault();\n\n if (preventClick && preventTime !== 0) {\n console.log(\"重复点击\");\n return;\n }\n if (preventTime !== 0) {\n timer.current = setTimeout(() => {\n setPreventClick(false);\n clearTimeout(timer.current);\n }, preventTime);\n }\n if (preventTime !== 0) setPreventClick(true);\n console.log(\"正常点击\");\n onClick && onClick(e);\n };\n\n useEffect(() => {\n return () => {\n clearTimeout(timer.current);\n };\n }, []);\n\n const weButton = (\n <Button\n className={classObj}\n formType={formType}\n openType={openType}\n lang={lang}\n type={type as ButtonProps[\"type\"]}\n sessionFrom={sessionFrom}\n sendMessageTitle={sendMessageTitle}\n sendMessagePath={sendMessagePath}\n sendMessageImg={sendMessageImg}\n showMessageCard={showMessageCard}\n appParameter={appParameter}\n onGetUserInfo={onGetUserInfo}\n onGetPhoneNumber={onGetPhoneNumber}\n onOpenSetting={onOpenSetting}\n onError={onError}\n onContact={onContact}\n onClick={handleClick}\n disabled={disabled}\n style={style}\n loading={loading}\n >\n {children}\n </Button>\n );\n\n if (state === \"WEAPP\") {\n return weButton;\n }\n\n return (\n // eslint-disable-next-line react/button-has-type\n <button\n className={classObj}\n disabled={disabled}\n type={htmlType}\n onClick={disabled ? undefined : handleClick}\n style={style}\n >\n {children || text}\n {loading && <DotJump style={loadingStyle} space={loadingSpace} />}\n </button>\n );\n};\n\nexport default XhButton;\n"],"names":["XhButton","props","_a","disabled","_b","type","_c","size","_d","shape","children","className","htmlType","formType","text","openType","lang","sessionFrom","sendMessageTitle","sendMessagePath","sendMessageImg","showMessageCard","appParameter","onGetUserInfo","onGetPhoneNumber","onOpenSetting","onError","onContact","onClick","_e","preventTime","style","loading","loadingStyle","loadingSpace","_f","ghost","_g","hollow","state","useTaroEnv","_h","__read","useState","preventClick","setPreventClick","timer","useRef","classObj","classNames","default","primary","secondary","warn","quare","round","rectangle","normal","small","full","webutton","handleClick","e","nativeEvent","stopImmediatePropagation","preventDefault","current","setTimeout","clearTimeout","useEffect","weButton","React","Button","createElement","undefined","DotJump","space"],"mappings":"gRAqEM,IAAAA,EAA8B,SAAAC,GAEhC,IAAAC,EA8BED,EAAKE,SA9BPA,OAAQ,IAAAD,GAAQA,EAChBE,EA6BEH,OA7BFI,aAAO,UAASD,EAChBE,EA4BEL,EA5BaM,KAAfA,OAAO,IAAAD,EAAA,WACPE,EA2BEP,EA3BaQ,MAAfA,OAAQ,IAAAD,EAAA,UACRE,EA0BET,EAAKS,SAzBPC,EAyBEV,EAAKU,UAxBPC,EAwBEX,EAxBMW,SACRC,EAuBEZ,EAvBMY,SACRC,EAsBEb,OArBFc,EAqBEd,EAAKc,SApBPC,EAoBEf,EAAKe,KAnBPC,EAmBEhB,EAnBSgB,YACXC,EAkBEjB,mBAjBFkB,EAiBElB,EAAKkB,gBAhBPC,EAgBEnB,EAAKmB,eAfPC,EAeEpB,EAfaoB,gBACfC,EAcErB,EAdUqB,aACZC,EAaEtB,gBAZFuB,EAYEvB,EAAKuB,iBAXPC,EAWExB,EAAKwB,cAVPC,EAUEzB,EAVKyB,QACPC,EASE1B,YARF2B,EAQE3B,EAAK2B,QAPPC,EAOE5B,EAPgB6B,YAAlBA,OAAc,IAAAD,EAAA,OACdE,EAME9B,EAAK8B,MALPC,EAKE/B,EALK+B,QACPC,EAIEhC,eAHFiC,EAGEjC,eAFFkC,EAEElC,EAFWmC,MAAbA,OAAQ,IAAAD,KACRE,EACEpC,EADYqC,OAAdA,OAAS,IAAAD,KAELE,EAAQC,IACRC,EAAAC,EAAkCC,GAAS,GAAM,GAAhDC,EAAYH,EAAA,GAAEI,OACfC,EAAQC,IACRC,EAAWC,EACf,YACA,CACEC,QAAkB,YAAT7C,EACT8C,QAAkB,YAAT9C,EACT+C,UAAoB,cAAT/C,EACX+B,MAAOA,EACPE,OAAQA,EACRe,KAAe,SAAThD,EACNiD,MAAiB,WAAV7C,EACP8C,MAAiB,UAAV9C,EACP+C,UAAqB,cAAV/C,EACXgD,OAAiB,WAATlD,EACRmD,MAAgB,SAATnD,EACPoD,KAAe,SAATpD,EACNJ,SAAUA,EACVyD,SAAoB,UAAVrB,GAEZ5B,GAGIkD,EAAsD,SAAAC,GAChD,QAAVvB,GAAmBuB,EAAEC,YAAYC,2BACjCF,EAAEG,iBAEErB,GAAgC,IAAhBd,IAIA,IAAhBA,IACFgB,EAAMoB,QAAUC,YAAW,WACzBtB,GAAgB,GAChBuB,aAAatB,EAAMoB,QACpB,GAAEpC,IAEe,IAAhBA,GAAmBe,GAAgB,GAEvCjB,GAAWA,EAAQkC,GACrB,EAEAO,GAAU,WACR,OAAO,WACLD,aAAatB,EAAMoB,QACrB,CACD,GAAE,IAEH,IAAMI,GACJC,gBAACC,EAAM,CACL7D,UAAWqC,EACXnC,SAAUA,EACVE,SAAUA,EACVC,KAAMA,EACNX,KAAMA,EACNY,YAAaA,EACbC,iBAAkBA,EAClBC,gBAAiBA,EACjBC,eAAgBA,EAChBC,gBAAiBA,EACjBC,aAAcA,EACdC,cAAeA,EACfC,iBAAkBA,EAClBC,cAAeA,EACfC,QAASA,EACTC,UAAWA,EACXC,QAASiC,EACT1D,SAAUA,EACV4B,MAAOA,EACPC,QAASA,GAERtB,GAIL,MAAc,UAAV6B,EACK+B,GAKPC,EACEE,cAAA,SAAA,CAAA9D,UAAWqC,EACX7C,SAAUA,EACVE,KAAMO,EACNgB,QAASzB,OAAWuE,EAAYb,EAChC9B,MAAOA,GAENrB,GAAYI,EACZkB,GAAWuC,EAAAE,cAACE,EAAO,CAAC5C,MAAOE,EAAc2C,MAAO1C,IAGvD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import{View as l,Text as c}from"@tarojs/components";import a from"classnames";var t=function(t){var o=t.icon,
|
|
1
|
+
import e from"react";import{View as l,Text as c}from"@tarojs/components";import a from"classnames";var t=function(t){var o=t.icon,n=t.value,r=t.extraIcon,s=t.arrow,i=t.border,m=void 0===i||i,d=t.onClick,p=t.className,u=t.outline,h=void 0===u||u,v=t.descriptionColor,x=void 0===v?"":v,E=t.valueColor,N=t.ellipsis,f=void 0===N||N,b=t.content,y=t.contentDescription,C=t.description,k=t.subDescription,w=t.secondary,D=t.alignItems,I=void 0===D?o?"start":"center":D,g=t.placeholder,j=void 0===g?"":g,q=a("xh-cell",{border:m},{secondary:w},{outline:h},I,p),z=a("xh-cell-main",{ellipsis:f});return e.createElement(l,{className:q,onClick:function(e){d&&d(e)}},o&&e.createElement(l,{className:"xh-cell-icon"},o),e.createElement(l,{className:z},b&&e.createElement(c,{className:"xh-cell-main-content"},b),y&&e.createElement(c,{className:"xh-cell-main-description"},y)),e.createElement(l,{className:"xh-cell-description",style:{color:x}},C?e.createElement(c,null,C):e.createElement(c,{className:"xh-cell-description-placeholder"},j),e.createElement(c,{className:"xh-cell-description-sub"},k)),e.createElement(l,{className:"xh-cell-value"},e.createElement(l,{className:"xh-cell-value-info",style:{color:E}},n),e.createElement(l,{className:"xh-cell-value-icon"},r||s&&e.createElement(l,{className:"xh-cell-value-icon-arrow"}))))};export{t as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Cell/index.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport { View, Text, ITouchEvent } from \"@tarojs/components\";\nimport classNames from \"classnames\";\nimport { StandardLonghandProperties } from \"csstype\";\nimport { XHComponentCommonProps } from \"../../types\";\n\nimport \"./index.scss\";\n\nexport type XHCellProps = {\n content?: ReactNode;\n contentDescription?: ReactNode;\n description?: ReactNode;\n subDescription?: ReactNode;\n icon?: ReactNode;\n value?: ReactNode;\n extraIcon?: ReactNode;\n border?: boolean;\n arrow?: boolean;\n outline?: boolean;\n onClick?: (e: ITouchEvent) => void;\n descriptionColor?: StandardLonghandProperties[\"color\"];\n valueColor?: StandardLonghandProperties[\"color\"];\n ellipsis?: boolean;\n placeholder?: string;\n alignItems?: \"start\" | \"center\" | \"end\";\n /**\n * @description 是否是次级列表\n */\n secondary?: boolean;\n} & XHComponentCommonProps;\n\nconst XHCell: FC<XHCellProps> = props => {\n const {\n icon,\n value,\n extraIcon,\n arrow,\n border = true,\n onClick,\n className,\n outline = true,\n descriptionColor = \"\",\n valueColor,\n ellipsis = true,\n content,\n contentDescription,\n description,\n subDescription,\n secondary,\n alignItems = icon ? \"start\" : \"center\",\n placeholder = \"\",\n } = props;\n\n const cellcls = classNames(\n \"xh-cell\",\n { border },\n { secondary },\n { outline },\n alignItems,\n className\n );\n\n const mainCls = classNames(\"xh-cell-main\", {\n ellipsis,\n });\n\n const handleClick = (e: ITouchEvent) => {\n onClick && onClick(e);\n };\n\n return (\n <View className={cellcls} onClick={handleClick}>\n {icon && <View className=\"xh-cell-icon\">{icon}</View>}\n <View className={mainCls}>\n {content && <Text className=\"xh-cell-main-content\">{content}</Text>}\n {contentDescription && (\n <Text className=\"xh-cell-main-description\">{contentDescription}</Text>\n )}\n </View>\n <View className=\"xh-cell-description\" style={{ color: descriptionColor }}>\n {description ? (\n <Text>{description}</Text>\n ) : (\n <Text className=\"xh-cell-description-placeholder\">{placeholder}</Text>\n )}\n <Text className=\"xh-cell-description-sub\">{subDescription}</Text>\n </View>\n <View className=\"xh-cell-value\">\n <View className=\"xh-cell-value-info\" style={{ color: valueColor }}>\n {value}\n </View>\n <View className=\"xh-cell-value-icon\">\n {extraIcon
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Cell/index.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport { View, Text, ITouchEvent } from \"@tarojs/components\";\nimport classNames from \"classnames\";\nimport { StandardLonghandProperties } from \"csstype\";\nimport { XHComponentCommonProps } from \"../../types\";\n\nimport \"./index.scss\";\n\nexport type XHCellProps = {\n content?: ReactNode;\n contentDescription?: ReactNode;\n description?: ReactNode;\n subDescription?: ReactNode;\n icon?: ReactNode;\n value?: ReactNode;\n extraIcon?: ReactNode;\n border?: boolean;\n arrow?: boolean;\n outline?: boolean;\n onClick?: (e: ITouchEvent) => void;\n descriptionColor?: StandardLonghandProperties[\"color\"];\n valueColor?: StandardLonghandProperties[\"color\"];\n ellipsis?: boolean;\n placeholder?: string;\n alignItems?: \"start\" | \"center\" | \"end\";\n /**\n * @description 是否是次级列表\n */\n secondary?: boolean;\n} & XHComponentCommonProps;\n\nconst XHCell: FC<XHCellProps> = props => {\n const {\n icon,\n value,\n extraIcon,\n arrow,\n border = true,\n onClick,\n className,\n outline = true,\n descriptionColor = \"\",\n valueColor,\n ellipsis = true,\n content,\n contentDescription,\n description,\n subDescription,\n secondary,\n alignItems = icon ? \"start\" : \"center\",\n placeholder = \"\",\n } = props;\n\n const cellcls = classNames(\n \"xh-cell\",\n { border },\n { secondary },\n { outline },\n alignItems,\n className\n );\n\n const mainCls = classNames(\"xh-cell-main\", {\n ellipsis,\n });\n\n const handleClick = (e: ITouchEvent) => {\n onClick && onClick(e);\n };\n\n return (\n <View className={cellcls} onClick={handleClick}>\n {icon && <View className=\"xh-cell-icon\">{icon}</View>}\n <View className={mainCls}>\n {content && <Text className=\"xh-cell-main-content\">{content}</Text>}\n {contentDescription && (\n <Text className=\"xh-cell-main-description\">{contentDescription}</Text>\n )}\n </View>\n <View className=\"xh-cell-description\" style={{ color: descriptionColor }}>\n {description ? (\n <Text>{description}</Text>\n ) : (\n <Text className=\"xh-cell-description-placeholder\">{placeholder}</Text>\n )}\n <Text className=\"xh-cell-description-sub\">{subDescription}</Text>\n </View>\n <View className=\"xh-cell-value\">\n <View className=\"xh-cell-value-info\" style={{ color: valueColor }}>\n {value}\n </View>\n <View className=\"xh-cell-value-icon\">\n {extraIcon\n ? extraIcon\n : arrow && <View className=\"xh-cell-value-icon-arrow\" />}\n </View>\n </View>\n </View>\n );\n};\nexport default XHCell;\n"],"names":["XHCell","props","icon","value","extraIcon","arrow","_a","border","onClick","className","_b","outline","_c","descriptionColor","valueColor","_d","ellipsis","content","contentDescription","description","subDescription","secondary","_e","alignItems","_f","placeholder","cellcls","classNames","mainCls","React","createElement","View","e","Text","style","color"],"mappings":"mGA+BM,IAAAA,EAA0B,SAAAC,GAE5B,IAAAC,EAkBED,EAlBEC,KACJC,EAiBEF,EAAKE,MAhBPC,EAgBEH,EAhBOG,UACTC,EAeEJ,EAAKI,MAdPC,EAcEL,EAAKM,OAdPA,OAAS,IAAAD,GAAIA,EACbE,EAaEP,EAbKO,QACPC,EAYER,EAAKQ,UAXPC,EAWET,EAAKU,QAXPA,OAAU,IAAAD,GAAIA,EACdE,EAUEX,EAVmBY,iBAArBA,OAAgB,IAAAD,EAAG,GAAEA,EACrBE,EASEb,aARFc,EAQEd,EAAKe,SARPA,OAAW,IAAAD,GAAIA,EACfE,EAOEhB,EAAKgB,QANPC,EAMEjB,EANgBiB,mBAClBC,EAKElB,EAAKkB,YAJPC,EAIEnB,EAJYmB,eACdC,EAGEpB,EAAKoB,UAFPC,EAEErB,EAAKsB,WAFPA,OAAa,IAAAD,EAAApB,EAAO,QAAU,SAAQoB,EACtCE,EACEvB,EADcwB,YAAhBA,OAAW,IAAAD,EAAG,GAAEA,EAGZE,EAAUC,EACd,UACA,CAAEpB,OAAMA,GACR,CAAEc,UAASA,GACX,CAAEV,QAAOA,GACTY,EACAd,GAGImB,EAAUD,EAAW,eAAgB,CACzCX,SAAQA,IAOV,OACEa,EAACC,cAAAC,EAAK,CAAAtB,UAAWiB,EAASlB,QALR,SAACwB,GACnBxB,GAAWA,EAAQwB,EACrB,GAIK9B,GAAQ2B,gBAACE,EAAI,CAACtB,UAAU,gBAAgBP,GACzC2B,EAAAC,cAACC,EAAI,CAACtB,UAAWmB,GACdX,GAAWY,gBAACI,EAAI,CAACxB,UAAU,wBAAwBQ,GACnDC,GACCW,EAACC,cAAAG,EAAK,CAAAxB,UAAU,4BAA4BS,IAGhDW,EAAAC,cAACC,EAAI,CAACtB,UAAU,sBAAsByB,MAAO,CAAEC,MAAOtB,IACnDM,EACCU,gBAACI,EAAI,KAAEd,GAEPU,EAACC,cAAAG,EAAK,CAAAxB,UAAU,mCAAmCgB,GAErDI,EAACC,cAAAG,GAAKxB,UAAU,2BAA2BW,IAE7CS,EAAAC,cAACC,EAAI,CAACtB,UAAU,iBACdoB,EAAAC,cAACC,EAAI,CAACtB,UAAU,qBAAqByB,MAAO,CAAEC,MAAOrB,IAClDX,GAEH0B,EAAAC,cAACC,EAAK,CAAAtB,UAAU,sBACbL,GAEGC,GAASwB,EAAAC,cAACC,EAAK,CAAAtB,UAAU,+BAKvC"}
|
|
@@ -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:"#
|
|
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};
|
|
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: \"#
|
|
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","__assign","confirmColor","cancelColor","then"],"mappings":"uQAyCM,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,EAACJ,cAAAiB,EACC,CAAAC,OAAQjC,EACRkC,OAAQhB,EACRjB,QAASA,EACTkC,SACA,EAAAC,IAAKpB,IAEPH,EAEH,MACCwB,EACEC,EAAA,CAAAtC,MAAKA,EACLC,QAAOA,EACPsC,aAAc,UACdlC,WAAUA,EACVmC,YAAa,OACbrC,YAAWA,GACRG,IACFmC,KAAKhC,EAEZ,GACF"}
|
|
@@ -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 | \"user\"\n | \"play\"\n | \"arrowLeft\"\n | \"arrowRight\"\n | \"keyboardClose\"\n | \"add\"\n | \"tongxunlu\"\n | \"zhuyi\";\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 | \"user\"\n | \"play\"\n | \"arrowLeft\"\n | \"arrowRight\"\n | \"keyboardClose\"\n | \"add\"\n | \"tongxunlu\"\n | \"zhuyi\"\n | \"duigou\";\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":"6KA4DM,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{View as t,Text as a}from"@tarojs/components";import i from"classnames";var o=function(o){var l=o.title,s=void 0===l?"":l,r=o.description,n=void 0===r?"":r,c=o.icon,m=o.extra,d=void 0===m?"":m,x=o.extraIcon,v=void 0===x?"":x,p=o.arrow,N=o.border,
|
|
1
|
+
import e from"react";import{View as t,Text as a}from"@tarojs/components";import i from"classnames";var o=function(o){var l=o.title,s=void 0===l?"":l,r=o.description,n=void 0===r?"":r,c=o.icon,m=o.extra,d=void 0===m?"":m,x=o.extraIcon,v=void 0===x?"":x,p=o.arrow,N=o.border,h=void 0===N||N,E=o.onClick,f=o.className,u=o.outline,C=void 0===u||u,b=o.condensed,g=void 0!==b&&b,k=o.descriptionColor,w=void 0===k?"":k,y=o.extraColor,j=void 0===y?"":y,I=o.ellipsis,q=void 0===I||I,z=o.padding,A=i("xh-list",{border:h},{outline:C},{condensed:g},{padding:void 0!==z&&z},f),B=i("xh-list-main",{ellipsis:q});return e.createElement(t,{className:A,onClick:function(e){E&&E(e)}},c&&e.createElement(t,{className:"xh-list-icon"},c),e.createElement(t,{className:B},s&&e.createElement(a,{className:"xh-list-main-title"},s),e.createElement(a,{className:"xh-list-main-description",style:{color:w}},n)),e.createElement(t,{className:"xh-list-extra"},e.createElement(t,{className:"xh-list-extra-info",style:{color:j}},d),e.createElement(t,{className:"xh-list-extra-icon"},v||p&&e.createElement(t,{className:"xh-list-extra-icon-arrow"}))))};export{o as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/List/index.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport { View, Text, ITouchEvent } from \"@tarojs/components\";\nimport classNames from \"classnames\";\nimport { XHComponentCommonProps } from \"../../types\";\n\nimport \"./index.scss\";\n\nexport type XHListProps = {\n title?: string;\n description?: string | ReactNode;\n icon?: ReactNode;\n extra?: string | ReactNode;\n extraIcon?: ReactNode;\n border?: boolean;\n arrow?: boolean;\n outline?: boolean;\n condensed?: boolean;\n onClick?: (e: ITouchEvent) => void;\n descriptionColor?: string;\n extraColor?: string;\n ellipsis?: boolean;\n padding?: boolean;\n} & XHComponentCommonProps;\n\nconst XHList: FC<XHListProps> = props => {\n const {\n title = \"\",\n description = \"\",\n icon,\n extra = \"\",\n extraIcon = \"\",\n arrow,\n border = true,\n onClick,\n className,\n outline = true,\n condensed = false,\n descriptionColor = \"\",\n extraColor = \"\",\n ellipsis = true,\n padding = false,\n } = props;\n\n const listcls = classNames(\n \"xh-list\",\n { border },\n { outline },\n { condensed },\n { padding },\n className\n );\n\n const mainCls = classNames(\"xh-list-main\", {\n ellipsis,\n });\n\n const handleClick = (e: ITouchEvent) => {\n onClick && onClick(e);\n };\n\n return (\n <View className={listcls} onClick={handleClick}>\n {icon && <View className=\"xh-list-icon\">{icon}</View>}\n <View className={mainCls}>\n {title && <Text className=\"xh-list-main-title\">{title}</Text>}\n <Text\n className=\"xh-list-main-description\"\n style={{ color: descriptionColor }}\n >\n {description}\n </Text>\n </View>\n <View className=\"xh-list-extra\">\n <View className=\"xh-list-extra-info\" style={{ color: extraColor }}>\n {extra}\n </View>\n <View className=\"xh-list-extra-icon\">\n {extraIcon
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/List/index.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport { View, Text, ITouchEvent } from \"@tarojs/components\";\nimport classNames from \"classnames\";\nimport { XHComponentCommonProps } from \"../../types\";\n\nimport \"./index.scss\";\n\nexport type XHListProps = {\n title?: string;\n description?: string | ReactNode;\n icon?: ReactNode;\n extra?: string | ReactNode;\n extraIcon?: ReactNode;\n border?: boolean;\n arrow?: boolean;\n outline?: boolean;\n condensed?: boolean;\n onClick?: (e: ITouchEvent) => void;\n descriptionColor?: string;\n extraColor?: string;\n ellipsis?: boolean;\n padding?: boolean;\n} & XHComponentCommonProps;\n\nconst XHList: FC<XHListProps> = props => {\n const {\n title = \"\",\n description = \"\",\n icon,\n extra = \"\",\n extraIcon = \"\",\n arrow,\n border = true,\n onClick,\n className,\n outline = true,\n condensed = false,\n descriptionColor = \"\",\n extraColor = \"\",\n ellipsis = true,\n padding = false,\n } = props;\n\n const listcls = classNames(\n \"xh-list\",\n { border },\n { outline },\n { condensed },\n { padding },\n className\n );\n\n const mainCls = classNames(\"xh-list-main\", {\n ellipsis,\n });\n\n const handleClick = (e: ITouchEvent) => {\n onClick && onClick(e);\n };\n\n return (\n <View className={listcls} onClick={handleClick}>\n {icon && <View className=\"xh-list-icon\">{icon}</View>}\n <View className={mainCls}>\n {title && <Text className=\"xh-list-main-title\">{title}</Text>}\n <Text\n className=\"xh-list-main-description\"\n style={{ color: descriptionColor }}\n >\n {description}\n </Text>\n </View>\n <View className=\"xh-list-extra\">\n <View className=\"xh-list-extra-info\" style={{ color: extraColor }}>\n {extra}\n </View>\n <View className=\"xh-list-extra-icon\">\n {extraIcon\n ? extraIcon\n : arrow && <View className=\"xh-list-extra-icon-arrow\" />}\n </View>\n </View>\n </View>\n );\n};\nexport default XHList;\n"],"names":["XHList","props","_a","title","_b","description","icon","_c","extra","_d","extraIcon","arrow","_e","border","onClick","className","_f","outline","_g","condensed","_h","descriptionColor","_j","extraColor","_k","ellipsis","_l","padding","listcls","classNames","mainCls","React","createElement","View","e","Text","style","color"],"mappings":"mGAwBM,IAAAA,EAA0B,SAAAC,GAE5B,IAAAC,EAeED,EAAKE,MAfPA,OAAQ,IAAAD,EAAA,GAAEA,EACVE,EAcEH,EAdcI,YAAhBA,OAAc,IAAAD,EAAA,GAAEA,EAChBE,EAaEL,EAAKK,KAZPC,EAYEN,EAAKO,MAZPA,aAAQ,GAAED,EACVE,EAWER,EAAKS,UAXPA,OAAY,IAAAD,EAAA,GAAEA,EACdE,EAUEV,EAAKU,MATPC,EASEX,EAAKY,OATPA,OAAS,IAAAD,GAAIA,EACbE,EAQEb,EAAKa,QAPPC,EAOEd,EAAKc,UANPC,EAMEf,EAAKgB,QANPA,OAAU,IAAAD,GAAIA,EACdE,EAKEjB,EAAKkB,UALPA,OAAY,IAAAD,GAAKA,EACjBE,EAIEnB,EAJmBoB,iBAArBA,OAAgB,IAAAD,EAAG,GAAEA,EACrBE,EAGErB,EAHasB,WAAfA,OAAU,IAAAD,EAAG,GAAEA,EACfE,EAEEvB,EAAKwB,SAFPA,OAAW,IAAAD,GAAIA,EACfE,EACEzB,EADa0B,QAGXC,EAAUC,EACd,UACA,CAAEhB,OAAMA,GACR,CAAEI,QAAOA,GACT,CAAEE,UAASA,GACX,CAAEQ,aARK,IAAAD,GAAQA,GASfX,GAGIe,EAAUD,EAAW,eAAgB,CACzCJ,SAAQA,IAOV,OACEM,EAACC,cAAAC,EAAK,CAAAlB,UAAWa,EAASd,QALR,SAACoB,GACnBpB,GAAWA,EAAQoB,EACrB,GAIK5B,GAAQyB,gBAACE,EAAI,CAAClB,UAAU,gBAAgBT,GACzCyB,EAAAC,cAACC,EAAI,CAAClB,UAAWe,GACd3B,GAAS4B,gBAACI,EAAI,CAACpB,UAAU,sBAAsBZ,GAChD4B,EAAAC,cAACG,EACC,CAAApB,UAAU,2BACVqB,MAAO,CAAEC,MAAOhB,IAEfhB,IAGL0B,EAAAC,cAACC,EAAI,CAAClB,UAAU,iBACdgB,EAAAC,cAACC,EAAI,CAAClB,UAAU,qBAAqBqB,MAAO,CAAEC,MAAOd,IAClDf,GAEHuB,EAAAC,cAACC,EAAK,CAAAlB,UAAU,sBACbL,GAEGC,GAASoB,EAAAC,cAACC,EAAK,CAAAlB,UAAU,+BAKvC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import a from"classnames";import{View as o}from"@tarojs/components";import r from"../Mask/index.js";import t from"../ActivityIndicator/index.js";var i=function(i){var m=i.mask,s=i.className,n=i.tip,l=void 0===n?"加载中":n,c=i.color,d=void 0===c?"#FFF":c,p=i.size,f=void 0===p?60:p,x=a("xh-loading",s);return e.createElement(o,{className:x},e.createElement(r,{mask:m}),e.createElement(o,{className:a("xh-loading-main",{hasTip:l})},e.createElement(t,{size:f,style:{"--loading-border-color":d,"--loading-border-width":"3px"}}),l&&e.createElement(o,{className:"xh-loading-main-tip"},l)))};export{i as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Loading/index.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport Mask, { MaskProps } from \"../Mask\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport \"./index.scss\";\n\nexport type LoadingProps = {\n mask?: MaskProps[\"mask\"];\n color?: string;\n tip?: string | ReactNode;\n} & XHComponentCommonProps;\n\nconst Loading: FC<LoadingProps> = ({\n mask,\n className,\n tip = \"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Loading/index.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport Mask, { MaskProps } from \"../Mask\";\nimport Activityindicator from \"../ActivityIndicator\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport \"./index.scss\";\n\nexport type LoadingProps = {\n mask?: MaskProps[\"mask\"];\n color?: string;\n tip?: string | ReactNode;\n size?: number;\n} & XHComponentCommonProps;\n\nconst Loading: FC<LoadingProps> = ({\n mask,\n className,\n tip = \"加载中\",\n color = \"#FFF\",\n size = 60,\n}) => {\n const cls = classNames(\"xh-loading\", className);\n\n return (\n <View className={cls}>\n <Mask mask={mask} />\n <View className={classNames(\"xh-loading-main\", { hasTip: tip })}>\n <Activityindicator\n size={size}\n style={{\n \"--loading-border-color\": color,\n \"--loading-border-width\": \"3px\",\n }}\n />\n\n {/* <View className=\"xh-loading-main-spinner\">\n {[...Array(12).keys()].map((index) => (\n <View\n className={classNames(\n \"xh-loading-main-spinner-circle\",\n `is-circle${index + 1}`\n )}\n key={`spinner${index}`}\n >\n <View\n className=\"dot-rotate\"\n style={{ backgroundColor: color }}\n ></View>\n </View>\n ))}\n </View> */}\n {tip && <View className=\"xh-loading-main-tip\">{tip}</View>}\n </View>\n </View>\n );\n};\n\nexport default Loading;\n"],"names":["Loading","_a","mask","className","_b","tip","_c","color","_d","size","cls","classNames","React","createElement","View","Mask","hasTip","Activityindicator","style"],"mappings":"sKAeM,IAAAA,EAA4B,SAACC,OACjCC,EAAID,EAAAC,KACJC,EAASF,EAAAE,UACTC,QAAAC,OAAM,IAAAD,EAAA,MAAKA,EACXE,UAAAC,OAAQ,IAAAD,EAAA,OAAMA,EACdE,SAAAC,OAAO,IAAAD,EAAA,GAAEA,EAEHE,EAAMC,EAAW,aAAcR,GAErC,OACES,EAACC,cAAAC,EAAK,CAAAX,UAAWO,GACfE,EAAAC,cAACE,EAAI,CAACb,KAAMA,IACZU,EAAAC,cAACC,EAAI,CAACX,UAAWQ,EAAW,kBAAmB,CAAEK,OAAQX,KACvDO,EAAAC,cAACI,EACC,CAAAR,KAAMA,EACNS,MAAO,CACL,yBAA0BX,EAC1B,yBAA0B,SAoB7BF,GAAOO,EAAAC,cAACC,EAAI,CAACX,UAAU,uBAAuBE,IAIvD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e,__assign as o}from"../node_modules/tslib/tslib.es6.js";import a from"react";import{View as r}from"@tarojs/components";import t from"classnames";import s from"../Loading/index.js";import
|
|
1
|
+
import{__rest as e,__assign as o}from"../node_modules/tslib/tslib.es6.js";import a from"react";import{View as r}from"@tarojs/components";import t from"classnames";import s from"../Loading/index.js";import i from"../NavBar/index.js";var m=function(m){var l=m.children,n=m.loading,c=void 0!==n&&n,d=m.className,p=void 0===d?"":d,v=m.mask,N=void 0===v?"normal":v,f=m.tip,g=void 0===f?"加载中":f,E=m.loadingColor,h=void 0===E?"#FFF":E,u=m.customNavBar,x=void 0!==u&&u,j=m.title,_=void 0===j?"":j,k=e(m,["children","loading","className","mask","tip","loadingColor","customNavBar","title"]),A=t("xh-page",p,{flex:"h5"!==process.env.TARO_ENV&&x});return a.createElement(r,{className:A},"h5"!==process.env.TARO_ENV&&x&&a.createElement(i,o({title:_},k)),c&&a.createElement(r,{className:"loading-wrapper"},a.createElement(s,{mask:N,tip:g,color:h})),x&&"h5"!==process.env.TARO_ENV?a.createElement(r,{className:"xh-page-content"},l):l)};export{m as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Page/index.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport { View } from \"@tarojs/components\";\nimport classname from \"classnames\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport \"./index.scss\";\nimport Loading, { LoadingProps } from \"../Loading\";\nimport NavBar from \"../NavBar\";\n\nexport interface PageProps extends XHComponentCommonProps {\n loading?: boolean;\n mask?: LoadingProps[\"mask\"];\n tip?: ReactNode;\n loadingColor?: string;\n /**\n * @supported 小程序\n * @default false\n */\n customNavBar?: boolean;\n onBack?: () => void;\n title?: string;\n leftIcon?: boolean;\n rightIcon?: ReactNode;\n}\n\nconst Page: FC<PageProps> = props => {\n const {\n children,\n loading = false,\n className = \"\",\n mask = \"normal\",\n tip,\n loadingColor,\n customNavBar = false,\n title = \"\",\n ...rest\n } = props;\n\n const classObj = classname(\"xh-page\", className, {\n flex: process.env.TARO_ENV !== \"h5\" && customNavBar,\n });\n\n return (\n <View className={classObj}>\n {process.env.TARO_ENV !== \"h5\" && customNavBar && (\n <NavBar title={title} {...rest} />\n )}\n {loading && (\n <View className=\"loading-wrapper\">\n <Loading mask={mask} tip={tip} color={loadingColor} />\n </View>\n )}\n {customNavBar && process.env.TARO_ENV !== \"h5\" ? (\n <View className=\"xh-page-content\">{children}</View>\n ) : (\n children\n )}\n </View>\n );\n};\n\nexport default Page;\n"],"names":["Page","props","children","_a","loading","_b","className","_c","mask","tip","loadingColor","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Page/index.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport { View } from \"@tarojs/components\";\nimport classname from \"classnames\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport \"./index.scss\";\nimport Loading, { LoadingProps } from \"../Loading\";\nimport NavBar from \"../NavBar\";\n\nexport interface PageProps extends XHComponentCommonProps {\n loading?: boolean;\n mask?: LoadingProps[\"mask\"];\n tip?: ReactNode;\n loadingColor?: string;\n /**\n * @supported 小程序\n * @default false\n */\n customNavBar?: boolean;\n onBack?: () => void;\n title?: string;\n leftIcon?: boolean;\n rightIcon?: ReactNode;\n}\n\nconst Page: FC<PageProps> = props => {\n const {\n children,\n loading = false,\n className = \"\",\n mask = \"normal\",\n tip = \"加载中\",\n loadingColor = \"#FFF\",\n customNavBar = false,\n title = \"\",\n ...rest\n } = props;\n\n const classObj = classname(\"xh-page\", className, {\n flex: process.env.TARO_ENV !== \"h5\" && customNavBar,\n });\n\n return (\n <View className={classObj}>\n {process.env.TARO_ENV !== \"h5\" && customNavBar && (\n <NavBar title={title} {...rest} />\n )}\n {loading && (\n <View className=\"loading-wrapper\">\n <Loading mask={mask} tip={tip} color={loadingColor} />\n </View>\n )}\n {customNavBar && process.env.TARO_ENV !== \"h5\" ? (\n <View className=\"xh-page-content\">{children}</View>\n ) : (\n children\n )}\n </View>\n );\n};\n\nexport default Page;\n"],"names":["Page","props","children","_a","loading","_b","className","_c","mask","_d","tip","_e","loadingColor","_f","customNavBar","_g","title","rest","__rest","classObj","classname","flex","process","env","TARO_ENV","React","createElement","View","NavBar","Loading","color"],"mappings":"wOAwBM,IAAAA,EAAsB,SAAAC,GAExB,IAAAC,EASED,EAAKC,SARPC,EAQEF,EARaG,QAAfA,OAAU,IAAAD,GAAKA,EACfE,EAOEJ,EAAKK,UAPPA,aAAY,GAAED,EACdE,EAMEN,EANaO,KAAfA,OAAI,IAAAD,EAAG,SAAQA,EACfE,EAKER,MALFS,OAAM,IAAAD,EAAA,MAAKA,EACXE,EAIEV,eAJFW,OAAe,IAAAD,EAAA,SACfE,EAGEZ,EAAKa,aAHPA,OAAY,IAAAD,GAAQA,EACpBE,EAEEd,EAFQe,MAAVA,OAAQ,IAAAD,EAAA,GAAEA,EACPE,EACDC,EAAAjB,EAVE,CAAA,WAAA,UAAA,YAAA,OAAA,MAAA,eAAA,eAAA,UAYAkB,EAAWC,EAAU,UAAWd,EAAW,CAC/Ce,KAA+B,OAAzBC,QAAQC,IAAIC,UAAqBV,IAGzC,OACEW,EAACC,cAAAC,EAAK,CAAArB,UAAWa,GACW,OAAzBG,QAAQC,IAAIC,UAAqBV,GAChCW,EAACC,cAAAE,KAAOZ,MAAOA,GAAWC,IAE3Bb,GACCqB,EAAAC,cAACC,EAAK,CAAArB,UAAU,mBACdmB,EAAAC,cAACG,EAAO,CAACrB,KAAMA,EAAME,IAAKA,EAAKoB,MAAOlB,KAGzCE,GAAyC,OAAzBQ,QAAQC,IAAIC,SAC3BC,gBAACE,EAAI,CAACrB,UAAU,mBAAmBJ,GAEnC,EAIR"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as o}from"../node_modules/tslib/tslib.es6.js";import e from"react";import r from"classnames";import{View as s}from"@tarojs/components";import{pxTransform as t}from"../src/utils/index.js";var a=function(a){var n=a.percent,c=void 0===n?88:n,l=a.className,m=a.doneColor,i=void 0===m?"#DDD":m,d=a.backgroundColor,p=void 0===d?"rgba(0,0,0, 0.25)":d,u=a.maskColor,f=void 0===u?"#FFF":u,C=a.size,g=a.style,v=r("xh-progress-circle",l),b=C?{width:t(C),height:t(C)}:{},h=100===c,k=o(o(o({},b),{"--percent":"".concat(c/100,"turn"),"--doneColor":i,"--backgroundColor":p,"--maskContent":"percent","--maskColor":f}),g);return e.createElement(s,{className:v,style:k},h&&e.createElement(s,{className:"xh-progress-circle-done"}))};export{a as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/ProgressCircle/index.tsx"],"sourcesContent":["import React from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport { pxTransform } from \"@/utils\";\nimport { XHComponentCommonProps } from \"../../types\";\nimport \"./index.scss\";\n\nexport type ProgressProps = {\n percent: number;\n // showPercent?: boolean;\n doneColor?: string;\n size?: number;\n backgroundColor?: string;\n maskColor?: string;\n style?: React.CSSProperties;\n} & XHComponentCommonProps;\n\nconst Progress: React.FC<ProgressProps> = props => {\n const {\n percent = 88,\n className,\n // showPercent = false,\n doneColor = \"#DDD\",\n backgroundColor = \"rgba(0,0,0, 0.25)\",\n maskColor = \"#FFF\",\n size,\n style,\n } = props;\n const progresslcs = classNames(\"xh-progress-circle\", className);\n\n const finalSize: React.CSSProperties = size\n ? {\n width: pxTransform(size),\n height: pxTransform(size),\n }\n : {};\n\n const done = percent === 100;\n\n const finalStyle = {\n ...finalSize,\n \"--percent\": `${percent / 100}turn`,\n \"--doneColor\": doneColor,\n \"--backgroundColor\": backgroundColor,\n \"--maskContent\": \"percent\",\n \"--maskColor\": maskColor,\n ...style,\n };\n\n return (\n <View className={progresslcs} style={finalStyle}>\n {done && <View className=\"xh-progress-circle-done\"></View>}\n </View>\n );\n};\n\nexport default Progress;\n"],"names":["Progress","props","_a","percent","className","_b","doneColor","_c","backgroundColor","_d","maskColor","size","style","progresslcs","classNames","finalSize","width","pxTransform","height","done","finalStyle","__assign","concat","React","View","createElement"],"mappings":"2MAiBM,IAAAA,EAAoC,SAAAC,GAEtC,IAAAC,EAQED,EARUE,QAAZA,OAAO,IAAAD,EAAG,GAAEA,EACZE,EAOEH,EAPOG,UAETC,EAKEJ,EALgBK,UAAlBA,OAAY,IAAAD,EAAA,OAAMA,EAClBE,EAIEN,EAJmCO,gBAArCA,OAAe,IAAAD,EAAG,oBAAmBA,EACrCE,EAGER,EAHgBS,UAAlBA,OAAS,IAAAD,EAAG,OAAMA,EAClBE,EAEEV,EAAKU,KADPC,EACEX,QACEY,EAAcC,EAAW,qBAAsBV,GAE/CW,EAAiCJ,EACnC,CACEK,MAAOC,EAAYN,GACnBO,OAAQD,EAAYN,IAEtB,GAEEQ,EAAmB,MAAZhB,EAEPiB,EAAUC,EAAAA,EAAAA,EAAA,CAAA,EACXN,GAAS,CACZ,YAAa,GAAGO,OAAAnB,EAAU,IAAS,QACnC,cAAeG,EACf,oBAAqBE,EACrB,gBAAiB,UACjB,cAAeE,IACZE,GAGL,OACEW,gBAACC,EAAI,CAACpB,UAAWS,EAAaD,MAAOQ,GAClCD,GAAQI,EAACE,cAAAD,EAAK,CAAApB,UAAU,4BAG/B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as XHButton}from"../Button/index.js";export{default as XHPage}from"../Page/index.js";export{default as XHLoading}from"../Loading/index.js";export{default as XHBankIcon}from"../BankIcon/index.js";export{default as XHCaptcha}from"../Captcha/index.js";export{default as XHFormInput}from"../FormInput/index.js";export{default as XHList}from"../List/index.js";export{default as XHMask}from"../Mask/index.js";export{default as XHImage}from"../Image/index.js";export{default as XHDialog}from"../Dialog/index.js";export{default as XHNumberKeyboard}from"../NumberKeyboard/index.js";export{default as XHPasswordInput}from"../PasswordInput/index.js";export{default as XHProgress}from"../Progress/index.js";export{default as XHToast}from"../Toast/index.js";export{default as XHDialogRef}from"../DialogRef/index.js";export{default as XHTabbar}from"../Tabbar/index.js";export{default as XHPopup}from"../Popup/index.js";export{default as XHPicker}from"../Picker/index.js";export{default as XHSpace}from"../Space/index.js";export{default as ThemeProvider}from"../ThemeProvider/index.js";export{default as XHCheckbox}from"../Checkbox/index.js";export{default as XHRadio}from"../Radio/index.js";export{default as XHStep}from"../Step/index.js";export{default as XHBadge}from"../Badge/index.js";export{default as XHAmountInput}from"../AmountInput/index.js";export{default as XHAmountKeyboard}from"../AmountKeyboard/index.js";export{default as XHCollapse}from"../Collapse/index.js";export{default as XHNavBar}from"../NavBar/index.js";export{default as XHIcon}from"../Icon/index.js";export{default as XHActionSheet}from"../ActionSheet/index.js";export{default as XHRank}from"../Rank/index.js";export{default as XHCell}from"../Cell/index.js";export{default as XHActivityIndicator}from"../ActivityIndicator/index.js";export{default as XHSwitch}from"../Switch/index.js";export{default as XHLinkMan}from"../LinkMan/index.js";export{default as XHResult}from"../Result/index.js";
|
|
1
|
+
export{default as XHButton}from"../Button/index.js";export{default as XHPage}from"../Page/index.js";export{default as XHLoading}from"../Loading/index.js";export{default as XHBankIcon}from"../BankIcon/index.js";export{default as XHCaptcha}from"../Captcha/index.js";export{default as XHFormInput}from"../FormInput/index.js";export{default as XHList}from"../List/index.js";export{default as XHMask}from"../Mask/index.js";export{default as XHImage}from"../Image/index.js";export{default as XHDialog}from"../Dialog/index.js";export{default as XHNumberKeyboard}from"../NumberKeyboard/index.js";export{default as XHPasswordInput}from"../PasswordInput/index.js";export{default as XHProgress}from"../Progress/index.js";export{default as XHToast}from"../Toast/index.js";export{default as XHDialogRef}from"../DialogRef/index.js";export{default as XHTabbar}from"../Tabbar/index.js";export{default as XHPopup}from"../Popup/index.js";export{default as XHPicker}from"../Picker/index.js";export{default as XHSpace}from"../Space/index.js";export{default as ThemeProvider}from"../ThemeProvider/index.js";export{default as XHCheckbox}from"../Checkbox/index.js";export{default as XHRadio}from"../Radio/index.js";export{default as XHStep}from"../Step/index.js";export{default as XHBadge}from"../Badge/index.js";export{default as XHAmountInput}from"../AmountInput/index.js";export{default as XHAmountKeyboard}from"../AmountKeyboard/index.js";export{default as XHCollapse}from"../Collapse/index.js";export{default as XHNavBar}from"../NavBar/index.js";export{default as XHIcon}from"../Icon/index.js";export{default as XHActionSheet}from"../ActionSheet/index.js";export{default as XHRank}from"../Rank/index.js";export{default as XHCell}from"../Cell/index.js";export{default as XHActivityIndicator}from"../ActivityIndicator/index.js";export{default as XHSwitch}from"../Switch/index.js";export{default as XHLinkMan}from"../LinkMan/index.js";export{default as XHResult}from"../Result/index.js";export{default as XHProgressCircle}from"../ProgressCircle/index.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|