taro-react-uilib 1.4.15-0 → 1.4.15-2
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/Loading/index.js +1 -1
- package/dist/components/Loading/index.js.map +1 -1
- package/dist/components/Step/Steps/index.js +1 -1
- package/dist/components/Step/Steps/index.js.map +1 -1
- package/dist/components/Step/index.js +1 -1
- package/dist/components/Step/index.js.map +1 -1
- package/dist/components/ThemeProvider/index.js.map +1 -1
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +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/images/loading.gif +0 -0
- package/dist/styles/components/loading.scss +5 -0
- package/dist/styles/components/step.scss +24 -0
- package/lib/components/Loading/index.js +5 -6
- package/lib/components/Loading/index.js.map +1 -1
- package/lib/components/Step/Steps/index.js +2 -1
- package/lib/components/Step/Steps/index.js.map +1 -1
- package/lib/components/Step/index.js +2 -2
- package/lib/components/Step/index.js.map +1 -1
- package/lib/components/ThemeProvider/index.js.map +1 -1
- package/package.json +1 -1
- package/types/components/Step/Steps/index.d.ts +1 -0
- package/types/components/Step/index.d.ts +1 -0
- package/types/components/ThemeProvider/index.d.ts +6 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from"react";import e from"classnames";import{View as m}from"@tarojs/components";import t from"../Mask/index.js";var s=function(s){var r=s.mask,n=s.className,i=s.tip,o=void 0===i?"加载中":i,l=e("xh-loading",n);return a.createElement(m,{className:l},a.createElement(t,{mask:r}),a.createElement(m,{className:e("xh-loading-main",{hasTip:o})},a.createElement(m,{className:"xh-loading-main-gif"}),o&&a.createElement(m,{className:"xh-loading-main-tip"},o)))};export{s 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\";\
|
|
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\";\n// import 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 <View className=\"xh-loading-main-gif\"></View>\n {/* <Image src={require('../../assets/images/loading.gif')} className=\"xh-loading-main-gif\" /> */}\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","cls","classNames","React","createElement","View","Mask","hasTip"],"mappings":"yHAeM,IAAAA,EAA4B,SAACC,OACjCC,EAAID,EAAAC,KACJC,EAASF,EAAAE,UACTC,QAAAC,OAAM,IAAAD,EAAA,MAAKA,EAILE,EAAMC,EAAW,aAAcJ,GAErC,OACEK,EAACC,cAAAC,EAAK,CAAAP,UAAWG,GACfE,EAAAC,cAACE,EAAI,CAACT,KAAMA,IACZM,EAAAC,cAACC,EAAI,CAACP,UAAWI,EAAW,kBAAmB,CAAEK,OAAQP,KAQvDG,EAAAC,cAACC,EAAI,CAACP,UAAU,wBAmBfE,GAAOG,EAAAC,cAACC,EAAI,CAACP,UAAU,uBAAuBE,IAIvD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"react";import e from"classnames";import{View as s}from"@tarojs/components";var a=t.createElement("span",{className:"".concat("xh-step","-icon-dot")}),r=function(r){var n=r.direction,o=void 0===n?"horizontal":n,c=r.current,i=void 0===c?0:c,l=r.style,m=r.className,p=e("xh-steps","".concat("xh-steps","-").concat(o),m);return t.createElement(s,{className:
|
|
1
|
+
import t from"react";import e from"classnames";import{View as s}from"@tarojs/components";var a=t.createElement("span",{className:"".concat("xh-step","-icon-dot")}),r=function(r){var n=r.direction,o=void 0===n?"horizontal":n,c=r.current,i=void 0===c?0:c,l=r.style,m=r.className,d=r.dashed,p=void 0!==d&&d,u=e("xh-steps","".concat("xh-steps","-").concat(o),m);return t.createElement(s,{className:u,style:l},t.Children.map(r.children,(function(e,s){var r;if(!t.isValidElement(e))return e;var n=e.props,c=n.status||"wait";s<i?c=n.status||"finish":s===i&&(c=n.status||"process");var l=null!==(r=n.icon)&&void 0!==r?r:a;return t.cloneElement(e,{status:c,icon:l,direction:o,dashed:p})})))};export{r as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Step/Steps/index.tsx"],"sourcesContent":["import React, { FC, ReactElement } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport type { XHComponentCommonProps } from \"../../../types\";\n\nimport { StepProps } from \"..\";\n\nconst classPrefix = `xh-steps`;\nconst stepClassPrefix = `xh-step`;\n\nconst defaultIcon = <span className={`${stepClassPrefix}-icon-dot`} />;\n\nexport type StepsProps = {\n current?: number;\n direction?: \"horizontal\" | \"vertical\";\n children?: React.ReactNode;\n style?: React.CSSProperties & {\n \"--line-to-next-color\"?: string;\n \"--color-primary\"?: string;\n };\n} & XHComponentCommonProps;\n\nconst Steps: FC<StepsProps> = props => {\n const {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Step/Steps/index.tsx"],"sourcesContent":["import React, { FC, ReactElement } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport type { XHComponentCommonProps } from \"../../../types\";\n\nimport { StepProps } from \"..\";\n\nconst classPrefix = `xh-steps`;\nconst stepClassPrefix = `xh-step`;\n\nconst defaultIcon = <span className={`${stepClassPrefix}-icon-dot`} />;\n\nexport type StepsProps = {\n current?: number;\n direction?: \"horizontal\" | \"vertical\";\n children?: React.ReactNode;\n style?: React.CSSProperties & {\n \"--line-to-next-color\"?: string;\n \"--color-primary\"?: string;\n };\n dashed?: boolean;\n} & XHComponentCommonProps;\n\nconst Steps: FC<StepsProps> = props => {\n const {\n direction = \"horizontal\",\n current = 0,\n style,\n className,\n dashed = false,\n } = props;\n const classString = classNames(\n classPrefix,\n `${classPrefix}-${direction}`,\n className\n );\n\n return (\n <View className={classString} style={style}>\n {React.Children.map(\n props.children,\n (child: ReactElement<StepProps>, index) => {\n if (!React.isValidElement(child)) {\n return child;\n }\n const props = child.props;\n\n let status = props.status || \"wait\";\n if (index < current) {\n status = props.status || \"finish\";\n } else if (index === current) {\n status = props.status || \"process\";\n }\n\n const icon = props.icon ?? defaultIcon;\n\n return React.cloneElement(child, {\n status,\n icon,\n direction,\n dashed,\n });\n }\n )}\n </View>\n );\n};\n\nexport default Steps;\n"],"names":["defaultIcon","React","createElement","className","concat","Steps","props","_a","direction","_b","current","style","_c","dashed","classString","classNames","View","Children","map","children","child","index","isValidElement","status","icon","cloneElement"],"mappings":"yFAOA,IAGMA,EAAcC,EAAMC,cAAA,OAAA,CAAAC,UAAW,GAAGC,OAFhB,UAE0C,eAa5DC,EAAwB,SAAAC,GAE1B,IAAAC,EAKED,EAAKE,UALPA,aAAY,aAAYD,EACxBE,EAIEH,EAJSI,QAAXA,OAAO,IAAAD,EAAG,EAACA,EACXE,EAGEL,EAHGK,MACLR,EAEEG,EAFOH,UACTS,EACEN,SADFO,OAAS,IAAAD,KAELE,EAAcC,EAxBF,WA0BhB,GAAAX,OA1BgB,WA0BF,KAAAA,OAAII,GAClBL,GAGF,OACEF,EAACC,cAAAc,EAAK,CAAAb,UAAWW,EAAaH,MAAOA,GAClCV,EAAMgB,SAASC,IACdZ,EAAMa,UACN,SAACC,EAAgCC,SAC/B,IAAKpB,EAAMqB,eAAeF,GACxB,OAAOA,EAET,IAAMd,EAAQc,EAAMd,MAEhBiB,EAASjB,EAAMiB,QAAU,OACzBF,EAAQX,EACVa,EAASjB,EAAMiB,QAAU,SAChBF,IAAUX,IACnBa,EAASjB,EAAMiB,QAAU,WAG3B,IAAMC,EAAiB,QAAVjB,EAAAD,EAAMkB,YAAI,IAAAjB,EAAAA,EAAIP,EAE3B,OAAOC,EAAMwB,aAAaL,EAAO,CAC/BG,OAAMA,EACNC,KAAIA,EACJhB,UAASA,EACTK,OAAMA,GAET,IAIT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import t from"classnames";import{View as a}from"@tarojs/components";import c from"./Steps/index.js";var s=function(c){var s=c.title,n=c.description,o=c.icon,r=c.status,m=void 0===r?"wait":r,i=c.fancy,l=c.style,p=c.className,x=c.direction,f=c.
|
|
1
|
+
import e from"react";import t from"classnames";import{View as a}from"@tarojs/components";import c from"./Steps/index.js";var s=function(c){var s=c.title,n=c.description,o=c.icon,r=c.status,m=void 0===r?"wait":r,i=c.fancy,l=c.style,p=c.className,x=c.direction,d=c.prefix,f=c.dashed;return e.createElement(a,{className:t("".concat("xh-step"),"".concat("xh-step","-status-").concat(m),p),style:l},"vertical"===x&&d&&e.createElement(a,{className:"".concat("xh-step","-prefix")},d),e.createElement(a,{className:t("".concat("xh-step","-indicator"),{dashed:f})},e.createElement(a,{className:t("".concat("xh-step","-icon-container"),{fancy:i})},o)),e.createElement(a,{className:"".concat("xh-step","-content")},e.createElement(a,{className:"".concat("xh-step","-title")},s),!!n&&e.createElement(a,{className:"".concat("xh-step","-description")},n)))};s.Steps=c;export{s as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Step/index.tsx"],"sourcesContent":["import React, { ReactNode, ForwardRefExoticComponent } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport type { XHComponentCommonProps } from \"../../types\";\n\nimport Steps from \"./Steps\";\nimport \"./index.scss\";\n\nexport type StepProps = {\n icon?: string | ReactNode;\n title: string | ReactNode;\n description?: string | ReactNode;\n direction?: \"horizontal\" | \"vertical\";\n status?: \"wait\" | \"process\" | \"finish\" | \"error\";\n fancy?: boolean;\n style?: React.CSSProperties;\n prefix?: ReactNode;\n} & XHComponentCommonProps;\n\nconst classPrefix = \"xh-step\";\n\nconst Step: React.FC<StepProps> = props => {\n const {\n title,\n description,\n icon,\n status = \"wait\",\n fancy,\n style,\n className,\n direction,\n prefix,\n } = props;\n\n return (\n <View\n className={classNames(\n `${classPrefix}`,\n `${classPrefix}-status-${status}`,\n className\n )}\n style={style}\n >\n {direction === \"vertical\" && prefix && (\n <View className={`${classPrefix}-prefix`}>{prefix}</View>\n )}\n <View className={`${classPrefix}-indicator
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Step/index.tsx"],"sourcesContent":["import React, { ReactNode, ForwardRefExoticComponent } from \"react\";\nimport classNames from \"classnames\";\nimport { View } from \"@tarojs/components\";\nimport type { XHComponentCommonProps } from \"../../types\";\n\nimport Steps from \"./Steps\";\nimport \"./index.scss\";\n\nexport type StepProps = {\n icon?: string | ReactNode;\n title: string | ReactNode;\n description?: string | ReactNode;\n direction?: \"horizontal\" | \"vertical\";\n status?: \"wait\" | \"process\" | \"finish\" | \"error\";\n fancy?: boolean;\n dashed?: boolean;\n style?: React.CSSProperties;\n prefix?: ReactNode;\n} & XHComponentCommonProps;\n\nconst classPrefix = \"xh-step\";\n\nconst Step: React.FC<StepProps> = props => {\n const {\n title,\n description,\n icon,\n status = \"wait\",\n fancy,\n style,\n className,\n direction,\n prefix,\n dashed,\n } = props;\n\n return (\n <View\n className={classNames(\n `${classPrefix}`,\n `${classPrefix}-status-${status}`,\n className\n )}\n style={style}\n >\n {direction === \"vertical\" && prefix && (\n <View className={`${classPrefix}-prefix`}>{prefix}</View>\n )}\n <View className={classNames(`${classPrefix}-indicator`, { dashed })}>\n <View\n className={classNames(`${classPrefix}-icon-container`, { fancy })}\n >\n {icon}\n </View>\n </View>\n <View className={`${classPrefix}-content`}>\n <View className={`${classPrefix}-title`}>{title}</View>\n {!!description && (\n <View className={`${classPrefix}-description`}>{description}</View>\n )}\n </View>\n </View>\n );\n};\n\nexport type HybridComponent = ForwardRefExoticComponent<StepProps> & {\n Steps: typeof Steps;\n};\n\nconst XHStep = Step as HybridComponent;\nXHStep.Steps = Steps;\n\nexport default XHStep;\n"],"names":["XHStep","props","title","description","icon","_a","status","fancy","style","className","direction","prefix","dashed","React","View","classNames","concat","createElement","Steps"],"mappings":"yHAoBA,IAiDMA,EA/C4B,SAAAC,GAE9B,IAAAC,EAUED,EAVGC,MACLC,EASEF,EATSE,YACXC,EAQEH,EAREG,KACJC,EAOEJ,EAPaK,OAAfA,OAAS,IAAAD,EAAA,OAAMA,EACfE,EAMEN,EANGM,MACLC,EAKEP,EAAKO,MAJPC,EAIER,EAAKQ,UAHPC,EAGET,EAAKS,UAFPC,EAEEV,EAFIU,OACNC,EACEX,EAAKW,OAET,OACEC,gBAACC,EAAI,CACHL,UAAWM,EACT,GAAAC,OAnBY,WAoBZ,GAAGA,OApBS,UAoBa,YAAAA,OAAAV,GACzBG,GAEFD,MAAOA,GAEQ,aAAdE,GAA4BC,GAC3BE,EAACI,cAAAH,EAAK,CAAAL,UAAW,GAAGO,OA1BR,sBA0B+BL,GAE7CE,EAAAI,cAACH,EAAI,CAACL,UAAWM,EAAW,GAAAC,OA5Bd,UA4B4B,cAAc,CAAEJ,OAAMA,KAC9DC,EAAAI,cAACH,EACC,CAAAL,UAAWM,EAAW,UA9BZ,UA8B0B,mBAAmB,CAAER,MAAKA,KAE7DH,IAGLS,EAAAI,cAACH,EAAK,CAAAL,UAAW,GAAAO,OAnCH,UAmC2B,aACvCH,EAACI,cAAAH,GAAKL,UAAW,UApCL,UAoCmB,WAAWP,KACvCC,GACDU,EAACI,cAAAH,GAAKL,UAAW,UAtCP,UAsCqB,iBAAiBN,IAK1D,EAOAH,EAAOkB,MAAQA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/ThemeProvider/index.tsx"],"sourcesContent":["import React, { createContext } from \"react\";\nimport cssVars from \"css-vars-ponyfill\";\n\nexport type ThemeValue = {\n \"--color-primary\"?: string;\n \"--color-primary-dark\"?: string;\n \"--color-primary-reverse\"?: string;\n \"--color-disabled\"?: string;\n \"--color-warning\"?: string;\n \"--color-warning-light\"?: string;\n \"--background-color\"?: string;\n \"--body-background-color\"?: string;\n \"--font-color\"?: string;\n \"--font-color-secondary\"?: string;\n \"--font-color-tertiary\"?: string;\n \"--border-color\"?: string;\n \"--btn-color\"?: string;\n \"--btn-shadow-primary\"?: string;\n \"--mask-color\"?: string;\n};\n\nexport type ThemeProviderProps = {\n value: ThemeValue;\n scoped?: boolean;\n};\n\nconst createTheme = (theme: { [key: string]: string }) => {\n return createContext({ ...theme });\n};\n\nexport const ThemeContext = createTheme({});\n\nconst ThemeProvider: React.FC<ThemeProviderProps
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/ThemeProvider/index.tsx"],"sourcesContent":["import React, { createContext, PropsWithChildren } from \"react\";\nimport cssVars from \"css-vars-ponyfill\";\n\nexport type ThemeValue = {\n \"--color-primary\"?: string;\n \"--color-primary-dark\"?: string;\n \"--color-primary-reverse\"?: string;\n \"--color-disabled\"?: string;\n \"--color-warning\"?: string;\n \"--color-warning-light\"?: string;\n \"--background-color\"?: string;\n \"--body-background-color\"?: string;\n \"--font-color\"?: string;\n \"--font-color-secondary\"?: string;\n \"--font-color-tertiary\"?: string;\n \"--border-color\"?: string;\n \"--btn-color\"?: string;\n \"--btn-shadow-primary\"?: string;\n \"--mask-color\"?: string;\n \"--btn-color-disabled\"?: string;\n};\n\nexport type ThemeProviderProps = {\n value: ThemeValue & { [key: string]: string };\n scoped?: boolean;\n};\n\nconst createTheme = (theme: { [key: string]: string }) => {\n return createContext({ ...theme });\n};\n\nexport const ThemeContext = createTheme({});\n\nconst ThemeProvider: React.FC<PropsWithChildren<ThemeProviderProps>> = ({\n children,\n value,\n scoped = false,\n}) => {\n let clonedElement = children;\n if (!scoped) {\n Object.keys(value).forEach(key => {\n document.body.style.setProperty(key, value[key]);\n });\n } else {\n clonedElement = React.Children.map(children, (child, index) => {\n if (index === 0) {\n return React.cloneElement(child as any, {\n style: value,\n });\n } else {\n return child;\n }\n });\n }\n\n cssVars({\n variables: value as { [key: string]: string },\n });\n\n return (\n <ThemeContext.Provider value={value}>{clonedElement}</ThemeContext.Provider>\n );\n};\n\nexport default ThemeProvider;\n"],"names":["ThemeContext","createContext","__assign","ThemeProvider","_a","children","value","_b","clonedElement","React","Children","map","child","index","cloneElement","style","Object","keys","forEach","key","document","body","setProperty","cssVars","variables","createElement","Provider"],"mappings":"sLA2BA,IAIaA,EAHJC,EAAaC,EAAA,GAGkB,KAElCC,EAAiE,SAACC,OACtEC,EAAQD,EAAAC,SACRC,EAAKF,EAAAE,MACLC,WAEIC,EAAgBH,EAqBpB,YAvBS,IAAAE,GAAKA,EAQZC,EAAgBC,EAAMC,SAASC,IAAIN,GAAU,SAACO,EAAOC,GACnD,OAAc,IAAVA,EACKJ,EAAMK,aAAaF,EAAc,CACtCG,MAAOT,IAGFM,CAEX,IAZAI,OAAOC,KAAKX,GAAOY,SAAQ,SAAAC,GACzBC,SAASC,KAAKN,MAAMO,YAAYH,EAAKb,EAAMa,GAC7C,IAaFI,EAAQ,CACNC,UAAWlB,IAIXG,EAAAgB,cAACzB,EAAa0B,SAAQ,CAACpB,MAAOA,GAAQE,EAE1C"}
|