taro-react-uilib 1.4.24-2 → 1.4.24-4
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/BankIcon/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/Checkbox/index.js +1 -1
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/DialogComponent/index.js +1 -1
- package/dist/components/DialogComponent/index.js.map +1 -1
- package/dist/components/Image/index.js +1 -1
- package/dist/components/Image/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/Radio/index.js +1 -1
- package/dist/components/Radio/index.js.map +1 -1
- package/dist/components/ThemeProvider/index.js +1 -1
- package/dist/components/ThemeProvider/index.js.map +1 -1
- package/dist/components/src/index.js +1 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/styles/components/badge.scss +1 -2
- package/dist/styles/components/cell.scss +4 -9
- package/dist/styles/components/checkbox.scss +15 -9
- package/dist/styles/components/dialog.scss +31 -12
- package/dist/styles/components/dialogref.scss +2 -1
- package/dist/styles/components/index.scss +0 -1
- package/dist/styles/components/loading.scss +6 -1
- package/dist/styles/components/radio.scss +15 -9
- package/package.json +1 -5
- package/types/components/BankIcon/index.d.ts +1 -2
- package/types/components/Checkbox/index.d.ts +4 -0
- package/types/components/Loading/index.d.ts +0 -1
- package/types/components/Radio/index.d.ts +4 -0
- package/types/index.d.ts +0 -1
- package/CHANGELOG.md +0 -1543
- package/dist/components/Curtain/index.js +0 -2
- package/dist/components/Curtain/index.js.map +0 -1
- package/dist/styles/components/curtain.scss +0 -105
- package/dist/styles/components/font/.DS_Store +0 -0
- package/types/.DS_Store +0 -0
- package/types/components/Curtain/index.d.ts +0 -18
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__read as e}from"../node_modules/tslib/tslib.es6.js";import t from"react";import{View as n}from"@tarojs/components";import o from"classnames";var a=function(a){var s=a.children,i=a.className,l=a.visible,r=a.showClose,c=void 0===r||r,m=a.onVisibleChange,u=a.maskClosable,f=void 0!==u&&u,p=e(t.useState(!1),2),d=p[0],h=p[1],b=o("xh-curtain",i,{visible:l},{toggle:d}),g=function(e){null==e||e.stopPropagation(),h((function(e){return!e}))};return t.createElement(t.Fragment,null,t.createElement(n,{className:b,onClick:function(e){f&&g(e)},onAnimationEnd:function(e){d&&(!function(e){e.stopPropagation(),m(!l)}(e),g())}},t.createElement(n,{className:"xh-curtain-content"},s),c&&t.createElement(n,{className:"xh-curtain-close",onClick:g})),l&&t.createElement(n,{className:"xh-curtain-mask"}))};export{a as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Curtain/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { View } from \"@tarojs/components\";\nimport classNames from \"classnames\";\nimport { XHComponentCommonProps } from \"@/types\";\n\nimport \"./index.scss\";\n\nexport type XHModalProps = {\n /**\n * 是否显示\n */\n visible: boolean;\n transparent?: boolean;\n /**\n * 是否显示关闭按钮\n * @default true\n */\n showClose?: boolean;\n onVisibleChange: (visible: boolean) => void;\n maskClosable?: boolean;\n} & XHComponentCommonProps;\n\nconst Modal: React.FC<React.PropsWithChildren<XHModalProps>> = props => {\n const {\n children,\n className,\n visible,\n showClose = true,\n onVisibleChange,\n maskClosable = false,\n } = props;\n\n const [toggle, setToggle] = React.useState(false);\n\n const cls = classNames(\"xh-curtain\", className, { visible }, { toggle });\n\n const handleVisibleChange = e => {\n e.stopPropagation();\n onVisibleChange(!visible);\n };\n\n const handleClose = (e?: any) => {\n e?.stopPropagation();\n setToggle(old => !old);\n };\n\n const handleCloseAnimationEnd = e => {\n if (toggle) {\n handleVisibleChange(e);\n handleClose();\n }\n };\n\n const handleMaskClick = e => {\n if (maskClosable) handleClose(e);\n };\n\n return (\n <>\n <View\n className={cls}\n onClick={handleMaskClick}\n onAnimationEnd={handleCloseAnimationEnd}\n >\n <View className=\"xh-curtain-content\">{children}</View>\n {showClose && (\n <View className=\"xh-curtain-close\" onClick={handleClose} />\n )}\n </View>\n {visible && <View className=\"xh-curtain-mask\"></View>}\n </>\n );\n};\n\nexport default Modal;\n"],"names":["Modal","props","children","className","visible","_a","showClose","onVisibleChange","_b","maskClosable","_c","__read","React","useState","toggle","setToggle","cls","classNames","handleClose","e","stopPropagation","old","createElement","Fragment","View","onClick","onAnimationEnd","handleVisibleChange"],"mappings":"qJAsBM,IAAAA,EAAyD,SAAAC,GAE3D,IAAAC,EAMED,EANMC,SACRC,EAKEF,EALOE,UACTC,EAIEH,EAJKG,QACPC,EAGEJ,EAAKK,UAHPA,cAAgBD,EAChBE,EAEEN,EAAKM,gBADPC,EACEP,EADkBQ,aAApBA,OAAe,IAAAD,KAGXE,EAAAC,EAAsBC,EAAMC,UAAS,GAAM,GAA1CC,EAAMJ,EAAA,GAAEK,OAETC,EAAMC,EAAW,aAAcd,EAAW,CAAEC,QAAOA,GAAI,CAAEU,OAAMA,IAO/DI,EAAc,SAACC,GACnBA,SAAAA,EAAGC,kBACHL,GAAU,SAAAM,GAAO,OAACA,CAAG,GACvB,EAaA,OACET,EAAAU,cAAAV,EAAAW,SAAA,KACEX,EAAAU,cAACE,EAAI,CACHrB,UAAWa,EACXS,QARkB,SAAAN,GAClBV,GAAcS,EAAYC,EAChC,EAOMO,eAhB0B,SAAAP,GAC1BL,KAXsB,SAAAK,GAC1BA,EAAEC,kBACFb,GAAiBH,EACnB,CASIuB,CAAoBR,GACpBD,IAEJ,GAaMN,EAAAU,cAACE,EAAK,CAAArB,UAAU,sBAAsBD,GACrCI,GACCM,EAACU,cAAAE,GAAKrB,UAAU,mBAAmBsB,QAASP,KAG/Cd,GAAWQ,EAACU,cAAAE,EAAK,CAAArB,UAAU,oBAGlC"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
@import "../../styles/themes/variable.scss";
|
|
2
|
-
|
|
3
|
-
@font-face {
|
|
4
|
-
font-family: "xh-iconfont"; /* Project id 4043926 */
|
|
5
|
-
src:
|
|
6
|
-
url('./font/iconfont.woff2?t=1687140360510') format('woff2'),
|
|
7
|
-
url('./font/iconfont.woff?t=1687140360510') format('woff'),
|
|
8
|
-
url('./font/iconfont.ttf?t=1687140360510') format('truetype');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
#{$xh-prefix}-curtain {
|
|
12
|
-
position: fixed;
|
|
13
|
-
top: 0;
|
|
14
|
-
left: 0;
|
|
15
|
-
right: 0;
|
|
16
|
-
bottom: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
justify-content: space-around;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
align-items: center;
|
|
22
|
-
z-index: 1000;
|
|
23
|
-
display: none;
|
|
24
|
-
text-align: center;
|
|
25
|
-
touch-action: none;
|
|
26
|
-
&.visible {
|
|
27
|
-
display: flex;
|
|
28
|
-
animation: bounceIn 0.35s forwards cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
29
|
-
}
|
|
30
|
-
&.toggle {
|
|
31
|
-
display: flex;
|
|
32
|
-
animation: bounceOut 0.35s forwards cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
33
|
-
}
|
|
34
|
-
&-content {
|
|
35
|
-
margin-bottom: 42px;
|
|
36
|
-
width: 80%;
|
|
37
|
-
display: flex;
|
|
38
|
-
place-items: center;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
img, image {
|
|
41
|
-
max-width: 100%;
|
|
42
|
-
/* #ifdef h5 */
|
|
43
|
-
height: auto;
|
|
44
|
-
/* #endif */
|
|
45
|
-
display: block;
|
|
46
|
-
object-fit: contain;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
&-mask {
|
|
50
|
-
position: fixed;
|
|
51
|
-
top: 0;
|
|
52
|
-
left: 0;
|
|
53
|
-
right: 0;
|
|
54
|
-
bottom: 0;
|
|
55
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
56
|
-
z-index: 999;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&-close {
|
|
60
|
-
display: block;
|
|
61
|
-
font-family: 'xh-iconfont';
|
|
62
|
-
-webkit-font-smoothing: antialiased;
|
|
63
|
-
font-size: 30PX;
|
|
64
|
-
color: #FFF;
|
|
65
|
-
&:before {
|
|
66
|
-
content: "\e608";
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
@keyframes bounceIn {
|
|
72
|
-
0% {
|
|
73
|
-
opacity: 0;
|
|
74
|
-
transform: scale3d(0.3, 0.3, 0.3);
|
|
75
|
-
}
|
|
76
|
-
20% {
|
|
77
|
-
transform: scale3d(0.6, 0.6, 0.6);
|
|
78
|
-
}
|
|
79
|
-
50% {
|
|
80
|
-
opacity: 1;
|
|
81
|
-
transform: scale3d(0.8, .8, .8);
|
|
82
|
-
}
|
|
83
|
-
80% {
|
|
84
|
-
transform: scale3d(0.97, 0.97, 0.97);
|
|
85
|
-
}
|
|
86
|
-
to {
|
|
87
|
-
opacity: 1;
|
|
88
|
-
transform: scale3d(1, 1, 1);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@keyframes bounceOut {
|
|
93
|
-
|
|
94
|
-
50%,
|
|
95
|
-
55% {
|
|
96
|
-
opacity: 1;
|
|
97
|
-
transform: scale3d(1.1, 1.1, 1.1);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
to {
|
|
101
|
-
opacity: 0;
|
|
102
|
-
-webkit-transform: scale3d(0.3, 0.3, 0.3);
|
|
103
|
-
transform: scale3d(0.3, 0.3, 0.3);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
Binary file
|
package/types/.DS_Store
DELETED
|
Binary file
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { XHComponentCommonProps } from "@/types";
|
|
3
|
-
export declare type XHModalProps = {
|
|
4
|
-
/**
|
|
5
|
-
* 是否显示
|
|
6
|
-
*/
|
|
7
|
-
visible: boolean;
|
|
8
|
-
transparent?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* 是否显示关闭按钮
|
|
11
|
-
* @default true
|
|
12
|
-
*/
|
|
13
|
-
showClose?: boolean;
|
|
14
|
-
onVisibleChange: (visible: boolean) => void;
|
|
15
|
-
maskClosable?: boolean;
|
|
16
|
-
} & XHComponentCommonProps;
|
|
17
|
-
declare const Modal: React.FC<React.PropsWithChildren<XHModalProps>>;
|
|
18
|
-
export default Modal;
|